@nutui/nutui-react-taro 2.0.17-beta.0 → 2.0.18-beta.0
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/esm/Menu.js +2 -2
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/{menu.taro-0727ce5f.js → menu.taro-1306d899.js} +6 -6
- package/dist/esm/{menuitem.taro-a4d83b53.js → menuitem.taro-f083de92.js} +3 -1
- package/dist/esm/nutui-react.es.js +2 -2
- package/dist/esm/types/src/packages/menu/menu.d.ts +2 -2
- package/dist/esm/types/src/packages/menu/menu.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/notify/notify.taro.d.ts +1 -1
- 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 +9 -7
- package/dist/nutui.react.umd.js +9 -7
- package/dist/style.mjs +1 -1
- package/dist/types/packages/formitem/formitem.taro.d.ts +1 -1
- package/dist/types/packages/menu/menu.taro.d.ts +10 -2
- package/dist/types/packages/notify/notify.taro.d.ts +1 -1
- package/package.json +1 -1
package/dist/esm/Menu.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { M as Menu } from "./menu.taro-
|
|
1
|
+
import { M as Menu } from "./menu.taro-1306d899.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "classnames";
|
|
4
4
|
import "@nutui/icons-react-taro";
|
|
5
|
-
import "./menuitem.taro-
|
|
5
|
+
import "./menuitem.taro-f083de92.js";
|
|
6
6
|
import "@tarojs/taro";
|
|
7
7
|
import "@tarojs/components";
|
|
8
8
|
import "react-transition-group";
|
package/dist/esm/MenuItem.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useRef, useState, useEffect } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { ArrowUp2, ArrowDown2 } from "@nutui/icons-react-taro";
|
|
4
|
-
import { M as MenuItem } from "./menuitem.taro-
|
|
4
|
+
import { M as MenuItem } from "./menuitem.taro-f083de92.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
6
6
|
const defaultProps = {
|
|
7
7
|
...ComponentDefaults,
|
|
@@ -10,9 +10,9 @@ const defaultProps = {
|
|
|
10
10
|
scrollFixed: false,
|
|
11
11
|
lockScroll: true,
|
|
12
12
|
icon: null,
|
|
13
|
-
onOpen: () => {
|
|
13
|
+
onOpen: (index) => {
|
|
14
14
|
},
|
|
15
|
-
onClose: () => {
|
|
15
|
+
onClose: (index) => {
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
const Menu = (props) => {
|
|
@@ -42,9 +42,9 @@ const Menu = (props) => {
|
|
|
42
42
|
const toggleMenuItem = (index) => {
|
|
43
43
|
showMenuItem[index] = !showMenuItem[index];
|
|
44
44
|
if (showMenuItem[index]) {
|
|
45
|
-
onOpen && onOpen();
|
|
45
|
+
onOpen && onOpen(index);
|
|
46
46
|
} else {
|
|
47
|
-
onClose && onClose();
|
|
47
|
+
onClose && onClose(index);
|
|
48
48
|
}
|
|
49
49
|
const temp = showMenuItem.map((i, idx) => idx === index ? i : false);
|
|
50
50
|
setShowMenuItem([...temp]);
|
|
@@ -52,7 +52,7 @@ const Menu = (props) => {
|
|
|
52
52
|
const hideMenuItem = (index) => {
|
|
53
53
|
showMenuItem[index] = false;
|
|
54
54
|
setShowMenuItem([...showMenuItem]);
|
|
55
|
-
onClose && onClose();
|
|
55
|
+
onClose && onClose(index);
|
|
56
56
|
};
|
|
57
57
|
const updateTitle = (text, index) => {
|
|
58
58
|
menuItemTitle[index] = text;
|
|
@@ -44,7 +44,9 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
44
44
|
}, [direction, windowHeight]);
|
|
45
45
|
usePageScroll(updateItemOffset);
|
|
46
46
|
useImperativeHandle(ref, () => ({
|
|
47
|
-
toggle:
|
|
47
|
+
toggle: (s) => {
|
|
48
|
+
s ? parent.toggleMenuItem(index) : parent.hideMenuItem(index);
|
|
49
|
+
}
|
|
48
50
|
}));
|
|
49
51
|
const getIconCName = (optionVal, value2) => {
|
|
50
52
|
return classNames({
|
|
@@ -33,8 +33,8 @@ import { default as default2 } from "./Form.js";
|
|
|
33
33
|
import { F as F2 } from "./formitem.taro-d69dce1e.js";
|
|
34
34
|
import { I as I2 } from "./input.taro-fbcb7090.js";
|
|
35
35
|
import { I as I3 } from "./inputnumber.taro-d2fc26bd.js";
|
|
36
|
-
import { M } from "./menu.taro-
|
|
37
|
-
import { M as M2 } from "./menuitem.taro-
|
|
36
|
+
import { M } from "./menu.taro-1306d899.js";
|
|
37
|
+
import { M as M2 } from "./menuitem.taro-f083de92.js";
|
|
38
38
|
import { N as N2 } from "./numberkeyboard.taro-f19c44a8.js";
|
|
39
39
|
import { P } from "./picker.taro-47d1c716.js";
|
|
40
40
|
import { R as R2, a as a2 } from "./radio.taro-d1d370be.js";
|
|
@@ -8,8 +8,8 @@ export interface MenuProps extends BasicComponent {
|
|
|
8
8
|
lockScroll: boolean;
|
|
9
9
|
icon: React.ReactNode;
|
|
10
10
|
children: React.ReactNode;
|
|
11
|
-
onOpen: () => void;
|
|
12
|
-
onClose: () => void;
|
|
11
|
+
onOpen: (index: number) => void;
|
|
12
|
+
onClose: (index: number) => void;
|
|
13
13
|
}
|
|
14
14
|
export declare const Menu: FunctionComponent<Partial<MenuProps>> & {
|
|
15
15
|
Item: typeof MenuItem;
|
|
@@ -8,8 +8,8 @@ export interface MenuProps extends BasicComponent {
|
|
|
8
8
|
lockScroll: boolean;
|
|
9
9
|
icon: React.ReactNode;
|
|
10
10
|
children: React.ReactNode;
|
|
11
|
-
onOpen: () => void;
|
|
12
|
-
onClose: () => void;
|
|
11
|
+
onOpen: (index: number) => void;
|
|
12
|
+
onClose: (index: number) => void;
|
|
13
13
|
}
|
|
14
14
|
export declare const Menu: FunctionComponent<Partial<MenuProps>> & {
|
|
15
15
|
Item: typeof MenuItem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from '@/utils/typings';
|
|
3
3
|
export type NotifyPosition = 'top' | 'bottom';
|
|
4
|
-
export type NotifyType = 'primary' | 'success' | 'danger' | '
|
|
4
|
+
export type NotifyType = 'primary' | 'success' | 'danger' | 'warning';
|
|
5
5
|
export interface NotifyProps extends BasicComponent {
|
|
6
6
|
id?: string;
|
|
7
7
|
duration: number;
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/tr-TR.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED
package/dist/nutui.react.es.js
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
/*!
|
|
8
|
-
* @nutui/nutui-react-taro v2.0.
|
|
8
|
+
* @nutui/nutui-react-taro v2.0.18-beta.0 Fri Sep 15 2023 14:03:32 GMT+0800 (China Standard Time)
|
|
9
9
|
* (c) 2023 @jdf2e.
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
*/
|
|
@@ -11784,7 +11784,9 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
11784
11784
|
}, [direction, windowHeight]);
|
|
11785
11785
|
usePageScroll(updateItemOffset);
|
|
11786
11786
|
useImperativeHandle(ref, () => ({
|
|
11787
|
-
toggle:
|
|
11787
|
+
toggle: (s) => {
|
|
11788
|
+
s ? parent.toggleMenuItem(index) : parent.hideMenuItem(index);
|
|
11789
|
+
}
|
|
11788
11790
|
}));
|
|
11789
11791
|
const getIconCName = (optionVal, value2) => {
|
|
11790
11792
|
return classNames({
|
|
@@ -11933,9 +11935,9 @@ const defaultProps$T = {
|
|
|
11933
11935
|
scrollFixed: false,
|
|
11934
11936
|
lockScroll: true,
|
|
11935
11937
|
icon: null,
|
|
11936
|
-
onOpen: () => {
|
|
11938
|
+
onOpen: (index) => {
|
|
11937
11939
|
},
|
|
11938
|
-
onClose: () => {
|
|
11940
|
+
onClose: (index) => {
|
|
11939
11941
|
}
|
|
11940
11942
|
};
|
|
11941
11943
|
const Menu = (props) => {
|
|
@@ -11976,9 +11978,9 @@ const Menu = (props) => {
|
|
|
11976
11978
|
const toggleMenuItem = (index) => {
|
|
11977
11979
|
showMenuItem[index] = !showMenuItem[index];
|
|
11978
11980
|
if (showMenuItem[index]) {
|
|
11979
|
-
onOpen && onOpen();
|
|
11981
|
+
onOpen && onOpen(index);
|
|
11980
11982
|
} else {
|
|
11981
|
-
onClose && onClose();
|
|
11983
|
+
onClose && onClose(index);
|
|
11982
11984
|
}
|
|
11983
11985
|
const temp = showMenuItem.map(
|
|
11984
11986
|
(i, idx) => idx === index ? i : false
|
|
@@ -11988,7 +11990,7 @@ const Menu = (props) => {
|
|
|
11988
11990
|
const hideMenuItem = (index) => {
|
|
11989
11991
|
showMenuItem[index] = false;
|
|
11990
11992
|
setShowMenuItem([...showMenuItem]);
|
|
11991
|
-
onClose && onClose();
|
|
11993
|
+
onClose && onClose(index);
|
|
11992
11994
|
};
|
|
11993
11995
|
const updateTitle = (text, index) => {
|
|
11994
11996
|
menuItemTitle[index] = text;
|
package/dist/nutui.react.umd.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
return value;
|
|
9
9
|
};
|
|
10
10
|
/*!
|
|
11
|
-
* @nutui/nutui-react-taro v2.0.
|
|
11
|
+
* @nutui/nutui-react-taro v2.0.18-beta.0 Fri Sep 15 2023 14:03:32 GMT+0800 (China Standard Time)
|
|
12
12
|
* (c) 2023 @jdf2e.
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
@@ -11800,7 +11800,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11800
11800
|
}, [direction, windowHeight]);
|
|
11801
11801
|
Taro.usePageScroll(updateItemOffset);
|
|
11802
11802
|
React.useImperativeHandle(ref, () => ({
|
|
11803
|
-
toggle:
|
|
11803
|
+
toggle: (s) => {
|
|
11804
|
+
s ? parent.toggleMenuItem(index) : parent.hideMenuItem(index);
|
|
11805
|
+
}
|
|
11804
11806
|
}));
|
|
11805
11807
|
const getIconCName = (optionVal, value2) => {
|
|
11806
11808
|
return classNames({
|
|
@@ -11949,9 +11951,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11949
11951
|
scrollFixed: false,
|
|
11950
11952
|
lockScroll: true,
|
|
11951
11953
|
icon: null,
|
|
11952
|
-
onOpen: () => {
|
|
11954
|
+
onOpen: (index) => {
|
|
11953
11955
|
},
|
|
11954
|
-
onClose: () => {
|
|
11956
|
+
onClose: (index) => {
|
|
11955
11957
|
}
|
|
11956
11958
|
};
|
|
11957
11959
|
const Menu = (props) => {
|
|
@@ -11992,9 +11994,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11992
11994
|
const toggleMenuItem = (index) => {
|
|
11993
11995
|
showMenuItem[index] = !showMenuItem[index];
|
|
11994
11996
|
if (showMenuItem[index]) {
|
|
11995
|
-
onOpen && onOpen();
|
|
11997
|
+
onOpen && onOpen(index);
|
|
11996
11998
|
} else {
|
|
11997
|
-
onClose && onClose();
|
|
11999
|
+
onClose && onClose(index);
|
|
11998
12000
|
}
|
|
11999
12001
|
const temp = showMenuItem.map(
|
|
12000
12002
|
(i, idx) => idx === index ? i : false
|
|
@@ -12004,7 +12006,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12004
12006
|
const hideMenuItem = (index) => {
|
|
12005
12007
|
showMenuItem[index] = false;
|
|
12006
12008
|
setShowMenuItem([...showMenuItem]);
|
|
12007
|
-
onClose && onClose();
|
|
12009
|
+
onClose && onClose(index);
|
|
12008
12010
|
};
|
|
12009
12011
|
const updateTitle = (text, index) => {
|
|
12010
12012
|
menuItemTitle[index] = text;
|
package/dist/style.mjs
CHANGED
|
@@ -28,8 +28,16 @@ export interface MenuProps extends BasicComponent {
|
|
|
28
28
|
*/
|
|
29
29
|
icon: React.ReactNode
|
|
30
30
|
children: React.ReactNode;
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* menu 展开触发
|
|
33
|
+
* @default -
|
|
34
|
+
*/
|
|
35
|
+
onOpen: (index: number) => void
|
|
36
|
+
/**
|
|
37
|
+
* menu 关闭触发
|
|
38
|
+
* @default -
|
|
39
|
+
*/
|
|
40
|
+
onClose: (index: number) => void
|
|
33
41
|
}
|
|
34
42
|
export declare const Menu: FunctionComponent<Partial<MenuProps>> & {
|
|
35
43
|
Item: typeof MenuItem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export type NotifyPosition = 'top' | 'bottom';
|
|
4
|
-
export type NotifyType = 'primary' | 'success' | 'danger' | '
|
|
4
|
+
export type NotifyType = 'primary' | 'success' | 'danger' | 'warning';
|
|
5
5
|
export interface NotifyProps extends BasicComponent {
|
|
6
6
|
id?: string;
|
|
7
7
|
/**
|