@para-ui/core 3.0.86 → 4.0.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AutoBox/index.js +18 -19
- package/AutoTips/index.js +5 -4
- package/Breadcrumbs/index.js +5 -4
- package/Button/SplitButton.d.ts +13 -0
- package/Button/index.d.ts +1 -1
- package/Button/index.js +54 -12
- package/ButtonGroup/index.js +6 -5
- package/Carousel/index.d.ts +5 -5
- package/Carousel/index.js +21 -9
- package/Cascader/Cascader.d.ts +99 -0
- package/Cascader/OptionList/CacheContent.d.ts +7 -0
- package/Cascader/OptionList/Column.d.ts +21 -0
- package/Cascader/OptionList/index.d.ts +4 -0
- package/Cascader/OptionList/useActive.d.ts +6 -0
- package/Cascader/context.d.ts +23 -0
- package/Cascader/hooks/useDisplayValues.d.ts +10 -0
- package/Cascader/hooks/useEntities.d.ts +10 -0
- package/Cascader/hooks/useMissingValues.d.ts +3 -0
- package/Cascader/index.d.ts +3 -58
- package/Cascader/index.js +28 -177
- package/Cascader/utils/commonUtil.d.ts +18 -0
- package/Cascader/utils/treeUtil.d.ts +55 -0
- package/Checkbox/index.d.ts +7 -0
- package/Checkbox/index.js +50 -29
- package/CheckboxGroup/index.d.ts +3 -1
- package/CheckboxGroup/index.js +48 -18
- package/Collapse/index.js +2 -2
- package/Collapse/motion.d.ts +0 -2
- package/CollapseBox/index.js +3 -3
- package/CollapseLayout/index.d.ts +5 -0
- package/CollapseLayout/index.js +144 -22
- package/ColorPicker/chromePicker/index.d.ts +9 -0
- package/ColorPicker/compactPicker/index.d.ts +9 -0
- package/ColorPicker/config.d.ts +5 -0
- package/ColorPicker/index.d.ts +4 -1
- package/ColorPicker/index.js +7 -3
- package/ColorPicker/sketchPicker/index.d.ts +11 -0
- package/ColorPicker/swatchesPicker/index.d.ts +9 -0
- package/ComboSelect/index.js +14 -12
- package/Container/index.js +2 -2
- package/CopyText/index.d.ts +33 -0
- package/CopyText/index.js +180 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +9 -2
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +8 -8
- package/DatePicker/generatePicker/index.d.ts +32 -26
- package/DatePicker/generatePicker/interface.d.ts +12 -0
- package/DatePicker/index.d.ts +12 -8
- package/DatePicker/index.js +367 -454
- package/DatePicker/util.d.ts +40 -4
- package/Desktop/index.d.ts +16 -3
- package/Desktop/index.js +177 -68
- package/Desktop/lang/en_US.d.ts +6 -0
- package/Desktop/lang/index.d.ts +13 -0
- package/Desktop/lang/zh_CN.d.ts +6 -0
- package/DragVerify/index.js +9 -100
- package/Drawer/index.js +8 -8
- package/Drawer/interface.d.ts +2 -2
- package/Dropdown/index.js +2 -2
- package/DynamicMultiBox/index.js +57 -41
- package/DynamicMultiBox/interface.d.ts +4 -4
- package/Empty/index.js +2 -2
- package/Form/index.d.ts +20 -26
- package/Form/index.js +48 -69
- package/FormItem/index.js +15 -15
- package/FunctionModal/index.js +11 -9
- package/GlobalContext/constant.d.ts +1 -1
- package/GlobalContext/index.js +2 -2
- package/Help/index.js +4 -3
- package/HelperText/index.js +2 -2
- package/InputLang/index.d.ts +5 -0
- package/InputLang/index.js +35 -29
- package/InputNumber/index.d.ts +5 -0
- package/InputNumber/index.js +95 -80
- package/Label/index.js +4 -3
- package/Loading/index.js +2 -2
- package/Menu/index.js +114 -39
- package/Menu/interface.d.ts +8 -0
- package/Message/index.d.ts +4 -4
- package/Message/index.js +13 -11
- package/Modal/index.js +29 -15
- package/MultiBox/index.js +9 -8
- package/Notification/index.d.ts +9 -1
- package/Notification/index.js +29 -15
- package/OperateBtn/index.js +28 -11
- package/PageHeader/index.js +270 -74
- package/PageHeader/interface.d.ts +17 -0
- package/Pagination/index.d.ts +4 -3
- package/Pagination/index.js +117 -95
- package/Pagination/lang/en_US.d.ts +3 -2
- package/Pagination/lang/index.d.ts +6 -4
- package/Pagination/lang/zh_CN.d.ts +3 -2
- package/ParauiProvider/index.js +4 -4
- package/PasswordRules/index.js +5 -5
- package/PopConfirm/index.d.ts +15 -5
- package/PopConfirm/index.js +62 -16
- package/Popover/index.js +4 -3
- package/Progress/index.js +10 -9
- package/Querying/index.js +7 -7
- package/README.md +40 -1120
- package/Radio/index.d.ts +7 -0
- package/Radio/index.js +49 -27
- package/RadioGroup/index.d.ts +3 -1
- package/RadioGroup/index.js +48 -21
- package/Search/index.d.ts +3 -15
- package/Search/index.js +21 -83
- package/Select/index.d.ts +7 -2
- package/Select/index.js +114 -91
- package/Select/lang/en_US.d.ts +1 -1
- package/Select/lang/index.d.ts +2 -2
- package/Select/lang/zh_CN.d.ts +1 -1
- package/SelectInput/index.js +8 -7
- package/Selector/index.js +30 -22
- package/SelectorPicker/index.d.ts +5 -0
- package/SelectorPicker/index.js +47 -32
- package/SelectorPicker/lang/en_US.d.ts +1 -0
- package/SelectorPicker/lang/index.d.ts +2 -0
- package/SelectorPicker/lang/zh_CN.d.ts +1 -0
- package/SingleBox/index.js +8 -7
- package/Slider/index.js +5 -5
- package/Status/index.d.ts +6 -5
- package/Status/index.js +27 -4
- package/Stepper/index.d.ts +9 -10
- package/Stepper/index.js +69 -29
- package/Styles/index.scss +4 -0
- package/Styles/scrollbar.scss +24 -24
- package/Styles/theme.scss +104 -57
- package/Switch/index.d.ts +34 -14
- package/Switch/index.js +97 -30
- package/Table/index.js +33 -27
- package/Table/interface.d.ts +3 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +5 -5
- package/Tabs/index.d.ts +11 -1
- package/Tabs/index.js +49 -16
- package/Tag/TagGroup.d.ts +11 -7
- package/Tag/index.d.ts +22 -7
- package/Tag/index.js +1382 -53
- package/TextEditor/index.js +4 -3
- package/TextField/index.d.ts +5 -0
- package/TextField/index.js +50 -32
- package/TimePicker/index.d.ts +5 -0
- package/TimePicker/index.js +39 -23
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +21 -18
- package/Title/index.d.ts +15 -3
- package/Title/index.js +95 -29
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -0
- package/ToggleButton/index.d.ts +4 -0
- package/ToggleButton/index.js +14 -52
- package/Tooltip/index.js +28 -34
- package/Tooltip/interface.d.ts +4 -10
- package/Tooltip/utils.d.ts +1 -3
- package/Transfer/index.d.ts +3 -3
- package/Transfer/index.js +72 -68
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +10 -9
- package/Tree/utils/treeUtil.d.ts +0 -7
- package/Upload/index.js +16 -14
- package/_verture/{constant-66aa48a1.js → constant-0d9802f7.js} +1 -1
- package/_verture/{defineProperty-62acccfc.js → defineProperty-1d116156.js} +1 -1
- package/_verture/index-5c77417d.js +150 -0
- package/_verture/index-68db2bc3.js +10530 -0
- package/_verture/{index-9738004e.js → index-7ec72724.js} +44 -38
- package/_verture/index-d63bd287.js +327 -0
- package/_verture/{index-fa8a0124.js → index-e6f85fd5.js} +7 -8
- package/_verture/{index-77f9e0fb.js → index-e9007d6a.js} +6 -6
- package/_verture/{intl-4a9f1b44.js → intl-5c1ec055.js} +1 -1
- package/_verture/{modalContext-20780c9a.js → modalContext-c12ca3e8.js} +3 -3
- package/_verture/slicedToArray-a8206399.js +43 -0
- package/_verture/{toConsumableArray-81040c9e.js → toConsumableArray-8f4c9589.js} +1 -1
- package/_verture/typeof-adeedc13.js +11 -0
- package/_verture/typeof-b240b062.js +16 -0
- package/_verture/{utils-c9b9a157.js → utils-f0e81540.js} +8 -8
- package/index.d.ts +2 -2
- package/index.js +32 -27
- package/locale/en-US.d.ts +10 -6
- package/locale/index.d.ts +20 -12
- package/locale/index.js +33 -25
- package/locale/zh-CN.d.ts +10 -6
- package/package.json +25 -10
- package/umd/AutoBox.js +20 -21
- package/umd/AutoTips.js +31 -4
- package/umd/Breadcrumbs.js +7 -7
- package/umd/Button.js +7 -8
- package/umd/ButtonGroup.js +7 -8
- package/umd/Carousel.js +29 -1
- package/umd/Cascader.js +20 -21
- package/umd/Checkbox.js +7 -7
- package/umd/CheckboxGroup.js +7 -7
- package/umd/Collapse.js +19 -21
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +7 -7
- package/umd/Container.js +1 -1
- package/umd/CopyText.js +42 -0
- package/umd/DatePicker.js +7 -7
- package/umd/Desktop.js +7 -7
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +7 -8
- package/umd/Dropdown.js +3 -3
- package/umd/DynamicMultiBox.js +7 -7
- package/umd/Empty.js +1 -1
- package/umd/Form.js +6 -6
- package/umd/FormItem.js +6 -6
- package/umd/FunctionModal.js +7 -7
- package/umd/Help.js +7 -7
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +7 -7
- package/umd/InputNumber.js +7 -7
- package/umd/Label.js +7 -7
- package/umd/Loading.js +4 -5
- package/umd/Menu.js +4 -4
- package/umd/Message.js +3 -4
- package/umd/Modal.js +7 -7
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +5 -6
- package/umd/OperateBtn.js +7 -7
- package/umd/PageHeader.js +7 -7
- package/umd/Pagination.js +7 -7
- package/umd/ParauiProvider.js +1 -1
- package/umd/PasswordRules.js +3 -4
- package/umd/PopConfirm.js +7 -7
- package/umd/Popover.js +31 -4
- package/umd/Progress.js +4 -5
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +7 -7
- package/umd/RadioGroup.js +7 -7
- package/umd/Search.js +7 -7
- package/umd/Select.js +7 -7
- package/umd/SelectInput.js +7 -7
- package/umd/Selector.js +7 -7
- package/umd/SelectorPicker.js +7 -7
- package/umd/SingleBox.js +7 -7
- package/umd/Slider.js +3 -3
- package/umd/Status.js +29 -1
- package/umd/Stepper.js +20 -20
- package/umd/Switch.js +7 -7
- package/umd/Table.js +7 -7
- package/umd/Tabs.js +7 -7
- package/umd/Tag.js +7 -8
- package/umd/TextEditor.js +19 -19
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +7 -7
- package/umd/Timeline.js +1 -1
- package/umd/Title.js +42 -1
- package/umd/ToggleButton.js +7 -8
- package/umd/Tooltip.js +31 -4
- package/umd/Transfer.js +8 -8
- package/umd/Tree.js +7 -7
- package/umd/Upload.js +8 -8
- package/umd/locale.js +1 -1
- package/Cascader/lang/en_US.d.ts +0 -4
- package/Cascader/lang/index.d.ts +0 -9
- package/Cascader/lang/zh_CN.d.ts +0 -4
- package/Split/index.d.ts +0 -7
- package/Split/index.js +0 -123
- package/_verture/index-a369ca3f.js +0 -4
- package/_verture/index-beef914f.js +0 -340
- package/_verture/slicedToArray-76060636.js +0 -43
- package/_verture/typeof-498dd2b1.js +0 -11
- package/umd/Split.js +0 -1
package/AutoBox/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useRef, useEffect, Fragment as Fragment$1 } from 'react';
|
|
4
4
|
import { Popover } from '../Popover/index.js';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import { UUID } from '@paraview/lib';
|
|
7
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
7
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
8
8
|
import More from '@para-ui/icons/More';
|
|
9
9
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
10
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
@@ -13,6 +13,7 @@ import '../Tooltip/index.js';
|
|
|
13
13
|
import 'rc-tooltip';
|
|
14
14
|
import 'rc-tooltip/lib/placements';
|
|
15
15
|
import 'clsx';
|
|
16
|
+
import '@para-ui/icons/Forbid';
|
|
16
17
|
import '../_verture/usePopupContainer-87febeb9.js';
|
|
17
18
|
|
|
18
19
|
var Protal = function Protal(props) {
|
|
@@ -107,7 +108,7 @@ var Protal = function Protal(props) {
|
|
|
107
108
|
});
|
|
108
109
|
};
|
|
109
110
|
|
|
110
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author
|
|
111
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-auto-box {\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n}\n.paraui-v4-auto-box > .auto-box-more {\n display: inline-block;\n height: 100%;\n cursor: pointer;\n vertical-align: middle;\n}\n\n.paraui-v4-auto-box-popover .auto-box-popover-content {\n display: flex;\n flex-direction: column;\n}\n\n.paraui-v4-protal-box {\n position: fixed;\n z-index: 1500;\n inset: 0px;\n}\n.paraui-v4-protal-box .protal-mask {\n z-index: -1;\n position: fixed;\n inset: 0px;\n background-color: transparent;\n}\n.paraui-v4-protal-box .protal-content {\n border-radius: 4px;\n box-shadow: 0px 2px 8px 0px rgb(234, 236, 241);\n background-color: white;\n outline: 0;\n position: absolute;\n max-width: calc(100% - 32px);\n min-width: 16px;\n max-height: calc(100% - 32px);\n min-height: 16px;\n overflow-x: hidden;\n overflow-y: auto;\n opacity: 0;\n transform: none;\n transition: opacity 243ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 162ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}";
|
|
111
112
|
styleInject(css_248z);
|
|
112
113
|
|
|
113
114
|
var AutoBox = function AutoBox(props) {
|
|
@@ -127,20 +128,18 @@ var AutoBox = function AutoBox(props) {
|
|
|
127
128
|
trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
|
|
128
129
|
_props$placement = props.placement,
|
|
129
130
|
placement = _props$placement === void 0 ? 'bottomLeft' : _props$placement;
|
|
130
|
-
var
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
var comRef = useRef(null);
|
|
132
|
+
var _useState = useState(null),
|
|
133
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
134
|
+
morePos = _useState2[0],
|
|
135
|
+
setMorePos = _useState2[1]; // 超出在原始位置
|
|
136
|
+
var _useState3 = useState(false),
|
|
134
137
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
var _useState5 = useState(
|
|
138
|
-
_useState6 = _slicedToArray(_useState5,
|
|
139
|
-
|
|
140
|
-
setOpenMoreCom = _useState6[1]; // 显示更多
|
|
141
|
-
var _useState7 = useState({}),
|
|
142
|
-
_useState8 = _slicedToArray(_useState7, 1),
|
|
143
|
-
timer = _useState8[0];
|
|
138
|
+
openMoreCom = _useState4[0],
|
|
139
|
+
setOpenMoreCom = _useState4[1]; // 显示更多
|
|
140
|
+
var _useState5 = useState({}),
|
|
141
|
+
_useState6 = _slicedToArray(_useState5, 1),
|
|
142
|
+
timer = _useState6[0];
|
|
144
143
|
var posDom = useRef();
|
|
145
144
|
// 监听打开更多
|
|
146
145
|
useEffect(function () {
|
|
@@ -187,7 +186,7 @@ var AutoBox = function AutoBox(props) {
|
|
|
187
186
|
var handMultiline = function handMultiline(index) {
|
|
188
187
|
if (index === null || index === 0) return;
|
|
189
188
|
if (index === undefined) index = list.length;
|
|
190
|
-
var boxDom =
|
|
189
|
+
var boxDom = comRef.current;
|
|
191
190
|
if (!boxDom) return;
|
|
192
191
|
if (boxDom.scrollWidth > boxDom.clientWidth) {
|
|
193
192
|
var num = Number(index) - 1;
|
|
@@ -211,7 +210,6 @@ var AutoBox = function AutoBox(props) {
|
|
|
211
210
|
// 处理class
|
|
212
211
|
var handClass = function handClass() {
|
|
213
212
|
var str = $prefixCls + '-auto-box';
|
|
214
|
-
if (classOne) str += ' ' + classOne;
|
|
215
213
|
if (className) str += ' ' + className;
|
|
216
214
|
return str;
|
|
217
215
|
};
|
|
@@ -277,7 +275,8 @@ var AutoBox = function AutoBox(props) {
|
|
|
277
275
|
};
|
|
278
276
|
return jsxs("div", Object.assign({
|
|
279
277
|
className: handClass(),
|
|
280
|
-
style: style
|
|
278
|
+
style: style,
|
|
279
|
+
ref: comRef
|
|
281
280
|
}, {
|
|
282
281
|
children: [list.map(function (item, index) {
|
|
283
282
|
if (morePos !== null && morePos <= index) return null;
|
package/AutoTips/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState, useEffect, useMemo } from 'react';
|
|
4
4
|
import { Tooltip } from '../Tooltip/index.js';
|
|
5
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
5
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
6
6
|
import { isIE } from '@paraview/lib';
|
|
7
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
8
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
@@ -10,8 +10,9 @@ import '../_verture/tslib.es6-55ed4bd2.js';
|
|
|
10
10
|
import 'rc-tooltip';
|
|
11
11
|
import 'rc-tooltip/lib/placements';
|
|
12
12
|
import 'clsx';
|
|
13
|
+
import '@para-ui/icons/Forbid';
|
|
13
14
|
|
|
14
|
-
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author
|
|
15
|
+
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-auto-tips-multiline {\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v4-auto-tips-multiline > .auto-tips-multiline-content-box {\n position: relative;\n}\n.paraui-v4-auto-tips-multiline > .auto-tips-multiline-content-box > .auto-tips-multiline-content > .last-line {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.paraui-v4-auto-tips-multiline > .auto-tips-multiline-content-box > .hidden {\n opacity: 0;\n visibility: hidden;\n position: absolute;\n bottom: 0;\n left: 0;\n z-index: -100000;\n}\n.paraui-v4-auto-tips-multiline.paraui-v4-auto-tips-multiline-safari > .auto-tips-multiline-content-box > .auto-tips-multiline-content > .last-line::before {\n content: \"\";\n display: block;\n}\n\n.paraui-v4-auto-tips-multiline-tooltip .component-tooltip-inner {\n max-height: calc(100vh - 25px);\n overflow: auto;\n}";
|
|
15
16
|
styleInject(css_248z$1);
|
|
16
17
|
|
|
17
18
|
var AutoTipsMultiline = function AutoTipsMultiline(props) {
|
|
@@ -167,7 +168,7 @@ var AutoTipsMultiline = function AutoTipsMultiline(props) {
|
|
|
167
168
|
}));
|
|
168
169
|
};
|
|
169
170
|
|
|
170
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author
|
|
171
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-auto-tips {\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v4-auto-tips > .auto-tips-content {\n display: inline;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v4-auto-tips.paraui-v4-auto-tips-safari > .auto-tips-content::before {\n content: \"\";\n display: block;\n}\n\n.paraui-v4-auto-tips-tooltip .component-tooltip-inner {\n max-height: calc(100vh - 25px);\n overflow: auto;\n}";
|
|
171
172
|
styleInject(css_248z);
|
|
172
173
|
|
|
173
174
|
var AutoTips = function AutoTips(props) {
|
package/Breadcrumbs/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-
|
|
2
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-8f4c9589.js';
|
|
2
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
3
3
|
import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
4
4
|
import { useState, useRef, useEffect, Fragment } from 'react';
|
|
5
5
|
import { Popover } from '../Popover/index.js';
|
|
6
6
|
import AutoTips from '../AutoTips/index.js';
|
|
7
7
|
import More from '@para-ui/icons/More';
|
|
8
8
|
import Return from '@para-ui/icons/Return';
|
|
9
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
9
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
10
10
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
11
11
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
12
12
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
@@ -15,6 +15,7 @@ import '../Tooltip/index.js';
|
|
|
15
15
|
import 'rc-tooltip';
|
|
16
16
|
import 'rc-tooltip/lib/placements';
|
|
17
17
|
import 'clsx';
|
|
18
|
+
import '@para-ui/icons/Forbid';
|
|
18
19
|
import '../_verture/usePopupContainer-87febeb9.js';
|
|
19
20
|
import '@paraview/lib';
|
|
20
21
|
import '@para-ui/core/GlobalContext';
|
|
@@ -32,7 +33,7 @@ var localeJson = {
|
|
|
32
33
|
en: en
|
|
33
34
|
};
|
|
34
35
|
|
|
35
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n * @author linhd\n * @date 2021年10月25日 14:58:12\n * @description 面包屑\n */\n/**\n* @author
|
|
36
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n * @author linhd\n * @date 2021年10月25日 14:58:12\n * @description 面包屑\n */\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-breadcrumbs {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n display: flex;\n height: 24px;\n line-height: 24px;\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list {\n display: flex;\n align-items: center;\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item {\n padding: 0 4px;\n border-radius: 2px;\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item .breadcrumbs-item-content {\n white-space: nowrap;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item .breadcrumbs-item-content svg {\n color: rgb(92, 101, 115);\n font-size: 14px;\n margin-right: 4px;\n vertical-align: -2px;\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item.breadcrumbs-item-click .breadcrumbs-item-content {\n cursor: pointer;\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item.breadcrumbs-item-click:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item.breadcrumbs-item-click:hover .breadcrumbs-item-content {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item.breadcrumbs-item-click:hover .breadcrumbs-item-content svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item.breadcrumbs-item-current .breadcrumbs-item-content {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item.breadcrumbs-item-current .breadcrumbs-item-content svg {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item.breadcrumbs-item-disabled {\n cursor: not-allowed;\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item.breadcrumbs-item-disabled .breadcrumbs-item-content {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item.breadcrumbs-item-disabled .breadcrumbs-item-content svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item-more {\n display: flex;\n align-items: center;\n height: 100%;\n padding: 0 4px;\n cursor: pointer;\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item-more svg {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item-more:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .breadcrumbs-item-more:hover svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-list > .separator {\n color: rgb(212, 218, 227);\n margin: 0 4px;\n position: relative;\n top: -1px;\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-back {\n display: flex;\n align-items: center;\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-back > .line {\n display: inline-block;\n width: 1px;\n height: 14px;\n background-color: rgb(212, 218, 227);\n margin: 0 8px;\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-back > .breadcrumbs-back-content {\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n height: 100%;\n color: rgb(92, 101, 115);\n padding: 0 4px;\n border-radius: 2px;\n cursor: pointer;\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-back > .breadcrumbs-back-content:hover {\n background-color: rgb(247, 248, 250);\n color: rgb(46, 101, 230);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-back > .breadcrumbs-back-content:hover svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-back > .breadcrumbs-back-content svg {\n color: rgb(92, 101, 115);\n font-size: 14px;\n margin-right: 4px;\n}\n.paraui-v4-breadcrumbs > .breadcrumbs-back > .breadcrumbs-back-content span {\n white-space: nowrap;\n}\n.paraui-v4-breadcrumbs.paraui-v4-breadcrumbs-calculation {\n overflow: hidden;\n opacity: 0;\n}\n\n.paraui-v4-breadcrumbs-popover .breadcrumbs-popover-content {\n padding: 4px 0;\n}\n.paraui-v4-breadcrumbs-popover .breadcrumbs-popover-content .breadcrumbs-popover-content-item {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n height: 30px;\n line-height: 30px;\n padding: 0 12px;\n color: rgb(29, 33, 38);\n display: flex;\n align-items: center;\n}\n.paraui-v4-breadcrumbs-popover .breadcrumbs-popover-content .breadcrumbs-popover-content-item svg {\n color: rgb(29, 33, 38);\n margin-right: 4px;\n}\n.paraui-v4-breadcrumbs-popover .breadcrumbs-popover-content .breadcrumbs-popover-content-item.breadcrumbs-popover-content-item-click {\n cursor: pointer;\n}\n.paraui-v4-breadcrumbs-popover .breadcrumbs-popover-content .breadcrumbs-popover-content-item.breadcrumbs-popover-content-item-click:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-breadcrumbs-popover .breadcrumbs-popover-content .breadcrumbs-popover-content-item.breadcrumbs-popover-content-item-disabled {\n cursor: not-allowed;\n color: rgb(161, 168, 179);\n}\n.paraui-v4-breadcrumbs-popover .breadcrumbs-popover-content .breadcrumbs-popover-content-item.breadcrumbs-popover-content-item-disabled svg {\n color: rgb(161, 168, 179);\n}";
|
|
36
37
|
styleInject(css_248z);
|
|
37
38
|
|
|
38
39
|
var Breadcrumbs = function Breadcrumbs(props) {
|
package/Button/SplitButton.d.ts
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { ButtonProps } from '../Button';
|
|
8
8
|
import { Placement } from '../Dropdown';
|
|
9
|
+
import { AutoTipsProps } from '../AutoTips';
|
|
10
|
+
import { TooltipProps } from "../Tooltip";
|
|
9
11
|
import './index.scss';
|
|
10
12
|
interface Option {
|
|
11
13
|
/**
|
|
@@ -20,10 +22,21 @@ interface Option {
|
|
|
20
22
|
* 禁用按钮
|
|
21
23
|
*/
|
|
22
24
|
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 禁用提示
|
|
27
|
+
*/
|
|
28
|
+
disabledTooltip?: TooltipProps;
|
|
23
29
|
[name: string]: any;
|
|
24
30
|
}
|
|
25
31
|
type GroupOption = Array<Option>;
|
|
26
32
|
export interface SplitButtonProps {
|
|
33
|
+
variant?: 'contained' | 'outlined' | 'text';
|
|
34
|
+
/** 隐藏前置图标 */
|
|
35
|
+
hideStartIcon?: boolean;
|
|
36
|
+
/** 选项最大宽度 */
|
|
37
|
+
optionMaxWidth?: string | number;
|
|
38
|
+
/** 选项提示的方向 */
|
|
39
|
+
optionTipsPlacement?: AutoTipsProps['placement'];
|
|
27
40
|
/**
|
|
28
41
|
* 分体式按钮文本
|
|
29
42
|
*/
|
package/Button/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<any> {
|
|
|
43
43
|
}
|
|
44
44
|
export interface IconButtonProps extends React.ButtonHTMLAttributes<any> {
|
|
45
45
|
/** 按钮形状 */
|
|
46
|
-
variant?: 'contained' | 'outlined' | 'text';
|
|
46
|
+
variant?: 'contained' | 'outlined' | 'text' | 'activate';
|
|
47
47
|
size?: 'small' | 'medium' | 'large';
|
|
48
48
|
/** tooltip title */
|
|
49
49
|
toolTipTitle?: NonNullable<React.ReactNode>;
|
package/Button/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as _typeof } from '../_verture/typeof-
|
|
2
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
|
|
2
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
3
3
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
5
|
import { useRef, useState, useEffect } from 'react';
|
|
@@ -8,10 +8,11 @@ import LoadingOutlined from '@para-ui/icons/LoadingF';
|
|
|
8
8
|
import Forbid from '@para-ui/icons/Forbid';
|
|
9
9
|
import { Tooltip } from '../Tooltip/index.js';
|
|
10
10
|
import Down from '@para-ui/icons/Down';
|
|
11
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
11
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
12
12
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
13
|
-
import { D as Dropdown } from '../_verture/index-
|
|
13
|
+
import { D as Dropdown } from '../_verture/index-e9007d6a.js';
|
|
14
14
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
15
|
+
import AutoTips from '../AutoTips/index.js';
|
|
15
16
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
16
17
|
import 'rc-tooltip';
|
|
17
18
|
import 'rc-tooltip/lib/placements';
|
|
@@ -34,7 +35,7 @@ var localeJson = {
|
|
|
34
35
|
en: en
|
|
35
36
|
};
|
|
36
37
|
|
|
37
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/21 下午5:16\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n@keyframes buttonLoadingSpin {\n 0% {\n transform: rotate(0);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.paraui-v3-button {\n border: 0;\n cursor: pointer;\n display: inline-flex;\n outline: 0;\n position: relative;\n align-items: center;\n user-select: none;\n vertical-align: middle;\n justify-content: center;\n text-decoration: none;\n background-color: transparent;\n appearance: none;\n -webkit-tap-highlight-color: transparent;\n padding: 0 16px;\n line-height: 1.5715;\n border-radius: 4px;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n white-space: nowrap;\n color: rgb(255, 255, 255);\n box-sizing: border-box;\n letter-spacing: 0.02857em;\n transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.paraui-v3-button .button-label {\n width: 100%;\n display: inherit;\n align-items: inherit;\n justify-content: inherit;\n}\n.paraui-v3-button .button-icon {\n display: inherit;\n margin-right: 4px;\n}\n.paraui-v3-button .button-icon svg {\n color: inherit;\n font-size: 16px;\n}\n.paraui-v3-button .button-icon-end {\n margin-right: 0;\n margin-left: 4px;\n}\n.paraui-v3-button .button-icon-loading {\n animation: buttonLoadingSpin 1s infinite linear;\n}\n.paraui-v3-button-loading {\n pointer-events: none;\n}\n.paraui-v3-button-contained {\n color: rgb(255, 255, 255);\n background-color: rgb(54, 102, 214);\n}\n.paraui-v3-button-contained:hover {\n background-color: rgba(54, 102, 214, 0.8);\n}\n.paraui-v3-button-contained.paraui-v3-button-link-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 cursor: default;\n pointer-events: none;\n}\n.paraui-v3-button-contained.paraui-v3-button-link-disabled:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-button-contained[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 cursor: default;\n pointer-events: none;\n}\n.paraui-v3-button-contained[disabled]:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-button-contained.paraui-v3-button-dangerous {\n background-color: rgb(235, 96, 84);\n}\n.paraui-v3-button-contained.paraui-v3-button-dangerous:hover {\n background-color: rgba(235, 96, 84, 0.8);\n}\n.paraui-v3-button-outlined {\n color: rgba(46, 55, 67, 0.7);\n background-color: rgb(255, 255, 255);\n border: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-button-outlined:hover {\n color: rgb(54, 102, 214);\n border-color: rgba(54, 102, 214, 0.2);\n background-color: rgb(255, 255, 255);\n}\n.paraui-v3-button-outlined.paraui-v3-button-link-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 cursor: default;\n pointer-events: none;\n}\n.paraui-v3-button-outlined.paraui-v3-button-link-disabled:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-button-outlined[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 cursor: default;\n pointer-events: none;\n}\n.paraui-v3-button-outlined[disabled]:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-button-outlined.paraui-v3-button-dangerous {\n color: rgb(235, 96, 84);\n border-color: rgb(235, 96, 84);\n}\n.paraui-v3-button-outlined.paraui-v3-button-dangerous:hover {\n color: rgb(235, 96, 84);\n border-color: rgba(235, 96, 84, 0.8);\n}\n.paraui-v3-button-text {\n color: rgb(54, 102, 214);\n background-color: transparent;\n border: none;\n}\n.paraui-v3-button-text:hover {\n color: rgba(54, 102, 214, 0.8);\n background-color: transparent;\n}\n.paraui-v3-button-text.paraui-v3-button-link-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 cursor: default;\n pointer-events: none;\n}\n.paraui-v3-button-text.paraui-v3-button-link-disabled:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-button-text[disabled] {\n color: rgba(46, 55, 67, 0.4);\n background-color: transparent;\n border: none;\n pointer-events: none;\n}\n.paraui-v3-button-text[disabled]:hover {\n background-color: transparent;\n}\n.paraui-v3-button-text.paraui-v3-button-dangerous {\n color: rgb(235, 96, 84);\n}\n.paraui-v3-button-text.paraui-v3-button-dangerous:hover {\n color: rgba(235, 96, 84, 0.8);\n}\n.paraui-v3-button-large {\n height: 36px;\n}\n.paraui-v3-button-medium {\n height: 32px;\n}\n.paraui-v3-button-small {\n height: 28px;\n}\n.paraui-v3-button--disabled {\n display: inline-block;\n}\n\n.paraui-v3-icon-button {\n flex: 0 0 auto;\n overflow: visible;\n text-align: center;\n transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n padding: 0;\n border-radius: 4px;\n}\n.paraui-v3-icon-button-loading {\n pointer-events: none;\n}\n.paraui-v3-icon-button-loading .button-loading-icon {\n display: inline-flex;\n animation: buttonLoadingSpin 1s infinite linear;\n}\n.paraui-v3-icon-button svg {\n color: inherit;\n font-size: 16px;\n}\n.paraui-v3-icon-button-contained {\n color: rgb(255, 255, 255);\n background-color: rgb(54, 102, 214);\n}\n.paraui-v3-icon-button-contained:hover {\n background-color: rgba(54, 102, 214, 0.8);\n box-shadow: none;\n}\n.paraui-v3-icon-button-contained.paraui-v3-button-link-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 cursor: default;\n pointer-events: none;\n}\n.paraui-v3-icon-button-contained.paraui-v3-button-link-disabled:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-icon-button-contained[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 cursor: default;\n pointer-events: none;\n}\n.paraui-v3-icon-button-contained[disabled]:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-icon-button-contained.paraui-v3-icon-button-dangerous {\n background-color: rgb(235, 96, 84);\n}\n.paraui-v3-icon-button-contained.paraui-v3-icon-button-dangerous:hover {\n background-color: rgba(235, 96, 84, 0.8);\n}\n.paraui-v3-icon-button-outlined {\n color: rgba(46, 55, 67, 0.7);\n background-color: rgb(255, 255, 255);\n border: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-icon-button-outlined:hover {\n color: rgb(54, 102, 214);\n border-color: rgba(54, 102, 214, 0.2);\n box-shadow: none;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v3-icon-button-outlined.paraui-v3-button-link-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 cursor: default;\n pointer-events: none;\n}\n.paraui-v3-icon-button-outlined.paraui-v3-button-link-disabled:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-icon-button-outlined[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 cursor: default;\n pointer-events: none;\n}\n.paraui-v3-icon-button-outlined[disabled]:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-icon-button-outlined.paraui-v3-icon-button-dangerous {\n color: rgb(235, 96, 84);\n border-color: rgb(235, 96, 84);\n}\n.paraui-v3-icon-button-outlined.paraui-v3-icon-button-dangerous:hover {\n color: rgb(235, 96, 84);\n border-color: rgba(235, 96, 84, 0.8);\n}\n.paraui-v3-icon-button-text {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-icon-button-text:hover {\n color: rgba(54, 102, 214, 0.8);\n background-color: transparent;\n}\n.paraui-v3-icon-button-text.paraui-v3-button-link-disabled {\n pointer-events: none;\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-icon-button-text.paraui-v3-button-link-disabled:hover {\n background-color: transparent;\n}\n.paraui-v3-icon-button-text[disabled] {\n color: rgba(46, 55, 67, 0.4);\n pointer-events: none;\n}\n.paraui-v3-icon-button-text[disabled]:hover {\n background-color: transparent;\n}\n.paraui-v3-icon-button-text.paraui-v3-icon-button-dangerous {\n color: rgb(235, 96, 84);\n}\n.paraui-v3-icon-button-text.paraui-v3-icon-button-dangerous:hover {\n color: rgba(235, 96, 84, 0.8);\n}\n.paraui-v3-icon-button-text.paraui-v3-icon-button-large {\n width: auto;\n height: auto;\n}\n.paraui-v3-icon-button-text.paraui-v3-icon-button-large svg {\n font-size: 28px;\n}\n.paraui-v3-icon-button-text.paraui-v3-icon-button-medium {\n width: auto;\n height: auto;\n}\n.paraui-v3-icon-button-text.paraui-v3-icon-button-medium svg {\n font-size: 24px;\n}\n.paraui-v3-icon-button-text.paraui-v3-icon-button-small {\n width: auto;\n height: auto;\n}\n.paraui-v3-icon-button-text.paraui-v3-icon-button-small svg {\n font-size: 20px;\n}\n.paraui-v3-icon-button-large {\n width: 36px;\n height: 36px;\n}\n.paraui-v3-icon-button-medium {\n width: 32px;\n height: 32px;\n}\n.paraui-v3-icon-button-small {\n width: 28px;\n height: 28px;\n}\n\n.paraui-v3-button-split {\n display: inline-block;\n}\n.paraui-v3-button-split .paraui-v3-button-split--active {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-button-split-list {\n padding: 8px 0;\n border-radius: 4px;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v3-button-split-list ul .split-li {\n padding: 11px 12px;\n color: rgb(46, 55, 67);\n font-size: 14px;\n line-height: 1;\n cursor: pointer;\n transition: background-color 0.3s, color 0.3s;\n}\n.paraui-v3-button-split-list ul .split-li:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-button-split-list ul .split-li.split-li--active {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-button-split-list ul .split-li.split-li--active:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-button-split-list ul .split-li.split-li--hover:active {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-button-split-list ul .split-li.split-li--hover:hover {\n background-color: rgba(171, 176, 185, 0.12);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-button-split-list ul .split-li.split-li--disabled {\n color: rgba(46, 55, 67, 0.4);\n cursor: not-allowed;\n}\n.paraui-v3-button-split-list ul .split-li.split-li--disabled:hover {\n background-color: rgb(255, 255, 255);\n}\n.paraui-v3-button-split-list ul .split-li-group:not(:first-child) {\n position: relative;\n margin-top: 16px;\n}\n.paraui-v3-button-split-list ul .split-li-group:not(:first-child):before {\n content: \"\";\n position: absolute;\n top: -8px;\n left: 8px;\n right: 8px;\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n}";
|
|
38
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/21 下午5:16\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n@keyframes buttonLoadingSpin {\n 0% {\n transform: rotate(0);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.paraui-v4-button {\n border: 0;\n cursor: pointer;\n display: inline-flex;\n outline: 0;\n position: relative;\n align-items: center;\n user-select: none;\n vertical-align: middle;\n justify-content: center;\n text-decoration: none;\n background-color: transparent;\n appearance: none;\n -webkit-tap-highlight-color: transparent;\n padding: 0 10px;\n line-height: 1.5715;\n border-radius: 4px;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n white-space: nowrap;\n color: rgb(255, 255, 255);\n box-sizing: border-box;\n letter-spacing: 0.02857em;\n transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.paraui-v4-button .button-label {\n width: 100%;\n display: inherit;\n align-items: inherit;\n justify-content: inherit;\n}\n.paraui-v4-button .button-icon {\n display: inherit;\n margin-right: 4px;\n}\n.paraui-v4-button .button-icon svg {\n color: inherit;\n font-weight: 500;\n}\n.paraui-v4-button .button-icon-end {\n margin-right: 0;\n margin-left: 4px;\n}\n.paraui-v4-button .button-icon-loading {\n animation: buttonLoadingSpin 1s infinite linear;\n}\n.paraui-v4-button-loading {\n pointer-events: none;\n}\n.paraui-v4-button-contained {\n color: rgb(255, 255, 255);\n background-color: rgb(46, 101, 230);\n}\n.paraui-v4-button-contained:hover {\n background-color: rgb(87, 131, 235);\n}\n.paraui-v4-button-contained.paraui-v4-button-link-disabled {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-button-contained.paraui-v4-button-link-disabled:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-button-contained[disabled] {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-button-contained[disabled]:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-button-contained.paraui-v4-button-dangerous {\n background-color: rgb(244, 66, 66);\n}\n.paraui-v4-button-contained.paraui-v4-button-dangerous:hover {\n background-color: rgb(246, 103, 103);\n}\n.paraui-v4-button-outlined {\n color: rgb(29, 33, 38);\n background-color: rgb(255, 255, 255);\n border: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-button-outlined:hover {\n color: rgb(46, 101, 230);\n border-color: rgb(87, 131, 235);\n background-color: rgb(255, 255, 255);\n}\n.paraui-v4-button-outlined.paraui-v4-button-link-disabled {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-button-outlined.paraui-v4-button-link-disabled:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-button-outlined[disabled] {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-button-outlined[disabled]:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-button-outlined.paraui-v4-button-dangerous {\n color: rgb(244, 66, 66);\n border-color: rgb(244, 66, 66);\n}\n.paraui-v4-button-outlined.paraui-v4-button-dangerous:hover {\n color: rgb(244, 66, 66);\n border-color: rgb(246, 103, 103);\n}\n.paraui-v4-button-text {\n color: rgb(46, 101, 230);\n background-color: transparent;\n border: none;\n}\n.paraui-v4-button-text:hover {\n color: rgb(87, 131, 235);\n background-color: transparent;\n}\n.paraui-v4-button-text.paraui-v4-button-link-disabled {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-button-text.paraui-v4-button-link-disabled:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-button-text[disabled] {\n color: rgb(29, 33, 38);\n background-color: transparent;\n border: none;\n cursor: not-allowed;\n}\n.paraui-v4-button-text[disabled]:hover {\n background-color: transparent;\n}\n.paraui-v4-button-text.paraui-v4-button-dangerous {\n color: rgb(244, 66, 66);\n}\n.paraui-v4-button-text.paraui-v4-button-dangerous:hover {\n color: rgb(246, 103, 103);\n}\n.paraui-v4-button-large {\n height: 32px;\n}\n.paraui-v4-button-medium {\n height: 28px;\n}\n.paraui-v4-button-small {\n height: 28px;\n}\n.paraui-v4-button--disabled {\n display: inline-block;\n cursor: not-allowed;\n}\n.paraui-v4-button--disabled button {\n pointer-events: none;\n}\n\n.paraui-v4-icon-button {\n flex: 0 0 auto;\n overflow: visible;\n text-align: center;\n transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n padding: 0;\n border-radius: 4px;\n}\n.paraui-v4-icon-button-loading {\n pointer-events: none;\n}\n.paraui-v4-icon-button-loading .button-loading-icon {\n display: inline-flex;\n animation: buttonLoadingSpin 1s infinite linear;\n}\n.paraui-v4-icon-button svg {\n color: inherit;\n font-size: 500;\n}\n.paraui-v4-icon-button-contained {\n color: rgb(255, 255, 255);\n background-color: rgb(46, 101, 230);\n}\n.paraui-v4-icon-button-contained:hover {\n background-color: rgb(87, 131, 235);\n box-shadow: none;\n}\n.paraui-v4-icon-button-contained.paraui-v4-button-link-disabled {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-icon-button-contained.paraui-v4-button-link-disabled:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-icon-button-contained[disabled] {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-icon-button-contained[disabled]:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-icon-button-contained.paraui-v4-icon-button-dangerous {\n background-color: rgb(244, 66, 66);\n}\n.paraui-v4-icon-button-contained.paraui-v4-icon-button-dangerous:hover {\n background-color: rgb(246, 103, 103);\n}\n.paraui-v4-icon-button-outlined {\n color: rgb(29, 33, 38);\n background-color: rgb(255, 255, 255);\n border: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-icon-button-outlined:hover {\n color: rgb(46, 101, 230);\n border-color: rgb(87, 131, 235);\n box-shadow: none;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v4-icon-button-outlined.paraui-v4-button-link-disabled {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-icon-button-outlined.paraui-v4-button-link-disabled:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-icon-button-outlined[disabled] {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-icon-button-outlined[disabled]:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-icon-button-outlined.paraui-v4-icon-button-dangerous {\n color: rgb(244, 66, 66);\n border-color: rgb(244, 66, 66);\n}\n.paraui-v4-icon-button-outlined.paraui-v4-icon-button-dangerous:hover {\n color: rgb(244, 66, 66);\n border-color: rgb(246, 103, 103);\n}\n.paraui-v4-icon-button-text {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-icon-button-text:hover {\n color: rgb(87, 131, 235);\n background-color: transparent;\n}\n.paraui-v4-icon-button-text.paraui-v4-button-link-disabled {\n pointer-events: none;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-icon-button-text.paraui-v4-button-link-disabled:hover {\n background-color: transparent;\n}\n.paraui-v4-icon-button-text[disabled] {\n color: rgb(161, 168, 179);\n pointer-events: none;\n}\n.paraui-v4-icon-button-text[disabled]:hover {\n background-color: transparent;\n}\n.paraui-v4-icon-button-text.paraui-v4-icon-button-dangerous {\n color: rgb(244, 66, 66);\n}\n.paraui-v4-icon-button-text.paraui-v4-icon-button-dangerous:hover {\n color: rgb(246, 103, 103);\n}\n.paraui-v4-icon-button-text.paraui-v4-icon-button-large {\n width: auto;\n height: auto;\n}\n.paraui-v4-icon-button-text.paraui-v4-icon-button-large svg {\n font-size: 24px;\n}\n.paraui-v4-icon-button-text.paraui-v4-icon-button-medium {\n width: auto;\n height: auto;\n}\n.paraui-v4-icon-button-text.paraui-v4-icon-button-medium svg {\n font-size: 20px;\n}\n.paraui-v4-icon-button-text.paraui-v4-icon-button-small {\n width: auto;\n height: auto;\n}\n.paraui-v4-icon-button-text.paraui-v4-icon-button-small svg {\n font-size: 20px;\n}\n.paraui-v4-icon-button-activate {\n color: rgb(29, 33, 38);\n background-color: rgb(255, 255, 255);\n border: 1px solid rgb(212, 218, 227);\n color: rgb(46, 101, 230);\n border-color: rgb(87, 131, 235);\n box-shadow: none;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v4-icon-button-activate.paraui-v4-button-link-disabled {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-icon-button-activate.paraui-v4-button-link-disabled:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-icon-button-activate[disabled] {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-icon-button-activate[disabled]:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-icon-button-activate.paraui-v4-icon-button-dangerous {\n color: rgb(244, 66, 66);\n border-color: rgb(244, 66, 66);\n}\n.paraui-v4-icon-button-activate.paraui-v4-icon-button-dangerous:hover {\n color: rgb(244, 66, 66);\n border-color: rgb(246, 103, 103);\n}\n.paraui-v4-icon-button-large {\n width: 32px;\n height: 32px;\n}\n.paraui-v4-icon-button-medium {\n width: 28px;\n height: 28px;\n}\n.paraui-v4-icon-button-small {\n width: 28px;\n height: 28px;\n}\n\n.paraui-v4-button-split {\n display: inline-block;\n}\n.paraui-v4-button-split .paraui-v4-button-split--active {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-button-split-list {\n padding: 4px 0;\n border-radius: 4px;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v4-button-split-list ul .split-li {\n padding: 8px 10px;\n color: rgb(29, 33, 38);\n font-size: 14px;\n line-height: 1;\n cursor: pointer;\n transition: background-color 0.3s, color 0.3s;\n white-space: nowrap;\n}\n.paraui-v4-button-split-list ul .split-li:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-button-split-list ul .split-li.split-li--active {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-button-split-list ul .split-li.split-li--active:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-button-split-list ul .split-li.split-li--hover:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-button-split-list ul .split-li.split-li--disabled {\n color: rgb(161, 168, 179);\n cursor: not-allowed;\n}\n.paraui-v4-button-split-list ul .split-li.split-li--disabled:hover {\n background-color: rgb(255, 255, 255);\n}\n.paraui-v4-button-split-list ul .split-li-group:not(:first-child) {\n position: relative;\n margin-top: 8px;\n}\n.paraui-v4-button-split-list ul .split-li-group:not(:first-child):before {\n content: \"\";\n position: absolute;\n top: -4px;\n left: 8px;\n right: 8px;\n border-top: 1px solid rgb(234, 236, 241);\n}";
|
|
38
39
|
styleInject(css_248z);
|
|
39
40
|
|
|
40
41
|
//分体式按钮
|
|
@@ -56,7 +57,13 @@ function SplitButton(props) {
|
|
|
56
57
|
popperStyle = props.popperStyle,
|
|
57
58
|
_props$popperClassNam = props.popperClassName,
|
|
58
59
|
popperClassName = _props$popperClassNam === void 0 ? '' : _props$popperClassNam,
|
|
59
|
-
getPopupContainer = props.getPopupContainer
|
|
60
|
+
getPopupContainer = props.getPopupContainer,
|
|
61
|
+
variant = props.variant,
|
|
62
|
+
hideStartIcon = props.hideStartIcon,
|
|
63
|
+
_props$optionMaxWidth = props.optionMaxWidth,
|
|
64
|
+
optionMaxWidth = _props$optionMaxWidth === void 0 ? '500px' : _props$optionMaxWidth,
|
|
65
|
+
_props$optionTipsPlac = props.optionTipsPlacement,
|
|
66
|
+
optionTipsPlacement = _props$optionTipsPlac === void 0 ? 'top-start' : _props$optionTipsPlac;
|
|
60
67
|
var intl = useFormatMessage('Button', localeJson);
|
|
61
68
|
var btnRef = useRef();
|
|
62
69
|
// const [selectedIndex, setSelectedIndex] = useState<number | string>();
|
|
@@ -73,6 +80,24 @@ function SplitButton(props) {
|
|
|
73
80
|
};
|
|
74
81
|
//渲染按钮列表
|
|
75
82
|
var renderButtonList = function renderButtonList() {
|
|
83
|
+
// 渲染item
|
|
84
|
+
var renderItem = function renderItem(item) {
|
|
85
|
+
var com = (optionRender === null || optionRender === void 0 ? void 0 : optionRender(item)) || jsx(AutoTips, Object.assign({
|
|
86
|
+
placement: optionTipsPlacement
|
|
87
|
+
}, {
|
|
88
|
+
children: item.label
|
|
89
|
+
}));
|
|
90
|
+
var disabled = item.disabled,
|
|
91
|
+
disabledTooltip = item.disabledTooltip;
|
|
92
|
+
if (disabled && disabledTooltip) {
|
|
93
|
+
return jsx(Tooltip, Object.assign({
|
|
94
|
+
disabled: true
|
|
95
|
+
}, disabledTooltip, {
|
|
96
|
+
children: (optionRender === null || optionRender === void 0 ? void 0 : optionRender(item)) || item.label
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
return com;
|
|
100
|
+
};
|
|
76
101
|
//分组列表
|
|
77
102
|
var generateLiGroup = function generateLiGroup(opt, index) {
|
|
78
103
|
return jsx("li", Object.assign({
|
|
@@ -84,11 +109,14 @@ function SplitButton(props) {
|
|
|
84
109
|
className: clsx('split-li',
|
|
85
110
|
// idx === selectedIndex && 'split-li--active',
|
|
86
111
|
gItem.disabled ? 'split-li--disabled' : 'split-li--hover'),
|
|
112
|
+
style: {
|
|
113
|
+
maxWidth: optionMaxWidth
|
|
114
|
+
},
|
|
87
115
|
onClick: function onClick(evt) {
|
|
88
116
|
return handleButtonClick(gItem, idx, evt);
|
|
89
117
|
}
|
|
90
118
|
}, {
|
|
91
|
-
children: (
|
|
119
|
+
children: renderItem(gItem)
|
|
92
120
|
}), idx);
|
|
93
121
|
})
|
|
94
122
|
}), index);
|
|
@@ -106,11 +134,14 @@ function SplitButton(props) {
|
|
|
106
134
|
className: clsx('split-li',
|
|
107
135
|
// index === selectedIndex && 'split-li--active',
|
|
108
136
|
opt.disabled ? 'split-li--disabled' : 'split-li--hover'),
|
|
137
|
+
style: {
|
|
138
|
+
maxWidth: optionMaxWidth
|
|
139
|
+
},
|
|
109
140
|
onClick: function onClick(evt) {
|
|
110
141
|
return handleButtonClick(opt, index, evt);
|
|
111
142
|
}
|
|
112
143
|
}, {
|
|
113
|
-
children: (
|
|
144
|
+
children: renderItem(opt)
|
|
114
145
|
}), index);
|
|
115
146
|
})
|
|
116
147
|
})
|
|
@@ -119,6 +150,17 @@ function SplitButton(props) {
|
|
|
119
150
|
//渲染button
|
|
120
151
|
var renderButton = function renderButton() {
|
|
121
152
|
if (iconButton) {
|
|
153
|
+
if (variant) {
|
|
154
|
+
return jsx(Button.IconButton, Object.assign({
|
|
155
|
+
variant: variant,
|
|
156
|
+
size: "small",
|
|
157
|
+
disabled: disabled
|
|
158
|
+
}, buttonProps, {
|
|
159
|
+
children: buttonText !== null && buttonText !== void 0 ? buttonText : intl({
|
|
160
|
+
id: 'moreActions'
|
|
161
|
+
})
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
122
164
|
return jsx(Button.IconButton, Object.assign({
|
|
123
165
|
variant: 'text',
|
|
124
166
|
size: "small",
|
|
@@ -130,9 +172,9 @@ function SplitButton(props) {
|
|
|
130
172
|
}));
|
|
131
173
|
}
|
|
132
174
|
return jsx(Button, Object.assign({
|
|
133
|
-
variant: 'outlined',
|
|
175
|
+
variant: variant || 'outlined',
|
|
134
176
|
size: 'large',
|
|
135
|
-
startIcon: jsx(Down, {}),
|
|
177
|
+
startIcon: hideStartIcon ? null : jsx(Down, {}),
|
|
136
178
|
disabled: disabled
|
|
137
179
|
}, buttonProps, {
|
|
138
180
|
children: buttonText !== null && buttonText !== void 0 ? buttonText : intl({
|
|
@@ -263,7 +305,7 @@ var InternalButton = function InternalButton(props) {
|
|
|
263
305
|
}, [loading]);
|
|
264
306
|
return disabled && toolTipTitle ? jsx(Tooltip, Object.assign({
|
|
265
307
|
arrow: false,
|
|
266
|
-
placement: '
|
|
308
|
+
placement: 'bottomLeft'
|
|
267
309
|
}, TooltipProps, {
|
|
268
310
|
title: generateTooltipTitle()
|
|
269
311
|
}, {
|
|
@@ -358,7 +400,7 @@ var IconButton = function IconButton(props) {
|
|
|
358
400
|
}, [loading]);
|
|
359
401
|
return !!toolTipTitle ? jsx(Tooltip, Object.assign({
|
|
360
402
|
arrow: false,
|
|
361
|
-
placement: '
|
|
403
|
+
placement: 'bottomLeft'
|
|
362
404
|
}, TooltipProps, {
|
|
363
405
|
title: generateTooltipTitle()
|
|
364
406
|
}, {
|
package/ButtonGroup/index.js
CHANGED
|
@@ -5,24 +5,25 @@ import { Button } from '../Button/index.js';
|
|
|
5
5
|
import { Tooltip } from '../Tooltip/index.js';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import Forbid from '@para-ui/icons/Forbid';
|
|
8
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
8
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
9
9
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
|
-
import '../_verture/typeof-
|
|
11
|
-
import '../_verture/slicedToArray-
|
|
10
|
+
import '../_verture/typeof-adeedc13.js';
|
|
11
|
+
import '../_verture/slicedToArray-a8206399.js';
|
|
12
12
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
13
13
|
import '@para-ui/icons/LoadingF';
|
|
14
14
|
import '@para-ui/icons/Down';
|
|
15
|
-
import '../_verture/index-
|
|
15
|
+
import '../_verture/index-e9007d6a.js';
|
|
16
16
|
import 'rc-dropdown';
|
|
17
17
|
import '../_verture/usePopupContainer-87febeb9.js';
|
|
18
18
|
import 'dayjs';
|
|
19
19
|
import '@paraview/lib';
|
|
20
20
|
import '../_verture/useFormatMessage-703f8b20.js';
|
|
21
21
|
import '@para-ui/core/GlobalContext';
|
|
22
|
+
import '../AutoTips/index.js';
|
|
22
23
|
import 'rc-tooltip';
|
|
23
24
|
import 'rc-tooltip/lib/placements';
|
|
24
25
|
|
|
25
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/26 下午2:39\n* @description\n*/\n/**\n* @author
|
|
26
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/26 下午2:39\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-button-group {\n display: inline-flex;\n align-items: center;\n}\n.paraui-v4-button-group-iconSplit .paraui-v4-icon-button:not(:last-child) {\n margin-right: 8px;\n}\n.paraui-v4-button-group-iconSplit.paraui-v4-button-group-tooltip > span:not(:last-child) {\n margin-right: 8px;\n}\n.paraui-v4-button-group-icon {\n border: 1px solid rgb(212, 218, 227);\n border-radius: 4px;\n}\n.paraui-v4-button-group-icon .paraui-v4-icon-button {\n border: none;\n border-radius: 0;\n}\n.paraui-v4-button-group-icon .paraui-v4-icon-button:not(:last-child) {\n border-right: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-button-group-icon .paraui-v4-icon-button:first-child {\n border-radius: 4px 0 0 4px;\n}\n.paraui-v4-button-group-icon .paraui-v4-icon-button:last-child {\n border-radius: 0 4px 4px 0;\n}\n.paraui-v4-button-group-icon.paraui-v4-button-group-tooltip > span .paraui-v4-icon-button {\n border: none;\n border-radius: 0;\n}\n.paraui-v4-button-group-icon.paraui-v4-button-group-tooltip > span:not(:last-child) .paraui-v4-icon-button {\n border-right: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-button-group-icon.paraui-v4-button-group-tooltip > span:first-child .paraui-v4-icon-button {\n border-radius: 4px 0 0 4px;\n}\n.paraui-v4-button-group-icon.paraui-v4-button-group-tooltip > span:last-child .paraui-v4-icon-button {\n border-radius: 0 4px 4px 0;\n}\n.paraui-v4-button-group-text .paraui-v4-button {\n border: none;\n border-radius: 0;\n}\n.paraui-v4-button-group-text .paraui-v4-button:not(:last-child) {\n border-right: 1px solid rgb(212, 218, 227);\n}";
|
|
26
27
|
styleInject(css_248z);
|
|
27
28
|
|
|
28
29
|
//按钮组
|
package/Carousel/index.d.ts
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* @date 2022/2/28 上午11:02
|
|
4
4
|
* @description Carousel
|
|
5
5
|
*/
|
|
6
|
-
import React from
|
|
6
|
+
import React from "react";
|
|
7
7
|
import { Settings } from "react-slick";
|
|
8
|
-
import
|
|
9
|
-
export type CarouselEffect =
|
|
10
|
-
export type DotPosition =
|
|
11
|
-
export interface CarouselProps extends Omit<Settings,
|
|
8
|
+
import "./index.scss";
|
|
9
|
+
export type CarouselEffect = "scrollx" | "fade";
|
|
10
|
+
export type DotPosition = "top" | "bottom" | "left" | "right";
|
|
11
|
+
export interface CarouselProps extends Omit<Settings, "dots" | "dotsClass"> {
|
|
12
12
|
/** 动画效果函数 */
|
|
13
13
|
effect?: CarouselEffect;
|
|
14
14
|
/** style */
|
package/Carousel/index.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_verture/defineProperty-
|
|
1
|
+
import { _ as _defineProperty } from '../_verture/defineProperty-1d116156.js';
|
|
2
2
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import SlickCarousel from 'react-slick';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
7
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
8
|
+
import RightCircleF from '@para-ui/icons/RightCircleF';
|
|
9
|
+
import LeftCircleF from '@para-ui/icons/LeftCircleF';
|
|
8
10
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
9
|
-
import '../_verture/typeof-
|
|
11
|
+
import '../_verture/typeof-adeedc13.js';
|
|
10
12
|
|
|
11
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/2/28 上午11:01\n* @description Carousel\n*/\n/**\n* @author
|
|
13
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/2/28 上午11:01\n* @description Carousel\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-carousel {\n color: rgb(29, 33, 38);\n font-size: 14px;\n line-height: 1.5715;\n list-style: none;\n}\n.paraui-v4-carousel .slick-arrow {\n z-index: 1;\n opacity: 0;\n}\n.paraui-v4-carousel .slick-arrow svg {\n color: #a1a8b3;\n font-size: 30px;\n}\n.paraui-v4-carousel:hover .slick-arrow {\n opacity: 1;\n}\n.paraui-v4-carousel .slick-slider {\n position: relative;\n display: block;\n box-sizing: border-box;\n touch-action: pan-y;\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: transparent;\n}\n.paraui-v4-carousel .slick-list {\n position: relative;\n display: block;\n margin: 0;\n padding: 0;\n overflow: hidden;\n}\n.paraui-v4-carousel .slick-list:focus {\n outline: none;\n}\n.paraui-v4-carousel .slick-list.dragging {\n cursor: pointer;\n}\n.paraui-v4-carousel .slick-list .slick-slide {\n pointer-events: none;\n}\n.paraui-v4-carousel .slick-list .slick-slide input.ant-radio-input,\n.paraui-v4-carousel .slick-list .slick-slide input.ant-checkbox-input {\n visibility: hidden;\n}\n.paraui-v4-carousel .slick-list .slick-slide.slick-active {\n pointer-events: auto;\n}\n.paraui-v4-carousel .slick-list .slick-slide.slick-active input.ant-radio-input,\n.paraui-v4-carousel .slick-list .slick-slide.slick-active input.ant-checkbox-input {\n visibility: visible;\n}\n.paraui-v4-carousel .slick-list .slick-slide > div > div {\n vertical-align: bottom;\n}\n.paraui-v4-carousel .slick-slider .slick-track,\n.paraui-v4-carousel .slick-slider .slick-list {\n transform: translate3d(0, 0, 0);\n touch-action: pan-y;\n}\n.paraui-v4-carousel .slick-track {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n}\n.paraui-v4-carousel .slick-track::before,\n.paraui-v4-carousel .slick-track::after {\n display: table;\n content: \"\";\n}\n.paraui-v4-carousel .slick-track::after {\n clear: both;\n}\n.paraui-v4-carousel .slick-slide {\n display: none;\n float: left;\n height: 100%;\n min-height: 1px;\n}\n.paraui-v4-carousel .slick-slide img {\n display: block;\n}\n.paraui-v4-carousel .slick-slide.slick-loading img {\n display: none;\n}\n.paraui-v4-carousel .slick-slide.dragging img {\n pointer-events: none;\n}\n.paraui-v4-carousel .slick-initialized .slick-slide {\n display: block;\n}\n.paraui-v4-carousel .slick-loading .slick-slide {\n visibility: hidden;\n}\n.paraui-v4-carousel .slick-vertical .slick-slide {\n display: block;\n height: auto;\n}\n.paraui-v4-carousel .slick-arrow.slick-hidden {\n display: none;\n}\n.paraui-v4-carousel .slick-prev,\n.paraui-v4-carousel .slick-next {\n position: absolute;\n top: 50%;\n display: block;\n width: 30px;\n height: 30px;\n transform: translate(0, -50%);\n padding: 0;\n color: transparent;\n font-size: 0;\n line-height: 0;\n background: transparent;\n border: 0;\n outline: none;\n cursor: pointer;\n}\n.paraui-v4-carousel .slick-prev:hover svg,\n.paraui-v4-carousel .slick-next:hover svg,\n.paraui-v4-carousel .slick-prev:focus svg,\n.paraui-v4-carousel .slick-next:focus svg {\n color: #fff;\n}\n.paraui-v4-carousel .slick-prev.slick-disabled::before,\n.paraui-v4-carousel .slick-next.slick-disabled::before {\n opacity: 0.25;\n}\n.paraui-v4-carousel .slick-prev {\n left: 20px;\n}\n.paraui-v4-carousel .slick-next {\n right: 20px;\n}\n.paraui-v4-carousel .slick-dots {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 15;\n display: flex !important;\n justify-content: center;\n margin-right: 15%;\n margin-left: 15%;\n padding-left: 0;\n list-style: none;\n}\n.paraui-v4-carousel .slick-dots-bottom {\n bottom: 20px;\n}\n.paraui-v4-carousel .slick-dots-top {\n top: 20px;\n bottom: auto;\n}\n.paraui-v4-carousel .slick-dots li {\n position: relative;\n display: inline-block;\n flex: 0 1 auto;\n box-sizing: content-box;\n width: 20px;\n height: 4px;\n margin: 0 2px;\n margin-right: 5px;\n margin-left: 5px;\n padding: 0;\n text-align: center;\n text-indent: -999px;\n vertical-align: top;\n transition: all 0.5s;\n}\n.paraui-v4-carousel .slick-dots li button {\n display: block;\n width: 100%;\n height: 4px;\n padding: 0;\n color: transparent;\n font-size: 0;\n background: rgb(255, 255, 255);\n border: 0;\n border-radius: 2px;\n outline: none;\n cursor: pointer;\n opacity: 0.3;\n transition: all 0.5s;\n}\n.paraui-v4-carousel .slick-dots li button:hover,\n.paraui-v4-carousel .slick-dots li button:focus {\n opacity: 0.75;\n}\n.paraui-v4-carousel .slick-dots li.slick-active {\n width: 40px;\n}\n.paraui-v4-carousel .slick-dots li.slick-active button {\n background: rgb(255, 255, 255);\n opacity: 1;\n}\n.paraui-v4-carousel .slick-dots li.slick-active:hover,\n.paraui-v4-carousel .slick-dots li.slick-active:focus {\n opacity: 1;\n}\n.paraui-v4-carousel .slick-loading .paraui-v4-carousel .slick-track {\n visibility: hidden;\n}\n.paraui-v4-carousel-vertical .slick-dots {\n top: 50%;\n bottom: auto;\n flex-direction: column;\n width: 3px;\n height: auto;\n margin: 0;\n transform: translateY(-50%);\n}\n.paraui-v4-carousel-vertical .slick-dots-left {\n right: auto;\n left: 20px;\n}\n.paraui-v4-carousel-vertical .slick-dots-right {\n right: 20px;\n left: auto;\n}\n.paraui-v4-carousel-vertical .slick-dots li {\n width: 3px;\n height: 16px;\n margin: 4px 2px;\n vertical-align: baseline;\n}\n.paraui-v4-carousel-vertical .slick-dots li button {\n width: 3px;\n height: 16px;\n}\n.paraui-v4-carousel-vertical .slick-dots li.slick-active {\n width: 3px;\n height: 24px;\n}\n.paraui-v4-carousel-vertical .slick-dots li.slick-active button {\n width: 3px;\n height: 24px;\n}\n.paraui-v4-carousel-rtl {\n direction: rtl;\n}\n.paraui-v4-carousel-rtl .paraui-v4-carousel .slick-track {\n right: 0;\n left: auto;\n}\n.paraui-v4-carousel-rtl .paraui-v4-carousel .slick-prev {\n right: 20px;\n left: auto;\n}\n.paraui-v4-carousel-rtl .paraui-v4-carousel .slick-next {\n right: auto;\n left: 20px;\n}\n.paraui-v4-carousel-rtl.paraui-v4-carousel .slick-dots {\n flex-direction: row-reverse;\n}\n.paraui-v4-carousel-rtl.paraui-v4-carousel-vertical .slick-dots {\n flex-direction: column;\n}";
|
|
12
14
|
styleInject(css_248z);
|
|
13
15
|
|
|
14
16
|
//Carousel
|
|
@@ -20,7 +22,7 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
20
22
|
_props$draggable = props.draggable,
|
|
21
23
|
draggable = _props$draggable === void 0 ? false : _props$draggable,
|
|
22
24
|
_props$dotPosition = props.dotPosition,
|
|
23
|
-
dotPosition = _props$dotPosition === void 0 ?
|
|
25
|
+
dotPosition = _props$dotPosition === void 0 ? "bottom" : _props$dotPosition,
|
|
24
26
|
className = props.className,
|
|
25
27
|
restProps = __rest(props, ["dots", "arrows", "draggable", "dotPosition", "className"]);
|
|
26
28
|
var slickRef = React__default.useRef();
|
|
@@ -49,16 +51,16 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
49
51
|
}, [props.children]);
|
|
50
52
|
var newProps = Object.assign({}, restProps);
|
|
51
53
|
//动画效果
|
|
52
|
-
if (newProps.effect ===
|
|
54
|
+
if (newProps.effect === "fade") {
|
|
53
55
|
newProps.fade = true;
|
|
54
56
|
}
|
|
55
57
|
var prefixCls = "".concat($prefixCls, "-carousel");
|
|
56
|
-
var dotsClass =
|
|
57
|
-
newProps.vertical = dotPosition ===
|
|
58
|
+
var dotsClass = "slick-dots";
|
|
59
|
+
newProps.vertical = dotPosition === "left" || dotPosition === "right";
|
|
58
60
|
//启用dots
|
|
59
61
|
var enableDots = !!dots;
|
|
60
62
|
//dots cls
|
|
61
|
-
var dsClass = clsx(dotsClass, "".concat(dotsClass, "-").concat(dotPosition), typeof dots ===
|
|
63
|
+
var dsClass = clsx(dotsClass, "".concat(dotsClass, "-").concat(dotPosition), typeof dots === "boolean" ? false : dots === null || dots === void 0 ? void 0 : dots.className);
|
|
62
64
|
//组件cls
|
|
63
65
|
var cls = clsx(prefixCls, className, _defineProperty({}, "".concat(prefixCls, "-vertical"), newProps.vertical));
|
|
64
66
|
return jsx("div", Object.assign({
|
|
@@ -70,6 +72,16 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
70
72
|
dots: enableDots,
|
|
71
73
|
dotsClass: dsClass,
|
|
72
74
|
arrows: arrows,
|
|
75
|
+
nextArrow: jsx("div", Object.assign({
|
|
76
|
+
className: "btn-slick-next"
|
|
77
|
+
}, {
|
|
78
|
+
children: jsx(RightCircleF, {})
|
|
79
|
+
})),
|
|
80
|
+
prevArrow: jsx("div", Object.assign({
|
|
81
|
+
className: "btn-slick-next"
|
|
82
|
+
}, {
|
|
83
|
+
children: jsx(LeftCircleF, {})
|
|
84
|
+
})),
|
|
73
85
|
draggable: draggable
|
|
74
86
|
}))
|
|
75
87
|
}));
|