@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/dist/style.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.0-alpha.3 Fri Apr 28 2023 15:58:08 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.4 Fri May 05 2023 16:13:01 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -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-disabled-color: var(--nutui-input-disabled-color, #c8c9cc) !default;
474
- $input-required-color: var(
475
- --nutui-input-required-color,
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-unactive-color: var(
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-item-text-font-size: var(
885
- --nutui-tabbar-item-text-font-size,
881
+ $tabbar-text-font-size: var(
882
+ --nutui-tabbar-text-font-size,
886
883
  $font-size-0
887
884
  ) !default;
888
- $tabbar-item-text-line-height: var(
889
- --nutui-tabbar-item-text-line-height,
890
- 20px
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-word-margin-top: var(--nutui-tabbar-word-margin-top, 3px) !default;
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-disabled-color: var(--nutui-input-disabled-color, #c8c9cc) !default;
458
- $input-required-color: var(
459
- --nutui-input-required-color,
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-unactive-color: var(
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-item-text-font-size: var(
872
- --nutui-tabbar-item-text-font-size,
868
+ $tabbar-text-font-size: var(
869
+ --nutui-tabbar-text-font-size,
873
870
  $font-size-0
874
871
  ) !default;
875
- $tabbar-item-text-line-height: var(
876
- --nutui-tabbar-item-text-line-height,
877
- 20px
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-word-margin-top: var(--nutui-tabbar-word-margin-top, 3px) !default;
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(
@@ -381,36 +381,40 @@ type SubSideNavBarProps = {
381
381
  };
382
382
  declare const SubSideNavBar: FunctionComponent<SubSideNavBarProps>;
383
383
 
384
- interface TabbarProps {
385
- visible: number | string;
386
- activeVisible?: number | string;
387
- bottom: boolean;
388
- size: string | number;
389
- unactiveColor: string;
390
- activeColor: string;
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 Tabbar: FunctionComponent<Partial<TabbarProps>>;
392
+ declare const Badge: FunctionComponent<Partial<BadgeProps>>;
398
393
 
399
- interface TabbarItemProps extends BasicComponent {
400
- dot: boolean;
401
- className: string;
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
- unactiveColor: string;
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 InputRule = {
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: any;
822
+ defaultValue?: string;
823
+ value?: string;
823
824
  placeholder: string;
824
- label: string;
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
- readonly: boolean;
834
- error: boolean;
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
- rules: Array<InputRule>;
844
- errorMessage: string;
845
- errorMessageAlign: InputAlignType;
846
- rows: string | number;
847
- showWordLimit: boolean;
848
- autofocus: boolean;
849
- style?: CSSProperties;
850
- className?: string;
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: FunctionComponent<Partial<InputProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onBlur' | 'onFocus' | 'onClick'>>;
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
- progress: string | number;
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' | undefined;
1653
- circleColor?: object | string;
1654
- pathColor?: string;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react",
3
- "version": "2.0.0-alpha.3",
3
+ "version": "2.0.0-alpha.4",
4
4
  "style": "dist/style.css",
5
5
  "main": "dist/nutui.react.umd.js",
6
6
  "module": "dist/esm/nutui-react.es.js",