@nutui/nutui-react-taro 2.0.0-beta.1 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/esm/ActionSheet.js +2 -2
- package/dist/esm/Address.js +3 -3
- package/dist/esm/Calendar/style/style.css +1 -1
- package/dist/esm/Calendar.js +3 -3
- package/dist/esm/CalendarItem.js +2 -1
- package/dist/esm/Cascader.js +2 -2
- package/dist/esm/DatePicker.js +3 -3
- package/dist/esm/Dialog/style/style.css +1 -1
- package/dist/esm/Elevator.js +1 -1
- package/dist/esm/ImagePreview.js +2 -2
- package/dist/esm/NavBar.js +1 -1
- package/dist/esm/NoticeBar.js +1 -1
- package/dist/esm/NumberKeyboard.js +2 -2
- package/dist/esm/Picker.js +2 -2
- package/dist/esm/Popover.js +3 -3
- package/dist/esm/Popup.js +1 -1
- package/dist/esm/SearchBar.js +1 -1
- package/dist/esm/ShortPassword.js +2 -2
- package/dist/esm/SideNavBar.js +2 -2
- package/dist/esm/TimeSelect.js +2 -2
- package/dist/esm/TrendArrow.js +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/VirtualList.js +1 -1
- package/dist/esm/{actionsheet.taro-06df0e47.js → actionsheet.taro-0fecc929.js} +3 -3
- package/dist/esm/{address.taro-09392335.js → address.taro-d4299225.js} +2 -2
- package/dist/esm/{calendar.taro-63544d95.js → calendar.taro-8bb4cb34.js} +8 -7
- package/dist/esm/{calendaritem.taro-c222ea25.js → calendaritem.taro-0262d6ab.js} +381 -281
- package/dist/esm/{cascader.taro-b5c1f5c6.js → cascader.taro-e929f24d.js} +3 -3
- package/dist/esm/{datepicker.taro-d04fc491.js → datepicker.taro-604222f0.js} +1 -1
- package/dist/esm/{elevator.taro-df8fde9d.js → elevator.taro-459f7322.js} +3 -3
- package/dist/esm/{imagepreview.taro-9e0c5171.js → imagepreview.taro-fad0448a.js} +1 -1
- package/dist/esm/{navbar.taro-5e1a0835.js → navbar.taro-f2d4215d.js} +2 -2
- package/dist/esm/{noticebar.taro-dc895cc5.js → noticebar.taro-2720ca1e.js} +2 -2
- package/dist/esm/{numberkeyboard.taro-f245cb85.js → numberkeyboard.taro-04a2f2c8.js} +2 -2
- package/dist/esm/nutui-react.es.js +27 -27
- package/dist/esm/{picker.taro-69fb40fe.js → picker.taro-86564e14.js} +1 -2
- package/dist/esm/{popover.taro-ae72d2de.js → popover.taro-cec3a7a0.js} +6 -6
- package/dist/esm/{popup.taro-23f882b0.js → popup.taro-1cd1f9d2.js} +5 -5
- package/dist/esm/{searchbar.taro-450d361d.js → searchbar.taro-842e985f.js} +2 -2
- package/dist/esm/{shortpassword.taro-ac22a29e.js → shortpassword.taro-b1b6c076.js} +3 -3
- package/dist/esm/{sidenavbar.taro-7bf8d265.js → sidenavbar.taro-61eaa60b.js} +1 -1
- package/dist/esm/{timeselect.taro-df7477a3.js → timeselect.taro-45ab9d52.js} +1 -1
- package/dist/esm/{trendarrow.taro-253025d2.js → trendarrow.taro-fa177b5c.js} +10 -10
- package/dist/esm/types/src/packages/calendar/calendar.d.ts +4 -6
- package/dist/esm/types/src/packages/calendar/calendar.taro.d.ts +4 -6
- package/dist/esm/types/src/packages/calendar/type.d.ts +13 -0
- package/dist/esm/types/src/packages/calendar/utils.d.ts +8 -0
- package/dist/esm/types/src/packages/calendaritem/calendaritem.d.ts +25 -27
- package/dist/esm/types/src/packages/calendaritem/calendaritem.taro.d.ts +26 -28
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
- package/dist/esm/types/src/packages/elevator/elevator.d.ts +2 -2
- package/dist/esm/types/src/packages/elevator/elevator.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/navbar/demo.d.ts +1 -0
- package/dist/esm/types/src/packages/navbar/demo.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/navbar/navbar.d.ts +1 -1
- package/dist/esm/types/src/packages/navbar/navbar.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +1 -1
- package/dist/esm/types/src/packages/noticebar/noticebar.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +3 -3
- package/dist/esm/types/src/packages/nutui.react.d.ts +5 -5
- package/dist/esm/types/src/packages/nutui.react.scss.d.ts +2 -2
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +5 -5
- package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +2 -2
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +3 -3
- package/dist/esm/types/src/packages/popover/popover.d.ts +2 -2
- package/dist/esm/types/src/packages/popover/popover.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/popup/popup.d.ts +2 -2
- package/dist/esm/types/src/packages/popup/popup.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +1 -1
- package/dist/esm/types/src/packages/searchbar/searchbar.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/trendarrow/trendarrow.d.ts +3 -3
- package/dist/esm/types/src/packages/trendarrow/trendarrow.taro.d.ts +3 -3
- package/dist/esm/types/src/packages/uploader/uploader.d.ts +1 -1
- package/dist/esm/types/src/packages/uploader/uploader.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +2 -2
- package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +2 -2
- package/dist/esm/types/src/utils/date.d.ts +19 -3
- package/dist/esm/{uploader.taro-ea2c7ab9.js → uploader.taro-d9add90e.js} +4 -4
- package/dist/esm/{virtuallist.taro-97d3403a.js → virtuallist.taro-1de01855.js} +3 -4
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +767 -677
- package/dist/nutui.react.umd.js +767 -677
- package/dist/packages/calendar/calendar.scss +4 -0
- package/dist/packages/dialog/dialog.scss +1 -1
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/themes/default.scss +2 -2
- package/dist/styles/variables-jmapp.scss +2 -2
- package/dist/styles/variables.scss +2 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/packages/calendar/calendar.taro.d.ts +8 -6
- package/dist/types/packages/calendar/type.d.ts +13 -0
- package/dist/types/packages/calendar/utils.d.ts +8 -0
- package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +26 -28
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/elevator/elevator.taro.d.ts +2 -2
- package/dist/types/packages/navbar/navbar.taro.d.ts +1 -1
- package/dist/types/packages/noticebar/noticebar.taro.d.ts +1 -1
- package/dist/types/packages/popover/popover.taro.d.ts +2 -2
- package/dist/types/packages/popup/popup.d.ts +2 -2
- package/dist/types/packages/popup/popup.taro.d.ts +2 -2
- package/dist/types/packages/searchbar/searchbar.taro.d.ts +1 -1
- package/dist/types/packages/trendarrow/trendarrow.taro.d.ts +3 -3
- package/dist/types/packages/uploader/uploader.taro.d.ts +1 -1
- package/dist/types/packages/virtuallist/virtuallist.taro.d.ts +2 -2
- package/dist/types/utils/date.d.ts +19 -3
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
import React, { useState, useEffect, isValidElement } from "react";
|
|
8
8
|
import classNames from "classnames";
|
|
9
9
|
import { Loading, Checklist } from "@nutui/icons-react-taro";
|
|
10
|
-
import { P as Popup } from "./popup.taro-
|
|
10
|
+
import { P as Popup } from "./popup.taro-1cd1f9d2.js";
|
|
11
11
|
import { T as Tabs } from "./tabs.taro-66164782.js";
|
|
12
12
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
13
13
|
import { u as usePropsValue } from "./use-props-value-7ac1b1b5.js";
|
|
@@ -434,8 +434,8 @@ const InternalCascader = (props, ref) => {
|
|
|
434
434
|
title: popup && props.title,
|
|
435
435
|
left: props.left,
|
|
436
436
|
// todo 只关闭,不处理逻辑。和popup的逻辑不一致。关闭时需要增加是否要处理回调
|
|
437
|
-
|
|
438
|
-
|
|
437
|
+
onOverlayClick: closePopup,
|
|
438
|
+
onCloseIconClick: closePopup
|
|
439
439
|
}, renderTabs()) : renderTabs());
|
|
440
440
|
};
|
|
441
441
|
const Cascader = React.forwardRef(InternalCascader);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect } from "react";
|
|
2
2
|
import { View } from "@tarojs/components";
|
|
3
|
-
import { P as Picker } from "./picker.taro-
|
|
3
|
+
import { P as Picker } from "./picker.taro-86564e14.js";
|
|
4
4
|
import { u as useConfig } from "./configprovider.taro-a7f3bcfd.js";
|
|
5
5
|
import { u as usePropsValue } from "./use-props-value-7ac1b1b5.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
@@ -16,7 +16,7 @@ const defaultProps = {
|
|
|
16
16
|
className: "weapp-elevator"
|
|
17
17
|
};
|
|
18
18
|
const Elevator = (props) => {
|
|
19
|
-
const { height, floorKey, list, sticky, spaceHeight, titleHeight, showKeys, className, style,
|
|
19
|
+
const { height, floorKey, list, sticky, spaceHeight, titleHeight, showKeys, className, style, onItemClick, onIndexClick, children, ...rest } = {
|
|
20
20
|
...defaultProps,
|
|
21
21
|
...props
|
|
22
22
|
};
|
|
@@ -106,12 +106,12 @@ const Elevator = (props) => {
|
|
|
106
106
|
scrollTo(index);
|
|
107
107
|
};
|
|
108
108
|
const handleClickItem = (key, item) => {
|
|
109
|
-
|
|
109
|
+
onItemClick && onItemClick(key, item);
|
|
110
110
|
setCurrentData(item);
|
|
111
111
|
setCurrentKey(key);
|
|
112
112
|
};
|
|
113
113
|
const handleClickIndex = (key) => {
|
|
114
|
-
|
|
114
|
+
onIndexClick && onIndexClick(key);
|
|
115
115
|
};
|
|
116
116
|
const setListGroup = () => {
|
|
117
117
|
if (listview.current) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect } from "react";
|
|
2
2
|
import Taro from "@tarojs/taro";
|
|
3
3
|
import { Video, Image } from "@tarojs/components";
|
|
4
|
-
import { P as Popup } from "./popup.taro-
|
|
4
|
+
import { P as Popup } from "./popup.taro-1cd1f9d2.js";
|
|
5
5
|
import { S as Swiper } from "./swiper.taro-4aeb8526.js";
|
|
6
6
|
import { S as SwiperItem } from "./swiperitem.taro-ef7342e8.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
@@ -12,7 +12,7 @@ const defaultProps = {
|
|
|
12
12
|
zIndex: 10
|
|
13
13
|
};
|
|
14
14
|
const NavBar = (props) => {
|
|
15
|
-
const { right, left, className, style, back, fixed, safeAreaInsetTop, placeholder, zIndex,
|
|
15
|
+
const { right, left, className, style, back, fixed, safeAreaInsetTop, placeholder, zIndex, onBackClick } = {
|
|
16
16
|
...defaultProps,
|
|
17
17
|
...props
|
|
18
18
|
};
|
|
@@ -28,7 +28,7 @@ const NavBar = (props) => {
|
|
|
28
28
|
return React.createElement(
|
|
29
29
|
"div",
|
|
30
30
|
{ className: `${classPrefix}__left` },
|
|
31
|
-
back && React.createElement("div", { className: `${classPrefix}__left__back`, onClick: (e) =>
|
|
31
|
+
back && React.createElement("div", { className: `${classPrefix}__left__back`, onClick: (e) => onBackClick(e) }, back),
|
|
32
32
|
left
|
|
33
33
|
);
|
|
34
34
|
};
|
|
@@ -19,7 +19,7 @@ const defaultProps = {
|
|
|
19
19
|
speed: 50
|
|
20
20
|
};
|
|
21
21
|
const NoticeBar = (props) => {
|
|
22
|
-
const { children, className, style, direction, list, duration, height, content, closeable, wrap, leftIcon, rightIcon, delay, scrollable, speed, close, click, onClose, onClick,
|
|
22
|
+
const { children, className, style, direction, list, duration, height, content, closeable, wrap, leftIcon, rightIcon, delay, scrollable, speed, close, click, onClose, onClick, onItemClick } = {
|
|
23
23
|
...defaultProps,
|
|
24
24
|
...props
|
|
25
25
|
};
|
|
@@ -260,7 +260,7 @@ const NoticeBar = (props) => {
|
|
|
260
260
|
});
|
|
261
261
|
};
|
|
262
262
|
const handleItemClick = (event, value) => {
|
|
263
|
-
|
|
263
|
+
onItemClick && onItemClick(event, value);
|
|
264
264
|
};
|
|
265
265
|
const getStyle = (moveOffset = offset) => {
|
|
266
266
|
const target = innerRef.current;
|
|
@@ -2,7 +2,7 @@ import React, { useMemo, useState } from "react";
|
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { RectDown } from "@nutui/icons-react-taro";
|
|
4
4
|
import { View } from "@tarojs/components";
|
|
5
|
-
import { P as Popup } from "./popup.taro-
|
|
5
|
+
import { P as Popup } from "./popup.taro-1cd1f9d2.js";
|
|
6
6
|
import { u as useConfig } from "./configprovider.taro-a7f3bcfd.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
8
8
|
const defaultProps = {
|
|
@@ -97,7 +97,7 @@ const NumberKeyboard = (props) => {
|
|
|
97
97
|
};
|
|
98
98
|
return React.createElement(
|
|
99
99
|
Popup,
|
|
100
|
-
{ visible, position: "bottom",
|
|
100
|
+
{ visible, position: "bottom", onOverlayClick: onClose, onCloseIconClick: onClose, overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }, ...rest },
|
|
101
101
|
React.createElement(
|
|
102
102
|
"div",
|
|
103
103
|
{ className: classNames(classPrefix, className), style },
|
|
@@ -12,52 +12,52 @@ import { L } from "./layout.taro-9659a928.js";
|
|
|
12
12
|
import { R } from "./row.taro-8b7febd4.js";
|
|
13
13
|
import { S } from "./sticky.taro-6bc62a96.js";
|
|
14
14
|
import { B as B2 } from "./backtop.taro-7de36464.js";
|
|
15
|
-
import { E } from "./elevator.taro-
|
|
15
|
+
import { E } from "./elevator.taro-459f7322.js";
|
|
16
16
|
import { F } from "./fixednav.taro-c905d63e.js";
|
|
17
|
-
import { N } from "./navbar.taro-
|
|
18
|
-
import { S as S2 } from "./sidenavbar.taro-
|
|
17
|
+
import { N } from "./navbar.taro-f2d4215d.js";
|
|
18
|
+
import { S as S2 } from "./sidenavbar.taro-61eaa60b.js";
|
|
19
19
|
import { S as S3 } from "./sidenavbaritem.taro-7d805f92.js";
|
|
20
20
|
import { S as S4 } from "./subsidenavbar.taro-47bb6e74.js";
|
|
21
21
|
import { T } from "./tabbar.taro-4f49ed90.js";
|
|
22
22
|
import { T as T2 } from "./tabbaritem.taro-16a380db.js";
|
|
23
23
|
import { T as T3 } from "./tabpane.taro-f8d92ece.js";
|
|
24
24
|
import { T as T4 } from "./tabs.taro-66164782.js";
|
|
25
|
-
import { A } from "./address.taro-
|
|
26
|
-
import { C as C5 } from "./calendar.taro-
|
|
27
|
-
import { C as C6 } from "./calendaritem.taro-
|
|
28
|
-
import { C as C7 } from "./cascader.taro-
|
|
25
|
+
import { A } from "./address.taro-d4299225.js";
|
|
26
|
+
import { C as C5 } from "./calendar.taro-8bb4cb34.js";
|
|
27
|
+
import { C as C6 } from "./calendaritem.taro-0262d6ab.js";
|
|
28
|
+
import { C as C7 } from "./cascader.taro-e929f24d.js";
|
|
29
29
|
import { C as C8, a } from "./checkbox.taro-303276d7.js";
|
|
30
|
-
import { D as D2 } from "./datepicker.taro-
|
|
30
|
+
import { D as D2 } from "./datepicker.taro-604222f0.js";
|
|
31
31
|
import { F as F2 } from "./form.taro-a348734b.js";
|
|
32
32
|
import { F as F3 } from "./formitem.taro-c9ded1ef.js";
|
|
33
33
|
import { I as I2 } from "./input.taro-a4c8fecb.js";
|
|
34
34
|
import { I as I3 } from "./inputnumber.taro-c4c0cfb3.js";
|
|
35
35
|
import { M } from "./menu.taro-40d36e0a.js";
|
|
36
36
|
import { M as M2 } from "./menuitem.taro-7f8c12cf.js";
|
|
37
|
-
import { N as N2 } from "./numberkeyboard.taro-
|
|
38
|
-
import { P } from "./picker.taro-
|
|
37
|
+
import { N as N2 } from "./numberkeyboard.taro-04a2f2c8.js";
|
|
38
|
+
import { P } from "./picker.taro-86564e14.js";
|
|
39
39
|
import { R as R2, a as a2 } from "./radio.taro-5d6ca4ad.js";
|
|
40
40
|
import { R as R3 } from "./range.taro-a1d1ad25.js";
|
|
41
41
|
import { R as R4 } from "./rate.taro-78c66969.js";
|
|
42
|
-
import { S as S5 } from "./searchbar.taro-
|
|
43
|
-
import { S as S6 } from "./shortpassword.taro-
|
|
42
|
+
import { S as S5 } from "./searchbar.taro-842e985f.js";
|
|
43
|
+
import { S as S6 } from "./shortpassword.taro-b1b6c076.js";
|
|
44
44
|
import { S as S7 } from "./signature.taro-4f68516a.js";
|
|
45
45
|
import { S as S8 } from "./switch.taro-f0da73a3.js";
|
|
46
46
|
import { T as T5 } from "./textarea.taro-6b6142cc.js";
|
|
47
|
-
import { U } from "./uploader.taro-
|
|
48
|
-
import { A as A2 } from "./actionsheet.taro-
|
|
47
|
+
import { U } from "./uploader.taro-d9add90e.js";
|
|
48
|
+
import { A as A2 } from "./actionsheet.taro-0fecc929.js";
|
|
49
49
|
import { B as B3 } from "./badge.taro-872605bf.js";
|
|
50
50
|
import { B as B4 } from "./dialog.taro-2c2ca662.js";
|
|
51
51
|
import { D as D3 } from "./drag.taro-48e1ff38.js";
|
|
52
52
|
import { E as E2 } from "./empty.taro-a670f621.js";
|
|
53
53
|
import { I as I4 } from "./infiniteloading.taro-59778aef.js";
|
|
54
|
-
import { N as N3 } from "./noticebar.taro-
|
|
54
|
+
import { N as N3 } from "./noticebar.taro-2720ca1e.js";
|
|
55
55
|
import { N as N4 } from "./notify.taro-5768403d.js";
|
|
56
|
-
import { P as P2 } from "./popover.taro-
|
|
57
|
-
import { P as P3 } from "./
|
|
56
|
+
import { P as P2 } from "./popover.taro-cec3a7a0.js";
|
|
57
|
+
import { P as P3 } from "./popup.taro-1cd1f9d2.js";
|
|
58
|
+
import { P as P4 } from "./pulltorefresh.taro-71ad5d15.js";
|
|
58
59
|
import { S as S9 } from "./skeleton.taro-79775802.js";
|
|
59
60
|
import { S as S10 } from "./swipe.taro-4eb0cc9a.js";
|
|
60
|
-
import { P as P4 } from "./popup.taro-23f882b0.js";
|
|
61
61
|
import { T as T6 } from "./toast.taro-85007ac8.js";
|
|
62
62
|
import { A as A3 } from "./animate.taro-c8b29242.js";
|
|
63
63
|
import { default as default2 } from "./AnimatingNumbers.js";
|
|
@@ -69,9 +69,8 @@ import { C as C10 } from "./collapse.taro-1d9e3bb2.js";
|
|
|
69
69
|
import { C as C11 } from "./collapseitem.taro-eac33538.js";
|
|
70
70
|
import { C as C12 } from "./countdown.taro-384168de.js";
|
|
71
71
|
import { E as E3 } from "./ellipsis.taro-5653d0b2.js";
|
|
72
|
-
import { I as I5 } from "./imagepreview.taro-
|
|
72
|
+
import { I as I5 } from "./imagepreview.taro-fad0448a.js";
|
|
73
73
|
import { I as I6 } from "./indicator.taro-edbc71df.js";
|
|
74
|
-
import { V } from "./virtuallist.taro-97d3403a.js";
|
|
75
74
|
import { P as P5 } from "./pagination.taro-0d851480.js";
|
|
76
75
|
import { P as P6 } from "./price.taro-479f1b82.js";
|
|
77
76
|
import { P as P7 } from "./progress.taro-437b9f6a.js";
|
|
@@ -81,12 +80,13 @@ import { S as S13 } from "./swiper.taro-4aeb8526.js";
|
|
|
81
80
|
import { S as S14 } from "./swiperitem.taro-ef7342e8.js";
|
|
82
81
|
import { T as T7 } from "./table.taro-4fd3bfe8.js";
|
|
83
82
|
import { T as T8 } from "./tag.taro-614758eb.js";
|
|
84
|
-
import { V
|
|
83
|
+
import { V } from "./video.taro-2a26d7da.js";
|
|
84
|
+
import { V as V2 } from "./virtuallist.taro-1de01855.js";
|
|
85
85
|
import { B as B5 } from "./barrage.taro-e87bc58e.js";
|
|
86
86
|
import { C as C13 } from "./card.taro-92fe9733.js";
|
|
87
87
|
import { T as T9 } from "./timedetail.taro-d7aa4c1b.js";
|
|
88
|
-
import { T as T10 } from "./timeselect.taro-
|
|
89
|
-
import { T as T11 } from "./trendarrow.taro-
|
|
88
|
+
import { T as T10 } from "./timeselect.taro-45ab9d52.js";
|
|
89
|
+
import { T as T11 } from "./trendarrow.taro-fa177b5c.js";
|
|
90
90
|
import { W } from "./watermark.taro-788cb452.js";
|
|
91
91
|
import "react";
|
|
92
92
|
import "classnames";
|
|
@@ -160,10 +160,10 @@ export {
|
|
|
160
160
|
P5 as Pagination,
|
|
161
161
|
P as Picker,
|
|
162
162
|
P2 as Popover,
|
|
163
|
-
|
|
163
|
+
P3 as Popup,
|
|
164
164
|
P6 as Price,
|
|
165
165
|
P7 as Progress,
|
|
166
|
-
|
|
166
|
+
P4 as PullToRefresh,
|
|
167
167
|
R2 as Radio,
|
|
168
168
|
a2 as RadioGroup,
|
|
169
169
|
R3 as Range,
|
|
@@ -195,7 +195,7 @@ export {
|
|
|
195
195
|
T6 as Toast,
|
|
196
196
|
T11 as TrendArrow,
|
|
197
197
|
U as Uploader,
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
V as Video,
|
|
199
|
+
V2 as VirtualList,
|
|
200
200
|
W as WaterMark
|
|
201
201
|
};
|
|
@@ -2,7 +2,7 @@ import React, { useState, useRef, useEffect, useImperativeHandle } from "react";
|
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import Taro from "@tarojs/taro";
|
|
4
4
|
import { View, PickerView, PickerViewColumn } from "@tarojs/components";
|
|
5
|
-
import { P as Popup } from "./popup.taro-
|
|
5
|
+
import { P as Popup } from "./popup.taro-1cd1f9d2.js";
|
|
6
6
|
import { u as useTouch } from "./use-touch-ff43512c.js";
|
|
7
7
|
import { g as getRectByTaro } from "./use-client-rect-2bb6c562.js";
|
|
8
8
|
import { c as canUseDom } from "./can-use-dom-0e539bd3.js";
|
|
@@ -429,7 +429,6 @@ const InternalPicker = (props, ref) => {
|
|
|
429
429
|
if (moving) {
|
|
430
430
|
isConfirmEvent.current = true;
|
|
431
431
|
} else {
|
|
432
|
-
console.log("picker confirmed", innerValue);
|
|
433
432
|
setSelectedValue(innerValue);
|
|
434
433
|
closePicker();
|
|
435
434
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { P as Popup } from "./popup.taro-23f882b0.js";
|
|
4
3
|
import Taro from "@tarojs/taro";
|
|
4
|
+
import { P as Popup } from "./popup.taro-1cd1f9d2.js";
|
|
5
5
|
import { a as getRect, g as getRectByTaro } from "./use-client-rect-2bb6c562.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
7
7
|
const defaultProps = {
|
|
@@ -14,8 +14,8 @@ const defaultProps = {
|
|
|
14
14
|
className: "",
|
|
15
15
|
showArrow: true,
|
|
16
16
|
overlay: false,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
closeOnOutsideClick: true,
|
|
18
|
+
closeOnActionClick: true,
|
|
19
19
|
onClick: () => {
|
|
20
20
|
},
|
|
21
21
|
onOpen: () => {
|
|
@@ -25,7 +25,7 @@ const defaultProps = {
|
|
|
25
25
|
};
|
|
26
26
|
const classPrefix = `nut-popover`;
|
|
27
27
|
const Popover = (props) => {
|
|
28
|
-
const { children, list, location, visible, offset, targetId, overlay,
|
|
28
|
+
const { children, list, location, visible, offset, targetId, overlay, closeOnOutsideClick, closeOnActionClick, className, showArrow, style, onClick, onOpen, onClose, onSelect, ...rest } = {
|
|
29
29
|
...defaultProps,
|
|
30
30
|
...props
|
|
31
31
|
};
|
|
@@ -80,7 +80,7 @@ const Popover = (props) => {
|
|
|
80
80
|
setElHeight(rectContent.height);
|
|
81
81
|
};
|
|
82
82
|
const clickAway = () => {
|
|
83
|
-
if (
|
|
83
|
+
if (closeOnOutsideClick) {
|
|
84
84
|
props.onClick && props.onClick();
|
|
85
85
|
onClose && onClose();
|
|
86
86
|
}
|
|
@@ -150,7 +150,7 @@ const Popover = (props) => {
|
|
|
150
150
|
if (!item.disabled) {
|
|
151
151
|
onSelect && onSelect(item, index);
|
|
152
152
|
}
|
|
153
|
-
if (
|
|
153
|
+
if (closeOnActionClick) {
|
|
154
154
|
props.onClick && props.onClick();
|
|
155
155
|
onClose && onClose();
|
|
156
156
|
}
|
|
@@ -23,13 +23,13 @@ const defaultProps = {
|
|
|
23
23
|
},
|
|
24
24
|
onClose: () => {
|
|
25
25
|
},
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
onOverlayClick: (e) => true,
|
|
27
|
+
onCloseIconClick: (e) => true,
|
|
28
28
|
...defaultOverlayProps
|
|
29
29
|
};
|
|
30
30
|
let _zIndex = 2e3;
|
|
31
31
|
const Popup = (props) => {
|
|
32
|
-
const { children, visible, overlay, closeOnOverlayClick, overlayStyle, overlayClassName, zIndex, lockScroll, duration, closeable, closeIconPosition, closeIcon, left, title, style, transition, round, position, className, destroyOnClose, portal, onOpen, onClose,
|
|
32
|
+
const { children, visible, overlay, closeOnOverlayClick, overlayStyle, overlayClassName, zIndex, lockScroll, duration, closeable, closeIconPosition, closeIcon, left, title, style, transition, round, position, className, destroyOnClose, portal, onOpen, onClose, onOverlayClick, onCloseIconClick, afterShow, afterClose, onClick } = props;
|
|
33
33
|
const [index, setIndex] = useState(zIndex || _zIndex);
|
|
34
34
|
const [innerVisible, setInnerVisible] = useState(visible);
|
|
35
35
|
const [showChildren, setShowChildren] = useState(true);
|
|
@@ -81,7 +81,7 @@ const Popup = (props) => {
|
|
|
81
81
|
const onHandleClickOverlay = (e) => {
|
|
82
82
|
e.stopPropagation();
|
|
83
83
|
if (closeOnOverlayClick) {
|
|
84
|
-
const closed =
|
|
84
|
+
const closed = onOverlayClick && onOverlayClick(e);
|
|
85
85
|
closed && close();
|
|
86
86
|
}
|
|
87
87
|
};
|
|
@@ -89,7 +89,7 @@ const Popup = (props) => {
|
|
|
89
89
|
onClick && onClick(e);
|
|
90
90
|
};
|
|
91
91
|
const onHandleClickCloseIcon = (e) => {
|
|
92
|
-
const closed =
|
|
92
|
+
const closed = onCloseIconClick && onCloseIconClick(e);
|
|
93
93
|
closed && close();
|
|
94
94
|
};
|
|
95
95
|
const onHandleOpened = (e) => {
|
|
@@ -21,7 +21,7 @@ const SearchBar = (props) => {
|
|
|
21
21
|
const { locale } = useConfig();
|
|
22
22
|
const searchRef = useRef(null);
|
|
23
23
|
const [value, setValue] = useState(() => props.value);
|
|
24
|
-
const { placeholder, shape, className, disabled, maxLength, clearable, readOnly, autoFocus, right, left, leftIn, rightIn, onChange, onFocus, onBlur, onClear, onSearch,
|
|
24
|
+
const { placeholder, shape, className, disabled, maxLength, clearable, readOnly, autoFocus, right, left, leftIn, rightIn, onChange, onFocus, onBlur, onClear, onSearch, onInputClick } = {
|
|
25
25
|
...defaultProps,
|
|
26
26
|
...props
|
|
27
27
|
};
|
|
@@ -55,7 +55,7 @@ const SearchBar = (props) => {
|
|
|
55
55
|
return React.createElement("input", { className: `${classPrefix}__input ${clearable ? `${classPrefix}__input-clear` : ""}`, ref: searchRef, style: { ...props.style }, value: value || "", placeholder: placeholder || locale.placeholder, disabled, readOnly, maxLength, onKeyPress: onKeypress, onChange: (e) => change(e), onFocus: (e) => focus(e), onBlur: (e) => blur(e), onClick: (e) => clickInput(e) });
|
|
56
56
|
};
|
|
57
57
|
const clickInput = (e) => {
|
|
58
|
-
|
|
58
|
+
onInputClick && onInputClick(e);
|
|
59
59
|
};
|
|
60
60
|
const renderLeftIn = () => {
|
|
61
61
|
if (!leftIn)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo, useEffect } from "react";
|
|
2
2
|
import { Tips } from "@nutui/icons-react-taro";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import { P as Popup } from "./popup.taro-
|
|
4
|
+
import { P as Popup } from "./popup.taro-1cd1f9d2.js";
|
|
5
5
|
import { u as useConfig } from "./configprovider.taro-a7f3bcfd.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
7
7
|
import { u as usePropsValue } from "./use-props-value-7ac1b1b5.js";
|
|
@@ -16,7 +16,7 @@ const defaultProps = {
|
|
|
16
16
|
};
|
|
17
17
|
const ShortPassword = (props) => {
|
|
18
18
|
const { locale } = useConfig();
|
|
19
|
-
const { title, description, tips, visible, value, error, hideFooter, length, plain, style, className, closeable, autoFocus, onFocus, onChange, onConfirm, onTips, onCancel, onClose, onComplete,
|
|
19
|
+
const { title, description, tips, visible, value, error, hideFooter, length, plain, style, className, closeable, autoFocus, onFocus, onChange, onConfirm, onTips, onCancel, onClose, onComplete, onOverlayClick, onCloseIconClick, ...rest } = {
|
|
20
20
|
...defaultProps,
|
|
21
21
|
...props
|
|
22
22
|
};
|
|
@@ -49,7 +49,7 @@ const ShortPassword = (props) => {
|
|
|
49
49
|
padding: "32px 24px 28px 24px",
|
|
50
50
|
borderRadius: "12px",
|
|
51
51
|
textAlign: "center"
|
|
52
|
-
}, visible, closeable: true,
|
|
52
|
+
}, visible, closeable: true, onOverlayClick: onClose, onCloseIconClick: onClose, ...rest },
|
|
53
53
|
React.createElement(
|
|
54
54
|
"div",
|
|
55
55
|
{ className: classNames(className, classPrefix), style },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { P as Popup } from "./popup.taro-
|
|
3
|
+
import { P as Popup } from "./popup.taro-1cd1f9d2.js";
|
|
4
4
|
import { O as OffsetContext } from "./context-f32a9246.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
6
6
|
const defaultProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { P as Popup } from "./popup.taro-
|
|
3
|
+
import { P as Popup } from "./popup.taro-1cd1f9d2.js";
|
|
4
4
|
import { T as TimeDetail } from "./timedetail.taro-d7aa4c1b.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
6
6
|
import { u as useConfig } from "./configprovider.taro-a7f3bcfd.js";
|
|
@@ -7,16 +7,16 @@ const defaultProps = {
|
|
|
7
7
|
digits: 2,
|
|
8
8
|
symbol: false,
|
|
9
9
|
zero: false,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
left: false,
|
|
11
|
+
sync: true,
|
|
12
12
|
color: "#333",
|
|
13
13
|
riseColor: "#fa2c19",
|
|
14
14
|
dropColor: "#64b578",
|
|
15
15
|
riseIcon: null,
|
|
16
|
-
|
|
16
|
+
dropIcon: null
|
|
17
17
|
};
|
|
18
18
|
const TrendArrow = (props) => {
|
|
19
|
-
const { value, digits, symbol, zero,
|
|
19
|
+
const { value, digits, symbol, zero, left, sync, color, riseColor, dropColor, riseIcon, dropIcon, className, style, children, ...rest } = { ...defaultProps, ...props };
|
|
20
20
|
const classPrefix = "nut-trendarrow";
|
|
21
21
|
const rateTrend = useRef(value > 0);
|
|
22
22
|
const myFixed = (num, digit = 2) => {
|
|
@@ -29,7 +29,7 @@ const TrendArrow = (props) => {
|
|
|
29
29
|
};
|
|
30
30
|
const calcStyle = (() => {
|
|
31
31
|
const arrowColor = rateTrend.current ? riseColor : dropColor;
|
|
32
|
-
const textEquArrowColor =
|
|
32
|
+
const textEquArrowColor = sync ? arrowColor : color;
|
|
33
33
|
const style2 = {
|
|
34
34
|
color: value === 0 ? color : textEquArrowColor
|
|
35
35
|
};
|
|
@@ -51,16 +51,16 @@ const TrendArrow = (props) => {
|
|
|
51
51
|
};
|
|
52
52
|
return iconProps;
|
|
53
53
|
})();
|
|
54
|
-
const renderContent = (
|
|
55
|
-
const classNameSuffix = !
|
|
54
|
+
const renderContent = (left2) => {
|
|
55
|
+
const classNameSuffix = !left2 ? "icon-after" : "icon-before";
|
|
56
56
|
return React.createElement("span", { className: `${classPrefix}__${classNameSuffix} ${classPrefix}__value`, style: calcStyle }, calcRate);
|
|
57
57
|
};
|
|
58
58
|
return React.createElement(
|
|
59
59
|
"div",
|
|
60
60
|
{ className: `${classPrefix} ${className}`, style, ...rest },
|
|
61
|
-
!
|
|
62
|
-
Number(value) !== 0 && React.createElement(React.Fragment, null, rateTrend.current ? React.createElement(React.Fragment, null, riseIcon || React.createElement(TriangleUp, { color: calcIconProps.color })) : React.createElement(React.Fragment, null,
|
|
63
|
-
|
|
61
|
+
!left && renderContent(!left),
|
|
62
|
+
Number(value) !== 0 && React.createElement(React.Fragment, null, rateTrend.current ? React.createElement(React.Fragment, null, riseIcon || React.createElement(TriangleUp, { color: calcIconProps.color })) : React.createElement(React.Fragment, null, dropIcon || React.createElement(TriangleDown, { color: calcIconProps.color }))),
|
|
63
|
+
left && renderContent(!left)
|
|
64
64
|
);
|
|
65
65
|
};
|
|
66
66
|
TrendArrow.defaultProps = defaultProps;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
+
import { Day, SelectedType } from './type';
|
|
2
3
|
type CalendarRef = {
|
|
3
4
|
scrollToDate: (date: string) => void;
|
|
4
5
|
};
|
|
5
|
-
interface Day {
|
|
6
|
-
day: string | number;
|
|
7
|
-
type: string;
|
|
8
|
-
}
|
|
9
6
|
export interface CalendarProps {
|
|
10
|
-
type?:
|
|
7
|
+
type?: SelectedType;
|
|
11
8
|
autoBackfill?: boolean;
|
|
12
9
|
popup?: boolean;
|
|
13
10
|
visible?: boolean;
|
|
@@ -22,13 +19,14 @@ export interface CalendarProps {
|
|
|
22
19
|
showTitle?: boolean;
|
|
23
20
|
showSubTitle?: boolean;
|
|
24
21
|
scrollAnimation?: boolean;
|
|
22
|
+
firstDayOfWeek: number;
|
|
25
23
|
renderHeaderButtons?: () => string | JSX.Element;
|
|
26
24
|
renderDay?: (date: Day) => string | JSX.Element;
|
|
27
25
|
renderDayTop?: (date: Day) => string | JSX.Element;
|
|
28
26
|
renderDayBottom?: (date: Day) => string | JSX.Element;
|
|
29
27
|
onClose?: () => void;
|
|
30
28
|
onConfirm?: (param: string) => void;
|
|
31
|
-
|
|
29
|
+
onDayClick?: (data: string) => void;
|
|
32
30
|
onPageChange?: (param: string) => void;
|
|
33
31
|
}
|
|
34
32
|
export declare const Calendar: React.ForwardRefExoticComponent<Partial<CalendarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, ""> & React.RefAttributes<CalendarRef>>;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
+
import { Day, SelectedType } from './type';
|
|
2
3
|
type CalendarRef = {
|
|
3
4
|
scrollToDate: (date: string) => void;
|
|
4
5
|
};
|
|
5
|
-
interface Day {
|
|
6
|
-
day: string | number;
|
|
7
|
-
type: string;
|
|
8
|
-
}
|
|
9
6
|
export interface CalendarProps {
|
|
10
|
-
type?:
|
|
7
|
+
type?: SelectedType;
|
|
11
8
|
autoBackfill?: boolean;
|
|
12
9
|
popup?: boolean;
|
|
13
10
|
visible?: boolean;
|
|
@@ -22,13 +19,14 @@ export interface CalendarProps {
|
|
|
22
19
|
showTitle?: boolean;
|
|
23
20
|
showSubTitle?: boolean;
|
|
24
21
|
scrollAnimation?: boolean;
|
|
22
|
+
firstDayOfWeek: number;
|
|
25
23
|
renderHeaderButtons?: () => string | JSX.Element;
|
|
26
24
|
renderDay?: (date: Day) => string | JSX.Element;
|
|
27
25
|
renderDayTop?: (date: Day) => string | JSX.Element;
|
|
28
26
|
renderDayBottom?: (date: Day) => string | JSX.Element;
|
|
29
27
|
onClose?: () => void;
|
|
30
28
|
onConfirm?: (param: string) => void;
|
|
31
|
-
|
|
29
|
+
onDayClick?: (data: string) => void;
|
|
32
30
|
onPageChange?: (param: string) => void;
|
|
33
31
|
}
|
|
34
32
|
export declare const Calendar: React.ForwardRefExoticComponent<Partial<CalendarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, ""> & React.RefAttributes<CalendarRef>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface Day {
|
|
2
|
+
day: string | number;
|
|
3
|
+
type: string;
|
|
4
|
+
}
|
|
5
|
+
export interface MonthInfo {
|
|
6
|
+
curData: string[] | string;
|
|
7
|
+
title: string;
|
|
8
|
+
monthData: Day[];
|
|
9
|
+
cssHeight?: number;
|
|
10
|
+
scrollTop?: number;
|
|
11
|
+
}
|
|
12
|
+
export type InputDate = string | string[];
|
|
13
|
+
export type SelectedType = 'single' | 'range' | 'multiple' | 'week';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Day, MonthInfo } from './type';
|
|
2
|
+
export declare const splitDate: (date: string) => string[];
|
|
3
|
+
export declare const isMultiple: (day: string, days: string[]) => boolean;
|
|
4
|
+
export declare const isCurrDay: (month: MonthInfo, day: string | number) => boolean;
|
|
5
|
+
export declare const getCurrDate: (day: Day, month: MonthInfo) => string;
|
|
6
|
+
export declare const isStart: (day: string, days: string[]) => boolean;
|
|
7
|
+
export declare const isEnd: (day: string, days: string[]) => boolean;
|
|
8
|
+
export declare const isStartAndEnd: (days: string[]) => boolean;
|
|
@@ -1,36 +1,34 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
+
import { PopupProps } from '@/packages/popup/index';
|
|
3
|
+
import { Day, InputDate, SelectedType } from '../calendar/type';
|
|
2
4
|
type CalendarRef = {
|
|
3
5
|
scrollToDate: (date: string) => void;
|
|
4
6
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export interface CalendarItemProps {
|
|
11
|
-
type?: string;
|
|
12
|
-
autoBackfill?: boolean;
|
|
13
|
-
popup?: boolean;
|
|
14
|
-
title?: string;
|
|
7
|
+
export interface CalendarItemProps extends PopupProps {
|
|
8
|
+
type: SelectedType;
|
|
9
|
+
autoBackfill: boolean;
|
|
10
|
+
popup: boolean;
|
|
11
|
+
title: string;
|
|
15
12
|
value?: InputDate;
|
|
16
13
|
defaultValue?: InputDate;
|
|
17
|
-
startDate
|
|
18
|
-
endDate
|
|
19
|
-
showToday
|
|
20
|
-
startText
|
|
21
|
-
endText
|
|
22
|
-
confirmText
|
|
23
|
-
showTitle
|
|
24
|
-
showSubTitle
|
|
25
|
-
scrollAnimation
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
14
|
+
startDate: InputDate;
|
|
15
|
+
endDate: InputDate;
|
|
16
|
+
showToday: boolean;
|
|
17
|
+
startText: ReactNode;
|
|
18
|
+
endText: ReactNode;
|
|
19
|
+
confirmText: ReactNode;
|
|
20
|
+
showTitle: boolean;
|
|
21
|
+
showSubTitle: boolean;
|
|
22
|
+
scrollAnimation: boolean;
|
|
23
|
+
firstDayOfWeek: number;
|
|
24
|
+
renderHeaderButtons: () => string | JSX.Element;
|
|
25
|
+
renderDay: (date: Day) => string | JSX.Element;
|
|
26
|
+
renderDayTop: (date: Day) => string | JSX.Element;
|
|
27
|
+
renderDayBottom: (date: Day) => string | JSX.Element;
|
|
28
|
+
onConfirm: (data: string) => void;
|
|
29
|
+
onUpdate: () => void;
|
|
30
|
+
onDayClick: (data: string) => void;
|
|
31
|
+
onPageChange: (data: any) => void;
|
|
34
32
|
}
|
|
35
33
|
export declare const CalendarItem: React.ForwardRefExoticComponent<Partial<CalendarItemProps> & Omit<React.HTMLAttributes<HTMLDivElement>, ""> & React.RefAttributes<CalendarRef>>;
|
|
36
34
|
export {};
|