@trionesdev/antd-taro-react 0.0.2-beta.6 → 0.0.2-beta.8
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/dist/ActionSheet/ActionSheet.d.ts +25 -0
- package/dist/ActionSheet/ActionSheet.js +77 -0
- package/dist/ActionSheet/index.d.ts +1 -1
- package/dist/ActionSheet/index.js +1 -1
- package/dist/ActionSheet/style.scss +52 -0
- package/dist/Calendar/calendar-grid.js +0 -1
- package/dist/Calendar/calendar.js +5 -5
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +4 -4
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.js +42 -159
- package/dist/CalendarDatetimePicker/style.scss +13 -51
- package/dist/CalendarDatetimePicker/types.d.ts +0 -4
- package/dist/CalendarDatetimePicker/types.js +1 -6
- package/dist/CalendarDatetimePopup/CalendarDatetimePopup.d.ts +10 -0
- package/dist/CalendarDatetimePopup/CalendarDatetimePopup.js +163 -0
- package/dist/CalendarDatetimePopup/index.d.ts +3 -0
- package/dist/CalendarDatetimePopup/index.js +2 -0
- package/dist/CalendarDatetimePopup/style.scss +62 -0
- package/dist/CalendarDatetimePopup/types.d.ts +5 -0
- package/dist/CalendarDatetimePopup/types.js +6 -0
- package/dist/CalendarPopup/CalendarPopup.d.ts +4 -0
- package/dist/{CalendarPicker/calendar-picker.js → CalendarPopup/CalendarPopup.js} +4 -3
- package/dist/CalendarPopup/CalendarRangePopup.d.ts +4 -0
- package/dist/{CalendarPicker/calendar-range-picker.js → CalendarPopup/CalendarRangePopup.js} +5 -4
- package/dist/CalendarPopup/index.d.ts +8 -0
- package/dist/CalendarPopup/index.js +5 -0
- package/dist/{CalendarPicker → CalendarPopup}/style.scss +4 -3
- package/dist/{CalendarPicker → CalendarPopup}/types.d.ts +3 -2
- package/dist/CalendarPopup/types.js +1 -0
- package/dist/CascaderPicker/CascaderPicker.d.ts +25 -0
- package/dist/CascaderPicker/CascaderPicker.js +78 -0
- package/dist/CascaderPicker/index.d.ts +1 -1
- package/dist/CascaderPicker/index.js +1 -1
- package/dist/CascaderPicker/style.scss +24 -0
- package/dist/CascaderPopup/cascader-popup.d.ts +27 -0
- package/dist/CascaderPopup/cascader-popup.js +90 -0
- package/dist/CascaderPopup/index.d.ts +3 -0
- package/dist/CascaderPopup/index.js +2 -0
- package/dist/CascaderPopup/style.scss +45 -0
- package/dist/DatePicker/DatePicker.d.ts +15 -0
- package/dist/DatePicker/DatePicker.js +85 -0
- package/dist/DatePicker/DatePickerPopup.d.ts +18 -0
- package/dist/DatePicker/DatePickerPopup.js +329 -0
- package/dist/DatePicker/index.d.ts +3 -0
- package/dist/DatePicker/index.js +3 -0
- package/dist/DatePicker/style.scss +64 -0
- package/dist/DatePicker/types.d.ts +1 -0
- package/dist/ImagesPreview/ImagesPreview.js +2 -2
- package/dist/Overlay/Overlay.d.ts +16 -0
- package/dist/Overlay/Overlay.js +95 -0
- package/dist/Overlay/index.d.ts +4 -0
- package/dist/Overlay/index.js +3 -0
- package/dist/Overlay/style.scss +20 -0
- package/dist/Picker/Picker.d.ts +19 -0
- package/dist/Picker/Picker.js +75 -0
- package/dist/Picker/index.d.ts +1 -1
- package/dist/Picker/index.js +1 -1
- package/dist/Picker/style.scss +41 -0
- package/dist/PickerView/PickerView.d.ts +4 -0
- package/dist/PickerView/PickerView.js +71 -0
- package/dist/PickerView/index.d.ts +2 -2
- package/dist/PickerView/index.js +1 -1
- package/dist/PickerView/style.scss +13 -0
- package/dist/PickerView/types.d.ts +15 -0
- package/dist/PickerView/types.js +1 -0
- package/dist/Popup/Popup.d.ts +26 -1
- package/dist/Popup/Popup.js +66 -18
- package/dist/Popup/index.d.ts +2 -2
- package/dist/Popup/index.js +1 -0
- package/dist/Popup/style.scss +114 -0
- package/dist/Progress/index.d.ts +1 -1
- package/dist/Progress/index.js +1 -1
- package/dist/SideBar/side-bar.js +3 -2
- package/dist/Toast/Toast.d.ts +18 -0
- package/dist/Toast/Toast.js +112 -0
- package/dist/Toast/index.d.ts +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/Toast/style.scss +63 -0
- package/dist/index.d.ts +9 -4
- package/dist/index.js +5 -2
- package/package.json +7 -6
- package/dist/CalendarPicker/calendar-picker.d.ts +0 -4
- package/dist/CalendarPicker/calendar-range-picker.d.ts +0 -4
- package/dist/CalendarPicker/index.d.ts +0 -9
- package/dist/CalendarPicker/index.js +0 -5
- package/dist/Mask/index.d.ts +0 -3
- package/dist/Mask/index.js +0 -2
- package/dist/Progress/Progress.d.ts +0 -39
- package/dist/Progress/Progress.js +0 -56
- package/dist/Progress/ProgressCircle.d.ts +0 -16
- package/dist/Progress/ProgressCircle.js +0 -142
- package/dist/Progress/ProgressLine.d.ts +0 -15
- package/dist/Progress/ProgressLine.js +0 -87
- package/dist/Progress/style.scss +0 -33
- package/dist/Progress/types.d.ts +0 -6
- package/dist/Progress/types.js +0 -2
- /package/dist/{CalendarDatetimePicker → CalendarDatetimePopup}/DateTimeSwitch.d.ts +0 -0
- /package/dist/{CalendarDatetimePicker → CalendarDatetimePopup}/DateTimeSwitch.js +0 -0
- /package/dist/{CalendarPicker → DatePicker}/types.js +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
|
|
3
|
+
$trionesPopupCls: 'triones-antm-popup';
|
|
4
|
+
|
|
5
|
+
.#{$trionesPopupCls} {
|
|
6
|
+
&-root {
|
|
7
|
+
display: flex;
|
|
8
|
+
|
|
9
|
+
.#{$trionesPopupCls} {
|
|
10
|
+
position: relative;
|
|
11
|
+
background-color: white;
|
|
12
|
+
|
|
13
|
+
&-title {
|
|
14
|
+
text-align: center;
|
|
15
|
+
padding-block: variable.$trionesPaddingContentVertical;
|
|
16
|
+
padding-inline: variable.$trionesPaddingContentHorizontal;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-close {
|
|
20
|
+
position: absolute;
|
|
21
|
+
|
|
22
|
+
&-top-right {
|
|
23
|
+
top: variable.$trionesPaddingContentVertical;
|
|
24
|
+
right: variable.$trionesPaddingContentHorizontal;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-top-left {
|
|
28
|
+
top: variable.$trionesPaddingContentVertical;
|
|
29
|
+
left: variable.$trionesPaddingContentHorizontal;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-top {
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
align-items: flex-start;
|
|
38
|
+
justify-content: flex-start;
|
|
39
|
+
|
|
40
|
+
.#{$trionesPopupCls} {
|
|
41
|
+
width: 100%;
|
|
42
|
+
min-height: 20%;
|
|
43
|
+
max-height: 90%;
|
|
44
|
+
|
|
45
|
+
&-round {
|
|
46
|
+
border-bottom-left-radius: variable.$trionesBorderRadius;
|
|
47
|
+
border-bottom-right-radius: variable.$trionesBorderRadius;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&-bottom {
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
align-items: flex-end;
|
|
55
|
+
justify-content: flex-end;
|
|
56
|
+
|
|
57
|
+
.#{$trionesPopupCls} {
|
|
58
|
+
width: 100%;
|
|
59
|
+
min-height: 20%;
|
|
60
|
+
max-height: 90%;
|
|
61
|
+
|
|
62
|
+
&-round {
|
|
63
|
+
border-top-left-radius: variable.$trionesBorderRadius;
|
|
64
|
+
border-top-right-radius: variable.$trionesBorderRadius;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&-left {
|
|
70
|
+
flex-direction: row;
|
|
71
|
+
justify-content: flex-start;
|
|
72
|
+
|
|
73
|
+
.#{$trionesPopupCls} {
|
|
74
|
+
height: 100%;
|
|
75
|
+
min-width: 20%;
|
|
76
|
+
max-width: 90%;
|
|
77
|
+
|
|
78
|
+
&-round {
|
|
79
|
+
border-top-right-radius: variable.$trionesBorderRadius;
|
|
80
|
+
border-bottom-right-radius: variable.$trionesBorderRadius;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
&-right {
|
|
87
|
+
flex-direction: row;
|
|
88
|
+
justify-content: flex-end;
|
|
89
|
+
|
|
90
|
+
.#{$trionesPopupCls} {
|
|
91
|
+
height: 100%;
|
|
92
|
+
min-width: 20%;
|
|
93
|
+
max-width: 90%;
|
|
94
|
+
|
|
95
|
+
&-round {
|
|
96
|
+
border-top-left-radius: variable.$trionesBorderRadius;
|
|
97
|
+
border-bottom-left-radius: variable.$trionesBorderRadius;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&-center {
|
|
103
|
+
justify-content: center;
|
|
104
|
+
align-items: center;
|
|
105
|
+
|
|
106
|
+
.#{$trionesPopupCls} {
|
|
107
|
+
&-round {
|
|
108
|
+
border-radius: variable.$trionesBorderRadius;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
}
|
package/dist/Progress/index.d.ts
CHANGED
package/dist/Progress/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Progress } from "
|
|
1
|
+
import { Progress } from "@trionesdev/antd-mobile-base-react";
|
|
2
2
|
export default Progress;
|
package/dist/SideBar/side-bar.js
CHANGED
|
@@ -264,13 +264,14 @@ var SideBarContent = /*#__PURE__*/memo(function (_ref2) {
|
|
|
264
264
|
return computeReactiveOffsetBottom();
|
|
265
265
|
case 6:
|
|
266
266
|
reactiveOffsetBottom = _context5.sent;
|
|
267
|
-
if (!
|
|
267
|
+
if (!isTaroWeApp) {
|
|
268
268
|
_context5.next = 13;
|
|
269
269
|
break;
|
|
270
270
|
}
|
|
271
271
|
_context5.next = 10;
|
|
272
272
|
return new Promise(function (resolve) {
|
|
273
|
-
|
|
273
|
+
var _Taro$getSystemInfo;
|
|
274
|
+
(_Taro$getSystemInfo = Taro.getSystemInfo) === null || _Taro$getSystemInfo === void 0 || _Taro$getSystemInfo.call(Taro).then(function (res) {
|
|
274
275
|
return resolve(res.windowHeight);
|
|
275
276
|
});
|
|
276
277
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import "./style.scss";
|
|
4
|
+
export type ToastProps = {
|
|
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 Toast: FC<ToastProps>;
|
|
@@ -0,0 +1,112 @@
|
|
|
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 { SpinLoading } from "../index";
|
|
16
|
+
import Overlay from "../Overlay";
|
|
17
|
+
import { CheckOutline, CloseOutline } from "@trionesdev/antd-mobile-icons-react";
|
|
18
|
+
var toastCls = "triones-antm-toast";
|
|
19
|
+
export var Toast = /*#__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(Overlay, {
|
|
88
|
+
className: maskClassName,
|
|
89
|
+
open: internalOpen,
|
|
90
|
+
onClick: function onClick() {
|
|
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/index.d.ts
CHANGED
package/dist/Toast/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Toast } from "
|
|
1
|
+
import { Toast } from "./Toast";
|
|
2
2
|
export default Toast;
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,12 +12,16 @@ export { default as Calendar, CalendarGrid, TouchableCalendarGrid, } from './Cal
|
|
|
12
12
|
export type { CalendarGridProps, CalendarProps } from './Calendar';
|
|
13
13
|
export { default as CalendarDatetimePicker } from './CalendarDatetimePicker';
|
|
14
14
|
export type { CalendarDatetimePickerProps } from './CalendarDatetimePicker';
|
|
15
|
-
export { default as
|
|
16
|
-
export type {
|
|
15
|
+
export { default as CalendarDatetimePopup } from './CalendarDatetimePopup';
|
|
16
|
+
export type { CalendarDatetimePopupProps } from './CalendarDatetimePopup';
|
|
17
|
+
export { default as CalendarPopup } from './CalendarPopup';
|
|
18
|
+
export type { CalendarPopupProps, CalendarPopupRangeProps } from './CalendarPopup';
|
|
17
19
|
export { default as Card } from './Card';
|
|
18
20
|
export type { CardProps } from './Card';
|
|
19
21
|
export { default as CascaderPicker } from './CascaderPicker';
|
|
20
22
|
export type { CascaderPickerProps } from './CascaderPicker';
|
|
23
|
+
export { default as CascaderPopup } from './CascaderPopup';
|
|
24
|
+
export type { CascaderPopupProps } from './CascaderPopup';
|
|
21
25
|
export { default as CascaderView } from './CascaderView';
|
|
22
26
|
export type { CascaderViewProps } from './CascaderView';
|
|
23
27
|
export { default as Cell } from './Cell';
|
|
@@ -26,6 +30,7 @@ export { default as Checkbox } from './Checkbox';
|
|
|
26
30
|
export type { CheckboxProps } from './Checkbox';
|
|
27
31
|
export { default as ConfigProvider } from './ConfigProvider';
|
|
28
32
|
export type { ConfigProviderProps } from './ConfigProvider';
|
|
33
|
+
export { default as DatePicker } from './DatePicker';
|
|
29
34
|
export { default as Descriptions } from "./Descriptions";
|
|
30
35
|
export type { DescriptionsProps } from "./Descriptions";
|
|
31
36
|
export { default as Divider } from './Divider';
|
|
@@ -52,12 +57,12 @@ export { default as Input } from './Input';
|
|
|
52
57
|
export type { InputOPTProps, InputPasswordProps, InputProps, InputTextareaProps } from './Input';
|
|
53
58
|
export { default as InputNumber } from './InputNumber';
|
|
54
59
|
export type { InputNumberProps } from './InputNumber';
|
|
55
|
-
export { default as Mask } from "./Mask";
|
|
56
|
-
export type { MaskProps } from "./Mask";
|
|
57
60
|
export { default as NavBar } from './NavBar';
|
|
58
61
|
export type { NavBarProps } from './NavBar';
|
|
59
62
|
export { default as NoticeBar } from './NoticeBar';
|
|
60
63
|
export type { NoticeBarProps } from './NoticeBar';
|
|
64
|
+
export { default as Overlay } from './Overlay';
|
|
65
|
+
export type { OverlayProps } from './Overlay';
|
|
61
66
|
export { default as PageIndicator } from './PageIndicator';
|
|
62
67
|
export type { PageIndicatorProps } from './PageIndicator';
|
|
63
68
|
export { default as Picker } from './Picker';
|
package/dist/index.js
CHANGED
|
@@ -5,13 +5,16 @@ export { default as Badge } from "./Badge";
|
|
|
5
5
|
export { default as Button } from "./Button";
|
|
6
6
|
export { default as Calendar, CalendarGrid, TouchableCalendarGrid } from "./Calendar";
|
|
7
7
|
export { default as CalendarDatetimePicker } from "./CalendarDatetimePicker";
|
|
8
|
-
export { default as
|
|
8
|
+
export { default as CalendarDatetimePopup } from "./CalendarDatetimePopup";
|
|
9
|
+
export { default as CalendarPopup } from "./CalendarPopup";
|
|
9
10
|
export { default as Card } from "./Card";
|
|
10
11
|
export { default as CascaderPicker } from "./CascaderPicker";
|
|
12
|
+
export { default as CascaderPopup } from "./CascaderPopup";
|
|
11
13
|
export { default as CascaderView } from "./CascaderView";
|
|
12
14
|
export { default as Cell } from "./Cell";
|
|
13
15
|
export { default as Checkbox } from "./Checkbox";
|
|
14
16
|
export { default as ConfigProvider } from "./ConfigProvider";
|
|
17
|
+
export { default as DatePicker } from "./DatePicker";
|
|
15
18
|
export { default as Descriptions } from "./Descriptions";
|
|
16
19
|
export { default as Divider } from "./Divider";
|
|
17
20
|
export { default as Ellipsis } from "./Ellipsis";
|
|
@@ -25,9 +28,9 @@ export { default as ImagesPreview } from "./ImagesPreview";
|
|
|
25
28
|
export { default as ImagesWall } from "./ImagesWall";
|
|
26
29
|
export { default as Input } from "./Input";
|
|
27
30
|
export { default as InputNumber } from "./InputNumber";
|
|
28
|
-
export { default as Mask } from "./Mask";
|
|
29
31
|
export { default as NavBar } from "./NavBar";
|
|
30
32
|
export { default as NoticeBar } from "./NoticeBar";
|
|
33
|
+
export { default as Overlay } from "./Overlay";
|
|
31
34
|
export { default as PageIndicator } from "./PageIndicator";
|
|
32
35
|
export { default as Picker } from "./Picker";
|
|
33
36
|
export { default as PickerView } from "./PickerView";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trionesdev/antd-taro-react",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.8",
|
|
4
4
|
"description": "antd taro react",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@tarojs/react": "^4.1.8",
|
|
30
30
|
"@tarojs/taro": "^4.1.8",
|
|
31
31
|
"classnames": "^2.5.1",
|
|
32
|
-
"lodash-es": "
|
|
32
|
+
"lodash-es": "4.17.23",
|
|
33
33
|
"react": ">=16.9.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -52,12 +52,13 @@
|
|
|
52
52
|
"@types/react": "^18.0.0",
|
|
53
53
|
"classnames": "^2.5.1",
|
|
54
54
|
"father": "^4.6.9",
|
|
55
|
-
"lodash-es": "^4.17.
|
|
55
|
+
"lodash-es": "^4.17.23"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@tarojs/components": "^4.1.8",
|
|
59
|
-
"@trionesdev/antd-mobile-base-react": "^0.0.2-beta.
|
|
59
|
+
"@trionesdev/antd-mobile-base-react": "^0.0.2-beta.8",
|
|
60
60
|
"crypto-js": "^4.2.0",
|
|
61
|
+
"dayjs": "^1.11.19",
|
|
61
62
|
"rc-field-form": "^2.7.0",
|
|
62
63
|
"rc-util": "^5.44.3",
|
|
63
64
|
"react": "^18.0.0",
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
},
|
|
66
67
|
"optionalDependencies": {
|
|
67
68
|
"@trionesdev/antd-mobile-base-react": "workspace:*",
|
|
68
|
-
"@trionesdev/antd-mobile-icons-react": "0.0.2-beta.
|
|
69
|
+
"@trionesdev/antd-mobile-icons-react": "0.0.2-beta.8"
|
|
69
70
|
},
|
|
70
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "f88406f6bb2af29bd4f8f470adb1d029f7787242"
|
|
71
72
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CalendarPicker as InternalCalendarPicker } from "./calendar-picker";
|
|
2
|
-
import { CalendarRangePicker } from "./calendar-range-picker";
|
|
3
|
-
import { CalendarPickerProps } from "./types";
|
|
4
|
-
type CompoundedComponent = typeof InternalCalendarPicker & {
|
|
5
|
-
Range: typeof CalendarRangePicker;
|
|
6
|
-
};
|
|
7
|
-
declare const CalendarPicker: CompoundedComponent;
|
|
8
|
-
export type { CalendarPickerProps };
|
|
9
|
-
export default CalendarPicker;
|
package/dist/Mask/index.d.ts
DELETED
package/dist/Mask/index.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import { Size } from "./types";
|
|
3
|
-
import "./style.scss";
|
|
4
|
-
import { PercentPositionAlign, ProgressStatus } from "./types";
|
|
5
|
-
import "./style.scss";
|
|
6
|
-
export type ProgressProps = {
|
|
7
|
-
/**
|
|
8
|
-
* @description 内容的模板函数
|
|
9
|
-
* @default percent => `${percent}%`
|
|
10
|
-
*/
|
|
11
|
-
format?: (percent: number) => string;
|
|
12
|
-
type?: 'line' | 'circle';
|
|
13
|
-
/**
|
|
14
|
-
* @description 百分比
|
|
15
|
-
* @default 0
|
|
16
|
-
*/
|
|
17
|
-
percent?: number;
|
|
18
|
-
size?: Size;
|
|
19
|
-
/**
|
|
20
|
-
* @description 是否显示进度数值或状态图标
|
|
21
|
-
* @default true
|
|
22
|
-
*/
|
|
23
|
-
showInfo?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* @description 未完成的分段的颜色
|
|
26
|
-
*/
|
|
27
|
-
railColor?: string;
|
|
28
|
-
/**
|
|
29
|
-
* @description 进度条的色彩
|
|
30
|
-
*/
|
|
31
|
-
strokeColor?: string;
|
|
32
|
-
strokeWidth?: number;
|
|
33
|
-
status?: ProgressStatus;
|
|
34
|
-
/**
|
|
35
|
-
* @description 进度数值位置
|
|
36
|
-
*/
|
|
37
|
-
percentPositionAlign?: PercentPositionAlign;
|
|
38
|
-
};
|
|
39
|
-
export declare const Progress: FC<ProgressProps>;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ProgressCircle } from "./ProgressCircle";
|
|
3
|
-
import "./style.scss";
|
|
4
|
-
import { ProgressLine } from "./ProgressLine";
|
|
5
|
-
import { exceptionColor, successColor } from "./types";
|
|
6
|
-
import "./style.scss";
|
|
7
|
-
export var Progress = function Progress(_ref) {
|
|
8
|
-
var format = _ref.format,
|
|
9
|
-
_ref$type = _ref.type,
|
|
10
|
-
type = _ref$type === void 0 ? 'line' : _ref$type,
|
|
11
|
-
_ref$percent = _ref.percent,
|
|
12
|
-
percent = _ref$percent === void 0 ? 0 : _ref$percent,
|
|
13
|
-
_ref$size = _ref.size,
|
|
14
|
-
size = _ref$size === void 0 ? 'middle' : _ref$size,
|
|
15
|
-
_ref$showInfo = _ref.showInfo,
|
|
16
|
-
showInfo = _ref$showInfo === void 0 ? true : _ref$showInfo,
|
|
17
|
-
_ref$railColor = _ref.railColor,
|
|
18
|
-
railColor = _ref$railColor === void 0 ? '#E5E5E5' : _ref$railColor,
|
|
19
|
-
_ref$strokeColor = _ref.strokeColor,
|
|
20
|
-
strokeColor = _ref$strokeColor === void 0 ? '#1777FF' : _ref$strokeColor,
|
|
21
|
-
_ref$strokeWidth = _ref.strokeWidth,
|
|
22
|
-
strokeWidth = _ref$strokeWidth === void 0 ? 6 : _ref$strokeWidth,
|
|
23
|
-
status = _ref.status,
|
|
24
|
-
percentPositionAlign = _ref.percentPositionAlign;
|
|
25
|
-
var handleComputedStrokeColor = function handleComputedStrokeColor() {
|
|
26
|
-
if (status === 'exception') {
|
|
27
|
-
return exceptionColor;
|
|
28
|
-
}
|
|
29
|
-
if (percent >= 100) {
|
|
30
|
-
return successColor;
|
|
31
|
-
}
|
|
32
|
-
return strokeColor;
|
|
33
|
-
};
|
|
34
|
-
if (type === 'line') {
|
|
35
|
-
return /*#__PURE__*/React.createElement(ProgressLine, {
|
|
36
|
-
format: format,
|
|
37
|
-
percent: percent,
|
|
38
|
-
size: size,
|
|
39
|
-
railColor: railColor,
|
|
40
|
-
strokeColor: handleComputedStrokeColor(),
|
|
41
|
-
status: status,
|
|
42
|
-
showInfo: showInfo,
|
|
43
|
-
percentPositionAlign: percentPositionAlign
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return /*#__PURE__*/React.createElement(ProgressCircle, {
|
|
47
|
-
format: format,
|
|
48
|
-
percent: percent,
|
|
49
|
-
size: size,
|
|
50
|
-
railColor: railColor,
|
|
51
|
-
strokeColor: handleComputedStrokeColor(),
|
|
52
|
-
strokeWidth: strokeWidth,
|
|
53
|
-
showInfo: showInfo,
|
|
54
|
-
status: status
|
|
55
|
-
});
|
|
56
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import { Size } from "./types";
|
|
3
|
-
import { ProgressStatus } from "./types";
|
|
4
|
-
type ProcessCircleProps = {
|
|
5
|
-
format?: (percent: number) => string;
|
|
6
|
-
percent?: number;
|
|
7
|
-
strokeWidth?: number;
|
|
8
|
-
size?: Size;
|
|
9
|
-
showInfo?: boolean;
|
|
10
|
-
railColor?: string;
|
|
11
|
-
strokeColor?: string;
|
|
12
|
-
strokeLineCap?: 'butt' | 'round' | 'square';
|
|
13
|
-
status?: ProgressStatus;
|
|
14
|
-
};
|
|
15
|
-
export declare const ProgressCircle: FC<ProcessCircleProps>;
|
|
16
|
-
export {};
|