@nutui/nutui-react 2.3.9 → 2.3.10

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/esm/ActionSheet/style/style.css +1 -1
  3. package/dist/esm/Address/style/style.css +1 -1
  4. package/dist/esm/Barrage/style/style.css +1 -1
  5. package/dist/esm/Barrage.js +18 -3
  6. package/dist/esm/Calendar/style/style.css +1 -1
  7. package/dist/esm/Cascader/style/style.css +1 -1
  8. package/dist/esm/DatePicker/style/style.css +1 -1
  9. package/dist/esm/ImagePreview/style/style.css +1 -1
  10. package/dist/esm/NumberKeyboard/style/style.css +1 -1
  11. package/dist/esm/Picker/style/style.css +1 -1
  12. package/dist/esm/Popover/style/style.css +1 -1
  13. package/dist/esm/Popup/style/style.css +1 -1
  14. package/dist/esm/ShortPassword/style/style.css +1 -1
  15. package/dist/esm/ShortPassword.js +27 -8
  16. package/dist/esm/SideNavBar/style/style.css +1 -1
  17. package/dist/esm/Tabs/style/style.css +1 -1
  18. package/dist/esm/TimeSelect/style/style.css +1 -1
  19. package/dist/esm/Tour/style/style.css +1 -1
  20. package/dist/esm/formitem2.js +39 -5
  21. package/dist/esm/types/src/packages/formitem/formitem.d.ts +6 -2
  22. package/dist/esm/types/src/packages/formitem/formitem.taro.d.ts +6 -2
  23. package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +3 -2
  24. package/dist/esm/types/src/packages/shortpassword/shortpassword.taro.d.ts +3 -2
  25. package/dist/esm/types/src/packages/shortpassword/types.d.ts +4 -0
  26. package/dist/locales/base.js +1 -1
  27. package/dist/locales/en-US.js +1 -1
  28. package/dist/locales/id-ID.js +1 -1
  29. package/dist/locales/tr-TR.js +1 -1
  30. package/dist/locales/zh-CN.js +1 -1
  31. package/dist/locales/zh-TW.js +1 -1
  32. package/dist/locales/zh-UG.js +1 -1
  33. package/dist/nutui.react.es.js +85 -18
  34. package/dist/nutui.react.umd.js +85 -18
  35. package/dist/packages/barrage/barrage.scss +1 -1
  36. package/dist/packages/popup/popup.scss +1 -0
  37. package/dist/packages/tabs/tabs.scss +14 -14
  38. package/dist/style.css +1 -1
  39. package/dist/style.mjs +1 -1
  40. package/dist/types/packages/formitem/formitem.d.ts +14 -2
  41. package/dist/types/packages/formitem/formitem.taro.d.ts +6 -2
  42. package/dist/types/packages/shortpassword/shortpassword.d.ts +3 -2
  43. package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +3 -2
  44. package/dist/types/packages/shortpassword/types.d.ts +4 -0
  45. package/package.json +1 -1
package/dist/style.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.3.9 Fri Feb 02 2024 16:14:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.3.10 Tue Feb 06 2024 16:13:11 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { BaseFormField } from './types';
3
3
  import { Context } from '../form/context';
4
4
  import { BasicComponent } from '../../utils/typings';
5
5
  type TextAlign = 'start' | 'end' | 'left' | 'right' | 'center' | 'justify' | 'match-parent';
6
- export interface FormItemProps extends BasicComponent, BaseFormField {
6
+ export interface FormItemProps extends Omit<BasicComponent, 'children'>, BaseFormField {
7
7
  /**
8
8
  * 必填表单项 label 的红色星标,仅用于控制样式
9
9
  * @default false
@@ -44,6 +44,17 @@ export interface FormItemProps extends BasicComponent, BaseFormField {
44
44
  * @default onChange
45
45
  */
46
46
  validateTrigger: string | string[]
47
+ /**
48
+ * 更新逻辑
49
+ * @default false
50
+ */
51
+ shouldUpdate: boolean
52
+ /**
53
+ * 不使用样式,只使用字段管理
54
+ * @default false
55
+ */
56
+ noStyle: boolean
57
+ children: ReactNode | ((obj: any) => React.ReactNode);
47
58
  }
48
59
  export declare class FormItem extends React.Component<Partial<FormItemProps>, {
49
60
  resetCount: number;
@@ -53,6 +64,7 @@ export declare class FormItem extends React.Component<Partial<FormItemProps>, {
53
64
  context: React.ContextType<typeof Context>;
54
65
  private cancelRegister;
55
66
  private componentRef;
67
+ private eventOff;
56
68
  constructor(props: FormItemProps);
57
69
  componentDidMount(): void;
58
70
  componentWillUnmount(): void;
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { BaseFormField } from './types';
3
3
  import { Context } from '../form/context';
4
4
  import { BasicComponent } from '../../utils/typings';
5
5
  type TextAlign = 'start' | 'end' | 'left' | 'right' | 'center' | 'justify' | 'match-parent';
6
- export interface FormItemProps extends BasicComponent, BaseFormField {
6
+ export interface FormItemProps extends Omit<BasicComponent, 'children'>, BaseFormField {
7
7
  required: boolean;
8
8
  initialValue: any;
9
9
  trigger: string;
@@ -12,6 +12,9 @@ export interface FormItemProps extends BasicComponent, BaseFormField {
12
12
  onClick: (event: React.MouseEvent, componentRef: React.MutableRefObject<any>) => void;
13
13
  errorMessageAlign: TextAlign;
14
14
  validateTrigger: string | string[];
15
+ shouldUpdate: boolean;
16
+ noStyle: boolean;
17
+ children: ReactNode | ((obj: any) => React.ReactNode);
15
18
  }
16
19
  export declare class FormItem extends React.Component<Partial<FormItemProps>, {
17
20
  resetCount: number;
@@ -21,6 +24,7 @@ export declare class FormItem extends React.Component<Partial<FormItemProps>, {
21
24
  context: React.ContextType<typeof Context>;
22
25
  private cancelRegister;
23
26
  private componentRef;
27
+ private eventOff;
24
28
  constructor(props: FormItemProps);
25
29
  componentDidMount(): void;
26
30
  componentWillUnmount(): void;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, ReactNode } from 'react';
1
+ import React, { ForwardRefRenderFunction, ReactNode } from 'react';
2
2
  import { PopupProps } from '../../packages/popup/index';
3
3
  export interface ShortPasswordProps extends PopupProps {
4
4
  /**
@@ -87,4 +87,5 @@ export interface ShortPasswordProps extends PopupProps {
87
87
  */
88
88
  onComplete: (value: string) => void
89
89
  }
90
- export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps>>;
90
+ export declare const InternalShortPassword: ForwardRefRenderFunction<unknown, Partial<ShortPasswordProps>>;
91
+ export declare const ShortPassword: React.ForwardRefExoticComponent<Partial<ShortPasswordProps> & React.RefAttributes<unknown>>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, ReactNode } from 'react';
1
+ import React, { ForwardRefRenderFunction, ReactNode } from 'react';
2
2
  import { PopupProps } from '../../packages/popup/popup.taro';
3
3
  export interface ShortPasswordProps extends PopupProps {
4
4
  value: string;
@@ -19,4 +19,5 @@ export interface ShortPasswordProps extends PopupProps {
19
19
  onTips: () => void;
20
20
  onComplete: (value: string) => void;
21
21
  }
22
- export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps>>;
22
+ export declare const InternalShortPassword: ForwardRefRenderFunction<unknown, Partial<ShortPasswordProps>>;
23
+ export declare const ShortPassword: React.ForwardRefExoticComponent<Partial<ShortPasswordProps> & React.RefAttributes<unknown>>;
@@ -0,0 +1,4 @@
1
+ export type ShortPasswordActions = {
2
+ open: () => void;
3
+ close: () => void;
4
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react",
3
- "version": "2.3.9",
3
+ "version": "2.3.10",
4
4
  "style": "dist/style.css",
5
5
  "main": "dist/nutui.react.umd.js",
6
6
  "module": "dist/esm/nutui-react.es.js",