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

7
node_modules/antd/es/date-picker/style/index.d.ts generated vendored Normal file
View File

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

433
node_modules/antd/es/date-picker/style/index.js generated vendored Normal file
View File

@@ -0,0 +1,433 @@
import { unit } from '@ant-design/cssinjs';
import { genPlaceholderStyle, initInputToken } from '../../input/style';
import { resetComponent, textEllipsis } from '../../style';
import { genCompactItemStyle } from '../../style/compact-item';
import { initMoveMotion, initSlideMotion, slideDownIn, slideDownOut, slideUpIn, slideUpOut } from '../../style/motion';
import { genRoundedArrow } from '../../style/roundedArrow';
import { genStyleHooks, mergeToken } from '../../theme/internal';
import genPickerMultipleStyle from './multiple';
import genPickerPanelStyle, { genPanelStyle } from './panel';
import { initPanelComponentToken, initPickerPanelToken, prepareComponentToken } from './token';
import genVariantsStyle from './variants';
export { initPickerPanelToken, initPanelComponentToken, genPanelStyle };
const genPickerPadding = (paddingBlock, paddingInline) => {
return {
padding: `${unit(paddingBlock)} ${unit(paddingInline)}`
};
};
const genPickerStatusStyle = token => {
const {
componentCls,
colorError,
colorWarning
} = token;
return {
[`${componentCls}:not(${componentCls}-disabled):not([disabled])`]: {
[`&${componentCls}-status-error`]: {
[`${componentCls}-active-bar`]: {
background: colorError
}
},
[`&${componentCls}-status-warning`]: {
[`${componentCls}-active-bar`]: {
background: colorWarning
}
}
}
};
};
const genPickerStyle = token => {
var _a;
const {
componentCls,
antCls,
paddingInline,
lineWidth,
lineType,
colorBorder,
borderRadius,
motionDurationMid,
colorTextDisabled,
colorTextPlaceholder,
colorTextQuaternary,
fontSizeLG,
inputFontSizeLG,
fontSizeSM,
inputFontSizeSM,
controlHeightSM,
paddingInlineSM,
paddingXS,
marginXS,
colorIcon,
lineWidthBold,
colorPrimary,
motionDurationSlow,
zIndexPopup,
paddingXXS,
sizePopupArrow,
colorBgElevated,
borderRadiusLG,
boxShadowSecondary,
borderRadiusSM,
colorSplit,
cellHoverBg,
presetsWidth,
presetsMaxWidth,
boxShadowPopoverArrow,
fontHeight,
lineHeightLG
} = token;
return [{
[componentCls]: Object.assign(Object.assign(Object.assign({}, resetComponent(token)), genPickerPadding(token.paddingBlock, token.paddingInline)), {
position: 'relative',
display: 'inline-flex',
alignItems: 'center',
lineHeight: 1,
borderRadius,
transition: `border ${motionDurationMid}, box-shadow ${motionDurationMid}, background ${motionDurationMid}`,
[`${componentCls}-prefix`]: {
flex: '0 0 auto',
marginInlineEnd: token.inputAffixPadding
},
// ======================== Input =========================
[`${componentCls}-input`]: {
position: 'relative',
display: 'inline-flex',
alignItems: 'center',
width: '100%',
'> input': Object.assign(Object.assign({
position: 'relative',
display: 'inline-block',
width: '100%',
color: 'inherit',
fontSize: (_a = token.inputFontSize) !== null && _a !== void 0 ? _a : token.fontSize,
lineHeight: token.lineHeight,
transition: `all ${motionDurationMid}`
}, genPlaceholderStyle(colorTextPlaceholder)), {
flex: 'auto',
// Fix Firefox flex not correct:
// https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553
minWidth: 1,
height: 'auto',
padding: 0,
background: 'transparent',
border: 0,
fontFamily: 'inherit',
'&:focus': {
boxShadow: 'none',
outline: 0
},
'&[disabled]': {
background: 'transparent',
color: colorTextDisabled,
cursor: 'not-allowed'
}
}),
'&-placeholder': {
'> input': {
color: colorTextPlaceholder
}
}
},
// Size
'&-large': Object.assign(Object.assign({}, genPickerPadding(token.paddingBlockLG, token.paddingInlineLG)), {
[`${componentCls}-input > input`]: {
fontSize: inputFontSizeLG !== null && inputFontSizeLG !== void 0 ? inputFontSizeLG : fontSizeLG,
lineHeight: lineHeightLG
}
}),
'&-small': Object.assign(Object.assign({}, genPickerPadding(token.paddingBlockSM, token.paddingInlineSM)), {
[`${componentCls}-input > input`]: {
fontSize: inputFontSizeSM !== null && inputFontSizeSM !== void 0 ? inputFontSizeSM : fontSizeSM
}
}),
[`${componentCls}-suffix`]: {
display: 'flex',
flex: 'none',
alignSelf: 'center',
marginInlineStart: token.calc(paddingXS).div(2).equal(),
color: colorTextQuaternary,
lineHeight: 1,
pointerEvents: 'none',
transition: `opacity ${motionDurationMid}, color ${motionDurationMid}`,
'> *': {
verticalAlign: 'top',
'&:not(:last-child)': {
marginInlineEnd: marginXS
}
}
},
[`${componentCls}-clear`]: {
position: 'absolute',
top: '50%',
insetInlineEnd: 0,
color: colorTextQuaternary,
lineHeight: 1,
transform: 'translateY(-50%)',
cursor: 'pointer',
opacity: 0,
transition: `opacity ${motionDurationMid}, color ${motionDurationMid}`,
'> *': {
verticalAlign: 'top'
},
'&:hover': {
color: colorIcon
}
},
'&:hover': {
[`${componentCls}-clear`]: {
opacity: 1
},
// Should use the following selector, but since `:has` has poor compatibility,
// we use `:not(:last-child)` instead, which may cause some problems in some cases.
// [`${componentCls}-suffix:has(+ ${componentCls}-clear)`]: {
[`${componentCls}-suffix:not(:last-child)`]: {
opacity: 0
}
},
[`${componentCls}-separator`]: {
position: 'relative',
display: 'inline-block',
width: '1em',
height: fontSizeLG,
color: colorTextQuaternary,
fontSize: fontSizeLG,
verticalAlign: 'top',
cursor: 'default',
[`${componentCls}-focused &`]: {
color: colorIcon
},
[`${componentCls}-range-separator &`]: {
[`${componentCls}-disabled &`]: {
cursor: 'not-allowed'
}
}
},
// ======================== Range =========================
'&-range': {
position: 'relative',
display: 'inline-flex',
// Active bar
[`${componentCls}-active-bar`]: {
bottom: token.calc(lineWidth).mul(-1).equal(),
height: lineWidthBold,
background: colorPrimary,
opacity: 0,
transition: `all ${motionDurationSlow} ease-out`,
pointerEvents: 'none'
},
[`&${componentCls}-focused`]: {
[`${componentCls}-active-bar`]: {
opacity: 1
}
},
[`${componentCls}-range-separator`]: {
alignItems: 'center',
padding: `0 ${unit(paddingXS)}`,
lineHeight: 1
}
},
// ======================== Clear =========================
'&-range, &-multiple': {
// Clear
[`${componentCls}-clear`]: {
insetInlineEnd: paddingInline
},
[`&${componentCls}-small`]: {
[`${componentCls}-clear`]: {
insetInlineEnd: paddingInlineSM
}
}
},
// ======================= Dropdown =======================
'&-dropdown': Object.assign(Object.assign(Object.assign({}, resetComponent(token)), genPanelStyle(token)), {
pointerEvents: 'none',
position: 'absolute',
// Fix incorrect position of picker popup
// https://github.com/ant-design/ant-design/issues/35590
top: -9999,
left: {
_skip_check_: true,
value: -9999
},
zIndex: zIndexPopup,
[`&${componentCls}-dropdown-hidden`]: {
display: 'none'
},
'&-rtl': {
direction: 'rtl'
},
[`&${componentCls}-dropdown-placement-bottomLeft,
&${componentCls}-dropdown-placement-bottomRight`]: {
[`${componentCls}-range-arrow`]: {
top: 0,
display: 'block',
transform: 'translateY(-100%)'
}
},
[`&${componentCls}-dropdown-placement-topLeft,
&${componentCls}-dropdown-placement-topRight`]: {
[`${componentCls}-range-arrow`]: {
bottom: 0,
display: 'block',
transform: 'translateY(100%) rotate(180deg)'
}
},
[`&${antCls}-slide-up-appear, &${antCls}-slide-up-enter`]: {
[`${componentCls}-range-arrow${componentCls}-range-arrow`]: {
transition: 'none'
}
},
[`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-topLeft,
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-topRight,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-topLeft,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-topRight`]: {
animationName: slideDownIn
},
[`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-bottomLeft,
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-bottomRight,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-bottomLeft,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-bottomRight`]: {
animationName: slideUpIn
},
// https://github.com/ant-design/ant-design/issues/48727
[`&${antCls}-slide-up-leave ${componentCls}-panel-container`]: {
pointerEvents: 'none'
},
[`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-topLeft,
&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-topRight`]: {
animationName: slideDownOut
},
[`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-bottomLeft,
&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-bottomRight`]: {
animationName: slideUpOut
},
// Time picker with additional style
[`${componentCls}-panel > ${componentCls}-time-panel`]: {
paddingTop: paddingXXS
},
// ======================== Ranges ========================
[`${componentCls}-range-wrapper`]: {
display: 'flex',
position: 'relative'
},
[`${componentCls}-range-arrow`]: Object.assign(Object.assign({
position: 'absolute',
zIndex: 1,
display: 'none',
paddingInline: token.calc(paddingInline).mul(1.5).equal(),
boxSizing: 'content-box',
transition: `all ${motionDurationSlow} ease-out`
}, genRoundedArrow(token, colorBgElevated, boxShadowPopoverArrow)), {
'&:before': {
insetInlineStart: token.calc(paddingInline).mul(1.5).equal()
}
}),
[`${componentCls}-panel-container`]: {
overflow: 'hidden',
verticalAlign: 'top',
background: colorBgElevated,
borderRadius: borderRadiusLG,
boxShadow: boxShadowSecondary,
transition: `margin ${motionDurationSlow}`,
display: 'inline-block',
pointerEvents: 'auto',
// ======================== Layout ========================
[`${componentCls}-panel-layout`]: {
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'stretch'
},
// ======================== Preset ========================
[`${componentCls}-presets`]: {
display: 'flex',
flexDirection: 'column',
minWidth: presetsWidth,
maxWidth: presetsMaxWidth,
ul: {
height: 0,
flex: 'auto',
listStyle: 'none',
overflow: 'auto',
margin: 0,
padding: paddingXS,
borderInlineEnd: `${unit(lineWidth)} ${lineType} ${colorSplit}`,
li: Object.assign(Object.assign({}, textEllipsis), {
borderRadius: borderRadiusSM,
paddingInline: paddingXS,
paddingBlock: token.calc(controlHeightSM).sub(fontHeight).div(2).equal(),
cursor: 'pointer',
transition: `all ${motionDurationSlow}`,
'+ li': {
marginTop: marginXS
},
'&:hover': {
background: cellHoverBg
}
})
}
},
// ======================== Panels ========================
[`${componentCls}-panels`]: {
display: 'inline-flex',
flexWrap: 'nowrap',
// [`${componentCls}-panel`]: {
// borderWidth: `0 0 ${unit(lineWidth)}`,
// },
'&:last-child': {
[`${componentCls}-panel`]: {
borderWidth: 0
}
}
},
[`${componentCls}-panel`]: {
verticalAlign: 'top',
background: 'transparent',
borderRadius: 0,
borderWidth: 0,
[`${componentCls}-content, table`]: {
textAlign: 'center'
},
'&-focused': {
borderColor: colorBorder
}
}
}
}),
'&-dropdown-range': {
padding: `${unit(token.calc(sizePopupArrow).mul(2).div(3).equal())} 0`,
'&-hidden': {
display: 'none'
}
},
'&-rtl': {
direction: 'rtl',
[`${componentCls}-separator`]: {
transform: 'scale(-1, 1)'
},
[`${componentCls}-footer`]: {
'&-extra': {
direction: 'rtl'
}
}
}
})
},
// Follow code may reuse in other components
initSlideMotion(token, 'slide-up'), initSlideMotion(token, 'slide-down'), initMoveMotion(token, 'move-up'), initMoveMotion(token, 'move-down')];
};
// ============================== Export ==============================
export default genStyleHooks('DatePicker', token => {
const pickerToken = mergeToken(initInputToken(token), initPickerPanelToken(token), {
inputPaddingHorizontalBase: token.calc(token.paddingSM).sub(1).equal(),
multipleSelectItemHeight: token.multipleItemHeight,
selectHeight: token.controlHeight
});
return [genPickerPanelStyle(pickerToken), genPickerStyle(pickerToken), genVariantsStyle(pickerToken), genPickerStatusStyle(pickerToken), genPickerMultipleStyle(pickerToken),
// =====================================================
// == Space Compact ==
// =====================================================
genCompactItemStyle(token, {
focusElCls: `${token.componentCls}-focused`
})];
}, prepareComponentToken);

4
node_modules/antd/es/date-picker/style/multiple.d.ts generated vendored Normal file
View File

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

95
node_modules/antd/es/date-picker/style/multiple.js generated vendored Normal file
View File

@@ -0,0 +1,95 @@
import { unit } from '@ant-design/cssinjs';
import { genOverflowStyle, getMultipleSelectorUnit } from '../../select/style/multiple';
import { mergeToken } from '../../theme/internal';
const genSize = (token, suffix) => {
const {
componentCls,
controlHeight
} = token;
const suffixCls = suffix ? `${componentCls}-${suffix}` : '';
const multipleSelectorUnit = getMultipleSelectorUnit(token);
return [
// genSelectionStyle(token, suffix),
{
[`${componentCls}-multiple${suffixCls}`]: {
paddingBlock: multipleSelectorUnit.containerPadding,
paddingInlineStart: multipleSelectorUnit.basePadding,
minHeight: controlHeight,
// ======================== Selections ========================
[`${componentCls}-selection-item`]: {
height: multipleSelectorUnit.itemHeight,
lineHeight: unit(multipleSelectorUnit.itemLineHeight)
}
}
}];
};
const genPickerMultipleStyle = token => {
const {
componentCls,
calc,
lineWidth
} = token;
const smallToken = mergeToken(token, {
fontHeight: token.fontSize,
selectHeight: token.controlHeightSM,
multipleSelectItemHeight: token.multipleItemHeightSM,
borderRadius: token.borderRadiusSM,
borderRadiusSM: token.borderRadiusXS,
controlHeight: token.controlHeightSM
});
const largeToken = mergeToken(token, {
fontHeight: calc(token.multipleItemHeightLG).sub(calc(lineWidth).mul(2).equal()).equal(),
fontSize: token.fontSizeLG,
selectHeight: token.controlHeightLG,
multipleSelectItemHeight: token.multipleItemHeightLG,
borderRadius: token.borderRadiusLG,
borderRadiusSM: token.borderRadius,
controlHeight: token.controlHeightLG
});
return [
// ======================== Size ========================
genSize(smallToken, 'small'), genSize(token), genSize(largeToken, 'large'),
// ====================== Selection ======================
{
[`${componentCls}${componentCls}-multiple`]: Object.assign(Object.assign({
width: '100%',
cursor: 'text',
// ==================== Selector =====================
[`${componentCls}-selector`]: {
flex: 'auto',
padding: 0,
position: 'relative',
'&:after': {
margin: 0
},
// ================== placeholder ==================
[`${componentCls}-selection-placeholder`]: {
position: 'absolute',
top: '50%',
insetInlineStart: token.inputPaddingHorizontalBase,
insetInlineEnd: 0,
transform: 'translateY(-50%)',
transition: `all ${token.motionDurationSlow}`,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
flex: 1,
color: token.colorTextPlaceholder,
pointerEvents: 'none'
}
}
}, genOverflowStyle(token)), {
// ====================== Input ======================
// Input is `readonly`, which is used for a11y only
[`${componentCls}-multiple-input`]: {
width: 0,
height: 0,
border: 0,
visibility: 'hidden',
position: 'absolute',
zIndex: -1
}
})
}];
};
export default genPickerMultipleStyle;

6
node_modules/antd/es/date-picker/style/panel.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
import type { CSSObject } from '@ant-design/cssinjs';
import type { GenerateStyle } from '../../theme/internal';
import type { PickerToken, SharedPickerToken } from './token';
export declare const genPanelStyle: (token: SharedPickerToken) => CSSObject;
declare const genPickerPanelStyle: GenerateStyle<PickerToken>;
export default genPickerPanelStyle;

594
node_modules/antd/es/date-picker/style/panel.js generated vendored Normal file
View File

@@ -0,0 +1,594 @@
import { unit } from '@ant-design/cssinjs';
import { FastColor } from '@ant-design/fast-color';
const genPickerCellInnerStyle = token => {
const {
pickerCellCls,
pickerCellInnerCls,
cellHeight,
borderRadiusSM,
motionDurationMid,
cellHoverBg,
lineWidth,
lineType,
colorPrimary,
cellActiveWithRangeBg,
colorTextLightSolid,
colorTextDisabled,
cellBgDisabled,
colorFillSecondary
} = token;
return {
'&::before': {
position: 'absolute',
top: '50%',
insetInlineStart: 0,
insetInlineEnd: 0,
zIndex: 1,
height: cellHeight,
transform: 'translateY(-50%)',
content: '""',
pointerEvents: 'none'
},
// >>> Default
[pickerCellInnerCls]: {
position: 'relative',
zIndex: 2,
display: 'inline-block',
minWidth: cellHeight,
height: cellHeight,
lineHeight: unit(cellHeight),
borderRadius: borderRadiusSM,
transition: `background ${motionDurationMid}`
},
// >>> Hover
[`&:hover:not(${pickerCellCls}-in-view):not(${pickerCellCls}-disabled),
&:hover:not(${pickerCellCls}-selected):not(${pickerCellCls}-range-start):not(${pickerCellCls}-range-end):not(${pickerCellCls}-disabled)`]: {
[pickerCellInnerCls]: {
background: cellHoverBg
}
},
// >>> Today
[`&-in-view${pickerCellCls}-today ${pickerCellInnerCls}`]: {
'&::before': {
position: 'absolute',
top: 0,
insetInlineEnd: 0,
bottom: 0,
insetInlineStart: 0,
zIndex: 1,
border: `${unit(lineWidth)} ${lineType} ${colorPrimary}`,
borderRadius: borderRadiusSM,
content: '""'
}
},
// >>> In Range
[`&-in-view${pickerCellCls}-in-range,
&-in-view${pickerCellCls}-range-start,
&-in-view${pickerCellCls}-range-end`]: {
position: 'relative',
[`&:not(${pickerCellCls}-disabled):before`]: {
background: cellActiveWithRangeBg
}
},
// >>> Selected
[`&-in-view${pickerCellCls}-selected,
&-in-view${pickerCellCls}-range-start,
&-in-view${pickerCellCls}-range-end`]: {
[`&:not(${pickerCellCls}-disabled) ${pickerCellInnerCls}`]: {
color: colorTextLightSolid,
background: colorPrimary
},
[`&${pickerCellCls}-disabled ${pickerCellInnerCls}`]: {
background: colorFillSecondary
}
},
[`&-in-view${pickerCellCls}-range-start:not(${pickerCellCls}-disabled):before`]: {
insetInlineStart: '50%'
},
[`&-in-view${pickerCellCls}-range-end:not(${pickerCellCls}-disabled):before`]: {
insetInlineEnd: '50%'
},
// range start border-radius
[`&-in-view${pickerCellCls}-range-start:not(${pickerCellCls}-range-end) ${pickerCellInnerCls}`]: {
borderStartStartRadius: borderRadiusSM,
borderEndStartRadius: borderRadiusSM,
borderStartEndRadius: 0,
borderEndEndRadius: 0
},
// range end border-radius
[`&-in-view${pickerCellCls}-range-end:not(${pickerCellCls}-range-start) ${pickerCellInnerCls}`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0,
borderStartEndRadius: borderRadiusSM,
borderEndEndRadius: borderRadiusSM
},
// >>> Disabled
'&-disabled': {
color: colorTextDisabled,
cursor: 'not-allowed',
[pickerCellInnerCls]: {
background: 'transparent'
},
'&::before': {
background: cellBgDisabled
}
},
[`&-disabled${pickerCellCls}-today ${pickerCellInnerCls}::before`]: {
borderColor: colorTextDisabled
}
};
};
export const genPanelStyle = token => {
const {
componentCls,
pickerCellCls,
pickerCellInnerCls,
pickerYearMonthCellWidth,
pickerControlIconSize,
cellWidth,
paddingSM,
paddingXS,
paddingXXS,
colorBgContainer,
lineWidth,
lineType,
borderRadiusLG,
colorPrimary,
colorTextHeading,
colorSplit,
pickerControlIconBorderWidth,
colorIcon,
textHeight,
motionDurationMid,
colorIconHover,
fontWeightStrong,
cellHeight,
pickerCellPaddingVertical,
colorTextDisabled,
colorText,
fontSize,
motionDurationSlow,
withoutTimeCellHeight,
pickerQuarterPanelContentHeight,
borderRadiusSM,
colorTextLightSolid,
cellHoverBg,
timeColumnHeight,
timeColumnWidth,
timeCellHeight,
controlItemBgActive,
marginXXS,
pickerDatePanelPaddingHorizontal,
pickerControlIconMargin
} = token;
const pickerPanelWidth = token.calc(cellWidth).mul(7).add(token.calc(pickerDatePanelPaddingHorizontal).mul(2)).equal();
return {
[componentCls]: {
'&-panel': {
display: 'inline-flex',
flexDirection: 'column',
textAlign: 'center',
background: colorBgContainer,
borderRadius: borderRadiusLG,
outline: 'none',
'&-focused': {
borderColor: colorPrimary
},
'&-rtl': {
[`${componentCls}-prev-icon,
${componentCls}-super-prev-icon`]: {
transform: 'rotate(45deg)'
},
[`${componentCls}-next-icon,
${componentCls}-super-next-icon`]: {
transform: 'rotate(-135deg)'
},
[`${componentCls}-time-panel`]: {
[`${componentCls}-content`]: {
direction: 'ltr',
'> *': {
direction: 'rtl'
}
}
}
}
},
// ========================================================
// = Shared Panel =
// ========================================================
[`&-decade-panel,
&-year-panel,
&-quarter-panel,
&-month-panel,
&-week-panel,
&-date-panel,
&-time-panel`]: {
display: 'flex',
flexDirection: 'column',
width: pickerPanelWidth
},
// ======================= Header =======================
'&-header': {
display: 'flex',
padding: `0 ${unit(paddingXS)}`,
color: colorTextHeading,
borderBottom: `${unit(lineWidth)} ${lineType} ${colorSplit}`,
'> *': {
flex: 'none'
},
button: {
padding: 0,
color: colorIcon,
lineHeight: unit(textHeight),
background: 'transparent',
border: 0,
cursor: 'pointer',
transition: `color ${motionDurationMid}`,
fontSize: 'inherit',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
'&:empty': {
display: 'none'
}
},
'> button': {
minWidth: '1.6em',
fontSize,
'&:hover': {
color: colorIconHover
},
'&:disabled': {
opacity: 0.25,
pointerEvents: 'none'
}
},
'&-view': {
flex: 'auto',
fontWeight: fontWeightStrong,
lineHeight: unit(textHeight),
'> button': {
color: 'inherit',
fontWeight: 'inherit',
verticalAlign: 'top',
'&:not(:first-child)': {
marginInlineStart: paddingXS
},
'&:hover': {
color: colorPrimary
}
}
}
},
// Arrow button
[`&-prev-icon,
&-next-icon,
&-super-prev-icon,
&-super-next-icon`]: {
position: 'relative',
width: pickerControlIconSize,
height: pickerControlIconSize,
'&::before': {
position: 'absolute',
top: 0,
insetInlineStart: 0,
width: pickerControlIconSize,
height: pickerControlIconSize,
border: `0 solid currentcolor`,
borderBlockStartWidth: pickerControlIconBorderWidth,
borderInlineStartWidth: pickerControlIconBorderWidth,
content: '""'
}
},
[`&-super-prev-icon,
&-super-next-icon`]: {
'&::after': {
position: 'absolute',
top: pickerControlIconMargin,
insetInlineStart: pickerControlIconMargin,
display: 'inline-block',
width: pickerControlIconSize,
height: pickerControlIconSize,
border: '0 solid currentcolor',
borderBlockStartWidth: pickerControlIconBorderWidth,
borderInlineStartWidth: pickerControlIconBorderWidth,
content: '""'
}
},
'&-prev-icon, &-super-prev-icon': {
transform: 'rotate(-45deg)'
},
'&-next-icon, &-super-next-icon': {
transform: 'rotate(135deg)'
},
// ======================== Body ========================
'&-content': {
width: '100%',
tableLayout: 'fixed',
borderCollapse: 'collapse',
'th, td': {
position: 'relative',
minWidth: cellHeight,
fontWeight: 'normal'
},
th: {
height: token.calc(cellHeight).add(token.calc(pickerCellPaddingVertical).mul(2)).equal(),
color: colorText,
verticalAlign: 'middle'
}
},
'&-cell': Object.assign({
padding: `${unit(pickerCellPaddingVertical)} 0`,
color: colorTextDisabled,
cursor: 'pointer',
// In view
'&-in-view': {
color: colorText
}
}, genPickerCellInnerStyle(token)),
[`&-decade-panel,
&-year-panel,
&-quarter-panel,
&-month-panel`]: {
[`${componentCls}-content`]: {
height: token.calc(withoutTimeCellHeight).mul(4).equal()
},
[pickerCellInnerCls]: {
padding: `0 ${unit(paddingXS)}`
}
},
'&-quarter-panel': {
[`${componentCls}-content`]: {
height: pickerQuarterPanelContentHeight
}
},
// ========================================================
// = Special =
// ========================================================
// ===================== Decade Panel =====================
'&-decade-panel': {
[pickerCellInnerCls]: {
padding: `0 ${unit(token.calc(paddingXS).div(2).equal())}`
},
[`${componentCls}-cell::before`]: {
display: 'none'
}
},
// ============= Year & Quarter & Month Panel =============
[`&-year-panel,
&-quarter-panel,
&-month-panel`]: {
[`${componentCls}-body`]: {
padding: `0 ${unit(paddingXS)}`
},
[pickerCellInnerCls]: {
width: pickerYearMonthCellWidth
}
},
// ====================== Date Panel ======================
'&-date-panel': {
[`${componentCls}-body`]: {
padding: `${unit(paddingXS)} ${unit(pickerDatePanelPaddingHorizontal)}`
},
[`${componentCls}-content th`]: {
boxSizing: 'border-box',
padding: 0
}
},
// ====================== Week Panel ======================
'&-week-panel-row': {
td: {
'&:before': {
transition: `background ${motionDurationMid}`
},
'&:first-child:before': {
borderStartStartRadius: borderRadiusSM,
borderEndStartRadius: borderRadiusSM
},
'&:last-child:before': {
borderStartEndRadius: borderRadiusSM,
borderEndEndRadius: borderRadiusSM
}
},
'&:hover td:before': {
background: cellHoverBg
},
'&-range-start td, &-range-end td, &-selected td, &-hover td': {
// Rise priority to override hover style
[`&${pickerCellCls}`]: {
'&:before': {
background: colorPrimary
},
[`&${componentCls}-cell-week`]: {
color: new FastColor(colorTextLightSolid).setA(0.5).toHexString()
},
[pickerCellInnerCls]: {
color: colorTextLightSolid
}
}
},
'&-range-hover td:before': {
background: controlItemBgActive
}
},
// >>> ShowWeek
'&-week-panel, &-date-panel-show-week': {
[`${componentCls}-body`]: {
padding: `${unit(paddingXS)} ${unit(paddingSM)}`
},
[`${componentCls}-content th`]: {
width: 'auto'
}
},
// ==================== Datetime Panel ====================
'&-datetime-panel': {
display: 'flex',
[`${componentCls}-time-panel`]: {
borderInlineStart: `${unit(lineWidth)} ${lineType} ${colorSplit}`
},
[`${componentCls}-date-panel,
${componentCls}-time-panel`]: {
transition: `opacity ${motionDurationSlow}`
},
// Keyboard
'&-active': {
[`${componentCls}-date-panel,
${componentCls}-time-panel`]: {
opacity: 0.3,
'&-active': {
opacity: 1
}
}
}
},
// ====================== Time Panel ======================
'&-time-panel': {
width: 'auto',
minWidth: 'auto',
[`${componentCls}-content`]: {
display: 'flex',
flex: 'auto',
height: timeColumnHeight
},
'&-column': {
flex: '1 0 auto',
width: timeColumnWidth,
margin: `${unit(paddingXXS)} 0`,
padding: 0,
overflowY: 'hidden',
textAlign: 'start',
listStyle: 'none',
transition: `background ${motionDurationMid}`,
overflowX: 'hidden',
'&::-webkit-scrollbar': {
width: 8,
backgroundColor: 'transparent'
},
'&::-webkit-scrollbar-thumb': {
backgroundColor: token.colorTextTertiary,
borderRadius: token.borderRadiusSM
},
// For Firefox
'&': {
scrollbarWidth: 'thin',
scrollbarColor: `${token.colorTextTertiary} transparent`
},
'&::after': {
display: 'block',
height: `calc(100% - ${unit(timeCellHeight)})`,
content: '""'
},
'&:not(:first-child)': {
borderInlineStart: `${unit(lineWidth)} ${lineType} ${colorSplit}`
},
'&-active': {
background: new FastColor(controlItemBgActive).setA(0.2).toHexString()
},
'&:hover': {
overflowY: 'auto'
},
'> li': {
margin: 0,
padding: 0,
[`&${componentCls}-time-panel-cell`]: {
marginInline: marginXXS,
[`${componentCls}-time-panel-cell-inner`]: {
display: 'block',
width: token.calc(timeColumnWidth).sub(token.calc(marginXXS).mul(2)).equal(),
height: timeCellHeight,
margin: 0,
paddingBlock: 0,
paddingInlineEnd: 0,
paddingInlineStart: token.calc(timeColumnWidth).sub(timeCellHeight).div(2).equal(),
color: colorText,
lineHeight: unit(timeCellHeight),
borderRadius: borderRadiusSM,
cursor: 'pointer',
transition: `background ${motionDurationMid}`,
'&:hover': {
background: cellHoverBg
}
},
'&-selected': {
[`${componentCls}-time-panel-cell-inner`]: {
background: controlItemBgActive
}
},
'&-disabled': {
[`${componentCls}-time-panel-cell-inner`]: {
color: colorTextDisabled,
background: 'transparent',
cursor: 'not-allowed'
}
}
}
}
}
}
}
};
};
const genPickerPanelStyle = token => {
const {
componentCls,
textHeight,
lineWidth,
paddingSM,
antCls,
colorPrimary,
cellActiveWithRangeBg,
colorPrimaryBorder,
lineType,
colorSplit
} = token;
return {
[`${componentCls}-dropdown`]: {
// ======================== Footer ========================
[`${componentCls}-footer`]: {
borderTop: `${unit(lineWidth)} ${lineType} ${colorSplit}`,
'&-extra': {
padding: `0 ${unit(paddingSM)}`,
lineHeight: unit(token.calc(textHeight).sub(token.calc(lineWidth).mul(2)).equal()),
textAlign: 'start',
'&:not(:last-child)': {
borderBottom: `${unit(lineWidth)} ${lineType} ${colorSplit}`
}
}
},
// ==================== Footer > Ranges ===================
[`${componentCls}-panels + ${componentCls}-footer ${componentCls}-ranges`]: {
justifyContent: 'space-between'
},
[`${componentCls}-ranges`]: {
marginBlock: 0,
paddingInline: unit(paddingSM),
overflow: 'hidden',
textAlign: 'start',
listStyle: 'none',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
'> li': {
lineHeight: unit(token.calc(textHeight).sub(token.calc(lineWidth).mul(2)).equal()),
display: 'inline-block'
},
[`${componentCls}-now-btn-disabled`]: {
pointerEvents: 'none',
color: token.colorTextDisabled
},
// https://github.com/ant-design/ant-design/issues/23687
[`${componentCls}-preset > ${antCls}-tag-blue`]: {
color: colorPrimary,
background: cellActiveWithRangeBg,
borderColor: colorPrimaryBorder,
cursor: 'pointer'
},
[`${componentCls}-ok`]: {
paddingBlock: token.calc(lineWidth).mul(2).equal(),
marginInlineStart: 'auto'
}
}
}
};
};
export default genPickerPanelStyle;

103
node_modules/antd/es/date-picker/style/token.d.ts generated vendored Normal file
View File

@@ -0,0 +1,103 @@
import type { SharedComponentToken, SharedInputToken } from '../../input/style/token';
import type { MultipleSelectorToken, SelectorToken } from '../../select/style/token';
import type { ArrowToken } from '../../style/roundedArrow';
import type { FullToken, GetDefaultToken, GlobalToken, TokenWithCommonCls } from '../../theme/internal';
export interface PanelComponentToken extends MultipleSelectorToken {
/**
* @desc 单元格悬浮态背景色
* @descEN Background color of cell hover state
*/
cellHoverBg: string;
/**
* @desc 选取范围内的单元格背景色
* @descEN Background color of cell in range
*/
cellActiveWithRangeBg: string;
/**
* @desc 选取范围内的单元格悬浮态背景色
* @descEN Background color of hovered cell in range
*/
cellHoverWithRangeBg: string;
/**
* @desc 单元格禁用态背景色
* @descEN Background color of disabled cell
*/
cellBgDisabled: string;
/**
* @desc 选取范围时单元格边框色
* @descEN Border color of cell in range when picking
*/
cellRangeBorderColor: string;
/**
* @desc 时间列宽度
* @descEN Width of time column
*/
timeColumnWidth: number;
/**
* @desc 时间列高度
* @descEN Height of time column
*/
timeColumnHeight: number;
/**
* @desc 时间单元格高度
* @descEN Height of time cell
*/
timeCellHeight: number;
/**
* @desc 单元格高度
* @descEN Height of cell
*/
cellHeight: number;
/**
* @desc 单元格宽度
* @descEN Width of cell
*/
cellWidth: number;
/**
* @desc 单元格文本高度
* @descEN Height of cell text
*/
textHeight: number;
/**
* @desc 十年/年/季/月/周单元格高度
* @descEN Height of decade/year/quarter/month/week cell
*/
withoutTimeCellHeight: number;
}
export interface ComponentToken extends Exclude<SharedComponentToken, 'addonBg'>, PanelComponentToken, ArrowToken {
/**
* @desc 预设区域宽度
* @descEN Width of preset area
*/
presetsWidth: number;
/**
* @desc 预设区域最大宽度
* @descEN Max width of preset area
*/
presetsMaxWidth: number;
/**
* @desc 弹窗 z-index
* @descEN z-index of popup
*/
zIndexPopup: number;
}
export type PickerPanelToken = {
pickerCellCls: string;
pickerCellInnerCls: string;
pickerDatePanelPaddingHorizontal: number | string;
pickerYearMonthCellWidth: number | string;
pickerCellPaddingVertical: number | string;
pickerQuarterPanelContentHeight: number | string;
pickerCellBorderGap: number;
pickerControlIconSize: number;
pickerControlIconMargin: number;
pickerControlIconBorderWidth: number;
};
export interface PickerToken extends FullToken<'DatePicker'>, PickerPanelToken, SharedInputToken, SelectorToken {
/** @private Used for internal calculation */
INTERNAL_FIXED_ITEM_MARGIN: number;
}
export type SharedPickerToken = TokenWithCommonCls<GlobalToken> & PickerPanelToken & PanelComponentToken;
export declare const initPickerPanelToken: (token: TokenWithCommonCls<GlobalToken>) => PickerPanelToken;
export declare const initPanelComponentToken: (token: GlobalToken) => PanelComponentToken;
export declare const prepareComponentToken: GetDefaultToken<'DatePicker'>;

73
node_modules/antd/es/date-picker/style/token.js generated vendored Normal file
View File

@@ -0,0 +1,73 @@
import { FastColor } from '@ant-design/fast-color';
import { initComponentToken } from '../../input/style/token';
import { getArrowToken } from '../../style/roundedArrow';
export const initPickerPanelToken = token => {
const {
componentCls,
controlHeightLG,
paddingXXS,
padding
} = token;
return {
pickerCellCls: `${componentCls}-cell`,
pickerCellInnerCls: `${componentCls}-cell-inner`,
pickerYearMonthCellWidth: token.calc(controlHeightLG).mul(1.5).equal(),
pickerQuarterPanelContentHeight: token.calc(controlHeightLG).mul(1.4).equal(),
pickerCellPaddingVertical: token.calc(paddingXXS).add(token.calc(paddingXXS).div(2)).equal(),
pickerCellBorderGap: 2,
// Magic for gap between cells
pickerControlIconSize: 7,
pickerControlIconMargin: 4,
pickerControlIconBorderWidth: 1.5,
pickerDatePanelPaddingHorizontal: token.calc(padding).add(token.calc(paddingXXS).div(2)).equal() // 18 in normal
};
};
export const initPanelComponentToken = token => {
const {
colorBgContainerDisabled,
controlHeight,
controlHeightSM,
controlHeightLG,
paddingXXS,
lineWidth
} = 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);
const filledToken = {
INTERNAL_FIXED_ITEM_MARGIN,
cellHoverBg: token.controlItemBgHover,
cellActiveWithRangeBg: token.controlItemBgActive,
cellHoverWithRangeBg: new FastColor(token.colorPrimary).lighten(35).toHexString(),
cellRangeBorderColor: new FastColor(token.colorPrimary).lighten(20).toHexString(),
cellBgDisabled: colorBgContainerDisabled,
timeColumnWidth: controlHeightLG * 1.4,
timeColumnHeight: 28 * 8,
timeCellHeight: 28,
cellWidth: controlHeightSM * 1.5,
cellHeight: controlHeightSM,
textHeight: controlHeightLG,
withoutTimeCellHeight: controlHeightLG * 1.65,
multipleItemBg: token.colorFillSecondary,
multipleItemBorderColor: 'transparent',
multipleItemHeight,
multipleItemHeightSM,
multipleItemHeightLG,
multipleSelectorBgDisabled: colorBgContainerDisabled,
multipleItemColorDisabled: token.colorTextDisabled,
multipleItemBorderColorDisabled: 'transparent'
};
return filledToken;
};
export const prepareComponentToken = token => Object.assign(Object.assign(Object.assign(Object.assign({}, initComponentToken(token)), initPanelComponentToken(token)), getArrowToken(token)), {
presetsWidth: 120,
presetsMaxWidth: 200,
zIndexPopup: token.zIndexPopupBase + 50
});

4
node_modules/antd/es/date-picker/style/variants.d.ts generated vendored Normal file
View File

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

38
node_modules/antd/es/date-picker/style/variants.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
import { unit } from '@ant-design/cssinjs';
import { genBorderlessStyle, genFilledStyle, genOutlinedStyle, genUnderlinedStyle } from '../../input/style/variants';
const genVariantsStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: [Object.assign(Object.assign(Object.assign(Object.assign({}, genOutlinedStyle(token)), genUnderlinedStyle(token)), genFilledStyle(token)), genBorderlessStyle(token)),
// ========================= Multiple =========================
{
'&-outlined': {
[`&${componentCls}-multiple ${componentCls}-selection-item`]: {
background: token.multipleItemBg,
border: `${unit(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
}
},
'&-filled': {
[`&${componentCls}-multiple ${componentCls}-selection-item`]: {
background: token.colorBgContainer,
border: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
}
},
'&-borderless': {
[`&${componentCls}-multiple ${componentCls}-selection-item`]: {
background: token.multipleItemBg,
border: `${unit(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
}
},
'&-underlined': {
[`&${componentCls}-multiple ${componentCls}-selection-item`]: {
background: token.multipleItemBg,
border: `${unit(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
}
}
}]
};
};
export default genVariantsStyle;