@foxford/ui 2.21.1 → 2.21.2-beta-a8b0c62-20240328
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/Anchor/style.js +1 -1
- package/components/Anchor/style.js.map +1 -1
- package/components/Arrow/Arrow.js +1 -1
- package/components/Arrow/Arrow.js.map +1 -1
- package/components/Arrow/constants.js +1 -1
- package/components/Arrow/constants.js.map +1 -1
- package/components/Arrow/default-constants.js +2 -0
- package/components/Arrow/default-constants.js.map +1 -0
- package/components/Arrow/style.js +1 -1
- package/components/Arrow/style.js.map +1 -1
- package/components/ArrowBadge/ArrowBadge.js +1 -1
- package/components/ArrowBadge/ArrowBadge.js.map +1 -1
- package/components/ArrowBadge/style.js +1 -1
- package/components/ArrowBadge/style.js.map +1 -1
- package/components/Badge/style.js +1 -1
- package/components/Badge/style.js.map +1 -1
- package/components/Button/Button.js +1 -1
- package/components/Button/Button.js.map +1 -1
- package/components/Button/constants.js +1 -1
- package/components/Button/constants.js.map +1 -1
- package/components/Button/default-constants.js +2 -0
- package/components/Button/default-constants.js.map +1 -0
- package/components/Button/style.js +1 -1
- package/components/Button/style.js.map +1 -1
- package/components/FormInputLabel/FormInputLabel.js +1 -1
- package/components/FormInputLabel/FormInputLabel.js.map +1 -1
- package/components/FormInputLabel/style.js +1 -1
- package/components/FormInputLabel/style.js.map +1 -1
- package/components/FormLabel/FormLabel.js +1 -1
- package/components/FormLabel/FormLabel.js.map +1 -1
- package/components/FormLabel/style.js +1 -1
- package/components/FormLabel/style.js.map +1 -1
- package/components/Input/Input.js +1 -1
- package/components/Input/Input.js.map +1 -1
- package/components/Input/style.js +1 -1
- package/components/Input/style.js.map +1 -1
- package/components/InputCheckbox/InputCheckbox.js +1 -1
- package/components/InputCheckbox/InputCheckbox.js.map +1 -1
- package/components/InputCheckbox/constants.js +1 -1
- package/components/InputCheckbox/constants.js.map +1 -1
- package/components/InputCheckbox/style.js +1 -1
- package/components/InputCheckbox/style.js.map +1 -1
- package/components/InputRadio/InputRadio.js +1 -1
- package/components/InputRadio/InputRadio.js.map +1 -1
- package/components/InputRadio/style.js +1 -1
- package/components/InputRadio/style.js.map +1 -1
- package/components/Tab/Tab.js +1 -1
- package/components/Tab/Tab.js.map +1 -1
- package/components/Tab/constants.js +1 -1
- package/components/Tab/constants.js.map +1 -1
- package/components/Tab/default-constants.js +2 -0
- package/components/Tab/default-constants.js.map +1 -0
- package/components/Tab/style.js +1 -1
- package/components/Tab/style.js.map +1 -1
- package/components/Text/Text.js +1 -1
- package/components/Text/Text.js.map +1 -1
- package/components/Text/constants.js +1 -1
- package/components/Text/constants.js.map +1 -1
- package/components/Text/default-constants.js +2 -0
- package/components/Text/default-constants.js.map +1 -0
- package/components/Text/style.js +1 -1
- package/components/Text/style.js.map +1 -1
- package/components/Textarea/style.js +1 -1
- package/components/Textarea/style.js.map +1 -1
- package/dts/index.d.ts +252 -200
- package/hocs/withMergedProps.js.map +1 -1
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/package.json +2 -1
- package/shared/regexp.js +1 -1
- package/shared/regexp.js.map +1 -1
package/dts/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { CSSProperties, Component, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, PureComponent } from 'react';
|
|
4
4
|
import * as styled_components from 'styled-components';
|
|
5
5
|
import { DefaultTheme, FlattenSimpleInterpolation, CSSObject, Interpolation, ThemeProps, SimpleInterpolation, css, StyledProps } from 'styled-components';
|
|
6
6
|
import { Classes } from 'react-modal';
|
|
@@ -11,59 +11,6 @@ import { Styles, Props } from 'react-floater/lib/types';
|
|
|
11
11
|
import { InputState, MaskOptions } from 'react-input-mask';
|
|
12
12
|
import { ReactSelectProps } from 'react-select';
|
|
13
13
|
|
|
14
|
-
declare type H = 'h1' | 'h2' | 'h3' | 'h4';
|
|
15
|
-
interface TextHeadingProps extends Omit<TextProps, 'content' | 'as'> {
|
|
16
|
-
/** Default set of size, lineHeight and weight props */
|
|
17
|
-
h?: H;
|
|
18
|
-
/** Children react node */
|
|
19
|
-
children?: React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @visibleName Text.Heading
|
|
24
|
-
*/
|
|
25
|
-
declare const TextHeading: {
|
|
26
|
-
(props: TextHeadingProps): JSX.Element;
|
|
27
|
-
displayName: string;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
interface TextEllipseProps extends Omit<TextProps, 'content'> {
|
|
31
|
-
/** Toggle text for folded state */
|
|
32
|
-
moreText?: string;
|
|
33
|
-
/** Toggle text for unfolded state */
|
|
34
|
-
lessText?: string;
|
|
35
|
-
/** Classname */
|
|
36
|
-
className?: string;
|
|
37
|
-
/** Html content */
|
|
38
|
-
content: string | string[];
|
|
39
|
-
/** Characters quantity for ellipsed text */
|
|
40
|
-
chars?: number;
|
|
41
|
-
/** Wrap text in quotes */
|
|
42
|
-
quoted?: boolean;
|
|
43
|
-
/** Flag to show toggler */
|
|
44
|
-
showToggler?: boolean;
|
|
45
|
-
}
|
|
46
|
-
interface TextEllipseState {
|
|
47
|
-
isUnFolded: boolean;
|
|
48
|
-
isEllipsed: boolean;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Расширен:
|
|
52
|
-
* - [`BaseProps`](#/Миксины)
|
|
53
|
-
* - [`Color`](#/Миксины)
|
|
54
|
-
* - [`Display`](#/Миксины)
|
|
55
|
-
* - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
|
|
56
|
-
*/
|
|
57
|
-
declare class TextEllipse extends Component<TextEllipseProps, TextEllipseState> {
|
|
58
|
-
static displayName: string;
|
|
59
|
-
constructor(props: TextEllipseProps);
|
|
60
|
-
componentDidUpdate({ content }: TextEllipseProps): void;
|
|
61
|
-
getContent: (props: Omit<TextEllipseProps, 'className' | 'moreText' | 'lessText' | 'showToggler'>) => "" | JSX.Element;
|
|
62
|
-
getQuted: (content: string) => string;
|
|
63
|
-
toggle: () => void;
|
|
64
|
-
render(): JSX.Element;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
14
|
declare enum DefaultColorNames {
|
|
68
15
|
white = "white",
|
|
69
16
|
black = "black",
|
|
@@ -872,110 +819,11 @@ declare type ThemePreset = 'default' | 'brand';
|
|
|
872
819
|
declare type ThemeMode = 'light' | 'dark';
|
|
873
820
|
declare type ThemeName = 'mother' | 'baby' | 'teen' | 'adult';
|
|
874
821
|
|
|
875
|
-
declare type ResponsivePropKey = 'size' | keyof CSSProperties;
|
|
876
|
-
declare type ResponsiveProps<K extends ResponsivePropKey, V> = {
|
|
877
|
-
[key in K]?: V | [DESKTOP: V, TABLET: V, MOBILE: V] | [XL: V, L: V, M: V, S: V, XS: V, XXS: V];
|
|
878
|
-
} & {
|
|
879
|
-
[key in `${K}${Breakpoint}`]?: V;
|
|
880
|
-
};
|
|
881
|
-
|
|
882
|
-
declare type SizeProperty = 'size';
|
|
883
|
-
declare type SizeValue = Size | CSSGlobalValue | number;
|
|
884
|
-
declare type ResponsiveSizeProps = ResponsiveProps<SizeProperty, SizeValue> & {
|
|
885
|
-
sizeUnits?: CSSUnit;
|
|
886
|
-
sizes?: Partial<Sizes>;
|
|
887
|
-
};
|
|
888
|
-
|
|
889
|
-
declare type MarginProperty = 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft';
|
|
890
|
-
declare type MarginValue = CSSGlobalValue | (string & {}) | number;
|
|
891
|
-
declare type ResponsiveMarginProps = ResponsiveProps<MarginProperty, MarginValue> & {
|
|
892
|
-
marginUnits?: CSSUnit;
|
|
893
|
-
};
|
|
894
|
-
|
|
895
|
-
declare type ColorPropertyVariants = 'color' | 'fontColor' | `${string}Color` | `color${string}`;
|
|
896
|
-
declare type ColorCalcProperty = (_color: CSSColor) => FlattenSimpleInterpolation | null;
|
|
897
|
-
declare type ColorCssProperty = string | ColorCalcProperty;
|
|
898
|
-
declare type ColorProperty<T extends ColorPropertyVariants = 'color'> = {
|
|
899
|
-
[key in `${T}`]?: Color;
|
|
900
|
-
};
|
|
901
|
-
declare const color: (color?: Color | string, cssProperty?: ColorCssProperty) => () => (props: {
|
|
902
|
-
theme: DefaultTheme;
|
|
903
|
-
}) => FlattenSimpleInterpolation | null;
|
|
904
|
-
|
|
905
|
-
declare type Display = 'block' | 'inline' | 'inline-block' | 'flex' | 'inline-flex' | 'table-cell' | 'inherit' | 'none';
|
|
906
|
-
interface DisplayProperty {
|
|
907
|
-
display?: Display;
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
declare type TypographyAppearance = 'display' | 'heading' | 'subheading' | 'subheading-compact' | 'body' | 'caption';
|
|
911
|
-
interface TextProps extends ResponsiveSizeProps, ResponsiveMarginProps, DisplayProperty, ColorProperty, BaseProps, Omit<React.ComponentPropsWithRef<'div'>, 'color'> {
|
|
912
|
-
/** Root node polymorphic type */
|
|
913
|
-
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span';
|
|
914
|
-
/** Predefined styles and sizes */
|
|
915
|
-
appearance?: TypographyAppearance;
|
|
916
|
-
/** Font family */
|
|
917
|
-
fontFamily?: string;
|
|
918
|
-
/** Font weight */
|
|
919
|
-
weight?: CSSFontWeight;
|
|
920
|
-
/** White space */
|
|
921
|
-
whiteSpace?: string;
|
|
922
|
-
/** Font style */
|
|
923
|
-
fontStyle?: 'normal' | 'italic';
|
|
924
|
-
/** Text transform */
|
|
925
|
-
transform?: 'capitalize' | 'uppercase' | 'lowercase';
|
|
926
|
-
/** Underline content */
|
|
927
|
-
underline?: CSSBorderStyle | boolean;
|
|
928
|
-
/** Text align */
|
|
929
|
-
textAlign?: 'left' | 'center' | 'right' | 'justify' | 'start' | 'end';
|
|
930
|
-
/** Line height */
|
|
931
|
-
lineHeight?: 'l' | 'm' | 's' | 'xs' | number;
|
|
932
|
-
/** React children */
|
|
933
|
-
children?: React.ReactNode;
|
|
934
|
-
/** @ignore @deprecated Use Anchor interface */
|
|
935
|
-
underlineLinks?: boolean;
|
|
936
|
-
/** @ignore @deprecated Use children */
|
|
937
|
-
content?: string;
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
/**
|
|
941
|
-
*
|
|
942
|
-
* Component accepts all \<div\> attributes.
|
|
943
|
-
*
|
|
944
|
-
* Responsive "size", "margin" props are supported.
|
|
945
|
-
*
|
|
946
|
-
* Exposed "ref" attached to root node.
|
|
947
|
-
*
|
|
948
|
-
* See full [TextProps](https://github.com/foxford/ui/blob/master/src/components/Text/types.ts)
|
|
949
|
-
*/
|
|
950
|
-
declare const Text: React.ForwardRefExoticComponent<TextProps> & {
|
|
951
|
-
Heading: typeof TextHeading;
|
|
952
|
-
Ellipse: typeof TextEllipse;
|
|
953
|
-
};
|
|
954
|
-
|
|
955
822
|
interface BaseProps {
|
|
956
823
|
preset?: ThemePreset;
|
|
957
824
|
className?: string;
|
|
958
825
|
style?: React.CSSProperties;
|
|
959
|
-
cursor?: string;
|
|
960
826
|
}
|
|
961
|
-
declare type ColorPaletteProps<T extends ColorPaletteKey = ColorPaletteKey> = {
|
|
962
|
-
palette?: Partial<Record<T, Color>>;
|
|
963
|
-
};
|
|
964
|
-
declare type ColorPaletteInterpolationProps<K extends ColorPaletteKey, T extends ColorPaletteProps<K>> = Omit<T, 'palette'> & {
|
|
965
|
-
palette: Partial<Record<K, CSSColor>>;
|
|
966
|
-
};
|
|
967
|
-
declare type ColorSchemaProps = {
|
|
968
|
-
primary?: boolean;
|
|
969
|
-
secondary?: boolean;
|
|
970
|
-
tertiary?: boolean;
|
|
971
|
-
quaternary?: boolean;
|
|
972
|
-
};
|
|
973
|
-
declare type TypographyProps = {
|
|
974
|
-
textProps?: TextProps;
|
|
975
|
-
};
|
|
976
|
-
declare type RenderProps<T> = T & {
|
|
977
|
-
baseTextProps: Partial<TextProps>;
|
|
978
|
-
};
|
|
979
827
|
|
|
980
828
|
/**
|
|
981
829
|
* Converts HEX color code to RGB(A) string
|
|
@@ -1052,6 +900,139 @@ declare const responsiveNamedProperty: <T extends PropsProperties>({ sizes, pred
|
|
|
1052
900
|
*/
|
|
1053
901
|
declare const responsiveProperty: (propName: string, cssProperty?: string | null, sizing?: null | string) => () => (props: any) => styled_components.FlattenInterpolation<styled_components.ThemeProps<styled_components.DefaultTheme>> | null;
|
|
1054
902
|
|
|
903
|
+
declare type H = 'h1' | 'h2' | 'h3' | 'h4';
|
|
904
|
+
interface TextHeadingProps extends Omit<TextProps, 'content' | 'as'> {
|
|
905
|
+
/** Default set of size, lineHeight and weight props */
|
|
906
|
+
h?: H;
|
|
907
|
+
/** Children react node */
|
|
908
|
+
children?: React.ReactNode;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* @visibleName Text.Heading
|
|
913
|
+
*/
|
|
914
|
+
declare const TextHeading: {
|
|
915
|
+
(props: TextHeadingProps): JSX.Element;
|
|
916
|
+
displayName: string;
|
|
917
|
+
};
|
|
918
|
+
|
|
919
|
+
interface TextEllipseProps extends Omit<TextProps, 'content'> {
|
|
920
|
+
/** Toggle text for folded state */
|
|
921
|
+
moreText?: string;
|
|
922
|
+
/** Toggle text for unfolded state */
|
|
923
|
+
lessText?: string;
|
|
924
|
+
/** Classname */
|
|
925
|
+
className?: string;
|
|
926
|
+
/** Html content */
|
|
927
|
+
content: string | string[];
|
|
928
|
+
/** Characters quantity for ellipsed text */
|
|
929
|
+
chars?: number;
|
|
930
|
+
/** Wrap text in quotes */
|
|
931
|
+
quoted?: boolean;
|
|
932
|
+
/** Flag to show toggler */
|
|
933
|
+
showToggler?: boolean;
|
|
934
|
+
}
|
|
935
|
+
interface TextEllipseState {
|
|
936
|
+
isUnFolded: boolean;
|
|
937
|
+
isEllipsed: boolean;
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* Расширен:
|
|
941
|
+
* - [`BaseProps`](#/Миксины)
|
|
942
|
+
* - [`Color`](#/Миксины)
|
|
943
|
+
* - [`Display`](#/Миксины)
|
|
944
|
+
* - [`ResponsiveNamedProperty<'size'>`](#/Миксины)
|
|
945
|
+
*/
|
|
946
|
+
declare class TextEllipse extends Component<TextEllipseProps, TextEllipseState> {
|
|
947
|
+
static displayName: string;
|
|
948
|
+
constructor(props: TextEllipseProps);
|
|
949
|
+
componentDidUpdate({ content }: TextEllipseProps): void;
|
|
950
|
+
getContent: (props: Omit<TextEllipseProps, 'className' | 'moreText' | 'lessText' | 'showToggler'>) => "" | JSX.Element;
|
|
951
|
+
getQuted: (content: string) => string;
|
|
952
|
+
toggle: () => void;
|
|
953
|
+
render(): JSX.Element;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
declare type ResponsivePropKey = 'size' | keyof CSSProperties;
|
|
957
|
+
declare type ResponsiveProps<K extends ResponsivePropKey, V> = {
|
|
958
|
+
[key in K]?: V | [DESKTOP: V, TABLET: V, MOBILE: V] | [XL: V, L: V, M: V, S: V, XS: V, XXS: V];
|
|
959
|
+
} & {
|
|
960
|
+
[key in `${K}${Breakpoint}`]?: V;
|
|
961
|
+
};
|
|
962
|
+
|
|
963
|
+
declare type SizeProperty = 'size';
|
|
964
|
+
declare type SizeValue = Size | CSSGlobalValue | number;
|
|
965
|
+
declare type ResponsiveSizeProps = ResponsiveProps<SizeProperty, SizeValue> & {
|
|
966
|
+
sizeUnits?: CSSUnit;
|
|
967
|
+
sizes?: Partial<Sizes>;
|
|
968
|
+
};
|
|
969
|
+
|
|
970
|
+
declare type MarginProperty = 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft';
|
|
971
|
+
declare type MarginValue = CSSGlobalValue | (string & {}) | number;
|
|
972
|
+
declare type ResponsiveMarginProps = ResponsiveProps<MarginProperty, MarginValue> & {
|
|
973
|
+
marginUnits?: CSSUnit;
|
|
974
|
+
};
|
|
975
|
+
|
|
976
|
+
declare type ColorPropertyVariants = 'color' | 'fontColor' | `${string}Color` | `color${string}`;
|
|
977
|
+
declare type ColorCalcProperty = (_color: CSSColor) => FlattenSimpleInterpolation | null;
|
|
978
|
+
declare type ColorCssProperty = string | ColorCalcProperty;
|
|
979
|
+
declare type ColorProperty<T extends ColorPropertyVariants = 'color'> = {
|
|
980
|
+
[key in `${T}`]?: Color;
|
|
981
|
+
};
|
|
982
|
+
declare const color: (color?: Color | string, cssProperty?: ColorCssProperty) => () => (props: {
|
|
983
|
+
theme: DefaultTheme;
|
|
984
|
+
}) => FlattenSimpleInterpolation | null;
|
|
985
|
+
|
|
986
|
+
declare type Display = 'block' | 'inline' | 'inline-block' | 'flex' | 'inline-flex' | 'table-cell' | 'inherit' | 'none';
|
|
987
|
+
interface DisplayProperty {
|
|
988
|
+
display?: Display;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
declare type TypographyAppearance = 'display' | 'heading' | 'subheading' | 'subheading-compact' | 'body' | 'caption';
|
|
992
|
+
interface TextProps extends ResponsiveSizeProps, ResponsiveMarginProps, DisplayProperty, ColorProperty, Omit<React.ComponentPropsWithRef<'div'>, 'color'> {
|
|
993
|
+
/** Root node polymorphic type */
|
|
994
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span';
|
|
995
|
+
/** Predefined styles and sizes */
|
|
996
|
+
appearance?: TypographyAppearance;
|
|
997
|
+
/** Font family */
|
|
998
|
+
fontFamily?: string;
|
|
999
|
+
/** Font weight */
|
|
1000
|
+
weight?: CSSFontWeight;
|
|
1001
|
+
/** White space */
|
|
1002
|
+
whiteSpace?: string;
|
|
1003
|
+
/** Font style */
|
|
1004
|
+
fontStyle?: 'normal' | 'italic';
|
|
1005
|
+
/** Text transform */
|
|
1006
|
+
transform?: 'capitalize' | 'uppercase' | 'lowercase';
|
|
1007
|
+
/** Underline content */
|
|
1008
|
+
underline?: CSSBorderStyle | boolean;
|
|
1009
|
+
/** Text align */
|
|
1010
|
+
textAlign?: 'left' | 'center' | 'right' | 'justify' | 'start' | 'end';
|
|
1011
|
+
/** Line height */
|
|
1012
|
+
lineHeight?: 'l' | 'm' | 's' | 'xs' | number;
|
|
1013
|
+
/** React children */
|
|
1014
|
+
children?: React.ReactNode;
|
|
1015
|
+
/** @ignore @deprecated Use Anchor interface */
|
|
1016
|
+
underlineLinks?: boolean;
|
|
1017
|
+
/** @ignore @deprecated Use children */
|
|
1018
|
+
content?: string;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
*
|
|
1023
|
+
* Component accepts all \<div\> attributes.
|
|
1024
|
+
*
|
|
1025
|
+
* Responsive "size", "margin" props are supported.
|
|
1026
|
+
*
|
|
1027
|
+
* Exposed "ref" attached to root node.
|
|
1028
|
+
*
|
|
1029
|
+
* See full [TextProps](https://github.com/foxford/ui/blob/master/src/components/Text/types.ts)
|
|
1030
|
+
*/
|
|
1031
|
+
declare const Text: React.ForwardRefExoticComponent<TextProps> & {
|
|
1032
|
+
Heading: typeof TextHeading;
|
|
1033
|
+
Ellipse: typeof TextEllipse;
|
|
1034
|
+
};
|
|
1035
|
+
|
|
1055
1036
|
declare global {
|
|
1056
1037
|
// Some users of this package are don't use "dom" libs
|
|
1057
1038
|
interface EventTarget {}
|
|
@@ -1252,17 +1233,25 @@ declare type AnchorPalette = {
|
|
|
1252
1233
|
colorHover: CSSColor;
|
|
1253
1234
|
colorDisabled: CSSColor;
|
|
1254
1235
|
};
|
|
1255
|
-
interface AnchorProps extends ResponsiveSizeProps, ResponsiveMarginProps,
|
|
1236
|
+
interface AnchorProps extends ResponsiveSizeProps, ResponsiveMarginProps, Omit<React.ComponentPropsWithRef<'a'>, 'color' | 'children'>,
|
|
1256
1237
|
/** @deprecated Use palette */
|
|
1257
1238
|
ColorProperty<'color'>,
|
|
1258
1239
|
/** @deprecated Use children as function */
|
|
1259
1240
|
DisplayProperty {
|
|
1241
|
+
/** UI: brand (v3), or default (v2) */
|
|
1242
|
+
preset?: ThemePreset;
|
|
1260
1243
|
/** React children */
|
|
1261
|
-
children?: React.ReactNode | ((props:
|
|
1244
|
+
children?: React.ReactNode | ((props: {
|
|
1245
|
+
baseTextProps: Partial<TextProps>;
|
|
1246
|
+
textProps: TextProps;
|
|
1262
1247
|
iconBaseProps: Partial<IconProps>;
|
|
1263
1248
|
iconProps: AnchorProps['iconProps'];
|
|
1264
1249
|
icon: AnchorProps['icon'];
|
|
1265
|
-
}
|
|
1250
|
+
}) => React.ReactNode);
|
|
1251
|
+
/** Custom colors */
|
|
1252
|
+
palette?: Partial<Record<keyof AnchorPalette, Color>>;
|
|
1253
|
+
/** Props for text component */
|
|
1254
|
+
textProps?: TextProps;
|
|
1266
1255
|
/** Underline text content */
|
|
1267
1256
|
underline?: CSSBorderStyle | boolean;
|
|
1268
1257
|
/** Icons before and after content */
|
|
@@ -1319,7 +1308,7 @@ declare type ButtonPalette = {
|
|
|
1319
1308
|
borderColorDisabled: CSSColor;
|
|
1320
1309
|
shadowColor: CSSColor;
|
|
1321
1310
|
};
|
|
1322
|
-
interface ButtonProps extends
|
|
1311
|
+
interface ButtonProps extends ResponsiveSizeProps, ColorProperty, ColorProperty<'fontColor'>, ResponsiveNamedProperty<'margin'>, ResponsiveNamedProperty<'marginTop'>, ResponsiveNamedProperty<'marginRight'>, ResponsiveNamedProperty<'marginBottom'>, ResponsiveNamedProperty<'marginLeft'>, ResponsiveNamedProperty<'fluid', boolean>, ResponsiveNamedProperty<'width', 'auto' | 'l' | 'm' | 's' | 'xs' | number>, Omit<React.ComponentPropsWithRef<'button'>, 'color' | 'children'>,
|
|
1323
1312
|
/** @deprecated Use children as function or inline prop */
|
|
1324
1313
|
DisplayProperty,
|
|
1325
1314
|
/** @deprecated */
|
|
@@ -1336,12 +1325,20 @@ ResponsiveNamedProperty<'paddingLeft'>,
|
|
|
1336
1325
|
ResponsiveNamedProperty<'fontSize'>,
|
|
1337
1326
|
/** @deprecated Use size props */
|
|
1338
1327
|
ResponsiveNamedProperty<'height', 'l' | 'm' | 's' | 'xs' | number> {
|
|
1328
|
+
/** UI: brand (v3), or default (v2) */
|
|
1329
|
+
preset?: ThemePreset;
|
|
1330
|
+
/** Custom colors */
|
|
1331
|
+
palette?: Partial<Record<keyof ButtonPalette, Color>>;
|
|
1339
1332
|
/** React children */
|
|
1340
|
-
children?: React.ReactNode | ((props:
|
|
1333
|
+
children?: React.ReactNode | ((props: {
|
|
1334
|
+
baseTextProps: Partial<TextProps>;
|
|
1335
|
+
textProps: TextProps;
|
|
1341
1336
|
iconBaseProps: Partial<IconProps>;
|
|
1342
1337
|
iconProps: ButtonProps['iconProps'];
|
|
1343
1338
|
icon: ButtonProps['icon'];
|
|
1344
|
-
}
|
|
1339
|
+
}) => React.ReactNode);
|
|
1340
|
+
/** Props for text component */
|
|
1341
|
+
textProps?: TextProps;
|
|
1345
1342
|
/** Display inline */
|
|
1346
1343
|
inline?: boolean;
|
|
1347
1344
|
/** Icons before and after content */
|
|
@@ -1481,7 +1478,11 @@ declare type ArrowPalette = {
|
|
|
1481
1478
|
borderColorDisabled: CSSColor;
|
|
1482
1479
|
shadowColor: CSSColor;
|
|
1483
1480
|
};
|
|
1484
|
-
interface ArrowProps extends
|
|
1481
|
+
interface ArrowProps extends ResponsiveSizeProps, ResponsiveMarginProps, Omit<React.ComponentPropsWithRef<'button'>, 'children'> {
|
|
1482
|
+
/** UI: brand (v3), or default (v2) */
|
|
1483
|
+
preset?: ThemePreset;
|
|
1484
|
+
/** Custom colors */
|
|
1485
|
+
palette?: Partial<Record<keyof ArrowPalette, Color>>;
|
|
1485
1486
|
/** Props for icon component */
|
|
1486
1487
|
iconProps?: IconProps;
|
|
1487
1488
|
/** Shape variant */
|
|
@@ -1531,7 +1532,9 @@ declare type InputCheckboxPalette = {
|
|
|
1531
1532
|
backgroundColorDisabledChecked: CSSColor;
|
|
1532
1533
|
borderColorDisabledChecked: CSSColor;
|
|
1533
1534
|
};
|
|
1534
|
-
interface InputCheckboxProps extends
|
|
1535
|
+
interface InputCheckboxProps extends ResponsiveSizeProps, Omit<React.ComponentPropsWithRef<'input'>, 'size' | 'children'> {
|
|
1536
|
+
/** Custom colors */
|
|
1537
|
+
palette?: Partial<Record<keyof InputCheckboxPalette, Color>>;
|
|
1535
1538
|
/** Display inline */
|
|
1536
1539
|
inline?: boolean;
|
|
1537
1540
|
/** Indeterminate state appearance */
|
|
@@ -1588,7 +1591,9 @@ declare enum SizeInput {
|
|
|
1588
1591
|
xs = 140
|
|
1589
1592
|
}
|
|
1590
1593
|
|
|
1591
|
-
interface TextareaProps extends
|
|
1594
|
+
interface TextareaProps extends ColorProperty, ColorProperty<'placeholderColor'>, ResponsiveNamedProperty<'width', 'auto' | keyof typeof SizeInput | number>, Omit<React.ComponentPropsWithoutRef<'textarea'>, 'color'> {
|
|
1595
|
+
/** UI: brand (v3), or default (v2) */
|
|
1596
|
+
preset?: ThemePreset;
|
|
1592
1597
|
/** Specifies the visible max number of lines in a text area */
|
|
1593
1598
|
maxRows?: number;
|
|
1594
1599
|
/** Value */
|
|
@@ -1608,7 +1613,9 @@ declare const Textarea: {
|
|
|
1608
1613
|
displayName: string;
|
|
1609
1614
|
};
|
|
1610
1615
|
|
|
1611
|
-
interface SwitcherProps extends
|
|
1616
|
+
interface SwitcherProps extends ColorProperty<'color'>, ColorProperty<'inactiveColor'> {
|
|
1617
|
+
/** UI: brand (v3), or default (v2) */
|
|
1618
|
+
preset?: ThemePreset;
|
|
1612
1619
|
/** Input id */
|
|
1613
1620
|
id?: string;
|
|
1614
1621
|
/** Input name */
|
|
@@ -1631,13 +1638,28 @@ declare type ArrowBadgePalette = {
|
|
|
1631
1638
|
color: CSSColor;
|
|
1632
1639
|
backgroundColor: CSSColor;
|
|
1633
1640
|
};
|
|
1634
|
-
interface ArrowBadgeProps extends ResponsiveSizeProps, ResponsiveMarginProps,
|
|
1641
|
+
interface ArrowBadgeProps extends ResponsiveSizeProps, ResponsiveMarginProps,
|
|
1635
1642
|
/** @deprecated Use palette */
|
|
1636
1643
|
ColorProperty<'color'>,
|
|
1637
1644
|
/** @deprecated Use palette */
|
|
1638
|
-
ColorProperty<'backgroundColor'>,
|
|
1645
|
+
ColorProperty<'backgroundColor'>, Omit<React.ComponentPropsWithRef<'div'>, 'color' | 'children'> {
|
|
1639
1646
|
/** React children */
|
|
1640
|
-
children: React.ReactNode | ((props:
|
|
1647
|
+
children: React.ReactNode | ((props: {
|
|
1648
|
+
baseTextProps: Partial<TextProps>;
|
|
1649
|
+
textProps: TextProps;
|
|
1650
|
+
}) => React.ReactNode);
|
|
1651
|
+
/** Custom colors */
|
|
1652
|
+
palette?: Partial<Record<keyof ArrowBadgePalette, Color>>;
|
|
1653
|
+
/** Props for text component */
|
|
1654
|
+
textProps?: TextProps;
|
|
1655
|
+
/** Appearance variant */
|
|
1656
|
+
primary?: boolean;
|
|
1657
|
+
/** Appearance variant */
|
|
1658
|
+
secondary?: boolean;
|
|
1659
|
+
/** Appearance variant */
|
|
1660
|
+
tertiary?: boolean;
|
|
1661
|
+
/** Appearance variant */
|
|
1662
|
+
quaternary?: boolean;
|
|
1641
1663
|
/** Pointed left */
|
|
1642
1664
|
left?: boolean;
|
|
1643
1665
|
/** Pointed right */
|
|
@@ -1669,33 +1691,42 @@ declare type TabPalette = {
|
|
|
1669
1691
|
backgroundColorDisabled: CSSColor;
|
|
1670
1692
|
borderColorDisabled: CSSColor;
|
|
1671
1693
|
};
|
|
1672
|
-
interface TabProps extends ResponsiveSizeProps, ResponsiveMarginProps,
|
|
1673
|
-
/** Use palette
|
|
1694
|
+
interface TabProps extends ResponsiveSizeProps, ResponsiveMarginProps,
|
|
1695
|
+
/** @deprecated Use palette */
|
|
1674
1696
|
ColorProperty<'color'>,
|
|
1675
|
-
/** Use palette
|
|
1676
|
-
ColorProperty<'borderColor'>,
|
|
1677
|
-
/**
|
|
1678
|
-
|
|
1697
|
+
/** @deprecated Use palette */
|
|
1698
|
+
ColorProperty<'borderColor'>, Omit<React.ComponentPropsWithRef<'button'>, 'color' | 'children'> {
|
|
1699
|
+
/** UI: brand (v3), or default (v2) */
|
|
1700
|
+
preset?: ThemePreset;
|
|
1701
|
+
/** Custom colors */
|
|
1702
|
+
palette?: Partial<Record<keyof TabPalette, Color>>;
|
|
1679
1703
|
/** React children */
|
|
1680
|
-
children: React.ReactNode | ((props:
|
|
1681
|
-
|
|
1704
|
+
children: React.ReactNode | ((props: {
|
|
1705
|
+
textProps: TextProps;
|
|
1706
|
+
baseTextProps: Partial<TextProps>;
|
|
1707
|
+
}) => React.ReactNode);
|
|
1708
|
+
/** Props for text component */
|
|
1709
|
+
textProps?: TextProps;
|
|
1710
|
+
/** Active appearance */
|
|
1682
1711
|
active?: boolean;
|
|
1683
|
-
/** Appearance variant
|
|
1712
|
+
/** Appearance variant */
|
|
1684
1713
|
outline?: boolean;
|
|
1685
|
-
/** Appearance variant
|
|
1714
|
+
/** Appearance variant */
|
|
1686
1715
|
onColored?: boolean;
|
|
1687
|
-
/** Appearance variant
|
|
1716
|
+
/** Appearance variant */
|
|
1717
|
+
black?: boolean;
|
|
1718
|
+
/** Pointed left */
|
|
1719
|
+
left?: boolean;
|
|
1720
|
+
/** Pointed right */
|
|
1721
|
+
right?: boolean;
|
|
1722
|
+
/** Border radius applied */
|
|
1723
|
+
rounded?: boolean;
|
|
1724
|
+
/** @ignore */
|
|
1688
1725
|
compact?: boolean;
|
|
1689
|
-
/**
|
|
1726
|
+
/** @ignore */
|
|
1690
1727
|
crispy?: boolean;
|
|
1691
|
-
/**
|
|
1728
|
+
/** @ignore */
|
|
1692
1729
|
crispyCompact?: boolean;
|
|
1693
|
-
/** Pointed left (brand preset) */
|
|
1694
|
-
left?: boolean;
|
|
1695
|
-
/** Pointed right (brand preset) */
|
|
1696
|
-
right?: boolean;
|
|
1697
|
-
/** Border radius applied (brand preset) */
|
|
1698
|
-
rounded?: number;
|
|
1699
1730
|
/** @ignore @deprecated Use button interface */
|
|
1700
1731
|
as?: React.ElementType<any>;
|
|
1701
1732
|
/** @ignore @deprecated Use compact, crispy, crispyCompact */
|
|
@@ -1718,17 +1749,31 @@ declare type BadgePalette = {
|
|
|
1718
1749
|
color: CSSColor;
|
|
1719
1750
|
backgroundColor: CSSColor;
|
|
1720
1751
|
};
|
|
1721
|
-
interface BadgeProps extends ResponsiveSizeProps, ResponsiveMarginProps,
|
|
1752
|
+
interface BadgeProps extends ResponsiveSizeProps, ResponsiveMarginProps,
|
|
1722
1753
|
/** @deprecated Use palette */
|
|
1723
1754
|
ColorProperty,
|
|
1724
1755
|
/** @deprecated Use children as function */
|
|
1725
|
-
DisplayProperty,
|
|
1756
|
+
DisplayProperty, Omit<React.ComponentPropsWithRef<'div'>, 'color' | 'children'> {
|
|
1726
1757
|
/** React children */
|
|
1727
|
-
children?: React.ReactNode | ((props:
|
|
1758
|
+
children?: React.ReactNode | ((props: {
|
|
1759
|
+
baseTextProps: Partial<TextProps>;
|
|
1760
|
+
textProps: TextProps;
|
|
1728
1761
|
iconBaseProps: Partial<IconProps>;
|
|
1729
1762
|
iconProps: BadgeProps['iconProps'];
|
|
1730
1763
|
icon: BadgeProps['icon'];
|
|
1731
|
-
}
|
|
1764
|
+
}) => React.ReactNode);
|
|
1765
|
+
/** Custom colors */
|
|
1766
|
+
palette?: Partial<Record<keyof BadgePalette, Color>>;
|
|
1767
|
+
/** Props for text component */
|
|
1768
|
+
textProps?: TextProps;
|
|
1769
|
+
/** Appearance variant */
|
|
1770
|
+
primary?: boolean;
|
|
1771
|
+
/** Appearance variant */
|
|
1772
|
+
secondary?: boolean;
|
|
1773
|
+
/** Appearance variant */
|
|
1774
|
+
tertiary?: boolean;
|
|
1775
|
+
/** Appearance variant */
|
|
1776
|
+
quaternary?: boolean;
|
|
1732
1777
|
/** Appearance variant */
|
|
1733
1778
|
round?: boolean;
|
|
1734
1779
|
/** Root border radius */
|
|
@@ -3234,22 +3279,17 @@ declare class InputPhone extends PureComponent<typeof InputPhone.defaultProps &
|
|
|
3234
3279
|
render(): JSX.Element;
|
|
3235
3280
|
}
|
|
3236
3281
|
|
|
3237
|
-
declare type
|
|
3282
|
+
declare type InputPalette = {
|
|
3238
3283
|
color: CSSColor;
|
|
3239
3284
|
backgroundColor: CSSColor;
|
|
3240
3285
|
borderColor: CSSColor;
|
|
3241
3286
|
colorHover: CSSColor;
|
|
3242
3287
|
backgroundColorHover: CSSColor;
|
|
3243
3288
|
borderColorHover: CSSColor;
|
|
3244
|
-
};
|
|
3245
|
-
|
|
3246
|
-
declare type InputPalette = {
|
|
3247
3289
|
inputColor: CSSColor;
|
|
3248
3290
|
inputPlaceholderColor: CSSColor;
|
|
3249
3291
|
inputColorDisabled: CSSColor;
|
|
3250
3292
|
inputPlaceholderColorDisabled: CSSColor;
|
|
3251
|
-
};
|
|
3252
|
-
declare type InputControlsPalette = {
|
|
3253
3293
|
controlsColor: CSSColor;
|
|
3254
3294
|
controlsBackgroundColor: CSSColor;
|
|
3255
3295
|
controlsSeparatorColor: CSSColor;
|
|
@@ -3260,13 +3300,17 @@ declare type InputControlsPalette = {
|
|
|
3260
3300
|
controlsColorDisabled: CSSColor;
|
|
3261
3301
|
controlsBackgroundColorDisabled: CSSColor;
|
|
3262
3302
|
};
|
|
3263
|
-
interface InputProps extends
|
|
3303
|
+
interface InputProps extends ResponsiveSizeProps, ResponsiveMarginProps, Omit<React.ComponentPropsWithRef<'input'>, 'children' | 'size' | 'type' | 'value' | 'defaultValue' | 'color' | 'width'>,
|
|
3264
3304
|
/** @deprecated Use palette */
|
|
3265
3305
|
ColorProperty,
|
|
3266
3306
|
/** @deprecated Use palette */
|
|
3267
3307
|
ColorProperty<'placeholderColor'>,
|
|
3268
3308
|
/** @ignore Control width with container */
|
|
3269
3309
|
ResponsiveNamedProperty<'width', 'auto' | keyof typeof SizeInput | number> {
|
|
3310
|
+
/** UI: brand (v3), or default (v2) */
|
|
3311
|
+
preset?: ThemePreset;
|
|
3312
|
+
/** Custom colors */
|
|
3313
|
+
palette?: Partial<Record<keyof InputPalette, Color>>;
|
|
3270
3314
|
/** Input mask.
|
|
3271
3315
|
* Look up [docs v2.0.4](https://www.npmjs.com/package/react-input-mask/v/2.0.4?activeTab=code) */
|
|
3272
3316
|
mask?: string;
|
|
@@ -3295,6 +3339,8 @@ ResponsiveNamedProperty<'width', 'auto' | keyof typeof SizeInput | number> {
|
|
|
3295
3339
|
icon?: JSX.Element;
|
|
3296
3340
|
/** Props for icon component */
|
|
3297
3341
|
iconProps?: IconProps;
|
|
3342
|
+
/** Props for text component */
|
|
3343
|
+
textProps?: TextProps;
|
|
3298
3344
|
/** Input controls */
|
|
3299
3345
|
controls?: {
|
|
3300
3346
|
additional?: {
|
|
@@ -3368,7 +3414,9 @@ declare type InputRadioPalette = {
|
|
|
3368
3414
|
backgroundColorDisabledChecked: CSSColor;
|
|
3369
3415
|
borderColorDisabledChecked: CSSColor;
|
|
3370
3416
|
};
|
|
3371
|
-
interface InputRadioProps extends
|
|
3417
|
+
interface InputRadioProps extends ResponsiveSizeProps, Omit<React.ComponentPropsWithRef<'input'>, 'size' | 'children'> {
|
|
3418
|
+
/** Custom colors */
|
|
3419
|
+
palette?: Partial<Record<keyof InputRadioPalette, Color>>;
|
|
3372
3420
|
/** Display inline */
|
|
3373
3421
|
inline?: boolean;
|
|
3374
3422
|
/** Appearance variant */
|
|
@@ -3494,9 +3542,13 @@ declare type FormLabelPalette = {
|
|
|
3494
3542
|
backgroundColorHover: CSSColor;
|
|
3495
3543
|
borderColorHover: CSSColor;
|
|
3496
3544
|
};
|
|
3497
|
-
interface FormLabelProps extends
|
|
3545
|
+
interface FormLabelProps extends ResponsiveSizeProps, ResponsiveMarginProps, React.ComponentPropsWithRef<'label'> {
|
|
3546
|
+
/** Custom colors */
|
|
3547
|
+
palette?: Partial<Record<keyof FormLabelPalette, Color>>;
|
|
3498
3548
|
/** Render radio or checkbox input */
|
|
3499
|
-
control: JSX.Element | ((props: Required<Pick<FormLabelProps, 'size'>> & Pick<FormLabelProps, 'sizeXXS' | 'sizeXS' | 'sizeS' | 'sizeM' | 'sizeL' | 'sizeXL' | '
|
|
3549
|
+
control: JSX.Element | ((props: Required<Pick<FormLabelProps, 'size'>> & Pick<FormLabelProps, 'sizeXXS' | 'sizeXS' | 'sizeS' | 'sizeM' | 'sizeL' | 'sizeXL' | 'disabled' | 'error' | 'success' | 'checked' | 'onColored'>) => JSX.Element);
|
|
3550
|
+
/** Props for text component */
|
|
3551
|
+
textProps?: TextProps;
|
|
3500
3552
|
/** Text content */
|
|
3501
3553
|
label?: React.ReactNode;
|
|
3502
3554
|
/** Display inline */
|
|
@@ -3527,4 +3579,4 @@ interface FormLabelProps extends BaseProps, TypographyProps, ResponsiveSizeProps
|
|
|
3527
3579
|
*/
|
|
3528
3580
|
declare const FormLabel: React.ForwardRefExoticComponent<FormLabelProps>;
|
|
3529
3581
|
|
|
3530
|
-
export { ActionBtn, Alert, Amount, Anchor, Arrow, ArrowBadge, Avatar, Badge, BaseProps, Breakpoint, Button, COUNTRY_DATA, CSSBorderStyle, CSSColor, CSSFontWeight, CSSGlobalValue, CSSUnit, CSSVerticalAlign, CURRENCY_MAP, Checkbox, Color, ColorNames,
|
|
3582
|
+
export { ActionBtn, Alert, Amount, Anchor, Arrow, ArrowBadge, Avatar, Badge, BaseProps, Breakpoint, Button, COUNTRY_DATA, CSSBorderStyle, CSSColor, CSSFontWeight, CSSGlobalValue, CSSUnit, CSSVerticalAlign, CURRENCY_MAP, Checkbox, Color, ColorNames, ColorPaletteKey, Container, ContextMenu, CurrencyCodes, DEFAULT_MASK, FormLabel, HEX, INITIAL_MASK, Icon, Input, Modal, Nullable, Paper, Progress, RGB, RGBA, Radio, withThemeScrollable as Scrollable, Section, Select, Separator, Size, Sizes, Spacer, Spinner, Switcher, Tab, Tabs, Tag, Text, Textarea, Theme, ThemeMode, ThemeName, ThemePreset, ThemeProvider, Tooltip, adultDarkTheme, adultLightTheme, babyDarkTheme, babyLightTheme, baseInputStyle, buildMediaQuery, color, defaultIcons, desktopFirst, hexToRgbA, isHex, 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withMergedProps.js","sources":["../../../src/hocs/withMergedProps.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { mergeDeepLeft } from 'ramda'\nimport type { DefaultTheme } from 'styled-components'\nimport type {
|
|
1
|
+
{"version":3,"file":"withMergedProps.js","sources":["../../../src/hocs/withMergedProps.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { mergeDeepLeft } from 'ramda'\nimport type { DefaultTheme } from 'styled-components'\nimport type { ResponsiveSizeProps } from 'mixins/responsive-size'\nimport type { CSSColor, Sizes, Color, ThemePreset, ColorPaletteKey } from 'shared/types'\n\nconst injectThemeColors = (\n colors: Partial<Record<ColorPaletteKey, Color>> = {},\n theme: DefaultTheme\n): Partial<Record<ColorPaletteKey, CSSColor>> =>\n Object.keys(colors).reduce((resultColors, colorKey) => {\n const color = colors[colorKey]\n resultColors[colorKey] = theme.colors[color] ?? color\n return resultColors\n }, {} as Record<ColorPaletteKey, CSSColor>)\n\nexport const withMergedProps = <\n T extends ResponsiveSizeProps & {\n preset?: ThemePreset\n palette?: Partial<Record<ColorPaletteKey, Color>>\n },\n P extends HTMLElement = HTMLElement\n>(\n Component: React.FC<\n Omit<T, 'sizes' | 'preset' | 'palette'> & {\n sizes: Sizes\n preset: ThemePreset\n palette: Partial<Record<ColorPaletteKey, CSSColor>>\n } & React.RefAttributes<P>\n >,\n options: {\n displayName: string\n sizes: Sizes | ((props: Omit<T, 'sizes' | 'preset'> & { preset: ThemePreset }) => Sizes)\n }\n) => {\n const WithMergedProps = forwardRef<P, T>((props, ref) => {\n const theme = useTheme()\n\n const forwardProps = mergeDeepLeft(props, theme.components?.[options.displayName] ?? {}) as T\n const preset = forwardProps.preset ?? theme.preset\n const componentSizes =\n typeof options.sizes === 'function' ? options.sizes({ ...forwardProps, preset }) : options.sizes\n const sizes = (forwardProps.sizes ? mergeDeepLeft(forwardProps.sizes, componentSizes) : componentSizes) as Sizes\n const palette = forwardProps.palette ? injectThemeColors(forwardProps.palette, theme) : {}\n\n Component.displayName = options.displayName\n\n return <Component {...forwardProps} preset={preset} sizes={sizes} palette={palette} ref={ref} />\n })\n\n WithMergedProps.displayName = `WithMergedProps${options.displayName}`\n return WithMergedProps\n}\n"],"names":["withMergedProps","Component","options","WithMergedProps","forwardRef","props","ref","_theme$components$opt","_theme$components","_forwardProps$preset","theme","useTheme","forwardProps","mergeDeepLeft","components","displayName","preset","componentSizes","sizes","palette","e","r","colors","arguments","length","undefined","Object","keys","reduce","resultColors","colorKey","_theme$colors$color","color","_jsx","_objectSpread"],"mappings":"sNAiBaA,EAAkB,CAO7BC,EAOAC,KAKA,IAAMC,EAAkBC,IAAkBC,EAAOC,KAAQ,IAAAC,EAAAC,EAAAC,EACvD,IAAMC,EAAQC,IAEd,IAAMC,EAAeC,EAAcR,EAAD,UAAA,UAAQK,EAAMI,kBAAd,IAAAN,SAAQA,EAAmBN,EAAQa,oBAAAA,IAAnCR,EAAAA,EAAmD,IACrF,IAAMS,EAAgCN,UAAvBE,EAAaI,cAAAA,IAAUN,EAAAA,EAAAA,EAAMM,OAC5C,IAAMC,EACqB,mBAAlBf,EAAQgB,MAAuBhB,EAAQgB,aAAWN,GAAnB,GAAA,CAAiCI,OAAAA,KAAYd,EAAQgB,MAC7F,IAAMA,EAASN,EAAaM,MAAQL,EAAcD,EAAaM,MAAOD,GAAkBA,EACxF,IAAME,EAAUP,EAAaO,QArCP,SAAAC,EAAAC,GAAA,IACxBC,+BADwBF,EAAAA,EAC0B,GAD1B,IAExBV,EAFwBa,UAAAC,OAAA,EAAAH,OAAAI,EAAA,OAIxBC,OAAOC,KAAKL,GAAQM,QAAO,CAACC,EAAcC,KAAa,IAAAC,EACrD,IAAMC,EAAQV,EAAOQ,GAErB,OADAD,EAAaC,GAAb,QAAyBpB,EAAAA,EAAMY,OAAOU,UAAAA,IAAtCD,EAAAA,EAAgDC,EACzCH,IACN,IARqB,CAqCmCjB,EAAaO,QAAST,GAAS,GAIxF,OAFAT,EAAUc,YAAcb,EAAQa,YAEzBkB,EAAChC,EAADiC,EAAAA,EAAA,GAAetB,GAAf,GAAA,CAA6BI,OAAQA,EAAQE,MAAOA,EAAOC,QAASA,EAASb,IAAKA,QAI3F,OADAH,EAAgBY,YAAgCb,kBAAAA,OAAAA,EAAQa,aACjDZ"}
|