@para-ui/core 4.0.0-beta → 4.0.0-rc.1
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.d.ts +1 -1
- package/AutoBox/index.js +12 -12
- package/AutoTips/autoTipsMultiline/index.d.ts +1 -1
- package/AutoTips/index.d.ts +2 -2
- package/AutoTips/index.js +17 -17
- package/Badge/index.d.ts +23 -0
- package/Badge/index.js +54 -0
- package/Breadcrumbs/index.js +8 -8
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +4 -4
- package/Carousel/index.d.ts +6 -6
- package/Carousel/index.js +5 -5
- package/Cascader/Cascader.d.ts +10 -10
- package/Cascader/OptionList/Column.d.ts +3 -3
- package/Cascader/OptionList/index.d.ts +2 -2
- package/Cascader/index.d.ts +1 -1
- package/Cascader/index.js +5 -3
- package/Cascader/lang/en_US.d.ts +5 -0
- package/Cascader/lang/index.d.ts +11 -0
- package/Cascader/lang/zh_CN.d.ts +5 -0
- package/Cascader/utils/treeUtil.d.ts +1 -1
- package/Checkbox/index.d.ts +1 -1
- package/Checkbox/index.js +5 -5
- package/CheckboxGroup/index.d.ts +2 -2
- package/CheckboxGroup/index.js +3 -3
- package/Collapse/index.js +4 -4
- package/CollapseBox/index.js +12 -20
- package/CollapseLayout/index.js +20 -20
- package/ColorPicker/index.js +2 -2
- package/ComboSelect/index.js +53 -63
- package/ComboSelect/interface.d.ts +3 -3
- package/ComboSelect/utils.d.ts +5 -0
- package/Container/index.d.ts +3 -3
- package/Container/index.js +56 -56
- package/CopyText/index.d.ts +2 -2
- package/CopyText/index.js +2 -2
- package/DatePicker/generatePicker/index.d.ts +22 -22
- package/DatePicker/index.js +10 -8
- package/DatePicker/util.d.ts +1 -1
- package/Desktop/index.d.ts +1 -1
- package/Desktop/index.js +19 -14
- package/DragVerify/index.d.ts +1 -1
- package/DragVerify/index.js +15 -15
- package/Drawer/index.d.ts +2 -2
- package/Drawer/index.js +118 -17
- package/Drawer/interface.d.ts +10 -2
- package/Drawer/util.d.ts +6 -0
- package/Dropdown/index.d.ts +1 -1
- package/DynamicMultiBox/formItem.d.ts +1 -1
- package/DynamicMultiBox/index.d.ts +7 -2
- package/DynamicMultiBox/index.js +42 -39
- package/DynamicMultiBox/interface.d.ts +8 -8
- package/DynamicMultiBox/rowForm.d.ts +3 -1
- package/Empty/index.d.ts +1 -1
- package/Empty/index.js +2 -2
- package/Form/index.d.ts +12 -13
- package/Form/index.js +14 -12
- package/FormItem/compoments/defaultCompoments/index.d.ts +4 -4
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +1 -1
- package/FormItem/compoments/formFile/index.d.ts +2 -2
- package/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
- package/FormItem/compoments/formSelect/index.d.ts +7 -7
- package/FormItem/errorTips.d.ts +3 -3
- package/FormItem/index.d.ts +5 -5
- package/FormItem/index.js +7 -6
- package/FormItem/lang/en_US.d.ts +10 -0
- package/FormItem/lang/index.d.ts +21 -0
- package/FormItem/lang/zh_CN.d.ts +10 -0
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/dialog.d.ts +26 -26
- package/FunctionModal/index.d.ts +6 -6
- package/FunctionModal/index.js +9 -9
- package/FunctionModal/modalContext.d.ts +3 -3
- package/GlobalContext/componentsProps.d.ts +7 -7
- package/GlobalContext/index.d.ts +2 -2
- package/GlobalContext/index.js +1 -1
- package/GlobalContext/useFormatMessage.d.ts +1 -1
- package/Help/index.js +2 -2
- package/HelperText/index.js +1 -1
- package/InputLang/index.d.ts +2 -2
- package/InputLang/index.js +8 -8
- package/InputNumber/index.d.ts +2 -2
- package/InputNumber/index.js +4 -4
- package/Label/index.js +2 -2
- package/Loading/index.js +1 -1
- package/Menu/index.js +14 -14
- package/Menu/interface.d.ts +1 -1
- package/Message/index.js +12 -12
- package/Modal/Confirm/index.d.ts +3 -3
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +7 -7
- package/MultiBox/index.d.ts +2 -2
- package/MultiBox/index.js +11 -7
- package/Notification/index.js +2 -2
- package/OperateBtn/index.d.ts +2 -2
- package/OperateBtn/index.js +42 -37
- package/PageHeader/index.js +31 -31
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +1 -1
- package/Pagination/index.js +17 -17
- package/ParauiProvider/index.js +1 -1
- package/PasswordRules/index.js +8 -8
- package/PopConfirm/index.js +4 -4
- package/Progress/Line.d.ts +10 -10
- package/Progress/Steps.d.ts +2 -2
- package/Progress/index.d.ts +12 -12
- package/Progress/index.js +40 -40
- package/Progress/utils.d.ts +4 -4
- package/Querying/index.d.ts +1 -1
- package/Querying/index.js +2 -2
- package/README.md +3 -0
- package/Radio/index.d.ts +1 -1
- package/Radio/index.js +5 -5
- package/RadioGroup/index.d.ts +2 -2
- package/RadioGroup/index.js +3 -3
- package/Search/index.js +2 -2
- package/Select/index.d.ts +3 -3
- package/Select/index.js +43 -43
- package/SelectInput/index.js +2 -2
- package/Selector/index.js +19 -19
- package/Selector/interface.d.ts +6 -6
- package/SelectorPicker/index.d.ts +4 -4
- package/SelectorPicker/index.js +12 -12
- package/SingleBox/index.d.ts +2 -2
- package/SingleBox/index.js +3 -3
- package/Slider/interface.d.ts +1 -1
- package/Status/index.d.ts +6 -4
- package/Status/index.js +21 -9
- package/Stepper/index.d.ts +5 -5
- package/Stepper/index.js +24 -24
- package/Styles/scrollbar.scss +66 -66
- package/Styles/theme.scss +62 -61
- package/Switch/index.d.ts +7 -7
- package/Switch/index.js +24 -6
- package/Switch/lang/en_US.d.ts +4 -0
- package/Switch/lang/index.d.ts +9 -0
- package/Switch/lang/zh_CN.d.ts +4 -0
- package/Table/index.js +36 -36
- package/Table/interface.d.ts +4 -4
- package/Table/tableBodyElement/index.d.ts +1 -1
- package/Table/tableBodyInterface.d.ts +2 -2
- package/Table/tableContainer/index.d.ts +1 -1
- package/Table/tableElement/index.d.ts +1 -1
- package/Table/tableHeadElement/index.d.ts +1 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +6 -6
- package/Table/tdElement/index.d.ts +1 -1
- package/Table/thElement/index.d.ts +2 -2
- package/Table/trElement/index.d.ts +1 -1
- package/Table/util.d.ts +1 -1
- package/Tabs/index.d.ts +1 -1
- package/Tabs/index.js +26 -18
- package/Tag/TagGroup.d.ts +5 -5
- package/Tag/index.d.ts +7 -7
- package/Tag/index.js +33 -1207
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +45 -27
- package/TextEditor/lang/en_US.d.ts +4 -0
- package/TextEditor/lang/index.d.ts +9 -0
- package/TextEditor/lang/zh_CN.d.ts +4 -0
- package/TextField/index.d.ts +1 -1
- package/TextField/index.js +13 -13
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +2 -1
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +14 -14
- package/Title/index.d.ts +6 -4
- package/Title/index.js +9 -5
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.d.ts +5 -1
- package/ToggleButton/index.js +17 -10
- package/Tooltip/index.js +1 -1
- package/Transfer/box.d.ts +6 -6
- package/Transfer/index.js +27 -27
- package/Tree/OperateBar/index.d.ts +2 -2
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +4 -4
- package/Tree/interface.d.ts +8 -4
- package/Tree/utils/tools.d.ts +1 -1
- package/Upload/Dragger/index.d.ts +2 -2
- package/Upload/ErroTip/index.d.ts +1 -1
- package/Upload/index.d.ts +2 -2
- package/Upload/index.js +13 -13
- package/Upload/interface.d.ts +1 -1
- package/_verture/{index-5c77417d.js → index-0f315bca.js} +4 -4
- package/_verture/{index-e2881a53.js → index-19947788.js} +2 -2
- package/_verture/{index-d63bd287.js → index-232d890b.js} +1 -1
- package/_verture/{index-68db2bc3.js → index-92e406f4.js} +50 -26
- package/_verture/{index-7ec72724.js → index-bc461491.js} +45 -38
- package/_verture/{index-e6f85fd5.js → index-d251967e.js} +104 -47
- package/_verture/{modalContext-c12ca3e8.js → modalContext-9299acc9.js} +26 -26
- package/_verture/tinycolor-ece3542d.js +1180 -0
- package/_verture/{utils-f0e81540.js → utils-06d86594.js} +3 -6
- package/index.d.ts +2 -0
- package/index.js +14 -13
- package/locale/en-US.d.ts +19 -0
- package/locale/index.d.ts +38 -0
- package/locale/index.js +41 -3
- package/locale/zh-CN.d.ts +19 -0
- package/package.json +53 -8
- package/umd/AutoBox.js +2 -2
- package/umd/AutoTips.js +4 -4
- package/umd/Badge.js +1 -0
- package/umd/Breadcrumbs.js +2 -2
- package/umd/Button.js +2 -2
- package/umd/ButtonGroup.js +4 -4
- package/umd/Cascader.js +4 -4
- package/umd/Checkbox.js +5 -5
- package/umd/CheckboxGroup.js +5 -5
- package/umd/Collapse.js +1 -1
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +6 -6
- package/umd/CopyText.js +2 -2
- package/umd/DatePicker.js +2 -2
- package/umd/Desktop.js +2 -2
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +4 -4
- package/umd/DynamicMultiBox.js +4 -4
- package/umd/Form.js +4 -4
- package/umd/FormItem.js +4 -4
- package/umd/FunctionModal.js +2 -2
- package/umd/GlobalContext.js +1 -1
- package/umd/Help.js +2 -2
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +4 -4
- package/umd/InputNumber.js +2 -2
- package/umd/Label.js +2 -2
- package/umd/Loading.js +1 -1
- package/umd/Menu.js +2 -2
- package/umd/Message.js +1 -1
- package/umd/Modal.js +2 -2
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +2 -2
- package/umd/OperateBtn.js +2 -2
- package/umd/PageHeader.js +2 -2
- package/umd/Pagination.js +4 -4
- package/umd/ParauiProvider.js +1 -1
- package/umd/PasswordRules.js +3 -3
- package/umd/PopConfirm.js +2 -2
- package/umd/Popover.js +1 -1
- package/umd/Progress.js +1 -1
- package/umd/Radio.js +2 -2
- package/umd/RadioGroup.js +2 -2
- package/umd/Search.js +7 -7
- package/umd/Select.js +2 -2
- package/umd/SelectInput.js +2 -2
- package/umd/Selector.js +2 -2
- package/umd/SelectorPicker.js +2 -2
- package/umd/SingleBox.js +2 -2
- package/umd/Status.js +4 -4
- package/umd/Stepper.js +2 -2
- package/umd/Switch.js +5 -5
- package/umd/Table.js +6 -6
- package/umd/Tabs.js +4 -4
- package/umd/Tag.js +2 -2
- package/umd/TextEditor.js +3 -3
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +2 -2
- package/umd/Title.js +2 -2
- package/umd/ToggleButton.js +4 -4
- package/umd/Tooltip.js +1 -1
- package/umd/Transfer.js +5 -5
- package/umd/Tree.js +7 -7
- package/umd/Upload.js +2 -2
- package/umd/locale.js +1 -1
- /package/_verture/{typeof-b240b062.js → typeof-c310ee4a.js} +0 -0
package/TextEditor/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* @description 基于wangEditor的富文本编辑器
|
|
5
5
|
*/
|
|
6
6
|
import React, { ReactNode } from 'react';
|
|
7
|
-
import { LabelTooltipProps } from
|
|
7
|
+
import { LabelTooltipProps } from '../Label';
|
|
8
8
|
import { IDomEditor } from '@wangeditor/editor';
|
|
9
|
-
import { HelperTextDetailProps } from
|
|
9
|
+
import { HelperTextDetailProps } from '../HelperText';
|
|
10
10
|
import './index.scss';
|
|
11
11
|
import '@wangeditor/editor/dist/css/style.css';
|
|
12
12
|
type InsertFnType = (url: string, alt: string, href: string) => void;
|
package/TextEditor/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { i18nChangeLanguage } from '@wangeditor/editor';
|
|
|
7
7
|
import HelperText from '../HelperText/index.js';
|
|
8
8
|
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
9
9
|
import { UUID } from '@paraview/lib';
|
|
10
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
10
11
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
11
12
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
12
13
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
@@ -17,38 +18,52 @@ import 'rc-tooltip/lib/placements';
|
|
|
17
18
|
import 'clsx';
|
|
18
19
|
import '@para-ui/icons/Forbid';
|
|
19
20
|
import '@para-ui/icons/Help';
|
|
21
|
+
import '@para-ui/core/GlobalContext';
|
|
20
22
|
|
|
21
23
|
/**
|
|
22
24
|
* @author xh
|
|
23
25
|
* @date 2022/09/06 18:00
|
|
24
26
|
* @description 存放富文本编辑器的一些默认配置
|
|
25
27
|
*/
|
|
26
|
-
var TOOL_BAR_CONFIG = [
|
|
27
|
-
key:
|
|
28
|
-
title:
|
|
28
|
+
var TOOL_BAR_CONFIG = ['headerSelect', 'blockquote', '|', 'bold', 'underline', 'italic', {
|
|
29
|
+
key: 'group-more-style',
|
|
30
|
+
title: '更多',
|
|
29
31
|
iconSvg: '<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',
|
|
30
|
-
menuKeys: [
|
|
31
|
-
},
|
|
32
|
-
key:
|
|
33
|
-
title:
|
|
32
|
+
menuKeys: ['through', 'code', 'sup', 'sub', 'clearStyle']
|
|
33
|
+
}, 'color', 'bgColor', '|', 'fontSize', 'fontFamily', 'lineHeight', '|', 'bulletedList', 'numberedList', 'todo', {
|
|
34
|
+
key: 'group-justify',
|
|
35
|
+
title: '对齐',
|
|
34
36
|
iconSvg: '<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',
|
|
35
|
-
menuKeys: [
|
|
37
|
+
menuKeys: ['justifyLeft', 'justifyRight', 'justifyCenter', 'justifyJustify']
|
|
36
38
|
}, {
|
|
37
|
-
key:
|
|
38
|
-
title:
|
|
39
|
+
key: 'group-indent',
|
|
40
|
+
title: '缩进',
|
|
39
41
|
iconSvg: '<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',
|
|
40
|
-
menuKeys: [
|
|
41
|
-
},
|
|
42
|
-
key:
|
|
43
|
-
title:
|
|
42
|
+
menuKeys: ['indent', 'delIndent']
|
|
43
|
+
}, '|', 'emotion', 'insertLink', {
|
|
44
|
+
key: 'group-image',
|
|
45
|
+
title: '图片',
|
|
44
46
|
iconSvg: '<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',
|
|
45
|
-
menuKeys: [
|
|
47
|
+
menuKeys: ['insertImage', 'uploadImage']
|
|
46
48
|
}, {
|
|
47
|
-
key:
|
|
48
|
-
title:
|
|
49
|
+
key: 'group-video',
|
|
50
|
+
title: '视频',
|
|
49
51
|
iconSvg: '<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',
|
|
50
|
-
menuKeys: [
|
|
51
|
-
},
|
|
52
|
+
menuKeys: ['insertVideo', 'uploadVideo']
|
|
53
|
+
}, 'insertTable', 'codeBlock', 'divider', '|', 'undo', 'redo', '|', 'fullScreen'];
|
|
54
|
+
|
|
55
|
+
var en = {
|
|
56
|
+
pleaseEnter: 'Please Enter'
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
var zh = {
|
|
60
|
+
pleaseEnter: '请输入内容'
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var localeJson = {
|
|
64
|
+
zh: zh,
|
|
65
|
+
en: en
|
|
66
|
+
};
|
|
52
67
|
|
|
53
68
|
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-text-editor .w-e-max-length-info {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-text-editor .w-e-bar-item > button:hover {\n background: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item {\n padding-left: 0;\n padding-right: 0;\n display: flex;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item > button {\n flex: 1;\n display: flex;\n justify-content: flex-start;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item > button:hover {\n background: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-text-editor .w-e-full-screen-container {\n z-index: 1000;\n}\n.paraui-v4-text-editor .text-editor-content {\n border: 1px solid rgb(212, 218, 227);\n border-radius: 4px;\n padding: 1px 0;\n background-color: #fff;\n}\n.paraui-v4-text-editor .text-editor-content > div:nth-child(1) {\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-text-editor .text-editor-content div[contenteditable=false] {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-text-editor .text-editor-content div[contenteditable=false]:hover {\n border-color: rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-text-editor .preview-mode > div:nth-child(1) {\n border-bottom: none;\n}";
|
|
54
69
|
styleInject(css_248z$1);
|
|
@@ -57,6 +72,7 @@ var css_248z = ":root,\n:host {\n --w-e-textarea-bg-color: #fff;\n --w-e-texta
|
|
|
57
72
|
styleInject(css_248z);
|
|
58
73
|
|
|
59
74
|
var TextEditor = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
75
|
+
var intl = useFormatMessage('TextEditor', localeJson);
|
|
60
76
|
var style = props.style,
|
|
61
77
|
_props$toolbarStyle = props.toolbarStyle,
|
|
62
78
|
toolbarStyle = _props$toolbarStyle === void 0 ? {} : _props$toolbarStyle,
|
|
@@ -75,7 +91,9 @@ var TextEditor = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
75
91
|
label = props.label,
|
|
76
92
|
labelTooltip = props.labelTooltip,
|
|
77
93
|
_props$placeholder = props.placeholder,
|
|
78
|
-
placeholder = _props$placeholder === void 0 ?
|
|
94
|
+
placeholder = _props$placeholder === void 0 ? intl({
|
|
95
|
+
id: 'pleaseEnter'
|
|
96
|
+
}) : _props$placeholder,
|
|
79
97
|
onChange = props.onChange,
|
|
80
98
|
onFocus = props.onFocus,
|
|
81
99
|
onBlur = props.onBlur,
|
|
@@ -230,12 +248,12 @@ var TextEditor = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
230
248
|
};
|
|
231
249
|
});
|
|
232
250
|
/**
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
251
|
+
* 处理class
|
|
252
|
+
* @return {string}
|
|
253
|
+
*/
|
|
236
254
|
var handClass = function handClass() {
|
|
237
|
-
var str = $prefixCls
|
|
238
|
-
if (className) str +=
|
|
255
|
+
var str = "".concat($prefixCls, "-text-editor");
|
|
256
|
+
if (className) str += " ".concat(className);
|
|
239
257
|
return str;
|
|
240
258
|
};
|
|
241
259
|
/** 标题 */
|
|
@@ -243,7 +261,7 @@ var TextEditor = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
243
261
|
var handLabelClass = function handLabelClass() {
|
|
244
262
|
var str = 'text-editor-label';
|
|
245
263
|
if (labelTooltip && labelTooltip.className) {
|
|
246
|
-
str +=
|
|
264
|
+
str += " ".concat(labelTooltip.className);
|
|
247
265
|
}
|
|
248
266
|
return str;
|
|
249
267
|
};
|
|
@@ -260,7 +278,7 @@ var TextEditor = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
260
278
|
style: style
|
|
261
279
|
}, {
|
|
262
280
|
children: [labelMemo, jsxs("div", Object.assign({
|
|
263
|
-
className: "text-editor-content ".concat(isPreview ?
|
|
281
|
+
className: "text-editor-content ".concat(isPreview ? 'preview-mode' : '')
|
|
264
282
|
}, {
|
|
265
283
|
children: [jsx(Toolbar, {
|
|
266
284
|
editor: editor,
|
package/TextField/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
7
|
import { LabelTooltipProps } from '../Label';
|
|
8
8
|
import { TooltipProps } from '../Tooltip';
|
|
9
|
-
import { HelperTextDetailProps } from
|
|
9
|
+
import { HelperTextDetailProps } from '../HelperText';
|
|
10
10
|
import './index.scss';
|
|
11
11
|
export interface TextFieldProps extends HelperTextDetailProps {
|
|
12
12
|
/** 样式class */
|
package/TextField/index.js
CHANGED
|
@@ -98,7 +98,7 @@ var TextField = function TextField(props) {
|
|
|
98
98
|
onSelect = _a.onSelect,
|
|
99
99
|
onClear = _a.onClear,
|
|
100
100
|
otherProps = __rest(_a, ["className", "style", "size", "labelMode", "placeholder", "label", "labelTooltip", "disabled", "disabledTooltip", "multiline", "required", "labelSign", "rows", "error", "hideErrorDom", "helperText", "addonBefore", "addonAfter", "defaultValue", "value", "type", "onClickIcon", "rightIcon", "showRightIcon", "allowClear", "limitLength", "fetchSuggestions", "selectPopoverClass", "renderSelectItem", "showSelectName", "resize", "searchEmpty", "onBlur", "onFocus", "onChange", "onKeydown", "onKeyUp", "onEnter", "onClickAddonBefore", "onClickAddonAfter", "onSelect", "onClear"]);
|
|
101
|
-
var _useState = useState(
|
|
101
|
+
var _useState = useState("text-field-select-content-".concat(UUID())),
|
|
102
102
|
_useState2 = _slicedToArray(_useState, 1),
|
|
103
103
|
classSearchOne = _useState2[0]; // 唯一class
|
|
104
104
|
var _useState3 = useState(true),
|
|
@@ -158,12 +158,12 @@ var TextField = function TextField(props) {
|
|
|
158
158
|
}, [isFocus, fetchSuggestions]);
|
|
159
159
|
useEffect(function () {
|
|
160
160
|
if (open) {
|
|
161
|
-
window.addEventListener(
|
|
161
|
+
window.addEventListener('keydown', keydownCom);
|
|
162
162
|
} else {
|
|
163
|
-
window.removeEventListener(
|
|
163
|
+
window.removeEventListener('keydown', keydownCom);
|
|
164
164
|
}
|
|
165
165
|
return function () {
|
|
166
|
-
window.removeEventListener(
|
|
166
|
+
window.removeEventListener('keydown', keydownCom);
|
|
167
167
|
};
|
|
168
168
|
}, [open]);
|
|
169
169
|
useEffect(function () {
|
|
@@ -231,7 +231,7 @@ var TextField = function TextField(props) {
|
|
|
231
231
|
brotherDom = selectDom.querySelector('.text-field-select-content-item');
|
|
232
232
|
}
|
|
233
233
|
if (brotherDom) {
|
|
234
|
-
brotherDom.classList.add(
|
|
234
|
+
brotherDom.classList.add('text-field-select-content-item-keydown');
|
|
235
235
|
domClientTop(brotherDom, selectDom);
|
|
236
236
|
}
|
|
237
237
|
};
|
|
@@ -255,7 +255,7 @@ var TextField = function TextField(props) {
|
|
|
255
255
|
* @param e 键盘信息
|
|
256
256
|
*/
|
|
257
257
|
var keydownCom = function keydownCom(e) {
|
|
258
|
-
var selectDom = document.querySelector(
|
|
258
|
+
var selectDom = document.querySelector(".".concat(classSearchOne));
|
|
259
259
|
var currentDom = null;
|
|
260
260
|
var keydownDom = selectDom.querySelector('.text-field-select-content-item-keydown');
|
|
261
261
|
// 回车
|
|
@@ -269,7 +269,7 @@ var TextField = function TextField(props) {
|
|
|
269
269
|
}
|
|
270
270
|
if (keydownDom) {
|
|
271
271
|
currentDom = keydownDom;
|
|
272
|
-
keydownDom.classList.remove(
|
|
272
|
+
keydownDom.classList.remove('text-field-select-content-item-keydown');
|
|
273
273
|
}
|
|
274
274
|
// 下
|
|
275
275
|
if (e.keyCode === 40) {
|
|
@@ -373,7 +373,7 @@ var TextField = function TextField(props) {
|
|
|
373
373
|
var handleClassPopover = function handleClassPopover() {
|
|
374
374
|
var str = "".concat($prefixCls, "-text-field-select ").concat($prefixCls, "-scrollbar-small");
|
|
375
375
|
if (size) str += " ".concat($prefixCls, "-text-field-select-").concat(size);
|
|
376
|
-
if (selectPopoverClass) str +=
|
|
376
|
+
if (selectPopoverClass) str += " ".concat(selectPopoverClass);
|
|
377
377
|
if (selectData.length > 0) str += " ".concat($prefixCls, "-text-field-select-data");
|
|
378
378
|
return str;
|
|
379
379
|
};
|
|
@@ -389,7 +389,7 @@ var TextField = function TextField(props) {
|
|
|
389
389
|
children: IsNaN(limitLength) && jsx("span", Object.assign({
|
|
390
390
|
className: "length-limit"
|
|
391
391
|
}, {
|
|
392
|
-
children: (valueCom ? valueCom.toString().length : 0
|
|
392
|
+
children: "".concat(valueCom ? valueCom.toString().length : 0, "/").concat(limitLength)
|
|
393
393
|
}))
|
|
394
394
|
});
|
|
395
395
|
}, [limitLength, valueCom]);
|
|
@@ -498,7 +498,7 @@ var TextField = function TextField(props) {
|
|
|
498
498
|
var handSelectContentClass = function handSelectContentClass() {
|
|
499
499
|
var str = 'text-field-select-content';
|
|
500
500
|
if (selectLoading) str += ' text-field-select-content-loading';
|
|
501
|
-
if (classSearchOne) str +=
|
|
501
|
+
if (classSearchOne) str += " ".concat(classSearchOne);
|
|
502
502
|
return str;
|
|
503
503
|
};
|
|
504
504
|
var handText = function handText(item) {
|
|
@@ -510,7 +510,7 @@ var TextField = function TextField(props) {
|
|
|
510
510
|
return jsxs("div", Object.assign({
|
|
511
511
|
className: handSelectContentClass(),
|
|
512
512
|
style: {
|
|
513
|
-
width: (selectPosDom && selectPosDom.current ? selectPosDom.current.offsetWidth : 0
|
|
513
|
+
width: "".concat(selectPosDom && selectPosDom.current ? selectPosDom.current.offsetWidth : 0, "px")
|
|
514
514
|
}
|
|
515
515
|
}, {
|
|
516
516
|
children: [selectData && selectData.map(function (item, index) {
|
|
@@ -547,7 +547,7 @@ var TextField = function TextField(props) {
|
|
|
547
547
|
var handLabelClass = function handLabelClass() {
|
|
548
548
|
var str = 'text-field-label';
|
|
549
549
|
if (labelTooltip && labelTooltip.className) {
|
|
550
|
-
str +=
|
|
550
|
+
str += " ".concat(labelTooltip.className);
|
|
551
551
|
}
|
|
552
552
|
return str;
|
|
553
553
|
};
|
|
@@ -564,7 +564,7 @@ var TextField = function TextField(props) {
|
|
|
564
564
|
// 处理class
|
|
565
565
|
var handClass = function handClass() {
|
|
566
566
|
var str = "".concat($prefixCls, "-text-field");
|
|
567
|
-
if (className) str +=
|
|
567
|
+
if (className) str += " ".concat(className);
|
|
568
568
|
if (size && !multiline) str += " ".concat($prefixCls, "-text-field-").concat(size);
|
|
569
569
|
if (error) str += " ".concat($prefixCls, "-text-field-error");
|
|
570
570
|
if (isFocus) str += " ".concat($prefixCls, "-text-field-focus");
|
package/TimePicker/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Dayjs } from 'dayjs';
|
|
3
3
|
import { PickerTimeProps, RangePickerTimeProps } from '../DatePicker/generatePicker';
|
|
4
|
-
import { TooltipProps } from
|
|
4
|
+
import { TooltipProps } from '../Tooltip';
|
|
5
5
|
export interface TimePickerLocale {
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
rangePlaceholder?: [string, string];
|
package/TimePicker/index.js
CHANGED
|
@@ -29,6 +29,7 @@ import '../_verture/defineProperty-1d116156.js';
|
|
|
29
29
|
import '@para-ui/icons/Close';
|
|
30
30
|
import '@para-ui/icons/EditOutline';
|
|
31
31
|
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
32
|
+
import '../_verture/tinycolor-ece3542d.js';
|
|
32
33
|
import '@para-ui/icons/Plus';
|
|
33
34
|
import 'rc-picker';
|
|
34
35
|
import '@para-ui/icons/CloseCircleF';
|
|
@@ -72,7 +73,7 @@ var TimePicker = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
72
73
|
var renderPicker = function renderPicker() {
|
|
73
74
|
var component = jsx(InternalTimePicker, Object.assign({}, restProps, {
|
|
74
75
|
disabled: disabled,
|
|
75
|
-
picker:
|
|
76
|
+
picker: "time",
|
|
76
77
|
dropdownClassName: popupClassName,
|
|
77
78
|
mode: undefined,
|
|
78
79
|
ref: ref,
|
package/Timeline/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* @date 2022/6/9 下午7:21
|
|
4
4
|
* @description Timeline
|
|
5
5
|
*/
|
|
6
|
-
import React from
|
|
7
|
-
import { TimelineItemProps } from
|
|
8
|
-
import
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { TimelineItemProps } from './TimelineItem';
|
|
8
|
+
import './index.scss';
|
|
9
9
|
export interface TimelineProps {
|
|
10
10
|
/** cls */
|
|
11
11
|
className?: string;
|
|
@@ -18,8 +18,8 @@ export interface TimelineProps {
|
|
|
18
18
|
/** 节点排序 */
|
|
19
19
|
reverse?: boolean;
|
|
20
20
|
/** 改变时间轴和内容的相对位置 */
|
|
21
|
-
mode?:
|
|
22
|
-
align?:
|
|
21
|
+
mode?: 'left' | 'alternate' | 'right' | 'double';
|
|
22
|
+
align?: 'left' | 'alternate' | 'right' | 'double';
|
|
23
23
|
/** timeline item */
|
|
24
24
|
data?: TimelineItemProps[];
|
|
25
25
|
[name: string]: any;
|
package/Timeline/index.js
CHANGED
|
@@ -63,13 +63,13 @@ var Timeline = function Timeline(props) {
|
|
|
63
63
|
_props$reverse = props.reverse,
|
|
64
64
|
reverse = _props$reverse === void 0 ? false : _props$reverse,
|
|
65
65
|
_props$mode = props.mode,
|
|
66
|
-
mode = _props$mode === void 0 ?
|
|
66
|
+
mode = _props$mode === void 0 ? 'left' : _props$mode,
|
|
67
67
|
align = props.align,
|
|
68
68
|
data = props.data,
|
|
69
69
|
restProps = __rest(props, ["pending", "pendingDot", "children", "className", "reverse", "mode", "align", "data"]);
|
|
70
70
|
var prefixCls = "".concat($prefixCls, "-timeline");
|
|
71
71
|
var innerMode = align !== null && align !== void 0 ? align : mode; //时间轴和内容相对位置
|
|
72
|
-
var pendingNode = typeof pending ===
|
|
72
|
+
var pendingNode = typeof pending === 'boolean' ? null : pending; //是否有幽灵节点
|
|
73
73
|
//pending节点项
|
|
74
74
|
var pendingItem = pending ? jsx(TimelineItem, Object.assign({
|
|
75
75
|
pending: !!pending,
|
|
@@ -86,16 +86,16 @@ var Timeline = function Timeline(props) {
|
|
|
86
86
|
//position cls
|
|
87
87
|
var getPositionCls = function getPositionCls(ele, idx) {
|
|
88
88
|
var _a, _b, _c;
|
|
89
|
-
if (innerMode ===
|
|
90
|
-
if (((_a = ele === null || ele === void 0 ? void 0 : ele.props) === null || _a === void 0 ? void 0 : _a.position) ===
|
|
91
|
-
if (((_b = ele === null || ele === void 0 ? void 0 : ele.props) === null || _b === void 0 ? void 0 : _b.position) ===
|
|
89
|
+
if (innerMode === 'alternate') {
|
|
90
|
+
if (((_a = ele === null || ele === void 0 ? void 0 : ele.props) === null || _a === void 0 ? void 0 : _a.position) === 'right') return "".concat($rcPrefixCls, "-timeline-item-right");
|
|
91
|
+
if (((_b = ele === null || ele === void 0 ? void 0 : ele.props) === null || _b === void 0 ? void 0 : _b.position) === 'left') return "".concat($rcPrefixCls, "-timeline-item-left");
|
|
92
92
|
return idx % 2 === 0 ? "".concat($rcPrefixCls, "-timeline-item-left") : "".concat($rcPrefixCls, "-timeline-item-right");
|
|
93
93
|
}
|
|
94
|
-
if (innerMode ===
|
|
95
|
-
if (innerMode ===
|
|
96
|
-
if (innerMode ===
|
|
97
|
-
if (((_c = ele === null || ele === void 0 ? void 0 : ele.props) === null || _c === void 0 ? void 0 : _c.position) ===
|
|
98
|
-
return
|
|
94
|
+
if (innerMode === 'left') return "".concat($rcPrefixCls, "-timeline-item-left");
|
|
95
|
+
if (innerMode === 'right') return "".concat($rcPrefixCls, "-timeline-item-right");
|
|
96
|
+
if (innerMode === 'double') return "".concat($rcPrefixCls, "-timeline-item-double");
|
|
97
|
+
if (((_c = ele === null || ele === void 0 ? void 0 : ele.props) === null || _c === void 0 ? void 0 : _c.position) === 'right') return "".concat($rcPrefixCls, "-timeline-item-right");
|
|
98
|
+
return '';
|
|
99
99
|
};
|
|
100
100
|
//实际渲染项
|
|
101
101
|
var truthyItems = timeLineItems.filter(function (item) {
|
|
@@ -104,8 +104,8 @@ var Timeline = function Timeline(props) {
|
|
|
104
104
|
var itemsCount = React__default.Children.count(truthyItems);
|
|
105
105
|
var lastCls = "".concat($rcPrefixCls, "-timeline-item-last");
|
|
106
106
|
var items = React__default.Children.map(truthyItems, function (ele, idx) {
|
|
107
|
-
var pendingClass = idx === itemsCount - 2 ? lastCls :
|
|
108
|
-
var readyClass = idx === itemsCount - 1 ? lastCls :
|
|
107
|
+
var pendingClass = idx === itemsCount - 2 ? lastCls : '';
|
|
108
|
+
var readyClass = idx === itemsCount - 1 ? lastCls : '';
|
|
109
109
|
return /*#__PURE__*/React__default.cloneElement(ele, {
|
|
110
110
|
className: clsx([ele.props.className, !reverse && !!pending ? pendingClass : readyClass, getPositionCls(ele, idx)])
|
|
111
111
|
});
|
|
@@ -129,8 +129,8 @@ var Timeline = function Timeline(props) {
|
|
|
129
129
|
disabled = _item$disabled === void 0 ? false : _item$disabled,
|
|
130
130
|
className = item.className,
|
|
131
131
|
label = item.label;
|
|
132
|
-
var pendingClass = idx === itemsCount - 2 ? lastCls :
|
|
133
|
-
var readyClass = idx === itemsCount - 1 ? lastCls :
|
|
132
|
+
var pendingClass = idx === itemsCount - 2 ? lastCls : '';
|
|
133
|
+
var readyClass = idx === itemsCount - 1 ? lastCls : '';
|
|
134
134
|
return jsx(TimelineItem, Object.assign({
|
|
135
135
|
label: innerMode === 'double' && label,
|
|
136
136
|
dot: dotIcon,
|
package/Title/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @date 2022/8/11 2:54 PM
|
|
4
4
|
* @description 标题
|
|
5
5
|
*/
|
|
6
|
-
import React, { FC, ReactNode } from
|
|
7
|
-
import
|
|
6
|
+
import React, { FC, ReactNode } from 'react';
|
|
7
|
+
import './index.scss';
|
|
8
8
|
export interface TitleProps {
|
|
9
9
|
/** 标题 **/
|
|
10
10
|
title: ReactNode;
|
|
@@ -13,13 +13,15 @@ export interface TitleProps {
|
|
|
13
13
|
*/
|
|
14
14
|
titleTooltip?: ReactNode;
|
|
15
15
|
/** 帮组提示方向 */
|
|
16
|
-
placement?:
|
|
16
|
+
placement?: 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';
|
|
17
17
|
/** 提示箭头 */
|
|
18
18
|
arrow?: boolean;
|
|
19
19
|
/** 提示信息icon */
|
|
20
20
|
titoleTooltipIcon?: ReactNode;
|
|
21
21
|
/** 折叠内容 */
|
|
22
22
|
collapseContent?: ReactNode;
|
|
23
|
+
/** 折叠容器样式 */
|
|
24
|
+
collapseClassName?: string;
|
|
23
25
|
/** 副标题 **/
|
|
24
26
|
subTitle?: ReactNode;
|
|
25
27
|
/** 图标 **/
|
|
@@ -32,7 +34,7 @@ export interface TitleProps {
|
|
|
32
34
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
33
35
|
};
|
|
34
36
|
/** 尺寸,仅在 icon 存在时有效 **/
|
|
35
|
-
size?:
|
|
37
|
+
size?: 'small' | 'medium' | 'large';
|
|
36
38
|
/** cls */
|
|
37
39
|
className?: string;
|
|
38
40
|
/** style */
|
package/Title/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import '@para-ui/icons/Help';
|
|
|
18
18
|
import 'rc-collapse';
|
|
19
19
|
import '@para-ui/icons/Right';
|
|
20
20
|
|
|
21
|
-
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(29, 33, 38);\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 {\n
|
|
21
|
+
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(29, 33, 38);\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 {\n margin-top: 20px;\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}\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}";
|
|
22
22
|
styleInject(css_248z);
|
|
23
23
|
|
|
24
24
|
var Panel = Collapse.Panel;
|
|
@@ -31,8 +31,9 @@ var Title = function Title(props) {
|
|
|
31
31
|
icon = props.icon,
|
|
32
32
|
link = props.link,
|
|
33
33
|
_props$size = props.size,
|
|
34
|
-
size = _props$size === void 0 ?
|
|
34
|
+
size = _props$size === void 0 ? 'medium' : _props$size,
|
|
35
35
|
className = props.className,
|
|
36
|
+
collapseClassName = props.collapseClassName,
|
|
36
37
|
titleTooltip = props.titleTooltip,
|
|
37
38
|
titoleTooltipIcon = props.titoleTooltipIcon,
|
|
38
39
|
placement = props.placement,
|
|
@@ -40,7 +41,7 @@ var Title = function Title(props) {
|
|
|
40
41
|
style = props.style;
|
|
41
42
|
var titleTextRef = useRef(null);
|
|
42
43
|
var linkTextRef = useRef(null);
|
|
43
|
-
var _useState = useState(
|
|
44
|
+
var _useState = useState('calc(100% - 20px)'),
|
|
44
45
|
_useState2 = _slicedToArray(_useState, 2),
|
|
45
46
|
descWith = _useState2[0],
|
|
46
47
|
setDescWith = _useState2[1];
|
|
@@ -56,6 +57,9 @@ var Title = function Title(props) {
|
|
|
56
57
|
var linkWidth = ((_b = linkTextRef.current) === null || _b === void 0 ? void 0 : _b.offsetWidth) || 0;
|
|
57
58
|
calcDescWidth(titleWidth, linkWidth);
|
|
58
59
|
}, [title, subTitle, link, collapseContent]);
|
|
60
|
+
var cloCls = function cloCls() {
|
|
61
|
+
return clsx("".concat($prefixCls, "-title-collapse"), collapseClassName);
|
|
62
|
+
};
|
|
59
63
|
var titleContent = function titleContent() {
|
|
60
64
|
return jsxs("div", Object.assign({
|
|
61
65
|
className: makeCls,
|
|
@@ -89,7 +93,7 @@ var Title = function Title(props) {
|
|
|
89
93
|
})
|
|
90
94
|
})), link && jsx("a", Object.assign({
|
|
91
95
|
className: "title-link",
|
|
92
|
-
target: link.target ||
|
|
96
|
+
target: link.target || '_blank',
|
|
93
97
|
href: link.href,
|
|
94
98
|
onClick: link.onClick,
|
|
95
99
|
ref: linkTextRef
|
|
@@ -102,7 +106,7 @@ var Title = function Title(props) {
|
|
|
102
106
|
className: "".concat($prefixCls, "-title")
|
|
103
107
|
}, {
|
|
104
108
|
children: collapseContent ? jsx(Collapse, Object.assign({
|
|
105
|
-
className:
|
|
109
|
+
className: cloCls()
|
|
106
110
|
}, {
|
|
107
111
|
children: jsx(Panel, Object.assign({
|
|
108
112
|
header: titleContent()
|
package/ToggleButton/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @date 2021/11/23 上午9:44
|
|
4
4
|
* @description toggleButton
|
|
5
5
|
*/
|
|
6
|
-
import React, { FunctionComponent } from
|
|
6
|
+
import React, { FunctionComponent } from 'react';
|
|
7
7
|
import ToggleButtonGroup, { ToggleButtonGroupProps, ToggleButtonItemProps } from './ToggleButtonGroup';
|
|
8
8
|
import './index.scss';
|
|
9
9
|
export interface ToggleButtonProps {
|
|
@@ -31,6 +31,10 @@ export interface ToggleButtonProps {
|
|
|
31
31
|
* 是否选中
|
|
32
32
|
*/
|
|
33
33
|
selected?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 是否单选
|
|
36
|
+
*/
|
|
37
|
+
exclusive?: boolean;
|
|
34
38
|
/**
|
|
35
39
|
* value
|
|
36
40
|
*/
|