@foxford/ui 2.4.3-beta-7227108-20230620 → 2.5.0-beta-896cda4-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/components/Alert/Alert.js +2 -0
- package/components/Alert/Alert.js.map +1 -0
- package/components/Alert/parts/CountdownCircle.js +2 -0
- package/components/Alert/parts/CountdownCircle.js.map +1 -0
- package/components/Alert/style.js +2 -0
- package/components/Alert/style.js.map +1 -0
- package/components/Amount/Amount.js.map +1 -1
- package/components/Badge/Badge.js.map +1 -1
- package/components/Button/style.js +1 -1
- package/components/Button/style.js.map +1 -1
- package/components/Tag/Tag.js.map +1 -1
- package/components/Tag/style.js.map +1 -1
- package/components/Text/Text.js +1 -1
- package/components/Text/Text.js.map +1 -1
- package/components/Text/style.js +1 -1
- package/components/Text/style.js.map +1 -1
- package/components/Text.Heading/Text.Heading.js +1 -1
- package/components/Text.Heading/Text.Heading.js.map +1 -1
- package/components/Textarea/Textarea.js +1 -1
- package/components/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/style.js +1 -1
- package/components/Textarea/style.js.map +1 -1
- package/dts/index.d.ts +342 -247
- package/hooks/use-config-priority.js +1 -1
- package/hooks/use-config-priority.js.map +1 -1
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/index.js +1 -1
- package/package.json +2 -1
- package/theme/colors.js +1 -1
- package/theme/colors.js.map +1 -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 } 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, InputField as InputField$1 } from 'shared/interfaces';
|
|
9
|
-
import { Color as Color$1 } from 'mixins/color';
|
|
10
5
|
import { Display as Display$1 } from 'mixins/display';
|
|
6
|
+
import { ResponsiveNamedProperty as ResponsiveNamedProperty$1, ResponsiveProperty as ResponsiveProperty$1 } from 'mixins/responsive-property';
|
|
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,6 +576,300 @@ declare namespace ActionBtn {
|
|
|
575
576
|
var displayName: string;
|
|
576
577
|
}
|
|
577
578
|
|
|
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
|
+
content?: string | React.ReactNode;
|
|
836
|
+
/** Icon name (for inner Icon component) */
|
|
837
|
+
customIcon?: keyof typeof IconNames;
|
|
838
|
+
image?: React.ReactNode;
|
|
839
|
+
isCompact?: boolean;
|
|
840
|
+
link?: {
|
|
841
|
+
content: string | React.ReactNode;
|
|
842
|
+
onClick(): void;
|
|
843
|
+
};
|
|
844
|
+
linkProps?: AnchorProps;
|
|
845
|
+
noIcon?: boolean;
|
|
846
|
+
onClickCancelTimer?(): void;
|
|
847
|
+
onClickCloseIcon?(): 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, onClickCloseIcon, style, textProps, timer, title, titleProps, type, }: AlertProps): JSX.Element;
|
|
869
|
+
declare namespace Alert {
|
|
870
|
+
var displayName: string;
|
|
871
|
+
}
|
|
872
|
+
|
|
578
873
|
declare enum CurrencyCodes {
|
|
579
874
|
ALL = "ALL",
|
|
580
875
|
AFN = "AFN",
|
|
@@ -750,68 +1045,6 @@ declare class Amount extends PureComponent<AmountProps> {
|
|
|
750
1045
|
render(): JSX.Element;
|
|
751
1046
|
}
|
|
752
1047
|
|
|
753
|
-
interface AnchorProps extends BaseProps, Color, ResponsiveNamedProperty<'size'>, Display {
|
|
754
|
-
/**
|
|
755
|
-
* Custom CSS class name
|
|
756
|
-
*/
|
|
757
|
-
as?: 'div' | 'span' | 'a' | typeof Link;
|
|
758
|
-
/**
|
|
759
|
-
* React router link to
|
|
760
|
-
*/
|
|
761
|
-
to?: string;
|
|
762
|
-
/**
|
|
763
|
-
* Link href
|
|
764
|
-
*/
|
|
765
|
-
href?: string;
|
|
766
|
-
/**
|
|
767
|
-
* Is display inline
|
|
768
|
-
* */
|
|
769
|
-
wrapper?: boolean;
|
|
770
|
-
/**
|
|
771
|
-
* Pseudo link has dashed bottom border
|
|
772
|
-
* */
|
|
773
|
-
pseudo?: boolean;
|
|
774
|
-
/**
|
|
775
|
-
* If link should be underlined
|
|
776
|
-
* */
|
|
777
|
-
underline?: boolean;
|
|
778
|
-
/**
|
|
779
|
-
* Primary content
|
|
780
|
-
*/
|
|
781
|
-
/**
|
|
782
|
-
* Children react node
|
|
783
|
-
*/
|
|
784
|
-
children?: React.ReactNode;
|
|
785
|
-
/**
|
|
786
|
-
* Primary content
|
|
787
|
-
*/
|
|
788
|
-
content?: string;
|
|
789
|
-
/**
|
|
790
|
-
* Onclick handler
|
|
791
|
-
*/
|
|
792
|
-
onClick?: () => void;
|
|
793
|
-
target?: string;
|
|
794
|
-
rel?: string;
|
|
795
|
-
/**
|
|
796
|
-
* Auto-generate rel. You must specify domain inside theme
|
|
797
|
-
*/
|
|
798
|
-
autoRel?: boolean;
|
|
799
|
-
}
|
|
800
|
-
/**
|
|
801
|
-
* Расширен:
|
|
802
|
-
* - [`BaseProps`](#/Миксины)
|
|
803
|
-
* - [`Color`](#/Миксины)
|
|
804
|
-
* - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
|
|
805
|
-
* - [`Display`](#/Миксины)
|
|
806
|
-
*/
|
|
807
|
-
declare function Anchor(props: typeof Anchor.defaultProps & AnchorProps): JSX.Element;
|
|
808
|
-
declare namespace Anchor {
|
|
809
|
-
var displayName: string;
|
|
810
|
-
var defaultProps: {
|
|
811
|
-
display: string;
|
|
812
|
-
};
|
|
813
|
-
}
|
|
814
|
-
|
|
815
1048
|
declare type ArrowStaticSize = 'l' | 'm' | 'xs';
|
|
816
1049
|
declare type ArrowSize = ArrowStaticSize | ResponsiveProperty$1<`${number}rem` | number>;
|
|
817
1050
|
interface ArrowProps extends BaseProps$1 {
|
|
@@ -881,93 +1114,6 @@ declare class Avatar extends PureComponent<AvatarProps> {
|
|
|
881
1114
|
render(): JSX.Element;
|
|
882
1115
|
}
|
|
883
1116
|
|
|
884
|
-
declare enum H {
|
|
885
|
-
h1 = 0,
|
|
886
|
-
h2 = 1,
|
|
887
|
-
h3 = 2,
|
|
888
|
-
h4 = 3
|
|
889
|
-
}
|
|
890
|
-
interface TextHeadingProps extends Omit<TextProps, 'content' | 'as'> {
|
|
891
|
-
/** Default set of size, lineHeight and weight props */
|
|
892
|
-
h?: keyof typeof H;
|
|
893
|
-
/** Children react node */
|
|
894
|
-
children?: React.ReactNode;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
interface TextEllipseProps extends Omit<TextProps, 'content'> {
|
|
898
|
-
/** Toggle text for folded state */
|
|
899
|
-
moreText?: string;
|
|
900
|
-
/** Toggle text for unfolded state */
|
|
901
|
-
lessText?: string;
|
|
902
|
-
/** Classname */
|
|
903
|
-
className?: string;
|
|
904
|
-
/** Html content */
|
|
905
|
-
content: string | string[];
|
|
906
|
-
/** Characters quantity for ellipsed text */
|
|
907
|
-
chars?: number;
|
|
908
|
-
/** Wrap text in quotes */
|
|
909
|
-
quoted?: boolean;
|
|
910
|
-
/** Flag to show toggler */
|
|
911
|
-
showToggler?: boolean;
|
|
912
|
-
}
|
|
913
|
-
interface TextEllipseState {
|
|
914
|
-
isUnFolded: boolean;
|
|
915
|
-
isEllipsed: boolean;
|
|
916
|
-
}
|
|
917
|
-
/**
|
|
918
|
-
* Расширен:
|
|
919
|
-
* - [`BaseProps`](#/Миксины)
|
|
920
|
-
* - [`Color`](#/Миксины)
|
|
921
|
-
* - [`Display`](#/Миксины)
|
|
922
|
-
* - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
|
|
923
|
-
*/
|
|
924
|
-
declare class TextEllipse extends Component<TextEllipseProps, TextEllipseState> {
|
|
925
|
-
static displayName: string;
|
|
926
|
-
constructor(props: TextEllipseProps);
|
|
927
|
-
componentDidUpdate({ content }: TextEllipseProps): void;
|
|
928
|
-
getContent: (props: Omit<TextEllipseProps, 'className' | 'moreText' | 'lessText' | 'showToggler'>) => "" | JSX.Element;
|
|
929
|
-
getQuted: (content: string) => string;
|
|
930
|
-
toggle: () => void;
|
|
931
|
-
render(): JSX.Element;
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
interface TextProps extends BaseProps$1, Color$1, ResponsiveNamedProperty$1<'size'>, Display$1 {
|
|
935
|
-
/** An element type to render as (string) */
|
|
936
|
-
as?: 'div' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'p';
|
|
937
|
-
/** Primary content */
|
|
938
|
-
content?: string;
|
|
939
|
-
/** Primary content */
|
|
940
|
-
/** Children react node */
|
|
941
|
-
children?: React.ReactNode;
|
|
942
|
-
/** Text font weight */
|
|
943
|
-
weight?: 'lighter' | 'normal' | 'bold' | 'bolder' | number;
|
|
944
|
-
/** Text font style */
|
|
945
|
-
fontStyle?: 'normal' | 'italic';
|
|
946
|
-
/** Text font family */
|
|
947
|
-
fontFamily?: string;
|
|
948
|
-
/** Add underline to inline links */
|
|
949
|
-
underlineLinks?: boolean;
|
|
950
|
-
/** Text align */
|
|
951
|
-
textAlign?: 'left' | 'center' | 'right' | 'justify' | 'start' | 'end';
|
|
952
|
-
/** Line height */
|
|
953
|
-
lineHeight?: 'l' | 'm' | 's' | 'xs' | number;
|
|
954
|
-
/** Element title */
|
|
955
|
-
title?: string;
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
/**
|
|
959
|
-
* Text component
|
|
960
|
-
*/
|
|
961
|
-
declare const Text: {
|
|
962
|
-
(props: TextProps): JSX.Element;
|
|
963
|
-
Heading: {
|
|
964
|
-
({ h, ...props }: TextHeadingProps): JSX.Element;
|
|
965
|
-
displayName: string;
|
|
966
|
-
};
|
|
967
|
-
Ellipse: typeof TextEllipse;
|
|
968
|
-
displayName: string;
|
|
969
|
-
};
|
|
970
|
-
|
|
971
1117
|
interface BadgeProps extends BaseProps, Color, Display {
|
|
972
1118
|
/**
|
|
973
1119
|
* Children react node
|
|
@@ -989,83 +1135,6 @@ declare namespace Badge {
|
|
|
989
1135
|
var displayName: string;
|
|
990
1136
|
}
|
|
991
1137
|
|
|
992
|
-
declare type ButtonStaticSize = 'l' | 'm' | 's' | 'xs';
|
|
993
|
-
declare type ButtonSize = ButtonStaticSize | ResponsiveProperty$1<`${number}rem` | number>;
|
|
994
|
-
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> {
|
|
995
|
-
/** Root node polymorphic type */
|
|
996
|
-
as?: 'div' | 'span' | 'a' | 'button' | typeof Link | typeof Anchor$1;
|
|
997
|
-
/** Button size */
|
|
998
|
-
size?: ButtonSize;
|
|
999
|
-
/** Button type attribute */
|
|
1000
|
-
type?: 'button' | 'submit' | 'reset';
|
|
1001
|
-
/** Button icons */
|
|
1002
|
-
icon?: JSX.Element | [Nullable$1<JSX.Element>, Nullable$1<JSX.Element>];
|
|
1003
|
-
/** Button success state */
|
|
1004
|
-
success?: boolean;
|
|
1005
|
-
/** Loading state */
|
|
1006
|
-
loading?: boolean;
|
|
1007
|
-
/** Button disabled */
|
|
1008
|
-
disabled?: boolean;
|
|
1009
|
-
/** Rounded border radius */
|
|
1010
|
-
rounded?: boolean;
|
|
1011
|
-
/** Rounded shape button */
|
|
1012
|
-
round?: boolean;
|
|
1013
|
-
/** Anchor target attribute */
|
|
1014
|
-
target?: string;
|
|
1015
|
-
/** Anchor rel attribute */
|
|
1016
|
-
rel?: string;
|
|
1017
|
-
/** Auto-generate rel. You must specify domain inside theme */
|
|
1018
|
-
autoRel?: boolean;
|
|
1019
|
-
/** Anchor href attribute */
|
|
1020
|
-
href?: string;
|
|
1021
|
-
/** React router Link to prop */
|
|
1022
|
-
to?: string;
|
|
1023
|
-
/**
|
|
1024
|
-
* Indicates if there should not be any margin
|
|
1025
|
-
* between this button and the previous one
|
|
1026
|
-
*/
|
|
1027
|
-
noSpacing?: boolean;
|
|
1028
|
-
/** Outline appearance */
|
|
1029
|
-
outline?: boolean;
|
|
1030
|
-
/** Content font weight */
|
|
1031
|
-
fontWeight?: FontWeight$1;
|
|
1032
|
-
/** Associated form */
|
|
1033
|
-
form?: string;
|
|
1034
|
-
/** @preset {Default} Primary appearance */
|
|
1035
|
-
primary?: boolean;
|
|
1036
|
-
/** @preset {Default} Secondary appearance */
|
|
1037
|
-
secondary?: boolean;
|
|
1038
|
-
/** @preset {Default} Inverted colors */
|
|
1039
|
-
inverted?: boolean;
|
|
1040
|
-
/** @preset {Brand} Base appearance */
|
|
1041
|
-
base?: boolean;
|
|
1042
|
-
/** @preset {Brand} Clear appearance */
|
|
1043
|
-
clear?: boolean;
|
|
1044
|
-
/** @preset {Brand} Black colors appearance */
|
|
1045
|
-
black?: boolean;
|
|
1046
|
-
/** @preset {Brand} Red colors appearance */
|
|
1047
|
-
danger?: boolean;
|
|
1048
|
-
/** @preset {Brand} Modifies appearance on colored background */
|
|
1049
|
-
onColored?: boolean;
|
|
1050
|
-
/** @deprecated Use outline */
|
|
1051
|
-
basic?: boolean;
|
|
1052
|
-
/** @deprecated Use children */
|
|
1053
|
-
content?: React.ReactNode;
|
|
1054
|
-
/** @deprecated Use ref */
|
|
1055
|
-
innerRef?: React.LegacyRef<HTMLElement>;
|
|
1056
|
-
/** Component's children */
|
|
1057
|
-
children?: React.ReactNode | React.ReactNode[];
|
|
1058
|
-
onClick?: (evt: React.SyntheticEvent<HTMLElement>) => void;
|
|
1059
|
-
onClickCapture?: (evt: React.SyntheticEvent<HTMLElement>) => void;
|
|
1060
|
-
onMouseEnter?: (evt: React.SyntheticEvent<HTMLElement>) => void;
|
|
1061
|
-
onMouseLeave?: (evt: React.SyntheticEvent<HTMLElement>) => void;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
/**
|
|
1065
|
-
* Main button
|
|
1066
|
-
*/
|
|
1067
|
-
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLElement>>;
|
|
1068
|
-
|
|
1069
1138
|
interface ContainerProps extends BaseProps, Display, Color {
|
|
1070
1139
|
/**
|
|
1071
1140
|
* Primary content
|
|
@@ -2120,30 +2189,56 @@ declare class ContextMenu extends PureComponent<ContextMenuProps, {
|
|
|
2120
2189
|
}
|
|
2121
2190
|
|
|
2122
2191
|
declare type TextAreaHTMLAttributes = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'cols' | 'rows' | 'color'>;
|
|
2123
|
-
interface TextareaProps extends BaseProps
|
|
2124
|
-
/**
|
|
2192
|
+
interface TextareaProps extends BaseProps, InputField, TextAreaHTMLAttributes {
|
|
2193
|
+
/**
|
|
2194
|
+
* Specifies the visible width of a text area
|
|
2195
|
+
*/
|
|
2125
2196
|
cols?: number;
|
|
2126
|
-
/**
|
|
2197
|
+
/**
|
|
2198
|
+
* Specifies the visible number of lines in a text area
|
|
2199
|
+
*/
|
|
2127
2200
|
rows?: number;
|
|
2128
|
-
/**
|
|
2201
|
+
/**
|
|
2202
|
+
* Specifies the visible max number of lines in a text area
|
|
2203
|
+
*/
|
|
2129
2204
|
maxRows?: number;
|
|
2130
|
-
/**
|
|
2205
|
+
/**
|
|
2206
|
+
* Specifies the maximum number of characters allowed in the text area
|
|
2207
|
+
*/
|
|
2131
2208
|
maxLength?: number;
|
|
2132
|
-
/**
|
|
2209
|
+
/**
|
|
2210
|
+
* On change handler
|
|
2211
|
+
*/
|
|
2133
2212
|
onChange?(_event: React.ChangeEvent<HTMLTextAreaElement>): void;
|
|
2134
|
-
/**
|
|
2213
|
+
/**
|
|
2214
|
+
* Value
|
|
2215
|
+
*/
|
|
2135
2216
|
value?: string;
|
|
2136
|
-
/**
|
|
2217
|
+
/**
|
|
2218
|
+
* Autosize for textarea
|
|
2219
|
+
*/
|
|
2137
2220
|
autosize?: boolean;
|
|
2138
2221
|
}
|
|
2139
|
-
|
|
2140
2222
|
/**
|
|
2141
|
-
*
|
|
2223
|
+
* Расширен:
|
|
2224
|
+
* - [`BaseProps`](#/Миксины)
|
|
2225
|
+
* - [`InputField`](#/Миксины)
|
|
2226
|
+
* - `React.TextareaHTMLAttributes<HTMLTextAreaElement>`
|
|
2142
2227
|
*/
|
|
2143
|
-
declare
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2228
|
+
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;
|
|
2229
|
+
declare namespace Textarea {
|
|
2230
|
+
var defaultProps: {
|
|
2231
|
+
onChange: (e: react.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
2232
|
+
rounded: boolean;
|
|
2233
|
+
color: string;
|
|
2234
|
+
placeholderColor: string;
|
|
2235
|
+
cols: number;
|
|
2236
|
+
maxRows: number;
|
|
2237
|
+
rows: number;
|
|
2238
|
+
autosize: boolean;
|
|
2239
|
+
};
|
|
2240
|
+
var displayName: string;
|
|
2241
|
+
}
|
|
2147
2242
|
|
|
2148
2243
|
interface InputPhoneProps extends InputProps {
|
|
2149
2244
|
/**
|
|
@@ -2452,4 +2547,4 @@ declare namespace Select {
|
|
|
2452
2547
|
var displayName: string;
|
|
2453
2548
|
}
|
|
2454
2549
|
|
|
2455
|
-
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 };
|
|
@@ -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
|
|
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'
|
|
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"}
|