@para-ui/core 4.0.29 → 4.0.31

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 (75) hide show
  1. package/AutoButton/index.d.ts +41 -0
  2. package/AutoButton/index.js +213 -0
  3. package/AutoButton/lang/en_US.d.ts +4 -0
  4. package/AutoButton/lang/index.d.ts +9 -0
  5. package/AutoButton/lang/zh_CN.d.ts +4 -0
  6. package/Badge/index.d.ts +3 -1
  7. package/Badge/index.js +15 -5
  8. package/Card/index.d.ts +53 -0
  9. package/Card/index.js +218 -0
  10. package/Card/lang/en_US.d.ts +5 -0
  11. package/Card/lang/index.d.ts +11 -0
  12. package/Card/lang/zh_CN.d.ts +5 -0
  13. package/Cascader/index.js +6 -7
  14. package/ComboSelect/index.js +7 -4
  15. package/CycleSelector/index.js +3 -1
  16. package/DatePicker/index.js +3 -1
  17. package/DragVerify/index.js +7 -2
  18. package/DynamicMultiBox/index.js +8 -6
  19. package/Form/index.js +8 -5
  20. package/FormItem/index.js +8 -5
  21. package/Image/index.js +3 -4
  22. package/PopConfirm/index.js +2 -2
  23. package/PopMenu/index.js +16 -5
  24. package/QuickReply/index.js +1 -1
  25. package/README.md +14 -0
  26. package/RangeInput/index.d.ts +59 -0
  27. package/RangeInput/index.js +193 -0
  28. package/Select/index.js +2 -2
  29. package/Selector/index.js +282 -548
  30. package/SelectorPicker/index.js +5 -5
  31. package/SingleBox/index.js +2 -2
  32. package/SortBox/index.d.ts +27 -0
  33. package/SortBox/index.js +64 -0
  34. package/Stepper/index.js +1 -1
  35. package/Switch/index.js +2 -2
  36. package/Table/index.js +471 -409
  37. package/Tabs/index.js +2 -2
  38. package/Tag/index.js +82 -53
  39. package/TextEditor/index.js +3 -3
  40. package/TimePicker/index.js +3 -1
  41. package/Timeline/index.js +14 -20
  42. package/ToggleButton/index.js +25 -26
  43. package/Transfer/index.js +48 -43
  44. package/Tree/index.js +8 -5
  45. package/Upload/ImageUpload/index.d.ts +2 -7
  46. package/Upload/index.js +848 -495
  47. package/Upload/interface.d.ts +18 -0
  48. package/_verture/{Portal-5bd49559.js → Portal-edd94cac.js} +2 -2
  49. package/_verture/{index-15a0b6a6.js → index-3795d730.js} +1 -1
  50. package/_verture/{index-e9405e35.js → index-567b5779.js} +395 -313
  51. package/_verture/{index-68f0506c.js → index-8752ccab.js} +4 -5
  52. package/_verture/index-94e24006.js +327 -0
  53. package/_verture/{slicedToArray-a8206399.js → slicedToArray-75fa4188.js} +15 -2
  54. package/_verture/{toConsumableArray-8f4c9589.js → toConsumableArray-c7a8028f.js} +1 -1
  55. package/index.d.ts +8 -0
  56. package/index.js +16 -11
  57. package/locale/en-US.d.ts +7 -0
  58. package/locale/index.d.ts +14 -0
  59. package/locale/index.js +14 -0
  60. package/locale/zh-CN.d.ts +7 -0
  61. package/package.json +2 -4
  62. package/umd/AutoButton.js +43 -0
  63. package/umd/Badge.js +1 -1
  64. package/umd/Card.js +1 -0
  65. package/umd/DragVerify.js +1 -1
  66. package/umd/FunctionModal.js +3 -3
  67. package/umd/Modal.js +2 -2
  68. package/umd/PopMenu.js +2 -2
  69. package/umd/RangeInput.js +43 -0
  70. package/umd/SortBox.js +41 -0
  71. package/umd/Upload.js +4 -4
  72. package/umd/locale.js +1 -1
  73. package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
  74. /package/_verture/{index-0f5ee6f7.js → index-c8cb6751.js} +0 -0
  75. /package/_verture/{typeof-6ec38efd.js → typeof-4646b22c.js} +0 -0
package/Transfer/index.js CHANGED
@@ -8,6 +8,7 @@ import ExpandLess from '@para-ui/icons/Up';
8
8
  import Down from '@para-ui/icons/Down';
9
9
  import { u as useFormatMessage } from '../_verture/useFormatMessage-1fc7c957.js';
10
10
  import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
11
+ import { _ as _slicedToArray } from '../_verture/slicedToArray-75fa4188.js';
11
12
  import { Search } from '../Search/index.js';
12
13
  import SearchIcon from '@para-ui/icons/Search';
13
14
  import AutoTips from '../AutoTips/index.js';
@@ -59,8 +60,8 @@ var zh = {
59
60
  };
60
61
 
61
62
  var localeJson = {
62
- zh,
63
- en
63
+ zh: zh,
64
+ en: en
64
65
  };
65
66
 
66
67
  var useClick = function useClick(callback, doubleCallback) {
@@ -88,32 +89,36 @@ var useClick = function useClick(callback, doubleCallback) {
88
89
  };
89
90
  };
90
91
 
91
- const Box = props => {
92
- const {
93
- title,
94
- data,
95
- onSearch,
96
- onchange,
97
- onMove,
98
- queryAll,
99
- inverse,
100
- direction,
101
- fluctuationPosition,
102
- fluctuationOrther,
103
- onEndSort,
104
- multiple,
105
- rightIcon,
106
- style,
107
- customKey
108
- } = props;
109
- const intl = useFormatMessage('Transfer', localeJson);
110
- const [checkCount, setCheckCount] = useState([]);
111
- const [disabledCount, setDisabledCount] = useState(0);
112
- const ref = useRef();
113
- useEffect(() => {
114
- const arr = [];
115
- let count = 0;
116
- data.forEach((item, index) => {
92
+ var Box = function Box(props) {
93
+ var title = props.title,
94
+ data = props.data,
95
+ onSearch = props.onSearch,
96
+ onchange = props.onchange,
97
+ onMove = props.onMove,
98
+ queryAll = props.queryAll,
99
+ inverse = props.inverse,
100
+ direction = props.direction,
101
+ fluctuationPosition = props.fluctuationPosition,
102
+ fluctuationOrther = props.fluctuationOrther,
103
+ onEndSort = props.onEndSort,
104
+ multiple = props.multiple,
105
+ rightIcon = props.rightIcon,
106
+ style = props.style,
107
+ customKey = props.customKey;
108
+ var intl = useFormatMessage('Transfer', localeJson);
109
+ var _useState = useState([]),
110
+ _useState2 = _slicedToArray(_useState, 2),
111
+ checkCount = _useState2[0],
112
+ setCheckCount = _useState2[1];
113
+ var _useState3 = useState(0),
114
+ _useState4 = _slicedToArray(_useState3, 2),
115
+ disabledCount = _useState4[0],
116
+ setDisabledCount = _useState4[1];
117
+ var ref = useRef();
118
+ useEffect(function () {
119
+ var arr = [];
120
+ var count = 0;
121
+ data.forEach(function (item, index) {
117
122
  if (item.checked && !item.hide) {
118
123
  arr.push(index);
119
124
  }
@@ -124,29 +129,29 @@ const Box = props => {
124
129
  setDisabledCount(count);
125
130
  setCheckCount(arr);
126
131
  }, [data]);
127
- useEffect(() => {
132
+ useEffect(function () {
128
133
  if (direction == 'right') {
129
134
  new Sortable(ref.current, {
130
135
  animation: 180,
131
136
  ghostClass: 'blue-background-class',
132
137
  dragClass: 'drag-item',
133
138
  easing: 'step-start',
134
- onEnd: evt => {
139
+ onEnd: function onEnd(evt) {
135
140
  onEndSort === null || onEndSort === void 0 ? void 0 : onEndSort(evt.oldIndex, evt.newIndex);
136
141
  }
137
142
  });
138
143
  }
139
144
  }, []);
140
- const handler = useClick((e, index, item) => {
145
+ var handler = useClick(function (e, index, item) {
141
146
  if (item.disabled) return;
142
147
  onchange(e, !item.checked, index, direction, multiple);
143
- }, (e, index, item) => {
148
+ }, function (e, index, item) {
144
149
  if (item === null || item === void 0 ? void 0 : item.disabled) return;
145
150
  onchange(e, true, index, direction, false);
146
151
  onMove(direction === 'right' ? 'left' : 'right');
147
152
  });
148
- const itemStyle = data => {
149
- const stlye = {};
153
+ var itemStyle = function itemStyle(data) {
154
+ var stlye = {};
150
155
  if (data === null || data === void 0 ? void 0 : data.tagColor) {
151
156
  stlye.borderLeft = "4px solid ".concat(data.tagColor);
152
157
  }
@@ -171,15 +176,15 @@ const Box = props => {
171
176
  showBtn: false,
172
177
  rightIcon: jsx(SearchIcon, {}),
173
178
  rightIconExist: true,
174
- onChange: val => {
179
+ onChange: function onChange(val) {
175
180
  onSearch(val, direction);
176
181
  },
177
- onClickRightIcon: val => {
182
+ onClickRightIcon: function onClickRightIcon(val) {
178
183
  onSearch(val, direction);
179
184
  },
180
- onEnter: event => {
185
+ onEnter: function onEnter(event) {
181
186
  var _a;
182
- const val = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) || '';
187
+ var val = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) || '';
183
188
  onSearch(val, direction);
184
189
  },
185
190
  allowClear: false
@@ -187,11 +192,11 @@ const Box = props => {
187
192
  className: "context",
188
193
  ref: ref
189
194
  }, {
190
- children: data.map((item, index) => {
195
+ children: data.map(function (item, index) {
191
196
  return jsxs("div", Object.assign({
192
197
  className: clsx('item', (item === null || item === void 0 ? void 0 : item.tagColor) && 'item-border', (item === null || item === void 0 ? void 0 : item.disabled) && 'item-disabled', (item === null || item === void 0 ? void 0 : item.checked) && 'item-checked', fluctuationPosition === index && 'item-fluctuation', fluctuationOrther === index && 'item-fluctuationOrther'),
193
198
  style: itemStyle(item),
194
- onClick: e => {
199
+ onClick: function onClick(e) {
195
200
  handler(e, index, item);
196
201
  }
197
202
  }, {
@@ -223,7 +228,7 @@ const Box = props => {
223
228
  children: [jsx(Button, Object.assign({
224
229
  variant: "text",
225
230
  className: "".concat(checkCount.length === data.length - disabledCount && data.length > 0 ? 'btn-on' : ''),
226
- onClick: () => {
231
+ onClick: function onClick() {
227
232
  queryAll(checkCount.length !== data.length - disabledCount, direction);
228
233
  }
229
234
  }, {
@@ -234,7 +239,7 @@ const Box = props => {
234
239
  variant: "text",
235
240
  className: "".concat(checkCount.length === 0 || checkCount.length === data.length - disabledCount ? 'btn-off' : ''),
236
241
  disabled: checkCount.length === 0 || checkCount.length === data.length - disabledCount,
237
- onClick: () => {
242
+ onClick: function onClick() {
238
243
  inverse(direction);
239
244
  }
240
245
  }, {
@@ -250,7 +255,7 @@ const Box = props => {
250
255
  }))]
251
256
  }));
252
257
  };
253
- const Sortablejs = Sortable;
258
+ var Sortablejs = Sortable;
254
259
 
255
260
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-transfer {\n display: flex;\n font-size: 14px;\n user-select: none;\n}\n.paraui-v4-transfer .blue-background-class {\n background-color: rgb(240, 245, 255);\n}\n.paraui-v4-transfer .drag-item {\n background: rgb(255, 255, 255) !important;\n box-shadow: rgba(212, 218, 227, 0.4);\n}\n.paraui-v4-transfer .box {\n border-radius: 4px;\n border: 1px solid rgb(212, 218, 227);\n overflow: hidden;\n}\n.paraui-v4-transfer .box .box-header {\n background: rgb(247, 248, 250);\n color: rgb(29, 33, 38);\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-left: 10px;\n height: 36px;\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-transfer .box .count {\n color: rgb(29, 33, 38);\n letter-spacing: 1px;\n}\n.paraui-v4-transfer .box .context {\n height: 400px;\n overflow: auto;\n margin-top: 4px;\n}\n.paraui-v4-transfer .box .context .item-fluctuation {\n animation: flucturation 0.4s forwards;\n}\n.paraui-v4-transfer .box .context .item-fluctuationOrther {\n animation: flucturationOrther 0.5s forwards;\n}\n.paraui-v4-transfer .box .context .item {\n padding: 0px 10px;\n height: 30px;\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.paraui-v4-transfer .box .context .item.item-checked:hover {\n background-color: rgb(247, 248, 250) !important;\n}\n.paraui-v4-transfer .box .context .item.item-checked > .item-label {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-transfer .box .context .item > .item-label {\n flex: 1;\n overflow: hidden;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-transfer .box .context .item:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-transfer .box .context .item.item-disabled:hover {\n background: inherit;\n cursor: no-drop;\n}\n.paraui-v4-transfer .box .context .item.item-disabled > .item-label {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-transfer .box .context .item .handle {\n margin-left: 8px;\n display: flex;\n align-content: center;\n}\n.paraui-v4-transfer .box .context .item .handle .handle-line {\n height: 12px;\n border-left: 1px solid rgb(212, 218, 227);\n margin: auto 10px auto 0;\n}\n.paraui-v4-transfer .box .context .item .handle svg {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-transfer .box .context .item .handle:hover svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-transfer .box .context .item-border {\n padding-left: 6px;\n}\n.paraui-v4-transfer .box .text-field-content {\n border: none;\n border-radius: 0;\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-transfer .box .footer {\n display: flex;\n align-items: center;\n border-top: 1px solid rgb(212, 218, 227);\n height: 36px;\n justify-content: space-between;\n padding: 0 10px;\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) button {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) button:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) .btn-off {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) .btn-off:hover {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) > button {\n padding: 0;\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) > button:nth-child(2) {\n margin-left: 16px;\n}\n.paraui-v4-transfer .moveBtn {\n display: flex;\n height: 500px;\n flex-direction: column;\n justify-content: center;\n margin: 0 20px;\n}\n.paraui-v4-transfer .moveBtn > button {\n background-color: rgb(46, 101, 230);\n color: rgb(255, 255, 255);\n}\n.paraui-v4-transfer .moveBtn .btn-left {\n margin-top: 16px;\n}\n\n@keyframes flucturation {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(36px);\n }\n}\n@keyframes flucturationOrther {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(-36px);\n }\n}";
256
261
  styleInject(css_248z);
package/Tree/index.js CHANGED
@@ -1,11 +1,16 @@
1
- import { T as Tree } from '../_verture/index-e9405e35.js';
2
- export { T as default } from '../_verture/index-e9405e35.js';
1
+ import { T as Tree } from '../_verture/index-567b5779.js';
2
+ export { T as default } from '../_verture/index-567b5779.js';
3
+ import '../_verture/toConsumableArray-c7a8028f.js';
4
+ import '../_verture/slicedToArray-75fa4188.js';
5
+ import '../_verture/defineProperty-6f62bb2a.js';
6
+ import '../_verture/typeof-adeedc13.js';
7
+ import '../_verture/index-94e24006.js';
8
+ import '../_verture/typeof-4646b22c.js';
3
9
  import '../_verture/tslib.es6-55ed4bd2.js';
4
10
  import 'react/jsx-runtime';
5
11
  import 'react';
6
12
  import 'rc-tree';
7
13
  import 'clsx';
8
- import '../_verture/typeof-adeedc13.js';
9
14
  import '@para-ui/icons/LoadingF';
10
15
  import '@para-ui/icons/Document';
11
16
  import '@para-ui/icons/DownTriangleF';
@@ -19,8 +24,6 @@ import '../_verture/constant-5317fc89.js';
19
24
  import '@para-ui/icons/Forbid';
20
25
  import '../_verture/style-inject.es-300983ab.js';
21
26
  import '@para-ui/icons/Help';
22
- import '../_verture/slicedToArray-a8206399.js';
23
- import '../_verture/unsupportedIterableToArray-cb478f24.js';
24
27
  import 'react-dom';
25
28
  import '@para-ui/icons/EditFile';
26
29
  import '@para-ui/icons/PlusCircle';
@@ -1,14 +1,9 @@
1
1
  import { FunctionComponent } from 'react';
2
- import { UploadProps } from '../interface';
2
+ import { UploadProps, DefaultImage } from '../interface';
3
3
  import './index.scss';
4
4
  export type ImageUploadProps = Omit<UploadProps, 'type'> & {
5
5
  /** 默认图片 showUploadList为false时有效 */
6
- defaultImage?: {
7
- /** 图片地址 */
8
- imageUrl: string;
9
- /** 图片名称 */
10
- imageName?: string;
11
- };
6
+ defaultImage?: DefaultImage;
12
7
  /** 用于控制这个组件只回显图片 不能上传和删除 */
13
8
  readonly?: boolean;
14
9
  };