@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/Checkbox/index.js
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
2
|
-
import {
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import Label from '../Label/index.js';
|
|
5
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
5
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
6
|
+
import { Tooltip } from '../Tooltip/index.js';
|
|
6
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
7
8
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
8
9
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
9
10
|
import '../Help/index.js';
|
|
10
|
-
import '
|
|
11
|
+
import '@para-ui/icons/Help';
|
|
12
|
+
import 'clsx';
|
|
11
13
|
import 'rc-tooltip';
|
|
12
14
|
import 'rc-tooltip/lib/placements';
|
|
13
|
-
import '
|
|
14
|
-
import '@para-ui/icons/Help';
|
|
15
|
+
import '@para-ui/icons/Forbid';
|
|
15
16
|
|
|
16
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author
|
|
17
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-checkbox {\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 cursor: pointer;\n display: inline-flex;\n align-items: flex-start;\n line-height: 16px;\n}\n.paraui-v4-checkbox:hover {\n /*& > .checkbox-label {\n color: $B2;\n cursor: pointer;\n\n svg {\n color: $B2;\n }\n }\n\n // 帮组\n & > .checkbox-help {\n padding: 0 8px;\n\n & > .checkbox-label {\n color: $B2;\n cursor: pointer;\n\n svg {\n color: $B2;\n }\n }\n }*/\n}\n.paraui-v4-checkbox:hover > .checkbox-box > .checkbox-box-inner {\n border-color: rgb(87, 131, 235);\n}\n.paraui-v4-checkbox > .checkbox-box {\n position: relative;\n}\n.paraui-v4-checkbox > .checkbox-box > input {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.paraui-v4-checkbox > .checkbox-box > .checkbox-box-inner {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n border-radius: 2px;\n background-color: white;\n border: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-checkbox > .checkbox-box > .checkbox-box-inner:after {\n position: absolute;\n display: table;\n content: \" \";\n}\n.paraui-v4-checkbox > .checkbox-label {\n color: rgb(29, 33, 38);\n padding: 0 8px;\n margin: 0;\n display: inline-flex;\n align-items: flex-start;\n overflow: hidden;\n cursor: pointer;\n}\n.paraui-v4-checkbox > .checkbox-label > .checkbox-help > svg {\n top: 0;\n}\n.paraui-v4-checkbox .checkbox-label {\n line-height: 16px;\n}\n.paraui-v4-checkbox > .checkbox-help {\n padding: 0 8px;\n position: relative;\n top: -1px;\n overflow: hidden;\n}\n.paraui-v4-checkbox > .checkbox-help > .checkbox-label {\n width: 100%;\n color: rgb(29, 33, 38);\n margin: 0;\n display: inline-flex;\n align-items: center;\n overflow: hidden;\n cursor: pointer;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-checked:hover > .checkbox-box > .checkbox-box-inner {\n background-color: rgb(87, 131, 235);\n border-color: transparent;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-checked > .checkbox-box > .checkbox-box-inner {\n background-color: rgb(46, 101, 230);\n border-color: transparent;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-checked > .checkbox-box > .checkbox-box-inner:after {\n border: 1px solid white;\n border-top: 0;\n border-left: 0;\n transform: rotate(45deg) scale(1) translate(-50%, -50%);\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-indeterminate:hover > .checkbox-box > .checkbox-box-inner {\n background-color: rgb(87, 131, 235);\n border-color: transparent;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-indeterminate > .checkbox-box > .checkbox-box-inner {\n background-color: rgb(46, 101, 230);\n border-color: transparent;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-indeterminate > .checkbox-box > .checkbox-box-inner:after {\n background-color: white;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(1);\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-disabled {\n cursor: not-allowed;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-disabled > .checkbox-label {\n color: rgb(161, 168, 179);\n cursor: not-allowed;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-disabled > .checkbox-label svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-disabled > .checkbox-help > .checkbox-label {\n color: rgb(161, 168, 179);\n cursor: not-allowed;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-disabled > .checkbox-help > .checkbox-label svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-disabled > .checkbox-box > input {\n cursor: not-allowed;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-disabled > .checkbox-box > .checkbox-box-inner {\n background-color: rgb(234, 236, 241);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-disabled.paraui-v4-checkbox-checked:hover > .checkbox-box > .checkbox-box-inner {\n background-color: rgb(234, 236, 241);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-disabled.paraui-v4-checkbox-checked > .checkbox-box > .checkbox-box-inner:after {\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-disabled.paraui-v4-checkbox-indeterminate:hover > .checkbox-box > .checkbox-box-inner {\n background-color: rgb(234, 236, 241);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-disabled.paraui-v4-checkbox-indeterminate > .checkbox-box > .checkbox-box-inner:after {\n background-color: rgb(212, 218, 227);\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-small > .checkbox-box {\n top: 1px;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-small > .checkbox-box > .checkbox-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-small.paraui-v4-checkbox-checked > .checkbox-box > .checkbox-box-inner:after {\n top: 45%;\n left: 21%;\n width: 4px;\n height: 7px;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-small.paraui-v4-checkbox-indeterminate > .checkbox-box > .checkbox-box-inner:after {\n width: 8px;\n height: 1px;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-medium > .checkbox-box {\n top: 1px;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-medium > .checkbox-box > .checkbox-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-medium.paraui-v4-checkbox-checked > .checkbox-box > .checkbox-box-inner:after {\n top: 45%;\n left: 21%;\n width: 4px;\n height: 7px;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-medium.paraui-v4-checkbox-indeterminate > .checkbox-box > .checkbox-box-inner:after {\n width: 8px;\n height: 1px;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-large > .checkbox-box {\n top: 1px;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-large > .checkbox-box > .checkbox-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-large.paraui-v4-checkbox-checked > .checkbox-box > .checkbox-box-inner:after {\n top: 45%;\n left: 21%;\n width: 4px;\n height: 7px;\n}\n.paraui-v4-checkbox.paraui-v4-checkbox-large.paraui-v4-checkbox-indeterminate > .checkbox-box > .checkbox-box-inner:after {\n width: 8px;\n height: 1px;\n}";
|
|
17
18
|
styleInject(css_248z);
|
|
18
19
|
|
|
19
20
|
var Checkbox = function Checkbox(props) {
|
|
20
21
|
var _props$className = props.className,
|
|
21
22
|
className = _props$className === void 0 ? '' : _props$className,
|
|
22
|
-
|
|
23
|
-
label = _props$label === void 0 ? '' : _props$label,
|
|
23
|
+
label = props.label,
|
|
24
24
|
labelTooltip = props.labelTooltip,
|
|
25
25
|
_props$size = props.size,
|
|
26
26
|
size = _props$size === void 0 ? 'large' : _props$size,
|
|
27
27
|
_props$disabled = props.disabled,
|
|
28
28
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
29
|
+
disabledTooltip = props.disabledTooltip,
|
|
29
30
|
_props$indeterminate = props.indeterminate,
|
|
30
31
|
indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate,
|
|
32
|
+
width = props.width,
|
|
31
33
|
onChange = props.onChange,
|
|
32
34
|
style = props.style;
|
|
33
35
|
var _useState = useState(false),
|
|
@@ -83,27 +85,46 @@ var Checkbox = function Checkbox(props) {
|
|
|
83
85
|
}
|
|
84
86
|
return str;
|
|
85
87
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
/** 处理样式 */
|
|
89
|
+
var handStyle = function handStyle() {
|
|
90
|
+
var obj = Object.assign({}, style);
|
|
91
|
+
if (width) obj.width = width;
|
|
92
|
+
return obj;
|
|
93
|
+
};
|
|
94
|
+
var contentRender = function contentRender() {
|
|
95
|
+
return jsxs("label", Object.assign({
|
|
96
|
+
className: handClass(),
|
|
97
|
+
onClick: clickCheck,
|
|
98
|
+
style: handStyle()
|
|
93
99
|
}, {
|
|
94
|
-
children: [
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
children: [jsxs("span", Object.assign({
|
|
101
|
+
className: "checkbox-box"
|
|
102
|
+
}, {
|
|
103
|
+
children: [jsx("input", Object.assign({
|
|
104
|
+
type: "checkbox",
|
|
105
|
+
value: checkedCom
|
|
106
|
+
}, props.inputProps)), jsx("span", {
|
|
107
|
+
className: "checkbox-box-inner"
|
|
108
|
+
})]
|
|
109
|
+
})), label !== undefined && label !== '' && label !== null ? jsx(Label, Object.assign({
|
|
110
|
+
label: label
|
|
111
|
+
}, labelTooltip, {
|
|
112
|
+
helpClassName: handHelpClassName(),
|
|
113
|
+
className: handLabelClass()
|
|
114
|
+
})) : null]
|
|
115
|
+
}));
|
|
116
|
+
};
|
|
117
|
+
var handleContentRender = function handleContentRender() {
|
|
118
|
+
if (disabledTooltip) {
|
|
119
|
+
return jsx(Tooltip, Object.assign({
|
|
120
|
+
disabled: true
|
|
121
|
+
}, disabledTooltip, {
|
|
122
|
+
children: contentRender()
|
|
123
|
+
}));
|
|
124
|
+
}
|
|
125
|
+
return contentRender();
|
|
126
|
+
};
|
|
127
|
+
return handleContentRender();
|
|
107
128
|
};
|
|
108
129
|
|
|
109
130
|
export { Checkbox, Checkbox as default };
|
package/CheckboxGroup/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export interface CheckboxGroupProps extends HelperTextDetailProps {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
/** style */
|
|
18
18
|
style?: React.CSSProperties;
|
|
19
|
+
/** 每一项的宽度 */
|
|
20
|
+
itemWidth?: string;
|
|
19
21
|
/** 间距 只有在横向布局的时候生效 */
|
|
20
22
|
spacing?: string;
|
|
21
23
|
/** 标题 */
|
|
@@ -37,7 +39,7 @@ export interface CheckboxGroupProps extends HelperTextDetailProps {
|
|
|
37
39
|
/** 选中选值 */
|
|
38
40
|
id?: string;
|
|
39
41
|
/** 选项数据 */
|
|
40
|
-
list: CheckboxListProps[];
|
|
42
|
+
list: CheckboxListProps[] | CheckboxListProps[][];
|
|
41
43
|
/** 改变值 */
|
|
42
44
|
onChange?: (val: any) => void;
|
|
43
45
|
}
|
package/CheckboxGroup/index.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
2
2
|
import { useState, useEffect, createElement } from 'react';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { Checkbox } from '../Checkbox/index.js';
|
|
5
5
|
import Label from '../Label/index.js';
|
|
6
6
|
import HelperText from '../HelperText/index.js';
|
|
7
7
|
import { DeepClone } from '@paraview/lib';
|
|
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
10
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
11
|
-
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
12
|
-
import '../Help/index.js';
|
|
13
11
|
import '../Tooltip/index.js';
|
|
12
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
14
13
|
import 'rc-tooltip';
|
|
15
14
|
import 'rc-tooltip/lib/placements';
|
|
16
15
|
import 'clsx';
|
|
16
|
+
import '@para-ui/icons/Forbid';
|
|
17
|
+
import '../Help/index.js';
|
|
17
18
|
import '@para-ui/icons/Help';
|
|
18
19
|
|
|
19
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author
|
|
20
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-checkbox-group {\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 width: 100%;\n}\n.paraui-v4-checkbox-group > .checkbox-group-label {\n margin-bottom: 6px;\n}\n.paraui-v4-checkbox-group > .checkbox-group-content {\n line-height: 0;\n margin-bottom: 2px;\n}\n.paraui-v4-checkbox-group > .checkbox-group-content > .checkbox-group-content-item {\n margin-bottom: 10px;\n}\n.paraui-v4-checkbox-group > .checkbox-group-content > .checkbox-group-content-item:last-child {\n margin-bottom: 0;\n}\n.paraui-v4-checkbox-group.paraui-v4-checkbox-group-column > .checkbox-group-content {\n display: flex;\n flex-direction: column;\n}\n.paraui-v4-checkbox-group.paraui-v4-checkbox-group-column > .checkbox-group-content > span {\n margin-bottom: 10px;\n}\n.paraui-v4-checkbox-group.paraui-v4-checkbox-group-column > .checkbox-group-content > span:last-child {\n margin-bottom: 0;\n}";
|
|
20
21
|
styleInject(css_248z);
|
|
21
22
|
|
|
22
23
|
var CheckboxGroup = function CheckboxGroup(props) {
|
|
@@ -24,7 +25,8 @@ var CheckboxGroup = function CheckboxGroup(props) {
|
|
|
24
25
|
label = _props$label === void 0 ? '' : _props$label,
|
|
25
26
|
labelTooltip = props.labelTooltip,
|
|
26
27
|
_props$spacing = props.spacing,
|
|
27
|
-
spacing = _props$spacing === void 0 ? '
|
|
28
|
+
spacing = _props$spacing === void 0 ? '40px' : _props$spacing,
|
|
29
|
+
itemWidth = props.itemWidth,
|
|
28
30
|
_props$size = props.size,
|
|
29
31
|
size = _props$size === void 0 ? 'large' : _props$size,
|
|
30
32
|
_props$row = props.row,
|
|
@@ -91,16 +93,20 @@ var CheckboxGroup = function CheckboxGroup(props) {
|
|
|
91
93
|
className: handLabelClass()
|
|
92
94
|
}));
|
|
93
95
|
}
|
|
94
|
-
return null;
|
|
95
96
|
};
|
|
96
97
|
/**
|
|
97
98
|
* @description 处理单选框每一项样式
|
|
98
99
|
* */
|
|
99
|
-
var handStyleItem = function handStyleItem(item, index) {
|
|
100
|
-
var obj = Object.assign({
|
|
101
|
-
|
|
100
|
+
var handStyleItem = function handStyleItem(item, index, arr) {
|
|
101
|
+
var obj = Object.assign({
|
|
102
|
+
display: 'inline-block'
|
|
103
|
+
}, item.style);
|
|
104
|
+
if (spacing && row && arr.length !== index + 1) {
|
|
102
105
|
obj.marginRight = spacing;
|
|
103
106
|
}
|
|
107
|
+
if (itemWidth) {
|
|
108
|
+
obj.width = itemWidth;
|
|
109
|
+
}
|
|
104
110
|
return obj;
|
|
105
111
|
};
|
|
106
112
|
// 处理class
|
|
@@ -121,14 +127,38 @@ var CheckboxGroup = function CheckboxGroup(props) {
|
|
|
121
127
|
className: "checkbox-group-content"
|
|
122
128
|
}, {
|
|
123
129
|
children: list.map(function (item, index) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
if (Array.isArray(item)) {
|
|
131
|
+
return jsx("div", Object.assign({
|
|
132
|
+
className: "checkbox-group-content-item"
|
|
133
|
+
}, {
|
|
134
|
+
children: item.map(function (itemChild, inx) {
|
|
135
|
+
return jsx("span", Object.assign({
|
|
136
|
+
style: handStyleItem(itemChild, inx, item)
|
|
137
|
+
}, {
|
|
138
|
+
children: /*#__PURE__*/createElement(Checkbox, Object.assign({}, itemChild, {
|
|
139
|
+
style: {},
|
|
140
|
+
checked: valueCom.indexOf(itemChild[id]) !== -1,
|
|
141
|
+
size: size,
|
|
142
|
+
disabled: Boolean(disabled || itemChild.disabled),
|
|
143
|
+
key: index,
|
|
144
|
+
onChange: onchangeCom(itemChild)
|
|
145
|
+
}))
|
|
146
|
+
}), inx);
|
|
147
|
+
})
|
|
148
|
+
}), index);
|
|
149
|
+
}
|
|
150
|
+
return jsx("span", Object.assign({
|
|
151
|
+
style: handStyleItem(item, index, list)
|
|
152
|
+
}, {
|
|
153
|
+
children: /*#__PURE__*/createElement(Checkbox, Object.assign({}, item, {
|
|
154
|
+
style: {},
|
|
155
|
+
checked: valueCom.indexOf(item[id]) !== -1,
|
|
156
|
+
size: size,
|
|
157
|
+
disabled: Boolean(disabled || item.disabled),
|
|
158
|
+
key: index,
|
|
159
|
+
onChange: onchangeCom(item)
|
|
160
|
+
}))
|
|
161
|
+
}), index);
|
|
132
162
|
})
|
|
133
163
|
})), jsx(HelperText, {
|
|
134
164
|
className: "checkbox-group-error-text",
|
package/Collapse/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import RcCollapse from 'rc-collapse';
|
|
3
|
-
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-
|
|
3
|
+
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import Right from '@para-ui/icons/Right';
|
|
6
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
@@ -85,7 +85,7 @@ var collapseMotion = {
|
|
|
85
85
|
motionDeadline: 500
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author
|
|
88
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-collapse {\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 background-color: white;\n border-bottom: 1px solid rgb(234, 236, 241);\n}\n.paraui-v4-collapse .collapse-motion-collapse {\n overflow: hidden;\n transition: height 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;\n}\n.paraui-v4-collapse > .component-collapse-item {\n border-top: 1px solid rgb(234, 236, 241);\n}\n.paraui-v4-collapse > .component-collapse-item > .component-collapse-header {\n display: flex;\n align-items: center;\n padding: 10px 20px;\n color: rgb(29, 33, 38);\n cursor: pointer;\n font-weight: 700;\n}\n.paraui-v4-collapse > .component-collapse-item > .component-collapse-header > .collapse-svg-box {\n line-height: 0;\n margin-right: 8px;\n}\n.paraui-v4-collapse > .component-collapse-item > .component-collapse-header > .collapse-svg-box svg {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-collapse > .component-collapse-item > .component-collapse-header > .collapse-svg-box .collapse-expand-svg {\n transition: all 0.3s, visibility 0s;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-collapse > .component-collapse-item > .component-collapse-header > .component-collapse-extra {\n line-height: 0;\n margin-left: auto;\n}\n.paraui-v4-collapse > .component-collapse-item > .component-collapse-header > .component-collapse-extra svg {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-collapse > .component-collapse-item > .component-collapse-content.collapse-content-hidden {\n display: none;\n}\n.paraui-v4-collapse > .component-collapse-item > .component-collapse-content > .component-collapse-content-box {\n padding: 0 20px 10px;\n color: rgb(29, 33, 38);\n font-size: 14px;\n}\n.paraui-v4-collapse > .component-collapse-item.component-collapse-item-active > .component-collapse-header > .collapse-svg-box .collapse-expand-svg {\n transform: rotate(90deg);\n}\n.paraui-v4-collapse.paraui-v4-collapse-svg-right > .component-collapse-item > .component-collapse-header {\n padding-right: 40px;\n position: relative;\n}\n.paraui-v4-collapse.paraui-v4-collapse-svg-right > .component-collapse-item > .component-collapse-header > .collapse-svg-box {\n position: absolute;\n right: 20px;\n display: flex;\n align-items: center;\n margin-right: 0;\n}\n.paraui-v4-collapse > .component-collapse-item-disabled > .component-collapse-header {\n color: rgb(29, 33, 38);\n cursor: not-allowed;\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-collapse > .component-collapse-item-disabled > .component-collapse-header > .collapse-svg-box svg {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-collapse > .component-collapse-item-disabled > .component-collapse-header > .collapse-svg-box .collapse-expand-svg {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-collapse > .component-collapse-item-disabled > .component-collapse-header > .component-collapse-extra svg {\n color: rgb(29, 33, 38);\n}";
|
|
89
89
|
styleInject(css_248z);
|
|
90
90
|
|
|
91
91
|
var Collapse = function Collapse(props) {
|
package/Collapse/motion.d.ts
CHANGED
package/CollapseBox/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState, useEffect } from 'react';
|
|
4
4
|
import { Transition } from 'react-transition-group';
|
|
5
5
|
import { g as getTransitionProps, a as getAutoHeightDuration } from '../_verture/util-7e1fb1e2.js';
|
|
6
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
6
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
7
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
8
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
9
9
|
|
|
10
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author
|
|
10
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-collapse-box {\n transition: height 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n width: 100%;\n overflow: hidden;\n height: 0;\n}\n.paraui-v4-collapse-box > .collapse-box-wrapper {\n display: flex;\n width: 100%;\n}\n.paraui-v4-collapse-box > .collapse-box-wrapper > .collapse-box-wrapper-inner {\n width: 100%;\n}\n.paraui-v4-collapse-box.paraui-v4-collapse-box-entered {\n overflow: visible;\n}\n.paraui-v4-collapse-box.paraui-v4-collapse-box-hidden {\n visibility: hidden;\n}";
|
|
11
11
|
styleInject(css_248z);
|
|
12
12
|
|
|
13
13
|
var CollapseBox = function CollapseBox(props) {
|