@12-apps/ui 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +16 -8
- package/src/button/index.ts +1 -0
- package/src/social-login-button/index.ts +1 -0
- package/src/{social-login-button.tsx → social-login-button/social-login-button.tsx} +5 -5
- package/src/user-avatar/index.ts +1 -0
- package/src/{user-avatar.tsx → user-avatar/user-avatar.tsx} +4 -4
- package/eslint.config.js +0 -89
- package/src/__tests__/data-grid.test.tsx +0 -125
- package/src/__tests__/package-wiring.test.ts +0 -41
- package/src/__tests__/setup.ts +0 -1
- package/src/__tests__/social-login-button.test.tsx +0 -186
- package/src/__tests__/user-avatar.test.tsx +0 -195
- package/src/__tests__/viewport.test.ts +0 -50
- package/src/components/command/__tests__/command.test.tsx +0 -112
- package/src/components/data-display/Alert/Alert.stories.tsx +0 -559
- package/src/components/data-display/Alert/Alert.test.stories.tsx +0 -707
- package/src/components/data-display/AlertDialog/AlertDialog.stories.tsx +0 -362
- package/src/components/data-display/AlertDialog/AlertDialog.test.stories.tsx +0 -763
- package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.stories.tsx +0 -230
- package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.test.stories.tsx +0 -270
- package/src/components/data-display/Avatar/Avatar.stories.tsx +0 -721
- package/src/components/data-display/Avatar/Avatar.test.stories.tsx +0 -822
- package/src/components/data-display/Badge/Badge.stories.tsx +0 -1134
- package/src/components/data-display/Badge/Badge.test.stories.tsx +0 -1194
- package/src/components/data-display/Banner/Banner.stories.tsx +0 -528
- package/src/components/data-display/Banner/Banner.test.stories.tsx +0 -511
- package/src/components/data-display/Carousel/Carousel.stories.tsx +0 -607
- package/src/components/data-display/Carousel/Carousel.test.stories.tsx +0 -701
- package/src/components/data-display/Chart/Chart.stories.tsx +0 -568
- package/src/components/data-display/Chart/Chart.test.stories.tsx +0 -174
- package/src/components/data-display/Chart/SpecChart.stories.tsx +0 -150
- package/src/components/data-display/Chart/SpecChart.test.stories.tsx +0 -56
- package/src/components/data-display/Chart/__tests__/SpecChart.test.tsx +0 -60
- package/src/components/data-display/Chart/__tests__/chart-format.test.ts +0 -43
- package/src/components/data-display/Chart/__tests__/chart-spec.test.ts +0 -119
- package/src/components/data-display/Chip/Chip.stories.tsx +0 -252
- package/src/components/data-display/Chip/Chip.test.stories.tsx +0 -266
- package/src/components/data-display/DataGrid/DataGrid.stories.tsx +0 -515
- package/src/components/data-display/DataGrid/DataGrid.test.stories.tsx +0 -653
- package/src/components/data-display/DataViews/__tests__/DataViewsGrid.test.tsx +0 -271
- package/src/components/data-display/DataViews/__tests__/DataViewsTableBase.test.tsx +0 -134
- package/src/components/data-display/DataViews/__tests__/SaveViewModal.test.tsx +0 -83
- package/src/components/data-display/DataViews/__tests__/data-views-filter.test.ts +0 -115
- package/src/components/data-display/DataViews/__tests__/data-views-preview.test.ts +0 -53
- package/src/components/data-display/DataViews/__tests__/range-pill.test.tsx +0 -114
- package/src/components/data-display/DataViews/base-card.stories.tsx +0 -136
- package/src/components/data-display/DescriptionItem/DescriptionItem.stories.tsx +0 -254
- package/src/components/data-display/EmptyState/EmptyState.stories.tsx +0 -282
- package/src/components/data-display/EmptyState/EmptyState.test.stories.tsx +0 -441
- package/src/components/data-display/ErrorState/ErrorState.stories.tsx +0 -110
- package/src/components/data-display/ErrorState/ErrorState.test.stories.tsx +0 -133
- package/src/components/data-display/HoverCard/HoverCard.stories.tsx +0 -650
- package/src/components/data-display/HoverCard/HoverCard.test.stories.tsx +0 -929
- package/src/components/data-display/InteractiveTooltip/InteractiveTooltip.stories.tsx +0 -411
- package/src/components/data-display/LazyImage/LazyImage.stories.tsx +0 -387
- package/src/components/data-display/Lightbox/Lightbox.stories.tsx +0 -315
- package/src/components/data-display/Lightbox/Lightbox.test.stories.tsx +0 -598
- package/src/components/data-display/LoadingState/LoadingState.stories.tsx +0 -124
- package/src/components/data-display/LoadingState/LoadingState.test.stories.tsx +0 -99
- package/src/components/data-display/MapPreview/MapPreview.stories.tsx +0 -458
- package/src/components/data-display/MapPreview/MapPreview.test.stories.tsx +0 -394
- package/src/components/data-display/Popover/Popover.stories.tsx +0 -295
- package/src/components/data-display/Popover/Popover.test.stories.tsx +0 -1162
- package/src/components/data-display/Progress/Progress.stories.tsx +0 -481
- package/src/components/data-display/Progress/Progress.test.stories.tsx +0 -2070
- package/src/components/data-display/SectionOnboarding/SectionOnboarding.stories.tsx +0 -160
- package/src/components/data-display/SectionOnboarding/SectionOnboarding.test.stories.tsx +0 -190
- package/src/components/data-display/Sheet/Sheet.stories.tsx +0 -883
- package/src/components/data-display/Sheet/Sheet.test.stories.tsx +0 -1105
- package/src/components/data-display/StatCard/StatCard.stories.tsx +0 -167
- package/src/components/data-display/StatCard/StatCard.test.stories.tsx +0 -240
- package/src/components/data-display/Stepper/Stepper.stories.tsx +0 -540
- package/src/components/data-display/Stepper/Stepper.test.stories.tsx +0 -600
- package/src/components/data-display/Table/Table.stories.tsx +0 -803
- package/src/components/data-display/Table/Table.test.stories.tsx +0 -369
- package/src/components/data-display/Timeline/Timeline.stories.tsx +0 -442
- package/src/components/data-display/Timeline/Timeline.test.stories.tsx +0 -930
- package/src/components/data-display/TimingDiagram/TimingDiagram.stories.tsx +0 -475
- package/src/components/data-display/TimingDiagram/TimingDiagram.test.stories.tsx +0 -734
- package/src/components/data-display/Tooltip/Tooltip.stories.tsx +0 -468
- package/src/components/data-display/Tooltip/Tooltip.test.stories.tsx +0 -1154
- package/src/components/feedback/ConfirmAction/ConfirmAction.stories.tsx +0 -146
- package/src/components/feedback/ConfirmAction/ConfirmAction.test.stories.tsx +0 -114
- package/src/components/feedback/ConfirmAction/__tests__/confirm-action.test.tsx +0 -288
- package/src/components/feedback/Dialog/Dialog.stories.tsx +0 -833
- package/src/components/feedback/Dialog/Dialog.test.stories.tsx +0 -964
- package/src/components/feedback/Dialog/__tests__/dialog-content-spacing.test.tsx +0 -66
- package/src/components/feedback/Modal/Modal.stories.tsx +0 -765
- package/src/components/feedback/Modal/Modal.test.stories.tsx +0 -251
- package/src/components/feedback/Sonner/Sonner.stories.tsx +0 -698
- package/src/components/feedback/Sonner/Sonner.test.stories.tsx +0 -896
- package/src/components/feedback/StackedModal/StackedModal.stories.tsx +0 -1783
- package/src/components/feedback/StackedModal/StackedModal.test.stories.tsx +0 -973
- package/src/components/feedback/StackedModal/__tests__/stacked-modal-viewport.test.tsx +0 -104
- package/src/components/feedback/Toast/Toast.stories.tsx +0 -548
- package/src/components/feedback/Toast/Toast.test.stories.tsx +0 -834
- package/src/components/feedback/TutorialOverlay/TutorialOverlay.stories.tsx +0 -691
- package/src/components/feedback/TutorialOverlay/TutorialOverlay.test.stories.tsx +0 -634
- package/src/components/form/AddressAutocomplete/AddressAutocomplete.stories.tsx +0 -665
- package/src/components/form/AddressAutocomplete/AddressAutocomplete.test.stories.tsx +0 -727
- package/src/components/form/Autocomplete/Autocomplete.stories.tsx +0 -715
- package/src/components/form/Autocomplete/Autocomplete.test.stories.tsx +0 -825
- package/src/components/form/Button/Button.stories.tsx +0 -365
- package/src/components/form/Button/Button.test.stories.tsx +0 -607
- package/src/components/form/Calendar/Calendar.stories.tsx +0 -349
- package/src/components/form/Calendar/Calendar.test.stories.tsx +0 -464
- package/src/components/form/CepField/CepField.stories.tsx +0 -138
- package/src/components/form/CepField/CepField.test.stories.tsx +0 -281
- package/src/components/form/Checkbox/Checkbox.stories.tsx +0 -265
- package/src/components/form/Checkbox/Checkbox.test.stories.tsx +0 -181
- package/src/components/form/CodeEditor/CodeEditor.stories.tsx +0 -871
- package/src/components/form/CodeEditor/CodeEditor.test.stories.tsx +0 -574
- package/src/components/form/Command/Command.stories.tsx +0 -580
- package/src/components/form/Command/Command.test.stories.tsx +0 -215
- package/src/components/form/CreatableSelect/CreatableSelect.stories.tsx +0 -112
- package/src/components/form/CreatableSelect/CreatableSelect.test.stories.tsx +0 -134
- package/src/components/form/Form/Form.stories.tsx +0 -687
- package/src/components/form/Form/Form.test.stories.tsx +0 -601
- package/src/components/form/Input/Input.stories.tsx +0 -260
- package/src/components/form/Input/Input.test.stories.tsx +0 -1191
- package/src/components/form/InputOTP/InputOTP.stories.tsx +0 -774
- package/src/components/form/InputOTP/InputOTP.test.stories.tsx +0 -588
- package/src/components/form/Label/Label.stories.tsx +0 -473
- package/src/components/form/Label/Label.test.stories.tsx +0 -915
- package/src/components/form/Menubar/Menubar.stories.tsx +0 -472
- package/src/components/form/Menubar/Menubar.test.stories.tsx +0 -584
- package/src/components/form/PasswordStrength/PasswordStrength.stories.tsx +0 -562
- package/src/components/form/PasswordStrength/PasswordStrength.test.stories.tsx +0 -327
- package/src/components/form/PhoneInput/PhoneInput.stories.tsx +0 -495
- package/src/components/form/PhoneInput/PhoneInput.test.stories.tsx +0 -666
- package/src/components/form/RadioGroup/RadioGroup.stories.tsx +0 -518
- package/src/components/form/RadioGroup/RadioGroup.test.stories.tsx +0 -685
- package/src/components/form/RichTextEditor/RichTextEditor.stories.tsx +0 -261
- package/src/components/form/RichTextEditor/RichTextEditor.test.stories.tsx +0 -491
- package/src/components/form/SearchPalette/SearchPalette.stories.tsx +0 -135
- package/src/components/form/Select/Select.stories.tsx +0 -364
- package/src/components/form/Select/Select.test.stories.tsx +0 -985
- package/src/components/form/Slider/Slider.stories.tsx +0 -418
- package/src/components/form/Slider/Slider.test.stories.tsx +0 -1042
- package/src/components/form/Switch/Switch.stories.tsx +0 -697
- package/src/components/form/Switch/Switch.test.stories.tsx +0 -597
- package/src/components/form/Textarea/Textarea.stories.tsx +0 -473
- package/src/components/form/Textarea/Textarea.test.stories.tsx +0 -702
- package/src/components/form/Toggle/Toggle.stories.tsx +0 -638
- package/src/components/form/Toggle/Toggle.test.stories.tsx +0 -1159
- package/src/components/form/ToggleGroup/ToggleGroup.stories.tsx +0 -617
- package/src/components/form/ToggleGroup/ToggleGroup.test.stories.tsx +0 -915
- package/src/components/form/UploadButton/UploadButton.stories.tsx +0 -367
- package/src/components/form/UploadButton/UploadButton.test.stories.tsx +0 -573
- package/src/components/form/total-form/total-form.test.tsx +0 -214
- package/src/components/layout/Accordion/Accordion.stories.tsx +0 -694
- package/src/components/layout/Accordion/Accordion.test.stories.tsx +0 -1344
- package/src/components/layout/Card/Card.stories.tsx +0 -591
- package/src/components/layout/Card/Card.test.stories.tsx +0 -1134
- package/src/components/layout/CardGrid/__tests__/CardGrid.test.tsx +0 -92
- package/src/components/layout/Collapsible/Collapsible.stories.tsx +0 -180
- package/src/components/layout/Collapsible/Collapsible.test.stories.tsx +0 -308
- package/src/components/layout/Container/Container.stories.tsx +0 -557
- package/src/components/layout/Container/Container.test.stories.tsx +0 -745
- package/src/components/layout/ContentToolbar/ContentToolbar.stories.tsx +0 -129
- package/src/components/layout/ContentToolbar/ContentToolbar.test.stories.tsx +0 -251
- package/src/components/layout/ContentToolbar/__tests__/ColumnsMenu.test.tsx +0 -39
- package/src/components/layout/ContentToolbar/__tests__/MultiSelectDropdown.test.tsx +0 -131
- package/src/components/layout/ContentToolbar/__tests__/SavedViewsMenu.test.tsx +0 -99
- package/src/components/layout/Dashboard/Dashboard.stories.tsx +0 -104
- package/src/components/layout/Dashboard/Dashboard.test.stories.tsx +0 -190
- package/src/components/layout/Drawer/Drawer.stories.tsx +0 -658
- package/src/components/layout/Drawer/Drawer.test.stories.tsx +0 -1343
- package/src/components/layout/Resizable/Resizable.stories.tsx +0 -1039
- package/src/components/layout/Resizable/Resizable.test.stories.tsx +0 -754
- package/src/components/layout/ScrollArea/ScrollArea.stories.tsx +0 -651
- package/src/components/layout/ScrollArea/ScrollArea.test.stories.tsx +0 -619
- package/src/components/layout/Separator/Separator.stories.tsx +0 -563
- package/src/components/layout/Separator/Separator.test.stories.tsx +0 -518
- package/src/components/layout/SettingsLayout/SettingsLayout.stories.tsx +0 -192
- package/src/components/layout/SettingsLayout/SettingsLayout.test.stories.tsx +0 -175
- package/src/components/layout/Sidebar/Sidebar.stories.tsx +0 -609
- package/src/components/layout/Sidebar/Sidebar.test.stories.tsx +0 -1324
- package/src/components/layout/Skeleton/Skeleton.stories.tsx +0 -689
- package/src/components/layout/Skeleton/Skeleton.test.stories.tsx +0 -521
- package/src/components/layout/Spacer/Spacer.stories.tsx +0 -502
- package/src/components/layout/Spacer/Spacer.test.stories.tsx +0 -474
- package/src/components/layout/TableFilter/TableFilter.stories.tsx +0 -82
- package/src/components/layout/TableFilter/TableFilter.test.stories.tsx +0 -87
- package/src/components/navigation/Breadcrumbs/Breadcrumbs.stories.tsx +0 -638
- package/src/components/navigation/Breadcrumbs/Breadcrumbs.test.stories.tsx +0 -1008
- package/src/components/navigation/CommandPalette/CommandPalette.stories.tsx +0 -386
- package/src/components/navigation/CommandPalette/CommandPalette.test.stories.tsx +0 -435
- package/src/components/navigation/ContextMenu/ContextMenu.stories.tsx +0 -614
- package/src/components/navigation/ContextMenu/ContextMenu.test.stories.tsx +0 -845
- package/src/components/navigation/DropdownMenu/DropdownMenu.stories.tsx +0 -578
- package/src/components/navigation/DropdownMenu/DropdownMenu.test.stories.tsx +0 -660
- package/src/components/navigation/NavigationMenu/stories/NavigationMenu.stories.tsx +0 -516
- package/src/components/navigation/NavigationMenu/stories/NavigationMenu.test.stories.tsx +0 -935
- package/src/components/navigation/NavigationMenu/stories/NavigationMenuHorizontal.stories.tsx +0 -501
- package/src/components/navigation/NavigationMenu/stories/NavigationMenuVertical.stories.tsx +0 -453
- package/src/components/navigation/Pagination/Pagination.stories.tsx +0 -602
- package/src/components/navigation/Pagination/Pagination.test.stories.tsx +0 -520
- package/src/components/navigation/Tabs/Tabs.stories.tsx +0 -1004
- package/src/components/navigation/Tabs/Tabs.test.stories.tsx +0 -1225
- package/src/components/typography/Blockquote/Blockquote.stories.tsx +0 -359
- package/src/components/typography/Blockquote/Blockquote.test.stories.tsx +0 -432
- package/src/components/typography/Code/Code.stories.tsx +0 -686
- package/src/components/typography/Code/Code.test.stories.tsx +0 -703
- package/src/components/typography/Heading/Heading.stories.tsx +0 -451
- package/src/components/typography/Heading/Heading.test.stories.tsx +0 -830
- package/src/components/typography/Paragraph/Paragraph.stories.tsx +0 -280
- package/src/components/typography/Paragraph/Paragraph.test.stories.tsx +0 -231
- package/src/components/typography/Text/Text.stories.tsx +0 -359
- package/src/components/typography/Text/Text.test.stories.tsx +0 -759
- package/src/components/utility/AnimatedIcon/AnimatedIcon.stories.tsx +0 -945
- package/src/components/utility/AnimatedIcon/AnimatedIcon.test.stories.tsx +0 -603
- package/src/components/utility/AspectRatio/AspectRatio.stories.tsx +0 -414
- package/src/components/utility/AspectRatio/AspectRatio.test.stories.tsx +0 -859
- package/src/components/utility/InfiniteScroll/InfiniteScroll.stories.tsx +0 -620
- package/src/components/utility/InfiniteScroll/InfiniteScroll.test.stories.tsx +0 -361
- package/src/components/utility/InstallPrompt/InstallPrompt.stories.tsx +0 -118
- package/src/components/utility/InstallPrompt/InstallPrompt.test.stories.tsx +0 -83
- package/src/components/utility/InstallPrompt/__tests__/InstallPrompt.ios.test.tsx +0 -65
- package/src/components/utility/InstallPrompt/__tests__/usePwaInstall.test.tsx +0 -271
- package/src/components/utility/Portal/Portal.stories.tsx +0 -340
- package/src/components/utility/Portal/Portal.test.stories.tsx +0 -2086
- package/src/components/utility/Transition/Transition.stories.tsx +0 -493
- package/src/components/utility/Transition/Transition.test.stories.tsx +0 -854
- package/src/components/utility/VirtualList/VirtualList.stories.tsx +0 -1073
- package/src/components/utility/VirtualList/VirtualList.test.stories.tsx +0 -1085
- package/src/components/utility/WorkflowStep/WorkflowStep.stories.tsx +0 -431
- package/src/components/utility/WorkflowStep/WorkflowStep.test.stories.tsx +0 -364
- /package/src/{button.tsx → button/button.tsx} +0 -0
|
@@ -1,833 +0,0 @@
|
|
|
1
|
-
import { Box,Button, Typography } from '@mui/material';
|
|
2
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
|
|
5
|
-
import { Dialog, DialogActions,DialogContent, DialogHeader } from './Dialog';
|
|
6
|
-
|
|
7
|
-
const meta: Meta<typeof Dialog> = {
|
|
8
|
-
title: 'Feedback/Dialog',
|
|
9
|
-
component: Dialog,
|
|
10
|
-
tags: ['autodocs', 'component:Dialog'],
|
|
11
|
-
parameters: {
|
|
12
|
-
layout: 'centered',
|
|
13
|
-
docs: {
|
|
14
|
-
description: {
|
|
15
|
-
component: 'A versatile dialog component with glass morphism, gradient, and multiple variant support.',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
argTypes: {
|
|
20
|
-
variant: {
|
|
21
|
-
control: 'select',
|
|
22
|
-
options: ['default', 'glass', 'fullscreen', 'drawer'],
|
|
23
|
-
description: 'Visual style variant of the dialog',
|
|
24
|
-
},
|
|
25
|
-
size: {
|
|
26
|
-
control: 'select',
|
|
27
|
-
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
28
|
-
description: 'Size of the dialog',
|
|
29
|
-
},
|
|
30
|
-
borderRadius: {
|
|
31
|
-
control: 'select',
|
|
32
|
-
options: ['none', 'sm', 'md', 'lg', 'xl'],
|
|
33
|
-
description: 'Border radius of the dialog',
|
|
34
|
-
},
|
|
35
|
-
glass: {
|
|
36
|
-
control: 'boolean',
|
|
37
|
-
description: 'Enable glass morphism effect',
|
|
38
|
-
},
|
|
39
|
-
gradient: {
|
|
40
|
-
control: 'boolean',
|
|
41
|
-
description: 'Enable gradient background',
|
|
42
|
-
},
|
|
43
|
-
glow: {
|
|
44
|
-
control: 'boolean',
|
|
45
|
-
description: 'Enable glow effect',
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export default meta;
|
|
51
|
-
type Story = StoryObj<typeof Dialog>;
|
|
52
|
-
|
|
53
|
-
const DialogWrapper = ({ children, ...args }: { children: React.ReactNode; [key: string]: unknown }) => {
|
|
54
|
-
const [open, setOpen] = useState(false);
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<Box>
|
|
58
|
-
<Button variant="contained" onClick={() => setOpen(true)}>
|
|
59
|
-
Open Dialog
|
|
60
|
-
</Button>
|
|
61
|
-
<Dialog {...args} open={open} onClose={() => setOpen(false)}>
|
|
62
|
-
{children}
|
|
63
|
-
</Dialog>
|
|
64
|
-
</Box>
|
|
65
|
-
);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export const Default: Story = {
|
|
69
|
-
render: (args) => (
|
|
70
|
-
<DialogWrapper {...args}>
|
|
71
|
-
<DialogHeader
|
|
72
|
-
title="Default Dialog"
|
|
73
|
-
subtitle="A clean, minimal dialog design"
|
|
74
|
-
/>
|
|
75
|
-
<DialogContent>
|
|
76
|
-
<Typography>
|
|
77
|
-
This is a default dialog with standard Material-UI styling.
|
|
78
|
-
Perfect for most use cases requiring user interaction.
|
|
79
|
-
</Typography>
|
|
80
|
-
</DialogContent>
|
|
81
|
-
<DialogActions>
|
|
82
|
-
<Button>Cancel</Button>
|
|
83
|
-
<Button variant="contained">Confirm</Button>
|
|
84
|
-
</DialogActions>
|
|
85
|
-
</DialogWrapper>
|
|
86
|
-
),
|
|
87
|
-
args: {
|
|
88
|
-
variant: 'default',
|
|
89
|
-
size: 'md',
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export const GlassMorphism: Story = {
|
|
94
|
-
render: (args) => (
|
|
95
|
-
<DialogWrapper {...args}>
|
|
96
|
-
<DialogHeader
|
|
97
|
-
title="Glass Dialog"
|
|
98
|
-
subtitle="Beautiful glass morphism effect"
|
|
99
|
-
/>
|
|
100
|
-
<DialogContent>
|
|
101
|
-
<Typography>
|
|
102
|
-
Experience the modern glass morphism design with blur effects
|
|
103
|
-
and translucent backgrounds. Perfect for contemporary interfaces.
|
|
104
|
-
</Typography>
|
|
105
|
-
</DialogContent>
|
|
106
|
-
<DialogActions>
|
|
107
|
-
<Button>Cancel</Button>
|
|
108
|
-
<Button variant="contained">Accept</Button>
|
|
109
|
-
</DialogActions>
|
|
110
|
-
</DialogWrapper>
|
|
111
|
-
),
|
|
112
|
-
args: {
|
|
113
|
-
variant: 'glass',
|
|
114
|
-
size: 'md',
|
|
115
|
-
glow: true,
|
|
116
|
-
},
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
export const GradientGlow: Story = {
|
|
120
|
-
render: (args) => (
|
|
121
|
-
<DialogWrapper {...args}>
|
|
122
|
-
<DialogHeader
|
|
123
|
-
title="Gradient Glow Dialog"
|
|
124
|
-
subtitle="Stunning gradient with glow effects"
|
|
125
|
-
/>
|
|
126
|
-
<DialogContent>
|
|
127
|
-
<Typography>
|
|
128
|
-
A premium dialog with gradient backgrounds and glow effects.
|
|
129
|
-
Ideal for highlighting important actions or premium features.
|
|
130
|
-
</Typography>
|
|
131
|
-
</DialogContent>
|
|
132
|
-
<DialogActions>
|
|
133
|
-
<Button>Skip</Button>
|
|
134
|
-
<Button variant="contained">Upgrade Now</Button>
|
|
135
|
-
</DialogActions>
|
|
136
|
-
</DialogWrapper>
|
|
137
|
-
),
|
|
138
|
-
args: {
|
|
139
|
-
variant: 'default',
|
|
140
|
-
gradient: true,
|
|
141
|
-
glow: true,
|
|
142
|
-
size: 'lg',
|
|
143
|
-
borderRadius: 'xl',
|
|
144
|
-
},
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
export const Fullscreen: Story = {
|
|
148
|
-
render: (args) => (
|
|
149
|
-
<DialogWrapper {...args}>
|
|
150
|
-
<DialogHeader
|
|
151
|
-
title="Fullscreen Dialog"
|
|
152
|
-
subtitle="Immersive fullscreen experience"
|
|
153
|
-
/>
|
|
154
|
-
<DialogContent>
|
|
155
|
-
<Box sx={{ py: 4 }}>
|
|
156
|
-
<Typography variant="h4" gutterBottom>
|
|
157
|
-
Fullscreen Content
|
|
158
|
-
</Typography>
|
|
159
|
-
<Typography paragraph>
|
|
160
|
-
This fullscreen dialog provides an immersive experience perfect for
|
|
161
|
-
complex forms, detailed views, or step-by-step processes.
|
|
162
|
-
</Typography>
|
|
163
|
-
<Typography paragraph>
|
|
164
|
-
The fullscreen variant automatically adapts to mobile devices and
|
|
165
|
-
provides optimal space utilization.
|
|
166
|
-
</Typography>
|
|
167
|
-
</Box>
|
|
168
|
-
</DialogContent>
|
|
169
|
-
<DialogActions>
|
|
170
|
-
<Button>Cancel</Button>
|
|
171
|
-
<Button variant="contained">Save</Button>
|
|
172
|
-
</DialogActions>
|
|
173
|
-
</DialogWrapper>
|
|
174
|
-
),
|
|
175
|
-
args: {
|
|
176
|
-
variant: 'fullscreen',
|
|
177
|
-
},
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
export const DrawerStyle: Story = {
|
|
181
|
-
render: (args) => (
|
|
182
|
-
<DialogWrapper {...args}>
|
|
183
|
-
<DialogHeader
|
|
184
|
-
title="Drawer Dialog"
|
|
185
|
-
subtitle="Slide-in panel design"
|
|
186
|
-
/>
|
|
187
|
-
<DialogContent>
|
|
188
|
-
<Typography paragraph>
|
|
189
|
-
The drawer variant slides in from the right, perfect for forms,
|
|
190
|
-
settings panels, or detailed information views.
|
|
191
|
-
</Typography>
|
|
192
|
-
<Typography paragraph>
|
|
193
|
-
This design pattern is especially popular in modern web applications
|
|
194
|
-
for secondary content and actions.
|
|
195
|
-
</Typography>
|
|
196
|
-
</DialogContent>
|
|
197
|
-
<DialogActions>
|
|
198
|
-
<Button>Close</Button>
|
|
199
|
-
<Button variant="contained">Apply</Button>
|
|
200
|
-
</DialogActions>
|
|
201
|
-
</DialogWrapper>
|
|
202
|
-
),
|
|
203
|
-
args: {
|
|
204
|
-
variant: 'drawer',
|
|
205
|
-
size: 'sm',
|
|
206
|
-
},
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
const AllSizesComponent = () => {
|
|
210
|
-
const sizes = ['xs', 'sm', 'md', 'lg', 'xl'] as const;
|
|
211
|
-
const [openStates, setOpenStates] = useState<Record<string, boolean>>({});
|
|
212
|
-
|
|
213
|
-
const handleOpen = (size: string) => {
|
|
214
|
-
setOpenStates(prev => ({ ...prev, [size]: true }));
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
const handleClose = (size: string) => {
|
|
218
|
-
setOpenStates(prev => ({ ...prev, [size]: false }));
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
return (
|
|
222
|
-
<Box sx={{ display: 'flex', gap: 2, flexWrap: 'wrap' }}>
|
|
223
|
-
{sizes.map(size => (
|
|
224
|
-
<Box key={size}>
|
|
225
|
-
<Button
|
|
226
|
-
variant="outlined"
|
|
227
|
-
onClick={() => handleOpen(size)}
|
|
228
|
-
size="small"
|
|
229
|
-
>
|
|
230
|
-
{size.toUpperCase()}
|
|
231
|
-
</Button>
|
|
232
|
-
<Dialog
|
|
233
|
-
open={openStates[size] || false}
|
|
234
|
-
onClose={() => handleClose(size)}
|
|
235
|
-
size={size}
|
|
236
|
-
variant="glass"
|
|
237
|
-
>
|
|
238
|
-
<DialogHeader title={`${size.toUpperCase()} Dialog`} />
|
|
239
|
-
<DialogContent>
|
|
240
|
-
<Typography>
|
|
241
|
-
This is a {size} sized dialog demonstrating responsive sizing.
|
|
242
|
-
</Typography>
|
|
243
|
-
</DialogContent>
|
|
244
|
-
<DialogActions>
|
|
245
|
-
<Button onClick={() => handleClose(size)}>Close</Button>
|
|
246
|
-
</DialogActions>
|
|
247
|
-
</Dialog>
|
|
248
|
-
</Box>
|
|
249
|
-
))}
|
|
250
|
-
</Box>
|
|
251
|
-
);
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
export const AllSizes: Story = {
|
|
255
|
-
render: () => <AllSizesComponent />,
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
// Additional comprehensive stories
|
|
259
|
-
export const WithCustomActions: Story = {
|
|
260
|
-
render: (args) => (
|
|
261
|
-
<DialogWrapper {...args}>
|
|
262
|
-
<DialogHeader
|
|
263
|
-
title="Custom Actions Dialog"
|
|
264
|
-
subtitle="Dialog with custom action alignment and spacing"
|
|
265
|
-
/>
|
|
266
|
-
<DialogContent>
|
|
267
|
-
<Typography paragraph>
|
|
268
|
-
This dialog demonstrates custom action alignment and spacing options.
|
|
269
|
-
You can align actions to left, center, right, or space-between.
|
|
270
|
-
</Typography>
|
|
271
|
-
</DialogContent>
|
|
272
|
-
<DialogActions alignment="space-between" spacing={2}>
|
|
273
|
-
<Button variant="outlined" color="error">Delete</Button>
|
|
274
|
-
<Box sx={{ display: 'flex', gap: 1 }}>
|
|
275
|
-
<Button>Cancel</Button>
|
|
276
|
-
<Button variant="contained">Save Changes</Button>
|
|
277
|
-
</Box>
|
|
278
|
-
</DialogActions>
|
|
279
|
-
</DialogWrapper>
|
|
280
|
-
),
|
|
281
|
-
args: {
|
|
282
|
-
variant: 'default',
|
|
283
|
-
size: 'md',
|
|
284
|
-
borderRadius: 'lg',
|
|
285
|
-
},
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
export const WithDividers: Story = {
|
|
289
|
-
render: (args) => (
|
|
290
|
-
<DialogWrapper {...args}>
|
|
291
|
-
<DialogHeader
|
|
292
|
-
title="Dialog with Dividers"
|
|
293
|
-
subtitle="Content sections with visual separators"
|
|
294
|
-
/>
|
|
295
|
-
<DialogContent dividers>
|
|
296
|
-
<Typography paragraph>
|
|
297
|
-
This content section has dividers above and below to create clear
|
|
298
|
-
visual separation from the header and actions.
|
|
299
|
-
</Typography>
|
|
300
|
-
<Typography paragraph>
|
|
301
|
-
This is useful for dialogs with a lot of content or when you need
|
|
302
|
-
to clearly separate different sections of the dialog.
|
|
303
|
-
</Typography>
|
|
304
|
-
</DialogContent>
|
|
305
|
-
<DialogActions>
|
|
306
|
-
<Button>Cancel</Button>
|
|
307
|
-
<Button variant="contained">Continue</Button>
|
|
308
|
-
</DialogActions>
|
|
309
|
-
</DialogWrapper>
|
|
310
|
-
),
|
|
311
|
-
args: {
|
|
312
|
-
variant: 'default',
|
|
313
|
-
size: 'lg',
|
|
314
|
-
},
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
export const DenseContent: Story = {
|
|
318
|
-
render: (args) => (
|
|
319
|
-
<DialogWrapper {...args}>
|
|
320
|
-
<DialogHeader
|
|
321
|
-
title="Dense Content Dialog"
|
|
322
|
-
subtitle="Compact spacing for information-heavy dialogs"
|
|
323
|
-
/>
|
|
324
|
-
<DialogContent dense dividers>
|
|
325
|
-
<Typography variant="body2" paragraph>
|
|
326
|
-
Dense content reduces padding to fit more information in a smaller space.
|
|
327
|
-
This is useful for data tables, forms, or content-heavy dialogs.
|
|
328
|
-
</Typography>
|
|
329
|
-
<Typography variant="body2" paragraph>
|
|
330
|
-
The dense prop reduces internal padding while maintaining readability.
|
|
331
|
-
</Typography>
|
|
332
|
-
</DialogContent>
|
|
333
|
-
<DialogActions>
|
|
334
|
-
<Button size="small">Cancel</Button>
|
|
335
|
-
<Button variant="contained" size="small">OK</Button>
|
|
336
|
-
</DialogActions>
|
|
337
|
-
</DialogWrapper>
|
|
338
|
-
),
|
|
339
|
-
args: {
|
|
340
|
-
variant: 'default',
|
|
341
|
-
size: 'sm',
|
|
342
|
-
},
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
export const NoCloseButton: Story = {
|
|
346
|
-
render: (args) => (
|
|
347
|
-
<DialogWrapper {...args}>
|
|
348
|
-
<DialogHeader
|
|
349
|
-
title="Persistent Dialog"
|
|
350
|
-
subtitle="No close button - must use action buttons"
|
|
351
|
-
showCloseButton={false}
|
|
352
|
-
/>
|
|
353
|
-
<DialogContent>
|
|
354
|
-
<Typography>
|
|
355
|
-
This dialog has no close button and is persistent, meaning it cannot
|
|
356
|
-
be closed by clicking the backdrop or pressing Escape.
|
|
357
|
-
</Typography>
|
|
358
|
-
</DialogContent>
|
|
359
|
-
<DialogActions>
|
|
360
|
-
<Button color="error">Cancel</Button>
|
|
361
|
-
<Button variant="contained">Confirm</Button>
|
|
362
|
-
</DialogActions>
|
|
363
|
-
</DialogWrapper>
|
|
364
|
-
),
|
|
365
|
-
args: {
|
|
366
|
-
variant: 'default',
|
|
367
|
-
size: 'md',
|
|
368
|
-
persistent: true,
|
|
369
|
-
},
|
|
370
|
-
};
|
|
371
|
-
|
|
372
|
-
export const PulseEffect: Story = {
|
|
373
|
-
render: (args) => (
|
|
374
|
-
<DialogWrapper {...args}>
|
|
375
|
-
<DialogHeader
|
|
376
|
-
title="Pulse Effect Dialog"
|
|
377
|
-
subtitle="Attention-grabbing pulse animation"
|
|
378
|
-
/>
|
|
379
|
-
<DialogContent>
|
|
380
|
-
<Typography>
|
|
381
|
-
This dialog has a pulse effect to draw attention. The pulse animation
|
|
382
|
-
creates a subtle highlighting effect around the dialog.
|
|
383
|
-
</Typography>
|
|
384
|
-
</DialogContent>
|
|
385
|
-
<DialogActions>
|
|
386
|
-
<Button>Dismiss</Button>
|
|
387
|
-
<Button variant="contained">Take Action</Button>
|
|
388
|
-
</DialogActions>
|
|
389
|
-
</DialogWrapper>
|
|
390
|
-
),
|
|
391
|
-
args: {
|
|
392
|
-
variant: 'default',
|
|
393
|
-
size: 'md',
|
|
394
|
-
pulse: true,
|
|
395
|
-
glow: true,
|
|
396
|
-
},
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
const BorderRadiusVariationsComponent = () => {
|
|
400
|
-
const radiusOptions = ['none', 'sm', 'md', 'lg', 'xl'] as const;
|
|
401
|
-
const [openStates, setOpenStates] = useState<Record<string, boolean>>({});
|
|
402
|
-
|
|
403
|
-
const handleOpen = (radius: string) => {
|
|
404
|
-
setOpenStates(prev => ({ ...prev, [radius]: true }));
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
const handleClose = (radius: string) => {
|
|
408
|
-
setOpenStates(prev => ({ ...prev, [radius]: false }));
|
|
409
|
-
};
|
|
410
|
-
|
|
411
|
-
return (
|
|
412
|
-
<Box sx={{ display: 'flex', gap: 2, flexWrap: 'wrap' }}>
|
|
413
|
-
{radiusOptions.map(radius => (
|
|
414
|
-
<Box key={radius}>
|
|
415
|
-
<Button
|
|
416
|
-
variant="outlined"
|
|
417
|
-
onClick={() => handleOpen(radius)}
|
|
418
|
-
size="small"
|
|
419
|
-
>
|
|
420
|
-
{radius.toUpperCase()}
|
|
421
|
-
</Button>
|
|
422
|
-
<Dialog
|
|
423
|
-
open={openStates[radius] || false}
|
|
424
|
-
onClose={() => handleClose(radius)}
|
|
425
|
-
borderRadius={radius}
|
|
426
|
-
variant="glass"
|
|
427
|
-
>
|
|
428
|
-
<DialogHeader title={`${radius.toUpperCase()} Border Radius`} />
|
|
429
|
-
<DialogContent>
|
|
430
|
-
<Typography>
|
|
431
|
-
This dialog demonstrates the {radius} border radius option.
|
|
432
|
-
</Typography>
|
|
433
|
-
</DialogContent>
|
|
434
|
-
<DialogActions>
|
|
435
|
-
<Button onClick={() => handleClose(radius)}>Close</Button>
|
|
436
|
-
</DialogActions>
|
|
437
|
-
</Dialog>
|
|
438
|
-
</Box>
|
|
439
|
-
))}
|
|
440
|
-
</Box>
|
|
441
|
-
);
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
export const BorderRadiusVariations: Story = {
|
|
445
|
-
render: () => <BorderRadiusVariationsComponent />,
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
// Required story exports for validation
|
|
449
|
-
export const AllVariants: Story = {
|
|
450
|
-
render: () => (
|
|
451
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
|
452
|
-
<Typography variant="h6">Dialog Variants Showcase</Typography>
|
|
453
|
-
|
|
454
|
-
{/* Default Variant */}
|
|
455
|
-
<Box>
|
|
456
|
-
<Typography variant="subtitle1" gutterBottom>Default Variant</Typography>
|
|
457
|
-
<DialogWrapper variant="default" size="md">
|
|
458
|
-
<DialogHeader title="Default Dialog" subtitle="Standard Material-UI styling" />
|
|
459
|
-
<DialogContent>
|
|
460
|
-
<Typography>Default variant with clean, minimal design.</Typography>
|
|
461
|
-
</DialogContent>
|
|
462
|
-
<DialogActions>
|
|
463
|
-
<Button>Cancel</Button>
|
|
464
|
-
<Button variant="contained">Confirm</Button>
|
|
465
|
-
</DialogActions>
|
|
466
|
-
</DialogWrapper>
|
|
467
|
-
</Box>
|
|
468
|
-
|
|
469
|
-
{/* Glass Variant */}
|
|
470
|
-
<Box>
|
|
471
|
-
<Typography variant="subtitle1" gutterBottom>Glass Variant</Typography>
|
|
472
|
-
<DialogWrapper variant="glass" size="md" glow>
|
|
473
|
-
<DialogHeader title="Glass Dialog" subtitle="Glass morphism effect" />
|
|
474
|
-
<DialogContent>
|
|
475
|
-
<Typography>Glass variant with blur and translucent background.</Typography>
|
|
476
|
-
</DialogContent>
|
|
477
|
-
<DialogActions>
|
|
478
|
-
<Button>Cancel</Button>
|
|
479
|
-
<Button variant="contained">Confirm</Button>
|
|
480
|
-
</DialogActions>
|
|
481
|
-
</DialogWrapper>
|
|
482
|
-
</Box>
|
|
483
|
-
|
|
484
|
-
{/* Fullscreen Variant */}
|
|
485
|
-
<Box>
|
|
486
|
-
<Typography variant="subtitle1" gutterBottom>Fullscreen Variant</Typography>
|
|
487
|
-
<DialogWrapper variant="fullscreen">
|
|
488
|
-
<DialogHeader title="Fullscreen Dialog" subtitle="Immersive experience" />
|
|
489
|
-
<DialogContent>
|
|
490
|
-
<Typography>Fullscreen variant for complex content.</Typography>
|
|
491
|
-
</DialogContent>
|
|
492
|
-
<DialogActions>
|
|
493
|
-
<Button>Cancel</Button>
|
|
494
|
-
<Button variant="contained">Save</Button>
|
|
495
|
-
</DialogActions>
|
|
496
|
-
</DialogWrapper>
|
|
497
|
-
</Box>
|
|
498
|
-
|
|
499
|
-
{/* Drawer Variant */}
|
|
500
|
-
<Box>
|
|
501
|
-
<Typography variant="subtitle1" gutterBottom>Drawer Variant</Typography>
|
|
502
|
-
<DialogWrapper variant="drawer" size="sm">
|
|
503
|
-
<DialogHeader title="Drawer Dialog" subtitle="Slide-in panel" />
|
|
504
|
-
<DialogContent>
|
|
505
|
-
<Typography>Drawer variant that slides in from the side.</Typography>
|
|
506
|
-
</DialogContent>
|
|
507
|
-
<DialogActions>
|
|
508
|
-
<Button>Close</Button>
|
|
509
|
-
<Button variant="contained">Apply</Button>
|
|
510
|
-
</DialogActions>
|
|
511
|
-
</DialogWrapper>
|
|
512
|
-
</Box>
|
|
513
|
-
</Box>
|
|
514
|
-
),
|
|
515
|
-
parameters: {
|
|
516
|
-
layout: 'padded',
|
|
517
|
-
},
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
export const AllStates: Story = {
|
|
521
|
-
render: () => (
|
|
522
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
|
523
|
-
<Typography variant="h6">Dialog States</Typography>
|
|
524
|
-
|
|
525
|
-
{/* Normal State */}
|
|
526
|
-
<Box>
|
|
527
|
-
<Typography variant="subtitle1" gutterBottom>Normal State</Typography>
|
|
528
|
-
<DialogWrapper variant="default" size="md">
|
|
529
|
-
<DialogHeader title="Normal Dialog" subtitle="Standard state" />
|
|
530
|
-
<DialogContent>
|
|
531
|
-
<Typography>Normal dialog with standard interaction.</Typography>
|
|
532
|
-
</DialogContent>
|
|
533
|
-
<DialogActions>
|
|
534
|
-
<Button>Cancel</Button>
|
|
535
|
-
<Button variant="contained">OK</Button>
|
|
536
|
-
</DialogActions>
|
|
537
|
-
</DialogWrapper>
|
|
538
|
-
</Box>
|
|
539
|
-
|
|
540
|
-
{/* With Glow Effect */}
|
|
541
|
-
<Box>
|
|
542
|
-
<Typography variant="subtitle1" gutterBottom>With Glow Effect</Typography>
|
|
543
|
-
<DialogWrapper variant="glass" size="md" glow>
|
|
544
|
-
<DialogHeader title="Glowing Dialog" subtitle="Enhanced visibility" />
|
|
545
|
-
<DialogContent>
|
|
546
|
-
<Typography>Dialog with glow effect for emphasis.</Typography>
|
|
547
|
-
</DialogContent>
|
|
548
|
-
<DialogActions>
|
|
549
|
-
<Button>Cancel</Button>
|
|
550
|
-
<Button variant="contained">Confirm</Button>
|
|
551
|
-
</DialogActions>
|
|
552
|
-
</DialogWrapper>
|
|
553
|
-
</Box>
|
|
554
|
-
|
|
555
|
-
{/* With Gradient */}
|
|
556
|
-
<Box>
|
|
557
|
-
<Typography variant="subtitle1" gutterBottom>With Gradient</Typography>
|
|
558
|
-
<DialogWrapper variant="default" gradient glow size="lg">
|
|
559
|
-
<DialogHeader title="Gradient Dialog" subtitle="Premium appearance" />
|
|
560
|
-
<DialogContent>
|
|
561
|
-
<Typography>Dialog with gradient background.</Typography>
|
|
562
|
-
</DialogContent>
|
|
563
|
-
<DialogActions>
|
|
564
|
-
<Button>Skip</Button>
|
|
565
|
-
<Button variant="contained">Upgrade</Button>
|
|
566
|
-
</DialogActions>
|
|
567
|
-
</DialogWrapper>
|
|
568
|
-
</Box>
|
|
569
|
-
|
|
570
|
-
{/* Persistent State */}
|
|
571
|
-
<Box>
|
|
572
|
-
<Typography variant="subtitle1" gutterBottom>Persistent State (No backdrop close)</Typography>
|
|
573
|
-
<DialogWrapper variant="default" size="md" persistent>
|
|
574
|
-
<DialogHeader title="Persistent Dialog" subtitle="Must use action buttons" showCloseButton={false} />
|
|
575
|
-
<DialogContent>
|
|
576
|
-
<Typography>This dialog cannot be closed by clicking outside or pressing Escape.</Typography>
|
|
577
|
-
</DialogContent>
|
|
578
|
-
<DialogActions>
|
|
579
|
-
<Button color="error">Cancel</Button>
|
|
580
|
-
<Button variant="contained">Confirm</Button>
|
|
581
|
-
</DialogActions>
|
|
582
|
-
</DialogWrapper>
|
|
583
|
-
</Box>
|
|
584
|
-
|
|
585
|
-
{/* With Pulse Effect */}
|
|
586
|
-
<Box>
|
|
587
|
-
<Typography variant="subtitle1" gutterBottom>With Pulse Effect</Typography>
|
|
588
|
-
<DialogWrapper variant="default" size="md" pulse glow>
|
|
589
|
-
<DialogHeader title="Pulsing Dialog" subtitle="Attention-grabbing animation" />
|
|
590
|
-
<DialogContent>
|
|
591
|
-
<Typography>Dialog with pulse animation to draw attention.</Typography>
|
|
592
|
-
</DialogContent>
|
|
593
|
-
<DialogActions>
|
|
594
|
-
<Button>Dismiss</Button>
|
|
595
|
-
<Button variant="contained">Take Action</Button>
|
|
596
|
-
</DialogActions>
|
|
597
|
-
</DialogWrapper>
|
|
598
|
-
</Box>
|
|
599
|
-
</Box>
|
|
600
|
-
),
|
|
601
|
-
parameters: {
|
|
602
|
-
layout: 'padded',
|
|
603
|
-
},
|
|
604
|
-
};
|
|
605
|
-
|
|
606
|
-
const InteractiveStatesComponent = () => {
|
|
607
|
-
const [dialogStates, setDialogStates] = useState({
|
|
608
|
-
hover: false,
|
|
609
|
-
focus: false,
|
|
610
|
-
active: false,
|
|
611
|
-
});
|
|
612
|
-
|
|
613
|
-
return (
|
|
614
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
|
615
|
-
<Typography variant="h6">Interactive Dialog States</Typography>
|
|
616
|
-
|
|
617
|
-
{/* Interactive Demo */}
|
|
618
|
-
<Box>
|
|
619
|
-
<Typography variant="subtitle1" gutterBottom>Interactive Elements Demo</Typography>
|
|
620
|
-
<DialogWrapper variant="glass" size="md" glow>
|
|
621
|
-
<DialogHeader
|
|
622
|
-
title="Interactive Dialog"
|
|
623
|
-
subtitle="Test hover, focus, and active states"
|
|
624
|
-
/>
|
|
625
|
-
<DialogContent>
|
|
626
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
|
|
627
|
-
<Typography>
|
|
628
|
-
Interact with the elements below to see state changes:
|
|
629
|
-
</Typography>
|
|
630
|
-
|
|
631
|
-
<Box sx={{ display: 'flex', gap: 2 }}>
|
|
632
|
-
<Button
|
|
633
|
-
variant="outlined"
|
|
634
|
-
onMouseEnter={() => setDialogStates(prev => ({ ...prev, hover: true }))}
|
|
635
|
-
onMouseLeave={() => setDialogStates(prev => ({ ...prev, hover: false }))}
|
|
636
|
-
onFocus={() => setDialogStates(prev => ({ ...prev, focus: true }))}
|
|
637
|
-
onBlur={() => setDialogStates(prev => ({ ...prev, focus: false }))}
|
|
638
|
-
onMouseDown={() => setDialogStates(prev => ({ ...prev, active: true }))}
|
|
639
|
-
onMouseUp={() => setDialogStates(prev => ({ ...prev, active: false }))}
|
|
640
|
-
>
|
|
641
|
-
Interactive Button
|
|
642
|
-
</Button>
|
|
643
|
-
</Box>
|
|
644
|
-
|
|
645
|
-
<Box sx={{ mt: 2, p: 2, bgcolor: 'background.paper', borderRadius: 1 }}>
|
|
646
|
-
<Typography variant="body2">
|
|
647
|
-
States:
|
|
648
|
-
{dialogStates.hover && ' [Hovering]'}
|
|
649
|
-
{dialogStates.focus && ' [Focused]'}
|
|
650
|
-
{dialogStates.active && ' [Active]'}
|
|
651
|
-
{!dialogStates.hover && !dialogStates.focus && !dialogStates.active && ' [Idle]'}
|
|
652
|
-
</Typography>
|
|
653
|
-
</Box>
|
|
654
|
-
</Box>
|
|
655
|
-
</DialogContent>
|
|
656
|
-
<DialogActions>
|
|
657
|
-
<Button>Cancel</Button>
|
|
658
|
-
<Button variant="contained">Apply</Button>
|
|
659
|
-
</DialogActions>
|
|
660
|
-
</DialogWrapper>
|
|
661
|
-
</Box>
|
|
662
|
-
|
|
663
|
-
{/* Form Interaction */}
|
|
664
|
-
<Box>
|
|
665
|
-
<Typography variant="subtitle1" gutterBottom>Form Interaction</Typography>
|
|
666
|
-
<DialogWrapper variant="default" size="md">
|
|
667
|
-
<DialogHeader title="Form Dialog" subtitle="Interactive form elements" />
|
|
668
|
-
<DialogContent>
|
|
669
|
-
<Box component="form" sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
|
|
670
|
-
<input
|
|
671
|
-
type="text"
|
|
672
|
-
placeholder="Enter text..."
|
|
673
|
-
style={{ padding: '8px', borderRadius: '4px', border: '1px solid #ccc' }}
|
|
674
|
-
/>
|
|
675
|
-
<textarea
|
|
676
|
-
placeholder="Enter description..."
|
|
677
|
-
rows={3}
|
|
678
|
-
style={{ padding: '8px', borderRadius: '4px', border: '1px solid #ccc' }}
|
|
679
|
-
/>
|
|
680
|
-
<Box sx={{ display: 'flex', gap: 1, alignItems: 'center' }}>
|
|
681
|
-
<input type="checkbox" id="agree" />
|
|
682
|
-
<label htmlFor="agree">I agree to the terms</label>
|
|
683
|
-
</Box>
|
|
684
|
-
</Box>
|
|
685
|
-
</DialogContent>
|
|
686
|
-
<DialogActions>
|
|
687
|
-
<Button>Cancel</Button>
|
|
688
|
-
<Button variant="contained">Submit</Button>
|
|
689
|
-
</DialogActions>
|
|
690
|
-
</DialogWrapper>
|
|
691
|
-
</Box>
|
|
692
|
-
|
|
693
|
-
{/* Keyboard Navigation Demo */}
|
|
694
|
-
<Box>
|
|
695
|
-
<Typography variant="subtitle1" gutterBottom>Keyboard Navigation</Typography>
|
|
696
|
-
<DialogWrapper variant="glass" size="sm">
|
|
697
|
-
<DialogHeader title="Keyboard Navigation" subtitle="Press Tab to navigate" />
|
|
698
|
-
<DialogContent>
|
|
699
|
-
<Typography variant="body2" gutterBottom>
|
|
700
|
-
Use Tab/Shift+Tab to navigate between elements. Press Escape to close.
|
|
701
|
-
</Typography>
|
|
702
|
-
<Box sx={{ display: 'flex', gap: 1, mt: 2 }}>
|
|
703
|
-
<Button size="small">First</Button>
|
|
704
|
-
<Button size="small">Second</Button>
|
|
705
|
-
<Button size="small">Third</Button>
|
|
706
|
-
</Box>
|
|
707
|
-
</DialogContent>
|
|
708
|
-
<DialogActions>
|
|
709
|
-
<Button>Cancel</Button>
|
|
710
|
-
<Button variant="contained">Done</Button>
|
|
711
|
-
</DialogActions>
|
|
712
|
-
</DialogWrapper>
|
|
713
|
-
</Box>
|
|
714
|
-
</Box>
|
|
715
|
-
);
|
|
716
|
-
};
|
|
717
|
-
|
|
718
|
-
export const InteractiveStates: Story = {
|
|
719
|
-
render: () => <InteractiveStatesComponent />,
|
|
720
|
-
parameters: {
|
|
721
|
-
layout: 'padded',
|
|
722
|
-
},
|
|
723
|
-
};
|
|
724
|
-
|
|
725
|
-
export const Responsive: Story = {
|
|
726
|
-
render: () => (
|
|
727
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
|
728
|
-
<Typography variant="h6">Responsive Dialog Behavior</Typography>
|
|
729
|
-
|
|
730
|
-
{/* Mobile View */}
|
|
731
|
-
<Box>
|
|
732
|
-
<Typography variant="subtitle1" gutterBottom>Mobile View (Fullscreen on small screens)</Typography>
|
|
733
|
-
<Box sx={{ maxWidth: '375px', border: '1px solid #ccc', borderRadius: 1, p: 2 }}>
|
|
734
|
-
<DialogWrapper variant="default" size="md">
|
|
735
|
-
<DialogHeader title="Mobile Dialog" subtitle="Adapts to screen size" />
|
|
736
|
-
<DialogContent>
|
|
737
|
-
<Typography variant="body2">
|
|
738
|
-
On mobile devices, dialogs automatically adapt to provide the best user experience.
|
|
739
|
-
This might include fullscreen display or adjusted padding.
|
|
740
|
-
</Typography>
|
|
741
|
-
</DialogContent>
|
|
742
|
-
<DialogActions>
|
|
743
|
-
<Button size="small">Cancel</Button>
|
|
744
|
-
<Button variant="contained" size="small">OK</Button>
|
|
745
|
-
</DialogActions>
|
|
746
|
-
</DialogWrapper>
|
|
747
|
-
</Box>
|
|
748
|
-
</Box>
|
|
749
|
-
|
|
750
|
-
{/* Tablet View */}
|
|
751
|
-
<Box>
|
|
752
|
-
<Typography variant="subtitle1" gutterBottom>Tablet View</Typography>
|
|
753
|
-
<Box sx={{ maxWidth: '768px', border: '1px solid #ccc', borderRadius: 1, p: 2 }}>
|
|
754
|
-
<DialogWrapper variant="glass" size="lg">
|
|
755
|
-
<DialogHeader title="Tablet Dialog" subtitle="Optimized for medium screens" />
|
|
756
|
-
<DialogContent>
|
|
757
|
-
<Typography>
|
|
758
|
-
Tablet view provides balanced spacing and sizing, making good use of available screen space
|
|
759
|
-
while maintaining readability and touch-friendly interactions.
|
|
760
|
-
</Typography>
|
|
761
|
-
</DialogContent>
|
|
762
|
-
<DialogActions>
|
|
763
|
-
<Button>Cancel</Button>
|
|
764
|
-
<Button variant="contained">Continue</Button>
|
|
765
|
-
</DialogActions>
|
|
766
|
-
</DialogWrapper>
|
|
767
|
-
</Box>
|
|
768
|
-
</Box>
|
|
769
|
-
|
|
770
|
-
{/* Desktop View */}
|
|
771
|
-
<Box>
|
|
772
|
-
<Typography variant="subtitle1" gutterBottom>Desktop View</Typography>
|
|
773
|
-
<DialogWrapper variant="default" size="xl">
|
|
774
|
-
<DialogHeader title="Desktop Dialog" subtitle="Full-featured desktop experience" />
|
|
775
|
-
<DialogContent>
|
|
776
|
-
<Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 2 }}>
|
|
777
|
-
<Typography>
|
|
778
|
-
Desktop view can utilize more complex layouts with multiple columns,
|
|
779
|
-
larger content areas, and more sophisticated interactions.
|
|
780
|
-
</Typography>
|
|
781
|
-
<Typography>
|
|
782
|
-
This provides the richest experience with all features available
|
|
783
|
-
and optimal use of screen real estate.
|
|
784
|
-
</Typography>
|
|
785
|
-
</Box>
|
|
786
|
-
</DialogContent>
|
|
787
|
-
<DialogActions>
|
|
788
|
-
<Button>Cancel</Button>
|
|
789
|
-
<Button>Save Draft</Button>
|
|
790
|
-
<Button variant="contained">Publish</Button>
|
|
791
|
-
</DialogActions>
|
|
792
|
-
</DialogWrapper>
|
|
793
|
-
</Box>
|
|
794
|
-
|
|
795
|
-
{/* Responsive Size Grid */}
|
|
796
|
-
<Box>
|
|
797
|
-
<Typography variant="subtitle1" gutterBottom>Responsive Size Grid</Typography>
|
|
798
|
-
<Box sx={{
|
|
799
|
-
display: 'grid',
|
|
800
|
-
gridTemplateColumns: { xs: '1fr', sm: 'repeat(2, 1fr)', md: 'repeat(3, 1fr)' },
|
|
801
|
-
gap: 2
|
|
802
|
-
}}>
|
|
803
|
-
{['xs', 'sm', 'md', 'lg', 'xl'].map(size => (
|
|
804
|
-
<Box key={size} sx={{ border: '1px solid #ccc', borderRadius: 1, p: 2 }}>
|
|
805
|
-
<Typography variant="body2" gutterBottom>{size.toUpperCase()} Size</Typography>
|
|
806
|
-
<DialogWrapper variant="glass" size={size as 'xs' | 'sm' | 'md' | 'lg' | 'xl'}>
|
|
807
|
-
<DialogHeader title={`${size.toUpperCase()} Dialog`} />
|
|
808
|
-
<DialogContent>
|
|
809
|
-
<Typography variant="body2">
|
|
810
|
-
Responsive {size} size
|
|
811
|
-
</Typography>
|
|
812
|
-
</DialogContent>
|
|
813
|
-
<DialogActions>
|
|
814
|
-
<Button size="small">Close</Button>
|
|
815
|
-
</DialogActions>
|
|
816
|
-
</DialogWrapper>
|
|
817
|
-
</Box>
|
|
818
|
-
))}
|
|
819
|
-
</Box>
|
|
820
|
-
</Box>
|
|
821
|
-
</Box>
|
|
822
|
-
),
|
|
823
|
-
parameters: {
|
|
824
|
-
layout: 'padded',
|
|
825
|
-
viewport: {
|
|
826
|
-
viewports: {
|
|
827
|
-
mobile: { name: 'Mobile', styles: { width: '375px', height: '667px' } },
|
|
828
|
-
tablet: { name: 'Tablet', styles: { width: '768px', height: '1024px' } },
|
|
829
|
-
desktop: { name: 'Desktop', styles: { width: '1920px', height: '1080px' } },
|
|
830
|
-
},
|
|
831
|
-
},
|
|
832
|
-
},
|
|
833
|
-
};
|