@transferwise/components 38.4.1 → 39.0.0
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/CHANGELOG.md +14 -0
- package/build/es/no-polyfill/accordion/AccordionItem/AccordionItem.js +1 -1
- package/build/es/no-polyfill/alert/Alert.js +1 -1
- package/build/es/no-polyfill/checkbox/Checkbox.js +1 -1
- package/build/es/no-polyfill/common/Option/Option.js +1 -1
- package/build/es/no-polyfill/common/bottomSheet/BottomSheet.js +2 -2
- package/build/es/no-polyfill/common/direction.js +1 -0
- package/build/es/no-polyfill/common/domHelpers/index.js +1 -1
- package/build/es/no-polyfill/common/hocs/index.js +1 -0
- package/build/es/no-polyfill/common/hocs/theme/index.js +1 -0
- package/build/es/no-polyfill/common/hocs/theme/withTheme.js +2 -0
- package/build/es/no-polyfill/common/hocs/theme/withTheme.spec.js +1 -0
- package/build/es/no-polyfill/common/hooks/index.js +1 -1
- package/build/es/no-polyfill/common/hooks/useTheme/index.js +1 -0
- package/build/es/no-polyfill/common/hooks/useTheme/useTheme.js +1 -0
- package/build/es/no-polyfill/common/hooks/useTheme/useTheme.spec.js +1 -0
- package/build/es/no-polyfill/common/index.js +1 -1
- package/build/es/no-polyfill/common/locale/index.js +13 -3
- package/build/es/no-polyfill/common/theme.js +1 -1
- package/build/es/no-polyfill/dateInput/DateInput.js +2 -2
- package/build/es/no-polyfill/dateLookup/dateHeader/DateHeader.js +1 -1
- package/build/es/no-polyfill/decision/Decision.js +3 -3
- package/build/es/no-polyfill/drawer/Drawer.js +1 -1
- package/build/es/no-polyfill/dynamicFieldDefinitionList/DynamicFieldDefinitionList.js +1 -1
- package/build/es/no-polyfill/dynamicFieldDefinitionList/FormattedValue/FormattedValue.js +1 -1
- package/build/es/no-polyfill/index.js +4 -4
- package/build/es/no-polyfill/logo/Logo.js +1 -1
- package/build/es/no-polyfill/nudge/Nudge.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/PhoneNumberInput.js +1 -1
- package/build/es/no-polyfill/provider/Provider.js +1 -1
- package/build/es/no-polyfill/provider/Provider.spec.js +2 -0
- package/build/es/no-polyfill/provider/Provider.story.js +1 -0
- package/build/es/no-polyfill/provider/direction/DirectionProvider.js +1 -1
- package/build/es/no-polyfill/provider/direction/DirectionProvider.spec.js +1 -0
- package/build/es/no-polyfill/provider/index.js +1 -1
- package/build/es/no-polyfill/provider/theme/ThemeProvider.js +2 -0
- package/build/es/no-polyfill/provider/theme/ThemeProvider.spec.js +2 -0
- package/build/es/no-polyfill/provider/theme/index.js +1 -0
- package/build/es/no-polyfill/radio/Radio.js +1 -1
- package/build/es/no-polyfill/select/option/Option.js +1 -1
- package/build/es/no-polyfill/snackbar/Snackbar.js +1 -1
- package/build/es/no-polyfill/stepper/Stepper.js +1 -1
- package/build/es/no-polyfill/summary/Summary.js +1 -1
- package/build/es/no-polyfill/switch/Switch.js +1 -1
- package/build/es/no-polyfill/tabs/Tabs.js +1 -1
- package/build/es/no-polyfill/tooltip/Tooltip.js +8 -1
- package/build/es/no-polyfill/tooltip/Tooltip.spec.js +1 -0
- package/build/es/no-polyfill/tooltip/Tooltip.story.js +1 -0
- package/build/es/no-polyfill/upload/Upload.js +1 -1
- package/build/es/no-polyfill/upload/steps/completeStep/completeStep.js +1 -1
- package/build/es/no-polyfill/upload/steps/processingStep/processingStep.js +1 -1
- package/build/es/no-polyfill/uploadInput/uploadButton/UploadButton.js +1 -1
- package/build/es/no-polyfill/uploadInput/uploadItem/UploadItem.js +2 -2
- package/build/es/polyfill/accordion/AccordionItem/AccordionItem.js +1 -1
- package/build/es/polyfill/alert/Alert.js +1 -1
- package/build/es/polyfill/checkbox/Checkbox.js +1 -1
- package/build/es/polyfill/common/Option/Option.js +1 -1
- package/build/es/polyfill/common/bottomSheet/BottomSheet.js +2 -2
- package/build/es/polyfill/common/direction.js +1 -0
- package/build/es/polyfill/common/domHelpers/index.js +1 -1
- package/build/es/polyfill/common/hocs/index.js +1 -0
- package/build/es/polyfill/common/hocs/theme/index.js +1 -0
- package/build/es/polyfill/common/hocs/theme/withTheme.js +2 -0
- package/build/es/polyfill/common/hocs/theme/withTheme.spec.js +1 -0
- package/build/es/polyfill/common/hooks/index.js +1 -1
- package/build/es/polyfill/common/hooks/useTheme/index.js +1 -0
- package/build/es/polyfill/common/hooks/useTheme/useTheme.js +1 -0
- package/build/es/polyfill/common/hooks/useTheme/useTheme.spec.js +1 -0
- package/build/es/polyfill/common/index.js +1 -1
- package/build/es/polyfill/common/locale/index.js +13 -3
- package/build/es/polyfill/common/theme.js +1 -1
- package/build/es/polyfill/dateInput/DateInput.js +2 -2
- package/build/es/polyfill/dateLookup/dateHeader/DateHeader.js +1 -1
- package/build/es/polyfill/decision/Decision.js +3 -3
- package/build/es/polyfill/drawer/Drawer.js +1 -1
- package/build/es/polyfill/dynamicFieldDefinitionList/DynamicFieldDefinitionList.js +1 -1
- package/build/es/polyfill/dynamicFieldDefinitionList/FormattedValue/FormattedValue.js +1 -1
- package/build/es/polyfill/index.js +4 -4
- package/build/es/polyfill/logo/Logo.js +1 -1
- package/build/es/polyfill/nudge/Nudge.js +1 -1
- package/build/es/polyfill/phoneNumberInput/PhoneNumberInput.js +1 -1
- package/build/es/polyfill/provider/Provider.js +1 -1
- package/build/es/polyfill/provider/Provider.spec.js +2 -0
- package/build/es/polyfill/provider/Provider.story.js +1 -0
- package/build/es/polyfill/provider/direction/DirectionProvider.js +1 -1
- package/build/es/polyfill/provider/direction/DirectionProvider.spec.js +1 -0
- package/build/es/polyfill/provider/index.js +1 -1
- package/build/es/polyfill/provider/theme/ThemeProvider.js +2 -0
- package/build/es/polyfill/provider/theme/ThemeProvider.spec.js +2 -0
- package/build/es/polyfill/provider/theme/index.js +1 -0
- package/build/es/polyfill/radio/Radio.js +1 -1
- package/build/es/polyfill/select/option/Option.js +1 -1
- package/build/es/polyfill/snackbar/Snackbar.js +1 -1
- package/build/es/polyfill/stepper/Stepper.js +1 -1
- package/build/es/polyfill/summary/Summary.js +1 -1
- package/build/es/polyfill/switch/Switch.js +1 -1
- package/build/es/polyfill/tabs/Tabs.js +1 -1
- package/build/es/polyfill/tooltip/Tooltip.js +8 -1
- package/build/es/polyfill/tooltip/Tooltip.spec.js +1 -0
- package/build/es/polyfill/tooltip/Tooltip.story.js +1 -0
- package/build/es/polyfill/upload/Upload.js +1 -1
- package/build/es/polyfill/upload/steps/completeStep/completeStep.js +1 -1
- package/build/es/polyfill/upload/steps/processingStep/processingStep.js +1 -1
- package/build/es/polyfill/uploadInput/uploadButton/UploadButton.js +1 -1
- package/build/es/polyfill/uploadInput/uploadItem/UploadItem.js +2 -2
- package/build/main.css +1 -1
- package/build/styles/accordion/Accordion.css +1 -1
- package/build/styles/avatar/Avatar.css +1 -1
- package/build/styles/badge/Badge.css +1 -1
- package/build/styles/button/Button.css +1 -1
- package/build/styles/card/Card.css +1 -1
- package/build/styles/checkboxButton/CheckboxButton.css +1 -1
- package/build/styles/chips/Chip.css +1 -1
- package/build/styles/circularButton/CircularButton.css +1 -1
- package/build/styles/common/Option/Option.css +1 -1
- package/build/styles/common/RadioButton/RadioButton.css +1 -1
- package/build/styles/common/bottomSheet/BottomSheet.css +1 -1
- package/build/styles/common/closeButton/CloseButton.css +1 -1
- package/build/styles/dateLookup/DateLookup.css +1 -1
- package/build/styles/dateLookup/dateTrigger/DateTrigger.css +1 -1
- package/build/styles/decision/Decision.css +1 -1
- package/build/styles/definitionList/DefinitionList.css +1 -1
- package/build/styles/dimmer/Dimmer.css +1 -1
- package/build/styles/drawer/Drawer.css +1 -1
- package/build/styles/emphasis/Emphasis.css +1 -1
- package/build/styles/flowNavigation/FlowNavigation.css +1 -1
- package/build/styles/flowNavigation/animatedLabel/AnimatedLabel.css +1 -1
- package/build/styles/flowNavigation/backButton/BackButton.css +1 -1
- package/build/styles/header/Header.css +1 -1
- package/build/styles/info/Info.css +1 -1
- package/build/styles/instructionsList/InstructionsList.css +1 -1
- package/build/styles/lab/mobileNav/MobileNav.css +1 -1
- package/build/styles/lab/pagination/Pagination.css +1 -1
- package/build/styles/link/Link.css +1 -1
- package/build/styles/loader/Loader.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/moneyInput/MoneyInput.css +1 -1
- package/build/styles/navigationOption/NavigationOption.css +1 -1
- package/build/styles/navigationOptionsList/NavigationOptionsList.css +1 -1
- package/build/styles/nudge/Nudge.css +1 -1
- package/build/styles/overlayHeader/OverlayHeader.css +1 -1
- package/build/styles/phoneNumberInput/PhoneNumberInput.css +1 -1
- package/build/styles/popover/Popover.css +1 -1
- package/build/styles/section/Section.css +1 -1
- package/build/styles/slidingPanel/SlidingPanel.css +1 -1
- package/build/styles/snackbar/Snackbar.css +1 -1
- package/build/styles/stepper/Stepper.css +1 -1
- package/build/styles/summary/Summary.css +1 -1
- package/build/styles/switch/Switch.css +1 -1
- package/build/styles/tabs/Tabs.css +1 -1
- package/build/styles/tile/Tile.css +1 -1
- package/build/styles/tooltip/Tooltip.css +1 -1
- package/build/styles/typeahead/Typeahead.css +1 -1
- package/build/styles/typeahead/typeaheadOption/TypeaheadOption.css +1 -1
- package/build/styles/uploadInput/UploadInput.css +1 -1
- package/build/styles/uploadInput/uploadButton/UploadButton.css +1 -1
- package/build/styles/uploadInput/uploadItem/UploadItem.css +1 -1
- package/build/types/common/direction.d.ts +6 -0
- package/build/types/common/domHelpers/index.d.ts +2 -1
- package/build/types/common/hocs/index.d.ts +1 -0
- package/build/types/common/hocs/theme/index.d.ts +1 -0
- package/build/types/common/hocs/theme/withTheme.d.ts +10 -0
- package/build/types/common/hocs/theme/withTheme.spec.d.ts +1 -0
- package/build/types/common/hooks/index.d.ts +3 -2
- package/build/types/common/hooks/useDirection/useDirection.d.ts +3 -2
- package/build/types/common/hooks/useTheme/index.d.ts +1 -0
- package/build/types/common/hooks/useTheme/useTheme.d.ts +1 -0
- package/build/types/common/hooks/useTheme/useTheme.spec.d.ts +1 -0
- package/build/types/common/index.d.ts +2 -0
- package/build/types/common/locale/index.d.ts +23 -2
- package/build/types/common/propsValues/position.d.ts +4 -0
- package/build/types/common/theme.d.ts +5 -2
- package/build/types/index.d.ts +5 -3
- package/build/types/provider/Provider.spec.d.ts +1 -0
- package/build/types/provider/Provider.story.d.ts +23 -0
- package/build/types/provider/direction/DirectionProvider.d.ts +8 -18
- package/build/types/provider/direction/DirectionProvider.spec.d.ts +1 -0
- package/build/types/provider/index.d.ts +2 -0
- package/build/types/provider/theme/ThemeProvider.d.ts +8 -0
- package/build/types/provider/theme/ThemeProvider.spec.d.ts +1 -0
- package/build/types/provider/theme/index.d.ts +1 -0
- package/build/types/test-utils/index.d.ts +0 -8
- package/build/types/tooltip/Tooltip.d.ts +9 -18
- package/build/types/tooltip/Tooltip.spec.d.ts +1 -0
- package/build/types/tooltip/Tooltip.story.d.ts +12 -0
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +10 -10
- package/scripts/generate-type-declarations.js +85 -0
|
@@ -14,6 +14,22 @@ export function adjustLocale(locale: string): string | null;
|
|
|
14
14
|
* @returns {string|null}
|
|
15
15
|
*/
|
|
16
16
|
export function getLangFromLocale(locale: string): string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Provides corresponding country code (iso2) for locales code with explicit region value (`es-ES`, `en-GB`, `ja-JP` etc.)
|
|
19
|
+
* if the value is invalid or missing region it returns null
|
|
20
|
+
*
|
|
21
|
+
* @param {string} locale
|
|
22
|
+
* @returns {string|null}
|
|
23
|
+
*/
|
|
24
|
+
export function getCountryFromLocale(locale: string): string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Provides the layout direction for a given locale.
|
|
27
|
+
* If locale is invalid or language is unsupported returns Direction.LTR
|
|
28
|
+
*
|
|
29
|
+
* @param {string} locale (`es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP` etc)
|
|
30
|
+
* @returns {Direction} The layout direction based on the locale
|
|
31
|
+
*/
|
|
32
|
+
export function getDirectionFromLocale(locale: string): Direction;
|
|
17
33
|
/**
|
|
18
34
|
* Default language
|
|
19
35
|
*
|
|
@@ -26,6 +42,11 @@ export const DEFAULT_LANG: string;
|
|
|
26
42
|
* @type {string}
|
|
27
43
|
*/
|
|
28
44
|
export const DEFAULT_LOCALE: string;
|
|
29
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Array of languages that are written from the right to the left
|
|
47
|
+
*
|
|
48
|
+
* @type {string[]}
|
|
49
|
+
*/
|
|
50
|
+
export const RTL_LANGUAGES: string[];
|
|
30
51
|
export const SUPPORTED_LANGUAGES: string[];
|
|
31
|
-
|
|
52
|
+
import { Direction } from "../direction";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export declare enum Theme {
|
|
2
2
|
LIGHT = "light",
|
|
3
|
-
DARK = "dark"
|
|
3
|
+
DARK = "dark",
|
|
4
|
+
NAVY = "navy"
|
|
4
5
|
}
|
|
5
|
-
export declare type ThemeDark = 'dark';
|
|
6
6
|
export declare type ThemeLight = 'light';
|
|
7
|
+
export declare type ThemeDark = 'dark';
|
|
8
|
+
export declare type ThemeNavy = 'navy';
|
|
9
|
+
export declare type ThemeType = ThemeLight | ThemeDark | ThemeNavy;
|
package/build/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Types
|
|
3
3
|
*/
|
|
4
4
|
export type { UploadedFile, UploadError, UploadResponse } from './uploadInput/types';
|
|
5
|
+
export type { LayoutDirection } from './common';
|
|
5
6
|
/**
|
|
6
7
|
* Components
|
|
7
8
|
*/
|
|
@@ -50,7 +51,7 @@ export { default as OverlayHeader } from './overlayHeader';
|
|
|
50
51
|
export { default as PhoneNumberInput } from './phoneNumberInput';
|
|
51
52
|
export { default as Popover } from './popover';
|
|
52
53
|
export { default as ProcessIndicator } from './processIndicator';
|
|
53
|
-
export { default as Provider } from './provider';
|
|
54
|
+
export { default as Provider, DirectionProvider } from './provider';
|
|
54
55
|
export { default as Radio } from './radio';
|
|
55
56
|
export { default as RadioGroup } from './radioGroup';
|
|
56
57
|
export { default as RadioOption } from './radioOption';
|
|
@@ -75,10 +76,11 @@ export { SnackbarConsumer, SnackbarContext } from './snackbar/SnackbarContext';
|
|
|
75
76
|
* Hooks
|
|
76
77
|
*/
|
|
77
78
|
export { default as useSnackbar } from './snackbar/useSnackbar';
|
|
79
|
+
export { useDirection } from './common/hooks';
|
|
78
80
|
/**
|
|
79
81
|
* Enums
|
|
80
82
|
*/
|
|
81
|
-
export { Size, Width, Sentiment, Priority, ControlType, Type, Theme, DateMode, MonthFormat, Position, Scroll, ProfileType, Breakpoint, Layout, Status, MarkdownNodeType, } from './common';
|
|
83
|
+
export { Direction, Size, Width, Sentiment, Priority, ControlType, Type, Theme, DateMode, MonthFormat, Position, Scroll, ProfileType, Breakpoint, Layout, Status, MarkdownNodeType, } from './common';
|
|
82
84
|
export { AvatarType } from './avatar';
|
|
83
85
|
export { InfoPresentation } from './info';
|
|
84
86
|
export { UploadStep } from './upload';
|
|
@@ -89,7 +91,7 @@ export { FileType } from './common';
|
|
|
89
91
|
/**
|
|
90
92
|
* Utils
|
|
91
93
|
*/
|
|
92
|
-
export { SUPPORTED_LANGUAGES, DEFAULT_LANG, DEFAULT_LOCALE, adjustLocale, getLangFromLocale, getCountryFromLocale, } from './common';
|
|
94
|
+
export { SUPPORTED_LANGUAGES, RTL_LANGUAGES, DEFAULT_LANG, DEFAULT_LOCALE, adjustLocale, getLangFromLocale, getCountryFromLocale, getDirectionFromLocale, isServerSide, isBrowser, } from './common';
|
|
93
95
|
/**
|
|
94
96
|
* Translations
|
|
95
97
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
component: {
|
|
4
|
+
({ i18n, children }: {
|
|
5
|
+
i18n: any;
|
|
6
|
+
children: any;
|
|
7
|
+
}): JSX.Element;
|
|
8
|
+
propTypes: {
|
|
9
|
+
i18n: import("prop-types").Validator<import("prop-types").InferProps<{
|
|
10
|
+
locale: import("prop-types").Validator<string>;
|
|
11
|
+
messages: import("prop-types").Validator<import("prop-types").InferProps<{}>>;
|
|
12
|
+
defaultRichTextElements: import("prop-types").Requireable<import("prop-types").InferProps<{}>>;
|
|
13
|
+
}>>;
|
|
14
|
+
children: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
15
|
+
};
|
|
16
|
+
defaultProps: {
|
|
17
|
+
children: undefined;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
title: string;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
23
|
+
export declare const Basic: () => JSX.Element;
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const locale: PropTypes.Requireable<string>;
|
|
10
|
-
}
|
|
11
|
-
namespace defaultProps {
|
|
12
|
-
const children_1: null;
|
|
13
|
-
export { children_1 as children };
|
|
14
|
-
export { DEFAULT_LOCALE as locale };
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
import PropTypes from "prop-types";
|
|
18
|
-
import { DEFAULT_LOCALE } from "../../common/locale";
|
|
1
|
+
import { ReactElement, PropsWithChildren } from 'react';
|
|
2
|
+
import { LayoutDirection } from '../../common/direction';
|
|
3
|
+
export declare const DirectionContext: import("react").Context<LayoutDirection>;
|
|
4
|
+
declare type Props = PropsWithChildren<{
|
|
5
|
+
direction: LayoutDirection;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const DirectionProvider: ({ direction, children }: Props) => ReactElement;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { ThemeType } from '../../common/theme';
|
|
3
|
+
export declare const ThemeContext: import("react").Context<ThemeType>;
|
|
4
|
+
declare type ThemeProviderProps = PropsWithChildren<{
|
|
5
|
+
theme: ThemeType;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const ThemeProvider: ({ theme, children }: ThemeProviderProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThemeContext, ThemeProvider } from "./ThemeProvider";
|
|
@@ -4,10 +4,6 @@ import userEvent from "@testing-library/user-event";
|
|
|
4
4
|
* Custom `render` function which wraps passed elements in Provider component
|
|
5
5
|
* Source: https://testing-library.com/docs/example-react-intl/#creating-a-custom-render-function
|
|
6
6
|
*
|
|
7
|
-
* @param ui
|
|
8
|
-
* @param root0
|
|
9
|
-
* @param root0.locale
|
|
10
|
-
* @param root0.messages
|
|
11
7
|
*/
|
|
12
8
|
declare function customRender(ui: any, { locale, messages, ...renderOptions }?: {
|
|
13
9
|
locale?: string | undefined;
|
|
@@ -58,10 +54,6 @@ declare function customRender(ui: any, { locale, messages, ...renderOptions }?:
|
|
|
58
54
|
* Custom `renderHook` function which wraps passed elements in Provider component
|
|
59
55
|
* For more info: https://react-hooks-testing-library.com/usage/advanced-hooks#context
|
|
60
56
|
*
|
|
61
|
-
* @param callback
|
|
62
|
-
* @param root0
|
|
63
|
-
* @param root0.locale
|
|
64
|
-
* @param root0.messages
|
|
65
57
|
*/
|
|
66
58
|
declare function customRenderHook(callback: any, { locale, messages }?: {
|
|
67
59
|
locale?: string | undefined;
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
label: React.ReactNode;
|
|
11
|
-
offset?: number;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default class Tooltip extends React.Component<TooltipProps, any> {
|
|
15
|
-
render(): JSX.Element;
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
1
|
+
import { ReactNode, ReactElement, PropsWithChildren } from 'react';
|
|
2
|
+
import { CommonProps } from '../common';
|
|
3
|
+
import { PositionBottom, PositionLeft, PositionRight, PositionTop } from '../common/propsValues/position';
|
|
4
|
+
declare type Props = PropsWithChildren<{
|
|
5
|
+
position?: PositionTop | PositionRight | PositionBottom | PositionLeft;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
}> & CommonProps;
|
|
8
|
+
declare const Tooltip: ({ position, children, label, className, }: Props) => ReactElement;
|
|
9
|
+
export default Tooltip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
component: ({ position, children, label, className, }: {
|
|
4
|
+
position?: "left" | "right" | "bottom" | "top" | undefined;
|
|
5
|
+
label: import("react").ReactNode;
|
|
6
|
+
} & {
|
|
7
|
+
children?: import("react").ReactNode;
|
|
8
|
+
} & import("../common").CommonProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
9
|
+
title: string;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
12
|
+
export declare const Basic: () => JSX.Element;
|