@foxford/ui 2.25.0 → 2.26.0-beta-47ce7b9-20240425
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/Popover/Popover.js +2 -0
- package/components/Popover/Popover.js.map +1 -0
- package/components/PopoverComponent/PopoverComponent.js +2 -0
- package/components/PopoverComponent/PopoverComponent.js.map +1 -0
- package/components/PopoverComponent/constants.js +2 -0
- package/components/PopoverComponent/constants.js.map +1 -0
- package/components/PopoverComponent/images/close.module.svg.js +2 -0
- package/components/PopoverComponent/images/close.module.svg.js.map +1 -0
- package/components/PopoverComponent/style.js +2 -0
- package/components/PopoverComponent/style.js.map +1 -0
- package/dts/index.d.ts +377 -177
- 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/themes.js +1 -1
- package/theme/themes.js.map +1 -1
package/dts/index.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import * as react from 'react';
|
|
|
3
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
|
+
import { Props, PopperInstance, PlacementOptions, SelectorOrElement, Styles } from 'react-floater/lib/types';
|
|
6
7
|
import { Classes } from 'react-modal';
|
|
7
8
|
import * as rc_scrollbars_lib_Scrollbars_types from 'rc-scrollbars/lib/Scrollbars/types';
|
|
8
9
|
import * as rc_scrollbars from 'rc-scrollbars';
|
|
9
10
|
import { ScrollbarsProps } from 'rc-scrollbars';
|
|
10
|
-
import { Props, PopperInstance, PlacementOptions, SelectorOrElement, Styles } from 'react-floater/lib/types';
|
|
11
11
|
import { InputState, MaskOptions } from 'react-input-mask';
|
|
12
12
|
import { ReactSelectProps } from 'react-select';
|
|
13
13
|
|
|
@@ -1814,6 +1814,376 @@ DisplayProperty, Omit<React.ComponentPropsWithRef<'div'>, 'color' | 'children'>
|
|
|
1814
1814
|
*/
|
|
1815
1815
|
declare const Badge: React.ForwardRefExoticComponent<BadgeProps>;
|
|
1816
1816
|
|
|
1817
|
+
declare type SkeletonPalette = {
|
|
1818
|
+
color: CSSColor;
|
|
1819
|
+
gradientColor: CSSColor;
|
|
1820
|
+
gradientHighlightColor: CSSColor;
|
|
1821
|
+
};
|
|
1822
|
+
interface SkeletonProps extends ResponsiveMarginProps, React.ComponentPropsWithRef<'div'> {
|
|
1823
|
+
/** Element to infer sizing */
|
|
1824
|
+
children?: React.ReactNode;
|
|
1825
|
+
/** Custom colors */
|
|
1826
|
+
palette?: Partial<Record<keyof SkeletonPalette, Color>>;
|
|
1827
|
+
/** Display 'inline-block' */
|
|
1828
|
+
inline?: boolean;
|
|
1829
|
+
/** Root border-radius: 50% */
|
|
1830
|
+
round?: boolean;
|
|
1831
|
+
/** Root border-radius */
|
|
1832
|
+
borderRadius?: string | number;
|
|
1833
|
+
/** Root width */
|
|
1834
|
+
width?: string | number;
|
|
1835
|
+
/** Root height */
|
|
1836
|
+
height?: string | number;
|
|
1837
|
+
/** Value (ms) to control animation speed */
|
|
1838
|
+
animationDuration?: number;
|
|
1839
|
+
/** Delay to animation start (ms) to avoid flicker at fast connection */
|
|
1840
|
+
animationDelay?: number;
|
|
1841
|
+
/** Appearance variant */
|
|
1842
|
+
primary?: boolean;
|
|
1843
|
+
/** Appearance variant */
|
|
1844
|
+
secondary?: boolean;
|
|
1845
|
+
/** Appearance variant */
|
|
1846
|
+
onColored?: boolean;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
/**
|
|
1850
|
+
*
|
|
1851
|
+
* Component accepts all \<div\> attributes.
|
|
1852
|
+
*
|
|
1853
|
+
* Responsive "margin" props are supported.
|
|
1854
|
+
*
|
|
1855
|
+
* Exposed "ref" attached to root node.
|
|
1856
|
+
*
|
|
1857
|
+
* See full [SkeletonProps](https://github.com/foxford/ui/blob/master/src/components/Skeleton/types.ts)
|
|
1858
|
+
*/
|
|
1859
|
+
declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps>;
|
|
1860
|
+
|
|
1861
|
+
declare type TooltipComponentPalette = {
|
|
1862
|
+
color: CSSColor;
|
|
1863
|
+
backgroundColor: CSSColor;
|
|
1864
|
+
shadowColor: CSSColor;
|
|
1865
|
+
closeColor: CSSColor;
|
|
1866
|
+
closeColorHover: CSSColor;
|
|
1867
|
+
closeColorActive: CSSColor;
|
|
1868
|
+
closeColorDisabled: CSSColor;
|
|
1869
|
+
};
|
|
1870
|
+
interface TooltipComponentProps extends ResponsiveSizeProps, Omit<React.ComponentPropsWithRef<'div'>, 'children' | 'title'> {
|
|
1871
|
+
/** Custom colors */
|
|
1872
|
+
palette?: Partial<Record<keyof TooltipComponentPalette, Color>>;
|
|
1873
|
+
/** Appearance variant */
|
|
1874
|
+
black?: boolean;
|
|
1875
|
+
/** Appearance variant */
|
|
1876
|
+
contrast?: boolean;
|
|
1877
|
+
/** Title text */
|
|
1878
|
+
title?: React.ReactNode;
|
|
1879
|
+
/** Props for title text component */
|
|
1880
|
+
titleProps?: TextProps;
|
|
1881
|
+
/** Main content text */
|
|
1882
|
+
content?: React.ReactNode;
|
|
1883
|
+
/** Props for content text component */
|
|
1884
|
+
contentProps?: TextProps;
|
|
1885
|
+
/** Footer segment */
|
|
1886
|
+
footer?: React.ReactNode;
|
|
1887
|
+
/** Show close button */
|
|
1888
|
+
showCloseButton?: boolean;
|
|
1889
|
+
/** Props for close button */
|
|
1890
|
+
closeButtonProps?: React.ComponentPropsWithoutRef<'button'>;
|
|
1891
|
+
/** Apply drop shadow filter */
|
|
1892
|
+
elevated?: boolean;
|
|
1893
|
+
/** @ignore */
|
|
1894
|
+
closeFn?: () => void;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
*
|
|
1899
|
+
* Component accepts all \<div\> attributes.
|
|
1900
|
+
*
|
|
1901
|
+
* Responsive "size" props are supported.
|
|
1902
|
+
*
|
|
1903
|
+
* Exposed "ref" attached to root node.
|
|
1904
|
+
*
|
|
1905
|
+
* See full [TooltipComponentProps](https://github.com/foxford/ui/blob/master/src/components/TooltipComponent/types.ts)
|
|
1906
|
+
*/
|
|
1907
|
+
declare const TooltipComponent: React.ForwardRefExoticComponent<TooltipComponentProps>;
|
|
1908
|
+
|
|
1909
|
+
interface TooltipProps extends ResponsiveSizeProps, React.RefAttributes<HTMLDivElement> {
|
|
1910
|
+
/** UI: brand (v3), or default (v2) */
|
|
1911
|
+
preset?: ThemePreset;
|
|
1912
|
+
/** Custom colors */
|
|
1913
|
+
palette?: Partial<Record<keyof TooltipComponentPalette, Color>>;
|
|
1914
|
+
/** Appearance variant */
|
|
1915
|
+
black?: boolean;
|
|
1916
|
+
/** Appearance variant */
|
|
1917
|
+
contrast?: boolean;
|
|
1918
|
+
/** Open automatically */
|
|
1919
|
+
autoOpen?: boolean;
|
|
1920
|
+
/** It will be called on state change */
|
|
1921
|
+
callback?: (action: 'open' | 'close', props: Props) => void;
|
|
1922
|
+
/** Default tooltip target */
|
|
1923
|
+
children?: React.ReactNode;
|
|
1924
|
+
/** Custom UI for tooltip */
|
|
1925
|
+
component?: React.ReactElement | ((props: Pick<TooltipProps, 'size' | 'sizeXXS' | 'sizeXS' | 'sizeS' | 'sizeM' | 'sizeL' | 'sizeXL' | 'black' | 'contrast' | 'showCloseButton' | 'closeButtonProps'> & {
|
|
1926
|
+
id?: string;
|
|
1927
|
+
role?: string;
|
|
1928
|
+
closeFn?: () => void;
|
|
1929
|
+
}) => React.ReactElement);
|
|
1930
|
+
/** Tooltip content */
|
|
1931
|
+
content?: React.ReactNode;
|
|
1932
|
+
/** Props for content text component */
|
|
1933
|
+
contentProps?: TextProps;
|
|
1934
|
+
/** Debugging logs in console */
|
|
1935
|
+
debug?: boolean;
|
|
1936
|
+
/** Don't adjust tooltip on scroll / resize */
|
|
1937
|
+
disableFlip?: boolean;
|
|
1938
|
+
/** Don't convert 'hover' to 'click' event on mobile */
|
|
1939
|
+
disableHoverToClick?: boolean;
|
|
1940
|
+
/** Trigger event for tooltip */
|
|
1941
|
+
event?: 'click' | 'hover';
|
|
1942
|
+
/** Pause in 'seconds' to wait before close tooltip (valid for 'hover' event) */
|
|
1943
|
+
eventDelay?: number;
|
|
1944
|
+
/** Tooltip footer */
|
|
1945
|
+
footer?: React.ReactNode;
|
|
1946
|
+
/** Callback to get popper.js instance */
|
|
1947
|
+
getPopper?: (popper: PopperInstance, origin: 'floater' | 'wrapper') => void;
|
|
1948
|
+
/** Don't show tooltip arrow */
|
|
1949
|
+
hideArrow?: boolean;
|
|
1950
|
+
/** Distance in 'px' between tooltip and its target */
|
|
1951
|
+
offset?: number;
|
|
1952
|
+
/** Switch between normal and controlled modes. It will disable built in tooltip behavior */
|
|
1953
|
+
open?: boolean;
|
|
1954
|
+
/** Tooltip position relative to its target */
|
|
1955
|
+
placement?: PlacementOptions;
|
|
1956
|
+
/** CSS selector or element to render tooltips */
|
|
1957
|
+
portalElement?: SelectorOrElement;
|
|
1958
|
+
/** Custom styles */
|
|
1959
|
+
styles?: Partial<Styles>;
|
|
1960
|
+
/** Show button to close tooltip */
|
|
1961
|
+
showCloseButton?: boolean;
|
|
1962
|
+
/** Props for button to close tooltip */
|
|
1963
|
+
closeButtonProps?: React.ComponentPropsWithoutRef<'button'>;
|
|
1964
|
+
/** Tooltip target. If it's not set, 'children' will be used */
|
|
1965
|
+
target?: SelectorOrElement;
|
|
1966
|
+
/** Tooltip title */
|
|
1967
|
+
title?: React.ReactNode;
|
|
1968
|
+
/** Props for title text component */
|
|
1969
|
+
titleProps?: TextProps;
|
|
1970
|
+
/** Position of tooltip wrapper relative to target */
|
|
1971
|
+
wrapperOptions?: {
|
|
1972
|
+
offset?: number;
|
|
1973
|
+
placement?: Omit<PlacementOptions, 'center'>;
|
|
1974
|
+
position?: boolean;
|
|
1975
|
+
};
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
/**
|
|
1979
|
+
*
|
|
1980
|
+
* Component accepts ["react-floater"](https://www.npmjs.com/package/react-floater/v/0.8.2) v0.8.2 props.
|
|
1981
|
+
*
|
|
1982
|
+
* Responsive "size" props are supported.
|
|
1983
|
+
*
|
|
1984
|
+
* Exposed "ref" attached to tooltip component root.
|
|
1985
|
+
*
|
|
1986
|
+
* See full [TooltipProps](https://github.com/foxford/ui/blob/master/src/components/Tooltip/types.ts)
|
|
1987
|
+
*/
|
|
1988
|
+
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps> & {
|
|
1989
|
+
Component: typeof TooltipComponent;
|
|
1990
|
+
};
|
|
1991
|
+
|
|
1992
|
+
declare type PopoverComponentPalette = {
|
|
1993
|
+
color: CSSColor;
|
|
1994
|
+
backgroundColor: CSSColor;
|
|
1995
|
+
mediaPlaceholderColor: CSSColor;
|
|
1996
|
+
shadowColor: CSSColor;
|
|
1997
|
+
closeColor: CSSColor;
|
|
1998
|
+
closeBackgroundColor: CSSColor;
|
|
1999
|
+
closeColorHover: CSSColor;
|
|
2000
|
+
closeBackgroundColorHover: CSSColor;
|
|
2001
|
+
closeColorActive: CSSColor;
|
|
2002
|
+
closeBackgroundColorActive: CSSColor;
|
|
2003
|
+
closeColorDisabled: CSSColor;
|
|
2004
|
+
closeBackgroundColorDisabled: CSSColor;
|
|
2005
|
+
};
|
|
2006
|
+
interface PopoverComponentProps extends ResponsiveSizeProps, Omit<React.ComponentPropsWithRef<'div'>, 'children' | 'title'> {
|
|
2007
|
+
/** Custom colors */
|
|
2008
|
+
palette?: Partial<Record<keyof PopoverComponentPalette, Color>>;
|
|
2009
|
+
/** Relationship of width to height */
|
|
2010
|
+
orientation?: 'portrait' | 'landscape';
|
|
2011
|
+
/** Loading appearance */
|
|
2012
|
+
loading?: boolean;
|
|
2013
|
+
/** Badge in header */
|
|
2014
|
+
badge?: {
|
|
2015
|
+
text?: React.ReactNode;
|
|
2016
|
+
badgeProps?: BadgeProps;
|
|
2017
|
+
};
|
|
2018
|
+
/** Short text in header */
|
|
2019
|
+
caption?: React.ReactNode;
|
|
2020
|
+
/** Props for text component in header */
|
|
2021
|
+
captionProps?: TextProps;
|
|
2022
|
+
/** Title text */
|
|
2023
|
+
title?: React.ReactNode;
|
|
2024
|
+
/** Props for title text component */
|
|
2025
|
+
titleProps?: TextProps;
|
|
2026
|
+
/** Main text content */
|
|
2027
|
+
content?: React.ReactNode;
|
|
2028
|
+
/** Props for main text component */
|
|
2029
|
+
contentProps?: TextProps;
|
|
2030
|
+
/** Show close button */
|
|
2031
|
+
showCloseButton?: boolean;
|
|
2032
|
+
/** Props for close button */
|
|
2033
|
+
closeButtonProps?: React.ComponentPropsWithoutRef<'button'>;
|
|
2034
|
+
/** Flex-direction for footer with buttons */
|
|
2035
|
+
controlsDirection?: 'row' | 'column';
|
|
2036
|
+
/** Media to display: \<img\> or \<video\> */
|
|
2037
|
+
media?: {
|
|
2038
|
+
imgProps?: React.ComponentPropsWithoutRef<'img'>;
|
|
2039
|
+
videoProps?: React.ComponentPropsWithoutRef<'video'>;
|
|
2040
|
+
};
|
|
2041
|
+
/** Buttons in footer */
|
|
2042
|
+
controls?: {
|
|
2043
|
+
secondary?: {
|
|
2044
|
+
text?: React.ReactNode;
|
|
2045
|
+
buttonProps?: ButtonProps;
|
|
2046
|
+
};
|
|
2047
|
+
primary?: {
|
|
2048
|
+
text?: React.ReactNode;
|
|
2049
|
+
buttonProps?: ButtonProps;
|
|
2050
|
+
};
|
|
2051
|
+
};
|
|
2052
|
+
/** Apply drop shadow filter */
|
|
2053
|
+
elevated?: boolean;
|
|
2054
|
+
/** @ignore */
|
|
2055
|
+
black?: boolean;
|
|
2056
|
+
/** @ignore */
|
|
2057
|
+
contrast?: boolean;
|
|
2058
|
+
/** @ignore */
|
|
2059
|
+
closeFn?: () => void;
|
|
2060
|
+
}
|
|
2061
|
+
|
|
2062
|
+
/**
|
|
2063
|
+
*
|
|
2064
|
+
* Component accepts all \<div\> attributes.
|
|
2065
|
+
*
|
|
2066
|
+
* Responsive "size" props are supported.
|
|
2067
|
+
*
|
|
2068
|
+
* Exposed "ref" attached to root node.
|
|
2069
|
+
*
|
|
2070
|
+
* See full [PopoverComponentProps](https://github.com/foxford/ui/blob/master/src/components/PopoverComponent/types.ts)
|
|
2071
|
+
*
|
|
2072
|
+
*/
|
|
2073
|
+
declare const PopoverComponent: React.ForwardRefExoticComponent<PopoverComponentProps>;
|
|
2074
|
+
|
|
2075
|
+
interface PopoverProps extends ResponsiveSizeProps, React.RefAttributes<HTMLDivElement> {
|
|
2076
|
+
/** Custom colors */
|
|
2077
|
+
palette?: Partial<Record<keyof PopoverComponentPalette, Color>>;
|
|
2078
|
+
/** Open automatically */
|
|
2079
|
+
autoOpen?: boolean;
|
|
2080
|
+
/** It will be called on state change */
|
|
2081
|
+
callback?: (action: 'open' | 'close', props: Props) => void;
|
|
2082
|
+
/** Default tooltip target */
|
|
2083
|
+
children?: React.ReactNode;
|
|
2084
|
+
/** Debugging logs in console */
|
|
2085
|
+
debug?: boolean;
|
|
2086
|
+
/** Don't adjust tooltip on scroll / resize */
|
|
2087
|
+
disableFlip?: boolean;
|
|
2088
|
+
/** Don't convert 'hover' to 'click' event on mobile */
|
|
2089
|
+
disableHoverToClick?: boolean;
|
|
2090
|
+
/** Trigger event for tooltip */
|
|
2091
|
+
event?: 'click' | 'hover';
|
|
2092
|
+
/** Pause in 'seconds' to wait before close tooltip (valid for 'hover' event) */
|
|
2093
|
+
eventDelay?: number;
|
|
2094
|
+
/** Callback to get popper.js instance */
|
|
2095
|
+
getPopper?: (popper: PopperInstance, origin: 'floater' | 'wrapper') => void;
|
|
2096
|
+
/** Don't show tooltip arrow */
|
|
2097
|
+
hideArrow?: boolean;
|
|
2098
|
+
/** Distance in 'px' between tooltip and its target */
|
|
2099
|
+
offset?: number;
|
|
2100
|
+
/** Switch between normal and controlled modes. It will disable built in tooltip behavior */
|
|
2101
|
+
open?: boolean;
|
|
2102
|
+
/** Tooltip position relative to its target */
|
|
2103
|
+
placement?: PlacementOptions;
|
|
2104
|
+
/** CSS selector or element to render tooltips */
|
|
2105
|
+
portalElement?: SelectorOrElement;
|
|
2106
|
+
/** Custom styles */
|
|
2107
|
+
styles?: Partial<Styles>;
|
|
2108
|
+
/** Show button to close tooltip */
|
|
2109
|
+
showCloseButton?: boolean;
|
|
2110
|
+
/** Props for close button */
|
|
2111
|
+
closeButtonProps?: React.ComponentPropsWithoutRef<'button'>;
|
|
2112
|
+
/** Tooltip target. If it's not set, 'children' will be used */
|
|
2113
|
+
target?: SelectorOrElement;
|
|
2114
|
+
/** Position of tooltip wrapper relative to target */
|
|
2115
|
+
wrapperOptions?: {
|
|
2116
|
+
offset?: number;
|
|
2117
|
+
placement?: Omit<PlacementOptions, 'center'>;
|
|
2118
|
+
position?: boolean;
|
|
2119
|
+
};
|
|
2120
|
+
/** Relationship of width to height */
|
|
2121
|
+
orientation?: 'portrait' | 'landscape';
|
|
2122
|
+
/** Loading appearance */
|
|
2123
|
+
loading?: boolean;
|
|
2124
|
+
/** Badge in header */
|
|
2125
|
+
badge?: {
|
|
2126
|
+
text?: React.ReactNode;
|
|
2127
|
+
badgeProps?: BadgeProps;
|
|
2128
|
+
};
|
|
2129
|
+
/** Short text in header */
|
|
2130
|
+
caption?: React.ReactNode;
|
|
2131
|
+
/** Props for text component in header */
|
|
2132
|
+
captionProps?: TextProps;
|
|
2133
|
+
/** Title text */
|
|
2134
|
+
title?: React.ReactNode;
|
|
2135
|
+
/** Props for title text component */
|
|
2136
|
+
titleProps?: TextProps;
|
|
2137
|
+
/** Main text content */
|
|
2138
|
+
content?: React.ReactNode;
|
|
2139
|
+
/** Props for main text component */
|
|
2140
|
+
contentProps?: TextProps;
|
|
2141
|
+
/** Flex-direction in footer */
|
|
2142
|
+
controlsDirection?: 'row' | 'column';
|
|
2143
|
+
/** Media to display: \<img\> or \<video\> */
|
|
2144
|
+
media?: {
|
|
2145
|
+
imgProps?: React.ComponentPropsWithoutRef<'img'>;
|
|
2146
|
+
videoProps?: React.ComponentPropsWithoutRef<'video'>;
|
|
2147
|
+
};
|
|
2148
|
+
/** Buttons in footer */
|
|
2149
|
+
controls?: {
|
|
2150
|
+
secondary?: {
|
|
2151
|
+
text?: React.ReactNode;
|
|
2152
|
+
buttonProps?: ButtonProps;
|
|
2153
|
+
};
|
|
2154
|
+
primary?: {
|
|
2155
|
+
text?: React.ReactNode;
|
|
2156
|
+
buttonProps?: ButtonProps;
|
|
2157
|
+
};
|
|
2158
|
+
};
|
|
2159
|
+
/** @ignore */
|
|
2160
|
+
footer?: React.ReactNode;
|
|
2161
|
+
/** @ignore */
|
|
2162
|
+
black?: boolean;
|
|
2163
|
+
/** @ignore */
|
|
2164
|
+
contrast?: boolean;
|
|
2165
|
+
/** @ignore */
|
|
2166
|
+
component?: React.ReactElement | ((props: Pick<PopoverProps, 'size' | 'sizeXXS' | 'sizeXS' | 'sizeS' | 'sizeM' | 'sizeL' | 'sizeXL' | 'black' | 'contrast' | 'showCloseButton' | 'closeButtonProps'> & {
|
|
2167
|
+
id?: string;
|
|
2168
|
+
role?: string;
|
|
2169
|
+
closeFn?: () => void;
|
|
2170
|
+
}) => React.ReactElement);
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
/**
|
|
2174
|
+
*
|
|
2175
|
+
* Component accepts ["react-floater"](https://www.npmjs.com/package/react-floater/v/0.8.2) v0.8.2 props.
|
|
2176
|
+
*
|
|
2177
|
+
* Responsive "size" props are supported.
|
|
2178
|
+
*
|
|
2179
|
+
* Exposed "ref" attached to popover component root.
|
|
2180
|
+
*
|
|
2181
|
+
* See full [PopoverProps](https://github.com/foxford/ui/blob/master/src/components/Popover/types.ts)
|
|
2182
|
+
*/
|
|
2183
|
+
declare const Popover: React.ForwardRefExoticComponent<PopoverProps> & {
|
|
2184
|
+
Component: typeof PopoverComponent;
|
|
2185
|
+
};
|
|
2186
|
+
|
|
1817
2187
|
interface Theme {
|
|
1818
2188
|
breakpoints: Readonly<Record<Lowercase<Breakpoint>, number>>;
|
|
1819
2189
|
colors: Record<keyof typeof ColorNames, CSSColor>;
|
|
@@ -1847,6 +2217,11 @@ interface Theme {
|
|
|
1847
2217
|
Tab?: TabProps;
|
|
1848
2218
|
Badge?: BadgeProps;
|
|
1849
2219
|
Anchor?: AnchorProps;
|
|
2220
|
+
Skeleton?: SkeletonProps;
|
|
2221
|
+
Tooltip?: TooltipProps;
|
|
2222
|
+
TooltipComponent?: TooltipComponentProps;
|
|
2223
|
+
Popover?: PopoverProps;
|
|
2224
|
+
PopoverComponent?: PopoverComponentProps;
|
|
1850
2225
|
};
|
|
1851
2226
|
}
|
|
1852
2227
|
|
|
@@ -2829,137 +3204,6 @@ declare namespace Tabs {
|
|
|
2829
3204
|
var Tab: react.ForwardRefExoticComponent<TabProps>;
|
|
2830
3205
|
}
|
|
2831
3206
|
|
|
2832
|
-
declare type TooltipComponentPalette = {
|
|
2833
|
-
color: CSSColor;
|
|
2834
|
-
backgroundColor: CSSColor;
|
|
2835
|
-
shadowColor: CSSColor;
|
|
2836
|
-
closeColor: CSSColor;
|
|
2837
|
-
closeColorHover: CSSColor;
|
|
2838
|
-
closeColorActive: CSSColor;
|
|
2839
|
-
closeColorDisabled: CSSColor;
|
|
2840
|
-
};
|
|
2841
|
-
interface TooltipComponentProps extends ResponsiveSizeProps, Omit<React.ComponentPropsWithRef<'div'>, 'children' | 'title'> {
|
|
2842
|
-
/** Custom colors */
|
|
2843
|
-
palette?: Partial<Record<keyof TooltipComponentPalette, Color>>;
|
|
2844
|
-
/** Appearance variant */
|
|
2845
|
-
black?: boolean;
|
|
2846
|
-
/** Appearance variant */
|
|
2847
|
-
contrast?: boolean;
|
|
2848
|
-
/** Title text */
|
|
2849
|
-
title?: React.ReactNode;
|
|
2850
|
-
/** Props for title text component */
|
|
2851
|
-
titleProps?: TextProps;
|
|
2852
|
-
/** Main content text */
|
|
2853
|
-
content?: React.ReactNode;
|
|
2854
|
-
/** Props for content text component */
|
|
2855
|
-
contentProps?: TextProps;
|
|
2856
|
-
/** Footer segment */
|
|
2857
|
-
footer?: React.ReactNode;
|
|
2858
|
-
/** Show close button */
|
|
2859
|
-
showCloseButton?: boolean;
|
|
2860
|
-
/** Props for close button */
|
|
2861
|
-
closeButtonProps?: React.ComponentPropsWithoutRef<'button'>;
|
|
2862
|
-
/** Apply drop shadow filter */
|
|
2863
|
-
elevated?: boolean;
|
|
2864
|
-
/** @ignore */
|
|
2865
|
-
closeFn?: () => void;
|
|
2866
|
-
}
|
|
2867
|
-
|
|
2868
|
-
/**
|
|
2869
|
-
*
|
|
2870
|
-
* Component accepts all \<div\> attributes.
|
|
2871
|
-
*
|
|
2872
|
-
* Responsive "size" props are supported.
|
|
2873
|
-
*
|
|
2874
|
-
* Exposed "ref" attached to root node.
|
|
2875
|
-
*
|
|
2876
|
-
* See full [TooltipComponentProps](https://github.com/foxford/ui/blob/master/src/components/TooltipComponent/types.ts)
|
|
2877
|
-
*/
|
|
2878
|
-
declare const TooltipComponent: React.ForwardRefExoticComponent<TooltipComponentProps>;
|
|
2879
|
-
|
|
2880
|
-
interface TooltipProps extends ResponsiveSizeProps, React.RefAttributes<HTMLDivElement> {
|
|
2881
|
-
/** UI: brand (v3), or default (v2) */
|
|
2882
|
-
preset?: ThemePreset;
|
|
2883
|
-
/** Custom colors */
|
|
2884
|
-
palette?: Partial<Record<keyof TooltipComponentPalette, Color>>;
|
|
2885
|
-
/** Appearance variant */
|
|
2886
|
-
black?: boolean;
|
|
2887
|
-
/** Appearance variant */
|
|
2888
|
-
contrast?: boolean;
|
|
2889
|
-
/** Open automatically */
|
|
2890
|
-
autoOpen?: boolean;
|
|
2891
|
-
/** It will be called on state change */
|
|
2892
|
-
callback?: (action: 'open' | 'close', props: Props) => void;
|
|
2893
|
-
/** Default tooltip target */
|
|
2894
|
-
children?: React.ReactNode;
|
|
2895
|
-
/** Custom UI for tooltip */
|
|
2896
|
-
component?: React.ReactElement | ((props: Pick<TooltipProps, 'size' | 'sizeXXS' | 'sizeXS' | 'sizeS' | 'sizeM' | 'sizeL' | 'sizeXL' | 'black' | 'contrast' | 'showCloseButton' | 'closeButtonProps'> & {
|
|
2897
|
-
id?: string;
|
|
2898
|
-
role?: string;
|
|
2899
|
-
closeFn?: () => void;
|
|
2900
|
-
}) => React.ReactElement);
|
|
2901
|
-
/** Tooltip content */
|
|
2902
|
-
content?: React.ReactNode;
|
|
2903
|
-
/** Props for content text component */
|
|
2904
|
-
contentProps?: TextProps;
|
|
2905
|
-
/** Debugging logs in console */
|
|
2906
|
-
debug?: boolean;
|
|
2907
|
-
/** Don't adjust tooltip on scroll / resize */
|
|
2908
|
-
disableFlip?: boolean;
|
|
2909
|
-
/** Don't convert 'hover' to 'click' event on mobile */
|
|
2910
|
-
disableHoverToClick?: boolean;
|
|
2911
|
-
/** Trigger event for tooltip */
|
|
2912
|
-
event?: 'click' | 'hover';
|
|
2913
|
-
/** Pause in 'seconds' to wait before close tooltip (valid for 'hover' event) */
|
|
2914
|
-
eventDelay?: number;
|
|
2915
|
-
/** Tooltip footer */
|
|
2916
|
-
footer?: React.ReactNode;
|
|
2917
|
-
/** Callback to get popper.js instance */
|
|
2918
|
-
getPopper?: (popper: PopperInstance, origin: 'floater' | 'wrapper') => void;
|
|
2919
|
-
/** Don't show tooltip arrow */
|
|
2920
|
-
hideArrow?: boolean;
|
|
2921
|
-
/** Distance in 'px' between tooltip and its target */
|
|
2922
|
-
offset?: number;
|
|
2923
|
-
/** Switch between normal and controlled modes. It will disable built in tooltip behavior */
|
|
2924
|
-
open?: boolean;
|
|
2925
|
-
/** Tooltip position relative to its target */
|
|
2926
|
-
placement?: PlacementOptions;
|
|
2927
|
-
/** CSS selector or element to render tooltips */
|
|
2928
|
-
portalElement?: SelectorOrElement;
|
|
2929
|
-
/** Custom styles */
|
|
2930
|
-
styles?: Partial<Styles>;
|
|
2931
|
-
/** Show button to close tooltip */
|
|
2932
|
-
showCloseButton?: boolean;
|
|
2933
|
-
/** Props for button to close tooltip */
|
|
2934
|
-
closeButtonProps?: React.ComponentPropsWithoutRef<'button'>;
|
|
2935
|
-
/** Tooltip target. If it's not set, 'children' will be used */
|
|
2936
|
-
target?: SelectorOrElement;
|
|
2937
|
-
/** Tooltip title */
|
|
2938
|
-
title?: React.ReactNode;
|
|
2939
|
-
/** Props for title text component */
|
|
2940
|
-
titleProps?: TextProps;
|
|
2941
|
-
/** Position of tooltip wrapper relative to target */
|
|
2942
|
-
wrapperOptions?: {
|
|
2943
|
-
offset?: number;
|
|
2944
|
-
placement?: Omit<PlacementOptions, 'center'>;
|
|
2945
|
-
position?: boolean;
|
|
2946
|
-
};
|
|
2947
|
-
}
|
|
2948
|
-
|
|
2949
|
-
/**
|
|
2950
|
-
*
|
|
2951
|
-
* Component accepts ["react-floater"](https://www.npmjs.com/package/react-floater/v/0.8.2) v0.8.2 props.
|
|
2952
|
-
*
|
|
2953
|
-
* Responsive "size" props are supported.
|
|
2954
|
-
*
|
|
2955
|
-
* Exposed "ref" attached to tooltip component root.
|
|
2956
|
-
*
|
|
2957
|
-
* See full [TooltipProps](https://github.com/foxford/ui/blob/master/src/components/Tooltip/types.ts)
|
|
2958
|
-
*/
|
|
2959
|
-
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps> & {
|
|
2960
|
-
Component: typeof TooltipComponent;
|
|
2961
|
-
};
|
|
2962
|
-
|
|
2963
3207
|
interface TagProps extends BaseProps, DisplayProperty, ColorProperty, ResponsiveNamedProperty<'height'>, ResponsiveNamedProperty<'width'> {
|
|
2964
3208
|
as?: 'button' | 'div' | 'input' | 'label';
|
|
2965
3209
|
/**
|
|
@@ -3601,48 +3845,4 @@ interface FormLabelProps extends ResponsiveSizeProps, ResponsiveMarginProps, Rea
|
|
|
3601
3845
|
*/
|
|
3602
3846
|
declare const FormLabel: React.ForwardRefExoticComponent<FormLabelProps>;
|
|
3603
3847
|
|
|
3604
|
-
|
|
3605
|
-
color: CSSColor;
|
|
3606
|
-
gradientColor: CSSColor;
|
|
3607
|
-
gradientHighlightColor: CSSColor;
|
|
3608
|
-
};
|
|
3609
|
-
interface SkeletonProps extends ResponsiveMarginProps, React.ComponentPropsWithRef<'div'> {
|
|
3610
|
-
/** Element to infer sizing */
|
|
3611
|
-
children?: React.ReactNode;
|
|
3612
|
-
/** Custom colors */
|
|
3613
|
-
palette?: Partial<Record<keyof SkeletonPalette, Color>>;
|
|
3614
|
-
/** Display 'inline-block' */
|
|
3615
|
-
inline?: boolean;
|
|
3616
|
-
/** Root border-radius: 50% */
|
|
3617
|
-
round?: boolean;
|
|
3618
|
-
/** Root border-radius */
|
|
3619
|
-
borderRadius?: string | number;
|
|
3620
|
-
/** Root width */
|
|
3621
|
-
width?: string | number;
|
|
3622
|
-
/** Root height */
|
|
3623
|
-
height?: string | number;
|
|
3624
|
-
/** Value (ms) to control animation speed */
|
|
3625
|
-
animationDuration?: number;
|
|
3626
|
-
/** Delay to animation start (ms) to avoid flicker at fast connection */
|
|
3627
|
-
animationDelay?: number;
|
|
3628
|
-
/** Appearance variant */
|
|
3629
|
-
primary?: boolean;
|
|
3630
|
-
/** Appearance variant */
|
|
3631
|
-
secondary?: boolean;
|
|
3632
|
-
/** Appearance variant */
|
|
3633
|
-
onColored?: boolean;
|
|
3634
|
-
}
|
|
3635
|
-
|
|
3636
|
-
/**
|
|
3637
|
-
*
|
|
3638
|
-
* Component accepts all \<div\> attributes.
|
|
3639
|
-
*
|
|
3640
|
-
* Responsive "margin" props are supported.
|
|
3641
|
-
*
|
|
3642
|
-
* Exposed "ref" attached to root node.
|
|
3643
|
-
*
|
|
3644
|
-
* See full [SkeletonProps](https://github.com/foxford/ui/blob/master/src/components/Skeleton/types.ts)
|
|
3645
|
-
*/
|
|
3646
|
-
declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps>;
|
|
3647
|
-
|
|
3648
|
-
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, Skeleton, 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 };
|
|
3848
|
+
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, Popover, Progress, RGB, RGBA, Radio, withThemeScrollable as Scrollable, Section, Select, Separator, Size, Sizes, Skeleton, 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 };
|