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

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.
@@ -8,19 +8,28 @@ 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
- return _defineProperty(_defineProperty({}, "".concat(token.componentCls, "-popup"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
11
+ return _defineProperty(_defineProperty(_defineProperty({}, "".concat(token.componentCls, "-popup"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
12
12
  backgroundColor: token.colorBgContainer,
13
13
  borderRadius: token.borderRadiusLG,
14
14
  boxShadow: token.boxShadow,
15
15
  zIndex: token.zIndexPopupBase
16
- }, "".concat(token.componentCls, "-popup-list"), _defineProperty({}, "".concat(token.componentCls, "-popup-list-item"), _defineProperty(_defineProperty(_defineProperty({}, "&:hover", {
16
+ }, "".concat(token.componentCls, "-popup-list"), _defineProperty(_defineProperty(_defineProperty({}, "&".concat(token.componentCls, "-popup-list-bordered"), {
17
+ border: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
18
+ borderRadius: token.borderRadiusLG
19
+ }), "".concat(token.componentCls, "-popup-listy-item"), _defineProperty({
20
+ borderBottom: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit)
21
+ }, "&:last-of-type", {
22
+ borderBottom: 'none'
23
+ })), "".concat(token.componentCls, "-popup-list-item"), _defineProperty(_defineProperty(_defineProperty({}, "&:hover", {
17
24
  backgroundColor: token.controlItemBgHover
18
25
  }), "> ".concat(token.antCls, "-form-item"), {
19
26
  width: '100%'
20
27
  }), "".concat(token.componentCls, "-locale-tag"), {
21
28
  color: token.colorTextSecondary,
22
29
  fontSize: token.fontSize - 1
23
- }))), "&".concat(token.componentCls, "-popup-immutable ").concat(token.componentCls, "-popup-list ").concat(token.componentCls, "-popup-list-item ").concat(token.antCls, "-form-item"), _defineProperty(_defineProperty(_defineProperty({
30
+ }))), "&".concat(token.componentCls, "-popup-pro-field ").concat(token.componentCls, "-popup-listy-item"), {
31
+ paddingBottom: 0
32
+ }), "&".concat(token.componentCls, "-popup-immutable ").concat(token.componentCls, "-popup-list ").concat(token.componentCls, "-popup-list-item ").concat(token.antCls, "-form-item"), _defineProperty(_defineProperty(_defineProperty({
24
33
  marginBottom: "0 !important"
25
34
  }, "".concat(token.componentCls, "-locale-tag"), {
26
35
  backgroundColor: token.controlItemBgHover,
@@ -51,11 +60,10 @@ var buildFieldStyle = function buildFieldStyle(token) {
51
60
  color: token.colorTextSecondary,
52
61
  padding: "2px ".concat(token.paddingXS, "px"),
53
62
  fontSize: token.fontSizeSM
54
- })), "&".concat(token.componentCls, "-popup-pro-field:not(").concat(token.componentCls, "-popup-immutable)"), _defineProperty({}, "".concat(token.componentCls, "-popup-list ").concat(token.componentCls, "-popup-list-item:first-of-type"), {
55
- paddingTop: token.paddingMD
56
- })), "&:not(".concat(token.componentCls, "-popup-pro-field)"), _defineProperty({}, "".concat(token.componentCls, "-popup-list ").concat(token.componentCls, "-popup-list-item:first-of-type"), {
57
- paddingTop: token.paddingXS
58
- }))), "".concat(token.componentCls, "-entry-readonly"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
63
+ }))), "".concat(token.componentCls, "-entry-addon-disabled"), {
64
+ color: token.colorTextDisabled,
65
+ cursor: 'not-allowed'
66
+ }), "".concat(token.componentCls, "-entry-readonly"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
59
67
  display: 'flex',
60
68
  flexFlow: 'row nowrap',
61
69
  alignItems: 'center'
@@ -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" | "fieldProps" | "placeholder" | "readonly" | "fieldRef"> & Omit<ProFormFieldRemoteProps, "request" | "valueEnum"> & {
39
+ export declare const TagInput: React.ForwardRefExoticComponent<Omit<ProFormFieldItemProps, "children" | "placeholder" | "fieldProps" | "disabled" | "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";
@@ -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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiovan-labs/ant-buddy-pro",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
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",
@@ -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",
@@ -67,16 +67,16 @@
67
67
  "@eslint/eslintrc": "^3.3.7",
68
68
  "@eslint/js": "^10.0.1",
69
69
  "@types/object-hash": "^3.0.6",
70
- "@types/react": "^19.3.0",
70
+ "@types/react": "^19.3.2",
71
71
  "@types/react-dom": "^19.3.0",
72
72
  "@types/zxcvbn": "^4.4.5",
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"