@nutui/nutui-react 2.0.12 → 2.0.13

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 CHANGED
@@ -1,3 +1,14 @@
1
+ # v2.0.13
2
+ `2023-08-16`
3
+
4
+ * :sparkles: feat: dialog 支持函数调用 (#1315) @oasis-cloud
5
+ * :sparkles: feat: toast 支持函数调用 (#1307) @oasis-cloud
6
+ * :sparkles: feat: 提取 Taro 的 Demo 到 workspace (#1302) @oasis-cloud
7
+ * :bug: fix: icons 版本更新 (#1310) @oasis-cloud
8
+ * :bug: fix: 非 undefined 的 falsely 值无法传递给子组件 (#1312) @qnnp
9
+ * 📖 docs: 删除了skeleton文档中无用的props(width,height) (#1303) @ivan-My
10
+
11
+
1
12
  # v2.0.12
2
13
  `2023-08-11`
3
14
 
@@ -24,6 +24,7 @@ export interface BasicDialogProps {
24
24
  onConfirm?: (e?: MouseEvent<HTMLButtonElement>) => Promise<() => void> | void;
25
25
  onCancel?: () => void;
26
26
  onClick?: () => void;
27
+ onOverlayClick?: () => void;
27
28
  }
28
29
  export type DialogReturnProps = {
29
30
  update: (newConfig: ConfirmProps) => void;
@@ -7,5 +7,5 @@ interface ContentProps {
7
7
  footerDirection: string;
8
8
  onClick: (event: ITouchEvent) => void;
9
9
  }
10
- export declare const Content: FunctionComponent<Partial<ContentProps> & Omit<HTMLAttributes<HTMLDivElement>, 'onClick'>>;
10
+ export declare const Content: FunctionComponent<Partial<ContentProps> & Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'title'>>;
11
11
  export {};
@@ -1,4 +1,12 @@
1
- import React from 'react';
1
+ import { FunctionComponent } from 'react';
2
2
  import { BasicDialogProps } from './config';
3
- export type DialogProps = BasicDialogProps;
4
- export declare const BaseDialog: React.ForwardRefExoticComponent<Partial<BasicDialogProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onClick" | "content" | "title"> & React.RefAttributes<unknown>>;
3
+ import { BasicComponent } from '@/utils/typings';
4
+ export type DialogProps = BasicDialogProps & BasicComponent;
5
+ declare const defaultProps: DialogProps;
6
+ export declare const BaseDialog: FunctionComponent<Partial<DialogProps>> & {
7
+ open: typeof open;
8
+ close: typeof close;
9
+ };
10
+ export declare function open(selector: string, options: Partial<typeof defaultProps>): void;
11
+ export declare function close(selector: string): void;
12
+ export {};
@@ -1,3 +1,3 @@
1
1
  import { Toast } from './toast.taro';
2
- export type { ToastProps, ToastPositionType } from './toast.taro';
2
+ export type { ToastProps, ToastPositionType, ToastOptions } from './toast.taro';
3
3
  export default Toast;
@@ -19,4 +19,15 @@ export interface ToastProps extends BasicComponent {
19
19
  visible: boolean;
20
20
  onClose: () => void;
21
21
  }
22
- export declare const Toast: FunctionComponent<Partial<ToastProps> & React.HTMLAttributes<HTMLDivElement>>;
22
+ export declare const Toast: FunctionComponent<Partial<ToastProps> & React.HTMLAttributes<HTMLDivElement>> & {
23
+ show: typeof show;
24
+ hide: typeof hide;
25
+ };
26
+ export interface ToastOptions {
27
+ title: string;
28
+ msg?: string;
29
+ type?: string;
30
+ duration?: number;
31
+ }
32
+ export declare function show(selector: string, options: ToastOptions): void;
33
+ export declare function hide(selector: string): void;
@@ -1,3 +1,7 @@
1
1
  export declare const customEvents: TaroGeneral.Events;
2
2
  export declare function useCustomEventsPath(selector: string): string;
3
3
  export declare function useCustomEvent(selector: string, cb: any): (<T = any>(args: T) => void)[];
4
+ export declare function useParams<T = any>(args: T): {
5
+ params: T;
6
+ setParams: (args: T) => void;
7
+ };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.12 Fri Aug 11 2023 10:59:01 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.13 Wed Aug 16 2023 13:43:07 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.12 Fri Aug 11 2023 10:59:01 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.13 Wed Aug 16 2023 13:43:07 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.12 Fri Aug 11 2023 10:59:01 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.13 Wed Aug 16 2023 13:43:07 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.12 Fri Aug 11 2023 10:59:01 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.13 Wed Aug 16 2023 13:43:07 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.12 Fri Aug 11 2023 10:59:01 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.13 Wed Aug 16 2023 13:43:07 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.12 Fri Aug 11 2023 10:59:01 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.13 Wed Aug 16 2023 13:43:07 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.12 Fri Aug 11 2023 10:59:01 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.13 Wed Aug 16 2023 13:43:07 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
6
6
  };
7
7
  var _a;
8
8
  /*!
9
- * @nutui/nutui-react v2.0.12 Fri Aug 11 2023 10:58:12 GMT+0800 (China Standard Time)
9
+ * @nutui/nutui-react v2.0.13 Wed Aug 16 2023 13:42:21 GMT+0800 (China Standard Time)
10
10
  * (c) 2023 @jdf2e.
11
11
  * Released under the MIT License.
12
12
  */
@@ -9,7 +9,7 @@ var __publicField = (obj, key, value) => {
9
9
  return value;
10
10
  };
11
11
  /*!
12
- * @nutui/nutui-react v2.0.12 Fri Aug 11 2023 10:58:12 GMT+0800 (China Standard Time)
12
+ * @nutui/nutui-react v2.0.13 Wed Aug 16 2023 13:42:21 GMT+0800 (China Standard Time)
13
13
  * (c) 2023 @jdf2e.
14
14
  * Released under the MIT License.
15
15
  */
package/dist/style.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.12 Fri Aug 11 2023 10:58:37 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.13 Wed Aug 16 2023 13:42:47 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -24,6 +24,7 @@ export interface BasicDialogProps {
24
24
  onConfirm?: (e?: MouseEvent<HTMLButtonElement>) => Promise<() => void> | void;
25
25
  onCancel?: () => void;
26
26
  onClick?: () => void;
27
+ onOverlayClick?: () => void;
27
28
  }
28
29
  export type DialogReturnProps = {
29
30
  update: (newConfig: ConfirmProps) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "style": "dist/style.css",
5
5
  "main": "dist/nutui.react.umd.js",
6
6
  "module": "dist/esm/nutui-react.es.js",
@@ -52,14 +52,14 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@babel/runtime": "^7.21.0",
55
- "@nutui/icons-react": "0.0.1-beta.8",
55
+ "@nutui/icons-react": "0.0.1",
56
56
  "@nutui/touch-emulator": "^1.0.0",
57
57
  "@react-spring/web": "~9.6.1",
58
58
  "@use-gesture/react": "10.2.20",
59
59
  "async-validator": "^4.2.5",
60
60
  "classnames": "^2.3.2",
61
- "lodash.kebabcase": "^4.1.1",
62
61
  "lodash.isequal": "^4.5.0",
62
+ "lodash.kebabcase": "^4.1.1",
63
63
  "react-transition-group": "^4.4.5"
64
64
  },
65
65
  "peerDependencies": {
@@ -67,6 +67,7 @@
67
67
  },
68
68
  "resolutions": {
69
69
  "@types/react": "18",
70
- "@types/react-dom": "18"
70
+ "@types/react-dom": "18",
71
+ "@swc/core": "1.3.42"
71
72
  }
72
73
  }