@para-ui/core 4.0.10 → 4.0.11

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.
@@ -20,6 +20,8 @@ export interface DescriptionsProps {
20
20
  className?: string;
21
21
  /** style */
22
22
  style?: React.CSSProperties;
23
+ /** 横向padding设置 */
24
+ paddingRight?: number | string;
23
25
  /** 布局 */
24
26
  layout?: 'horizontal' | 'vertical';
25
27
  /** 是否展示边框 */
@@ -8,6 +8,7 @@ import clsx from 'clsx';
8
8
  import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
9
9
  import { u as useFormatMessage } from '../_verture/useFormatMessage-eb13cf56.js';
10
10
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
11
+ import { pixelReplacement } from '../Utils/index.js';
11
12
  import '../Help/index.js';
12
13
  import '../_verture/tslib.es6-55ed4bd2.js';
13
14
  import '../Tooltip/index.js';
@@ -44,13 +45,14 @@ var localeJson = {
44
45
  en
45
46
  };
46
47
 
47
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/11/9 14:21\n* @description 样式\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-descriptions .paraui-v4-title {\n margin-bottom: 20px;\n}\n.paraui-v4-descriptions .table-box {\n display: inline-flex;\n}\n.paraui-v4-descriptions .table-box > table {\n table-layout: fixed;\n width: 100%;\n}\n.paraui-v4-descriptions .table-box > table > tbody > tr {\n text-align: left;\n}\n.paraui-v4-descriptions .table-box > table > tbody > tr th, .paraui-v4-descriptions .table-box > table > tbody > tr .title {\n color: rgb(92, 101, 115);\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-v4-descriptions .table-box > table > tbody > tr td, .paraui-v4-descriptions .table-box > table > tbody > tr .content {\n color: rgb(29, 33, 38);\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-v4-descriptions .collapse-btn {\n margin: 0;\n height: 20px;\n line-height: 20px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box {\n border: 1px solid rgb(212, 218, 227);\n overflow: hidden;\n border-radius: 4px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table {\n border-collapse: collapse;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr {\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr:last-child {\n border-bottom: none;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > th {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > th, .paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > td {\n height: 40px;\n border-right: 1px solid rgb(212, 218, 227);\n padding: 0 10px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > th:last-child, .paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > td:last-child {\n border-right: none;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-horizontal .table-box > table > tbody > tr > td > .item-container {\n display: flex;\n padding-bottom: 10px;\n padding-right: 40px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-horizontal .table-box > table > tbody > tr > td > .item-container > .title {\n display: flex;\n overflow: hidden;\n max-width: 50%;\n margin-right: 10px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-horizontal .table-box > table > tbody > tr > td > .item-container > .content {\n flex: 1;\n overflow: hidden;\n}";
48
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/11/9 14:21\n* @description 样式\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-descriptions .paraui-v4-title {\n margin-bottom: 20px;\n}\n.paraui-v4-descriptions .table-box {\n display: inline-flex;\n}\n.paraui-v4-descriptions .table-box > table {\n table-layout: fixed;\n width: 100%;\n}\n.paraui-v4-descriptions .table-box > table > tbody > tr {\n text-align: left;\n}\n.paraui-v4-descriptions .table-box > table > tbody > tr th, .paraui-v4-descriptions .table-box > table > tbody > tr .title {\n color: rgb(92, 101, 115);\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-v4-descriptions .table-box > table > tbody > tr td, .paraui-v4-descriptions .table-box > table > tbody > tr .content {\n color: rgb(29, 33, 38);\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-v4-descriptions .collapse-btn {\n margin: 0;\n height: 20px;\n line-height: 20px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box {\n border: 1px solid rgb(212, 218, 227);\n overflow: hidden;\n border-radius: 4px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table {\n border-collapse: collapse;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr {\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr:last-child {\n border-bottom: none;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > th {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > th, .paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > td {\n height: 40px;\n border-right: 1px solid rgb(212, 218, 227);\n padding: 0 10px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > th:last-child, .paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > td:last-child {\n border-right: none;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-horizontal .table-box > table > tbody > tr > td > .item-container {\n display: flex;\n padding-bottom: 10px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-horizontal .table-box > table > tbody > tr > td > .item-container > .title {\n display: flex;\n overflow: hidden;\n max-width: 50%;\n margin-right: 10px;\n line-height: 20px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-horizontal .table-box > table > tbody > tr > td > .item-container > .content {\n flex: 1;\n overflow: hidden;\n line-height: 20px;\n}";
48
49
  styleInject(css_248z);
49
50
 
50
51
  const Descriptions = props => {
51
52
  const {
52
53
  className,
53
54
  style,
55
+ paddingRight = 40,
54
56
  layout = 'horizontal',
55
57
  border,
56
58
  title,
@@ -118,7 +120,10 @@ const Descriptions = props => {
118
120
  colSpan: itemChild.column || 1
119
121
  }, {
120
122
  children: jsxs("div", Object.assign({
121
- className: 'item-container'
123
+ className: 'item-container',
124
+ style: {
125
+ paddingRight: pixelReplacement(paddingRight)
126
+ }
122
127
  }, {
123
128
  children: [jsxs("span", Object.assign({
124
129
  className: 'title'
package/Form/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { DeepClone } from '@paraview/lib';
3
3
  import React__default from 'react';
4
- import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-06a05b14.js';
4
+ import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-8c33d82f.js';
5
5
  import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
6
6
  import { u as useFormatMessage } from '../_verture/useFormatMessage-eb13cf56.js';
7
7
  import '../TextField/index.js';
package/FormItem/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'react';
3
- export { F as default } from '../_verture/index-06a05b14.js';
3
+ export { F as default } from '../_verture/index-8c33d82f.js';
4
4
  import 'clsx';
5
5
  import '../Label/index.js';
6
6
  import '../_verture/constant-5317fc89.js';
package/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 版本: 4.0.11
2
+ para-ui/core@4.0.11 发布
3
+ 【描述文本+描述列表-Descriptions】增加右边距参数设置,设置行高保证文字对齐
4
+ 【下拉框-Select】修复下拉输入模式,点击input,内容被清空
5
+
1
6
  ## 版本: 4.0.10
2
7
  para-ui/core@4.0.10 发布
3
8
  【ParauiProvider】修复confirm国际化问题
package/Select/index.js CHANGED
@@ -220,6 +220,7 @@ const Select = props => {
220
220
  clearTimeout(constData.searchTimer);
221
221
  clearTimeout(constData.timer);
222
222
  clearTimeout(constData.scrollTimer);
223
+ clearTimeout(constData.dropDownTimer);
223
224
  };
224
225
  }, []);
225
226
  // 赋值value
@@ -780,6 +781,16 @@ const Select = props => {
780
781
  const str = "".concat(type, "-search-outside");
781
782
  if (searchModel === 'outside') {
782
783
  return jsx("input", Object.assign({}, searchInputProps, {
784
+ onClick: event => {
785
+ var _a;
786
+ constData.inputOpen = true;
787
+ searchInputProps && ((_a = searchInputProps.onClick) === null || _a === void 0 ? void 0 : _a.call(searchInputProps, event));
788
+ },
789
+ onBlur: event => {
790
+ var _a;
791
+ constData.inputOpen = false;
792
+ searchInputProps && ((_a = searchInputProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(searchInputProps, event));
793
+ },
783
794
  className: str,
784
795
  value: searchValue,
785
796
  onChange: changeSearch,
@@ -1090,7 +1101,13 @@ const Select = props => {
1090
1101
  overlayClassName: handleClassPopover(),
1091
1102
  getPopupContainer: getPopupContainer,
1092
1103
  onVisibleChange: bol => {
1093
- if (!bol) setOpen(false);
1104
+ if (!bol) {
1105
+ clearTimeout(constData.dropDownTimer);
1106
+ constData.dropDownTimer = setTimeout(() => {
1107
+ if (constData.inputOpen) return;
1108
+ setOpen(false);
1109
+ }, 0);
1110
+ }
1094
1111
  }
1095
1112
  }, {
1096
1113
  children: disabledTooltip ? jsx(Tooltip, Object.assign({
package/Utils/index.d.ts CHANGED
@@ -7,7 +7,9 @@ interface DateYYYYMMddHHMM {
7
7
  date?: string;
8
8
  }
9
9
  export declare const getDateYYYYMMddHHMM: (str: string) => DateYYYYMMddHHMM;
10
+ export declare const pixelReplacement: (str: number | string) => string;
10
11
  declare const _default: {
11
12
  getDateYYYYMMddHHMM: (str: string) => DateYYYYMMddHHMM;
13
+ pixelReplacement: (str: string | number) => string;
12
14
  };
13
15
  export default _default;
package/Utils/index.js CHANGED
@@ -15,8 +15,15 @@ const getDateYYYYMMddHHMM = str => {
15
15
  date
16
16
  };
17
17
  };
18
+ const pixelReplacement = str => {
19
+ if (typeof str === 'number') {
20
+ return str + 'px';
21
+ }
22
+ return str;
23
+ };
18
24
  var index = {
19
- getDateYYYYMMddHHMM
25
+ getDateYYYYMMddHHMM,
26
+ pixelReplacement
20
27
  };
21
28
 
22
- export { index as default, getDateYYYYMMddHHMM };
29
+ export { index as default, getDateYYYYMMddHHMM, pixelReplacement };
package/index.js CHANGED
@@ -25,7 +25,7 @@ export { D as Dropdown } from './_verture/index-389675ab.js';
25
25
  export { default as DynamicMultiBox } from './DynamicMultiBox/index.js';
26
26
  export { default as Empty } from './Empty/index.js';
27
27
  export { default as Form } from './Form/index.js';
28
- export { F as FormItem } from './_verture/index-06a05b14.js';
28
+ export { F as FormItem } from './_verture/index-8c33d82f.js';
29
29
  export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-7380ea41.js';
30
30
  export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
31
31
  export { default as Help } from './Help/index.js';
@@ -75,7 +75,7 @@ export { Tooltip } from './Tooltip/index.js';
75
75
  export { SSortablejs, Transfer } from './Transfer/index.js';
76
76
  export { T as Tree } from './_verture/index-767e63dd.js';
77
77
  export { default as Upload } from './Upload/index.js';
78
- export { default as Utils, getDateYYYYMMddHHMM } from './Utils/index.js';
78
+ export { default as Utils, getDateYYYYMMddHHMM, pixelReplacement } from './Utils/index.js';
79
79
  export { default as locale } from './locale/index.js';
80
80
  import 'react/jsx-runtime';
81
81
  import 'react';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@para-ui/core",
3
3
  "private": false,
4
- "version": "4.0.10",
4
+ "version": "4.0.11",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
7
7
  "description": "Powered by Para FED",