@nutui/nutui-react 2.0.0-alpha.4 → 2.0.0-alpha.6
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 +29 -0
- package/dist/esm/Avatar.js +30 -25
- package/dist/esm/AvatarGroup.js +10 -15
- package/dist/esm/Cascader.js +46 -58
- package/dist/esm/Checkbox.js +1 -2
- package/dist/esm/CheckboxGroup.js +18 -20
- package/dist/esm/DatePicker.js +10 -10
- package/dist/esm/Ellipsis.js +13 -12
- package/dist/esm/Empty.js +18 -26
- package/dist/esm/Image.js +3 -5
- package/dist/esm/Picker.js +175 -160
- package/dist/esm/Skeleton.js +1 -1
- package/dist/esm/Swipe.js +4 -10
- package/dist/esm/TabPane.js +39 -3
- package/dist/esm/Tabbar/style/index.js +1 -1
- package/dist/esm/Table.js +20 -34
- package/dist/esm/TextArea.js +53 -81
- package/dist/esm/cellgroup2.js +5 -4
- package/dist/esm/checkbox2.js +34 -47
- package/dist/esm/tabs2.js +10 -0
- 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 +723 -682
- package/dist/nutui.react.umd.js +723 -682
- package/dist/packages/cascader/cascader.scss +0 -26
- package/dist/packages/cellgroup/cellgroup.scss +20 -16
- package/dist/packages/checkbox/checkbox.scss +8 -11
- package/dist/packages/empty/empty.scss +0 -9
- package/dist/packages/picker/picker.scss +66 -137
- package/dist/packages/tabbar/tabbar.scss +1 -0
- package/dist/packages/table/table.scss +0 -56
- package/dist/packages/textarea/textarea.scss +5 -12
- 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 +1 -4
- package/dist/styles/variables.scss +2 -6
- package/dist/types/index.d.ts +75 -91
- package/package.json +1 -1
- package/dist/esm/Icon.js +0 -83
- package/dist/esm/tabpane2.js +0 -42
- package/dist/packages/icon/icon.scss +0 -0
- /package/dist/esm/{AvatarContext.js → context.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';
|
|
@@ -459,10 +459,7 @@ $picker-item-active-line-border: var(
|
|
|
459
459
|
--nutui-picker-item-active-line-border,
|
|
460
460
|
1px solid #d8d8d8
|
|
461
461
|
) !default;
|
|
462
|
-
|
|
463
|
-
--nutui-picker-columns-item-color,
|
|
464
|
-
$title-color
|
|
465
|
-
) !default;
|
|
462
|
+
|
|
466
463
|
$picker-mask-bg-img: var(
|
|
467
464
|
--picker-mask-bg-img,
|
|
468
465
|
linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4)),
|
|
@@ -401,8 +401,8 @@ $uploader-preview-close-top: var(
|
|
|
401
401
|
) !default;
|
|
402
402
|
|
|
403
403
|
// picker(✅)(todo:react版本picker组件dom元素类名变化较大,picker.scss暂不改动)
|
|
404
|
-
$picker-cancel-color: var(--nutui-picker-cancel-color, #808080) !default;
|
|
405
|
-
$picker-ok-color: var(--nutui-picker-ok-color, $primary-color) !default;
|
|
404
|
+
$picker-bar-cancel-color: var(--nutui-picker-cancel-color, #808080) !default;
|
|
405
|
+
$picker-bar-ok-color: var(--nutui-picker-ok-color, $primary-color) !default;
|
|
406
406
|
$picker-bar-cancel-font-size: var(
|
|
407
407
|
--nutui-picker-bar-cancel-font-size,
|
|
408
408
|
14px
|
|
@@ -442,10 +442,6 @@ $picker-item-active-line-border: var(
|
|
|
442
442
|
--nutui-picker-item-active-line-border,
|
|
443
443
|
1px solid #d8d8d8
|
|
444
444
|
) !default;
|
|
445
|
-
$picker-columns-item-color: var(
|
|
446
|
-
--nutui-picker-columns-item-color,
|
|
447
|
-
$title-color
|
|
448
|
-
) !default;
|
|
449
445
|
$picker-mask-bg-img: var(
|
|
450
446
|
--picker-mask-bg-img,
|
|
451
447
|
linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4)),
|
package/dist/types/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ interface CellGroupProps extends BasicComponent {
|
|
|
39
39
|
title: ReactNode;
|
|
40
40
|
description: ReactNode;
|
|
41
41
|
children?: ReactNode;
|
|
42
|
+
divider: boolean;
|
|
42
43
|
}
|
|
43
44
|
declare const CellGroup: FunctionComponent<Partial<CellGroupProps>>;
|
|
44
45
|
|
|
@@ -311,7 +312,7 @@ declare const Elevator: FunctionComponent<Partial<ElevatorProps> & React__defaul
|
|
|
311
312
|
Context: typeof elevatorContext;
|
|
312
313
|
};
|
|
313
314
|
|
|
314
|
-
type Direction$
|
|
315
|
+
type Direction$2 = 'right' | 'left';
|
|
315
316
|
type Position$2 = {
|
|
316
317
|
top?: string;
|
|
317
318
|
bottom?: string;
|
|
@@ -323,7 +324,7 @@ interface FixedNavProps extends BasicComponent {
|
|
|
323
324
|
activeText: string;
|
|
324
325
|
inactiveText: string;
|
|
325
326
|
position: Position$2;
|
|
326
|
-
type: Direction$
|
|
327
|
+
type: Direction$2;
|
|
327
328
|
onChange: (item: any) => void;
|
|
328
329
|
onSelect: (item: any, event: MouseEvent$1) => void;
|
|
329
330
|
content: React__default.ReactNode;
|
|
@@ -594,27 +595,27 @@ interface CascaderOption {
|
|
|
594
595
|
loading?: boolean;
|
|
595
596
|
root?: boolean;
|
|
596
597
|
}
|
|
598
|
+
interface optionKey {
|
|
599
|
+
textKey: string;
|
|
600
|
+
valueKey: string;
|
|
601
|
+
childrenKey: string;
|
|
602
|
+
}
|
|
597
603
|
|
|
598
|
-
interface CascaderProps {
|
|
599
|
-
|
|
600
|
-
style: CSSProperties;
|
|
601
|
-
activeColor: string;
|
|
602
|
-
checkedIcon: string;
|
|
603
|
-
tabsColor: string;
|
|
604
|
-
poppable: boolean;
|
|
604
|
+
interface CascaderProps extends BasicComponent {
|
|
605
|
+
popup: boolean;
|
|
605
606
|
visible: boolean;
|
|
607
|
+
activeColor: string;
|
|
608
|
+
activeIcon: string;
|
|
606
609
|
options: CascaderOption[];
|
|
607
610
|
value: string[];
|
|
608
611
|
title: string;
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
childrenKey: string;
|
|
612
|
-
convertConfig: Record<string, string | number | null>;
|
|
612
|
+
optionKey: optionKey;
|
|
613
|
+
format: Record<string, string | number | null>;
|
|
613
614
|
closeable: boolean;
|
|
614
615
|
closeIconPosition: string;
|
|
615
616
|
closeIcon: string;
|
|
616
617
|
lazy: boolean;
|
|
617
|
-
|
|
618
|
+
onLoad: (node: any, resolve: any) => void;
|
|
618
619
|
onClose?: () => void;
|
|
619
620
|
onChange: (value: any, params: any) => void;
|
|
620
621
|
onPathChange: (value: any, params: any) => void;
|
|
@@ -630,17 +631,17 @@ interface RadioGroupOptionType {
|
|
|
630
631
|
onChange?: MouseEventHandler<HTMLDivElement>;
|
|
631
632
|
}
|
|
632
633
|
|
|
633
|
-
type
|
|
634
|
+
type CheckboxLabelPosition = 'left' | 'right';
|
|
634
635
|
type CheckboxDirection = 'horizontal' | 'vertical';
|
|
635
636
|
interface CheckboxGroupProps {
|
|
636
|
-
disabled
|
|
637
|
+
disabled?: boolean;
|
|
637
638
|
value?: string[];
|
|
638
639
|
defaultValue?: string[];
|
|
639
640
|
max: number | undefined;
|
|
640
|
-
|
|
641
|
+
labelPosition: CheckboxLabelPosition;
|
|
641
642
|
direction: CheckboxDirection;
|
|
642
|
-
onChange: (value: string[]) => void;
|
|
643
643
|
options: RadioGroupOptionType[];
|
|
644
|
+
onChange: (value: string[]) => void;
|
|
644
645
|
}
|
|
645
646
|
declare const CheckboxGroup: React__default.ForwardRefExoticComponent<Partial<CheckboxGroupProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, "onChange"> & React__default.RefAttributes<unknown>>;
|
|
646
647
|
|
|
@@ -648,16 +649,14 @@ interface CheckboxProps extends BasicComponent {
|
|
|
648
649
|
checked: boolean;
|
|
649
650
|
disabled: boolean;
|
|
650
651
|
defaultChecked: boolean;
|
|
651
|
-
|
|
652
|
-
iconSize: string | number;
|
|
652
|
+
labelPosition: 'left' | 'right';
|
|
653
653
|
icon: React__default.ReactNode;
|
|
654
|
-
|
|
654
|
+
activeIcon: React__default.ReactNode;
|
|
655
655
|
indeterminateIcon: React__default.ReactNode;
|
|
656
|
-
|
|
657
|
-
iconFontClassName: string;
|
|
656
|
+
value: string | number;
|
|
658
657
|
indeterminate: boolean;
|
|
659
658
|
label: string | number;
|
|
660
|
-
onChange: (
|
|
659
|
+
onChange: (value: boolean) => void;
|
|
661
660
|
}
|
|
662
661
|
declare const Checkbox: FunctionComponent<Partial<CheckboxProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange'>> & {
|
|
663
662
|
Group: typeof CheckboxGroup;
|
|
@@ -666,7 +665,7 @@ declare const Checkbox: FunctionComponent<Partial<CheckboxProps> & Omit<React__d
|
|
|
666
665
|
interface PickerOption$1 {
|
|
667
666
|
text: string | number;
|
|
668
667
|
value: string | number;
|
|
669
|
-
disabled?:
|
|
668
|
+
disabled?: boolean;
|
|
670
669
|
children?: PickerOption$1[];
|
|
671
670
|
className?: string | number;
|
|
672
671
|
}
|
|
@@ -685,8 +684,8 @@ interface DatePickerProps {
|
|
|
685
684
|
formatter: (type: string, option: PickerOption$1) => PickerOption$1;
|
|
686
685
|
filter: (type: string, option: PickerOption$1[]) => PickerOption$1[];
|
|
687
686
|
onCloseDatePicker: () => void;
|
|
688
|
-
onConfirmDatePicker: (
|
|
689
|
-
onChange?: (
|
|
687
|
+
onConfirmDatePicker: (selectedOptions: PickerOption$1[], selectedValue: (string | number)[]) => void;
|
|
688
|
+
onChange?: (selectedOptions: PickerOption$1[], selectedValue: (string | number)[], columnIndex: number) => void;
|
|
690
689
|
}
|
|
691
690
|
declare const DatePicker: FunctionComponent<Partial<DatePickerProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
692
691
|
|
|
@@ -851,8 +850,6 @@ interface InputNumberProps extends BasicComponent {
|
|
|
851
850
|
step: string | number;
|
|
852
851
|
digits: string | number;
|
|
853
852
|
async: boolean;
|
|
854
|
-
className: string;
|
|
855
|
-
style: React__default.CSSProperties;
|
|
856
853
|
formatter?: (displayValue: string | number) => string;
|
|
857
854
|
onPlus: (e: MouseEvent) => void;
|
|
858
855
|
onMinus: (e: MouseEvent) => void;
|
|
@@ -913,32 +910,32 @@ declare const NumberKeyboard: FunctionComponent<Partial<NumberKeyboardProps> & O
|
|
|
913
910
|
interface PickerOption {
|
|
914
911
|
text: string | number;
|
|
915
912
|
value: string | number;
|
|
916
|
-
disabled?:
|
|
913
|
+
disabled?: boolean;
|
|
917
914
|
children?: PickerOption[];
|
|
918
915
|
className?: string | number;
|
|
919
916
|
}
|
|
920
|
-
|
|
917
|
+
|
|
918
|
+
interface PickerProps extends BasicComponent {
|
|
921
919
|
visible: boolean;
|
|
922
920
|
title?: string;
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
style?: React__default.CSSProperties;
|
|
921
|
+
options: (PickerOption | PickerOption[])[];
|
|
922
|
+
value?: (number | string)[];
|
|
923
|
+
defaultValue?: (number | string)[];
|
|
927
924
|
threeDimensional?: boolean;
|
|
928
|
-
|
|
929
|
-
onConfirm?: (selectedValue: (string | number)[]
|
|
930
|
-
onClose?: (selectedValue: (string | number)[]
|
|
931
|
-
|
|
932
|
-
onChange?: (
|
|
925
|
+
duration: number | string;
|
|
926
|
+
onConfirm?: (selectedOptions: PickerOption[], selectedValue: (string | number)[]) => void;
|
|
927
|
+
onClose?: (selectedOptions: PickerOption[], selectedValue: (string | number)[]) => void;
|
|
928
|
+
afterClose?: (selectedOptions: PickerOption[], selectedValue: (string | number)[], pickerRef: RefObject<HTMLDivElement>) => void;
|
|
929
|
+
onChange?: (selectedOptions: PickerOption[], selectedValue: (string | number)[], columnIndex: number) => void;
|
|
933
930
|
}
|
|
934
931
|
declare const Picker: React__default.ForwardRefExoticComponent<Partial<PickerProps> & React__default.RefAttributes<unknown>>;
|
|
935
932
|
|
|
936
933
|
type Position$1 = 'left' | 'right';
|
|
937
|
-
type Direction = 'horizontal' | 'vertical';
|
|
934
|
+
type Direction$1 = 'horizontal' | 'vertical';
|
|
938
935
|
interface RadioGroupProps {
|
|
939
936
|
value: string | number | boolean | null;
|
|
940
937
|
textPosition: Position$1;
|
|
941
|
-
direction: Direction;
|
|
938
|
+
direction: Direction$1;
|
|
942
939
|
onChange: (value: string | number | boolean) => void;
|
|
943
940
|
options: RadioGroupOptionType[];
|
|
944
941
|
}
|
|
@@ -1116,23 +1113,21 @@ interface SwitchProps extends BasicComponent {
|
|
|
1116
1113
|
}
|
|
1117
1114
|
declare const Switch: FunctionComponent<Partial<SwitchProps>>;
|
|
1118
1115
|
|
|
1119
|
-
interface TextAreaProps {
|
|
1120
|
-
|
|
1121
|
-
defaultValue: string
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
onBlur?: (event: Event) => void;
|
|
1133
|
-
onFocus?: (event: Event) => void;
|
|
1116
|
+
interface TextAreaProps extends BasicComponent {
|
|
1117
|
+
value: string;
|
|
1118
|
+
defaultValue: string;
|
|
1119
|
+
showCount: boolean;
|
|
1120
|
+
maxLength: number;
|
|
1121
|
+
rows: number;
|
|
1122
|
+
placeholder: string;
|
|
1123
|
+
readOnly: boolean;
|
|
1124
|
+
disabled: boolean;
|
|
1125
|
+
autoSize: boolean;
|
|
1126
|
+
onChange: (value: string) => void;
|
|
1127
|
+
onBlur: (event: Event) => void;
|
|
1128
|
+
onFocus: (event: Event) => void;
|
|
1134
1129
|
}
|
|
1135
|
-
declare const TextArea: FunctionComponent<Partial<TextAreaProps> & Omit<React__default.HTMLAttributes<
|
|
1130
|
+
declare const TextArea: FunctionComponent<Partial<TextAreaProps> & Omit<React__default.HTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'onBlur' | 'onFocus'>>;
|
|
1136
1131
|
|
|
1137
1132
|
declare class UploadOptions {
|
|
1138
1133
|
url: string;
|
|
@@ -1305,11 +1300,11 @@ interface DragProps extends BasicComponent {
|
|
|
1305
1300
|
}
|
|
1306
1301
|
declare const Drag: FunctionComponent<Partial<DragProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1307
1302
|
|
|
1308
|
-
interface EmptyProps {
|
|
1309
|
-
image
|
|
1303
|
+
interface EmptyProps extends BasicComponent {
|
|
1304
|
+
image?: ReactNode;
|
|
1310
1305
|
imageSize: number | string;
|
|
1311
1306
|
description: ReactNode;
|
|
1312
|
-
|
|
1307
|
+
status: 'empty' | 'error' | 'network';
|
|
1313
1308
|
}
|
|
1314
1309
|
declare const Empty: FunctionComponent<Partial<EmptyProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1315
1310
|
|
|
@@ -1438,7 +1433,6 @@ interface SkeletonProps {
|
|
|
1438
1433
|
declare const Skeleton: FunctionComponent<Partial<SkeletonProps>>;
|
|
1439
1434
|
|
|
1440
1435
|
type SwipeSide = 'left' | 'right';
|
|
1441
|
-
type SwipePosition = SwipeSide | 'cell' | 'outside';
|
|
1442
1436
|
interface SwipeInstance {
|
|
1443
1437
|
open: (side: SwipeSide) => void;
|
|
1444
1438
|
close: () => void;
|
|
@@ -1450,10 +1444,6 @@ interface SwipeProps {
|
|
|
1450
1444
|
style: React__default.CSSProperties;
|
|
1451
1445
|
/** 标识符,可以在事件参数中获取到 */
|
|
1452
1446
|
name?: string | number;
|
|
1453
|
-
/** 指定左侧滑动区域宽度,单位为px */
|
|
1454
|
-
leftWidth?: string | number;
|
|
1455
|
-
/** 指定右侧滑动区域宽度,单位为 px */
|
|
1456
|
-
rightWidth?: string | number;
|
|
1457
1447
|
/** 左侧滑动区域的内容 */
|
|
1458
1448
|
leftAction?: React__default.ReactNode;
|
|
1459
1449
|
/** 右侧滑动区域的内容 */
|
|
@@ -1470,10 +1460,10 @@ interface SwipeProps {
|
|
|
1470
1460
|
/** 关闭时触发 */
|
|
1471
1461
|
onClose?: ({ name, position, }: {
|
|
1472
1462
|
name: string | number;
|
|
1473
|
-
position:
|
|
1463
|
+
position: SwipeSide;
|
|
1474
1464
|
}) => void;
|
|
1475
1465
|
/** 点击时触发 */
|
|
1476
|
-
onActionClick?: (event: Event, position:
|
|
1466
|
+
onActionClick?: (event: Event, position: SwipeSide) => void;
|
|
1477
1467
|
onTouchStart?: (event: Event) => void;
|
|
1478
1468
|
onTouchEnd?: (event: Event) => void;
|
|
1479
1469
|
onTouchMove?: (event: Event) => void;
|
|
@@ -1583,32 +1573,27 @@ declare const Audio: FunctionComponent<Partial<AudioProps> & React__default.HTML
|
|
|
1583
1573
|
interface AvatarProps extends BasicComponent {
|
|
1584
1574
|
size: string;
|
|
1585
1575
|
icon: React__default.ReactNode;
|
|
1576
|
+
fit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
1586
1577
|
shape: AvatarShape;
|
|
1587
|
-
|
|
1578
|
+
background: string;
|
|
1588
1579
|
color: string;
|
|
1589
|
-
|
|
1590
|
-
url: string;
|
|
1591
|
-
className: string;
|
|
1580
|
+
src: string;
|
|
1592
1581
|
alt: string;
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
onActiveAvatar: (e: MouseEvent) => void;
|
|
1596
|
-
onError: (e: any) => void;
|
|
1582
|
+
onClick: (e: MouseEvent) => void;
|
|
1583
|
+
onError: () => void;
|
|
1597
1584
|
}
|
|
1598
1585
|
type AvatarShape = 'round' | 'square';
|
|
1599
|
-
declare const Avatar: FunctionComponent<Partial<AvatarProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1586
|
+
declare const Avatar: FunctionComponent<Partial<AvatarProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
1600
1587
|
|
|
1601
|
-
interface AvatarGroupProps {
|
|
1588
|
+
interface AvatarGroupProps extends BasicComponent {
|
|
1602
1589
|
maxContent: string;
|
|
1603
|
-
|
|
1604
|
-
|
|
1590
|
+
max: string | number;
|
|
1591
|
+
maxBackground: string;
|
|
1605
1592
|
maxColor: string;
|
|
1606
|
-
size:
|
|
1607
|
-
shape:
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
className: string;
|
|
1611
|
-
style: React__default.CSSProperties;
|
|
1593
|
+
size: 'large' | 'normal' | 'small';
|
|
1594
|
+
shape: 'round' | 'square';
|
|
1595
|
+
gap: string;
|
|
1596
|
+
level: 'left' | 'right';
|
|
1612
1597
|
}
|
|
1613
1598
|
declare const AvatarGroup: FunctionComponent<Partial<AvatarGroupProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1614
1599
|
|
|
@@ -1666,9 +1651,10 @@ interface CountDownProps {
|
|
|
1666
1651
|
}
|
|
1667
1652
|
declare const CountDown: React__default.ForwardRefExoticComponent<Partial<CountDownProps> & React__default.RefAttributes<unknown>>;
|
|
1668
1653
|
|
|
1669
|
-
|
|
1654
|
+
type Direction = 'start' | 'end' | 'middle';
|
|
1655
|
+
interface EllipsisProps extends BasicComponent {
|
|
1670
1656
|
content: string;
|
|
1671
|
-
direction:
|
|
1657
|
+
direction: Direction;
|
|
1672
1658
|
rows: number | string;
|
|
1673
1659
|
expandText: string;
|
|
1674
1660
|
collapseText: string;
|
|
@@ -1829,8 +1815,6 @@ interface SwiperItemProps {
|
|
|
1829
1815
|
declare const SwiperItem: React__default.ForwardRefExoticComponent<Partial<SwiperItemProps> & React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
|
|
1830
1816
|
|
|
1831
1817
|
interface BasicTableProps extends BasicComponent {
|
|
1832
|
-
className: string;
|
|
1833
|
-
style: React__default.CSSProperties;
|
|
1834
1818
|
columns: Array<TableColumnProps>;
|
|
1835
1819
|
data: Array<any>;
|
|
1836
1820
|
bordered: boolean;
|
|
@@ -1838,7 +1822,7 @@ interface BasicTableProps extends BasicComponent {
|
|
|
1838
1822
|
striped?: boolean;
|
|
1839
1823
|
noData?: React__default.ReactNode;
|
|
1840
1824
|
sorterIcon?: React__default.ReactNode;
|
|
1841
|
-
|
|
1825
|
+
onSort?: (item: TableColumnProps, data: Array<any>) => void;
|
|
1842
1826
|
showHeader?: boolean;
|
|
1843
1827
|
}
|
|
1844
1828
|
interface TableColumnProps {
|
package/package.json
CHANGED
package/dist/esm/Icon.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["name", "size", "classPrefix", "color", "tag", "children", "className", "fontClassName", "style", "onClick"];
|
|
4
|
-
function ownKeys(object, enumerableOnly) {
|
|
5
|
-
var keys = Object.keys(object);
|
|
6
|
-
if (Object.getOwnPropertySymbols) {
|
|
7
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
8
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
9
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
10
|
-
})), keys.push.apply(keys, symbols);
|
|
11
|
-
}
|
|
12
|
-
return keys;
|
|
13
|
-
}
|
|
14
|
-
function _objectSpread(target) {
|
|
15
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
16
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
17
|
-
i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
|
|
18
|
-
_defineProperty(target, key, source[key]);
|
|
19
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
20
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return target;
|
|
24
|
-
}
|
|
25
|
-
import React__default from "react";
|
|
26
|
-
import { c as cn } from "./bem.js";
|
|
27
|
-
import "@bem-react/classname";
|
|
28
|
-
var defaultProps = {
|
|
29
|
-
name: "",
|
|
30
|
-
size: "",
|
|
31
|
-
classPrefix: "nut-icon",
|
|
32
|
-
fontClassName: "nutui-iconfont",
|
|
33
|
-
color: "",
|
|
34
|
-
tag: "i",
|
|
35
|
-
onClick: function onClick(e) {
|
|
36
|
-
},
|
|
37
|
-
className: ""
|
|
38
|
-
};
|
|
39
|
-
function pxCheck(value) {
|
|
40
|
-
if (value === "") {
|
|
41
|
-
return value;
|
|
42
|
-
}
|
|
43
|
-
if (Number.isNaN(Number(value))) {
|
|
44
|
-
return String(value);
|
|
45
|
-
}
|
|
46
|
-
return "".concat(value, "px");
|
|
47
|
-
}
|
|
48
|
-
function Icon(props) {
|
|
49
|
-
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props), name = _defaultProps$props.name, size = _defaultProps$props.size, classPrefix = _defaultProps$props.classPrefix, color = _defaultProps$props.color, tag = _defaultProps$props.tag, children = _defaultProps$props.children, className = _defaultProps$props.className, fontClassName = _defaultProps$props.fontClassName, style = _defaultProps$props.style, onClick2 = _defaultProps$props.onClick, rest = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
50
|
-
var isImage = name ? name.indexOf("/") !== -1 : false;
|
|
51
|
-
var type = isImage ? "img" : tag;
|
|
52
|
-
var b = cn("icon");
|
|
53
|
-
var handleClick = function handleClick2(e) {
|
|
54
|
-
if (onClick2) {
|
|
55
|
-
onClick2(e);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
var hasSrc = function hasSrc2() {
|
|
59
|
-
if (isImage)
|
|
60
|
-
return {
|
|
61
|
-
src: name
|
|
62
|
-
};
|
|
63
|
-
return {};
|
|
64
|
-
};
|
|
65
|
-
var styles = {};
|
|
66
|
-
var checkedSize = pxCheck(size);
|
|
67
|
-
if (checkedSize) {
|
|
68
|
-
styles.width = styles.height = styles.fontSize = checkedSize;
|
|
69
|
-
}
|
|
70
|
-
return React__default.createElement(type, _objectSpread(_objectSpread({
|
|
71
|
-
className: isImage ? "".concat(b("img"), " ").concat(className || "", " ") : "".concat(fontClassName, " ").concat(b(null), " ").concat(classPrefix, "-").concat(name, " ").concat(className || ""),
|
|
72
|
-
style: _objectSpread(_objectSpread({
|
|
73
|
-
color
|
|
74
|
-
}, styles), style)
|
|
75
|
-
}, rest), {}, {
|
|
76
|
-
onClick: handleClick
|
|
77
|
-
}, hasSrc()), children);
|
|
78
|
-
}
|
|
79
|
-
Icon.defaultProps = defaultProps;
|
|
80
|
-
Icon.displayName = "NutIcon";
|
|
81
|
-
export {
|
|
82
|
-
Icon as default
|
|
83
|
-
};
|
package/dist/esm/tabpane2.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
function ownKeys(object, enumerableOnly) {
|
|
3
|
-
var keys = Object.keys(object);
|
|
4
|
-
if (Object.getOwnPropertySymbols) {
|
|
5
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
6
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
7
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
8
|
-
})), keys.push.apply(keys, symbols);
|
|
9
|
-
}
|
|
10
|
-
return keys;
|
|
11
|
-
}
|
|
12
|
-
function _objectSpread(target) {
|
|
13
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
14
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
15
|
-
i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
|
|
16
|
-
_defineProperty(target, key, source[key]);
|
|
17
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
18
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
return target;
|
|
22
|
-
}
|
|
23
|
-
import React__default from "react";
|
|
24
|
-
import classNames from "classnames";
|
|
25
|
-
var defaultProps = {
|
|
26
|
-
title: "",
|
|
27
|
-
value: "",
|
|
28
|
-
disabled: false
|
|
29
|
-
};
|
|
30
|
-
var TabPane = function TabPane2(props) {
|
|
31
|
-
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props), children = _defaultProps$props.children, autoHeightClassName = _defaultProps$props.autoHeightClassName, className = _defaultProps$props.className, disabled = _defaultProps$props.disabled;
|
|
32
|
-
var classPrefix = "nut-tabpane";
|
|
33
|
-
var classes = classNames({
|
|
34
|
-
active: !disabled && props.active
|
|
35
|
-
}, classPrefix, autoHeightClassName, className);
|
|
36
|
-
return children ? React__default.createElement("div", {
|
|
37
|
-
className: classes
|
|
38
|
-
}, !disabled && children) : null;
|
|
39
|
-
};
|
|
40
|
-
export {
|
|
41
|
-
TabPane as T
|
|
42
|
-
};
|
|
File without changes
|
|
File without changes
|