@apify/ui-library 1.97.1 → 1.98.0

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.
Files changed (105) hide show
  1. package/dist/src/components/action_link.stories.d.ts +50 -0
  2. package/dist/src/components/action_link.stories.d.ts.map +1 -0
  3. package/dist/src/components/action_link.stories.js +129 -0
  4. package/dist/src/components/action_link.stories.js.map +1 -0
  5. package/dist/src/components/actor_template_card.stories.d.ts +49 -0
  6. package/dist/src/components/actor_template_card.stories.d.ts.map +1 -0
  7. package/dist/src/components/actor_template_card.stories.js +154 -0
  8. package/dist/src/components/actor_template_card.stories.js.map +1 -0
  9. package/dist/src/components/banner.stories.d.ts +53 -0
  10. package/dist/src/components/banner.stories.d.ts.map +1 -0
  11. package/dist/src/components/banner.stories.js +132 -0
  12. package/dist/src/components/banner.stories.js.map +1 -0
  13. package/dist/src/components/blog_article.stories.d.ts +33 -0
  14. package/dist/src/components/blog_article.stories.d.ts.map +1 -0
  15. package/dist/src/components/blog_article.stories.js +92 -0
  16. package/dist/src/components/blog_article.stories.js.map +1 -0
  17. package/dist/src/components/chip.stories.d.ts +98 -0
  18. package/dist/src/components/chip.stories.d.ts.map +1 -0
  19. package/dist/src/components/chip.stories.js +251 -0
  20. package/dist/src/components/chip.stories.js.map +1 -0
  21. package/dist/src/components/code/code_block/code_block_with_tabs.d.ts +1 -1
  22. package/dist/src/components/code/code_block/code_block_with_tabs.d.ts.map +1 -1
  23. package/dist/src/components/code/code_block/code_block_with_tabs.stories.d.ts +23 -0
  24. package/dist/src/components/code/code_block/code_block_with_tabs.stories.d.ts.map +1 -0
  25. package/dist/src/components/code/code_block/code_block_with_tabs.stories.js +63 -0
  26. package/dist/src/components/code/code_block/code_block_with_tabs.stories.js.map +1 -0
  27. package/dist/src/components/code/inline_code/inline_code.stories.d.ts +16 -0
  28. package/dist/src/components/code/inline_code/inline_code.stories.d.ts.map +1 -0
  29. package/dist/src/components/code/inline_code/inline_code.stories.js +47 -0
  30. package/dist/src/components/code/inline_code/inline_code.stories.js.map +1 -0
  31. package/dist/src/components/code/one_line_code/one_line_code.stories.d.ts +16 -0
  32. package/dist/src/components/code/one_line_code/one_line_code.stories.d.ts.map +1 -0
  33. package/dist/src/components/code/one_line_code/one_line_code.stories.js +81 -0
  34. package/dist/src/components/code/one_line_code/one_line_code.stories.js.map +1 -0
  35. package/dist/src/components/color_wheel_gradient.stories.d.ts +38 -0
  36. package/dist/src/components/color_wheel_gradient.stories.d.ts.map +1 -0
  37. package/dist/src/components/color_wheel_gradient.stories.js +126 -0
  38. package/dist/src/components/color_wheel_gradient.stories.js.map +1 -0
  39. package/dist/src/components/link.stories.d.ts +22 -0
  40. package/dist/src/components/link.stories.d.ts.map +1 -0
  41. package/dist/src/components/link.stories.js +112 -0
  42. package/dist/src/components/link.stories.js.map +1 -0
  43. package/dist/src/components/rating.stories.d.ts +32 -0
  44. package/dist/src/components/rating.stories.d.ts.map +1 -0
  45. package/dist/src/components/rating.stories.js +95 -0
  46. package/dist/src/components/rating.stories.js.map +1 -0
  47. package/dist/src/components/simple_markdown/simple_markdown.d.ts +2 -2
  48. package/dist/src/components/simple_markdown/simple_markdown.d.ts.map +1 -1
  49. package/dist/src/components/simple_markdown/simple_markdown.stories.d.ts +8 -0
  50. package/dist/src/components/simple_markdown/simple_markdown.stories.d.ts.map +1 -0
  51. package/dist/src/components/simple_markdown/simple_markdown.stories.js +60 -0
  52. package/dist/src/components/simple_markdown/simple_markdown.stories.js.map +1 -0
  53. package/dist/src/components/tabs/tab.stories.d.ts.map +1 -1
  54. package/dist/src/components/tabs/tab.stories.js +1 -0
  55. package/dist/src/components/tabs/tab.stories.js.map +1 -1
  56. package/dist/src/components/text/text.stories.d.ts +13 -0
  57. package/dist/src/components/text/text.stories.d.ts.map +1 -0
  58. package/dist/src/components/text/text.stories.js +14 -0
  59. package/dist/src/components/text/text.stories.js.map +1 -0
  60. package/dist/src/design_system/tokens/radiuses.d.ts +2 -0
  61. package/dist/src/design_system/tokens/radiuses.d.ts.map +1 -1
  62. package/dist/src/design_system/tokens/radiuses.js +2 -0
  63. package/dist/src/design_system/tokens/radiuses.js.map +1 -1
  64. package/dist/src/design_system/tokens/radiuses.stories.d.ts +6 -0
  65. package/dist/src/design_system/tokens/radiuses.stories.d.ts.map +1 -0
  66. package/dist/src/design_system/tokens/radiuses.stories.js +30 -0
  67. package/dist/src/design_system/tokens/radiuses.stories.js.map +1 -0
  68. package/dist/src/design_system/tokens/shadows.stories.d.ts +6 -0
  69. package/dist/src/design_system/tokens/shadows.stories.d.ts.map +1 -0
  70. package/dist/src/design_system/tokens/shadows.stories.js +37 -0
  71. package/dist/src/design_system/tokens/shadows.stories.js.map +1 -0
  72. package/dist/src/design_system/tokens/spaces.stories.d.ts +10 -0
  73. package/dist/src/design_system/tokens/spaces.stories.d.ts.map +1 -0
  74. package/dist/src/design_system/tokens/spaces.stories.js +92 -0
  75. package/dist/src/design_system/tokens/spaces.stories.js.map +1 -0
  76. package/dist/tsconfig.build.tsbuildinfo +1 -1
  77. package/package.json +3 -3
  78. package/src/components/action_link.stories.tsx +145 -0
  79. package/src/components/actor_template_card.stories.tsx +179 -0
  80. package/src/components/badge.doc.mdx +35 -0
  81. package/src/components/banner.stories.tsx +256 -0
  82. package/src/components/blog_article.stories.tsx +133 -0
  83. package/src/components/chip.stories.tsx +301 -0
  84. package/src/components/code/code_block/code_block.stories.jsx +133 -0
  85. package/src/components/code/code_block/code_block_with_tabs.stories.tsx +81 -0
  86. package/src/components/code/code_block/code_block_with_tabs.tsx +1 -1
  87. package/src/components/code/inline_code/inline_code.stories.tsx +88 -0
  88. package/src/components/code/one_line_code/one_line_code.stories.tsx +173 -0
  89. package/src/components/color_wheel_gradient.stories.tsx +157 -0
  90. package/src/components/floating/tooltip.stories.jsx +0 -1
  91. package/src/components/link.stories.tsx +127 -0
  92. package/src/components/message.stories.jsx +116 -0
  93. package/src/components/rating.stories.tsx +166 -0
  94. package/src/components/simple_markdown/simple_markdown.stories.tsx +71 -0
  95. package/src/components/simple_markdown/simple_markdown.tsx +1 -1
  96. package/src/components/tabs/tab.stories.tsx +1 -0
  97. package/src/components/tag.doc.mdx +38 -0
  98. package/src/components/text/text.stories.tsx +61 -0
  99. package/src/design_system/tokens/radiuses.doc.mdx +12 -0
  100. package/src/design_system/tokens/radiuses.stories.tsx +49 -0
  101. package/src/design_system/tokens/radiuses.ts +2 -0
  102. package/src/design_system/tokens/shadows.doc.mdx +16 -0
  103. package/src/design_system/tokens/shadows.stories.tsx +58 -0
  104. package/src/design_system/tokens/spaces.doc.mdx +18 -0
  105. package/src/design_system/tokens/spaces.stories.tsx +131 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/ui-library",
3
- "version": "1.97.1",
3
+ "version": "1.98.0",
4
4
  "description": "React UI library used by apify.com",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "It's not nice, but helps us to get around the problem of multiple react instances."
27
27
  ],
28
28
  "dependencies": {
29
- "@apify/ui-icons": "^1.18.2",
29
+ "@apify/ui-icons": "^1.18.3",
30
30
  "@floating-ui/react": "^0.26.2",
31
31
  "@react-hook/resize-observer": "^2.0.2",
32
32
  "clsx": "^2.0.0",
@@ -64,5 +64,5 @@
64
64
  "src",
65
65
  "style"
66
66
  ],
67
- "gitHead": "5174c9c9414a8c7f6107dab1d339ee2246b434a5"
67
+ "gitHead": "a3cee11e266711bc8aa98b12498205fb2ebc90d0"
68
68
  }
@@ -0,0 +1,145 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import type { ComponentProps } from 'react';
3
+
4
+ import { ActionLink, BackLink } from './action_link.js';
5
+
6
+ type ActionLinkProps = ComponentProps<typeof ActionLink>;
7
+ type BackLinkProps = ComponentProps<typeof BackLink>;
8
+
9
+ export default {
10
+ title: 'UI-Library/ActionLink',
11
+ component: ActionLink,
12
+ argTypes: {
13
+ children: {
14
+ control: 'text',
15
+ description: 'The text content of the link.',
16
+ },
17
+ to: {
18
+ control: 'text',
19
+ description: 'The URL that the link points to.',
20
+ },
21
+ as: {
22
+ control: 'text',
23
+ description: 'Component to render as (default is the Link component, which is an anchor).',
24
+ },
25
+ contentProps: {
26
+ control: 'object',
27
+ description: 'Additional props passed to the Heading component.',
28
+ },
29
+ target: {
30
+ control: 'select',
31
+ options: ['_self', '_blank', '_parent', '_top'],
32
+ description: 'Target window for the link.',
33
+ },
34
+ onClick: {
35
+ action: 'clicked',
36
+ description: 'Click event handler.',
37
+ },
38
+ },
39
+ parameters: {
40
+ design: {
41
+ type: 'figma',
42
+ url: 'TODO: Add Figma URL',
43
+ },
44
+ },
45
+ } as Meta<ActionLinkProps>;
46
+
47
+ type Story = StoryObj<ActionLinkProps>;
48
+ type BackStory = StoryObj<BackLinkProps>;
49
+
50
+ /**
51
+ * Default story for ActionLink.
52
+ * Shows the basic usage with text and a right arrow icon.
53
+ */
54
+ export const Default: Story = {
55
+ args: {
56
+ children: 'Continue reading',
57
+ to: '#',
58
+ },
59
+ };
60
+
61
+ /**
62
+ * ActionLink with a longer text content.
63
+ * Demonstrates how the component handles longer text labels.
64
+ */
65
+ export const LongText: Story = {
66
+ args: {
67
+ children: 'Learn more about our comprehensive documentation',
68
+ to: '#',
69
+ },
70
+ };
71
+
72
+ /**
73
+ * ActionLink with custom content props.
74
+ * Shows how additional props can be passed to the internal Heading component.
75
+ */
76
+ export const WithContentProps: Story = {
77
+ args: {
78
+ children: 'Explore features',
79
+ to: '#',
80
+ contentProps: {
81
+ style: { fontWeight: 'bold' },
82
+ },
83
+ },
84
+ };
85
+
86
+ /**
87
+ * ActionLink rendered as a button element.
88
+ * Demonstrates the flexibility of the 'as' prop for different HTML elements.
89
+ */
90
+ export const AsButton: Story = {
91
+ args: {
92
+ children: 'Submit form',
93
+ as: 'button',
94
+ onClick: () => console.log('Button clicked'),
95
+ },
96
+ };
97
+
98
+ /**
99
+ * Default story for BackLink.
100
+ * Shows the basic usage with text and a left arrow icon for navigation back.
101
+ */
102
+ export const BackLinkDefault: BackStory = {
103
+ render: (args: BackLinkProps) => <BackLink {...args} />,
104
+ args: {
105
+ children: 'Back to previous page',
106
+ to: '#',
107
+ },
108
+ };
109
+
110
+ /**
111
+ * BackLink with shorter text.
112
+ * Demonstrates the BackLink component with minimal text content.
113
+ */
114
+ export const BackLinkShort: BackStory = {
115
+ render: (args: BackLinkProps) => <BackLink {...args} />,
116
+ args: {
117
+ children: 'Back',
118
+ to: '#',
119
+ },
120
+ };
121
+
122
+ /**
123
+ * BackLink rendered as a button.
124
+ * Shows BackLink flexibility with different HTML elements.
125
+ */
126
+ export const BackLinkAsButton: BackStory = {
127
+ render: (args: BackLinkProps) => <BackLink {...args} />,
128
+ args: {
129
+ children: 'Go back',
130
+ as: 'button',
131
+ onClick: () => console.log('Back button clicked'),
132
+ },
133
+ };
134
+
135
+ /**
136
+ * ActionLink with external URL.
137
+ * Demonstrates usage for external navigation with proper URL.
138
+ */
139
+ export const ExternalLink: Story = {
140
+ args: {
141
+ children: 'Visit our website',
142
+ to: 'https://apify.com',
143
+ target: '_blank',
144
+ },
145
+ };
@@ -0,0 +1,179 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import type React from 'react';
3
+
4
+ import { ActorTemplateCard } from './actor_template_card.js';
5
+
6
+ // Define the props interface for the component
7
+ interface ActorTemplateCardProps {
8
+ id: string;
9
+ label: string;
10
+ description: string;
11
+ icons: React.ReactNode[];
12
+ useCases?: string[];
13
+ }
14
+
15
+ // Mock icons for the stories
16
+ const mockIcons = [
17
+ <img key="1" src="https://apify.com/img/template-icons/typescript.svg" alt="Icon A" />,
18
+ <img key="2" src="https://apify.com/img/template-icons/typescript.svg" alt="Icon B" />,
19
+ ];
20
+
21
+ const singleIcon = [
22
+ <img key="1" src="https://apify.com/img/template-icons/typescript.svg" alt="Single Icon" />,
23
+ ];
24
+
25
+ const multipleIcons = [
26
+ <img key="1" src="https://apify.com/img/template-icons/typescript.svg" alt="Icon 1" />,
27
+ <img key="2" src="https://apify.com/img/template-icons/typescript.svg" alt="Icon 2" />,
28
+ <img key="3" src="https://apify.com/img/template-icons/typescript.svg" alt="Icon 3" />,
29
+ <img key="4" src="https://apify.com/img/template-icons/typescript.svg" alt="Icon 4" />,
30
+ ];
31
+
32
+ export default {
33
+ title: 'UI-Library/ActorTemplateCard',
34
+ component: ActorTemplateCard,
35
+ argTypes: {
36
+ id: {
37
+ control: 'text',
38
+ },
39
+ label: {
40
+ control: 'text',
41
+ },
42
+ description: {
43
+ control: 'text',
44
+ },
45
+ icons: {
46
+ control: false,
47
+ },
48
+ useCases: {
49
+ control: 'select',
50
+ options: [undefined, ['STARTER'], ['AI'], ['STARTER', 'AI']],
51
+ },
52
+ },
53
+ parameters: {
54
+ design: {
55
+ type: 'figma',
56
+ url: 'TODO: Add Figma URL',
57
+ },
58
+ },
59
+ } as Meta<ActorTemplateCardProps>;
60
+
61
+ type Story = StoryObj<ActorTemplateCardProps>;
62
+
63
+ /**
64
+ * Default story showing the basic ActorTemplateCard with standard props
65
+ */
66
+ export const Default: Story = {
67
+ args: {
68
+ id: 'web-scraper',
69
+ label: 'Web Scraper',
70
+ description: 'A versatile web scraper that can extract data from any website. Perfect for beginners and professionals alike.',
71
+ icons: mockIcons,
72
+ },
73
+ };
74
+
75
+ /**
76
+ * Card with a starter badge to indicate it's beginner-friendly
77
+ */
78
+ export const WithStarterBadge: Story = {
79
+ args: {
80
+ id: 'simple-scraper',
81
+ label: 'Simple Website Scraper',
82
+ description: 'An easy-to-use scraper designed for beginners. Start scraping websites with minimal configuration.',
83
+ icons: singleIcon,
84
+ useCases: ['STARTER'],
85
+ },
86
+ };
87
+
88
+ /**
89
+ * Card with an AI badge to indicate it uses artificial intelligence
90
+ */
91
+ export const WithAIBadge: Story = {
92
+ args: {
93
+ id: 'ai-scraper',
94
+ label: 'AI-Powered Data Extractor',
95
+ description: 'Advanced scraper using artificial intelligence to intelligently extract and structure data from complex websites.',
96
+ icons: mockIcons,
97
+ useCases: ['AI'],
98
+ },
99
+ };
100
+
101
+ /**
102
+ * Card with both starter and AI badges
103
+ */
104
+ export const WithMultipleBadges: Story = {
105
+ args: {
106
+ id: 'ai-starter-scraper',
107
+ label: 'AI Scraper for Beginners',
108
+ description: 'An AI-powered scraper designed specifically for newcomers. Get the power of AI with beginner-friendly setup.',
109
+ icons: mockIcons,
110
+ useCases: ['STARTER', 'AI'],
111
+ },
112
+ };
113
+
114
+ /**
115
+ * Card with a single icon
116
+ */
117
+ export const WithSingleIcon: Story = {
118
+ args: {
119
+ id: 'single-icon-scraper',
120
+ label: 'E-commerce Scraper',
121
+ description: 'Specialized scraper for e-commerce websites. Extract product information, prices, and reviews efficiently.',
122
+ icons: singleIcon,
123
+ useCases: ['STARTER'],
124
+ },
125
+ };
126
+
127
+ /**
128
+ * Card with multiple icons to test flex-wrap behavior
129
+ */
130
+ export const WithMultipleIcons: Story = {
131
+ args: {
132
+ id: 'multi-icon-scraper',
133
+ label: 'Universal Data Scraper',
134
+ description: 'A comprehensive scraper supporting multiple data formats and websites. Works with JSON, XML, HTML, and more.',
135
+ icons: multipleIcons,
136
+ useCases: ['AI'],
137
+ },
138
+ };
139
+
140
+ /**
141
+ * Card with a long description to test text truncation
142
+ */
143
+ export const WithLongDescription: Story = {
144
+ args: {
145
+ id: 'long-description-scraper',
146
+ label: 'Advanced Web Scraper',
147
+ description: 'This is a very comprehensive web scraper that can handle complex websites with dynamic content, '
148
+ + 'JavaScript rendering, pagination, infinite scroll, CAPTCHA solving, proxy rotation, and much more. '
149
+ + 'It includes advanced features like data validation, duplicate detection, rate limiting, and export to '
150
+ + 'multiple formats including CSV, JSON, XML, and direct database connections.',
151
+ icons: mockIcons,
152
+ useCases: ['STARTER', 'AI'],
153
+ },
154
+ };
155
+
156
+ /**
157
+ * Card with no badges to show the clean appearance without use cases
158
+ */
159
+ export const WithoutBadges: Story = {
160
+ args: {
161
+ id: 'no-badges-scraper',
162
+ label: 'Basic Web Scraper',
163
+ description: 'A straightforward web scraper without any special categorization. Perfect for general-purpose data extraction.',
164
+ icons: mockIcons,
165
+ },
166
+ };
167
+
168
+ /**
169
+ * Card with a very short description
170
+ */
171
+ export const WithShortDescription: Story = {
172
+ args: {
173
+ id: 'short-description-scraper',
174
+ label: 'Quick Scraper',
175
+ description: 'Fast and simple.',
176
+ icons: singleIcon,
177
+ useCases: ['STARTER'],
178
+ },
179
+ };
@@ -0,0 +1,35 @@
1
+ import { Canvas, Controls, Meta } from '@storybook/addon-docs/blocks';
2
+ import { theme } from '@apify/ui-library';
3
+ import { DoDonts } from '@apify-packages/storybook-utils';
4
+
5
+ import * as BadgeStories from './badge.stories';
6
+
7
+ <Meta of={BadgeStories} />
8
+
9
+
10
+ # Badge
11
+
12
+ <br/>
13
+
14
+ ## Overview
15
+
16
+ To be continued
17
+
18
+ <Canvas of={BadgeStories.Default} />
19
+
20
+ ## Tag vs Badge
21
+
22
+ Tags can often be confused with badges. Although the two components are similar, the main difference is that tags are actionable and badges are not.
23
+
24
+ ## Inputs
25
+
26
+ The component accepts the following inputs (props):
27
+
28
+ <Controls of={BadgeStories.Default} />
29
+
30
+ ---
31
+
32
+ ## Usage
33
+
34
+ ➡️
35
+
@@ -0,0 +1,256 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import type React from 'react';
3
+
4
+ import { Banner } from './banner.js';
5
+
6
+ interface BannerProps {
7
+ background?: string;
8
+ useGradientBackground?: boolean;
9
+ width?: string;
10
+ className?: string;
11
+ children: React.ReactNode;
12
+ }
13
+
14
+ export default {
15
+ title: 'UI-Library/Banner',
16
+ component: Banner,
17
+ argTypes: {
18
+ background: {
19
+ control: 'text',
20
+ },
21
+ useGradientBackground: {
22
+ control: 'boolean',
23
+ },
24
+ width: {
25
+ control: 'text',
26
+ },
27
+ className: {
28
+ control: 'text',
29
+ },
30
+ children: {
31
+ control: false,
32
+ },
33
+ },
34
+ parameters: {
35
+ design: {
36
+ type: 'figma',
37
+ url: 'TODO: Add Figma URL',
38
+ },
39
+ },
40
+ } as Meta<BannerProps>;
41
+
42
+ type Story = StoryObj<BannerProps>;
43
+
44
+ /**
45
+ * Default banner with gradient background enabled
46
+ */
47
+ export const Default: Story = {
48
+ args: {
49
+ children: (
50
+ <div>
51
+ <h2 style={{ margin: 0, marginBottom: '8px', color: 'white' }}>Welcome to Apify</h2>
52
+ <p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.8)' }}>
53
+ Build reliable web scrapers. Fast.
54
+ </p>
55
+ </div>
56
+ ),
57
+ },
58
+ };
59
+
60
+ /**
61
+ * Banner with gradient background enabled (explicitly set to true)
62
+ */
63
+ export const WithGradientBackground: Story = {
64
+ args: {
65
+ useGradientBackground: true,
66
+ children: (
67
+ <div>
68
+ <h2 style={{ margin: 0, marginBottom: '8px', color: 'white' }}>
69
+ Gradient Background Banner
70
+ </h2>
71
+ <p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.8)' }}>
72
+ This banner uses the beautiful gradient background with colorful shapes.
73
+ </p>
74
+ </div>
75
+ ),
76
+ },
77
+ };
78
+
79
+ /**
80
+ * Banner without gradient background - shows solid background color
81
+ */
82
+ export const WithoutGradientBackground: Story = {
83
+ args: {
84
+ useGradientBackground: false,
85
+ children: (
86
+ <div>
87
+ <h2 style={{ margin: 0, marginBottom: '8px' }}>Simple Banner</h2>
88
+ <p style={{ margin: 0, opacity: 0.7 }}>
89
+ This banner uses a simple solid background without gradient effects.
90
+ </p>
91
+ </div>
92
+ ),
93
+ },
94
+ };
95
+
96
+ /**
97
+ * Banner with custom background color
98
+ */
99
+ export const WithCustomBackground: Story = {
100
+ args: {
101
+ background: '#4CAF50',
102
+ useGradientBackground: false,
103
+ children: (
104
+ <div>
105
+ <h2 style={{ margin: 0, marginBottom: '8px', color: 'white' }}>
106
+ Custom Green Background
107
+ </h2>
108
+ <p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.9)' }}>
109
+ This banner has a custom green background color.
110
+ </p>
111
+ </div>
112
+ ),
113
+ },
114
+ };
115
+
116
+ /**
117
+ * Banner with custom background color and gradient overlay
118
+ */
119
+ export const WithCustomBackgroundAndGradient: Story = {
120
+ args: {
121
+ background: '#2196F3',
122
+ useGradientBackground: true,
123
+ children: (
124
+ <div>
125
+ <h2 style={{ margin: 0, marginBottom: '8px', color: 'white' }}>
126
+ Blue Background with Gradient
127
+ </h2>
128
+ <p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.9)' }}>
129
+ Custom blue background with gradient overlay effects.
130
+ </p>
131
+ </div>
132
+ ),
133
+ },
134
+ };
135
+
136
+ /**
137
+ * Banner with custom width
138
+ */
139
+ export const WithCustomWidth: Story = {
140
+ args: {
141
+ width: '600px',
142
+ children: (
143
+ <div>
144
+ <h2 style={{ margin: 0, marginBottom: '8px', color: 'white' }}>
145
+ Custom Width Banner
146
+ </h2>
147
+ <p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.8)' }}>
148
+ This banner has a fixed width of 600px instead of 100%.
149
+ </p>
150
+ </div>
151
+ ),
152
+ },
153
+ };
154
+
155
+ /**
156
+ * Banner with minimal content
157
+ */
158
+ export const WithMinimalContent: Story = {
159
+ args: {
160
+ children: (
161
+ <p style={{ margin: 0, color: 'white', textAlign: 'center' }}>
162
+ Simple announcement message
163
+ </p>
164
+ ),
165
+ },
166
+ };
167
+
168
+ /**
169
+ * Banner with rich content including buttons and links
170
+ */
171
+ export const WithRichContent: Story = {
172
+ args: {
173
+ children: (
174
+ <div>
175
+ <h1 style={{ margin: 0, marginBottom: '12px', color: 'white', fontSize: '2rem' }}>
176
+ 🚀 New Feature Launch
177
+ </h1>
178
+ <p style={{ margin: 0, marginBottom: '16px', color: 'rgba(255, 255, 255, 0.9)' }}>
179
+ We&apos;ve just released our most powerful web scraping tools yet.
180
+ Experience faster, more reliable data extraction with our enhanced platform.
181
+ </p>
182
+ <div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>
183
+ <button
184
+ type="button"
185
+ style={{
186
+ padding: '8px 16px',
187
+ backgroundColor: 'white',
188
+ color: '#333',
189
+ border: 'none',
190
+ borderRadius: '4px',
191
+ fontWeight: 'bold',
192
+ cursor: 'pointer',
193
+ }}
194
+ >
195
+ Get Started
196
+ </button>
197
+ <a
198
+ href="#"
199
+ style={{
200
+ color: 'white',
201
+ textDecoration: 'underline',
202
+ }}
203
+ >
204
+ Learn more
205
+ </a>
206
+ </div>
207
+ </div>
208
+ ),
209
+ },
210
+ };
211
+
212
+ /**
213
+ * Banner with warning/alert styling
214
+ */
215
+ export const WarningBanner: Story = {
216
+ args: {
217
+ background: '#FF9800',
218
+ useGradientBackground: false,
219
+ children: (
220
+ <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
221
+ <span style={{ fontSize: '1.5rem' }}>⚠️</span>
222
+ <div>
223
+ <h3 style={{ margin: 0, marginBottom: '4px', color: 'white' }}>
224
+ Maintenance Notice
225
+ </h3>
226
+ <p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.9)' }}>
227
+ Scheduled maintenance will occur on Sunday, 12:00-14:00 UTC.
228
+ </p>
229
+ </div>
230
+ </div>
231
+ ),
232
+ },
233
+ };
234
+
235
+ /**
236
+ * Banner with success/positive messaging
237
+ */
238
+ export const SuccessBanner: Story = {
239
+ args: {
240
+ background: '#4CAF50',
241
+ useGradientBackground: false,
242
+ children: (
243
+ <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
244
+ <span style={{ fontSize: '1.5rem' }}>✅</span>
245
+ <div>
246
+ <h3 style={{ margin: 0, marginBottom: '4px', color: 'white' }}>
247
+ Migration Complete
248
+ </h3>
249
+ <p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.9)' }}>
250
+ Your account has been successfully migrated to our new platform.
251
+ </p>
252
+ </div>
253
+ </div>
254
+ ),
255
+ },
256
+ };