@para-ui/core 2.2.1-beta → 2.2.2
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 +34 -0
- package/AutoBox/index.js +15 -0
- package/AutoTips/index.d.ts +27 -0
- package/AutoTips/index.js +15 -0
- package/Breadcrumbs/index.d.ts +39 -0
- package/Breadcrumbs/index.js +15 -0
- package/Button/SplitButton.d.ts +61 -0
- package/Button/index.d.ts +56 -0
- package/Button/index.js +14 -0
- package/Button/lang/en_US.d.ts +4 -0
- package/Button/lang/index.d.ts +9 -0
- package/Button/lang/zh_CN.d.ts +4 -0
- package/ButtonGroup/index.d.ts +33 -0
- package/ButtonGroup/index.js +14 -0
- package/Carousel/index.d.ts +30 -0
- package/Carousel/index.js +15 -0
- package/Cascader/index.d.ts +52 -0
- package/Cascader/index.js +15 -0
- package/Cascader/lang/en_US.d.ts +4 -0
- package/Cascader/lang/index.d.ts +9 -0
- package/Cascader/lang/zh_CN.d.ts +4 -0
- package/Checkbox/index.d.ts +40 -0
- package/Checkbox/index.js +14 -0
- package/CheckboxGroup/index.d.ts +46 -0
- package/CheckboxGroup/index.js +14 -0
- package/Collapse/collapsePanel.d.ts +30 -0
- package/Collapse/index.d.ts +57 -0
- package/Collapse/index.js +15 -0
- package/Collapse/motion.d.ts +5 -0
- package/Collapse/util.d.ts +11 -0
- package/CollapseBox/index.d.ts +27 -0
- package/CollapseBox/index.js +15 -0
- package/CollapseBox/util.d.ts +5 -0
- package/ColorPicker/index.d.ts +4 -0
- package/ColorPicker/index.js +1 -0
- package/ComboSelect/WithTabsCombo/index.d.ts +11 -0
- package/ComboSelect/WithTabsCombo/interface.d.ts +141 -0
- package/ComboSelect/index.d.ts +11 -0
- package/ComboSelect/index.js +14 -0
- package/ComboSelect/interface.d.ts +141 -0
- package/ComboSelect/lang/en_US.d.ts +8 -0
- package/ComboSelect/lang/index.d.ts +17 -0
- package/ComboSelect/lang/zh_CN.d.ts +8 -0
- package/ComboSelect/utils.d.ts +13 -0
- package/Container/index.d.ts +77 -0
- package/Container/index.js +15 -0
- package/DatePicker/PickerButton.d.ts +3 -0
- package/DatePicker/PickerTag.d.ts +3 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -0
- package/DatePicker/generatePicker/index.d.ts +77 -0
- package/DatePicker/index.d.ts +18 -0
- package/DatePicker/index.js +14 -0
- package/DatePicker/lang/en_US.d.ts +3 -0
- package/DatePicker/lang/index.d.ts +7 -0
- package/DatePicker/lang/zh_CN.d.ts +3 -0
- package/DatePicker/util.d.ts +20 -0
- package/Desktop/index.d.ts +55 -0
- package/Desktop/index.js +14 -0
- package/Drawer/index.d.ts +11 -0
- package/Drawer/index.js +14 -0
- package/Drawer/interface.d.ts +83 -0
- package/Drawer/lang/en_US.d.ts +5 -0
- package/Drawer/lang/index.d.ts +11 -0
- package/Drawer/lang/zh_CN.d.ts +5 -0
- package/Empty/images/index.d.ts +2 -0
- package/Empty/index.d.ts +30 -0
- package/Empty/index.js +14 -0
- package/Empty/lang/en_US.d.ts +6 -0
- package/Empty/lang/index.d.ts +13 -0
- package/Empty/lang/zh_CN.d.ts +6 -0
- package/Form/index.d.ts +181 -0
- package/Form/index.js +14 -0
- package/FormItem/compoments/defaultCompoments/index.d.ts +19 -0
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -0
- package/FormItem/compoments/formFile/index.d.ts +38 -0
- package/FormItem/compoments/formRadioGroup/index.d.ts +8 -0
- package/FormItem/compoments/formSelect/index.d.ts +18 -0
- package/FormItem/errorTips.d.ts +12 -0
- package/FormItem/index.d.ts +152 -0
- package/FormItem/index.js +14 -0
- package/FormItem/itemType.d.ts +42 -0
- package/FormItem/validateFunction.d.ts +15 -0
- package/FunctionModal/dialog.d.ts +58 -0
- package/FunctionModal/index.d.ts +8 -0
- package/FunctionModal/index.js +14 -0
- package/FunctionModal/modalContext.d.ts +14 -0
- package/GlobalContext/componentsProps.d.ts +19 -0
- package/GlobalContext/confirmLocale.d.ts +7 -0
- package/GlobalContext/index.d.ts +28 -0
- package/GlobalContext/index.js +16 -0
- package/GlobalContext/intl.d.ts +34 -0
- package/GlobalContext/useFormatMessage.d.ts +3 -0
- package/Help/index.d.ts +20 -0
- package/Help/index.js +15 -0
- package/HelperText/index.d.ts +19 -0
- package/HelperText/index.js +15 -0
- package/Hooks/useGlobalProps.d.ts +1 -0
- package/InputLang/index.d.ts +49 -0
- package/InputLang/index.js +14 -0
- package/InputNumber/index.d.ts +74 -0
- package/InputNumber/index.js +14 -0
- package/Label/index.d.ts +35 -0
- package/Label/index.js +14 -0
- package/Loading/index.d.ts +17 -0
- package/Loading/index.js +15 -0
- package/Menu/footerExpansion.d.ts +9 -0
- package/Menu/index.d.ts +10 -0
- package/Menu/index.js +14 -0
- package/Menu/interface.d.ts +139 -0
- package/Menu/logo.d.ts +9 -0
- package/Menu/verticalMenuList.d.ts +14 -0
- package/Message/index.d.ts +59 -0
- package/Message/index.js +15 -0
- package/Modal/Confirm/index.d.ts +66 -0
- package/Modal/index.d.ts +61 -0
- package/Modal/index.js +14 -0
- package/Modal/lang/en_US.d.ts +5 -0
- package/Modal/lang/index.d.ts +11 -0
- package/Modal/lang/zh_CN.d.ts +5 -0
- package/MultiBox/index.d.ts +54 -0
- package/MultiBox/index.js +14 -0
- package/Notification/index.d.ts +52 -0
- package/Notification/index.js +15 -0
- package/OperateBtn/index.d.ts +59 -0
- package/OperateBtn/index.js +14 -0
- package/OperateBtn/lang/en_US.d.ts +4 -0
- package/OperateBtn/lang/index.d.ts +9 -0
- package/OperateBtn/lang/zh_CN.d.ts +4 -0
- package/PageHeader/horizontalMeun.d.ts +9 -0
- package/PageHeader/horizontalMeunRight.d.ts +9 -0
- package/PageHeader/index.d.ts +10 -0
- package/PageHeader/index.js +14 -0
- package/PageHeader/interface.d.ts +167 -0
- package/Pagination/index.d.ts +33 -0
- package/Pagination/index.js +14 -0
- package/Pagination/lang/en_US.d.ts +8 -0
- package/Pagination/lang/index.d.ts +17 -0
- package/Pagination/lang/zh_CN.d.ts +8 -0
- package/ParauiProvider/index.d.ts +12 -0
- package/ParauiProvider/index.js +15 -0
- package/PopConfirm/index.d.ts +56 -0
- package/PopConfirm/index.js +14 -0
- package/PopConfirm/lang/en_US.d.ts +5 -0
- package/PopConfirm/lang/index.d.ts +11 -0
- package/PopConfirm/lang/zh_CN.d.ts +5 -0
- package/Popover/index.d.ts +14 -0
- package/Popover/index.js +15 -0
- package/Popper/index.d.ts +13 -0
- package/Popper/index.js +16 -0
- package/Progress/Line.d.ts +47 -0
- package/Progress/Steps.d.ts +17 -0
- package/Progress/index.d.ts +81 -0
- package/Progress/index.js +20 -0
- package/Progress/utils.d.ts +6 -0
- package/Querying/images/index.d.ts +2 -0
- package/Querying/index.d.ts +26 -0
- package/Querying/index.js +14 -0
- package/Querying/lang/en_US.d.ts +4 -0
- package/Querying/lang/index.d.ts +9 -0
- package/Querying/lang/zh_CN.d.ts +4 -0
- package/README.md +481 -0
- package/Radio/index.d.ts +38 -0
- package/Radio/index.js +14 -0
- package/RadioGroup/index.d.ts +47 -0
- package/RadioGroup/index.js +14 -0
- package/Search/index.d.ts +56 -0
- package/Search/index.js +14 -0
- package/Select/index.d.ts +86 -0
- package/Select/index.js +14 -0
- package/Select/lang/en_US.d.ts +5 -0
- package/Select/lang/index.d.ts +11 -0
- package/Select/lang/zh_CN.d.ts +5 -0
- package/SelectInput/index.d.ts +11 -0
- package/SelectInput/index.js +14 -0
- package/SingleBox/index.d.ts +42 -0
- package/SingleBox/index.js +14 -0
- package/Slider/index.d.ts +14 -0
- package/Slider/index.js +15 -0
- package/Slider/interface.d.ts +102 -0
- package/Split/index.d.ts +7 -0
- package/Split/index.js +15 -0
- package/Stepper/icons.d.ts +5 -0
- package/Stepper/index.d.ts +39 -0
- package/Stepper/index.js +15 -0
- package/Switch/index.d.ts +78 -0
- package/Switch/index.js +14 -0
- package/Table/index.d.ts +10 -0
- package/Table/index.js +14 -0
- package/Table/interface.d.ts +202 -0
- package/Table/lang/en_US.d.ts +6 -0
- package/Table/lang/index.d.ts +13 -0
- package/Table/lang/zh_CN.d.ts +6 -0
- package/Table/tableBody.d.ts +9 -0
- package/Table/tableBodyElement/index.d.ts +15 -0
- package/Table/tableBodyInterface.d.ts +67 -0
- package/Table/tableContainer/index.d.ts +16 -0
- package/Table/tableElement/index.d.ts +17 -0
- package/Table/tableHead.d.ts +9 -0
- package/Table/tableHeadElement/index.d.ts +15 -0
- package/Table/tableHeadInterface.d.ts +30 -0
- package/Table/tablePagination.d.ts +9 -0
- package/Table/tablePaginationInterFace.d.ts +24 -0
- package/Table/tdElement/index.d.ts +15 -0
- package/Table/thElement/index.d.ts +15 -0
- package/Table/trElement/index.d.ts +15 -0
- package/Table/util.d.ts +16 -0
- package/Tabs/index.d.ts +48 -0
- package/Tabs/index.js +14 -0
- package/Tag/TagGroup.d.ts +66 -0
- package/Tag/index.d.ts +34 -0
- package/Tag/index.js +14 -0
- package/Test/index.d.ts +2 -0
- package/Test/index.js +16 -0
- package/TextField/index.d.ts +93 -0
- package/TextField/index.js +14 -0
- package/TimePicker/index.d.ts +22 -0
- package/TimePicker/index.js +14 -0
- package/TimePicker/locale/en_US.d.ts +3 -0
- package/TimePicker/locale/zh_CN.d.ts +3 -0
- package/TimePicker/style/index.d.ts +1 -0
- package/Timeline/index.d.ts +22 -0
- package/Timeline/index.js +15 -0
- package/ToggleButton/ToggleButtonGroup.d.ts +49 -0
- package/ToggleButton/index.d.ts +49 -0
- package/ToggleButton/index.js +14 -0
- package/Tooltip/index.d.ts +14 -0
- package/Tooltip/index.js +15 -0
- package/Transfer/index.d.ts +17 -0
- package/Transfer/index.js +14 -0
- package/Transfer/lang/en_US.d.ts +6 -0
- package/Transfer/lang/index.d.ts +13 -0
- package/Transfer/lang/zh_CN.d.ts +6 -0
- package/Tree/OperateBar/index.d.ts +13 -0
- package/Tree/Tree.d.ts +4 -0
- package/Tree/index.d.ts +5 -0
- package/Tree/index.js +14 -0
- package/Tree/interface.d.ts +207 -0
- package/Tree/lang/en_US.d.ts +8 -0
- package/Tree/lang/index.d.ts +17 -0
- package/Tree/lang/zh_CN.d.ts +8 -0
- package/Tree/utils/closestPolyfill.d.ts +0 -0
- package/Tree/utils/tools.d.ts +26 -0
- package/Tree/utils/treeUtil.d.ts +15 -0
- package/Upload/Dragger/index.d.ts +10 -0
- package/Upload/ErroTip/index.d.ts +13 -0
- package/Upload/ImageUpload/index.d.ts +14 -0
- package/Upload/ImgCrop/EasyCrop.d.ts +17 -0
- package/Upload/ImgCrop/constants.d.ts +7 -0
- package/Upload/ImgCrop/index.d.ts +6 -0
- package/Upload/ImgCrop/interface.d.ts +24 -0
- package/Upload/UploadList/index.d.ts +5 -0
- package/Upload/index.d.ts +15 -0
- package/Upload/index.js +14 -0
- package/Upload/interface.d.ts +134 -0
- package/Upload/lang/en_US.d.ts +12 -0
- package/Upload/lang/index.d.ts +25 -0
- package/Upload/lang/zh_CN.d.ts +12 -0
- package/cdn/AutoBox/index.js +29 -0
- package/cdn/AutoTips/index.js +40 -0
- package/cdn/Breadcrumbs/index.js +53 -0
- package/cdn/Button/index.js +79 -0
- package/cdn/ButtonGroup/index.js +79 -0
- package/cdn/Carousel/index.js +6 -0
- package/cdn/Cascader/index.js +42 -0
- package/cdn/Checkbox/index.js +53 -0
- package/cdn/CheckboxGroup/index.js +53 -0
- package/cdn/Collapse/index.js +27 -0
- package/cdn/CollapseBox/index.js +1 -0
- package/cdn/ColorPicker/index.js +1 -0
- package/cdn/ComboSelect/index.js +438 -0
- package/cdn/Container/index.js +1 -0
- package/cdn/DatePicker/index.js +185 -0
- package/cdn/Desktop/index.js +24 -0
- package/cdn/Drawer/index.js +84 -0
- package/cdn/Empty/index.js +1 -0
- package/cdn/Form/index.js +477 -0
- package/cdn/FormItem/index.js +477 -0
- package/cdn/FunctionModal/index.js +144 -0
- package/cdn/GlobalContext/index.js +1 -0
- package/cdn/Help/index.js +53 -0
- package/cdn/HelperText/index.js +1 -0
- package/cdn/InputLang/index.js +144 -0
- package/cdn/InputNumber/index.js +118 -0
- package/cdn/Label/index.js +53 -0
- package/cdn/Loading/index.js +14 -0
- package/cdn/Menu/index.js +40 -0
- package/cdn/Message/index.js +53 -0
- package/cdn/Modal/index.js +144 -0
- package/cdn/MultiBox/index.js +131 -0
- package/cdn/Notification/index.js +66 -0
- package/cdn/OperateBtn/index.js +92 -0
- package/cdn/PageHeader/index.js +92 -0
- package/cdn/Pagination/index.js +214 -0
- package/cdn/ParauiProvider/index.js +9 -0
- package/cdn/PopConfirm/index.js +131 -0
- package/cdn/Popover/index.js +16 -0
- package/cdn/Popper/index.js +26 -0
- package/cdn/Progress/index.js +58 -0
- package/cdn/Querying/index.js +1 -0
- package/cdn/Radio/index.js +53 -0
- package/cdn/RadioGroup/index.js +53 -0
- package/cdn/Search/index.js +144 -0
- package/cdn/Select/index.js +131 -0
- package/cdn/SelectInput/index.js +131 -0
- package/cdn/SingleBox/index.js +131 -0
- package/cdn/Slider/index.js +16 -0
- package/cdn/Split/index.js +1 -0
- package/cdn/Stepper/index.js +154 -0
- package/cdn/Switch/index.js +71 -0
- package/cdn/Table/index.js +292 -0
- package/cdn/Tabs/index.js +165 -0
- package/cdn/Tag/index.js +27 -0
- package/cdn/Test/index.js +1 -0
- package/cdn/TextField/index.js +105 -0
- package/cdn/TimePicker/index.js +185 -0
- package/cdn/Timeline/index.js +16 -0
- package/cdn/ToggleButton/index.js +79 -0
- package/cdn/Tooltip/index.js +40 -0
- package/cdn/Transfer/index.js +170 -0
- package/cdn/Tree/index.js +170 -0
- package/cdn/Upload/index.js +252 -0
- package/index.d.ts +128 -0
- package/index.js +19 -0
- package/package.json +21 -21
- package/style.css +72 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Hanz
|
|
3
|
+
* @date 2021/8/4 上午11:26
|
|
4
|
+
* @description 步骤条
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
import { StepperProps as MuiStepperProps } from "@material-ui/core";
|
|
8
|
+
import './index.scss';
|
|
9
|
+
declare type StepItem = string | {
|
|
10
|
+
label: string;
|
|
11
|
+
icon: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export interface StepperProps extends Omit<MuiStepperProps, 'children' | 'connector' | 'nonLinear'> {
|
|
14
|
+
/**
|
|
15
|
+
* 模式
|
|
16
|
+
* 数字或图标
|
|
17
|
+
*/
|
|
18
|
+
mode?: 'number' | 'icon';
|
|
19
|
+
/**
|
|
20
|
+
* 当前步骤
|
|
21
|
+
*/
|
|
22
|
+
activeStep?: number;
|
|
23
|
+
/**
|
|
24
|
+
* 步骤条水平或垂直
|
|
25
|
+
*/
|
|
26
|
+
orientation?: 'horizontal' | 'vertical';
|
|
27
|
+
/**
|
|
28
|
+
* 标签位置 下方或右侧
|
|
29
|
+
*/
|
|
30
|
+
alternativeLabel?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* 步骤条数据
|
|
33
|
+
* number : Array<string>
|
|
34
|
+
* icon : Array<{ label: string, icon: ReactNode }>
|
|
35
|
+
*/
|
|
36
|
+
steps?: Array<StepItem>;
|
|
37
|
+
}
|
|
38
|
+
export declare const Stepper: FunctionComponent<StepperProps>;
|
|
39
|
+
export default Stepper;
|
package/Stepper/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@material-ui/core"),require("clsx"),require("@para-ui/icons/One"),require("@para-ui/icons/Two"),require("@para-ui/icons/Three"),require("@para-ui/icons/Four"),require("@para-ui/icons/Five"),require("@para-ui/icons/Six"),require("@para-ui/icons/Seven"),require("@para-ui/icons/Eight"),require("@para-ui/icons/Nine"),require("@para-ui/icons/Check")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","clsx","@para-ui/icons/One","@para-ui/icons/Two","@para-ui/icons/Three","@para-ui/icons/Four","@para-ui/icons/Five","@para-ui/icons/Six","@para-ui/icons/Seven","@para-ui/icons/Eight","@para-ui/icons/Nine","@para-ui/icons/Check"],r):"object"==typeof exports?exports.ParaUI=r(require("react"),require("@material-ui/core"),require("clsx"),require("@para-ui/icons/One"),require("@para-ui/icons/Two"),require("@para-ui/icons/Three"),require("@para-ui/icons/Four"),require("@para-ui/icons/Five"),require("@para-ui/icons/Six"),require("@para-ui/icons/Seven"),require("@para-ui/icons/Eight"),require("@para-ui/icons/Nine"),require("@para-ui/icons/Check")):e.ParaUI=r(e.react,e["@material-ui/core"],e.clsx,e["@para-ui/icons/One"],e["@para-ui/icons/Two"],e["@para-ui/icons/Three"],e["@para-ui/icons/Four"],e["@para-ui/icons/Five"],e["@para-ui/icons/Six"],e["@para-ui/icons/Seven"],e["@para-ui/icons/Eight"],e["@para-ui/icons/Nine"],e["@para-ui/icons/Check"])}(self,(function(e,r,t,n,i,o,a,c,s,p,u,l,f){return function(){var d={8310:function(e,r,t){(r=t(3645)(!1)).push([e.id,".paraui-stepper-step+div .paraui-stepper-connector>span{border:0;height:1px;background:linear-gradient(90deg, rgb(61, 102, 248), rgb(119, 147, 249) 74%, rgb(216, 223, 250))}.paraui-stepper .paraui-stepper-step-label{margin-top:8px;color:rgba(46,55,67,.7);font-size:14px;font-weight:400}.paraui-stepper .paraui-stepper-step-label--active{color:#3666d6}.paraui-stepper .paraui-stepper-step-label--completed{color:#2e3743}.paraui-stepper-step-icon{display:inline-flex;width:30px;height:30px;align-items:center;justify-content:center;background-color:rgba(171,176,185,.12);border-radius:50%}.paraui-stepper-step-icon>svg{color:rgba(46,55,67,.7)}.paraui-stepper-step-icon--active{background-color:#3666d6}.paraui-stepper-step-icon--active>svg{color:#fff}.paraui-stepper-step-icon--completed{background-color:rgba(54,102,214,.8)}.paraui-stepper-step-icon--completed>svg{color:#fff}.paraui-stepper-step-icon--one>svg{margin-left:-2px}.paraui-stepper .paraui-stepper-connector{top:15px;left:calc(-50% + 27px);right:calc(50% + 27px)}.paraui-stepper .paraui-stepper-connector>span{border-top:1px dashed rgba(171,176,185,.4)}.paraui-stepper .paraui-stepper-connector--active>span,.paraui-stepper .paraui-stepper-connector--completed>span{border-top:1px solid rgba(171,176,185,.4)}",""]),e.exports=r},3645:function(e){"use strict";e.exports=function(e){var r=[];return r.toString=function(){return this.map((function(r){var t=function(e,r){var t=e[1]||"",n=e[3];if(!n)return t;if(r&&"function"==typeof btoa){var i=(a=n,c=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(s," */")),o=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(o).concat([i]).join("\n")}var a,c,s;return[t].join("\n")}(r,e);return r[2]?"@media ".concat(r[2]," {").concat(t,"}"):t})).join("")},r.i=function(e,t,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var c=0;c<e.length;c++){var s=[].concat(e[c]);n&&i[s[0]]||(t&&(s[2]?s[2]="".concat(t," and ").concat(s[2]):s[2]=t),r.push(s))}},r}},7418:function(e){"use strict";
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,c,s=i(e),p=1;p<arguments.length;p++){for(var u in a=Object(arguments[p]))t.call(a,u)&&(s[u]=a[u]);if(r){c=r(a);for(var l=0;l<c.length;l++)n.call(a,c[l])&&(s[c[l]]=a[c[l]])}}return s}},5251:function(e,r,t){"use strict";
|
|
7
|
+
/** @license React v17.0.2
|
|
8
|
+
* react-jsx-runtime.production.min.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
t(7418);var n=t(8156),i=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),o("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function p(e,r,t){var n,o={},p=null,u=null;for(n in void 0!==t&&(p=""+t),void 0!==r.key&&(p=""+r.key),void 0!==r.ref&&(u=r.ref),r)c.call(r,n)&&!s.hasOwnProperty(n)&&(o[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===o[n]&&(o[n]=r[n]);return{$$typeof:i,type:e,key:p,ref:u,props:o,_owner:a.current}}r.jsx=p},5893:function(e,r,t){"use strict";e.exports=t(5251)},4661:function(e,r,t){var n=t(3379),i=t(8310);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};n(i,o);e.exports=i.locals||{}},3379:function(e,r,t){"use strict";var n,i=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(r){if(void 0===e[r]){var t=document.querySelector(r);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[r]=t}return e[r]}}(),a=[];function c(e){for(var r=-1,t=0;t<a.length;t++)if(a[t].identifier===e){r=t;break}return r}function s(e,r){for(var t={},n=[],i=0;i<e.length;i++){var o=e[i],s=r.base?o[0]+r.base:o[0],p=t[s]||0,u="".concat(s," ").concat(p);t[s]=p+1;var l=c(u),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==l?(a[l].references++,a[l].updater(f)):a.push({identifier:u,updater:m(f,r),references:1}),n.push(u)}return n}function p(e){var r=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=t.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){r.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(r);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(r)}return r}var u,l=(u=[],function(e,r){return u[e]=r,u.filter(Boolean).join("\n")});function f(e,r,t,n){var i=t?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=l(r,i);else{var o=document.createTextNode(i),a=e.childNodes;a[r]&&e.removeChild(a[r]),a.length?e.insertBefore(o,a[r]):e.appendChild(o)}}function d(e,r,t){var n=t.css,i=t.media,o=t.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var v=null,b=0;function m(e,r){var t,n,i;if(r.singleton){var o=b++;t=v||(v=p(r)),n=f.bind(null,t,o,!1),i=f.bind(null,t,o,!0)}else t=p(r),n=d.bind(null,t,r),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return n(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;n(e=r)}else i()}}e.exports=function(e,r){(r=r||{}).singleton||"boolean"==typeof r.singleton||(r.singleton=i());var t=s(e=e||[],r);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<t.length;n++){var i=c(t[n]);a[i].references--}for(var o=s(e,r),p=0;p<t.length;p++){var u=c(t[p]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}t=o}}}},670:function(e){"use strict";e.exports=r},2004:function(e){"use strict";e.exports=f},2684:function(e){"use strict";e.exports=u},7600:function(e){"use strict";e.exports=c},4629:function(e){"use strict";e.exports=a},7290:function(e){"use strict";e.exports=l},3308:function(e){"use strict";e.exports=n},2333:function(e){"use strict";e.exports=p},4340:function(e){"use strict";e.exports=s},5469:function(e){"use strict";e.exports=o},1378:function(e){"use strict";e.exports=i},5744:function(e){"use strict";e.exports=t},8156:function(r){"use strict";r.exports=e}},v={};function b(e){var r=v[e];if(void 0!==r)return r.exports;var t=v[e]={id:e,exports:{}};return d[e](t,t.exports,b),t.exports}b.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(r,{a:r}),r},b.d=function(e,r){for(var t in r)b.o(r,t)&&!b.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},b.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},b.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.nc=void 0;var m={};return function(){"use strict";b.r(m),b.d(m,{Stepper:function(){return k},default:function(){return I}});var e=b(5893),r=b(8156),t=b.n(r),n=b(670),i=b(5744),o=b.n(i),a=b(3308),c=b.n(a),s=b(1378),p=b.n(s),u=b(5469),l=b.n(u),f=b(4629),d=b.n(f),v=b(7600),h=b.n(v),g=b(4340),y=b.n(g),x=b(2333),j=b.n(x),O=b(2684),S=b.n(O),w=b(7290),q=b.n(w),C=b(2004),_=b.n(C),N={1:(0,e.jsx)(c(),{}),2:(0,e.jsx)(p(),{}),3:(0,e.jsx)(l(),{}),4:(0,e.jsx)(d(),{}),5:(0,e.jsx)(h(),{}),6:(0,e.jsx)(y(),{}),7:(0,e.jsx)(j(),{}),8:(0,e.jsx)(S(),{}),9:(0,e.jsx)(q(),{}),done:(0,e.jsx)(_(),{})},T=(b(4661),function(){return T=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},T.apply(this,arguments)}),E=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]])}return t};function P(r){var t=r.active,n=r.completed,i=r.mode,a=r.icon,c=r.iconComp,s=r.index;return(0,e.jsx)("div",T({className:o()("paraui-stepper-step-icon",{"paraui-stepper-step-icon--active":t,"paraui-stepper-step-icon--completed":n,"paraui-stepper-step-icon--one":"number"===i&&0===s&&t})},{children:n?N.done:"number"===i?N[String(a)]:"icon"===i?c||N.done:void 0}))}var k=function(r){var i=r.activeStep,a=void 0===i?0:i,c=r.mode,s=void 0===c?"number":c,p=r.steps,u=void 0===p?[]:p,l=r.alternativeLabel,f=void 0===l||l,d=r.orientation,v=void 0===d?"horizontal":d,b=r.className,m=E(r,["activeStep","mode","steps","alternativeLabel","orientation","className"]),h=function(r,n){return t().forwardRef((function(t,i){return(0,e.jsx)(P,T({mode:s,iconComp:r.icon,index:n},t,{ref:i}))}))};return(0,e.jsx)(n.Stepper,T({className:o()("paraui-stepper",b),activeStep:a,alternativeLabel:f,orientation:v},m,{connector:(0,e.jsx)(n.StepConnector,{classes:{root:"paraui-stepper-connector",active:"paraui-stepper-connector--active",completed:"paraui-stepper-connector--completed"}})},{children:(null==u?void 0:u.length)?u.map((function(r,t){var i="",c={};return"number"===s?(i=r,c.label=i):"object"==typeof r&&(i=r.label||"",c=T({},r)),(0,e.jsx)(n.Step,T({className:o()(a===t&&"paraui-stepper-step")},{children:(0,e.jsx)(n.StepLabel,T({StepIconComponent:h(c,t),classes:{label:"paraui-stepper-step-label",active:"paraui-stepper-step-label--active",completed:"paraui-stepper-step-label--completed"}},{children:i}))}),t)})):null}))},I=k}(),m}()}));
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Hanz
|
|
3
|
+
* @date 2021/8/5
|
|
4
|
+
* @description switch 开关
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
import { LabelTooltipProps } from '../Label';
|
|
8
|
+
import "./index.scss";
|
|
9
|
+
declare type SwitchChangeEventHandler = (checked: boolean, event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
10
|
+
declare type SwitchClickEventHandler = SwitchChangeEventHandler;
|
|
11
|
+
export interface SwitchProps {
|
|
12
|
+
/**
|
|
13
|
+
* 开关大小
|
|
14
|
+
*/
|
|
15
|
+
size?: 'small' | 'default';
|
|
16
|
+
/**
|
|
17
|
+
* 类名
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* style
|
|
22
|
+
*/
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
/**
|
|
25
|
+
* 是否选中
|
|
26
|
+
*/
|
|
27
|
+
checked?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 默认是否选中
|
|
30
|
+
*/
|
|
31
|
+
defaultChecked?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 变化时回调函数
|
|
34
|
+
*/
|
|
35
|
+
onChange?: SwitchChangeEventHandler;
|
|
36
|
+
/**
|
|
37
|
+
* 点击时回调函数
|
|
38
|
+
*/
|
|
39
|
+
onClick?: SwitchClickEventHandler;
|
|
40
|
+
/**
|
|
41
|
+
* 选中的是内容
|
|
42
|
+
*/
|
|
43
|
+
checkedChildren?: React.ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* 非选中时内容
|
|
46
|
+
*/
|
|
47
|
+
unCheckedChildren?: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* 是否禁用
|
|
50
|
+
*/
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* 是否显示loading
|
|
54
|
+
*/
|
|
55
|
+
loading?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* 自动获得焦点
|
|
58
|
+
*/
|
|
59
|
+
autoFocus?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* 紧凑型开关
|
|
62
|
+
*/
|
|
63
|
+
compact?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 标题
|
|
66
|
+
*/
|
|
67
|
+
label?: ReactNode;
|
|
68
|
+
/**
|
|
69
|
+
* 帮助提示
|
|
70
|
+
*/
|
|
71
|
+
labelTooltip?: LabelTooltipProps;
|
|
72
|
+
/**
|
|
73
|
+
* 标题位置
|
|
74
|
+
*/
|
|
75
|
+
labelPlacement?: 'top' | 'bottom' | 'start' | 'end';
|
|
76
|
+
}
|
|
77
|
+
export declare const Switch: FunctionComponent<SwitchProps>;
|
|
78
|
+
export default Switch;
|
package/Switch/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("rc-switch"),require("clsx"),require("@para-ui/icons/LoadingF"),require("@material-ui/core"),require("@para-ui/icons/Help")):"function"==typeof define&&define.amd?define(["react","rc-switch","clsx","@para-ui/icons/LoadingF","@material-ui/core","@para-ui/icons/Help"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("rc-switch"),require("clsx"),require("@para-ui/icons/LoadingF"),require("@material-ui/core"),require("@para-ui/icons/Help")):e.ParaUI=t(e.react,e["rc-switch"],e.clsx,e["@para-ui/icons/LoadingF"],e["@material-ui/core"],e["@para-ui/icons/Help"])}(self,(function(e,t,r,i,a,n){return function(){var o={7381:function(e,t,r){(t=r(3645)(!1)).push([e.id,".paraui-help{display:inline-block;font-size:16px;color:rgba(46,55,67,.7)}.paraui-help:hover{color:#3666d6}.paraui-help .paraui-icon{font-size:inherit;color:inherit}",""]),e.exports=t},4928:function(e,t,r){(t=r(3645)(!1)).push([e.id,".paraui-label{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;color:rgba(46,55,67,.7);margin-bottom:8px;display:inline-block;line-height:1.43;word-break:break-all}.paraui-label>.paraui-label-required{margin-left:2px;color:#eb6054}.paraui-label>.paraui-help{vertical-align:top;margin-left:4px}.paraui-label>.paraui-help svg{color:rgba(46,55,67,.4);vertical-align:top;position:relative;top:2px}.paraui-label.paraui-label-line.paraui-label-tooltip{border-bottom:1px dashed rgba(46,55,67,.4);padding-bottom:2px}",""]),e.exports=t},6378:function(e,t,r){(t=r(3645)(!1)).push([e.id,'.paraui-switch{position:relative;display:inline-block;min-width:32px;height:18px;vertical-align:middle;background-color:rgba(0,0,0,0);border:0;border-radius:100px;cursor:pointer;transition:all .2s;user-select:none}.paraui-switch:before{position:absolute;top:2px;left:0;width:100%;height:14px;border-radius:100px;background-color:rgba(171,176,185,.4);content:"";transition:all .2s}.paraui-switch:focus{outline:0;box-shadow:none}.paraui-switch-checked:focus{box-shadow:none}.paraui-switch:focus:hover{box-shadow:none}.paraui-switch-checked:before{background-color:rgba(54,102,214,.2)}.paraui-switch-loading,.paraui-switch-disabled{cursor:not-allowed;opacity:.4}.paraui-switch-loading *,.paraui-switch-disabled *{box-shadow:none;cursor:not-allowed}.paraui-switch-inner{display:block;margin:0 7px 0 25px;color:#fff;font-size:14px;transition:margin .2s}.paraui-switch-checked .paraui-switch-inner{margin:0 25px 0 7px}.paraui-switch-handle{position:absolute;top:0;left:0;width:18px;height:18px;transition:all .2s ease-in-out}.paraui-switch-handle::before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#8996aa;border-radius:9px;box-shadow:none;transition:all .2s ease-in-out;content:""}.paraui-switch-checked .paraui-switch-handle{left:calc(100% - 18px)}.paraui-switch-checked .paraui-switch-handle::before{background-color:#3666d6}.paraui-switch:not(.paraui-switch-disabled):active .paraui-switch-handle::before{right:-30%;left:0}.paraui-switch:not(.paraui-switch-disabled):active.paraui-switch-checked .paraui-switch-handle::before{right:0;left:-30%}.paraui-switch-loading-icon{position:relative;top:1px;color:#3666d6;vertical-align:top;animation:loadingCircle 1s infinite linear}.paraui-switch-checked .paraui-switch-loading-icon{color:#fff}.paraui-switch-small{min-width:28px;height:14px;line-height:14px}.paraui-switch-small .paraui-switch-inner{margin:0 5px 0 18px;font-size:14px}.paraui-switch-small .paraui-switch-handle{width:12px;height:12px}.paraui-switch-small .paraui-switch-loading-icon{top:1.5px;font-size:9px}.paraui-switch-small.paraui-switch-checked .paraui-switch-inner{margin:0 18px 0 5px}.paraui-switch-small.paraui-switch-checked .paraui-switch-handle{left:calc(100% - 12px - 2px)}@keyframes loadingCircle{100%{transform:rotate(360deg)}}.paraui-switch-label{display:inline-flex}.paraui-switch-label .paraui-switch-text{color:rgba(46,55,67,.7);font-size:14px;font-weight:400}.paraui-switch-label-top{flex-direction:column-reverse;align-items:flex-start}.paraui-switch-label-top .paraui-switch-text{margin-bottom:8px}.paraui-switch-label-bottom{flex-direction:column;align-items:flex-start}.paraui-switch-label-bottom .paraui-switch-text{margin-top:8px;margin-bottom:0}.paraui-switch-label-start{flex-direction:row-reverse;align-items:center}.paraui-switch-label-start .paraui-switch-text{margin-right:8px;margin-bottom:0}.paraui-switch-label-end{flex-direction:row;align-items:center}.paraui-switch-label-end .paraui-switch-text{margin-left:8px;margin-bottom:0}',""]),e.exports=t},9929:function(e,t,r){(t=r(3645)(!1)).push([e.id,".paraui-tooltip>div{padding-left:12px;padding-right:12px;font-size:14px;font-weight:400;color:#fff;background-color:rgba(46,55,67,.7)}.paraui-tooltip-left-right>div{margin:0 8px}.paraui-tooltip-top-bottom>div{margin:8px 0}",""]),e.exports=t},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var a=(o=i,l=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),"/*# ".concat(c," */")),n=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[r].concat(n).concat([a]).join("\n")}var o,l,c;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,i){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(i)for(var n=0;n<this.length;n++){var o=this[n][0];null!=o&&(a[o]=!0)}for(var l=0;l<e.length;l++){var c=[].concat(e[l]);i&&a[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),t.push(c))}},t}},7418:function(e){"use strict";
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var o,l,c=a(e),s=1;s<arguments.length;s++){for(var p in o=Object(arguments[s]))r.call(o,p)&&(c[p]=o[p]);if(t){l=t(o);for(var u=0;u<l.length;u++)i.call(o,l[u])&&(c[l[u]]=o[l[u]])}}return c}},5251:function(e,t,r){"use strict";
|
|
7
|
+
/** @license React v17.0.2
|
|
8
|
+
* react-jsx-runtime.production.min.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/r(7418);var i=r(8156),a=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;a=n("react.element"),t.Fragment=n("react.fragment")}var o=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var i,n={},s=null,p=null;for(i in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(p=t.ref),t)l.call(t,i)&&!c.hasOwnProperty(i)&&(n[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===n[i]&&(n[i]=t[i]);return{$$typeof:a,type:e,key:s,ref:p,props:n,_owner:o.current}}t.jsx=s,t.jsxs=s},5893:function(e,t,r){"use strict";e.exports=r(5251)},2113:function(e,t,r){var i=r(3379),a=r(7381);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);var n={insert:("body","body"),singleton:!1};i(a,n);e.exports=a.locals||{}},9663:function(e,t,r){var i=r(3379),a=r(4928);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);var n={insert:("body","body"),singleton:!1};i(a,n);e.exports=a.locals||{}},7809:function(e,t,r){var i=r(3379),a=r(6378);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);var n={insert:("body","body"),singleton:!1};i(a,n);e.exports=a.locals||{}},2310:function(e,t,r){var i=r(3379),a=r(9929);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);var n={insert:("body","body"),singleton:!1};i(a,n);e.exports=a.locals||{}},3379:function(e,t,r){"use strict";var i,a=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},n=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),o=[];function l(e){for(var t=-1,r=0;r<o.length;r++)if(o[r].identifier===e){t=r;break}return t}function c(e,t){for(var r={},i=[],a=0;a<e.length;a++){var n=e[a],c=t.base?n[0]+t.base:n[0],s=r[c]||0,p="".concat(c," ").concat(s);r[c]=s+1;var u=l(p),d={css:n[1],media:n[2],sourceMap:n[3]};-1!==u?(o[u].references++,o[u].updater(d)):o.push({identifier:p,updater:m(d,t),references:1}),i.push(p)}return i}function s(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var a=r.nc;a&&(i.nonce=a)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),"function"==typeof e.insert)e.insert(t);else{var o=n(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var p,u=(p=[],function(e,t){return p[e]=t,p.filter(Boolean).join("\n")});function d(e,t,r,i){var a=r?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=u(t,a);else{var n=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(n,o[t]):e.appendChild(n)}}function f(e,t,r){var i=r.css,a=r.media,n=r.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),n&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var h=null,b=0;function m(e,t){var r,i,a;if(t.singleton){var n=b++;r=h||(h=s(t)),i=d.bind(null,r,n,!1),a=d.bind(null,r,n,!0)}else r=s(t),i=f.bind(null,r,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=a());var r=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<r.length;i++){var a=l(r[i]);o[a].references--}for(var n=c(e,t),s=0;s<r.length;s++){var p=l(r[s]);0===o[p].references&&(o[p].updater(),o.splice(p,1))}r=n}}}},3566:function(e,t,r){"use strict";var i=r(5893),a=r(7371),n=r(8076),o=r.n(n),l=r(5744),c=r.n(l),s=(r(2113),function(){return s=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},s.apply(this,arguments)}),p=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(r[i[a]]=e[i[a]])}return r};t.default=function(e){var t=e.title,r=void 0===t?"":t,n=e.children,l=e.arrow,u=void 0===l||l,d=e.interactive,f=void 0===d||d,h=e.className,b=e.placement,m=void 0===b?"top-start":b,g=p(e,["title","children","arrow","interactive","className","placement"]);return(0,i.jsx)(a.default,s({title:r,arrow:u,interactive:f,placement:m},g,{children:(0,i.jsx)("span",s({className:c()("paraui-help",h)},{children:n||(0,i.jsx)(o(),{})}))}))}},8767:function(e,t,r){"use strict";var i=r(5893),a=r(3566),n=(r(9663),function(){return n=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)});t.default=function(e){var t=e.className,r=e.style,o=e.label,l=e.labelSign,c=e.required,s=void 0!==c&&c,p=e.tooltip,u=e.tooltipType,d=void 0===u?"icon":u,f=e.placement,h=e.arrow,b=e.tooltipIcon,m=function(){var e="paraui-label";return d&&(e+=" paraui-label-"+d),p&&(e+=" paraui-label-tooltip"),t&&(e+=" "+t),e};return(0,i.jsxs)(i.Fragment,{children:["icon"===d&&(0,i.jsxs)("label",n({className:m(),style:r},{children:[(0,i.jsx)(i.Fragment,{children:o}),s&&(0,i.jsx)("span",n({className:"paraui-label-required"},{children:"*"})),l&&(0,i.jsx)("span",{children:l}),p&&(0,i.jsx)(a.default,n({title:p,placement:f,arrow:h},{children:b}))]})),"line"===d&&(0,i.jsx)(a.default,n({title:p||"",placement:f,arrow:h},{children:(0,i.jsxs)("label",n({className:m(),style:r},{children:[(0,i.jsx)(i.Fragment,{children:o}),s&&(0,i.jsx)("span",n({className:"paraui-label-required"},{children:"*"})),l&&(0,i.jsx)("span",{children:l})]}))}))]})}},7371:function(e,t,r){"use strict";var i=r(5893),a=r(670),n=r(5744),o=r.n(n),l=(r(2310),function(){return l=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},l.apply(this,arguments)}),c=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(r[i[a]]=e[i[a]])}return r};t.default=function(e){var t,r=e.placement,n=void 0===r?"top-start":r,s=e.className,p=e.arrow,u=void 0===p||p,d=e.PopperProps,f=e.boundariesElement,h=void 0===f?"scrollParent":f,b=c(e,["placement","className","arrow","PopperProps","boundariesElement"]),m=l(l({},e.classes),{popper:o()("paraui-tooltip",s,null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==n?void 0:n.includes("left"))||(null==n?void 0:n.includes("right")),"paraui-tooltip-top-bottom":(null==n?void 0:n.includes("top"))||(null==n?void 0:n.includes("bottom"))})});return(0,i.jsx)(a.Tooltip,l({},b,{enterTouchDelay:0,arrow:u,placement:n,classes:m,PopperProps:l(l({},d),{modifiers:{preventOverflow:{boundariesElement:h}}})}))}},670:function(e){"use strict";e.exports=a},8076:function(e){"use strict";e.exports=n},2788:function(e){"use strict";e.exports=i},5744:function(e){"use strict";e.exports=r},2284:function(e){"use strict";e.exports=t},8156:function(t){"use strict";t.exports=e}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={id:e,exports:{}};return o[e](r,r.exports,c),r.exports}c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nc=void 0;var s={};return function(){"use strict";c.r(s),c.d(s,{Switch:function(){return d}});var e=c(5893),t=c(2284),r=c.n(t),i=c(5744),a=c.n(i),n=c(2788),o=c.n(n),l=c(8767),p=(c(7809),function(){return p=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},p.apply(this,arguments)}),u=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(r[i[a]]=e[i[a]])}return r},d=function(t){t.compact,t.size;var i=t.loading,n=t.disabled,c=t.className,s=t.label,d=t.labelTooltip,f=t.labelPlacement,h=void 0===f?"top":f,b=u(t,["compact","size","loading","disabled","className","label","labelTooltip","labelPlacement"]),m=a()("paraui-switch",{"paraui-switch-loading":i},c),g=a()("paraui-switch-label","paraui-switch-label-".concat(h)),v=(0,e.jsx)("div",p({className:"paraui-switch-handle"},{children:i&&(0,e.jsx)(o(),{className:"paraui-switch-loading-icon"})}));return s?(0,e.jsxs)("span",p({className:g},{children:[(0,e.jsx)(r(),p({},b,{prefixCls:"paraui-switch",className:m,disabled:n||i,loadingIcon:v})),(0,e.jsx)(l.default,p({label:s},d,{className:"paraui-switch-text"}))]})):(0,e.jsx)(r(),p({},b,{prefixCls:"paraui-switch",className:m,disabled:n||i,loadingIcon:v}))};s.default=d}(),s}()}));
|
package/Table/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2022/5/5 3:13 PM
|
|
4
|
+
* @description 表格
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { TableProps } from './interface';
|
|
8
|
+
import './index.scss';
|
|
9
|
+
declare const Table: FunctionComponent<TableProps>;
|
|
10
|
+
export default Table;
|