@transferwise/components 0.0.0-experimental-a12c97e → 0.0.0-experimental-e1870f3
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/flowNavigation/animatedLabel/AnimatedLabel.js +2 -2
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js.map +1 -1
- package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs +2 -2
- package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs.map +1 -1
- package/build/index.js +2 -2
- package/build/index.mjs +1 -1
- package/build/{legacylistItem → listItem}/List.js +3 -2
- package/build/listItem/List.js.map +1 -0
- package/build/{legacylistItem → listItem}/List.mjs +3 -2
- package/build/listItem/List.mjs.map +1 -0
- package/build/switch/Switch.js.map +1 -1
- package/build/switch/Switch.mjs.map +1 -1
- package/build/types/index.d.ts +4 -4
- package/build/types/index.d.ts.map +1 -1
- package/build/types/legacylistItem/index.d.ts +0 -2
- package/build/types/legacylistItem/index.d.ts.map +1 -1
- package/build/types/listItem/List.d.ts +7 -0
- package/build/types/listItem/List.d.ts.map +1 -0
- package/build/types/listItem/index.d.ts +2 -0
- package/build/types/listItem/index.d.ts.map +1 -1
- package/build/types/switch/Switch.d.ts +1 -1
- package/build/types/switch/Switch.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/flowNavigation/animatedLabel/AnimatedLabel.tsx +1 -1
- package/src/index.ts +9 -4
- package/src/legacylistItem/LegacyListItem.story.tsx +2 -2
- package/src/legacylistItem/LegacyListItem.tests.story.tsx +2 -1
- package/src/legacylistItem/index.ts +0 -2
- package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.story.tsx +8 -58
- package/src/listItem/AvatarLayout/ListItemAvatarLayout.story.tsx +5 -7
- package/src/listItem/AvatarView/ListItemAvatarView.story.tsx +8 -25
- package/src/listItem/Button/ListItemButton.story.tsx +46 -103
- package/src/listItem/Checkbox/ListItemCheckbox.story.tsx +0 -18
- package/src/listItem/IconButton/ListItemIconButton.story.tsx +8 -21
- package/src/listItem/List.tsx +11 -0
- package/src/listItem/Navigation/ListItemNavigation.story.tsx +2 -5
- package/src/listItem/Prompt/ListItemPrompt.story.tsx +7 -7
- package/src/listItem/Radio/ListItemRadio.story.tsx +0 -10
- package/src/listItem/Switch/ListItemSwitch.story.tsx +3 -10
- package/src/listItem/_stories/ListItem.scenarios.story.tsx +30 -13
- package/src/listItem/_stories/ListItem.story.tsx +142 -206
- package/src/listItem/_stories/ListItem.variants.test.story.tsx +5 -4
- package/src/listItem/index.ts +3 -0
- package/src/switch/Switch.tsx +1 -1
- package/build/legacylistItem/List.js.map +0 -1
- package/build/legacylistItem/List.mjs.map +0 -1
- package/build/types/legacylistItem/List.d.ts +0 -6
- package/build/types/legacylistItem/List.d.ts.map +0 -1
- package/build/types/listItem/_stories/helpers.d.ts +0 -27
- package/build/types/listItem/_stories/helpers.d.ts.map +0 -1
- package/src/legacylistItem/List.tsx +0 -10
- package/src/listItem/_stories/helpers.tsx +0 -53
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"List.mjs","sources":["../../src/legacylistItem/List.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nexport interface ListProps {\n className?: string;\n children?: React.ReactNode;\n}\n\nexport function List({ className, children }: ListProps) {\n return <ul className={clsx(className, 'list-unstyled')}>{children}</ul>;\n}\n"],"names":["List","className","children","_jsx","clsx"],"mappings":";;;SAOgBA,IAAIA,CAAC;EAAEC,SAAS;AAAEC,EAAAA;AAAQ,CAAa,EAAA;AACrD,EAAA,oBAAOC,GAAA,CAAA,IAAA,EAAA;AAAIF,IAAAA,SAAS,EAAEG,IAAI,CAACH,SAAS,EAAE,eAAe,CAAE;AAAAC,IAAAA,QAAA,EAAEA;AAAQ,GAAK,CAAC;AACzE;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/legacylistItem/List.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,SAAS,+BAEtD"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { StoryObj, type Decorator } from '@storybook/react-webpack5';
|
|
2
|
-
import type { Props as ItemProps } from '../ListItem';
|
|
3
|
-
type Story = StoryObj<ItemProps>;
|
|
4
|
-
/**
|
|
5
|
-
* Recent storybook versions render the full source including all story parameters which
|
|
6
|
-
* creates noise, this simple workaround only shows the render function.
|
|
7
|
-
* This is a workaround for the issue.
|
|
8
|
-
* @see https://github.com/storybookjs/storybook/issues/22281
|
|
9
|
-
*/
|
|
10
|
-
export declare const storySourceWithoutNoise: (config: Story) => Story;
|
|
11
|
-
/**
|
|
12
|
-
* In order to make preview controls work correctly, we have to refresh the render
|
|
13
|
-
* by swapping the `key`. This is a workaround for the Storybook's limitation.
|
|
14
|
-
*/
|
|
15
|
-
export declare const withoutKey: Decorator;
|
|
16
|
-
/**
|
|
17
|
-
* Not all stories need access to all controls as it causes unnecessary UI noise.
|
|
18
|
-
*/
|
|
19
|
-
export declare const disableControls: (hiddenByDefault?: string[]) => (hiddenForStory?: string[]) => {
|
|
20
|
-
[k: string]: {
|
|
21
|
-
table: {
|
|
22
|
-
disable: boolean;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
27
|
-
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/listItem/_stories/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAEtD,KAAK,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAAI,QAAQ,KAAK,KAAG,KAuBvD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,SAExB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GACzB,kBAAiB,MAAM,EAAO,MAC9B,iBAAgB,MAAM,EAAO;;;;;;CAG7B,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { StoryObj, type Decorator } from '@storybook/react-webpack5';
|
|
2
|
-
import type { Props as ItemProps } from '../ListItem';
|
|
3
|
-
|
|
4
|
-
type Story = StoryObj<ItemProps>;
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Recent storybook versions render the full source including all story parameters which
|
|
8
|
-
* creates noise, this simple workaround only shows the render function.
|
|
9
|
-
* This is a workaround for the issue.
|
|
10
|
-
* @see https://github.com/storybookjs/storybook/issues/22281
|
|
11
|
-
*/
|
|
12
|
-
export const storySourceWithoutNoise = (config: Story): Story => {
|
|
13
|
-
const newConfig: Story = {
|
|
14
|
-
...config,
|
|
15
|
-
parameters: {
|
|
16
|
-
...config.parameters,
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
18
|
-
docs: {
|
|
19
|
-
...config.parameters?.docs,
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21
|
-
source: {
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
23
|
-
...config.parameters?.docs?.source,
|
|
24
|
-
type: 'code',
|
|
25
|
-
transform: (code: string) =>
|
|
26
|
-
code
|
|
27
|
-
// eslint-disable-next-line regexp/no-super-linear-backtracking
|
|
28
|
-
.replace(/storySourceWithoutNoise\(\{.+render\s?:\s+(.*)\}\)$/gms, '$1'),
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
return newConfig;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* In order to make preview controls work correctly, we have to refresh the render
|
|
39
|
-
* by swapping the `key`. This is a workaround for the Storybook's limitation.
|
|
40
|
-
*/
|
|
41
|
-
export const withoutKey: Decorator = (Story, { args }) => (
|
|
42
|
-
<Story key={args?.disabled ? 'disabled' : 'enabled'} />
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Not all stories need access to all controls as it causes unnecessary UI noise.
|
|
47
|
-
*/
|
|
48
|
-
export const disableControls =
|
|
49
|
-
(hiddenByDefault: string[] = []) =>
|
|
50
|
-
(hiddenForStory: string[] = []) => {
|
|
51
|
-
const hiddenControls = hiddenByDefault.concat(hiddenForStory);
|
|
52
|
-
return Object.fromEntries(hiddenControls.map((item) => [item, { table: { disable: true } }]));
|
|
53
|
-
};
|