first commit
This commit is contained in:
25
frontend/node_modules/antd/lib/pagination/Pagination.d.ts
generated
vendored
Normal file
25
frontend/node_modules/antd/lib/pagination/Pagination.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import * as React from 'react';
|
||||
import type { PaginationLocale, PaginationProps as RcPaginationProps } from 'rc-pagination';
|
||||
import type { SelectProps } from '../select';
|
||||
export interface PaginationProps extends Omit<RcPaginationProps, 'showSizeChanger' | 'pageSizeOptions'> {
|
||||
showQuickJumper?: boolean | {
|
||||
goButton?: React.ReactNode;
|
||||
};
|
||||
size?: 'default' | 'small';
|
||||
responsive?: boolean;
|
||||
role?: string;
|
||||
totalBoundaryShowSizeChanger?: number;
|
||||
rootClassName?: string;
|
||||
showSizeChanger?: boolean | SelectProps;
|
||||
/** @deprecated Not official support. Will be removed in next major version. */
|
||||
selectComponentClass?: any;
|
||||
/** `string` type will be removed in next major version. */
|
||||
pageSizeOptions?: (string | number)[];
|
||||
}
|
||||
export type PaginationPosition = 'top' | 'bottom' | 'both';
|
||||
export interface PaginationConfig extends Omit<PaginationProps, 'rootClassName'> {
|
||||
position?: PaginationPosition;
|
||||
}
|
||||
export type { PaginationLocale };
|
||||
declare const Pagination: React.FC<PaginationProps>;
|
||||
export default Pagination;
|
||||
193
frontend/node_modules/antd/lib/pagination/Pagination.js
generated
vendored
Normal file
193
frontend/node_modules/antd/lib/pagination/Pagination.js
generated
vendored
Normal file
@@ -0,0 +1,193 @@
|
||||
"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 _DoubleLeftOutlined = _interopRequireDefault(require("@ant-design/icons/DoubleLeftOutlined"));
|
||||
var _DoubleRightOutlined = _interopRequireDefault(require("@ant-design/icons/DoubleRightOutlined"));
|
||||
var _LeftOutlined = _interopRequireDefault(require("@ant-design/icons/LeftOutlined"));
|
||||
var _RightOutlined = _interopRequireDefault(require("@ant-design/icons/RightOutlined"));
|
||||
var _classnames = _interopRequireDefault(require("classnames"));
|
||||
var _rcPagination = _interopRequireDefault(require("rc-pagination"));
|
||||
var _en_US = _interopRequireDefault(require("rc-pagination/lib/locale/en_US"));
|
||||
var _warning = require("../_util/warning");
|
||||
var _context = require("../config-provider/context");
|
||||
var _useSize = _interopRequireDefault(require("../config-provider/hooks/useSize"));
|
||||
var _useBreakpoint = _interopRequireDefault(require("../grid/hooks/useBreakpoint"));
|
||||
var _locale = require("../locale");
|
||||
var _select = _interopRequireDefault(require("../select"));
|
||||
var _internal = require("../theme/internal");
|
||||
var _style = _interopRequireDefault(require("./style"));
|
||||
var _bordered = _interopRequireDefault(require("./style/bordered"));
|
||||
var _useShowSizeChanger = _interopRequireDefault(require("./useShowSizeChanger"));
|
||||
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 Pagination = props => {
|
||||
const {
|
||||
align,
|
||||
prefixCls: customizePrefixCls,
|
||||
selectPrefixCls: customizeSelectPrefixCls,
|
||||
className,
|
||||
rootClassName,
|
||||
style,
|
||||
size: customizeSize,
|
||||
locale: customLocale,
|
||||
responsive,
|
||||
showSizeChanger,
|
||||
selectComponentClass,
|
||||
pageSizeOptions
|
||||
} = props,
|
||||
restProps = __rest(props, ["align", "prefixCls", "selectPrefixCls", "className", "rootClassName", "style", "size", "locale", "responsive", "showSizeChanger", "selectComponentClass", "pageSizeOptions"]);
|
||||
const {
|
||||
xs
|
||||
} = (0, _useBreakpoint.default)(responsive);
|
||||
const [, token] = (0, _internal.useToken)();
|
||||
const {
|
||||
getPrefixCls,
|
||||
direction,
|
||||
showSizeChanger: contextShowSizeChangerConfig,
|
||||
className: contextClassName,
|
||||
style: contextStyle
|
||||
} = (0, _context.useComponentConfig)('pagination');
|
||||
const prefixCls = getPrefixCls('pagination', customizePrefixCls);
|
||||
// Style
|
||||
const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);
|
||||
// ============================== Size ==============================
|
||||
const mergedSize = (0, _useSize.default)(customizeSize);
|
||||
const isSmall = mergedSize === 'small' || !!(xs && !mergedSize && responsive);
|
||||
// ============================= Locale =============================
|
||||
const [contextLocale] = (0, _locale.useLocale)('Pagination', _en_US.default);
|
||||
const locale = Object.assign(Object.assign({}, contextLocale), customLocale);
|
||||
// ========================== Size Changer ==========================
|
||||
// Merge the props showSizeChanger
|
||||
const [propShowSizeChanger, propSizeChangerSelectProps] = (0, _useShowSizeChanger.default)(showSizeChanger);
|
||||
const [contextShowSizeChanger, contextSizeChangerSelectProps] = (0, _useShowSizeChanger.default)(contextShowSizeChangerConfig);
|
||||
const mergedShowSizeChanger = propShowSizeChanger !== null && propShowSizeChanger !== void 0 ? propShowSizeChanger : contextShowSizeChanger;
|
||||
const mergedShowSizeChangerSelectProps = propSizeChangerSelectProps !== null && propSizeChangerSelectProps !== void 0 ? propSizeChangerSelectProps : contextSizeChangerSelectProps;
|
||||
const SizeChanger = selectComponentClass || _select.default;
|
||||
// Generate options
|
||||
const mergedPageSizeOptions = React.useMemo(() => {
|
||||
return pageSizeOptions ? pageSizeOptions.map(option => Number(option)) : undefined;
|
||||
}, [pageSizeOptions]);
|
||||
// Render size changer
|
||||
const sizeChangerRender = info => {
|
||||
var _a;
|
||||
const {
|
||||
disabled,
|
||||
size: pageSize,
|
||||
onSizeChange,
|
||||
'aria-label': ariaLabel,
|
||||
className: sizeChangerClassName,
|
||||
options
|
||||
} = info;
|
||||
const {
|
||||
className: propSizeChangerClassName,
|
||||
onChange: propSizeChangerOnChange
|
||||
} = mergedShowSizeChangerSelectProps || {};
|
||||
// Origin Select is using Select.Option,
|
||||
// So it make the option value must be string
|
||||
// Just for compatible
|
||||
const selectedValue = (_a = options.find(option => String(option.value) === String(pageSize))) === null || _a === void 0 ? void 0 : _a.value;
|
||||
return /*#__PURE__*/React.createElement(SizeChanger, Object.assign({
|
||||
disabled: disabled,
|
||||
showSearch: true,
|
||||
popupMatchSelectWidth: false,
|
||||
getPopupContainer: triggerNode => triggerNode.parentNode,
|
||||
"aria-label": ariaLabel,
|
||||
options: options
|
||||
}, mergedShowSizeChangerSelectProps, {
|
||||
value: selectedValue,
|
||||
onChange: (nextSize, option) => {
|
||||
onSizeChange === null || onSizeChange === void 0 ? void 0 : onSizeChange(nextSize);
|
||||
propSizeChangerOnChange === null || propSizeChangerOnChange === void 0 ? void 0 : propSizeChangerOnChange(nextSize, option);
|
||||
},
|
||||
size: isSmall ? 'small' : 'middle',
|
||||
className: (0, _classnames.default)(sizeChangerClassName, propSizeChangerClassName)
|
||||
}));
|
||||
};
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const warning = (0, _warning.devUseWarning)('Pagination');
|
||||
process.env.NODE_ENV !== "production" ? warning(!selectComponentClass, 'usage', '`selectComponentClass` is not official api which will be removed.') : void 0;
|
||||
}
|
||||
// ============================= Render =============================
|
||||
const iconsProps = React.useMemo(() => {
|
||||
const ellipsis = /*#__PURE__*/React.createElement("span", {
|
||||
className: `${prefixCls}-item-ellipsis`
|
||||
}, "\u2022\u2022\u2022");
|
||||
const prevIcon = /*#__PURE__*/React.createElement("button", {
|
||||
className: `${prefixCls}-item-link`,
|
||||
type: "button",
|
||||
tabIndex: -1
|
||||
}, direction === 'rtl' ? /*#__PURE__*/React.createElement(_RightOutlined.default, null) : /*#__PURE__*/React.createElement(_LeftOutlined.default, null));
|
||||
const nextIcon = /*#__PURE__*/React.createElement("button", {
|
||||
className: `${prefixCls}-item-link`,
|
||||
type: "button",
|
||||
tabIndex: -1
|
||||
}, direction === 'rtl' ? /*#__PURE__*/React.createElement(_LeftOutlined.default, null) : /*#__PURE__*/React.createElement(_RightOutlined.default, null));
|
||||
const jumpPrevIcon =
|
||||
/*#__PURE__*/
|
||||
// biome-ignore lint/a11y/useValidAnchor: it is hard to refactor
|
||||
React.createElement("a", {
|
||||
className: `${prefixCls}-item-link`
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: `${prefixCls}-item-container`
|
||||
}, direction === 'rtl' ? (/*#__PURE__*/React.createElement(_DoubleRightOutlined.default, {
|
||||
className: `${prefixCls}-item-link-icon`
|
||||
})) : (/*#__PURE__*/React.createElement(_DoubleLeftOutlined.default, {
|
||||
className: `${prefixCls}-item-link-icon`
|
||||
})), ellipsis));
|
||||
const jumpNextIcon =
|
||||
/*#__PURE__*/
|
||||
// biome-ignore lint/a11y/useValidAnchor: it is hard to refactor
|
||||
React.createElement("a", {
|
||||
className: `${prefixCls}-item-link`
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: `${prefixCls}-item-container`
|
||||
}, direction === 'rtl' ? (/*#__PURE__*/React.createElement(_DoubleLeftOutlined.default, {
|
||||
className: `${prefixCls}-item-link-icon`
|
||||
})) : (/*#__PURE__*/React.createElement(_DoubleRightOutlined.default, {
|
||||
className: `${prefixCls}-item-link-icon`
|
||||
})), ellipsis));
|
||||
return {
|
||||
prevIcon,
|
||||
nextIcon,
|
||||
jumpPrevIcon,
|
||||
jumpNextIcon
|
||||
};
|
||||
}, [direction, prefixCls]);
|
||||
const selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls);
|
||||
const extendedClassName = (0, _classnames.default)({
|
||||
[`${prefixCls}-${align}`]: !!align,
|
||||
[`${prefixCls}-mini`]: isSmall,
|
||||
[`${prefixCls}-rtl`]: direction === 'rtl',
|
||||
[`${prefixCls}-bordered`]: token.wireframe
|
||||
}, contextClassName, className, rootClassName, hashId, cssVarCls);
|
||||
const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
|
||||
return wrapCSSVar(/*#__PURE__*/React.createElement(React.Fragment, null, token.wireframe && /*#__PURE__*/React.createElement(_bordered.default, {
|
||||
prefixCls: prefixCls
|
||||
}), /*#__PURE__*/React.createElement(_rcPagination.default, Object.assign({}, iconsProps, restProps, {
|
||||
style: mergedStyle,
|
||||
prefixCls: prefixCls,
|
||||
selectPrefixCls: selectPrefixCls,
|
||||
className: extendedClassName,
|
||||
locale: locale,
|
||||
pageSizeOptions: mergedPageSizeOptions,
|
||||
showSizeChanger: mergedShowSizeChanger,
|
||||
sizeChangerRender: sizeChangerRender
|
||||
}))));
|
||||
};
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
Pagination.displayName = 'Pagination';
|
||||
}
|
||||
var _default = exports.default = Pagination;
|
||||
3
frontend/node_modules/antd/lib/pagination/index.d.ts
generated
vendored
Normal file
3
frontend/node_modules/antd/lib/pagination/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import Pagination from './Pagination';
|
||||
export type { PaginationConfig, PaginationProps } from './Pagination';
|
||||
export default Pagination;
|
||||
10
frontend/node_modules/antd/lib/pagination/index.js
generated
vendored
Normal file
10
frontend/node_modules/antd/lib/pagination/index.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
"use client";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
||||
var _default = exports.default = _Pagination.default;
|
||||
2
frontend/node_modules/antd/lib/pagination/style/bordered.d.ts
generated
vendored
Normal file
2
frontend/node_modules/antd/lib/pagination/style/bordered.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
declare const _default: import("react").FunctionComponent<import("@ant-design/cssinjs-utils/lib/util/genStyleUtils").SubStyleComponentProps>;
|
||||
export default _default;
|
||||
94
frontend/node_modules/antd/lib/pagination/style/bordered.js
generated
vendored
Normal file
94
frontend/node_modules/antd/lib/pagination/style/bordered.js
generated
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _cssinjs = require("@ant-design/cssinjs");
|
||||
var _ = require(".");
|
||||
var _internal = require("../../theme/internal");
|
||||
const genBorderedStyle = token => {
|
||||
const {
|
||||
componentCls
|
||||
} = token;
|
||||
return {
|
||||
[`${componentCls}${componentCls}-bordered${componentCls}-disabled:not(${componentCls}-mini)`]: {
|
||||
'&, &:hover': {
|
||||
[`${componentCls}-item-link`]: {
|
||||
borderColor: token.colorBorder
|
||||
}
|
||||
},
|
||||
'&:focus-visible': {
|
||||
[`${componentCls}-item-link`]: {
|
||||
borderColor: token.colorBorder
|
||||
}
|
||||
},
|
||||
[`${componentCls}-item, ${componentCls}-item-link`]: {
|
||||
backgroundColor: token.colorBgContainerDisabled,
|
||||
borderColor: token.colorBorder,
|
||||
[`&:hover:not(${componentCls}-item-active)`]: {
|
||||
backgroundColor: token.colorBgContainerDisabled,
|
||||
borderColor: token.colorBorder,
|
||||
a: {
|
||||
color: token.colorTextDisabled
|
||||
}
|
||||
},
|
||||
[`&${componentCls}-item-active`]: {
|
||||
backgroundColor: token.itemActiveBgDisabled
|
||||
}
|
||||
},
|
||||
[`${componentCls}-prev, ${componentCls}-next`]: {
|
||||
'&:hover button': {
|
||||
backgroundColor: token.colorBgContainerDisabled,
|
||||
borderColor: token.colorBorder,
|
||||
color: token.colorTextDisabled
|
||||
},
|
||||
[`${componentCls}-item-link`]: {
|
||||
backgroundColor: token.colorBgContainerDisabled,
|
||||
borderColor: token.colorBorder
|
||||
}
|
||||
}
|
||||
},
|
||||
[`${componentCls}${componentCls}-bordered:not(${componentCls}-mini)`]: {
|
||||
[`${componentCls}-prev, ${componentCls}-next`]: {
|
||||
'&:hover button': {
|
||||
borderColor: token.colorPrimaryHover,
|
||||
backgroundColor: token.itemBg
|
||||
},
|
||||
[`${componentCls}-item-link`]: {
|
||||
backgroundColor: token.itemLinkBg,
|
||||
borderColor: token.colorBorder
|
||||
},
|
||||
[`&:hover ${componentCls}-item-link`]: {
|
||||
borderColor: token.colorPrimary,
|
||||
backgroundColor: token.itemBg,
|
||||
color: token.colorPrimary
|
||||
},
|
||||
[`&${componentCls}-disabled`]: {
|
||||
[`${componentCls}-item-link`]: {
|
||||
borderColor: token.colorBorder,
|
||||
color: token.colorTextDisabled
|
||||
}
|
||||
}
|
||||
},
|
||||
[`${componentCls}-item`]: {
|
||||
backgroundColor: token.itemBg,
|
||||
border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
|
||||
[`&:hover:not(${componentCls}-item-active)`]: {
|
||||
borderColor: token.colorPrimary,
|
||||
backgroundColor: token.itemBg,
|
||||
a: {
|
||||
color: token.colorPrimary
|
||||
}
|
||||
},
|
||||
'&-active': {
|
||||
borderColor: token.colorPrimary
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
var _default = exports.default = (0, _internal.genSubStyleComponent)(['Pagination', 'bordered'], token => {
|
||||
const paginationToken = (0, _.prepareToken)(token);
|
||||
return genBorderedStyle(paginationToken);
|
||||
}, _.prepareComponentToken);
|
||||
114
frontend/node_modules/antd/lib/pagination/style/index.d.ts
generated
vendored
Normal file
114
frontend/node_modules/antd/lib/pagination/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
import type { SharedComponentToken, SharedInputToken } from '../../input/style/token';
|
||||
import type { FullToken, GenStyleFn, GetDefaultToken } from '../../theme/internal';
|
||||
export interface ComponentToken {
|
||||
/**
|
||||
* @desc 页码选项背景色
|
||||
* @descEN Background color of Pagination item
|
||||
*/
|
||||
itemBg: string;
|
||||
/**
|
||||
* @desc 页码尺寸
|
||||
* @descEN Size of Pagination item
|
||||
*/
|
||||
itemSize: number;
|
||||
/**
|
||||
* @desc 页码激活态背景色
|
||||
* @descEN Background color of active Pagination item
|
||||
*/
|
||||
itemActiveBg: string;
|
||||
/**
|
||||
* @desc 页码激活态文字颜色
|
||||
* @descEN Text color of active Pagination item
|
||||
*/
|
||||
itemActiveColor: string;
|
||||
/**
|
||||
* @desc 页码激活态文字颜色悬停态
|
||||
* @descEN Text color of active Pagination item hover
|
||||
*/
|
||||
itemActiveColorHover: string;
|
||||
/**
|
||||
* @desc 小号页码尺寸
|
||||
* @descEN Size of small Pagination item
|
||||
*/
|
||||
itemSizeSM: number;
|
||||
/**
|
||||
* @desc 页码链接背景色
|
||||
* @descEN Background color of Pagination item link
|
||||
*/
|
||||
itemLinkBg: string;
|
||||
/**
|
||||
* @desc 页码激活态禁用状态背景色
|
||||
* @descEN Background color of disabled active Pagination item
|
||||
*/
|
||||
itemActiveBgDisabled: string;
|
||||
/**
|
||||
* @desc 页码激活态禁用状态文字颜色
|
||||
* @descEN Text color of disabled active Pagination item
|
||||
*/
|
||||
itemActiveColorDisabled: string;
|
||||
/**
|
||||
* @desc 输入框背景色
|
||||
* @descEN Background color of input
|
||||
*/
|
||||
itemInputBg: string;
|
||||
/**
|
||||
* @desc 每页展示数量选择器 top
|
||||
* @descEN Top of Pagination size changer
|
||||
*/
|
||||
miniOptionsSizeChangerTop: number;
|
||||
}
|
||||
/**
|
||||
* @desc Pagination 组件的 Token
|
||||
* @descEN Token for Pagination component
|
||||
*/
|
||||
export interface PaginationToken extends FullToken<'Pagination'>, SharedComponentToken, SharedInputToken {
|
||||
/**
|
||||
* @desc 输入框轮廓偏移量
|
||||
* @descEN Outline offset of input
|
||||
*/
|
||||
inputOutlineOffset: number;
|
||||
/**
|
||||
* @desc 快速跳转输入框宽度
|
||||
* @descEN Width of quick jumper input
|
||||
*/
|
||||
quickJumperInputWidth: number | string;
|
||||
/**
|
||||
* @desc 迷你选项横向外边距
|
||||
* @descEN Horizontal margin of mini options
|
||||
*/
|
||||
paginationMiniOptionsMarginInlineStart: number | string;
|
||||
/**
|
||||
* @desc 迷你快速跳转输入框宽度
|
||||
* @descEN Width of mini quick jumper input
|
||||
*/
|
||||
paginationMiniQuickJumperInputWidth: number | string;
|
||||
/**
|
||||
* @desc 页码横向内边距
|
||||
* @descEN Horizontal padding of Pagination item
|
||||
*/
|
||||
paginationItemPaddingInline: number | string;
|
||||
/**
|
||||
* @desc 省略号字母间距
|
||||
* @descEN Letter spacing of ellipsis
|
||||
*/
|
||||
paginationEllipsisLetterSpacing: number | string;
|
||||
/**
|
||||
* @desc 省略号文本缩进
|
||||
* @descEN Text indent of ellipsis
|
||||
*/
|
||||
paginationEllipsisTextIndent: string;
|
||||
/**
|
||||
* @desc 斜杠横向外边距
|
||||
* @descEN Horizontal margin of slash
|
||||
*/
|
||||
paginationSlashMarginInlineStart: number;
|
||||
/**
|
||||
* @desc 斜杠横向外边距
|
||||
* @descEN Horizontal margin of slash
|
||||
*/
|
||||
paginationSlashMarginInlineEnd: number;
|
||||
}
|
||||
export declare const prepareComponentToken: GetDefaultToken<'Pagination'>;
|
||||
export declare const prepareToken: (token: Parameters<GenStyleFn<"Pagination">>[0]) => PaginationToken;
|
||||
declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
|
||||
export default _default;
|
||||
548
frontend/node_modules/antd/lib/pagination/style/index.js
generated
vendored
Normal file
548
frontend/node_modules/antd/lib/pagination/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,548 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.prepareToken = exports.prepareComponentToken = exports.default = void 0;
|
||||
var _cssinjs = require("@ant-design/cssinjs");
|
||||
var _style = require("../../input/style");
|
||||
var _variants = require("../../input/style/variants");
|
||||
var _style2 = require("../../style");
|
||||
var _internal = require("../../theme/internal");
|
||||
const genPaginationDisabledStyle = token => {
|
||||
const {
|
||||
componentCls
|
||||
} = token;
|
||||
return {
|
||||
[`${componentCls}-disabled`]: {
|
||||
'&, &:hover': {
|
||||
cursor: 'not-allowed',
|
||||
[`${componentCls}-item-link`]: {
|
||||
color: token.colorTextDisabled,
|
||||
cursor: 'not-allowed'
|
||||
}
|
||||
},
|
||||
'&:focus-visible': {
|
||||
cursor: 'not-allowed',
|
||||
[`${componentCls}-item-link`]: {
|
||||
color: token.colorTextDisabled,
|
||||
cursor: 'not-allowed'
|
||||
}
|
||||
}
|
||||
},
|
||||
[`&${componentCls}-disabled`]: {
|
||||
cursor: 'not-allowed',
|
||||
[`${componentCls}-item`]: {
|
||||
cursor: 'not-allowed',
|
||||
backgroundColor: 'transparent',
|
||||
'&:hover, &:active': {
|
||||
backgroundColor: 'transparent'
|
||||
},
|
||||
a: {
|
||||
color: token.colorTextDisabled,
|
||||
backgroundColor: 'transparent',
|
||||
border: 'none',
|
||||
cursor: 'not-allowed'
|
||||
},
|
||||
'&-active': {
|
||||
borderColor: token.colorBorder,
|
||||
backgroundColor: token.itemActiveBgDisabled,
|
||||
'&:hover, &:active': {
|
||||
backgroundColor: token.itemActiveBgDisabled
|
||||
},
|
||||
a: {
|
||||
color: token.itemActiveColorDisabled
|
||||
}
|
||||
}
|
||||
},
|
||||
[`${componentCls}-item-link`]: {
|
||||
color: token.colorTextDisabled,
|
||||
cursor: 'not-allowed',
|
||||
'&:hover, &:active': {
|
||||
backgroundColor: 'transparent'
|
||||
},
|
||||
[`${componentCls}-simple&`]: {
|
||||
backgroundColor: 'transparent',
|
||||
'&:hover, &:active': {
|
||||
backgroundColor: 'transparent'
|
||||
}
|
||||
}
|
||||
},
|
||||
[`${componentCls}-simple-pager`]: {
|
||||
color: token.colorTextDisabled
|
||||
},
|
||||
[`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
|
||||
[`${componentCls}-item-link-icon`]: {
|
||||
opacity: 0
|
||||
},
|
||||
[`${componentCls}-item-ellipsis`]: {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
const genPaginationMiniStyle = token => {
|
||||
const {
|
||||
componentCls
|
||||
} = token;
|
||||
return {
|
||||
[`&${componentCls}-mini ${componentCls}-total-text, &${componentCls}-mini ${componentCls}-simple-pager`]: {
|
||||
height: token.itemSizeSM,
|
||||
lineHeight: (0, _cssinjs.unit)(token.itemSizeSM)
|
||||
},
|
||||
[`&${componentCls}-mini ${componentCls}-item`]: {
|
||||
minWidth: token.itemSizeSM,
|
||||
height: token.itemSizeSM,
|
||||
margin: 0,
|
||||
lineHeight: (0, _cssinjs.unit)(token.calc(token.itemSizeSM).sub(2).equal())
|
||||
},
|
||||
[`&${componentCls}-mini ${componentCls}-prev, &${componentCls}-mini ${componentCls}-next`]: {
|
||||
minWidth: token.itemSizeSM,
|
||||
height: token.itemSizeSM,
|
||||
margin: 0,
|
||||
lineHeight: (0, _cssinjs.unit)(token.itemSizeSM)
|
||||
},
|
||||
[`&${componentCls}-mini:not(${componentCls}-disabled)`]: {
|
||||
[`${componentCls}-prev, ${componentCls}-next`]: {
|
||||
[`&:hover ${componentCls}-item-link`]: {
|
||||
backgroundColor: token.colorBgTextHover
|
||||
},
|
||||
[`&:active ${componentCls}-item-link`]: {
|
||||
backgroundColor: token.colorBgTextActive
|
||||
},
|
||||
[`&${componentCls}-disabled:hover ${componentCls}-item-link`]: {
|
||||
backgroundColor: 'transparent'
|
||||
}
|
||||
}
|
||||
},
|
||||
[`
|
||||
&${componentCls}-mini ${componentCls}-prev ${componentCls}-item-link,
|
||||
&${componentCls}-mini ${componentCls}-next ${componentCls}-item-link
|
||||
`]: {
|
||||
backgroundColor: 'transparent',
|
||||
borderColor: 'transparent',
|
||||
'&::after': {
|
||||
height: token.itemSizeSM,
|
||||
lineHeight: (0, _cssinjs.unit)(token.itemSizeSM)
|
||||
}
|
||||
},
|
||||
[`&${componentCls}-mini ${componentCls}-jump-prev, &${componentCls}-mini ${componentCls}-jump-next`]: {
|
||||
height: token.itemSizeSM,
|
||||
marginInlineEnd: 0,
|
||||
lineHeight: (0, _cssinjs.unit)(token.itemSizeSM)
|
||||
},
|
||||
[`&${componentCls}-mini ${componentCls}-options`]: {
|
||||
marginInlineStart: token.paginationMiniOptionsMarginInlineStart,
|
||||
'&-size-changer': {
|
||||
top: token.miniOptionsSizeChangerTop
|
||||
},
|
||||
'&-quick-jumper': {
|
||||
height: token.itemSizeSM,
|
||||
lineHeight: (0, _cssinjs.unit)(token.itemSizeSM),
|
||||
input: Object.assign(Object.assign({}, (0, _style.genInputSmallStyle)(token)), {
|
||||
width: token.paginationMiniQuickJumperInputWidth,
|
||||
height: token.controlHeightSM
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
const genPaginationSimpleStyle = token => {
|
||||
const {
|
||||
componentCls
|
||||
} = token;
|
||||
return {
|
||||
[`&${componentCls}-simple`]: {
|
||||
[`${componentCls}-prev, ${componentCls}-next`]: {
|
||||
height: token.itemSize,
|
||||
lineHeight: (0, _cssinjs.unit)(token.itemSize),
|
||||
verticalAlign: 'top',
|
||||
[`${componentCls}-item-link`]: {
|
||||
height: token.itemSize,
|
||||
backgroundColor: 'transparent',
|
||||
border: 0,
|
||||
'&:hover': {
|
||||
backgroundColor: token.colorBgTextHover
|
||||
},
|
||||
'&:active': {
|
||||
backgroundColor: token.colorBgTextActive
|
||||
},
|
||||
'&::after': {
|
||||
height: token.itemSize,
|
||||
lineHeight: (0, _cssinjs.unit)(token.itemSize)
|
||||
}
|
||||
}
|
||||
},
|
||||
[`${componentCls}-simple-pager`]: {
|
||||
display: 'inline-flex',
|
||||
alignItems: 'center',
|
||||
height: token.itemSize,
|
||||
marginInlineEnd: token.marginXS,
|
||||
input: {
|
||||
boxSizing: 'border-box',
|
||||
height: '100%',
|
||||
width: token.quickJumperInputWidth,
|
||||
padding: `0 ${(0, _cssinjs.unit)(token.paginationItemPaddingInline)}`,
|
||||
textAlign: 'center',
|
||||
backgroundColor: token.itemInputBg,
|
||||
border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
|
||||
borderRadius: token.borderRadius,
|
||||
outline: 'none',
|
||||
transition: `border-color ${token.motionDurationMid}`,
|
||||
color: 'inherit',
|
||||
'&:hover': {
|
||||
borderColor: token.colorPrimary
|
||||
},
|
||||
'&:focus': {
|
||||
borderColor: token.colorPrimaryHover,
|
||||
boxShadow: `${(0, _cssinjs.unit)(token.inputOutlineOffset)} 0 ${(0, _cssinjs.unit)(token.controlOutlineWidth)} ${token.controlOutline}`
|
||||
},
|
||||
'&[disabled]': {
|
||||
color: token.colorTextDisabled,
|
||||
backgroundColor: token.colorBgContainerDisabled,
|
||||
borderColor: token.colorBorder,
|
||||
cursor: 'not-allowed'
|
||||
}
|
||||
}
|
||||
},
|
||||
[`&${componentCls}-disabled`]: {
|
||||
[`${componentCls}-prev, ${componentCls}-next`]: {
|
||||
[`${componentCls}-item-link`]: {
|
||||
'&:hover, &:active': {
|
||||
backgroundColor: 'transparent'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
[`&${componentCls}-mini`]: {
|
||||
[`${componentCls}-prev, ${componentCls}-next`]: {
|
||||
height: token.itemSizeSM,
|
||||
lineHeight: (0, _cssinjs.unit)(token.itemSizeSM),
|
||||
[`${componentCls}-item-link`]: {
|
||||
height: token.itemSizeSM,
|
||||
'&::after': {
|
||||
height: token.itemSizeSM,
|
||||
lineHeight: (0, _cssinjs.unit)(token.itemSizeSM)
|
||||
}
|
||||
}
|
||||
},
|
||||
[`${componentCls}-simple-pager`]: {
|
||||
height: token.itemSizeSM,
|
||||
input: {
|
||||
width: token.paginationMiniQuickJumperInputWidth
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
const genPaginationJumpStyle = token => {
|
||||
const {
|
||||
componentCls
|
||||
} = token;
|
||||
return {
|
||||
[`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
|
||||
outline: 0,
|
||||
[`${componentCls}-item-container`]: {
|
||||
position: 'relative',
|
||||
[`${componentCls}-item-link-icon`]: {
|
||||
color: token.colorPrimary,
|
||||
fontSize: token.fontSizeSM,
|
||||
opacity: 0,
|
||||
transition: `all ${token.motionDurationMid}`,
|
||||
'&-svg': {
|
||||
top: 0,
|
||||
insetInlineEnd: 0,
|
||||
bottom: 0,
|
||||
insetInlineStart: 0,
|
||||
margin: 'auto'
|
||||
}
|
||||
},
|
||||
[`${componentCls}-item-ellipsis`]: {
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
insetInlineEnd: 0,
|
||||
bottom: 0,
|
||||
insetInlineStart: 0,
|
||||
display: 'block',
|
||||
margin: 'auto',
|
||||
color: token.colorTextDisabled,
|
||||
letterSpacing: token.paginationEllipsisLetterSpacing,
|
||||
textAlign: 'center',
|
||||
textIndent: token.paginationEllipsisTextIndent,
|
||||
opacity: 1,
|
||||
transition: `all ${token.motionDurationMid}`
|
||||
}
|
||||
},
|
||||
'&:hover': {
|
||||
[`${componentCls}-item-link-icon`]: {
|
||||
opacity: 1
|
||||
},
|
||||
[`${componentCls}-item-ellipsis`]: {
|
||||
opacity: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
[`
|
||||
${componentCls}-prev,
|
||||
${componentCls}-jump-prev,
|
||||
${componentCls}-jump-next
|
||||
`]: {
|
||||
marginInlineEnd: token.marginXS
|
||||
},
|
||||
[`
|
||||
${componentCls}-prev,
|
||||
${componentCls}-next,
|
||||
${componentCls}-jump-prev,
|
||||
${componentCls}-jump-next
|
||||
`]: {
|
||||
display: 'inline-block',
|
||||
minWidth: token.itemSize,
|
||||
height: token.itemSize,
|
||||
color: token.colorText,
|
||||
fontFamily: token.fontFamily,
|
||||
lineHeight: (0, _cssinjs.unit)(token.itemSize),
|
||||
textAlign: 'center',
|
||||
verticalAlign: 'middle',
|
||||
listStyle: 'none',
|
||||
borderRadius: token.borderRadius,
|
||||
cursor: 'pointer',
|
||||
transition: `all ${token.motionDurationMid}`
|
||||
},
|
||||
[`${componentCls}-prev, ${componentCls}-next`]: {
|
||||
outline: 0,
|
||||
button: {
|
||||
color: token.colorText,
|
||||
cursor: 'pointer',
|
||||
userSelect: 'none'
|
||||
},
|
||||
[`${componentCls}-item-link`]: {
|
||||
display: 'block',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
padding: 0,
|
||||
fontSize: token.fontSizeSM,
|
||||
textAlign: 'center',
|
||||
backgroundColor: 'transparent',
|
||||
border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,
|
||||
borderRadius: token.borderRadius,
|
||||
outline: 'none',
|
||||
transition: `all ${token.motionDurationMid}`
|
||||
},
|
||||
[`&:hover ${componentCls}-item-link`]: {
|
||||
backgroundColor: token.colorBgTextHover
|
||||
},
|
||||
[`&:active ${componentCls}-item-link`]: {
|
||||
backgroundColor: token.colorBgTextActive
|
||||
},
|
||||
[`&${componentCls}-disabled:hover`]: {
|
||||
[`${componentCls}-item-link`]: {
|
||||
backgroundColor: 'transparent'
|
||||
}
|
||||
}
|
||||
},
|
||||
[`${componentCls}-slash`]: {
|
||||
marginInlineEnd: token.paginationSlashMarginInlineEnd,
|
||||
marginInlineStart: token.paginationSlashMarginInlineStart
|
||||
},
|
||||
[`${componentCls}-options`]: {
|
||||
display: 'inline-block',
|
||||
marginInlineStart: token.margin,
|
||||
verticalAlign: 'middle',
|
||||
'&-size-changer': {
|
||||
display: 'inline-block',
|
||||
width: 'auto'
|
||||
},
|
||||
'&-quick-jumper': {
|
||||
display: 'inline-block',
|
||||
height: token.controlHeight,
|
||||
marginInlineStart: token.marginXS,
|
||||
lineHeight: (0, _cssinjs.unit)(token.controlHeight),
|
||||
verticalAlign: 'top',
|
||||
input: Object.assign(Object.assign(Object.assign({}, (0, _style.genBasicInputStyle)(token)), (0, _variants.genBaseOutlinedStyle)(token, {
|
||||
borderColor: token.colorBorder,
|
||||
hoverBorderColor: token.colorPrimaryHover,
|
||||
activeBorderColor: token.colorPrimary,
|
||||
activeShadow: token.activeShadow
|
||||
})), {
|
||||
'&[disabled]': Object.assign({}, (0, _variants.genDisabledStyle)(token)),
|
||||
width: token.quickJumperInputWidth,
|
||||
height: token.controlHeight,
|
||||
boxSizing: 'border-box',
|
||||
margin: 0,
|
||||
marginInlineStart: token.marginXS,
|
||||
marginInlineEnd: token.marginXS
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
const genPaginationItemStyle = token => {
|
||||
const {
|
||||
componentCls
|
||||
} = token;
|
||||
return {
|
||||
[`${componentCls}-item`]: {
|
||||
display: 'inline-block',
|
||||
minWidth: token.itemSize,
|
||||
height: token.itemSize,
|
||||
marginInlineEnd: token.marginXS,
|
||||
fontFamily: token.fontFamily,
|
||||
lineHeight: (0, _cssinjs.unit)(token.calc(token.itemSize).sub(2).equal()),
|
||||
textAlign: 'center',
|
||||
verticalAlign: 'middle',
|
||||
listStyle: 'none',
|
||||
backgroundColor: token.itemBg,
|
||||
border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,
|
||||
borderRadius: token.borderRadius,
|
||||
outline: 0,
|
||||
cursor: 'pointer',
|
||||
userSelect: 'none',
|
||||
a: {
|
||||
display: 'block',
|
||||
padding: `0 ${(0, _cssinjs.unit)(token.paginationItemPaddingInline)}`,
|
||||
color: token.colorText,
|
||||
'&:hover': {
|
||||
textDecoration: 'none'
|
||||
}
|
||||
},
|
||||
[`&:not(${componentCls}-item-active)`]: {
|
||||
'&:hover': {
|
||||
transition: `all ${token.motionDurationMid}`,
|
||||
backgroundColor: token.colorBgTextHover
|
||||
},
|
||||
'&:active': {
|
||||
backgroundColor: token.colorBgTextActive
|
||||
}
|
||||
},
|
||||
'&-active': {
|
||||
fontWeight: token.fontWeightStrong,
|
||||
backgroundColor: token.itemActiveBg,
|
||||
borderColor: token.colorPrimary,
|
||||
a: {
|
||||
color: token.itemActiveColor
|
||||
},
|
||||
'&:hover': {
|
||||
borderColor: token.colorPrimaryHover
|
||||
},
|
||||
'&:hover a': {
|
||||
color: token.itemActiveColorHover
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
const genPaginationStyle = token => {
|
||||
const {
|
||||
componentCls
|
||||
} = token;
|
||||
return {
|
||||
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), {
|
||||
display: 'flex',
|
||||
flexWrap: 'wrap',
|
||||
rowGap: token.paddingXS,
|
||||
'&-start': {
|
||||
justifyContent: 'start'
|
||||
},
|
||||
'&-center': {
|
||||
justifyContent: 'center'
|
||||
},
|
||||
'&-end': {
|
||||
justifyContent: 'end'
|
||||
},
|
||||
'ul, ol': {
|
||||
margin: 0,
|
||||
padding: 0,
|
||||
listStyle: 'none'
|
||||
},
|
||||
'&::after': {
|
||||
display: 'block',
|
||||
clear: 'both',
|
||||
height: 0,
|
||||
overflow: 'hidden',
|
||||
visibility: 'hidden',
|
||||
content: '""'
|
||||
},
|
||||
[`${componentCls}-total-text`]: {
|
||||
display: 'inline-block',
|
||||
height: token.itemSize,
|
||||
marginInlineEnd: token.marginXS,
|
||||
lineHeight: (0, _cssinjs.unit)(token.calc(token.itemSize).sub(2).equal()),
|
||||
verticalAlign: 'middle'
|
||||
}
|
||||
}), genPaginationItemStyle(token)), genPaginationJumpStyle(token)), genPaginationSimpleStyle(token)), genPaginationMiniStyle(token)), genPaginationDisabledStyle(token)), {
|
||||
// media query style
|
||||
[`@media only screen and (max-width: ${token.screenLG}px)`]: {
|
||||
[`${componentCls}-item`]: {
|
||||
'&-after-jump-prev, &-before-jump-next': {
|
||||
display: 'none'
|
||||
}
|
||||
}
|
||||
},
|
||||
[`@media only screen and (max-width: ${token.screenSM}px)`]: {
|
||||
[`${componentCls}-options`]: {
|
||||
display: 'none'
|
||||
}
|
||||
}
|
||||
}),
|
||||
// rtl style
|
||||
[`&${token.componentCls}-rtl`]: {
|
||||
direction: 'rtl'
|
||||
}
|
||||
};
|
||||
};
|
||||
const genPaginationFocusStyle = token => {
|
||||
const {
|
||||
componentCls
|
||||
} = token;
|
||||
return {
|
||||
[`${componentCls}:not(${componentCls}-disabled)`]: {
|
||||
[`${componentCls}-item`]: Object.assign({}, (0, _style2.genFocusStyle)(token)),
|
||||
[`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
|
||||
'&:focus-visible': Object.assign({
|
||||
[`${componentCls}-item-link-icon`]: {
|
||||
opacity: 1
|
||||
},
|
||||
[`${componentCls}-item-ellipsis`]: {
|
||||
opacity: 0
|
||||
}
|
||||
}, (0, _style2.genFocusOutline)(token))
|
||||
},
|
||||
[`${componentCls}-prev, ${componentCls}-next`]: {
|
||||
[`&:focus-visible ${componentCls}-item-link`]: (0, _style2.genFocusOutline)(token)
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
const prepareComponentToken = token => Object.assign({
|
||||
itemBg: token.colorBgContainer,
|
||||
itemSize: token.controlHeight,
|
||||
itemSizeSM: token.controlHeightSM,
|
||||
itemActiveBg: token.colorBgContainer,
|
||||
itemActiveColor: token.colorPrimary,
|
||||
itemActiveColorHover: token.colorPrimaryHover,
|
||||
itemLinkBg: token.colorBgContainer,
|
||||
itemActiveColorDisabled: token.colorTextDisabled,
|
||||
itemActiveBgDisabled: token.controlItemBgActiveDisabled,
|
||||
itemInputBg: token.colorBgContainer,
|
||||
miniOptionsSizeChangerTop: 0
|
||||
}, (0, _style.initComponentToken)(token));
|
||||
exports.prepareComponentToken = prepareComponentToken;
|
||||
const prepareToken = token => (0, _internal.mergeToken)(token, {
|
||||
inputOutlineOffset: 0,
|
||||
quickJumperInputWidth: token.calc(token.controlHeightLG).mul(1.25).equal(),
|
||||
paginationMiniOptionsMarginInlineStart: token.calc(token.marginXXS).div(2).equal(),
|
||||
paginationMiniQuickJumperInputWidth: token.calc(token.controlHeightLG).mul(1.1).equal(),
|
||||
paginationItemPaddingInline: token.calc(token.marginXXS).mul(1.5).equal(),
|
||||
paginationEllipsisLetterSpacing: token.calc(token.marginXXS).div(2).equal(),
|
||||
paginationSlashMarginInlineStart: token.marginSM,
|
||||
paginationSlashMarginInlineEnd: token.marginSM,
|
||||
paginationEllipsisTextIndent: '0.13em' // magic for ui experience
|
||||
}, (0, _style.initInputToken)(token));
|
||||
// ============================== Export ==============================
|
||||
exports.prepareToken = prepareToken;
|
||||
var _default = exports.default = (0, _internal.genStyleHooks)('Pagination', token => {
|
||||
const paginationToken = prepareToken(token);
|
||||
return [genPaginationStyle(paginationToken), genPaginationFocusStyle(paginationToken)];
|
||||
}, prepareComponentToken);
|
||||
3
frontend/node_modules/antd/lib/pagination/useShowSizeChanger.d.ts
generated
vendored
Normal file
3
frontend/node_modules/antd/lib/pagination/useShowSizeChanger.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { PaginationProps } from '.';
|
||||
import type { SelectProps } from '../select';
|
||||
export default function useShowSizeChanger(showSizeChanger?: PaginationProps['showSizeChanger']): [show: boolean | undefined, selectProps: SelectProps<any, import("rc-select/lib/Select").DefaultOptionType> | undefined];
|
||||
18
frontend/node_modules/antd/lib/pagination/useShowSizeChanger.js
generated
vendored
Normal file
18
frontend/node_modules/antd/lib/pagination/useShowSizeChanger.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = useShowSizeChanger;
|
||||
var _react = require("react");
|
||||
function useShowSizeChanger(showSizeChanger) {
|
||||
return (0, _react.useMemo)(() => {
|
||||
if (typeof showSizeChanger === 'boolean') {
|
||||
return [showSizeChanger, {}];
|
||||
}
|
||||
if (showSizeChanger && typeof showSizeChanger === 'object') {
|
||||
return [true, showSizeChanger];
|
||||
}
|
||||
return [undefined, undefined];
|
||||
}, [showSizeChanger]);
|
||||
}
|
||||
Reference in New Issue
Block a user