@para-ui/core 4.0.27 → 4.0.29

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.
@@ -26,7 +26,8 @@ import '@para-ui/icons/Close';
26
26
  import '@para-ui/icons/EditOutline';
27
27
  import '../_verture/tinycolor-ece3542d.js';
28
28
  import '@para-ui/icons/Plus';
29
- import '../_verture/defineProperty-f0e15205.js';
29
+ import '../_verture/defineProperty-6f62bb2a.js';
30
+ import '../_verture/typeof-adeedc13.js';
30
31
  import 'rc-picker';
31
32
  import '@para-ui/icons/CloseCircleF';
32
33
  import '@para-ui/icons/Calendar';
package/Title/index.d.ts CHANGED
@@ -39,6 +39,8 @@ export interface TitleProps {
39
39
  className?: string;
40
40
  /** style */
41
41
  style?: React.CSSProperties;
42
+ /** 默认是否展开 */
43
+ defaultCollapse?: boolean;
42
44
  }
43
45
  export declare const Title: FC<TitleProps>;
44
46
  export default Title;
package/Title/index.js CHANGED
@@ -16,7 +16,7 @@ import '@para-ui/icons/Help';
16
16
  import 'rc-collapse';
17
17
  import '@para-ui/icons/Right';
18
18
 
19
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/8/11 2:55 PM\n* @description 标题\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-title-collapse {\n border-bottom: none;\n}\n.paraui-v4-title-collapse > .component-collapse-item {\n border-top: none;\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header {\n flex-direction: row-reverse;\n justify-content: space-between;\n padding: 0;\n padding-right: 16px;\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header .paraui-v4-title-content {\n max-width: calc(100% - 32px);\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header .collapse-svg-box {\n color: rgb(92, 101, 115);\n margin-right: 0;\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header:hover {\n position: relative;\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header:hover > div {\n z-index: 1;\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header:hover > .collapse-svg-box:hover svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header:hover .title-link:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header:hover::after {\n position: absolute;\n background-color: rgb(247, 248, 250);\n content: \"\";\n width: 100%;\n height: calc(100% + 4px);\n left: -10px;\n border-radius: 4px;\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-content > .component-collapse-content-box {\n padding-left: 0px;\n padding-right: 0px;\n padding-bottom: 0;\n}\n\n.paraui-v4-title .paraui-v4-title-content {\n display: flex;\n align-items: center;\n line-height: 20px;\n}\n.paraui-v4-title .paraui-v4-title-content .title-ink {\n width: 4px;\n height: 14px;\n background-color: rgb(46, 101, 230);\n border-radius: 2px;\n}\n.paraui-v4-title .paraui-v4-title-content .title-icon {\n display: inline-flex;\n}\n.paraui-v4-title .paraui-v4-title-content .title-text {\n margin-left: 8px;\n font-size: 14px;\n font-weight: 700;\n color: rgb(29, 33, 38);\n display: flex;\n align-items: center;\n white-space: nowrap;\n}\n.paraui-v4-title .paraui-v4-title-content .title-text .paraui-v4-help {\n line-height: 11px;\n font-size: 14px;\n margin-left: 4px;\n}\n.paraui-v4-title .paraui-v4-title-content .title-subtext {\n margin-left: 10px;\n font-size: 14px;\n font-weight: 400;\n color: rgb(161, 168, 179);\n}\n.paraui-v4-title .paraui-v4-title-content .title-link {\n margin-left: 10px;\n text-decoration: none;\n outline: none;\n font-size: 14px;\n font-weight: 400;\n white-space: nowrap;\n color: rgb(46, 101, 230);\n}\n.paraui-v4-title .paraui-v4-title-content .title-link:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-title .paraui-v4-title-content.paraui-v4-title-content-large .title-icon svg {\n font-size: 30px;\n}\n.paraui-v4-title .paraui-v4-title-content.paraui-v4-title-content-large .title-text {\n font-size: 18px;\n}\n.paraui-v4-title .paraui-v4-title-content.paraui-v4-title-content-medium .title-icon svg {\n font-size: 24px;\n}\n.paraui-v4-title .paraui-v4-title-content.paraui-v4-title-content-medium .title-text {\n font-size: 16px;\n}\n.paraui-v4-title .paraui-v4-title-content.paraui-v4-title-content-small .title-icon svg {\n font-size: 20px;\n}\n.paraui-v4-title .paraui-v4-title-content.paraui-v4-title-content-small .title-text {\n margin-left: 4px;\n}";
19
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/8/11 2:55 PM\n* @description 标题\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-title-collapse {\n border-bottom: none;\n}\n.paraui-v4-title-collapse > .component-collapse-item {\n border-top: none;\n}\n.paraui-v4-title-collapse > .component-collapse-item .paraui-v4-title-collapse-content {\n padding-top: 20px;\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header {\n flex-direction: row-reverse;\n justify-content: space-between;\n padding: 0;\n padding-right: 16px;\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header .paraui-v4-title-content {\n max-width: calc(100% - 32px);\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header .collapse-svg-box {\n color: rgb(92, 101, 115);\n margin-right: 0;\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header:hover {\n position: relative;\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header:hover > div {\n z-index: 1;\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header:hover > .collapse-svg-box:hover svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header:hover .title-link:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-header:hover::after {\n position: absolute;\n background-color: rgb(247, 248, 250);\n content: \"\";\n width: 100%;\n height: calc(100% + 4px);\n left: -10px;\n border-radius: 4px;\n}\n.paraui-v4-title-collapse > .component-collapse-item > .component-collapse-content > .component-collapse-content-box {\n padding-left: 0px;\n padding-right: 0px;\n padding-bottom: 0;\n}\n\n.paraui-v4-title .paraui-v4-title-content {\n display: flex;\n align-items: center;\n line-height: 20px;\n}\n.paraui-v4-title .paraui-v4-title-content .title-ink {\n width: 4px;\n height: 14px;\n background-color: rgb(46, 101, 230);\n border-radius: 2px;\n}\n.paraui-v4-title .paraui-v4-title-content .title-icon {\n display: inline-flex;\n}\n.paraui-v4-title .paraui-v4-title-content .title-text {\n margin-left: 8px;\n font-size: 14px;\n font-weight: 700;\n color: rgb(29, 33, 38);\n display: flex;\n align-items: center;\n white-space: nowrap;\n}\n.paraui-v4-title .paraui-v4-title-content .title-text .paraui-v4-help {\n line-height: 11px;\n font-size: 14px;\n margin-left: 4px;\n}\n.paraui-v4-title .paraui-v4-title-content .title-subtext {\n margin-left: 10px;\n font-size: 14px;\n font-weight: 400;\n color: rgb(161, 168, 179);\n}\n.paraui-v4-title .paraui-v4-title-content .title-link {\n margin-left: 10px;\n text-decoration: none;\n outline: none;\n font-size: 14px;\n font-weight: 400;\n white-space: nowrap;\n color: rgb(46, 101, 230);\n}\n.paraui-v4-title .paraui-v4-title-content .title-link:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-title .paraui-v4-title-content.paraui-v4-title-content-large .title-icon svg {\n font-size: 30px;\n}\n.paraui-v4-title .paraui-v4-title-content.paraui-v4-title-content-large .title-text {\n font-size: 18px;\n}\n.paraui-v4-title .paraui-v4-title-content.paraui-v4-title-content-medium .title-icon svg {\n font-size: 24px;\n}\n.paraui-v4-title .paraui-v4-title-content.paraui-v4-title-content-medium .title-text {\n font-size: 16px;\n}\n.paraui-v4-title .paraui-v4-title-content.paraui-v4-title-content-small .title-icon svg {\n font-size: 20px;\n}\n.paraui-v4-title .paraui-v4-title-content.paraui-v4-title-content-small .title-text {\n margin-left: 4px;\n}";
20
20
  styleInject(css_248z);
21
21
 
22
22
  const {
@@ -38,7 +38,9 @@ const Title = props => {
38
38
  titoleTooltipIcon,
39
39
  placement,
40
40
  arrow,
41
- style
41
+ style,
42
+ children,
43
+ defaultCollapse
42
44
  } = props;
43
45
  const titleTextRef = useRef(null);
44
46
  const linkTextRef = useRef(null);
@@ -103,15 +105,22 @@ const Title = props => {
103
105
  return jsx("div", Object.assign({
104
106
  className: "".concat($prefixCls, "-title")
105
107
  }, {
106
- children: collapseContent ? jsx(Collapse, Object.assign({
107
- className: cloCls()
108
- }, {
109
- children: jsx(Panel, Object.assign({
110
- header: titleContent()
108
+ children: collapseContent || children ? jsx("div", {
109
+ children: jsx(Collapse, Object.assign({
110
+ className: cloCls(),
111
+ defaultActiveKey: defaultCollapse ? '1' : undefined
111
112
  }, {
112
- children: collapseContent
113
- }), "1")
114
- })) : titleContent()
113
+ children: jsx(Panel, Object.assign({
114
+ header: titleContent()
115
+ }, {
116
+ children: jsx("div", Object.assign({
117
+ className: "".concat($prefixCls, "-title-collapse-content")
118
+ }, {
119
+ children: children || collapseContent
120
+ }))
121
+ }), "1")
122
+ }))
123
+ }) : titleContent()
115
124
  }));
116
125
  };
117
126
 
package/Tooltip/index.js CHANGED
@@ -9,12 +9,12 @@ import Forbid from '@para-ui/icons/Forbid';
9
9
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
10
10
 
11
11
  //自动调整位置
12
- const autoAdjustOverflowEnabled = {
12
+ var autoAdjustOverflowEnabled = {
13
13
  adjustX: 1,
14
14
  adjustY: 1
15
15
  };
16
16
  //非自动调整位置
17
- const autoAdjustOverflowDisabled = {
17
+ var autoAdjustOverflowDisabled = {
18
18
  adjustX: 0,
19
19
  adjustY: 0
20
20
  };
@@ -27,12 +27,12 @@ function getOverflowOptions(autoAdjustOverflow) {
27
27
  }
28
28
  //tooltip placement
29
29
  function getPlacements(config) {
30
- const {
31
- horizontalArrowShift = 16,
32
- verticalArrowShift = 8,
33
- autoAdjustOverflow
34
- } = config;
35
- const placementMap = {
30
+ var _config$horizontalArr = config.horizontalArrowShift,
31
+ horizontalArrowShift = _config$horizontalArr === void 0 ? 16 : _config$horizontalArr,
32
+ _config$verticalArrow = config.verticalArrowShift,
33
+ verticalArrowShift = _config$verticalArrow === void 0 ? 8 : _config$verticalArrow,
34
+ autoAdjustOverflow = config.autoAdjustOverflow;
35
+ var placementMap = {
36
36
  left: {
37
37
  points: ['cr', 'cl'],
38
38
  offset: [-8, 0]
@@ -82,7 +82,7 @@ function getPlacements(config) {
82
82
  offset: [-8, verticalArrowShift]
83
83
  }
84
84
  };
85
- Object.keys(placementMap).forEach(key => {
85
+ Object.keys(placementMap).forEach(function (key) {
86
86
  placementMap[key] = Object.assign(Object.assign({}, placements[key]), {
87
87
  offset: getAlignOffset(key).offset,
88
88
  overflow: getOverflowOptions(autoAdjustOverflow)
@@ -91,40 +91,39 @@ function getPlacements(config) {
91
91
  });
92
92
  return placementMap;
93
93
  }
94
- const splitObject = (obj, keys) => {
95
- const picked = {};
96
- const omitted = Object.assign({}, obj);
97
- keys.forEach(key => {
94
+ var splitObject = function splitObject(obj, keys) {
95
+ var picked = {};
96
+ var omitted = Object.assign({}, obj);
97
+ keys.forEach(function (key) {
98
98
  if (obj && key in obj) {
99
99
  picked[key] = obj[key];
100
100
  delete omitted[key];
101
101
  }
102
102
  });
103
103
  return {
104
- picked,
105
- omitted
104
+ picked: picked,
105
+ omitted: omitted
106
106
  };
107
107
  };
108
108
  //兼容禁用title
109
109
  function getDisabledCompatibleChildren(child) {
110
- const element = /*#__PURE__*/React__default.isValidElement(child) ? child : jsx("span", {
110
+ var element = /*#__PURE__*/React__default.isValidElement(child) ? child : jsx("span", {
111
111
  children: child
112
112
  });
113
113
  if (element.type === 'button' && element.props.disabled) {
114
- const {
115
- picked,
116
- omitted
117
- } = splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']);
118
- const spanStyle = Object.assign(Object.assign({
114
+ var _splitObject = splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']),
115
+ picked = _splitObject.picked,
116
+ omitted = _splitObject.omitted;
117
+ var spanStyle = Object.assign(Object.assign({
119
118
  display: 'inline-block'
120
119
  }, picked), {
121
120
  cursor: 'not-allowed',
122
121
  width: element.props.block ? '100%' : null
123
122
  });
124
- const buttonStyle = Object.assign(Object.assign({}, omitted), {
123
+ var buttonStyle = Object.assign(Object.assign({}, omitted), {
125
124
  pointerEvents: 'none'
126
125
  });
127
- const child = /*#__PURE__*/React__default.cloneElement(element, {
126
+ var _child = /*#__PURE__*/React__default.cloneElement(element, {
128
127
  style: buttonStyle,
129
128
  className: null
130
129
  });
@@ -132,14 +131,14 @@ function getDisabledCompatibleChildren(child) {
132
131
  style: spanStyle,
133
132
  className: clsx(element.props.className, "".concat($rcPrefixCls, "-tooltip-disabled-compatible-wrapper"))
134
133
  }, {
135
- children: child
134
+ children: _child
136
135
  }));
137
136
  }
138
137
  return element;
139
138
  }
140
139
  //映射placement
141
140
  function mapLegacyPlacement(place) {
142
- const legacyPlacement = {
141
+ var legacyPlacement = {
143
142
  'bottom-end': 'bottomRight',
144
143
  'bottom-start': 'bottomLeft',
145
144
  'left-end': 'leftBottom',
@@ -153,8 +152,8 @@ function mapLegacyPlacement(place) {
153
152
  }
154
153
  //浮层偏移量
155
154
  function getAlignOffset(place) {
156
- const mPlace = mapLegacyPlacement(place);
157
- const offsetMap = {
155
+ var mPlace = mapLegacyPlacement(place);
156
+ var offsetMap = {
158
157
  left: {
159
158
  offset: [-8, 0]
160
159
  },
package/Tree/index.js CHANGED
@@ -1,16 +1,11 @@
1
- import { T as Tree } from '../_verture/index-28edf318.js';
2
- export { T as default } from '../_verture/index-28edf318.js';
3
- import '../_verture/toConsumableArray-8f4c9589.js';
4
- import '../_verture/unsupportedIterableToArray-cb478f24.js';
5
- import '../_verture/defineProperty-f0e15205.js';
6
- import '../_verture/slicedToArray-a8206399.js';
7
- import '../_verture/index-8ac46bd9.js';
8
- import '../_verture/typeof-6ec38efd.js';
1
+ import { T as Tree } from '../_verture/index-e9405e35.js';
2
+ export { T as default } from '../_verture/index-e9405e35.js';
9
3
  import '../_verture/tslib.es6-55ed4bd2.js';
10
4
  import 'react/jsx-runtime';
11
5
  import 'react';
12
6
  import 'rc-tree';
13
7
  import 'clsx';
8
+ import '../_verture/typeof-adeedc13.js';
14
9
  import '@para-ui/icons/LoadingF';
15
10
  import '@para-ui/icons/Document';
16
11
  import '@para-ui/icons/DownTriangleF';
@@ -24,6 +19,8 @@ import '../_verture/constant-5317fc89.js';
24
19
  import '@para-ui/icons/Forbid';
25
20
  import '../_verture/style-inject.es-300983ab.js';
26
21
  import '@para-ui/icons/Help';
22
+ import '../_verture/slicedToArray-a8206399.js';
23
+ import '../_verture/unsupportedIterableToArray-cb478f24.js';
27
24
  import 'react-dom';
28
25
  import '@para-ui/icons/EditFile';
29
26
  import '@para-ui/icons/PlusCircle';
package/Upload/index.js CHANGED
@@ -31,11 +31,12 @@ import { Modal } from '../Modal/index.js';
31
31
  import 'rc-tooltip';
32
32
  import 'rc-tooltip/lib/placements';
33
33
  import '@paraview/lib';
34
- import '../_verture/Portal-5bf66fed.js';
34
+ import '../_verture/Portal-5bd49559.js';
35
35
  import 'react-dom';
36
- import '../_verture/defineProperty-f0e15205.js';
36
+ import '../_verture/typeof-adeedc13.js';
37
37
  import '../_verture/toConsumableArray-8f4c9589.js';
38
38
  import '../_verture/unsupportedIterableToArray-cb478f24.js';
39
+ import '../_verture/defineProperty-6f62bb2a.js';
39
40
  import 'rc-dialog';
40
41
  import 'rc-motion';
41
42
  import '@para-ui/icons/Sort';
@@ -1,8 +1,9 @@
1
1
  import { _ as _slicedToArray } from './slicedToArray-a8206399.js';
2
2
  import * as React from 'react';
3
3
  import { createPortal } from 'react-dom';
4
- import { a as _defineProperty, _ as _typeof } from './defineProperty-f0e15205.js';
4
+ import { _ as _typeof } from './typeof-adeedc13.js';
5
5
  import { _ as _toConsumableArray } from './toConsumableArray-8f4c9589.js';
6
+ import { _ as _defineProperty } from './defineProperty-6f62bb2a.js';
6
7
 
7
8
  function _extends() {
8
9
  _extends = Object.assign ? Object.assign.bind() : function (target) {
@@ -1,12 +1,4 @@
1
- function _typeof(o) {
2
- "@babel/helpers - typeof";
3
-
4
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
5
- return typeof o;
6
- } : function (o) {
7
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
8
- }, _typeof(o);
9
- }
1
+ import { _ as _typeof } from './typeof-adeedc13.js';
10
2
 
11
3
  function toPrimitive(t, r) {
12
4
  if ("object" != _typeof(t) || !t) return t;
@@ -39,4 +31,4 @@ function _defineProperty(obj, key, value) {
39
31
  return obj;
40
32
  }
41
33
 
42
- export { _typeof as _, _defineProperty as a, toPropertyKey as t };
34
+ export { _defineProperty as _, toPropertyKey as t };
@@ -1,9 +1,10 @@
1
1
  import { _ as __rest } from './tslib.es6-55ed4bd2.js';
2
2
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
- import { c as clsx, _ as _objectSpread2, r as reactIs, s as supportRef, u as useComposeRef, w as warning, a as _extends, b as _objectWithoutProperties, d as wrapperRaf, e as useEvent$2, f as useLayoutEffect$3, g as composeRef, K as KeyCode, h as fillRef, P as Portal, i as warningOnce, j as useMergedState$2, k as canUseDom$1, l as useMemo$1, n as noteOnce } from './Portal-5bf66fed.js';
3
+ import { c as clsx, _ as _objectSpread2, r as reactIs, s as supportRef, u as useComposeRef, w as warning, a as _extends, b as _objectWithoutProperties, d as wrapperRaf, e as useEvent$2, f as useLayoutEffect$3, g as composeRef, K as KeyCode, h as fillRef, P as Portal, i as warningOnce, j as useMergedState$2, k as canUseDom$1, l as useMemo$1, n as noteOnce } from './Portal-5bd49559.js';
4
4
  import { _ as _toConsumableArray, a as _iterableToArray } from './toConsumableArray-8f4c9589.js';
5
- import { _ as _typeof$1, t as toPropertyKey, a as _defineProperty } from './defineProperty-f0e15205.js';
5
+ import { t as toPropertyKey, _ as _defineProperty } from './defineProperty-6f62bb2a.js';
6
6
  import { _ as _slicedToArray, a as _arrayWithHoles, b as _nonIterableRest } from './slicedToArray-a8206399.js';
7
+ import { _ as _typeof$1 } from './typeof-adeedc13.js';
7
8
  import * as React$4 from 'react';
8
9
  import React__default, { useState as useState$1, useMemo, useCallback, useRef, useEffect } from 'react';
9
10
  import ReactDOM, { unstable_batchedUpdates, flushSync } from 'react-dom';