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

10
node_modules/antd/lib/statistic/Countdown.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import * as React from 'react';
import type { StatisticProps } from './Statistic';
import type { valueType } from './utils';
export interface CountdownProps extends StatisticProps {
format?: string;
onFinish?: () => void;
onChange?: (value?: valueType) => void;
}
declare const _default: React.NamedExoticComponent<CountdownProps>;
export default _default;

22
node_modules/antd/lib/statistic/Countdown.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
"use strict";
"use client";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
var _warning = require("../_util/warning");
var _Timer = _interopRequireDefault(require("./Timer"));
const Countdown = props => {
if (process.env.NODE_ENV !== 'production') {
const warning = (0, _warning.devUseWarning)('Countdown');
warning.deprecated(false, '<Statistic.Countdown />', '<Statistic.Timer type="countdown" />');
}
return /*#__PURE__*/React.createElement(_Timer.default, Object.assign({}, props, {
type: "countdown"
}));
};
var _default = exports.default = /*#__PURE__*/React.memo(Countdown);

8
node_modules/antd/lib/statistic/Number.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import * as React from 'react';
import type { FormatConfig, valueType } from './utils';
interface NumberProps extends FormatConfig {
value: valueType;
prefixCls?: string;
}
declare const StatisticNumber: React.FC<NumberProps>;
export default StatisticNumber;

54
node_modules/antd/lib/statistic/Number.js generated vendored Normal file
View File

@@ -0,0 +1,54 @@
"use strict";
"use client";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
const StatisticNumber = props => {
const {
value,
formatter,
precision,
decimalSeparator,
groupSeparator = '',
prefixCls
} = props;
let valueNode;
if (typeof formatter === 'function') {
// Customize formatter
valueNode = formatter(value);
} else {
// Internal formatter
const val = String(value);
const cells = val.match(/^(-?)(\d*)(\.(\d+))?$/);
// Process if illegal number
if (!cells || val === '-') {
valueNode = val;
} else {
const negative = cells[1];
let int = cells[2] || '0';
let decimal = cells[4] || '';
int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
if (typeof precision === 'number') {
decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0);
}
if (decimal) {
decimal = `${decimalSeparator}${decimal}`;
}
valueNode = [/*#__PURE__*/React.createElement("span", {
key: "int",
className: `${prefixCls}-content-value-int`
}, negative, int), decimal && (/*#__PURE__*/React.createElement("span", {
key: "decimal",
className: `${prefixCls}-content-value-decimal`
}, decimal))];
}
}
return /*#__PURE__*/React.createElement("span", {
className: `${prefixCls}-content-value`
}, valueNode);
};
var _default = exports.default = StatisticNumber;

26
node_modules/antd/lib/statistic/Statistic.d.ts generated vendored Normal file
View File

@@ -0,0 +1,26 @@
import * as React from 'react';
import type { HTMLAriaDataAttributes } from '../_util/aria-data-attrs';
import type { FormatConfig, valueType } from './utils';
export interface StatisticRef {
nativeElement: HTMLDivElement;
}
interface StatisticReactProps extends FormatConfig {
prefixCls?: string;
className?: string;
rootClassName?: string;
style?: React.CSSProperties;
value?: valueType;
valueStyle?: React.CSSProperties;
valueRender?: (node: React.ReactNode) => React.ReactNode;
title?: React.ReactNode;
prefix?: React.ReactNode;
suffix?: React.ReactNode;
loading?: boolean;
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
}
export type StatisticProps = HTMLAriaDataAttributes & StatisticReactProps;
declare const Statistic: React.ForwardRefExoticComponent<React.AriaAttributes & {
[key: `data-${string}`]: unknown;
} & Pick<React.HTMLAttributes<HTMLDivElement>, "role"> & StatisticReactProps & React.RefAttributes<StatisticRef>>;
export default Statistic;

100
node_modules/antd/lib/statistic/Statistic.js generated vendored Normal file
View File

@@ -0,0 +1,100 @@
"use strict";
"use client";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _pickAttrs = _interopRequireDefault(require("rc-util/lib/pickAttrs"));
var _context = require("../config-provider/context");
var _skeleton = _interopRequireDefault(require("../skeleton"));
var _Number = _interopRequireDefault(require("./Number"));
var _style = _interopRequireDefault(require("./style"));
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
const Statistic = /*#__PURE__*/React.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
valueStyle,
value = 0,
title,
valueRender,
prefix,
suffix,
loading = false,
/* --- FormatConfig starts --- */
formatter,
precision,
decimalSeparator = '.',
groupSeparator = ',',
/* --- FormatConfig starts --- */
onMouseEnter,
onMouseLeave
} = props,
rest = __rest(props, ["prefixCls", "className", "rootClassName", "style", "valueStyle", "value", "title", "valueRender", "prefix", "suffix", "loading", "formatter", "precision", "decimalSeparator", "groupSeparator", "onMouseEnter", "onMouseLeave"]);
const {
getPrefixCls,
direction,
className: contextClassName,
style: contextStyle
} = (0, _context.useComponentConfig)('statistic');
const prefixCls = getPrefixCls('statistic', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);
const valueNode = /*#__PURE__*/React.createElement(_Number.default, {
decimalSeparator: decimalSeparator,
groupSeparator: groupSeparator,
prefixCls: prefixCls,
formatter: formatter,
precision: precision,
value: value
});
const cls = (0, _classnames.default)(prefixCls, {
[`${prefixCls}-rtl`]: direction === 'rtl'
}, contextClassName, className, rootClassName, hashId, cssVarCls);
const internalRef = React.useRef(null);
React.useImperativeHandle(ref, () => ({
nativeElement: internalRef.current
}));
const restProps = (0, _pickAttrs.default)(rest, {
aria: true,
data: true
});
return wrapCSSVar(/*#__PURE__*/React.createElement("div", Object.assign({}, restProps, {
ref: internalRef,
className: cls,
style: Object.assign(Object.assign({}, contextStyle), style),
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave
}), title && /*#__PURE__*/React.createElement("div", {
className: `${prefixCls}-title`
}, title), /*#__PURE__*/React.createElement(_skeleton.default, {
paragraph: false,
loading: loading,
className: `${prefixCls}-skeleton`,
active: true
}, /*#__PURE__*/React.createElement("div", {
style: valueStyle,
className: `${prefixCls}-content`
}, prefix && /*#__PURE__*/React.createElement("span", {
className: `${prefixCls}-content-prefix`
}, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/React.createElement("span", {
className: `${prefixCls}-content-suffix`
}, suffix)))));
});
if (process.env.NODE_ENV !== 'production') {
Statistic.displayName = 'Statistic';
}
var _default = exports.default = Statistic;

15
node_modules/antd/lib/statistic/Timer.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import * as React from 'react';
import type { StatisticProps } from './Statistic';
import type { FormatConfig, valueType } from './utils';
export type TimerType = 'countdown' | 'countup';
export interface StatisticTimerProps extends FormatConfig, StatisticProps {
type: TimerType;
format?: string;
/**
* Only to be called when the type is `countdown`.
*/
onFinish?: () => void;
onChange?: (value?: valueType) => void;
}
declare const StatisticTimer: React.FC<StatisticTimerProps>;
export default StatisticTimer;

84
node_modules/antd/lib/statistic/Timer.js generated vendored Normal file
View File

@@ -0,0 +1,84 @@
"use strict";
"use client";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
var _rcUtil = require("rc-util");
var _raf = _interopRequireDefault(require("rc-util/lib/raf"));
var _reactNode = require("../_util/reactNode");
var _Statistic = _interopRequireDefault(require("./Statistic"));
var _utils = require("./utils");
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
function getTime(value) {
return new Date(value).getTime();
}
const StatisticTimer = props => {
const {
value,
format = 'HH:mm:ss',
onChange,
onFinish,
type
} = props,
rest = __rest(props, ["value", "format", "onChange", "onFinish", "type"]);
const down = type === 'countdown';
// We reuse state here to do same as `forceUpdate`
const [showTime, setShowTime] = React.useState(null);
// ======================== Update ========================
const update = (0, _rcUtil.useEvent)(() => {
const now = Date.now();
const timestamp = getTime(value);
setShowTime({});
const timeDiff = !down ? now - timestamp : timestamp - now;
onChange === null || onChange === void 0 ? void 0 : onChange(timeDiff);
// Only countdown will trigger `onFinish`
if (down && timestamp < now) {
onFinish === null || onFinish === void 0 ? void 0 : onFinish();
return false;
}
return true;
});
// Effect trigger
React.useEffect(() => {
let rafId;
const clear = () => _raf.default.cancel(rafId);
const rafUpdate = () => {
rafId = (0, _raf.default)(() => {
if (update()) {
rafUpdate();
}
});
};
rafUpdate();
return clear;
}, [value, down]);
React.useEffect(() => {
setShowTime({});
}, []);
// ======================== Format ========================
const formatter = (formatValue, config) => showTime ? (0, _utils.formatCounter)(formatValue, Object.assign(Object.assign({}, config), {
format
}), down) : '-';
const valueRender = node => (0, _reactNode.cloneElement)(node, {
title: undefined
});
// ======================== Render ========================
return /*#__PURE__*/React.createElement(_Statistic.default, Object.assign({}, rest, {
value: value,
valueRender: valueRender,
formatter: formatter
}));
};
var _default = exports.default = StatisticTimer;

17
node_modules/antd/lib/statistic/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,17 @@
import type { CountdownProps } from './Countdown';
import Countdown from './Countdown';
import type { StatisticProps } from './Statistic';
import Statistic from './Statistic';
import type { StatisticTimerProps } from './Timer';
import Timer from './Timer';
export type { CountdownProps, StatisticTimerProps, StatisticProps };
type CompoundedComponent = {
/**
* @deprecated Please use `Statistic.Timer` instead
*/
Countdown: typeof Countdown;
Timer: typeof Timer;
};
export type CompoundedStatistic = typeof Statistic & CompoundedComponent;
declare const _default: CompoundedStatistic;
export default _default;

14
node_modules/antd/lib/statistic/index.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
"use strict";
"use client";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _Countdown = _interopRequireDefault(require("./Countdown"));
var _Statistic = _interopRequireDefault(require("./Statistic"));
var _Timer = _interopRequireDefault(require("./Timer"));
_Statistic.default.Timer = _Timer.default;
_Statistic.default.Countdown = _Countdown.default;
var _default = exports.default = _Statistic.default;

0
node_modules/antd/lib/statistic/interface.d.ts generated vendored Normal file
View File

1
node_modules/antd/lib/statistic/interface.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";

16
node_modules/antd/lib/statistic/style/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,16 @@
import type { GetDefaultToken } from '../../theme/internal';
export interface ComponentToken {
/**
* @desc 标题字体大小
* @descEN Title font size
*/
titleFontSize: number;
/**
* @desc 内容字体大小
* @descEN Content font size
*/
contentFontSize: number;
}
export declare const prepareComponentToken: GetDefaultToken<'Statistic'>;
declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
export default _default;

66
node_modules/antd/lib/statistic/style/index.js generated vendored Normal file
View File

@@ -0,0 +1,66 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.prepareComponentToken = exports.default = void 0;
var _style = require("../../style");
var _internal = require("../../theme/internal");
const genStatisticStyle = token => {
const {
componentCls,
marginXXS,
padding,
colorTextDescription,
titleFontSize,
colorTextHeading,
contentFontSize,
fontFamily
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {
[`${componentCls}-title`]: {
marginBottom: marginXXS,
color: colorTextDescription,
fontSize: titleFontSize
},
[`${componentCls}-skeleton`]: {
paddingTop: padding
},
[`${componentCls}-content`]: {
color: colorTextHeading,
fontSize: contentFontSize,
fontFamily,
[`${componentCls}-content-value`]: {
display: 'inline-block',
direction: 'ltr'
},
[`${componentCls}-content-prefix, ${componentCls}-content-suffix`]: {
display: 'inline-block'
},
[`${componentCls}-content-prefix`]: {
marginInlineEnd: marginXXS
},
[`${componentCls}-content-suffix`]: {
marginInlineStart: marginXXS
}
}
})
};
};
// ============================== Export ==============================
const prepareComponentToken = token => {
const {
fontSizeHeading3,
fontSize
} = token;
return {
titleFontSize: fontSize,
contentFontSize: fontSizeHeading3
};
};
exports.prepareComponentToken = prepareComponentToken;
var _default = exports.default = (0, _internal.genStyleHooks)('Statistic', token => {
const statisticToken = (0, _internal.mergeToken)(token, {});
return genStatisticStyle(statisticToken);
}, prepareComponentToken);

15
node_modules/antd/lib/statistic/utils.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import type * as React from 'react';
export type valueType = number | string;
export type countdownValueType = number | string;
export type Formatter = false | 'number' | 'countdown' | ((value: valueType, config?: FormatConfig) => React.ReactNode);
export interface FormatConfig {
formatter?: Formatter;
decimalSeparator?: string;
groupSeparator?: string;
precision?: number;
}
export interface CountdownFormatConfig extends FormatConfig {
format?: string;
}
export declare function formatTimeStr(duration: number, format: string): string;
export declare function formatCounter(value: valueType, config: CountdownFormatConfig, down: boolean): string;

54
node_modules/antd/lib/statistic/utils.js generated vendored Normal file
View File

@@ -0,0 +1,54 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.formatCounter = formatCounter;
exports.formatTimeStr = formatTimeStr;
// Countdown
const timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365],
// years
['M', 1000 * 60 * 60 * 24 * 30],
// months
['D', 1000 * 60 * 60 * 24],
// days
['H', 1000 * 60 * 60],
// hours
['m', 1000 * 60],
// minutes
['s', 1000],
// seconds
['S', 1] // million seconds
];
function formatTimeStr(duration, format) {
let leftDuration = duration;
const escapeRegex = /\[[^\]]*]/g;
const keepList = (format.match(escapeRegex) || []).map(str => str.slice(1, -1));
const templateText = format.replace(escapeRegex, '[]');
const replacedText = timeUnits.reduce((current, [name, unit]) => {
if (current.includes(name)) {
const value = Math.floor(leftDuration / unit);
leftDuration -= value * unit;
return current.replace(new RegExp(`${name}+`, 'g'), match => {
const len = match.length;
return value.toString().padStart(len, '0');
});
}
return current;
}, templateText);
let index = 0;
return replacedText.replace(escapeRegex, () => {
const match = keepList[index];
index += 1;
return match;
});
}
function formatCounter(value, config, down) {
const {
format = ''
} = config;
const target = new Date(value).getTime();
const current = Date.now();
const diff = down ? Math.max(target - current, 0) : Math.max(current - target, 0);
return formatTimeStr(diff, format);
}