@para-ui/core 3.0.28 → 3.0.30

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.
Files changed (140) hide show
  1. package/AutoBox/index.js +48 -88
  2. package/AutoTips/index.js +25 -32
  3. package/Breadcrumbs/index.js +43 -63
  4. package/Button/SplitButton.d.ts +1 -1
  5. package/Button/index.d.ts +1 -1
  6. package/Button/index.js +88 -118
  7. package/ButtonGroup/index.js +27 -36
  8. package/Carousel/index.d.ts +2 -2
  9. package/Carousel/index.js +27 -28
  10. package/Cascader/index.js +52 -64
  11. package/Checkbox/index.js +23 -39
  12. package/CheckboxGroup/index.js +31 -48
  13. package/Collapse/collapsePanel.d.ts +1 -1
  14. package/Collapse/index.d.ts +1 -1
  15. package/Collapse/index.js +9 -29
  16. package/Collapse/util.d.ts +2 -2
  17. package/CollapseBox/index.js +45 -56
  18. package/CollapseLayout/index.js +35 -54
  19. package/ComboSelect/index.js +222 -349
  20. package/ComboSelect/interface.d.ts +3 -3
  21. package/Container/index.js +17 -20
  22. package/DatePicker/generatePicker/index.d.ts +17 -17
  23. package/DatePicker/index.d.ts +4 -4
  24. package/DatePicker/index.js +111 -167
  25. package/Desktop/index.js +62 -173
  26. package/Drawer/index.js +65 -58
  27. package/Drawer/interface.d.ts +7 -3
  28. package/Dropdown/index.d.ts +1 -1
  29. package/Dropdown/index.js +3 -3
  30. package/Empty/index.js +17 -22
  31. package/Form/index.d.ts +1 -1
  32. package/Form/index.js +38 -80
  33. package/FormItem/index.d.ts +1 -1
  34. package/FormItem/index.js +11 -11
  35. package/FormItem/validateFunction.d.ts +1 -1
  36. package/FunctionModal/index.js +11 -11
  37. package/GlobalContext/index.js +3 -3
  38. package/GlobalContext/usePopupContainer.d.ts +1 -1
  39. package/Help/index.js +11 -11
  40. package/HelperText/index.js +11 -12
  41. package/InputLang/index.js +47 -80
  42. package/InputNumber/index.js +65 -100
  43. package/Label/index.js +15 -16
  44. package/Loading/index.js +6 -7
  45. package/Menu/index.js +148 -328
  46. package/Menu/interface.d.ts +2 -2
  47. package/Menu/verticalMenuList.d.ts +1 -1
  48. package/Message/index.d.ts +1 -1
  49. package/Message/index.js +45 -64
  50. package/Modal/Confirm/index.d.ts +2 -2
  51. package/Modal/index.d.ts +1 -1
  52. package/Modal/index.js +119 -152
  53. package/MultiBox/index.js +44 -76
  54. package/Notification/index.d.ts +2 -2
  55. package/Notification/index.js +51 -72
  56. package/OperateBtn/index.js +42 -70
  57. package/PageHeader/index.js +120 -286
  58. package/PageHeader/interface.d.ts +1 -1
  59. package/Pagination/index.d.ts +2 -2
  60. package/Pagination/index.js +79 -131
  61. package/ParauiProvider/index.js +2 -3
  62. package/PasswordRules/index.js +12 -30
  63. package/PopConfirm/index.d.ts +1 -1
  64. package/PopConfirm/index.js +52 -59
  65. package/Popover/index.js +8 -9
  66. package/Progress/index.d.ts +6 -6
  67. package/Progress/index.js +50 -89
  68. package/Querying/index.js +14 -17
  69. package/README.md +813 -800
  70. package/Radio/index.js +21 -33
  71. package/RadioGroup/index.js +32 -47
  72. package/Search/index.js +44 -66
  73. package/Select/index.js +176 -343
  74. package/SelectInput/index.js +8 -9
  75. package/Selector/index.js +285 -681
  76. package/SelectorPicker/index.js +62 -97
  77. package/SingleBox/index.js +30 -55
  78. package/Slider/index.d.ts +1 -1
  79. package/Slider/index.js +29 -41
  80. package/Slider/interface.d.ts +2 -2
  81. package/Split/index.js +10 -23
  82. package/Status/index.js +8 -7
  83. package/Stepper/index.d.ts +1 -1
  84. package/Stepper/index.js +20 -25
  85. package/Styles/form.scss +5 -5
  86. package/Styles/index.scss +37 -37
  87. package/Styles/normalize.scss +348 -348
  88. package/Styles/scrollbar.scss +223 -223
  89. package/Styles/theme.scss +74 -74
  90. package/Switch/index.d.ts +2 -2
  91. package/Switch/index.js +19 -20
  92. package/Table/index.js +568 -1019
  93. package/Table/interface.d.ts +5 -5
  94. package/Tabs/index.d.ts +3 -3
  95. package/Tabs/index.js +47 -65
  96. package/Tag/TagGroup.d.ts +1 -1
  97. package/Tag/index.d.ts +2 -2
  98. package/Tag/index.js +72 -107
  99. package/TextEditor/index.d.ts +2 -2
  100. package/TextEditor/index.js +81 -105
  101. package/TextField/index.js +141 -220
  102. package/TimePicker/index.d.ts +1 -1
  103. package/TimePicker/index.js +12 -15
  104. package/Timeline/index.js +42 -52
  105. package/Title/index.js +10 -9
  106. package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
  107. package/ToggleButton/index.js +50 -70
  108. package/Tooltip/index.js +64 -98
  109. package/Tooltip/interface.d.ts +1 -1
  110. package/Transfer/index.d.ts +1 -1
  111. package/Transfer/index.js +114 -137
  112. package/Transfer/useClick.d.ts +1 -1
  113. package/Tree/index.js +10 -10
  114. package/Tree/interface.d.ts +6 -6
  115. package/Upload/Dragger/index.d.ts +1 -1
  116. package/Upload/ImageUpload/index.d.ts +1 -1
  117. package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
  118. package/Upload/index.d.ts +1 -1
  119. package/Upload/index.js +283 -475
  120. package/Upload/interface.d.ts +2 -2
  121. package/_verture/{constant-bf34e6fa.js → constant-66aa48a1.js} +0 -1
  122. package/_verture/defineProperty-62acccfc.js +34 -0
  123. package/_verture/{index-342379c6.js → index-06fea29b.js} +79 -124
  124. package/_verture/{index-48875ffd.js → index-131f8fe5.js} +80 -181
  125. package/_verture/{index-31ce5a11.js → index-92144ad3.js} +238 -445
  126. package/_verture/{index-bbed73a3.js → index-be4faaee.js} +19 -61
  127. package/_verture/{intl-336570e4.js → intl-5cbb940c.js} +4 -12
  128. package/_verture/{modalContext-d646d9db.js → modalContext-c749e1c6.js} +18 -43
  129. package/_verture/{slicedToArray-d7722f4b.js → slicedToArray-77980792.js} +23 -25
  130. package/_verture/{toConsumableArray-f8047a75.js → toConsumableArray-87c7d895.js} +1 -1
  131. package/_verture/{useFormatMessage-f4452258.js → useFormatMessage-703f8b20.js} +1 -3
  132. package/_verture/{useGlobalProps-af9a2af6.js → useGlobalProps-1b846a65.js} +1 -2
  133. package/_verture/{usePopupContainer-b8ab7cab.js → usePopupContainer-87febeb9.js} +10 -25
  134. package/_verture/{util-a77b261e.js → util-7e1fb1e2.js} +2 -3
  135. package/index.d.ts +2 -4
  136. package/index.js +15 -16
  137. package/package.json +167 -168
  138. package/Test/index.d.ts +0 -3
  139. package/Test/index.js +0 -9
  140. package/_verture/defineProperty-0590dc61.js +0 -16
package/Switch/index.js CHANGED
@@ -1,15 +1,16 @@
1
- import { _ as _defineProperty } from '../_verture/defineProperty-0590dc61.js';
1
+ import { _ as _defineProperty } from '../_verture/defineProperty-62acccfc.js';
2
2
  import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import RcSwitch from 'rc-switch';
5
5
  import clsx from 'clsx';
6
6
  import LoadingOutlined from '@para-ui/icons/LoadingF';
7
7
  import Label from '../Label/index.js';
8
- import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-bf34e6fa.js';
8
+ import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-66aa48a1.js';
9
9
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
10
+ import '../_verture/typeof-498dd2b1.js';
10
11
  import '../Help/index.js';
11
12
  import '../Tooltip/index.js';
12
- import '../_verture/slicedToArray-d7722f4b.js';
13
+ import '../_verture/slicedToArray-77980792.js';
13
14
  import 'react';
14
15
  import 'rc-tooltip';
15
16
  import 'rc-tooltip/lib/placements';
@@ -18,23 +19,23 @@ import '@para-ui/icons/Help';
18
19
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/3 下午5:58\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-switch {\n position: relative;\n display: inline-block;\n min-width: 32px;\n height: 18px;\n vertical-align: middle;\n background-color: transparent;\n border: 0;\n border-radius: 100px;\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n}\n.paraui-v3-switch:before {\n position: absolute;\n top: 2px;\n left: 0;\n width: 100%;\n height: 14px;\n border-radius: 100px;\n background-color: rgba(171, 176, 185, 0.4);\n content: \"\";\n transition: all 0.2s;\n}\n.paraui-v3-switch:focus {\n outline: 0;\n box-shadow: none;\n}\n.paraui-v3-switch.component-switch-checked:focus {\n box-shadow: none;\n}\n.paraui-v3-switch:focus:hover {\n box-shadow: none;\n}\n.paraui-v3-switch.component-switch-checked:before {\n background-color: rgba(54, 102, 214, 0.2);\n}\n.paraui-v3-switch-loading, .paraui-v3-switch.component-switch-disabled {\n cursor: not-allowed;\n opacity: 0.4;\n}\n.paraui-v3-switch-loading *, .paraui-v3-switch.component-switch-disabled * {\n box-shadow: none;\n cursor: not-allowed;\n}\n.paraui-v3-switch .component-switch-inner {\n display: block;\n margin: 0 7px 0 25px;\n color: rgb(255, 255, 255);\n font-size: 14px;\n transition: margin 0.2s;\n}\n.paraui-v3-switch.component-switch-checked .component-switch-inner {\n margin: 0 25px 0 7px;\n}\n.paraui-v3-switch .component-switch-handle {\n position: absolute;\n top: 0;\n left: 0;\n width: 18px;\n height: 18px;\n transition: all 0.2s ease-in-out;\n}\n.paraui-v3-switch .component-switch-handle::before {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: #8996AA;\n border-radius: 9px;\n box-shadow: none;\n transition: all 0.2s ease-in-out;\n content: \"\";\n}\n.paraui-v3-switch.component-switch-checked .component-switch-handle {\n left: calc(100% - 18px);\n}\n.paraui-v3-switch.component-switch-checked .component-switch-handle::before {\n background-color: rgb(54, 102, 214);\n}\n.paraui-v3-switch:not(.paraui-v3-switch-disabled):active .component-switch-handle::before {\n right: -30%;\n left: 0;\n}\n.paraui-v3-switch:not(.paraui-v3-switch-disabled):active.component-switch-checked .component-switch-handle::before {\n right: 0;\n left: -30%;\n}\n.paraui-v3-switch .component-switch-loading-icon {\n position: relative;\n top: 1px;\n color: rgb(54, 102, 214);\n vertical-align: top;\n animation: switchLoadingCircle 1s infinite linear;\n}\n.paraui-v3-switch.component-switch-checked .component-switch-loading-icon {\n color: rgb(255, 255, 255);\n}\n.paraui-v3-switch-small {\n min-width: 28px;\n height: 14px;\n line-height: 14px;\n}\n.paraui-v3-switch-small .component-switch-inner {\n margin: 0 5px 0 18px;\n font-size: 14px;\n}\n.paraui-v3-switch-small .component-switch-handle {\n width: 12px;\n height: 12px;\n top: 3px;\n left: 2px;\n}\n.paraui-v3-switch-small .component-switch-loading-icon {\n top: 1.5px;\n font-size: 9px;\n}\n.paraui-v3-switch-small.component-switch-checked .component-switch-inner {\n margin: 0 18px 0 5px;\n}\n.paraui-v3-switch-small.component-switch-checked .component-switch-handle {\n left: calc(100% - 12px - 2px);\n}\n@keyframes switchLoadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.paraui-v3-switch-label {\n display: inline-flex;\n}\n.paraui-v3-switch-label .component-switch-text {\n color: rgba(46, 55, 67, 0.7);\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-v3-switch-label-top {\n flex-direction: column-reverse;\n align-items: flex-start;\n}\n.paraui-v3-switch-label-top .component-switch-text {\n margin-bottom: 8px;\n}\n.paraui-v3-switch-label-bottom {\n flex-direction: column;\n align-items: flex-start;\n}\n.paraui-v3-switch-label-bottom .component-switch-text {\n margin-top: 8px;\n margin-bottom: 0;\n}\n.paraui-v3-switch-label-start {\n flex-direction: row-reverse;\n align-items: center;\n}\n.paraui-v3-switch-label-start .component-switch-text {\n margin-right: 8px;\n margin-bottom: 0;\n}\n.paraui-v3-switch-label-end {\n flex-direction: row;\n align-items: center;\n}\n.paraui-v3-switch-label-end .component-switch-text {\n margin-left: 8px;\n margin-bottom: 0;\n}";
19
20
  styleInject(css_248z);
20
21
 
22
+ //Switch 开关
21
23
  var Switch = function Switch(props) {
22
24
  props.compact;
23
- props.size;
24
- var loading = props.loading,
25
- disabled = props.disabled,
26
- className = props.className,
27
- label = props.label,
28
- labelTooltip = props.labelTooltip,
29
- _props$labelPlacement = props.labelPlacement,
30
- labelPlacement = _props$labelPlacement === void 0 ? 'top' : _props$labelPlacement,
31
- restProps = __rest(props, ["compact", "size", "loading", "disabled", "className", "label", "labelTooltip", "labelPlacement"]); //cls
32
-
33
-
34
- var classes = clsx("".concat($prefixCls, "-switch"), _defineProperty({}, "".concat($prefixCls, "-switch-loading"), loading), className); //label cls
35
-
36
- var labelClasses = clsx("".concat($prefixCls, "-switch-label"), "".concat($prefixCls, "-switch-label-").concat(labelPlacement)); //loading circle
37
-
25
+ props.size;
26
+ var loading = props.loading,
27
+ disabled = props.disabled,
28
+ className = props.className,
29
+ label = props.label,
30
+ labelTooltip = props.labelTooltip,
31
+ _props$labelPlacement = props.labelPlacement,
32
+ labelPlacement = _props$labelPlacement === void 0 ? 'top' : _props$labelPlacement,
33
+ restProps = __rest(props, ["compact", "size", "loading", "disabled", "className", "label", "labelTooltip", "labelPlacement"]);
34
+ //cls
35
+ var classes = clsx("".concat($prefixCls, "-switch"), _defineProperty({}, "".concat($prefixCls, "-switch-loading"), loading), className);
36
+ //label cls
37
+ var labelClasses = clsx("".concat($prefixCls, "-switch-label"), "".concat($prefixCls, "-switch-label-").concat(labelPlacement));
38
+ //loading circle
38
39
  var loadingIcon = jsx("div", Object.assign({
39
40
  className: "".concat($rcPrefixCls, "-switch-handle")
40
41
  }, {
@@ -42,7 +43,6 @@ var Switch = function Switch(props) {
42
43
  className: "".concat($rcPrefixCls, "-switch-loading-icon")
43
44
  })
44
45
  }));
45
-
46
46
  if (label) {
47
47
  return jsxs("span", Object.assign({
48
48
  className: labelClasses
@@ -59,7 +59,6 @@ var Switch = function Switch(props) {
59
59
  }))]
60
60
  }));
61
61
  }
62
-
63
62
  return jsx(RcSwitch, Object.assign({}, restProps, {
64
63
  prefixCls: "".concat($rcPrefixCls, "-switch"),
65
64
  className: classes,