@transferwise/components 0.0.0-experimental-d391f4a → 0.0.0-experimental-dbf97a7
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/index.js +25 -32
- package/build/index.js.map +1 -1
- package/build/index.mjs +25 -32
- package/build/index.mjs.map +1 -1
- package/build/main.css +2 -4
- package/build/styles/main.css +2 -4
- package/build/styles/segmentedControl/SegmentedControl.css +2 -4
- package/build/types/definitionList/DefinitionList.d.ts +2 -2
- package/build/types/definitionList/DefinitionList.d.ts.map +1 -1
- package/build/types/definitionList/index.d.ts +1 -1
- package/build/types/definitionList/index.d.ts.map +1 -1
- package/build/types/field/Field.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/contexts.d.ts.map +1 -1
- package/build/types/segmentedControl/SegmentedControl.d.ts.map +1 -1
- package/build/types/tabs/TabList.d.ts +8 -3
- package/build/types/tabs/TabList.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/definitionList/DefinitionList.tsx +6 -3
- package/src/definitionList/index.ts +1 -1
- package/src/field/Field.tsx +7 -5
- package/src/index.ts +1 -1
- package/src/inputs/contexts.tsx +1 -2
- package/src/main.css +2 -4
- package/src/segmentedControl/SegmentedControl.css +2 -4
- package/src/segmentedControl/SegmentedControl.less +1 -4
- package/src/segmentedControl/SegmentedControl.spec.tsx +0 -10
- package/src/segmentedControl/SegmentedControl.story.tsx +4 -42
- package/src/segmentedControl/SegmentedControl.tsx +1 -5
- package/src/tabs/TabList.js +15 -0
- package/src/tabs/Tabs.story.js +135 -0
- package/src/tabs/TabList.tsx +0 -15
- package/src/tabs/Tabs.rtl.spec.tsx +0 -40
- package/src/tabs/Tabs.story.tsx +0 -88
package/src/tabs/Tabs.story.tsx
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
|
|
4
|
-
import { Size, Width } from '../common';
|
|
5
|
-
import { Field } from '../field/Field';
|
|
6
|
-
|
|
7
|
-
import Tabs from './Tabs';
|
|
8
|
-
|
|
9
|
-
const meta = {
|
|
10
|
-
component: Tabs,
|
|
11
|
-
title: 'Navigation/Tabs',
|
|
12
|
-
} satisfies Meta<typeof Tabs>;
|
|
13
|
-
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<typeof meta>;
|
|
16
|
-
|
|
17
|
-
export const Basic = {
|
|
18
|
-
args: {
|
|
19
|
-
tabs: [
|
|
20
|
-
{
|
|
21
|
-
title: 'Title 1',
|
|
22
|
-
disabled: false,
|
|
23
|
-
content: (
|
|
24
|
-
<div className="p-a-2">
|
|
25
|
-
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Cum totam debitis similique
|
|
26
|
-
</div>
|
|
27
|
-
),
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
title: 'Title 2',
|
|
31
|
-
disabled: false,
|
|
32
|
-
content: (
|
|
33
|
-
<div className="p-a-2">Lorem ipsum dolor, sit amet consectetur adipisicing elit.</div>
|
|
34
|
-
),
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
title: 'Title 3',
|
|
38
|
-
disabled: true,
|
|
39
|
-
content: (
|
|
40
|
-
<div className="p-a-2">
|
|
41
|
-
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Cum totam debitis similique
|
|
42
|
-
</div>
|
|
43
|
-
),
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
render: function Render(args) {
|
|
48
|
-
const [selected, setSelected] = useState(0);
|
|
49
|
-
return (
|
|
50
|
-
<Tabs
|
|
51
|
-
className="tabs-custom-class"
|
|
52
|
-
name="tabs-docs"
|
|
53
|
-
transitionSpacing={Size.MEDIUM}
|
|
54
|
-
selected={selected}
|
|
55
|
-
animatePanelsOnClick
|
|
56
|
-
onTabSelect={(index: number) => setSelected(index)}
|
|
57
|
-
{...args}
|
|
58
|
-
/>
|
|
59
|
-
);
|
|
60
|
-
},
|
|
61
|
-
} satisfies Story;
|
|
62
|
-
|
|
63
|
-
export const AutoTabHeaderWidth = {
|
|
64
|
-
...Basic,
|
|
65
|
-
args: {
|
|
66
|
-
...Basic.args,
|
|
67
|
-
headerWidth: Width.AUTO,
|
|
68
|
-
},
|
|
69
|
-
} satisfies Story;
|
|
70
|
-
|
|
71
|
-
export const NoPanelAnimation = {
|
|
72
|
-
...Basic,
|
|
73
|
-
args: {
|
|
74
|
-
...Basic.args,
|
|
75
|
-
animatePanelsOnClick: false,
|
|
76
|
-
},
|
|
77
|
-
} satisfies Story;
|
|
78
|
-
|
|
79
|
-
export const WithinField = {
|
|
80
|
-
...Basic,
|
|
81
|
-
decorators: [
|
|
82
|
-
(Story) => (
|
|
83
|
-
<Field label="Label">
|
|
84
|
-
<Story />
|
|
85
|
-
</Field>
|
|
86
|
-
),
|
|
87
|
-
],
|
|
88
|
-
} satisfies Story;
|