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

12
node_modules/antd/es/cascader/Panel.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import * as React from 'react';
import type { PickType } from 'rc-cascader/lib/Panel';
import type { CascaderProps, DefaultOptionType } from '.';
export type PanelPickType = Exclude<PickType, 'checkable'> | 'multiple' | 'rootClassName';
export type CascaderPanelProps<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType, Multiple extends boolean = boolean> = Pick<CascaderProps<OptionType, ValueField, Multiple>, PanelPickType>;
export type CascaderPanelAutoProps<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType> = (CascaderPanelProps<OptionType, ValueField> & {
multiple?: false;
}) | (CascaderPanelProps<OptionType, ValueField, true> & {
multiple: true;
});
declare function CascaderPanel<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType>(props: CascaderPanelAutoProps<OptionType, ValueField>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
export default CascaderPanel;

52
node_modules/antd/es/cascader/Panel.js generated vendored Normal file
View File

@@ -0,0 +1,52 @@
"use client";
import * as React from 'react';
import classNames from 'classnames';
import { Panel } from 'rc-cascader';
import DefaultRenderEmpty from '../config-provider/defaultRenderEmpty';
import DisabledContext from '../config-provider/DisabledContext';
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
import useBase from './hooks/useBase';
import useCheckable from './hooks/useCheckable';
import useColumnIcons from './hooks/useColumnIcons';
import useStyle from './style';
import usePanelStyle from './style/panel';
function CascaderPanel(props) {
const {
prefixCls: customizePrefixCls,
className,
multiple,
rootClassName,
notFoundContent,
direction,
expandIcon,
disabled: customDisabled
} = props;
const disabled = React.useContext(DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
const [prefixCls, cascaderPrefixCls, mergedDirection, renderEmpty] = useBase(customizePrefixCls, direction);
const rootCls = useCSSVarCls(cascaderPrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = useStyle(cascaderPrefixCls, rootCls);
usePanelStyle(cascaderPrefixCls);
const isRtl = mergedDirection === 'rtl';
// ===================== Icon ======================
const [mergedExpandIcon, loadingIcon] = useColumnIcons(prefixCls, isRtl, expandIcon);
// ===================== Empty =====================
const mergedNotFoundContent = notFoundContent || (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Cascader')) || (/*#__PURE__*/React.createElement(DefaultRenderEmpty, {
componentName: "Cascader"
}));
// =================== Multiple ====================
const checkable = useCheckable(cascaderPrefixCls, multiple);
// ==================== Render =====================
return wrapCSSVar(/*#__PURE__*/React.createElement(Panel, Object.assign({}, props, {
checkable: checkable,
prefixCls: cascaderPrefixCls,
className: classNames(className, hashId, rootClassName, cssVarCls, rootCls),
notFoundContent: mergedNotFoundContent,
direction: mergedDirection,
expandIcon: mergedExpandIcon,
loadingIcon: loadingIcon,
disabled: mergedDisabled
})));
}
export default CascaderPanel;

8
node_modules/antd/es/cascader/hooks/useBase.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import type { DirectionType, RenderEmptyHandler } from '../../config-provider';
declare function useBase(customizePrefixCls?: string, direction?: DirectionType): [
prefixCls: string,
cascaderPrefixCls: string,
direction?: DirectionType,
renderEmpty?: RenderEmptyHandler
];
export default useBase;

14
node_modules/antd/es/cascader/hooks/useBase.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import * as React from 'react';
import { ConfigContext } from '../../config-provider';
function useBase(customizePrefixCls, direction) {
const {
getPrefixCls,
direction: rootDirection,
renderEmpty
} = React.useContext(ConfigContext);
const mergedDirection = direction || rootDirection;
const prefixCls = getPrefixCls('select', customizePrefixCls);
const cascaderPrefixCls = getPrefixCls('cascader', customizePrefixCls);
return [prefixCls, cascaderPrefixCls, mergedDirection, renderEmpty];
}
export default useBase;

View File

@@ -0,0 +1,2 @@
import * as React from 'react';
export default function useCheckable(cascaderPrefixCls: string, multiple?: boolean): false | React.JSX.Element;

8
node_modules/antd/es/cascader/hooks/useCheckable.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
"use client";
import * as React from 'react';
export default function useCheckable(cascaderPrefixCls, multiple) {
return React.useMemo(() => multiple ? /*#__PURE__*/React.createElement("span", {
className: `${cascaderPrefixCls}-checkbox-inner`
}) : false, [cascaderPrefixCls, multiple]);
}

View File

@@ -0,0 +1,3 @@
import * as React from 'react';
declare const useColumnIcons: (prefixCls: string, rtl: boolean, expandIcon?: React.ReactNode) => readonly [React.ReactNode, React.ReactNode];
export default useColumnIcons;

19
node_modules/antd/es/cascader/hooks/useColumnIcons.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
"use client";
import * as React from 'react';
import LeftOutlined from "@ant-design/icons/es/icons/LeftOutlined";
import LoadingOutlined from "@ant-design/icons/es/icons/LoadingOutlined";
import RightOutlined from "@ant-design/icons/es/icons/RightOutlined";
const useColumnIcons = (prefixCls, rtl, expandIcon) => {
let mergedExpandIcon = expandIcon;
if (!expandIcon) {
mergedExpandIcon = rtl ? /*#__PURE__*/React.createElement(LeftOutlined, null) : /*#__PURE__*/React.createElement(RightOutlined, null);
}
const loadingIcon = React.useMemo(() => (/*#__PURE__*/React.createElement("span", {
className: `${prefixCls}-menu-item-loading-icon`
}, /*#__PURE__*/React.createElement(LoadingOutlined, {
spin: true
}))), [prefixCls]);
return React.useMemo(() => [mergedExpandIcon, loadingIcon], [mergedExpandIcon, loadingIcon]);
};
export default useColumnIcons;

75
node_modules/antd/es/cascader/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,75 @@
import * as React from 'react';
import type { BaseOptionType, DefaultOptionType, FieldNames, CascaderProps as RcCascaderProps } from 'rc-cascader';
import type { SelectCommonPlacement } from '../_util/motion';
import type { InputStatus } from '../_util/statusUtils';
import type { Variant } from '../config-provider';
import type { SizeType } from '../config-provider/SizeContext';
import CascaderPanel from './Panel';
export type { BaseOptionType, DefaultOptionType };
export type FieldNamesType = FieldNames;
export type FilledFieldNamesType = Required<FieldNamesType>;
type SemanticName = 'root';
type PopupSemantic = 'root';
declare const SHOW_CHILD: "SHOW_CHILD", SHOW_PARENT: "SHOW_PARENT";
export interface CascaderProps<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType, Multiple extends boolean = boolean> extends Omit<RcCascaderProps<OptionType, ValueField, Multiple>, 'checkable'> {
multiple?: Multiple;
size?: SizeType;
/**
* @deprecated `showArrow` is deprecated which will be removed in next major version. It will be a
* default behavior, you can hide it by setting `suffixIcon` to null.
*/
showArrow?: boolean;
disabled?: boolean;
/** @deprecated Use `variant` instead. */
bordered?: boolean;
placement?: SelectCommonPlacement;
suffixIcon?: React.ReactNode;
options?: OptionType[];
status?: InputStatus;
autoClearSearchValue?: boolean;
rootClassName?: string;
/** @deprecated Please use `classNames.popup.root` instead */
popupClassName?: string;
/** @deprecated Please use `classNames.popup.root` instead */
dropdownClassName?: string;
/** @deprecated Please use `styles.popup.root` instead */
dropdownStyle?: React.CSSProperties;
/** @deprecated Please use `popupRender` instead */
dropdownRender?: (menu: React.ReactElement) => React.ReactElement;
popupRender?: (menu: React.ReactElement) => React.ReactElement;
/** @deprecated Please use `popupMenuColumnStyle` instead */
dropdownMenuColumnStyle?: React.CSSProperties;
popupMenuColumnStyle?: React.CSSProperties;
/** @deprecated Please use `onOpenChange` instead */
onDropdownVisibleChange?: (visible: boolean) => void;
onOpenChange?: (visible: boolean) => void;
/**
* @since 5.13.0
* @default "outlined"
*/
variant?: Variant;
classNames?: Partial<Record<SemanticName, string>> & {
popup?: Partial<Record<PopupSemantic, string>>;
};
styles?: Partial<Record<SemanticName, React.CSSProperties>> & {
popup?: Partial<Record<PopupSemantic, React.CSSProperties>>;
};
}
export type CascaderAutoProps<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType> = (CascaderProps<OptionType, ValueField> & {
multiple?: false;
}) | (CascaderProps<OptionType, ValueField, true> & {
multiple: true;
});
export interface CascaderRef {
focus: () => void;
blur: () => void;
}
declare const Cascader: (<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType>(props: React.PropsWithChildren<CascaderAutoProps<OptionType, ValueField>> & React.RefAttributes<CascaderRef>) => React.ReactElement) & {
displayName: string;
SHOW_PARENT: typeof SHOW_PARENT;
SHOW_CHILD: typeof SHOW_CHILD;
Panel: typeof CascaderPanel;
_InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
};
declare const PurePanel: (props: import("../_util/type").AnyObject) => React.JSX.Element;
export default Cascader;

281
node_modules/antd/es/cascader/index.js generated vendored Normal file
View File

@@ -0,0 +1,281 @@
"use client";
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
var __rest = this && this.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
import * as React from 'react';
import cls from 'classnames';
import RcCascader from 'rc-cascader';
import omit from "rc-util/es/omit";
import { useZIndex } from '../_util/hooks';
import { getTransitionName } from '../_util/motion';
import genPurePanel from '../_util/PurePanel';
import { getMergedStatus, getStatusClassNames } from '../_util/statusUtils';
import { devUseWarning } from '../_util/warning';
import { ConfigContext } from '../config-provider';
import { useComponentConfig } from '../config-provider/context';
import DefaultRenderEmpty from '../config-provider/defaultRenderEmpty';
import DisabledContext from '../config-provider/DisabledContext';
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
import useSize from '../config-provider/hooks/useSize';
import { FormItemInputContext } from '../form/context';
import useVariant from '../form/hooks/useVariants';
import mergedBuiltinPlacements from '../select/mergedBuiltinPlacements';
import useSelectStyle from '../select/style';
import useIcons from '../select/useIcons';
import usePopupRender from '../select/usePopupRender';
import useShowArrow from '../select/useShowArrow';
import { useCompactItemContext } from '../space/Compact';
import useBase from './hooks/useBase';
import useCheckable from './hooks/useCheckable';
import useColumnIcons from './hooks/useColumnIcons';
import CascaderPanel from './Panel';
import useStyle from './style';
const {
SHOW_CHILD,
SHOW_PARENT
} = RcCascader;
function highlightKeyword(str, lowerKeyword, prefixCls) {
const cells = str.toLowerCase().split(lowerKeyword).reduce((list, cur, index) => index === 0 ? [cur] : [].concat(_toConsumableArray(list), [lowerKeyword, cur]), []);
const fillCells = [];
let start = 0;
cells.forEach((cell, index) => {
const end = start + cell.length;
let originWorld = str.slice(start, end);
start = end;
if (index % 2 === 1) {
originWorld =
/*#__PURE__*/
// eslint-disable-next-line react/no-array-index-key
React.createElement("span", {
className: `${prefixCls}-menu-item-keyword`,
key: `separator-${index}`
}, originWorld);
}
fillCells.push(originWorld);
});
return fillCells;
}
const defaultSearchRender = (inputValue, path, prefixCls, fieldNames) => {
const optionList = [];
// We do lower here to save perf
const lower = inputValue.toLowerCase();
path.forEach((node, index) => {
if (index !== 0) {
optionList.push(' / ');
}
let label = node[fieldNames.label];
const type = typeof label;
if (type === 'string' || type === 'number') {
label = highlightKeyword(String(label), lower, prefixCls);
}
optionList.push(label);
});
return optionList;
};
const Cascader = /*#__PURE__*/React.forwardRef((props, ref) => {
var _a, _b, _c, _d;
const {
prefixCls: customizePrefixCls,
size: customizeSize,
disabled: customDisabled,
className,
rootClassName,
multiple,
bordered = true,
transitionName,
choiceTransitionName = '',
popupClassName,
dropdownClassName,
expandIcon,
placement,
showSearch,
allowClear = true,
notFoundContent,
direction,
getPopupContainer,
status: customStatus,
showArrow,
builtinPlacements,
style,
variant: customVariant,
dropdownRender,
onDropdownVisibleChange,
dropdownMenuColumnStyle,
popupRender,
dropdownStyle,
popupMenuColumnStyle,
onOpenChange,
styles,
classNames
} = props,
rest = __rest(props, ["prefixCls", "size", "disabled", "className", "rootClassName", "multiple", "bordered", "transitionName", "choiceTransitionName", "popupClassName", "dropdownClassName", "expandIcon", "placement", "showSearch", "allowClear", "notFoundContent", "direction", "getPopupContainer", "status", "showArrow", "builtinPlacements", "style", "variant", "dropdownRender", "onDropdownVisibleChange", "dropdownMenuColumnStyle", "popupRender", "dropdownStyle", "popupMenuColumnStyle", "onOpenChange", "styles", "classNames"]);
const restProps = omit(rest, ['suffixIcon']);
const {
getPrefixCls,
getPopupContainer: getContextPopupContainer,
className: contextClassName,
style: contextStyle,
classNames: contextClassNames,
styles: contextStyles
} = useComponentConfig('cascader');
const {
popupOverflow
} = React.useContext(ConfigContext);
// =================== Form =====================
const {
status: contextStatus,
hasFeedback,
isFormItemInput,
feedbackIcon
} = React.useContext(FormItemInputContext);
const mergedStatus = getMergedStatus(contextStatus, customStatus);
// =================== Warning =====================
if (process.env.NODE_ENV !== 'production') {
const warning = devUseWarning('Cascader');
// v5 deprecated dropdown api
const deprecatedProps = {
dropdownClassName: 'classNames.popup.root',
dropdownStyle: 'styles.popup.root',
dropdownRender: 'popupRender',
dropdownMenuColumnStyle: 'popupMenuColumnStyle',
onDropdownVisibleChange: 'onOpenChange',
bordered: 'variant'
};
Object.entries(deprecatedProps).forEach(([oldProp, newProp]) => {
warning.deprecated(!(oldProp in props), oldProp, newProp);
});
process.env.NODE_ENV !== "production" ? warning(!('showArrow' in props), 'deprecated', '`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null.') : void 0;
}
// ==================== Prefix =====================
const [prefixCls, cascaderPrefixCls, mergedDirection, renderEmpty] = useBase(customizePrefixCls, direction);
const isRtl = mergedDirection === 'rtl';
const rootPrefixCls = getPrefixCls();
const rootCls = useCSSVarCls(prefixCls);
const [wrapSelectCSSVar, hashId, cssVarCls] = useSelectStyle(prefixCls, rootCls);
const cascaderRootCls = useCSSVarCls(cascaderPrefixCls);
const [wrapCascaderCSSVar] = useStyle(cascaderPrefixCls, cascaderRootCls);
const {
compactSize,
compactItemClassnames
} = useCompactItemContext(prefixCls, direction);
const [variant, enableVariantCls] = useVariant('cascader', customVariant, bordered);
// =================== No Found ====================
const mergedNotFoundContent = notFoundContent || (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Cascader')) || (/*#__PURE__*/React.createElement(DefaultRenderEmpty, {
componentName: "Cascader"
}));
// =================== Dropdown ====================
const mergedPopupClassName = cls(((_a = classNames === null || classNames === void 0 ? void 0 : classNames.popup) === null || _a === void 0 ? void 0 : _a.root) || ((_b = contextClassNames.popup) === null || _b === void 0 ? void 0 : _b.root) || popupClassName || dropdownClassName, `${cascaderPrefixCls}-dropdown`, {
[`${cascaderPrefixCls}-dropdown-rtl`]: mergedDirection === 'rtl'
}, rootClassName, rootCls, contextClassNames.root, classNames === null || classNames === void 0 ? void 0 : classNames.root, cascaderRootCls, hashId, cssVarCls);
const mergedPopupRender = usePopupRender(popupRender || dropdownRender);
const mergedPopupMenuColumnStyle = popupMenuColumnStyle || dropdownMenuColumnStyle;
const mergedOnOpenChange = onOpenChange || onDropdownVisibleChange;
const mergedPopupStyle = ((_c = styles === null || styles === void 0 ? void 0 : styles.popup) === null || _c === void 0 ? void 0 : _c.root) || ((_d = contextStyles.popup) === null || _d === void 0 ? void 0 : _d.root) || dropdownStyle;
// ==================== Search =====================
const mergedShowSearch = React.useMemo(() => {
if (!showSearch) {
return showSearch;
}
let searchConfig = {
render: defaultSearchRender
};
if (typeof showSearch === 'object') {
searchConfig = Object.assign(Object.assign({}, searchConfig), showSearch);
}
return searchConfig;
}, [showSearch]);
// ===================== Size ======================
const mergedSize = useSize(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
// ===================== Disabled =====================
const disabled = React.useContext(DisabledContext);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
// ===================== Icon ======================
const [mergedExpandIcon, loadingIcon] = useColumnIcons(prefixCls, isRtl, expandIcon);
// =================== Multiple ====================
const checkable = useCheckable(cascaderPrefixCls, multiple);
// ===================== Icons =====================
const showSuffixIcon = useShowArrow(props.suffixIcon, showArrow);
const {
suffixIcon,
removeIcon,
clearIcon
} = useIcons(Object.assign(Object.assign({}, props), {
hasFeedback,
feedbackIcon,
showSuffixIcon,
multiple,
prefixCls,
componentName: 'Cascader'
}));
// ===================== Placement =====================
const memoPlacement = React.useMemo(() => {
if (placement !== undefined) {
return placement;
}
return isRtl ? 'bottomRight' : 'bottomLeft';
}, [placement, isRtl]);
const mergedAllowClear = allowClear === true ? {
clearIcon
} : allowClear;
// ============================ zIndex ============================
const [zIndex] = useZIndex('SelectLike', mergedPopupStyle === null || mergedPopupStyle === void 0 ? void 0 : mergedPopupStyle.zIndex);
// ==================== Render =====================
const renderNode = /*#__PURE__*/React.createElement(RcCascader, Object.assign({
prefixCls: prefixCls,
className: cls(!customizePrefixCls && cascaderPrefixCls, {
[`${prefixCls}-lg`]: mergedSize === 'large',
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-rtl`]: isRtl,
[`${prefixCls}-${variant}`]: enableVariantCls,
[`${prefixCls}-in-form-item`]: isFormItemInput
}, getStatusClassNames(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, contextClassName, className, rootClassName, classNames === null || classNames === void 0 ? void 0 : classNames.root, contextClassNames.root, rootCls, cascaderRootCls, hashId, cssVarCls),
disabled: mergedDisabled,
style: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.root), styles === null || styles === void 0 ? void 0 : styles.root), contextStyle), style)
}, restProps, {
builtinPlacements: mergedBuiltinPlacements(builtinPlacements, popupOverflow),
direction: mergedDirection,
placement: memoPlacement,
notFoundContent: mergedNotFoundContent,
allowClear: mergedAllowClear,
showSearch: mergedShowSearch,
expandIcon: mergedExpandIcon,
suffixIcon: suffixIcon,
removeIcon: removeIcon,
loadingIcon: loadingIcon,
checkable: checkable,
dropdownClassName: mergedPopupClassName,
dropdownPrefixCls: customizePrefixCls || cascaderPrefixCls,
dropdownStyle: Object.assign(Object.assign({}, mergedPopupStyle), {
zIndex
}),
dropdownRender: mergedPopupRender,
dropdownMenuColumnStyle: mergedPopupMenuColumnStyle,
onOpenChange: mergedOnOpenChange,
choiceTransitionName: getTransitionName(rootPrefixCls, '', choiceTransitionName),
transitionName: getTransitionName(rootPrefixCls, 'slide-up', transitionName),
getPopupContainer: getPopupContainer || getContextPopupContainer,
ref: ref
}));
return wrapCascaderCSSVar(wrapSelectCSSVar(renderNode));
});
if (process.env.NODE_ENV !== 'production') {
Cascader.displayName = 'Cascader';
}
// We don't care debug panel
/* istanbul ignore next */
const PurePanel = genPurePanel(Cascader, 'dropdownAlign', props => omit(props, ['visible']));
Cascader.SHOW_PARENT = SHOW_PARENT;
Cascader.SHOW_CHILD = SHOW_CHILD;
Cascader.Panel = CascaderPanel;
Cascader._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
export default Cascader;

4
node_modules/antd/es/cascader/style/columns.d.ts generated vendored Normal file
View File

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

101
node_modules/antd/es/cascader/style/columns.js generated vendored Normal file
View File

@@ -0,0 +1,101 @@
import { unit } from '@ant-design/cssinjs';
import { getStyle as getCheckboxStyle } from '../../checkbox/style';
import { textEllipsis } from '../../style';
const getColumnsStyle = token => {
const {
prefixCls,
componentCls
} = token;
const cascaderMenuItemCls = `${componentCls}-menu-item`;
const iconCls = `
&${cascaderMenuItemCls}-expand ${cascaderMenuItemCls}-expand-icon,
${cascaderMenuItemCls}-loading-icon
`;
return [
// ==================== Checkbox ====================
getCheckboxStyle(`${prefixCls}-checkbox`, token), {
[componentCls]: {
// ================== Checkbox ==================
'&-checkbox': {
top: 0,
marginInlineEnd: token.paddingXS,
pointerEvents: 'unset'
},
// ==================== Menu ====================
// >>> Menus
'&-menus': {
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'flex-start',
[`&${componentCls}-menu-empty`]: {
[`${componentCls}-menu`]: {
width: '100%',
height: 'auto',
[cascaderMenuItemCls]: {
color: token.colorTextDisabled
}
}
}
},
// >>> Menu
'&-menu': {
flexGrow: 1,
flexShrink: 0,
minWidth: token.controlItemWidth,
height: token.dropdownHeight,
margin: 0,
padding: token.menuPadding,
overflow: 'auto',
verticalAlign: 'top',
listStyle: 'none',
'-ms-overflow-style': '-ms-autohiding-scrollbar',
// https://github.com/ant-design/ant-design/issues/11857
'&:not(:last-child)': {
borderInlineEnd: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
},
'&-item': Object.assign(Object.assign({}, textEllipsis), {
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'center',
padding: token.optionPadding,
lineHeight: token.lineHeight,
cursor: 'pointer',
transition: `all ${token.motionDurationMid}`,
borderRadius: token.borderRadiusSM,
'&:hover': {
background: token.controlItemBgHover
},
'&-disabled': {
color: token.colorTextDisabled,
cursor: 'not-allowed',
'&:hover': {
background: 'transparent'
},
[iconCls]: {
color: token.colorTextDisabled
}
},
[`&-active:not(${cascaderMenuItemCls}-disabled)`]: {
'&, &:hover': {
color: token.optionSelectedColor,
fontWeight: token.optionSelectedFontWeight,
backgroundColor: token.optionSelectedBg
}
},
'&-content': {
flex: 'auto'
},
[iconCls]: {
marginInlineStart: token.paddingXXS,
color: token.colorIcon,
fontSize: token.fontSizeIcon
},
'&-keyword': {
color: token.colorHighlight
}
})
}
}
}];
};
export default getColumnsStyle;

57
node_modules/antd/es/cascader/style/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,57 @@
import type { CSSProperties } from 'react';
import type { FullToken, GlobalToken } from '../../theme/internal';
export interface ComponentToken {
/**
* @desc 选择器宽度
* @descEN Width of Cascader
*/
controlWidth: number | string;
/**
* @desc 选项宽度
* @descEN Width of item
*/
controlItemWidth: number | string;
/**
* @desc 下拉菜单高度
* @descEN Height of dropdown
*/
dropdownHeight: number | string;
/**
* @desc 选项选中时背景色
* @descEN Background color of selected item
*/
optionSelectedBg: string;
/**
* @desc 选项选中时文本颜色
* @descEN Text color when option is selected
*/
optionSelectedColor: string;
/**
* @desc 选项选中时字重
* @descEN Font weight of selected item
*/
optionSelectedFontWeight: CSSProperties['fontWeight'];
/**
* @desc 选项内间距
* @descEN Padding of menu item
*/
optionPadding: CSSProperties['padding'];
/**
* @desc 选项菜单(单列)内间距
* @descEN Padding of menu item (single column)
*/
menuPadding: CSSProperties['padding'];
}
export type CascaderToken = FullToken<'Cascader'>;
export declare const prepareComponentToken: (token: GlobalToken) => {
controlWidth: number;
controlItemWidth: number;
dropdownHeight: number;
optionSelectedBg: string;
optionSelectedFontWeight: number;
optionPadding: string;
menuPadding: number;
optionSelectedColor: string;
};
declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
export default _default;

60
node_modules/antd/es/cascader/style/index.js generated vendored Normal file
View File

@@ -0,0 +1,60 @@
import { genCompactItemStyle } from '../../style/compact-item';
import { genStyleHooks } from '../../theme/internal';
import getColumnsStyle from './columns';
// =============================== Base ===============================
const genBaseStyle = token => {
const {
componentCls,
antCls
} = token;
return [
// =====================================================
// == Control ==
// =====================================================
{
[componentCls]: {
width: token.controlWidth
}
},
// =====================================================
// == Popup ==
// =====================================================
{
[`${componentCls}-dropdown`]: [{
[`&${antCls}-select-dropdown`]: {
padding: 0
}
}, getColumnsStyle(token)]
},
// =====================================================
// == RTL ==
// =====================================================
{
[`${componentCls}-dropdown-rtl`]: {
direction: 'rtl'
}
},
// =====================================================
// == Space Compact ==
// =====================================================
genCompactItemStyle(token)];
};
// ============================== Export ==============================
export const prepareComponentToken = token => {
const itemPaddingVertical = Math.round((token.controlHeight - token.fontSize * token.lineHeight) / 2);
return {
controlWidth: 184,
controlItemWidth: 111,
dropdownHeight: 180,
optionSelectedBg: token.controlItemBgActive,
optionSelectedFontWeight: token.fontWeightStrong,
optionPadding: `${itemPaddingVertical}px ${token.paddingSM}px`,
menuPadding: token.paddingXXS,
optionSelectedColor: token.colorText
};
};
export default genStyleHooks('Cascader', genBaseStyle, prepareComponentToken, {
unitless: {
optionSelectedFontWeight: true
}
});

2
node_modules/antd/es/cascader/style/panel.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
declare const _default: (prefixCls: string, rootCls?: string) => import("@ant-design/cssinjs-utils/lib/interface").UseComponentStyleResult;
export default _default;

30
node_modules/antd/es/cascader/style/panel.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
import { unit } from '@ant-design/cssinjs';
import { prepareComponentToken } from '.';
import { genComponentStyleHook } from '../../theme/internal';
import getColumnsStyle from './columns';
// ============================== Panel ===============================
const genPanelStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-panel`]: [getColumnsStyle(token), {
display: 'inline-flex',
border: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
borderRadius: token.borderRadiusLG,
overflowX: 'auto',
maxWidth: '100%',
[`${componentCls}-menus`]: {
alignItems: 'stretch'
},
[`${componentCls}-menu`]: {
height: 'auto'
},
'&-empty': {
padding: token.paddingXXS
}
}]
};
};
// ============================== Export ==============================
export default genComponentStyleHook(['Cascader', 'Panel'], genPanelStyle, prepareComponentToken);