@nutui/nutui-react 2.0.0-alpha.3 → 2.0.0-alpha.4
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 +9 -0
- package/dist/esm/Badge.js +4 -66
- package/dist/esm/CircleProgress.js +20 -25
- package/dist/esm/Input.js +87 -193
- package/dist/esm/Tabbar.js +29 -33
- package/dist/esm/TabbarItem.js +5 -75
- package/dist/esm/badge2.js +69 -0
- package/dist/esm/tabbaritem2.js +61 -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 +630 -837
- package/dist/nutui.react.umd.js +630 -837
- package/dist/packages/badge/badge.scss +0 -1
- package/dist/packages/circleprogress/circleprogress.scss +0 -9
- package/dist/packages/input/input.scss +13 -180
- package/dist/packages/tabbar/tabbar.scss +16 -23
- package/dist/packages/tabbaritem/tabbaritem.scss +9 -70
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +12 -16
- package/dist/styles/variables.scss +12 -16
- package/dist/types/index.d.ts +46 -80
- package/package.json +1 -1
package/dist/style.mjs
CHANGED
|
@@ -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
|
@@ -381,36 +381,40 @@ type SubSideNavBarProps = {
|
|
|
381
381
|
};
|
|
382
382
|
declare const SubSideNavBar: FunctionComponent<SubSideNavBarProps>;
|
|
383
383
|
|
|
384
|
-
interface
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
safeAreaInsetBottom: boolean;
|
|
392
|
-
className: string;
|
|
393
|
-
style: React__default.CSSProperties;
|
|
394
|
-
onSwitch: (child: React__default.ReactElement<any>, active: number) => void;
|
|
395
|
-
children?: React__default.ReactNode;
|
|
384
|
+
interface BadgeProps extends BasicComponent {
|
|
385
|
+
value: ReactNode;
|
|
386
|
+
dot: boolean;
|
|
387
|
+
max: number;
|
|
388
|
+
top: string;
|
|
389
|
+
right: string;
|
|
390
|
+
color: string;
|
|
396
391
|
}
|
|
397
|
-
declare const
|
|
392
|
+
declare const Badge: FunctionComponent<Partial<BadgeProps>>;
|
|
398
393
|
|
|
399
|
-
interface TabbarItemProps extends
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
tabTitle: string;
|
|
403
|
-
icon: React__default.ReactNode;
|
|
404
|
-
href: string;
|
|
405
|
-
num: string | number;
|
|
394
|
+
interface TabbarItemProps extends BadgeProps {
|
|
395
|
+
title: ReactNode;
|
|
396
|
+
icon: ReactNode;
|
|
406
397
|
active: boolean;
|
|
407
398
|
activeColor: string;
|
|
408
|
-
|
|
399
|
+
inactiveColor: string;
|
|
409
400
|
index: number;
|
|
410
401
|
handleClick: (idx: number) => void;
|
|
411
402
|
}
|
|
412
403
|
declare const TabbarItem: FunctionComponent<Partial<TabbarItemProps>>;
|
|
413
404
|
|
|
405
|
+
interface TabbarProps extends BasicComponent {
|
|
406
|
+
defaultValue: number;
|
|
407
|
+
value?: number;
|
|
408
|
+
fixed: boolean;
|
|
409
|
+
inactiveColor: string;
|
|
410
|
+
activeColor: string;
|
|
411
|
+
safeArea: boolean;
|
|
412
|
+
onSwitch: (value: number) => void;
|
|
413
|
+
}
|
|
414
|
+
declare const Tabbar: FunctionComponent<Partial<TabbarProps>> & {
|
|
415
|
+
Item: typeof TabbarItem;
|
|
416
|
+
};
|
|
417
|
+
|
|
414
418
|
interface TabPanelInnerProps {
|
|
415
419
|
autoHeightClassName: string;
|
|
416
420
|
}
|
|
@@ -811,57 +815,30 @@ declare const Form: FunctionComponent<Partial<FormProps> & React__default.HTMLAt
|
|
|
811
815
|
type InputAlignType = 'left' | 'center' | 'right';
|
|
812
816
|
type InputFormatTrigger = 'onChange' | 'onBlur';
|
|
813
817
|
type InputType = HTMLInputTypeAttribute;
|
|
814
|
-
type
|
|
815
|
-
pattern?: RegExp;
|
|
816
|
-
message?: string;
|
|
817
|
-
required?: boolean;
|
|
818
|
-
};
|
|
818
|
+
type ConfirmTextType = 'send' | 'search' | 'next' | 'go' | 'done';
|
|
819
819
|
interface InputProps extends BasicComponent {
|
|
820
820
|
type: InputType;
|
|
821
821
|
name: string;
|
|
822
|
-
defaultValue
|
|
822
|
+
defaultValue?: string;
|
|
823
|
+
value?: string;
|
|
823
824
|
placeholder: string;
|
|
824
|
-
|
|
825
|
-
labelClass: string;
|
|
826
|
-
labelWidth: string | number;
|
|
827
|
-
labelAlign: InputAlignType;
|
|
828
|
-
colon: boolean;
|
|
829
|
-
inputAlign: InputAlignType;
|
|
830
|
-
center: boolean;
|
|
831
|
-
required: boolean;
|
|
825
|
+
align: InputAlignType;
|
|
832
826
|
disabled: boolean;
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
maxlength: any;
|
|
836
|
-
leftIcon: React__default.ReactNode;
|
|
837
|
-
rightIcon: React__default.ReactNode;
|
|
827
|
+
readOnly: boolean;
|
|
828
|
+
maxLength: number;
|
|
838
829
|
clearable: boolean;
|
|
839
830
|
clearIcon: React__default.ReactNode;
|
|
840
|
-
clearSize: string | number;
|
|
841
|
-
border: boolean;
|
|
842
831
|
formatTrigger: InputFormatTrigger;
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
slotButton?: React__default.ReactNode;
|
|
852
|
-
slotInput?: React__default.ReactNode;
|
|
853
|
-
formatter: (value: string) => void;
|
|
854
|
-
onChange?: (value: any, event: Event) => void;
|
|
855
|
-
onBlur?: (value: any, event: Event) => void;
|
|
856
|
-
onFocus?: (value: any, event: Event) => void;
|
|
857
|
-
onClear?: (value: any, event: Event) => void;
|
|
858
|
-
keypress?: (value: any, event: Event) => void;
|
|
859
|
-
onClickInput?: (value: any) => void;
|
|
860
|
-
onClickLeftIcon?: (value: any) => void;
|
|
861
|
-
onClickRightIcon?: (value: any) => void;
|
|
862
|
-
onClick?: (value: any) => void;
|
|
832
|
+
autoFocus: boolean;
|
|
833
|
+
confirmType: ConfirmTextType;
|
|
834
|
+
formatter?: (value: string) => void;
|
|
835
|
+
onChange?: (value: string) => void;
|
|
836
|
+
onBlur?: (value: string) => void;
|
|
837
|
+
onFocus?: (value: string) => void;
|
|
838
|
+
onClear?: (value: string) => void;
|
|
839
|
+
onClick?: (value: MouseEvent$1<HTMLDivElement>) => void;
|
|
863
840
|
}
|
|
864
|
-
declare const Input:
|
|
841
|
+
declare const Input: React__default.ForwardRefExoticComponent<Partial<InputProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, "onClick" | "onFocus" | "onBlur" | "onChange"> & React__default.RefAttributes<unknown>>;
|
|
865
842
|
|
|
866
843
|
interface InputNumberProps extends BasicComponent {
|
|
867
844
|
disabled: boolean;
|
|
@@ -1271,16 +1248,6 @@ interface ActionSheetProps {
|
|
|
1271
1248
|
}
|
|
1272
1249
|
declare const ActionSheet: FunctionComponent<Partial<ActionSheetProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1273
1250
|
|
|
1274
|
-
interface BadgeProps extends BasicComponent {
|
|
1275
|
-
value: ReactNode;
|
|
1276
|
-
dot: boolean;
|
|
1277
|
-
max: number;
|
|
1278
|
-
top: string;
|
|
1279
|
-
right: string;
|
|
1280
|
-
color: string;
|
|
1281
|
-
}
|
|
1282
|
-
declare const Badge: FunctionComponent<Partial<BadgeProps>>;
|
|
1283
|
-
|
|
1284
1251
|
type DialogConfigType = {
|
|
1285
1252
|
prefixCls?: string;
|
|
1286
1253
|
simple?: boolean;
|
|
@@ -1645,17 +1612,16 @@ interface AvatarGroupProps {
|
|
|
1645
1612
|
}
|
|
1646
1613
|
declare const AvatarGroup: FunctionComponent<Partial<AvatarGroupProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1647
1614
|
|
|
1648
|
-
interface CircleProgressProps {
|
|
1649
|
-
|
|
1615
|
+
interface CircleProgressProps extends BasicComponent {
|
|
1616
|
+
percent: string | number;
|
|
1650
1617
|
strokeWidth?: string | number;
|
|
1651
1618
|
radius?: number | string;
|
|
1652
|
-
strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit'
|
|
1653
|
-
|
|
1654
|
-
|
|
1619
|
+
strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';
|
|
1620
|
+
color?: object | string;
|
|
1621
|
+
background?: string;
|
|
1655
1622
|
clockwise?: boolean;
|
|
1656
|
-
className?: string;
|
|
1657
1623
|
}
|
|
1658
|
-
declare const CircleProgress: FunctionComponent<CircleProgressProps & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1624
|
+
declare const CircleProgress: FunctionComponent<CircleProgressProps & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'color'>>;
|
|
1659
1625
|
|
|
1660
1626
|
interface CollapseProps {
|
|
1661
1627
|
className: string;
|