@foxford/ui 2.7.1 → 2.7.3
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/ActionBtn/ActionBtn.js.map +1 -1
- package/components/Alert/utils.js.map +1 -1
- package/components/Amount/Amount.js.map +1 -1
- package/components/Anchor/Anchor.js.map +1 -1
- package/components/Anchor/style.js.map +1 -1
- package/components/Arrow/style.js +1 -1
- package/components/Arrow/style.js.map +1 -1
- package/components/Avatar/Avatar.js.map +1 -1
- package/components/Badge/Badge.js.map +1 -1
- package/components/Badge/style.js.map +1 -1
- package/components/Button/style.js +1 -1
- package/components/Button/style.js.map +1 -1
- package/components/Checkbox/style.js +1 -1
- package/components/Checkbox/style.js.map +1 -1
- package/components/Container/Container.js.map +1 -1
- package/components/Container/style.js.map +1 -1
- package/components/ContextMenu/ContextMenu.js.map +1 -1
- package/components/ContextMenu/Item.js.map +1 -1
- package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.js.map +1 -1
- package/components/ContextMenu.Multilevel/Controls.js.map +1 -1
- package/components/Icon/Icon.js.map +1 -1
- package/components/Icon/style.js.map +1 -1
- package/components/Input/Input.js.map +1 -1
- package/components/Input/helpers.js.map +1 -1
- package/components/Input/style.js.map +1 -1
- package/components/Modal/Close.js.map +1 -1
- package/components/Modal/Modal.js.map +1 -1
- package/components/Paper/Paper.js.map +1 -1
- package/components/Paper/style.js +1 -1
- package/components/Paper/style.js.map +1 -1
- package/components/Progress/Progress.js.map +1 -1
- package/components/Progress.Circle/Progress.Circle.js.map +1 -1
- package/components/Progress.Segmented/Progress.Segmented.js.map +1 -1
- package/components/Radio/Group.js.map +1 -1
- package/components/Radio/Radio.js.map +1 -1
- package/components/Radio/style.js.map +1 -1
- package/components/Section/Section.js.map +1 -1
- package/components/Section/style.js +1 -1
- package/components/Section/style.js.map +1 -1
- package/components/Select/Select.js.map +1 -1
- package/components/Select/style.js +1 -1
- package/components/Select/style.js.map +1 -1
- package/components/Separator/Separator.js.map +1 -1
- package/components/Separator/SeparatorText.js.map +1 -1
- package/components/Separator/style.js.map +1 -1
- package/components/Spacer/Spacer.js.map +1 -1
- package/components/Spacer/style.js.map +1 -1
- package/components/Spinner/Spinner.js.map +1 -1
- package/components/Spinner/style.js.map +1 -1
- package/components/Switcher/Switcher.js.map +1 -1
- package/components/Tabs/Tabs.js.map +1 -1
- package/components/Tabs/TabsTab.js.map +1 -1
- package/components/Tag/Tag.js.map +1 -1
- package/components/Tag/style.js +1 -1
- package/components/Tag/style.js.map +1 -1
- 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 +70 -33
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/mixins/color.js.map +1 -1
- package/package.json +1 -1
package/dts/index.d.ts
CHANGED
|
@@ -2,16 +2,8 @@
|
|
|
2
2
|
import * as styled_components from 'styled-components';
|
|
3
3
|
import { DefaultTheme, FlattenSimpleInterpolation, CSSObject, SimpleInterpolation, css } from 'styled-components';
|
|
4
4
|
import * as react from 'react';
|
|
5
|
-
import { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, PureComponent } from 'react';
|
|
6
|
-
import { ResponsiveNamedProperty as ResponsiveNamedProperty$1, ResponsiveProperty as ResponsiveProperty$1 } from 'mixins/responsive-property';
|
|
7
|
-
import { BaseProps as BaseProps$1, Nullable as Nullable$1, FontWeight as FontWeight$1, InputField as InputField$1 } from 'shared/interfaces';
|
|
8
|
-
import { SizeLatin as SizeLatin$1 } from 'shared/enums/sizeLatin';
|
|
5
|
+
import { Component, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, PureComponent } from 'react';
|
|
9
6
|
import { Link, NavLink } from 'react-router-dom';
|
|
10
|
-
import { Display as Display$1 } from 'mixins/display';
|
|
11
|
-
import { Color as Color$1 } from 'mixins/color';
|
|
12
|
-
import { Anchor as Anchor$1 } from 'components/Anchor';
|
|
13
|
-
import { TextHeadingProps } from 'components/Text.Heading';
|
|
14
|
-
import { TextEllipse } from 'components/Text.Ellipse';
|
|
15
7
|
import { Classes } from 'react-modal';
|
|
16
8
|
import * as rc_scrollbars_lib_Scrollbars_types from 'rc-scrollbars/lib/Scrollbars/types';
|
|
17
9
|
import * as rc_scrollbars from 'rc-scrollbars';
|
|
@@ -214,11 +206,11 @@ declare enum ColorNames {
|
|
|
214
206
|
}
|
|
215
207
|
|
|
216
208
|
declare type ColorPropsProperties = 'color' | 'fontColor' | `${string}Color` | `color${string}`;
|
|
217
|
-
declare type ColorValue = keyof typeof ColorNames | RGB | RGBA | HEX;
|
|
209
|
+
declare type ColorValue = keyof typeof ColorNames | RGB | RGBA | HEX | 'inherit' | 'initial';
|
|
218
210
|
declare type ColorCalcProperty = (_color: ColorValue) => FlattenSimpleInterpolation | null;
|
|
219
211
|
declare type ColorCssProperty = string | ColorCalcProperty;
|
|
220
212
|
declare type Color<T extends ColorPropsProperties = 'color'> = {
|
|
221
|
-
[key in `${T}`]?: RGB | RGBA | HEX | keyof typeof ColorNames;
|
|
213
|
+
[key in `${T}`]?: RGB | RGBA | HEX | keyof typeof ColorNames | 'inherit' | 'initial';
|
|
222
214
|
};
|
|
223
215
|
declare const color: (color?: ColorValue, cssProperty?: ColorCssProperty) => () => (props: {
|
|
224
216
|
theme: DefaultTheme;
|
|
@@ -657,16 +649,16 @@ declare namespace Anchor {
|
|
|
657
649
|
}
|
|
658
650
|
|
|
659
651
|
declare type ButtonStaticSize = 'xl' | 'l' | 'm' | 's' | 'xs';
|
|
660
|
-
declare type ButtonSize = ButtonStaticSize | ResponsiveProperty
|
|
661
|
-
interface ButtonProps extends BaseProps
|
|
652
|
+
declare type ButtonSize = ButtonStaticSize | ResponsiveProperty<`${number}rem` | number>;
|
|
653
|
+
interface ButtonProps extends BaseProps, Display, Color, Color<'fontColor'>, ResponsiveNamedProperty<'padding'>, ResponsiveNamedProperty<'paddingTop'>, ResponsiveNamedProperty<'paddingRight'>, ResponsiveNamedProperty<'paddingBottom'>, ResponsiveNamedProperty<'paddingLeft'>, ResponsiveNamedProperty<'margin'>, ResponsiveNamedProperty<'marginTop'>, ResponsiveNamedProperty<'marginRight'>, ResponsiveNamedProperty<'marginBottom'>, ResponsiveNamedProperty<'marginLeft'>, ResponsiveNamedProperty<'fontSize'>, ResponsiveNamedProperty<'fluid', boolean>, ResponsiveNamedProperty<'width', 'auto' | 'l' | 'm' | 's' | 'xs' | number>, ResponsiveNamedProperty<'height', 'l' | 'm' | 's' | 'xs' | number> {
|
|
662
654
|
/** Root node polymorphic type */
|
|
663
|
-
as?: 'div' | 'span' | 'a' | 'button' | typeof Link | typeof Anchor
|
|
655
|
+
as?: 'div' | 'span' | 'a' | 'button' | typeof Link | typeof Anchor;
|
|
664
656
|
/** Button size */
|
|
665
657
|
size?: ButtonSize;
|
|
666
658
|
/** Button type attribute */
|
|
667
659
|
type?: 'button' | 'submit' | 'reset';
|
|
668
660
|
/** Button icons */
|
|
669
|
-
icon?: JSX.Element | [Nullable
|
|
661
|
+
icon?: JSX.Element | [Nullable<JSX.Element>, Nullable<JSX.Element>];
|
|
670
662
|
/** Button success state */
|
|
671
663
|
success?: boolean;
|
|
672
664
|
/** Loading state */
|
|
@@ -695,7 +687,7 @@ interface ButtonProps extends BaseProps$1, Display$1, Color$1, Color$1<'fontColo
|
|
|
695
687
|
/** Outline appearance */
|
|
696
688
|
outline?: boolean;
|
|
697
689
|
/** Content font weight */
|
|
698
|
-
fontWeight?: FontWeight
|
|
690
|
+
fontWeight?: FontWeight;
|
|
699
691
|
/** Associated form */
|
|
700
692
|
form?: string;
|
|
701
693
|
/** @preset {Default} Primary appearance */
|
|
@@ -733,8 +725,53 @@ interface ButtonProps extends BaseProps$1, Display$1, Color$1, Color$1<'fontColo
|
|
|
733
725
|
*/
|
|
734
726
|
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLElement>>;
|
|
735
727
|
|
|
728
|
+
declare type H = 'h1' | 'h2' | 'h3' | 'h4';
|
|
729
|
+
interface TextHeadingProps extends Omit<TextProps, 'content' | 'as'> {
|
|
730
|
+
/** Default set of size, lineHeight and weight props */
|
|
731
|
+
h?: H;
|
|
732
|
+
/** Children react node */
|
|
733
|
+
children?: React.ReactNode;
|
|
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
|
+
|
|
736
773
|
declare type TextAppearance = 'display' | 'heading' | 'subheading' | 'subheading-compact' | 'body' | 'caption';
|
|
737
|
-
interface TextProps extends Display
|
|
774
|
+
interface TextProps extends Display, Color, ResponsiveNamedProperty<'size'>, BaseProps {
|
|
738
775
|
/** Root node polymorphic type */
|
|
739
776
|
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span';
|
|
740
777
|
/** Root id attribute */
|
|
@@ -742,7 +779,7 @@ interface TextProps extends Display$1, Color$1, ResponsiveNamedProperty$1<'size'
|
|
|
742
779
|
/** Use predefined props with low priority */
|
|
743
780
|
appearance?: TextAppearance;
|
|
744
781
|
/** Custom sizes set */
|
|
745
|
-
sizes?: Record<SizeLatin
|
|
782
|
+
sizes?: Record<SizeLatin, number>;
|
|
746
783
|
/** Sizing units */
|
|
747
784
|
fontUnits?: string;
|
|
748
785
|
/** Font family */
|
|
@@ -776,8 +813,8 @@ interface TextComponent extends ForwardRefExoticComponent<PropsWithoutRef<TextPr
|
|
|
776
813
|
declare const Text: TextComponent;
|
|
777
814
|
|
|
778
815
|
declare type AlertType = 'warning' | 'error' | 'info' | 'success';
|
|
779
|
-
declare type AlertSize = keyof Pick<typeof SizeLatin
|
|
780
|
-
interface AlertProps extends BaseProps
|
|
816
|
+
declare type AlertSize = keyof Pick<typeof SizeLatin, 'l' | 's'>;
|
|
817
|
+
interface AlertProps extends BaseProps {
|
|
781
818
|
/** Text of the timer cancellation button */
|
|
782
819
|
cancelTimerText?: string | React.ReactNode;
|
|
783
820
|
/** Children react node */
|
|
@@ -825,7 +862,7 @@ interface AlertProps extends BaseProps$1 {
|
|
|
825
862
|
title?: string;
|
|
826
863
|
titleProps?: TextProps;
|
|
827
864
|
type?: AlertType;
|
|
828
|
-
width?: ResponsiveProperty
|
|
865
|
+
width?: ResponsiveProperty;
|
|
829
866
|
}
|
|
830
867
|
|
|
831
868
|
declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -1006,8 +1043,8 @@ declare class Amount extends PureComponent<AmountProps> {
|
|
|
1006
1043
|
}
|
|
1007
1044
|
|
|
1008
1045
|
declare type ArrowStaticSize = 'l' | 'm' | 'xs';
|
|
1009
|
-
declare type ArrowSize = ArrowStaticSize | ResponsiveProperty
|
|
1010
|
-
interface ArrowProps extends BaseProps
|
|
1046
|
+
declare type ArrowSize = ArrowStaticSize | ResponsiveProperty<`${number}rem` | number>;
|
|
1047
|
+
interface ArrowProps extends BaseProps {
|
|
1011
1048
|
/** Square shape */
|
|
1012
1049
|
square?: boolean;
|
|
1013
1050
|
/** Used on colored background */
|
|
@@ -2094,7 +2131,7 @@ declare class ContextMenu extends PureComponent<ContextMenuProps, {
|
|
|
2094
2131
|
minWidth: number;
|
|
2095
2132
|
opacity: number;
|
|
2096
2133
|
position: string;
|
|
2097
|
-
transition: string;
|
|
2134
|
+
transition: string; /** Indicates if button is active (e.g. when context menu is open) */
|
|
2098
2135
|
visibility: string;
|
|
2099
2136
|
zIndex: number;
|
|
2100
2137
|
};
|
|
@@ -2108,19 +2145,19 @@ declare class ContextMenu extends PureComponent<ContextMenuProps, {
|
|
|
2108
2145
|
visibility: string;
|
|
2109
2146
|
};
|
|
2110
2147
|
floaterClosing: {
|
|
2111
|
-
opacity: number;
|
|
2148
|
+
opacity: number; /** On close menu callback */
|
|
2112
2149
|
visibility: string;
|
|
2113
2150
|
};
|
|
2114
2151
|
floaterCentered: {
|
|
2115
2152
|
left: string;
|
|
2116
|
-
position: string;
|
|
2153
|
+
position: string; /** Content */
|
|
2117
2154
|
top: string;
|
|
2118
|
-
transform: string;
|
|
2155
|
+
transform: string;
|
|
2119
2156
|
};
|
|
2120
2157
|
container: {
|
|
2121
2158
|
boxSizing: string;
|
|
2122
2159
|
borderRadius: number;
|
|
2123
|
-
border: string;
|
|
2160
|
+
border: string;
|
|
2124
2161
|
color: string;
|
|
2125
2162
|
backgroundColor: string;
|
|
2126
2163
|
minHeight: number;
|
|
@@ -2149,7 +2186,7 @@ declare class ContextMenu extends PureComponent<ContextMenuProps, {
|
|
|
2149
2186
|
}
|
|
2150
2187
|
|
|
2151
2188
|
declare type TextAreaHTMLAttributes = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'cols' | 'rows' | 'color'>;
|
|
2152
|
-
interface TextareaProps extends BaseProps
|
|
2189
|
+
interface TextareaProps extends BaseProps, InputField, TextAreaHTMLAttributes {
|
|
2153
2190
|
/** Specifies the visible width of a text area */
|
|
2154
2191
|
cols?: number;
|
|
2155
2192
|
/** Specifies the visible number of lines in a text area */
|
|
@@ -2374,8 +2411,8 @@ declare namespace Radio {
|
|
|
2374
2411
|
}
|
|
2375
2412
|
|
|
2376
2413
|
declare type CheckboxStaticSize = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge' | 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
2377
|
-
declare type CheckboxSize = CheckboxStaticSize | ResponsiveProperty
|
|
2378
|
-
interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'width' | 'value'>, BaseProps
|
|
2414
|
+
declare type CheckboxSize = CheckboxStaticSize | ResponsiveProperty<`${number}rem` | number>;
|
|
2415
|
+
interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'width' | 'value'>, BaseProps {
|
|
2379
2416
|
/** Checkbox value */
|
|
2380
2417
|
value?: string | number;
|
|
2381
2418
|
/** Checkbox size */
|
|
@@ -2387,7 +2424,7 @@ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
2387
2424
|
/** Root label width 100% */
|
|
2388
2425
|
fluid?: boolean;
|
|
2389
2426
|
/** Root label width */
|
|
2390
|
-
width?: ResponsiveProperty
|
|
2427
|
+
width?: ResponsiveProperty<number | string>;
|
|
2391
2428
|
/** Label content */
|
|
2392
2429
|
children?: React.ReactNode;
|
|
2393
2430
|
/** @preset {Brand} Checkbox success appearance */
|
|
@@ -2399,7 +2436,7 @@ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
2399
2436
|
/** @deprecated Use children */
|
|
2400
2437
|
label?: string;
|
|
2401
2438
|
}
|
|
2402
|
-
interface CheckboxGroupProps extends BaseProps
|
|
2439
|
+
interface CheckboxGroupProps extends BaseProps {
|
|
2403
2440
|
inline?: boolean;
|
|
2404
2441
|
children: React.ReactNode;
|
|
2405
2442
|
}
|