Update from Vibe Studio

This commit is contained in:
Vibe Studio
2026-01-09 14:52:46 +00:00
parent 42a0efe70b
commit 47fa6d98b2
28661 changed files with 2421771 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import React from 'react';
export type ProCardActionsProps = {
/**
* 自定义前缀
*
* @ignore
*/
prefixCls?: string;
/** 操作按钮 */
actions?: React.ReactNode[] | React.ReactNode;
};
declare const ProCardActions: React.FC<ProCardActionsProps>;
export default ProCardActions;

View File

@@ -0,0 +1,43 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _classnames = _interopRequireDefault(require("classnames"));
var _react = _interopRequireDefault(require("react"));
var _style = _interopRequireDefault(require("./style"));
var _jsxRuntime = require("react/jsx-runtime");
var ProCardActions = function ProCardActions(props) {
var actions = props.actions,
prefixCls = props.prefixCls;
var _useStyle = (0, _style.default)(prefixCls),
wrapSSR = _useStyle.wrapSSR,
hashId = _useStyle.hashId;
if (Array.isArray(actions) && actions !== null && actions !== void 0 && actions.length) {
return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
className: (0, _classnames.default)("".concat(prefixCls, "-actions"), hashId),
children: actions.map(function (action, index) {
return (
/*#__PURE__*/
// eslint-disable-next-line react/no-array-index-key
(0, _jsxRuntime.jsx)("li", {
style: {
width: "".concat(100 / actions.length, "%"),
padding: 0,
margin: 0
},
className: (0, _classnames.default)("".concat(prefixCls, "-actions-item"), hashId),
children: action
}, "action-".concat(index))
);
})
}));
}
return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
className: (0, _classnames.default)("".concat(prefixCls, "-actions"), hashId),
children: actions
}));
};
var _default = exports.default = ProCardActions;

View File

@@ -0,0 +1,5 @@
/// <reference types="react" />
export default function useStyle(prefixCls?: string): {
wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
hashId: string;
};

View File

@@ -0,0 +1,87 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = useStyle;
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _proProvider = require("@ant-design/pro-provider");
var genActionsStyle = function genActionsStyle(token) {
var componentCls = token.componentCls,
antCls = token.antCls;
return (0, _defineProperty2.default)({}, "".concat(componentCls, "-actions"), (0, _defineProperty2.default)((0, _defineProperty2.default)({
marginBlock: 0,
marginInline: 0,
paddingBlock: 0,
paddingInline: 0,
listStyle: 'none',
display: 'flex',
gap: token.marginXS,
background: token.colorBgContainer,
borderBlockStart: "".concat(token.lineWidth, "px ").concat(token.lineType, " ").concat(token.colorSplit),
minHeight: 42
}, "& > *", {
alignItems: 'center',
justifyContent: 'center',
flex: 1,
display: 'flex',
cursor: 'pointer',
color: token.colorTextSecondary,
transition: 'color 0.3s',
'&:hover': {
color: token.colorPrimaryHover
}
}), "& > li > div", {
flex: 1,
width: '100%',
marginBlock: token.marginSM,
marginInline: 0,
color: token.colorTextSecondary,
textAlign: 'center',
a: {
color: token.colorTextSecondary,
transition: 'color 0.3s',
'&:hover': {
color: token.colorPrimaryHover
}
},
div: (0, _defineProperty2.default)((0, _defineProperty2.default)({
position: 'relative',
display: 'block',
minWidth: 32,
fontSize: token.fontSize,
lineHeight: token.lineHeight,
cursor: 'pointer',
'&:hover': {
color: token.colorPrimaryHover,
transition: 'color 0.3s'
}
}, "a:not(".concat(antCls, "-btn),\n > .anticon"), {
display: 'inline-block',
width: '100%',
color: token.colorTextSecondary,
lineHeight: '22px',
transition: 'color 0.3s',
'&:hover': {
color: token.colorPrimaryHover
}
}), '.anticon', {
fontSize: token.cardActionIconSize,
lineHeight: '22px'
}),
'&:not(:last-child)': {
borderInlineEnd: "".concat(token.lineWidth, "px ").concat(token.lineType, " ").concat(token.colorSplit)
}
}));
};
function useStyle(prefixCls) {
return (0, _proProvider.useStyle)('ProCardActions', function (token) {
var proCardActionsToken = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, token), {}, {
componentCls: ".".concat(prefixCls),
cardActionIconSize: 16
});
return [genActionsStyle(proCardActionsToken)];
});
}