@shohojdhara/atomix 0.3.14 → 0.3.15
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/CHANGELOG.md +20 -0
- package/build-tools/EXAMPLES.md +372 -0
- package/build-tools/README.md +242 -0
- package/build-tools/__tests__/error-handler.test.js +230 -0
- package/build-tools/__tests__/index.test.js +141 -0
- package/build-tools/__tests__/rollup-plugin.test.js +194 -0
- package/build-tools/__tests__/utils.test.js +161 -0
- package/build-tools/__tests__/vite-plugin.test.js +129 -0
- package/build-tools/__tests__/webpack-loader.test.js +190 -0
- package/build-tools/error-handler.js +308 -0
- package/build-tools/index.d.ts +43 -0
- package/build-tools/index.js +88 -0
- package/build-tools/package.json +67 -0
- package/build-tools/rollup-plugin.js +236 -0
- package/build-tools/types.d.ts +163 -0
- package/build-tools/utils.js +203 -0
- package/build-tools/vite-plugin.js +161 -0
- package/build-tools/webpack-loader.js +123 -0
- package/dist/atomix.css +203 -90
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +3 -3
- package/dist/atomix.min.css.map +1 -1
- package/dist/build-tools/EXAMPLES.md +372 -0
- package/dist/build-tools/README.md +242 -0
- package/dist/build-tools/__tests__/error-handler.test.js +230 -0
- package/dist/build-tools/__tests__/index.test.js +141 -0
- package/dist/build-tools/__tests__/rollup-plugin.test.js +194 -0
- package/dist/build-tools/__tests__/utils.test.js +161 -0
- package/dist/build-tools/__tests__/vite-plugin.test.js +129 -0
- package/dist/build-tools/__tests__/webpack-loader.test.js +190 -0
- package/dist/build-tools/error-handler.js +308 -0
- package/dist/build-tools/index.d.ts +43 -0
- package/dist/build-tools/index.js +88 -0
- package/dist/build-tools/package.json +67 -0
- package/dist/build-tools/rollup-plugin.js +236 -0
- package/dist/build-tools/types.d.ts +163 -0
- package/dist/build-tools/utils.js +203 -0
- package/dist/build-tools/vite-plugin.js +161 -0
- package/dist/build-tools/webpack-loader.js +123 -0
- package/dist/charts.d.ts +1 -1
- package/dist/charts.js +86 -57
- package/dist/charts.js.map +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +136 -112
- package/dist/core.js.map +1 -1
- package/dist/forms.d.ts +2 -5
- package/dist/forms.js +140 -128
- package/dist/forms.js.map +1 -1
- package/dist/heavy.d.ts +1 -1
- package/dist/heavy.js +136 -112
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +9 -61
- package/dist/index.esm.js +237 -286
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +250 -299
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +23 -8
- package/scripts/atomix-cli.js +170 -73
- package/scripts/cli/__tests__/README.md +81 -0
- package/scripts/cli/__tests__/basic.test.js +115 -0
- package/scripts/cli/__tests__/component-generator.test.js +332 -0
- package/scripts/cli/__tests__/integration.test.js +327 -0
- package/scripts/cli/__tests__/test-setup.js +133 -0
- package/scripts/cli/__tests__/token-manager.test.js +251 -0
- package/scripts/cli/__tests__/utils.test.js +161 -0
- package/scripts/cli/component-generator.js +253 -299
- package/scripts/cli/dependency-checker.js +355 -0
- package/scripts/cli/interactive-init.js +46 -5
- package/scripts/cli/template-manager.js +0 -2
- package/scripts/cli/templates/common-templates.js +636 -0
- package/scripts/cli/templates/composable-templates.js +148 -126
- package/scripts/cli/templates/index.js +23 -16
- package/scripts/cli/templates/project-templates.js +151 -23
- package/scripts/cli/templates/react-templates.js +280 -210
- package/scripts/cli/templates/scss-templates.js +90 -91
- package/scripts/cli/templates/testing-templates.js +206 -27
- package/scripts/cli/templates/testing-utils.js +278 -0
- package/scripts/cli/templates/types-templates.js +70 -56
- package/scripts/cli/theme-bridge.js +8 -2
- package/scripts/cli/token-manager.js +318 -206
- package/scripts/cli/utils.js +0 -1
- package/src/components/Accordion/Accordion.stories.tsx +369 -870
- package/src/components/AtomixGlass/AtomixGlass.tsx +80 -39
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +103 -81
- package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +8 -7
- package/src/components/AtomixGlass/glass-utils.ts +2 -2
- package/src/components/AtomixGlass/shader-utils.ts +5 -0
- package/src/components/AtomixGlass/stories/Customization.stories.tsx +131 -0
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +2957 -2853
- package/src/components/AtomixGlass/stories/Modes.stories.tsx +1 -1
- package/src/components/AtomixGlass/stories/Overview.stories.tsx +348 -0
- package/src/components/AtomixGlass/stories/Performance.stories.tsx +103 -0
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +50 -35
- package/src/components/AtomixGlass/stories/{ShaderVariants.stories.tsx → Shaders.stories.tsx} +1 -1
- package/src/components/AtomixGlass/stories/shared-components.tsx +90 -190
- package/src/components/Avatar/Avatar.stories.tsx +213 -1
- package/src/components/Badge/Badge.stories.tsx +121 -362
- package/src/components/Block/Block.stories.tsx +21 -12
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +141 -23
- package/src/components/Button/Button.stories.tsx +463 -1126
- package/src/components/Button/Button.test.tsx +107 -0
- package/src/components/Button/Button.tsx +46 -50
- package/src/components/Button/ButtonGroup.stories.tsx +373 -217
- package/src/components/Callout/Callout.stories.tsx +289 -634
- package/src/components/Card/Card.stories.tsx +248 -68
- package/src/components/Chart/Chart.stories.tsx +150 -8
- package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +151 -69
- package/src/components/Countdown/Countdown.stories.tsx +115 -8
- package/src/components/DataTable/DataTable.stories.tsx +346 -146
- package/src/components/DatePicker/DatePicker.stories.tsx +325 -1066
- package/src/components/Dropdown/Dropdown.stories.tsx +153 -33
- package/src/components/EdgePanel/EdgePanel.stories.tsx +230 -21
- package/src/components/Footer/Footer.stories.tsx +392 -328
- package/src/components/Form/Checkbox.stories.tsx +140 -6
- package/src/components/Form/Checkbox.test.tsx +63 -0
- package/src/components/Form/Checkbox.tsx +87 -51
- package/src/components/Form/Form.stories.tsx +119 -20
- package/src/components/Form/FormGroup.stories.tsx +127 -4
- package/src/components/Form/Radio.stories.tsx +140 -5
- package/src/components/Form/Select.stories.tsx +140 -8
- package/src/components/Form/Textarea.stories.tsx +149 -6
- package/src/components/Hero/Hero.stories.tsx +333 -32
- package/src/components/List/List.stories.tsx +141 -3
- package/src/components/Modal/Modal.stories.tsx +181 -42
- package/src/components/Popover/Popover.stories.tsx +448 -98
- package/src/components/Progress/Progress.stories.tsx +167 -5
- package/src/components/River/River.stories.tsx +1 -1
- package/src/components/SectionIntro/SectionIntro.stories.tsx +240 -48
- package/src/components/Spinner/Spinner.stories.tsx +102 -8
- package/src/components/Steps/Steps.stories.tsx +172 -43
- package/src/components/Tabs/Tabs.stories.tsx +136 -10
- package/src/components/Testimonial/Testimonial.stories.tsx +120 -3
- package/src/components/Todo/Todo.stories.tsx +198 -9
- package/src/components/Toggle/Toggle.stories.tsx +126 -39
- package/src/components/Tooltip/Tooltip.stories.tsx +194 -104
- package/src/components/Upload/Upload.stories.tsx +113 -24
- package/src/lib/README.md +2 -2
- package/src/lib/__tests__/theme-tools.test.ts +193 -0
- package/src/lib/composables/index.ts +2 -2
- package/src/lib/composables/useAtomixGlass.ts +28 -56
- package/src/lib/composables/useChartExport.ts +2 -7
- package/src/lib/composables/useDataTable.ts +46 -29
- package/src/lib/constants/components.ts +9 -32
- package/src/lib/theme/devtools/CLI.ts +1 -1
- package/src/lib/types/components.ts +1 -1
- package/src/lib/utils/__tests__/csv.test.ts +45 -0
- package/src/lib/utils/csv.ts +17 -0
- package/src/lib/utils/dataTableExport.ts +1 -10
- package/src/styles/01-settings/_index.scss +2 -1
- package/src/styles/01-settings/_settings.accordion.scss +28 -7
- package/src/styles/01-settings/_settings.colors.scss +11 -11
- package/src/styles/01-settings/_settings.typography.scss +5 -5
- package/src/styles/02-tools/_tools.utility-api.scss +14 -0
- package/src/styles/06-components/_components.accordion.scss +56 -14
- package/src/styles/06-components/_components.checkbox.scss +23 -17
- package/src/styles/99-utilities/_index.scss +2 -0
- package/src/styles/99-utilities/_utilities.scss +3 -1
- package/src/styles/99-utilities/_utilities.text-gradient.scss +45 -0
- package/themes/dark-complementary/README.md +98 -0
- package/themes/dark-complementary/index.scss +158 -0
- package/themes/default-light/README.md +81 -0
- package/themes/default-light/index.scss +154 -0
- package/themes/high-contrast/README.md +105 -0
- package/themes/high-contrast/index.scss +172 -0
- package/themes/test-theme/README.md +38 -0
- package/themes/test-theme/index.scss +47 -0
- package/scripts/cli/templates-original-backup.js +0 -1655
- package/scripts/cli/templates_backup.js +0 -684
- package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +0 -1438
- package/src/lib/composables/useButton.ts +0 -93
- package/src/lib/composables/useCheckbox.ts +0 -70
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { fn } from '@storybook/test';
|
|
3
|
+
import { useState, useCallback } from 'react';
|
|
2
4
|
import { Button } from './Button';
|
|
3
|
-
import { SIZES } from '../../lib/constants/components';
|
|
5
|
+
import { SIZES, THEME_COLORS } from '../../lib/constants/components';
|
|
6
|
+
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// TYPE DEFINITIONS
|
|
9
|
+
// ============================================================================
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Type helper for story props without children requirement
|
|
13
|
+
*/
|
|
14
|
+
type ButtonStoryProps = Omit<React.ComponentProps<typeof Button>, 'children'> & {
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// ============================================================================
|
|
19
|
+
// SHARED UTILITIES & CONSTANTS
|
|
20
|
+
// ============================================================================
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Reusable decorators for common story patterns
|
|
24
|
+
*/
|
|
25
|
+
const withBackground = (bgUrl: string) => (Story: any) => (
|
|
26
|
+
<div
|
|
27
|
+
className="u-bg-cover u-bg-center u-p-10 u-rounded-xl"
|
|
28
|
+
style={{
|
|
29
|
+
backgroundImage: `url(${bgUrl})`,
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
<Story />
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Sample data for stories
|
|
38
|
+
*/
|
|
39
|
+
const sampleData = {
|
|
40
|
+
basic: 'Example text',
|
|
41
|
+
longText: 'Lorem ipsum dolor sit amet...'.repeat(20),
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
// ============================================================================
|
|
46
|
+
// META CONFIGURATION
|
|
47
|
+
// ============================================================================
|
|
4
48
|
|
|
5
49
|
const meta = {
|
|
6
50
|
title: 'Components/Button',
|
|
@@ -9,8 +53,73 @@ const meta = {
|
|
|
9
53
|
layout: 'centered',
|
|
10
54
|
docs: {
|
|
11
55
|
description: {
|
|
12
|
-
component:
|
|
13
|
-
|
|
56
|
+
component: `# Button Component
|
|
57
|
+
|
|
58
|
+
## Overview
|
|
59
|
+
The Button component is a versatile interactive element used to trigger actions throughout the application. It supports multiple variants, sizes, states, and can include icons. Buttons are essential for user interactions and provide clear visual feedback for clickable actions.
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
- Multiple color variants (primary, secondary, success, etc.)
|
|
63
|
+
- Different sizes (sm, md, lg)
|
|
64
|
+
- Support for icons and icon-only buttons
|
|
65
|
+
- Loading states with optional loading text
|
|
66
|
+
- Disabled, active, and selected states
|
|
67
|
+
- Full-width and block-level options
|
|
68
|
+
- Glass morphism effect support
|
|
69
|
+
- Rounded (pill-shaped) style option
|
|
70
|
+
|
|
71
|
+
## Accessibility
|
|
72
|
+
- Keyboard support: Space and Enter keys activate the button
|
|
73
|
+
- Screen reader: Proper labeling and role attributes
|
|
74
|
+
- ARIA support: Correct roles and states for interactive elements
|
|
75
|
+
- Focus management: Visual focus indicator for keyboard navigation
|
|
76
|
+
|
|
77
|
+
## Usage Examples
|
|
78
|
+
### Basic Usage
|
|
79
|
+
\`\`\`tsx
|
|
80
|
+
<Button label="Click Me" variant="primary" />
|
|
81
|
+
\`\`\`
|
|
82
|
+
|
|
83
|
+
### With Icon
|
|
84
|
+
\`\`\`tsx
|
|
85
|
+
<Button label="Add Item" variant="primary" icon={<PlusIcon />} />
|
|
86
|
+
\`\`\`
|
|
87
|
+
|
|
88
|
+
### Loading State
|
|
89
|
+
\`\`\`tsx
|
|
90
|
+
<Button label="Saving..." variant="primary" loading />
|
|
91
|
+
\`\`\`
|
|
92
|
+
|
|
93
|
+
## API Reference
|
|
94
|
+
| Prop | Type | Default | Description |
|
|
95
|
+
|------|------|---------|-------------|
|
|
96
|
+
| variant | string | 'primary' | Visual style variant |
|
|
97
|
+
| size | string | 'md' | Size of the button (sm, md, lg) |
|
|
98
|
+
| disabled | boolean | false | Disables button interaction |
|
|
99
|
+
| icon | ReactNode | - | Icon element to display in the button |
|
|
100
|
+
| iconOnly | boolean | false | Renders only the icon without text |
|
|
101
|
+
| rounded | boolean | false | Makes the button fully rounded (pill-shaped) |
|
|
102
|
+
| glass | boolean or GlassConfig | false | Enables glass morphism effect |
|
|
103
|
+
| loading | boolean | false | Shows loading spinner and disables interaction |
|
|
104
|
+
| loadingText | string | - | Custom text to display during loading |
|
|
105
|
+
| fullWidth | boolean | false | Makes button take full container width |
|
|
106
|
+
| block | boolean | false | Makes button a block-level element |
|
|
107
|
+
| active | boolean | false | Applies active state styling |
|
|
108
|
+
| selected | boolean | false | Applies selected state styling |
|
|
109
|
+
| iconPosition | 'start' or 'end' | 'start' | Position of the icon relative to text |
|
|
110
|
+
|
|
111
|
+
## Design Tokens
|
|
112
|
+
- \`--atomix-btn-padding\`: Padding around button content
|
|
113
|
+
- \`--atomix-btn-font-size\`: Font size of button text
|
|
114
|
+
- \`--atomix-btn-border-radius\`: Border radius of button
|
|
115
|
+
- \`--atomix-btn-transition\`: Transition effect for button states
|
|
116
|
+
- \`--atomix-btn-bg\`: Background color of button
|
|
117
|
+
- \`--atomix-btn-color\`: Text color of button
|
|
118
|
+
- \`--atomix-btn-shadow\`: Shadow of button
|
|
119
|
+
|
|
120
|
+
## Notes
|
|
121
|
+
Buttons are essential for user interactions and should be used consistently throughout the application to maintain a cohesive experience. Consider the context and purpose when choosing the appropriate variant and size.
|
|
122
|
+
`,
|
|
14
123
|
},
|
|
15
124
|
},
|
|
16
125
|
},
|
|
@@ -38,62 +147,121 @@ const meta = {
|
|
|
38
147
|
'link',
|
|
39
148
|
],
|
|
40
149
|
description: 'The visual style of the button',
|
|
41
|
-
|
|
150
|
+
table: {
|
|
151
|
+
type: { summary: 'string' },
|
|
152
|
+
defaultValue: { summary: 'primary' },
|
|
153
|
+
},
|
|
42
154
|
},
|
|
43
155
|
size: {
|
|
44
156
|
control: { type: 'select' },
|
|
45
157
|
options: SIZES,
|
|
46
158
|
description: 'The size of the button',
|
|
47
|
-
|
|
159
|
+
table: {
|
|
160
|
+
type: { summary: 'string' },
|
|
161
|
+
defaultValue: { summary: 'md' },
|
|
162
|
+
},
|
|
48
163
|
},
|
|
49
164
|
disabled: {
|
|
50
165
|
control: 'boolean',
|
|
51
166
|
description: 'Whether the button is disabled',
|
|
167
|
+
table: {
|
|
168
|
+
type: { summary: 'boolean' },
|
|
169
|
+
defaultValue: { summary: 'false' },
|
|
170
|
+
},
|
|
52
171
|
},
|
|
53
172
|
icon: {
|
|
54
|
-
control: '
|
|
173
|
+
control: 'object',
|
|
55
174
|
description: 'Optional icon element to display in the button',
|
|
175
|
+
table: {
|
|
176
|
+
type: { summary: 'ReactNode' },
|
|
177
|
+
},
|
|
56
178
|
},
|
|
57
179
|
iconOnly: {
|
|
58
180
|
control: 'boolean',
|
|
59
181
|
description: 'Whether the button should only display an icon',
|
|
182
|
+
table: {
|
|
183
|
+
type: { summary: 'boolean' },
|
|
184
|
+
defaultValue: { summary: 'false' },
|
|
185
|
+
},
|
|
60
186
|
},
|
|
61
187
|
rounded: {
|
|
62
188
|
control: 'boolean',
|
|
63
189
|
description: 'Whether the button should have a fully rounded (pill) shape',
|
|
190
|
+
table: {
|
|
191
|
+
type: { summary: 'boolean' },
|
|
192
|
+
defaultValue: { summary: 'false' },
|
|
193
|
+
},
|
|
64
194
|
},
|
|
65
195
|
glass: {
|
|
66
|
-
control:
|
|
196
|
+
control: 'object',
|
|
67
197
|
description: 'Apply glass morphism effect to the button',
|
|
198
|
+
table: {
|
|
199
|
+
type: { summary: 'boolean | GlassConfig' },
|
|
200
|
+
defaultValue: { summary: 'false' },
|
|
201
|
+
},
|
|
68
202
|
},
|
|
69
203
|
loading: {
|
|
70
204
|
control: 'boolean',
|
|
71
205
|
description: 'Whether the button is in a loading state',
|
|
206
|
+
table: {
|
|
207
|
+
type: { summary: 'boolean' },
|
|
208
|
+
defaultValue: { summary: 'false' },
|
|
209
|
+
},
|
|
72
210
|
},
|
|
73
211
|
loadingText: {
|
|
74
212
|
control: 'text',
|
|
75
213
|
description: 'Custom text to display during loading',
|
|
214
|
+
table: {
|
|
215
|
+
type: { summary: 'string' },
|
|
216
|
+
},
|
|
76
217
|
},
|
|
77
218
|
fullWidth: {
|
|
78
219
|
control: 'boolean',
|
|
79
220
|
description: 'Whether the button should take full width',
|
|
221
|
+
table: {
|
|
222
|
+
type: { summary: 'boolean' },
|
|
223
|
+
defaultValue: { summary: 'false' },
|
|
224
|
+
},
|
|
80
225
|
},
|
|
81
226
|
block: {
|
|
82
227
|
control: 'boolean',
|
|
83
228
|
description: 'Whether the button should be block-level',
|
|
229
|
+
table: {
|
|
230
|
+
type: { summary: 'boolean' },
|
|
231
|
+
defaultValue: { summary: 'false' },
|
|
232
|
+
},
|
|
84
233
|
},
|
|
85
234
|
active: {
|
|
86
235
|
control: 'boolean',
|
|
87
236
|
description: 'Whether the button is in active state',
|
|
237
|
+
table: {
|
|
238
|
+
type: { summary: 'boolean' },
|
|
239
|
+
defaultValue: { summary: 'false' },
|
|
240
|
+
},
|
|
88
241
|
},
|
|
89
242
|
selected: {
|
|
90
243
|
control: 'boolean',
|
|
91
244
|
description: 'Whether the button is selected',
|
|
245
|
+
table: {
|
|
246
|
+
type: { summary: 'boolean' },
|
|
247
|
+
defaultValue: { summary: 'false' },
|
|
248
|
+
},
|
|
92
249
|
},
|
|
93
250
|
iconPosition: {
|
|
94
251
|
control: { type: 'select' },
|
|
95
252
|
options: ['start', 'end'],
|
|
96
253
|
description: 'Position of the icon',
|
|
254
|
+
table: {
|
|
255
|
+
type: { summary: '"start" | "end"' },
|
|
256
|
+
defaultValue: { summary: 'start' },
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
onClick: {
|
|
260
|
+
action: 'clicked',
|
|
261
|
+
description: 'Click event handler',
|
|
262
|
+
table: {
|
|
263
|
+
type: { summary: '(event: React.MouseEvent) => void' },
|
|
264
|
+
},
|
|
97
265
|
},
|
|
98
266
|
},
|
|
99
267
|
} satisfies Meta<typeof Button>;
|
|
@@ -118,152 +286,157 @@ const Icon = () => (
|
|
|
118
286
|
</svg>
|
|
119
287
|
);
|
|
120
288
|
|
|
289
|
+
// ============================================================================
|
|
290
|
+
// BASIC USAGE STORIES
|
|
291
|
+
// ============================================================================
|
|
292
|
+
|
|
121
293
|
/**
|
|
122
|
-
*
|
|
294
|
+
* Basic button usage with minimal props
|
|
123
295
|
*/
|
|
124
|
-
export const
|
|
296
|
+
export const BasicUsage: Story = {
|
|
125
297
|
args: {
|
|
126
|
-
label: '
|
|
298
|
+
label: 'Basic Button',
|
|
127
299
|
variant: 'primary',
|
|
128
300
|
size: 'md',
|
|
129
301
|
},
|
|
130
302
|
};
|
|
131
303
|
|
|
132
304
|
/**
|
|
133
|
-
*
|
|
305
|
+
* Button with all available props configured
|
|
134
306
|
*/
|
|
135
|
-
export const
|
|
307
|
+
export const WithAllProps: Story = {
|
|
136
308
|
args: {
|
|
137
|
-
label: '
|
|
138
|
-
variant: '
|
|
309
|
+
label: 'Complete Button',
|
|
310
|
+
variant: 'primary',
|
|
139
311
|
size: 'md',
|
|
312
|
+
icon: <Icon />,
|
|
313
|
+
iconPosition: 'start',
|
|
314
|
+
rounded: true,
|
|
315
|
+
loading: false,
|
|
316
|
+
disabled: false,
|
|
140
317
|
},
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
args: {
|
|
148
|
-
label: 'Success Button',
|
|
149
|
-
variant: 'success',
|
|
150
|
-
size: 'md',
|
|
318
|
+
parameters: {
|
|
319
|
+
docs: {
|
|
320
|
+
description: {
|
|
321
|
+
story: 'Demonstrates Button with all props configured.',
|
|
322
|
+
},
|
|
323
|
+
},
|
|
151
324
|
},
|
|
152
325
|
};
|
|
153
326
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
export const Info: Story = {
|
|
158
|
-
args: {
|
|
159
|
-
label: 'Info Button',
|
|
160
|
-
variant: 'info',
|
|
161
|
-
size: 'md',
|
|
162
|
-
},
|
|
163
|
-
};
|
|
327
|
+
// ============================================================================
|
|
328
|
+
// VARIANTS & STATES STORIES
|
|
329
|
+
// ============================================================================
|
|
164
330
|
|
|
165
331
|
/**
|
|
166
|
-
*
|
|
332
|
+
* Shows all available button color variants
|
|
167
333
|
*/
|
|
168
|
-
export const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Error button variant - indicates destructive or error actions.
|
|
178
|
-
*/
|
|
179
|
-
export const Error: Story = {
|
|
180
|
-
args: {
|
|
181
|
-
label: 'Error Button',
|
|
182
|
-
variant: 'error',
|
|
183
|
-
size: 'md',
|
|
184
|
-
},
|
|
334
|
+
export const AllVariants: Story = {
|
|
335
|
+
render: () => (
|
|
336
|
+
<div className="u-flex u-flex-wrap u-gap-2">
|
|
337
|
+
{THEME_COLORS.map(color => (
|
|
338
|
+
<Button key={color} label={color} variant={color as any} />
|
|
339
|
+
))}
|
|
340
|
+
</div>
|
|
341
|
+
),
|
|
185
342
|
};
|
|
186
343
|
|
|
187
344
|
/**
|
|
188
|
-
*
|
|
345
|
+
* Shows all available outline button variants
|
|
189
346
|
*/
|
|
190
|
-
export const
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
347
|
+
export const AllOutlineVariants: Story = {
|
|
348
|
+
render: () => (
|
|
349
|
+
<div className="u-flex u-flex-wrap u-gap-2">
|
|
350
|
+
<Button label="Outline Primary" variant="outline-primary" />
|
|
351
|
+
<Button label="Outline Secondary" variant="outline-secondary" />
|
|
352
|
+
<Button label="Outline Success" variant="outline-success" />
|
|
353
|
+
<Button label="Outline Info" variant="outline-info" />
|
|
354
|
+
<Button label="Outline Warning" variant="outline-warning" />
|
|
355
|
+
<Button label="Outline Danger" variant="outline-danger" />
|
|
356
|
+
<Button label="Outline Light" variant="outline-light" />
|
|
357
|
+
<Button label="Outline Dark" variant="outline-dark" />
|
|
358
|
+
</div>
|
|
359
|
+
),
|
|
196
360
|
};
|
|
197
361
|
|
|
198
362
|
/**
|
|
199
|
-
*
|
|
363
|
+
* Shows all available button sizes
|
|
200
364
|
*/
|
|
201
|
-
export const
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
365
|
+
export const AllSizes: Story = {
|
|
366
|
+
render: () => (
|
|
367
|
+
<div className="u-flex u-items-center u-gap-2">
|
|
368
|
+
<Button label="Small" variant="primary" size="sm" />
|
|
369
|
+
<Button label="Medium" variant="primary" size="md" />
|
|
370
|
+
<Button label="Large" variant="primary" size="lg" />
|
|
371
|
+
</div>
|
|
372
|
+
),
|
|
207
373
|
};
|
|
208
374
|
|
|
209
375
|
/**
|
|
210
|
-
*
|
|
376
|
+
* Shows default state of the button (normal, interactive state)
|
|
211
377
|
*/
|
|
212
|
-
export const
|
|
378
|
+
export const DefaultState: Story = {
|
|
213
379
|
args: {
|
|
214
|
-
label: '
|
|
215
|
-
variant: '
|
|
380
|
+
label: 'Default Button',
|
|
381
|
+
variant: 'primary',
|
|
216
382
|
size: 'md',
|
|
217
383
|
},
|
|
218
384
|
};
|
|
219
385
|
|
|
220
386
|
/**
|
|
221
|
-
*
|
|
387
|
+
* Shows button in loading state with spinner
|
|
222
388
|
*/
|
|
223
|
-
export const
|
|
389
|
+
export const LoadingState: Story = {
|
|
224
390
|
args: {
|
|
225
|
-
label: '
|
|
391
|
+
label: 'Loading...',
|
|
226
392
|
variant: 'primary',
|
|
227
|
-
size: '
|
|
393
|
+
size: 'md',
|
|
394
|
+
loading: true,
|
|
228
395
|
},
|
|
229
396
|
};
|
|
230
397
|
|
|
231
398
|
/**
|
|
232
|
-
*
|
|
399
|
+
* Shows button in disabled state (non-interactive)
|
|
233
400
|
*/
|
|
234
|
-
export const
|
|
401
|
+
export const DisabledState: Story = {
|
|
235
402
|
args: {
|
|
236
|
-
label: '
|
|
403
|
+
label: 'Disabled Button',
|
|
237
404
|
variant: 'primary',
|
|
238
405
|
size: 'md',
|
|
406
|
+
disabled: true,
|
|
239
407
|
},
|
|
240
408
|
};
|
|
241
409
|
|
|
242
410
|
/**
|
|
243
|
-
*
|
|
411
|
+
* Shows button in active state
|
|
244
412
|
*/
|
|
245
|
-
export const
|
|
413
|
+
export const ActiveState: Story = {
|
|
246
414
|
args: {
|
|
247
|
-
label: '
|
|
415
|
+
label: 'Active Button',
|
|
248
416
|
variant: 'primary',
|
|
249
|
-
size: '
|
|
417
|
+
size: 'md',
|
|
418
|
+
active: true,
|
|
250
419
|
},
|
|
251
420
|
};
|
|
252
421
|
|
|
253
422
|
/**
|
|
254
|
-
*
|
|
423
|
+
* Shows button in selected state
|
|
255
424
|
*/
|
|
256
|
-
export const
|
|
425
|
+
export const SelectedState: Story = {
|
|
257
426
|
args: {
|
|
258
|
-
label: '
|
|
427
|
+
label: 'Selected Button',
|
|
259
428
|
variant: 'primary',
|
|
260
429
|
size: 'md',
|
|
261
|
-
|
|
430
|
+
selected: true,
|
|
262
431
|
},
|
|
263
432
|
};
|
|
264
433
|
|
|
434
|
+
// ============================================================================
|
|
435
|
+
// WITH FEATURES STORIES
|
|
436
|
+
// ============================================================================
|
|
437
|
+
|
|
265
438
|
/**
|
|
266
|
-
*
|
|
439
|
+
* Shows button with icon support
|
|
267
440
|
*/
|
|
268
441
|
export const WithIcon: Story = {
|
|
269
442
|
args: {
|
|
@@ -275,11 +448,23 @@ export const WithIcon: Story = {
|
|
|
275
448
|
};
|
|
276
449
|
|
|
277
450
|
/**
|
|
278
|
-
*
|
|
451
|
+
* Shows icon positioned at start and end of button
|
|
452
|
+
*/
|
|
453
|
+
export const WithIconPosition: Story = {
|
|
454
|
+
render: () => (
|
|
455
|
+
<div className="u-flex u-gap-2">
|
|
456
|
+
<Button label="Icon Start" variant="primary" icon={<Icon />} iconPosition="start" />
|
|
457
|
+
<Button label="Icon End" variant="secondary" icon={<Icon />} iconPosition="end" />
|
|
458
|
+
</div>
|
|
459
|
+
),
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Shows button with icon only (no text)
|
|
279
464
|
*/
|
|
280
|
-
export const
|
|
465
|
+
export const WithIconOnly: Story = {
|
|
281
466
|
args: {
|
|
282
|
-
label: '
|
|
467
|
+
label: 'Icon Only Button',
|
|
283
468
|
variant: 'primary',
|
|
284
469
|
size: 'md',
|
|
285
470
|
icon: <Icon />,
|
|
@@ -288,1169 +473,321 @@ export const IconOnly: Story = {
|
|
|
288
473
|
};
|
|
289
474
|
|
|
290
475
|
/**
|
|
291
|
-
*
|
|
476
|
+
* Shows complex nested content in button
|
|
292
477
|
*/
|
|
293
|
-
export const
|
|
294
|
-
args: {
|
|
295
|
-
label: 'Button',
|
|
296
|
-
variant: 'success',
|
|
297
|
-
},
|
|
298
|
-
parameters: {
|
|
299
|
-
docs: {
|
|
300
|
-
description: {
|
|
301
|
-
story: 'Displays all available button color variants side by side for easy comparison.',
|
|
302
|
-
},
|
|
303
|
-
},
|
|
304
|
-
},
|
|
478
|
+
export const WithChildren: Story = {
|
|
305
479
|
render: () => (
|
|
306
|
-
<
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
<Button label="Success" variant="success" />
|
|
310
|
-
<Button label="Info" variant="info" />
|
|
311
|
-
<Button label="Warning" variant="warning" />
|
|
312
|
-
<Button label="Error" variant="error" />
|
|
313
|
-
<Button label="Light" variant="light" />
|
|
314
|
-
<Button label="Dark" variant="dark" />
|
|
315
|
-
</div>
|
|
480
|
+
<Button variant="primary">
|
|
481
|
+
Button with <strong>Complex Content</strong>
|
|
482
|
+
</Button>
|
|
316
483
|
),
|
|
317
484
|
};
|
|
318
485
|
|
|
319
486
|
/**
|
|
320
|
-
*
|
|
487
|
+
* Shows button with helper text or description
|
|
321
488
|
*/
|
|
322
|
-
export const
|
|
323
|
-
args: {
|
|
324
|
-
label: 'Button',
|
|
325
|
-
variant: 'outline-primary',
|
|
326
|
-
},
|
|
327
|
-
parameters: {
|
|
328
|
-
docs: {
|
|
329
|
-
description: {
|
|
330
|
-
story: 'Displays all available outline button variants with transparent backgrounds and colored borders.',
|
|
331
|
-
},
|
|
332
|
-
},
|
|
333
|
-
},
|
|
489
|
+
export const WithHelperText: Story = {
|
|
334
490
|
render: () => (
|
|
335
|
-
<div className="u-flex u-flex-
|
|
336
|
-
<Button label="
|
|
337
|
-
<
|
|
338
|
-
<Button label="Outline Success" variant="outline-success" />
|
|
339
|
-
<Button label="Outline Info" variant="outline-info" />
|
|
340
|
-
<Button label="Outline Warning" variant="outline-warning" />
|
|
341
|
-
<Button label="Outline Error" variant="outline-error" />
|
|
342
|
-
<Button label="Outline Light" variant="outline-light" />
|
|
343
|
-
<Button label="Outline Dark" variant="outline-dark" />
|
|
491
|
+
<div className="u-flex u-flex-column u-gap-2">
|
|
492
|
+
<Button label="Button with Helper" variant="primary" />
|
|
493
|
+
<p className="u-m-0 u-text-sm">This is a helper text for the button</p>
|
|
344
494
|
</div>
|
|
345
495
|
),
|
|
346
496
|
};
|
|
347
497
|
|
|
498
|
+
// ============================================================================
|
|
499
|
+
// ADVANCED CONFIGURATION STORIES
|
|
500
|
+
// ============================================================================
|
|
501
|
+
|
|
348
502
|
/**
|
|
349
|
-
*
|
|
503
|
+
* Shows button with custom inline styles
|
|
350
504
|
*/
|
|
351
|
-
export const
|
|
505
|
+
export const CustomStyling: Story = {
|
|
352
506
|
args: {
|
|
353
|
-
label: 'Button',
|
|
507
|
+
label: 'Custom Styled Button',
|
|
354
508
|
variant: 'primary',
|
|
509
|
+
size: 'md',
|
|
355
510
|
},
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
<Button label="Small" variant="primary" size="sm" />
|
|
366
|
-
<Button label="Medium" variant="primary" size="md" />
|
|
367
|
-
<Button label="Large" variant="primary" size="lg" />
|
|
368
|
-
</div>
|
|
511
|
+
render: (args) => (
|
|
512
|
+
<Button
|
|
513
|
+
{...args}
|
|
514
|
+
style={{
|
|
515
|
+
background: 'linear-gradient(45deg, #667eea, #764ba2)',
|
|
516
|
+
border: 'none',
|
|
517
|
+
boxShadow: '0 4px 15px rgba(0, 0, 0, 0.2)'
|
|
518
|
+
}}
|
|
519
|
+
/>
|
|
369
520
|
),
|
|
370
521
|
};
|
|
371
522
|
|
|
372
523
|
/**
|
|
373
|
-
*
|
|
524
|
+
* Shows button with custom CSS class
|
|
374
525
|
*/
|
|
375
|
-
export const
|
|
526
|
+
export const WithClassName: Story = {
|
|
376
527
|
args: {
|
|
377
|
-
label: '
|
|
528
|
+
label: 'Styled with Class',
|
|
378
529
|
variant: 'primary',
|
|
379
|
-
|
|
380
|
-
|
|
530
|
+
size: 'md',
|
|
531
|
+
className: 'custom-button-style',
|
|
381
532
|
},
|
|
382
|
-
render: () => (
|
|
383
|
-
<div className="u-flex u-flex-wrap u-gap-2">
|
|
384
|
-
<Button label="Add" variant="primary" icon={<Icon />} />
|
|
385
|
-
<Button label="Add" variant="secondary" icon={<Icon />} />
|
|
386
|
-
<Button label="Add" variant="success" icon={<Icon />} />
|
|
387
|
-
<Button label="Add" variant="primary" icon={<Icon />} iconOnly />
|
|
388
|
-
<Button label="Add" variant="secondary" icon={<Icon />} iconOnly />
|
|
389
|
-
<Button label="Add" variant="success" icon={<Icon />} iconOnly />
|
|
390
|
-
</div>
|
|
391
|
-
),
|
|
392
533
|
};
|
|
393
534
|
|
|
394
535
|
/**
|
|
395
|
-
*
|
|
536
|
+
* Shows button with additional HTML attributes
|
|
396
537
|
*/
|
|
397
|
-
export const
|
|
538
|
+
export const WithAttributes: Story = {
|
|
398
539
|
args: {
|
|
399
|
-
label: '
|
|
540
|
+
label: 'Button with Attributes',
|
|
400
541
|
variant: 'primary',
|
|
401
542
|
size: 'md',
|
|
402
|
-
|
|
543
|
+
id: 'my-button',
|
|
544
|
+
'aria-label': 'My custom button',
|
|
545
|
+
'data-testid': 'test-button',
|
|
403
546
|
},
|
|
404
547
|
};
|
|
405
548
|
|
|
549
|
+
// ============================================================================
|
|
550
|
+
// EDGE CASES STORIES
|
|
551
|
+
// ============================================================================
|
|
552
|
+
|
|
406
553
|
/**
|
|
407
|
-
*
|
|
554
|
+
* Shows how button handles very long text
|
|
408
555
|
*/
|
|
409
|
-
export const
|
|
556
|
+
export const LongText: Story = {
|
|
410
557
|
args: {
|
|
411
|
-
label: '
|
|
558
|
+
label: 'Very long text that might overflow or wrap to multiple lines in the button component',
|
|
412
559
|
variant: 'primary',
|
|
413
|
-
|
|
560
|
+
size: 'md',
|
|
414
561
|
},
|
|
415
|
-
render: () => (
|
|
416
|
-
<div className="u-flex u-flex-wrap u-gap-2">
|
|
417
|
-
<Button label="Primary" variant="primary" rounded />
|
|
418
|
-
<Button label="Secondary" variant="secondary" rounded />
|
|
419
|
-
<Button label="Success" variant="success" rounded />
|
|
420
|
-
<Button label="Info" variant="info" rounded />
|
|
421
|
-
<Button label="Warning" variant="warning" rounded />
|
|
422
|
-
<Button label="Error" variant="error" rounded />
|
|
423
|
-
<Button label="Light" variant="light" rounded />
|
|
424
|
-
<Button label="Dark" variant="dark" rounded />
|
|
425
|
-
</div>
|
|
426
|
-
),
|
|
427
562
|
};
|
|
428
563
|
|
|
429
564
|
/**
|
|
430
|
-
*
|
|
565
|
+
* Shows button behavior when icon is missing
|
|
431
566
|
*/
|
|
432
|
-
export const
|
|
567
|
+
export const NoIconFallback: Story = {
|
|
433
568
|
args: {
|
|
434
|
-
label: 'Button
|
|
569
|
+
label: 'Button without Icon',
|
|
435
570
|
variant: 'primary',
|
|
571
|
+
size: 'md',
|
|
572
|
+
// Intentionally not providing icon prop to show fallback
|
|
436
573
|
},
|
|
437
574
|
};
|
|
438
575
|
|
|
439
576
|
/**
|
|
440
|
-
*
|
|
577
|
+
* Shows button with async callback handling
|
|
441
578
|
*/
|
|
442
|
-
export const
|
|
443
|
-
render: () =>
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
579
|
+
export const WithAsyncAction: Story = {
|
|
580
|
+
render: () => {
|
|
581
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
582
|
+
|
|
583
|
+
const handleClick = useCallback(async () => {
|
|
584
|
+
setIsLoading(true);
|
|
585
|
+
// Simulate async operation
|
|
586
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
587
|
+
setIsLoading(false);
|
|
588
|
+
}, []);
|
|
589
|
+
|
|
590
|
+
return (
|
|
591
|
+
<Button
|
|
592
|
+
label="Async Action"
|
|
593
|
+
variant="primary"
|
|
594
|
+
loading={isLoading}
|
|
595
|
+
onClick={handleClick}
|
|
596
|
+
/>
|
|
597
|
+
);
|
|
598
|
+
},
|
|
448
599
|
};
|
|
449
600
|
|
|
601
|
+
// ============================================================================
|
|
602
|
+
// INTEGRATION EXAMPLES STORIES
|
|
603
|
+
// ============================================================================
|
|
604
|
+
|
|
450
605
|
/**
|
|
451
|
-
* Button
|
|
606
|
+
* Button used in a form context
|
|
452
607
|
*/
|
|
453
|
-
export const
|
|
608
|
+
export const InForm: Story = {
|
|
454
609
|
render: () => (
|
|
455
|
-
<
|
|
456
|
-
<
|
|
457
|
-
|
|
458
|
-
</
|
|
610
|
+
<form className="u-flex u-flex-column u-gap-2">
|
|
611
|
+
<input type="text" placeholder="Enter name" className="u-p-2 u-mb-2 u-border u-rounded" />
|
|
612
|
+
<Button label="Submit Form" variant="primary" />
|
|
613
|
+
</form>
|
|
459
614
|
),
|
|
460
615
|
};
|
|
461
616
|
|
|
462
617
|
/**
|
|
463
|
-
* Button
|
|
618
|
+
* Button used in a card component
|
|
464
619
|
*/
|
|
465
|
-
export const
|
|
466
|
-
args: {
|
|
467
|
-
label: 'Glass Button',
|
|
468
|
-
variant: 'primary',
|
|
469
|
-
glass: true,
|
|
470
|
-
},
|
|
471
|
-
decorators: [
|
|
472
|
-
Story => (
|
|
473
|
-
<div
|
|
474
|
-
style={{
|
|
475
|
-
background:
|
|
476
|
-
'url(https://cdn.pixabay.com/photo/2022/10/02/17/23/mushroom-7494046_1280.jpg)',
|
|
477
|
-
backgroundSize: 'cover',
|
|
478
|
-
backgroundPosition: 'center',
|
|
479
|
-
padding: '10rem 25rem',
|
|
480
|
-
borderRadius: '12px',
|
|
481
|
-
}}
|
|
482
|
-
>
|
|
483
|
-
<Story />
|
|
484
|
-
</div>
|
|
485
|
-
),
|
|
486
|
-
],
|
|
487
|
-
};
|
|
488
|
-
|
|
489
|
-
export const GlassEffectCustomized: Story = {
|
|
490
|
-
args: {
|
|
491
|
-
label: 'Customized Glass',
|
|
492
|
-
variant: 'secondary',
|
|
493
|
-
glass: {
|
|
494
|
-
displacementScale: 60,
|
|
495
|
-
blurAmount: 2,
|
|
496
|
-
saturation: 180,
|
|
497
|
-
aberrationIntensity: 2,
|
|
498
|
-
cornerRadius: 12,
|
|
499
|
-
overLight: false,
|
|
500
|
-
mode: 'polar' as const,
|
|
501
|
-
},
|
|
502
|
-
},
|
|
503
|
-
decorators: [
|
|
504
|
-
Story => (
|
|
505
|
-
<div
|
|
506
|
-
style={{
|
|
507
|
-
background:
|
|
508
|
-
'url(https://cdn.pixabay.com/photo/2022/10/02/17/23/mushroom-7494046_1280.jpg)',
|
|
509
|
-
backgroundSize: 'cover',
|
|
510
|
-
backgroundPosition: 'center',
|
|
511
|
-
padding: '25rem',
|
|
512
|
-
borderRadius: '12px',
|
|
513
|
-
}}
|
|
514
|
-
>
|
|
515
|
-
<Story />
|
|
516
|
-
</div>
|
|
517
|
-
),
|
|
518
|
-
],
|
|
519
|
-
};
|
|
520
|
-
|
|
521
|
-
export const GlassVariants: Story = {
|
|
522
|
-
args: {
|
|
523
|
-
label: 'Glass Button',
|
|
524
|
-
variant: 'primary',
|
|
525
|
-
glass: true,
|
|
526
|
-
},
|
|
527
|
-
render: () => (
|
|
528
|
-
<div
|
|
529
|
-
style={{
|
|
530
|
-
background:
|
|
531
|
-
'url(https://cdn.pixabay.com/photo/2021/06/14/22/46/milky-way-6337038_1280.jpg)',
|
|
532
|
-
backgroundSize: 'cover',
|
|
533
|
-
backgroundPosition: 'center',
|
|
534
|
-
padding: '25rem',
|
|
535
|
-
borderRadius: '12px',
|
|
536
|
-
}}
|
|
537
|
-
>
|
|
538
|
-
<div className="u-flex u-flex-wrap u-gap-2">
|
|
539
|
-
<Button label="Primary" variant="primary" glass />
|
|
540
|
-
<Button label="Secondary" variant="secondary" glass />
|
|
541
|
-
<Button label="Success" variant="success" glass />
|
|
542
|
-
<Button label="Info" variant="info" glass />
|
|
543
|
-
<Button label="Warning" variant="warning" glass />
|
|
544
|
-
<Button label="Error" variant="error" glass />
|
|
545
|
-
<Button label="Light" variant="light" glass />
|
|
546
|
-
<Button label="Dark" variant="dark" glass />
|
|
547
|
-
</div>
|
|
548
|
-
</div>
|
|
549
|
-
),
|
|
550
|
-
};
|
|
551
|
-
|
|
552
|
-
export const GlassOutlineVariants: Story = {
|
|
553
|
-
args: {
|
|
554
|
-
label: 'Glass Button',
|
|
555
|
-
variant: 'outline-primary',
|
|
556
|
-
glass: true,
|
|
557
|
-
},
|
|
620
|
+
export const InCard: Story = {
|
|
558
621
|
render: () => (
|
|
559
|
-
<div
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
backgroundPosition: 'center',
|
|
565
|
-
padding: '20rem 10rem',
|
|
566
|
-
borderRadius: '12px',
|
|
567
|
-
}}
|
|
568
|
-
>
|
|
569
|
-
<div className="u-flex u-flex-wrap u-gap-2">
|
|
570
|
-
<Button label="Outline Primary" variant="outline-primary" glass />
|
|
571
|
-
<Button label="Outline Secondary" variant="outline-secondary" glass />
|
|
572
|
-
<Button label="Outline Success" variant="outline-success" glass />
|
|
573
|
-
<Button label="Outline Info" variant="outline-info" glass />
|
|
574
|
-
<Button label="Outline Warning" variant="outline-warning" glass />
|
|
575
|
-
<Button label="Outline Error" variant="outline-error" glass />
|
|
576
|
-
<Button label="Outline Light" variant="outline-light" glass />
|
|
577
|
-
<Button label="Outline Dark" variant="outline-dark" glass />
|
|
622
|
+
<div className="u-p-4 u-bg-white u-rounded-lg u-shadow u-w-64">
|
|
623
|
+
<h3 className="u-mt-0 u-mb-2">Sample Card</h3>
|
|
624
|
+
<p className="u-mb-2">Card content goes here...</p>
|
|
625
|
+
<div className="u-mt-2">
|
|
626
|
+
<Button label="Learn More" variant="primary" size="sm" />
|
|
578
627
|
</div>
|
|
579
628
|
</div>
|
|
580
629
|
),
|
|
581
630
|
};
|
|
582
631
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
glass: true,
|
|
588
|
-
},
|
|
589
|
-
render: () => (
|
|
590
|
-
<div
|
|
591
|
-
style={{
|
|
592
|
-
background: 'url(https://cdn.pixabay.com/photo/2020/12/15/01/43/street-5832394_1280.jpg)',
|
|
593
|
-
backgroundSize: 'cover',
|
|
594
|
-
backgroundPosition: 'center',
|
|
595
|
-
padding: '10rem 20rem',
|
|
596
|
-
borderRadius: '12px',
|
|
597
|
-
}}
|
|
598
|
-
>
|
|
599
|
-
<div className="u-flex u-items-center u-gap-2">
|
|
600
|
-
<Button label="Small Glass" variant="primary" size="sm" glass={{ cornerRadius: 8 }} />
|
|
601
|
-
<Button label="Medium Glass" variant="primary" size="md" glass />
|
|
602
|
-
<Button label="Large Glass" variant="primary" size="lg" glass />
|
|
603
|
-
</div>
|
|
604
|
-
</div>
|
|
605
|
-
),
|
|
606
|
-
};
|
|
607
|
-
|
|
608
|
-
export const GlassWithIcons: Story = {
|
|
609
|
-
args: {
|
|
610
|
-
label: 'Glass Button',
|
|
611
|
-
variant: 'primary',
|
|
612
|
-
glass: true,
|
|
613
|
-
icon: <Icon />,
|
|
614
|
-
},
|
|
615
|
-
render: () => (
|
|
616
|
-
<div
|
|
617
|
-
style={{
|
|
618
|
-
background: 'url(https://cdn.pixabay.com/photo/2020/12/15/01/43/street-5832394_1280.jpg)',
|
|
619
|
-
backgroundSize: 'cover',
|
|
620
|
-
backgroundPosition: 'center',
|
|
621
|
-
padding: '25rem',
|
|
622
|
-
borderRadius: '12px',
|
|
623
|
-
}}
|
|
624
|
-
>
|
|
625
|
-
<div className="u-flex u-flex-wrap u-gap-2">
|
|
626
|
-
<Button label="With Icon" variant="primary" icon={<Icon />} glass={{ cornerRadius: 12 }} />
|
|
627
|
-
<Button
|
|
628
|
-
label="Icon Only"
|
|
629
|
-
variant="error"
|
|
630
|
-
icon={<Icon />}
|
|
631
|
-
iconOnly
|
|
632
|
-
glass={{ cornerRadius: 12 }}
|
|
633
|
-
/>
|
|
634
|
-
<Button
|
|
635
|
-
label="Rounded Glass"
|
|
636
|
-
variant="success"
|
|
637
|
-
icon={<Icon />}
|
|
638
|
-
rounded
|
|
639
|
-
glass={{ cornerRadius: 24 }}
|
|
640
|
-
/>
|
|
641
|
-
<Button
|
|
642
|
-
label="Rounded Icon"
|
|
643
|
-
variant="info"
|
|
644
|
-
icon={<Icon />}
|
|
645
|
-
iconOnly
|
|
646
|
-
rounded
|
|
647
|
-
glass={{ cornerRadius: 50 }}
|
|
648
|
-
/>
|
|
649
|
-
</div>
|
|
650
|
-
</div>
|
|
651
|
-
),
|
|
652
|
-
};
|
|
653
|
-
|
|
654
|
-
export const GlassRounded: Story = {
|
|
655
|
-
args: {
|
|
656
|
-
label: 'Rounded Glass',
|
|
657
|
-
variant: 'primary',
|
|
658
|
-
glass: {
|
|
659
|
-
cornerRadius: 22,
|
|
660
|
-
},
|
|
661
|
-
rounded: true,
|
|
662
|
-
},
|
|
663
|
-
decorators: [
|
|
664
|
-
Story => (
|
|
665
|
-
<div
|
|
666
|
-
style={{
|
|
667
|
-
background: 'url(https://cdn.pixabay.com/photo/2020/12/15/01/43/street-5832394_1280.jpg)',
|
|
668
|
-
backgroundSize: 'cover',
|
|
669
|
-
backgroundPosition: 'center',
|
|
670
|
-
padding: '25rem',
|
|
671
|
-
borderRadius: '12px',
|
|
672
|
-
}}
|
|
673
|
-
>
|
|
674
|
-
<Story />
|
|
675
|
-
</div>
|
|
676
|
-
),
|
|
677
|
-
],
|
|
678
|
-
};
|
|
679
|
-
|
|
680
|
-
// Comprehensive Glass Showcase
|
|
681
|
-
export const GlassShowcase: Story = {
|
|
682
|
-
args: {
|
|
683
|
-
label: 'Glass Button',
|
|
684
|
-
variant: 'primary',
|
|
685
|
-
glass: true,
|
|
686
|
-
},
|
|
632
|
+
/**
|
|
633
|
+
* Button used in a modal context
|
|
634
|
+
*/
|
|
635
|
+
export const InModal: Story = {
|
|
687
636
|
render: () => (
|
|
688
|
-
<div
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
padding: '2rem',
|
|
696
|
-
borderRadius: '12px',
|
|
697
|
-
}}
|
|
698
|
-
>
|
|
699
|
-
<h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.2rem' }}>
|
|
700
|
-
Primary Glass Variants
|
|
701
|
-
</h3>
|
|
702
|
-
<div className="u-flex u-flex-wrap u-gap-2 u-items-center">
|
|
703
|
-
<Button label="Small Glass" variant="primary" size="sm" glass={{ cornerRadius: 8 }} />
|
|
704
|
-
<Button label="Medium Glass" variant="primary" size="md" glass />
|
|
705
|
-
<Button label="Large Glass" variant="primary" size="lg" glass />
|
|
706
|
-
<Button label="With Icon" variant="primary" icon={<Icon />} glass />
|
|
707
|
-
<Button label="Icon Only" variant="primary" icon={<Icon />} iconOnly glass />
|
|
708
|
-
<Button label="Rounded" variant="primary" rounded glass={{ cornerRadius: 24 }} />
|
|
709
|
-
</div>
|
|
710
|
-
</div>
|
|
711
|
-
|
|
712
|
-
{/* Outline Glass Variants */}
|
|
713
|
-
<div
|
|
714
|
-
style={{
|
|
715
|
-
background:
|
|
716
|
-
'url(https://cdn.pixabay.com/photo/2025/09/18/23/32/pattern-9842070_1280.png)',
|
|
717
|
-
backgroundSize: 'cover',
|
|
718
|
-
backgroundPosition: 'center',
|
|
719
|
-
padding: '2rem',
|
|
720
|
-
borderRadius: '12px',
|
|
721
|
-
}}
|
|
722
|
-
>
|
|
723
|
-
<h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.2rem' }}>
|
|
724
|
-
Outline Glass Variants
|
|
725
|
-
</h3>
|
|
726
|
-
<div className="u-flex u-flex-wrap u-gap-2">
|
|
727
|
-
<Button label="Outline Primary" variant="outline-primary" glass />
|
|
728
|
-
<Button label="Outline Success" variant="outline-success" glass />
|
|
729
|
-
<Button label="Outline Warning" variant="outline-warning" glass />
|
|
730
|
-
<Button label="Outline Error" variant="outline-error" glass />
|
|
637
|
+
<div className="u-relative">
|
|
638
|
+
<div className="u-p-6 u-bg-white u-rounded-lg u-shadow-lg u-w-96">
|
|
639
|
+
<h3 className="u-mt-0 u-mb-2">Confirmation</h3>
|
|
640
|
+
<p className="u-mb-4">Are you sure you want to proceed?</p>
|
|
641
|
+
<div className="u-flex u-justify-end u-gap-2 u-mt-4">
|
|
642
|
+
<Button label="Cancel" variant="secondary" />
|
|
643
|
+
<Button label="Confirm" variant="primary" />
|
|
731
644
|
</div>
|
|
732
645
|
</div>
|
|
733
|
-
|
|
734
|
-
{/* Custom Glass Configuration */}
|
|
735
|
-
<div
|
|
736
|
-
style={{
|
|
737
|
-
background: 'url(https://cdn.pixabay.com/photo/2019/09/29/17/21/greece-4513857_1280.jpg)',
|
|
738
|
-
backgroundSize: 'cover',
|
|
739
|
-
backgroundPosition: 'center',
|
|
740
|
-
padding: '2rem',
|
|
741
|
-
borderRadius: '12px',
|
|
742
|
-
}}
|
|
743
|
-
>
|
|
744
|
-
<h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.2rem' }}>
|
|
745
|
-
Custom Glass Effects
|
|
746
|
-
</h3>
|
|
747
|
-
<div className="u-flex u-flex-wrap u-gap-2">
|
|
748
|
-
<Button
|
|
749
|
-
label="Polar Mode"
|
|
750
|
-
variant="secondary"
|
|
751
|
-
glass={{
|
|
752
|
-
displacementScale: 60,
|
|
753
|
-
blurAmount: 2,
|
|
754
|
-
saturation: 180,
|
|
755
|
-
aberrationIntensity: 2,
|
|
756
|
-
cornerRadius: 12,
|
|
757
|
-
mode: 'polar' as const,
|
|
758
|
-
}}
|
|
759
|
-
/>
|
|
760
|
-
<Button
|
|
761
|
-
label="Prominent Mode"
|
|
762
|
-
variant="info"
|
|
763
|
-
glass={{
|
|
764
|
-
displacementScale: 80,
|
|
765
|
-
blurAmount: 1,
|
|
766
|
-
saturation: 200,
|
|
767
|
-
aberrationIntensity: 3,
|
|
768
|
-
cornerRadius: 12,
|
|
769
|
-
mode: 'prominent' as const,
|
|
770
|
-
}}
|
|
771
|
-
/>
|
|
772
|
-
<Button
|
|
773
|
-
label="Shader Mode"
|
|
774
|
-
variant="success"
|
|
775
|
-
glass={{
|
|
776
|
-
displacementScale: 50,
|
|
777
|
-
blurAmount: 0,
|
|
778
|
-
saturation: 140,
|
|
779
|
-
aberrationIntensity: 1,
|
|
780
|
-
cornerRadius: 12,
|
|
781
|
-
mode: 'shader' as const,
|
|
782
|
-
}}
|
|
783
|
-
/>
|
|
784
|
-
</div>
|
|
785
|
-
</div>
|
|
786
|
-
|
|
787
|
-
{/* Light Background */}
|
|
788
|
-
<div
|
|
789
|
-
style={{
|
|
790
|
-
background: 'url(https://cdn.pixabay.com/photo/2019/09/29/17/21/greece-4513852_1280.jpg)',
|
|
791
|
-
backgroundSize: 'cover',
|
|
792
|
-
backgroundPosition: 'center',
|
|
793
|
-
padding: '2rem',
|
|
794
|
-
borderRadius: '12px',
|
|
795
|
-
}}
|
|
796
|
-
>
|
|
797
|
-
<h3 style={{ color: '#333', marginBottom: '1rem', fontSize: '1.2rem' }}>
|
|
798
|
-
Light Background
|
|
799
|
-
</h3>
|
|
800
|
-
<div className="u-flex u-flex-wrap u-gap-2">
|
|
801
|
-
<Button label="Light Variant" variant="light" glass />
|
|
802
|
-
<Button label="Outline Light" variant="outline-light" glass />
|
|
803
|
-
<Button label="Dark on Light" variant="dark" glass />
|
|
804
|
-
<Button
|
|
805
|
-
label="Over Light"
|
|
806
|
-
variant="primary"
|
|
807
|
-
glass={{
|
|
808
|
-
overLight: true,
|
|
809
|
-
displacementScale: 45,
|
|
810
|
-
saturation: 120,
|
|
811
|
-
}}
|
|
812
|
-
/>
|
|
813
|
-
</div>
|
|
814
|
-
</div>
|
|
815
|
-
</div>
|
|
816
|
-
),
|
|
817
|
-
};
|
|
818
|
-
|
|
819
|
-
// Glass Mode Variants - Standard
|
|
820
|
-
export const GlassModeStandard: Story = {
|
|
821
|
-
args: {
|
|
822
|
-
label: 'Standard Glass Mode',
|
|
823
|
-
variant: 'primary',
|
|
824
|
-
glass: {
|
|
825
|
-
mode: 'standard',
|
|
826
|
-
displacementScale: 60,
|
|
827
|
-
blurAmount: 2,
|
|
828
|
-
saturation: 160,
|
|
829
|
-
aberrationIntensity: 2,
|
|
830
|
-
cornerRadius: 12,
|
|
831
|
-
},
|
|
832
|
-
},
|
|
833
|
-
render: args => (
|
|
834
|
-
<div
|
|
835
|
-
style={{
|
|
836
|
-
background: 'url(https://images.unsplash.com/photo-1518837695005-2083093ee35b?w=1920)',
|
|
837
|
-
backgroundSize: 'cover',
|
|
838
|
-
backgroundPosition: 'center',
|
|
839
|
-
display: 'flex',
|
|
840
|
-
gap: '2rem',
|
|
841
|
-
flexDirection: 'column',
|
|
842
|
-
alignItems: 'center',
|
|
843
|
-
justifyContent: 'center',
|
|
844
|
-
minWidth: '95vw',
|
|
845
|
-
minHeight: '95vh',
|
|
846
|
-
}}
|
|
847
|
-
>
|
|
848
|
-
<div style={{ textAlign: 'center', color: 'white', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
|
|
849
|
-
<h3 style={{ fontSize: '1.5rem', marginBottom: '0.5rem' }}>Standard Glass Mode</h3>
|
|
850
|
-
<p style={{ fontSize: '0.875rem', opacity: 0.9 }}>
|
|
851
|
-
Classic glass morphism with blur and displacement
|
|
852
|
-
</p>
|
|
853
|
-
</div>
|
|
854
|
-
<Button {...args} />
|
|
855
|
-
</div>
|
|
856
|
-
),
|
|
857
|
-
};
|
|
858
|
-
|
|
859
|
-
// Glass Mode Variants - Polar
|
|
860
|
-
export const GlassModePolar: Story = {
|
|
861
|
-
args: {
|
|
862
|
-
label: 'Polar Glass Mode',
|
|
863
|
-
variant: 'secondary',
|
|
864
|
-
glass: {
|
|
865
|
-
mode: 'polar',
|
|
866
|
-
displacementScale: 80,
|
|
867
|
-
blurAmount: 1.5,
|
|
868
|
-
saturation: 180,
|
|
869
|
-
aberrationIntensity: 3,
|
|
870
|
-
cornerRadius: 12,
|
|
871
|
-
},
|
|
872
|
-
},
|
|
873
|
-
render: args => (
|
|
874
|
-
<div
|
|
875
|
-
style={{
|
|
876
|
-
background: 'url(https://images.unsplash.com/photo-1557683316-973673baf926?w=1920)',
|
|
877
|
-
backgroundSize: 'cover',
|
|
878
|
-
backgroundPosition: 'center',
|
|
879
|
-
borderRadius: '12px',
|
|
880
|
-
display: 'flex',
|
|
881
|
-
gap: '2rem',
|
|
882
|
-
flexDirection: 'column',
|
|
883
|
-
alignItems: 'center',
|
|
884
|
-
justifyContent: 'center',
|
|
885
|
-
minWidth: '95vw',
|
|
886
|
-
minHeight: '95vh',
|
|
887
|
-
}}
|
|
888
|
-
>
|
|
889
|
-
<div style={{ textAlign: 'center', color: 'white', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
|
|
890
|
-
<h3 style={{ fontSize: '1.5rem', marginBottom: '0.5rem' }}>Polar Glass Mode</h3>
|
|
891
|
-
<p style={{ fontSize: '0.875rem', opacity: 0.9 }}>Radial distortion effect from center</p>
|
|
892
|
-
</div>
|
|
893
|
-
<Button {...args} />
|
|
894
646
|
</div>
|
|
895
647
|
),
|
|
896
648
|
};
|
|
897
649
|
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
saturation: 200,
|
|
908
|
-
aberrationIntensity: 4,
|
|
909
|
-
cornerRadius: 12,
|
|
910
|
-
},
|
|
911
|
-
},
|
|
912
|
-
render: args => (
|
|
913
|
-
<div
|
|
914
|
-
style={{
|
|
915
|
-
background: 'url(https://images.unsplash.com/photo-1579546929518-9e396f3cc809?w=1920)',
|
|
916
|
-
backgroundSize: 'cover',
|
|
917
|
-
backgroundPosition: 'center',
|
|
918
|
-
borderRadius: '12px',
|
|
919
|
-
display: 'flex',
|
|
920
|
-
gap: '2rem',
|
|
921
|
-
flexDirection: 'column',
|
|
922
|
-
alignItems: 'center',
|
|
923
|
-
justifyContent: 'center',
|
|
924
|
-
minWidth: '95vw',
|
|
925
|
-
minHeight: '95vh',
|
|
926
|
-
}}
|
|
927
|
-
>
|
|
928
|
-
<div style={{ textAlign: 'center', color: 'white', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
|
|
929
|
-
<h3 style={{ fontSize: '1.5rem', marginBottom: '0.5rem' }}>Prominent Glass Mode</h3>
|
|
930
|
-
<p style={{ fontSize: '0.875rem', opacity: 0.9 }}>Enhanced distortion with maximum depth</p>
|
|
931
|
-
</div>
|
|
932
|
-
<Button {...args} />
|
|
650
|
+
/**
|
|
651
|
+
* Button composed with other components
|
|
652
|
+
*/
|
|
653
|
+
export const WithOtherComponents: Story = {
|
|
654
|
+
render: () => (
|
|
655
|
+
<div className="u-flex u-items-center u-gap-2">
|
|
656
|
+
<Button label="Previous" variant="secondary" />
|
|
657
|
+
<span className="u-text-sm">Page 1 of 10</span>
|
|
658
|
+
<Button label="Next" variant="primary" />
|
|
933
659
|
</div>
|
|
934
660
|
),
|
|
935
661
|
};
|
|
936
662
|
|
|
937
|
-
//
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
label: 'Shader Glass Mode',
|
|
941
|
-
variant: 'info',
|
|
942
|
-
glass: {
|
|
943
|
-
mode: 'shader',
|
|
944
|
-
shaderVariant: 'liquidGlass',
|
|
945
|
-
displacementScale: 70,
|
|
946
|
-
blurAmount: 1.8,
|
|
947
|
-
saturation: 170,
|
|
948
|
-
cornerRadius: 12,
|
|
949
|
-
},
|
|
950
|
-
},
|
|
951
|
-
render: args => (
|
|
952
|
-
<div
|
|
953
|
-
style={{
|
|
954
|
-
background: 'url(https://images.unsplash.com/photo-1557682250-33bd709cbe85?w=1920)',
|
|
955
|
-
backgroundSize: 'cover',
|
|
956
|
-
backgroundPosition: 'center',
|
|
957
|
-
borderRadius: '12px',
|
|
958
|
-
display: 'flex',
|
|
959
|
-
gap: '2rem',
|
|
960
|
-
flexDirection: 'column',
|
|
961
|
-
alignItems: 'center',
|
|
962
|
-
justifyContent: 'center',
|
|
963
|
-
minWidth: '95vw',
|
|
964
|
-
minHeight: '95vh',
|
|
965
|
-
}}
|
|
966
|
-
>
|
|
967
|
-
<div style={{ textAlign: 'center', color: 'white', textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}>
|
|
968
|
-
<h3 style={{ fontSize: '1.5rem', marginBottom: '0.5rem' }}>Shader Glass Mode</h3>
|
|
969
|
-
<p style={{ fontSize: '0.875rem', opacity: 0.9 }}>GPU-accelerated liquid glass effect</p>
|
|
970
|
-
</div>
|
|
971
|
-
<Button {...args} />
|
|
972
|
-
</div>
|
|
973
|
-
),
|
|
974
|
-
};
|
|
663
|
+
// ============================================================================
|
|
664
|
+
// ACCESSIBILITY STORIES
|
|
665
|
+
// ============================================================================
|
|
975
666
|
|
|
976
|
-
|
|
977
|
-
|
|
667
|
+
/**
|
|
668
|
+
* Shows proper ARIA labels for accessibility
|
|
669
|
+
*/
|
|
670
|
+
export const WithAriaLabels: Story = {
|
|
978
671
|
render: () => (
|
|
979
|
-
<div
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
backgroundSize: 'cover',
|
|
983
|
-
backgroundPosition: 'center',
|
|
984
|
-
padding: '3rem',
|
|
985
|
-
borderRadius: '12px',
|
|
986
|
-
minHeight: '90vh',
|
|
987
|
-
minWidth: '90vw',
|
|
988
|
-
}}
|
|
989
|
-
>
|
|
990
|
-
<div style={{ width: '90vw', margin: '0 auto' }}>
|
|
991
|
-
<h2
|
|
992
|
-
style={{
|
|
993
|
-
textAlign: 'center',
|
|
994
|
-
color: 'white',
|
|
995
|
-
marginBottom: '3rem',
|
|
996
|
-
fontSize: '2rem',
|
|
997
|
-
textShadow: '0 2px 8px rgba(0,0,0,0.5)',
|
|
998
|
-
}}
|
|
999
|
-
>
|
|
1000
|
-
Glass Mode Variants Comparison
|
|
1001
|
-
</h2>
|
|
1002
|
-
|
|
1003
|
-
<div
|
|
1004
|
-
style={{
|
|
1005
|
-
display: 'grid',
|
|
1006
|
-
gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))',
|
|
1007
|
-
gap: '2rem',
|
|
1008
|
-
}}
|
|
1009
|
-
>
|
|
1010
|
-
{/* Standard Mode */}
|
|
1011
|
-
<div
|
|
1012
|
-
style={{
|
|
1013
|
-
background: 'rgba(255,255,255,0.1)',
|
|
1014
|
-
padding: '2rem',
|
|
1015
|
-
borderRadius: '12px',
|
|
1016
|
-
textAlign: 'center',
|
|
1017
|
-
display: 'flex',
|
|
1018
|
-
flexDirection: 'column',
|
|
1019
|
-
alignItems: 'center',
|
|
1020
|
-
}}
|
|
1021
|
-
>
|
|
1022
|
-
<h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.25rem' }}>Standard</h3>
|
|
1023
|
-
<p
|
|
1024
|
-
style={{
|
|
1025
|
-
color: 'rgba(255,255,255,0.8)',
|
|
1026
|
-
fontSize: '0.875rem',
|
|
1027
|
-
marginBottom: '1.5rem',
|
|
1028
|
-
}}
|
|
1029
|
-
>
|
|
1030
|
-
Classic blur and displacement
|
|
1031
|
-
</p>
|
|
1032
|
-
<Button
|
|
1033
|
-
label="Standard Glass"
|
|
1034
|
-
variant="primary"
|
|
1035
|
-
glass={{
|
|
1036
|
-
mode: 'standard',
|
|
1037
|
-
displacementScale: 60,
|
|
1038
|
-
blurAmount: 2,
|
|
1039
|
-
saturation: 160,
|
|
1040
|
-
aberrationIntensity: 2,
|
|
1041
|
-
}}
|
|
1042
|
-
/>
|
|
1043
|
-
</div>
|
|
1044
|
-
|
|
1045
|
-
{/* Polar Mode */}
|
|
1046
|
-
<div
|
|
1047
|
-
style={{
|
|
1048
|
-
background: 'rgba(255,255,255,0.1)',
|
|
1049
|
-
padding: '2rem',
|
|
1050
|
-
borderRadius: '12px',
|
|
1051
|
-
textAlign: 'center',
|
|
1052
|
-
display: 'flex',
|
|
1053
|
-
flexDirection: 'column',
|
|
1054
|
-
alignItems: 'center',
|
|
1055
|
-
}}
|
|
1056
|
-
>
|
|
1057
|
-
<h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.25rem' }}>Polar</h3>
|
|
1058
|
-
<p
|
|
1059
|
-
style={{
|
|
1060
|
-
color: 'rgba(255,255,255,0.8)',
|
|
1061
|
-
fontSize: '0.875rem',
|
|
1062
|
-
marginBottom: '1.5rem',
|
|
1063
|
-
}}
|
|
1064
|
-
>
|
|
1065
|
-
Radial distortion effect
|
|
1066
|
-
</p>
|
|
1067
|
-
<Button
|
|
1068
|
-
label="Polar Glass"
|
|
1069
|
-
variant="secondary"
|
|
1070
|
-
glass={{
|
|
1071
|
-
mode: 'polar',
|
|
1072
|
-
displacementScale: 80,
|
|
1073
|
-
blurAmount: 1.5,
|
|
1074
|
-
saturation: 180,
|
|
1075
|
-
aberrationIntensity: 3,
|
|
1076
|
-
}}
|
|
1077
|
-
/>
|
|
1078
|
-
</div>
|
|
1079
|
-
|
|
1080
|
-
{/* Prominent Mode */}
|
|
1081
|
-
<div
|
|
1082
|
-
style={{
|
|
1083
|
-
background: 'rgba(255,255,255,0.1)',
|
|
1084
|
-
padding: '2rem',
|
|
1085
|
-
borderRadius: '12px',
|
|
1086
|
-
textAlign: 'center',
|
|
1087
|
-
display: 'flex',
|
|
1088
|
-
flexDirection: 'column',
|
|
1089
|
-
alignItems: 'center',
|
|
1090
|
-
}}
|
|
1091
|
-
>
|
|
1092
|
-
<h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.25rem' }}>Prominent</h3>
|
|
1093
|
-
<p
|
|
1094
|
-
style={{
|
|
1095
|
-
color: 'rgba(255,255,255,0.8)',
|
|
1096
|
-
fontSize: '0.875rem',
|
|
1097
|
-
marginBottom: '1.5rem',
|
|
1098
|
-
}}
|
|
1099
|
-
>
|
|
1100
|
-
Maximum depth and distortion
|
|
1101
|
-
</p>
|
|
1102
|
-
<Button
|
|
1103
|
-
label="Prominent Glass"
|
|
1104
|
-
variant="success"
|
|
1105
|
-
glass={{
|
|
1106
|
-
mode: 'prominent',
|
|
1107
|
-
displacementScale: 100,
|
|
1108
|
-
blurAmount: 2.5,
|
|
1109
|
-
saturation: 200,
|
|
1110
|
-
aberrationIntensity: 4,
|
|
1111
|
-
}}
|
|
1112
|
-
/>
|
|
1113
|
-
</div>
|
|
1114
|
-
|
|
1115
|
-
{/* Shader Mode */}
|
|
1116
|
-
<div
|
|
1117
|
-
style={{
|
|
1118
|
-
background: 'rgba(255,255,255,0.1)',
|
|
1119
|
-
padding: '2rem',
|
|
1120
|
-
borderRadius: '12px',
|
|
1121
|
-
textAlign: 'center',
|
|
1122
|
-
display: 'flex',
|
|
1123
|
-
flexDirection: 'column',
|
|
1124
|
-
alignItems: 'center',
|
|
1125
|
-
}}
|
|
1126
|
-
>
|
|
1127
|
-
<h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.25rem' }}>Shader</h3>
|
|
1128
|
-
<p
|
|
1129
|
-
style={{
|
|
1130
|
-
color: 'rgba(255,255,255,0.8)',
|
|
1131
|
-
fontSize: '0.875rem',
|
|
1132
|
-
marginBottom: '1.5rem',
|
|
1133
|
-
}}
|
|
1134
|
-
>
|
|
1135
|
-
GPU-accelerated liquid glass
|
|
1136
|
-
</p>
|
|
1137
|
-
<Button
|
|
1138
|
-
label="Shader Glass"
|
|
1139
|
-
variant="info"
|
|
1140
|
-
glass={{
|
|
1141
|
-
mode: 'shader',
|
|
1142
|
-
shaderVariant: 'liquidGlass',
|
|
1143
|
-
displacementScale: 70,
|
|
1144
|
-
blurAmount: 1.8,
|
|
1145
|
-
saturation: 170,
|
|
1146
|
-
}}
|
|
1147
|
-
/>
|
|
1148
|
-
</div>
|
|
1149
|
-
</div>
|
|
1150
|
-
|
|
1151
|
-
{/* All Variants with Different Colors */}
|
|
1152
|
-
<div style={{ marginTop: '3rem' }}>
|
|
1153
|
-
<h3
|
|
1154
|
-
style={{
|
|
1155
|
-
textAlign: 'center',
|
|
1156
|
-
color: 'white',
|
|
1157
|
-
marginBottom: '2rem',
|
|
1158
|
-
fontSize: '1.5rem',
|
|
1159
|
-
textShadow: '0 2px 8px rgba(0,0,0,0.5)',
|
|
1160
|
-
}}
|
|
1161
|
-
>
|
|
1162
|
-
All Color Variants with Glass
|
|
1163
|
-
</h3>
|
|
1164
|
-
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '1rem', justifyContent: 'center' }}>
|
|
1165
|
-
<Button label="Primary" variant="primary" glass />
|
|
1166
|
-
<Button label="Secondary" variant="secondary" glass />
|
|
1167
|
-
<Button label="Success" variant="success" glass />
|
|
1168
|
-
<Button label="Info" variant="info" glass />
|
|
1169
|
-
<Button label="Warning" variant="warning" glass />
|
|
1170
|
-
<Button label="Error" variant="error" glass />
|
|
1171
|
-
<Button label="Light" variant="light" glass />
|
|
1172
|
-
<Button label="Dark" variant="dark" glass />
|
|
1173
|
-
</div>
|
|
1174
|
-
</div>
|
|
1175
|
-
</div>
|
|
672
|
+
<div className="u-flex u-flex-column u-gap-2">
|
|
673
|
+
<Button label="Save" variant="primary" aria-label="Save document" />
|
|
674
|
+
<Button label="Delete" variant="error" aria-label="Delete item permanently" />
|
|
1176
675
|
</div>
|
|
1177
676
|
),
|
|
1178
677
|
};
|
|
1179
678
|
|
|
1180
|
-
|
|
1181
|
-
|
|
679
|
+
/**
|
|
680
|
+
* Shows button with keyboard navigation support
|
|
681
|
+
*/
|
|
682
|
+
export const WithKeyboardNavigation: Story = {
|
|
1182
683
|
render: () => (
|
|
1183
|
-
<div
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
backgroundPosition: 'center',
|
|
1188
|
-
padding: '3rem',
|
|
1189
|
-
borderRadius: '12px',
|
|
1190
|
-
minHeight: '90vh',
|
|
1191
|
-
}}
|
|
1192
|
-
>
|
|
1193
|
-
<div style={{ maxWidth: '1200px', margin: '0 auto' }}>
|
|
1194
|
-
<h2
|
|
1195
|
-
style={{
|
|
1196
|
-
textAlign: 'center',
|
|
1197
|
-
color: 'white',
|
|
1198
|
-
marginBottom: '3rem',
|
|
1199
|
-
fontSize: '2rem',
|
|
1200
|
-
textShadow: '0 2px 8px rgba(0,0,0,0.5)',
|
|
1201
|
-
}}
|
|
1202
|
-
>
|
|
1203
|
-
Glass Button States & Interactions
|
|
1204
|
-
</h2>
|
|
1205
|
-
|
|
1206
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: '3rem' }}>
|
|
1207
|
-
{/* Sizes */}
|
|
1208
|
-
<div
|
|
1209
|
-
style={{
|
|
1210
|
-
background: 'rgba(255,255,255,0.08)',
|
|
1211
|
-
padding: '2rem',
|
|
1212
|
-
borderRadius: '12px',
|
|
1213
|
-
backdropFilter: 'blur(10px)',
|
|
1214
|
-
}}
|
|
1215
|
-
>
|
|
1216
|
-
<h3 style={{ color: 'white', marginBottom: '1.5rem' }}>Sizes</h3>
|
|
1217
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: '1rem', flexWrap: 'wrap' }}>
|
|
1218
|
-
<Button label="Small" variant="primary" size="sm" glass={{ cornerRadius: 8 }} />
|
|
1219
|
-
<Button label="Medium" variant="primary" size="md" glass={{ cornerRadius: 12 }} />
|
|
1220
|
-
<Button label="Large" variant="primary" size="lg" glass={{ cornerRadius: 16 }} />
|
|
1221
|
-
</div>
|
|
1222
|
-
</div>
|
|
1223
|
-
|
|
1224
|
-
{/* With Icons */}
|
|
1225
|
-
<div
|
|
1226
|
-
style={{
|
|
1227
|
-
background: 'rgba(255,255,255,0.08)',
|
|
1228
|
-
padding: '2rem',
|
|
1229
|
-
borderRadius: '12px',
|
|
1230
|
-
backdropFilter: 'blur(10px)',
|
|
1231
|
-
}}
|
|
1232
|
-
>
|
|
1233
|
-
<h3 style={{ color: 'white', marginBottom: '1.5rem' }}>With Icons</h3>
|
|
1234
|
-
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
|
|
1235
|
-
<Button label="With Icon" variant="primary" icon={<Icon />} glass />
|
|
1236
|
-
<Button label="Icon Only" variant="secondary" icon={<Icon />} iconOnly glass />
|
|
1237
|
-
<Button
|
|
1238
|
-
label="Rounded"
|
|
1239
|
-
variant="success"
|
|
1240
|
-
icon={<Icon />}
|
|
1241
|
-
rounded
|
|
1242
|
-
glass={{ cornerRadius: 24 }}
|
|
1243
|
-
/>
|
|
1244
|
-
</div>
|
|
1245
|
-
</div>
|
|
1246
|
-
|
|
1247
|
-
{/* Outline Variants */}
|
|
1248
|
-
<div
|
|
1249
|
-
style={{
|
|
1250
|
-
background: 'rgba(255,255,255,0.08)',
|
|
1251
|
-
padding: '2rem',
|
|
1252
|
-
borderRadius: '12px',
|
|
1253
|
-
backdropFilter: 'blur(10px)',
|
|
1254
|
-
}}
|
|
1255
|
-
>
|
|
1256
|
-
<h3 style={{ color: 'white', marginBottom: '1.5rem' }}>Outline Variants</h3>
|
|
1257
|
-
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
|
|
1258
|
-
<Button label="Outline Primary" variant="outline-primary" glass />
|
|
1259
|
-
<Button label="Outline Secondary" variant="outline-secondary" glass />
|
|
1260
|
-
<Button label="Outline Success" variant="outline-success" glass />
|
|
1261
|
-
<Button label="Outline Error" variant="outline-error" glass />
|
|
1262
|
-
</div>
|
|
1263
|
-
</div>
|
|
1264
|
-
|
|
1265
|
-
{/* Disabled State */}
|
|
1266
|
-
<div
|
|
1267
|
-
style={{
|
|
1268
|
-
background: 'rgba(255,255,255,0.08)',
|
|
1269
|
-
padding: '2rem',
|
|
1270
|
-
borderRadius: '12px',
|
|
1271
|
-
backdropFilter: 'blur(10px)',
|
|
1272
|
-
}}
|
|
1273
|
-
>
|
|
1274
|
-
<h3 style={{ color: 'white', marginBottom: '1.5rem' }}>Disabled State</h3>
|
|
1275
|
-
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
|
|
1276
|
-
<Button label="Disabled Glass" variant="primary" disabled glass />
|
|
1277
|
-
<Button label="Disabled Outline" variant="outline-primary" disabled glass />
|
|
1278
|
-
</div>
|
|
1279
|
-
</div>
|
|
1280
|
-
</div>
|
|
1281
|
-
</div>
|
|
684
|
+
<div className="u-flex u-gap-2">
|
|
685
|
+
<Button label="Button 1" variant="primary" tabIndex={0} />
|
|
686
|
+
<Button label="Button 2" variant="secondary" tabIndex={0} />
|
|
687
|
+
<Button label="Button 3" variant="success" tabIndex={0} />
|
|
1282
688
|
</div>
|
|
1283
689
|
),
|
|
1284
690
|
};
|
|
1285
691
|
|
|
1286
692
|
/**
|
|
1287
|
-
*
|
|
693
|
+
* Shows button with screen reader announcements
|
|
1288
694
|
*/
|
|
1289
|
-
export const
|
|
1290
|
-
args: {
|
|
1291
|
-
label: 'Save',
|
|
1292
|
-
variant: 'primary',
|
|
1293
|
-
loading: true,
|
|
1294
|
-
},
|
|
1295
|
-
};
|
|
1296
|
-
|
|
1297
|
-
/**
|
|
1298
|
-
* Button in loading state with custom loading text.
|
|
1299
|
-
*/
|
|
1300
|
-
export const LoadingWithText: Story = {
|
|
1301
|
-
args: {
|
|
1302
|
-
label: 'Save',
|
|
1303
|
-
variant: 'primary',
|
|
1304
|
-
loading: true,
|
|
1305
|
-
loadingText: 'Saving...',
|
|
1306
|
-
},
|
|
1307
|
-
};
|
|
1308
|
-
|
|
1309
|
-
export const LoadingStates: Story = {
|
|
695
|
+
export const WithScreenReader: Story = {
|
|
1310
696
|
render: () => (
|
|
1311
|
-
<div
|
|
1312
|
-
<Button
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
697
|
+
<div className="u-flex u-gap-2">
|
|
698
|
+
<Button
|
|
699
|
+
label="Announcement"
|
|
700
|
+
variant="primary"
|
|
701
|
+
aria-describedby="announcement-description"
|
|
702
|
+
/>
|
|
703
|
+
<div id="announcement-description" className="u-sr-only">
|
|
704
|
+
This button triggers an announcement
|
|
705
|
+
</div>
|
|
1316
706
|
</div>
|
|
1317
707
|
),
|
|
1318
708
|
};
|
|
1319
709
|
|
|
1320
710
|
/**
|
|
1321
|
-
*
|
|
711
|
+
* Shows button in high contrast theme
|
|
1322
712
|
*/
|
|
1323
|
-
export const
|
|
1324
|
-
args: {
|
|
1325
|
-
label: 'Full Width Button',
|
|
1326
|
-
variant: 'primary',
|
|
1327
|
-
fullWidth: true,
|
|
1328
|
-
},
|
|
1329
|
-
};
|
|
1330
|
-
|
|
1331
|
-
export const FullWidthButtons: Story = {
|
|
713
|
+
export const HighContrastMode: Story = {
|
|
1332
714
|
render: () => (
|
|
1333
|
-
<div style={{
|
|
1334
|
-
<Button label="
|
|
1335
|
-
<Button label="Full Width Secondary" variant="secondary" fullWidth />
|
|
1336
|
-
<Button label="Full Width Loading" variant="success" fullWidth loading />
|
|
715
|
+
<div style={{ backgroundColor: '#000', padding: '1rem' }}>
|
|
716
|
+
<Button label="High Contrast Button" variant="light" />
|
|
1337
717
|
</div>
|
|
1338
718
|
),
|
|
1339
719
|
};
|
|
1340
720
|
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
export const Block: Story = {
|
|
1345
|
-
args: {
|
|
1346
|
-
label: 'Block Button',
|
|
1347
|
-
variant: 'primary',
|
|
1348
|
-
block: true,
|
|
1349
|
-
},
|
|
1350
|
-
};
|
|
721
|
+
// ============================================================================
|
|
722
|
+
// PERFORMANCE STORIES
|
|
723
|
+
// ============================================================================
|
|
1351
724
|
|
|
1352
725
|
/**
|
|
1353
|
-
*
|
|
726
|
+
* Shows mobile-optimized button configuration
|
|
1354
727
|
*/
|
|
1355
|
-
export const
|
|
728
|
+
export const OptimizedForMobile: Story = {
|
|
1356
729
|
args: {
|
|
1357
|
-
label: '
|
|
730
|
+
label: 'Touch-Friendly',
|
|
1358
731
|
variant: 'primary',
|
|
1359
|
-
|
|
1360
|
-
iconPosition: 'start',
|
|
732
|
+
size: 'lg',
|
|
1361
733
|
},
|
|
1362
734
|
};
|
|
1363
735
|
|
|
1364
736
|
/**
|
|
1365
|
-
*
|
|
737
|
+
* Shows multiple button instances together
|
|
1366
738
|
*/
|
|
1367
|
-
export const
|
|
1368
|
-
args: {
|
|
1369
|
-
label: 'Icon End',
|
|
1370
|
-
variant: 'primary',
|
|
1371
|
-
icon: <Icon />,
|
|
1372
|
-
iconPosition: 'end',
|
|
1373
|
-
},
|
|
1374
|
-
};
|
|
1375
|
-
|
|
1376
|
-
export const IconPositions: Story = {
|
|
739
|
+
export const WithManyInstances: Story = {
|
|
1377
740
|
render: () => (
|
|
1378
|
-
<div
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
741
|
+
<div className="u-flex u-flex-wrap u-gap-2">
|
|
742
|
+
{Array.from({ length: 15 }).map((_, i) => (
|
|
743
|
+
<Button key={i} label={`Button ${i + 1}`} variant="primary" size="sm" />
|
|
744
|
+
))}
|
|
1382
745
|
</div>
|
|
1383
746
|
),
|
|
1384
747
|
};
|
|
1385
748
|
|
|
749
|
+
// ============================================================================
|
|
750
|
+
// GLASS EFFECT STORIES
|
|
751
|
+
// ============================================================================
|
|
752
|
+
|
|
1386
753
|
/**
|
|
1387
|
-
*
|
|
754
|
+
* Shows button with glass effect enabled
|
|
1388
755
|
*/
|
|
1389
|
-
export const
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
756
|
+
export const WithGlassEffect: Story = {
|
|
757
|
+
render: () => (
|
|
758
|
+
<div
|
|
759
|
+
className="u-bg-cover u-bg-center u-p-10 u-rounded-xl"
|
|
760
|
+
style={{
|
|
761
|
+
backgroundImage: 'url(https://cdn.pixabay.com/photo/2022/10/02/17/23/mushroom-7494046_1280.jpg)',
|
|
762
|
+
}}
|
|
763
|
+
>
|
|
764
|
+
<div className="u-flex u-flex-wrap u-gap-2">
|
|
765
|
+
{THEME_COLORS.map(color => (
|
|
766
|
+
<Button key={color} label={color} variant={color as any} glass={true} />
|
|
767
|
+
))}
|
|
768
|
+
</div>
|
|
769
|
+
</div>
|
|
770
|
+
),
|
|
1395
771
|
};
|
|
1396
772
|
|
|
1397
773
|
/**
|
|
1398
|
-
*
|
|
774
|
+
* Shows button with custom glass settings
|
|
1399
775
|
*/
|
|
1400
|
-
export const
|
|
776
|
+
export const WithCustomGlassSettings: Story = {
|
|
1401
777
|
args: {
|
|
1402
|
-
label: '
|
|
778
|
+
label: 'Custom Glass',
|
|
1403
779
|
variant: 'primary',
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
parameters: {
|
|
1413
|
-
docs: {
|
|
1414
|
-
description: {
|
|
1415
|
-
story: 'A comprehensive example demonstrating various button features including loading states, layout variants, icon positioning, and different states all in one view.',
|
|
1416
|
-
},
|
|
780
|
+
size: 'md',
|
|
781
|
+
glass: {
|
|
782
|
+
displacementScale: 80,
|
|
783
|
+
blurAmount: 2,
|
|
784
|
+
saturation: 200,
|
|
785
|
+
aberrationIntensity: 1,
|
|
786
|
+
cornerRadius: 16,
|
|
787
|
+
mode: 'polar',
|
|
1417
788
|
},
|
|
1418
789
|
},
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
<h3 style={{ marginBottom: '1rem' }}>Loading States</h3>
|
|
1423
|
-
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
|
|
1424
|
-
<Button label="Save" variant="primary" loading />
|
|
1425
|
-
<Button label="Delete" variant="error" loading loadingText="Deleting..." />
|
|
1426
|
-
</div>
|
|
1427
|
-
</div>
|
|
1428
|
-
|
|
1429
|
-
<div>
|
|
1430
|
-
<h3 style={{ marginBottom: '1rem' }}>Layout Variants</h3>
|
|
1431
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>
|
|
1432
|
-
<Button label="Full Width Button" variant="primary" fullWidth />
|
|
1433
|
-
<Button label="Block Button" variant="secondary" block />
|
|
1434
|
-
</div>
|
|
1435
|
-
</div>
|
|
1436
|
-
|
|
1437
|
-
<div>
|
|
1438
|
-
<h3 style={{ marginBottom: '1rem' }}>Icon Positioning</h3>
|
|
1439
|
-
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
|
|
1440
|
-
<Button label="Icon Start" variant="primary" icon={<Icon />} iconPosition="start" />
|
|
1441
|
-
<Button label="Icon End" variant="secondary" icon={<Icon />} iconPosition="end" />
|
|
1442
|
-
</div>
|
|
1443
|
-
</div>
|
|
1444
|
-
|
|
1445
|
-
<div>
|
|
1446
|
-
<h3 style={{ marginBottom: '1rem' }}>States</h3>
|
|
1447
|
-
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
|
|
1448
|
-
<Button label="Active" variant="primary" active />
|
|
1449
|
-
<Button label="Selected" variant="success" selected />
|
|
1450
|
-
<Button label="Loading" variant="info" loading />
|
|
1451
|
-
<Button label="Disabled" variant="warning" disabled />
|
|
1452
|
-
</div>
|
|
1453
|
-
</div>
|
|
1454
|
-
</div>
|
|
1455
|
-
),
|
|
790
|
+
decorators: [
|
|
791
|
+
withBackground('https://cdn.pixabay.com/photo/2021/06/14/22/46/milky-way-6337038_1280.jpg')
|
|
792
|
+
],
|
|
1456
793
|
};
|