@foxford/ui 2.4.3 → 2.5.0-beta-e62c2f8-20230622

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/dts/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import * as styled_components from 'styled-components';
3
3
  import { DefaultTheme, FlattenSimpleInterpolation, CSSObject, SimpleInterpolation, css } from 'styled-components';
4
- import * as react from 'react';
5
- import { PureComponent, Component } from 'react';
6
4
  import { Link, NavLink } from 'react-router-dom';
7
- import { ResponsiveProperty as ResponsiveProperty$1, ResponsiveNamedProperty as ResponsiveNamedProperty$1 } from 'mixins/responsive-property';
8
- import { BaseProps as BaseProps$1, Nullable as Nullable$1, FontWeight as FontWeight$1 } from 'shared/interfaces';
9
5
  import { Display as Display$1 } from 'mixins/display';
6
+ import { ResponsiveNamedProperty as ResponsiveNamedProperty$1, ResponsiveProperty as ResponsiveProperty$1 } from 'mixins/responsive-property';
10
7
  import { Color as Color$1 } from 'mixins/color';
11
8
  import { Anchor as Anchor$1 } from 'components/Anchor';
9
+ import { BaseProps as BaseProps$1, Nullable as Nullable$1, FontWeight as FontWeight$1 } from 'shared/interfaces';
10
+ import * as react from 'react';
11
+ import { Component, PureComponent } from 'react';
12
12
  import { Classes } from 'react-modal';
13
13
  import * as rc_scrollbars_lib_Scrollbars_types from 'rc-scrollbars/lib/Scrollbars/types';
14
14
  import * as rc_scrollbars from 'rc-scrollbars';
@@ -206,7 +206,8 @@ declare enum ColorNames {
206
206
  grey = "grey",
207
207
  darkgrey = "darkgrey",
208
208
  lightgrey = "lightgrey",
209
- superlightgrey = "superlightgrey"
209
+ superlightgrey = "superlightgrey",
210
+ transparent = "rgba(0,0,0,0)"
210
211
  }
211
212
 
212
213
  declare type ColorPropsProperties = 'color' | 'fontColor' | `${string}Color` | `color${string}`;
@@ -575,181 +576,6 @@ declare namespace ActionBtn {
575
576
  var displayName: string;
576
577
  }
577
578
 
578
- declare enum CurrencyCodes {
579
- ALL = "ALL",
580
- AFN = "AFN",
581
- ARS = "ARS",
582
- AWG = "AWG",
583
- AUD = "AUD",
584
- AZN = "AZN",
585
- BSD = "BSD",
586
- BBD = "BBD",
587
- BYR = "BYR",
588
- BZD = "BZD",
589
- BMD = "BMD",
590
- BOB = "BOB",
591
- BAM = "BAM",
592
- BWP = "BWP",
593
- BGN = "BGN",
594
- BRL = "BRL",
595
- BND = "BND",
596
- KHR = "KHR",
597
- CAD = "CAD",
598
- KYD = "KYD",
599
- CLP = "CLP",
600
- CNY = "CNY",
601
- COP = "COP",
602
- CRC = "CRC",
603
- HRK = "HRK",
604
- CUP = "CUP",
605
- CZK = "CZK",
606
- DKK = "DKK",
607
- DOP = "DOP",
608
- XCD = "XCD",
609
- EGP = "EGP",
610
- SVC = "SVC",
611
- EEK = "EEK",
612
- EUR = "EUR",
613
- FKP = "FKP",
614
- FJD = "FJD",
615
- FRF = "FRF",
616
- GHC = "GHC",
617
- GIP = "GIP",
618
- GTQ = "GTQ",
619
- GGP = "GGP",
620
- GYD = "GYD",
621
- HNL = "HNL",
622
- HKD = "HKD",
623
- HUF = "HUF",
624
- ISK = "ISK",
625
- INR = "INR",
626
- IDR = "IDR",
627
- IRR = "IRR",
628
- IMP = "IMP",
629
- ILS = "ILS",
630
- JMD = "JMD",
631
- JPY = "JPY",
632
- JEP = "JEP",
633
- KZT = "KZT",
634
- KGS = "KGS",
635
- LAK = "LAK",
636
- LVL = "LVL",
637
- LBP = "LBP",
638
- LRD = "LRD",
639
- LTL = "LTL",
640
- MKD = "MKD",
641
- MYR = "MYR",
642
- MUR = "MUR",
643
- MXN = "MXN",
644
- MNT = "MNT",
645
- MZN = "MZN",
646
- NAD = "NAD",
647
- NPR = "NPR",
648
- ANG = "ANG",
649
- NZD = "NZD",
650
- NIO = "NIO",
651
- NGN = "NGN",
652
- KPW = "KPW",
653
- NOK = "NOK",
654
- OMR = "OMR",
655
- PKR = "PKR",
656
- PAB = "PAB",
657
- PYG = "PYG",
658
- PEN = "PEN",
659
- PHP = "PHP",
660
- PLN = "PLN",
661
- QAR = "QAR",
662
- RON = "RON",
663
- RUR = "RUR",
664
- RUB = "RUB",
665
- SHP = "SHP",
666
- SAR = "SAR",
667
- RSD = "RSD",
668
- SCR = "SCR",
669
- SGD = "SGD",
670
- SBD = "SBD",
671
- SOS = "SOS",
672
- ZAR = "ZAR",
673
- KRW = "KRW",
674
- LKR = "LKR",
675
- SEK = "SEK",
676
- CHF = "CHF",
677
- SRD = "SRD",
678
- SYP = "SYP",
679
- TWD = "TWD",
680
- THB = "THB",
681
- TTD = "TTD",
682
- TRY = "TRY",
683
- TRL = "TRL",
684
- TVD = "TVD",
685
- UAH = "UAH",
686
- GBP = "GBP",
687
- USD = "USD",
688
- UYU = "UYU",
689
- UZS = "UZS",
690
- VEF = "VEF",
691
- VND = "VND",
692
- YER = "YER",
693
- ZWD = "ZWD"
694
- }
695
- declare const CURRENCY_MAP: Readonly<Record<CurrencyCodes, string>>;
696
-
697
- interface AmountProps extends BaseProps, Color, ResponsiveNamedProperty<'size'>, Display {
698
- /**
699
- * Value for amount
700
- */
701
- value?: number;
702
- /**
703
- * Digits after point
704
- */
705
- digitsAfterPoint?: number;
706
- /**
707
- * Show zero minor part
708
- */
709
- showZeroMinorPart?: boolean;
710
- /**
711
- * Separator of major and minor part of amount
712
- */
713
- separator?: string;
714
- /**
715
- * International code of currency.
716
- */
717
- currency?: keyof typeof CurrencyCodes | string;
718
- /**
719
- * Use Header component for display amount
720
- */
721
- isHeader?: boolean;
722
- /**
723
- * Amount is not valid and will be crossed out with ```text-decoration: line-through```
724
- */
725
- crossedOut?: boolean;
726
- /**
727
- * If need only currency symbol
728
- */
729
- onlyCurrency?: boolean;
730
- }
731
- /**
732
- * Расширен:
733
- * - [`BaseProps`](#/Миксины)
734
- * - [`Color`](#/Миксины)
735
- * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
736
- */
737
- declare class Amount extends PureComponent<AmountProps> {
738
- static displayName: string;
739
- static defaultProps: {
740
- isHeader: boolean;
741
- showZeroMinorPart: boolean;
742
- crossedOut: boolean;
743
- digitsAfterPoint: number;
744
- separator: string;
745
- onlyCurrency: boolean;
746
- };
747
- static getCurrencySymbol(currencyCode: keyof typeof CurrencyCodes | string): any;
748
- renderMinorPart(minorPart: string): JSX.Element | null;
749
- renderCurrencySymbol: (currencySymbol: string) => JSX.Element;
750
- render(): JSX.Element;
751
- }
752
-
753
579
  interface AnchorProps extends BaseProps, Color, ResponsiveNamedProperty<'size'>, Display {
754
580
  /**
755
581
  * Custom CSS class name
@@ -812,74 +638,82 @@ declare namespace Anchor {
812
638
  };
813
639
  }
814
640
 
815
- declare type ArrowStaticSize = 'l' | 'm' | 'xs';
816
- declare type ArrowSize = ArrowStaticSize | ResponsiveProperty$1<`${number}rem` | number>;
817
- interface ArrowProps extends BaseProps$1 {
818
- /** Square shape */
819
- square?: boolean;
820
- /** Used on colored background */
821
- onColored?: boolean;
822
- /** Size of button */
823
- size?: ArrowSize;
824
- /** Arrow points top */
825
- top?: boolean;
826
- /** Arrow points right */
827
- right?: boolean;
828
- /** Arrow points bottom */
829
- bottom?: boolean;
830
- /** Arrow points left */
831
- left?: boolean;
832
- /** Inverted colors */
833
- inverse?: boolean;
834
- /** Outlined appearance */
835
- outline?: boolean;
641
+ declare type ButtonStaticSize = 'l' | 'm' | 's' | 'xs';
642
+ declare type ButtonSize = ButtonStaticSize | ResponsiveProperty$1<`${number}rem` | number>;
643
+ interface ButtonProps extends BaseProps$1, Display$1, Color$1, Color$1<'fontColor'>, ResponsiveNamedProperty$1<'padding'>, ResponsiveNamedProperty$1<'paddingTop'>, ResponsiveNamedProperty$1<'paddingRight'>, ResponsiveNamedProperty$1<'paddingBottom'>, ResponsiveNamedProperty$1<'paddingLeft'>, ResponsiveNamedProperty$1<'margin'>, ResponsiveNamedProperty$1<'marginTop'>, ResponsiveNamedProperty$1<'marginRight'>, ResponsiveNamedProperty$1<'marginBottom'>, ResponsiveNamedProperty$1<'marginLeft'>, ResponsiveNamedProperty$1<'fontSize'>, ResponsiveNamedProperty$1<'fluid', boolean>, ResponsiveNamedProperty$1<'width', 'auto' | 'l' | 'm' | 's' | 'xs' | number>, ResponsiveNamedProperty$1<'height', 'l' | 'm' | 's' | 'xs' | number> {
644
+ /** Root node polymorphic type */
645
+ as?: 'div' | 'span' | 'a' | 'button' | typeof Link | typeof Anchor$1;
646
+ /** Button size */
647
+ size?: ButtonSize;
648
+ /** Button type attribute */
649
+ type?: 'button' | 'submit' | 'reset';
650
+ /** Button icons */
651
+ icon?: JSX.Element | [Nullable$1<JSX.Element>, Nullable$1<JSX.Element>];
652
+ /** Button success state */
653
+ success?: boolean;
654
+ /** Loading state */
655
+ loading?: boolean;
836
656
  /** Button disabled */
837
657
  disabled?: boolean;
838
- /** Click handler */
839
- onClick?(event: React.MouseEvent<HTMLButtonElement>): void;
840
- }
841
-
842
- /**
843
- * Button with arrow icon
844
- */
845
- declare const Arrow: react.ForwardRefExoticComponent<ArrowProps & react.RefAttributes<HTMLButtonElement>>;
846
-
847
- interface AvatarProps extends BaseProps, Color {
658
+ /** Rounded border radius */
659
+ rounded?: boolean;
660
+ /** Rounded shape button */
661
+ round?: boolean;
662
+ /** Anchor target attribute */
663
+ target?: string;
664
+ /** Anchor rel attribute */
665
+ rel?: string;
666
+ /** Auto-generate rel. You must specify domain inside theme */
667
+ autoRel?: boolean;
668
+ /** Anchor href attribute */
669
+ href?: string;
670
+ /** React router Link to prop */
671
+ to?: string;
848
672
  /**
849
- * Children react node
673
+ * Indicates if there should not be any margin
674
+ * between this button and the previous one
850
675
  */
851
- children?: React.ReactNode;
852
- /** Title for avatar. Example user name. */
853
- title?: string;
854
- /** Image source */
855
- src?: string;
856
- /** Size of avatar */
857
- size?: 'l' | 'm' | 'sm' | 's' | 'xs' | number;
858
- /** Shadow of avatar */
859
- shadow?: boolean;
860
- /** Make ref func */
861
- ref?: React.LegacyRef<HTMLDivElement>;
862
- /**
863
- * Generate color by title automatically
864
- *
865
- * `Performance Info`: Each render of component call getAvatarColor function on received title
866
- */
867
- autoColor?: boolean;
676
+ noSpacing?: boolean;
677
+ /** Outline appearance */
678
+ outline?: boolean;
679
+ /** Content font weight */
680
+ fontWeight?: FontWeight$1;
681
+ /** Associated form */
682
+ form?: string;
683
+ /** @preset {Default} Primary appearance */
684
+ primary?: boolean;
685
+ /** @preset {Default} Secondary appearance */
686
+ secondary?: boolean;
687
+ /** @preset {Default} Inverted colors */
688
+ inverted?: boolean;
689
+ /** @preset {Brand} Base appearance */
690
+ base?: boolean;
691
+ /** @preset {Brand} Clear appearance */
692
+ clear?: boolean;
693
+ /** @preset {Brand} Black colors appearance */
694
+ black?: boolean;
695
+ /** @preset {Brand} Red colors appearance */
696
+ danger?: boolean;
697
+ /** @preset {Brand} Modifies appearance on colored background */
698
+ onColored?: boolean;
699
+ /** @deprecated Use outline */
700
+ basic?: boolean;
701
+ /** @deprecated Use children */
702
+ content?: React.ReactNode;
703
+ /** @deprecated Use ref */
704
+ innerRef?: React.LegacyRef<HTMLElement>;
705
+ /** Component's children */
706
+ children?: React.ReactNode | React.ReactNode[];
707
+ onClick?: (evt: React.SyntheticEvent<HTMLElement>) => void;
708
+ onClickCapture?: (evt: React.SyntheticEvent<HTMLElement>) => void;
709
+ onMouseEnter?: (evt: React.SyntheticEvent<HTMLElement>) => void;
710
+ onMouseLeave?: (evt: React.SyntheticEvent<HTMLElement>) => void;
868
711
  }
712
+
869
713
  /**
870
- * Расширен:
871
- * - [`BaseProps`](#/Миксины)
872
- * - [`Color`](#/Миксины)
714
+ * Main button
873
715
  */
874
- declare class Avatar extends PureComponent<AvatarProps> {
875
- static defaultProps: {
876
- size: string;
877
- autoColor: boolean;
878
- };
879
- static displayName: string;
880
- getAvatarText(): string;
881
- render(): JSX.Element;
882
- }
716
+ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLElement>>;
883
717
 
884
718
  declare enum H {
885
719
  h1 = 0,
@@ -991,103 +825,315 @@ declare namespace Text {
991
825
  var displayName: string;
992
826
  }
993
827
 
994
- interface BadgeProps extends BaseProps, Color, Display {
828
+ declare type AlertType = 'warning' | 'error' | 'info' | 'success';
829
+ interface AlertProps extends BaseProps {
995
830
  /**
996
831
  * Children react node
997
832
  */
998
833
  children?: React.ReactNode;
834
+ clear?: boolean;
835
+ closeToast?(): void;
999
836
  content?: string | React.ReactNode;
837
+ /** Icon name (for inner Icon component) */
838
+ customIcon?: keyof typeof IconNames;
839
+ image?: React.ReactNode;
840
+ isCompact?: boolean;
841
+ link?: {
842
+ content: string | React.ReactNode;
843
+ onClick(): void;
844
+ };
845
+ linkProps?: AnchorProps;
846
+ noIcon?: boolean;
847
+ onClickCancelTimer?(): void;
848
+ primaryAction?: {
849
+ content: string | React.ReactNode;
850
+ onClick(): void;
851
+ };
852
+ primaryActionProps?: ButtonProps;
853
+ secondaryAction?: {
854
+ content: string | React.ReactNode;
855
+ onClick(): void;
856
+ };
857
+ secondaryActionProps?: ButtonProps;
1000
858
  textProps?: TextProps;
1001
- /** Make badge round */
1002
- round?: string;
859
+ timer?: number;
860
+ title?: string;
861
+ titleProps?: TextProps;
862
+ type: AlertType;
1003
863
  }
1004
864
  /**
1005
865
  * Расширен:
1006
866
  * - [`BaseProps`](#/Миксины)
1007
- * - [`Color`](#/Миксины)
1008
- * - [`Display`](#/Миксины)
1009
867
  */
1010
- declare function Badge({ children, content, className, textProps, round, display, ...restProps }: BadgeProps): JSX.Element;
1011
- declare namespace Badge {
868
+ declare function Alert({ primaryAction, primaryActionProps, secondaryAction, secondaryActionProps, children, className, clear, content, customIcon, image, isCompact, link, linkProps, noIcon, onClickCancelTimer, closeToast, style, textProps, timer, title, titleProps, type, }: AlertProps): JSX.Element;
869
+ declare namespace Alert {
1012
870
  var displayName: string;
1013
871
  }
1014
872
 
1015
- declare type ButtonStaticSize = 'l' | 'm' | 's' | 'xs';
1016
- declare type ButtonSize = ButtonStaticSize | ResponsiveProperty$1<`${number}rem` | number>;
1017
- interface ButtonProps extends BaseProps$1, Display$1, Color$1, Color$1<'fontColor'>, ResponsiveNamedProperty$1<'padding'>, ResponsiveNamedProperty$1<'paddingTop'>, ResponsiveNamedProperty$1<'paddingRight'>, ResponsiveNamedProperty$1<'paddingBottom'>, ResponsiveNamedProperty$1<'paddingLeft'>, ResponsiveNamedProperty$1<'margin'>, ResponsiveNamedProperty$1<'marginTop'>, ResponsiveNamedProperty$1<'marginRight'>, ResponsiveNamedProperty$1<'marginBottom'>, ResponsiveNamedProperty$1<'marginLeft'>, ResponsiveNamedProperty$1<'fontSize'>, ResponsiveNamedProperty$1<'fluid', boolean>, ResponsiveNamedProperty$1<'width', 'auto' | 'l' | 'm' | 's' | 'xs' | number>, ResponsiveNamedProperty$1<'height', 'l' | 'm' | 's' | 'xs' | number> {
1018
- /** Root node polymorphic type */
1019
- as?: 'div' | 'span' | 'a' | 'button' | typeof Link | typeof Anchor$1;
1020
- /** Button size */
1021
- size?: ButtonSize;
1022
- /** Button type attribute */
1023
- type?: 'button' | 'submit' | 'reset';
1024
- /** Button icons */
1025
- icon?: JSX.Element | [Nullable$1<JSX.Element>, Nullable$1<JSX.Element>];
1026
- /** Button success state */
1027
- success?: boolean;
1028
- /** Loading state */
1029
- loading?: boolean;
873
+ declare enum CurrencyCodes {
874
+ ALL = "ALL",
875
+ AFN = "AFN",
876
+ ARS = "ARS",
877
+ AWG = "AWG",
878
+ AUD = "AUD",
879
+ AZN = "AZN",
880
+ BSD = "BSD",
881
+ BBD = "BBD",
882
+ BYR = "BYR",
883
+ BZD = "BZD",
884
+ BMD = "BMD",
885
+ BOB = "BOB",
886
+ BAM = "BAM",
887
+ BWP = "BWP",
888
+ BGN = "BGN",
889
+ BRL = "BRL",
890
+ BND = "BND",
891
+ KHR = "KHR",
892
+ CAD = "CAD",
893
+ KYD = "KYD",
894
+ CLP = "CLP",
895
+ CNY = "CNY",
896
+ COP = "COP",
897
+ CRC = "CRC",
898
+ HRK = "HRK",
899
+ CUP = "CUP",
900
+ CZK = "CZK",
901
+ DKK = "DKK",
902
+ DOP = "DOP",
903
+ XCD = "XCD",
904
+ EGP = "EGP",
905
+ SVC = "SVC",
906
+ EEK = "EEK",
907
+ EUR = "EUR",
908
+ FKP = "FKP",
909
+ FJD = "FJD",
910
+ FRF = "FRF",
911
+ GHC = "GHC",
912
+ GIP = "GIP",
913
+ GTQ = "GTQ",
914
+ GGP = "GGP",
915
+ GYD = "GYD",
916
+ HNL = "HNL",
917
+ HKD = "HKD",
918
+ HUF = "HUF",
919
+ ISK = "ISK",
920
+ INR = "INR",
921
+ IDR = "IDR",
922
+ IRR = "IRR",
923
+ IMP = "IMP",
924
+ ILS = "ILS",
925
+ JMD = "JMD",
926
+ JPY = "JPY",
927
+ JEP = "JEP",
928
+ KZT = "KZT",
929
+ KGS = "KGS",
930
+ LAK = "LAK",
931
+ LVL = "LVL",
932
+ LBP = "LBP",
933
+ LRD = "LRD",
934
+ LTL = "LTL",
935
+ MKD = "MKD",
936
+ MYR = "MYR",
937
+ MUR = "MUR",
938
+ MXN = "MXN",
939
+ MNT = "MNT",
940
+ MZN = "MZN",
941
+ NAD = "NAD",
942
+ NPR = "NPR",
943
+ ANG = "ANG",
944
+ NZD = "NZD",
945
+ NIO = "NIO",
946
+ NGN = "NGN",
947
+ KPW = "KPW",
948
+ NOK = "NOK",
949
+ OMR = "OMR",
950
+ PKR = "PKR",
951
+ PAB = "PAB",
952
+ PYG = "PYG",
953
+ PEN = "PEN",
954
+ PHP = "PHP",
955
+ PLN = "PLN",
956
+ QAR = "QAR",
957
+ RON = "RON",
958
+ RUR = "RUR",
959
+ RUB = "RUB",
960
+ SHP = "SHP",
961
+ SAR = "SAR",
962
+ RSD = "RSD",
963
+ SCR = "SCR",
964
+ SGD = "SGD",
965
+ SBD = "SBD",
966
+ SOS = "SOS",
967
+ ZAR = "ZAR",
968
+ KRW = "KRW",
969
+ LKR = "LKR",
970
+ SEK = "SEK",
971
+ CHF = "CHF",
972
+ SRD = "SRD",
973
+ SYP = "SYP",
974
+ TWD = "TWD",
975
+ THB = "THB",
976
+ TTD = "TTD",
977
+ TRY = "TRY",
978
+ TRL = "TRL",
979
+ TVD = "TVD",
980
+ UAH = "UAH",
981
+ GBP = "GBP",
982
+ USD = "USD",
983
+ UYU = "UYU",
984
+ UZS = "UZS",
985
+ VEF = "VEF",
986
+ VND = "VND",
987
+ YER = "YER",
988
+ ZWD = "ZWD"
989
+ }
990
+ declare const CURRENCY_MAP: Readonly<Record<CurrencyCodes, string>>;
991
+
992
+ interface AmountProps extends BaseProps, Color, ResponsiveNamedProperty<'size'>, Display {
993
+ /**
994
+ * Value for amount
995
+ */
996
+ value?: number;
997
+ /**
998
+ * Digits after point
999
+ */
1000
+ digitsAfterPoint?: number;
1001
+ /**
1002
+ * Show zero minor part
1003
+ */
1004
+ showZeroMinorPart?: boolean;
1005
+ /**
1006
+ * Separator of major and minor part of amount
1007
+ */
1008
+ separator?: string;
1009
+ /**
1010
+ * International code of currency.
1011
+ */
1012
+ currency?: keyof typeof CurrencyCodes | string;
1013
+ /**
1014
+ * Use Header component for display amount
1015
+ */
1016
+ isHeader?: boolean;
1017
+ /**
1018
+ * Amount is not valid and will be crossed out with ```text-decoration: line-through```
1019
+ */
1020
+ crossedOut?: boolean;
1021
+ /**
1022
+ * If need only currency symbol
1023
+ */
1024
+ onlyCurrency?: boolean;
1025
+ }
1026
+ /**
1027
+ * Расширен:
1028
+ * - [`BaseProps`](#/Миксины)
1029
+ * - [`Color`](#/Миксины)
1030
+ * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
1031
+ */
1032
+ declare class Amount extends PureComponent<AmountProps> {
1033
+ static displayName: string;
1034
+ static defaultProps: {
1035
+ isHeader: boolean;
1036
+ showZeroMinorPart: boolean;
1037
+ crossedOut: boolean;
1038
+ digitsAfterPoint: number;
1039
+ separator: string;
1040
+ onlyCurrency: boolean;
1041
+ };
1042
+ static getCurrencySymbol(currencyCode: keyof typeof CurrencyCodes | string): any;
1043
+ renderMinorPart(minorPart: string): JSX.Element | null;
1044
+ renderCurrencySymbol: (currencySymbol: string) => JSX.Element;
1045
+ render(): JSX.Element;
1046
+ }
1047
+
1048
+ declare type ArrowStaticSize = 'l' | 'm' | 'xs';
1049
+ declare type ArrowSize = ArrowStaticSize | ResponsiveProperty$1<`${number}rem` | number>;
1050
+ interface ArrowProps extends BaseProps$1 {
1051
+ /** Square shape */
1052
+ square?: boolean;
1053
+ /** Used on colored background */
1054
+ onColored?: boolean;
1055
+ /** Size of button */
1056
+ size?: ArrowSize;
1057
+ /** Arrow points top */
1058
+ top?: boolean;
1059
+ /** Arrow points right */
1060
+ right?: boolean;
1061
+ /** Arrow points bottom */
1062
+ bottom?: boolean;
1063
+ /** Arrow points left */
1064
+ left?: boolean;
1065
+ /** Inverted colors */
1066
+ inverse?: boolean;
1067
+ /** Outlined appearance */
1068
+ outline?: boolean;
1030
1069
  /** Button disabled */
1031
1070
  disabled?: boolean;
1032
- /** Rounded border radius */
1033
- rounded?: boolean;
1034
- /** Rounded shape button */
1035
- round?: boolean;
1036
- /** Anchor target attribute */
1037
- target?: string;
1038
- /** Anchor rel attribute */
1039
- rel?: string;
1040
- /** Auto-generate rel. You must specify domain inside theme */
1041
- autoRel?: boolean;
1042
- /** Anchor href attribute */
1043
- href?: string;
1044
- /** React router Link to prop */
1045
- to?: string;
1071
+ /** Click handler */
1072
+ onClick?(event: React.MouseEvent<HTMLButtonElement>): void;
1073
+ }
1074
+
1075
+ /**
1076
+ * Button with arrow icon
1077
+ */
1078
+ declare const Arrow: react.ForwardRefExoticComponent<ArrowProps & react.RefAttributes<HTMLButtonElement>>;
1079
+
1080
+ interface AvatarProps extends BaseProps, Color {
1046
1081
  /**
1047
- * Indicates if there should not be any margin
1048
- * between this button and the previous one
1082
+ * Children react node
1049
1083
  */
1050
- noSpacing?: boolean;
1051
- /** Outline appearance */
1052
- outline?: boolean;
1053
- /** Content font weight */
1054
- fontWeight?: FontWeight$1;
1055
- /** Associated form */
1056
- form?: string;
1057
- /** @preset {Default} Primary appearance */
1058
- primary?: boolean;
1059
- /** @preset {Default} Secondary appearance */
1060
- secondary?: boolean;
1061
- /** @preset {Default} Inverted colors */
1062
- inverted?: boolean;
1063
- /** @preset {Brand} Base appearance */
1064
- base?: boolean;
1065
- /** @preset {Brand} Clear appearance */
1066
- clear?: boolean;
1067
- /** @preset {Brand} Black colors appearance */
1068
- black?: boolean;
1069
- /** @preset {Brand} Red colors appearance */
1070
- danger?: boolean;
1071
- /** @preset {Brand} Modifies appearance on colored background */
1072
- onColored?: boolean;
1073
- /** @deprecated Use outline */
1074
- basic?: boolean;
1075
- /** @deprecated Use children */
1076
- content?: React.ReactNode;
1077
- /** @deprecated Use ref */
1078
- innerRef?: React.LegacyRef<HTMLElement>;
1079
- /** Component's children */
1080
- children?: React.ReactNode | React.ReactNode[];
1081
- onClick?: (evt: React.SyntheticEvent<HTMLElement>) => void;
1082
- onClickCapture?: (evt: React.SyntheticEvent<HTMLElement>) => void;
1083
- onMouseEnter?: (evt: React.SyntheticEvent<HTMLElement>) => void;
1084
- onMouseLeave?: (evt: React.SyntheticEvent<HTMLElement>) => void;
1084
+ children?: React.ReactNode;
1085
+ /** Title for avatar. Example user name. */
1086
+ title?: string;
1087
+ /** Image source */
1088
+ src?: string;
1089
+ /** Size of avatar */
1090
+ size?: 'l' | 'm' | 'sm' | 's' | 'xs' | number;
1091
+ /** Shadow of avatar */
1092
+ shadow?: boolean;
1093
+ /** Make ref func */
1094
+ ref?: React.LegacyRef<HTMLDivElement>;
1095
+ /**
1096
+ * Generate color by title automatically
1097
+ *
1098
+ * `Performance Info`: Each render of component call getAvatarColor function on received title
1099
+ */
1100
+ autoColor?: boolean;
1101
+ }
1102
+ /**
1103
+ * Расширен:
1104
+ * - [`BaseProps`](#/Миксины)
1105
+ * - [`Color`](#/Миксины)
1106
+ */
1107
+ declare class Avatar extends PureComponent<AvatarProps> {
1108
+ static defaultProps: {
1109
+ size: string;
1110
+ autoColor: boolean;
1111
+ };
1112
+ static displayName: string;
1113
+ getAvatarText(): string;
1114
+ render(): JSX.Element;
1085
1115
  }
1086
1116
 
1117
+ interface BadgeProps extends BaseProps, Color, Display {
1118
+ /**
1119
+ * Children react node
1120
+ */
1121
+ children?: React.ReactNode;
1122
+ content?: string | React.ReactNode;
1123
+ textProps?: TextProps;
1124
+ /** Make badge round */
1125
+ round?: string;
1126
+ }
1087
1127
  /**
1088
- * Main button
1128
+ * Расширен:
1129
+ * - [`BaseProps`](#/Миксины)
1130
+ * - [`Color`](#/Миксины)
1131
+ * - [`Display`](#/Миксины)
1089
1132
  */
1090
- declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLElement>>;
1133
+ declare function Badge({ children, content, className, textProps, round, display, ...restProps }: BadgeProps): JSX.Element;
1134
+ declare namespace Badge {
1135
+ var displayName: string;
1136
+ }
1091
1137
 
1092
1138
  interface ContainerProps extends BaseProps, Display, Color {
1093
1139
  /**
@@ -2501,4 +2547,4 @@ declare namespace Select {
2501
2547
  var displayName: string;
2502
2548
  }
2503
2549
 
2504
- export { ActionBtn, Amount, Anchor, Arrow, Avatar, Badge, BaseProps, Button, COUNTRY_DATA, CURRENCY_MAP, Checkbox, ColorNames, ComponentContext, Container, ContextMenu, CurrencyCodes, DEFAULT_MASK, FontWeight, HEX, INITIAL_MASK, Icon, Input, InputField, Modal, Nullable, Paper, Progress, RGB, RGBA, Radio, withThemeScrollable as Scrollable, Section, Select, Separator, Spacer, Spinner, Switcher, Tabs, Tag, Text, Textarea, ThemeMode, ThemeName, ThemePreset, ThemeProvider, Tooltip, adultDarkTheme, adultLightTheme, babyDarkTheme, babyLightTheme, baseInputStyle, buildMediaQuery, color, defaultIcons, desktopFirst, mobileFirst, motherDarkTheme, motherLightTheme, property, responsiveNamedProperty, responsiveProperty, screenL, screenM, screenMaxL, screenMaxM, screenMaxS, screenMaxXl, screenMaxXs, screenMaxXxs, screenMinL, screenMinM, screenMinS, screenMinXl, screenMinXs, screenRetina, screenS, screenXl, screenXs, teenDarkTheme, teenLightTheme, defaultTheme as theme, vAlign };
2550
+ export { ActionBtn, Alert, Amount, Anchor, Arrow, Avatar, Badge, BaseProps, Button, COUNTRY_DATA, CURRENCY_MAP, Checkbox, ColorNames, ComponentContext, Container, ContextMenu, CurrencyCodes, DEFAULT_MASK, FontWeight, HEX, INITIAL_MASK, Icon, Input, InputField, Modal, Nullable, Paper, Progress, RGB, RGBA, Radio, withThemeScrollable as Scrollable, Section, Select, Separator, Spacer, Spinner, Switcher, Tabs, Tag, Text, Textarea, ThemeMode, ThemeName, ThemePreset, ThemeProvider, Tooltip, adultDarkTheme, adultLightTheme, babyDarkTheme, babyLightTheme, baseInputStyle, buildMediaQuery, color, defaultIcons, desktopFirst, mobileFirst, motherDarkTheme, motherLightTheme, property, responsiveNamedProperty, responsiveProperty, screenL, screenM, screenMaxL, screenMaxM, screenMaxS, screenMaxXl, screenMaxXs, screenMaxXxs, screenMinL, screenMinM, screenMinS, screenMinXl, screenMinXs, screenRetina, screenS, screenXl, screenXs, teenDarkTheme, teenLightTheme, defaultTheme as theme, vAlign };