@jiovan-labs/ant-buddy-pro 2.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,7 +45,7 @@ export type AvatarUploadProps = Omit<ProFormFieldItemProps, 'children' | 'fieldR
45
45
  locale?: string;
46
46
  localeProps?: IntlLocaleProps;
47
47
  };
48
- export declare const AvatarUpload: React.ForwardRefExoticComponent<Omit<ProFormFieldItemProps, "disabled" | "placeholder" | "children" | "fieldProps" | "fieldRef" | "readonly"> & {
48
+ export declare const AvatarUpload: React.ForwardRefExoticComponent<Omit<ProFormFieldItemProps, "children" | "disabled" | "fieldProps" | "placeholder" | "readonly" | "fieldRef"> & {
49
49
  clazzPrefix?: string | undefined;
50
50
  containerClazz?: string | undefined;
51
51
  containerStyle?: React.CSSProperties | undefined;
@@ -53,8 +53,8 @@ export declare const AvatarUpload: React.ForwardRefExoticComponent<Omit<ProFormF
53
53
  imageSrc?: string | undefined;
54
54
  fallbackSrc?: string | undefined;
55
55
  shape?: CircleSquareShape | undefined;
56
- avatarProps?: Omit<AvatarProps, "src" | "children" | "srcSet" | "shape"> | undefined;
57
- imageProps?: Omit<ImageProps, "height" | "src" | "width" | "title" | "srcSet" | "fallback" | "preview"> | undefined;
56
+ avatarProps?: Omit<AvatarProps, "children" | "src" | "srcSet" | "shape"> | undefined;
57
+ imageProps?: Omit<ImageProps, "title" | "src" | "width" | "height" | "srcSet" | "preview" | "fallback"> | undefined;
58
58
  uploadEnabled?: boolean | undefined;
59
59
  uploadProps?: FileUploadProps | undefined;
60
60
  cropEnabled?: boolean | undefined;
@@ -36,7 +36,7 @@ export type TagInputProps = Omit<ProFormFieldItemProps, 'children' | 'fieldRef'
36
36
  locale?: string;
37
37
  localeProps?: IntlLocaleProps;
38
38
  };
39
- export declare const TagInput: React.ForwardRefExoticComponent<Omit<ProFormFieldItemProps, "disabled" | "placeholder" | "children" | "fieldProps" | "fieldRef" | "readonly"> & Omit<ProFormFieldRemoteProps, "request" | "valueEnum"> & {
39
+ export declare const TagInput: React.ForwardRefExoticComponent<Omit<ProFormFieldItemProps, "children" | "disabled" | "fieldProps" | "placeholder" | "readonly" | "fieldRef"> & Omit<ProFormFieldRemoteProps, "request" | "valueEnum"> & {
40
40
  clazzPrefix?: string | undefined;
41
41
  containerClazz?: string | undefined;
42
42
  containerStyle?: React.CSSProperties | undefined;
@@ -41,6 +41,7 @@ export { ApartTitle, type ApartTitleProps } from './layout/ApartTitle';
41
41
  export { BorderBox, type BorderBoxProps } from './layout/BorderBox';
42
42
  export { CardTabs, type CardTabsProps } from './layout/CardTabs';
43
43
  export { CodePreview, type CodePreviewProps } from './layout/CodePreview';
44
+ export { EvenDescriptions, type EvenDescriptionsProps } from './layout/EvenDescriptions';
44
45
  export { FlexBox, type FlexBoxProps } from './layout/FlexBox';
45
46
  export { FoldSection, type FoldSectionProps } from './layout/FoldSection';
46
47
  export { LoginPortal, type LoginPortalProps } from './layout/LoginPortal';
package/dist/cjs/index.js CHANGED
@@ -46,6 +46,7 @@ __export(src_exports, {
46
46
  DivideSelect: () => import_DivideSelect.DivideSelect,
47
47
  DragModal: () => import_DragModal.DragModal,
48
48
  ElementUtils: () => import_ElementUtils.ElementUtils,
49
+ EvenDescriptions: () => import_EvenDescriptions.EvenDescriptions,
49
50
  ExactInput: () => import_ExactInput.ExactInput,
50
51
  FallbackImage: () => import_FallbackImage.FallbackImage,
51
52
  FieldUtils: () => import_FieldUtils.FieldUtils,
@@ -135,6 +136,7 @@ var import_ApartTitle = require("./layout/ApartTitle");
135
136
  var import_BorderBox = require("./layout/BorderBox");
136
137
  var import_CardTabs = require("./layout/CardTabs");
137
138
  var import_CodePreview = require("./layout/CodePreview");
139
+ var import_EvenDescriptions = require("./layout/EvenDescriptions");
138
140
  var import_FlexBox = require("./layout/FlexBox");
139
141
  var import_FoldSection = require("./layout/FoldSection");
140
142
  var import_LoginPortal = require("./layout/LoginPortal");
@@ -193,6 +195,7 @@ __reExport(src_exports, require("./type/design-token"), module.exports);
193
195
  DivideSelect,
194
196
  DragModal,
195
197
  ElementUtils,
198
+ EvenDescriptions,
196
199
  ExactInput,
197
200
  FallbackImage,
198
201
  FieldUtils,
@@ -48,6 +48,15 @@ var CardTabs = (props) => {
48
48
  presetStyle = "padding-md"
49
49
  } = props ?? {};
50
50
  const fieldStyle = (0, import_styles.useFieldStyle)(clazzPrefix);
51
+ const paneClassName = presetStyle ? `${clazzPrefix}-pane-${presetStyle}` : void 0;
52
+ const userClassNames = props == null ? void 0 : props.classNames;
53
+ const tabsClassNames = (info) => {
54
+ const resolved = typeof userClassNames === "function" ? userClassNames(info) : userClassNames;
55
+ return {
56
+ ...resolved,
57
+ content: (0, import_classnames.default)(resolved == null ? void 0 : resolved.content, paneClassName, paneClassName && fieldStyle.hashId)
58
+ };
59
+ };
51
60
  const detectTabSize = () => {
52
61
  return size === "extra-small" ? "small" : size;
53
62
  };
@@ -61,7 +70,7 @@ var CardTabs = (props) => {
61
70
  return tabPlacement;
62
71
  }
63
72
  };
64
- const restTabsProps = !props ? {} : (0, import_util.omit)(props, ["className", "clazzPrefix", "containerClazz", "containerStyle", "tabBorder", "tabPlacement", "contentBorder", "inkBar", "presetStyle", "type", "size"]);
73
+ const restTabsProps = !props ? {} : (0, import_util.omit)(props, ["className", "classNames", "clazzPrefix", "containerClazz", "containerStyle", "tabBorder", "tabPlacement", "contentBorder", "inkBar", "presetStyle", "type", "size"]);
65
74
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_classnames.default)(clazzPrefix, fieldStyle.hashId, `${clazzPrefix}-${size}`, `${clazzPrefix}-${tabPlacement}`, !presetStyle ? void 0 : `${clazzPrefix}-${presetStyle}`, props == null ? void 0 : props.containerClazz), style: props == null ? void 0 : props.containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
66
75
  import_antd.Tabs,
67
76
  {
@@ -69,7 +78,8 @@ var CardTabs = (props) => {
69
78
  type: (props == null ? void 0 : props.type) ?? "card",
70
79
  size: detectTabSize(),
71
80
  tabPlacement: detectTabPlacement(),
72
- ...restTabsProps
81
+ ...restTabsProps,
82
+ classNames: tabsClassNames
73
83
  }
74
84
  ) });
75
85
  };
@@ -51,7 +51,7 @@ var buildFieldStyle = (token) => {
51
51
  borderRight: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
52
52
  borderTop: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
53
53
  },
54
- [`&${token.componentCls}-content-border > ${token.antCls}-tabs-content-holder`]: {
54
+ [`&${token.componentCls}-content-border > ${token.antCls}-tabs-body-holder > ${token.antCls}-tabs-body`]: {
55
55
  border: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
56
56
  borderRadius: `0 ${token.borderRadiusLG}px ${token.borderRadiusLG}px ${token.borderRadiusLG}px`,
57
57
  marginTop: -1
@@ -66,7 +66,7 @@ var buildFieldStyle = (token) => {
66
66
  borderRight: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
67
67
  borderBottom: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
68
68
  },
69
- [`&${token.componentCls}-content-border > ${token.antCls}-tabs-content-holder`]: {
69
+ [`&${token.componentCls}-content-border > ${token.antCls}-tabs-body-holder > ${token.antCls}-tabs-body`]: {
70
70
  border: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
71
71
  borderRadius: `${token.borderRadiusLG}px ${token.borderRadiusLG}px ${token.borderRadiusLG}px 0`,
72
72
  marginBottom: -1
@@ -78,7 +78,7 @@ var buildFieldStyle = (token) => {
78
78
  borderTop: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
79
79
  borderBottom: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
80
80
  },
81
- [`&${token.componentCls}-content-border > ${token.antCls}-tabs-content-holder`]: {
81
+ [`&${token.componentCls}-content-border > ${token.antCls}-tabs-body-holder > ${token.antCls}-tabs-body`]: {
82
82
  borderRight: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
83
83
  borderTop: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
84
84
  borderBottom: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
@@ -91,7 +91,7 @@ var buildFieldStyle = (token) => {
91
91
  borderTop: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
92
92
  borderBottom: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
93
93
  },
94
- [`&${token.componentCls}-content-border > ${token.antCls}-tabs-content-holder`]: {
94
+ [`&${token.componentCls}-content-border > ${token.antCls}-tabs-body-holder > ${token.antCls}-tabs-body`]: {
95
95
  borderLeft: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
96
96
  borderTop: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
97
97
  borderBottom: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
@@ -101,7 +101,7 @@ var buildFieldStyle = (token) => {
101
101
  },
102
102
  [`&${token.componentCls}-top-end`]: {
103
103
  [`> ${token.antCls}-tabs`]: {
104
- [`&${token.componentCls}-content-border > ${token.antCls}-tabs-content-holder`]: {
104
+ [`&${token.componentCls}-content-border > ${token.antCls}-tabs-body-holder > ${token.antCls}-tabs-body`]: {
105
105
  borderRadius: `${token.borderRadiusLG}px 0 ${token.borderRadiusLG}px ${token.borderRadiusLG}px`,
106
106
  marginTop: -1
107
107
  }
@@ -109,7 +109,7 @@ var buildFieldStyle = (token) => {
109
109
  },
110
110
  [`&${token.componentCls}-bottom-end`]: {
111
111
  [`> ${token.antCls}-tabs`]: {
112
- [`&${token.componentCls}-content-border > ${token.antCls}-tabs-content-holder`]: {
112
+ [`&${token.componentCls}-content-border > ${token.antCls}-tabs-body-holder > ${token.antCls}-tabs-body`]: {
113
113
  borderRadius: `${token.borderRadiusLG}px ${token.borderRadiusLG}px 0 ${token.borderRadiusLG}px`,
114
114
  marginBottom: -1
115
115
  }
@@ -125,71 +125,23 @@ var buildFieldStyle = (token) => {
125
125
  borderBottom: "none"
126
126
  }
127
127
  },
128
- [`&${token.componentCls}-padding-0 > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
128
+ [`${token.componentCls}-pane-padding-0`]: {
129
129
  padding: 0
130
130
  },
131
- [`&${token.componentCls}-padding-xxs > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
131
+ [`${token.componentCls}-pane-padding-xxs`]: {
132
132
  padding: `${token.paddingXXS}px ${token.paddingXXS}px`
133
133
  },
134
- [`&${token.componentCls}-padding-xs > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
134
+ [`${token.componentCls}-pane-padding-xs`]: {
135
135
  padding: `${token.paddingXS}px ${token.paddingXS}px`
136
136
  },
137
- [`&${token.componentCls}-padding-sm > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
137
+ [`${token.componentCls}-pane-padding-sm`]: {
138
138
  padding: `${token.paddingSM}px ${token.paddingSM}px`
139
139
  },
140
- [`&${token.componentCls}-padding-md > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
140
+ [`${token.componentCls}-pane-padding-md`]: {
141
141
  padding: `${token.paddingMD}px ${token.paddingMD}px`
142
142
  },
143
- [`&${token.componentCls}-padding-lg > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
143
+ [`${token.componentCls}-pane-padding-lg`]: {
144
144
  padding: `${token.paddingLG}px ${token.paddingLG}px`
145
- },
146
- [`&${token.componentCls}-padding-x-0 > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
147
- paddingLeft: 0,
148
- paddingRight: 0
149
- },
150
- [`&${token.componentCls}-padding-x-xxs > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
151
- paddingLeft: token.paddingXXS,
152
- paddingRight: token.paddingXXS
153
- },
154
- [`&${token.componentCls}-padding-x-xs > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
155
- paddingLeft: token.paddingXS,
156
- paddingRight: token.paddingXS
157
- },
158
- [`&${token.componentCls}-padding-x-sm > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
159
- paddingLeft: token.paddingSM,
160
- paddingRight: token.paddingSM
161
- },
162
- [`&${token.componentCls}-padding-x-md > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
163
- paddingLeft: token.paddingMD,
164
- paddingRight: token.paddingMD
165
- },
166
- [`&${token.componentCls}-padding-x-lg > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
167
- paddingLeft: token.paddingLG,
168
- paddingRight: token.paddingLG
169
- },
170
- [`&${token.componentCls}-padding-y-0 > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
171
- paddingTop: 0,
172
- paddingBottom: 0
173
- },
174
- [`&${token.componentCls}-padding-y-xxs > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
175
- paddingTop: token.paddingXXS,
176
- paddingBottom: token.paddingXXS
177
- },
178
- [`&${token.componentCls}-padding-y-xs > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
179
- paddingTop: token.paddingXS,
180
- paddingBottom: token.paddingXS
181
- },
182
- [`&${token.componentCls}-padding-y-sm > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
183
- paddingTop: token.paddingSM,
184
- paddingBottom: token.paddingSM
185
- },
186
- [`&${token.componentCls}-padding-y-md > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
187
- paddingTop: token.paddingMD,
188
- paddingBottom: token.paddingMD
189
- },
190
- [`&${token.componentCls}-padding-y-lg > ${token.antCls}-tabs > ${token.antCls}-tabs-content-holder > ${token.antCls}-tabs-content > ${token.antCls}-tabs-tabpane`]: {
191
- paddingTop: token.paddingLG,
192
- paddingBottom: token.paddingLG
193
145
  }
194
146
  }
195
147
  };
@@ -57,54 +57,6 @@ var buildFieldStyle = (token) => {
57
57
  },
58
58
  [`&${token.componentCls}-padding-lg pre code`]: {
59
59
  padding: `${token.paddingLG}px ${token.paddingLG}px`
60
- },
61
- [`&${token.componentCls}-padding-x-0 pre code`]: {
62
- paddingLeft: 0,
63
- paddingRight: 0
64
- },
65
- [`&${token.componentCls}-padding-x-xxs pre code`]: {
66
- paddingLeft: token.paddingXXS,
67
- paddingRight: token.paddingXXS
68
- },
69
- [`&${token.componentCls}-padding-x-xs pre code`]: {
70
- paddingLeft: token.paddingXS,
71
- paddingRight: token.paddingXS
72
- },
73
- [`&${token.componentCls}-padding-x-sm pre code`]: {
74
- paddingLeft: token.paddingSM,
75
- paddingRight: token.paddingSM
76
- },
77
- [`&${token.componentCls}-padding-x-md pre code`]: {
78
- paddingLeft: token.paddingMD,
79
- paddingRight: token.paddingMD
80
- },
81
- [`&${token.componentCls}-padding-x-lg pre code`]: {
82
- paddingLeft: token.paddingLG,
83
- paddingRight: token.paddingLG
84
- },
85
- [`&${token.componentCls}-padding-y-0 pre code`]: {
86
- paddingTop: 0,
87
- paddingBottom: 0
88
- },
89
- [`&${token.componentCls}-padding-y-xxs pre code`]: {
90
- paddingTop: token.paddingXXS,
91
- paddingBottom: token.paddingXXS
92
- },
93
- [`&${token.componentCls}-padding-y-xs pre code`]: {
94
- paddingTop: token.paddingXS,
95
- paddingBottom: token.paddingXS
96
- },
97
- [`&${token.componentCls}-padding-y-sm pre code`]: {
98
- paddingTop: token.paddingSM,
99
- paddingBottom: token.paddingSM
100
- },
101
- [`&${token.componentCls}-padding-y-md pre code`]: {
102
- paddingTop: token.paddingMD,
103
- paddingBottom: token.paddingMD
104
- },
105
- [`&${token.componentCls}-padding-y-lg pre code`]: {
106
- paddingTop: token.paddingLG,
107
- paddingBottom: token.paddingLG
108
60
  }
109
61
  }
110
62
  };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { type DescriptionsProps } from 'antd';
3
+ import { type ProDescriptionsProps } from '@ant-design/pro-components';
4
+ export type EvenDescriptionsProps = ProDescriptionsProps & {
5
+ clazzPrefix?: string;
6
+ fixed?: boolean;
7
+ proField?: boolean;
8
+ items?: DescriptionsProps['items'];
9
+ };
10
+ export declare const EvenDescriptions: React.FC<EvenDescriptionsProps>;
@@ -0,0 +1,63 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/layout/EvenDescriptions/index.tsx
30
+ var EvenDescriptions_exports = {};
31
+ __export(EvenDescriptions_exports, {
32
+ EvenDescriptions: () => EvenDescriptions
33
+ });
34
+ module.exports = __toCommonJS(EvenDescriptions_exports);
35
+ var import_antd = require("antd");
36
+ var import_pro_components = require("@ant-design/pro-components");
37
+ var import_util = require("@rc-component/util");
38
+ var import_classnames = __toESM(require("classnames"));
39
+ var import_styles = require("./styles");
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ var EvenDescriptions = (props) => {
42
+ const clazzPrefix = (props == null ? void 0 : props.clazzPrefix) ?? "abp-even-descriptions";
43
+ const {
44
+ fixed = true,
45
+ proField = true
46
+ } = props ?? {};
47
+ const fieldStyle = (0, import_styles.useFieldStyle)(clazzPrefix);
48
+ const entryClazz = (0, import_classnames.default)(clazzPrefix, fieldStyle.hashId, !fixed ? void 0 : `${clazzPrefix}-fixed`, props == null ? void 0 : props.className);
49
+ const selfProps = ["className", "clazzPrefix", "fixed", "proField"];
50
+ if (proField) {
51
+ const restProps2 = !props ? {} : (0, import_util.omit)(props, selfProps);
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_pro_components.ProDescriptions, { ...restProps2, className: entryClazz });
53
+ }
54
+ const proOnlyProps = ["params", "onRequestError", "request", "columns", "actionRef", "loading", "onLoadingChange", "tooltip", "formProps", "editable", "dataSource", "onDataSourceChange", "emptyText"];
55
+ const restProps = !props ? {} : (0, import_util.omit)(props, [...selfProps, "styles", ...proOnlyProps]);
56
+ const styles = props == null ? void 0 : props.styles;
57
+ const mergedStyles = typeof styles === "function" ? styles : { ...styles, content: { minWidth: 0, ...styles == null ? void 0 : styles.content } };
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Descriptions, { ...restProps, styles: mergedStyles, className: entryClazz });
59
+ };
60
+ // Annotate the CommonJS export names for ESM import in node:
61
+ 0 && (module.exports = {
62
+ EvenDescriptions
63
+ });
@@ -0,0 +1,2 @@
1
+ import { type UseStyleResult } from '@ant-design/pro-components';
2
+ export declare function useFieldStyle(prefixCls: string): UseStyleResult;
@@ -0,0 +1,51 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/layout/EvenDescriptions/styles.ts
20
+ var styles_exports = {};
21
+ __export(styles_exports, {
22
+ useFieldStyle: () => useFieldStyle
23
+ });
24
+ module.exports = __toCommonJS(styles_exports);
25
+ var import_pro_components = require("@ant-design/pro-components");
26
+ var import_PackageConst = require("../../constant/PackageConst");
27
+ var buildFieldStyle = (token) => {
28
+ return {
29
+ // `&&&` 提升特异性,确保稳定覆盖 antd v6 在 bordered 模式下写入的 `> table { tableLayout: auto }`
30
+ [`${token.componentCls}-fixed`]: {
31
+ [`&&& ${token.antCls}-descriptions-view > table`]: {
32
+ tableLayout: "fixed",
33
+ width: "100%"
34
+ }
35
+ }
36
+ };
37
+ };
38
+ function useFieldStyle(prefixCls) {
39
+ return (0, import_pro_components.useStyle)(`${import_PackageConst.PackageConst.PACKAGE_NAME}:EvenDescriptions`, (token) => {
40
+ const mesh = {
41
+ ...token,
42
+ prefixCls,
43
+ componentCls: `.${prefixCls}`
44
+ };
45
+ return [buildFieldStyle(mesh)];
46
+ });
47
+ }
48
+ // Annotate the CommonJS export names for ESM import in node:
49
+ 0 && (module.exports = {
50
+ useFieldStyle
51
+ });
@@ -79,54 +79,6 @@ var buildFieldStyle = (token) => {
79
79
  },
80
80
  [`&${token.componentCls}-padding-lg ${token.componentCls}-tab`]: {
81
81
  padding: `${token.paddingLG}px ${token.paddingLG}px`
82
- },
83
- [`&${token.componentCls}-padding-x-0 ${token.componentCls}-tab`]: {
84
- paddingLeft: 0,
85
- paddingRight: 0
86
- },
87
- [`&${token.componentCls}-padding-x-xxs ${token.componentCls}-tab`]: {
88
- paddingLeft: token.paddingXXS,
89
- paddingRight: token.paddingXXS
90
- },
91
- [`&${token.componentCls}-padding-x-xs ${token.componentCls}-tab`]: {
92
- paddingLeft: token.paddingXS,
93
- paddingRight: token.paddingXS
94
- },
95
- [`&${token.componentCls}-padding-x-sm ${token.componentCls}-tab`]: {
96
- paddingLeft: token.paddingSM,
97
- paddingRight: token.paddingSM
98
- },
99
- [`&${token.componentCls}-padding-x-md ${token.componentCls}-tab`]: {
100
- paddingLeft: token.paddingMD,
101
- paddingRight: token.paddingMD
102
- },
103
- [`&${token.componentCls}-padding-x-lg ${token.componentCls}-tab`]: {
104
- paddingLeft: token.paddingLG,
105
- paddingRight: token.paddingLG
106
- },
107
- [`&${token.componentCls}-padding-y-0 ${token.componentCls}-tab`]: {
108
- paddingTop: 0,
109
- paddingBottom: 0
110
- },
111
- [`&${token.componentCls}-padding-y-xxs ${token.componentCls}-tab`]: {
112
- paddingTop: token.paddingXXS,
113
- paddingBottom: token.paddingXXS
114
- },
115
- [`&${token.componentCls}-padding-y-xs ${token.componentCls}-tab`]: {
116
- paddingTop: token.paddingXS,
117
- paddingBottom: token.paddingXS
118
- },
119
- [`&${token.componentCls}-padding-y-sm ${token.componentCls}-tab`]: {
120
- paddingTop: token.paddingSM,
121
- paddingBottom: token.paddingSM
122
- },
123
- [`&${token.componentCls}-padding-y-md ${token.componentCls}-tab`]: {
124
- paddingTop: token.paddingMD,
125
- paddingBottom: token.paddingMD
126
- },
127
- [`&${token.componentCls}-padding-y-lg ${token.componentCls}-tab`]: {
128
- paddingTop: token.paddingLG,
129
- paddingBottom: token.paddingLG
130
82
  }
131
83
  },
132
84
  [`@media screen and (max-width:${token.screenMD}px)`]: {
@@ -8,7 +8,7 @@ export type CircleSquareShape = 'circle' | 'square';
8
8
  export type FileSizeUint = 'KB' | 'MB' | 'GB' | 'TB';
9
9
  export type LabelValueType = 'label' | 'value';
10
10
  export type LabelMixinType = LabelValueType | 'code';
11
- export type PaddingSpaceType = WithFalse<'padding-0' | 'padding-xxs' | 'padding-xs' | 'padding-sm' | 'padding-md' | 'padding-lg' | 'padding-x-0' | 'padding-x-xxs' | 'padding-x-xs' | 'padding-x-sm' | 'padding-x-md' | 'padding-x-lg' | 'padding-y-0' | 'padding-y-xxs' | 'padding-y-xs' | 'padding-y-sm' | 'padding-y-md' | 'padding-y-lg'>;
11
+ export type PaddingSpaceType = WithFalse<'padding-0' | 'padding-xxs' | 'padding-xs' | 'padding-sm' | 'padding-md' | 'padding-lg'>;
12
12
  export type ReadonlyTabsType = Exclude<TabsType, 'editable-card'>;
13
13
  export type RectZenithPlace = RcPlacement;
14
14
  export type RequestOptionPlace = BeforeAfterType | 'override';
@@ -45,7 +45,7 @@ export type AvatarUploadProps = Omit<ProFormFieldItemProps, 'children' | 'fieldR
45
45
  locale?: string;
46
46
  localeProps?: IntlLocaleProps;
47
47
  };
48
- export declare const AvatarUpload: React.ForwardRefExoticComponent<Omit<ProFormFieldItemProps, "disabled" | "placeholder" | "children" | "fieldProps" | "fieldRef" | "readonly"> & {
48
+ export declare const AvatarUpload: React.ForwardRefExoticComponent<Omit<ProFormFieldItemProps, "children" | "disabled" | "fieldProps" | "placeholder" | "readonly" | "fieldRef"> & {
49
49
  clazzPrefix?: string | undefined;
50
50
  containerClazz?: string | undefined;
51
51
  containerStyle?: React.CSSProperties | undefined;
@@ -53,8 +53,8 @@ export declare const AvatarUpload: React.ForwardRefExoticComponent<Omit<ProFormF
53
53
  imageSrc?: string | undefined;
54
54
  fallbackSrc?: string | undefined;
55
55
  shape?: CircleSquareShape | undefined;
56
- avatarProps?: Omit<AvatarProps, "src" | "children" | "srcSet" | "shape"> | undefined;
57
- imageProps?: Omit<ImageProps, "height" | "src" | "width" | "title" | "srcSet" | "fallback" | "preview"> | undefined;
56
+ avatarProps?: Omit<AvatarProps, "children" | "src" | "srcSet" | "shape"> | undefined;
57
+ imageProps?: Omit<ImageProps, "title" | "src" | "width" | "height" | "srcSet" | "preview" | "fallback"> | undefined;
58
58
  uploadEnabled?: boolean | undefined;
59
59
  uploadProps?: FileUploadProps | undefined;
60
60
  cropEnabled?: boolean | undefined;
@@ -36,7 +36,7 @@ export type TagInputProps = Omit<ProFormFieldItemProps, 'children' | 'fieldRef'
36
36
  locale?: string;
37
37
  localeProps?: IntlLocaleProps;
38
38
  };
39
- export declare const TagInput: React.ForwardRefExoticComponent<Omit<ProFormFieldItemProps, "disabled" | "placeholder" | "children" | "fieldProps" | "fieldRef" | "readonly"> & Omit<ProFormFieldRemoteProps, "request" | "valueEnum"> & {
39
+ export declare const TagInput: React.ForwardRefExoticComponent<Omit<ProFormFieldItemProps, "children" | "disabled" | "fieldProps" | "placeholder" | "readonly" | "fieldRef"> & Omit<ProFormFieldRemoteProps, "request" | "valueEnum"> & {
40
40
  clazzPrefix?: string | undefined;
41
41
  containerClazz?: string | undefined;
42
42
  containerStyle?: React.CSSProperties | undefined;
@@ -41,6 +41,7 @@ export { ApartTitle, type ApartTitleProps } from './layout/ApartTitle';
41
41
  export { BorderBox, type BorderBoxProps } from './layout/BorderBox';
42
42
  export { CardTabs, type CardTabsProps } from './layout/CardTabs';
43
43
  export { CodePreview, type CodePreviewProps } from './layout/CodePreview';
44
+ export { EvenDescriptions, type EvenDescriptionsProps } from './layout/EvenDescriptions';
44
45
  export { FlexBox, type FlexBoxProps } from './layout/FlexBox';
45
46
  export { FoldSection, type FoldSectionProps } from './layout/FoldSection';
46
47
  export { LoginPortal, type LoginPortalProps } from './layout/LoginPortal';
package/dist/esm/index.js CHANGED
@@ -41,6 +41,7 @@ export { ApartTitle } from "./layout/ApartTitle";
41
41
  export { BorderBox } from "./layout/BorderBox";
42
42
  export { CardTabs } from "./layout/CardTabs";
43
43
  export { CodePreview } from "./layout/CodePreview";
44
+ export { EvenDescriptions } from "./layout/EvenDescriptions";
44
45
  export { FlexBox } from "./layout/FlexBox";
45
46
  export { FoldSection } from "./layout/FoldSection";
46
47
  export { LoginPortal } from "./layout/LoginPortal";
@@ -27,6 +27,14 @@ export var CardTabs = function CardTabs(props) {
27
27
  _ref$presetStyle = _ref.presetStyle,
28
28
  presetStyle = _ref$presetStyle === void 0 ? 'padding-md' : _ref$presetStyle;
29
29
  var fieldStyle = useFieldStyle(clazzPrefix);
30
+ var paneClassName = presetStyle ? "".concat(clazzPrefix, "-pane-").concat(presetStyle) : undefined;
31
+ var userClassNames = props === null || props === void 0 ? void 0 : props.classNames;
32
+ var tabsClassNames = function tabsClassNames(info) {
33
+ var resolved = typeof userClassNames === 'function' ? userClassNames(info) : userClassNames;
34
+ return _objectSpread(_objectSpread({}, resolved), {}, {
35
+ content: classnames(resolved === null || resolved === void 0 ? void 0 : resolved.content, paneClassName, paneClassName && fieldStyle.hashId)
36
+ });
37
+ };
30
38
  var detectTabSize = function detectTabSize() {
31
39
  return size === 'extra-small' ? 'small' : size;
32
40
  };
@@ -40,15 +48,17 @@ export var CardTabs = function CardTabs(props) {
40
48
  return tabPlacement;
41
49
  }
42
50
  };
43
- var restTabsProps = !props ? {} : omit(props, ['className', 'clazzPrefix', 'containerClazz', 'containerStyle', 'tabBorder', 'tabPlacement', 'contentBorder', 'inkBar', 'presetStyle', 'type', 'size']);
51
+ var restTabsProps = !props ? {} : omit(props, ['className', 'classNames', 'clazzPrefix', 'containerClazz', 'containerStyle', 'tabBorder', 'tabPlacement', 'contentBorder', 'inkBar', 'presetStyle', 'type', 'size']);
44
52
  return /*#__PURE__*/_jsx("div", {
45
53
  className: classnames(clazzPrefix, fieldStyle.hashId, "".concat(clazzPrefix, "-").concat(size), "".concat(clazzPrefix, "-").concat(tabPlacement), !presetStyle ? undefined : "".concat(clazzPrefix, "-").concat(presetStyle), props === null || props === void 0 ? void 0 : props.containerClazz),
46
54
  style: props === null || props === void 0 ? void 0 : props.containerStyle,
47
- children: /*#__PURE__*/_jsx(Tabs, _objectSpread({
55
+ children: /*#__PURE__*/_jsx(Tabs, _objectSpread(_objectSpread({
48
56
  className: classnames(props === null || props === void 0 ? void 0 : props.className, "".concat(clazzPrefix, "-tab-border").concat(tabBorder ? '' : '-off'), !contentBorder ? undefined : "".concat(clazzPrefix, "-content-border"), !inkBar ? undefined : "".concat(clazzPrefix, "-ink-bar")),
49
57
  type: (_props$type = props === null || props === void 0 ? void 0 : props.type) !== null && _props$type !== void 0 ? _props$type : 'card',
50
58
  size: detectTabSize(),
51
59
  tabPlacement: detectTabPlacement()
52
- }, restTabsProps))
60
+ }, restTabsProps), {}, {
61
+ classNames: tabsClassNames
62
+ }))
53
63
  });
54
64
  };
@@ -25,7 +25,7 @@ var buildFieldStyle = function buildFieldStyle(token) {
25
25
  borderLeft: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
26
26
  borderRight: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
27
27
  borderTop: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit)
28
- }), "&".concat(token.componentCls, "-content-border > ").concat(token.antCls, "-tabs-content-holder"), {
28
+ }), "&".concat(token.componentCls, "-content-border > ").concat(token.antCls, "-tabs-body-holder > ").concat(token.antCls, "-tabs-body"), {
29
29
  border: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
30
30
  borderRadius: "0 ".concat(token.borderRadiusLG, "px ").concat(token.borderRadiusLG, "px ").concat(token.borderRadiusLG, "px"),
31
31
  marginTop: -1
@@ -35,7 +35,7 @@ var buildFieldStyle = function buildFieldStyle(token) {
35
35
  borderLeft: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
36
36
  borderRight: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
37
37
  borderBottom: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit)
38
- }), "&".concat(token.componentCls, "-content-border > ").concat(token.antCls, "-tabs-content-holder"), {
38
+ }), "&".concat(token.componentCls, "-content-border > ").concat(token.antCls, "-tabs-body-holder > ").concat(token.antCls, "-tabs-body"), {
39
39
  border: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
40
40
  borderRadius: "".concat(token.borderRadiusLG, "px ").concat(token.borderRadiusLG, "px ").concat(token.borderRadiusLG, "px 0"),
41
41
  marginBottom: -1
@@ -43,7 +43,7 @@ var buildFieldStyle = function buildFieldStyle(token) {
43
43
  borderLeft: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
44
44
  borderTop: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
45
45
  borderBottom: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit)
46
- }), "&".concat(token.componentCls, "-content-border > ").concat(token.antCls, "-tabs-content-holder"), {
46
+ }), "&".concat(token.componentCls, "-content-border > ").concat(token.antCls, "-tabs-body-holder > ").concat(token.antCls, "-tabs-body"), {
47
47
  borderRight: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
48
48
  borderTop: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
49
49
  borderBottom: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
@@ -52,69 +52,33 @@ var buildFieldStyle = function buildFieldStyle(token) {
52
52
  borderRight: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
53
53
  borderTop: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
54
54
  borderBottom: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit)
55
- }), "&".concat(token.componentCls, "-content-border > ").concat(token.antCls, "-tabs-content-holder"), {
55
+ }), "&".concat(token.componentCls, "-content-border > ").concat(token.antCls, "-tabs-body-holder > ").concat(token.antCls, "-tabs-body"), {
56
56
  borderLeft: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
57
57
  borderTop: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
58
58
  borderBottom: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
59
59
  borderRadius: "".concat(token.borderRadiusLG, "px 0 ").concat(token.borderRadiusLG, "px ").concat(token.borderRadiusLG, "px")
60
- }))), "&".concat(token.componentCls, "-top-end"), _defineProperty({}, "> ".concat(token.antCls, "-tabs"), _defineProperty({}, "&".concat(token.componentCls, "-content-border > ").concat(token.antCls, "-tabs-content-holder"), {
60
+ }))), "&".concat(token.componentCls, "-top-end"), _defineProperty({}, "> ".concat(token.antCls, "-tabs"), _defineProperty({}, "&".concat(token.componentCls, "-content-border > ").concat(token.antCls, "-tabs-body-holder > ").concat(token.antCls, "-tabs-body"), {
61
61
  borderRadius: "".concat(token.borderRadiusLG, "px 0 ").concat(token.borderRadiusLG, "px ").concat(token.borderRadiusLG, "px"),
62
62
  marginTop: -1
63
- }))), "&".concat(token.componentCls, "-bottom-end"), _defineProperty({}, "> ".concat(token.antCls, "-tabs"), _defineProperty({}, "&".concat(token.componentCls, "-content-border > ").concat(token.antCls, "-tabs-content-holder"), {
63
+ }))), "&".concat(token.componentCls, "-bottom-end"), _defineProperty({}, "> ".concat(token.antCls, "-tabs"), _defineProperty({}, "&".concat(token.componentCls, "-content-border > ").concat(token.antCls, "-tabs-body-holder > ").concat(token.antCls, "-tabs-body"), {
64
64
  borderRadius: "".concat(token.borderRadiusLG, "px ").concat(token.borderRadiusLG, "px 0 ").concat(token.borderRadiusLG, "px"),
65
65
  marginBottom: -1
66
66
  }))), "&".concat(token.componentCls, "-top-end, &").concat(token.componentCls, "-bottom-end"), _defineProperty({}, "> ".concat(token.antCls, "-tabs:not(").concat(token.antCls, "-tabs-centered) > ").concat(token.antCls, "-tabs-nav > ").concat(token.antCls, "-tabs-nav-wrap"), {
67
67
  justifyContent: 'flex-end'
68
68
  })), "&".concat(token.componentCls, "-top, &").concat(token.componentCls, "-top-end, &").concat(token.componentCls, "-bottom, &").concat(token.componentCls, "-bottom-end"), _defineProperty({}, "> ".concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-nav::before"), {
69
69
  borderBottom: 'none'
70
- })), "&".concat(token.componentCls, "-padding-0 > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
70
+ })), "".concat(token.componentCls, "-pane-padding-0"), {
71
71
  padding: 0
72
- }), "&".concat(token.componentCls, "-padding-xxs > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
72
+ }), "".concat(token.componentCls, "-pane-padding-xxs"), {
73
73
  padding: "".concat(token.paddingXXS, "px ").concat(token.paddingXXS, "px")
74
- }), "&".concat(token.componentCls, "-padding-xs > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
74
+ }), "".concat(token.componentCls, "-pane-padding-xs"), {
75
75
  padding: "".concat(token.paddingXS, "px ").concat(token.paddingXS, "px")
76
- }), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat10, "&".concat(token.componentCls, "-padding-sm > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
76
+ }), _defineProperty(_defineProperty(_defineProperty(_$concat10, "".concat(token.componentCls, "-pane-padding-sm"), {
77
77
  padding: "".concat(token.paddingSM, "px ").concat(token.paddingSM, "px")
78
- }), "&".concat(token.componentCls, "-padding-md > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
78
+ }), "".concat(token.componentCls, "-pane-padding-md"), {
79
79
  padding: "".concat(token.paddingMD, "px ").concat(token.paddingMD, "px")
80
- }), "&".concat(token.componentCls, "-padding-lg > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
80
+ }), "".concat(token.componentCls, "-pane-padding-lg"), {
81
81
  padding: "".concat(token.paddingLG, "px ").concat(token.paddingLG, "px")
82
- }), "&".concat(token.componentCls, "-padding-x-0 > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
83
- paddingLeft: 0,
84
- paddingRight: 0
85
- }), "&".concat(token.componentCls, "-padding-x-xxs > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
86
- paddingLeft: token.paddingXXS,
87
- paddingRight: token.paddingXXS
88
- }), "&".concat(token.componentCls, "-padding-x-xs > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
89
- paddingLeft: token.paddingXS,
90
- paddingRight: token.paddingXS
91
- }), "&".concat(token.componentCls, "-padding-x-sm > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
92
- paddingLeft: token.paddingSM,
93
- paddingRight: token.paddingSM
94
- }), "&".concat(token.componentCls, "-padding-x-md > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
95
- paddingLeft: token.paddingMD,
96
- paddingRight: token.paddingMD
97
- }), "&".concat(token.componentCls, "-padding-x-lg > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
98
- paddingLeft: token.paddingLG,
99
- paddingRight: token.paddingLG
100
- }), "&".concat(token.componentCls, "-padding-y-0 > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
101
- paddingTop: 0,
102
- paddingBottom: 0
103
- }), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat10, "&".concat(token.componentCls, "-padding-y-xxs > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
104
- paddingTop: token.paddingXXS,
105
- paddingBottom: token.paddingXXS
106
- }), "&".concat(token.componentCls, "-padding-y-xs > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
107
- paddingTop: token.paddingXS,
108
- paddingBottom: token.paddingXS
109
- }), "&".concat(token.componentCls, "-padding-y-sm > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
110
- paddingTop: token.paddingSM,
111
- paddingBottom: token.paddingSM
112
- }), "&".concat(token.componentCls, "-padding-y-md > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
113
- paddingTop: token.paddingMD,
114
- paddingBottom: token.paddingMD
115
- }), "&".concat(token.componentCls, "-padding-y-lg > ").concat(token.antCls, "-tabs > ").concat(token.antCls, "-tabs-content-holder > ").concat(token.antCls, "-tabs-content > ").concat(token.antCls, "-tabs-tabpane"), {
116
- paddingTop: token.paddingLG,
117
- paddingBottom: token.paddingLG
118
82
  })));
119
83
  };
120
84
  export function useFieldStyle(prefixCls) {
@@ -8,10 +8,9 @@ import { unit } from '@ant-design/cssinjs';
8
8
  import { useStyle } from '@ant-design/pro-components';
9
9
  import { PackageConst } from "../../constant/PackageConst";
10
10
  var buildFieldStyle = function buildFieldStyle(token) {
11
- var _$concat;
12
- return _defineProperty({}, "".concat(token.componentCls), (_$concat = {
11
+ return _defineProperty({}, "".concat(token.componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
13
12
  borderRadius: token.borderRadius
14
- }, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat, "&&-bound-border", {
13
+ }, "&&-bound-border", {
15
14
  border: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit)
16
15
  }), "&&-bound-shadow", {
17
16
  boxShadow: token.boxShadow
@@ -31,43 +30,7 @@ var buildFieldStyle = function buildFieldStyle(token) {
31
30
  padding: "".concat(token.paddingMD, "px ").concat(token.paddingMD, "px")
32
31
  }), "&".concat(token.componentCls, "-padding-lg pre code"), {
33
32
  padding: "".concat(token.paddingLG, "px ").concat(token.paddingLG, "px")
34
- }), "&".concat(token.componentCls, "-padding-x-0 pre code"), {
35
- paddingLeft: 0,
36
- paddingRight: 0
37
- }), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat, "&".concat(token.componentCls, "-padding-x-xxs pre code"), {
38
- paddingLeft: token.paddingXXS,
39
- paddingRight: token.paddingXXS
40
- }), "&".concat(token.componentCls, "-padding-x-xs pre code"), {
41
- paddingLeft: token.paddingXS,
42
- paddingRight: token.paddingXS
43
- }), "&".concat(token.componentCls, "-padding-x-sm pre code"), {
44
- paddingLeft: token.paddingSM,
45
- paddingRight: token.paddingSM
46
- }), "&".concat(token.componentCls, "-padding-x-md pre code"), {
47
- paddingLeft: token.paddingMD,
48
- paddingRight: token.paddingMD
49
- }), "&".concat(token.componentCls, "-padding-x-lg pre code"), {
50
- paddingLeft: token.paddingLG,
51
- paddingRight: token.paddingLG
52
- }), "&".concat(token.componentCls, "-padding-y-0 pre code"), {
53
- paddingTop: 0,
54
- paddingBottom: 0
55
- }), "&".concat(token.componentCls, "-padding-y-xxs pre code"), {
56
- paddingTop: token.paddingXXS,
57
- paddingBottom: token.paddingXXS
58
- }), "&".concat(token.componentCls, "-padding-y-xs pre code"), {
59
- paddingTop: token.paddingXS,
60
- paddingBottom: token.paddingXS
61
- }), "&".concat(token.componentCls, "-padding-y-sm pre code"), {
62
- paddingTop: token.paddingSM,
63
- paddingBottom: token.paddingSM
64
- }), "&".concat(token.componentCls, "-padding-y-md pre code"), {
65
- paddingTop: token.paddingMD,
66
- paddingBottom: token.paddingMD
67
- }), _defineProperty(_$concat, "&".concat(token.componentCls, "-padding-y-lg pre code"), {
68
- paddingTop: token.paddingLG,
69
- paddingBottom: token.paddingLG
70
- })));
33
+ }));
71
34
  };
72
35
  export function useFieldStyle(prefixCls) {
73
36
  return useStyle("".concat(PackageConst.PACKAGE_NAME, ":CodePreview"), function (token) {
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { type DescriptionsProps } from 'antd';
3
+ import { type ProDescriptionsProps } from '@ant-design/pro-components';
4
+ export type EvenDescriptionsProps = ProDescriptionsProps & {
5
+ clazzPrefix?: string;
6
+ fixed?: boolean;
7
+ proField?: boolean;
8
+ items?: DescriptionsProps['items'];
9
+ };
10
+ export declare const EvenDescriptions: React.FC<EvenDescriptionsProps>;
@@ -0,0 +1,43 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import React from 'react';
8
+ import { Descriptions } from 'antd';
9
+ import { ProDescriptions } from '@ant-design/pro-components';
10
+ import { omit } from '@rc-component/util';
11
+ import classnames from 'classnames';
12
+ import { useFieldStyle } from "./styles";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ export var EvenDescriptions = function EvenDescriptions(props) {
15
+ var _props$clazzPrefix;
16
+ var clazzPrefix = (_props$clazzPrefix = props === null || props === void 0 ? void 0 : props.clazzPrefix) !== null && _props$clazzPrefix !== void 0 ? _props$clazzPrefix : 'abp-even-descriptions';
17
+ var _ref = props !== null && props !== void 0 ? props : {},
18
+ _ref$fixed = _ref.fixed,
19
+ fixed = _ref$fixed === void 0 ? true : _ref$fixed,
20
+ _ref$proField = _ref.proField,
21
+ proField = _ref$proField === void 0 ? true : _ref$proField;
22
+ var fieldStyle = useFieldStyle(clazzPrefix);
23
+ var entryClazz = classnames(clazzPrefix, fieldStyle.hashId, !fixed ? undefined : "".concat(clazzPrefix, "-fixed"), props === null || props === void 0 ? void 0 : props.className);
24
+ var selfProps = ['className', 'clazzPrefix', 'fixed', 'proField'];
25
+ if (proField) {
26
+ var _restProps = !props ? {} : omit(props, selfProps);
27
+ return /*#__PURE__*/_jsx(ProDescriptions, _objectSpread(_objectSpread({}, _restProps), {}, {
28
+ className: entryClazz
29
+ }));
30
+ }
31
+ var proOnlyProps = ['params', 'onRequestError', 'request', 'columns', 'actionRef', 'loading', 'onLoadingChange', 'tooltip', 'formProps', 'editable', 'dataSource', 'onDataSourceChange', 'emptyText'];
32
+ var restProps = !props ? {} : omit(props, [].concat(selfProps, ['styles'], proOnlyProps));
33
+ var styles = props === null || props === void 0 ? void 0 : props.styles;
34
+ var mergedStyles = typeof styles === 'function' ? styles : _objectSpread(_objectSpread({}, styles), {}, {
35
+ content: _objectSpread({
36
+ minWidth: 0
37
+ }, styles === null || styles === void 0 ? void 0 : styles.content)
38
+ });
39
+ return /*#__PURE__*/_jsx(Descriptions, _objectSpread(_objectSpread({}, restProps), {}, {
40
+ styles: mergedStyles,
41
+ className: entryClazz
42
+ }));
43
+ };
@@ -0,0 +1,2 @@
1
+ import { type UseStyleResult } from '@ant-design/pro-components';
2
+ export declare function useFieldStyle(prefixCls: string): UseStyleResult;
@@ -0,0 +1,23 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import { useStyle } from '@ant-design/pro-components';
8
+ import { PackageConst } from "../../constant/PackageConst";
9
+ var buildFieldStyle = function buildFieldStyle(token) {
10
+ return _defineProperty({}, "".concat(token.componentCls, "-fixed"), _defineProperty({}, "&&& ".concat(token.antCls, "-descriptions-view > table"), {
11
+ tableLayout: 'fixed',
12
+ width: '100%'
13
+ }));
14
+ };
15
+ export function useFieldStyle(prefixCls) {
16
+ return useStyle("".concat(PackageConst.PACKAGE_NAME, ":EvenDescriptions"), function (token) {
17
+ var mesh = _objectSpread(_objectSpread({}, token), {}, {
18
+ prefixCls: prefixCls,
19
+ componentCls: ".".concat(prefixCls)
20
+ });
21
+ return [buildFieldStyle(mesh)];
22
+ });
23
+ }
@@ -41,44 +41,8 @@ var buildFieldStyle = function buildFieldStyle(token) {
41
41
  padding: "".concat(token.paddingSM, "px ").concat(token.paddingSM, "px")
42
42
  }), "&".concat(token.componentCls, "-padding-md ").concat(token.componentCls, "-tab"), {
43
43
  padding: "".concat(token.paddingMD, "px ").concat(token.paddingMD, "px")
44
- }), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat, "&".concat(token.componentCls, "-padding-lg ").concat(token.componentCls, "-tab"), {
44
+ }), _defineProperty(_$concat, "&".concat(token.componentCls, "-padding-lg ").concat(token.componentCls, "-tab"), {
45
45
  padding: "".concat(token.paddingLG, "px ").concat(token.paddingLG, "px")
46
- }), "&".concat(token.componentCls, "-padding-x-0 ").concat(token.componentCls, "-tab"), {
47
- paddingLeft: 0,
48
- paddingRight: 0
49
- }), "&".concat(token.componentCls, "-padding-x-xxs ").concat(token.componentCls, "-tab"), {
50
- paddingLeft: token.paddingXXS,
51
- paddingRight: token.paddingXXS
52
- }), "&".concat(token.componentCls, "-padding-x-xs ").concat(token.componentCls, "-tab"), {
53
- paddingLeft: token.paddingXS,
54
- paddingRight: token.paddingXS
55
- }), "&".concat(token.componentCls, "-padding-x-sm ").concat(token.componentCls, "-tab"), {
56
- paddingLeft: token.paddingSM,
57
- paddingRight: token.paddingSM
58
- }), "&".concat(token.componentCls, "-padding-x-md ").concat(token.componentCls, "-tab"), {
59
- paddingLeft: token.paddingMD,
60
- paddingRight: token.paddingMD
61
- }), "&".concat(token.componentCls, "-padding-x-lg ").concat(token.componentCls, "-tab"), {
62
- paddingLeft: token.paddingLG,
63
- paddingRight: token.paddingLG
64
- }), "&".concat(token.componentCls, "-padding-y-0 ").concat(token.componentCls, "-tab"), {
65
- paddingTop: 0,
66
- paddingBottom: 0
67
- }), "&".concat(token.componentCls, "-padding-y-xxs ").concat(token.componentCls, "-tab"), {
68
- paddingTop: token.paddingXXS,
69
- paddingBottom: token.paddingXXS
70
- }), "&".concat(token.componentCls, "-padding-y-xs ").concat(token.componentCls, "-tab"), {
71
- paddingTop: token.paddingXS,
72
- paddingBottom: token.paddingXS
73
- }), _defineProperty(_defineProperty(_defineProperty(_$concat, "&".concat(token.componentCls, "-padding-y-sm ").concat(token.componentCls, "-tab"), {
74
- paddingTop: token.paddingSM,
75
- paddingBottom: token.paddingSM
76
- }), "&".concat(token.componentCls, "-padding-y-md ").concat(token.componentCls, "-tab"), {
77
- paddingTop: token.paddingMD,
78
- paddingBottom: token.paddingMD
79
- }), "&".concat(token.componentCls, "-padding-y-lg ").concat(token.componentCls, "-tab"), {
80
- paddingTop: token.paddingLG,
81
- paddingBottom: token.paddingLG
82
46
  }))), "@media screen and (max-width:".concat(token.screenMD, "px)"), _defineProperty({}, "".concat(token.componentCls), _defineProperty(_defineProperty({
83
47
  flexDirection: 'column'
84
48
  }, "&-entry", {
@@ -8,7 +8,7 @@ export type CircleSquareShape = 'circle' | 'square';
8
8
  export type FileSizeUint = 'KB' | 'MB' | 'GB' | 'TB';
9
9
  export type LabelValueType = 'label' | 'value';
10
10
  export type LabelMixinType = LabelValueType | 'code';
11
- export type PaddingSpaceType = WithFalse<'padding-0' | 'padding-xxs' | 'padding-xs' | 'padding-sm' | 'padding-md' | 'padding-lg' | 'padding-x-0' | 'padding-x-xxs' | 'padding-x-xs' | 'padding-x-sm' | 'padding-x-md' | 'padding-x-lg' | 'padding-y-0' | 'padding-y-xxs' | 'padding-y-xs' | 'padding-y-sm' | 'padding-y-md' | 'padding-y-lg'>;
11
+ export type PaddingSpaceType = WithFalse<'padding-0' | 'padding-xxs' | 'padding-xs' | 'padding-sm' | 'padding-md' | 'padding-lg'>;
12
12
  export type ReadonlyTabsType = Exclude<TabsType, 'editable-card'>;
13
13
  export type RectZenithPlace = RcPlacement;
14
14
  export type RequestOptionPlace = BeforeAfterType | 'override';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiovan-labs/ant-buddy-pro",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "title": "Ant Buddy Pro",
5
5
  "description": "Awesome components based on Ant Design & Ant ProComponents",
6
6
  "homepage": "https://jiovan-labs.github.io/ant-buddy-pro",
@@ -40,8 +40,8 @@
40
40
  "docs:publish": "gh-pages -d ./docs-dist",
41
41
  "lint": "npm run lint:script && npm run lint:style",
42
42
  "lint:fix": "npm run lint:script:fix && npm run lint:style:fix",
43
- "lint:script": "eslint \"{src,docs}/**/*.{js,jsx,ts,tsx}\"",
44
- "lint:script:fix": "eslint --fix \"{src,docs}/**/*.{js,jsx,ts,tsx}\"",
43
+ "lint:script": "eslint \"{src,docs,.dumi}/**/*.{js,jsx,ts,tsx}\" --ignore-pattern \".dumi/{tmp,temp}*/**\"",
44
+ "lint:script:fix": "eslint --fix \"{src,docs,.dumi}/**/*.{js,jsx,ts,tsx}\" --ignore-pattern \".dumi/{tmp,temp}*/**\"",
45
45
  "lint:style": "stylelint \"{src,docs}/**/*.{css,less}\"",
46
46
  "lint:style:fix": "stylelint --fix \"{src,docs}/**/*.{css,less}\"",
47
47
  "prepare": "dumi setup",
@@ -53,7 +53,7 @@
53
53
  "@jiovan-labs/ts-lang-utils": "^2.0.1",
54
54
  "@jiovan-labs/ts-multi-map": "^2.0.1",
55
55
  "ahooks": "^3.11.0",
56
- "antd": "^6.7.0",
56
+ "antd": "^6.7.2",
57
57
  "antd-img-crop": "^4.30.0",
58
58
  "antd-style": "^4.1.0",
59
59
  "cron-validate": "^1.5.3",
@@ -73,10 +73,10 @@
73
73
  "@jiovan-labs/babel-plugin-remove-comment": "^2.0.0",
74
74
  "cross-env": "^10.1.0",
75
75
  "del-cli": "^7.0.0",
76
- "dumi": "^2.4.55",
77
- "eslint": "^10.14.0",
78
- "eslint-plugin-jest": "^29.17.0",
79
- "father": "^4.6.41",
76
+ "dumi": "^2.4.57",
77
+ "eslint": "^10.15.0",
78
+ "eslint-plugin-jest": "^29.17.1",
79
+ "father": "^4.6.44",
80
80
  "gh-pages": "^6.3.0",
81
81
  "globals": "^17.14.0",
82
82
  "less": "^4.9.1",
@@ -85,10 +85,10 @@
85
85
  "react-dom": "^19.3.1",
86
86
  "stylelint-config-standard-less": "^4.1.0",
87
87
  "typescript": "^6.0.3",
88
- "typescript-eslint": "^8.72.1"
88
+ "typescript-eslint": "^8.74.0"
89
89
  },
90
90
  "overrides": {
91
- "antd": "^6.7.0",
91
+ "antd": "^6.7.2",
92
92
  "less-loader": "^12.0.0",
93
93
  "react": "^19.3.1",
94
94
  "react-dom": "^19.3.1"