@nutui/nutui-react-taro 2.3.6 → 2.3.8-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.
- package/CHANGELOG.md +24 -0
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/Address.js +3 -3
- package/dist/esm/Audio.js +2 -2
- package/dist/esm/AvatarCropper.js +2 -2
- package/dist/esm/Button.js +1 -1
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/Cascader.js +2 -2
- package/dist/esm/Checkbox.js +1 -1
- package/dist/esm/CheckboxGroup.js +1 -1
- package/dist/esm/CircleProgress/style/style.css +1 -1
- package/dist/esm/Collapse.js +2 -2
- package/dist/esm/CollapseItem.js +1 -1
- package/dist/esm/DatePicker.js +3 -2
- package/dist/esm/Dialog/style/style.css +1 -1
- package/dist/esm/Dialog.js +2 -2
- package/dist/esm/Ellipsis.js +2 -1
- package/dist/esm/Empty.js +2 -2
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/ImagePreview.js +2 -2
- package/dist/esm/NavBar/style/style.css +1 -1
- package/dist/esm/NavBar.js +4 -1
- package/dist/esm/NumberKeyboard.js +1 -1
- package/dist/esm/Picker.js +2 -1
- package/dist/esm/Popover/style/style.css +1 -1
- package/dist/esm/Popover.js +1 -1
- package/dist/esm/Radio.js +1 -1
- package/dist/esm/RadioGroup.js +1 -1
- package/dist/esm/Rate/style/style.css +1 -1
- package/dist/esm/Rate.js +5 -1
- package/dist/esm/Step/style/style.css +1 -1
- package/dist/esm/Step.js +2 -1
- package/dist/esm/Steps/style/style.css +1 -1
- package/dist/esm/Steps.js +1 -1
- package/dist/esm/Table/style/style.css +1 -1
- package/dist/esm/Table.js +1 -1
- package/dist/esm/Tabs/style/style.css +1 -1
- package/dist/esm/Tabs.js +1 -1
- package/dist/esm/Tour/style/style.css +1 -1
- package/dist/esm/Tour.js +2 -2
- package/dist/esm/Uploader/style/style.css +1 -1
- package/dist/esm/Uploader.js +2 -2
- package/dist/esm/Video.js +1 -2
- package/dist/esm/{address.taro-sTqrtuxC.js → address.taro-LCSSqsR-.js} +1 -1
- package/dist/esm/{audio.taro-ixcoTq7M.js → audio.taro-UpVxFvGk.js} +1 -1
- package/dist/esm/{avatarcropper.taro-OjudqSeT.js → avatarcropper.taro-GIZxzMJ_.js} +3 -3
- package/dist/esm/{button.taro-kZJrygfW.js → button.taro-3IIFy1M2.js} +7 -14
- package/dist/esm/{cascader.taro-DYMZD6ik.js → cascader.taro-x_X9F_pH.js} +1 -1
- package/dist/esm/{checkbox.taro-doAmyAh6.js → checkbox.taro-xMxWdpyI.js} +14 -7
- package/dist/esm/{collapse.taro-l21-Cvji.js → collapse.taro-sZibDygv.js} +1 -1
- package/dist/esm/{collapseitem.taro-9w-h_UP6.js → collapseitem.taro-AaQ_msgd.js} +2 -2
- package/dist/esm/{datepicker.taro-OrqtwJFM.js → datepicker.taro-S111IvJO.js} +1 -1
- package/dist/esm/{dialog.taro-UQN2mJZR.js → dialog.taro-z588FBZJ.js} +25 -4
- package/dist/esm/{ellipsis.taro-ov_C4kbs.js → ellipsis.taro-VApVqS_j.js} +39 -45
- package/dist/esm/{empty.taro-vxcxYcB5.js → empty.taro-98NzV-31.js} +1 -1
- package/dist/esm/{imagepreview.taro-_dileEvw.js → imagepreview.taro-qDST6Lh4.js} +6 -2
- package/dist/esm/navbar.taro-AuKPDCaW.js +105 -0
- package/dist/esm/{numberkeyboard.taro-gJhSoXsl.js → numberkeyboard.taro-CyW0s9bI.js} +3 -2
- package/dist/esm/nutui-react.es.js +27 -26
- package/dist/esm/{picker.taro-_bT5c-BS.js → picker.taro-RAYmFSC0.js} +1 -11
- package/dist/esm/{popover.taro-ScQymuJC.js → popover.taro-MUrnn7xY.js} +1 -1
- package/dist/esm/{radio.taro-mZvB2wwi.js → radio.taro-EKJXMjnX.js} +7 -6
- package/dist/esm/rate.taro-_5Mjd_EO.js +146 -0
- package/dist/esm/{step.taro-kCAQ4Q3-.js → step.taro-_DEZqFGb.js} +6 -5
- package/dist/esm/{steps.taro-n6BT6nWE.js → steps.taro-PH0qWPla.js} +5 -4
- package/dist/esm/{table.taro-Zyemar_o.js → table.taro-d172EUh9.js} +1 -1
- package/dist/esm/{tabs.taro-uXbRqGVo.js → tabs.taro-w8ra49Qb.js} +7 -7
- package/dist/esm/{tour.taro-GabSljal.js → tour.taro-HLsDVf9g.js} +3 -3
- package/dist/esm/types/src/packages/checkbox/checkbox.d.ts +7 -6
- package/dist/esm/types/src/packages/checkbox/checkbox.taro.d.ts +7 -6
- package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +3 -2
- package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.taro.d.ts +3 -2
- package/dist/esm/types/src/packages/checkboxgroup/context.d.ts +3 -1
- package/dist/esm/types/src/packages/checkboxgroup/types.d.ts +3 -0
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
- package/dist/esm/types/src/packages/dialog/config.d.ts +9 -6
- package/dist/esm/types/src/packages/dialog/confirm.d.ts +3 -3
- package/dist/esm/types/src/packages/dialog/content.d.ts +1 -0
- package/dist/esm/types/src/packages/dialog/content.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/dialog/dialog.d.ts +2 -2
- package/dist/esm/types/src/packages/dialog/dialog.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/dialog/dialogwrap.d.ts +1 -0
- package/dist/esm/types/src/packages/dialog/index.d.ts +1 -0
- package/dist/esm/types/src/packages/imagepreview/imagepreview.d.ts +4 -1
- package/dist/esm/types/src/packages/imagepreview/imagepreview.taro.d.ts +4 -1
- package/dist/esm/types/src/packages/imagepreview/index.d.ts +1 -1
- package/dist/esm/types/src/packages/imagepreview/index.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/navbar/navbar.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/numberkeyboard/numberkeyboard.d.ts +2 -1
- package/dist/esm/types/src/packages/numberkeyboard/numberkeyboard.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/radio/index.d.ts +2 -1
- package/dist/esm/types/src/packages/radio/index.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/radio/radio.d.ts +1 -2
- package/dist/esm/types/src/packages/radio/radio.taro.d.ts +1 -2
- package/dist/esm/types/src/packages/radio/types.d.ts +2 -0
- package/dist/esm/types/src/packages/radiogroup/context.d.ts +2 -0
- package/dist/esm/types/src/packages/radiogroup/index.d.ts +1 -0
- package/dist/esm/types/src/packages/radiogroup/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/radiogroup/radiogroup.d.ts +4 -6
- package/dist/esm/types/src/packages/radiogroup/radiogroup.taro.d.ts +4 -6
- package/dist/esm/types/src/packages/radiogroup/types.d.ts +4 -0
- package/dist/esm/types/src/packages/rate/rate.d.ts +2 -0
- package/dist/esm/types/src/packages/rate/rate.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/video/video.taro.d.ts +4 -5
- package/dist/esm/types/src/utils/get-scroll-parent.d.ts +1 -0
- package/dist/esm/{uploader.taro-SAahCKRj.js → uploader.taro-a-U18v5C.js} +2 -2
- package/dist/esm/use-refs-IdrY0ww3.js +15 -0
- package/dist/esm/{video.taro-MDBF77xf.js → video.taro-csvHwS2v.js} +5 -7
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +264 -93
- package/dist/nutui.react.umd.js +257 -86
- package/dist/packages/circleprogress/circleprogress.scss +3 -1
- package/dist/packages/dialog/dialog.scss +25 -0
- package/dist/packages/imagepreview/imagepreview.scss +24 -0
- package/dist/packages/navbar/navbar.scss +7 -0
- package/dist/packages/popover/popover.scss +1 -1
- package/dist/packages/rate/rate.scss +6 -0
- package/dist/packages/step/step.scss +5 -4
- package/dist/packages/table/table.scss +12 -1
- package/dist/packages/tabs/tabs.scss +17 -1
- package/dist/packages/uploader/uploader.scss +4 -6
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +6 -0
- package/dist/styles/variables.scss +6 -0
- package/dist/types/packages/button/button.taro.d.ts +6 -2
- package/dist/types/packages/checkbox/checkbox.d.ts +7 -6
- package/dist/types/packages/checkbox/checkbox.taro.d.ts +7 -6
- package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +3 -2
- package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +8 -3
- package/dist/types/packages/checkboxgroup/context.d.ts +3 -1
- package/dist/types/packages/checkboxgroup/types.d.ts +3 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/dialog/config.d.ts +9 -6
- package/dist/types/packages/dialog/confirm.d.ts +3 -3
- package/dist/types/packages/dialog/content.d.ts +1 -0
- package/dist/types/packages/dialog/content.taro.d.ts +1 -0
- package/dist/types/packages/dialog/dialog.d.ts +2 -2
- package/dist/types/packages/dialog/dialog.taro.d.ts +2 -2
- package/dist/types/packages/dialog/dialogwrap.d.ts +1 -0
- package/dist/types/packages/dialog/index.d.ts +1 -0
- package/dist/types/packages/imagepreview/imagepreview.d.ts +4 -1
- package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +12 -1
- package/dist/types/packages/imagepreview/index.d.ts +1 -1
- package/dist/types/packages/imagepreview/index.taro.d.ts +1 -1
- package/dist/types/packages/navbar/navbar.taro.d.ts +2 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +2 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +7 -2
- package/dist/types/packages/overlay/overlay.taro.d.ts +5 -1
- package/dist/types/packages/radio/index.d.ts +2 -1
- package/dist/types/packages/radio/index.taro.d.ts +2 -1
- package/dist/types/packages/radio/radio.d.ts +1 -2
- package/dist/types/packages/radio/radio.taro.d.ts +1 -2
- package/dist/types/packages/radio/types.d.ts +2 -0
- package/dist/types/packages/radiogroup/context.d.ts +2 -0
- package/dist/types/packages/radiogroup/index.d.ts +1 -0
- package/dist/types/packages/radiogroup/index.taro.d.ts +1 -0
- package/dist/types/packages/radiogroup/radiogroup.d.ts +4 -6
- package/dist/types/packages/radiogroup/radiogroup.taro.d.ts +8 -6
- package/dist/types/packages/radiogroup/types.d.ts +4 -0
- package/dist/types/packages/rate/rate.d.ts +2 -0
- package/dist/types/packages/rate/rate.taro.d.ts +2 -0
- package/dist/types/packages/video/video.taro.d.ts +4 -5
- package/dist/types/utils/get-scroll-parent.d.ts +1 -0
- package/package.json +1 -1
- package/dist/esm/navbar.taro-v0VHQWR4.js +0 -63
- package/dist/esm/rate.taro-ZkOVGSDs.js +0 -77
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { BasicComponent } from '@/utils/typings';
|
|
3
|
+
export type ImagePreviewCloseIconPosition = 'top-right' | 'top-left' | 'bottom';
|
|
3
4
|
export interface ImagePreviewProps extends BasicComponent {
|
|
4
5
|
images: Array<{
|
|
5
6
|
src: string;
|
|
@@ -21,6 +22,8 @@ export interface ImagePreviewProps extends BasicComponent {
|
|
|
21
22
|
closeOnContentClick: boolean;
|
|
22
23
|
indicator: boolean;
|
|
23
24
|
indicatorColor: string;
|
|
25
|
+
closeIcon: boolean | ReactNode;
|
|
26
|
+
closeIconPosition: ImagePreviewCloseIconPosition;
|
|
24
27
|
onChange: (value: number) => void;
|
|
25
28
|
onClose: () => void;
|
|
26
29
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { BasicComponent } from '@/utils/typings';
|
|
3
|
+
export type ImagePreviewCloseIconPosition = 'top-right' | 'top-left' | 'bottom';
|
|
3
4
|
export interface ImagePreviewProps extends BasicComponent {
|
|
4
5
|
images: Array<{
|
|
5
6
|
src: string;
|
|
@@ -21,6 +22,8 @@ export interface ImagePreviewProps extends BasicComponent {
|
|
|
21
22
|
closeOnContentClick: boolean;
|
|
22
23
|
indicator: boolean;
|
|
23
24
|
indicatorColor: string;
|
|
25
|
+
closeIcon: boolean | ReactNode;
|
|
26
|
+
closeIconPosition: ImagePreviewCloseIconPosition;
|
|
24
27
|
showMenuByLongpress: boolean;
|
|
25
28
|
onChange: (value: number) => void;
|
|
26
29
|
onClose: () => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { ITouchEvent } from '@tarojs/components';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export interface NavBarProps extends BasicComponent {
|
|
4
5
|
left: React.ReactNode;
|
|
@@ -9,7 +10,7 @@ export interface NavBarProps extends BasicComponent {
|
|
|
9
10
|
safeAreaInsetTop: boolean;
|
|
10
11
|
placeholder: boolean;
|
|
11
12
|
zIndex: number | string;
|
|
12
|
-
onBackClick: (e:
|
|
13
|
+
onBackClick: (e: ITouchEvent) => void;
|
|
13
14
|
children?: React.ReactNode;
|
|
14
15
|
}
|
|
15
16
|
export declare const NavBar: FunctionComponent<Partial<NavBarProps>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React, { FunctionComponent } from 'react';
|
|
1
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { PopupProps } from '@/packages/popup/popup';
|
|
3
3
|
export interface NumberKeyboardProps extends PopupProps {
|
|
4
4
|
visible: boolean;
|
|
5
|
+
rightActions: ReactNode;
|
|
5
6
|
confirmText?: string;
|
|
6
7
|
type: 'default' | 'rightColumn';
|
|
7
8
|
custom: Array<string>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React, { FunctionComponent } from 'react';
|
|
1
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { PopupProps } from '@/packages/popup/popup.taro';
|
|
3
3
|
export interface NumberKeyboardProps extends PopupProps {
|
|
4
4
|
visible: boolean;
|
|
5
|
+
rightActions: ReactNode;
|
|
5
6
|
confirmText?: string;
|
|
6
7
|
type: 'default' | 'rightColumn';
|
|
7
8
|
custom: Array<string>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import RadioGroup from '@/packages/radiogroup';
|
|
3
3
|
import { BasicComponent } from '@/utils/typings';
|
|
4
|
-
|
|
5
|
-
export type RadioPosition = 'right' | 'left';
|
|
4
|
+
import { RadioPosition, RadioShape } from '@/packages/radio/types';
|
|
6
5
|
export interface RadioProps extends BasicComponent {
|
|
7
6
|
disabled: boolean;
|
|
8
7
|
checked: boolean;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import RadioGroup from '@/packages/radiogroup/index.taro';
|
|
3
3
|
import { BasicComponent } from '@/utils/typings';
|
|
4
|
-
|
|
5
|
-
export type RadioPosition = 'right' | 'left';
|
|
4
|
+
import { RadioPosition, RadioShape } from '@/packages/radio/types';
|
|
6
5
|
export interface RadioProps extends BasicComponent {
|
|
7
6
|
disabled: boolean;
|
|
8
7
|
checked: boolean;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { RadioGroupShape } from './types';
|
|
2
3
|
declare const _default: React.Context<{
|
|
3
4
|
labelPosition: 'left' | 'right';
|
|
4
5
|
disabled: boolean | undefined;
|
|
5
6
|
value: string | number;
|
|
7
|
+
shape: RadioGroupShape | undefined;
|
|
6
8
|
check: (value: string | number) => void;
|
|
7
9
|
uncheck: () => void;
|
|
8
10
|
} | null>;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RadioGroupOptionType } from './types';
|
|
3
|
-
type Position = 'left' | 'right';
|
|
4
|
-
type Direction = 'horizontal' | 'vertical';
|
|
2
|
+
import { RadioGroupDirection, RadioGroupOptionType, RadioGroupPosition, RadioGroupShape } from './types';
|
|
5
3
|
export interface RadioGroupProps {
|
|
6
4
|
value?: string | number;
|
|
7
5
|
defaultValue?: string | number;
|
|
8
|
-
labelPosition:
|
|
9
|
-
direction:
|
|
6
|
+
labelPosition: RadioGroupPosition;
|
|
7
|
+
direction: RadioGroupDirection;
|
|
8
|
+
shape?: RadioGroupShape;
|
|
10
9
|
disabled?: boolean;
|
|
11
10
|
options: RadioGroupOptionType[];
|
|
12
11
|
onChange: (value: string | number) => void;
|
|
13
12
|
}
|
|
14
13
|
export declare const RadioGroup: React.ForwardRefExoticComponent<Partial<RadioGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;
|
|
15
|
-
export {};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RadioGroupOptionType } from './types';
|
|
3
|
-
type Position = 'left' | 'right';
|
|
4
|
-
type Direction = 'horizontal' | 'vertical';
|
|
2
|
+
import { RadioGroupDirection, RadioGroupOptionType, RadioGroupPosition, RadioGroupShape } from './types';
|
|
5
3
|
export interface RadioGroupProps {
|
|
6
4
|
value?: string | number;
|
|
7
5
|
defaultValue?: string | number;
|
|
8
|
-
labelPosition:
|
|
9
|
-
direction:
|
|
6
|
+
labelPosition: RadioGroupPosition;
|
|
7
|
+
direction: RadioGroupDirection;
|
|
8
|
+
shape?: RadioGroupShape;
|
|
10
9
|
disabled?: boolean;
|
|
11
10
|
options: RadioGroupOptionType[];
|
|
12
11
|
onChange: (value: string | number) => void;
|
|
13
12
|
}
|
|
14
13
|
export declare const RadioGroup: React.ForwardRefExoticComponent<Partial<RadioGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;
|
|
15
|
-
export {};
|
|
@@ -2,5 +2,9 @@ export interface RadioGroupOptionType {
|
|
|
2
2
|
label: string;
|
|
3
3
|
value: string;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
shape?: RadioGroupShape;
|
|
5
6
|
onChange?: (checked: boolean) => void;
|
|
6
7
|
}
|
|
8
|
+
export type RadioGroupPosition = 'left' | 'right';
|
|
9
|
+
export type RadioGroupDirection = 'horizontal' | 'vertical';
|
|
10
|
+
export type RadioGroupShape = 'button' | 'round';
|
|
@@ -10,6 +10,8 @@ export interface RateProps extends BasicComponent {
|
|
|
10
10
|
disabled: boolean;
|
|
11
11
|
readOnly: boolean;
|
|
12
12
|
allowHalf: boolean;
|
|
13
|
+
touchable: boolean;
|
|
13
14
|
onChange: (value: number) => void;
|
|
15
|
+
onTouchEnd: (e: TouchEvent, value: number) => void;
|
|
14
16
|
}
|
|
15
17
|
export declare const Rate: FunctionComponent<Partial<RateProps>>;
|
|
@@ -10,6 +10,8 @@ export interface RateProps extends BasicComponent {
|
|
|
10
10
|
disabled: boolean;
|
|
11
11
|
readOnly: boolean;
|
|
12
12
|
allowHalf: boolean;
|
|
13
|
+
touchable: boolean;
|
|
13
14
|
onChange: (value: number) => void;
|
|
15
|
+
onTouchEnd: (e: TouchEvent, value: number) => void;
|
|
14
16
|
}
|
|
15
17
|
export declare const Rate: FunctionComponent<Partial<RateProps>>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BaseEventOrig } from '@tarojs/components';
|
|
3
|
-
|
|
4
|
-
export interface VideoProps extends BasicComponent {
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { VideoProps as VideoPropsTaro, BaseEventOrig } from '@tarojs/components';
|
|
3
|
+
export interface VideoProps extends Omit<VideoPropsTaro, 'src'> {
|
|
5
4
|
source: {
|
|
6
5
|
type: string;
|
|
7
6
|
src: string;
|
|
@@ -18,4 +17,4 @@ export interface VideoProps extends BasicComponent {
|
|
|
18
17
|
onPause: (event: BaseEventOrig<any>) => void;
|
|
19
18
|
onPlayEnd: (event: BaseEventOrig<any>) => void;
|
|
20
19
|
}
|
|
21
|
-
export declare const Video: FunctionComponent<Partial<VideoProps
|
|
20
|
+
export declare const Video: FunctionComponent<Partial<VideoProps>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
type ScrollElement = HTMLElement | Window;
|
|
2
2
|
export declare function getScrollParent(el: Element, root?: ScrollElement | null | undefined): Window | Element | null | undefined;
|
|
3
|
+
export declare function getAllScrollableParents(element: Element | null, scrollableParents?: Element[]): Element[];
|
|
3
4
|
export {};
|
|
@@ -8,7 +8,7 @@ import React__default, { useState, useImperativeHandle } from "react";
|
|
|
8
8
|
import classNames from "classnames";
|
|
9
9
|
import Taro, { uploadFile, getEnv, chooseMedia, chooseImage } from "@tarojs/taro";
|
|
10
10
|
import { Failure, Link, Del, Loading, Photograph } from "@nutui/icons-react-taro";
|
|
11
|
-
import { B as Button } from "./button.taro-
|
|
11
|
+
import { B as Button } from "./button.taro-3IIFy1M2.js";
|
|
12
12
|
import { u as useConfig } from "./configprovider.taro-_wngOo0k.js";
|
|
13
13
|
import { a as isPromise } from "./index-YvHA__3D.js";
|
|
14
14
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
@@ -171,7 +171,7 @@ const Preview = ({ fileList, previewType, deletable, onDeleteItem, handleItemCli
|
|
|
171
171
|
return React__default.createElement(
|
|
172
172
|
"div",
|
|
173
173
|
{ className: `nut-uploader-preview ${previewType}`, key: item.uid },
|
|
174
|
-
previewType === "picture" && deletable && React__default.createElement(Failure, { color: "rgba(0,0,0,0.6)", className: "close", onClick: () => onDeleteItem(item, index) }),
|
|
174
|
+
previewType === "picture" && !children && deletable && React__default.createElement(Failure, { color: "rgba(0,0,0,0.6)", className: "close", onClick: () => onDeleteItem(item, index) }),
|
|
175
175
|
previewType === "picture" && !children && React__default.createElement(
|
|
176
176
|
"div",
|
|
177
177
|
{ className: "nut-uploader-preview-img" },
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React__default from "react";
|
|
2
|
+
function useRefs() {
|
|
3
|
+
const refs = React__default.useRef([]);
|
|
4
|
+
const setRefs = React__default.useCallback((index) => (el) => {
|
|
5
|
+
if (el)
|
|
6
|
+
refs.current[index] = el;
|
|
7
|
+
}, []);
|
|
8
|
+
const reset = React__default.useCallback(() => {
|
|
9
|
+
refs.current = [];
|
|
10
|
+
}, []);
|
|
11
|
+
return [refs.current, setRefs, reset];
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
useRefs as u
|
|
15
|
+
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React__default from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { Video as Video$1 } from "@tarojs/components";
|
|
4
|
-
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
3
|
+
import { View, Video as Video$1 } from "@tarojs/components";
|
|
5
4
|
const defaultProps = {
|
|
6
|
-
...ComponentDefaults,
|
|
7
5
|
source: {
|
|
8
6
|
type: {},
|
|
9
7
|
src: ""
|
|
@@ -19,15 +17,15 @@ const defaultProps = {
|
|
|
19
17
|
};
|
|
20
18
|
const classPrefix = `nut-video`;
|
|
21
19
|
const Video = (props) => {
|
|
22
|
-
const { children, source, options, className, onPlay, onPause, onPlayEnd, ...restProps } = {
|
|
20
|
+
const { children, source, options, className, style, onPlay, onPause, onPlayEnd, ...restProps } = {
|
|
23
21
|
...defaultProps,
|
|
24
22
|
...props
|
|
25
23
|
};
|
|
26
24
|
const classes = classNames(classPrefix, className);
|
|
27
25
|
return React__default.createElement(
|
|
28
|
-
|
|
29
|
-
{ className: classes,
|
|
30
|
-
React__default.createElement(Video$1, { className: "nut-video-player", muted: options.muted, autoplay: options.autoplay, loop: options.loop, poster: options.poster, controls: options.controls, src: source.src, onPlay, onPause, onEnded: onPlayEnd })
|
|
26
|
+
View,
|
|
27
|
+
{ className: classes, style },
|
|
28
|
+
React__default.createElement(Video$1, { className: "nut-video-player", muted: options.muted, autoplay: options.autoplay, loop: options.loop, poster: options.poster, controls: options.controls, src: source.src, onPlay, onPause, onEnded: onPlayEnd, ...restProps })
|
|
31
29
|
);
|
|
32
30
|
};
|
|
33
31
|
Video.defaultProps = defaultProps;
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/tr-TR.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED