@foxford/ui 2.5.2-beta-1daba91-20230706 → 2.6.0-beta-a4621ec-20230707

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
@@ -2,13 +2,13 @@
2
2
  import * as styled_components from 'styled-components';
3
3
  import { DefaultTheme, FlattenSimpleInterpolation, CSSObject, SimpleInterpolation, css } from 'styled-components';
4
4
  import * as react from 'react';
5
- import { PureComponent, Component, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
5
+ import { Component, PureComponent, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
6
6
  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, InputField as InputField$1 } from 'shared/interfaces';
9
- import { Color as Color$1 } from 'mixins/color';
10
7
  import { Display as Display$1 } from 'mixins/display';
8
+ import { ResponsiveNamedProperty as ResponsiveNamedProperty$1, ResponsiveProperty as ResponsiveProperty$1 } from 'mixins/responsive-property';
9
+ import { Color as Color$1 } from 'mixins/color';
11
10
  import { Anchor as Anchor$1 } from 'components/Anchor';
11
+ import { BaseProps as BaseProps$1, Nullable as Nullable$1, FontWeight as FontWeight$1 } from 'shared/interfaces';
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}`;
@@ -327,7 +328,11 @@ interface InputField extends Color, Color<'placeholderColor'>, ResponsiveNamedPr
327
328
  */
328
329
  fluid?: boolean;
329
330
  /**
330
- * @preset {Default} Rounded style
331
+ * Children react node
332
+ */
333
+ children?: React.ReactNode;
334
+ /**
335
+ * Rounded style
331
336
  */
332
337
  rounded?: boolean;
333
338
  /**
@@ -570,6 +575,309 @@ declare namespace ActionBtn {
570
575
  var displayName: string;
571
576
  }
572
577
 
578
+ interface AnchorProps extends BaseProps, Color, ResponsiveNamedProperty<'size'>, Display {
579
+ /**
580
+ * Custom CSS class name
581
+ */
582
+ as?: 'div' | 'span' | 'a' | typeof Link;
583
+ /**
584
+ * React router link to
585
+ */
586
+ to?: string;
587
+ /**
588
+ * Link href
589
+ */
590
+ href?: string;
591
+ /**
592
+ * Is display inline
593
+ * */
594
+ wrapper?: boolean;
595
+ /**
596
+ * Pseudo link has dashed bottom border
597
+ * */
598
+ pseudo?: boolean;
599
+ /**
600
+ * If link should be underlined
601
+ * */
602
+ underline?: boolean;
603
+ /**
604
+ * Primary content
605
+ */
606
+ /**
607
+ * Children react node
608
+ */
609
+ children?: React.ReactNode;
610
+ /**
611
+ * Primary content
612
+ */
613
+ content?: string;
614
+ /**
615
+ * Onclick handler
616
+ */
617
+ onClick?: () => void;
618
+ tabIndex?: number;
619
+ target?: string;
620
+ rel?: string;
621
+ /**
622
+ * Auto-generate rel. You must specify domain inside theme
623
+ */
624
+ autoRel?: boolean;
625
+ }
626
+ /**
627
+ * Расширен:
628
+ * - [`BaseProps`](#/Миксины)
629
+ * - [`Color`](#/Миксины)
630
+ * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
631
+ * - [`Display`](#/Миксины)
632
+ */
633
+ declare function Anchor(props: typeof Anchor.defaultProps & AnchorProps): JSX.Element;
634
+ declare namespace Anchor {
635
+ var displayName: string;
636
+ var defaultProps: {
637
+ display: string;
638
+ };
639
+ }
640
+
641
+ declare type ButtonStaticSize = 'xl' | '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;
656
+ /** Button disabled */
657
+ disabled?: boolean;
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;
672
+ /**
673
+ * Indicates if there should not be any margin
674
+ * between this button and the previous one
675
+ */
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;
711
+ }
712
+
713
+ /**
714
+ * Main button
715
+ */
716
+ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLElement>>;
717
+
718
+ declare enum H {
719
+ h1 = 0,
720
+ h2 = 1,
721
+ h3 = 2,
722
+ h4 = 3
723
+ }
724
+ interface TextHeadingProps extends Omit<TextProps, 'content' | 'as'> {
725
+ h?: keyof typeof H;
726
+ /**
727
+ * Children react node
728
+ */
729
+ children?: React.ReactNode;
730
+ }
731
+ declare function TextHeading({ h, ...props }: TextHeadingProps): JSX.Element;
732
+ declare namespace TextHeading {
733
+ var displayName: string;
734
+ }
735
+
736
+ interface TextEllipseProps extends Omit<TextProps, 'content'> {
737
+ /** Toggle text for folded state */
738
+ moreText?: string;
739
+ /** Toggle text for unfolded state */
740
+ lessText?: string;
741
+ /** Classname */
742
+ className?: string;
743
+ /** Html content */
744
+ content: string | string[];
745
+ /** Characters quantity for ellipsed text */
746
+ chars?: number;
747
+ /** Wrap text in quotes */
748
+ quoted?: boolean;
749
+ /** Flag to show toggler */
750
+ showToggler?: boolean;
751
+ }
752
+ interface TextEllipseState {
753
+ isUnFolded: boolean;
754
+ isEllipsed: boolean;
755
+ }
756
+ /**
757
+ * Расширен:
758
+ * - [`BaseProps`](#/Миксины)
759
+ * - [`Color`](#/Миксины)
760
+ * - [`Display`](#/Миксины)
761
+ * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
762
+ */
763
+ declare class TextEllipse extends Component<TextEllipseProps, TextEllipseState> {
764
+ static displayName: string;
765
+ constructor(props: TextEllipseProps);
766
+ componentDidUpdate({ content }: TextEllipseProps): void;
767
+ getContent: (props: Omit<TextEllipseProps, 'className' | 'moreText' | 'lessText' | 'showToggler'>) => "" | JSX.Element;
768
+ getQuted: (content: string) => string;
769
+ toggle: () => void;
770
+ render(): JSX.Element;
771
+ }
772
+
773
+ interface TextProps extends BaseProps, Color, ResponsiveNamedProperty<'size'>, Display {
774
+ /**
775
+ * An element type to render as (string).
776
+ */
777
+ as?: 'div' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'p';
778
+ /**
779
+ * Primary content
780
+ */
781
+ content?: string;
782
+ /**
783
+ * Primary content
784
+ */
785
+ /**
786
+ * Children react node
787
+ */
788
+ children?: React.ReactNode;
789
+ /**
790
+ * Text font weight
791
+ */
792
+ weight?: 'lighter' | 'normal' | 'bold' | 'bolder' | number;
793
+ /**
794
+ * Text font style
795
+ */
796
+ fontStyle?: 'normal' | 'italic';
797
+ /**
798
+ * Add underline to inline links
799
+ */
800
+ underlineLinks?: boolean;
801
+ /**
802
+ * Text align
803
+ */
804
+ textAlign?: 'left' | 'center' | 'right' | 'justify' | 'start' | 'end';
805
+ /**
806
+ * Line height
807
+ */
808
+ lineHeight?: 'l' | 'm' | 's' | 'xs' | number;
809
+ /**
810
+ * Element title
811
+ */
812
+ title?: string;
813
+ }
814
+ /**
815
+ * Расширен:
816
+ * - [`BaseProps`](#/Миксины)
817
+ * - [`Color`](#/Миксины)
818
+ * - [`Display`](#/Миксины)
819
+ * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
820
+ */
821
+ declare function Text(props: TextProps): JSX.Element;
822
+ declare namespace Text {
823
+ var Heading: typeof TextHeading;
824
+ var Ellipse: typeof TextEllipse;
825
+ var displayName: string;
826
+ }
827
+
828
+ declare type AlertType = 'warning' | 'error' | 'info' | 'success';
829
+ interface AlertProps extends BaseProps {
830
+ /** Text of the timer cancellation button */
831
+ cancelTimerText: string | React.ReactNode;
832
+ /** Children react node */
833
+ children?: React.ReactNode;
834
+ /** Use a colorless background */
835
+ clear?: boolean;
836
+ /** This method is taken from react-toastify library */
837
+ closeToast?(): void;
838
+ content?: string | React.ReactNode;
839
+ /** Icon name (for inner Icon component) */
840
+ customIcon?: keyof typeof IconNames;
841
+ /** Any custom image (e.g.: img, svg, icon from @foxford/icon-pack) */
842
+ image?: React.ReactNode;
843
+ /** Use for tablet and mobile view */
844
+ isCompact?: boolean;
845
+ /** Display a hyperlink */
846
+ link?: {
847
+ content: string | React.ReactNode;
848
+ onClick(): void;
849
+ };
850
+ linkProps?: AnchorProps;
851
+ /** Use alert without icon */
852
+ noIcon?: boolean;
853
+ /** You can cancel the action if the timer has not expired yet */
854
+ onClickCancelTimer?(): void;
855
+ /** Display the action button */
856
+ primaryAction?: {
857
+ content: string | React.ReactNode;
858
+ onClick(): void;
859
+ };
860
+ primaryActionProps?: ButtonProps;
861
+ /** Display the second action button */
862
+ secondaryAction?: {
863
+ content: string | React.ReactNode;
864
+ onClick(): void;
865
+ };
866
+ secondaryActionProps?: ButtonProps;
867
+ /** Use it when you need to move text to another line in alerts without a title */
868
+ textProps?: TextProps;
869
+ textWrap?: boolean;
870
+ /** It is used in alerts with a timer. Pass the value in seconds */
871
+ timer?: number;
872
+ /** Display a title */
873
+ title?: string;
874
+ titleProps?: TextProps;
875
+ type?: AlertType;
876
+ width?: ResponsiveProperty;
877
+ }
878
+
879
+ declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
880
+
573
881
  declare enum CurrencyCodes {
574
882
  ALL = "ALL",
575
883
  AFN = "AFN",
@@ -745,68 +1053,6 @@ declare class Amount extends PureComponent<AmountProps> {
745
1053
  render(): JSX.Element;
746
1054
  }
747
1055
 
748
- interface AnchorProps extends BaseProps, Color, ResponsiveNamedProperty<'size'>, Display {
749
- /**
750
- * Custom CSS class name
751
- */
752
- as?: 'div' | 'span' | 'a' | typeof Link;
753
- /**
754
- * React router link to
755
- */
756
- to?: string;
757
- /**
758
- * Link href
759
- */
760
- href?: string;
761
- /**
762
- * Is display inline
763
- * */
764
- wrapper?: boolean;
765
- /**
766
- * Pseudo link has dashed bottom border
767
- * */
768
- pseudo?: boolean;
769
- /**
770
- * If link should be underlined
771
- * */
772
- underline?: boolean;
773
- /**
774
- * Primary content
775
- */
776
- /**
777
- * Children react node
778
- */
779
- children?: React.ReactNode;
780
- /**
781
- * Primary content
782
- */
783
- content?: string;
784
- /**
785
- * Onclick handler
786
- */
787
- onClick?: () => void;
788
- target?: string;
789
- rel?: string;
790
- /**
791
- * Auto-generate rel. You must specify domain inside theme
792
- */
793
- autoRel?: boolean;
794
- }
795
- /**
796
- * Расширен:
797
- * - [`BaseProps`](#/Миксины)
798
- * - [`Color`](#/Миксины)
799
- * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
800
- * - [`Display`](#/Миксины)
801
- */
802
- declare function Anchor(props: typeof Anchor.defaultProps & AnchorProps): JSX.Element;
803
- declare namespace Anchor {
804
- var displayName: string;
805
- var defaultProps: {
806
- display: string;
807
- };
808
- }
809
-
810
1056
  declare type ArrowStaticSize = 'l' | 'm' | 'xs';
811
1057
  declare type ArrowSize = ArrowStaticSize | ResponsiveProperty$1<`${number}rem` | number>;
812
1058
  interface ArrowProps extends BaseProps$1 {
@@ -876,84 +1122,6 @@ declare class Avatar extends PureComponent<AvatarProps> {
876
1122
  render(): JSX.Element;
877
1123
  }
878
1124
 
879
- declare type H = 'h1' | 'h2' | 'h3' | 'h4';
880
- interface TextHeadingProps extends Omit<TextProps, 'content' | 'as'> {
881
- /** Default set of size, lineHeight and weight props */
882
- h?: H;
883
- /** Children react node */
884
- children?: React.ReactNode;
885
- }
886
-
887
- interface TextEllipseProps extends Omit<TextProps, 'content'> {
888
- /** Toggle text for folded state */
889
- moreText?: string;
890
- /** Toggle text for unfolded state */
891
- lessText?: string;
892
- /** Classname */
893
- className?: string;
894
- /** Html content */
895
- content: string | string[];
896
- /** Characters quantity for ellipsed text */
897
- chars?: number;
898
- /** Wrap text in quotes */
899
- quoted?: boolean;
900
- /** Flag to show toggler */
901
- showToggler?: boolean;
902
- }
903
- interface TextEllipseState {
904
- isUnFolded: boolean;
905
- isEllipsed: boolean;
906
- }
907
- /**
908
- * Расширен:
909
- * - [`BaseProps`](#/Миксины)
910
- * - [`Color`](#/Миксины)
911
- * - [`Display`](#/Миксины)
912
- * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
913
- */
914
- declare class TextEllipse extends Component<TextEllipseProps, TextEllipseState> {
915
- static displayName: string;
916
- constructor(props: TextEllipseProps);
917
- componentDidUpdate({ content }: TextEllipseProps): void;
918
- getContent: (props: Omit<TextEllipseProps, 'className' | 'moreText' | 'lessText' | 'showToggler'>) => "" | JSX.Element;
919
- getQuted: (content: string) => string;
920
- toggle: () => void;
921
- render(): JSX.Element;
922
- }
923
-
924
- interface TextProps extends BaseProps$1, Color$1, ResponsiveNamedProperty$1<'size'>, Display$1 {
925
- /** An element type to render as (string) */
926
- as?: 'div' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'p';
927
- /** Primary content */
928
- content?: string;
929
- /** Children react node */
930
- children?: React.ReactNode;
931
- /** Text font weight */
932
- weight?: 'lighter' | 'normal' | 'bold' | 'bolder' | number;
933
- /** Text font style */
934
- fontStyle?: 'normal' | 'italic';
935
- /** Text font family */
936
- fontFamily?: string;
937
- /** Add underline to inline links */
938
- underlineLinks?: boolean;
939
- /** Text align */
940
- textAlign?: 'left' | 'center' | 'right' | 'justify' | 'start' | 'end';
941
- /** Line height */
942
- lineHeight?: 'l' | 'm' | 's' | 'xs' | number;
943
- /** Element title */
944
- title?: string;
945
- }
946
-
947
- declare const Text: {
948
- (props: TextProps): JSX.Element;
949
- Heading: {
950
- (props: TextHeadingProps): JSX.Element;
951
- displayName: string;
952
- };
953
- Ellipse: typeof TextEllipse;
954
- displayName: string;
955
- };
956
-
957
1125
  interface BadgeProps extends BaseProps, Color, Display {
958
1126
  /**
959
1127
  * Children react node
@@ -975,83 +1143,6 @@ declare namespace Badge {
975
1143
  var displayName: string;
976
1144
  }
977
1145
 
978
- declare type ButtonStaticSize = 'xl' | 'l' | 'm' | 's' | 'xs';
979
- declare type ButtonSize = ButtonStaticSize | ResponsiveProperty$1<`${number}rem` | number>;
980
- 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> {
981
- /** Root node polymorphic type */
982
- as?: 'div' | 'span' | 'a' | 'button' | typeof Link | typeof Anchor$1;
983
- /** Button size */
984
- size?: ButtonSize;
985
- /** Button type attribute */
986
- type?: 'button' | 'submit' | 'reset';
987
- /** Button icons */
988
- icon?: JSX.Element | [Nullable$1<JSX.Element>, Nullable$1<JSX.Element>];
989
- /** Button success state */
990
- success?: boolean;
991
- /** Loading state */
992
- loading?: boolean;
993
- /** Button disabled */
994
- disabled?: boolean;
995
- /** Rounded border radius */
996
- rounded?: boolean;
997
- /** Rounded shape button */
998
- round?: boolean;
999
- /** Anchor target attribute */
1000
- target?: string;
1001
- /** Anchor rel attribute */
1002
- rel?: string;
1003
- /** Auto-generate rel. You must specify domain inside theme */
1004
- autoRel?: boolean;
1005
- /** Anchor href attribute */
1006
- href?: string;
1007
- /** React router Link to prop */
1008
- to?: string;
1009
- /**
1010
- * Indicates if there should not be any margin
1011
- * between this button and the previous one
1012
- */
1013
- noSpacing?: boolean;
1014
- /** Outline appearance */
1015
- outline?: boolean;
1016
- /** Content font weight */
1017
- fontWeight?: FontWeight$1;
1018
- /** Associated form */
1019
- form?: string;
1020
- /** @preset {Default} Primary appearance */
1021
- primary?: boolean;
1022
- /** @preset {Default} Secondary appearance */
1023
- secondary?: boolean;
1024
- /** @preset {Default} Inverted colors */
1025
- inverted?: boolean;
1026
- /** @preset {Brand} Base appearance */
1027
- base?: boolean;
1028
- /** @preset {Brand} Clear appearance */
1029
- clear?: boolean;
1030
- /** @preset {Brand} Black colors appearance */
1031
- black?: boolean;
1032
- /** @preset {Brand} Red colors appearance */
1033
- danger?: boolean;
1034
- /** @preset {Brand} Modifies appearance on colored background */
1035
- onColored?: boolean;
1036
- /** @deprecated Use outline */
1037
- basic?: boolean;
1038
- /** @deprecated Use children */
1039
- content?: React.ReactNode;
1040
- /** @deprecated Use ref */
1041
- innerRef?: React.LegacyRef<HTMLElement>;
1042
- /** Component's children */
1043
- children?: React.ReactNode | React.ReactNode[];
1044
- onClick?: (evt: React.SyntheticEvent<HTMLElement>) => void;
1045
- onClickCapture?: (evt: React.SyntheticEvent<HTMLElement>) => void;
1046
- onMouseEnter?: (evt: React.SyntheticEvent<HTMLElement>) => void;
1047
- onMouseLeave?: (evt: React.SyntheticEvent<HTMLElement>) => void;
1048
- }
1049
-
1050
- /**
1051
- * Main button
1052
- */
1053
- declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLElement>>;
1054
-
1055
1146
  interface ContainerProps extends BaseProps, Display, Color {
1056
1147
  /**
1057
1148
  * Primary content
@@ -2106,27 +2197,56 @@ declare class ContextMenu extends PureComponent<ContextMenuProps, {
2106
2197
  }
2107
2198
 
2108
2199
  declare type TextAreaHTMLAttributes = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'cols' | 'rows' | 'color'>;
2109
- interface TextareaProps extends BaseProps$1, InputField$1, TextAreaHTMLAttributes {
2110
- /** Specifies the visible width of a text area */
2200
+ interface TextareaProps extends BaseProps, InputField, TextAreaHTMLAttributes {
2201
+ /**
2202
+ * Specifies the visible width of a text area
2203
+ */
2111
2204
  cols?: number;
2112
- /** Specifies the visible number of lines in a text area */
2205
+ /**
2206
+ * Specifies the visible number of lines in a text area
2207
+ */
2113
2208
  rows?: number;
2114
- /** Specifies the visible max number of lines in a text area */
2209
+ /**
2210
+ * Specifies the visible max number of lines in a text area
2211
+ */
2115
2212
  maxRows?: number;
2116
- /** Specifies the maximum number of characters allowed in the text area */
2213
+ /**
2214
+ * Specifies the maximum number of characters allowed in the text area
2215
+ */
2117
2216
  maxLength?: number;
2118
- /** On change handler */
2217
+ /**
2218
+ * On change handler
2219
+ */
2119
2220
  onChange?(_event: React.ChangeEvent<HTMLTextAreaElement>): void;
2120
- /** Value */
2221
+ /**
2222
+ * Value
2223
+ */
2121
2224
  value?: string;
2122
- /** Autosize for textarea */
2225
+ /**
2226
+ * Autosize for textarea
2227
+ */
2123
2228
  autosize?: boolean;
2124
2229
  }
2125
-
2126
- declare const Textarea: {
2127
- (props: TextareaProps): JSX.Element;
2128
- displayName: string;
2129
- };
2230
+ /**
2231
+ * Расширен:
2232
+ * - [`BaseProps`](#/Миксины)
2233
+ * - [`InputField`](#/Миксины)
2234
+ * - `React.TextareaHTMLAttributes<HTMLTextAreaElement>`
2235
+ */
2236
+ declare function Textarea({ cols, disabled, error, fluid, name, onChange, maxLength, placeholder, required, rounded, rows, tabIndex, value, className, style, children, autosize, maxRows, color, placeholderColor, ...props }: typeof Textarea.defaultProps & TextareaProps): JSX.Element;
2237
+ declare namespace Textarea {
2238
+ var defaultProps: {
2239
+ onChange: (e: react.ChangeEvent<HTMLTextAreaElement>) => void;
2240
+ rounded: boolean;
2241
+ color: string;
2242
+ placeholderColor: string;
2243
+ cols: number;
2244
+ maxRows: number;
2245
+ rows: number;
2246
+ autosize: boolean;
2247
+ };
2248
+ var displayName: string;
2249
+ }
2130
2250
 
2131
2251
  interface InputPhoneProps extends InputProps {
2132
2252
  /**
@@ -2400,4 +2520,4 @@ declare namespace Select {
2400
2520
  var displayName: string;
2401
2521
  }
2402
2522
 
2403
- export { ActionBtn, Amount, Anchor, Arrow, Avatar, Badge, BaseProps, Button, COUNTRY_DATA, CURRENCY_MAP, Checkbox, ColorNames, 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 };
2523
+ export { ActionBtn, Alert, Amount, Anchor, Arrow, Avatar, Badge, BaseProps, Button, COUNTRY_DATA, CURRENCY_MAP, Checkbox, ColorNames, 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 };
@@ -1,2 +1,2 @@
1
- import e from'@babel/runtime/helpers/objectSpread2';import{useMemo as r}from'react';function t(t,n){return r((()=>{var r=null!=t?t:{};var u=null!=n?n:{};return[...new Set([...Object.keys(r),...Object.keys(u)])].reduce(((t,n)=>{var a;return o(r[n])&&(a=r[n]),o(u[n])&&(a=u[n]),o(a)?e(e({},t),{},{[n]:a}):t}),{})}),[t,n])}function o(e){return Boolean(e)||'boolean'==typeof e||'number'==typeof e||'string'==typeof e}export{t as useConfigPriority};
1
+ import e from'@babel/runtime/helpers/objectSpread2';import{useMemo as r}from'react';function t(t,n){return r((()=>{var r=null!=t?t:{};var u=null!=n?n:{};return[...new Set([...Object.keys(r),...Object.keys(u)])].reduce(((t,n)=>{var a;return o(r[n])&&(a=r[n]),o(u[n])&&(a=u[n]),o(a)?e(e({},t),{},{[n]:a}):t}),{})}),[t,n])}function o(e){return Boolean(e)||'boolean'==typeof e||'number'==typeof e}export{t as useConfigPriority};
2
2
  //# sourceMappingURL=use-config-priority.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-config-priority.js","sources":["../../../src/hooks/use-config-priority.ts"],"sourcesContent":["import { useMemo } from 'react'\n\nexport function useConfigPriority<T extends object>(minor?: Partial<T>, major?: Partial<T>): Partial<T> {\n return useMemo(() => {\n const minorConfig = minor ?? {}\n const majorConfig = major ?? {}\n const uniqueKeys = [...new Set([...Object.keys(minorConfig), ...Object.keys(majorConfig)])]\n\n return uniqueKeys.reduce((prioritized, key) => {\n let finalVal\n\n if (valid(minorConfig[key])) finalVal = minorConfig[key]\n if (valid(majorConfig[key])) finalVal = majorConfig[key]\n\n return valid(finalVal) ? { ...prioritized, [key]: finalVal } : prioritized\n }, {} as Partial<T>)\n }, [minor, major])\n}\n\nfunction valid(value: unknown): boolean {\n return Boolean(value) || typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string'\n}\n"],"names":["useConfigPriority","minor","major","useMemo","minorConfig","majorConfig","Set","Object","keys","reduce","prioritized","key","finalVal","valid","value","Boolean"],"mappings":"oFAEO,SAASA,EAAoCC,EAAoBC,GACtE,OAAOC,GAAQ,KACb,IAAMC,EAAcH,MAAAA,EAAAA,EAAS,GAC7B,IAAMI,EAAcH,MAAAA,EAAAA,EAAS,GAG7B,MAFmB,IAAI,IAAII,IAAI,IAAIC,OAAOC,KAAKJ,MAAiBG,OAAOC,KAAKH,MAE1DI,SAAQC,EAAaC,KACrC,IAAIC,EAKJ,OAHIC,EAAMT,EAAYO,MAAOC,EAAWR,EAAYO,IAChDE,EAAMR,EAAYM,MAAOC,EAAWP,EAAYM,IAE7CE,EAAMD,UAAiBF,GAAvB,GAAA,CAAoCC,CAACA,GAAMC,IAAaF,IAC9D,MACF,CAACT,EAAOC,IAGb,SAASW,EAAMC,GACb,OAAOC,QAAQD,IAA2B,kBAAVA,GAAwC,iBAAVA,GAAuC,iBAAVA"}
1
+ {"version":3,"file":"use-config-priority.js","sources":["../../../src/hooks/use-config-priority.ts"],"sourcesContent":["import { useMemo } from 'react'\n\nexport function useConfigPriority<T extends object>(minor?: Partial<T>, major?: Partial<T>): Partial<T> {\n return useMemo(() => {\n const minorConfig = minor ?? {}\n const majorConfig = major ?? {}\n const uniqueKeys = [...new Set([...Object.keys(minorConfig), ...Object.keys(majorConfig)])]\n\n return uniqueKeys.reduce((prioritized, key) => {\n let finalVal\n\n if (valid(minorConfig[key])) finalVal = minorConfig[key]\n if (valid(majorConfig[key])) finalVal = majorConfig[key]\n\n return valid(finalVal) ? { ...prioritized, [key]: finalVal } : prioritized\n }, {} as Partial<T>)\n }, [minor, major])\n}\n\nfunction valid(value: unknown): boolean {\n return Boolean(value) || typeof value === 'boolean' || typeof value === 'number'\n}\n"],"names":["useConfigPriority","minor","major","useMemo","minorConfig","majorConfig","Set","Object","keys","reduce","prioritized","key","finalVal","valid","value","Boolean"],"mappings":"oFAEO,SAASA,EAAoCC,EAAoBC,GACtE,OAAOC,GAAQ,KACb,IAAMC,EAAcH,MAAAA,EAAAA,EAAS,GAC7B,IAAMI,EAAcH,MAAAA,EAAAA,EAAS,GAG7B,MAFmB,IAAI,IAAII,IAAI,IAAIC,OAAOC,KAAKJ,MAAiBG,OAAOC,KAAKH,MAE1DI,QAAO,CAACC,EAAaC,KACrC,IAAIC,EAKJ,OAHIC,EAAMT,EAAYO,MAAOC,EAAWR,EAAYO,IAChDE,EAAMR,EAAYM,MAAOC,EAAWP,EAAYM,IAE7CE,EAAMD,UAAiBF,GAAvB,GAAA,CAAoCC,CAACA,GAAMC,IAAaF,IAC9D,MACF,CAACT,EAAOC,IAGb,SAASW,EAAMC,GACb,OAAOC,QAAQD,IAA2B,kBAAVA,GAAwC,iBAAVA"}