@apify/ui-library 1.119.0 → 1.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/dist/src/components/boring_avatar.d.ts +13 -0
- package/dist/src/components/boring_avatar.d.ts.map +1 -0
- package/dist/src/components/boring_avatar.js +98 -0
- package/dist/src/components/boring_avatar.js.map +1 -0
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +2 -0
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/simple_markdown/simple_markdown_components.d.ts.map +1 -1
- package/dist/src/components/simple_markdown/simple_markdown_components.js +23 -6
- package/dist/src/components/simple_markdown/simple_markdown_components.js.map +1 -1
- package/dist/src/components/store/actor_avatar.d.ts +18 -0
- package/dist/src/components/store/actor_avatar.d.ts.map +1 -0
- package/dist/src/components/store/actor_avatar.js +64 -0
- package/dist/src/components/store/actor_avatar.js.map +1 -0
- package/dist/src/components/store/index.d.ts +3 -0
- package/dist/src/components/store/index.d.ts.map +1 -0
- package/dist/src/components/store/index.js +3 -0
- package/dist/src/components/store/index.js.map +1 -0
- package/dist/src/components/store/store_actor_header.d.ts +13 -0
- package/dist/src/components/store/store_actor_header.d.ts.map +1 -0
- package/dist/src/components/store/store_actor_header.js +70 -0
- package/dist/src/components/store/store_actor_header.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/src/components/boring_avatar.stories.tsx +188 -0
- package/src/components/boring_avatar.tsx +262 -0
- package/src/components/card_container.stories.tsx +2 -1
- package/src/components/code/code_block/code_block.stories.jsx +1 -1
- package/src/components/code/inline_code/inline_code.stories.tsx +1 -1
- package/src/components/code/one_line_code/one_line_code.stories.tsx +1 -1
- package/src/components/index.ts +2 -0
- package/src/components/readme_renderer/table_of_contents.stories.tsx +476 -0
- package/src/components/simple_markdown/simple_markdown.stories.tsx +1 -1
- package/src/components/simple_markdown/simple_markdown_components.tsx +27 -5
- package/src/components/store/actor_avatar.stories.tsx +65 -0
- package/src/components/store/actor_avatar.tsx +129 -0
- package/src/components/store/index.ts +2 -0
- package/src/components/store/store_actor_header.stories.tsx +126 -0
- package/src/components/store/store_actor_header.tsx +131 -0
- package/src/components/text/heading_content.stories.tsx +167 -0
- package/src/components/text/heading_marketing.stories.tsx +123 -0
- package/src/components/text/heading_shared.stories.tsx +118 -0
- package/src/components/text/text_content.stories.tsx +189 -0
- package/src/components/text/text_marketing.stories.tsx +187 -0
- package/src/components/text/text_shared.stories.tsx +246 -0
- package/src/components/tile/horizontal_tile.stories.tsx +105 -0
- package/src/components/tile/vertical_tile.stories.tsx +167 -0
- package/src/components/to_consolidate/card.stories.tsx +91 -0
- package/src/components/to_consolidate/markdown.stories.tsx +160 -0
- package/src/components/to_consolidate/pagination.stories.tsx +64 -0
- package/src/components/to_consolidate/tab_number_chip.stories.tsx +113 -0
- package/src/components/text/text.stories.tsx +0 -61
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { type SharedTextProps, TextShared } from './text_shared.js';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Design Tokens/Typography/TextShared',
|
|
8
|
+
component: TextShared,
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: 'Shared text is the standard typography component used throughout the console and shared components.'
|
|
13
|
+
+ ' This is the default choice for most text needs across the application.'
|
|
14
|
+
+ ' **If you\'re unsure which text component to use, choose this one.**',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
argTypes: {
|
|
19
|
+
type: {
|
|
20
|
+
control: { type: 'select' },
|
|
21
|
+
options: ['body', 'code'],
|
|
22
|
+
description: 'Text type: body for regular text, code for monospace',
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
control: { type: 'select' },
|
|
26
|
+
options: ['regular', 'small', 'big'],
|
|
27
|
+
description: 'Text size',
|
|
28
|
+
},
|
|
29
|
+
weight: {
|
|
30
|
+
control: { type: 'select' },
|
|
31
|
+
options: ['normal', 'medium', 'bold'],
|
|
32
|
+
description: 'Font weight',
|
|
33
|
+
},
|
|
34
|
+
as: {
|
|
35
|
+
control: 'text',
|
|
36
|
+
description: 'The HTML element to render as (default: p)',
|
|
37
|
+
},
|
|
38
|
+
children: {
|
|
39
|
+
control: 'text',
|
|
40
|
+
description: 'The text content',
|
|
41
|
+
},
|
|
42
|
+
color: {
|
|
43
|
+
control: 'color',
|
|
44
|
+
description: 'Custom color for the text',
|
|
45
|
+
},
|
|
46
|
+
align: {
|
|
47
|
+
control: { type: 'select' },
|
|
48
|
+
options: ['left', 'center', 'right'],
|
|
49
|
+
description: 'Text alignment',
|
|
50
|
+
},
|
|
51
|
+
italic: {
|
|
52
|
+
control: 'boolean',
|
|
53
|
+
description: 'Apply italic style',
|
|
54
|
+
},
|
|
55
|
+
uppercase: {
|
|
56
|
+
control: 'boolean',
|
|
57
|
+
description: 'Transform text to uppercase',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
} as Meta<SharedTextProps>;
|
|
61
|
+
|
|
62
|
+
type Story = StoryObj<SharedTextProps>;
|
|
63
|
+
|
|
64
|
+
const StoryWrapper = styled.div`
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
gap: 1.5rem;
|
|
68
|
+
padding: 2rem;
|
|
69
|
+
max-width: 800px;
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
const TextShowcase = styled.div`
|
|
73
|
+
padding: 1rem;
|
|
74
|
+
background: #f5f5f5;
|
|
75
|
+
border-radius: 4px;
|
|
76
|
+
|
|
77
|
+
small {
|
|
78
|
+
display: block;
|
|
79
|
+
color: #666;
|
|
80
|
+
font-size: 0.75rem;
|
|
81
|
+
margin-bottom: 0.5rem;
|
|
82
|
+
font-family: monospace;
|
|
83
|
+
}
|
|
84
|
+
`;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Default shared text
|
|
88
|
+
*/
|
|
89
|
+
export const Default: Story = {
|
|
90
|
+
args: {
|
|
91
|
+
type: 'body',
|
|
92
|
+
size: 'regular',
|
|
93
|
+
weight: 'normal',
|
|
94
|
+
children: 'Shared typography for consistent text across the platform.',
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* All body text variants
|
|
100
|
+
*/
|
|
101
|
+
export const AllBodyVariants: Story = {
|
|
102
|
+
render: () => (
|
|
103
|
+
<StoryWrapper>
|
|
104
|
+
<div>
|
|
105
|
+
<h3 style={{ marginTop: 0 }}>Big Size</h3>
|
|
106
|
+
<TextShowcase>
|
|
107
|
+
<small>type=body, size=big, weight=normal</small>
|
|
108
|
+
<TextShared type="body" size="big" weight="normal">
|
|
109
|
+
Big body text with normal weight for emphasis or lead paragraphs.
|
|
110
|
+
</TextShared>
|
|
111
|
+
</TextShowcase>
|
|
112
|
+
<TextShowcase>
|
|
113
|
+
<small>type=body, size=big, weight=medium</small>
|
|
114
|
+
<TextShared type="body" size="big" weight="medium">
|
|
115
|
+
Big body text with medium weight for stronger emphasis.
|
|
116
|
+
</TextShared>
|
|
117
|
+
</TextShowcase>
|
|
118
|
+
<TextShowcase>
|
|
119
|
+
<small>type=body, size=big, weight=bold</small>
|
|
120
|
+
<TextShared type="body" size="big" weight="bold">
|
|
121
|
+
Big body text with bold weight for important statements.
|
|
122
|
+
</TextShared>
|
|
123
|
+
</TextShowcase>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
<div>
|
|
127
|
+
<h3>Regular Size</h3>
|
|
128
|
+
<TextShowcase>
|
|
129
|
+
<small>type=body, size=regular, weight=normal</small>
|
|
130
|
+
<TextShared type="body" size="regular" weight="normal">
|
|
131
|
+
Regular body text with normal weight for standard content.
|
|
132
|
+
</TextShared>
|
|
133
|
+
</TextShowcase>
|
|
134
|
+
<TextShowcase>
|
|
135
|
+
<small>type=body, size=regular, weight=medium</small>
|
|
136
|
+
<TextShared type="body" size="regular" weight="medium">
|
|
137
|
+
Regular body text with medium weight for subtle emphasis.
|
|
138
|
+
</TextShared>
|
|
139
|
+
</TextShowcase>
|
|
140
|
+
<TextShowcase>
|
|
141
|
+
<small>type=body, size=regular, weight=bold</small>
|
|
142
|
+
<TextShared type="body" size="regular" weight="bold">
|
|
143
|
+
Regular body text with bold weight for highlights.
|
|
144
|
+
</TextShared>
|
|
145
|
+
</TextShowcase>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
<div>
|
|
149
|
+
<h3>Small Size</h3>
|
|
150
|
+
<TextShowcase>
|
|
151
|
+
<small>type=body, size=small, weight=normal</small>
|
|
152
|
+
<TextShared type="body" size="small" weight="normal">
|
|
153
|
+
Small body text with normal weight for captions and secondary content.
|
|
154
|
+
</TextShared>
|
|
155
|
+
</TextShowcase>
|
|
156
|
+
<TextShowcase>
|
|
157
|
+
<small>type=body, size=small, weight=medium</small>
|
|
158
|
+
<TextShared type="body" size="small" weight="medium">
|
|
159
|
+
Small body text with medium weight for emphasis in compact spaces.
|
|
160
|
+
</TextShared>
|
|
161
|
+
</TextShowcase>
|
|
162
|
+
<TextShowcase>
|
|
163
|
+
<small>type=body, size=small, weight=bold</small>
|
|
164
|
+
<TextShared type="body" size="small" weight="bold">
|
|
165
|
+
Small body text with bold weight for labels and tags.
|
|
166
|
+
</TextShared>
|
|
167
|
+
</TextShowcase>
|
|
168
|
+
</div>
|
|
169
|
+
</StoryWrapper>
|
|
170
|
+
),
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* All code text variants
|
|
175
|
+
*/
|
|
176
|
+
export const AllCodeVariants: Story = {
|
|
177
|
+
render: () => (
|
|
178
|
+
<StoryWrapper>
|
|
179
|
+
<div>
|
|
180
|
+
<h3 style={{ marginTop: 0 }}>Big Size</h3>
|
|
181
|
+
<TextShowcase>
|
|
182
|
+
<small>type=code, size=big, weight=normal</small>
|
|
183
|
+
<TextShared type="code" size="big" weight="normal">
|
|
184
|
+
const largeCode = "monospace text";
|
|
185
|
+
</TextShared>
|
|
186
|
+
</TextShowcase>
|
|
187
|
+
<TextShowcase>
|
|
188
|
+
<small>type=code, size=big, weight=medium</small>
|
|
189
|
+
<TextShared type="code" size="big" weight="medium">
|
|
190
|
+
const largeCodeMedium = "emphasized";
|
|
191
|
+
</TextShared>
|
|
192
|
+
</TextShowcase>
|
|
193
|
+
<TextShowcase>
|
|
194
|
+
<small>type=code, size=big, weight=bold</small>
|
|
195
|
+
<TextShared type="code" size="big" weight="bold">
|
|
196
|
+
const largeCodeBold = "strongly emphasized";
|
|
197
|
+
</TextShared>
|
|
198
|
+
</TextShowcase>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
<div>
|
|
202
|
+
<h3>Regular Size</h3>
|
|
203
|
+
<TextShowcase>
|
|
204
|
+
<small>type=code, size=regular, weight=normal</small>
|
|
205
|
+
<TextShared type="code" size="regular" weight="normal">
|
|
206
|
+
const regularCode = "standard monospace";
|
|
207
|
+
</TextShared>
|
|
208
|
+
</TextShowcase>
|
|
209
|
+
<TextShowcase>
|
|
210
|
+
<small>type=code, size=regular, weight=medium</small>
|
|
211
|
+
<TextShared type="code" size="regular" weight="medium">
|
|
212
|
+
const regularCodeMedium = "medium weight";
|
|
213
|
+
</TextShared>
|
|
214
|
+
</TextShowcase>
|
|
215
|
+
<TextShowcase>
|
|
216
|
+
<small>type=code, size=regular, weight=bold</small>
|
|
217
|
+
<TextShared type="code" size="regular" weight="bold">
|
|
218
|
+
const regularCodeBold = "bold weight";
|
|
219
|
+
</TextShared>
|
|
220
|
+
</TextShowcase>
|
|
221
|
+
</div>
|
|
222
|
+
|
|
223
|
+
<div>
|
|
224
|
+
<h3>Small Size</h3>
|
|
225
|
+
<TextShowcase>
|
|
226
|
+
<small>type=code, size=small, weight=normal</small>
|
|
227
|
+
<TextShared type="code" size="small" weight="normal">
|
|
228
|
+
const smallCode = "compact";
|
|
229
|
+
</TextShared>
|
|
230
|
+
</TextShowcase>
|
|
231
|
+
<TextShowcase>
|
|
232
|
+
<small>type=code, size=small, weight=medium</small>
|
|
233
|
+
<TextShared type="code" size="small" weight="medium">
|
|
234
|
+
const smallCodeMedium = "compact medium";
|
|
235
|
+
</TextShared>
|
|
236
|
+
</TextShowcase>
|
|
237
|
+
<TextShowcase>
|
|
238
|
+
<small>type=code, size=small, weight=bold</small>
|
|
239
|
+
<TextShared type="code" size="small" weight="bold">
|
|
240
|
+
const smallCodeBold = "compact bold";
|
|
241
|
+
</TextShared>
|
|
242
|
+
</TextShowcase>
|
|
243
|
+
</div>
|
|
244
|
+
</StoryWrapper>
|
|
245
|
+
),
|
|
246
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { ChevronRightIcon, DeleteIcon, SettingsIcon, StarFullIcon } from '@apify/ui-icons';
|
|
5
|
+
|
|
6
|
+
import { TextShared } from '../text/text_shared.js';
|
|
7
|
+
import { HorizontalTile } from './horizontal_tile.js';
|
|
8
|
+
import { TILE_SIZES } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'UI-Library/Tile/HorizontalTile',
|
|
12
|
+
component: HorizontalTile,
|
|
13
|
+
argTypes: {
|
|
14
|
+
content: {
|
|
15
|
+
control: 'text',
|
|
16
|
+
description: 'The main content of the tile',
|
|
17
|
+
},
|
|
18
|
+
icon: {
|
|
19
|
+
control: false,
|
|
20
|
+
description: 'Optional icon element displayed on the left',
|
|
21
|
+
},
|
|
22
|
+
action: {
|
|
23
|
+
control: false,
|
|
24
|
+
description: 'Optional action element displayed on the right (e.g., button, icon)',
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
control: { type: 'select' },
|
|
28
|
+
options: [TILE_SIZES.SMALL, TILE_SIZES.LARGE],
|
|
29
|
+
description: 'Size of the tile (S or L)',
|
|
30
|
+
},
|
|
31
|
+
onClick: {
|
|
32
|
+
action: 'clicked',
|
|
33
|
+
description: 'Click handler for the tile',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
} as Meta<typeof HorizontalTile>;
|
|
37
|
+
|
|
38
|
+
type Story = StoryObj<typeof HorizontalTile>;
|
|
39
|
+
|
|
40
|
+
const StoryWrapper = styled.div`
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
gap: 1rem;
|
|
44
|
+
max-width: 600px;
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
export const Default: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
content: 'Horizontal Tile Content',
|
|
50
|
+
size: TILE_SIZES.SMALL,
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const TileList: Story = {
|
|
55
|
+
render: () => (
|
|
56
|
+
<StoryWrapper>
|
|
57
|
+
<HorizontalTile
|
|
58
|
+
icon={<StarFullIcon size="24" />}
|
|
59
|
+
content="Favorite Items"
|
|
60
|
+
action={<ChevronRightIcon size="20" />}
|
|
61
|
+
size={TILE_SIZES.SMALL}
|
|
62
|
+
onClick={() => alert('Clicked Favorite Items')}
|
|
63
|
+
/>
|
|
64
|
+
<HorizontalTile
|
|
65
|
+
icon={<SettingsIcon size="24" />}
|
|
66
|
+
content="Settings"
|
|
67
|
+
action={<ChevronRightIcon size="20" />}
|
|
68
|
+
size={TILE_SIZES.SMALL}
|
|
69
|
+
onClick={() => alert('Clicked Settings')}
|
|
70
|
+
/>
|
|
71
|
+
<HorizontalTile
|
|
72
|
+
icon={<DeleteIcon size="24" />}
|
|
73
|
+
content="Deleted Items"
|
|
74
|
+
action={<ChevronRightIcon size="20" />}
|
|
75
|
+
size={TILE_SIZES.SMALL}
|
|
76
|
+
onClick={() => alert('Clicked Deleted Items')}
|
|
77
|
+
/>
|
|
78
|
+
</StoryWrapper>
|
|
79
|
+
),
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const SizeComparison: Story = {
|
|
83
|
+
render: () => (
|
|
84
|
+
<StoryWrapper>
|
|
85
|
+
<div>
|
|
86
|
+
<TextShared size="small" weight="bold" mb="space8">Small Size</TextShared>
|
|
87
|
+
<HorizontalTile
|
|
88
|
+
icon={<StarFullIcon size="24" />}
|
|
89
|
+
content="Small tile with padding of 16px"
|
|
90
|
+
action={<ChevronRightIcon size="20" />}
|
|
91
|
+
size={TILE_SIZES.SMALL}
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
94
|
+
<div>
|
|
95
|
+
<TextShared size="small" weight="bold" mb="space8">Large Size</TextShared>
|
|
96
|
+
<HorizontalTile
|
|
97
|
+
icon={<StarFullIcon size="24" />}
|
|
98
|
+
content="Large tile with padding of 24px"
|
|
99
|
+
action={<ChevronRightIcon size="20" />}
|
|
100
|
+
size={TILE_SIZES.LARGE}
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
</StoryWrapper>
|
|
104
|
+
),
|
|
105
|
+
};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { CheckCircleIcon, SettingsIcon, StarFullIcon } from '@apify/ui-icons';
|
|
5
|
+
|
|
6
|
+
import { Button } from '../button.js';
|
|
7
|
+
import { TextShared } from '../text/text_shared.js';
|
|
8
|
+
import { TILE_SIZES } from './shared.js';
|
|
9
|
+
import { VerticalTile } from './vertical_tile.js';
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: 'UI-Library/Tile/VerticalTile',
|
|
13
|
+
component: VerticalTile,
|
|
14
|
+
argTypes: {
|
|
15
|
+
content: {
|
|
16
|
+
control: 'text',
|
|
17
|
+
description: 'The main content of the tile',
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
control: { type: 'select' },
|
|
21
|
+
options: [TILE_SIZES.SMALL, TILE_SIZES.LARGE],
|
|
22
|
+
description: 'Size of the tile (S or L)',
|
|
23
|
+
},
|
|
24
|
+
onClick: {
|
|
25
|
+
action: 'clicked',
|
|
26
|
+
description: 'Click handler for the tile',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
} as Meta<typeof VerticalTile>;
|
|
30
|
+
|
|
31
|
+
type Story = StoryObj<typeof VerticalTile>;
|
|
32
|
+
|
|
33
|
+
const StoryWrapper = styled.div`
|
|
34
|
+
display: grid;
|
|
35
|
+
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
36
|
+
gap: 1rem;
|
|
37
|
+
max-width: 1000px;
|
|
38
|
+
`;
|
|
39
|
+
|
|
40
|
+
export const Default: Story = {
|
|
41
|
+
render: () => (
|
|
42
|
+
<StoryWrapper>
|
|
43
|
+
<VerticalTile
|
|
44
|
+
content={<TextShared>Option 1</TextShared>}
|
|
45
|
+
size={TILE_SIZES.SMALL}
|
|
46
|
+
/>
|
|
47
|
+
<VerticalTile
|
|
48
|
+
content={<TextShared>Option 2</TextShared>}
|
|
49
|
+
size={TILE_SIZES.SMALL}
|
|
50
|
+
/>
|
|
51
|
+
<VerticalTile
|
|
52
|
+
content={<TextShared>Option 3</TextShared>}
|
|
53
|
+
size={TILE_SIZES.SMALL}
|
|
54
|
+
/>
|
|
55
|
+
<VerticalTile
|
|
56
|
+
content={<TextShared>Option 4</TextShared>}
|
|
57
|
+
size={TILE_SIZES.SMALL}
|
|
58
|
+
/>
|
|
59
|
+
</StoryWrapper>
|
|
60
|
+
),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const CardStyleGrid: Story = {
|
|
64
|
+
render: () => (
|
|
65
|
+
<StoryWrapper>
|
|
66
|
+
<VerticalTile
|
|
67
|
+
content={
|
|
68
|
+
<div>
|
|
69
|
+
<div style={{ marginBottom: '1rem' }}>
|
|
70
|
+
<StarFullIcon size="40" color="#FFD700" />
|
|
71
|
+
</div>
|
|
72
|
+
<TextShared weight="bold" mb="space8">
|
|
73
|
+
Web Scraper
|
|
74
|
+
</TextShared>
|
|
75
|
+
<TextShared size="small" color="#666" mb="space12">
|
|
76
|
+
Extract data from any website quickly and efficiently
|
|
77
|
+
</TextShared>
|
|
78
|
+
<Button size="small" fullWidth>
|
|
79
|
+
Take Action
|
|
80
|
+
</Button>
|
|
81
|
+
</div>
|
|
82
|
+
}
|
|
83
|
+
size={TILE_SIZES.LARGE}
|
|
84
|
+
onClick={() => alert('Clicked Web Scraper')}
|
|
85
|
+
/>
|
|
86
|
+
<VerticalTile
|
|
87
|
+
content={
|
|
88
|
+
<div>
|
|
89
|
+
<div style={{ marginBottom: '1rem' }}>
|
|
90
|
+
<SettingsIcon size="40" color="#2196F3" />
|
|
91
|
+
</div>
|
|
92
|
+
<TextShared weight="bold" mb="space8">
|
|
93
|
+
API Integration
|
|
94
|
+
</TextShared>
|
|
95
|
+
<TextShared size="small" color="#666" mb="space12">
|
|
96
|
+
Connect your APIs and automate workflows
|
|
97
|
+
</TextShared>
|
|
98
|
+
<Button size="small" fullWidth>
|
|
99
|
+
Take Action
|
|
100
|
+
</Button>
|
|
101
|
+
</div>
|
|
102
|
+
}
|
|
103
|
+
size={TILE_SIZES.LARGE}
|
|
104
|
+
onClick={() => alert('Clicked API Integration')}
|
|
105
|
+
/>
|
|
106
|
+
<VerticalTile
|
|
107
|
+
content={
|
|
108
|
+
<div>
|
|
109
|
+
<div style={{ marginBottom: '1rem' }}>
|
|
110
|
+
<CheckCircleIcon size="40" color="#4CAF50" />
|
|
111
|
+
</div>
|
|
112
|
+
<TextShared weight="bold" mb="space8">
|
|
113
|
+
Data Processor
|
|
114
|
+
</TextShared>
|
|
115
|
+
<TextShared size="small" color="#666" mb="space12">
|
|
116
|
+
Transform and clean your data automatically
|
|
117
|
+
</TextShared>
|
|
118
|
+
<Button size="small" fullWidth>
|
|
119
|
+
Take Action
|
|
120
|
+
</Button>
|
|
121
|
+
</div>
|
|
122
|
+
}
|
|
123
|
+
size={TILE_SIZES.LARGE}
|
|
124
|
+
onClick={() => alert('Clicked Data Processor')}
|
|
125
|
+
/>
|
|
126
|
+
</StoryWrapper>
|
|
127
|
+
),
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export const SizeComparison: Story = {
|
|
131
|
+
render: () => (
|
|
132
|
+
<StoryWrapper>
|
|
133
|
+
<div>
|
|
134
|
+
<TextShared size="small" weight="bold" mb="space8">Small Size</TextShared>
|
|
135
|
+
<VerticalTile
|
|
136
|
+
content={
|
|
137
|
+
<div>
|
|
138
|
+
<TextShared weight="bold" mb="space4">
|
|
139
|
+
Small Tile
|
|
140
|
+
</TextShared>
|
|
141
|
+
<TextShared size="small" color="#666">
|
|
142
|
+
16px padding
|
|
143
|
+
</TextShared>
|
|
144
|
+
</div>
|
|
145
|
+
}
|
|
146
|
+
size={TILE_SIZES.SMALL}
|
|
147
|
+
/>
|
|
148
|
+
</div>
|
|
149
|
+
<div>
|
|
150
|
+
<TextShared size="small" weight="bold" mb="space8">Large Size</TextShared>
|
|
151
|
+
<VerticalTile
|
|
152
|
+
content={
|
|
153
|
+
<div>
|
|
154
|
+
<TextShared weight="bold" mb="space4">
|
|
155
|
+
Large Tile
|
|
156
|
+
</TextShared>
|
|
157
|
+
<TextShared size="small" color="#666">
|
|
158
|
+
24px padding
|
|
159
|
+
</TextShared>
|
|
160
|
+
</div>
|
|
161
|
+
}
|
|
162
|
+
size={TILE_SIZES.LARGE}
|
|
163
|
+
/>
|
|
164
|
+
</div>
|
|
165
|
+
</StoryWrapper>
|
|
166
|
+
),
|
|
167
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { Button } from '../button.js';
|
|
4
|
+
import { Card, type CardProps } from './card.js';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'UI-Library/Cards/Card',
|
|
8
|
+
component: Card,
|
|
9
|
+
argTypes: {
|
|
10
|
+
caption: {
|
|
11
|
+
control: 'text',
|
|
12
|
+
description: 'The heading/title text of the card',
|
|
13
|
+
},
|
|
14
|
+
description: {
|
|
15
|
+
control: 'text',
|
|
16
|
+
description: 'Additional description text displayed below the caption',
|
|
17
|
+
},
|
|
18
|
+
actions: {
|
|
19
|
+
control: false,
|
|
20
|
+
description: 'Action buttons or elements displayed in the header',
|
|
21
|
+
},
|
|
22
|
+
children: {
|
|
23
|
+
control: 'text',
|
|
24
|
+
description: 'Main content of the card',
|
|
25
|
+
},
|
|
26
|
+
disabled: {
|
|
27
|
+
control: 'boolean',
|
|
28
|
+
description: 'Whether the card content is disabled (overlayed)',
|
|
29
|
+
},
|
|
30
|
+
shadowless: {
|
|
31
|
+
control: 'boolean',
|
|
32
|
+
description: 'Whether to remove the box shadow from the card',
|
|
33
|
+
},
|
|
34
|
+
as: {
|
|
35
|
+
control: 'text',
|
|
36
|
+
description: 'The HTML element type to render as',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
} as Meta<CardProps>;
|
|
40
|
+
|
|
41
|
+
type Story = StoryObj<CardProps>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A basic card with caption and content
|
|
45
|
+
*/
|
|
46
|
+
export const Default: Story = {
|
|
47
|
+
args: {
|
|
48
|
+
caption: 'Card Title',
|
|
49
|
+
children: 'This is the main content of the card.',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A card with all features: caption, description, actions, and content
|
|
55
|
+
*/
|
|
56
|
+
export const WithAllFeatures: Story = {
|
|
57
|
+
args: {
|
|
58
|
+
caption: 'Complete Card',
|
|
59
|
+
description: 'This is a description that provides additional context about the card content.',
|
|
60
|
+
actions: <Button size="small">Action</Button>,
|
|
61
|
+
children: 'This card demonstrates all available features including caption, description, actions, and content.',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* A card with action buttons in the header
|
|
67
|
+
*/
|
|
68
|
+
export const WithActions: Story = {
|
|
69
|
+
args: {
|
|
70
|
+
caption: 'Card with Actions',
|
|
71
|
+
actions: (
|
|
72
|
+
<>
|
|
73
|
+
<Button size="small" variant="tertiary">Cancel</Button>
|
|
74
|
+
<Button size="small">Save</Button>
|
|
75
|
+
</>
|
|
76
|
+
),
|
|
77
|
+
children: 'This card includes action buttons in its header.',
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* A disabled card with overlayed content
|
|
83
|
+
*/
|
|
84
|
+
export const Disabled: Story = {
|
|
85
|
+
args: {
|
|
86
|
+
caption: 'Disabled Card',
|
|
87
|
+
description: 'The content of this card is disabled.',
|
|
88
|
+
children: 'You cannot interact with this content.',
|
|
89
|
+
disabled: true,
|
|
90
|
+
},
|
|
91
|
+
};
|