@para-ui/core 3.0.33 → 3.0.34

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.
package/AutoTips/index.js CHANGED
@@ -3,13 +3,14 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { useRef, useState, useEffect } from 'react';
4
4
  import { Tooltip } from '../Tooltip/index.js';
5
5
  import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
6
+ import { isIE } from '@paraview/lib';
6
7
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
7
8
  import '../_verture/tslib.es6-55ed4bd2.js';
8
9
  import 'rc-tooltip';
9
10
  import 'rc-tooltip/lib/placements';
10
11
  import 'clsx';
11
12
 
12
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-auto-tips {\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v3-auto-tips > .auto-tips-content {\n display: inline;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.paraui-v3-auto-tips-tooltip .component-tooltip-inner {\n max-height: calc(100vh - 25px);\n overflow: auto;\n}";
13
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-auto-tips {\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v3-auto-tips > .auto-tips-content {\n display: inline;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v3-auto-tips.paraui-v3-auto-tips-safari > .auto-tips-content::before {\n content: \"\";\n display: block;\n}\n\n.paraui-v3-auto-tips-tooltip .component-tooltip-inner {\n max-height: calc(100vh - 25px);\n overflow: auto;\n}";
13
14
  styleInject(css_248z);
14
15
 
15
16
  var AutoTips = function AutoTips(props) {
@@ -42,11 +43,26 @@ var AutoTips = function AutoTips(props) {
42
43
  var val = '';
43
44
  var tipsEle = tipsElm.current;
44
45
  var tipsEleRect = tipsEle.getBoundingClientRect();
45
- if (tipsElm.current && tipsEle.scrollWidth > tipsEleRect.width) {
46
- if (tips) {
47
- val = tips;
46
+ var textEleRect = textElm.current.getBoundingClientRect();
47
+ if (tipsElm.current) {
48
+ if (isIE()) {
49
+ if (tipsEleRect.width > textEleRect.width) {
50
+ if (tips) {
51
+ val = tips;
52
+ } else {
53
+ val = beyondText ? tipsEle.innerText : children;
54
+ }
55
+ }
48
56
  } else {
49
- val = beyondText ? tipsEle.innerText : children;
57
+ // mac:safari,firefox,chrome
58
+ // windows: firefox,chrome
59
+ if (textEleRect.width > tipsEleRect.width) {
60
+ if (tips) {
61
+ val = tips;
62
+ } else {
63
+ val = beyondText ? tipsEle.innerText : children;
64
+ }
65
+ }
50
66
  }
51
67
  }
52
68
  setTTips(val);
@@ -56,9 +72,17 @@ var AutoTips = function AutoTips(props) {
56
72
  if (tipMaxWidth) return tipMaxWidth;
57
73
  return tipsElm && tipsElm.current ? tipsElm.current.offsetWidth : 0;
58
74
  };
75
+ // 判断浏览器是否是safari
76
+ var isSafari = function isSafari() {
77
+ var userAgent = navigator.userAgent;
78
+ if (userAgent.indexOf("Safari") > -1) {
79
+ return true;
80
+ }
81
+ };
59
82
  // 处理class
60
83
  var handClass = function handClass() {
61
84
  var str = $prefixCls + '-auto-tips';
85
+ if (isSafari()) str += ' ' + $prefixCls + '-auto-tips-safari';
62
86
  if (className) str += ' ' + className;
63
87
  return str;
64
88
  };
@@ -15,6 +15,7 @@ import 'rc-tooltip';
15
15
  import 'rc-tooltip/lib/placements';
16
16
  import 'clsx';
17
17
  import '../_verture/usePopupContainer-87febeb9.js';
18
+ import '@paraview/lib';
18
19
  import '@para-ui/core/GlobalContext';
19
20
 
20
21
  var en = {
@@ -8,7 +8,7 @@ import SearchIcon from '@para-ui/icons/Search';
8
8
  import CloseIcon from '@para-ui/icons/Close';
9
9
  import CloseCircle from '@para-ui/icons/CloseCircle';
10
10
  import Table from '../Table/index.js';
11
- import { T as Tree } from '../_verture/index-e836322d.js';
11
+ import { T as Tree } from '../_verture/index-c50e7727.js';
12
12
  import { Button } from '../Button/index.js';
13
13
  import { D as Dropdown } from '../_verture/index-be4faaee.js';
14
14
  import { Popover } from '../Popover/index.js';
package/Form/index.js CHANGED
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-77980792.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import { DeepClone } from '@paraview/lib';
5
5
  import React__default from 'react';
6
- import { F as FormItem, v as validate } from '../_verture/index-c5be57f2.js';
6
+ import { F as FormItem, v as validate } from '../_verture/index-291a16a8.js';
7
7
  import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
8
8
  import '../TextField/index.js';
9
9
  import '../_verture/typeof-498dd2b1.js';
@@ -68,7 +68,7 @@ import '@para-ui/icons/Left';
68
68
  import 'rc-pagination';
69
69
  import '@para-ui/icons/Right';
70
70
  import '@para-ui/icons/DoubleRight';
71
- import '../_verture/index-e836322d.js';
71
+ import '../_verture/index-c50e7727.js';
72
72
  import 'rc-tree';
73
73
  import '@para-ui/icons/Document';
74
74
  import 'react-dom';
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-c5be57f2.js';
3
+ export { F as default } from '../_verture/index-291a16a8.js';
4
4
  import 'clsx';
5
5
  import '../Label/index.js';
6
6
  import '../_verture/constant-66aa48a1.js';
@@ -68,7 +68,7 @@ import '@para-ui/icons/Left';
68
68
  import 'rc-pagination';
69
69
  import '@para-ui/icons/Right';
70
70
  import '@para-ui/icons/DoubleRight';
71
- import '../_verture/index-e836322d.js';
71
+ import '../_verture/index-c50e7727.js';
72
72
  import 'rc-tree';
73
73
  import '@para-ui/icons/Document';
74
74
  import 'react-dom';
package/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 版本: 3.0.34
2
+
3
+ para-ui/core@3.0.34 发布
4
+ 【超出省略-AutoTips】修改计算方式,兼容mac: safari,firefox,chrome,windows: IE, firefox,chrome
5
+
1
6
  ## 版本: 3.0.33
2
7
 
3
8
  para-ui/core@3.0.33 发布
package/Tag/index.js CHANGED
@@ -14,6 +14,7 @@ import Plus from '@para-ui/icons/Plus';
14
14
  import '../Tooltip/index.js';
15
15
  import 'rc-tooltip';
16
16
  import 'rc-tooltip/lib/placements';
17
+ import '@paraview/lib';
17
18
 
18
19
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/1/12 上午9:43\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-tag {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n max-width: 100%;\n height: 24px;\n margin: 0 8px 8px 0;\n padding: 0 12px;\n font-size: 12px;\n color: rgb(46, 55, 67);\n white-space: nowrap;\n background: rgba(171, 176, 185, 0.2);\n border-radius: 4px;\n /*&.paraui-v3-tag-small {\n line-height: 24px;\n\n &.paraui-v3-tag-bordered {\n line-height: 22px;\n }\n }*/\n}\n.paraui-v3-tag.paraui-v3-tag-bordered {\n border: 1px solid rgba(171, 176, 185, 0.2);\n line-height: 22px;\n}\n.paraui-v3-tag.paraui-v3-tag-large {\n line-height: 28px;\n}\n.paraui-v3-tag.paraui-v3-tag-large.paraui-v3-tag-bordered {\n line-height: 26px;\n}\n.paraui-v3-tag > svg {\n color: inherit;\n font-size: 16px;\n}\n.paraui-v3-tag .tag-close-icon {\n margin-left: 4px;\n color: inherit;\n font-size: 16px;\n cursor: pointer;\n}\n.paraui-v3-tag .tag-close-icon:hover {\n color: inherit;\n}\n.paraui-v3-tag > svg + .paraui-v3-auto-tips {\n margin-left: 4px;\n}\n.paraui-v3-tag.paraui-v3-tag-has-color, .paraui-v3-tag.paraui-v3-tag-has-color svg, .paraui-v3-tag.paraui-v3-tag-has-color svg:hover {\n color: inherit;\n}\n.paraui-v3-tag.paraui-v3-tag-blue {\n color: rgb(54, 102, 214);\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-tag.paraui-v3-tag-green {\n color: rgb(83, 195, 27);\n background-color: rgba(83, 195, 27, 0.05);\n}\n.paraui-v3-tag.paraui-v3-tag-yellow {\n color: rgb(255, 161, 80);\n background-color: rgba(255, 161, 80, 0.05);\n}\n.paraui-v3-tag.paraui-v3-tag-red {\n color: rgb(235, 96, 84);\n background-color: rgba(235, 96, 84, 0.05);\n}\n.paraui-v3-tag.paraui-v3-tag-hidden {\n display: none;\n}\n\n.paraui-v3-tag-group {\n display: flex;\n align-items: center;\n flex-flow: row wrap;\n}\n.paraui-v3-tag-group .tag-group-input {\n width: 78px;\n height: 24px;\n align-self: flex-start;\n font-size: 12px;\n color: rgb(46, 55, 67);\n text-indent: 8px;\n border: 1px solid rgba(171, 176, 185, 0.4);\n border-radius: 4px;\n}\n.paraui-v3-tag-group .tag-group-input .tag-group-input-large {\n height: 28px;\n}\n.paraui-v3-tag-group .tag-group-new .tag-group-new-icon {\n padding: 0 5px;\n}";
19
20
  styleInject(css_248z);
package/Tree/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { T as Tree } from '../_verture/index-e836322d.js';
2
- export { T as default } from '../_verture/index-e836322d.js';
1
+ import { T as Tree } from '../_verture/index-c50e7727.js';
2
+ export { T as default } from '../_verture/index-c50e7727.js';
3
3
  import '../_verture/toConsumableArray-87c7d895.js';
4
4
  import '../_verture/slicedToArray-77980792.js';
5
5
  import '../_verture/defineProperty-62acccfc.js';
package/index.js CHANGED
@@ -20,7 +20,7 @@ export { Drawer } from './Drawer/index.js';
20
20
  export { D as Dropdown } from './_verture/index-be4faaee.js';
21
21
  export { default as Empty } from './Empty/index.js';
22
22
  export { default as Form } from './Form/index.js';
23
- export { F as FormItem } from './_verture/index-c5be57f2.js';
23
+ export { F as FormItem } from './_verture/index-291a16a8.js';
24
24
  export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-c749e1c6.js';
25
25
  export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
26
26
  export { default as Help } from './Help/index.js';
@@ -68,7 +68,7 @@ export { Title } from './Title/index.js';
68
68
  export { ToggleButton, ToggleButtonGroup } from './ToggleButton/index.js';
69
69
  export { Tooltip } from './Tooltip/index.js';
70
70
  export { SSortablejs, Transfer } from './Transfer/index.js';
71
- export { T as Tree } from './_verture/index-e836322d.js';
71
+ export { T as Tree } from './_verture/index-c50e7727.js';
72
72
  export { default as Upload } from './Upload/index.js';
73
73
  import './_verture/slicedToArray-77980792.js';
74
74
  import 'react/jsx-runtime';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@para-ui/core",
3
3
  "private": false,
4
- "version": "3.0.33",
4
+ "version": "3.0.34",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
7
7
  "description": "Powered by Para FED",