@nutui/nutui-react 1.3.0 → 1.3.1-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.
Files changed (158) hide show
  1. package/dist/esm/Audio/style/index.js +4 -0
  2. package/dist/esm/Audio.js +293 -0
  3. package/dist/esm/Calendar/style/index.js +1 -2
  4. package/dist/esm/Calendar.js +80 -33
  5. package/dist/esm/CalendarItem.js +429 -231
  6. package/dist/esm/Cascader/style/index.js +2 -0
  7. package/dist/esm/Cascader.js +788 -0
  8. package/dist/esm/ConfigProvider.js +16 -0
  9. package/dist/esm/DatePicker.js +37 -6
  10. package/dist/esm/Dialog.js +9 -16
  11. package/dist/esm/Elevator.js +16 -5
  12. package/dist/esm/Grid/style/index.js +2 -0
  13. package/dist/esm/Grid.js +91 -0
  14. package/dist/esm/GridItem/style/index.js +2 -0
  15. package/dist/esm/GridItem.js +99 -0
  16. package/dist/esm/ImagePreview/style/index.js +2 -0
  17. package/dist/esm/ImagePreview.js +257 -0
  18. package/dist/esm/Menu/style/index.js +3 -0
  19. package/dist/esm/Menu.js +153 -0
  20. package/dist/esm/MenuItem/style/index.js +3 -0
  21. package/dist/esm/MenuItem.js +197 -0
  22. package/dist/esm/NoticeBar.js +3 -2
  23. package/dist/esm/Notify.js +2 -1
  24. package/dist/esm/Popover.js +4 -11
  25. package/dist/esm/Range.js +2 -45
  26. package/dist/esm/Swipe/style/index.js +2 -0
  27. package/dist/esm/Swipe.js +265 -0
  28. package/dist/esm/Swiper.js +2 -1
  29. package/dist/esm/TabPane.js +5 -33
  30. package/dist/esm/Tabs.js +6 -196
  31. package/dist/esm/TextArea.js +45 -4
  32. package/dist/esm/Toast.js +2 -1
  33. package/dist/esm/nutui-react.es.js +8 -0
  34. package/dist/esm/render-4a3856cb.js +32 -0
  35. package/dist/esm/tabpane-c957ab14.js +33 -0
  36. package/dist/esm/tabs-a48583e9.js +196 -0
  37. package/dist/esm/useClientRect-839d18c5.js +44 -0
  38. package/dist/locales/base.d.ts +16 -0
  39. package/dist/locales/base.js +1 -1
  40. package/dist/locales/en-US.js +17 -1
  41. package/dist/locales/id-ID.js +17 -1
  42. package/dist/locales/zh-CN.js +17 -1
  43. package/dist/locales/zh-TW.js +17 -1
  44. package/dist/nutui.react.es.js +2338 -530
  45. package/dist/nutui.react.umd.js +2345 -529
  46. package/dist/packages/audio/audio.scss +80 -0
  47. package/dist/packages/calendar/calendar.scss +57 -36
  48. package/dist/packages/calendaritem/calendaritem.scss +0 -191
  49. package/dist/packages/cascader/cascader.scss +69 -0
  50. package/dist/packages/grid/grid.scss +10 -0
  51. package/dist/packages/griditem/griditem.scss +103 -0
  52. package/dist/packages/imagepreview/imagepreview.scss +51 -0
  53. package/dist/packages/menu/menu.scss +72 -0
  54. package/dist/packages/menuitem/menuitem.scss +90 -0
  55. package/dist/packages/popup/popup.scss +1 -1
  56. package/dist/packages/searchbar/searchbar.scss +1 -0
  57. package/dist/packages/shortpassword/shortpassword.scss +6 -1
  58. package/dist/packages/swipe/swipe.scss +33 -0
  59. package/dist/packages/textarea/textarea.scss +16 -1
  60. package/dist/style.css +1 -1
  61. package/dist/style.es.js +1 -1
  62. package/dist/styles/font/iconfont.js +20 -18
  63. package/dist/styles/themes/default.scss +8 -0
  64. package/dist/styles/variables.scss +59 -8
  65. package/dist/types/audio/__test__/audio.spec.d.ts +1 -0
  66. package/dist/types/audio/audio.d.ts +18 -0
  67. package/dist/types/audio/audio.taro.d.ts +18 -0
  68. package/dist/types/audio/demo.d.ts +4 -0
  69. package/dist/types/audio/index.d.ts +2 -0
  70. package/dist/types/audio/index.taro.d.ts +2 -0
  71. package/dist/types/backtop/__test__/backtop.spec.d.ts +1 -0
  72. package/dist/types/calendar/__tests__/calendar.spec.d.ts +1 -0
  73. package/dist/types/calendar/calendar.d.ts +22 -2
  74. package/dist/types/calendar/demo.d.ts +1 -0
  75. package/dist/types/calendaritem/calendaritem.d.ts +21 -3
  76. package/dist/types/cascader/__tests__/cascader.spec.d.ts +1 -0
  77. package/dist/types/cascader/cascader.d.ts +25 -0
  78. package/dist/types/cascader/cascader.taro.d.ts +25 -0
  79. package/dist/types/cascader/cascaderItem.d.ts +25 -0
  80. package/dist/types/cascader/cascaderItem.taro.d.ts +25 -0
  81. package/dist/types/cascader/demo.d.ts +3 -0
  82. package/dist/types/cascader/helper.d.ts +4 -0
  83. package/dist/types/cascader/index.d.ts +2 -0
  84. package/dist/types/cascader/index.taro.d.ts +2 -0
  85. package/dist/types/cascader/tree.d.ts +12 -0
  86. package/dist/types/cascader/types.d.ts +28 -0
  87. package/dist/types/checkbox/checkbox.d.ts +2 -2
  88. package/dist/types/checkbox/checkbox.taro.d.ts +2 -2
  89. package/dist/types/checkboxgroup/checkboxgroup.d.ts +2 -2
  90. package/dist/types/checkboxgroup/checkboxgroup.taro.d.ts +2 -2
  91. package/dist/types/dialog/__test__/dialog.spec.d.ts +1 -0
  92. package/dist/types/dialog/config.d.ts +3 -3
  93. package/dist/types/dialog/dialog.d.ts +2 -1
  94. package/dist/types/dialog/dialog.taro.d.ts +2 -1
  95. package/dist/types/fixednav/fixednav.d.ts +2 -2
  96. package/dist/types/grid/__test__/grid.spec.d.ts +1 -0
  97. package/dist/types/grid/demo.d.ts +3 -0
  98. package/dist/types/grid/grid.d.ts +16 -0
  99. package/dist/types/grid/grid.taro.d.ts +16 -0
  100. package/dist/types/grid/index.d.ts +2 -0
  101. package/dist/types/grid/index.taro.d.ts +2 -0
  102. package/dist/types/griditem/griditem.d.ts +20 -0
  103. package/dist/types/griditem/griditem.taro.d.ts +20 -0
  104. package/dist/types/griditem/index.d.ts +2 -0
  105. package/dist/types/griditem/index.taro.d.ts +2 -0
  106. package/dist/types/icon/icon.d.ts +1 -2
  107. package/dist/types/icon/icon.taro.d.ts +1 -2
  108. package/dist/types/imagepreview/__test__/imagepreview.spec.d.ts +1 -0
  109. package/dist/types/imagepreview/demo.d.ts +3 -0
  110. package/dist/types/imagepreview/imagepreview.d.ts +26 -0
  111. package/dist/types/imagepreview/imagepreview.taro.d.ts +26 -0
  112. package/dist/types/imagepreview/index.d.ts +2 -0
  113. package/dist/types/imagepreview/index.taro.d.ts +2 -0
  114. package/dist/types/input/__test__/input.spec.d.ts +1 -0
  115. package/dist/types/menu/__test__/menu.spec.d.ts +1 -0
  116. package/dist/types/menu/demo.d.ts +4 -0
  117. package/dist/types/menu/index.d.ts +2 -0
  118. package/dist/types/menu/index.taro.d.ts +2 -0
  119. package/dist/types/menu/menu.d.ts +12 -0
  120. package/dist/types/menu/menu.taro.d.ts +12 -0
  121. package/dist/types/menuitem/index.d.ts +2 -0
  122. package/dist/types/menuitem/index.taro.d.ts +2 -0
  123. package/dist/types/menuitem/menuitem.d.ts +23 -0
  124. package/dist/types/menuitem/menuitem.taro.d.ts +23 -0
  125. package/dist/types/notify/__test__/notify.spec.d.ts +1 -0
  126. package/dist/types/notify/notify.d.ts +13 -0
  127. package/dist/types/notify/notify.taro.d.ts +13 -0
  128. package/dist/types/nutui.react.d.ts +95 -1
  129. package/dist/types/picker/doc.en.d.ts +142 -0
  130. package/dist/types/picker/picker.d.ts +2 -2
  131. package/dist/types/picker/picker.taro.d.ts +2 -2
  132. package/dist/types/popup/popup.d.ts +1 -1
  133. package/dist/types/popup/popup.taro.d.ts +1 -1
  134. package/dist/types/shortpassword/shortpassword.taro.d.ts +3 -3
  135. package/dist/types/sidenavbar/sidenavbar.d.ts +14 -2
  136. package/dist/types/sidenavbar/sidenavbar.taro.d.ts +14 -2
  137. package/dist/types/sidenavbaritem/sidenavbaritem.d.ts +10 -2
  138. package/dist/types/sidenavbaritem/sidenavbaritem.taro.d.ts +10 -2
  139. package/dist/types/subsidenavbar/subsidenavbar.d.ts +13 -3
  140. package/dist/types/subsidenavbar/subsidenavbar.taro.d.ts +13 -3
  141. package/dist/types/swipe/__tests__/swipe.spec.d.ts +1 -0
  142. package/dist/types/swipe/demo.d.ts +3 -0
  143. package/dist/types/swipe/index.d.ts +2 -0
  144. package/dist/types/swipe/index.taro.d.ts +2 -0
  145. package/dist/types/swipe/swipe.d.ts +41 -0
  146. package/dist/types/swipe/swipe.taro.d.ts +41 -0
  147. package/dist/types/swiper/swiper.d.ts +1 -2
  148. package/dist/types/swiperitem/swiperitem.d.ts +1 -2
  149. package/dist/types/table/table.d.ts +2 -1
  150. package/dist/types/table/table.taro.d.ts +2 -1
  151. package/dist/types/table/types.d.ts +1 -1
  152. package/dist/types/textarea/__test__/textarea.spec.d.ts +1 -0
  153. package/dist/types/toast/toast.d.ts +21 -0
  154. package/dist/types/toast/toast.taro.d.ts +18 -0
  155. package/dist/types/virtuallist/type.d.ts +1 -1
  156. package/dist/types/virtuallist/virtuallist.d.ts +2 -1
  157. package/dist/types/virtuallist/virtuallist.taro.d.ts +2 -1
  158. package/package.json +4 -4
@@ -1,4 +1,11 @@
1
- import React, { FunctionComponent } from 'react';
1
+ import React from 'react';
2
+ declare type CalendarRef = {
3
+ scrollToDate: (date: string) => void;
4
+ };
5
+ interface Day {
6
+ day: string | number;
7
+ type: string;
8
+ }
2
9
  export interface CalendarProps {
3
10
  type?: string;
4
11
  isAutoBackFill?: boolean;
@@ -8,7 +15,20 @@ export interface CalendarProps {
8
15
  defaultValue?: string | string[];
9
16
  startDate?: string;
10
17
  endDate?: string;
18
+ showToday?: boolean;
19
+ startText?: string;
20
+ endText?: string;
21
+ confirmText?: string;
22
+ showTitle?: boolean;
23
+ showSubTitle?: boolean;
24
+ toDateAnimation?: boolean;
25
+ onBtn?: (() => string | JSX.Element) | undefined;
26
+ onDay?: ((date: Day) => string | JSX.Element) | undefined;
27
+ onTopInfo?: ((date: Day) => string | JSX.Element) | undefined;
28
+ onBottomInfo?: ((date: Day) => string | JSX.Element) | undefined;
11
29
  onClose?: () => void;
12
30
  onChoose?: (param: string) => void;
31
+ onSelected?: (data: string) => void;
13
32
  }
14
- export declare const Calendar: FunctionComponent<Partial<CalendarProps> & React.HTMLAttributes<HTMLDivElement>>;
33
+ export declare const Calendar: React.ForwardRefExoticComponent<Partial<CalendarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, ""> & React.RefAttributes<CalendarRef>>;
34
+ export {};
@@ -1,3 +1,4 @@
1
1
  /// <reference types="react" />
2
+ import './demo.scss';
2
3
  declare const CalendarDemo: () => JSX.Element;
3
4
  export default CalendarDemo;
@@ -1,5 +1,12 @@
1
- import React, { FunctionComponent } from 'react';
1
+ import React from 'react';
2
+ declare type CalendarRef = {
3
+ scrollToDate: (date: string) => void;
4
+ };
2
5
  declare type InputDate = string | string[];
6
+ interface Day {
7
+ day: string | number;
8
+ type: string;
9
+ }
3
10
  export interface CalendarItemProps {
4
11
  type?: string;
5
12
  isAutoBackFill?: boolean;
@@ -9,9 +16,20 @@ export interface CalendarItemProps {
9
16
  defaultValue: InputDate;
10
17
  startDate?: InputDate;
11
18
  endDate?: InputDate;
19
+ showToday?: boolean;
20
+ startText?: string;
21
+ endText?: string;
22
+ confirmText?: string;
23
+ showTitle?: boolean;
24
+ showSubTitle?: boolean;
25
+ toDateAnimation?: boolean;
26
+ onBtn?: (() => string | JSX.Element) | undefined;
27
+ onDay?: ((date: Day) => string | JSX.Element) | undefined;
28
+ onTopInfo?: ((date: Day) => string | JSX.Element) | undefined;
29
+ onBottomInfo?: ((date: Day) => string | JSX.Element) | undefined;
12
30
  onChoose?: (data: any) => void;
13
31
  onUpdate?: () => void;
14
- onClose?: () => void;
32
+ onSelected?: (data: string) => void;
15
33
  }
16
- export declare const CalendarItem: FunctionComponent<Partial<CalendarItemProps> & React.HTMLAttributes<HTMLDivElement>>;
34
+ export declare const CalendarItem: React.ForwardRefExoticComponent<Partial<CalendarItemProps> & Omit<React.HTMLAttributes<HTMLDivElement>, ""> & React.RefAttributes<CalendarRef>>;
17
35
  export {};
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,25 @@
1
+ import React, { CSSProperties } from 'react';
2
+ import { CascaderOption } from './types';
3
+ export interface CascaderProps {
4
+ className: string;
5
+ style: CSSProperties;
6
+ visible: boolean;
7
+ options: CascaderOption[];
8
+ value: string[];
9
+ title: string;
10
+ textKey: string;
11
+ valueKey: string;
12
+ childrenKey: string;
13
+ convertConfig: Record<string, string | number | null>;
14
+ closeable: boolean;
15
+ closeIconPosition: string;
16
+ closeIcon: string;
17
+ lazy: boolean;
18
+ lazyLoad: (node: any, resolve: any) => void;
19
+ onClose?: () => void;
20
+ onChange: (value: any, params: any) => void;
21
+ onPathChange: (value: any, params: any) => void;
22
+ }
23
+ export declare const Cascader: React.ForwardRefExoticComponent<Partial<CascaderProps> & {
24
+ children?: React.ReactNode;
25
+ } & React.RefAttributes<unknown>>;
@@ -0,0 +1,25 @@
1
+ import React, { CSSProperties } from 'react';
2
+ import { CascaderOption } from './types';
3
+ export interface CascaderProps {
4
+ className: string;
5
+ style: CSSProperties;
6
+ visible: boolean;
7
+ options: CascaderOption[];
8
+ value: string[];
9
+ title: string;
10
+ textKey: string;
11
+ valueKey: string;
12
+ childrenKey: string;
13
+ convertConfig: Record<string, string | number | null>;
14
+ closeable: boolean;
15
+ closeIconPosition: string;
16
+ closeIcon: string;
17
+ lazy: boolean;
18
+ lazyLoad: (node: any, resolve: any) => void;
19
+ onClose?: () => void;
20
+ onChange: (value: any, params: any) => void;
21
+ onPathChange: (value: any, params: any) => void;
22
+ }
23
+ export declare const Cascader: React.ForwardRefExoticComponent<Partial<CascaderProps> & {
24
+ children?: React.ReactNode;
25
+ } & React.RefAttributes<unknown>>;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ interface OptiosInfo {
3
+ text: string;
4
+ value: string;
5
+ paneKey: string;
6
+ disabled?: boolean;
7
+ loading?: boolean;
8
+ children?: OptiosInfo[];
9
+ }
10
+ export interface CascaderItemProps {
11
+ data: {
12
+ text: string;
13
+ value: string;
14
+ paneKey: string;
15
+ disabled?: boolean;
16
+ loading?: boolean;
17
+ children?: OptiosInfo[];
18
+ };
19
+ checked: boolean;
20
+ chooseItem: (data: any) => void;
21
+ }
22
+ export declare const CascaderItem: React.ForwardRefExoticComponent<Partial<CascaderItemProps> & {
23
+ children?: React.ReactNode;
24
+ } & React.RefAttributes<unknown>>;
25
+ export {};
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ interface OptiosInfo {
3
+ text: string;
4
+ value: string;
5
+ paneKey: string;
6
+ disabled?: boolean;
7
+ loading?: boolean;
8
+ children?: OptiosInfo[];
9
+ }
10
+ export interface CascaderItemProps {
11
+ data: {
12
+ text: string;
13
+ value: string;
14
+ paneKey: string;
15
+ disabled?: boolean;
16
+ loading?: boolean;
17
+ children?: OptiosInfo[];
18
+ };
19
+ checked: boolean;
20
+ chooseItem: (data: any) => void;
21
+ }
22
+ export declare const CascaderItem: React.ForwardRefExoticComponent<Partial<CascaderItemProps> & {
23
+ children?: React.ReactNode;
24
+ } & React.RefAttributes<unknown>>;
25
+ export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const CascaderDemo: () => JSX.Element;
3
+ export default CascaderDemo;
@@ -0,0 +1,4 @@
1
+ import { CascaderOption, CascaderConfig, convertConfig } from './types';
2
+ export declare const formatTree: (tree: CascaderOption[], parent: CascaderOption | null, config: CascaderConfig) => CascaderOption[];
3
+ export declare const eachTree: (tree: CascaderOption[], cb: (node: CascaderOption) => unknown) => void;
4
+ export declare const convertListToOptions: (list: CascaderOption[], options: convertConfig) => CascaderOption[];
@@ -0,0 +1,2 @@
1
+ import { Cascader } from './cascader';
2
+ export default Cascader;
@@ -0,0 +1,2 @@
1
+ import { Cascader } from './cascader.taro';
2
+ export default Cascader;
@@ -0,0 +1,12 @@
1
+ import { CascaderOption, CascaderConfig, CascaderValue } from './types';
2
+ declare class Tree {
3
+ nodes: CascaderOption[];
4
+ readonly config: CascaderConfig;
5
+ constructor(nodes: CascaderOption[], config?: CascaderConfig);
6
+ updateChildren(nodes: CascaderOption[], parent: CascaderOption | null): void;
7
+ getNodeByValue(value: CascaderOption['value']): CascaderOption | void;
8
+ getPathNodesByValue(value: CascaderValue): CascaderOption[];
9
+ isLeaf: (node: CascaderOption, lazy: boolean) => boolean;
10
+ hasChildren: (node: CascaderOption, lazy: boolean) => boolean;
11
+ }
12
+ export default Tree;
@@ -0,0 +1,28 @@
1
+ export interface CascaderPane {
2
+ nodes: [];
3
+ selectedNode: CascaderOption | null;
4
+ paneKey: string;
5
+ }
6
+ export interface CascaderOption {
7
+ text?: string;
8
+ value?: number | string;
9
+ paneKey?: string;
10
+ disabled?: boolean;
11
+ children?: CascaderOption[];
12
+ leaf?: boolean;
13
+ level?: number;
14
+ loading?: boolean;
15
+ root?: boolean;
16
+ }
17
+ export interface CascaderConfig {
18
+ value?: string;
19
+ text?: string;
20
+ children?: string;
21
+ }
22
+ export declare type CascaderValue = CascaderOption['value'][];
23
+ export interface convertConfig {
24
+ topId?: string | number | null;
25
+ idKey?: string;
26
+ pidKey?: string;
27
+ sortKey?: string;
28
+ }
@@ -1,6 +1,6 @@
1
1
  import React, { FunctionComponent } from 'react';
2
2
  import CheckboxGroup from '../checkboxgroup';
3
- export interface CheckBoxProps {
3
+ export interface CheckboxProps {
4
4
  checked: boolean;
5
5
  disabled: boolean;
6
6
  textPosition: 'left' | 'right';
@@ -14,6 +14,6 @@ export interface CheckBoxProps {
14
14
  label: string;
15
15
  onChange: (state: boolean, label: string) => void;
16
16
  }
17
- export declare const Checkbox: FunctionComponent<Partial<CheckBoxProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>> & {
17
+ export declare const Checkbox: FunctionComponent<Partial<CheckboxProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>> & {
18
18
  Group: typeof CheckboxGroup;
19
19
  };
@@ -1,6 +1,6 @@
1
1
  import React, { FunctionComponent } from 'react';
2
2
  import CheckboxGroup from '../checkboxgroup';
3
- export interface CheckBoxProps {
3
+ export interface CheckboxProps {
4
4
  checked: boolean;
5
5
  disabled: boolean;
6
6
  textPosition: 'left' | 'right';
@@ -14,6 +14,6 @@ export interface CheckBoxProps {
14
14
  label: string;
15
15
  onChange: (state: boolean, label: string) => void;
16
16
  }
17
- export declare const Checkbox: FunctionComponent<Partial<CheckBoxProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>> & {
17
+ export declare const Checkbox: FunctionComponent<Partial<CheckboxProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>> & {
18
18
  Group: typeof CheckboxGroup;
19
19
  };
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- export interface CheckBoxGroupProps {
2
+ export interface CheckboxGroupProps {
3
3
  disabled: boolean;
4
4
  checkedValue: string[];
5
5
  max: number | undefined;
6
6
  onChange: (value: string[]) => void;
7
7
  }
8
- export declare const CheckboxGroup: React.ForwardRefExoticComponent<Partial<CheckBoxGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;
8
+ export declare const CheckboxGroup: React.ForwardRefExoticComponent<Partial<CheckboxGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- export interface CheckBoxGroupProps {
2
+ export interface CheckboxGroupProps {
3
3
  disabled: boolean;
4
4
  checkedValue: string[];
5
5
  max: number | undefined;
6
6
  onChange: (value: string[]) => void;
7
7
  }
8
- export declare const CheckboxGroup: React.ForwardRefExoticComponent<Partial<CheckBoxGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;
8
+ export declare const CheckboxGroup: React.ForwardRefExoticComponent<Partial<CheckboxGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -3,7 +3,7 @@ export declare type DialogConfigType = {
3
3
  prefixCls?: string;
4
4
  simple?: boolean;
5
5
  };
6
- export interface DialogProps {
6
+ export interface IDialogProps {
7
7
  className?: string;
8
8
  style?: CSSProperties;
9
9
  visible?: boolean;
@@ -32,13 +32,13 @@ export declare type DialogReturnProps = {
32
32
  update: (newConfig: ConfirmProps) => void;
33
33
  close: () => void;
34
34
  };
35
- export interface ConfirmProps extends DialogProps {
35
+ export interface ConfirmProps extends IDialogProps {
36
36
  content?: ReactNode;
37
37
  icon?: ReactNode | null;
38
38
  isNotice?: boolean;
39
39
  noticeType?: string;
40
40
  }
41
- export interface DialogComponent extends ForwardRefExoticComponent<PropsWithChildren<DialogProps>> {
41
+ export interface DialogComponent extends ForwardRefExoticComponent<PropsWithChildren<IDialogProps>> {
42
42
  confirm: (props: ConfirmProps) => DialogReturnProps;
43
43
  alert: (props: ConfirmProps) => DialogReturnProps;
44
44
  config: (config: DialogConfigType) => void;
@@ -1,2 +1,3 @@
1
- import { DialogComponent } from './config';
1
+ import { IDialogProps, DialogComponent } from './config';
2
+ export declare type DialogProps = IDialogProps;
2
3
  export declare const Dialog: DialogComponent;
@@ -1,2 +1,3 @@
1
- import { DialogComponent } from './config';
1
+ import { IDialogProps, DialogComponent } from './config';
2
+ export declare type DialogProps = IDialogProps;
2
3
  export declare const Dialog: DialogComponent;
@@ -1,4 +1,4 @@
1
- import React, { FunctionComponent } from 'react';
1
+ import React, { FunctionComponent, MouseEvent } from 'react';
2
2
  declare type Direction = 'right' | 'left';
3
3
  declare type Position = {
4
4
  top?: string;
@@ -14,7 +14,7 @@ export interface FixedNavProps {
14
14
  position: Position;
15
15
  type: Direction;
16
16
  onChange: (v: any) => void;
17
- onSelected: (item: any, e: any) => void;
17
+ onSelected: (v: any, event: MouseEvent) => void;
18
18
  slotList: React.ReactNode;
19
19
  slotBtn: React.ReactNode;
20
20
  }
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const GridDemo: () => JSX.Element;
3
+ export default GridDemo;
@@ -0,0 +1,16 @@
1
+ import React, { CSSProperties, FunctionComponent } from 'react';
2
+ export declare type GridDirection = 'horizontal' | 'vertical';
3
+ export interface GridProps {
4
+ columnNum: string | number;
5
+ border: boolean;
6
+ gutter: string | number;
7
+ center: boolean;
8
+ square: boolean;
9
+ reverse: boolean;
10
+ direction: GridDirection;
11
+ className?: string;
12
+ iconSize?: string | number;
13
+ iconColor?: string;
14
+ style?: CSSProperties;
15
+ }
16
+ export declare const Grid: FunctionComponent<Partial<GridProps> & React.HTMLAttributes<HTMLDivElement>>;
@@ -0,0 +1,16 @@
1
+ import React, { CSSProperties, FunctionComponent } from 'react';
2
+ export declare type GridDirection = 'horizontal' | 'vertical';
3
+ export interface GridProps {
4
+ columnNum: string | number;
5
+ border: boolean;
6
+ gutter: string | number;
7
+ center: boolean;
8
+ square: boolean;
9
+ reverse: boolean;
10
+ direction: GridDirection;
11
+ className?: string;
12
+ iconSize?: string | number;
13
+ iconColor?: string;
14
+ style?: CSSProperties;
15
+ }
16
+ export declare const Grid: FunctionComponent<Partial<GridProps> & React.HTMLAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ import { Grid } from './grid';
2
+ export default Grid;
@@ -0,0 +1,2 @@
1
+ import { Grid } from './grid.taro';
2
+ export default Grid;
@@ -0,0 +1,20 @@
1
+ import React, { FunctionComponent, ReactNode } from 'react';
2
+ declare type GridDirection = 'horizontal' | 'vertical';
3
+ export interface GridItemProps {
4
+ text: string | ReactNode;
5
+ icon: string | ReactNode;
6
+ iconSize?: string | number;
7
+ iconColor?: string;
8
+ parentIconSize?: string | number;
9
+ parentIconColor?: string;
10
+ index: number;
11
+ columnNum: string | number;
12
+ border: boolean;
13
+ gutter: string | number;
14
+ center: boolean;
15
+ square: boolean;
16
+ reverse: boolean;
17
+ direction: GridDirection;
18
+ }
19
+ export declare const GridItem: FunctionComponent<Partial<GridItemProps> & React.HTMLAttributes<HTMLDivElement>>;
20
+ export {};
@@ -0,0 +1,20 @@
1
+ import React, { FunctionComponent, ReactNode } from 'react';
2
+ declare type GridDirection = 'horizontal' | 'vertical';
3
+ export interface GridItemProps {
4
+ text: string | ReactNode;
5
+ icon: string | ReactNode;
6
+ iconSize?: string | number;
7
+ iconColor?: string;
8
+ parentIconSize?: string | number;
9
+ parentIconColor?: string;
10
+ index: number;
11
+ columnNum: string | number;
12
+ border: boolean;
13
+ gutter: string | number;
14
+ center: boolean;
15
+ square: boolean;
16
+ reverse: boolean;
17
+ direction: GridDirection;
18
+ }
19
+ export declare const GridItem: FunctionComponent<Partial<GridItemProps> & React.HTMLAttributes<HTMLDivElement>>;
20
+ export {};
@@ -0,0 +1,2 @@
1
+ import { GridItem } from './griditem';
2
+ export default GridItem;
@@ -0,0 +1,2 @@
1
+ import { GridItem } from './griditem.taro';
2
+ export default GridItem;
@@ -1,5 +1,5 @@
1
1
  import React, { ReactElement, ReactHTML } from 'react';
2
- interface IconProps {
2
+ export interface IconProps {
3
3
  name: string;
4
4
  size: string | number;
5
5
  classPrefix: string;
@@ -16,4 +16,3 @@ export declare namespace Icon {
16
16
  var defaultProps: IconProps;
17
17
  var displayName: string;
18
18
  }
19
- export {};
@@ -1,5 +1,5 @@
1
1
  import React, { ReactElement, ReactHTML } from 'react';
2
- interface IconProps {
2
+ export interface IconProps {
3
3
  name: string;
4
4
  size: string | number;
5
5
  classPrefix: string;
@@ -16,4 +16,3 @@ export declare namespace Icon {
16
16
  var defaultProps: IconProps;
17
17
  var displayName: string;
18
18
  }
19
- export {};
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const ImagePreviewDemo: () => JSX.Element;
3
+ export default ImagePreviewDemo;
@@ -0,0 +1,26 @@
1
+ import { FunctionComponent, CSSProperties } from 'react';
2
+ export interface ImagePreviewProps {
3
+ className?: string;
4
+ images: Array<{
5
+ src: string;
6
+ }>;
7
+ videos: Array<{
8
+ source: {
9
+ src: string;
10
+ type: string;
11
+ };
12
+ options: {
13
+ muted: boolean;
14
+ controls: boolean;
15
+ };
16
+ }>;
17
+ show: boolean;
18
+ autoplay: number | string;
19
+ initNo: number;
20
+ contentClose: boolean;
21
+ paginationVisible: boolean;
22
+ style?: CSSProperties;
23
+ paginationColor: string;
24
+ onClose: () => void;
25
+ }
26
+ export declare const ImagePreview: FunctionComponent<Partial<ImagePreviewProps>>;
@@ -0,0 +1,26 @@
1
+ import { FunctionComponent, CSSProperties } from 'react';
2
+ export interface ImagePreviewProps {
3
+ className?: string;
4
+ images: Array<{
5
+ src: string;
6
+ }>;
7
+ videos: Array<{
8
+ source: {
9
+ src: string;
10
+ type: string;
11
+ };
12
+ options: {
13
+ muted: boolean;
14
+ controls: boolean;
15
+ };
16
+ }>;
17
+ show: boolean;
18
+ autoplay: number | string;
19
+ initNo: number;
20
+ contentClose: boolean;
21
+ paginationVisible: boolean;
22
+ style?: CSSProperties;
23
+ paginationColor: string;
24
+ onClose: () => void;
25
+ }
26
+ export declare const ImagePreview: FunctionComponent<Partial<ImagePreviewProps>>;
@@ -0,0 +1,2 @@
1
+ import { ImagePreview } from './imagepreview';
2
+ export default ImagePreview;
@@ -0,0 +1,2 @@
1
+ import { ImagePreview } from './imagepreview.taro';
2
+ export default ImagePreview;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import './demo.scss';
3
+ declare const MenuDemo: () => JSX.Element;
4
+ export default MenuDemo;
@@ -0,0 +1,2 @@
1
+ import { Menu } from './menu';
2
+ export default Menu;
@@ -0,0 +1,2 @@
1
+ import { Menu } from './menu.taro';
2
+ export default Menu;
@@ -0,0 +1,12 @@
1
+ import React, { FunctionComponent } from 'react';
2
+ export interface MenuProps {
3
+ className: string;
4
+ style: React.CSSProperties;
5
+ activeColor: string;
6
+ closeOnClickOverlay: boolean;
7
+ scrollFixed: boolean | string | number;
8
+ lockScroll: boolean;
9
+ titleIcon: string;
10
+ children: React.ReactNode;
11
+ }
12
+ export declare const Menu: FunctionComponent<Partial<MenuProps>>;
@@ -0,0 +1,12 @@
1
+ import React, { FunctionComponent } from 'react';
2
+ export interface MenuProps {
3
+ className: string;
4
+ style: React.CSSProperties;
5
+ activeColor: string;
6
+ closeOnClickOverlay: boolean;
7
+ scrollFixed: boolean | string | number;
8
+ lockScroll: boolean;
9
+ titleIcon: string;
10
+ children: React.ReactNode;
11
+ }
12
+ export declare const Menu: FunctionComponent<Partial<MenuProps>>;
@@ -0,0 +1,2 @@
1
+ import { MenuItem } from './menuitem';
2
+ export default MenuItem;
@@ -0,0 +1,2 @@
1
+ import { MenuItem } from './menuitem.taro';
2
+ export default MenuItem;
@@ -0,0 +1,23 @@
1
+ import React, { FunctionComponent } from 'react';
2
+ export interface OptionItem {
3
+ text: string;
4
+ value: string | number;
5
+ }
6
+ export interface MenuItemProps {
7
+ className: string;
8
+ style: React.CSSProperties;
9
+ title: React.ReactNode;
10
+ options: OptionItem[];
11
+ disabled: boolean;
12
+ columns: number;
13
+ optionsIcon: string;
14
+ direction: string;
15
+ activeTitleClass: string;
16
+ inactiveTitleClass: string;
17
+ fontClassName: string;
18
+ iconClassPrefix: string;
19
+ value: string | number;
20
+ onChange: (event: any) => void;
21
+ children: React.ReactNode;
22
+ }
23
+ export declare const MenuItem: FunctionComponent<Partial<MenuItemProps>>;