@transferwise/components 45.3.0 → 45.5.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/build/es/no-polyfill/accordion/Accordion.story.js +1 -0
- package/build/es/no-polyfill/actionButton/ActionButton.js +1 -1
- package/build/es/no-polyfill/actionButton/ActionButton.spec.js +1 -1
- package/build/es/no-polyfill/actionButton/ActionButton.story.js +1 -1
- package/build/es/no-polyfill/avatar/Avatar.story.js +1 -1
- package/build/es/no-polyfill/button/Button.story.js +1 -0
- package/build/es/no-polyfill/checkbox/Checkbox.story.js +1 -0
- package/build/es/no-polyfill/circularButton/CircularButton.js +1 -1
- package/build/es/no-polyfill/common/bottomSheet/BottomSheet.story.js +2 -0
- package/build/es/no-polyfill/common/flowHeader/FlowHeader.js +1 -1
- package/build/es/no-polyfill/common/hooks/index.js +1 -1
- package/build/es/no-polyfill/common/hooks/useClientWidth/useClientWidth.js +1 -1
- package/build/es/no-polyfill/common/hooks/useLayout/useLayout.js +1 -1
- package/build/es/no-polyfill/dateInput/DateInput.story.js +1 -0
- package/build/es/no-polyfill/dateLookup/dateTrigger/DateTrigger.js +1 -1
- package/build/es/no-polyfill/decision/Decision.js +2 -2
- package/build/es/no-polyfill/definitionList/DefinitionList.js +1 -1
- package/build/es/no-polyfill/flowNavigation/FlowNavigation.js +2 -2
- package/build/es/no-polyfill/flowNavigation/backButton/BackButton.js +1 -1
- package/build/es/no-polyfill/index.js +1 -1
- package/build/es/no-polyfill/info/Info.story.js +1 -0
- package/build/es/no-polyfill/modal/Modal.story.js +2 -1
- package/build/es/no-polyfill/overlayHeader/OverlayHeader.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/PhoneNumberInput.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/data/countries.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/excludeCountries/excludeCountries.js +8 -0
- package/build/es/no-polyfill/phoneNumberInput/utils/excludeCountries/index.js +1 -0
- package/build/es/no-polyfill/phoneNumberInput/utils/index.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/tile/Tile.js +1 -1
- package/build/es/no-polyfill/tooltip/Tooltip.story.js +1 -1
- package/build/es/polyfill/accordion/Accordion.story.js +1 -0
- package/build/es/polyfill/actionButton/ActionButton.js +1 -1
- package/build/es/polyfill/actionButton/ActionButton.spec.js +1 -1
- package/build/es/polyfill/actionButton/ActionButton.story.js +1 -1
- package/build/es/polyfill/avatar/Avatar.story.js +1 -1
- package/build/es/polyfill/button/Button.story.js +1 -0
- package/build/es/polyfill/checkbox/Checkbox.story.js +1 -0
- package/build/es/polyfill/circularButton/CircularButton.js +1 -1
- package/build/es/polyfill/common/bottomSheet/BottomSheet.story.js +2 -0
- package/build/es/polyfill/common/flowHeader/FlowHeader.js +1 -1
- package/build/es/polyfill/common/hooks/index.js +1 -1
- package/build/es/polyfill/common/hooks/useClientWidth/useClientWidth.js +1 -1
- package/build/es/polyfill/common/hooks/useLayout/useLayout.js +1 -1
- package/build/es/polyfill/dateInput/DateInput.story.js +1 -0
- package/build/es/polyfill/dateLookup/dateTrigger/DateTrigger.js +1 -1
- package/build/es/polyfill/decision/Decision.js +2 -2
- package/build/es/polyfill/definitionList/DefinitionList.js +1 -1
- package/build/es/polyfill/flowNavigation/FlowNavigation.js +2 -2
- package/build/es/polyfill/flowNavigation/backButton/BackButton.js +1 -1
- package/build/es/polyfill/index.js +1 -1
- package/build/es/polyfill/info/Info.story.js +1 -0
- package/build/es/polyfill/modal/Modal.story.js +2 -1
- package/build/es/polyfill/overlayHeader/OverlayHeader.js +1 -1
- package/build/es/polyfill/phoneNumberInput/PhoneNumberInput.js +1 -1
- package/build/es/polyfill/phoneNumberInput/data/countries.js +1 -1
- package/build/es/polyfill/phoneNumberInput/utils/excludeCountries/excludeCountries.js +8 -0
- package/build/es/polyfill/phoneNumberInput/utils/excludeCountries/index.js +1 -0
- package/build/es/polyfill/phoneNumberInput/utils/index.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/tile/Tile.js +1 -1
- package/build/es/polyfill/tooltip/Tooltip.story.js +1 -1
- package/build/main.css +1 -1
- package/build/styles/actionButton/ActionButton.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/popover/Popover.css +1 -1
- package/build/styles/select/Select.css +1 -1
- package/build/styles/snackbar/Snackbar.css +1 -1
- package/build/styles/stepper/Stepper.css +1 -1
- package/build/types/accordion/Accordion.story.d.ts +46 -0
- package/build/types/actionButton/ActionButton.d.ts +3 -0
- package/build/types/actionButton/ActionButton.story.d.ts +1 -1
- package/build/types/avatar/Avatar.story.d.ts +3 -1
- package/build/types/button/Button.story.d.ts +4586 -0
- package/build/types/checkbox/Checkbox.story.d.ts +54 -0
- package/build/types/circularButton/CircularButton.d.ts +1 -1
- package/build/types/common/bottomSheet/BottomSheet.story.d.ts +29 -0
- package/build/types/common/flowHeader/FlowHeader.d.ts +10 -1
- package/build/types/common/hooks/index.d.ts +1 -1
- package/build/types/common/hooks/useClientWidth/useClientWidth.d.ts +9 -8
- package/build/types/dateInput/DateInput.story.d.ts +71 -0
- package/build/types/decision/Decision.d.ts +1 -1
- package/build/types/definitionList/DefinitionList.d.ts +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts +16 -34
- package/build/types/index.d.ts +2 -2
- package/build/types/info/Info.story.d.ts +39 -0
- package/build/types/listItem/ListItem.d.ts +1 -1
- package/build/types/listItem/ListItem.story.d.ts +1 -1
- package/build/types/modal/Modal.story.d.ts +20 -3
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +4 -0
- package/build/types/phoneNumberInput/utils/excludeCountries/excludeCountries.d.ts +1 -0
- package/build/types/phoneNumberInput/utils/excludeCountries/index.d.ts +1 -0
- package/build/types/phoneNumberInput/utils/index.d.ts +1 -0
- package/build/types/snackbar/Snackbar.d.ts +1 -1
- package/build/types/stepper/Stepper.d.ts +13 -18
- package/build/types/test-utils/VariantDecorator.d.ts +18 -0
- package/build/types/test-utils/story-config.d.ts +18 -50
- package/build/types/tooltip/Tooltip.story.d.ts +17 -9
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +7 -13
- package/scripts/generate-type-declarations.js +0 -2
- package/build/es/no-polyfill/common/flowHeader/index.js +0 -1
- package/build/es/no-polyfill/common/hooks/useClientWidth/index.js +0 -1
- package/build/es/no-polyfill/flowNavigation/index.js +0 -1
- package/build/es/no-polyfill/stepper/index.js +0 -1
- package/build/es/polyfill/common/flowHeader/index.js +0 -1
- package/build/es/polyfill/common/hooks/useClientWidth/index.js +0 -1
- package/build/es/polyfill/flowNavigation/index.js +0 -1
- package/build/es/polyfill/stepper/index.js +0 -1
- package/build/types/common/flowHeader/index.d.ts +0 -1
- package/build/types/common/hooks/useClientWidth/index.d.ts +0 -1
- package/build/types/flowNavigation/index.d.ts +0 -1
- package/build/types/stepper/index.d.ts +0 -2
- package/build/types/test-utils/GlobalsDecorator.d.ts +0 -4
- package/scripts/neptune-upgrader.js +0 -114
- package/upgrades/2021-02-v34-35.js +0 -193
- package/upgrades/2021-04-v35-36-typescript-support.js +0 -290
- package/upgrades/utils/index.js +0 -17
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import Checkbox from './Checkbox';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: {
|
|
6
|
+
({ id, checked, required, disabled, readOnly, label, className, secondary, onChange, onFocus, onBlur, }: {
|
|
7
|
+
id: any;
|
|
8
|
+
checked: any;
|
|
9
|
+
required: any;
|
|
10
|
+
disabled: any;
|
|
11
|
+
readOnly: any;
|
|
12
|
+
label: any;
|
|
13
|
+
className: any;
|
|
14
|
+
secondary: any;
|
|
15
|
+
onChange: any;
|
|
16
|
+
onFocus: any;
|
|
17
|
+
onBlur: any;
|
|
18
|
+
}): JSX.Element;
|
|
19
|
+
propTypes: {
|
|
20
|
+
id: any;
|
|
21
|
+
checked: any;
|
|
22
|
+
required: any;
|
|
23
|
+
disabled: any;
|
|
24
|
+
readOnly: any;
|
|
25
|
+
label: any;
|
|
26
|
+
secondary: any;
|
|
27
|
+
onFocus: any;
|
|
28
|
+
onChange: any;
|
|
29
|
+
onBlur: any;
|
|
30
|
+
className: any;
|
|
31
|
+
};
|
|
32
|
+
defaultProps: {
|
|
33
|
+
id: null;
|
|
34
|
+
checked: boolean;
|
|
35
|
+
required: boolean;
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
readOnly: boolean;
|
|
38
|
+
secondary: null;
|
|
39
|
+
onFocus: null;
|
|
40
|
+
onBlur: null;
|
|
41
|
+
className: undefined;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
title: string;
|
|
45
|
+
args: {
|
|
46
|
+
label: string;
|
|
47
|
+
};
|
|
48
|
+
tags: string[];
|
|
49
|
+
};
|
|
50
|
+
export default _default;
|
|
51
|
+
type Story = StoryObj<typeof Checkbox>;
|
|
52
|
+
export declare const Basic: Story;
|
|
53
|
+
export declare const Multiple: Story;
|
|
54
|
+
export declare const MultipleMobile: Story;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import BottomSheet from './BottomSheet';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: (props: {
|
|
6
|
+
onClose?: ((event: Event | import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
7
|
+
open: boolean;
|
|
8
|
+
} & import("..").CommonProps & {
|
|
9
|
+
children?: import("react").ReactNode;
|
|
10
|
+
}) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
11
|
+
title: string;
|
|
12
|
+
args: {
|
|
13
|
+
open: true;
|
|
14
|
+
};
|
|
15
|
+
render: (args: {
|
|
16
|
+
onClose?: ((event: Event | import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
17
|
+
open: boolean;
|
|
18
|
+
} & import("..").CommonProps & {
|
|
19
|
+
children?: import("react").ReactNode;
|
|
20
|
+
}) => JSX.Element;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
23
|
+
type Story = StoryObj<typeof BottomSheet>;
|
|
24
|
+
export declare const Basic: Story;
|
|
25
|
+
export declare const BasicMobile: Story;
|
|
26
|
+
export declare const WithOverflowContent: Story;
|
|
27
|
+
export declare const WithOverflowContentMobile: Story;
|
|
28
|
+
export declare const WithOverflowContentDark: Story;
|
|
29
|
+
export declare const WithOverflowContentDarkMobile: Story;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Layout } from '../propsValues/layouts';
|
|
3
|
+
export interface FlowHeaderProps {
|
|
4
|
+
bottomContent?: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
layout?: Layout.VERTICAL | Layout.HORIZONTAL;
|
|
7
|
+
leftContent?: React.ReactNode;
|
|
8
|
+
rightContent?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const FlowHeader: React.ForwardRefExoticComponent<FlowHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
1
11
|
export default FlowHeader;
|
|
2
|
-
declare const FlowHeader: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { useClientWidth } from "./useClientWidth/useClientWidth";
|
|
2
2
|
export { default as useConditionalListener } from "./useConditionalListener";
|
|
3
3
|
export { default as useDirection } from "./useDirection";
|
|
4
4
|
export { default as useHasIntersected } from "./useHasIntersected";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type FlowNavigationProps = {
|
|
3
|
+
ref: React.RefObject<HTMLElement> | Window | undefined;
|
|
4
|
+
throttleMs?: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const useClientWidth: {
|
|
7
|
+
({ ref, throttleMs }: FlowNavigationProps): (number | null)[];
|
|
8
|
+
THROTTLE_MS: number;
|
|
9
|
+
};
|
|
9
10
|
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { DateInput } from '..';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: {
|
|
6
|
+
({ disabled, size, value, dayLabel, monthLabel, yearLabel, monthFormat, mode, onChange, onFocus, onBlur, placeholders, id, selectProps, }: {
|
|
7
|
+
disabled: any;
|
|
8
|
+
size: any;
|
|
9
|
+
value: any;
|
|
10
|
+
dayLabel: any;
|
|
11
|
+
monthLabel: any;
|
|
12
|
+
yearLabel: any;
|
|
13
|
+
monthFormat: any;
|
|
14
|
+
mode: any;
|
|
15
|
+
onChange: any;
|
|
16
|
+
onFocus: any;
|
|
17
|
+
onBlur: any;
|
|
18
|
+
placeholders: any;
|
|
19
|
+
id: any;
|
|
20
|
+
selectProps: any;
|
|
21
|
+
}): JSX.Element;
|
|
22
|
+
propTypes: {
|
|
23
|
+
disabled: any;
|
|
24
|
+
size: any;
|
|
25
|
+
value: any;
|
|
26
|
+
onChange: any;
|
|
27
|
+
onFocus: any;
|
|
28
|
+
onBlur: any;
|
|
29
|
+
dayLabel: any;
|
|
30
|
+
monthLabel: any;
|
|
31
|
+
yearLabel: any;
|
|
32
|
+
monthFormat: any;
|
|
33
|
+
mode: any;
|
|
34
|
+
placeholders: any;
|
|
35
|
+
id: any;
|
|
36
|
+
selectProps: any;
|
|
37
|
+
};
|
|
38
|
+
defaultProps: {
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
size: import("..").Size;
|
|
41
|
+
value: null;
|
|
42
|
+
onFocus: null;
|
|
43
|
+
onBlur: null;
|
|
44
|
+
monthFormat: import("..").MonthFormat;
|
|
45
|
+
mode: import("..").DateMode;
|
|
46
|
+
id: string;
|
|
47
|
+
selectProps: {};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
title: string;
|
|
51
|
+
args: {
|
|
52
|
+
dayLabel: string;
|
|
53
|
+
monthLabel: string;
|
|
54
|
+
yearLabel: string;
|
|
55
|
+
selectProps: {
|
|
56
|
+
buttonProps: {
|
|
57
|
+
'aria-label': string;
|
|
58
|
+
};
|
|
59
|
+
dropdownProps: {
|
|
60
|
+
'aria-label': string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
tags: string[];
|
|
65
|
+
};
|
|
66
|
+
export default _default;
|
|
67
|
+
type Story = StoryObj<typeof DateInput>;
|
|
68
|
+
export declare const Basic: Story;
|
|
69
|
+
export declare const BasicMobile: Story;
|
|
70
|
+
export declare const InputError: Story;
|
|
71
|
+
export declare const InputErrorMobile: Story;
|
|
@@ -1,34 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export interface
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* Called when the close button is clicked. If not provided the close button won't show
|
|
18
|
-
*/
|
|
19
|
-
onClose?: (...args: any[])=>any;
|
|
20
|
-
/**
|
|
21
|
-
* Called when the back button is clicked. If not provided the back button won't show. The back button only shows on small screens
|
|
22
|
-
*/
|
|
23
|
-
onGoBack?: (...args: any[])=>any;
|
|
24
|
-
done?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Steps to be displayed in stepper. If you don't need the stepper, please use OverlayHeader instead
|
|
27
|
-
*/
|
|
28
|
-
steps: FlowNavigationSteps[];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
declare const FlowNavigation: React.FC<FlowNavigationProps>;
|
|
32
|
-
|
|
33
|
-
export default FlowNavigation;
|
|
34
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Step } from '../stepper/Stepper';
|
|
3
|
+
export interface FlowNavigationProps {
|
|
4
|
+
activeStep?: number;
|
|
5
|
+
avatar?: Element;
|
|
6
|
+
logo?: React.ReactNode;
|
|
7
|
+
done?: boolean;
|
|
8
|
+
/** Called when the close button is clicked. If not provided the close button won't show */
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
/** Called when the back button is clicked. If not provided the back button won't show. The back button only shows on small screens */
|
|
11
|
+
onGoBack?: () => void;
|
|
12
|
+
/** Steps to be displayed in stepper. If you don't need the stepper, please use OverlayHeader instead */
|
|
13
|
+
steps: Step[];
|
|
14
|
+
}
|
|
15
|
+
declare const FlowNavigation: ({ activeStep, avatar, logo, done, onClose, onGoBack, steps, }: FlowNavigationProps) => JSX.Element;
|
|
16
|
+
export default FlowNavigation;
|
package/build/types/index.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export { default as Drawer } from './drawer';
|
|
|
37
37
|
export { default as DropFade } from './dropFade';
|
|
38
38
|
export { default as DynamicFieldDefinitionList } from './dynamicFieldDefinitionList';
|
|
39
39
|
export { default as Emphasis } from './emphasis';
|
|
40
|
-
export { default as FlowNavigation } from './flowNavigation';
|
|
40
|
+
export { default as FlowNavigation } from './flowNavigation/FlowNavigation';
|
|
41
41
|
export { default as Header } from './header';
|
|
42
42
|
export { default as Image } from './image';
|
|
43
43
|
export { default as Info } from './info';
|
|
@@ -73,7 +73,7 @@ export { default as SlidingPanel } from './slidingPanel';
|
|
|
73
73
|
export { default as SnackbarPortal } from './snackbar/Snackbar';
|
|
74
74
|
export { default as SnackbarProvider } from './snackbar/SnackbarProvider';
|
|
75
75
|
export { default as StatusIcon } from './statusIcon/StatusIcon';
|
|
76
|
-
export { default as Stepper } from './stepper';
|
|
76
|
+
export { default as Stepper } from './stepper/Stepper';
|
|
77
77
|
export { default as Sticky } from './sticky';
|
|
78
78
|
export { default as Summary } from './summary';
|
|
79
79
|
export { default as Switch } from './switch';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import Info, { InfoPresentation } from '.';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: {
|
|
6
|
+
(props: any): JSX.Element;
|
|
7
|
+
propTypes: {
|
|
8
|
+
'aria-label': any;
|
|
9
|
+
className: any;
|
|
10
|
+
content: any;
|
|
11
|
+
onClick: any;
|
|
12
|
+
presentation: any;
|
|
13
|
+
size: any;
|
|
14
|
+
title: any;
|
|
15
|
+
};
|
|
16
|
+
defaultProps: {
|
|
17
|
+
className: undefined;
|
|
18
|
+
content: undefined;
|
|
19
|
+
onClick: undefined;
|
|
20
|
+
presentation: InfoPresentation;
|
|
21
|
+
size: import("..").Size;
|
|
22
|
+
title: undefined;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
title: string;
|
|
26
|
+
args: {
|
|
27
|
+
'aria-label': string;
|
|
28
|
+
title: string;
|
|
29
|
+
content: string;
|
|
30
|
+
};
|
|
31
|
+
render: (args: any) => JSX.Element;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
34
|
+
type Story = StoryObj<typeof Info>;
|
|
35
|
+
export declare const Basic: Story;
|
|
36
|
+
export declare const OpenedPopover: Story;
|
|
37
|
+
export declare const OpenedPopoverMobile: Story;
|
|
38
|
+
export declare const OpenedModal: Story;
|
|
39
|
+
export declare const OpenedModalMobile: Story;
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { Modal } from '..';
|
|
3
4
|
declare const _default: {
|
|
4
5
|
component: ({ title, body, footer, onClose, className, open, size, scroll, position, ...otherProps }: import("./Modal").ModalProps) => JSX.Element;
|
|
5
6
|
title: string;
|
|
7
|
+
args: {
|
|
8
|
+
size: "md";
|
|
9
|
+
position: "center";
|
|
10
|
+
open: true;
|
|
11
|
+
};
|
|
12
|
+
parameters: {
|
|
13
|
+
chromatic: {
|
|
14
|
+
delay: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
6
17
|
};
|
|
7
18
|
export default _default;
|
|
19
|
+
type Story = StoryObj<typeof Modal>;
|
|
8
20
|
export declare const Basic: Story;
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
21
|
+
export declare const BasicMobile: Story;
|
|
22
|
+
export declare const ContentScroll: Story;
|
|
23
|
+
export declare const ContentScrollMobile: Story;
|
|
24
|
+
export declare const ViewportScroll: Story;
|
|
25
|
+
export declare const ViewportScrollMobile: Story;
|
|
26
|
+
export declare const WithoutTitle: Story;
|
|
27
|
+
export declare const WithoutTitleMobile: Story;
|
|
@@ -15,6 +15,10 @@ export interface PhoneNumberInputProps {
|
|
|
15
15
|
size?: PhoneNumberInputSize;
|
|
16
16
|
placeholder?: string;
|
|
17
17
|
selectProps?: Object;
|
|
18
|
+
/**
|
|
19
|
+
* List of iso3 codes of countries to remove from the list
|
|
20
|
+
*/
|
|
21
|
+
disabledCountries?: string[];
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
declare const PhoneNumberInput: React.FC<PhoneNumberInputProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function excludeCountries(countries: any[], disabledCountries: any[]): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { excludeCountries } from "./excludeCountries";
|
|
@@ -10,3 +10,4 @@ export { cleanNumber } from "./cleanNumber";
|
|
|
10
10
|
export { isStringNumeric } from "./isStringNumeric";
|
|
11
11
|
export { sortArrayByProperty } from "./sortArrayByProperty";
|
|
12
12
|
export { groupCountriesByPrefix } from "./groupCountriesByPrefix";
|
|
13
|
+
export { excludeCountries } from "./excludeCountries";
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
declare const Stepper: React.FC<StepperProps>;
|
|
16
|
-
|
|
17
|
-
export default Stepper;
|
|
18
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface Step {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
hoverLabel?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface StepperProps {
|
|
8
|
+
steps: Step[];
|
|
9
|
+
activeStep?: number;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const Stepper: ({ steps, activeStep, className }: StepperProps) => JSX.Element | null;
|
|
13
|
+
export default Stepper;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Decorator } from '@storybook/react';
|
|
2
|
+
import { ChromaticParameters } from './ChromaticParameters';
|
|
3
|
+
declare module '@storybook/types' {
|
|
4
|
+
interface Parameters {
|
|
5
|
+
/** Prefer using `storyConfig` for configuring variants */
|
|
6
|
+
variants?: ('default' | 'light' | 'dark' | 'rtl' | (string & Record<string, unknown>))[];
|
|
7
|
+
/** Used by Chromatic */
|
|
8
|
+
chromatic?: ChromaticParameters;
|
|
9
|
+
viewport?: {
|
|
10
|
+
viewports?: unknown[];
|
|
11
|
+
defaultViewport?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Creates multiple variants of a component in a single story.
|
|
17
|
+
*/
|
|
18
|
+
export declare const VariantDecorator: Decorator;
|
|
@@ -1,54 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const defaultVisualTestDelay = 1000;
|
|
4
|
-
export declare const defaultMobileViewDevice: {
|
|
5
|
-
type: string;
|
|
6
|
-
name: string;
|
|
7
|
-
styles: import("@storybook/addon-viewport/dist/Viewport-f0912abf").S;
|
|
8
|
-
};
|
|
9
|
-
export type StoryConfig = {
|
|
10
|
-
darkMode?: boolean;
|
|
11
|
-
rtlMode?: boolean;
|
|
12
|
-
allGlobals?: boolean;
|
|
13
|
-
mobileView?: boolean;
|
|
14
|
-
visualTest?: ChromaticParameters;
|
|
15
|
-
};
|
|
16
|
-
export declare function storyConfig(story: Story, config: StoryConfig): Story;
|
|
17
|
-
/**
|
|
18
|
-
* Chromatic Config params
|
|
19
|
-
*
|
|
20
|
-
* {@see https://github.com/chromaui/chromatic-cli/blob/main/storybook-addon.d.ts}
|
|
21
|
-
* (this typs wasn't exported from any Chromatic package)
|
|
22
|
-
*/
|
|
23
|
-
export type ChromaticParameters = {
|
|
24
|
-
/**
|
|
25
|
-
* To set a viewport, specify one or more screen widths to the `chromatic.viewports` parameter.
|
|
26
|
-
*/
|
|
27
|
-
viewports?: number[];
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
interface StoryConfig {
|
|
28
3
|
/**
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
disable?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Chromatic will pause CSS animations and reset them to their beginning state.
|
|
4
|
+
* Creates variations of the component for the current story. Some
|
|
5
|
+
* padding is applied to the variants for spacing.
|
|
34
6
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
* screenshot.
|
|
42
|
-
*/
|
|
43
|
-
delay?: number;
|
|
44
|
-
/**
|
|
45
|
-
* The diffThreshold parameter allows you to fine tune the threshold for visual change between snapshots before
|
|
46
|
-
* they’re flagged by Chromatic. Sometimes you need assurance to the sub-pixel and other times you want to skip
|
|
47
|
-
* visual noise generated by non-deterministic rendering such as anti-aliasing.
|
|
7
|
+
* - `default` adds just the story itself with some padding.
|
|
8
|
+
* - `light` adds a light theme variant.
|
|
9
|
+
* - `dark` adds a dark theme variant.
|
|
10
|
+
* - `rtl` adds a right-to-left writing mode variant.
|
|
11
|
+
* - `mobile` sets the default viewport for the Story with mobile
|
|
12
|
+
* dimensions and uses those dimensions for snapshots.
|
|
48
13
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* @default 0.063
|
|
14
|
+
* @default undefined
|
|
52
15
|
*/
|
|
53
|
-
|
|
54
|
-
}
|
|
16
|
+
variants?: ('default' | 'light' | 'dark' | 'rtl' | 'mobile')[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Utility function for creating variants of a CSFv3 story.
|
|
20
|
+
*/
|
|
21
|
+
export declare const storyConfig: <Args>(storyObject: StoryObj<Args>, { variants }: StoryConfig) => StoryObj<Args>;
|
|
22
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import Tooltip from './Tooltip';
|
|
3
4
|
declare const _default: {
|
|
4
5
|
component: ({ position, children, label, className, }: {
|
|
5
6
|
position?: "top" | "bottom" | "left" | "right" | undefined;
|
|
@@ -8,13 +9,20 @@ declare const _default: {
|
|
|
8
9
|
children?: import("react").ReactNode;
|
|
9
10
|
} & import("../common").CommonProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
10
11
|
title: string;
|
|
12
|
+
args: {
|
|
13
|
+
label: string;
|
|
14
|
+
position: "bottom";
|
|
15
|
+
};
|
|
16
|
+
render: (args: {
|
|
17
|
+
position?: "top" | "bottom" | "left" | "right" | undefined;
|
|
18
|
+
label: import("react").ReactNode;
|
|
19
|
+
} & {
|
|
20
|
+
children?: import("react").ReactNode;
|
|
21
|
+
} & import("../common").CommonProps) => JSX.Element;
|
|
22
|
+
tags: string[];
|
|
11
23
|
};
|
|
12
24
|
export default _default;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export declare const BasicDarkMode: Story;
|
|
18
|
-
declare function hoverOverButton({ canvasElement }: {
|
|
19
|
-
canvasElement: HTMLElement;
|
|
20
|
-
}): void;
|
|
25
|
+
type Story = StoryObj<typeof Tooltip>;
|
|
26
|
+
export declare const Basic: Story;
|
|
27
|
+
export declare const OpenedTooltip: Story;
|
|
28
|
+
export declare const OpenedTooltipDark: Story;
|