@trionesdev/antd-taro-react 0.0.2-beta.2 → 0.0.2-beta.21
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/Button/button.d.ts +2 -1
- package/dist/Button/button.js +2 -3
- package/dist/Button/style.scss +65 -50
- package/dist/Calendar/calendar-grid.d.ts +10 -9
- package/dist/Calendar/calendar-grid.js +37 -62
- package/dist/Calendar/calendar-header.d.ts +3 -2
- package/dist/Calendar/calendar-header.js +9 -6
- package/dist/Calendar/calendar-range.d.ts +4 -3
- package/dist/Calendar/calendar-range.js +22 -18
- package/dist/Calendar/calendar.d.ts +5 -4
- package/dist/Calendar/calendar.js +30 -17
- package/dist/Calendar/style.scss +8 -5
- package/dist/Calendar/touchable-calendar-grid.d.ts +6 -5
- package/dist/Calendar/touchable-calendar-grid.js +87 -86
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +3 -2
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.js +40 -57
- package/dist/CalendarDatetimePicker/DateTimeSwitch.d.ts +3 -2
- package/dist/CalendarDatetimePicker/DateTimeSwitch.js +2 -2
- package/dist/CalendarDatetimePicker/style.scss +11 -3
- package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.d.ts +9 -0
- package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.js +60 -0
- package/dist/CalendarDatetimePickerCell/index.d.ts +3 -0
- package/dist/CalendarDatetimePickerCell/index.js +2 -0
- package/dist/CalendarPicker/{calendar-picker.js → CalendarPicker.js} +10 -6
- package/dist/CalendarPicker/{calendar-range-picker.js → CalendarRangePicker.js} +8 -6
- package/dist/CalendarPicker/index.d.ts +3 -4
- package/dist/CalendarPicker/index.js +2 -2
- package/dist/CalendarPicker/style.scss +7 -6
- package/dist/CalendarPicker/types.d.ts +8 -6
- package/dist/CalendarPicker/types.js +1 -1
- package/dist/CalendarPickerCell/CalendarPickerCell.d.ts +11 -0
- package/dist/CalendarPickerCell/CalendarPickerCell.js +54 -0
- package/dist/CalendarPickerCell/CalendarRangePickerCell.d.ts +11 -0
- package/dist/CalendarPickerCell/CalendarRangePickerCell.js +56 -0
- package/dist/CalendarPickerCell/index.d.ts +8 -0
- package/dist/CalendarPickerCell/index.js +5 -0
- package/dist/CascaderPicker/cascader-picker.d.ts +27 -0
- package/dist/CascaderPicker/cascader-picker.js +90 -0
- package/dist/CascaderPicker/index.d.ts +1 -1
- package/dist/CascaderPicker/index.js +1 -1
- package/dist/CascaderPicker/style.scss +45 -0
- package/dist/CascaderPickerCell/CascaderPickerCell.d.ts +20 -0
- package/dist/CascaderPickerCell/CascaderPickerCell.js +70 -0
- package/dist/CascaderPickerCell/index.d.ts +3 -0
- package/dist/CascaderPickerCell/index.js +2 -0
- package/dist/DatePicker/DatePicker.d.ts +18 -0
- package/dist/DatePicker/DatePicker.js +310 -0
- package/dist/DatePicker/index.d.ts +4 -0
- package/dist/DatePicker/index.js +3 -0
- package/dist/DatePicker/style.scss +41 -0
- package/dist/DatePicker/types.d.ts +1 -0
- package/dist/DatePicker/types.js +1 -0
- package/dist/DatePickerCell/DatePickerCell.d.ts +16 -0
- package/dist/DatePickerCell/DatePickerCell.js +78 -0
- package/dist/DatePickerCell/index.d.ts +3 -0
- package/dist/DatePickerCell/index.js +2 -0
- package/dist/FetchPicker/FetchPicker.d.ts +78 -0
- package/dist/FetchPicker/FetchPicker.js +310 -0
- package/dist/FetchPicker/index.d.ts +4 -0
- package/dist/FetchPicker/index.js +3 -0
- package/dist/FetchPicker/styles.scss +130 -0
- package/dist/FloatButton/FloatButton.d.ts +19 -0
- package/dist/FloatButton/FloatButton.js +60 -0
- package/dist/FloatButton/FloatButtonGroup.d.ts +21 -0
- package/dist/FloatButton/FloatButtonGroup.js +141 -0
- package/dist/FloatButton/context.d.ts +10 -0
- package/dist/FloatButton/context.js +2 -0
- package/dist/FloatButton/index.d.ts +10 -0
- package/dist/FloatButton/index.js +5 -0
- package/dist/FloatButton/style.scss +126 -0
- package/dist/Form/FormItem/form-item-content.d.ts +17 -0
- package/dist/Form/FormItem/form-item-content.js +39 -0
- package/dist/Form/FormItem/form-item-label.d.ts +13 -0
- package/dist/Form/FormItem/form-item-label.js +29 -0
- package/dist/Form/FormItem/form-item.d.ts +23 -0
- package/dist/Form/FormItem/form-item.js +77 -0
- package/dist/Form/FormItem/index.d.ts +5 -0
- package/dist/Form/FormItem/index.js +3 -0
- package/dist/Form/index.d.ts +9 -2
- package/dist/Form/index.js +5 -1
- package/dist/Form/style.scss +100 -0
- package/dist/FormCell/index.d.ts +3 -0
- package/dist/FormCell/index.js +2 -0
- package/dist/ImagesPreview/ImagesPreview.js +4 -3
- package/dist/ImagesWall/ImagesWall.js +1 -1
- package/dist/Input/index.d.ts +17 -2
- package/dist/Input/index.js +13 -1
- package/dist/Input/index.scss +282 -0
- package/dist/Input/input-affix-wrapper.d.ts +13 -0
- package/dist/Input/input-affix-wrapper.js +37 -0
- package/dist/Input/input-digit.d.ts +7 -0
- package/dist/Input/input-digit.js +53 -0
- package/dist/Input/input-number.d.ts +7 -0
- package/dist/Input/input-number.js +50 -0
- package/dist/Input/input-opt.d.ts +16 -0
- package/dist/Input/input-opt.js +87 -0
- package/dist/Input/input-password.d.ts +8 -0
- package/dist/Input/input-password.js +49 -0
- package/dist/Input/input.d.ts +3 -0
- package/dist/Input/input.js +7 -0
- package/dist/Input/taro-input.d.ts +8 -0
- package/dist/Input/taro-input.js +70 -0
- package/dist/Input/textarea.d.ts +15 -0
- package/dist/Input/textarea.js +52 -0
- package/dist/Input/types.d.ts +20 -0
- package/dist/Input/types.js +2 -0
- package/dist/Loading/index.d.ts +4 -0
- package/dist/Loading/index.js +3 -0
- package/dist/Overlay/Overlay.d.ts +17 -0
- package/dist/Overlay/Overlay.js +100 -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 +27 -0
- package/dist/Picker/Picker.js +100 -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 +48 -0
- package/dist/Popup/Popup.js +135 -0
- package/dist/Popup/index.d.ts +2 -1
- package/dist/Popup/index.js +2 -1
- package/dist/Popup/style.scss +126 -0
- package/dist/Progress/index.d.ts +1 -1
- package/dist/Progress/index.js +1 -1
- package/dist/Segmented/index.d.ts +3 -0
- package/dist/Segmented/index.js +2 -0
- package/dist/SideBar/side-bar.js +3 -2
- package/dist/SideBar/style.scss +6 -6
- package/dist/Stepper/index.d.ts +3 -0
- package/dist/Stepper/index.js +2 -0
- 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/VerificationCodeInput/index.d.ts +2 -2
- package/dist/VerificationCodeInput/index.js +1 -1
- package/dist/VerificationCodeInput/style.scss +20 -0
- package/dist/VerificationCodeInput/verification-code-input.d.ts +24 -0
- package/dist/VerificationCodeInput/verification-code-input.js +99 -0
- package/dist/index.d.ts +28 -7
- package/dist/index.js +12 -2
- package/dist/style/variable.scss +33 -0
- package/dist/types.d.ts +0 -1
- package/dist/utils/dayjs.d.ts +4 -0
- package/dist/utils/dayjs.js +42 -0
- package/package.json +25 -30
- package/dist/Mask/index.d.ts +0 -3
- package/dist/Mask/index.js +0 -2
- package/dist/Progress/Progress.d.ts +0 -38
- package/dist/Progress/Progress.js +0 -53
- package/dist/Progress/ProgressCircle.d.ts +0 -16
- package/dist/Progress/ProgressCircle.js +0 -147
- 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 -4
- package/dist/Progress/types.js +0 -2
- package/dist/SpinLoading/index.d.ts +0 -3
- package/dist/SpinLoading/index.js +0 -2
- /package/dist/CalendarPicker/{calendar-picker.d.ts → CalendarPicker.d.ts} +0 -0
- /package/dist/CalendarPicker/{calendar-range-picker.d.ts → CalendarRangePicker.d.ts} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
import { pickerViewCls } from "./types";
|
|
8
|
+
import React, { useMemo } from "react";
|
|
9
|
+
import classNames from "classnames";
|
|
10
|
+
import { PickerView as TaroPickerView, PickerViewColumn as TaroPickerViewColumn, View } from "@tarojs/components";
|
|
11
|
+
import "./style.scss";
|
|
12
|
+
export var PickerView = function PickerView(_ref) {
|
|
13
|
+
var className = _ref.className,
|
|
14
|
+
style = _ref.style,
|
|
15
|
+
columns = _ref.columns,
|
|
16
|
+
_ref$height = _ref.height,
|
|
17
|
+
height = _ref$height === void 0 ? 300 : _ref$height,
|
|
18
|
+
labelInValue = _ref.labelInValue,
|
|
19
|
+
value = _ref.value,
|
|
20
|
+
onChange = _ref.onChange;
|
|
21
|
+
var handleChange = function handleChange(e) {
|
|
22
|
+
var changedValue = e.detail.value;
|
|
23
|
+
var newValue = Array(changedValue.length).fill(null);
|
|
24
|
+
changedValue.forEach(function (v, index) {
|
|
25
|
+
var columnOptions = columns === null || columns === void 0 ? void 0 : columns[index];
|
|
26
|
+
if (columnOptions) {
|
|
27
|
+
var option = columnOptions[v];
|
|
28
|
+
if (option) {
|
|
29
|
+
newValue[index] = labelInValue ? option : option.value;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
onChange === null || onChange === void 0 || onChange(newValue);
|
|
34
|
+
};
|
|
35
|
+
var innerValue = useMemo(function () {
|
|
36
|
+
var valueInit = Array(columns === null || columns === void 0 ? void 0 : columns.length).fill(0);
|
|
37
|
+
value === null || value === void 0 || value.forEach(function (v, index) {
|
|
38
|
+
var columnOptions = columns === null || columns === void 0 ? void 0 : columns[index];
|
|
39
|
+
if (columnOptions) {
|
|
40
|
+
var optionIndex = columnOptions.findIndex(function (option) {
|
|
41
|
+
return labelInValue ? option.value === v.value : option.value === v;
|
|
42
|
+
});
|
|
43
|
+
if (optionIndex > 0) {
|
|
44
|
+
valueInit[index] = optionIndex;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return valueInit;
|
|
49
|
+
}, [value]);
|
|
50
|
+
return /*#__PURE__*/React.createElement(TaroPickerView, {
|
|
51
|
+
className: classNames(pickerViewCls, className),
|
|
52
|
+
style: _objectSpread(_objectSpread({
|
|
53
|
+
width: '100%'
|
|
54
|
+
}, style), {}, {
|
|
55
|
+
height: height
|
|
56
|
+
}),
|
|
57
|
+
indicatorStyle: 'height: 32px;',
|
|
58
|
+
value: innerValue,
|
|
59
|
+
onChange: handleChange
|
|
60
|
+
}, columns === null || columns === void 0 ? void 0 : columns.map(function (columnOptions, index) {
|
|
61
|
+
return /*#__PURE__*/React.createElement(TaroPickerViewColumn, {
|
|
62
|
+
className: classNames("".concat(pickerViewCls, "-column")),
|
|
63
|
+
key: index
|
|
64
|
+
}, columnOptions.map(function (option, index) {
|
|
65
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
66
|
+
key: "pvoi-".concat(index),
|
|
67
|
+
className: classNames("".concat(pickerViewCls, "-column-item"))
|
|
68
|
+
}, option.label);
|
|
69
|
+
}));
|
|
70
|
+
}));
|
|
71
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PickerView
|
|
2
|
-
export type { PickerViewProps, PickerColumnOption };
|
|
1
|
+
import { PickerView } from "./PickerView";
|
|
2
|
+
export type { PickerViewProps, PickerColumnOption } from "./types";
|
|
3
3
|
export default PickerView;
|
package/dist/PickerView/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PickerView } from "
|
|
1
|
+
import { PickerView } from "./PickerView";
|
|
2
2
|
export default PickerView;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const pickerViewCls = "triones-antm-picker-view";
|
|
3
|
+
export type PickerColumnOption = {
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
value?: any;
|
|
6
|
+
};
|
|
7
|
+
export type PickerViewProps = {
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
columns?: PickerColumnOption[][];
|
|
11
|
+
height?: number;
|
|
12
|
+
labelInValue?: boolean;
|
|
13
|
+
value?: any[];
|
|
14
|
+
onChange?: (value: any[]) => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var pickerViewCls = "triones-antm-picker-view";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from "react";
|
|
2
|
+
export type PopupProps = {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
title?: React.ReactNode;
|
|
5
|
+
position?: 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
6
|
+
/**
|
|
7
|
+
* @description 弹窗高度,当position 为 `top`或`bottom` 时生效
|
|
8
|
+
* @default null
|
|
9
|
+
*/
|
|
10
|
+
height?: number | string;
|
|
11
|
+
/**
|
|
12
|
+
* @description 弹窗宽度,当position 为 `left`或`right` 时生效
|
|
13
|
+
* @default null
|
|
14
|
+
*/
|
|
15
|
+
width?: number | string;
|
|
16
|
+
backable?: boolean;
|
|
17
|
+
backIcon?: React.ReactNode;
|
|
18
|
+
closable?: boolean;
|
|
19
|
+
closeIcon?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* @description 点击遮罩层是否关闭
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
showOverlay?: boolean;
|
|
25
|
+
overlayClosable?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @description 关闭的时候销毁组件
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
destroyOnHidden?: boolean;
|
|
31
|
+
onClose?: () => void;
|
|
32
|
+
onBack?: () => void;
|
|
33
|
+
afterClose?: () => void;
|
|
34
|
+
afterOpenChange?: (open: boolean) => void;
|
|
35
|
+
className?: string;
|
|
36
|
+
style?: React.CSSProperties;
|
|
37
|
+
round?: boolean;
|
|
38
|
+
zIndex?: number;
|
|
39
|
+
duration?: number;
|
|
40
|
+
styles?: {
|
|
41
|
+
overlay?: React.CSSProperties;
|
|
42
|
+
container?: React.CSSProperties;
|
|
43
|
+
header?: React.CSSProperties;
|
|
44
|
+
title?: React.CSSProperties;
|
|
45
|
+
body?: React.CSSProperties;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare const Popup: React.FC<PropsWithChildren<PopupProps>>;
|
|
@@ -0,0 +1,135 @@
|
|
|
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
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."); }
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
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; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import React, { useEffect, useState } from "react";
|
|
14
|
+
import { RootPortal, View } from "@tarojs/components";
|
|
15
|
+
import classNames from "classnames";
|
|
16
|
+
import { CloseOutline, LeftOutline } from "@trionesdev/antd-mobile-icons-react";
|
|
17
|
+
var cls = 'triones-antm-popup';
|
|
18
|
+
export var Popup = function Popup(_ref) {
|
|
19
|
+
var children = _ref.children,
|
|
20
|
+
_ref$open = _ref.open,
|
|
21
|
+
open = _ref$open === void 0 ? false : _ref$open,
|
|
22
|
+
title = _ref.title,
|
|
23
|
+
_ref$position = _ref.position,
|
|
24
|
+
position = _ref$position === void 0 ? 'bottom' : _ref$position,
|
|
25
|
+
height = _ref.height,
|
|
26
|
+
width = _ref.width,
|
|
27
|
+
_ref$backable = _ref.backable,
|
|
28
|
+
backable = _ref$backable === void 0 ? false : _ref$backable,
|
|
29
|
+
backIcon = _ref.backIcon,
|
|
30
|
+
_ref$closable = _ref.closable,
|
|
31
|
+
closable = _ref$closable === void 0 ? false : _ref$closable,
|
|
32
|
+
closeIcon = _ref.closeIcon,
|
|
33
|
+
_ref$showOverlay = _ref.showOverlay,
|
|
34
|
+
showOverlay = _ref$showOverlay === void 0 ? true : _ref$showOverlay,
|
|
35
|
+
_ref$overlayClosable = _ref.overlayClosable,
|
|
36
|
+
overlayClosable = _ref$overlayClosable === void 0 ? true : _ref$overlayClosable,
|
|
37
|
+
_ref$destroyOnHidden = _ref.destroyOnHidden,
|
|
38
|
+
destroyOnHidden = _ref$destroyOnHidden === void 0 ? false : _ref$destroyOnHidden,
|
|
39
|
+
onClose = _ref.onClose,
|
|
40
|
+
onBack = _ref.onBack,
|
|
41
|
+
afterClose = _ref.afterClose,
|
|
42
|
+
afterOpenChange = _ref.afterOpenChange,
|
|
43
|
+
_ref$round = _ref.round,
|
|
44
|
+
round = _ref$round === void 0 ? false : _ref$round,
|
|
45
|
+
_ref$zIndex = _ref.zIndex,
|
|
46
|
+
zIndex = _ref$zIndex === void 0 ? 998 : _ref$zIndex,
|
|
47
|
+
_ref$duration = _ref.duration,
|
|
48
|
+
duration = _ref$duration === void 0 ? 300 : _ref$duration,
|
|
49
|
+
styles = _ref.styles;
|
|
50
|
+
var _useState = useState(open),
|
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
+
render = _useState2[0],
|
|
53
|
+
setRender = _useState2[1];
|
|
54
|
+
var _useState3 = useState(open || false),
|
|
55
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
56
|
+
internalOpen = _useState4[0],
|
|
57
|
+
setInternalOpen = _useState4[1];
|
|
58
|
+
var handleBack = function handleBack() {
|
|
59
|
+
setInternalOpen(false);
|
|
60
|
+
onBack === null || onBack === void 0 || onBack();
|
|
61
|
+
};
|
|
62
|
+
var handleClose = function handleClose() {
|
|
63
|
+
setInternalOpen(false);
|
|
64
|
+
onClose === null || onClose === void 0 || onClose();
|
|
65
|
+
};
|
|
66
|
+
useEffect(function () {
|
|
67
|
+
if (internalOpen) {
|
|
68
|
+
setRender(true);
|
|
69
|
+
afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(true);
|
|
70
|
+
var timer = setTimeout(function () {}, 50);
|
|
71
|
+
return function () {
|
|
72
|
+
return clearTimeout(timer);
|
|
73
|
+
};
|
|
74
|
+
} else {
|
|
75
|
+
afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(false);
|
|
76
|
+
var _timer = setTimeout(function () {
|
|
77
|
+
setRender(false);
|
|
78
|
+
afterClose === null || afterClose === void 0 || afterClose();
|
|
79
|
+
}, duration);
|
|
80
|
+
if (destroyOnHidden) {
|
|
81
|
+
setRender(false);
|
|
82
|
+
}
|
|
83
|
+
return function () {
|
|
84
|
+
return clearTimeout(_timer);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}, [internalOpen]);
|
|
88
|
+
useEffect(function () {
|
|
89
|
+
if (open === undefined) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (open !== internalOpen) {
|
|
93
|
+
setInternalOpen(open);
|
|
94
|
+
}
|
|
95
|
+
}, [open]);
|
|
96
|
+
if (!render) return null;
|
|
97
|
+
return /*#__PURE__*/React.createElement(RootPortal, null, /*#__PURE__*/React.createElement(View, {
|
|
98
|
+
catchMove: true,
|
|
99
|
+
className: classNames("".concat(cls), _defineProperty({}, "".concat(cls, "-open"), internalOpen)),
|
|
100
|
+
style: {
|
|
101
|
+
zIndex: zIndex,
|
|
102
|
+
transitionDuration: "".concat(duration, "ms")
|
|
103
|
+
}
|
|
104
|
+
}, showOverlay && /*#__PURE__*/React.createElement(View, {
|
|
105
|
+
className: classNames("".concat(cls, "-overlay")),
|
|
106
|
+
onClick: function onClick(e) {
|
|
107
|
+
if (e.target === e.currentTarget) {
|
|
108
|
+
if (overlayClosable) {
|
|
109
|
+
handleClose();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
114
|
+
className: classNames("".concat(cls, "-container"), "".concat(cls, "-").concat(position), _defineProperty({}, "".concat(cls, "-round"), round)),
|
|
115
|
+
style: _objectSpread(_objectSpread({}, styles === null || styles === void 0 ? void 0 : styles.container), {}, {
|
|
116
|
+
width: width,
|
|
117
|
+
height: height
|
|
118
|
+
})
|
|
119
|
+
}, (title || backable || closable) && /*#__PURE__*/React.createElement("div", {
|
|
120
|
+
className: "".concat(cls, "-header"),
|
|
121
|
+
style: styles === null || styles === void 0 ? void 0 : styles.header
|
|
122
|
+
}, backable && /*#__PURE__*/React.createElement("div", {
|
|
123
|
+
className: "".concat(cls, "-header-back"),
|
|
124
|
+
onClick: handleBack
|
|
125
|
+
}, backIcon || /*#__PURE__*/React.createElement(LeftOutline, null)), title && /*#__PURE__*/React.createElement("div", {
|
|
126
|
+
className: "".concat(cls, "-header-title"),
|
|
127
|
+
style: styles === null || styles === void 0 ? void 0 : styles.title
|
|
128
|
+
}, title), closable && /*#__PURE__*/React.createElement("div", {
|
|
129
|
+
className: "".concat(cls, "-header-close"),
|
|
130
|
+
onClick: handleClose
|
|
131
|
+
}, closeIcon || /*#__PURE__*/React.createElement(CloseOutline, null))), /*#__PURE__*/React.createElement("div", {
|
|
132
|
+
className: "".concat(cls, "-body"),
|
|
133
|
+
style: styles === null || styles === void 0 ? void 0 : styles.body
|
|
134
|
+
}, children))));
|
|
135
|
+
};
|
package/dist/Popup/index.d.ts
CHANGED
package/dist/Popup/index.js
CHANGED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
|
|
3
|
+
$trionesPopupCls: 'triones-antm-popup';
|
|
4
|
+
|
|
5
|
+
.#{$trionesPopupCls} {
|
|
6
|
+
position: fixed;
|
|
7
|
+
top: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
right: 0;
|
|
11
|
+
touch-action: none;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
opacity: 0;
|
|
14
|
+
transition: opacity 0.3s ease;
|
|
15
|
+
|
|
16
|
+
&-open {
|
|
17
|
+
pointer-events: auto;
|
|
18
|
+
opacity: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-overlay {
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
background-color: rgba(0, 0, 0, .55);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-container {
|
|
28
|
+
position: fixed;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
background-color: white;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
&-header {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
padding-block: variable.$trionesPaddingContentVertical;
|
|
40
|
+
padding-inline: variable.$trionesPaddingContentHorizontal;
|
|
41
|
+
border-bottom: 1px solid variable.$trionesBorderColor;
|
|
42
|
+
&-title{
|
|
43
|
+
flex: 1;
|
|
44
|
+
text-align: center;
|
|
45
|
+
font-size: variable.$trionesFontSizeLg;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-body{
|
|
50
|
+
min-height: 0;
|
|
51
|
+
flex: 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&-top {
|
|
55
|
+
top: 0;
|
|
56
|
+
left: 0;
|
|
57
|
+
right: 0;
|
|
58
|
+
max-height: 100%;
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
&.#{$trionesPopupCls} {
|
|
62
|
+
&-round {
|
|
63
|
+
border-bottom-left-radius: variable.$trionesBorderRadiusLg;
|
|
64
|
+
border-bottom-right-radius: variable.$trionesBorderRadiusLg;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&-bottom {
|
|
70
|
+
bottom: 0;
|
|
71
|
+
left: 0;
|
|
72
|
+
right: 0;
|
|
73
|
+
max-height: 100%;
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
&.#{$trionesPopupCls} {
|
|
77
|
+
&-round {
|
|
78
|
+
border-top-left-radius: variable.$trionesBorderRadiusLg;
|
|
79
|
+
border-top-right-radius: variable.$trionesBorderRadiusLg;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&-left {
|
|
85
|
+
top: 0;
|
|
86
|
+
bottom: 0;
|
|
87
|
+
left: 0;
|
|
88
|
+
max-width: 100%;
|
|
89
|
+
|
|
90
|
+
&.#{$trionesPopupCls} {
|
|
91
|
+
&-round {
|
|
92
|
+
border-top-right-radius: variable.$trionesBorderRadiusLg;
|
|
93
|
+
border-bottom-right-radius: variable.$trionesBorderRadiusLg;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&-right {
|
|
99
|
+
top: 0;
|
|
100
|
+
bottom: 0;
|
|
101
|
+
right: 0;
|
|
102
|
+
max-width: 100%;
|
|
103
|
+
|
|
104
|
+
&.#{$trionesPopupCls} {
|
|
105
|
+
&-round {
|
|
106
|
+
border-top-left-radius: variable.$trionesBorderRadiusLg;
|
|
107
|
+
border-bottom-left-radius: variable.$trionesBorderRadiusLg;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-center {
|
|
113
|
+
top: 50%;
|
|
114
|
+
left: 50%;
|
|
115
|
+
transform: translate(-50%, -50%);
|
|
116
|
+
max-width: 100%;
|
|
117
|
+
max-height: 100%;
|
|
118
|
+
|
|
119
|
+
&.#{$trionesPopupCls} {
|
|
120
|
+
&-round {
|
|
121
|
+
border-radius: variable.$trionesBorderRadiusLg;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
}
|
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
|
});
|
package/dist/SideBar/style.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "../style/variable" as
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
2
|
|
|
3
3
|
$trionesSideBarCls: 'triones-antm-sidebar';
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ $trionesSideBarCls: 'triones-antm-sidebar';
|
|
|
9
9
|
|
|
10
10
|
&-tabs {
|
|
11
11
|
min-width: 0;
|
|
12
|
-
background-color:
|
|
12
|
+
background-color: variable.$trionesColorFill;
|
|
13
13
|
overflow: auto;
|
|
14
14
|
scrollbar-width: thin;
|
|
15
15
|
flex-shrink: 0;
|
|
@@ -17,12 +17,12 @@ $trionesSideBarCls: 'triones-antm-sidebar';
|
|
|
17
17
|
|
|
18
18
|
&-tab {
|
|
19
19
|
cursor: pointer;
|
|
20
|
-
padding:
|
|
21
|
-
color:
|
|
20
|
+
padding: variable.$trionesPadding variable.$trionesPadding;
|
|
21
|
+
color: variable.$trionesColorTextSecondary;
|
|
22
22
|
|
|
23
23
|
&-active {
|
|
24
|
-
color:
|
|
25
|
-
background-color:
|
|
24
|
+
color: variable.$trionesColorPrimaryText;
|
|
25
|
+
background-color: variable.$trionesColorBgBase;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
}
|
|
@@ -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;
|