@storybook/addon-interactions 6.4.0-beta.32 → 6.4.0-rc.10
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/dist/cjs/Panel.js +83 -110
- package/dist/cjs/Panel.stories.js +23 -9
- package/dist/cjs/components/AccountForm/addon-interactions.stories.js +207 -155
- package/dist/cjs/components/Interaction/Interaction.js +16 -15
- package/dist/cjs/components/Interaction/Interaction.stories.js +9 -3
- package/dist/cjs/components/Subnav/Subnav.js +15 -20
- package/dist/cjs/components/Subnav/Subnav.stories.js +54 -16
- package/dist/cjs/mocks/index.js +4 -3
- package/dist/esm/Panel.js +84 -109
- package/dist/esm/Panel.stories.js +20 -9
- package/dist/esm/components/AccountForm/addon-interactions.stories.js +203 -154
- package/dist/esm/components/Interaction/Interaction.js +16 -15
- package/dist/esm/components/Interaction/Interaction.stories.js +6 -3
- package/dist/esm/components/Subnav/Subnav.js +15 -20
- package/dist/esm/components/Subnav/Subnav.stories.js +49 -13
- package/dist/esm/mocks/index.js +4 -3
- package/dist/modern/Panel.js +58 -80
- package/dist/modern/Panel.stories.js +19 -9
- package/dist/modern/components/AccountForm/addon-interactions.stories.js +19 -0
- package/dist/modern/components/Interaction/Interaction.js +14 -15
- package/dist/modern/components/Interaction/Interaction.stories.js +6 -3
- package/dist/modern/components/Subnav/Subnav.js +15 -20
- package/dist/modern/components/Subnav/Subnav.stories.js +49 -13
- package/dist/modern/mocks/index.js +4 -3
- package/dist/ts3.4/Panel.d.ts +29 -0
- package/dist/ts3.4/Tool.d.ts +2 -0
- package/dist/ts3.4/components/AccountForm/AccountForm.d.ts +15 -0
- package/dist/ts3.4/components/Interaction/Interaction.d.ts +9 -0
- package/dist/ts3.4/components/List.d.ts +14 -0
- package/dist/ts3.4/components/MatcherResult.d.ts +12 -0
- package/dist/ts3.4/components/MethodCall.d.ts +55 -0
- package/dist/ts3.4/components/StatusBadge/StatusBadge.d.ts +6 -0
- package/dist/ts3.4/components/StatusIcon/StatusIcon.d.ts +7 -0
- package/dist/ts3.4/components/Subnav/Subnav.d.ts +12 -0
- package/dist/ts3.4/constants.d.ts +3 -0
- package/dist/ts3.4/index.d.ts +2 -0
- package/dist/ts3.4/mocks/index.d.ts +2 -0
- package/dist/ts3.4/preset/argsEnhancers.d.ts +3 -0
- package/dist/ts3.4/preset/checkActionsLoaded.d.ts +1 -0
- package/dist/ts3.4/register.d.ts +1 -0
- package/dist/ts3.4/theme.d.ts +14 -0
- package/dist/ts3.9/Panel.d.ts +29 -0
- package/dist/ts3.9/Tool.d.ts +2 -0
- package/dist/ts3.9/components/AccountForm/AccountForm.d.ts +15 -0
- package/dist/ts3.9/components/Interaction/Interaction.d.ts +9 -0
- package/dist/ts3.9/components/List.d.ts +14 -0
- package/dist/ts3.9/components/MatcherResult.d.ts +12 -0
- package/dist/ts3.9/components/MethodCall.d.ts +55 -0
- package/dist/ts3.9/components/StatusBadge/StatusBadge.d.ts +6 -0
- package/dist/ts3.9/components/StatusIcon/StatusIcon.d.ts +7 -0
- package/dist/ts3.9/components/Subnav/Subnav.d.ts +12 -0
- package/dist/ts3.9/constants.d.ts +3 -0
- package/dist/ts3.9/index.d.ts +2 -0
- package/dist/ts3.9/mocks/index.d.ts +2 -0
- package/dist/ts3.9/preset/argsEnhancers.d.ts +3 -0
- package/dist/ts3.9/preset/checkActionsLoaded.d.ts +1 -0
- package/dist/ts3.9/register.d.ts +1 -0
- package/dist/ts3.9/theme.d.ts +14 -0
- package/package.json +11 -11
|
@@ -3,13 +3,14 @@ import { CallStates } from '@storybook/instrumenter';
|
|
|
3
3
|
import { userEvent, within } from '@storybook/testing-library';
|
|
4
4
|
import { getCall } from '../../mocks';
|
|
5
5
|
import { Interaction } from './Interaction';
|
|
6
|
+
import SubnavStories from '../Subnav/Subnav.stories';
|
|
6
7
|
export default {
|
|
7
8
|
title: 'Addons/Interactions/Interaction',
|
|
8
9
|
component: Interaction,
|
|
9
10
|
args: {
|
|
10
11
|
callsById: new Map(),
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
controls: SubnavStories.args.controls,
|
|
13
|
+
controlStates: SubnavStories.args.controlStates
|
|
13
14
|
}
|
|
14
15
|
};
|
|
15
16
|
export const Active = {
|
|
@@ -34,7 +35,9 @@ export const Done = {
|
|
|
34
35
|
};
|
|
35
36
|
export const Disabled = {
|
|
36
37
|
args: Object.assign({}, Done.args, {
|
|
37
|
-
|
|
38
|
+
controlStates: Object.assign({}, SubnavStories.args.controlStates, {
|
|
39
|
+
goto: false
|
|
40
|
+
})
|
|
38
41
|
})
|
|
39
42
|
};
|
|
40
43
|
export const Hovered = Object.assign({}, Done, {
|
|
@@ -79,15 +79,10 @@ const withTooltipModifiers = [{
|
|
|
79
79
|
}
|
|
80
80
|
}];
|
|
81
81
|
export const Subnav = ({
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
hasPrevious,
|
|
85
|
-
storyFileName,
|
|
82
|
+
controls,
|
|
83
|
+
controlStates,
|
|
86
84
|
status,
|
|
87
|
-
|
|
88
|
-
onPrevious,
|
|
89
|
-
onNext,
|
|
90
|
-
onEnd,
|
|
85
|
+
storyFileName,
|
|
91
86
|
onScrollToEnd
|
|
92
87
|
}) => {
|
|
93
88
|
const buttonText = status === CallStates.ERROR ? 'Scroll to error' : 'Scroll to end';
|
|
@@ -99,49 +94,49 @@ export const Subnav = ({
|
|
|
99
94
|
}, buttonText), /*#__PURE__*/React.createElement(StyledSeparator, null), /*#__PURE__*/React.createElement(WithTooltip, {
|
|
100
95
|
modifiers: withTooltipModifiers,
|
|
101
96
|
hasChrome: false,
|
|
102
|
-
trigger:
|
|
97
|
+
trigger: controlStates.start ? 'hover' : 'none',
|
|
103
98
|
tooltip: /*#__PURE__*/React.createElement(Note, {
|
|
104
99
|
note: "Go to start"
|
|
105
100
|
})
|
|
106
101
|
}, /*#__PURE__*/React.createElement(RewindButton, {
|
|
107
|
-
onClick:
|
|
108
|
-
disabled:
|
|
102
|
+
onClick: controls.start,
|
|
103
|
+
disabled: !controlStates.start
|
|
109
104
|
}, /*#__PURE__*/React.createElement(Icons, {
|
|
110
105
|
icon: "rewind"
|
|
111
106
|
}))), /*#__PURE__*/React.createElement(WithTooltip, {
|
|
112
107
|
modifiers: withTooltipModifiers,
|
|
113
108
|
hasChrome: false,
|
|
114
|
-
trigger:
|
|
109
|
+
trigger: controlStates.back ? 'hover' : 'none',
|
|
115
110
|
tooltip: /*#__PURE__*/React.createElement(Note, {
|
|
116
111
|
note: "Go back"
|
|
117
112
|
})
|
|
118
113
|
}, /*#__PURE__*/React.createElement(StyledIconButton, {
|
|
119
|
-
onClick:
|
|
120
|
-
disabled:
|
|
114
|
+
onClick: controls.back,
|
|
115
|
+
disabled: !controlStates.back
|
|
121
116
|
}, /*#__PURE__*/React.createElement(Icons, {
|
|
122
117
|
icon: "playback"
|
|
123
118
|
}))), /*#__PURE__*/React.createElement(WithTooltip, {
|
|
124
119
|
modifiers: withTooltipModifiers,
|
|
125
120
|
hasChrome: false,
|
|
126
|
-
trigger:
|
|
121
|
+
trigger: controlStates.next ? 'hover' : 'none',
|
|
127
122
|
tooltip: /*#__PURE__*/React.createElement(Note, {
|
|
128
123
|
note: "Go forward"
|
|
129
124
|
})
|
|
130
125
|
}, /*#__PURE__*/React.createElement(StyledIconButton, {
|
|
131
|
-
onClick:
|
|
132
|
-
disabled:
|
|
126
|
+
onClick: controls.next,
|
|
127
|
+
disabled: !controlStates.next
|
|
133
128
|
}, /*#__PURE__*/React.createElement(Icons, {
|
|
134
129
|
icon: "playnext"
|
|
135
130
|
}))), /*#__PURE__*/React.createElement(WithTooltip, {
|
|
136
131
|
modifiers: withTooltipModifiers,
|
|
137
|
-
trigger:
|
|
132
|
+
trigger: controlStates.end ? 'hover' : 'none',
|
|
138
133
|
hasChrome: false,
|
|
139
134
|
tooltip: /*#__PURE__*/React.createElement(Note, {
|
|
140
135
|
note: "Go to end"
|
|
141
136
|
})
|
|
142
137
|
}, /*#__PURE__*/React.createElement(StyledIconButton, {
|
|
143
|
-
onClick:
|
|
144
|
-
disabled:
|
|
138
|
+
onClick: controls.end,
|
|
139
|
+
disabled: !controlStates.end
|
|
145
140
|
}, /*#__PURE__*/React.createElement(Icons, {
|
|
146
141
|
icon: "fastforward"
|
|
147
142
|
})))), storyFileName && /*#__PURE__*/React.createElement(Group, null, /*#__PURE__*/React.createElement(StyledLocation, null, storyFileName))));
|
|
@@ -1,14 +1,25 @@
|
|
|
1
|
+
import { action } from '@storybook/addon-actions';
|
|
1
2
|
import { CallStates } from '@storybook/instrumenter';
|
|
2
3
|
import { Subnav } from './Subnav';
|
|
3
4
|
export default {
|
|
4
5
|
title: 'Addons/Interactions/Subnav',
|
|
5
6
|
component: Subnav,
|
|
6
7
|
args: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
controls: {
|
|
9
|
+
start: action('start'),
|
|
10
|
+
back: action('back'),
|
|
11
|
+
goto: action('goto'),
|
|
12
|
+
next: action('next'),
|
|
13
|
+
end: action('end')
|
|
14
|
+
},
|
|
15
|
+
controlStates: {
|
|
16
|
+
debugger: true,
|
|
17
|
+
start: true,
|
|
18
|
+
back: true,
|
|
19
|
+
goto: true,
|
|
20
|
+
next: false,
|
|
21
|
+
end: false
|
|
22
|
+
},
|
|
12
23
|
storyFileName: 'Subnav.stories.tsx',
|
|
13
24
|
hasNext: true,
|
|
14
25
|
hasPrevious: true
|
|
@@ -29,17 +40,42 @@ export const Runs = {
|
|
|
29
40
|
status: CallStates.WAITING
|
|
30
41
|
}
|
|
31
42
|
};
|
|
32
|
-
export const
|
|
33
|
-
name: 'at the beginning',
|
|
43
|
+
export const AtStart = {
|
|
34
44
|
args: {
|
|
35
|
-
status: CallStates.
|
|
36
|
-
|
|
45
|
+
status: CallStates.WAITING,
|
|
46
|
+
controlStates: {
|
|
47
|
+
debugger: true,
|
|
48
|
+
start: false,
|
|
49
|
+
back: false,
|
|
50
|
+
goto: true,
|
|
51
|
+
next: true,
|
|
52
|
+
end: true
|
|
53
|
+
}
|
|
37
54
|
}
|
|
38
55
|
};
|
|
39
|
-
export const
|
|
40
|
-
name: 'at the end',
|
|
56
|
+
export const Midway = {
|
|
41
57
|
args: {
|
|
42
|
-
status: CallStates.
|
|
43
|
-
|
|
58
|
+
status: CallStates.WAITING,
|
|
59
|
+
controlStates: {
|
|
60
|
+
debugger: true,
|
|
61
|
+
start: true,
|
|
62
|
+
back: true,
|
|
63
|
+
goto: true,
|
|
64
|
+
next: true,
|
|
65
|
+
end: true
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
export const Locked = {
|
|
70
|
+
args: {
|
|
71
|
+
status: CallStates.ACTIVE,
|
|
72
|
+
controlStates: {
|
|
73
|
+
debugger: true,
|
|
74
|
+
start: false,
|
|
75
|
+
back: false,
|
|
76
|
+
goto: false,
|
|
77
|
+
next: false,
|
|
78
|
+
end: false
|
|
79
|
+
}
|
|
44
80
|
}
|
|
45
81
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CallStates } from '@storybook/instrumenter';
|
|
2
|
-
export const getCall =
|
|
2
|
+
export const getCall = status => {
|
|
3
3
|
const defaultData = {
|
|
4
4
|
id: 'addons-interactions-accountform--standard-email-filled [3] change',
|
|
5
|
+
cursor: 0,
|
|
5
6
|
path: ['fireEvent'],
|
|
6
7
|
method: 'change',
|
|
7
8
|
storyId: 'addons-interactions-accountform--standard-email-filled',
|
|
@@ -15,11 +16,11 @@ export const getCall = state => {
|
|
|
15
16
|
}],
|
|
16
17
|
interceptable: true,
|
|
17
18
|
retain: false,
|
|
18
|
-
|
|
19
|
+
status
|
|
19
20
|
};
|
|
20
21
|
const overrides = CallStates.ERROR ? {
|
|
21
22
|
exception: {
|
|
22
|
-
|
|
23
|
+
name: 'Error',
|
|
23
24
|
stack: '',
|
|
24
25
|
message: "Things didn't work!"
|
|
25
26
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Call, CallStates, ControlStates } from '@storybook/instrumenter';
|
|
3
|
+
export interface Controls {
|
|
4
|
+
start: (args: any) => void;
|
|
5
|
+
back: (args: any) => void;
|
|
6
|
+
goto: (args: any) => void;
|
|
7
|
+
next: (args: any) => void;
|
|
8
|
+
end: (args: any) => void;
|
|
9
|
+
}
|
|
10
|
+
interface AddonPanelProps {
|
|
11
|
+
active: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface InteractionsPanelProps {
|
|
14
|
+
active: boolean;
|
|
15
|
+
controls: Controls;
|
|
16
|
+
controlStates: ControlStates;
|
|
17
|
+
interactions: (Call & {
|
|
18
|
+
status?: CallStates;
|
|
19
|
+
})[];
|
|
20
|
+
fileName?: string;
|
|
21
|
+
hasException?: boolean;
|
|
22
|
+
isPlaying?: boolean;
|
|
23
|
+
calls: Map<string, any>;
|
|
24
|
+
endRef?: React.Ref<HTMLDivElement>;
|
|
25
|
+
onScrollToEnd?: () => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const AddonPanelPure: React.FC<InteractionsPanelProps>;
|
|
28
|
+
export declare const Panel: React.FC<AddonPanelProps>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface AccountFormResponse {
|
|
3
|
+
success: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface AccountFormValues {
|
|
6
|
+
email: string;
|
|
7
|
+
password: string;
|
|
8
|
+
}
|
|
9
|
+
export declare type AccountFormProps = {
|
|
10
|
+
passwordVerification?: boolean;
|
|
11
|
+
onSubmit?: (values: AccountFormValues) => void;
|
|
12
|
+
onTransactionStart?: (values: AccountFormValues) => void;
|
|
13
|
+
onTransactionEnd?: (values: AccountFormResponse) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const AccountForm: FC<AccountFormProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Call, ControlStates } from '@storybook/instrumenter';
|
|
3
|
+
import { Controls } from '../../Panel';
|
|
4
|
+
export declare const Interaction: ({ call, callsById, controls, controlStates, }: {
|
|
5
|
+
call: Call;
|
|
6
|
+
callsById: Map<Call['id'], Call>;
|
|
7
|
+
controls: Controls;
|
|
8
|
+
controlStates: ControlStates;
|
|
9
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Item = {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
};
|
|
6
|
+
interface ListItemProps {
|
|
7
|
+
item: Item;
|
|
8
|
+
}
|
|
9
|
+
export declare const ListItem: React.FC<ListItemProps>;
|
|
10
|
+
interface ListProps {
|
|
11
|
+
items: Item[];
|
|
12
|
+
}
|
|
13
|
+
export declare const List: React.FC<ListProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Received: ({ value, parsed }: {
|
|
3
|
+
value: any;
|
|
4
|
+
parsed?: boolean;
|
|
5
|
+
}) => JSX.Element;
|
|
6
|
+
export declare const Expected: ({ value, parsed }: {
|
|
7
|
+
value: any;
|
|
8
|
+
parsed?: boolean;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
export declare const MatcherResult: ({ message }: {
|
|
11
|
+
message: string;
|
|
12
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Call, ElementRef } from '@storybook/instrumenter';
|
|
3
|
+
export declare const Node: ({ value, nested, callsById, ...props }: {
|
|
4
|
+
[props: string]: any;
|
|
5
|
+
value: any;
|
|
6
|
+
nested?: boolean;
|
|
7
|
+
callsById?: Map<Call['id'], Call>;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export declare const NullNode: (props: object) => JSX.Element;
|
|
10
|
+
export declare const UndefinedNode: (props: object) => JSX.Element;
|
|
11
|
+
export declare const StringNode: ({ value, ...props }: {
|
|
12
|
+
value: string;
|
|
13
|
+
}) => JSX.Element;
|
|
14
|
+
export declare const NumberNode: ({ value, ...props }: {
|
|
15
|
+
value: number;
|
|
16
|
+
}) => JSX.Element;
|
|
17
|
+
export declare const BooleanNode: ({ value, ...props }: {
|
|
18
|
+
value: boolean;
|
|
19
|
+
}) => JSX.Element;
|
|
20
|
+
export declare const ArrayNode: ({ value, nested }: {
|
|
21
|
+
value: any[];
|
|
22
|
+
nested?: boolean;
|
|
23
|
+
}) => JSX.Element;
|
|
24
|
+
export declare const ObjectNode: ({ value, nested }: {
|
|
25
|
+
value: object;
|
|
26
|
+
nested?: boolean;
|
|
27
|
+
}) => JSX.Element;
|
|
28
|
+
export declare const ClassNode: ({ value }: {
|
|
29
|
+
value: Record<string, any>;
|
|
30
|
+
}) => JSX.Element;
|
|
31
|
+
export declare const FunctionNode: ({ value }: {
|
|
32
|
+
value: Function;
|
|
33
|
+
}) => JSX.Element;
|
|
34
|
+
export declare const ElementNode: ({ value }: {
|
|
35
|
+
value: ElementRef['__element__'];
|
|
36
|
+
}) => JSX.Element;
|
|
37
|
+
export declare const DateNode: ({ value }: {
|
|
38
|
+
value: Date;
|
|
39
|
+
}) => JSX.Element;
|
|
40
|
+
export declare const ErrorNode: ({ value }: {
|
|
41
|
+
value: Error;
|
|
42
|
+
}) => JSX.Element;
|
|
43
|
+
export declare const RegExpNode: ({ value }: {
|
|
44
|
+
value: RegExp;
|
|
45
|
+
}) => JSX.Element;
|
|
46
|
+
export declare const SymbolNode: ({ value }: {
|
|
47
|
+
value: symbol;
|
|
48
|
+
}) => JSX.Element;
|
|
49
|
+
export declare const OtherNode: ({ value }: {
|
|
50
|
+
value: any;
|
|
51
|
+
}) => JSX.Element;
|
|
52
|
+
export declare const MethodCall: ({ call, callsById, }: {
|
|
53
|
+
call: Call;
|
|
54
|
+
callsById: Map<Call['id'], Call>;
|
|
55
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconsProps } from '@storybook/components';
|
|
3
|
+
import { Call } from '@storybook/instrumenter';
|
|
4
|
+
export interface StatusIconProps extends IconsProps {
|
|
5
|
+
status: Call['status'];
|
|
6
|
+
}
|
|
7
|
+
export declare const StatusIcon: React.FC<StatusIconProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Call, ControlStates } from '@storybook/instrumenter';
|
|
3
|
+
import { Controls } from '../../Panel';
|
|
4
|
+
export interface SubnavProps {
|
|
5
|
+
controls: Controls;
|
|
6
|
+
controlStates: ControlStates;
|
|
7
|
+
status: Call['status'];
|
|
8
|
+
storyFileName?: string;
|
|
9
|
+
onScrollToEnd?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const StyledIconButton: import("@emotion/styled-base").StyledComponent<any, Pick<any, string | number | symbol>, import("@storybook/theming").Theme>;
|
|
12
|
+
export declare const Subnav: React.FC<SubnavProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const checkActionsLoaded: (configDir: string) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interaction Testing Theme
|
|
3
|
+
* PLACEHOLDER until SB is updated <3
|
|
4
|
+
*/
|
|
5
|
+
interface Colors {
|
|
6
|
+
pure?: {
|
|
7
|
+
gray?: any;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare const colors: Colors;
|
|
11
|
+
export declare const theme: {
|
|
12
|
+
colors: Colors;
|
|
13
|
+
};
|
|
14
|
+
export default theme;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Call, CallStates, ControlStates } from '@storybook/instrumenter';
|
|
3
|
+
export interface Controls {
|
|
4
|
+
start: (args: any) => void;
|
|
5
|
+
back: (args: any) => void;
|
|
6
|
+
goto: (args: any) => void;
|
|
7
|
+
next: (args: any) => void;
|
|
8
|
+
end: (args: any) => void;
|
|
9
|
+
}
|
|
10
|
+
interface AddonPanelProps {
|
|
11
|
+
active: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface InteractionsPanelProps {
|
|
14
|
+
active: boolean;
|
|
15
|
+
controls: Controls;
|
|
16
|
+
controlStates: ControlStates;
|
|
17
|
+
interactions: (Call & {
|
|
18
|
+
status?: CallStates;
|
|
19
|
+
})[];
|
|
20
|
+
fileName?: string;
|
|
21
|
+
hasException?: boolean;
|
|
22
|
+
isPlaying?: boolean;
|
|
23
|
+
calls: Map<string, any>;
|
|
24
|
+
endRef?: React.Ref<HTMLDivElement>;
|
|
25
|
+
onScrollToEnd?: () => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const AddonPanelPure: React.FC<InteractionsPanelProps>;
|
|
28
|
+
export declare const Panel: React.FC<AddonPanelProps>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface AccountFormResponse {
|
|
3
|
+
success: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface AccountFormValues {
|
|
6
|
+
email: string;
|
|
7
|
+
password: string;
|
|
8
|
+
}
|
|
9
|
+
export declare type AccountFormProps = {
|
|
10
|
+
passwordVerification?: boolean;
|
|
11
|
+
onSubmit?: (values: AccountFormValues) => void;
|
|
12
|
+
onTransactionStart?: (values: AccountFormValues) => void;
|
|
13
|
+
onTransactionEnd?: (values: AccountFormResponse) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const AccountForm: FC<AccountFormProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Call, ControlStates } from '@storybook/instrumenter';
|
|
3
|
+
import { Controls } from '../../Panel';
|
|
4
|
+
export declare const Interaction: ({ call, callsById, controls, controlStates, }: {
|
|
5
|
+
call: Call;
|
|
6
|
+
callsById: Map<Call['id'], Call>;
|
|
7
|
+
controls: Controls;
|
|
8
|
+
controlStates: ControlStates;
|
|
9
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Item = {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
};
|
|
6
|
+
interface ListItemProps {
|
|
7
|
+
item: Item;
|
|
8
|
+
}
|
|
9
|
+
export declare const ListItem: React.FC<ListItemProps>;
|
|
10
|
+
interface ListProps {
|
|
11
|
+
items: Item[];
|
|
12
|
+
}
|
|
13
|
+
export declare const List: React.FC<ListProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Received: ({ value, parsed }: {
|
|
3
|
+
value: any;
|
|
4
|
+
parsed?: boolean;
|
|
5
|
+
}) => JSX.Element;
|
|
6
|
+
export declare const Expected: ({ value, parsed }: {
|
|
7
|
+
value: any;
|
|
8
|
+
parsed?: boolean;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
export declare const MatcherResult: ({ message }: {
|
|
11
|
+
message: string;
|
|
12
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Call, ElementRef } from '@storybook/instrumenter';
|
|
3
|
+
export declare const Node: ({ value, nested, callsById, ...props }: {
|
|
4
|
+
[props: string]: any;
|
|
5
|
+
value: any;
|
|
6
|
+
nested?: boolean;
|
|
7
|
+
callsById?: Map<Call['id'], Call>;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export declare const NullNode: (props: object) => JSX.Element;
|
|
10
|
+
export declare const UndefinedNode: (props: object) => JSX.Element;
|
|
11
|
+
export declare const StringNode: ({ value, ...props }: {
|
|
12
|
+
value: string;
|
|
13
|
+
}) => JSX.Element;
|
|
14
|
+
export declare const NumberNode: ({ value, ...props }: {
|
|
15
|
+
value: number;
|
|
16
|
+
}) => JSX.Element;
|
|
17
|
+
export declare const BooleanNode: ({ value, ...props }: {
|
|
18
|
+
value: boolean;
|
|
19
|
+
}) => JSX.Element;
|
|
20
|
+
export declare const ArrayNode: ({ value, nested }: {
|
|
21
|
+
value: any[];
|
|
22
|
+
nested?: boolean;
|
|
23
|
+
}) => JSX.Element;
|
|
24
|
+
export declare const ObjectNode: ({ value, nested }: {
|
|
25
|
+
value: object;
|
|
26
|
+
nested?: boolean;
|
|
27
|
+
}) => JSX.Element;
|
|
28
|
+
export declare const ClassNode: ({ value }: {
|
|
29
|
+
value: Record<string, any>;
|
|
30
|
+
}) => JSX.Element;
|
|
31
|
+
export declare const FunctionNode: ({ value }: {
|
|
32
|
+
value: Function;
|
|
33
|
+
}) => JSX.Element;
|
|
34
|
+
export declare const ElementNode: ({ value }: {
|
|
35
|
+
value: ElementRef['__element__'];
|
|
36
|
+
}) => JSX.Element;
|
|
37
|
+
export declare const DateNode: ({ value }: {
|
|
38
|
+
value: Date;
|
|
39
|
+
}) => JSX.Element;
|
|
40
|
+
export declare const ErrorNode: ({ value }: {
|
|
41
|
+
value: Error;
|
|
42
|
+
}) => JSX.Element;
|
|
43
|
+
export declare const RegExpNode: ({ value }: {
|
|
44
|
+
value: RegExp;
|
|
45
|
+
}) => JSX.Element;
|
|
46
|
+
export declare const SymbolNode: ({ value }: {
|
|
47
|
+
value: symbol;
|
|
48
|
+
}) => JSX.Element;
|
|
49
|
+
export declare const OtherNode: ({ value }: {
|
|
50
|
+
value: any;
|
|
51
|
+
}) => JSX.Element;
|
|
52
|
+
export declare const MethodCall: ({ call, callsById, }: {
|
|
53
|
+
call: Call;
|
|
54
|
+
callsById: Map<Call['id'], Call>;
|
|
55
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconsProps } from '@storybook/components';
|
|
3
|
+
import { Call } from '@storybook/instrumenter';
|
|
4
|
+
export interface StatusIconProps extends IconsProps {
|
|
5
|
+
status: Call['status'];
|
|
6
|
+
}
|
|
7
|
+
export declare const StatusIcon: React.FC<StatusIconProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Call, ControlStates } from '@storybook/instrumenter';
|
|
3
|
+
import { Controls } from '../../Panel';
|
|
4
|
+
export interface SubnavProps {
|
|
5
|
+
controls: Controls;
|
|
6
|
+
controlStates: ControlStates;
|
|
7
|
+
status: Call['status'];
|
|
8
|
+
storyFileName?: string;
|
|
9
|
+
onScrollToEnd?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const StyledIconButton: import("@emotion/styled-base").StyledComponent<any, Pick<any, string | number | symbol>, import("@storybook/theming").Theme>;
|
|
12
|
+
export declare const Subnav: React.FC<SubnavProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const checkActionsLoaded: (configDir: string) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interaction Testing Theme
|
|
3
|
+
* PLACEHOLDER until SB is updated <3
|
|
4
|
+
*/
|
|
5
|
+
interface Colors {
|
|
6
|
+
pure?: {
|
|
7
|
+
gray?: any;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare const colors: Colors;
|
|
11
|
+
export declare const theme: {
|
|
12
|
+
colors: Colors;
|
|
13
|
+
};
|
|
14
|
+
export default theme;
|