@nutui/nutui-react 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 (86) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/esm/ActionSheet/style/style.css +1 -1
  3. package/dist/esm/ActionSheet.js +28 -37
  4. package/dist/esm/CountDown/style/style.css +1 -1
  5. package/dist/esm/CountDown.js +20 -15
  6. package/dist/esm/Ellipsis/style/style.css +1 -1
  7. package/dist/esm/SearchBar/style/style.css +1 -1
  8. package/dist/esm/SearchBar.js +33 -87
  9. package/dist/esm/ShortPassword/style/style.css +1 -1
  10. package/dist/esm/ShortPassword.js +65 -133
  11. package/dist/esm/Toast/style/style.css +1 -1
  12. package/dist/esm/Toast.js +86 -102
  13. package/dist/esm/VirtualList/style/style.css +1 -1
  14. package/dist/esm/VirtualList.js +29 -25
  15. package/dist/esm/types/src/packages/actionsheet/actionsheet.d.ts +11 -15
  16. package/dist/esm/types/src/packages/actionsheet/actionsheet.taro.d.ts +11 -15
  17. package/dist/esm/types/src/packages/actionsheet/index.d.ts +1 -0
  18. package/dist/esm/types/src/packages/actionsheet/index.taro.d.ts +1 -0
  19. package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +2 -1
  20. package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +2 -1
  21. package/dist/esm/types/src/packages/configprovider/index.d.ts +1 -0
  22. package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +1 -0
  23. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -0
  24. package/dist/esm/types/src/packages/countdown/countdown.d.ts +5 -4
  25. package/dist/esm/types/src/packages/countdown/countdown.taro.d.ts +5 -4
  26. package/dist/esm/types/src/packages/countdown/index.d.ts +1 -0
  27. package/dist/esm/types/src/packages/countdown/index.taro.d.ts +1 -0
  28. package/dist/esm/types/src/packages/ellipsis/ellipsis.taro.d.ts +1 -0
  29. package/dist/esm/types/src/packages/searchbar/index.d.ts +1 -0
  30. package/dist/esm/types/src/packages/searchbar/index.taro.d.ts +1 -0
  31. package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +4 -31
  32. package/dist/esm/types/src/packages/searchbar/searchbar.taro.d.ts +4 -31
  33. package/dist/esm/types/src/packages/shortpassword/index.d.ts +1 -0
  34. package/dist/esm/types/src/packages/shortpassword/index.taro.d.ts +1 -0
  35. package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +17 -20
  36. package/dist/esm/types/src/packages/shortpassword/shortpassword.taro.d.ts +17 -20
  37. package/dist/esm/types/src/packages/toast/Notification.d.ts +9 -13
  38. package/dist/esm/types/src/packages/toast/index.d.ts +1 -0
  39. package/dist/esm/types/src/packages/toast/index.taro.d.ts +1 -0
  40. package/dist/esm/types/src/packages/toast/toast.d.ts +19 -26
  41. package/dist/esm/types/src/packages/toast/toast.taro.d.ts +9 -11
  42. package/dist/esm/types/src/packages/virtuallist/index.d.ts +1 -0
  43. package/dist/esm/types/src/packages/virtuallist/index.taro.d.ts +1 -0
  44. package/dist/esm/types/src/packages/virtuallist/type.d.ts +0 -18
  45. package/dist/esm/types/src/packages/virtuallist/utils.d.ts +3 -3
  46. package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +15 -4
  47. package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +13 -14
  48. package/dist/locales/base.js +1 -1
  49. package/dist/locales/en-US.js +1 -1
  50. package/dist/locales/id-ID.js +1 -1
  51. package/dist/locales/tr-TR.js +10 -2
  52. package/dist/locales/zh-CN.js +1 -1
  53. package/dist/locales/zh-TW.js +1 -1
  54. package/dist/locales/zh-UG.js +1 -1
  55. package/dist/nutui.react.es.js +442 -512
  56. package/dist/nutui.react.umd.js +442 -512
  57. package/dist/packages/actionsheet/actionsheet.scss +26 -73
  58. package/dist/packages/countdown/countdown.scss +2 -0
  59. package/dist/packages/ellipsis/ellipsis.scss +4 -0
  60. package/dist/packages/searchbar/searchbar.scss +13 -71
  61. package/dist/packages/shortpassword/shortpassword.scss +1 -88
  62. package/dist/packages/toast/toast.scss +20 -7
  63. package/dist/packages/virtuallist/virtuallist.scss +0 -12
  64. package/dist/style.css +1 -1
  65. package/dist/style.mjs +1 -1
  66. package/dist/styles/variables-jmapp.scss +56 -60
  67. package/dist/styles/variables.scss +30 -53
  68. package/dist/types/packages/actionsheet/actionsheet.d.ts +11 -15
  69. package/dist/types/packages/actionsheet/index.d.ts +1 -0
  70. package/dist/types/packages/configprovider/configprovider.d.ts +2 -1
  71. package/dist/types/packages/configprovider/index.d.ts +1 -0
  72. package/dist/types/packages/configprovider/types.d.ts +1 -0
  73. package/dist/types/packages/countdown/countdown.d.ts +5 -4
  74. package/dist/types/packages/countdown/index.d.ts +1 -0
  75. package/dist/types/packages/searchbar/index.d.ts +1 -0
  76. package/dist/types/packages/searchbar/searchbar.d.ts +4 -31
  77. package/dist/types/packages/shortpassword/index.d.ts +1 -0
  78. package/dist/types/packages/shortpassword/shortpassword.d.ts +17 -20
  79. package/dist/types/packages/toast/Notification.d.ts +9 -13
  80. package/dist/types/packages/toast/index.d.ts +1 -0
  81. package/dist/types/packages/toast/toast.d.ts +19 -26
  82. package/dist/types/packages/virtuallist/index.d.ts +1 -0
  83. package/dist/types/packages/virtuallist/type.d.ts +0 -18
  84. package/dist/types/packages/virtuallist/utils.d.ts +3 -3
  85. package/dist/types/packages/virtuallist/virtuallist.d.ts +15 -4
  86. package/package.json +1 -1
@@ -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,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.0-alpha.11 Wed May 24 2023 16:40:59 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.12 Fri May 26 2023 15:24:48 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.0-alpha.11 Wed May 24 2023 16:40:59 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.12 Fri May 26 2023 15:24:48 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.0-alpha.11 Wed May 24 2023 16:40:59 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.12 Fri May 26 2023 15:24:48 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.0-alpha.11 Wed May 24 2023 16:40:59 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.12 Fri May 26 2023 15:24:48 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 v2.0.0-alpha.11 Wed May 24 2023 16:40:59 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.12 Fri May 26 2023 15:24:48 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.0-alpha.11 Wed May 24 2023 16:40:59 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.12 Fri May 26 2023 15:24:48 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.0-alpha.11 Wed May 24 2023 16:40:59 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.12 Fri May 26 2023 15:24:48 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */