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,18 @@
import type { CSSProperties } from 'react';
import React from 'react';
import type { PureSettings } from '../../defaultSettings';
type GridContentProps = {
contentWidth?: PureSettings['contentWidth'];
children: React.ReactNode;
className?: string;
style?: CSSProperties;
prefixCls?: string;
};
/**
* This component can support contentWidth so you don't need to calculate the width
* contentWidth=Fixed, width will is 1200
*
* @param props
*/
declare const GridContent: React.FC<GridContentProps>;
export { GridContent };

View File

@@ -0,0 +1,38 @@
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import { ConfigProvider } from 'antd';
import classNames from 'classnames';
import React, { useContext } from 'react';
import { RouteContext } from "../../context/RouteContext";
import { useStyle } from "./style";
import { jsx as _jsx } from "react/jsx-runtime";
/**
* This component can support contentWidth so you don't need to calculate the width
* contentWidth=Fixed, width will is 1200
*
* @param props
*/
var GridContent = function GridContent(props) {
var value = useContext(RouteContext);
var children = props.children,
propsContentWidth = props.contentWidth,
propsClassName = props.className,
style = props.style;
var _useContext = useContext(ConfigProvider.ConfigContext),
getPrefixCls = _useContext.getPrefixCls;
var prefixCls = props.prefixCls || getPrefixCls('pro');
var contentWidth = propsContentWidth || value.contentWidth;
var className = "".concat(prefixCls, "-grid-content");
var _useStyle = useStyle(className),
wrapSSR = _useStyle.wrapSSR,
hashId = _useStyle.hashId;
var isWide = contentWidth === 'Fixed' && value.layout === 'top';
return wrapSSR( /*#__PURE__*/_jsx("div", {
className: classNames(className, hashId, propsClassName, _defineProperty({}, "".concat(className, "-wide"), isWide)),
style: style,
children: /*#__PURE__*/_jsx("div", {
className: "".concat(prefixCls, "-grid-content-children ").concat(hashId).trim(),
children: children
})
}));
};
export { GridContent };

View File

@@ -0,0 +1,9 @@
/// <reference types="react" />
import type { ProAliasToken } from '@ant-design/pro-provider';
export interface GridContentToken extends ProAliasToken {
componentCls: string;
}
export declare 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,20 @@
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import { useStyle as useAntdStyle } from '@ant-design/pro-provider';
var genGridContentStyle = function genGridContentStyle(token) {
return _defineProperty({}, token.componentCls, {
width: '100%',
'&-wide': {
maxWidth: 1152,
margin: '0 auto'
}
});
};
export function useStyle(prefixCls) {
return useAntdStyle('ProLayoutGridContent', function (token) {
var GridContentToken = _objectSpread(_objectSpread({}, token), {}, {
componentCls: ".".concat(prefixCls)
});
return [genGridContentStyle(GridContentToken)];
});
}