@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.
Files changed (173) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/build-tools/EXAMPLES.md +372 -0
  3. package/build-tools/README.md +242 -0
  4. package/build-tools/__tests__/error-handler.test.js +230 -0
  5. package/build-tools/__tests__/index.test.js +141 -0
  6. package/build-tools/__tests__/rollup-plugin.test.js +194 -0
  7. package/build-tools/__tests__/utils.test.js +161 -0
  8. package/build-tools/__tests__/vite-plugin.test.js +129 -0
  9. package/build-tools/__tests__/webpack-loader.test.js +190 -0
  10. package/build-tools/error-handler.js +308 -0
  11. package/build-tools/index.d.ts +43 -0
  12. package/build-tools/index.js +88 -0
  13. package/build-tools/package.json +67 -0
  14. package/build-tools/rollup-plugin.js +236 -0
  15. package/build-tools/types.d.ts +163 -0
  16. package/build-tools/utils.js +203 -0
  17. package/build-tools/vite-plugin.js +161 -0
  18. package/build-tools/webpack-loader.js +123 -0
  19. package/dist/atomix.css +203 -90
  20. package/dist/atomix.css.map +1 -1
  21. package/dist/atomix.min.css +3 -3
  22. package/dist/atomix.min.css.map +1 -1
  23. package/dist/build-tools/EXAMPLES.md +372 -0
  24. package/dist/build-tools/README.md +242 -0
  25. package/dist/build-tools/__tests__/error-handler.test.js +230 -0
  26. package/dist/build-tools/__tests__/index.test.js +141 -0
  27. package/dist/build-tools/__tests__/rollup-plugin.test.js +194 -0
  28. package/dist/build-tools/__tests__/utils.test.js +161 -0
  29. package/dist/build-tools/__tests__/vite-plugin.test.js +129 -0
  30. package/dist/build-tools/__tests__/webpack-loader.test.js +190 -0
  31. package/dist/build-tools/error-handler.js +308 -0
  32. package/dist/build-tools/index.d.ts +43 -0
  33. package/dist/build-tools/index.js +88 -0
  34. package/dist/build-tools/package.json +67 -0
  35. package/dist/build-tools/rollup-plugin.js +236 -0
  36. package/dist/build-tools/types.d.ts +163 -0
  37. package/dist/build-tools/utils.js +203 -0
  38. package/dist/build-tools/vite-plugin.js +161 -0
  39. package/dist/build-tools/webpack-loader.js +123 -0
  40. package/dist/charts.d.ts +1 -1
  41. package/dist/charts.js +86 -57
  42. package/dist/charts.js.map +1 -1
  43. package/dist/core.d.ts +1 -1
  44. package/dist/core.js +136 -112
  45. package/dist/core.js.map +1 -1
  46. package/dist/forms.d.ts +2 -5
  47. package/dist/forms.js +140 -128
  48. package/dist/forms.js.map +1 -1
  49. package/dist/heavy.d.ts +1 -1
  50. package/dist/heavy.js +136 -112
  51. package/dist/heavy.js.map +1 -1
  52. package/dist/index.d.ts +9 -61
  53. package/dist/index.esm.js +237 -286
  54. package/dist/index.esm.js.map +1 -1
  55. package/dist/index.js +250 -299
  56. package/dist/index.js.map +1 -1
  57. package/dist/index.min.js +1 -1
  58. package/dist/index.min.js.map +1 -1
  59. package/package.json +23 -8
  60. package/scripts/atomix-cli.js +170 -73
  61. package/scripts/cli/__tests__/README.md +81 -0
  62. package/scripts/cli/__tests__/basic.test.js +115 -0
  63. package/scripts/cli/__tests__/component-generator.test.js +332 -0
  64. package/scripts/cli/__tests__/integration.test.js +327 -0
  65. package/scripts/cli/__tests__/test-setup.js +133 -0
  66. package/scripts/cli/__tests__/token-manager.test.js +251 -0
  67. package/scripts/cli/__tests__/utils.test.js +161 -0
  68. package/scripts/cli/component-generator.js +253 -299
  69. package/scripts/cli/dependency-checker.js +355 -0
  70. package/scripts/cli/interactive-init.js +46 -5
  71. package/scripts/cli/template-manager.js +0 -2
  72. package/scripts/cli/templates/common-templates.js +636 -0
  73. package/scripts/cli/templates/composable-templates.js +148 -126
  74. package/scripts/cli/templates/index.js +23 -16
  75. package/scripts/cli/templates/project-templates.js +151 -23
  76. package/scripts/cli/templates/react-templates.js +280 -210
  77. package/scripts/cli/templates/scss-templates.js +90 -91
  78. package/scripts/cli/templates/testing-templates.js +206 -27
  79. package/scripts/cli/templates/testing-utils.js +278 -0
  80. package/scripts/cli/templates/types-templates.js +70 -56
  81. package/scripts/cli/theme-bridge.js +8 -2
  82. package/scripts/cli/token-manager.js +318 -206
  83. package/scripts/cli/utils.js +0 -1
  84. package/src/components/Accordion/Accordion.stories.tsx +369 -870
  85. package/src/components/AtomixGlass/AtomixGlass.tsx +80 -39
  86. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +103 -81
  87. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +8 -7
  88. package/src/components/AtomixGlass/glass-utils.ts +2 -2
  89. package/src/components/AtomixGlass/shader-utils.ts +5 -0
  90. package/src/components/AtomixGlass/stories/Customization.stories.tsx +131 -0
  91. package/src/components/AtomixGlass/stories/Examples.stories.tsx +2957 -2853
  92. package/src/components/AtomixGlass/stories/Modes.stories.tsx +1 -1
  93. package/src/components/AtomixGlass/stories/Overview.stories.tsx +348 -0
  94. package/src/components/AtomixGlass/stories/Performance.stories.tsx +103 -0
  95. package/src/components/AtomixGlass/stories/Playground.stories.tsx +50 -35
  96. package/src/components/AtomixGlass/stories/{ShaderVariants.stories.tsx → Shaders.stories.tsx} +1 -1
  97. package/src/components/AtomixGlass/stories/shared-components.tsx +90 -190
  98. package/src/components/Avatar/Avatar.stories.tsx +213 -1
  99. package/src/components/Badge/Badge.stories.tsx +121 -362
  100. package/src/components/Block/Block.stories.tsx +21 -12
  101. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +141 -23
  102. package/src/components/Button/Button.stories.tsx +463 -1126
  103. package/src/components/Button/Button.test.tsx +107 -0
  104. package/src/components/Button/Button.tsx +46 -50
  105. package/src/components/Button/ButtonGroup.stories.tsx +373 -217
  106. package/src/components/Callout/Callout.stories.tsx +289 -634
  107. package/src/components/Card/Card.stories.tsx +248 -68
  108. package/src/components/Chart/Chart.stories.tsx +150 -8
  109. package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +151 -69
  110. package/src/components/Countdown/Countdown.stories.tsx +115 -8
  111. package/src/components/DataTable/DataTable.stories.tsx +346 -146
  112. package/src/components/DatePicker/DatePicker.stories.tsx +325 -1066
  113. package/src/components/Dropdown/Dropdown.stories.tsx +153 -33
  114. package/src/components/EdgePanel/EdgePanel.stories.tsx +230 -21
  115. package/src/components/Footer/Footer.stories.tsx +392 -328
  116. package/src/components/Form/Checkbox.stories.tsx +140 -6
  117. package/src/components/Form/Checkbox.test.tsx +63 -0
  118. package/src/components/Form/Checkbox.tsx +87 -51
  119. package/src/components/Form/Form.stories.tsx +119 -20
  120. package/src/components/Form/FormGroup.stories.tsx +127 -4
  121. package/src/components/Form/Radio.stories.tsx +140 -5
  122. package/src/components/Form/Select.stories.tsx +140 -8
  123. package/src/components/Form/Textarea.stories.tsx +149 -6
  124. package/src/components/Hero/Hero.stories.tsx +333 -32
  125. package/src/components/List/List.stories.tsx +141 -3
  126. package/src/components/Modal/Modal.stories.tsx +181 -42
  127. package/src/components/Popover/Popover.stories.tsx +448 -98
  128. package/src/components/Progress/Progress.stories.tsx +167 -5
  129. package/src/components/River/River.stories.tsx +1 -1
  130. package/src/components/SectionIntro/SectionIntro.stories.tsx +240 -48
  131. package/src/components/Spinner/Spinner.stories.tsx +102 -8
  132. package/src/components/Steps/Steps.stories.tsx +172 -43
  133. package/src/components/Tabs/Tabs.stories.tsx +136 -10
  134. package/src/components/Testimonial/Testimonial.stories.tsx +120 -3
  135. package/src/components/Todo/Todo.stories.tsx +198 -9
  136. package/src/components/Toggle/Toggle.stories.tsx +126 -39
  137. package/src/components/Tooltip/Tooltip.stories.tsx +194 -104
  138. package/src/components/Upload/Upload.stories.tsx +113 -24
  139. package/src/lib/README.md +2 -2
  140. package/src/lib/__tests__/theme-tools.test.ts +193 -0
  141. package/src/lib/composables/index.ts +2 -2
  142. package/src/lib/composables/useAtomixGlass.ts +28 -56
  143. package/src/lib/composables/useChartExport.ts +2 -7
  144. package/src/lib/composables/useDataTable.ts +46 -29
  145. package/src/lib/constants/components.ts +9 -32
  146. package/src/lib/theme/devtools/CLI.ts +1 -1
  147. package/src/lib/types/components.ts +1 -1
  148. package/src/lib/utils/__tests__/csv.test.ts +45 -0
  149. package/src/lib/utils/csv.ts +17 -0
  150. package/src/lib/utils/dataTableExport.ts +1 -10
  151. package/src/styles/01-settings/_index.scss +2 -1
  152. package/src/styles/01-settings/_settings.accordion.scss +28 -7
  153. package/src/styles/01-settings/_settings.colors.scss +11 -11
  154. package/src/styles/01-settings/_settings.typography.scss +5 -5
  155. package/src/styles/02-tools/_tools.utility-api.scss +14 -0
  156. package/src/styles/06-components/_components.accordion.scss +56 -14
  157. package/src/styles/06-components/_components.checkbox.scss +23 -17
  158. package/src/styles/99-utilities/_index.scss +2 -0
  159. package/src/styles/99-utilities/_utilities.scss +3 -1
  160. package/src/styles/99-utilities/_utilities.text-gradient.scss +45 -0
  161. package/themes/dark-complementary/README.md +98 -0
  162. package/themes/dark-complementary/index.scss +158 -0
  163. package/themes/default-light/README.md +81 -0
  164. package/themes/default-light/index.scss +154 -0
  165. package/themes/high-contrast/README.md +105 -0
  166. package/themes/high-contrast/index.scss +172 -0
  167. package/themes/test-theme/README.md +38 -0
  168. package/themes/test-theme/index.scss +47 -0
  169. package/scripts/cli/templates-original-backup.js +0 -1655
  170. package/scripts/cli/templates_backup.js +0 -684
  171. package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +0 -1438
  172. package/src/lib/composables/useButton.ts +0 -93
  173. 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
- '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.',
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
- defaultValue: 'primary',
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
- defaultValue: 'md',
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: 'text',
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: { type: 'boolean' },
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
- * Primary button variant - the main call-to-action style.
294
+ * Basic button usage with minimal props
123
295
  */
124
- export const Primary: Story = {
296
+ export const BasicUsage: Story = {
125
297
  args: {
126
- label: 'Primary Button',
298
+ label: 'Basic Button',
127
299
  variant: 'primary',
128
300
  size: 'md',
129
301
  },
130
302
  };
131
303
 
132
304
  /**
133
- * Secondary button variant - used for secondary actions.
305
+ * Button with all available props configured
134
306
  */
135
- export const Secondary: Story = {
307
+ export const WithAllProps: Story = {
136
308
  args: {
137
- label: 'Secondary Button',
138
- variant: 'secondary',
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
- * Success button variant - indicates successful or positive actions.
145
- */
146
- export const Success: Story = {
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
- * Info button variant - used for informational actions.
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
- * Warning button variant - indicates caution or warning actions.
332
+ * Shows all available button color variants
167
333
  */
168
- export const Warning: Story = {
169
- args: {
170
- label: 'Warning Button',
171
- variant: 'warning',
172
- size: 'md',
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
- * Outline primary button variant - outlined style with primary color.
345
+ * Shows all available outline button variants
189
346
  */
190
- export const OutlinePrimary: Story = {
191
- args: {
192
- label: 'Outline Primary',
193
- variant: 'outline-primary',
194
- size: 'md',
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
- * Outline secondary button variant - outlined style with secondary color.
363
+ * Shows all available button sizes
200
364
  */
201
- export const OutlineSecondary: Story = {
202
- args: {
203
- label: 'Outline Secondary',
204
- variant: 'outline-secondary',
205
- size: 'md',
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
- * Link button variant - styled as a text link.
376
+ * Shows default state of the button (normal, interactive state)
211
377
  */
212
- export const LinkButton: Story = {
378
+ export const DefaultState: Story = {
213
379
  args: {
214
- label: 'Link Button',
215
- variant: 'link',
380
+ label: 'Default Button',
381
+ variant: 'primary',
216
382
  size: 'md',
217
383
  },
218
384
  };
219
385
 
220
386
  /**
221
- * Small size button variant.
387
+ * Shows button in loading state with spinner
222
388
  */
223
- export const Small: Story = {
389
+ export const LoadingState: Story = {
224
390
  args: {
225
- label: 'Small Button',
391
+ label: 'Loading...',
226
392
  variant: 'primary',
227
- size: 'sm',
393
+ size: 'md',
394
+ loading: true,
228
395
  },
229
396
  };
230
397
 
231
398
  /**
232
- * Medium size button variant (default).
399
+ * Shows button in disabled state (non-interactive)
233
400
  */
234
- export const Medium: Story = {
401
+ export const DisabledState: Story = {
235
402
  args: {
236
- label: 'Medium Button',
403
+ label: 'Disabled Button',
237
404
  variant: 'primary',
238
405
  size: 'md',
406
+ disabled: true,
239
407
  },
240
408
  };
241
409
 
242
410
  /**
243
- * Large size button variant.
411
+ * Shows button in active state
244
412
  */
245
- export const Large: Story = {
413
+ export const ActiveState: Story = {
246
414
  args: {
247
- label: 'Large Button',
415
+ label: 'Active Button',
248
416
  variant: 'primary',
249
- size: 'lg',
417
+ size: 'md',
418
+ active: true,
250
419
  },
251
420
  };
252
421
 
253
422
  /**
254
- * Disabled button state - non-interactive button.
423
+ * Shows button in selected state
255
424
  */
256
- export const Disabled: Story = {
425
+ export const SelectedState: Story = {
257
426
  args: {
258
- label: 'Disabled Button',
427
+ label: 'Selected Button',
259
428
  variant: 'primary',
260
429
  size: 'md',
261
- disabled: true,
430
+ selected: true,
262
431
  },
263
432
  };
264
433
 
434
+ // ============================================================================
435
+ // WITH FEATURES STORIES
436
+ // ============================================================================
437
+
265
438
  /**
266
- * Button with icon - displays an icon alongside the label.
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
- * Icon-only button - displays only an icon without text.
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 IconOnly: Story = {
465
+ export const WithIconOnly: Story = {
281
466
  args: {
282
- label: 'Add',
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
- * Showcase of all button color variants in a single view.
476
+ * Shows complex nested content in button
292
477
  */
293
- export const AllVariants: Story = {
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
- <div className="u-flex u-flex-wrap u-gap-2">
307
- <Button label="Primary" variant="primary" />
308
- <Button label="Secondary" variant="secondary" />
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
- * Showcase of all outline button variants in a single view.
487
+ * Shows button with helper text or description
321
488
  */
322
- export const AllOutlineVariants: Story = {
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-wrap u-gap-2">
336
- <Button label="Outline Primary" variant="outline-primary" />
337
- <Button label="Outline Secondary" variant="outline-secondary" />
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
- * Showcase of all button sizes (small, medium, large) in a single view.
503
+ * Shows button with custom inline styles
350
504
  */
351
- export const AllSizes: Story = {
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
- parameters: {
357
- docs: {
358
- description: {
359
- story: 'Compares all available button sizes to help choose the appropriate size for your use case.',
360
- },
361
- },
362
- },
363
- render: () => (
364
- <div className="u-flex u-items-center u-gap-2">
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
- * Showcase of button icon variants and icon-only buttons.
524
+ * Shows button with custom CSS class
374
525
  */
375
- export const IconButtonVariants: Story = {
526
+ export const WithClassName: Story = {
376
527
  args: {
377
- label: 'Button',
528
+ label: 'Styled with Class',
378
529
  variant: 'primary',
379
- icon: <Icon />,
380
- iconOnly: true,
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
- * Rounded button - fully rounded (pill-shaped) button style.
536
+ * Shows button with additional HTML attributes
396
537
  */
397
- export const Rounded: Story = {
538
+ export const WithAttributes: Story = {
398
539
  args: {
399
- label: 'Rounded Button',
540
+ label: 'Button with Attributes',
400
541
  variant: 'primary',
401
542
  size: 'md',
402
- rounded: true,
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
- * Showcase of all button variants with rounded (pill) shape.
554
+ * Shows how button handles very long text
408
555
  */
409
- export const RoundedVariants: Story = {
556
+ export const LongText: Story = {
410
557
  args: {
411
- label: 'Button',
558
+ label: 'Very long text that might overflow or wrap to multiple lines in the button component',
412
559
  variant: 'primary',
413
- rounded: true,
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
- * Button using the label prop for text content.
565
+ * Shows button behavior when icon is missing
431
566
  */
432
- export const WithLabel: Story = {
567
+ export const NoIconFallback: Story = {
433
568
  args: {
434
- label: 'Button with Label',
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
- * Button using children prop for text content.
577
+ * Shows button with async callback handling
441
578
  */
442
- export const WithChildren: Story = {
443
- render: () => (
444
- <Button variant="primary">
445
- Button with Children
446
- </Button>
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 with icon and text content as children.
606
+ * Button used in a form context
452
607
  */
453
- export const WithIconAndText: Story = {
608
+ export const InForm: Story = {
454
609
  render: () => (
455
- <Button variant="primary">
456
- <Icon />
457
- Add Item
458
- </Button>
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 with glass morphism effect enabled.
618
+ * Button used in a card component
464
619
  */
465
- export const GlassEffect: Story = {
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
- style={{
561
- background:
562
- 'url(https://cdn.pixabay.com/photo/2018/08/15/13/10/new-year-background-3608029_1280.jpg)',
563
- backgroundSize: 'cover',
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
- export const GlassSizes: Story = {
584
- args: {
585
- label: 'Glass Button',
586
- variant: 'primary',
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 style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
689
- {/* Primary Glass Variants */}
690
- <div
691
- style={{
692
- background: 'url(https://cdn.pixabay.com/photo/2021/11/13/08/50/athens-6790780_1280.jpg)',
693
- backgroundSize: 'cover',
694
- backgroundPosition: 'center',
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
- // Glass Mode Variants - Prominent
899
- export const GlassModeProminent: Story = {
900
- args: {
901
- label: 'Prominent Glass Mode',
902
- variant: 'success',
903
- glass: {
904
- mode: 'prominent',
905
- displacementScale: 100,
906
- blurAmount: 2.5,
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
- // Glass Mode Variants - Shader
938
- export const GlassModeShader: Story = {
939
- args: {
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
- // All Glass Modes Comparison
977
- export const AllGlassModes: Story = {
667
+ /**
668
+ * Shows proper ARIA labels for accessibility
669
+ */
670
+ export const WithAriaLabels: Story = {
978
671
  render: () => (
979
- <div
980
- style={{
981
- background: 'url(https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920)',
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
- // Glass Button States Showcase
1181
- export const GlassStatesShowcase: Story = {
679
+ /**
680
+ * Shows button with keyboard navigation support
681
+ */
682
+ export const WithKeyboardNavigation: Story = {
1182
683
  render: () => (
1183
- <div
1184
- style={{
1185
- background: 'url(https://images.unsplash.com/photo-1519681393784-d120267933ba?w=1920)',
1186
- backgroundSize: 'cover',
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
- * Button in loading state - shows loading spinner.
693
+ * Shows button with screen reader announcements
1288
694
  */
1289
- export const Loading: Story = {
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 style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
1312
- <Button label="Loading Primary" variant="primary" loading />
1313
- <Button label="Loading Secondary" variant="secondary" loading />
1314
- <Button label="Saving..." variant="success" loading loadingText="Saving..." />
1315
- <Button label="Deleting..." variant="error" loading loadingText="Deleting..." />
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
- * Full-width button - takes the full width of its container.
711
+ * Shows button in high contrast theme
1322
712
  */
1323
- export const FullWidth: Story = {
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={{ width: '400px', display: 'flex', flexDirection: 'column', gap: '1rem' }}>
1334
- <Button label="Full Width Primary" variant="primary" fullWidth />
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
- * Block-level button - displays as a block element.
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
- * Button with icon positioned at the start (left side).
726
+ * Shows mobile-optimized button configuration
1354
727
  */
1355
- export const IconStart: Story = {
728
+ export const OptimizedForMobile: Story = {
1356
729
  args: {
1357
- label: 'Icon Start',
730
+ label: 'Touch-Friendly',
1358
731
  variant: 'primary',
1359
- icon: <Icon />,
1360
- iconPosition: 'start',
732
+ size: 'lg',
1361
733
  },
1362
734
  };
1363
735
 
1364
736
  /**
1365
- * Button with icon positioned at the end (right side).
737
+ * Shows multiple button instances together
1366
738
  */
1367
- export const IconEnd: Story = {
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 style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
1379
- <Button label="Icon Start" variant="primary" icon={<Icon />} iconPosition="start" />
1380
- <Button label="Icon End" variant="secondary" icon={<Icon />} iconPosition="end" />
1381
- <Button label="Loading Start" variant="success" loading iconPosition="start" />
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
- * Button in active state - visually indicates active/pressed state.
754
+ * Shows button with glass effect enabled
1388
755
  */
1389
- export const Active: Story = {
1390
- args: {
1391
- label: 'Active Button',
1392
- variant: 'primary',
1393
- active: true,
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
- * Button in selected state - visually indicates selected state.
774
+ * Shows button with custom glass settings
1399
775
  */
1400
- export const Selected: Story = {
776
+ export const WithCustomGlassSettings: Story = {
1401
777
  args: {
1402
- label: 'Selected Button',
778
+ label: 'Custom Glass',
1403
779
  variant: 'primary',
1404
- selected: true,
1405
- },
1406
- };
1407
-
1408
- /**
1409
- * Comprehensive example showcasing multiple button features and states.
1410
- */
1411
- export const Comprehensive: Story = {
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
- render: () => (
1420
- <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem', maxWidth: '600px' }}>
1421
- <div>
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
  };