@nutui/nutui-react-taro 2.0.0-alpha.11 → 2.0.0-alpha.12

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 (103) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/esm/ActionSheet/style/style.css +1 -1
  3. package/dist/esm/ActionSheet.js +1 -3
  4. package/dist/esm/CountDown/style/style.css +1 -1
  5. package/dist/esm/CountDown.js +2 -3
  6. package/dist/esm/Ellipsis/style/style.css +1 -1
  7. package/dist/esm/Ellipsis.js +1 -1
  8. package/dist/esm/SearchBar/style/style.css +1 -1
  9. package/dist/esm/SearchBar.js +1 -4
  10. package/dist/esm/ShortPassword/style/style.css +1 -1
  11. package/dist/esm/ShortPassword.js +3 -4
  12. package/dist/esm/Toast/style/style.css +1 -1
  13. package/dist/esm/Toast.js +2 -3
  14. package/dist/esm/VirtualList/style/style.css +1 -1
  15. package/dist/esm/VirtualList.js +2 -2
  16. package/dist/esm/actionsheet.taro-697a594b.js +54 -0
  17. package/dist/esm/{countdown.taro-22200811.js → countdown.taro-c399cc08.js} +17 -10
  18. package/dist/esm/{ellipsis.taro-02765890.js → ellipsis.taro-f423affa.js} +13 -6
  19. package/dist/esm/nutui-react.es.js +7 -7
  20. package/dist/esm/searchbar.taro-09468fff.js +122 -0
  21. package/dist/esm/shortpassword.taro-eabbde1b.js +90 -0
  22. package/dist/esm/toast.taro-b2937e7c.js +171 -0
  23. package/dist/esm/types/src/packages/actionsheet/actionsheet.d.ts +11 -15
  24. package/dist/esm/types/src/packages/actionsheet/actionsheet.taro.d.ts +11 -15
  25. package/dist/esm/types/src/packages/actionsheet/index.d.ts +1 -0
  26. package/dist/esm/types/src/packages/actionsheet/index.taro.d.ts +1 -0
  27. package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +2 -1
  28. package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +2 -1
  29. package/dist/esm/types/src/packages/configprovider/index.d.ts +1 -0
  30. package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +1 -0
  31. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -0
  32. package/dist/esm/types/src/packages/countdown/countdown.d.ts +5 -4
  33. package/dist/esm/types/src/packages/countdown/countdown.taro.d.ts +5 -4
  34. package/dist/esm/types/src/packages/countdown/index.d.ts +1 -0
  35. package/dist/esm/types/src/packages/countdown/index.taro.d.ts +1 -0
  36. package/dist/esm/types/src/packages/ellipsis/ellipsis.taro.d.ts +1 -0
  37. package/dist/esm/types/src/packages/searchbar/index.d.ts +1 -0
  38. package/dist/esm/types/src/packages/searchbar/index.taro.d.ts +1 -0
  39. package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +4 -31
  40. package/dist/esm/types/src/packages/searchbar/searchbar.taro.d.ts +4 -31
  41. package/dist/esm/types/src/packages/shortpassword/index.d.ts +1 -0
  42. package/dist/esm/types/src/packages/shortpassword/index.taro.d.ts +1 -0
  43. package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +17 -20
  44. package/dist/esm/types/src/packages/shortpassword/shortpassword.taro.d.ts +17 -20
  45. package/dist/esm/types/src/packages/toast/Notification.d.ts +9 -13
  46. package/dist/esm/types/src/packages/toast/index.d.ts +1 -0
  47. package/dist/esm/types/src/packages/toast/index.taro.d.ts +1 -0
  48. package/dist/esm/types/src/packages/toast/toast.d.ts +19 -26
  49. package/dist/esm/types/src/packages/toast/toast.taro.d.ts +9 -11
  50. package/dist/esm/types/src/packages/virtuallist/index.d.ts +1 -0
  51. package/dist/esm/types/src/packages/virtuallist/index.taro.d.ts +1 -0
  52. package/dist/esm/types/src/packages/virtuallist/type.d.ts +0 -18
  53. package/dist/esm/types/src/packages/virtuallist/utils.d.ts +3 -3
  54. package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +15 -4
  55. package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +13 -14
  56. package/dist/esm/{virtuallist.taro-99f03769.js → virtuallist.taro-97d3403a.js} +27 -30
  57. package/dist/locales/base.js +1 -1
  58. package/dist/locales/en-US.js +1 -1
  59. package/dist/locales/id-ID.js +1 -1
  60. package/dist/locales/tr-TR.js +10 -2
  61. package/dist/locales/zh-CN.js +1 -1
  62. package/dist/locales/zh-TW.js +1 -1
  63. package/dist/locales/zh-UG.js +1 -1
  64. package/dist/nutui.react.es.js +393 -422
  65. package/dist/nutui.react.umd.js +393 -422
  66. package/dist/packages/actionsheet/actionsheet.scss +26 -73
  67. package/dist/packages/countdown/countdown.scss +2 -0
  68. package/dist/packages/ellipsis/ellipsis.scss +4 -0
  69. package/dist/packages/searchbar/searchbar.scss +13 -71
  70. package/dist/packages/shortpassword/shortpassword.scss +1 -88
  71. package/dist/packages/toast/toast.scss +20 -7
  72. package/dist/packages/virtuallist/virtuallist.scss +0 -12
  73. package/dist/style.css +1 -1
  74. package/dist/style.mjs +1 -1
  75. package/dist/styles/variables-jmapp.scss +56 -60
  76. package/dist/styles/variables.scss +30 -53
  77. package/dist/types/packages/actionsheet/actionsheet.taro.d.ts +11 -15
  78. package/dist/types/packages/actionsheet/index.taro.d.ts +1 -0
  79. package/dist/types/packages/configprovider/configprovider.d.ts +2 -1
  80. package/dist/types/packages/configprovider/configprovider.taro.d.ts +2 -1
  81. package/dist/types/packages/configprovider/index.d.ts +1 -0
  82. package/dist/types/packages/configprovider/index.taro.d.ts +1 -0
  83. package/dist/types/packages/configprovider/types.d.ts +1 -0
  84. package/dist/types/packages/countdown/countdown.taro.d.ts +5 -4
  85. package/dist/types/packages/countdown/index.taro.d.ts +1 -0
  86. package/dist/types/packages/ellipsis/ellipsis.taro.d.ts +1 -0
  87. package/dist/types/packages/overlay/index.d.ts +3 -0
  88. package/dist/types/packages/overlay/overlay.d.ts +14 -0
  89. package/dist/types/packages/searchbar/index.taro.d.ts +1 -0
  90. package/dist/types/packages/searchbar/searchbar.taro.d.ts +4 -31
  91. package/dist/types/packages/shortpassword/index.taro.d.ts +1 -0
  92. package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +17 -20
  93. package/dist/types/packages/toast/index.taro.d.ts +1 -0
  94. package/dist/types/packages/toast/toast.taro.d.ts +9 -11
  95. package/dist/types/packages/virtuallist/index.taro.d.ts +1 -0
  96. package/dist/types/packages/virtuallist/type.d.ts +0 -17
  97. package/dist/types/packages/virtuallist/utils.d.ts +3 -3
  98. package/dist/types/packages/virtuallist/virtuallist.taro.d.ts +13 -14
  99. package/package.json +1 -1
  100. package/dist/esm/actionsheet.taro-d2217152.js +0 -61
  101. package/dist/esm/searchbar.taro-37ade36e.js +0 -159
  102. package/dist/esm/shortpassword.taro-f7292032.js +0 -146
  103. package/dist/esm/toast.taro-92c10e1d.js +0 -114
@@ -1,25 +1,22 @@
1
- import React, { CSSProperties, FunctionComponent } from 'react';
2
- import { BasicComponent } from '@/utils/typings';
3
- export interface ShortPasswordProps extends BasicComponent {
4
- title: string;
5
- description: string;
6
- tips: string;
7
- tipsIcon: React.ReactNode;
8
- iconSize: string | number;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { PopupProps } from '../popup/popup';
3
+ export interface ShortPasswordProps extends PopupProps {
4
+ value: string;
9
5
  visible: boolean;
10
- modelValue: string | number;
11
- errorMsg: string;
12
- noButton: boolean;
13
- closeOnClickOverlay: boolean;
14
- length: string | number;
15
- className: string;
16
- style?: CSSProperties;
17
- autoFocus?: boolean;
18
- onChange: (value: string | number) => void;
19
- onOk: (value: string | number) => void;
6
+ plain: boolean;
7
+ title: ReactNode;
8
+ description: ReactNode;
9
+ tips: ReactNode;
10
+ hideFooter: boolean;
11
+ length: number;
12
+ error: ReactNode;
13
+ autoFocus: boolean;
14
+ onFocus: () => void;
15
+ onChange: (value: string) => void;
16
+ onConfirm: (value: string) => void;
20
17
  onCancel: () => void;
21
18
  onClose: () => void;
22
19
  onTips: () => void;
23
- onComplete: (value: string | number) => void;
20
+ onComplete: (value: string) => void;
24
21
  }
25
- export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
22
+ export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps>>;
@@ -1,25 +1,22 @@
1
- import React, { CSSProperties, FunctionComponent } from 'react';
2
- import { BasicComponent } from '@/utils/typings';
3
- export interface ShortPasswordProps extends BasicComponent {
4
- title: string;
5
- description: string;
6
- tips: string;
7
- tipsIcon: React.ReactNode;
8
- iconSize: string | number;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { PopupProps } from '@/packages/popup/popup.taro';
3
+ export interface ShortPasswordProps extends PopupProps {
4
+ value: string;
9
5
  visible: boolean;
10
- modelValue: string | number;
11
- errorMsg: string;
12
- noButton: boolean;
13
- closeOnClickOverlay: boolean;
14
- length: string | number;
15
- className: string;
16
- style?: CSSProperties;
17
- autoFocus?: boolean;
18
- onChange: (value: string | number) => void;
19
- onOk: (value: string | number) => void;
6
+ plain: boolean;
7
+ title: ReactNode;
8
+ description: ReactNode;
9
+ tips: ReactNode;
10
+ hideFooter: boolean;
11
+ length: number;
12
+ error: ReactNode;
13
+ autoFocus: boolean;
14
+ onFocus: () => void;
15
+ onChange: (value: string) => void;
16
+ onConfirm: (value: string) => void;
20
17
  onCancel: () => void;
21
18
  onClose: () => void;
22
19
  onTips: () => void;
23
- onComplete: (value: string | number) => void;
20
+ onComplete: (value: string) => void;
24
21
  }
25
- export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
22
+ export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps>>;
@@ -1,21 +1,16 @@
1
1
  import * as React from 'react';
2
- export interface NotificationProps {
2
+ import { BasicComponent } from '@/utils/typings';
3
+ export interface NotificationProps extends BasicComponent {
3
4
  id?: string;
4
- style?: React.CSSProperties;
5
- icon: React.ReactNode;
6
- msg: string | React.ReactNode;
7
- bottom: string;
5
+ icon: 'success' | 'fail' | 'loading' | 'warn' | React.ReactNode;
6
+ content: string | React.ReactNode;
8
7
  duration: number;
9
- center: boolean;
10
- type: string;
8
+ position?: 'top' | 'center' | 'bottom';
11
9
  title: string;
12
- customClass: string;
13
10
  size: string | number;
14
- textAlignCenter: boolean;
15
- bgColor: string;
16
- cover: boolean;
17
- coverColor: string;
18
- closeOnClickOverlay: boolean;
11
+ closeOnOverlayClick: boolean;
12
+ contentClassName?: string;
13
+ contentStyle?: React.CSSProperties;
19
14
  onClose: () => void;
20
15
  }
21
16
  export default class Notification extends React.PureComponent<NotificationProps> {
@@ -26,6 +21,7 @@ export default class Notification extends React.PureComponent<NotificationProps>
26
21
  startCloseTimer(): void;
27
22
  clearCloseTimer(): void;
28
23
  clickCover(): void;
24
+ renderIcon(): number | boolean | React.ReactFragment | JSX.Element | null | undefined;
29
25
  componentDidMount(): void;
30
26
  componentWillUnmount(): void;
31
27
  render(): JSX.Element;
@@ -1,2 +1,3 @@
1
1
  import Toast from './toast';
2
+ export type { ToastProps, ToastIconType, ToastPositionType } from './toast';
2
3
  export default Toast;
@@ -1,2 +1,3 @@
1
1
  import { Toast } from './toast.taro';
2
+ export type { ToastProps, ToastPositionType } from './toast.taro';
2
3
  export default Toast;
@@ -1,32 +1,25 @@
1
1
  import * as React from 'react';
2
- export interface ToastProps {
2
+ import { BasicComponent } from '@/utils/typings';
3
+ export type ToastPositionType = 'top' | 'bottom' | 'center';
4
+ export type ToastIconType = 'success' | 'fail' | 'loading' | 'warn' | React.ReactNode;
5
+ export interface ToastProps extends BasicComponent {
3
6
  id?: string;
4
- msg: string;
5
- style?: React.CSSProperties;
6
- duration: number;
7
- center: boolean;
8
- type: string;
9
- title: string;
10
- customClass?: string;
11
- bottom: string;
12
- size: string | number;
13
- icon: string | null;
14
- iconSize: string;
15
- textAlignCenter: boolean;
16
- loadingRotate: boolean;
17
- bgColor: string;
18
- onClose: () => void;
19
- cover: boolean;
20
- coverColor: string;
21
- closeOnClickOverlay: boolean;
7
+ duration?: number;
8
+ position?: ToastPositionType;
9
+ title?: string;
10
+ closeOnOverlayClick?: boolean;
11
+ size?: string | number;
12
+ icon?: ToastIconType;
13
+ content?: React.ReactNode;
14
+ onClose?: () => void;
15
+ contentClassName?: string;
16
+ contentStyle?: React.CSSProperties;
22
17
  }
18
+ declare function show(option: ToastProps | string): void;
19
+ declare function config(config: Pick<ToastProps, 'duration' | 'position' | 'closeOnOverlayClick'>): void;
23
20
  declare const _default: {
24
- text(msg: string | React.ReactNode, option?: {}): void;
25
- success(msg: string | React.ReactNode, option?: {}): void;
26
- fail(msg: string | React.ReactNode, option?: {}): void;
27
- loading(msg: string | React.ReactNode, option?: {}): void;
28
- warn(msg: string | React.ReactNode, option?: {}): void;
29
- customIcon(msg: string | React.ReactNode, option?: {}): void;
30
- hide(): void;
21
+ show: typeof show;
22
+ config: typeof config;
23
+ clear(): void;
31
24
  };
32
25
  export default _default;
@@ -1,22 +1,20 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- export interface ToastProps {
2
+ import { BasicComponent } from '@/utils/typings';
3
+ export type ToastPositionType = 'top' | 'bottom' | 'center';
4
+ export interface ToastProps extends BasicComponent {
3
5
  id?: string;
4
- style?: React.CSSProperties;
5
- icon: string | null;
6
+ maskClassName?: string;
7
+ contentClassName?: string;
8
+ contentStyle?: React.CSSProperties;
9
+ icon: string | React.ReactNode;
6
10
  iconSize: string;
7
11
  msg: string | React.ReactNode;
8
- bottom: number | string;
9
12
  duration: number;
10
- center: boolean;
13
+ position?: ToastPositionType;
11
14
  type: string;
12
15
  title: string;
13
- customClass: string;
16
+ closeOnOverlayClick: boolean;
14
17
  size: string | number;
15
- textAlignCenter: boolean;
16
- bgColor: string;
17
- cover: boolean;
18
- coverColor: string;
19
- closeOnClickOverlay: boolean;
20
18
  visible: boolean;
21
19
  onClose: () => void;
22
20
  }
@@ -1,2 +1,3 @@
1
1
  import { VirtualList } from './virtuallist';
2
+ export type { VirtualListProps } from './virtuallist';
2
3
  export default VirtualList;
@@ -1,2 +1,3 @@
1
1
  import { VirtualList } from './virtuallist.taro';
2
+ export type { VirtualListProps } from './virtuallist.taro';
2
3
  export default VirtualList;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type Data = any;
3
2
  export interface VirtualListState {
4
3
  startOffset: number;
@@ -15,20 +14,3 @@ export interface PositionType {
15
14
  left?: number;
16
15
  right: number;
17
16
  }
18
- export interface BasicVirtualListProps {
19
- className?: string;
20
- style?: React.CSSProperties;
21
- sourceData: Array<Data>;
22
- containerSize?: number;
23
- ItemRender?: React.FC<any>;
24
- itemSize?: number;
25
- itemEqualSize?: boolean;
26
- horizontal?: boolean;
27
- overscan?: number;
28
- handleScroll?: (...args: any[]) => any;
29
- onScroll?: (...args: any[]) => any;
30
- key?: string;
31
- locale?: {
32
- [key in string]: string;
33
- };
34
- }
@@ -2,11 +2,11 @@ import { PositionType, Data } from './type';
2
2
  declare const initPositinoCache: (reaItemSize: number, length?: number) => PositionType[];
3
3
  declare const getListTotalSize: (positions: Array<PositionType>, horizontal: true | false) => number;
4
4
  declare const binarySearch: (positionsList: Array<PositionType>, value: number | undefined, horizontal: true | false) => number;
5
- declare const getEndIndex: ({ sourceData, startIndex, visibleCount, itemEqualSize, positions, offSetSize, overscan, sizeKey, }: {
6
- sourceData: Array<Data>;
5
+ declare const getEndIndex: ({ list, startIndex, visibleCount, itemEqual, positions, offSetSize, overscan, sizeKey, }: {
6
+ list: Array<Data>;
7
7
  startIndex: number;
8
8
  visibleCount: number;
9
- itemEqualSize?: boolean | undefined;
9
+ itemEqual?: boolean | undefined;
10
10
  positions: PositionType[];
11
11
  offSetSize: number;
12
12
  overscan: number;
@@ -1,4 +1,15 @@
1
- import { FunctionComponent } from 'react';
2
- import { BasicVirtualListProps } from './type';
3
- export type VirtualListProps = BasicVirtualListProps;
4
- export declare const VirtualList: FunctionComponent<VirtualListProps>;
1
+ import React, { FunctionComponent } from 'react';
2
+ import type { Data } from './type';
3
+ import { BasicComponent } from '@/utils/typings';
4
+ export interface VirtualListProps extends BasicComponent {
5
+ list: Array<Data>;
6
+ containerHeight: number;
7
+ ItemRender: React.FC<any>;
8
+ itemHeight: number;
9
+ itemEqual: boolean;
10
+ direction: 'vertical' | 'horizontal';
11
+ overscan: number;
12
+ onScroll: () => void;
13
+ key: string;
14
+ }
15
+ export declare const VirtualList: FunctionComponent<Partial<VirtualListProps>>;
@@ -1,15 +1,14 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- export type VirtualListProps = {
3
- className?: string | any;
4
- style?: React.CSSProperties;
5
- sourceData: any;
6
- containerSize?: number;
7
- ItemRender?: any;
8
- itemEqualSize?: boolean;
9
- itemSize?: number;
10
- overscan?: number;
11
- onScroll?: (...args: any[]) => any;
12
- key?: any;
13
- locale?: any;
14
- };
15
- export declare const VirtualList: FunctionComponent<VirtualListProps & React.HTMLAttributes<HTMLDivElement>>;
2
+ import { Data } from './type';
3
+ import { BasicComponent } from '@/utils/typings';
4
+ export interface VirtualListProps extends BasicComponent {
5
+ list: Array<Data>;
6
+ containerHeight: number;
7
+ ItemRender: React.FC<any>;
8
+ itemHeight: number;
9
+ itemEqual: boolean;
10
+ overscan: number;
11
+ onScroll: () => void;
12
+ key: string;
13
+ }
14
+ export declare const VirtualList: FunctionComponent<Partial<VirtualListProps>>;
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useRef, useEffect, useCallback } from "react";
2
2
  import { ScrollView } from "@tarojs/components";
3
3
  import { getSystemInfoSync } from "@tarojs/taro";
4
- import { u as useConfig } from "./configprovider.taro-25758d9f.js";
4
+ import { C as ComponentDefaults } from "./typings-11d83a22.js";
5
5
  const initPositinoCache = (reaItemSize, length = 0) => {
6
6
  let index = 0;
7
7
  const positions = Array(length);
@@ -71,20 +71,22 @@ const updateItemSize = (positions, items, sizeKey) => {
71
71
  }
72
72
  });
73
73
  };
74
+ const clientHeight = getSystemInfoSync().windowHeight - 5 || 667;
74
75
  const defaultProps = {
75
- sourceData: [],
76
- itemSize: 66,
77
- itemEqualSize: true,
76
+ ...ComponentDefaults,
77
+ list: [],
78
+ containerHeight: clientHeight,
79
+ itemHeight: 66,
80
+ itemEqual: true,
78
81
  overscan: 2
79
82
  };
80
- const clientHeight = getSystemInfoSync().windowHeight - 5 || 667;
81
- getSystemInfoSync().windowWidth || 375;
82
83
  const VirtualList = (props) => {
83
- const { sourceData = [], ItemRender, itemSize = 66, itemEqualSize = true, overscan = 2, key, onScroll, className, containerSize = clientHeight, ...rest } = props;
84
+ const { list, ItemRender, itemHeight, itemEqual, overscan, key, onScroll, className, containerHeight, ...rest } = {
85
+ ...defaultProps,
86
+ ...props
87
+ };
84
88
  const [startOffset, setStartOffset] = useState(0);
85
89
  const [start, setStart] = useState(0);
86
- const [list, setList] = useState(sourceData.slice());
87
- useConfig();
88
90
  const scrollRef = useRef(null);
89
91
  const itemsRef = useRef(null);
90
92
  const firstItemRef = useRef(null);
@@ -99,7 +101,7 @@ const VirtualList = (props) => {
99
101
  right: 0
100
102
  }
101
103
  ]);
102
- const [offSetSize, setOffSetSize] = useState(containerSize || 0);
104
+ const [offSetSize, setOffSetSize] = useState(containerHeight || 0);
103
105
  const [options, setOptions] = useState({
104
106
  startOffset: 0,
105
107
  startIndex: 0,
@@ -107,37 +109,32 @@ const VirtualList = (props) => {
107
109
  endIndex: 10
108
110
  // 可视区域结束索引
109
111
  });
110
- useEffect(() => {
111
- if (sourceData.length) {
112
- setList(sourceData.slice());
113
- }
114
- }, [sourceData]);
115
112
  useEffect(() => {
116
113
  setPositions((options2) => {
117
114
  return { ...options2, endIndex: visibleCount() };
118
115
  });
119
- }, [itemSize, overscan, offSetSize]);
116
+ }, [itemHeight, overscan, offSetSize]);
120
117
  useEffect(() => {
121
- if (containerSize)
118
+ if (containerHeight)
122
119
  return;
123
120
  setOffSetSize(getContainerHeight());
124
- }, [containerSize]);
121
+ }, [containerHeight]);
125
122
  useEffect(() => {
126
- const pos = initPositinoCache(itemSize, sourceData.length);
123
+ const pos = initPositinoCache(itemHeight, list.length);
127
124
  setPositions(pos);
128
- }, [itemSize, sourceData]);
125
+ }, [itemHeight, list]);
129
126
  const getContainerHeight = () => {
130
- const initH = itemSize * sourceData.length;
131
- return initH < clientHeight ? initH + overscan * itemSize - 5 : Math.min(containerSize, clientHeight);
127
+ const initH = itemHeight * list.length;
128
+ return initH < clientHeight ? initH + overscan * itemHeight - 5 : Math.min(containerHeight, clientHeight);
132
129
  };
133
130
  const visibleCount = () => {
134
- return Math.ceil(getContainerHeight() / itemSize) + overscan;
131
+ return Math.ceil(getContainerHeight() / itemHeight) + overscan;
135
132
  };
136
133
  const end = () => {
137
134
  return start + visibleCount();
138
135
  };
139
136
  const listHeight = () => {
140
- return list.length * itemSize;
137
+ return list.length * itemHeight;
141
138
  };
142
139
  const visibleData = () => {
143
140
  return list.slice(start, Math.min(end(), list.length));
@@ -156,24 +153,24 @@ const VirtualList = (props) => {
156
153
  const startIndex = binarySearch(positions, scrollSize, false);
157
154
  const overStart = startIndex - overscan > -1 ? startIndex - overscan : 0;
158
155
  const endIndex = end();
159
- if (!itemEqualSize) {
156
+ if (!itemEqual) {
160
157
  updateTotalSize();
161
158
  }
162
- setStart(Math.floor(scrollTop / itemSize));
159
+ setStart(Math.floor(scrollTop / itemHeight));
163
160
  setOptions({ startOffset, startIndex, overStart, endIndex });
164
161
  if (end() > list.length - 1) {
165
162
  onScroll && onScroll();
166
163
  }
167
- setStartOffset(scrollTop - scrollTop % itemSize);
164
+ setStartOffset(scrollTop - scrollTop % itemHeight);
168
165
  };
169
166
  return React.createElement(
170
167
  "div",
171
168
  { className: className ? `${className} nut-virtualList-box` : "nut-virtualList-box", ...rest, style: {
172
- height: containerSize ? `${offSetSize}px` : ""
169
+ height: containerHeight ? `${offSetSize}px` : ""
173
170
  } },
174
171
  React.createElement(
175
172
  ScrollView,
176
- { scrollTop: 0, scrollY: true, type: "list", ref: scrollRef, className: "nut-virtuallist", style: {
173
+ { scrollY: true, type: "list", ref: scrollRef, className: "nut-virtuallist", style: {
177
174
  height: `${getContainerHeight()}px`
178
175
  }, onScroll: listScroll },
179
176
  React.createElement("div", { className: "nut-virtuallist-phantom", style: { height: `${listHeight()}px` } }),
@@ -182,7 +179,7 @@ const VirtualList = (props) => {
182
179
  const dataIndex = overStart + index;
183
180
  key && data[key] ? data[key] : dataIndex;
184
181
  return React.createElement("div", { ref: dataIndex === 0 ? firstItemRef : null, "data-index": `${dataIndex}`, className: "nut-virtuallist-item", key: `${data}`, style: {
185
- height: `${itemEqualSize ? `${itemSize}px` : "auto"}`
182
+ height: `${itemEqual ? `${itemHeight}px` : "auto"}`
186
183
  } }, ItemRender ? React.createElement(ItemRender, { data, index: `${index}` }) : data);
187
184
  }))
188
185
  )
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.0.0-alpha.11 Wed May 24 2023 16:44:30 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.0-alpha.12 Fri May 26 2023 15:29:31 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.0-alpha.11 Wed May 24 2023 16:44:30 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.0-alpha.12 Fri May 26 2023 15:29:31 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.0-alpha.11 Wed May 24 2023 16:44:30 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.0-alpha.12 Fri May 26 2023 15:29:31 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.0-alpha.11 Wed May 24 2023 16:44:30 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.0-alpha.12 Fri May 26 2023 15:29:31 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -30,7 +30,15 @@ const i = {
30
30
  },
31
31
  range: { rangeText: "Aralıkta görünmüyor" },
32
32
  calendaritem: {
33
- weekdays: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"],
33
+ weekdays: [
34
+ "Pazar",
35
+ "Pazartesi",
36
+ "Salı",
37
+ "Çarşamba",
38
+ "Perşembe",
39
+ "Cuma",
40
+ "Cumartesi"
41
+ ],
34
42
  end: "Son",
35
43
  start: "Başlangıç",
36
44
  confirm: "Onayla",
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.0.0-alpha.11 Wed May 24 2023 16:44:30 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.0-alpha.12 Fri May 26 2023 15:29:31 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.0-alpha.11 Wed May 24 2023 16:44:30 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.0-alpha.12 Fri May 26 2023 15:29:31 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.0-alpha.11 Wed May 24 2023 16:44:30 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.0.0-alpha.12 Fri May 26 2023 15:29:31 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */