@nutui/nutui-react-taro 2.0.0-alpha.3 → 2.0.0-alpha.5
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.js +3 -5
- package/dist/esm/Audio.js +3 -4
- package/dist/esm/Avatar.js +6 -5
- package/dist/esm/AvatarGroup.js +3 -7
- package/dist/esm/Calendar.js +3 -4
- package/dist/esm/CalendarItem.js +2 -3
- package/dist/esm/CellGroup.js +1 -1
- package/dist/esm/Checkbox.js +3 -3
- package/dist/esm/CheckboxGroup.js +3 -3
- package/dist/esm/CircleProgress.js +2 -3
- package/dist/esm/ConfigProvider.js +2 -3
- package/dist/esm/CountDown.js +2 -3
- package/dist/esm/DatePicker.js +3 -4
- package/dist/esm/Dialog.js +2 -3
- package/dist/esm/Elevator.js +1 -1
- package/dist/esm/Ellipsis.js +3 -4
- package/dist/esm/Empty.js +3 -5
- package/dist/esm/FixedNav.js +2 -3
- package/dist/esm/Form.js +2 -2
- package/dist/esm/Grid.js +3 -4
- package/dist/esm/GridItem.js +2 -3
- package/dist/esm/Image.js +2 -3
- package/dist/esm/Infiniteloading.js +2 -3
- package/dist/esm/Input.js +5 -3
- package/dist/esm/NumberKeyboard.js +2 -3
- package/dist/esm/Pagination.js +2 -3
- package/dist/esm/Picker.js +2 -3
- package/dist/esm/PullToRefresh.js +2 -3
- package/dist/esm/Range.js +2 -3
- package/dist/esm/SearchBar.js +2 -3
- package/dist/esm/ShortPassword.js +2 -3
- package/dist/esm/Signature.js +2 -3
- package/dist/esm/Skeleton.js +8 -5
- package/dist/esm/Swipe.js +1 -1
- package/dist/esm/Tabbar/style/index.js +1 -1
- package/dist/esm/Tabbar.js +6 -3
- package/dist/esm/TabbarItem.js +3 -4
- package/dist/esm/Table.js +2 -3
- package/dist/esm/TextArea.js +2 -3
- package/dist/esm/TimeDetail.js +2 -3
- package/dist/esm/TimePannel.js +2 -3
- package/dist/esm/TimeSelect.js +4 -5
- package/dist/esm/Uploader.js +2 -3
- package/dist/esm/VirtualList.js +2 -3
- package/dist/esm/WaterMark.js +2 -3
- package/dist/esm/{address.taro-67e32c33.js → address.taro-cab0ea22.js} +18 -4
- package/dist/esm/{audio.taro-51eafc9d.js → audio.taro-ff280f5e.js} +2 -2
- package/dist/esm/{avatar.taro-a840f345.js → avatar.taro-6e8f1f5c.js} +31 -29
- package/dist/esm/{avatargroup-0eadb514.js → avatargroup-f4375806.js} +9 -12
- package/dist/esm/{calendar.taro-b3ebdc35.js → calendar.taro-2fc9b899.js} +2 -2
- package/dist/esm/{calendaritem.taro-ab1ec154.js → calendaritem.taro-2d4a8c34.js} +1 -1
- package/dist/esm/{cellgroup.taro-660faffc.js → cellgroup.taro-e05ea802.js} +3 -2
- package/dist/esm/checkbox.taro-9d02f86c.js +175 -0
- package/dist/esm/{circleprogress.taro-d8973ae9.js → circleprogress.taro-d4943109.js} +21 -27
- package/dist/esm/{zh-CN-b4f493ba.js → configprovider.taro-ce34d482.js} +44 -1
- package/dist/esm/{countdown.taro-c14b5c1f.js → countdown.taro-3118ba23.js} +1 -1
- package/dist/esm/{datepicker.taro-7d522ff8.js → datepicker.taro-2e3e955b.js} +2 -2
- package/dist/esm/{dialog.taro-f9ca73a2.js → dialog.taro-eab19eab.js} +1 -1
- package/dist/esm/{elevator.taro-360a831f.js → elevator.taro-1a4e3356.js} +16 -8
- package/dist/esm/{ellipsis.taro-79044d54.js → ellipsis.taro-e1ac99a1.js} +7 -4
- package/dist/esm/{empty.taro-f8585835.js → empty.taro-26363c66.js} +12 -18
- package/dist/esm/{fixednav.taro-cca9a6df.js → fixednav.taro-ddb21e87.js} +1 -1
- package/dist/esm/{form.taro-7413d868.js → form.taro-423b0f0a.js} +1 -1
- package/dist/esm/{grid.taro-10eb7716.js → grid.taro-883a9c35.js} +1 -1
- package/dist/esm/{griditem.taro-fb15eeec.js → griditem.taro-16c7055b.js} +1 -1
- package/dist/esm/{image.taro-b897a058.js → image.taro-3025e659.js} +1 -1
- package/dist/esm/{infiniteloading.taro-cce53c60.js → infiniteloading.taro-721bca1f.js} +1 -1
- package/dist/esm/input.taro-06c1e4d5.js +167 -0
- package/dist/esm/{numberkeyboard.taro-10ab54d6.js → numberkeyboard.taro-d9b1721b.js} +1 -1
- package/dist/esm/nutui-react.es.js +45 -47
- package/dist/esm/{pagination.taro-df441058.js → pagination.taro-94f9be5e.js} +1 -1
- package/dist/esm/{picker.taro-9f1bb6a4.js → picker.taro-e16b4312.js} +1 -1
- package/dist/esm/{pulltorefresh.taro-37dadbc5.js → pulltorefresh.taro-016d0079.js} +1 -1
- package/dist/esm/{range.taro-432d20d7.js → range.taro-8953e8c3.js} +1 -1
- package/dist/esm/{searchbar.taro-4aa300df.js → searchbar.taro-4467040f.js} +1 -1
- package/dist/esm/{shortpassword.taro-99645f99.js → shortpassword.taro-433b86a4.js} +1 -1
- package/dist/esm/{signature.taro-e5ede25a.js → signature.taro-a4d9b5c9.js} +1 -1
- package/dist/esm/{skeleton.taro-fabd423a.js → skeleton.taro-8ec11af9.js} +2 -2
- package/dist/esm/{swipe.taro-b18a73ff.js → swipe.taro-0b8cc872.js} +3 -5
- package/dist/esm/tabbar.taro-48413fb8.js +51 -0
- package/dist/esm/tabbaritem.taro-5afa3562.js +37 -0
- package/dist/esm/{table.taro-eca757f3.js → table.taro-327b4248.js} +1 -1
- package/dist/esm/{textarea.taro-e256e741.js → textarea.taro-add72cf3.js} +1 -1
- package/dist/esm/{timedetail.taro-cae362b9.js → timedetail.taro-82a2900b.js} +1 -1
- package/dist/esm/{timepannel.taro-d6f4cf80.js → timepannel.taro-0573bb65.js} +1 -1
- package/dist/esm/{timeselect.taro-804199f9.js → timeselect.taro-29124a34.js} +3 -3
- package/dist/esm/{uploader.taro-716f9a50.js → uploader.taro-c70d00de.js} +1 -1
- package/dist/esm/{virtuallist.taro-0bd611cb.js → virtuallist.taro-ba8e1f21.js} +1 -1
- package/dist/esm/{watermark.taro-8966896a.js → watermark.taro-168cdac5.js} +1 -1
- 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/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.mjs +975 -1094
- package/dist/nutui.react.umd.js +973 -1092
- package/dist/packages/badge/badge.scss +0 -1
- package/dist/packages/cellgroup/cellgroup.scss +20 -16
- package/dist/packages/checkbox/checkbox.scss +8 -11
- package/dist/packages/circleprogress/circleprogress.scss +0 -9
- package/dist/packages/empty/empty.scss +0 -9
- package/dist/packages/input/input.scss +13 -180
- package/dist/packages/tabbar/tabbar.scss +16 -22
- package/dist/packages/tabbaritem/tabbaritem.scss +9 -70
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/themes/default.scss +0 -1
- package/dist/styles/variables-jmapp.scss +12 -16
- package/dist/styles/variables.scss +12 -16
- package/dist/types/index.d.ts +86 -129
- package/package.json +1 -1
- package/dist/esm/Icon.js +0 -64
- package/dist/esm/checkbox.taro-ae460d3a.js +0 -168
- package/dist/esm/configprovider-9960f0fb.js +0 -19
- package/dist/esm/configprovider.taro-43a3c646.js +0 -45
- package/dist/esm/input.taro-f4e067f7.js +0 -237
- package/dist/esm/tabbar.taro-eefd0f8e.js +0 -59
- package/dist/esm/tabbaritem.taro-7a97e645.js +0 -55
- package/dist/packages/icon/icon.scss +0 -0
- /package/dist/esm/{AvatarContext-c96afdcc.js → context-c96afdcc.js} +0 -0
package/dist/style.mjs
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
@import '../../packages/cell/cell.scss';
|
|
5
5
|
@import '../../packages/cellgroup/cellgroup.scss';
|
|
6
6
|
@import '../../packages/configprovider/configprovider.scss';
|
|
7
|
-
@import '../../packages/icon/icon.scss';
|
|
8
7
|
@import '../../packages/image/image.scss';
|
|
9
8
|
@import '../../packages/overlay/overlay.scss';
|
|
10
9
|
@import '../../packages/col/col.scss';
|
|
@@ -470,11 +470,11 @@ $picker-mask-bg-img: var(
|
|
|
470
470
|
) !default;
|
|
471
471
|
//input(✅)
|
|
472
472
|
$input-border-bottom: var(--nutui-input-border-bottom, #eaf0fb) !default;
|
|
473
|
-
$input-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
$required-color
|
|
473
|
+
$input-border-bottom-width: var(
|
|
474
|
+
--nutui-input-border-bottom-width,
|
|
475
|
+
0px
|
|
477
476
|
) !default;
|
|
477
|
+
$input-disabled-color: var(--nutui-input-disabled-color, #c8c9cc) !default;
|
|
478
478
|
$input-font-size: var(--nutui-input-font-size, $font-size-2) !default;
|
|
479
479
|
$input-padding: var(--nutui-input-padding, 10px 25px) !default;
|
|
480
480
|
|
|
@@ -871,28 +871,24 @@ $rate-icon-void-color: var(
|
|
|
871
871
|
// tabbar(✅)
|
|
872
872
|
$tabbar-height: var(--nutui-tabbar-height, 50px) !default;
|
|
873
873
|
$tabbar-active-color: var(--nutui-tabbar-active-color, $primary-color) !default;
|
|
874
|
-
$tabbar-
|
|
875
|
-
--nutui-tabbar-unactive-color,
|
|
876
|
-
$primary-color
|
|
877
|
-
) !default;
|
|
874
|
+
$tabbar-inactive-color: var(--nutui-tabbar-inactive-color, $gray1) !default;
|
|
878
875
|
$tabbar-border-top: var(--nutui-tabbar-border-top, 1px solid #eee) !default;
|
|
879
876
|
$tabbar-border-bottom: var(
|
|
880
877
|
--nutui-tabbar-border-bottom,
|
|
881
878
|
1px solid #eee
|
|
882
879
|
) !default;
|
|
883
880
|
$tabbar-box-shadow: var(--nutui-tabbar-box-shadow, none) !default;
|
|
884
|
-
$tabbar-
|
|
885
|
-
--nutui-tabbar-
|
|
881
|
+
$tabbar-text-font-size: var(
|
|
882
|
+
--nutui-tabbar-text-font-size,
|
|
886
883
|
$font-size-0
|
|
887
884
|
) !default;
|
|
888
|
-
$tabbar-
|
|
889
|
-
--nutui-tabbar-
|
|
890
|
-
|
|
885
|
+
$tabbar-text-large-font-size: var(
|
|
886
|
+
--nutui-tabbar-text-large-font-size,
|
|
887
|
+
$font-size-large
|
|
891
888
|
) !default;
|
|
889
|
+
$tabbar-text-line-height: var(--nutui-tabbar-text-line-height, 20px) !default;
|
|
892
890
|
$tabbar-height: var(--nutui-tabbar-height, 50px) !default;
|
|
893
|
-
$tabbar-
|
|
894
|
-
$tabbar-dot-right: var(--nutui-tabbar-dot-right, 12px) !default;
|
|
895
|
-
$tabbar-dot-top: var(--nutui-tabbar-dot-top, 0) !default;
|
|
891
|
+
$tabbar-text-margin-top: var(--nutui-tabbar-text-margin-top, 3px) !default;
|
|
896
892
|
|
|
897
893
|
//infiniteloading(✅)
|
|
898
894
|
$infiniteloading-bottom-color: var(
|
|
@@ -454,11 +454,11 @@ $picker-mask-bg-img: var(
|
|
|
454
454
|
|
|
455
455
|
//input(✅)
|
|
456
456
|
$input-border-bottom: var(--nutui-input-border-bottom, #eaf0fb) !default;
|
|
457
|
-
$input-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
$required-color
|
|
457
|
+
$input-border-bottom-width: var(
|
|
458
|
+
--nutui-input-border-bottom-width,
|
|
459
|
+
0px
|
|
461
460
|
) !default;
|
|
461
|
+
$input-disabled-color: var(--nutui-input-disabled-color, #c8c9cc) !default;
|
|
462
462
|
$input-font-size: var(--nutui-input-font-size, $font-size-2) !default;
|
|
463
463
|
$input-padding: var(--nutui-input-padding, 10px 25px) !default;
|
|
464
464
|
|
|
@@ -858,28 +858,24 @@ $rate-icon-void-color: var(
|
|
|
858
858
|
// tabbar(✅)
|
|
859
859
|
$tabbar-height: var(--nutui-tabbar-height, 50px) !default;
|
|
860
860
|
$tabbar-active-color: var(--nutui-tabbar-active-color, $primary-color) !default;
|
|
861
|
-
$tabbar-
|
|
862
|
-
--nutui-tabbar-unactive-color,
|
|
863
|
-
$primary-color
|
|
864
|
-
) !default;
|
|
861
|
+
$tabbar-inactive-color: var(--nutui-tabbar-inactive-color, $gray1) !default;
|
|
865
862
|
$tabbar-border-top: var(--nutui-tabbar-border-top, 1px solid #eee) !default;
|
|
866
863
|
$tabbar-border-bottom: var(
|
|
867
864
|
--nutui-tabbar-border-bottom,
|
|
868
865
|
1px solid #eee
|
|
869
866
|
) !default;
|
|
870
867
|
$tabbar-box-shadow: var(--nutui-tabbar-box-shadow, none) !default;
|
|
871
|
-
$tabbar-
|
|
872
|
-
--nutui-tabbar-
|
|
868
|
+
$tabbar-text-font-size: var(
|
|
869
|
+
--nutui-tabbar-text-font-size,
|
|
873
870
|
$font-size-0
|
|
874
871
|
) !default;
|
|
875
|
-
$tabbar-
|
|
876
|
-
--nutui-tabbar-
|
|
877
|
-
|
|
872
|
+
$tabbar-text-large-font-size: var(
|
|
873
|
+
--nutui-tabbar-text-large-font-size,
|
|
874
|
+
$font-size-large
|
|
878
875
|
) !default;
|
|
876
|
+
$tabbar-text-line-height: var(--nutui-tabbar-text-line-height, 20px) !default;
|
|
879
877
|
$tabbar-height: var(--nutui-tabbar-height, 50px) !default;
|
|
880
|
-
$tabbar-
|
|
881
|
-
$tabbar-dot-right: var(--nutui-tabbar-dot-right, 12px) !default;
|
|
882
|
-
$tabbar-dot-top: var(--nutui-tabbar-dot-top, 0) !default;
|
|
878
|
+
$tabbar-text-margin-top: var(--nutui-tabbar-text-margin-top, 3px) !default;
|
|
883
879
|
|
|
884
880
|
//infiniteloading(✅)
|
|
885
881
|
$infiniteloading-bottom-color: var(
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { CSSProperties, ReactNode, FunctionComponent, MouseEvent as MouseEvent$1, MouseEventHandler, HTMLInputTypeAttribute, ChangeEvent, FocusEvent, RefObject, Component } from 'react';
|
|
3
|
-
import { ButtonProps as ButtonProps$1, ITouchEvent } from '@tarojs/components';
|
|
3
|
+
import { ButtonProps as ButtonProps$1, ITouchEvent, InputProps as InputProps$1 } from '@tarojs/components';
|
|
4
4
|
import Taro, { InnerAudioContext } from '@tarojs/taro';
|
|
5
5
|
|
|
6
6
|
interface BasicComponent {
|
|
@@ -42,6 +42,7 @@ interface CellGroupProps extends BasicComponent {
|
|
|
42
42
|
title: ReactNode;
|
|
43
43
|
description: ReactNode;
|
|
44
44
|
children?: ReactNode;
|
|
45
|
+
divider: boolean;
|
|
45
46
|
}
|
|
46
47
|
declare const CellGroup: FunctionComponent<Partial<CellGroupProps>>;
|
|
47
48
|
|
|
@@ -317,7 +318,7 @@ declare const Elevator: FunctionComponent<Partial<ElevatorProps> & React__defaul
|
|
|
317
318
|
Context: typeof elevatorContext;
|
|
318
319
|
};
|
|
319
320
|
|
|
320
|
-
type Direction$
|
|
321
|
+
type Direction$2 = 'right' | 'left';
|
|
321
322
|
type Position$2 = {
|
|
322
323
|
top?: string;
|
|
323
324
|
bottom?: string;
|
|
@@ -329,7 +330,7 @@ interface FixedNavProps extends BasicComponent {
|
|
|
329
330
|
activeText: string;
|
|
330
331
|
inactiveText: string;
|
|
331
332
|
position: Position$2;
|
|
332
|
-
type: Direction$
|
|
333
|
+
type: Direction$2;
|
|
333
334
|
onChange: (item: any) => void;
|
|
334
335
|
onSelect: (item: any, event: MouseEvent$1) => void;
|
|
335
336
|
content: React__default.ReactNode;
|
|
@@ -387,37 +388,40 @@ type SubSideNavBarProps = {
|
|
|
387
388
|
};
|
|
388
389
|
declare const SubSideNavBar: FunctionComponent<SubSideNavBarProps>;
|
|
389
390
|
|
|
390
|
-
interface
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
safeAreaInsetBottom: boolean;
|
|
398
|
-
className: string;
|
|
399
|
-
style: React__default.CSSProperties;
|
|
400
|
-
onSwitch: (child: React__default.ReactElement<any>, active: number) => void;
|
|
401
|
-
children?: React__default.ReactNode;
|
|
391
|
+
interface BadgeProps extends BasicComponent {
|
|
392
|
+
value: ReactNode;
|
|
393
|
+
dot: boolean;
|
|
394
|
+
max: number;
|
|
395
|
+
top: string;
|
|
396
|
+
right: string;
|
|
397
|
+
color: string;
|
|
402
398
|
}
|
|
403
|
-
declare const
|
|
399
|
+
declare const Badge: FunctionComponent<Partial<BadgeProps>>;
|
|
404
400
|
|
|
405
|
-
interface TabbarItemProps extends
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
tabTitle: string;
|
|
409
|
-
icon: React__default.ReactNode;
|
|
410
|
-
href: string;
|
|
411
|
-
to: any;
|
|
412
|
-
num: string | number;
|
|
401
|
+
interface TabbarItemProps extends BadgeProps {
|
|
402
|
+
title: ReactNode;
|
|
403
|
+
icon: ReactNode;
|
|
413
404
|
active: boolean;
|
|
414
405
|
activeColor: string;
|
|
415
|
-
|
|
406
|
+
inactiveColor: string;
|
|
416
407
|
index: number;
|
|
417
408
|
handleClick: (idx: number) => void;
|
|
418
409
|
}
|
|
419
410
|
declare const TabbarItem: FunctionComponent<Partial<TabbarItemProps>>;
|
|
420
411
|
|
|
412
|
+
interface TabbarProps extends BasicComponent {
|
|
413
|
+
defaultValue: number;
|
|
414
|
+
value?: number;
|
|
415
|
+
fixed: boolean;
|
|
416
|
+
inactiveColor: string;
|
|
417
|
+
activeColor: string;
|
|
418
|
+
safeArea: boolean;
|
|
419
|
+
onSwitch: (value: number) => void;
|
|
420
|
+
}
|
|
421
|
+
declare const Tabbar: FunctionComponent<Partial<TabbarProps>> & {
|
|
422
|
+
Item: typeof TabbarItem;
|
|
423
|
+
};
|
|
424
|
+
|
|
421
425
|
interface TabPanelInnerProps {
|
|
422
426
|
autoHeightClassName: string;
|
|
423
427
|
}
|
|
@@ -633,32 +637,32 @@ interface RadioGroupOptionType {
|
|
|
633
637
|
onChange?: MouseEventHandler<HTMLDivElement>;
|
|
634
638
|
}
|
|
635
639
|
|
|
636
|
-
type
|
|
640
|
+
type CheckboxLabelPosition = 'left' | 'right';
|
|
637
641
|
type CheckboxDirection = 'horizontal' | 'vertical';
|
|
638
642
|
interface CheckboxGroupProps {
|
|
639
|
-
disabled
|
|
640
|
-
|
|
643
|
+
disabled?: boolean;
|
|
644
|
+
value?: string[];
|
|
645
|
+
defaultValue?: string[];
|
|
641
646
|
max: number | undefined;
|
|
642
|
-
|
|
647
|
+
labelPosition: CheckboxLabelPosition;
|
|
643
648
|
direction: CheckboxDirection;
|
|
644
|
-
onChange: (value: string[]) => void;
|
|
645
649
|
options: RadioGroupOptionType[];
|
|
650
|
+
onChange: (value: string[]) => void;
|
|
646
651
|
}
|
|
647
652
|
declare const CheckboxGroup: React__default.ForwardRefExoticComponent<Partial<CheckboxGroupProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, "onChange"> & React__default.RefAttributes<unknown>>;
|
|
648
653
|
|
|
649
654
|
interface CheckboxProps extends BasicComponent {
|
|
650
655
|
checked: boolean;
|
|
651
656
|
disabled: boolean;
|
|
652
|
-
|
|
653
|
-
|
|
657
|
+
defaultChecked: boolean;
|
|
658
|
+
labelPosition: 'left' | 'right';
|
|
654
659
|
icon: React__default.ReactNode;
|
|
655
|
-
|
|
660
|
+
activeIcon: React__default.ReactNode;
|
|
656
661
|
indeterminateIcon: React__default.ReactNode;
|
|
657
|
-
|
|
658
|
-
iconFontClassName: string;
|
|
662
|
+
value: string | number;
|
|
659
663
|
indeterminate: boolean;
|
|
660
664
|
label: string | number;
|
|
661
|
-
onChange: (
|
|
665
|
+
onChange: (value: boolean) => void;
|
|
662
666
|
}
|
|
663
667
|
declare const Checkbox: FunctionComponent<Partial<CheckboxProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange'>> & {
|
|
664
668
|
Group: typeof CheckboxGroup;
|
|
@@ -783,58 +787,30 @@ declare const Form: FunctionComponent<Partial<FormProps> & React__default.HTMLAt
|
|
|
783
787
|
|
|
784
788
|
type InputAlignType = 'left' | 'center' | 'right';
|
|
785
789
|
type InputFormatTrigger = 'onChange' | 'onBlur';
|
|
786
|
-
type
|
|
787
|
-
type InputRule = {
|
|
788
|
-
pattern?: RegExp;
|
|
789
|
-
message?: string;
|
|
790
|
-
required?: boolean;
|
|
791
|
-
};
|
|
790
|
+
type ConfirmTextType = 'send' | 'search' | 'next' | 'go' | 'done';
|
|
792
791
|
interface InputProps extends BasicComponent {
|
|
793
|
-
type:
|
|
792
|
+
type: keyof InputProps$1.Type | HTMLInputTypeAttribute;
|
|
794
793
|
name: string;
|
|
795
|
-
defaultValue
|
|
794
|
+
defaultValue?: string;
|
|
795
|
+
value?: string;
|
|
796
796
|
placeholder: string;
|
|
797
|
-
|
|
798
|
-
labelClass: string;
|
|
799
|
-
labelWidth: string | number;
|
|
800
|
-
labelAlign: InputAlignType;
|
|
801
|
-
colon: boolean;
|
|
802
|
-
inputAlign: InputAlignType;
|
|
803
|
-
center: boolean;
|
|
804
|
-
required: boolean;
|
|
797
|
+
align: InputAlignType;
|
|
805
798
|
disabled: boolean;
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
maxlength: any;
|
|
809
|
-
leftIcon: React__default.ReactNode;
|
|
810
|
-
rightIcon: React__default.ReactNode;
|
|
799
|
+
readOnly: boolean;
|
|
800
|
+
maxLength: number;
|
|
811
801
|
clearable: boolean;
|
|
812
802
|
clearIcon: React__default.ReactNode;
|
|
813
|
-
clearSize: string | number;
|
|
814
|
-
border: boolean;
|
|
815
803
|
formatTrigger: InputFormatTrigger;
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
slotButton?: React__default.ReactNode;
|
|
825
|
-
slotInput?: React__default.ReactNode;
|
|
826
|
-
formatter: (value: string) => void;
|
|
827
|
-
onChange?: (value: any, event: Event) => void;
|
|
828
|
-
onBlur?: (value: any, event: Event) => void;
|
|
829
|
-
onFocus?: (value: any, event: Event) => void;
|
|
830
|
-
onClear?: (value: any, event: Event) => void;
|
|
831
|
-
keypress?: (value: any, event: Event) => void;
|
|
832
|
-
onClickInput?: (value: any) => void;
|
|
833
|
-
onClickLeftIcon?: (value: any) => void;
|
|
834
|
-
onClickRightIcon?: (value: any) => void;
|
|
835
|
-
onClick?: (value: any) => void;
|
|
804
|
+
autoFocus: boolean;
|
|
805
|
+
confirmType: ConfirmTextType;
|
|
806
|
+
formatter?: (value: string) => void;
|
|
807
|
+
onChange?: (value: string) => void;
|
|
808
|
+
onBlur?: (value: string) => void;
|
|
809
|
+
onFocus?: (value: string) => void;
|
|
810
|
+
onClear?: (value: string) => void;
|
|
811
|
+
onClick?: (e: ITouchEvent) => void;
|
|
836
812
|
}
|
|
837
|
-
declare const Input:
|
|
813
|
+
declare const Input: React__default.ForwardRefExoticComponent<Partial<InputProps> & Partial<Omit<InputProps$1, "type" | "ref" | "onFocus" | "onBlur">> & React__default.RefAttributes<unknown>>;
|
|
838
814
|
|
|
839
815
|
interface InputNumberProps extends BasicComponent {
|
|
840
816
|
disabled: boolean;
|
|
@@ -930,11 +906,11 @@ interface PickerProps {
|
|
|
930
906
|
declare const Picker: React__default.ForwardRefExoticComponent<Partial<PickerProps> & React__default.RefAttributes<unknown>>;
|
|
931
907
|
|
|
932
908
|
type Position$1 = 'left' | 'right';
|
|
933
|
-
type Direction = 'horizontal' | 'vertical';
|
|
909
|
+
type Direction$1 = 'horizontal' | 'vertical';
|
|
934
910
|
interface RadioGroupProps {
|
|
935
911
|
value: string | number | boolean | null;
|
|
936
912
|
textPosition: Position$1;
|
|
937
|
-
direction: Direction;
|
|
913
|
+
direction: Direction$1;
|
|
938
914
|
onChange: (value: string | number | boolean) => void;
|
|
939
915
|
options: RadioGroupOptionType[];
|
|
940
916
|
}
|
|
@@ -1272,16 +1248,6 @@ interface ActionSheetProps {
|
|
|
1272
1248
|
}
|
|
1273
1249
|
declare const ActionSheet: FunctionComponent<Partial<ActionSheetProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1274
1250
|
|
|
1275
|
-
interface BadgeProps extends BasicComponent {
|
|
1276
|
-
value: ReactNode;
|
|
1277
|
-
dot: boolean;
|
|
1278
|
-
max: number;
|
|
1279
|
-
top: string;
|
|
1280
|
-
right: string;
|
|
1281
|
-
color: string;
|
|
1282
|
-
}
|
|
1283
|
-
declare const Badge: FunctionComponent<Partial<BadgeProps>>;
|
|
1284
|
-
|
|
1285
1251
|
interface BasicDialogProps {
|
|
1286
1252
|
visible?: boolean;
|
|
1287
1253
|
title?: ReactNode;
|
|
@@ -1319,11 +1285,11 @@ interface DragProps extends BasicComponent {
|
|
|
1319
1285
|
}
|
|
1320
1286
|
declare const Drag: FunctionComponent<Partial<DragProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1321
1287
|
|
|
1322
|
-
interface EmptyProps {
|
|
1323
|
-
image
|
|
1288
|
+
interface EmptyProps extends BasicComponent {
|
|
1289
|
+
image?: ReactNode;
|
|
1324
1290
|
imageSize: number | string;
|
|
1325
1291
|
description: ReactNode;
|
|
1326
|
-
|
|
1292
|
+
status: 'empty' | 'error' | 'network';
|
|
1327
1293
|
}
|
|
1328
1294
|
declare const Empty: FunctionComponent<Partial<EmptyProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1329
1295
|
|
|
@@ -1446,7 +1412,6 @@ interface SkeletonProps {
|
|
|
1446
1412
|
declare const Skeleton: FunctionComponent<Partial<SkeletonProps>>;
|
|
1447
1413
|
|
|
1448
1414
|
type SwipeSide = 'left' | 'right';
|
|
1449
|
-
type SwipePosition = SwipeSide | 'cell' | 'outside';
|
|
1450
1415
|
interface SwipeInstance {
|
|
1451
1416
|
open: (side: SwipeSide) => void;
|
|
1452
1417
|
close: () => void;
|
|
@@ -1458,10 +1423,6 @@ interface SwipeProps {
|
|
|
1458
1423
|
style: React__default.CSSProperties;
|
|
1459
1424
|
/** 标识符,可以在事件参数中获取到 */
|
|
1460
1425
|
name?: string | number;
|
|
1461
|
-
/** 指定左侧滑动区域宽度,单位为px */
|
|
1462
|
-
leftWidth?: string | number;
|
|
1463
|
-
/** 指定右侧滑动区域宽度,单位为 px */
|
|
1464
|
-
rightWidth?: string | number;
|
|
1465
1426
|
/** 左侧滑动区域的内容 */
|
|
1466
1427
|
leftAction?: React__default.ReactNode;
|
|
1467
1428
|
/** 右侧滑动区域的内容 */
|
|
@@ -1478,10 +1439,10 @@ interface SwipeProps {
|
|
|
1478
1439
|
/** 关闭时触发 */
|
|
1479
1440
|
onClose?: ({ name, position, }: {
|
|
1480
1441
|
name: string | number;
|
|
1481
|
-
position:
|
|
1442
|
+
position: SwipeSide;
|
|
1482
1443
|
}) => void;
|
|
1483
1444
|
/** 点击时触发 */
|
|
1484
|
-
onActionClick?: (event: Event, position:
|
|
1445
|
+
onActionClick?: (event: Event, position: SwipeSide) => void;
|
|
1485
1446
|
onTouchStart?: (event: Event) => void;
|
|
1486
1447
|
onTouchEnd?: (event: Event) => void;
|
|
1487
1448
|
onTouchMove?: (event: Event) => void;
|
|
@@ -1584,44 +1545,39 @@ interface AvatarProps extends BasicComponent {
|
|
|
1584
1545
|
size: string;
|
|
1585
1546
|
icon: React__default.ReactNode;
|
|
1586
1547
|
shape: AvatarShape;
|
|
1587
|
-
|
|
1548
|
+
background: string;
|
|
1588
1549
|
color: string;
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
onActiveAvatar: (e: MouseEvent) => void;
|
|
1595
|
-
onError: (e: any) => void;
|
|
1550
|
+
fit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
1551
|
+
src: string;
|
|
1552
|
+
alt: string;
|
|
1553
|
+
onClick: (e: MouseEvent) => void;
|
|
1554
|
+
onError: () => void;
|
|
1596
1555
|
}
|
|
1597
1556
|
type AvatarShape = 'round' | 'square';
|
|
1598
|
-
declare const Avatar: FunctionComponent<Partial<AvatarProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1557
|
+
declare const Avatar: FunctionComponent<Partial<AvatarProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
1599
1558
|
|
|
1600
|
-
interface AvatarGroupProps {
|
|
1559
|
+
interface AvatarGroupProps extends BasicComponent {
|
|
1601
1560
|
maxContent: string;
|
|
1602
|
-
|
|
1603
|
-
|
|
1561
|
+
max: string | number;
|
|
1562
|
+
maxBackground: string;
|
|
1604
1563
|
maxColor: string;
|
|
1605
|
-
size:
|
|
1606
|
-
shape:
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
className: string;
|
|
1610
|
-
style: React__default.CSSProperties;
|
|
1564
|
+
size: 'large' | 'normal' | 'small';
|
|
1565
|
+
shape: 'round' | 'square';
|
|
1566
|
+
gap: string;
|
|
1567
|
+
level: 'left' | 'right';
|
|
1611
1568
|
}
|
|
1612
1569
|
declare const AvatarGroup: FunctionComponent<Partial<AvatarGroupProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1613
1570
|
|
|
1614
|
-
interface CircleProgressProps {
|
|
1615
|
-
|
|
1571
|
+
interface CircleProgressProps extends BasicComponent {
|
|
1572
|
+
percent: string | number;
|
|
1616
1573
|
strokeWidth?: string | number;
|
|
1617
1574
|
radius?: number | string;
|
|
1618
|
-
strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit'
|
|
1619
|
-
|
|
1620
|
-
|
|
1575
|
+
strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';
|
|
1576
|
+
color?: object | string;
|
|
1577
|
+
background?: string;
|
|
1621
1578
|
clockwise?: boolean;
|
|
1622
|
-
className?: string;
|
|
1623
1579
|
}
|
|
1624
|
-
declare const CircleProgress: FunctionComponent<CircleProgressProps & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1580
|
+
declare const CircleProgress: FunctionComponent<CircleProgressProps & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'color'>>;
|
|
1625
1581
|
|
|
1626
1582
|
interface CollapseProps {
|
|
1627
1583
|
className: string;
|
|
@@ -1666,9 +1622,10 @@ interface CountDownProps {
|
|
|
1666
1622
|
}
|
|
1667
1623
|
declare const CountDown: React__default.ForwardRefExoticComponent<Partial<CountDownProps> & React__default.RefAttributes<unknown>>;
|
|
1668
1624
|
|
|
1669
|
-
|
|
1625
|
+
type Direction = 'start' | 'end' | 'middle';
|
|
1626
|
+
interface EllipsisProps extends BasicComponent {
|
|
1670
1627
|
content: string;
|
|
1671
|
-
direction:
|
|
1628
|
+
direction: Direction;
|
|
1672
1629
|
rows: number | string;
|
|
1673
1630
|
expandText: string;
|
|
1674
1631
|
collapseText: string;
|
package/package.json
CHANGED
package/dist/esm/Icon.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { c as cn } from './bem-350c1702.js';
|
|
3
|
-
import '@bem-react/classname';
|
|
4
|
-
|
|
5
|
-
const defaultProps = {
|
|
6
|
-
name: '',
|
|
7
|
-
size: '',
|
|
8
|
-
classPrefix: 'nut-icon',
|
|
9
|
-
fontClassName: 'nutui-iconfont',
|
|
10
|
-
color: '',
|
|
11
|
-
tag: 'i',
|
|
12
|
-
onClick: (e) => { },
|
|
13
|
-
className: '',
|
|
14
|
-
};
|
|
15
|
-
function pxCheck(value) {
|
|
16
|
-
if (value === '') {
|
|
17
|
-
return value;
|
|
18
|
-
}
|
|
19
|
-
if (Number.isNaN(Number(value))) {
|
|
20
|
-
return String(value);
|
|
21
|
-
}
|
|
22
|
-
return `${value}px`;
|
|
23
|
-
}
|
|
24
|
-
function Icon(props) {
|
|
25
|
-
const { name, size, classPrefix, color, tag, children, className, fontClassName, style, onClick, ...rest } = {
|
|
26
|
-
...defaultProps,
|
|
27
|
-
...props,
|
|
28
|
-
};
|
|
29
|
-
const isImage = name ? name.indexOf('/') !== -1 : false;
|
|
30
|
-
const type = isImage ? 'img' : tag;
|
|
31
|
-
const b = cn('icon');
|
|
32
|
-
const handleClick = (e) => {
|
|
33
|
-
if (onClick) {
|
|
34
|
-
onClick(e);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
const hasSrc = () => {
|
|
38
|
-
if (isImage)
|
|
39
|
-
return { src: name };
|
|
40
|
-
return {};
|
|
41
|
-
};
|
|
42
|
-
const styles = {};
|
|
43
|
-
const checkedSize = pxCheck(size);
|
|
44
|
-
if (checkedSize) {
|
|
45
|
-
styles.width = styles.height = styles.fontSize = checkedSize;
|
|
46
|
-
}
|
|
47
|
-
return React.createElement(type, {
|
|
48
|
-
className: isImage
|
|
49
|
-
? `${b('img')} ${className || ''} `
|
|
50
|
-
: `${fontClassName} ${b(null)} ${classPrefix}-${name} ${className || ''}`,
|
|
51
|
-
style: {
|
|
52
|
-
color,
|
|
53
|
-
...styles,
|
|
54
|
-
...style,
|
|
55
|
-
},
|
|
56
|
-
...rest,
|
|
57
|
-
onClick: handleClick,
|
|
58
|
-
...hasSrc(),
|
|
59
|
-
}, children);
|
|
60
|
-
}
|
|
61
|
-
Icon.defaultProps = defaultProps;
|
|
62
|
-
Icon.displayName = 'NutIcon';
|
|
63
|
-
|
|
64
|
-
export { Icon as default };
|