@jiovan-labs/ant-buddy-pro 2.0.0 → 2.0.2

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.
Files changed (40) hide show
  1. package/README.md +1 -2
  2. package/README.zh-CN.md +55 -0
  3. package/README.zh-TW.md +55 -0
  4. package/dist/cjs/field/CountField/index.d.ts +2 -2
  5. package/dist/cjs/field/LabelField/index.d.ts +2 -2
  6. package/dist/cjs/field/ThumbToggle/index.d.ts +2 -2
  7. package/dist/cjs/form/AvatarUpload/index.d.ts +3 -3
  8. package/dist/cjs/form/AvatarUpload/index.js +6 -3
  9. package/dist/cjs/form/CronInput/index.js +6 -3
  10. package/dist/cjs/form/DivideSelect/index.js +17 -15
  11. package/dist/cjs/form/IconSelect/index.js +31 -23
  12. package/dist/cjs/form/TagInput/index.d.ts +1 -1
  13. package/dist/cjs/form/TagInput/index.js +2 -1
  14. package/dist/cjs/layout/CardTabs/index.js +12 -2
  15. package/dist/cjs/layout/CardTabs/styles.js +12 -60
  16. package/dist/cjs/layout/CodePreview/styles.js +0 -48
  17. package/dist/cjs/layout/MenuTabs/styles.js +0 -48
  18. package/dist/cjs/layout/SpaceBox/styles.js +5 -2
  19. package/dist/cjs/type/declaration.d.ts +2 -2
  20. package/dist/cjs/util/FieldUtils.d.ts +2 -2
  21. package/dist/cjs/util/PaginationUtils.js +4 -2
  22. package/dist/esm/field/CountField/index.d.ts +2 -2
  23. package/dist/esm/field/LabelField/index.d.ts +2 -2
  24. package/dist/esm/field/ThumbToggle/index.d.ts +2 -2
  25. package/dist/esm/form/AvatarUpload/index.d.ts +3 -3
  26. package/dist/esm/form/AvatarUpload/index.js +3 -3
  27. package/dist/esm/form/CronInput/index.js +3 -3
  28. package/dist/esm/form/DivideSelect/index.js +22 -16
  29. package/dist/esm/form/IconSelect/index.js +74 -68
  30. package/dist/esm/form/TagInput/index.d.ts +1 -1
  31. package/dist/esm/form/TagInput/index.js +1 -1
  32. package/dist/esm/layout/CardTabs/index.js +13 -3
  33. package/dist/esm/layout/CardTabs/styles.js +12 -48
  34. package/dist/esm/layout/CodePreview/styles.js +3 -40
  35. package/dist/esm/layout/MenuTabs/styles.js +1 -37
  36. package/dist/esm/layout/SpaceBox/styles.js +4 -2
  37. package/dist/esm/type/declaration.d.ts +2 -2
  38. package/dist/esm/util/FieldUtils.d.ts +2 -2
  39. package/dist/esm/util/PaginationUtils.js +2 -2
  40. package/package.json +8 -7
package/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![NPM version](https://img.shields.io/npm/v/@jiovan-labs/ant-buddy-pro.svg?style=flat)](https://npmjs.org/package/@jiovan-labs/ant-buddy-pro)
4
4
  [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.txt)
5
5
  [![NPM downloads](http://img.shields.io/npm/dm/@jiovan-labs/ant-buddy-pro.svg?style=flat)](https://npmjs.org/package/@jiovan-labs/ant-buddy-pro)
6
- [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi)
7
6
 
8
7
  🏅 Awesome components based on Ant Design & Ant ProComponents ❤️
9
8
 
@@ -49,7 +48,7 @@ This project is under the [MIT License](https://mit-license.org/).
49
48
 
50
49
  ## Copyright
51
50
 
52
- Beijing Jiovan Network Technology Ltd.
51
+ Beijing Jiovan Technology Ltd.
53
52
 
54
53
  ## Website
55
54
 
@@ -0,0 +1,55 @@
1
+ # @jiovan-labs/ant-buddy-pro
2
+
3
+ [![NPM 版本](https://img.shields.io/npm/v/@jiovan-labs/ant-buddy-pro.svg?style=flat)](https://npmjs.org/package/@jiovan-labs/ant-buddy-pro)
4
+ [![软件许可证](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.txt)
5
+ [![软件许可证](http://img.shields.io/npm/dm/@jiovan-labs/ant-buddy-pro.svg?style=flat)](https://npmjs.org/package/@jiovan-labs/ant-buddy-pro)
6
+
7
+ 🏅 基于 Ant Design 与 Ant ProComponents 的优质组件库 ❤️
8
+
9
+ **Ant Buddy Pro** 是一个基于 [Ant Design](https://ant.design) 与 [Ant ProComponents](https://procomponents.ant.design) 的 React 组件库,提供了更多可定制、更具个性化的组件,旨在为 React 开发者带来更好的开发体验。
10
+
11
+ ## 特性
12
+
13
+ 🎁 优雅的默认配置,帮助开发者以最简单的方式快速上手
14
+
15
+ 🎄 主题能力,按需定制完整的主题组件,一切尽在掌握
16
+
17
+ 🚀 结合 Umi v4、esbuild、SWC、持久化缓存等方案,带来比 0.x 更快的编译速度
18
+
19
+ 🎨 基于 antd 5.0 的 CSS-in-JS 样式支持,完全统一内置样式,并支持自定义加载主题
20
+
21
+ 🎮 轻松接入、安装即用,完全融入 Ant Design 风格体系
22
+
23
+ ✨ 全面支持 Ant Design v6 与 Pro Components v3,持续改进中
24
+
25
+ ## 快速开始
26
+
27
+ 在您的 React 项目中,可以通过以下方式安装本包:
28
+
29
+ ```bash
30
+ $ npm install @jiovan-labs/ant-buddy-pro --save
31
+ ```
32
+
33
+ 随后,您可以按需引入组件:
34
+
35
+ ```jsx | pure
36
+ import { FooBar } from '@jiovan-labs/ant-buddy-pro';
37
+ ```
38
+
39
+ 愿您在 `ant-buddy-pro` 的陪伴下编码愉快 ✌️
40
+
41
+ ## 文档
42
+
43
+ - GitHub Pages:[https://jiovan-labs.github.io/ant-buddy-pro](https://jiovan-labs.github.io/ant-buddy-pro)
44
+
45
+ ## 开源协议
46
+
47
+ 本项目基于 [MIT License](https://mit-license.org/) 开源。
48
+
49
+ ## 版权
50
+
51
+ 北京玖漫科技有限公司
52
+
53
+ ## 网站
54
+
55
+ - Jiovan:[https://joivan.com](https://joivan.com)
@@ -0,0 +1,55 @@
1
+ # @jiovan-labs/ant-buddy-pro
2
+
3
+ [![NPM 版本](https://img.shields.io/npm/v/@jiovan-labs/ant-buddy-pro.svg?style=flat)](https://npmjs.org/package/@jiovan-labs/ant-buddy-pro)
4
+ [![软件许可证](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.txt)
5
+ [![软件许可证](http://img.shields.io/npm/dm/@jiovan-labs/ant-buddy-pro.svg?style=flat)](https://npmjs.org/package/@jiovan-labs/ant-buddy-pro)
6
+
7
+ 🏅 基於 Ant Design 與 Ant ProComponents 的優質元件庫 ❤️
8
+
9
+ **Ant Buddy Pro** 是一個基於 [Ant Design](https://ant.design) 與 [Ant ProComponents](https://procomponents.ant.design) 的 React 元件庫,提供了更多可客製、更具個性化的元件,旨在為 React 開發者帶來更好的開發體驗。
10
+
11
+ ## 特性
12
+
13
+ 🎁 優雅的預設配置,協助開發者以最簡單的方式快速上手
14
+
15
+ 🎄 主題能力,按需客製完整的主題元件,一切盡在掌握
16
+
17
+ 🚀 結合 Umi v4、esbuild、SWC、持久化快取等方案,帶來比 0.x 更快的編譯速度
18
+
19
+ 🎨 基於 antd 5.0 的 CSS-in-JS 樣式支援,完全統一內建樣式,並支援自訂載入主題
20
+
21
+ 🎮 輕鬆接入、安裝即用,完全融入 Ant Design 風格體系
22
+
23
+ ✨ 全面支援 Ant Design v6 與 Pro Components v3,持續改進中
24
+
25
+ ## 快速開始
26
+
27
+ 在您的 React 專案中,可以透過以下方式安裝本套件:
28
+
29
+ ```bash
30
+ $ npm install @jiovan-labs/ant-buddy-pro --save
31
+ ```
32
+
33
+ 隨後,您可以按需引入元件:
34
+
35
+ ```jsx | pure
36
+ import { FooBar } from '@jiovan-labs/ant-buddy-pro';
37
+ ```
38
+
39
+ 願您在 `ant-buddy-pro` 的陪伴下編碼愉快 ✌️
40
+
41
+ ## 文件
42
+
43
+ - GitHub Pages:[https://jiovan-labs.github.io/ant-buddy-pro](https://jiovan-labs.github.io/ant-buddy-pro)
44
+
45
+ ## 開源授權
46
+
47
+ 本專案基於 [MIT License](https://mit-license.org/) 開源。
48
+
49
+ ## 版權
50
+
51
+ 北京玖漫科技有限公司
52
+
53
+ ## 網站
54
+
55
+ - Jiovan:[https://joivan.com](https://joivan.com)
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type BadgeProps, type TooltipProps } from 'antd';
3
3
  import { type SpaceSize } from 'antd/es/space';
4
- import { type AxisDirectionType } from "../../type/declaration";
4
+ import { type AxisOrientationType } from "../../type/declaration";
5
5
  export type CountFieldRef = {
6
6
  getCount: () => number;
7
7
  setCount: (count: number) => void;
@@ -15,7 +15,7 @@ export type CountFieldProps = React.PropsWithChildren<{
15
15
  field?: React.ReactNode | (() => React.ReactNode | undefined);
16
16
  count?: number;
17
17
  countProps?: Omit<BadgeProps, 'children' | 'color' | 'count' | 'dot' | 'showZero' | 'size' | 'status' | 'text'>;
18
- layout?: AxisDirectionType;
18
+ layout?: AxisOrientationType;
19
19
  showCount?: boolean;
20
20
  spaceSize?: SpaceSize;
21
21
  tooltipCtrl?: boolean;
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  import { type SpaceSize } from 'antd/es/space';
3
- import { type WithFalse, type AxisDirectionType } from "../../type/declaration";
3
+ import { type WithFalse, type AxisOrientationType } from "../../type/declaration";
4
4
  export type LabelPresetStyle = WithFalse<'label-prior' | 'field-prior'>;
5
5
  export type LabelFieldProps = React.PropsWithChildren<{
6
6
  clazzPrefix?: string;
7
7
  containerClazz?: string;
8
8
  containerStyle?: React.CSSProperties;
9
- layout?: AxisDirectionType;
9
+ layout?: AxisOrientationType;
10
10
  label?: React.ReactNode | (() => React.ReactNode | undefined);
11
11
  labelClazz?: string;
12
12
  labelStyle?: React.CSSProperties;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type BadgeProps, type CheckboxProps, type TooltipProps } from 'antd';
3
- import { type AxisDirectionType } from "../../type/declaration";
3
+ import { type AxisOrientationType } from "../../type/declaration";
4
4
  import { type CountFieldRef } from "../CountField";
5
5
  export type ThumbActionType = 'like' | 'dislike' | 'favorite';
6
6
  export type ThumbToggleRef = CountFieldRef & {
@@ -31,7 +31,7 @@ export type ThumbToggleProps = Pick<CheckboxProps, 'checked' | 'defaultChecked'>
31
31
  uncheckedStyle?: React.CSSProperties;
32
32
  count?: number;
33
33
  countProps?: Omit<BadgeProps, 'color' | 'count' | 'dot' | 'showZero' | 'size' | 'status' | 'text'>;
34
- layout?: AxisDirectionType;
34
+ layout?: AxisOrientationType;
35
35
  showCount?: boolean;
36
36
  tooltipCtrl?: boolean;
37
37
  tooltipProps?: Omit<TooltipProps, 'title'>;
@@ -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, "children" | "disabled" | "placeholder" | "fieldProps" | "readonly" | "fieldRef"> & {
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, "shape" | "src" | "srcSet" | "children"> | undefined;
57
- imageProps?: Omit<ImageProps, "height" | "width" | "src" | "srcSet" | "title" | "fallback" | "preview"> | undefined;
56
+ avatarProps?: Omit<AvatarProps, "children" | "shape" | "src" | "srcSet"> | undefined;
57
+ imageProps?: Omit<ImageProps, "title" | "width" | "height" | "src" | "srcSet" | "fallback" | "preview"> | undefined;
58
58
  uploadEnabled?: boolean | undefined;
59
59
  uploadProps?: FileUploadProps | undefined;
60
60
  cropEnabled?: boolean | undefined;
@@ -90,11 +90,13 @@ var AvatarUploadField = import_react.default.forwardRef((props, ref) => {
90
90
  var _a, _b, _c, _d, _e, _f, _g, _h;
91
91
  if (((_a = props == null ? void 0 : props.uploadProps) == null ? void 0 : _a.allowedFileTypes) && !props.uploadProps.allowedFileTypes.some((item) => file.type === item)) {
92
92
  if (!((_b = props == null ? void 0 : props.uploadProps) == null ? void 0 : _b.warnWithTypes)) {
93
- messageApi.error(import_ts_lang_utils.ObjectUtils.firstNotNil((_c = props == null ? void 0 : props.localeProps) == null ? void 0 : _c.disallowType, import_locales.intlLocales.get([locale, "disallowType"]), import_locales.intlLocales.get(["en_US", "disallowType"])));
93
+ messageApi.error(import_ts_lang_utils.ObjectUtils.firstNotNil((_c = props == null ? void 0 : props.localeProps) == null ? void 0 : _c.disallowType, import_locales.intlLocales.get([locale, "disallowType"]), import_locales.intlLocales.get(["en_US", "disallowType"]))).then(() => {
94
+ });
94
95
  } else {
95
96
  const template = import_ts_lang_utils.ObjectUtils.firstNotNil((_d = props == null ? void 0 : props.localeProps) == null ? void 0 : _d.allowTypes, import_locales.intlLocales.get([locale, "allowTypes"]), import_locales.intlLocales.get(["en_US", "allowTypes"]));
96
97
  const types = import_ts_lang_utils.StringUtils.join(props.uploadProps.allowedFileTypes.map((item) => item === "image/jpeg" ? "jpg" : import_ts_lang_utils.StringUtils.substringAfterLast(item, "/")), "/");
97
- messageApi.error(import_ts_lang_utils.StringUtils.formatBrace(template, types));
98
+ messageApi.error(import_ts_lang_utils.StringUtils.formatBrace(template, types)).then(() => {
99
+ });
98
100
  }
99
101
  return false;
100
102
  }
@@ -118,7 +120,8 @@ var AvatarUploadField = import_react.default.forwardRef((props, ref) => {
118
120
  }
119
121
  if (fileSize > props.uploadProps.maxFileSize) {
120
122
  const template = import_ts_lang_utils.ObjectUtils.firstNotNil((_g = props == null ? void 0 : props.localeProps) == null ? void 0 : _g.maxFileSize, import_locales.intlLocales.get([locale, "maxFileSize"]), import_locales.intlLocales.get(["en_US", "maxFileSize"]));
121
- messageApi.error(import_ts_lang_utils.StringUtils.formatBrace(template, props.uploadProps.maxFileSize, props.uploadProps.fileSizeUint));
123
+ messageApi.error(import_ts_lang_utils.StringUtils.formatBrace(template, props.uploadProps.maxFileSize, props.uploadProps.fileSizeUint)).then(() => {
124
+ });
122
125
  return false;
123
126
  }
124
127
  }
@@ -301,7 +301,8 @@ var CronInput = import_react.default.forwardRef((props, ref) => {
301
301
  if (validateRule && !!event.target.value) {
302
302
  const validate = (0, import_cron_validate.default)(event.target.value, validateOptions);
303
303
  if (validate.isError()) {
304
- messageInvoker.warning(import_ts_lang_utils.ObjectUtils.firstNotNil((_c3 = props == null ? void 0 : props.localeProps) == null ? void 0 : _c3.invalidExpress, import_locales.intlLocales.get([locale, "invalidExpress"]), import_locales.intlLocales.get(["en_US", "invalidExpress"])));
304
+ messageInvoker.warning(import_ts_lang_utils.ObjectUtils.firstNotNil((_c3 = props == null ? void 0 : props.localeProps) == null ? void 0 : _c3.invalidExpress, import_locales.intlLocales.get([locale, "invalidExpress"]), import_locales.intlLocales.get(["en_US", "invalidExpress"]))).then(() => {
305
+ });
305
306
  }
306
307
  }
307
308
  setIncomeExpress(event.target.value);
@@ -515,7 +516,8 @@ var CronInput = import_react.default.forwardRef((props, ref) => {
515
516
  setShowSecond(checked);
516
517
  const rawName = (props == null ? void 0 : props.name) ?? ((_a3 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _a3.name);
517
518
  if (validateRule && rawName && form && form.getFieldValue(rawName)) {
518
- form.validateFields([rawName]);
519
+ form.validateFields([rawName]).then(() => {
520
+ });
519
521
  }
520
522
  }
521
523
  }
@@ -532,7 +534,8 @@ var CronInput = import_react.default.forwardRef((props, ref) => {
532
534
  setShowYear(checked);
533
535
  const rawName = (props == null ? void 0 : props.name) ?? ((_a3 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _a3.name);
534
536
  if (validateRule && rawName && form && form.getFieldValue(rawName)) {
535
- form.validateFields([rawName]);
537
+ form.validateFields([rawName]).then(() => {
538
+ });
536
539
  }
537
540
  }
538
541
  }
@@ -43,7 +43,7 @@ var import_FieldUtils = require("../../util/FieldUtils");
43
43
  var import_styles = require("./styles");
44
44
  var import_jsx_runtime = require("react/jsx-runtime");
45
45
  var DivideSelect = (props) => {
46
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
46
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
47
47
  const form = import_antd.Form.useFormInstance();
48
48
  const clazzPrefix = (props == null ? void 0 : props.clazzPrefix) ?? "abp-divide-select";
49
49
  const {
@@ -53,6 +53,10 @@ var DivideSelect = (props) => {
53
53
  presetStyle = "before-prior"
54
54
  } = props ?? {};
55
55
  const fieldStyle = (0, import_styles.useFieldStyle)(clazzPrefix);
56
+ const userClassNames = (_a = props == null ? void 0 : props.fieldProps) == null ? void 0 : _a.classNames;
57
+ const resolvedClassNames = typeof userClassNames === "function" ? userClassNames({ props: (props == null ? void 0 : props.fieldProps) ?? {} }) : userClassNames;
58
+ const userRootClassName = resolvedClassNames == null ? void 0 : resolvedClassNames.root;
59
+ const userPopupRootClassName = (_b = resolvedClassNames == null ? void 0 : resolvedClassNames.popup) == null ? void 0 : _b.root;
56
60
  const [optionItems, setOptionItems] = import_react.default.useState(() => {
57
61
  var _a2;
58
62
  const rawOptions = ((_a2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _a2.options) ?? [];
@@ -144,24 +148,23 @@ var DivideSelect = (props) => {
144
148
  ...restProps,
145
149
  fieldProps: {
146
150
  classNames: {
147
- // @ts-ignore
148
- root: (0, import_classnames.default)(clazzPrefix, (_b = (_a = props == null ? void 0 : props.fieldProps) == null ? void 0 : _a.classNames) == null ? void 0 : _b.root),
151
+ root: (0, import_classnames.default)(clazzPrefix, userRootClassName),
149
152
  popup: {
150
- root: (0, import_classnames.default)(`${clazzPrefix}-popup`, fieldStyle.hashId, (_e = (_d = (_c = props == null ? void 0 : props.fieldProps) == null ? void 0 : _c.classNames) == null ? void 0 : _d.popup) == null ? void 0 : _e.root)
153
+ root: (0, import_classnames.default)(`${clazzPrefix}-popup`, fieldStyle.hashId, userPopupRootClassName)
151
154
  }
152
155
  },
153
156
  options: optionItems,
154
157
  optionRender: (item) => renderOption(item),
155
- optionLabelProp: ((_f = props == null ? void 0 : props.fieldProps) == null ? void 0 : _f.optionLabelProp) ?? "label",
158
+ optionLabelProp: ((_c = props == null ? void 0 : props.fieldProps) == null ? void 0 : _c.optionLabelProp) ?? "label",
156
159
  ...omitFieldProps
157
160
  },
158
161
  proFieldProps: {
159
- ...((_g = props == null ? void 0 : props.fieldProps) == null ? void 0 : _g.optionLabelProp) === (((_i = (_h = props == null ? void 0 : props.fieldProps) == null ? void 0 : _h.fieldNames) == null ? void 0 : _i.value) ?? "value") ? {
160
- render: ((_j = props == null ? void 0 : props.proFieldProps) == null ? void 0 : _j.render) ?? ((dom) => {
162
+ ...((_d = props == null ? void 0 : props.fieldProps) == null ? void 0 : _d.optionLabelProp) === (((_f = (_e = props == null ? void 0 : props.fieldProps) == null ? void 0 : _e.fieldNames) == null ? void 0 : _f.value) ?? "value") ? {
163
+ render: ((_g = props == null ? void 0 : props.proFieldProps) == null ? void 0 : _g.render) ?? ((dom) => {
161
164
  var _a2;
162
165
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: dom || ((_a2 = props == null ? void 0 : props.proFieldProps) == null ? void 0 : _a2.emptyText) || "-" });
163
166
  })
164
- } : !((_k = props == null ? void 0 : props.proFieldProps) == null ? void 0 : _k.render) ? {} : { render: (_l = props == null ? void 0 : props.proFieldProps) == null ? void 0 : _l.render },
167
+ } : !((_h = props == null ? void 0 : props.proFieldProps) == null ? void 0 : _h.render) ? {} : { render: (_i = props == null ? void 0 : props.proFieldProps) == null ? void 0 : _i.render },
165
168
  ...!(props == null ? void 0 : props.proFieldProps) ? {} : (0, import_util.omit)(props == null ? void 0 : props.proFieldProps, ["render"])
166
169
  }
167
170
  }
@@ -172,7 +175,7 @@ var DivideSelect = (props) => {
172
175
  return void 0;
173
176
  }
174
177
  return optionItems.map((item, index) => {
175
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
178
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m, _n;
176
179
  if (!item) {
177
180
  return void 0;
178
181
  }
@@ -200,7 +203,7 @@ var DivideSelect = (props) => {
200
203
  ...(0, import_util.omit)(item, (item == null ? void 0 : item.optionType) === "optGroup" ? ["label", "value", "optionType", "children"] : ["label"])
201
204
  };
202
205
  import_ts_lang_utils.ObjectUtils.setProp(result, ((_j2 = (_i2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _i2.fieldNames) == null ? void 0 : _j2.label) ?? "label", renderOption(item, `option-${index}`));
203
- import_ts_lang_utils.ObjectUtils.setProp(result, `${((_l2 = (_k2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _k2.fieldNames) == null ? void 0 : _l2.label) ?? "label"}Origin`, import_ts_lang_utils.ObjectUtils.getProp(item, (_n2 = (_m2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _m2.fieldNames) == null ? void 0 : _n2.label) ?? (item == null ? void 0 : item.label));
206
+ import_ts_lang_utils.ObjectUtils.setProp(result, `${((_l2 = (_k2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _k2.fieldNames) == null ? void 0 : _l2.label) ?? "label"}Origin`, import_ts_lang_utils.ObjectUtils.getProp(item, (_n = (_m = props == null ? void 0 : props.fieldProps) == null ? void 0 : _m.fieldNames) == null ? void 0 : _n.label) ?? (item == null ? void 0 : item.label));
204
207
  if ((item == null ? void 0 : item.optionType) === "optGroup" && (item == null ? void 0 : item.children)) {
205
208
  import_ts_lang_utils.ObjectUtils.setProp(result, "options", item.children);
206
209
  }
@@ -212,15 +215,14 @@ var DivideSelect = (props) => {
212
215
  import_antd.Select,
213
216
  {
214
217
  classNames: {
215
- // @ts-ignore
216
- root: (0, import_classnames.default)(clazzPrefix, (_n = (_m = props == null ? void 0 : props.fieldProps) == null ? void 0 : _m.classNames) == null ? void 0 : _n.root),
218
+ root: (0, import_classnames.default)(clazzPrefix, userRootClassName),
217
219
  popup: {
218
- root: (0, import_classnames.default)(`${clazzPrefix}-popup`, fieldStyle.hashId, (_q = (_p = (_o = props == null ? void 0 : props.fieldProps) == null ? void 0 : _o.classNames) == null ? void 0 : _p.popup) == null ? void 0 : _q.root)
220
+ root: (0, import_classnames.default)(`${clazzPrefix}-popup`, fieldStyle.hashId, userPopupRootClassName)
219
221
  }
220
222
  },
221
- placeholder: import_ts_lang_utils.StringUtils.join(props == null ? void 0 : props.placeholder) ?? ((_r = props == null ? void 0 : props.fieldProps) == null ? void 0 : _r.placeholder),
223
+ placeholder: import_ts_lang_utils.StringUtils.join(props == null ? void 0 : props.placeholder) ?? ((_j = props == null ? void 0 : props.fieldProps) == null ? void 0 : _j.placeholder),
222
224
  options: (!presetStyle ? optionItems : rebuildOptions()) ?? [],
223
- optionLabelProp: !((_s = props == null ? void 0 : props.fieldProps) == null ? void 0 : _s.optionLabelProp) || props.fieldProps.optionLabelProp === "label" ? "labelOrigin" : ((_t = props == null ? void 0 : props.fieldProps) == null ? void 0 : _t.optionLabelProp) ?? "value",
225
+ optionLabelProp: !((_k = props == null ? void 0 : props.fieldProps) == null ? void 0 : _k.optionLabelProp) || props.fieldProps.optionLabelProp === "label" ? "labelOrigin" : ((_l = props == null ? void 0 : props.fieldProps) == null ? void 0 : _l.optionLabelProp) ?? "value",
224
226
  onChange: (event) => {
225
227
  var _a2, _b2;
226
228
  if (props == null ? void 0 : props.name) {
@@ -53,7 +53,7 @@ var import_locales = require("./locales");
53
53
  var import_styles = require("./styles");
54
54
  var import_jsx_runtime = require("react/jsx-runtime");
55
55
  var IconSelect = (props) => {
56
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
56
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
57
57
  const configContext = import_react.default.useContext(import_antd.ConfigProvider.ConfigContext);
58
58
  const editContext = import_react.default.useContext(import_EditOrReadOnlyContext.EditOrReadOnlyContext);
59
59
  const clazzPrefix = (props == null ? void 0 : props.clazzPrefix) ?? "abp-icon-select";
@@ -82,6 +82,10 @@ var IconSelect = (props) => {
82
82
  const [searchDisabled, setSearchDisabled] = import_react.default.useState(false);
83
83
  const searchRef = import_react.default.useRef(null);
84
84
  const fieldStyle = (0, import_styles.useFieldStyle)(clazzPrefix, subClazzPrefix);
85
+ const userClassNames = (_d = props == null ? void 0 : props.fieldProps) == null ? void 0 : _d.classNames;
86
+ const resolvedClassNames = typeof userClassNames === "function" ? userClassNames({ props: (props == null ? void 0 : props.fieldProps) ?? {} }) : userClassNames;
87
+ const userRootClassName = resolvedClassNames == null ? void 0 : resolvedClassNames.root;
88
+ const userPopupRootClassName = (_e = resolvedClassNames == null ? void 0 : resolvedClassNames.popup) == null ? void 0 : _e.root;
85
89
  const handleWindowResize = () => {
86
90
  const inspect = document.querySelector(`.${clazzPrefix}-entry-${fieldId}`);
87
91
  const sponsor = document.querySelector(`.${clazzPrefix}-popup-${fieldId}`);
@@ -169,7 +173,7 @@ var IconSelect = (props) => {
169
173
  }
170
174
  };
171
175
  const handleIconClick = (iconName) => {
172
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E;
176
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E;
173
177
  if (import_ts_lang_utils.StringUtils.isBlank(iconName)) {
174
178
  return;
175
179
  }
@@ -189,7 +193,8 @@ var IconSelect = (props) => {
189
193
  });
190
194
  if (form && (props == null ? void 0 : props.name)) {
191
195
  form.setFieldValue(props.name, result);
192
- form.validateFields([props.name]);
196
+ form.validateFields([props.name]).then(() => {
197
+ });
193
198
  }
194
199
  (_g2 = (_f2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _f2.onChange) == null ? void 0 : _g2.call(_f2, result, {
195
200
  label: iconName,
@@ -198,7 +203,8 @@ var IconSelect = (props) => {
198
203
  } else {
199
204
  if (form && (props == null ? void 0 : props.name)) {
200
205
  form.setFieldValue(props.name, void 0);
201
- form.validateFields([props.name]);
206
+ form.validateFields([props.name]).then(() => {
207
+ });
202
208
  }
203
209
  (_i2 = (_h2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _h2.onChange) == null ? void 0 : _i2.call(_h2, void 0, {
204
210
  label: iconName,
@@ -208,7 +214,8 @@ var IconSelect = (props) => {
208
214
  } else {
209
215
  if (form && (props == null ? void 0 : props.name)) {
210
216
  form.setFieldValue(props.name, void 0);
211
- form.validateFields([props.name]);
217
+ form.validateFields([props.name]).then(() => {
218
+ });
212
219
  }
213
220
  (_k2 = (_j2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _j2.onChange) == null ? void 0 : _k2.call(_j2, void 0, {
214
221
  label: iconName,
@@ -217,8 +224,8 @@ var IconSelect = (props) => {
217
224
  setDropdownOpen(false);
218
225
  }
219
226
  } else {
220
- if (((_l2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _l2.mode) === "multiple" || ((_m2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _m2.mode) === "tags") {
221
- (_o2 = (_n2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _n2.onSelect) == null ? void 0 : _o2.call(_n2, iconName, {
227
+ if (((_l = props == null ? void 0 : props.fieldProps) == null ? void 0 : _l.mode) === "multiple" || ((_m = props == null ? void 0 : props.fieldProps) == null ? void 0 : _m.mode) === "tags") {
228
+ (_o = (_n = props == null ? void 0 : props.fieldProps) == null ? void 0 : _n.onSelect) == null ? void 0 : _o.call(_n, iconName, {
222
229
  label: iconName,
223
230
  value: iconName
224
231
  });
@@ -227,8 +234,8 @@ var IconSelect = (props) => {
227
234
  }
228
235
  changeIconBadge(iconName, true);
229
236
  const fieldValue = form == null ? void 0 : form.getFieldValue(props == null ? void 0 : props.name);
230
- if (fieldValue && (((_p2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _p2.mode) === "multiple" || ((_q2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _q2.mode) === "tags")) {
231
- if ((_r2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _r2.labelInValue) {
237
+ if (fieldValue && (((_p = props == null ? void 0 : props.fieldProps) == null ? void 0 : _p.mode) === "multiple" || ((_q = props == null ? void 0 : props.fieldProps) == null ? void 0 : _q.mode) === "tags")) {
238
+ if ((_r = props == null ? void 0 : props.fieldProps) == null ? void 0 : _r.labelInValue) {
232
239
  const value = {
233
240
  label: iconName,
234
241
  value: iconName
@@ -236,9 +243,10 @@ var IconSelect = (props) => {
236
243
  const newValue = [...fieldValue, value];
237
244
  if (form && (props == null ? void 0 : props.name)) {
238
245
  form.setFieldValue(props.name, newValue);
239
- form.validateFields([props.name]);
246
+ form.validateFields([props.name]).then(() => {
247
+ });
240
248
  }
241
- (_t = (_s2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _s2.onChange) == null ? void 0 : _t.call(_s2, newValue, {
249
+ (_t = (_s = props == null ? void 0 : props.fieldProps) == null ? void 0 : _s.onChange) == null ? void 0 : _t.call(_s, newValue, {
242
250
  label: iconName,
243
251
  value: iconName
244
252
  });
@@ -246,7 +254,8 @@ var IconSelect = (props) => {
246
254
  const newValue = [...fieldValue, iconName];
247
255
  if (form && (props == null ? void 0 : props.name)) {
248
256
  form.setFieldValue(props.name, newValue);
249
- form.validateFields([props.name]);
257
+ form.validateFields([props.name]).then(() => {
258
+ });
250
259
  }
251
260
  (_v = (_u = props == null ? void 0 : props.fieldProps) == null ? void 0 : _u.onChange) == null ? void 0 : _v.call(_u, newValue, {
252
261
  label: iconName,
@@ -266,7 +275,8 @@ var IconSelect = (props) => {
266
275
  }
267
276
  if (form && (props == null ? void 0 : props.name)) {
268
277
  form.setFieldValue(props.name, newValue);
269
- form.validateFields([props.name]);
278
+ form.validateFields([props.name]).then(() => {
279
+ });
270
280
  }
271
281
  (_C = (_B = props == null ? void 0 : props.fieldProps) == null ? void 0 : _B.onChange) == null ? void 0 : _C.call(_B, newValue, {
272
282
  label: iconName,
@@ -489,7 +499,7 @@ var IconSelect = (props) => {
489
499
  setDropdownOpen(open);
490
500
  (_b2 = (_a2 = props == null ? void 0 : props.fieldProps) == null ? void 0 : _a2.onOpenChange) == null ? void 0 : _b2.call(_a2, open);
491
501
  };
492
- const entryImmutable = editContext.mode === "read" || ((_d = props == null ? void 0 : props.fieldProps) == null ? void 0 : _d.disabled) || ((_e = props == null ? void 0 : props.proFieldProps) == null ? void 0 : _e.mode) === "read" || ((_f = props == null ? void 0 : props.proFieldProps) == null ? void 0 : _f.readonly);
502
+ const entryImmutable = editContext.mode === "read" || ((_f = props == null ? void 0 : props.fieldProps) == null ? void 0 : _f.disabled) || ((_g = props == null ? void 0 : props.proFieldProps) == null ? void 0 : _g.mode) === "read" || ((_h = props == null ? void 0 : props.proFieldProps) == null ? void 0 : _h.readonly);
493
503
  const omitFieldProps = !(props == null ? void 0 : props.fieldProps) ? {} : (0, import_util.omit)(props == null ? void 0 : props.fieldProps, ["classNames", "disabled", "open", "virtual", "onClear", "onDeselect", "onOpenChange"]);
494
504
  if (proField) {
495
505
  const restProps = !props ? {} : (0, import_util.omit)(props, ["fieldProps", "clazzPrefix", "optionMode", "optionGroup", "proField", "tabsProps", "themeTypes", "defaultThemeType", "themeInkBar", "sceneTypes", "defaultSceneType", "sceneInkBar", "sceneEntryWidth", "optionWrapperClazz", "optionWrapperStyle", "optionIconClazz", "optionIconStyle", "searchBox", "tooltipCtrl", "tooltipProps", "locale", "localeProps"]);
@@ -499,16 +509,15 @@ var IconSelect = (props) => {
499
509
  ...restProps,
500
510
  fieldProps: {
501
511
  classNames: {
502
- // @ts-ignore
503
- root: (0, import_classnames.default)(clazzPrefix, `${clazzPrefix}-entry-${fieldId}`, (_h = (_g = props == null ? void 0 : props.fieldProps) == null ? void 0 : _g.classNames) == null ? void 0 : _h.root),
512
+ root: (0, import_classnames.default)(clazzPrefix, `${clazzPrefix}-entry-${fieldId}`, userRootClassName),
504
513
  popup: {
505
- root: (0, import_classnames.default)(`${clazzPrefix}-popup`, fieldStyle.hashId, `${clazzPrefix}-popup-${fieldId}`, (_k = (_j = (_i = props == null ? void 0 : props.fieldProps) == null ? void 0 : _i.classNames) == null ? void 0 : _j.popup) == null ? void 0 : _k.root)
514
+ root: (0, import_classnames.default)(`${clazzPrefix}-popup`, fieldStyle.hashId, `${clazzPrefix}-popup-${fieldId}`, userPopupRootClassName)
506
515
  }
507
516
  },
508
517
  disabled: entryImmutable,
509
518
  popupRender: optionMode === "text" || !themeTypes || !sceneTypes || entryImmutable ? void 0 : () => renderDropdown(),
510
519
  options: textOptions,
511
- virtual: ((_l = props == null ? void 0 : props.fieldProps) == null ? void 0 : _l.virtual) ?? false,
520
+ virtual: ((_i = props == null ? void 0 : props.fieldProps) == null ? void 0 : _i.virtual) ?? false,
512
521
  open: dropdownOpen,
513
522
  showSearch: false,
514
523
  onClear: handleOptionClear,
@@ -526,17 +535,16 @@ var IconSelect = (props) => {
526
535
  import_antd.Select,
527
536
  {
528
537
  classNames: {
529
- // @ts-ignore
530
- root: (0, import_classnames.default)(clazzPrefix, `${clazzPrefix}-entry-${fieldId}`, (_n = (_m = props == null ? void 0 : props.fieldProps) == null ? void 0 : _m.classNames) == null ? void 0 : _n.root),
538
+ root: (0, import_classnames.default)(clazzPrefix, `${clazzPrefix}-entry-${fieldId}`, userRootClassName),
531
539
  popup: {
532
- root: (0, import_classnames.default)(`${clazzPrefix}-popup`, fieldStyle.hashId, `${clazzPrefix}-popup-${fieldId}`, (_q = (_p = (_o = props == null ? void 0 : props.fieldProps) == null ? void 0 : _o.classNames) == null ? void 0 : _p.popup) == null ? void 0 : _q.root)
540
+ root: (0, import_classnames.default)(`${clazzPrefix}-popup`, fieldStyle.hashId, `${clazzPrefix}-popup-${fieldId}`, userPopupRootClassName)
533
541
  }
534
542
  },
535
- placeholder: import_ts_lang_utils.StringUtils.join(props == null ? void 0 : props.placeholder) ?? ((_r = props == null ? void 0 : props.fieldProps) == null ? void 0 : _r.placeholder),
543
+ placeholder: import_ts_lang_utils.StringUtils.join(props == null ? void 0 : props.placeholder) ?? ((_j = props == null ? void 0 : props.fieldProps) == null ? void 0 : _j.placeholder),
536
544
  disabled: entryImmutable,
537
545
  popupRender: optionMode === "text" || !themeTypes || !sceneTypes || entryImmutable ? void 0 : () => renderDropdown(),
538
546
  options: textOptions,
539
- virtual: ((_s = props == null ? void 0 : props.fieldProps) == null ? void 0 : _s.virtual) ?? false,
547
+ virtual: ((_k = props == null ? void 0 : props.fieldProps) == null ? void 0 : _k.virtual) ?? false,
540
548
  open: dropdownOpen,
541
549
  showSearch: false,
542
550
  onClear: handleOptionClear,
@@ -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, "children" | "disabled" | "placeholder" | "fieldProps" | "readonly" | "fieldRef"> & 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;
@@ -207,7 +207,8 @@ var TagInputField = import_react.default.forwardRef((props, ref) => {
207
207
  setTagContents(contents);
208
208
  } else {
209
209
  if (warnExists && !proField) {
210
- messageInvoker.warning(import_ts_lang_utils.ObjectUtils.firstNotNil((_a2 = props == null ? void 0 : props.localeProps) == null ? void 0 : _a2.tagExists, import_locales.intlLocales.get([locale, "tagExists"]), import_locales.intlLocales.get(["en_US", "tagExists"])));
210
+ messageInvoker.warning(import_ts_lang_utils.ObjectUtils.firstNotNil((_a2 = props == null ? void 0 : props.localeProps) == null ? void 0 : _a2.tagExists, import_locales.intlLocales.get([locale, "tagExists"]), import_locales.intlLocales.get(["en_US", "tagExists"]))).then(() => {
211
+ });
211
212
  }
212
213
  }
213
214
  }
@@ -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
  };