@nutui/nutui-react-taro 2.0.14 → 2.0.15-beta.1

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,12 @@
1
+ # v2.0.15
2
+ `2023-08-30`
3
+
4
+ * :sparkles: feat: support next.js (#1326) @oasis-cloud
5
+ * :bug: fix: dialog content 失效 (#1323) @oasis-cloud
6
+ * :bug: fix: space 复制按钮重复 (#1322) @oasis-cloud
7
+ * 🔨 chore(tabs): 更新文档与 demo (#1339) @Eiinu
8
+
9
+
1
10
  # v2.0.14
2
11
  `2023-08-18`
3
12
 
@@ -1,4 +1,4 @@
1
- import { B as BaseDialog } from "./dialog.taro-519e45af.js";
1
+ import { B as BaseDialog } from "./dialog.taro-a1309ced.js";
2
2
  import "react";
3
3
  import "classnames";
4
4
  import "react-transition-group";
@@ -57,7 +57,7 @@ const defaultProps = {
57
57
  const BaseDialog = (props) => {
58
58
  const classPrefix = "nut-dialog";
59
59
  const { locale } = useConfig();
60
- const { params: { id, visible, footer, title, footerDirection, hideConfirmButton, hideCancelButton, lockScroll, disableConfirmButton, closeOnOverlayClick, onOverlayClick, confirmText, cancelText, overlay, onClose, onCancel, onConfirm, beforeCancel, beforeClose }, setParams } = useParams({ ...defaultProps, ...props });
60
+ const { params: { id, visible, footer, title, content, children, footerDirection, hideConfirmButton, hideCancelButton, lockScroll, disableConfirmButton, closeOnOverlayClick, onOverlayClick, confirmText, cancelText, overlay, onClose, onCancel, onConfirm, beforeCancel, beforeClose }, setParams } = useParams({ ...defaultProps, ...props });
61
61
  useCustomEvent(id, ({ status, options }) => {
62
62
  if (status) {
63
63
  setParams({ ...options, visible: true });
@@ -92,14 +92,12 @@ const BaseDialog = (props) => {
92
92
  );
93
93
  };
94
94
  const onHandleClickOverlay = (e) => {
95
- console.log("onClose?.()", closeOnOverlayClick);
96
95
  if (closeOnOverlayClick && visible && e.target === e.currentTarget) {
97
96
  const closed = onOverlayClick && onOverlayClick();
98
97
  closed && (onClose == null ? void 0 : onClose());
99
98
  closed && (onCancel == null ? void 0 : onCancel());
100
99
  }
101
100
  };
102
- console.log("props", props, visible);
103
101
  return React__default.createElement(
104
102
  View,
105
103
  { style: { display: visible ? "block" : "none" }, catchMove: lockScroll },
@@ -110,7 +108,7 @@ const BaseDialog = (props) => {
110
108
  React__default.createElement(
111
109
  CSSTransition,
112
110
  { in: visible, timeout: 300, classNames: "fadeDialog", unmountOnExit: true, appear: true },
113
- React__default.createElement(Content, { title, footer: renderFooter(), footerDirection, visible })
111
+ React__default.createElement(Content, { title, footer: renderFooter(), footerDirection, visible }, content || children)
114
112
  )
115
113
  )
116
114
  );
@@ -48,7 +48,7 @@ import { T as T5 } from "./textarea.taro-6ebe789c.js";
48
48
  import { U } from "./uploader.taro-c0bcca89.js";
49
49
  import { A as A2 } from "./actionsheet.taro-0a411006.js";
50
50
  import { B as B3 } from "./badge.taro-289489e5.js";
51
- import { B as B4 } from "./dialog.taro-519e45af.js";
51
+ import { B as B4 } from "./dialog.taro-a1309ced.js";
52
52
  import { D as D3 } from "./drag.taro-ce333e51.js";
53
53
  import { E as E2 } from "./empty.taro-05f15f93.js";
54
54
  import { I as I4 } from "./infiniteloading.taro-cb3b949e.js";
@@ -3,9 +3,9 @@ import { BasicComponent } from '@/utils/typings';
3
3
  export interface SideNavBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>, BasicComponent {
4
4
  title: ReactNode;
5
5
  visible: boolean;
6
- width?: string;
7
- indent?: number;
8
- position?: 'left' | 'right';
6
+ width: string;
7
+ indent: number;
8
+ position: 'left' | 'right';
9
9
  onClose: () => void;
10
10
  }
11
- export declare const SideNavBar: FunctionComponent<SideNavBarProps>;
11
+ export declare const SideNavBar: FunctionComponent<Partial<SideNavBarProps>>;
@@ -3,9 +3,9 @@ import { BasicComponent } from '@/utils/typings';
3
3
  export interface SideNavBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>, BasicComponent {
4
4
  title: ReactNode;
5
5
  visible: boolean;
6
- width?: string;
7
- indent?: number;
8
- position?: 'left' | 'right';
6
+ width: string;
7
+ indent: number;
8
+ position: 'left' | 'right';
9
9
  onClose: () => void;
10
10
  }
11
- export declare const SideNavBar: FunctionComponent<SideNavBarProps>;
11
+ export declare const SideNavBar: FunctionComponent<Partial<SideNavBarProps>>;
@@ -0,0 +1,2 @@
1
+ import { useEffect } from 'react';
2
+ export declare const useIsomorphicLayoutEffect: typeof useEffect;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.0.14 Fri Aug 18 2023 14:59:33 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.15 Wed Aug 30 2023 14:11:33 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-taro v2.0.14 Fri Aug 18 2023 14:59:33 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.15 Wed Aug 30 2023 14:11:33 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-taro v2.0.14 Fri Aug 18 2023 14:59:33 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.15 Wed Aug 30 2023 14:11:33 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-taro v2.0.14 Fri Aug 18 2023 14:59:33 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.15 Wed Aug 30 2023 14:11:33 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-taro v2.0.14 Fri Aug 18 2023 14:59:33 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.15 Wed Aug 30 2023 14:11:33 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-taro v2.0.14 Fri Aug 18 2023 14:59:33 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.15 Wed Aug 30 2023 14:11:33 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-taro v2.0.14 Fri Aug 18 2023 14:59:33 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.15 Wed Aug 30 2023 14:11:33 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  /*!
8
- * @nutui/nutui-react-taro v2.0.14 Fri Aug 18 2023 14:58:43 GMT+0800 (China Standard Time)
8
+ * @nutui/nutui-react-taro v2.0.15 Wed Aug 30 2023 14:10:49 GMT+0800 (China Standard Time)
9
9
  * (c) 2023 @jdf2e.
10
10
  * Released under the MIT License.
11
11
  */
@@ -14117,6 +14117,8 @@ const BaseDialog = (props) => {
14117
14117
  visible,
14118
14118
  footer,
14119
14119
  title,
14120
+ content,
14121
+ children,
14120
14122
  footerDirection,
14121
14123
  hideConfirmButton,
14122
14124
  hideCancelButton,
@@ -14187,14 +14189,12 @@ const BaseDialog = (props) => {
14187
14189
  ));
14188
14190
  };
14189
14191
  const onHandleClickOverlay = (e) => {
14190
- console.log("onClose?.()", closeOnOverlayClick);
14191
14192
  if (closeOnOverlayClick && visible && e.target === e.currentTarget) {
14192
14193
  const closed = onOverlayClick && onOverlayClick();
14193
14194
  closed && (onClose == null ? void 0 : onClose());
14194
14195
  closed && (onCancel == null ? void 0 : onCancel());
14195
14196
  }
14196
14197
  };
14197
- console.log("props", props, visible);
14198
14198
  return /* @__PURE__ */ React__default.createElement(
14199
14199
  View,
14200
14200
  {
@@ -14225,7 +14225,8 @@ const BaseDialog = (props) => {
14225
14225
  footer: renderFooter(),
14226
14226
  footerDirection,
14227
14227
  visible
14228
- }
14228
+ },
14229
+ content || children
14229
14230
  )
14230
14231
  ))
14231
14232
  );
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
8
8
  return value;
9
9
  };
10
10
  /*!
11
- * @nutui/nutui-react-taro v2.0.14 Fri Aug 18 2023 14:58:43 GMT+0800 (China Standard Time)
11
+ * @nutui/nutui-react-taro v2.0.15 Wed Aug 30 2023 14:10:49 GMT+0800 (China Standard Time)
12
12
  * (c) 2023 @jdf2e.
13
13
  * Released under the MIT License.
14
14
  */
@@ -14133,6 +14133,8 @@ var __publicField = (obj, key, value) => {
14133
14133
  visible,
14134
14134
  footer,
14135
14135
  title,
14136
+ content,
14137
+ children,
14136
14138
  footerDirection,
14137
14139
  hideConfirmButton,
14138
14140
  hideCancelButton,
@@ -14203,14 +14205,12 @@ var __publicField = (obj, key, value) => {
14203
14205
  ));
14204
14206
  };
14205
14207
  const onHandleClickOverlay = (e) => {
14206
- console.log("onClose?.()", closeOnOverlayClick);
14207
14208
  if (closeOnOverlayClick && visible && e.target === e.currentTarget) {
14208
14209
  const closed = onOverlayClick && onOverlayClick();
14209
14210
  closed && (onClose == null ? void 0 : onClose());
14210
14211
  closed && (onCancel == null ? void 0 : onCancel());
14211
14212
  }
14212
14213
  };
14213
- console.log("props", props, visible);
14214
14214
  return /* @__PURE__ */ React.createElement(
14215
14215
  components.View,
14216
14216
  {
@@ -14241,7 +14241,8 @@ var __publicField = (obj, key, value) => {
14241
14241
  footer: renderFooter(),
14242
14242
  footerDirection,
14243
14243
  visible
14244
- }
14244
+ },
14245
+ content || children
14245
14246
  )
14246
14247
  ))
14247
14248
  );
package/dist/style.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.0.14 Fri Aug 18 2023 14:59:07 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.15 Wed Aug 30 2023 14:11:14 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -15,21 +15,21 @@ export interface SideNavBarProps extends Omit<React.HTMLAttributes<HTMLDivElemen
15
15
  * 遮罩宽度百分比
16
16
  * @default 80%
17
17
  */
18
- width?: string
18
+ width: string
19
19
  /**
20
20
  * 缩进宽度
21
21
  * @default 20
22
22
  */
23
- indent?: number
23
+ indent: number
24
24
  /**
25
25
  * 弹出位置
26
26
  * @default left
27
27
  */
28
- position?: 'left' | 'right'
28
+ position: 'left' | 'right'
29
29
  /**
30
30
  * 关闭遮罩时触发
31
31
  * @default -
32
32
  */
33
33
  onClose: () => void
34
34
  }
35
- export declare const SideNavBar: FunctionComponent<SideNavBarProps>;
35
+ export declare const SideNavBar: FunctionComponent<Partial<SideNavBarProps>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react-taro",
3
- "version": "2.0.14",
3
+ "version": "2.0.15-beta.1",
4
4
  "style": "dist/style.css",
5
5
  "main": "dist/nutui.react.umd.js",
6
6
  "module": "dist/esm/nutui-react.es.js",