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

42
node_modules/antd/es/alert/Alert.d.ts generated vendored Normal file
View File

@@ -0,0 +1,42 @@
import * as React from 'react';
import type { ClosableType } from '../_util/hooks';
export interface AlertRef {
nativeElement: HTMLDivElement;
}
export interface AlertProps {
/** Type of Alert styles, options:`success`, `info`, `warning`, `error` */
type?: 'success' | 'info' | 'warning' | 'error';
/** Whether Alert can be closed */
closable?: ClosableType;
/**
* @deprecated please use `closable.closeIcon` instead.
* Close text to show
*/
closeText?: React.ReactNode;
/** Content of Alert */
message?: React.ReactNode;
/** Additional content of Alert */
description?: React.ReactNode;
/** Callback when close Alert */
onClose?: React.MouseEventHandler<HTMLButtonElement>;
/** Trigger when animation ending of Alert */
afterClose?: () => void;
/** Whether to show icon */
showIcon?: boolean;
/** https://www.w3.org/TR/2014/REC-html5-20141028/dom.html#aria-role-attribute */
role?: string;
style?: React.CSSProperties;
prefixCls?: string;
className?: string;
rootClassName?: string;
banner?: boolean;
icon?: React.ReactNode;
closeIcon?: React.ReactNode;
action?: React.ReactNode;
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
onClick?: React.MouseEventHandler<HTMLDivElement>;
id?: string;
}
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<AlertRef>>;
export default Alert;

218
node_modules/antd/es/alert/Alert.js generated vendored Normal file
View File

@@ -0,0 +1,218 @@
"use client";
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 CheckCircleFilled from "@ant-design/icons/es/icons/CheckCircleFilled";
import CloseCircleFilled from "@ant-design/icons/es/icons/CloseCircleFilled";
import CloseOutlined from "@ant-design/icons/es/icons/CloseOutlined";
import ExclamationCircleFilled from "@ant-design/icons/es/icons/ExclamationCircleFilled";
import InfoCircleFilled from "@ant-design/icons/es/icons/InfoCircleFilled";
import classNames from 'classnames';
import CSSMotion from 'rc-motion';
import pickAttrs from "rc-util/es/pickAttrs";
import { composeRef } from "rc-util/es/ref";
import { replaceElement } from '../_util/reactNode';
import { devUseWarning } from '../_util/warning';
import { useComponentConfig } from '../config-provider/context';
import useStyle from './style';
const iconMapFilled = {
success: CheckCircleFilled,
info: InfoCircleFilled,
error: CloseCircleFilled,
warning: ExclamationCircleFilled
};
const IconNode = props => {
const {
icon,
prefixCls,
type
} = props;
const iconType = iconMapFilled[type] || null;
if (icon) {
return replaceElement(icon, /*#__PURE__*/React.createElement("span", {
className: `${prefixCls}-icon`
}, icon), () => ({
className: classNames(`${prefixCls}-icon`, icon.props.className)
}));
}
return /*#__PURE__*/React.createElement(iconType, {
className: `${prefixCls}-icon`
});
};
const CloseIconNode = props => {
const {
isClosable,
prefixCls,
closeIcon,
handleClose,
ariaProps
} = props;
const mergedCloseIcon = closeIcon === true || closeIcon === undefined ? /*#__PURE__*/React.createElement(CloseOutlined, null) : closeIcon;
return isClosable ? (/*#__PURE__*/React.createElement("button", Object.assign({
type: "button",
onClick: handleClose,
className: `${prefixCls}-close-icon`,
tabIndex: 0
}, ariaProps), mergedCloseIcon)) : null;
};
const Alert = /*#__PURE__*/React.forwardRef((props, ref) => {
const {
description,
prefixCls: customizePrefixCls,
message,
banner,
className,
rootClassName,
style,
onMouseEnter,
onMouseLeave,
onClick,
afterClose,
showIcon,
closable,
closeText,
closeIcon,
action,
id
} = props,
otherProps = __rest(props, ["description", "prefixCls", "message", "banner", "className", "rootClassName", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "id"]);
const [closed, setClosed] = React.useState(false);
if (process.env.NODE_ENV !== 'production') {
const warning = devUseWarning('Alert');
warning.deprecated(!closeText, 'closeText', 'closable.closeIcon');
}
const internalRef = React.useRef(null);
React.useImperativeHandle(ref, () => ({
nativeElement: internalRef.current
}));
const {
getPrefixCls,
direction,
closable: contextClosable,
closeIcon: contextCloseIcon,
className: contextClassName,
style: contextStyle
} = useComponentConfig('alert');
const prefixCls = getPrefixCls('alert', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);
const handleClose = e => {
var _a;
setClosed(true);
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e);
};
const type = React.useMemo(() => {
if (props.type !== undefined) {
return props.type;
}
// banner mode defaults to 'warning'
return banner ? 'warning' : 'info';
}, [props.type, banner]);
// closeable when closeText or closeIcon is assigned
const isClosable = React.useMemo(() => {
if (typeof closable === 'object' && closable.closeIcon) {
return true;
}
if (closeText) {
return true;
}
if (typeof closable === 'boolean') {
return closable;
}
// should be true when closeIcon is 0 or ''
if (closeIcon !== false && closeIcon !== null && closeIcon !== undefined) {
return true;
}
return !!contextClosable;
}, [closeText, closeIcon, closable, contextClosable]);
// banner mode defaults to Icon
const isShowIcon = banner && showIcon === undefined ? true : showIcon;
const alertCls = classNames(prefixCls, `${prefixCls}-${type}`, {
[`${prefixCls}-with-description`]: !!description,
[`${prefixCls}-no-icon`]: !isShowIcon,
[`${prefixCls}-banner`]: !!banner,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, contextClassName, className, rootClassName, cssVarCls, hashId);
const restProps = pickAttrs(otherProps, {
aria: true,
data: true
});
const mergedCloseIcon = React.useMemo(() => {
if (typeof closable === 'object' && closable.closeIcon) {
return closable.closeIcon;
}
if (closeText) {
return closeText;
}
if (closeIcon !== undefined) {
return closeIcon;
}
if (typeof contextClosable === 'object' && contextClosable.closeIcon) {
return contextClosable.closeIcon;
}
return contextCloseIcon;
}, [closeIcon, closable, contextClosable, closeText, contextCloseIcon]);
const mergedAriaProps = React.useMemo(() => {
const merged = closable !== null && closable !== void 0 ? closable : contextClosable;
if (typeof merged === 'object') {
const {
closeIcon: _
} = merged,
ariaProps = __rest(merged, ["closeIcon"]);
return ariaProps;
}
return {};
}, [closable, contextClosable]);
return wrapCSSVar(/*#__PURE__*/React.createElement(CSSMotion, {
visible: !closed,
motionName: `${prefixCls}-motion`,
motionAppear: false,
motionEnter: false,
onLeaveStart: node => ({
maxHeight: node.offsetHeight
}),
onLeaveEnd: afterClose
}, ({
className: motionClassName,
style: motionStyle
}, setRef) => (/*#__PURE__*/React.createElement("div", Object.assign({
id: id,
ref: composeRef(internalRef, setRef),
"data-show": !closed,
className: classNames(alertCls, motionClassName),
style: Object.assign(Object.assign(Object.assign({}, contextStyle), style), motionStyle),
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onClick: onClick,
role: "alert"
}, restProps), isShowIcon ? (/*#__PURE__*/React.createElement(IconNode, {
description: description,
icon: props.icon,
prefixCls: prefixCls,
type: type
})) : null, /*#__PURE__*/React.createElement("div", {
className: `${prefixCls}-content`
}, message ? /*#__PURE__*/React.createElement("div", {
className: `${prefixCls}-message`
}, message) : null, description ? /*#__PURE__*/React.createElement("div", {
className: `${prefixCls}-description`
}, description) : null), action ? /*#__PURE__*/React.createElement("div", {
className: `${prefixCls}-action`
}, action) : null, /*#__PURE__*/React.createElement(CloseIconNode, {
isClosable: isClosable,
prefixCls: prefixCls,
closeIcon: mergedCloseIcon,
handleClose: handleClose,
ariaProps: mergedAriaProps
})))));
});
if (process.env.NODE_ENV !== 'production') {
Alert.displayName = 'Alert';
}
export default Alert;

24
node_modules/antd/es/alert/ErrorBoundary.d.ts generated vendored Normal file
View File

@@ -0,0 +1,24 @@
import * as React from 'react';
interface ErrorBoundaryProps {
message?: React.ReactNode;
description?: React.ReactNode;
children?: React.ReactNode;
id?: string;
}
interface ErrorBoundaryStates {
error?: Error | null;
info?: {
componentStack?: string;
};
}
declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryStates> {
state: {
error: undefined;
info: {
componentStack: string;
};
};
componentDidCatch(error: Error | null, info: object): void;
render(): React.ReactNode;
}
export default ErrorBoundary;

64
node_modules/antd/es/alert/ErrorBoundary.js generated vendored Normal file
View File

@@ -0,0 +1,64 @@
"use client";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import * as React from 'react';
import Alert from './Alert';
let ErrorBoundary = /*#__PURE__*/function (_React$Component) {
function ErrorBoundary() {
var _this;
_classCallCheck(this, ErrorBoundary);
_this = _callSuper(this, ErrorBoundary, arguments);
_this.state = {
error: undefined,
info: {
componentStack: ''
}
};
return _this;
}
_inherits(ErrorBoundary, _React$Component);
return _createClass(ErrorBoundary, [{
key: "componentDidCatch",
value: function componentDidCatch(error, info) {
this.setState({
error,
info
});
}
}, {
key: "render",
value: function render() {
const {
message,
description,
id,
children
} = this.props;
const {
error,
info
} = this.state;
const componentStack = (info === null || info === void 0 ? void 0 : info.componentStack) || null;
const errorMessage = typeof message === 'undefined' ? (error || '').toString() : message;
const errorDescription = typeof description === 'undefined' ? componentStack : description;
if (error) {
return /*#__PURE__*/React.createElement(Alert, {
id: id,
type: "error",
message: errorMessage,
description: /*#__PURE__*/React.createElement("pre", {
style: {
fontSize: '0.9em',
overflowX: 'auto'
}
}, errorDescription)
});
}
return children;
}
}]);
}(React.Component);
export default ErrorBoundary;

8
node_modules/antd/es/alert/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import InternalAlert from './Alert';
import ErrorBoundary from './ErrorBoundary';
export type { AlertProps } from './Alert';
type CompoundedComponent = typeof InternalAlert & {
ErrorBoundary: typeof ErrorBoundary;
};
declare const Alert: CompoundedComponent;
export default Alert;

7
node_modules/antd/es/alert/index.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
"use client";
import InternalAlert from './Alert';
import ErrorBoundary from './ErrorBoundary';
const Alert = InternalAlert;
Alert.ErrorBoundary = ErrorBoundary;
export default Alert;

26
node_modules/antd/es/alert/style/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,26 @@
import type { CSSProperties } from 'react';
import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal';
export interface ComponentToken {
/**
* @desc 默认内间距
* @descEN Default padding
*/
defaultPadding: CSSProperties['padding'];
/**
* @desc 带有描述的内间距
* @descEN Padding with description
*/
withDescriptionPadding: CSSProperties['padding'];
/**
* @desc 带有描述时的图标尺寸
* @descEN Icon size with description
*/
withDescriptionIconSize: number;
}
type AlertToken = FullToken<'Alert'> & {};
export declare const genBaseStyle: GenerateStyle<AlertToken>;
export declare const genTypeStyle: GenerateStyle<AlertToken>;
export declare const genActionStyle: GenerateStyle<AlertToken>;
export declare const prepareComponentToken: GetDefaultToken<'Alert'>;
declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
export default _default;

177
node_modules/antd/es/alert/style/index.js generated vendored Normal file
View File

@@ -0,0 +1,177 @@
import { unit } from '@ant-design/cssinjs';
import { resetComponent } from '../../style';
import { genStyleHooks } from '../../theme/internal';
const genAlertTypeStyle = (bgColor, borderColor, iconColor, token, alertCls) => ({
background: bgColor,
border: `${unit(token.lineWidth)} ${token.lineType} ${borderColor}`,
[`${alertCls}-icon`]: {
color: iconColor
}
});
export const genBaseStyle = token => {
const {
componentCls,
motionDurationSlow: duration,
marginXS,
marginSM,
fontSize,
fontSizeLG,
lineHeight,
borderRadiusLG: borderRadius,
motionEaseInOutCirc,
withDescriptionIconSize,
colorText,
colorTextHeading,
withDescriptionPadding,
defaultPadding
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {
position: 'relative',
display: 'flex',
alignItems: 'center',
padding: defaultPadding,
wordWrap: 'break-word',
borderRadius,
[`&${componentCls}-rtl`]: {
direction: 'rtl'
},
[`${componentCls}-content`]: {
flex: 1,
minWidth: 0
},
[`${componentCls}-icon`]: {
marginInlineEnd: marginXS,
lineHeight: 0
},
'&-description': {
display: 'none',
fontSize,
lineHeight
},
'&-message': {
color: colorTextHeading
},
[`&${componentCls}-motion-leave`]: {
overflow: 'hidden',
opacity: 1,
transition: `max-height ${duration} ${motionEaseInOutCirc}, opacity ${duration} ${motionEaseInOutCirc},
padding-top ${duration} ${motionEaseInOutCirc}, padding-bottom ${duration} ${motionEaseInOutCirc},
margin-bottom ${duration} ${motionEaseInOutCirc}`
},
[`&${componentCls}-motion-leave-active`]: {
maxHeight: 0,
marginBottom: '0 !important',
paddingTop: 0,
paddingBottom: 0,
opacity: 0
}
}),
[`${componentCls}-with-description`]: {
alignItems: 'flex-start',
padding: withDescriptionPadding,
[`${componentCls}-icon`]: {
marginInlineEnd: marginSM,
fontSize: withDescriptionIconSize,
lineHeight: 0
},
[`${componentCls}-message`]: {
display: 'block',
marginBottom: marginXS,
color: colorTextHeading,
fontSize: fontSizeLG
},
[`${componentCls}-description`]: {
display: 'block',
color: colorText
}
},
[`${componentCls}-banner`]: {
marginBottom: 0,
border: '0 !important',
borderRadius: 0
}
};
};
export const genTypeStyle = token => {
const {
componentCls,
colorSuccess,
colorSuccessBorder,
colorSuccessBg,
colorWarning,
colorWarningBorder,
colorWarningBg,
colorError,
colorErrorBorder,
colorErrorBg,
colorInfo,
colorInfoBorder,
colorInfoBg
} = token;
return {
[componentCls]: {
'&-success': genAlertTypeStyle(colorSuccessBg, colorSuccessBorder, colorSuccess, token, componentCls),
'&-info': genAlertTypeStyle(colorInfoBg, colorInfoBorder, colorInfo, token, componentCls),
'&-warning': genAlertTypeStyle(colorWarningBg, colorWarningBorder, colorWarning, token, componentCls),
'&-error': Object.assign(Object.assign({}, genAlertTypeStyle(colorErrorBg, colorErrorBorder, colorError, token, componentCls)), {
[`${componentCls}-description > pre`]: {
margin: 0,
padding: 0
}
})
}
};
};
export const genActionStyle = token => {
const {
componentCls,
iconCls,
motionDurationMid,
marginXS,
fontSizeIcon,
colorIcon,
colorIconHover
} = token;
return {
[componentCls]: {
'&-action': {
marginInlineStart: marginXS
},
[`${componentCls}-close-icon`]: {
marginInlineStart: marginXS,
padding: 0,
overflow: 'hidden',
fontSize: fontSizeIcon,
lineHeight: unit(fontSizeIcon),
backgroundColor: 'transparent',
border: 'none',
outline: 'none',
cursor: 'pointer',
[`${iconCls}-close`]: {
color: colorIcon,
transition: `color ${motionDurationMid}`,
'&:hover': {
color: colorIconHover
}
}
},
'&-close-text': {
color: colorIcon,
transition: `color ${motionDurationMid}`,
'&:hover': {
color: colorIconHover
}
}
}
};
};
export const prepareComponentToken = token => {
const paddingHorizontal = 12; // Fixed value here.
return {
withDescriptionIconSize: token.fontSizeHeading3,
defaultPadding: `${token.paddingContentVerticalSM}px ${paddingHorizontal}px`,
withDescriptionPadding: `${token.paddingMD}px ${token.paddingContentHorizontalLG}px`
};
};
export default genStyleHooks('Alert', token => [genBaseStyle(token), genTypeStyle(token), genActionStyle(token)], prepareComponentToken);