@foxford/ui 2.5.0-beta-83742e9-20230628 → 2.5.0-beta-d9eb542-20230703
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/components/Arrow/Arrow.js +1 -1
- package/components/Arrow/Arrow.js.map +1 -1
- package/components/Button/Button.js +1 -1
- package/components/Button/Button.js.map +1 -1
- package/components/Button/hooks.js.map +1 -1
- package/components/Button/style.js +1 -1
- package/components/Button/style.js.map +1 -1
- package/components/Checkbox/Checkbox.js +1 -1
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/Group.js +1 -1
- package/components/Checkbox/Group.js.map +1 -1
- package/components/Checkbox/images/check-default.module.svg.js +2 -0
- package/components/Checkbox/images/check-default.module.svg.js.map +1 -0
- package/components/Checkbox/images/check.module.svg.js +2 -0
- package/components/Checkbox/images/check.module.svg.js.map +1 -0
- package/components/Checkbox/style.js +1 -1
- package/components/Checkbox/style.js.map +1 -1
- package/dts/index.d.ts +289 -371
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/index.js +1 -1
- package/package.json +1 -2
- package/theme/colors.js +1 -1
- package/theme/colors.js.map +1 -1
- package/theme/themes.js +1 -1
- package/theme/themes.js.map +1 -1
- package/components/Alert/Alert.js +0 -2
- package/components/Alert/Alert.js.map +0 -1
- package/components/Alert/parts/CountdownCircle.js +0 -2
- package/components/Alert/parts/CountdownCircle.js.map +0 -1
- package/components/Alert/style.js +0 -2
- package/components/Alert/style.js.map +0 -1
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, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
|
|
4
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 } from 'shared/interfaces';
|
|
5
9
|
import { Display as Display$1 } from 'mixins/display';
|
|
6
|
-
import { ResponsiveNamedProperty as ResponsiveNamedProperty$1, ResponsiveProperty as ResponsiveProperty$1 } from 'mixins/responsive-property';
|
|
7
10
|
import { Color as Color$1 } from 'mixins/color';
|
|
8
11
|
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,8 +206,7 @@ declare enum ColorNames {
|
|
|
206
206
|
grey = "grey",
|
|
207
207
|
darkgrey = "darkgrey",
|
|
208
208
|
lightgrey = "lightgrey",
|
|
209
|
-
superlightgrey = "superlightgrey"
|
|
210
|
-
transparent = "rgba(0,0,0,0)"
|
|
209
|
+
superlightgrey = "superlightgrey"
|
|
211
210
|
}
|
|
212
211
|
|
|
213
212
|
declare type ColorPropsProperties = 'color' | 'fontColor' | `${string}Color` | `color${string}`;
|
|
@@ -302,7 +301,6 @@ declare type FontWeight = 'normal' | 'bold' | 'lighter' | 'bolder' | number;
|
|
|
302
301
|
declare type ThemePreset = 'default' | 'brand';
|
|
303
302
|
declare type ThemeMode = 'light' | 'dark';
|
|
304
303
|
declare type ThemeName = 'mother' | 'baby' | 'teen' | 'adult';
|
|
305
|
-
declare type ComponentContext<P> = Omit<Partial<P>, 'className' | 'style' | 'children' | 'onClick' | 'onClickCapture' | 'onMouseLeave' | 'onMouseEnter'>;
|
|
306
304
|
interface BaseProps {
|
|
307
305
|
/** Appearance preset */
|
|
308
306
|
preset?: 'default' | 'brand';
|
|
@@ -576,300 +574,6 @@ declare namespace ActionBtn {
|
|
|
576
574
|
var displayName: string;
|
|
577
575
|
}
|
|
578
576
|
|
|
579
|
-
interface AnchorProps extends BaseProps, Color, ResponsiveNamedProperty<'size'>, Display {
|
|
580
|
-
/**
|
|
581
|
-
* Custom CSS class name
|
|
582
|
-
*/
|
|
583
|
-
as?: 'div' | 'span' | 'a' | typeof Link;
|
|
584
|
-
/**
|
|
585
|
-
* React router link to
|
|
586
|
-
*/
|
|
587
|
-
to?: string;
|
|
588
|
-
/**
|
|
589
|
-
* Link href
|
|
590
|
-
*/
|
|
591
|
-
href?: string;
|
|
592
|
-
/**
|
|
593
|
-
* Is display inline
|
|
594
|
-
* */
|
|
595
|
-
wrapper?: boolean;
|
|
596
|
-
/**
|
|
597
|
-
* Pseudo link has dashed bottom border
|
|
598
|
-
* */
|
|
599
|
-
pseudo?: boolean;
|
|
600
|
-
/**
|
|
601
|
-
* If link should be underlined
|
|
602
|
-
* */
|
|
603
|
-
underline?: boolean;
|
|
604
|
-
/**
|
|
605
|
-
* Primary content
|
|
606
|
-
*/
|
|
607
|
-
/**
|
|
608
|
-
* Children react node
|
|
609
|
-
*/
|
|
610
|
-
children?: React.ReactNode;
|
|
611
|
-
/**
|
|
612
|
-
* Primary content
|
|
613
|
-
*/
|
|
614
|
-
content?: string;
|
|
615
|
-
/**
|
|
616
|
-
* Onclick handler
|
|
617
|
-
*/
|
|
618
|
-
onClick?: () => void;
|
|
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 = '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
|
-
/**
|
|
831
|
-
* Children react node
|
|
832
|
-
*/
|
|
833
|
-
children?: React.ReactNode;
|
|
834
|
-
clear?: boolean;
|
|
835
|
-
closeToast?(): void;
|
|
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;
|
|
858
|
-
textProps?: TextProps;
|
|
859
|
-
timer?: number;
|
|
860
|
-
title?: string;
|
|
861
|
-
titleProps?: TextProps;
|
|
862
|
-
type: AlertType;
|
|
863
|
-
}
|
|
864
|
-
/**
|
|
865
|
-
* Расширен:
|
|
866
|
-
* - [`BaseProps`](#/Миксины)
|
|
867
|
-
*/
|
|
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 {
|
|
870
|
-
var displayName: string;
|
|
871
|
-
}
|
|
872
|
-
|
|
873
577
|
declare enum CurrencyCodes {
|
|
874
578
|
ALL = "ALL",
|
|
875
579
|
AFN = "AFN",
|
|
@@ -1039,10 +743,72 @@ declare class Amount extends PureComponent<AmountProps> {
|
|
|
1039
743
|
separator: string;
|
|
1040
744
|
onlyCurrency: boolean;
|
|
1041
745
|
};
|
|
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;
|
|
746
|
+
static getCurrencySymbol(currencyCode: keyof typeof CurrencyCodes | string): any;
|
|
747
|
+
renderMinorPart(minorPart: string): JSX.Element | null;
|
|
748
|
+
renderCurrencySymbol: (currencySymbol: string) => JSX.Element;
|
|
749
|
+
render(): JSX.Element;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
interface AnchorProps extends BaseProps, Color, ResponsiveNamedProperty<'size'>, Display {
|
|
753
|
+
/**
|
|
754
|
+
* Custom CSS class name
|
|
755
|
+
*/
|
|
756
|
+
as?: 'div' | 'span' | 'a' | typeof Link;
|
|
757
|
+
/**
|
|
758
|
+
* React router link to
|
|
759
|
+
*/
|
|
760
|
+
to?: string;
|
|
761
|
+
/**
|
|
762
|
+
* Link href
|
|
763
|
+
*/
|
|
764
|
+
href?: string;
|
|
765
|
+
/**
|
|
766
|
+
* Is display inline
|
|
767
|
+
* */
|
|
768
|
+
wrapper?: boolean;
|
|
769
|
+
/**
|
|
770
|
+
* Pseudo link has dashed bottom border
|
|
771
|
+
* */
|
|
772
|
+
pseudo?: boolean;
|
|
773
|
+
/**
|
|
774
|
+
* If link should be underlined
|
|
775
|
+
* */
|
|
776
|
+
underline?: boolean;
|
|
777
|
+
/**
|
|
778
|
+
* Primary content
|
|
779
|
+
*/
|
|
780
|
+
/**
|
|
781
|
+
* Children react node
|
|
782
|
+
*/
|
|
783
|
+
children?: React.ReactNode;
|
|
784
|
+
/**
|
|
785
|
+
* Primary content
|
|
786
|
+
*/
|
|
787
|
+
content?: string;
|
|
788
|
+
/**
|
|
789
|
+
* Onclick handler
|
|
790
|
+
*/
|
|
791
|
+
onClick?: () => void;
|
|
792
|
+
target?: string;
|
|
793
|
+
rel?: string;
|
|
794
|
+
/**
|
|
795
|
+
* Auto-generate rel. You must specify domain inside theme
|
|
796
|
+
*/
|
|
797
|
+
autoRel?: boolean;
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* Расширен:
|
|
801
|
+
* - [`BaseProps`](#/Миксины)
|
|
802
|
+
* - [`Color`](#/Миксины)
|
|
803
|
+
* - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
|
|
804
|
+
* - [`Display`](#/Миксины)
|
|
805
|
+
*/
|
|
806
|
+
declare function Anchor(props: typeof Anchor.defaultProps & AnchorProps): JSX.Element;
|
|
807
|
+
declare namespace Anchor {
|
|
808
|
+
var displayName: string;
|
|
809
|
+
var defaultProps: {
|
|
810
|
+
display: string;
|
|
811
|
+
};
|
|
1046
812
|
}
|
|
1047
813
|
|
|
1048
814
|
declare type ArrowStaticSize = 'l' | 'm' | 'xs';
|
|
@@ -1114,6 +880,116 @@ declare class Avatar extends PureComponent<AvatarProps> {
|
|
|
1114
880
|
render(): JSX.Element;
|
|
1115
881
|
}
|
|
1116
882
|
|
|
883
|
+
declare enum H {
|
|
884
|
+
h1 = 0,
|
|
885
|
+
h2 = 1,
|
|
886
|
+
h3 = 2,
|
|
887
|
+
h4 = 3
|
|
888
|
+
}
|
|
889
|
+
interface TextHeadingProps extends Omit<TextProps, 'content' | 'as'> {
|
|
890
|
+
h?: keyof typeof H;
|
|
891
|
+
/**
|
|
892
|
+
* Children react node
|
|
893
|
+
*/
|
|
894
|
+
children?: React.ReactNode;
|
|
895
|
+
}
|
|
896
|
+
declare function TextHeading({ h, ...props }: TextHeadingProps): JSX.Element;
|
|
897
|
+
declare namespace TextHeading {
|
|
898
|
+
var displayName: string;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
interface TextEllipseProps extends Omit<TextProps, 'content'> {
|
|
902
|
+
/** Toggle text for folded state */
|
|
903
|
+
moreText?: string;
|
|
904
|
+
/** Toggle text for unfolded state */
|
|
905
|
+
lessText?: string;
|
|
906
|
+
/** Classname */
|
|
907
|
+
className?: string;
|
|
908
|
+
/** Html content */
|
|
909
|
+
content: string | string[];
|
|
910
|
+
/** Characters quantity for ellipsed text */
|
|
911
|
+
chars?: number;
|
|
912
|
+
/** Wrap text in quotes */
|
|
913
|
+
quoted?: boolean;
|
|
914
|
+
/** Flag to show toggler */
|
|
915
|
+
showToggler?: boolean;
|
|
916
|
+
}
|
|
917
|
+
interface TextEllipseState {
|
|
918
|
+
isUnFolded: boolean;
|
|
919
|
+
isEllipsed: boolean;
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* Расширен:
|
|
923
|
+
* - [`BaseProps`](#/Миксины)
|
|
924
|
+
* - [`Color`](#/Миксины)
|
|
925
|
+
* - [`Display`](#/Миксины)
|
|
926
|
+
* - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
|
|
927
|
+
*/
|
|
928
|
+
declare class TextEllipse extends Component<TextEllipseProps, TextEllipseState> {
|
|
929
|
+
static displayName: string;
|
|
930
|
+
constructor(props: TextEllipseProps);
|
|
931
|
+
componentDidUpdate({ content }: TextEllipseProps): void;
|
|
932
|
+
getContent: (props: Omit<TextEllipseProps, 'className' | 'moreText' | 'lessText' | 'showToggler'>) => "" | JSX.Element;
|
|
933
|
+
getQuted: (content: string) => string;
|
|
934
|
+
toggle: () => void;
|
|
935
|
+
render(): JSX.Element;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
interface TextProps extends BaseProps, Color, ResponsiveNamedProperty<'size'>, Display {
|
|
939
|
+
/**
|
|
940
|
+
* An element type to render as (string).
|
|
941
|
+
*/
|
|
942
|
+
as?: 'div' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'p';
|
|
943
|
+
/**
|
|
944
|
+
* Primary content
|
|
945
|
+
*/
|
|
946
|
+
content?: string;
|
|
947
|
+
/**
|
|
948
|
+
* Primary content
|
|
949
|
+
*/
|
|
950
|
+
/**
|
|
951
|
+
* Children react node
|
|
952
|
+
*/
|
|
953
|
+
children?: React.ReactNode;
|
|
954
|
+
/**
|
|
955
|
+
* Text font weight
|
|
956
|
+
*/
|
|
957
|
+
weight?: 'lighter' | 'normal' | 'bold' | 'bolder' | number;
|
|
958
|
+
/**
|
|
959
|
+
* Text font style
|
|
960
|
+
*/
|
|
961
|
+
fontStyle?: 'normal' | 'italic';
|
|
962
|
+
/**
|
|
963
|
+
* Add underline to inline links
|
|
964
|
+
*/
|
|
965
|
+
underlineLinks?: boolean;
|
|
966
|
+
/**
|
|
967
|
+
* Text align
|
|
968
|
+
*/
|
|
969
|
+
textAlign?: 'left' | 'center' | 'right' | 'justify' | 'start' | 'end';
|
|
970
|
+
/**
|
|
971
|
+
* Line height
|
|
972
|
+
*/
|
|
973
|
+
lineHeight?: 'l' | 'm' | 's' | 'xs' | number;
|
|
974
|
+
/**
|
|
975
|
+
* Element title
|
|
976
|
+
*/
|
|
977
|
+
title?: string;
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* Расширен:
|
|
981
|
+
* - [`BaseProps`](#/Миксины)
|
|
982
|
+
* - [`Color`](#/Миксины)
|
|
983
|
+
* - [`Display`](#/Миксины)
|
|
984
|
+
* - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
|
|
985
|
+
*/
|
|
986
|
+
declare function Text(props: TextProps): JSX.Element;
|
|
987
|
+
declare namespace Text {
|
|
988
|
+
var Heading: typeof TextHeading;
|
|
989
|
+
var Ellipse: typeof TextEllipse;
|
|
990
|
+
var displayName: string;
|
|
991
|
+
}
|
|
992
|
+
|
|
1117
993
|
interface BadgeProps extends BaseProps, Color, Display {
|
|
1118
994
|
/**
|
|
1119
995
|
* Children react node
|
|
@@ -1135,6 +1011,83 @@ declare namespace Badge {
|
|
|
1135
1011
|
var displayName: string;
|
|
1136
1012
|
}
|
|
1137
1013
|
|
|
1014
|
+
declare type ButtonStaticSize = 'l' | 'm' | 's' | 'xs';
|
|
1015
|
+
declare type ButtonSize = ButtonStaticSize | ResponsiveProperty$1<`${number}rem` | number>;
|
|
1016
|
+
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> {
|
|
1017
|
+
/** Root node polymorphic type */
|
|
1018
|
+
as?: 'div' | 'span' | 'a' | 'button' | typeof Link | typeof Anchor$1;
|
|
1019
|
+
/** Button size */
|
|
1020
|
+
size?: ButtonSize;
|
|
1021
|
+
/** Button type attribute */
|
|
1022
|
+
type?: 'button' | 'submit' | 'reset';
|
|
1023
|
+
/** Button icons */
|
|
1024
|
+
icon?: JSX.Element | [Nullable$1<JSX.Element>, Nullable$1<JSX.Element>];
|
|
1025
|
+
/** Button success state */
|
|
1026
|
+
success?: boolean;
|
|
1027
|
+
/** Loading state */
|
|
1028
|
+
loading?: boolean;
|
|
1029
|
+
/** Button disabled */
|
|
1030
|
+
disabled?: boolean;
|
|
1031
|
+
/** Rounded border radius */
|
|
1032
|
+
rounded?: boolean;
|
|
1033
|
+
/** Rounded shape button */
|
|
1034
|
+
round?: boolean;
|
|
1035
|
+
/** Anchor target attribute */
|
|
1036
|
+
target?: string;
|
|
1037
|
+
/** Anchor rel attribute */
|
|
1038
|
+
rel?: string;
|
|
1039
|
+
/** Auto-generate rel. You must specify domain inside theme */
|
|
1040
|
+
autoRel?: boolean;
|
|
1041
|
+
/** Anchor href attribute */
|
|
1042
|
+
href?: string;
|
|
1043
|
+
/** React router Link to prop */
|
|
1044
|
+
to?: string;
|
|
1045
|
+
/**
|
|
1046
|
+
* Indicates if there should not be any margin
|
|
1047
|
+
* between this button and the previous one
|
|
1048
|
+
*/
|
|
1049
|
+
noSpacing?: boolean;
|
|
1050
|
+
/** Outline appearance */
|
|
1051
|
+
outline?: boolean;
|
|
1052
|
+
/** Content font weight */
|
|
1053
|
+
fontWeight?: FontWeight$1;
|
|
1054
|
+
/** Associated form */
|
|
1055
|
+
form?: string;
|
|
1056
|
+
/** @preset {Default} Primary appearance */
|
|
1057
|
+
primary?: boolean;
|
|
1058
|
+
/** @preset {Default} Secondary appearance */
|
|
1059
|
+
secondary?: boolean;
|
|
1060
|
+
/** @preset {Default} Inverted colors */
|
|
1061
|
+
inverted?: boolean;
|
|
1062
|
+
/** @preset {Brand} Base appearance */
|
|
1063
|
+
base?: boolean;
|
|
1064
|
+
/** @preset {Brand} Clear appearance */
|
|
1065
|
+
clear?: boolean;
|
|
1066
|
+
/** @preset {Brand} Black colors appearance */
|
|
1067
|
+
black?: boolean;
|
|
1068
|
+
/** @preset {Brand} Red colors appearance */
|
|
1069
|
+
danger?: boolean;
|
|
1070
|
+
/** @preset {Brand} Modifies appearance on colored background */
|
|
1071
|
+
onColored?: boolean;
|
|
1072
|
+
/** @deprecated Use outline */
|
|
1073
|
+
basic?: boolean;
|
|
1074
|
+
/** @deprecated Use children */
|
|
1075
|
+
content?: React.ReactNode;
|
|
1076
|
+
/** @deprecated Use ref */
|
|
1077
|
+
innerRef?: React.LegacyRef<HTMLElement>;
|
|
1078
|
+
/** Component's children */
|
|
1079
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
1080
|
+
onClick?: (evt: React.SyntheticEvent<HTMLElement>) => void;
|
|
1081
|
+
onClickCapture?: (evt: React.SyntheticEvent<HTMLElement>) => void;
|
|
1082
|
+
onMouseEnter?: (evt: React.SyntheticEvent<HTMLElement>) => void;
|
|
1083
|
+
onMouseLeave?: (evt: React.SyntheticEvent<HTMLElement>) => void;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* Main button
|
|
1088
|
+
*/
|
|
1089
|
+
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLElement>>;
|
|
1090
|
+
|
|
1138
1091
|
interface ContainerProps extends BaseProps, Display, Color {
|
|
1139
1092
|
/**
|
|
1140
1093
|
* Primary content
|
|
@@ -2442,76 +2395,41 @@ declare namespace Radio {
|
|
|
2442
2395
|
var displayName: string;
|
|
2443
2396
|
}
|
|
2444
2397
|
|
|
2445
|
-
|
|
2398
|
+
declare type CheckboxStaticSize = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge' | 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
2399
|
+
declare type CheckboxSize = CheckboxStaticSize | ResponsiveProperty$1<`${number}rem` | number>;
|
|
2400
|
+
interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'width' | 'value'>, BaseProps$1 {
|
|
2401
|
+
/** Checkbox value */
|
|
2402
|
+
value?: string | number;
|
|
2403
|
+
/** Checkbox size */
|
|
2404
|
+
size?: CheckboxSize;
|
|
2405
|
+
/** Display inline, default to true */
|
|
2446
2406
|
inline?: boolean;
|
|
2447
|
-
|
|
2448
|
-
}
|
|
2449
|
-
declare function CheckboxGroup({ children, ...props }: CheckboxGroupProps): JSX.Element;
|
|
2450
|
-
|
|
2451
|
-
declare type CheckboxInputHtmlAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'width'>;
|
|
2452
|
-
interface CheckboxProps extends BaseProps, Display, CheckboxInputHtmlAttributes {
|
|
2453
|
-
/**
|
|
2454
|
-
* Children react node
|
|
2455
|
-
*/
|
|
2456
|
-
children?: React.ReactNode;
|
|
2457
|
-
/**
|
|
2458
|
-
* A checkbox can appear disabled and be unable to change states
|
|
2459
|
-
*/
|
|
2460
|
-
disabled?: boolean;
|
|
2461
|
-
/**
|
|
2462
|
-
* Field can show the data contains errors
|
|
2463
|
-
*/
|
|
2407
|
+
/** Checkbox errored appearance */
|
|
2464
2408
|
error?: boolean;
|
|
2465
|
-
/**
|
|
2466
|
-
* Whether or not checkbox is checked
|
|
2467
|
-
*/
|
|
2468
|
-
checked?: boolean;
|
|
2469
|
-
/**
|
|
2470
|
-
* Value
|
|
2471
|
-
*/
|
|
2472
|
-
value?: string | number;
|
|
2473
|
-
/**
|
|
2474
|
-
* On change handler
|
|
2475
|
-
*/
|
|
2476
|
-
onChange?(_e: React.ChangeEvent<HTMLInputElement>): void;
|
|
2477
|
-
/**
|
|
2478
|
-
* Input element ID
|
|
2479
|
-
*/
|
|
2480
|
-
id?: string;
|
|
2481
|
-
/**
|
|
2482
|
-
* Input element name
|
|
2483
|
-
*/
|
|
2484
|
-
name?: string;
|
|
2485
|
-
/**
|
|
2486
|
-
* Input element label
|
|
2487
|
-
*/
|
|
2488
|
-
label?: string;
|
|
2489
|
-
/**
|
|
2490
|
-
* Checkbox size
|
|
2491
|
-
*/
|
|
2492
|
-
size?: 'small' | 'medium' | 'large' | 'extraLarge' | 's' | 'm' | 'l' | 'xl';
|
|
2409
|
+
/** Root label width 100% */
|
|
2493
2410
|
fluid?: boolean;
|
|
2494
|
-
/**
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2411
|
+
/** Root label width */
|
|
2412
|
+
width?: ResponsiveProperty$1<number | string>;
|
|
2413
|
+
/** Label content */
|
|
2414
|
+
children?: React.ReactNode;
|
|
2415
|
+
/** @preset {Brand} Checkbox success appearance */
|
|
2416
|
+
success?: boolean;
|
|
2417
|
+
/** @preset {Brand} Label with background */
|
|
2418
|
+
background?: boolean;
|
|
2419
|
+
/** @preset {Brand} Modifies appearance on colored background */
|
|
2420
|
+
onColored?: boolean;
|
|
2421
|
+
/** @deprecated Use children */
|
|
2422
|
+
label?: string;
|
|
2498
2423
|
}
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
* - `React.InputHTMLAttributes<HTMLInputElement>`
|
|
2503
|
-
*/
|
|
2504
|
-
declare function Checkbox(props: typeof Checkbox.defaultProps & CheckboxProps): JSX.Element;
|
|
2505
|
-
declare namespace Checkbox {
|
|
2506
|
-
var defaultProps: {
|
|
2507
|
-
disabled: boolean;
|
|
2508
|
-
size: string;
|
|
2509
|
-
display: string;
|
|
2510
|
-
onChange: (e: react.ChangeEvent<HTMLInputElement>) => void;
|
|
2511
|
-
};
|
|
2512
|
-
var Group: typeof CheckboxGroup;
|
|
2513
|
-
var displayName: string;
|
|
2424
|
+
interface CheckboxGroupProps extends BaseProps$1 {
|
|
2425
|
+
inline?: boolean;
|
|
2426
|
+
children: React.ReactNode;
|
|
2514
2427
|
}
|
|
2428
|
+
interface CheckboxComponent extends ForwardRefExoticComponent<PropsWithoutRef<CheckboxProps> & RefAttributes<HTMLLabelElement>> {
|
|
2429
|
+
Group: (props: CheckboxGroupProps) => JSX.Element;
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
declare const Checkbox: CheckboxComponent;
|
|
2515
2433
|
|
|
2516
2434
|
interface SelectProps extends BaseProps, ReactSelectProps, Display {
|
|
2517
2435
|
fluid?: boolean;
|
|
@@ -2547,4 +2465,4 @@ declare namespace Select {
|
|
|
2547
2465
|
var displayName: string;
|
|
2548
2466
|
}
|
|
2549
2467
|
|
|
2550
|
-
export { ActionBtn,
|
|
2468
|
+
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 };
|