@transferwise/components 46.119.5 → 46.120.1
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/alert/Alert.js +1 -1
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +1 -1
- package/build/alert/Alert.mjs.map +1 -1
- package/build/checkbox/Checkbox.js +1 -1
- package/build/checkbox/Checkbox.js.map +1 -1
- package/build/checkbox/Checkbox.mjs +1 -1
- package/build/checkbox/Checkbox.mjs.map +1 -1
- package/build/common/initials.js +17 -7
- package/build/common/initials.js.map +1 -1
- package/build/common/initials.mjs +17 -7
- package/build/common/initials.mjs.map +1 -1
- package/build/field/Field.js +8 -4
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs +8 -4
- package/build/field/Field.mjs.map +1 -1
- package/build/inlineAlert/InlineAlert.js +1 -7
- package/build/inlineAlert/InlineAlert.js.map +1 -1
- package/build/inlineAlert/InlineAlert.mjs +1 -7
- package/build/inlineAlert/InlineAlert.mjs.map +1 -1
- package/build/main.css +20 -1
- package/build/prompt/InlinePrompt/InlinePrompt.js +2 -0
- package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -1
- package/build/prompt/InlinePrompt/InlinePrompt.mjs +2 -0
- package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
- package/build/radioGroup/RadioGroup.js +1 -0
- package/build/radioGroup/RadioGroup.js.map +1 -1
- package/build/radioGroup/RadioGroup.mjs +1 -0
- package/build/radioGroup/RadioGroup.mjs.map +1 -1
- package/build/styles/field/Field.css +10 -1
- package/build/styles/main.css +20 -1
- package/build/styles/prompt/InlinePrompt/InlinePrompt.css +3 -0
- package/build/styles/radioGroup/RadioGroup.css +3 -0
- package/build/styles/typeahead/Typeahead.css +4 -0
- package/build/typeahead/Typeahead.js +20 -7
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs +20 -7
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/types/alert/Alert.d.ts +1 -1
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/common/initials.d.ts.map +1 -1
- package/build/types/field/Field.d.ts +8 -4
- package/build/types/field/Field.d.ts.map +1 -1
- package/build/types/inlineAlert/InlineAlert.d.ts +1 -7
- package/build/types/inlineAlert/InlineAlert.d.ts.map +1 -1
- package/build/types/listItem/_stories/variants/helpers.d.ts +7 -4
- package/build/types/listItem/_stories/variants/helpers.d.ts.map +1 -1
- package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts +6 -1
- package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts.map +1 -1
- package/build/types/radioGroup/RadioGroup.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +0 -1
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/build/types/typeahead/Typeahead.d.ts +8 -4
- package/build/types/typeahead/Typeahead.d.ts.map +1 -1
- package/build/types/upload/Upload.d.ts +1 -1
- package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts.map +1 -1
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.mjs.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +5 -4
- package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +5 -4
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
- package/package.json +9 -8
- package/src/DisabledComponents.story.tsx +1 -3
- package/src/actionButton/ActionButton.story.tsx +42 -45
- package/src/alert/Alert.spec.tsx +1 -1
- package/src/alert/Alert.tsx +2 -2
- package/src/avatar/Avatar.story.tsx +192 -188
- package/src/button/_stories/Button.tests.story.tsx +122 -119
- package/src/carousel/Carousel.story.tsx +4 -7
- package/src/checkbox/Checkbox.story.tsx +42 -21
- package/src/checkbox/Checkbox.tsx +1 -1
- package/src/checkbox/__snapshots__/Checkbox.spec.tsx.snap +1 -1
- package/src/circularButton/CircularButton.story.tsx +10 -2
- package/src/common/bottomSheet/BottomSheet.story.tsx +48 -14
- package/src/common/circle/Circle.story.tsx +62 -55
- package/src/common/initials.spec.tsx +31 -0
- package/src/common/initials.ts +19 -8
- package/src/criticalBanner/CriticalCommsBanner.story.tsx +30 -19
- package/src/dateInput/DateInput.tests.story.tsx +101 -74
- package/src/dateLookup/DateLookup.story.tsx +69 -59
- package/src/field/Field.css +10 -1
- package/src/field/Field.less +13 -2
- package/src/field/Field.spec.tsx +19 -3
- package/src/field/Field.story.tsx +18 -0
- package/src/field/Field.tsx +17 -5
- package/src/header/Header.story.tsx +5 -16
- package/src/header/Header.tests.story.tsx +95 -69
- package/src/info/Info.story.tsx +27 -11
- package/src/inlineAlert/InlineAlert.story.tsx +4 -0
- package/src/inlineAlert/InlineAlert.tsx +1 -7
- package/src/instructionsList/InstructionsList.story.tsx +0 -1
- package/src/listItem/_stories/ListItem.layout.test.story.tsx +1 -3
- package/src/listItem/_stories/variants/ListItem.brightGreen.test.story.tsx +77 -35
- package/src/listItem/_stories/variants/ListItem.dark.test.story.tsx +65 -29
- package/src/listItem/_stories/variants/ListItem.forestGreen.test.story.tsx +77 -35
- package/src/listItem/_stories/variants/ListItem.medium.test.story.tsx +38 -18
- package/src/listItem/_stories/variants/ListItem.neutral.test.story.tsx +0 -1
- package/src/listItem/_stories/variants/ListItem.personal.test.story.tsx +38 -18
- package/src/listItem/_stories/variants/ListItem.rtl.test.story.tsx +77 -29
- package/src/listItem/_stories/variants/ListItem.small.test.story.tsx +65 -18
- package/src/listItem/_stories/variants/helpers.tsx +136 -133
- package/src/main.css +20 -1
- package/src/main.less +1 -0
- package/src/modal/Modal.story.tsx +47 -8
- package/src/moneyInput/MoneyInput.story.tsx +2 -2
- package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.story.tsx +1 -0
- package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.tests.story.tsx +1 -0
- package/src/primitives/PrimitiveButton/stories/PrimitiveButton.story.tsx +1 -0
- package/src/primitives/PrimitiveButton/stories/PrimitiveButton.tests.story.tsx +1 -0
- package/src/prompt/InlinePrompt/InlinePrompt.css +3 -0
- package/src/prompt/InlinePrompt/InlinePrompt.less +5 -1
- package/src/prompt/InlinePrompt/InlinePrompt.spec.tsx +17 -0
- package/src/prompt/InlinePrompt/InlinePrompt.story.tsx +35 -0
- package/src/prompt/InlinePrompt/InlinePrompt.tsx +7 -0
- package/src/provider/theme/ThemeProvider.story.tsx +1 -0
- package/src/radioGroup/RadioGroup.css +3 -0
- package/src/radioGroup/RadioGroup.less +3 -0
- package/src/radioGroup/RadioGroup.story.tsx +2 -0
- package/src/radioGroup/RadioGroup.test.story.tsx +62 -0
- package/src/radioGroup/RadioGroup.tsx +6 -1
- package/src/segmentedControl/SegmentedControl.story.tsx +71 -67
- package/src/snackbar/Snackbar.tests.story.tsx +116 -114
- package/src/statusIcon/StatusIcon.story.tsx +41 -38
- package/src/test-utils/index.tsx +0 -2
- package/src/tokens/tokens.story.tsx +1 -1
- package/src/tooltip/Tooltip.story.tsx +10 -2
- package/src/typeahead/Typeahead.css +4 -0
- package/src/typeahead/Typeahead.less +5 -1
- package/src/typeahead/Typeahead.spec.tsx +1 -1
- package/src/typeahead/Typeahead.story.tsx +151 -3
- package/src/typeahead/Typeahead.tsx +33 -9
- package/src/upload/Upload.story.tsx +1 -1
- package/src/upload/Upload.tests.story.tsx +36 -1
- package/src/upload/Upload.tsx +1 -1
- package/src/upload/steps/uploadImageStep/uploadImageStep.tsx +7 -3
- package/src/withId/withId.story.tsx +1 -1
- package/build/types/test-utils/story-config.d.ts +0 -64
- package/build/types/test-utils/story-config.d.ts.map +0 -1
- package/src/test-utils/story-config.ts +0 -95
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
import Header, { type HeaderProps } from './Header';
|
|
3
|
-
import {
|
|
3
|
+
import { allModes } from '../../.storybook/modes';
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof Header> = {
|
|
6
6
|
component: Header,
|
|
@@ -26,78 +26,104 @@ const TestComponent = () => (
|
|
|
26
26
|
</div>
|
|
27
27
|
);
|
|
28
28
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const Wrapper = tag === 'legend' ? 'fieldset' : 'section';
|
|
29
|
+
const BaseLevelStory: Story = {
|
|
30
|
+
render: (args) => {
|
|
31
|
+
return (
|
|
32
|
+
<>
|
|
33
|
+
{(['legend', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as HeaderProps['as'][]).map((tag) => {
|
|
34
|
+
const Wrapper = tag === 'legend' ? 'fieldset' : 'section';
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
};
|
|
36
|
+
return (
|
|
37
|
+
<Wrapper key={tag}>
|
|
38
|
+
<Header
|
|
39
|
+
as={tag}
|
|
40
|
+
level={args.level}
|
|
41
|
+
title={`Showcasing ${args.level} level with tag ${tag}`}
|
|
42
|
+
action={args.action}
|
|
43
|
+
/>
|
|
44
|
+
<TestComponent />
|
|
45
|
+
</Wrapper>
|
|
46
|
+
);
|
|
47
|
+
})}
|
|
48
|
+
</>
|
|
49
|
+
);
|
|
50
|
+
},
|
|
53
51
|
};
|
|
54
52
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
title="Header with Action"
|
|
72
|
-
action={{
|
|
73
|
-
'aria-label': 'Action',
|
|
74
|
-
text: 'Action',
|
|
75
|
-
onClick: () => alert('Action clicked!'),
|
|
76
|
-
}}
|
|
77
|
-
/>
|
|
78
|
-
<Header
|
|
79
|
-
as="h2"
|
|
80
|
-
title="Header with link"
|
|
81
|
-
action={{
|
|
82
|
-
'aria-label': 'Action',
|
|
83
|
-
text: 'Action',
|
|
84
|
-
href: 'https://wise.com',
|
|
85
|
-
}}
|
|
86
|
-
/>
|
|
87
|
-
</div>
|
|
88
|
-
);
|
|
53
|
+
export const GroupTrailingSpace: Story = {
|
|
54
|
+
...BaseLevelStory,
|
|
55
|
+
args: {
|
|
56
|
+
...BaseLevelStory.args,
|
|
57
|
+
level: 'group',
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const GroupTrailingSpaceWithAction: Story = {
|
|
62
|
+
...BaseLevelStory,
|
|
63
|
+
args: {
|
|
64
|
+
...BaseLevelStory.args,
|
|
65
|
+
level: 'group',
|
|
66
|
+
action: { text: 'Action', href: '#target' },
|
|
67
|
+
},
|
|
68
|
+
};
|
|
89
69
|
|
|
90
|
-
export const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
70
|
+
export const SectionTrailingSpace: Story = {
|
|
71
|
+
...BaseLevelStory,
|
|
72
|
+
args: {
|
|
73
|
+
...BaseLevelStory.args,
|
|
74
|
+
level: 'section',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
94
77
|
|
|
95
|
-
export const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
78
|
+
export const SectionTrailingSpaceWithAction: Story = {
|
|
79
|
+
...BaseLevelStory,
|
|
80
|
+
args: {
|
|
81
|
+
...BaseLevelStory.args,
|
|
82
|
+
level: 'section',
|
|
83
|
+
action: { text: 'Action', href: '#target' },
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const AllVariants: Story = {
|
|
88
|
+
parameters: {
|
|
89
|
+
padding: '0',
|
|
90
|
+
variants: ['default', 'dark', 'bright-green', 'forest-green', 'rtl'],
|
|
91
|
+
chromatic: {
|
|
92
|
+
dark: allModes.dark,
|
|
93
|
+
brightGreen: allModes.brightGreen,
|
|
94
|
+
forestGreen: allModes.forestGreen,
|
|
95
|
+
rtl: allModes.rtl,
|
|
99
96
|
},
|
|
100
|
-
render: renderVariants,
|
|
101
97
|
},
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
render: () => (
|
|
99
|
+
<div
|
|
100
|
+
className="header-variants"
|
|
101
|
+
style={{ display: 'flex', flexWrap: 'wrap', gap: '16px', maxWidth: '1200px' }}
|
|
102
|
+
>
|
|
103
|
+
{(['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'legend'] as const).map((as) => (
|
|
104
|
+
<Header key={as} as={as} title={`Header as ${as}`} />
|
|
105
|
+
))}
|
|
106
|
+
{(['section', 'group'] as const).map((level) => (
|
|
107
|
+
<Header key={level} level={level} title={`Header level ${level}`} />
|
|
108
|
+
))}
|
|
109
|
+
<Header
|
|
110
|
+
as="h2"
|
|
111
|
+
title="Header with Action"
|
|
112
|
+
action={{
|
|
113
|
+
'aria-label': 'Action',
|
|
114
|
+
text: 'Action',
|
|
115
|
+
onClick: () => alert('Action clicked!'),
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
<Header
|
|
119
|
+
as="h2"
|
|
120
|
+
title="Header with link"
|
|
121
|
+
action={{
|
|
122
|
+
'aria-label': 'Action',
|
|
123
|
+
text: 'Action',
|
|
124
|
+
href: 'https://wise.com',
|
|
125
|
+
}}
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
),
|
|
129
|
+
};
|
package/src/info/Info.story.tsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
import { userEvent, within } from 'storybook/test';
|
|
3
3
|
|
|
4
|
-
import { lorem10
|
|
4
|
+
import { lorem10 } from '../test-utils';
|
|
5
5
|
|
|
6
6
|
import Info, { InfoPresentation } from '.';
|
|
7
|
+
import { allModes } from '../../.storybook/modes';
|
|
7
8
|
|
|
8
9
|
const meta = {
|
|
9
10
|
component: Info,
|
|
@@ -25,12 +26,15 @@ export default meta;
|
|
|
25
26
|
|
|
26
27
|
type Story = StoryObj<typeof meta>;
|
|
27
28
|
|
|
28
|
-
export const Basic =
|
|
29
|
-
{
|
|
30
|
-
{
|
|
29
|
+
export const Basic: Story = {
|
|
30
|
+
parameters: {
|
|
31
31
|
variants: ['default', 'dark', 'rtl'],
|
|
32
|
+
chromatic: {
|
|
33
|
+
dark: allModes.dark,
|
|
34
|
+
rtl: allModes.rtl,
|
|
35
|
+
},
|
|
32
36
|
},
|
|
33
|
-
|
|
37
|
+
};
|
|
34
38
|
|
|
35
39
|
export const OpenedPopover = {
|
|
36
40
|
parameters: {
|
|
@@ -44,9 +48,15 @@ export const OpenedPopover = {
|
|
|
44
48
|
},
|
|
45
49
|
} satisfies Story;
|
|
46
50
|
|
|
47
|
-
export const OpenedPopoverMobile =
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
export const OpenedPopoverMobile: Story = {
|
|
52
|
+
...OpenedPopover,
|
|
53
|
+
parameters: {
|
|
54
|
+
variants: ['mobile'],
|
|
55
|
+
chromatic: {
|
|
56
|
+
mobile: allModes.largeMobile,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
50
60
|
|
|
51
61
|
export const OpenedModal = {
|
|
52
62
|
...OpenedPopover,
|
|
@@ -55,6 +65,12 @@ export const OpenedModal = {
|
|
|
55
65
|
},
|
|
56
66
|
} satisfies Story;
|
|
57
67
|
|
|
58
|
-
export const OpenedModalMobile =
|
|
59
|
-
|
|
60
|
-
|
|
68
|
+
export const OpenedModalMobile: Story = {
|
|
69
|
+
...OpenedModal,
|
|
70
|
+
parameters: {
|
|
71
|
+
variants: ['mobile'],
|
|
72
|
+
chromatic: {
|
|
73
|
+
mobile: allModes.largeMobile,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
@@ -4,9 +4,13 @@ import InlineAlert, { InlineAlertProps } from './InlineAlert';
|
|
|
4
4
|
import { lorem10, lorem40 } from '../test-utils';
|
|
5
5
|
import Link from '../link';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* > **DEPRECATED** Use [InlinePrompt](?path=/docs/prompts-inlineprompt--docs) or [Field](?path=/docs/forms-field--docs) instead.
|
|
9
|
+
*/
|
|
7
10
|
export default {
|
|
8
11
|
component: InlineAlert,
|
|
9
12
|
title: 'Prompts/InlineAlert',
|
|
13
|
+
tags: ['deprecated'],
|
|
10
14
|
} as Meta<InlineAlertProps>;
|
|
11
15
|
|
|
12
16
|
export const Basic = () => {
|
|
@@ -22,13 +22,7 @@ const iconTypes = new Set<NonNullable<InlineAlertProps['type']>>([
|
|
|
22
22
|
]);
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* it's for edge cases when `<Field />` isn't suitable for some reasons.
|
|
27
|
-
*
|
|
28
|
-
* Example:
|
|
29
|
-
* ```
|
|
30
|
-
* <Field sentiment={..} message={..}>..</Field>
|
|
31
|
-
* ```
|
|
25
|
+
* @deprecated Use [<InlinePrompt />](https://storybook.wise.design/?path=/docs/prompts-inlineprompt--docs) or [<Field />](https://storybook.wise.design/?path=/docs/forms-field--docs) instead.
|
|
32
26
|
*/
|
|
33
27
|
export default function InlineAlert({
|
|
34
28
|
id,
|
|
@@ -126,7 +126,7 @@ const getPropsForPreview = (args: PreviewStoryArgs) => {
|
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
// Create a completely untyped story object
|
|
129
|
-
const
|
|
129
|
+
export const ImageAlignment: StoryObj<PreviewStoryArgs> = {
|
|
130
130
|
parameters: {
|
|
131
131
|
controls: { disable: false },
|
|
132
132
|
},
|
|
@@ -225,5 +225,3 @@ const ImageAlignmentStory: StoryObj<PreviewStoryArgs> = {
|
|
|
225
225
|
);
|
|
226
226
|
},
|
|
227
227
|
};
|
|
228
|
-
|
|
229
|
-
export const ImageAlignment = ImageAlignmentStory;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/react-webpack5';
|
|
2
2
|
import { ListItem, type ListItemProps } from '../../ListItem';
|
|
3
|
-
import {
|
|
3
|
+
import { VariantStory } from './helpers';
|
|
4
|
+
import { allModes } from '../../../../.storybook/modes';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
component: ListItem,
|
|
@@ -13,37 +14,78 @@ export default {
|
|
|
13
14
|
},
|
|
14
15
|
} satisfies Meta<ListItemProps>;
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'bright-green',
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export const
|
|
28
|
-
|
|
29
|
-
'
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
'
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
'
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
'
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
export const
|
|
48
|
-
|
|
49
|
-
|
|
17
|
+
const Default = {
|
|
18
|
+
...VariantStory,
|
|
19
|
+
parameters: {
|
|
20
|
+
variants: ['bright-green'],
|
|
21
|
+
chromatic: {
|
|
22
|
+
'bright-green': allModes.brightGreen,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
args: { variant: 'bright-green' },
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const Button = {
|
|
29
|
+
...Default,
|
|
30
|
+
args: { ...Default.args, controlType: 'button' },
|
|
31
|
+
};
|
|
32
|
+
export const ButtonAsLink = {
|
|
33
|
+
...Default,
|
|
34
|
+
args: { ...Default.args, controlType: 'buttonAsLink' },
|
|
35
|
+
};
|
|
36
|
+
export const ButtonPartiallyInteractive = {
|
|
37
|
+
...Default,
|
|
38
|
+
args: { ...Default.args, controlType: 'partialButton' },
|
|
39
|
+
};
|
|
40
|
+
export const ButtonAsLinkPartiallyInteractive = {
|
|
41
|
+
...Default,
|
|
42
|
+
args: { ...Default.args, controlType: 'partialButtonAsLink' },
|
|
43
|
+
};
|
|
44
|
+
export const IconButton = {
|
|
45
|
+
...Default,
|
|
46
|
+
args: { ...Default.args, controlType: 'iconButton' },
|
|
47
|
+
};
|
|
48
|
+
export const IconButtonAsLink = {
|
|
49
|
+
...Default,
|
|
50
|
+
args: { ...Default.args, controlType: 'iconButtonAsLink' },
|
|
51
|
+
};
|
|
52
|
+
export const IconButtonWithLabel = {
|
|
53
|
+
...Default,
|
|
54
|
+
args: { ...Default.args, controlType: 'iconButtonWithLabel' },
|
|
55
|
+
};
|
|
56
|
+
export const IconButtonAsLinkWithLabel = {
|
|
57
|
+
...Default,
|
|
58
|
+
args: { ...Default.args, controlType: 'iconButtonAsLinkWithLabel' },
|
|
59
|
+
};
|
|
60
|
+
export const IconButtonPartiallyInteractive = {
|
|
61
|
+
...Default,
|
|
62
|
+
args: { ...Default.args, controlType: 'partialIconButton' },
|
|
63
|
+
};
|
|
64
|
+
export const IconButtonAsLinkPartiallyInteractive = {
|
|
65
|
+
...Default,
|
|
66
|
+
args: { ...Default.args, controlType: 'partialIconButtonAsLink' },
|
|
67
|
+
};
|
|
68
|
+
export const Navigation = {
|
|
69
|
+
...Default,
|
|
70
|
+
args: { ...Default.args, controlType: 'navigation' },
|
|
71
|
+
};
|
|
72
|
+
export const NavigationAsButton = {
|
|
73
|
+
...Default,
|
|
74
|
+
args: { ...Default.args, controlType: 'navigationAsButton' },
|
|
75
|
+
};
|
|
76
|
+
export const Checkbox = {
|
|
77
|
+
...Default,
|
|
78
|
+
args: { ...Default.args, controlType: 'checkbox' },
|
|
79
|
+
};
|
|
80
|
+
export const Radio = {
|
|
81
|
+
...Default,
|
|
82
|
+
args: { ...Default.args, controlType: 'radio' },
|
|
83
|
+
};
|
|
84
|
+
export const Switch = {
|
|
85
|
+
...Default,
|
|
86
|
+
args: { ...Default.args, controlType: 'switch' },
|
|
87
|
+
};
|
|
88
|
+
export const NonInteractive = {
|
|
89
|
+
...Default,
|
|
90
|
+
args: { ...Default.args, controlType: 'non-interactive' },
|
|
91
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/react-webpack5';
|
|
2
2
|
import { ListItem, type ListItemProps } from '../../ListItem';
|
|
3
|
-
import {
|
|
3
|
+
import { VariantStory } from './helpers';
|
|
4
|
+
import { allModes } from '../../../../.storybook/modes';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
component: ListItem,
|
|
@@ -13,31 +14,66 @@ export default {
|
|
|
13
14
|
},
|
|
14
15
|
} satisfies Meta<ListItemProps>;
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
export const
|
|
17
|
+
const Default = {
|
|
18
|
+
...VariantStory,
|
|
19
|
+
parameters: {
|
|
20
|
+
variants: ['dark'],
|
|
21
|
+
chromatic: {
|
|
22
|
+
dark: allModes.dark,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
args: { variant: 'dark' },
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const Button = {
|
|
29
|
+
...Default,
|
|
30
|
+
args: { ...Default.args, controlType: 'button' },
|
|
31
|
+
};
|
|
32
|
+
export const ButtonAsLink = {
|
|
33
|
+
...Default,
|
|
34
|
+
args: { ...Default.args, controlType: 'buttonAsLink' },
|
|
35
|
+
};
|
|
36
|
+
export const ButtonPartiallyInteractive = {
|
|
37
|
+
...Default,
|
|
38
|
+
args: { ...Default.args, controlType: 'partialButton' },
|
|
39
|
+
};
|
|
40
|
+
export const ButtonAsLinkPartiallyInteractive = {
|
|
41
|
+
...Default,
|
|
42
|
+
args: { ...Default.args, controlType: 'partialButtonAsLink' },
|
|
43
|
+
};
|
|
44
|
+
export const IconButton = {
|
|
45
|
+
...Default,
|
|
46
|
+
args: { ...Default.args, controlType: 'iconButton' },
|
|
47
|
+
};
|
|
48
|
+
export const IconButtonAsLink = {
|
|
49
|
+
...Default,
|
|
50
|
+
args: { ...Default.args, controlType: 'iconButtonAsLink' },
|
|
51
|
+
};
|
|
52
|
+
export const IconButtonWithLabel = {
|
|
53
|
+
...Default,
|
|
54
|
+
args: { ...Default.args, controlType: 'iconButtonWithLabel' },
|
|
55
|
+
};
|
|
56
|
+
export const IconButtonAsLinkWithLabel = {
|
|
57
|
+
...Default,
|
|
58
|
+
args: { ...Default.args, controlType: 'iconButtonAsLinkWithLabel' },
|
|
59
|
+
};
|
|
60
|
+
export const IconButtonPartiallyInteractive = {
|
|
61
|
+
...Default,
|
|
62
|
+
args: { ...Default.args, controlType: 'partialIconButton' },
|
|
63
|
+
};
|
|
64
|
+
export const IconButtonAsLinkPartiallyInteractive = {
|
|
65
|
+
...Default,
|
|
66
|
+
args: { ...Default.args, controlType: 'partialIconButtonAsLink', variant: 'dark' },
|
|
67
|
+
};
|
|
68
|
+
export const Navigation = { ...Default, args: { ...Default.args, controlType: 'navigation' } };
|
|
69
|
+
export const NavigationAsButton = {
|
|
70
|
+
...Default,
|
|
71
|
+
args: { ...Default.args, controlType: 'navigationAsButton' },
|
|
72
|
+
};
|
|
73
|
+
export const Checkbox = { ...Default, args: { ...Default.args, controlType: 'checkbox' } };
|
|
74
|
+
export const Radio = { ...Default, args: { ...Default.args, controlType: 'radio' } };
|
|
75
|
+
export const Switch = { ...Default, args: { ...Default.args, controlType: 'switch' } };
|
|
76
|
+
export const NonInteractive = {
|
|
77
|
+
...Default,
|
|
78
|
+
args: { ...Default.args, controlType: 'non-interactive' },
|
|
79
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/react-webpack5';
|
|
2
2
|
import { ListItem, type ListItemProps } from '../../ListItem';
|
|
3
|
-
import {
|
|
3
|
+
import { VariantStory } from './helpers';
|
|
4
|
+
import { allModes } from '../../../../.storybook/modes';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
component: ListItem,
|
|
@@ -13,37 +14,78 @@ export default {
|
|
|
13
14
|
},
|
|
14
15
|
} satisfies Meta<ListItemProps>;
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'forest-green',
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export const
|
|
28
|
-
|
|
29
|
-
'
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
'
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
'
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
'
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
export const
|
|
48
|
-
|
|
49
|
-
|
|
17
|
+
const Default = {
|
|
18
|
+
...VariantStory,
|
|
19
|
+
parameters: {
|
|
20
|
+
variants: ['forest-green'],
|
|
21
|
+
chromatic: {
|
|
22
|
+
forestGreen: allModes.forestGreen,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
args: { variant: 'forest-green' },
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const Button = {
|
|
29
|
+
...Default,
|
|
30
|
+
args: { ...Default.args, controlType: 'button' },
|
|
31
|
+
};
|
|
32
|
+
export const ButtonAsLink = {
|
|
33
|
+
...Default,
|
|
34
|
+
args: { ...Default.args, controlType: 'buttonAsLink' },
|
|
35
|
+
};
|
|
36
|
+
export const ButtonPartiallyInteractive = {
|
|
37
|
+
...Default,
|
|
38
|
+
args: { ...Default.args, controlType: 'partialButton' },
|
|
39
|
+
};
|
|
40
|
+
export const ButtonAsLinkPartiallyInteractive = {
|
|
41
|
+
...Default,
|
|
42
|
+
args: { ...Default.args, controlType: 'partialButtonAsLink' },
|
|
43
|
+
};
|
|
44
|
+
export const IconButton = {
|
|
45
|
+
...Default,
|
|
46
|
+
args: { ...Default.args, controlType: 'iconButton' },
|
|
47
|
+
};
|
|
48
|
+
export const IconButtonAsLink = {
|
|
49
|
+
...Default,
|
|
50
|
+
args: { ...Default.args, controlType: 'iconButtonAsLink' },
|
|
51
|
+
};
|
|
52
|
+
export const IconButtonWithLabel = {
|
|
53
|
+
...Default,
|
|
54
|
+
args: { ...Default.args, controlType: 'iconButtonWithLabel' },
|
|
55
|
+
};
|
|
56
|
+
export const IconButtonAsLinkWithLabel = {
|
|
57
|
+
...Default,
|
|
58
|
+
args: { ...Default.args, controlType: 'iconButtonAsLinkWithLabel' },
|
|
59
|
+
};
|
|
60
|
+
export const IconButtonPartiallyInteractive = {
|
|
61
|
+
...Default,
|
|
62
|
+
args: { ...Default.args, controlType: 'partialIconButton' },
|
|
63
|
+
};
|
|
64
|
+
export const IconButtonAsLinkPartiallyInteractive = {
|
|
65
|
+
...Default,
|
|
66
|
+
args: { ...Default.args, controlType: 'partialIconButtonAsLink' },
|
|
67
|
+
};
|
|
68
|
+
export const Navigation = {
|
|
69
|
+
...Default,
|
|
70
|
+
args: { ...Default.args, controlType: 'navigation' },
|
|
71
|
+
};
|
|
72
|
+
export const NavigationAsButton = {
|
|
73
|
+
...Default,
|
|
74
|
+
args: { ...Default.args, controlType: 'navigationAsButton' },
|
|
75
|
+
};
|
|
76
|
+
export const Checkbox = {
|
|
77
|
+
...Default,
|
|
78
|
+
args: { ...Default.args, controlType: 'checkbox' },
|
|
79
|
+
};
|
|
80
|
+
export const Radio = {
|
|
81
|
+
...Default,
|
|
82
|
+
args: { ...Default.args, controlType: 'radio' },
|
|
83
|
+
};
|
|
84
|
+
export const Switch = {
|
|
85
|
+
...Default,
|
|
86
|
+
args: { ...Default.args, controlType: 'switch' },
|
|
87
|
+
};
|
|
88
|
+
export const NonInteractive = {
|
|
89
|
+
...Default,
|
|
90
|
+
args: { ...Default.args, controlType: 'non-interactive' },
|
|
91
|
+
};
|