@para-ui/core 3.0.1 → 3.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.
Files changed (107) hide show
  1. package/AutoBox/index.js +180 -68
  2. package/AutoBox/protal.d.ts +17 -0
  3. package/AutoTips/index.js +4 -3
  4. package/Breadcrumbs/index.js +10 -7
  5. package/Button/index.js +15 -14
  6. package/ButtonGroup/index.js +3 -2
  7. package/Carousel/index.js +7 -5
  8. package/Cascader/index.d.ts +3 -1
  9. package/Cascader/index.js +13 -5
  10. package/Checkbox/index.js +27 -8
  11. package/CheckboxGroup/index.d.ts +2 -5
  12. package/CheckboxGroup/index.js +13 -10
  13. package/Collapse/index.js +11 -10
  14. package/CollapseBox/index.js +7 -6
  15. package/ComboSelect/index.js +161 -67
  16. package/ComboSelect/interface.d.ts +10 -9
  17. package/Container/index.js +24 -23
  18. package/DatePicker/index.js +12 -17
  19. package/DatePicker/util.d.ts +0 -1
  20. package/Desktop/index.js +6 -5
  21. package/Drawer/index.js +10 -9
  22. package/Dropdown/index.js +59 -6
  23. package/Empty/index.js +7 -6
  24. package/Form/index.js +6 -5
  25. package/FormItem/compoments/formFile/index.d.ts +16 -16
  26. package/FormItem/index.d.ts +19 -19
  27. package/FormItem/index.js +3 -2
  28. package/FunctionModal/index.js +3 -2
  29. package/GlobalContext/constant.d.ts +8 -0
  30. package/Help/index.js +3 -2
  31. package/HelperText/index.d.ts +9 -5
  32. package/HelperText/index.js +9 -4
  33. package/InputLang/index.d.ts +2 -5
  34. package/InputLang/index.js +13 -7
  35. package/InputNumber/index.d.ts +2 -5
  36. package/InputNumber/index.js +15 -12
  37. package/Label/index.d.ts +2 -0
  38. package/Label/index.js +12 -8
  39. package/Loading/index.js +5 -4
  40. package/Menu/index.js +18 -17
  41. package/Message/index.js +5 -4
  42. package/Modal/index.js +28 -26
  43. package/MultiBox/index.d.ts +2 -5
  44. package/MultiBox/index.js +13 -6
  45. package/Notification/index.js +3 -2
  46. package/OperateBtn/index.js +15 -12
  47. package/PageHeader/index.js +18 -18
  48. package/Pagination/index.js +10 -4
  49. package/ParauiProvider/index.js +1 -1
  50. package/PopConfirm/index.js +3 -2
  51. package/Popover/index.js +7 -4
  52. package/Progress/index.d.ts +2 -0
  53. package/Progress/index.js +13 -9
  54. package/Querying/index.js +6 -5
  55. package/README.md +30 -0
  56. package/Radio/index.js +22 -8
  57. package/RadioGroup/index.d.ts +2 -5
  58. package/RadioGroup/index.js +10 -7
  59. package/Search/index.js +13 -8
  60. package/Select/index.d.ts +2 -5
  61. package/Select/index.js +23 -20
  62. package/SelectInput/index.js +3 -2
  63. package/Selector/index.js +189 -81
  64. package/Selector/interface.d.ts +17 -7
  65. package/Selector/lang/en_US.d.ts +1 -0
  66. package/Selector/lang/zh_CN.d.ts +1 -0
  67. package/SelectorPicker/index.d.ts +2 -5
  68. package/SelectorPicker/index.js +20 -17
  69. package/SingleBox/index.d.ts +2 -5
  70. package/SingleBox/index.js +11 -6
  71. package/Slider/index.d.ts +4 -4
  72. package/Slider/index.js +9 -4
  73. package/Split/index.js +8 -7
  74. package/Stepper/index.js +7 -3
  75. package/Switch/index.js +10 -12
  76. package/Table/index.js +528 -300
  77. package/Table/interface.d.ts +45 -1
  78. package/Table/tableElement/index.d.ts +2 -2
  79. package/Table/util.d.ts +13 -1
  80. package/Tabs/index.js +7 -6
  81. package/Tag/index.js +12 -14
  82. package/TextField/index.d.ts +2 -5
  83. package/TextField/index.js +20 -18
  84. package/TimePicker/index.js +1 -0
  85. package/Timeline/index.js +13 -12
  86. package/Title/index.d.ts +30 -0
  87. package/Title/index.js +49 -0
  88. package/ToggleButton/index.js +13 -13
  89. package/Tooltip/index.js +59 -12
  90. package/Tooltip/interface.d.ts +2 -0
  91. package/Transfer/index.d.ts +6 -2
  92. package/Transfer/index.js +74 -37
  93. package/Transfer/lang/en_US.d.ts +2 -0
  94. package/Transfer/lang/zh_CN.d.ts +2 -0
  95. package/Tree/index.js +3 -2
  96. package/Tree/utils/tools.d.ts +0 -1
  97. package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
  98. package/Upload/ImgCrop/constants.d.ts +1 -1
  99. package/Upload/ImgCrop/interface.d.ts +5 -0
  100. package/Upload/index.js +56 -45
  101. package/_verture/constant-bf34e6fa.js +11 -0
  102. package/_verture/{index-abfdd262.js → index-3136f653.js} +63 -31
  103. package/_verture/{index-5bb4b5d7.js → index-77832168.js} +30 -17
  104. package/_verture/{modalContext-59669f93.js → modalContext-f1a611ab.js} +0 -0
  105. package/index.d.ts +2 -0
  106. package/index.js +7 -5
  107. package/package.json +2 -1
package/Timeline/index.js CHANGED
@@ -3,6 +3,7 @@ import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import React__default from 'react';
5
5
  import clsx from 'clsx';
6
+ import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
6
7
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
7
8
 
8
9
  var TimelineItem = function TimelineItem(props) {
@@ -18,7 +19,7 @@ var TimelineItem = function TimelineItem(props) {
18
19
  children = props.children,
19
20
  restProps = __rest(props, ["className", "color", "dot", "pending", "position", "label", "children"]);
20
21
 
21
- var prefixCls = 'paraui-timeline'; //item cls
22
+ var prefixCls = "".concat($rcPrefixCls, "-timeline"); //item cls
22
23
 
23
24
  var itemClassName = clsx((_clsx = {}, _defineProperty(_clsx, "".concat(prefixCls, "-item"), true), _defineProperty(_clsx, "".concat(prefixCls, "-item-pending"), pending), _clsx), className); //dot cls
24
25
 
@@ -48,7 +49,7 @@ var TimelineItem = function TimelineItem(props) {
48
49
  }));
49
50
  };
50
51
 
51
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/6/9 下午8:00\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-timeline {\n color: rgb(46, 55, 67);\n font-size: 14px;\n line-height: 1.5715;\n list-style: none;\n}\n\n.paraui-timeline-item {\n position: relative;\n margin: 0;\n min-height: 70px;\n padding-bottom: 20px;\n font-size: 14px;\n list-style: none;\n}\n.paraui-timeline-item-disabled .paraui-timeline-item-head:not(.paraui-timeline-item-head-custom) {\n background-color: rgba(171, 176, 185, 0.4);\n}\n.paraui-timeline-item-disabled .paraui-timeline-item-head .paraui-icon {\n color: rgba(171, 176, 185, 0.4);\n}\n.paraui-timeline-item-disabled .paraui-timeline-item-content {\n color: rgba(46, 55, 67, 0.4);\n}\n\n.paraui-timeline-item-tail {\n position: absolute;\n top: 16px;\n bottom: 8px;\n left: 3.5px;\n border-left: 1px solid rgba(171, 176, 185, 0.2);\n}\n\n.paraui-timeline-item-pending .paraui-timeline-item-head {\n font-size: 12px;\n background-color: transparent;\n}\n\n.paraui-timeline-item-pending .paraui-timeline-item-tail {\n display: none;\n}\n\n.paraui-timeline-item-head {\n position: absolute;\n width: 8px;\n height: 8px;\n background-color: rgb(54, 102, 214);\n border-radius: 100px;\n}\n\n.paraui-timeline-item-head-custom {\n position: absolute;\n top: 5.5px;\n left: 5px;\n width: auto;\n height: auto;\n margin-top: 0;\n padding: 3px 1px;\n line-height: 1;\n text-align: center;\n border: 0;\n border-radius: 0;\n background-color: transparent;\n transform: translate(-50%, -50%);\n}\n\n.paraui-timeline-item-content {\n position: relative;\n top: -7px;\n margin: 0 0 0 22px;\n word-break: break-word;\n}\n\n.paraui-timeline-item-last > .paraui-timeline-item-tail {\n display: none;\n}\n\n.paraui-timeline-item-last > .paraui-timeline-item-content {\n min-height: 48px;\n}\n\n.paraui-timeline.paraui-timeline-alternate .paraui-timeline-item-tail,\n.paraui-timeline.paraui-timeline-right .paraui-timeline-item-tail,\n.paraui-timeline.paraui-timeline-label .paraui-timeline-item-tail,\n.paraui-timeline.paraui-timeline-alternate .paraui-timeline-item-head,\n.paraui-timeline.paraui-timeline-right .paraui-timeline-item-head,\n.paraui-timeline.paraui-timeline-label .paraui-timeline-item-head,\n.paraui-timeline.paraui-timeline-alternate .paraui-timeline-item-head-custom,\n.paraui-timeline.paraui-timeline-right .paraui-timeline-item-head-custom,\n.paraui-timeline.paraui-timeline-label .paraui-timeline-item-head-custom {\n left: 50%;\n}\n\n.paraui-timeline.paraui-timeline-alternate .paraui-timeline-item-head,\n.paraui-timeline.paraui-timeline-right .paraui-timeline-item-head,\n.paraui-timeline.paraui-timeline-label .paraui-timeline-item-head {\n margin-left: -4px;\n}\n\n.paraui-timeline.paraui-timeline-alternate .paraui-timeline-item-head-custom,\n.paraui-timeline.paraui-timeline-right .paraui-timeline-item-head-custom,\n.paraui-timeline.paraui-timeline-label .paraui-timeline-item-head-custom {\n margin-left: 1px;\n}\n\n.paraui-timeline.paraui-timeline-alternate .paraui-timeline-item-left .paraui-timeline-item-content,\n.paraui-timeline.paraui-timeline-right .paraui-timeline-item-left .paraui-timeline-item-content,\n.paraui-timeline.paraui-timeline-label .paraui-timeline-item-left .paraui-timeline-item-content {\n left: calc(50% - 4px);\n width: calc(50% - 14px);\n text-align: left;\n}\n\n.paraui-timeline.paraui-timeline-alternate .paraui-timeline-item-right .paraui-timeline-item-content,\n.paraui-timeline.paraui-timeline-right .paraui-timeline-item-right .paraui-timeline-item-content,\n.paraui-timeline.paraui-timeline-label .paraui-timeline-item-right .paraui-timeline-item-content {\n width: calc(50% - 12px);\n margin: 0;\n text-align: right;\n}\n\n.paraui-timeline.paraui-timeline-right .paraui-timeline-item-right .paraui-timeline-item-tail,\n.paraui-timeline.paraui-timeline-right .paraui-timeline-item-right .paraui-timeline-item-head,\n.paraui-timeline.paraui-timeline-right .paraui-timeline-item-right .paraui-timeline-item-head-custom {\n left: calc(100% - 4px - 2px);\n}\n\n.paraui-timeline.paraui-timeline-right .paraui-timeline-item-right .paraui-timeline-item-content {\n width: calc(100% - 18px);\n}\n\n.paraui-timeline.paraui-timeline-pending .paraui-timeline-item-last .paraui-timeline-item-tail {\n display: block;\n height: calc(100% - 14px);\n border-left: 2px dotted #f0f0f0;\n}\n\n.paraui-timeline.paraui-timeline-reverse .paraui-timeline-item-last .paraui-timeline-item-tail {\n display: none;\n}\n\n.paraui-timeline.paraui-timeline-reverse .paraui-timeline-item-pending .paraui-timeline-item-tail {\n top: 15px;\n display: block;\n height: calc(100% - 15px);\n border-left: 2px dotted #f0f0f0;\n}\n\n.paraui-timeline.paraui-timeline-reverse .paraui-timeline-item-pending .paraui-timeline-item-content {\n min-height: 48px;\n}\n\n.paraui-timeline.paraui-timeline-label .paraui-timeline-item-label {\n position: absolute;\n top: -7.001px;\n width: calc(50% - 12px);\n text-align: right;\n}\n\n.paraui-timeline.paraui-timeline-label .paraui-timeline-item-right .paraui-timeline-item-label {\n left: calc(50% + 14px);\n width: calc(50% - 14px);\n text-align: left;\n}";
52
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/6/9 下午8:00\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-timeline {\n color: rgb(46, 55, 67);\n font-size: 14px;\n line-height: 1.5715;\n list-style: none;\n}\n.paraui-v3-timeline .component-timeline-item {\n position: relative;\n margin: 0;\n min-height: 70px;\n padding-bottom: 20px;\n font-size: 14px;\n list-style: none;\n}\n.paraui-v3-timeline .component-timeline-item-disabled .component-timeline-item-head:not(.component-timeline-item-head-custom) {\n background-color: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-timeline .component-timeline-item-disabled .component-timeline-item-head svg {\n color: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-timeline .component-timeline-item-disabled .component-timeline-item-content {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-timeline .component-timeline-item-tail {\n position: absolute;\n top: 16px;\n bottom: 8px;\n left: 3.5px;\n border-left: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-timeline .component-timeline-item-pending .component-timeline-item-head {\n font-size: 12px;\n background-color: transparent;\n}\n.paraui-v3-timeline .component-timeline-item-pending .component-timeline-item-tail {\n display: none;\n}\n.paraui-v3-timeline .component-timeline-item-head {\n position: absolute;\n width: 8px;\n height: 8px;\n background-color: rgb(54, 102, 214);\n border-radius: 100px;\n}\n.paraui-v3-timeline .component-timeline-item-head-custom {\n position: absolute;\n top: 5.5px;\n left: 5px;\n width: auto;\n height: auto;\n margin-top: 0;\n padding: 3px 1px;\n line-height: 1;\n text-align: center;\n border: 0;\n border-radius: 0;\n background-color: transparent;\n transform: translate(-50%, -50%);\n}\n.paraui-v3-timeline .component-timeline-item-content {\n position: relative;\n top: -7px;\n margin: 0 0 0 22px;\n word-break: break-word;\n}\n.paraui-v3-timeline .component-timeline-item-last > .component-timeline-item-tail {\n display: none;\n}\n.paraui-v3-timeline .component-timeline-item-last > .component-timeline-item-content {\n min-height: 48px;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-tail,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-tail,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-tail,\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-head,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-head,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-head,\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-head-custom,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-head-custom,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-head-custom {\n left: 50%;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-head,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-head,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-head {\n margin-left: -4px;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-head-custom,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-head-custom,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-head-custom {\n margin-left: 1px;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-left .component-timeline-item-content,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-left .component-timeline-item-content,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-left .component-timeline-item-content {\n left: calc(50% - 4px);\n width: calc(50% - 14px);\n text-align: left;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-right .component-timeline-item-content,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-right .component-timeline-item-content,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-right .component-timeline-item-content {\n width: calc(50% - 12px);\n margin: 0;\n text-align: right;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-right .component-timeline-item-tail,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-right .component-timeline-item-head,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-right .component-timeline-item-head-custom {\n left: calc(100% - 4px - 2px);\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-right .component-timeline-item-content {\n width: calc(100% - 18px);\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-pending .component-timeline-item-last .component-timeline-item-tail {\n display: block;\n height: calc(100% - 14px);\n border-left: 2px dotted #f0f0f0;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-reverse .component-timeline-item-last .component-timeline-item-tail {\n display: none;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-reverse .component-timeline-item-pending .component-timeline-item-tail {\n top: 15px;\n display: block;\n height: calc(100% - 15px);\n border-left: 2px dotted #f0f0f0;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-reverse .component-timeline-item-pending .component-timeline-item-content {\n min-height: 48px;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-label {\n position: absolute;\n top: -7.001px;\n width: calc(50% - 12px);\n text-align: right;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-right .component-timeline-item-label {\n left: calc(50% + 14px);\n width: calc(50% - 14px);\n text-align: left;\n}";
52
53
  styleInject(css_248z);
53
54
 
54
55
  var Timeline = function Timeline(props) {
@@ -67,7 +68,7 @@ var Timeline = function Timeline(props) {
67
68
  data = props.data,
68
69
  restProps = __rest(props, ["pending", "pendingDot", "children", "className", "reverse", "mode", "align", "data"]);
69
70
 
70
- var prefixCls = 'paraui-timeline';
71
+ var prefixCls = "".concat($prefixCls, "-timeline");
71
72
  var innerMode = align !== null && align !== void 0 ? align : mode; //时间轴和内容相对位置
72
73
 
73
74
  var pendingNode = typeof pending === 'boolean' ? null : pending; //是否有幽灵节点
@@ -92,14 +93,14 @@ var Timeline = function Timeline(props) {
92
93
  var _a, _b, _c;
93
94
 
94
95
  if (innerMode === 'alternate') {
95
- if (((_a = ele === null || ele === void 0 ? void 0 : ele.props) === null || _a === void 0 ? void 0 : _a.position) === 'right') return "".concat(prefixCls, "-item-right");
96
- if (((_b = ele === null || ele === void 0 ? void 0 : ele.props) === null || _b === void 0 ? void 0 : _b.position) === 'left') return "".concat(prefixCls, "-item-left");
97
- return idx % 2 === 0 ? "".concat(prefixCls, "-item-left") : "".concat(prefixCls, "-item-right");
96
+ if (((_a = ele === null || ele === void 0 ? void 0 : ele.props) === null || _a === void 0 ? void 0 : _a.position) === 'right') return "".concat($rcPrefixCls, "-timeline-item-right");
97
+ if (((_b = ele === null || ele === void 0 ? void 0 : ele.props) === null || _b === void 0 ? void 0 : _b.position) === 'left') return "".concat($rcPrefixCls, "-timeline-item-left");
98
+ return idx % 2 === 0 ? "".concat($rcPrefixCls, "-timeline-item-left") : "".concat($rcPrefixCls, "-timeline-item-right");
98
99
  }
99
100
 
100
- if (innerMode === 'left') return "".concat(prefixCls, "-item-left");
101
- if (innerMode === 'right') return "".concat(prefixCls, "-item-right");
102
- if (((_c = ele === null || ele === void 0 ? void 0 : ele.props) === null || _c === void 0 ? void 0 : _c.position) === 'right') return "".concat(prefixCls, "-item-right");
101
+ if (innerMode === 'left') return "".concat($rcPrefixCls, "-timeline-item-left");
102
+ if (innerMode === 'right') return "".concat($rcPrefixCls, "-timeline-item-right");
103
+ if (((_c = ele === null || ele === void 0 ? void 0 : ele.props) === null || _c === void 0 ? void 0 : _c.position) === 'right') return "".concat($rcPrefixCls, "-timeline-item-right");
103
104
  return '';
104
105
  }; //实际渲染项
105
106
 
@@ -108,7 +109,7 @@ var Timeline = function Timeline(props) {
108
109
  return !!item;
109
110
  });
110
111
  var itemsCount = React__default.Children.count(truthyItems);
111
- var lastCls = "".concat(prefixCls, "-item-last");
112
+ var lastCls = "".concat($rcPrefixCls, "-timeline-item-last");
112
113
  var items = React__default.Children.map(truthyItems, function (ele, idx) {
113
114
  var pendingClass = idx === itemsCount - 2 ? lastCls : '';
114
115
  var readyClass = idx === itemsCount - 1 ? lastCls : '';
@@ -128,7 +129,7 @@ var Timeline = function Timeline(props) {
128
129
  var renderItems = function renderItems() {
129
130
  if (!(data === null || data === void 0 ? void 0 : data.length)) return items;
130
131
  var itemsCount = data.length;
131
- var lastCls = "".concat(prefixCls, "-item-last");
132
+ var lastCls = "".concat($rcPrefixCls, "-timeline-item-last");
132
133
  return data.map(function (item, idx) {
133
134
  var dotIcon = item.dotIcon,
134
135
  content = item.content,
@@ -139,7 +140,7 @@ var Timeline = function Timeline(props) {
139
140
  var readyClass = idx === itemsCount - 1 ? lastCls : '';
140
141
  return jsx(TimelineItem, Object.assign({
141
142
  dot: dotIcon,
142
- className: clsx([className, _defineProperty({}, "".concat(prefixCls, "-item-disabled"), disabled), !reverse && !!pending ? pendingClass : readyClass, getPositionCls(null, idx)])
143
+ className: clsx([className, _defineProperty({}, "".concat($rcPrefixCls, "-timeline-item-disabled"), disabled), !reverse && !!pending ? pendingClass : readyClass, getPositionCls(null, idx)])
143
144
  }, {
144
145
  children: content
145
146
  }));
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @author Hanz
3
+ * @date 2022/8/11 2:54 PM
4
+ * @description 标题
5
+ */
6
+ import React, { FC, ReactNode } from 'react';
7
+ import './index.scss';
8
+ interface TitleProps {
9
+ /** 标题 **/
10
+ title: ReactNode;
11
+ /** 副标题 **/
12
+ subTitle?: ReactNode;
13
+ /** 图标 **/
14
+ icon?: ReactNode;
15
+ /** 链接 **/
16
+ link?: {
17
+ href: string;
18
+ text: ReactNode;
19
+ target?: string;
20
+ onClick?: React.MouseEventHandler<HTMLElement>;
21
+ };
22
+ /** 尺寸,仅在 icon 存在时有效 **/
23
+ size?: 'small' | 'medium' | 'large';
24
+ /** cls */
25
+ className?: string;
26
+ /** style */
27
+ style?: React.CSSProperties;
28
+ }
29
+ export declare const Title: FC<TitleProps>;
30
+ export default Title;
package/Title/index.js ADDED
@@ -0,0 +1,49 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import clsx from 'clsx';
3
+ import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
4
+ import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
5
+
6
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/8/11 2:55 PM\n* @description 标题\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-title {\n display: flex;\n align-items: center;\n line-height: 20px;\n}\n.paraui-v3-title .paraui-v3-title-ink {\n width: 4px;\n height: 14px;\n background-color: rgb(54, 102, 214);\n border-radius: 2px;\n}\n.paraui-v3-title .paraui-v3-title-icon {\n display: inline-flex;\n}\n.paraui-v3-title .paraui-v3-title-text {\n margin-left: 8px;\n font-size: 14px;\n font-weight: 700;\n color: rgb(28, 41, 60);\n}\n.paraui-v3-title .paraui-v3-title-subtext {\n margin-left: 12px;\n font-size: 14px;\n font-weight: 400;\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-title .paraui-v3-title-link {\n margin-left: 12px;\n text-decoration: none;\n outline: none;\n font-size: 14px;\n font-weight: 400;\n color: rgb(54, 102, 214);\n}\n.paraui-v3-title.paraui-v3-title-large .paraui-v3-title-icon svg {\n font-size: 30px;\n}\n.paraui-v3-title.paraui-v3-title-large .paraui-v3-title-text {\n font-size: 18px;\n}\n.paraui-v3-title.paraui-v3-title-medium .paraui-v3-title-icon svg {\n font-size: 24px;\n}\n.paraui-v3-title.paraui-v3-title-medium .paraui-v3-title-text {\n font-size: 16px;\n}\n.paraui-v3-title.paraui-v3-title-small .paraui-v3-title-icon svg {\n font-size: 20px;\n}\n.paraui-v3-title.paraui-v3-title-small .paraui-v3-title-text {\n margin-left: 4px;\n}";
7
+ styleInject(css_248z);
8
+
9
+ var Title = function Title(props) {
10
+ var title = props.title,
11
+ subTitle = props.subTitle,
12
+ icon = props.icon,
13
+ link = props.link,
14
+ _props$size = props.size,
15
+ size = _props$size === void 0 ? 'medium' : _props$size,
16
+ className = props.className,
17
+ style = props.style; //cls
18
+
19
+ var makeCls = clsx("".concat($prefixCls, "-title"), className, icon && "".concat($prefixCls, "-title-").concat(size));
20
+ return jsxs("div", Object.assign({
21
+ className: makeCls,
22
+ style: style
23
+ }, {
24
+ children: [icon ? jsx("span", Object.assign({
25
+ className: "".concat($prefixCls, "-title-icon")
26
+ }, {
27
+ children: icon
28
+ })) : jsx("span", {
29
+ className: "".concat($prefixCls, "-title-ink")
30
+ }), jsx("span", Object.assign({
31
+ className: "".concat($prefixCls, "-title-text")
32
+ }, {
33
+ children: title
34
+ })), subTitle && jsx("span", Object.assign({
35
+ className: "".concat($prefixCls, "-title-subtext")
36
+ }, {
37
+ children: subTitle
38
+ })), link && jsx("a", Object.assign({
39
+ className: "".concat($prefixCls, "-title-link"),
40
+ target: link.target || '_blank',
41
+ href: link.href,
42
+ onClick: link.onClick
43
+ }, {
44
+ children: link.text
45
+ }))]
46
+ }));
47
+ };
48
+
49
+ export { Title, Title as default };
@@ -1,3 +1,4 @@
1
+ import { _ as _defineProperty } from '../_verture/defineProperty-0590dc61.js';
1
2
  import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
2
3
  import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
3
4
  import { jsx, Fragment } from 'react/jsx-runtime';
@@ -6,6 +7,7 @@ import { Button } from '../Button/index.js';
6
7
  import { Tooltip } from '../Tooltip/index.js';
7
8
  import { UUID } from '@paraview/lib';
8
9
  import clsx from 'clsx';
10
+ import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
9
11
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
10
12
  import '../_verture/typeof-498dd2b1.js';
11
13
  import '@para-ui/icons/LoadingF';
@@ -18,7 +20,7 @@ import '@para-ui/core/GlobalContext';
18
20
  import 'rc-tooltip';
19
21
  import 'rc-tooltip/lib/placements';
20
22
 
21
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/23 上午9:50\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-toggle-button {\n color: rgb(46, 55, 67);\n}\n.paraui-toggle-button.paraui-button {\n height: 30px;\n padding: 0 20px;\n line-height: 30px;\n}\n.paraui-toggle-button-wrap {\n display: inline-block;\n}\n.paraui-toggle-button-text {\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-toggle-button-selected {\n border-color: rgb(54, 102, 214);\n color: rgb(54, 102, 214);\n}\n.paraui-toggle-button-selected:hover {\n border-color: rgb(54, 102, 214);\n color: rgb(54, 102, 214);\n}\n.paraui-toggle-button-selected[disabled] {\n color: rgba(46, 55, 67, 0.4);\n background-color: rgba(171, 176, 185, 0.12);\n border: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-toggle-button-selected[disabled]:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-toggle-button-selected[disabled]::before {\n border-color: rgba(46, 55, 67, 0.4);\n border-top-color: transparent;\n border-left-color: transparent;\n}\n.paraui-toggle-button-selected::before {\n content: \" \";\n position: absolute;\n bottom: 0;\n right: 0;\n border: 10px solid rgb(54, 102, 214);\n border-top-color: transparent;\n border-left-color: transparent;\n}\n.paraui-toggle-button-selected::after {\n content: \" \";\n position: absolute;\n bottom: 2px;\n right: 3px;\n width: 4px;\n height: 8px;\n border: 2px solid rgb(255, 255, 255);\n border-top: 0;\n border-left: 0;\n border-radius: 2px;\n transform: rotate(45deg);\n}\n.paraui-toggle-button-disabled.paraui-toggle-button {\n pointer-events: auto;\n cursor: not-allowed;\n}\n\n.paraui-togglebutton-group {\n display: flex;\n flex-flow: row wrap;\n}\n.paraui-togglebutton-group .paraui-toggle-button {\n margin: 0 10px;\n line-height: 30px;\n}\n.paraui-togglebutton-group--text .paraui-toggle-button {\n margin: 0;\n padding: 0 16px;\n line-height: 30px;\n}\n.paraui-togglebutton-group--text .paraui-toggle-button:hover {\n color: rgba(54, 102, 214, 0.8);\n}\n.paraui-togglebutton-group--text .paraui-toggle-button[disabled] {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-togglebutton-group--text .paraui-toggle-button ~ .paraui-toggle-button:before {\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n content: \"\";\n width: 1px;\n height: 14px;\n background-color: rgba(171, 176, 185, 0.4);\n}\n.paraui-togglebutton-group--text .paraui-toggle-button-selected {\n color: rgb(54, 102, 214);\n font-weight: 700;\n}\n.paraui-togglebutton-group--text .paraui-toggle-button-selected:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-togglebutton-group--text .paraui-toggle-button-selected:first-child:before {\n display: none;\n}\n.paraui-togglebutton-group--text .paraui-toggle-button-selected:not(:first-child)::before {\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n content: \"\";\n width: 1px;\n height: 14px;\n background-color: rgba(171, 176, 185, 0.4);\n border: 0;\n}\n.paraui-togglebutton-group--text .paraui-toggle-button-selected::after {\n display: none;\n}";
23
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/23 上午9:50\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-toggle-button.paraui-v3-button {\n height: 30px;\n padding: 0 20px;\n color: rgb(46, 55, 67);\n line-height: 30px;\n}\n.paraui-v3-toggle-button.paraui-v3-button:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-toggle-button-wrap {\n display: inline-block;\n}\n.paraui-v3-toggle-button .toggle-button-text {\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected {\n border-color: rgb(54, 102, 214);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected:hover {\n border-color: rgb(54, 102, 214);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected[disabled] {\n color: rgba(46, 55, 67, 0.4);\n background-color: rgba(171, 176, 185, 0.12);\n border: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected[disabled]:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected[disabled]::before {\n border-color: rgba(46, 55, 67, 0.4);\n border-top-color: transparent;\n border-left-color: transparent;\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected::before {\n content: \" \";\n position: absolute;\n bottom: 0;\n right: 0;\n border: 10px solid rgb(54, 102, 214);\n border-top-color: transparent;\n border-left-color: transparent;\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected::after {\n content: \" \";\n position: absolute;\n bottom: 2px;\n right: 3px;\n width: 4px;\n height: 8px;\n border: 2px solid rgb(255, 255, 255);\n border-top: 0;\n border-left: 0;\n border-radius: 2px;\n transform: rotate(45deg);\n}\n.paraui-v3-toggle-button-disabled.paraui-v3-toggle-button {\n color: rgba(46, 55, 67, 0.4);\n pointer-events: auto;\n cursor: not-allowed;\n}\n.paraui-v3-toggle-button-disabled.paraui-v3-toggle-button:hover {\n color: rgba(46, 55, 67, 0.4);\n}\n\n.paraui-v3-togglebutton-group {\n display: flex;\n flex-flow: row wrap;\n}\n.paraui-v3-togglebutton-group .paraui-v3-toggle-button {\n margin: 0 10px;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button {\n margin: 0;\n padding: 0 16px;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button:hover {\n color: rgba(54, 102, 214, 0.8);\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button[disabled] {\n color: rgba(46, 55, 67, 0.4);\n background-color: transparent;\n border: 0;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button ~ .paraui-v3-toggle-button::before {\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n content: \"\";\n width: 1px;\n height: 14px;\n background-color: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected {\n color: rgb(54, 102, 214);\n border: 0;\n font-weight: 700;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected[disabled] {\n color: rgba(46, 55, 67, 0.4);\n background-color: transparent;\n border: 0;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected[disabled]:hover {\n background-color: transparent;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected:first-child:before {\n display: none;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected:not(:first-child)::before {\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n content: \"\";\n width: 1px;\n height: 14px;\n background-color: rgba(171, 176, 185, 0.4);\n border: 0;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected::after {\n display: none;\n}";
22
24
  styleInject(css_248z);
23
25
 
24
26
  var ToggleButtonGroup = function ToggleButtonGroup(props) {
@@ -38,9 +40,7 @@ var ToggleButtonGroup = function ToggleButtonGroup(props) {
38
40
  exclusive = true;
39
41
  }
40
42
 
41
- var cls = clsx('paraui-togglebutton-group', className, {
42
- 'paraui-togglebutton-group--text': type === 'text'
43
- }); //多选
43
+ var makeCls = clsx("".concat($prefixCls, "-togglebutton-group"), className, _defineProperty({}, "".concat($prefixCls, "-togglebutton-group-text"), type === 'text')); //多选
44
44
 
45
45
  var handleChange = function handleChange(evt, buttonValue) {
46
46
  if (!onChange) return;
@@ -103,13 +103,15 @@ var ToggleButtonGroup = function ToggleButtonGroup(props) {
103
103
  };
104
104
 
105
105
  return jsx("div", Object.assign({
106
- className: cls
106
+ className: makeCls
107
107
  }, {
108
108
  children: renderGroup()
109
109
  }));
110
110
  };
111
111
 
112
112
  var ToggleButton = function ToggleButton(props) {
113
+ var _clsx;
114
+
113
115
  var className = props.className,
114
116
  style = props.style,
115
117
  children = props.children,
@@ -130,12 +132,10 @@ var ToggleButton = function ToggleButton(props) {
130
132
  hasTip = _useState2[0],
131
133
  setHasTip = _useState2[1];
132
134
 
133
- var id = useRef(UUID()).current; //className
135
+ var id = useRef(UUID()).current;
136
+ var prefixCls = "".concat($prefixCls, "-toggle-button"); //className
134
137
 
135
- var cls = clsx('paraui-toggle-button', className, {
136
- 'paraui-toggle-button-selected': selected,
137
- 'paraui-toggle-button-disabled': disabled
138
- }); //点击事件
138
+ var makeCls = clsx(prefixCls, className, (_clsx = {}, _defineProperty(_clsx, "".concat(prefixCls, "-selected"), selected), _defineProperty(_clsx, "".concat(prefixCls, "-disabled"), disabled), _clsx)); //点击事件
139
139
 
140
140
  var handleClick = function handleClick(evt) {
141
141
  if (onClick) onClick(evt, value);
@@ -165,13 +165,13 @@ var ToggleButton = function ToggleButton(props) {
165
165
  style: Object.assign({
166
166
  width: width
167
167
  }, style),
168
- className: cls,
168
+ className: makeCls,
169
169
  disabled: disabled,
170
170
  value: value,
171
171
  onClick: handleClick
172
172
  }, {
173
173
  children: jsx("span", Object.assign({
174
- className: 'paraui-toggle-button-text'
174
+ className: 'toggle-button-text'
175
175
  }, {
176
176
  children: children
177
177
  }))
@@ -182,7 +182,7 @@ var ToggleButton = function ToggleButton(props) {
182
182
  title: children
183
183
  }, {
184
184
  children: jsx("span", Object.assign({
185
- className: 'paraui-toggle-button-wrap'
185
+ className: "".concat(prefixCls, "-wrap")
186
186
  }, {
187
187
  children: btn
188
188
  }))
package/Tooltip/index.js CHANGED
@@ -5,6 +5,7 @@ import React__default from 'react';
5
5
  import RcTooltip from 'rc-tooltip';
6
6
  import { placements } from 'rc-tooltip/lib/placements';
7
7
  import clsx from 'clsx';
8
+ import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
8
9
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
9
10
 
10
11
  var autoAdjustOverflowEnabled = {
@@ -142,7 +143,7 @@ function getDisabledCompatibleChildren(child) {
142
143
 
143
144
  return jsx("span", Object.assign({
144
145
  style: spanStyle,
145
- className: clsx(element.props.className, "paraui-tooltip-disabled-compatible-wrapper")
146
+ className: clsx(element.props.className, "".concat($rcPrefixCls, "-tooltip-disabled-compatible-wrapper"))
146
147
  }, {
147
148
  children: _child
148
149
  }));
@@ -208,7 +209,7 @@ function getAlignOffset(place) {
208
209
  return offsetMap[mPlace];
209
210
  }
210
211
 
211
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/5/25 下午7:17\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-tooltip {\n color: rgb(255, 255, 255);\n font-size: 14px;\n line-height: 1.5715;\n position: absolute;\n z-index: 1500;\n display: block;\n width: max-content;\n max-width: 250px;\n visibility: visible;\n}\n.paraui-tooltip-content {\n position: relative;\n}\n.paraui-tooltip-hidden {\n display: none;\n}\n.paraui-tooltip-hide-arrow .paraui-tooltip-arrow {\n display: none;\n}\n.paraui-tooltip-inner {\n min-width: 30px;\n min-height: 32px;\n padding: 5px 12px;\n color: rgb(255, 255, 255);\n text-align: left;\n text-decoration: none;\n word-wrap: break-word;\n background-color: rgba(46, 55, 67, 0.7);\n border-radius: 4px;\n line-height: 22px;\n}\n.paraui-tooltip-arrow {\n position: absolute;\n z-index: 2;\n display: block;\n width: 22px;\n height: 22px;\n overflow: hidden;\n background: transparent;\n pointer-events: none;\n}\n.paraui-tooltip-arrow-content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: block;\n width: 11.3137085px;\n height: 11.3137085px;\n margin: auto;\n background-color: transparent;\n content: \"\";\n border-radius: 0 0 4px;\n pointer-events: none;\n}\n.paraui-tooltip-arrow-content::before {\n position: absolute;\n top: -11.3137085px;\n left: -11.3137085px;\n width: 33.9411255px;\n height: 33.9411255px;\n background: rgba(46, 55, 67, 0.7) -10px -10px no-repeat;\n content: \"\";\n -webkit-clip-path: path(\"M 9.849242404917499 24.091883092036785 A 5 5 0 0 1 13.384776310850237 22.627416997969522 L 20.627416997969522 22.627416997969522 A 2 2 0 0 0 22.627416997969522 20.627416997969522 L 22.627416997969522 13.384776310850237 A 5 5 0 0 1 24.091883092036785 9.849242404917499 L 23.091883092036785 9.849242404917499 L 9.849242404917499 23.091883092036785 Z\");\n}\n.paraui-tooltip-placement-top .paraui-tooltip-arrow, .paraui-tooltip-placement-topLeft .paraui-tooltip-arrow, .paraui-tooltip-placement-topRight .paraui-tooltip-arrow {\n bottom: 0;\n transform: translateY(100%);\n}\n.paraui-tooltip-placement-top .paraui-tooltip-arrow-content, .paraui-tooltip-placement-topLeft .paraui-tooltip-arrow-content, .paraui-tooltip-placement-topRight .paraui-tooltip-arrow-content {\n box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);\n transform: translateY(-11px) rotate(45deg);\n}\n.paraui-tooltip-placement-top .paraui-tooltip-arrow {\n left: 50%;\n transform: translateY(100%) translateX(-50%);\n}\n.paraui-tooltip-placement-topLeft .paraui-tooltip-arrow {\n left: 13px;\n}\n.paraui-tooltip-placement-topRight .paraui-tooltip-arrow {\n right: 13px;\n}\n.paraui-tooltip-placement-right .paraui-tooltip-arrow, .paraui-tooltip-placement-rightTop .paraui-tooltip-arrow, .paraui-tooltip-placement-rightBottom .paraui-tooltip-arrow {\n left: 0;\n transform: translateX(-100%);\n}\n.paraui-tooltip-placement-right .paraui-tooltip-arrow-content, .paraui-tooltip-placement-rightTop .paraui-tooltip-arrow-content, .paraui-tooltip-placement-rightBottom .paraui-tooltip-arrow-content {\n box-shadow: -3px 3px 7px rgba(0, 0, 0, 0.07);\n transform: translateX(11px) rotate(135deg);\n}\n.paraui-tooltip-placement-right .paraui-tooltip-arrow {\n top: 50%;\n transform: translateX(-100%) translateY(-50%);\n}\n.paraui-tooltip-placement-rightTop .paraui-tooltip-arrow {\n top: 5px;\n}\n.paraui-tooltip-placement-rightBottom .paraui-tooltip-arrow {\n bottom: 5px;\n}\n.paraui-tooltip-placement-left .paraui-tooltip-arrow, .paraui-tooltip-placement-leftTop .paraui-tooltip-arrow, .paraui-tooltip-placement-leftBottom .paraui-tooltip-arrow {\n right: 0;\n transform: translateX(100%);\n}\n.paraui-tooltip-placement-left .paraui-tooltip-arrow-content, .paraui-tooltip-placement-leftTop .paraui-tooltip-arrow-content, .paraui-tooltip-placement-leftBottom .paraui-tooltip-arrow-content {\n box-shadow: 3px -3px 7px rgba(0, 0, 0, 0.07);\n transform: translateX(-11px) rotate(315deg);\n}\n.paraui-tooltip-placement-left .paraui-tooltip-arrow {\n top: 50%;\n transform: translateX(100%) translateY(-50%);\n}\n.paraui-tooltip-placement-leftTop .paraui-tooltip-arrow {\n top: 5px;\n}\n.paraui-tooltip-placement-leftBottom .paraui-tooltip-arrow {\n bottom: 5px;\n}\n.paraui-tooltip-placement-bottom .paraui-tooltip-arrow, .paraui-tooltip-placement-bottomLeft .paraui-tooltip-arrow, .paraui-tooltip-placement-bottomRight .paraui-tooltip-arrow {\n top: 0;\n transform: translateY(-100%);\n}\n.paraui-tooltip-placement-bottom .paraui-tooltip-arrow-content, .paraui-tooltip-placement-bottomLeft .paraui-tooltip-arrow-content, .paraui-tooltip-placement-bottomRight .paraui-tooltip-arrow-content {\n box-shadow: -3px -3px 7px rgba(0, 0, 0, 0.07);\n transform: translateY(11px) rotate(225deg);\n}\n.paraui-tooltip-placement-bottom .paraui-tooltip-arrow {\n left: 50%;\n transform: translateY(-100%) translateX(-50%);\n}\n.paraui-tooltip-placement-bottomLeft .paraui-tooltip-arrow {\n left: 13px;\n}\n.paraui-tooltip-placement-bottomRight .paraui-tooltip-arrow {\n right: 13px;\n}\n\n.paraui-tooltip-zoom-big-fast-enter,\n.paraui-tooltip-zoom-big-fast-appear {\n animation-duration: 0.1s;\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n\n.paraui-tooltip-zoom-big-fast-leave {\n animation-duration: 0.1s;\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n\n.paraui-tooltip-zoom-big-fast-enter.paraui-tooltip-zoom-big-fast-enter-active,\n.paraui-tooltip-zoom-big-fast-appear.paraui-tooltip-zoom-big-fast-appear-active {\n animation-name: parauiTooltipZoomBigIn;\n animation-play-state: running;\n}\n\n.paraui-tooltip-zoom-big-fast-leave.paraui-tooltip-zoom-big-fast-leave-active {\n animation-name: parauiTooltipZoomBigOut;\n animation-play-state: running;\n pointer-events: none;\n}\n\n.paraui-tooltip-zoom-big-fast-enter,\n.paraui-tooltip-zoom-big-fast-appear {\n transform: scale(0);\n opacity: 0;\n animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);\n}\n\n.paraui-tooltip-zoom-big-fast-enter-prepare,\n.paraui-tooltip-zoom-big-fast-appear-prepare {\n transform: none;\n}\n\n.paraui-tooltip-zoom-big-fast-leave {\n animation-timing-function: cubic-bezier(0.78, 0.14, 0.15, 0.86);\n}\n\n@keyframes parauiTooltipZoomBigIn {\n 0% {\n transform: scale(0.8);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes parauiTooltipZoomBigOut {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0.8);\n opacity: 0;\n }\n}";
212
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/5/25 下午7:17\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-tooltip {\n color: rgb(255, 255, 255);\n font-size: 14px;\n line-height: 1.5715;\n position: absolute;\n z-index: 1500;\n display: block;\n width: max-content;\n max-width: 250px;\n visibility: visible;\n}\n.paraui-v3-tooltip .component-tooltip-content {\n position: relative;\n}\n.paraui-v3-tooltip.component-tooltip-hidden {\n display: none;\n}\n.paraui-v3-tooltip.paraui-v3-tooltip-hide-arrow .component-tooltip-arrow {\n display: none;\n}\n.paraui-v3-tooltip .component-tooltip-inner {\n min-width: 30px;\n min-height: 32px;\n padding: 5px 12px;\n color: rgb(255, 255, 255);\n text-align: left;\n text-decoration: none;\n word-wrap: break-word;\n background-color: rgba(46, 55, 67, 0.7);\n border-radius: 4px;\n line-height: 22px;\n}\n.paraui-v3-tooltip .component-tooltip-arrow {\n position: absolute;\n z-index: 2;\n display: block;\n width: 22px;\n height: 22px;\n overflow: hidden;\n background: transparent;\n pointer-events: none;\n}\n.paraui-v3-tooltip .component-tooltip-arrow-content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: block;\n width: 11.3137085px;\n height: 11.3137085px;\n margin: auto;\n background-color: transparent;\n content: \"\";\n border-radius: 0 0 4px;\n pointer-events: none;\n}\n.paraui-v3-tooltip .component-tooltip-arrow-content::before {\n position: absolute;\n top: -11.3137085px;\n left: -11.3137085px;\n width: 33.9411255px;\n height: 33.9411255px;\n background: rgba(46, 55, 67, 0.7) -10px -10px no-repeat;\n content: \"\";\n -webkit-clip-path: path(\"M 9.849242404917499 24.091883092036785 A 5 5 0 0 1 13.384776310850237 22.627416997969522 L 20.627416997969522 22.627416997969522 A 2 2 0 0 0 22.627416997969522 20.627416997969522 L 22.627416997969522 13.384776310850237 A 5 5 0 0 1 24.091883092036785 9.849242404917499 L 23.091883092036785 9.849242404917499 L 9.849242404917499 23.091883092036785 Z\");\n}\n.paraui-v3-tooltip.component-tooltip-placement-top .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-topLeft .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-topRight .component-tooltip-arrow {\n bottom: 0;\n transform: translateY(100%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-top .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-topLeft .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-topRight .component-tooltip-arrow-content {\n box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);\n transform: translateY(-11px) rotate(45deg);\n}\n.paraui-v3-tooltip.component-tooltip-placement-top .component-tooltip-arrow {\n left: 50%;\n transform: translateY(100%) translateX(-50%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-topLeft .component-tooltip-arrow {\n left: 13px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-topRight .component-tooltip-arrow {\n right: 13px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-right .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-rightTop .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-rightBottom .component-tooltip-arrow {\n left: 0;\n transform: translateX(-100%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-right .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-rightTop .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-rightBottom .component-tooltip-arrow-content {\n box-shadow: -3px 3px 7px rgba(0, 0, 0, 0.07);\n transform: translateX(11px) rotate(135deg);\n}\n.paraui-v3-tooltip.component-tooltip-placement-right .component-tooltip-arrow {\n top: 50%;\n transform: translateX(-100%) translateY(-50%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-rightTop .component-tooltip-arrow {\n top: 5px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-rightBottom .component-tooltip-arrow {\n bottom: 5px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-left .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-leftTop .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-leftBottom .component-tooltip-arrow {\n right: 0;\n transform: translateX(100%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-left .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-leftTop .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-leftBottom .component-tooltip-arrow-content {\n box-shadow: 3px -3px 7px rgba(0, 0, 0, 0.07);\n transform: translateX(-11px) rotate(315deg);\n}\n.paraui-v3-tooltip.component-tooltip-placement-left .component-tooltip-arrow {\n top: 50%;\n transform: translateX(100%) translateY(-50%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-leftTop .component-tooltip-arrow {\n top: 5px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-leftBottom .component-tooltip-arrow {\n bottom: 5px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-bottom .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-bottomLeft .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-bottomRight .component-tooltip-arrow {\n top: 0;\n transform: translateY(-100%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-bottom .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-bottomLeft .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-bottomRight .component-tooltip-arrow-content {\n box-shadow: -3px -3px 7px rgba(0, 0, 0, 0.07);\n transform: translateY(11px) rotate(225deg);\n}\n.paraui-v3-tooltip.component-tooltip-placement-bottom .component-tooltip-arrow {\n left: 50%;\n transform: translateY(-100%) translateX(-50%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-bottomLeft .component-tooltip-arrow {\n left: 13px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-bottomRight .component-tooltip-arrow {\n right: 13px;\n}\n\n.component-tooltip-zoom-big-fast-enter,\n.component-tooltip-zoom-big-fast-appear {\n animation-duration: 0.1s;\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n\n.component-tooltip-zoom-big-fast-leave {\n animation-duration: 0.1s;\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n\n.component-tooltip-zoom-big-fast-enter.component-tooltip-zoom-big-fast-enter-active,\n.component-tooltip-zoom-big-fast-appear.component-tooltip-zoom-big-fast-appear-active {\n animation-name: componentTooltipZoomBigIn;\n animation-play-state: running;\n}\n\n.component-tooltip-zoom-big-fast-leave.component-tooltip-zoom-big-fast-leave-active {\n animation-name: componentTooltipZoomBigOut;\n animation-play-state: running;\n pointer-events: none;\n}\n\n.component-tooltip-zoom-big-fast-enter,\n.component-tooltip-zoom-big-fast-appear {\n transform: scale(0);\n opacity: 0;\n animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);\n}\n\n.component-tooltip-zoom-big-fast-enter-prepare,\n.component-tooltip-zoom-big-fast-appear-prepare {\n transform: none;\n}\n\n.component-tooltip-zoom-big-fast-leave {\n animation-timing-function: cubic-bezier(0.78, 0.14, 0.15, 0.86);\n}\n\n@keyframes componentTooltipZoomBigIn {\n 0% {\n transform: scale(0.8);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes componentTooltipZoomBigOut {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0.8);\n opacity: 0;\n }\n}";
212
213
  styleInject(css_248z);
213
214
 
214
215
  var Tooltip = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
@@ -220,6 +221,15 @@ var Tooltip = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
220
221
  setVisible = _React$useState2[1]; //是否显示
221
222
 
222
223
 
224
+ var wrapRef = React__default.useRef(); //锚点
225
+
226
+ var tRef = React__default.useRef(); //实例
227
+
228
+ var _React$useState3 = React__default.useState([0, 0]),
229
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
230
+ targetOffset = _React$useState4[0],
231
+ setTargetOffset = _React$useState4[1];
232
+
223
233
  React__default.useEffect(function () {
224
234
  var _a;
225
235
 
@@ -289,10 +299,31 @@ var Tooltip = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
289
299
  }
290
300
 
291
301
  domNode.style.transformOrigin = "".concat(transformOrigin.left, " ").concat(transformOrigin.top);
302
+ }; //跟随光标
303
+
304
+
305
+ var handleMouseMove = function handleMouseMove(e) {
306
+ var _a, _b, _c, _d;
307
+
308
+ if (wrapRef.current) {
309
+ var popupHeight = ((_d = (_c = (_b = (_a = tRef.current) === null || _a === void 0 ? void 0 : _a.popupRef) === null || _b === void 0 ? void 0 : _b.current) === null || _c === void 0 ? void 0 : _c.getElement()) === null || _d === void 0 ? void 0 : _d.offsetHeight) || 0;
310
+ var cursorSpace = popupHeight === 0 ? 60 : 30;
311
+
312
+ var _wrapRef$current$getB = wrapRef.current.getBoundingClientRect(),
313
+ x = _wrapRef$current$getB.x,
314
+ y = _wrapRef$current$getB.y,
315
+ width = _wrapRef$current$getB.width;
316
+
317
+ var newX = e.clientX - (x + width / 2);
318
+ var newY = e.clientY - y + popupHeight + cursorSpace;
319
+ setTimeout(function () {
320
+ setTargetOffset([-newX, -newY]);
321
+ });
322
+ }
292
323
  };
293
324
 
294
325
  var _props$prefixCls = props.prefixCls,
295
- prefixCls = _props$prefixCls === void 0 ? 'paraui-tooltip' : _props$prefixCls,
326
+ prefixCls = _props$prefixCls === void 0 ? "".concat($rcPrefixCls, "-tooltip") : _props$prefixCls,
296
327
  getTooltipContainer = props.getTooltipContainer,
297
328
  getPopupContainer = props.getPopupContainer,
298
329
  overlayClassName = props.overlayClassName,
@@ -300,36 +331,51 @@ var Tooltip = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
300
331
  children = props.children,
301
332
  title = props.title,
302
333
  placement = props.placement,
303
- restProps = __rest(props, ["prefixCls", "getTooltipContainer", "getPopupContainer", "overlayClassName", "overlayInnerStyle", "children", "title", "placement"]);
334
+ isPopover = props.isPopover,
335
+ followCursor = props.followCursor,
336
+ restProps = __rest(props, ["prefixCls", "getTooltipContainer", "getPopupContainer", "overlayClassName", "overlayInnerStyle", "children", "title", "placement", "isPopover", "followCursor"]);
304
337
 
305
338
  var tempVisible = visible;
306
339
 
307
340
  if (!('visible' in props || 'open' in props) && isUntitled()) {
308
341
  //没有title必然不可见
309
342
  tempVisible = false;
310
- }
343
+ } //overlayCls
344
+
311
345
 
346
+ var overlayCls = clsx(!isPopover && "".concat($prefixCls, "-tooltip"), overlayClassName, !props.arrow && "".concat($prefixCls, "-tooltip-hide-arrow"));
312
347
  return jsx(RcTooltip, Object.assign({}, restProps, {
313
- placement: mapLegacyPlacement(placement),
314
348
  prefixCls: prefixCls,
315
- overlayClassName: clsx(overlayClassName, !props.arrow && 'paraui-tooltip-hide-arrow'),
349
+ placement: followCursor ? 'top' : mapLegacyPlacement(placement),
350
+ overlayClassName: overlayCls,
316
351
  getTooltipContainer: getPopupContainer || getTooltipContainer,
317
- ref: ref,
352
+ ref: tRef,
318
353
  builtinPlacements: getTooltipPlacements(),
319
354
  overlay: title,
320
355
  visible: tempVisible,
356
+ align: {
357
+ targetOffset: targetOffset
358
+ },
321
359
  onVisibleChange: onVisibleChange,
322
360
  onPopupAlign: onPopupAlign,
323
361
  overlayInnerStyle: overlayInnerStyle,
324
362
  arrowContent: props.arrow ? jsx("span", {
325
- className: "".concat(prefixCls, "-arrow-content")
363
+ className: "".concat($rcPrefixCls, "-tooltip-arrow-content")
326
364
  }) : null,
327
365
  motion: {
328
- motionName: 'paraui-tooltip-zoom-big-fast',
366
+ motionName: "".concat($rcPrefixCls, "-tooltip-zoom-big-fast"),
329
367
  motionDeadline: 1000
330
368
  }
331
369
  }, {
332
- children: getDisabledCompatibleChildren(children)
370
+ children: followCursor ? jsx("div", Object.assign({
371
+ style: {
372
+ display: 'inline-block'
373
+ },
374
+ ref: wrapRef,
375
+ onMouseMove: handleMouseMove
376
+ }, {
377
+ children: getDisabledCompatibleChildren(children)
378
+ })) : getDisabledCompatibleChildren(children)
333
379
  }));
334
380
  });
335
381
  Tooltip.displayName = 'Tooltip';
@@ -340,7 +386,8 @@ Tooltip.defaultProps = {
340
386
  arrowPointAtCenter: false,
341
387
  autoAdjustOverflow: true,
342
388
  arrow: true,
343
- defaultVisible: false
389
+ defaultVisible: false,
390
+ followCursor: false
344
391
  };
345
392
 
346
393
  export { Tooltip, Tooltip as default };
@@ -27,5 +27,7 @@ export interface TooltipProps extends Partial<Omit<RcTooltipProps, 'children'>>
27
27
  arrow?: boolean;
28
28
  /** 控制浮层是否显示 */
29
29
  open?: boolean;
30
+ /** 跟随光标移动 */
31
+ followCursor?: boolean;
30
32
  [name: string]: any;
31
33
  }
@@ -1,7 +1,9 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import './style/index.scss';
3
3
  /**
4
4
  * @description: 穿梭框
5
+ * @param className{string} 类名
6
+ * @param style{string} 样式
5
7
  * @param data{Array} 数据源
6
8
  * @param value{Array} 当前选中的值
7
9
  * @param onChange{Function} 值改变时的回调
@@ -9,10 +11,12 @@ import './style/index.scss';
9
11
  *
10
12
  */
11
13
  interface TransferProps {
14
+ className?: string;
15
+ style?: React.CSSProperties;
12
16
  data?: Array<any>;
13
17
  value?: Array<any>;
14
18
  onChange?: (data: Array<any>) => void;
15
19
  titles?: Array<string>;
16
20
  }
17
- export declare const Transfer: ({ data, value, onChange, titles, }: TransferProps) => JSX.Element;
21
+ export declare const Transfer: ({ data, value, onChange, titles, className, style }: TransferProps) => JSX.Element;
18
22
  export default Transfer;