@trionesdev/antd-mobile-base-react 0.0.2-beta.2 → 0.0.2-beta.20
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/LICENSE +21 -21
- package/README.md +23 -23
- package/dist/Alert/alert.js +1 -1
- package/dist/Alert/style.scss +69 -69
- package/dist/Avatar/avatar.d.ts +4 -1
- package/dist/Avatar/avatar.js +19 -6
- package/dist/Avatar/style.scss +17 -16
- package/dist/Badge/style.scss +100 -100
- package/dist/Card/style.scss +35 -35
- package/dist/CascaderView/cascader-column-item.js +1 -1
- package/dist/CascaderView/style.scss +22 -22
- package/dist/Cell/CellGroup.js +53 -14
- package/dist/Cell/cell.js +52 -15
- package/dist/Cell/context.d.ts +19 -0
- package/dist/Cell/context.js +2 -0
- package/dist/Cell/styles.scss +81 -52
- package/dist/Cell/types.d.ts +30 -7
- package/dist/Checkbox/checkbox-button.d.ts +6 -2
- package/dist/Checkbox/checkbox-button.js +6 -18
- package/dist/Checkbox/checkbox-group.js +19 -4
- package/dist/Checkbox/checkbox-round.d.ts +8 -0
- package/dist/Checkbox/checkbox-round.js +35 -0
- package/dist/Checkbox/checkbox.js +49 -34
- package/dist/Checkbox/index.d.ts +0 -2
- package/dist/Checkbox/index.js +0 -2
- package/dist/Checkbox/index.scss +165 -151
- package/dist/Checkbox/types.d.ts +11 -1
- package/dist/ConfigProvider/config-provider.d.ts +1 -0
- package/dist/DemoBlock/index.scss +20 -20
- package/dist/DemoDescription/index.scss +3 -3
- package/dist/Descriptions/style.scss +65 -65
- package/dist/Divider/divider.d.ts +1 -1
- package/dist/Divider/divider.js +5 -3
- package/dist/Divider/style.scss +62 -62
- package/dist/Ellipsis/style.scss +13 -13
- package/dist/Empty/style.scss +29 -29
- package/dist/ErrorBlock/demo/base.js +2 -2
- package/dist/ErrorBlock/style.scss +62 -62
- package/dist/Footer/style.scss +55 -55
- package/dist/Form/ErrorList.d.ts +4 -0
- package/dist/Form/ErrorList.js +9 -0
- package/dist/Form/context.d.ts +5 -2
- package/dist/Form/context.js +2 -1
- package/dist/Form/form.d.ts +25 -12
- package/dist/Form/form.js +25 -13
- package/dist/Form/hooks/useForm.js +1 -8
- package/dist/Form/hooks/useFormContext.js +1 -2
- package/dist/Form/index.d.ts +8 -3
- package/dist/Form/index.js +7 -2
- package/dist/Form/styles.scss +11 -0
- package/dist/Form/types.d.ts +8 -0
- package/dist/FormCell/FormCell.d.ts +21 -0
- package/dist/FormCell/FormCell.js +56 -0
- package/dist/FormCell/index.d.ts +4 -0
- package/dist/FormCell/index.js +3 -0
- package/dist/FormCell/styles.scss +103 -0
- package/dist/Grid/style.scss +17 -17
- package/dist/Icon/demo/base.js +2 -2
- package/dist/IndexedStack/IndexedStack.d.ts +9 -0
- package/dist/IndexedStack/IndexedStack.js +27 -0
- package/dist/IndexedStack/index.d.ts +3 -0
- package/dist/IndexedStack/index.js +2 -0
- package/dist/InputNumber/input-number.d.ts +3 -2
- package/dist/InputNumber/input-number.js +48 -26
- package/dist/InputNumber/style.scss +100 -43
- package/dist/Loading/DotLoading.d.ts +7 -0
- package/dist/{Mask/mask-modal.js → Loading/DotLoading.js} +25 -25
- package/dist/{SpinLoading/spin-loading.d.ts → Loading/SpinLoading.d.ts} +0 -1
- package/dist/Loading/SpinLoading.js +69 -0
- package/dist/Loading/index.d.ts +6 -0
- package/dist/Loading/index.js +4 -0
- package/dist/Loading/style.scss +113 -0
- package/dist/NavBar/nav-bar.d.ts +1 -0
- package/dist/NavBar/nav-bar.js +3 -2
- package/dist/NavBar/style.scss +65 -61
- package/dist/NoticeBar/style.scss +130 -130
- package/dist/PageIndicator/style.scss +59 -59
- package/dist/Progress/Progress.d.ts +39 -0
- package/dist/Progress/Progress.js +56 -0
- package/dist/Progress/ProgressCircle.d.ts +15 -0
- package/dist/Progress/ProgressCircle.js +117 -0
- package/dist/Progress/ProgressLine.d.ts +15 -0
- package/dist/Progress/ProgressLine.js +87 -0
- package/dist/Progress/index.d.ts +3 -0
- package/dist/Progress/index.js +2 -0
- package/dist/Progress/style.scss +33 -0
- package/dist/Progress/types.d.ts +6 -0
- package/dist/Progress/types.js +2 -0
- package/dist/Radio/RadioGroup.js +3 -3
- package/dist/Radio/radio.js +1 -1
- package/dist/Radio/style.scss +154 -138
- package/dist/Radio/types.d.ts +6 -4
- package/dist/Rate/rate.js +1 -1
- package/dist/Rate/style.scss +37 -37
- package/dist/Result/demo/base.js +2 -2
- package/dist/Result/style.scss +73 -73
- package/dist/Result/use-result-icon.js +1 -1
- package/dist/SafeArea/style.scss +20 -18
- package/dist/Scaffold/style.scss +17 -16
- package/dist/Segmented/Segmented.d.ts +57 -0
- package/dist/Segmented/Segmented.js +82 -0
- package/dist/Segmented/index.d.ts +2 -0
- package/dist/Segmented/index.js +1 -0
- package/dist/Segmented/style.scss +75 -0
- package/dist/Skeleton/Skeleton.d.ts +86 -0
- package/dist/Skeleton/Skeleton.js +263 -0
- package/dist/Skeleton/index.d.ts +3 -0
- package/dist/Skeleton/index.js +2 -0
- package/dist/Skeleton/style.scss +215 -0
- package/dist/Space/space.d.ts +1 -0
- package/dist/Space/space.js +20 -6
- package/dist/Space/style.scss +101 -77
- package/dist/Stepper/index.d.ts +3 -0
- package/dist/Stepper/index.js +2 -0
- package/dist/Stepper/stepper.d.ts +14 -0
- package/dist/Stepper/stepper.js +92 -0
- package/dist/Stepper/style.scss +100 -0
- package/dist/Steps/HorizontalSteps.js +10 -3
- package/dist/Steps/VerticalSteps.js +5 -2
- package/dist/Steps/style.scss +153 -146
- package/dist/Steps/types.d.ts +2 -0
- package/dist/Switch/style.scss +127 -128
- package/dist/Switch/switch.d.ts +2 -0
- package/dist/Switch/switch.js +6 -5
- package/dist/TabBar/demo/base.js +2 -2
- package/dist/TabBar/index.js +2 -1
- package/dist/TabBar/index.scss +37 -36
- package/dist/Tabs/style.scss +108 -108
- package/dist/Tag/style.scss +110 -86
- package/dist/Tag/tag.d.ts +4 -1
- package/dist/Tag/tag.js +8 -2
- package/dist/WaterMark/style.scss +17 -17
- package/dist/index.d.ts +17 -26
- package/dist/index.js +8 -13
- package/dist/style/css-variable.scss +6 -0
- package/dist/style/style.scss +52 -52
- package/dist/style/theme-dark.scss +24 -24
- package/dist/style/theme-default.scss +54 -54
- package/dist/style/variable.scss +180 -168
- package/dist/types.d.ts +10 -1
- package/dist/utils/type.js +36 -36
- package/dist/utils/with-default-props.js +4 -4
- package/package.json +5 -8
- package/dist/ActionSheet/ActionSheet.d.ts +0 -25
- package/dist/ActionSheet/ActionSheet.js +0 -77
- package/dist/ActionSheet/index.d.ts +0 -3
- package/dist/ActionSheet/index.js +0 -2
- package/dist/ActionSheet/style.scss +0 -51
- package/dist/CascaderPicker/cascader-picker.d.ts +0 -27
- package/dist/CascaderPicker/cascader-picker.js +0 -88
- package/dist/CascaderPicker/index.d.ts +0 -3
- package/dist/CascaderPicker/index.js +0 -2
- package/dist/CascaderPicker/style.scss +0 -42
- package/dist/Form/FormItem/form-item-input.d.ts +0 -15
- package/dist/Form/FormItem/form-item-input.js +0 -39
- package/dist/Form/FormItem/form-item-label.d.ts +0 -13
- package/dist/Form/FormItem/form-item-label.js +0 -25
- package/dist/Form/FormItem/form-item.d.ts +0 -21
- package/dist/Form/FormItem/form-item.js +0 -70
- package/dist/Form/FormItem/index.d.ts +0 -5
- package/dist/Form/FormItem/index.js +0 -3
- package/dist/Form/style.scss +0 -45
- package/dist/Input/base-input.d.ts +0 -14
- package/dist/Input/base-input.js +0 -63
- package/dist/Input/index.d.ts +0 -12
- package/dist/Input/index.js +0 -9
- package/dist/Input/index.scss +0 -173
- package/dist/Input/input-affix-wrapper.d.ts +0 -8
- package/dist/Input/input-affix-wrapper.js +0 -50
- package/dist/Input/input-opt.d.ts +0 -16
- package/dist/Input/input-opt.js +0 -93
- package/dist/Input/input-password.d.ts +0 -7
- package/dist/Input/input-password.js +0 -47
- package/dist/Input/input.d.ts +0 -15
- package/dist/Input/input.js +0 -47
- package/dist/Input/textarea.d.ts +0 -13
- package/dist/Input/textarea.js +0 -45
- package/dist/Input/types.d.ts +0 -1
- package/dist/Input/types.js +0 -1
- package/dist/Mask/index.d.ts +0 -3
- package/dist/Mask/index.js +0 -2
- package/dist/Mask/mask-modal.d.ts +0 -45
- package/dist/Mask/mask.d.ts +0 -5
- package/dist/Mask/mask.js +0 -19
- package/dist/Mask/style.scss +0 -20
- package/dist/Picker/index.d.ts +0 -3
- package/dist/Picker/index.js +0 -2
- package/dist/Picker/picker.d.ts +0 -19
- package/dist/Picker/picker.js +0 -97
- package/dist/Picker/style.scss +0 -41
- package/dist/PickerView/index.d.ts +0 -4
- package/dist/PickerView/index.js +0 -2
- package/dist/PickerView/picker-view-column-item.d.ts +0 -7
- package/dist/PickerView/picker-view-column-item.js +0 -11
- package/dist/PickerView/picker-view-column.d.ts +0 -10
- package/dist/PickerView/picker-view-column.js +0 -117
- package/dist/PickerView/picker-view.d.ts +0 -12
- package/dist/PickerView/picker-view.js +0 -60
- package/dist/PickerView/style.scss +0 -72
- package/dist/PickerView/types.d.ts +0 -4
- package/dist/Popup/index.d.ts +0 -3
- package/dist/Popup/index.js +0 -2
- package/dist/Popup/popup-modal.d.ts +0 -52
- package/dist/Popup/popup-modal.js +0 -74
- package/dist/Popup/popup.d.ts +0 -4
- package/dist/Popup/popup.js +0 -56
- package/dist/Popup/style.scss +0 -53
- package/dist/ScrollView/index.d.ts +0 -4
- package/dist/ScrollView/index.js +0 -2
- package/dist/ScrollView/scroll-view.d.ts +0 -4
- package/dist/ScrollView/scroll-view.js +0 -55
- package/dist/ScrollView/style.scss +0 -19
- package/dist/ScrollView/types.d.ts +0 -26
- package/dist/ScrollView/types.js +0 -1
- package/dist/SideBar/SideBarContext.d.ts +0 -18
- package/dist/SideBar/SideBarContext.js +0 -2
- package/dist/SideBar/index.d.ts +0 -3
- package/dist/SideBar/index.js +0 -2
- package/dist/SideBar/side-bar.d.ts +0 -25
- package/dist/SideBar/side-bar.js +0 -351
- package/dist/SideBar/style.scss +0 -85
- package/dist/SideBar/types.d.ts +0 -7
- package/dist/SideBar/types.js +0 -1
- package/dist/SpinLoading/demo/base.d.ts +0 -3
- package/dist/SpinLoading/demo/base.js +0 -21
- package/dist/SpinLoading/index.d.ts +0 -3
- package/dist/SpinLoading/index.js +0 -2
- package/dist/SpinLoading/spin-loading.js +0 -59
- package/dist/SpinLoading/spin-loading.scss +0 -40
- package/dist/Tabs/demo/base.d.ts +0 -3
- package/dist/Tabs/demo/base.js +0 -59
- package/dist/Tag/demo/base.d.ts +0 -7
- package/dist/Tag/demo/base.js +0 -67
- package/dist/Tag/demo/style.scss +0 -8
- package/dist/Toast/index.d.ts +0 -5
- package/dist/Toast/index.js +0 -3
- package/dist/Toast/style.scss +0 -63
- package/dist/Toast/toast-modal.d.ts +0 -18
- package/dist/Toast/toast-modal.js +0 -112
- package/dist/Toast/toast.d.ts +0 -7
- package/dist/Toast/toast.js +0 -78
- package/dist/VerificationCodeInput/demo/base.d.ts +0 -3
- package/dist/VerificationCodeInput/demo/base.js +0 -11
- package/dist/VerificationCodeInput/index.d.ts +0 -3
- package/dist/VerificationCodeInput/index.js +0 -2
- package/dist/VerificationCodeInput/style.scss +0 -20
- package/dist/VerificationCodeInput/verification-code-input.d.ts +0 -24
- package/dist/VerificationCodeInput/verification-code-input.js +0 -99
- /package/dist/{PickerView → Form}/types.js +0 -0
package/dist/SideBar/style.scss
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
@use "../style/variable" as *;
|
|
2
|
-
|
|
3
|
-
$trionesSideBarCls: 'triones-antm-sidebar';
|
|
4
|
-
|
|
5
|
-
.#{$trionesSideBarCls} {
|
|
6
|
-
display: flex;
|
|
7
|
-
height: 100%;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
&-tabs {
|
|
11
|
-
min-width: 0;
|
|
12
|
-
background-color: $trionesColorFill;
|
|
13
|
-
overflow: auto;
|
|
14
|
-
scrollbar-width: thin;
|
|
15
|
-
flex-shrink: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&-tab {
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
padding: $trionesPadding $trionesPadding;
|
|
21
|
-
color: $trionesColorTextSecondary;
|
|
22
|
-
|
|
23
|
-
&-active {
|
|
24
|
-
color: $trionesColorPrimaryText;
|
|
25
|
-
background-color: $trionesColorBgBase;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&-content {
|
|
31
|
-
flex: 1 auto;
|
|
32
|
-
min-width: 0;
|
|
33
|
-
overflow: hidden;
|
|
34
|
-
//overflow-y: auto;
|
|
35
|
-
//scrollbar-width: none;
|
|
36
|
-
position: relative;
|
|
37
|
-
user-select: none;
|
|
38
|
-
touch-action: none;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
&-wheel {
|
|
42
|
-
width: 100%;
|
|
43
|
-
cursor: grab;
|
|
44
|
-
position: absolute;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&-item {
|
|
48
|
-
|
|
49
|
-
&-active {
|
|
50
|
-
display: block;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&-switch-mode {
|
|
56
|
-
.#{$trionesSideBarCls} {
|
|
57
|
-
&-content {
|
|
58
|
-
|
|
59
|
-
&-item {
|
|
60
|
-
height: 100%;
|
|
61
|
-
display: none;
|
|
62
|
-
&-active {
|
|
63
|
-
display: block;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&-scroll-mode {
|
|
71
|
-
.#{$trionesSideBarCls} {
|
|
72
|
-
&-content {
|
|
73
|
-
|
|
74
|
-
&-item {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
&-active {
|
|
78
|
-
display: block;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
}
|
package/dist/SideBar/types.d.ts
DELETED
package/dist/SideBar/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { DemoBlock } from "../../DemoBlock";
|
|
3
|
-
import { SpinLoading } from "../spin-loading";
|
|
4
|
-
import Space from "../../Space";
|
|
5
|
-
export default (function () {
|
|
6
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
7
|
-
title: "\u57FA\u7840\u4F7F\u7528"
|
|
8
|
-
}, /*#__PURE__*/React.createElement(SpinLoading, null)), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
9
|
-
title: "\u989C\u8272"
|
|
10
|
-
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(SpinLoading, null), /*#__PURE__*/React.createElement(SpinLoading, {
|
|
11
|
-
color: "primary"
|
|
12
|
-
}), /*#__PURE__*/React.createElement(SpinLoading, {
|
|
13
|
-
color: "white"
|
|
14
|
-
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
15
|
-
title: "\u5927\u5C0F"
|
|
16
|
-
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(SpinLoading, {
|
|
17
|
-
size: "small"
|
|
18
|
-
}), /*#__PURE__*/React.createElement(SpinLoading, null), /*#__PURE__*/React.createElement(SpinLoading, {
|
|
19
|
-
size: "large"
|
|
20
|
-
}))));
|
|
21
|
-
});
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import classNames from 'classnames';
|
|
2
|
-
import Base64 from 'crypto-js/enc-base64';
|
|
3
|
-
import Utf8 from 'crypto-js/enc-utf8';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import "./spin-loading.scss";
|
|
6
|
-
var spinLoadingCls = 'triones-antm-spin-loading';
|
|
7
|
-
export function createSvgStr(props) {
|
|
8
|
-
return "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"width:100%;height:100%\" viewBox=\"0 0 32 32\">\n <circle r=\"15\" cx=\"16\" cy=\"16\"\n stroke-width=\"2\"\n stroke=\"".concat(props.stroke, "\"\n fill=\"transparent\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"").concat(15 * 3.14159265358979 * 2, "\"\n stroke-dashoffset=\"").concat(15 * 3.14159265358979 * 0.5, "\"></circle>\n </svg>");
|
|
9
|
-
}
|
|
10
|
-
export var SpinLoading = function SpinLoading(_ref) {
|
|
11
|
-
var _ref$size = _ref.size,
|
|
12
|
-
size = _ref$size === void 0 ? 'middle' : _ref$size,
|
|
13
|
-
_ref$color = _ref.color,
|
|
14
|
-
color = _ref$color === void 0 ? 'default' : _ref$color;
|
|
15
|
-
var computedSize = React.useMemo(function () {
|
|
16
|
-
var resSize = null;
|
|
17
|
-
if (size === 'small') {
|
|
18
|
-
resSize = '24Px';
|
|
19
|
-
} else if (size === 'middle') {
|
|
20
|
-
resSize = '32Px';
|
|
21
|
-
} else if (size === 'large') {
|
|
22
|
-
resSize = '48Px';
|
|
23
|
-
} else {
|
|
24
|
-
resSize = size;
|
|
25
|
-
}
|
|
26
|
-
if (typeof resSize === 'number') {
|
|
27
|
-
return "".concat(resSize, "Px");
|
|
28
|
-
} else {
|
|
29
|
-
return resSize;
|
|
30
|
-
}
|
|
31
|
-
}, [size]);
|
|
32
|
-
var computedColor = React.useMemo(function () {
|
|
33
|
-
if (color === 'default') {
|
|
34
|
-
return '#9D9D9D';
|
|
35
|
-
} else if (color === 'primary') {
|
|
36
|
-
return '#1677ff';
|
|
37
|
-
} else if (color === 'white') {
|
|
38
|
-
return '#ffffff';
|
|
39
|
-
} else {
|
|
40
|
-
return color;
|
|
41
|
-
}
|
|
42
|
-
}, [color]);
|
|
43
|
-
var completedStyle = React.useMemo(function () {
|
|
44
|
-
var maskImageSvg = createSvgStr({
|
|
45
|
-
stroke: computedColor
|
|
46
|
-
});
|
|
47
|
-
return {
|
|
48
|
-
'--size': computedSize,
|
|
49
|
-
'--color': computedColor,
|
|
50
|
-
'--maskImage': "url(data:image/svg+xml;base64,".concat(Base64.stringify(Utf8.parse(maskImageSvg)), ")")
|
|
51
|
-
};
|
|
52
|
-
}, [computedSize, computedColor]);
|
|
53
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: classNames(spinLoadingCls),
|
|
55
|
-
style: completedStyle
|
|
56
|
-
}, /*#__PURE__*/React.createElement("i", {
|
|
57
|
-
className: classNames("".concat(spinLoadingCls, "-loading"))
|
|
58
|
-
}));
|
|
59
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
$spinLoadingCls: triones-antm-spin-loading;
|
|
2
|
-
|
|
3
|
-
.#{$spinLoadingCls} {
|
|
4
|
-
--size: 32Px;
|
|
5
|
-
--color: #1677ff;
|
|
6
|
-
width: var(--size);
|
|
7
|
-
height: var(--size);
|
|
8
|
-
|
|
9
|
-
&-svg {
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 100%;
|
|
12
|
-
//animation: adm-spin-loading-rotate 0.8s infinite linear;
|
|
13
|
-
|
|
14
|
-
> .#{$spinLoadingCls}-circle {
|
|
15
|
-
//stroke: #1677ff;
|
|
16
|
-
stroke: var(--color);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&-loading {
|
|
21
|
-
color: var(--color);
|
|
22
|
-
display: inline-block;
|
|
23
|
-
height: 100%;
|
|
24
|
-
width: 100%;
|
|
25
|
-
background: currentColor;
|
|
26
|
-
mask-image: var(--maskImage);
|
|
27
|
-
-webkit-mask-image: var(--maskImage);
|
|
28
|
-
animation: adm-spin-loading-rotate 2s infinite linear;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@keyframes adm-spin-loading-rotate {
|
|
34
|
-
from {
|
|
35
|
-
transform: rotate(0deg);
|
|
36
|
-
}
|
|
37
|
-
to {
|
|
38
|
-
transform: rotate(360deg);
|
|
39
|
-
}
|
|
40
|
-
}
|
package/dist/Tabs/demo/base.d.ts
DELETED
package/dist/Tabs/demo/base.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { DemoBlock } from "../../DemoBlock";
|
|
3
|
-
import Tabs from "../index";
|
|
4
|
-
export default (function () {
|
|
5
|
-
var items = [{
|
|
6
|
-
key: '1',
|
|
7
|
-
label: 'Tab1',
|
|
8
|
-
children: /*#__PURE__*/React.createElement(React.Fragment, null, "1")
|
|
9
|
-
}, {
|
|
10
|
-
key: '2',
|
|
11
|
-
label: 'Tab2',
|
|
12
|
-
children: /*#__PURE__*/React.createElement(React.Fragment, null, "2")
|
|
13
|
-
}];
|
|
14
|
-
var items2 = [{
|
|
15
|
-
key: '1',
|
|
16
|
-
label: 'Tab1-测试',
|
|
17
|
-
children: /*#__PURE__*/React.createElement(React.Fragment, null, "1")
|
|
18
|
-
}, {
|
|
19
|
-
key: '2',
|
|
20
|
-
label: 'Tab2-测试',
|
|
21
|
-
children: /*#__PURE__*/React.createElement(React.Fragment, null, "2")
|
|
22
|
-
}, {
|
|
23
|
-
key: '3',
|
|
24
|
-
label: 'Tab3-测试',
|
|
25
|
-
children: /*#__PURE__*/React.createElement(React.Fragment, null, "3")
|
|
26
|
-
}, {
|
|
27
|
-
key: '4',
|
|
28
|
-
label: 'Tab4-测试',
|
|
29
|
-
children: /*#__PURE__*/React.createElement(React.Fragment, null, "4")
|
|
30
|
-
}, {
|
|
31
|
-
key: '5',
|
|
32
|
-
label: 'Tab5-测试',
|
|
33
|
-
children: /*#__PURE__*/React.createElement(React.Fragment, null, "5")
|
|
34
|
-
}, {
|
|
35
|
-
key: '6',
|
|
36
|
-
label: 'Tab6-测试',
|
|
37
|
-
children: /*#__PURE__*/React.createElement(React.Fragment, null, "6")
|
|
38
|
-
}];
|
|
39
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
40
|
-
title: "\u57FA\u672C\u4F7F\u7528"
|
|
41
|
-
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
42
|
-
items: items
|
|
43
|
-
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
44
|
-
title: "\u6EDA\u52A8"
|
|
45
|
-
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
46
|
-
items: items2,
|
|
47
|
-
stretch: false
|
|
48
|
-
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
49
|
-
title: "Tab"
|
|
50
|
-
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
51
|
-
stretch: false
|
|
52
|
-
}, /*#__PURE__*/React.createElement(Tabs.Tab, {
|
|
53
|
-
key: "1",
|
|
54
|
-
label: "Tab1"
|
|
55
|
-
}, /*#__PURE__*/React.createElement("div", null, "1")), /*#__PURE__*/React.createElement(Tabs.Tab, {
|
|
56
|
-
key: "2",
|
|
57
|
-
label: "Tab2"
|
|
58
|
-
}, /*#__PURE__*/React.createElement("div", null, "2")))));
|
|
59
|
-
});
|
package/dist/Tag/demo/base.d.ts
DELETED
package/dist/Tag/demo/base.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* compact: true
|
|
3
|
-
*/
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import "./style.scss";
|
|
6
|
-
import { DemoBlock } from "../../DemoBlock";
|
|
7
|
-
import Tag from "../index";
|
|
8
|
-
export default (function () {
|
|
9
|
-
var clsPrefix = 'tag-demo-style';
|
|
10
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
11
|
-
title: "\u57FA\u7840\u7528\u6CD5"
|
|
12
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
13
|
-
className: "".concat(clsPrefix, "-content")
|
|
14
|
-
}, /*#__PURE__*/React.createElement(Tag, null, "Default"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
15
|
-
title: "\u7EBF\u6846\u6807\u7B7E"
|
|
16
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
className: "".concat(clsPrefix, "-content")
|
|
18
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
19
|
-
fill: "outline",
|
|
20
|
-
color: "default"
|
|
21
|
-
}, "Default"), /*#__PURE__*/React.createElement(Tag, {
|
|
22
|
-
fill: "outline",
|
|
23
|
-
color: "primary"
|
|
24
|
-
}, "Primary"), /*#__PURE__*/React.createElement(Tag, {
|
|
25
|
-
fill: "outline",
|
|
26
|
-
color: "success"
|
|
27
|
-
}, "Success"), /*#__PURE__*/React.createElement(Tag, {
|
|
28
|
-
fill: "outline",
|
|
29
|
-
color: "warning"
|
|
30
|
-
}, "Warning"), /*#__PURE__*/React.createElement(Tag, {
|
|
31
|
-
fill: "outline",
|
|
32
|
-
color: "danger"
|
|
33
|
-
}, "Danger"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
34
|
-
title: "\u8BED\u4E49\u6807\u7B7E"
|
|
35
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
36
|
-
className: "".concat(clsPrefix, "-content")
|
|
37
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
38
|
-
color: "default"
|
|
39
|
-
}, "Default"), /*#__PURE__*/React.createElement(Tag, {
|
|
40
|
-
color: "primary"
|
|
41
|
-
}, "Primary"), /*#__PURE__*/React.createElement(Tag, {
|
|
42
|
-
color: "success"
|
|
43
|
-
}, "Success"), /*#__PURE__*/React.createElement(Tag, {
|
|
44
|
-
color: "warning"
|
|
45
|
-
}, "Warning"), /*#__PURE__*/React.createElement(Tag, {
|
|
46
|
-
color: "danger"
|
|
47
|
-
}, "Danger"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
48
|
-
title: "\u5706\u89D2\u6807\u7B7E"
|
|
49
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
50
|
-
className: "".concat(clsPrefix, "-content")
|
|
51
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
52
|
-
color: "default",
|
|
53
|
-
round: true
|
|
54
|
-
}, "Default"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
55
|
-
title: "\u81EA\u5B9A\u4E49\u989C\u8272"
|
|
56
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
className: "".concat(clsPrefix, "-content")
|
|
58
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
59
|
-
color: "#f50"
|
|
60
|
-
}, "#f50"), /*#__PURE__*/React.createElement(Tag, {
|
|
61
|
-
color: "#2db7f5"
|
|
62
|
-
}, "#2db7f5"), /*#__PURE__*/React.createElement(Tag, {
|
|
63
|
-
color: "#87d068"
|
|
64
|
-
}, "#87d068"), /*#__PURE__*/React.createElement(Tag, {
|
|
65
|
-
color: "#108ee9"
|
|
66
|
-
}, "#108ee9"))));
|
|
67
|
-
});
|
package/dist/Tag/demo/style.scss
DELETED
package/dist/Toast/index.d.ts
DELETED
package/dist/Toast/index.js
DELETED
package/dist/Toast/style.scss
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
$toastCls: 'triones-antm-toast';
|
|
2
|
-
|
|
3
|
-
.#{$toastCls} {
|
|
4
|
-
position: fixed;
|
|
5
|
-
top: 0;
|
|
6
|
-
left: 0;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100%;
|
|
9
|
-
text-align: center;
|
|
10
|
-
pointer-events: none;
|
|
11
|
-
|
|
12
|
-
&-main {
|
|
13
|
-
|
|
14
|
-
padding: 12Px;
|
|
15
|
-
display: inline-block;
|
|
16
|
-
position: relative;
|
|
17
|
-
top: 50%;
|
|
18
|
-
transform: translateY(-50%);
|
|
19
|
-
width: auto;
|
|
20
|
-
max-width: 204px;
|
|
21
|
-
max-height: 70%;
|
|
22
|
-
overflow: auto;
|
|
23
|
-
color: #fff;
|
|
24
|
-
word-break: break-all;
|
|
25
|
-
background-color: rgba(0, 0, 0, .7);
|
|
26
|
-
border-radius: 8px;
|
|
27
|
-
pointer-events: all;
|
|
28
|
-
font-size: var(--adm-font-size-7);
|
|
29
|
-
line-height: 1.5;
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
&-icon{
|
|
32
|
-
padding: 35Px 12Px;
|
|
33
|
-
min-width: 150Px;
|
|
34
|
-
.#{$toastCls}{
|
|
35
|
-
&-center{
|
|
36
|
-
&-center{
|
|
37
|
-
text-align: initial;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&-center{
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
align-items: center;
|
|
49
|
-
gap: 8Px;
|
|
50
|
-
&-icon{
|
|
51
|
-
.triones-antm-icon{
|
|
52
|
-
font-size: 36Px;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
&-content{
|
|
56
|
-
display: inline-block;
|
|
57
|
-
color: #fff;
|
|
58
|
-
word-break: break-all;
|
|
59
|
-
pointer-events: all;
|
|
60
|
-
text-align: initial;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import "./style.scss";
|
|
4
|
-
export type ToastModalProps = {
|
|
5
|
-
open?: boolean;
|
|
6
|
-
maskClosable?: boolean;
|
|
7
|
-
content?: React.ReactNode;
|
|
8
|
-
duration?: number;
|
|
9
|
-
durationAble?: boolean;
|
|
10
|
-
icon?: 'success' | 'fail' | 'loading' | React.ReactNode;
|
|
11
|
-
maskClassName?: string;
|
|
12
|
-
position?: 'top' | 'bottom' | 'center';
|
|
13
|
-
destroyOnClose?: boolean;
|
|
14
|
-
afterClose?: () => void;
|
|
15
|
-
afterOpenChange?: (open: boolean) => void;
|
|
16
|
-
onDestroy?: () => void;
|
|
17
|
-
};
|
|
18
|
-
export declare const ToastModal: FC<ToastModalProps>;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import { memo, useEffect, useMemo, useRef, useState } from "react";
|
|
12
|
-
import classNames from "classnames";
|
|
13
|
-
import React from "react";
|
|
14
|
-
import "./style.scss";
|
|
15
|
-
import Mask from "../Mask";
|
|
16
|
-
import { CheckOutline, CloseOutline } from "@trionesdev/antd-mobile-icons-react";
|
|
17
|
-
import { SpinLoading } from "../index";
|
|
18
|
-
var toastCls = "triones-antm-toast";
|
|
19
|
-
export var ToastModal = /*#__PURE__*/memo(function (_ref) {
|
|
20
|
-
var open = _ref.open,
|
|
21
|
-
_ref$maskClosable = _ref.maskClosable,
|
|
22
|
-
maskClosable = _ref$maskClosable === void 0 ? true : _ref$maskClosable,
|
|
23
|
-
content = _ref.content,
|
|
24
|
-
_ref$duration = _ref.duration,
|
|
25
|
-
duration = _ref$duration === void 0 ? 2000 : _ref$duration,
|
|
26
|
-
_ref$durationAble = _ref.durationAble,
|
|
27
|
-
durationAble = _ref$durationAble === void 0 ? true : _ref$durationAble,
|
|
28
|
-
icon = _ref.icon,
|
|
29
|
-
maskClassName = _ref.maskClassName,
|
|
30
|
-
_ref$position = _ref.position,
|
|
31
|
-
position = _ref$position === void 0 ? 'center' : _ref$position,
|
|
32
|
-
destroyOnClose = _ref.destroyOnClose,
|
|
33
|
-
afterClose = _ref.afterClose,
|
|
34
|
-
afterOpenChange = _ref.afterOpenChange,
|
|
35
|
-
onDestroy = _ref.onDestroy;
|
|
36
|
-
var _useState = useState(open || false),
|
|
37
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
-
internalOpen = _useState2[0],
|
|
39
|
-
setInternalOpen = _useState2[1];
|
|
40
|
-
var time = useRef();
|
|
41
|
-
var handleIcon = function handleIcon() {
|
|
42
|
-
if (icon === 'success') {
|
|
43
|
-
return /*#__PURE__*/React.createElement(CheckOutline, null);
|
|
44
|
-
} else if (icon === 'fail') {
|
|
45
|
-
return /*#__PURE__*/React.createElement(CloseOutline, null);
|
|
46
|
-
} else if (icon === 'loading') {
|
|
47
|
-
return /*#__PURE__*/React.createElement(SpinLoading, {
|
|
48
|
-
color: "white"
|
|
49
|
-
});
|
|
50
|
-
} else {
|
|
51
|
-
return icon;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
useEffect(function () {
|
|
55
|
-
if (open === undefined) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
if (open !== internalOpen) {
|
|
59
|
-
setInternalOpen(open);
|
|
60
|
-
}
|
|
61
|
-
}, [open]);
|
|
62
|
-
useEffect(function () {
|
|
63
|
-
afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(internalOpen);
|
|
64
|
-
if (!internalOpen) {
|
|
65
|
-
afterClose === null || afterClose === void 0 || afterClose();
|
|
66
|
-
if (destroyOnClose) {
|
|
67
|
-
onDestroy === null || onDestroy === void 0 || onDestroy();
|
|
68
|
-
}
|
|
69
|
-
clearTimeout(time.current);
|
|
70
|
-
}
|
|
71
|
-
if (durationAble && internalOpen && duration) {
|
|
72
|
-
time.current = setTimeout(function () {
|
|
73
|
-
setInternalOpen(false);
|
|
74
|
-
}, duration);
|
|
75
|
-
}
|
|
76
|
-
}, [internalOpen]);
|
|
77
|
-
var top = useMemo(function () {
|
|
78
|
-
switch (position) {
|
|
79
|
-
case 'top':
|
|
80
|
-
return '20%';
|
|
81
|
-
case 'bottom':
|
|
82
|
-
return '80%';
|
|
83
|
-
default:
|
|
84
|
-
return '50%';
|
|
85
|
-
}
|
|
86
|
-
}, [position]);
|
|
87
|
-
return /*#__PURE__*/React.createElement(Mask, {
|
|
88
|
-
className: maskClassName,
|
|
89
|
-
open: internalOpen,
|
|
90
|
-
onMaskClick: function onMaskClick() {
|
|
91
|
-
if (maskClosable) {
|
|
92
|
-
setInternalOpen(false);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
96
|
-
className: classNames(toastCls)
|
|
97
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
98
|
-
className: classNames("".concat(toastCls, "-main"), _defineProperty({}, "".concat(toastCls, "-main-icon"), icon)),
|
|
99
|
-
style: {
|
|
100
|
-
top: top
|
|
101
|
-
},
|
|
102
|
-
onClick: function onClick(e) {
|
|
103
|
-
e.stopPropagation();
|
|
104
|
-
}
|
|
105
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
106
|
-
className: classNames("".concat(toastCls, "-center"))
|
|
107
|
-
}, icon && /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
className: classNames("".concat(toastCls, "-center-icon"))
|
|
109
|
-
}, handleIcon()), content && /*#__PURE__*/React.createElement("div", {
|
|
110
|
-
className: classNames("".concat(toastCls, "-center-content"))
|
|
111
|
-
}, content)))));
|
|
112
|
-
});
|
package/dist/Toast/toast.d.ts
DELETED