@12-apps/ui 1.5.0 → 1.5.2
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 +17 -9
- 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,687 +0,0 @@
|
|
|
1
|
-
import { Stack, Typography } from '@mui/material';
|
|
2
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
3
|
-
|
|
4
|
-
import { Button } from '../Button';
|
|
5
|
-
import { Checkbox } from '../Checkbox';
|
|
6
|
-
import { Input } from '../Input';
|
|
7
|
-
import { Select } from '../Select';
|
|
8
|
-
import { Textarea } from '../Textarea';
|
|
9
|
-
import { Form, FormField } from './Form';
|
|
10
|
-
|
|
11
|
-
const meta: Meta<typeof Form> = {
|
|
12
|
-
title: 'Form/Form',
|
|
13
|
-
component: Form,
|
|
14
|
-
parameters: {
|
|
15
|
-
layout: 'centered',
|
|
16
|
-
docs: {
|
|
17
|
-
description: {
|
|
18
|
-
component:
|
|
19
|
-
'Form is a flexible container component for building forms with consistent spacing, layout, and validation patterns. Supports multiple layout variants and provides built-in form field components.',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
tags: ['autodocs', 'component:Form'],
|
|
24
|
-
argTypes: {
|
|
25
|
-
variant: {
|
|
26
|
-
control: { type: 'select' },
|
|
27
|
-
options: ['vertical', 'horizontal', 'inline', 'stepped'],
|
|
28
|
-
description: 'Layout variant for the form',
|
|
29
|
-
},
|
|
30
|
-
maxWidth: {
|
|
31
|
-
control: { type: 'select' },
|
|
32
|
-
options: ['sm', 'md', 'lg', 'xl', 'full'],
|
|
33
|
-
description: 'Maximum width constraint for the form',
|
|
34
|
-
},
|
|
35
|
-
spacing: {
|
|
36
|
-
control: { type: 'select' },
|
|
37
|
-
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
38
|
-
description: 'Spacing between form elements',
|
|
39
|
-
},
|
|
40
|
-
onSubmit: {
|
|
41
|
-
action: 'submitted',
|
|
42
|
-
description: 'Form submission handler',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export default meta;
|
|
48
|
-
type Story = StoryObj<typeof meta>;
|
|
49
|
-
|
|
50
|
-
export const Default: Story = {
|
|
51
|
-
args: {
|
|
52
|
-
variant: 'vertical',
|
|
53
|
-
maxWidth: 'md',
|
|
54
|
-
spacing: 'md',
|
|
55
|
-
children: (
|
|
56
|
-
<>
|
|
57
|
-
<FormField name="email" label="Email" required>
|
|
58
|
-
<Input type="email" placeholder="Enter your email" />
|
|
59
|
-
</FormField>
|
|
60
|
-
<FormField name="password" label="Password" required>
|
|
61
|
-
<Input type="password" placeholder="Enter your password" />
|
|
62
|
-
</FormField>
|
|
63
|
-
<FormField name="remember">
|
|
64
|
-
<Checkbox label="Remember me" />
|
|
65
|
-
</FormField>
|
|
66
|
-
<Button variant="solid" type="submit" fullWidth>
|
|
67
|
-
Submit
|
|
68
|
-
</Button>
|
|
69
|
-
</>
|
|
70
|
-
),
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export const Vertical: Story = {
|
|
75
|
-
args: {
|
|
76
|
-
variant: 'vertical',
|
|
77
|
-
maxWidth: 'sm',
|
|
78
|
-
spacing: 'lg',
|
|
79
|
-
children: (
|
|
80
|
-
<>
|
|
81
|
-
<FormField name="name" label="Full Name" required>
|
|
82
|
-
<Input placeholder="John Doe" />
|
|
83
|
-
</FormField>
|
|
84
|
-
<FormField name="email" label="Email Address" required>
|
|
85
|
-
<Input type="email" placeholder="john@example.com" />
|
|
86
|
-
</FormField>
|
|
87
|
-
<FormField name="role" label="Role" required>
|
|
88
|
-
<Select
|
|
89
|
-
options={[
|
|
90
|
-
{ value: 'admin', label: 'Administrator' },
|
|
91
|
-
{ value: 'user', label: 'User' },
|
|
92
|
-
{ value: 'guest', label: 'Guest' },
|
|
93
|
-
]}
|
|
94
|
-
placeholder="Select a role"
|
|
95
|
-
/>
|
|
96
|
-
</FormField>
|
|
97
|
-
<FormField name="notifications">
|
|
98
|
-
<Checkbox label="Send me notifications" />
|
|
99
|
-
</FormField>
|
|
100
|
-
<Stack direction="row" spacing={2}>
|
|
101
|
-
<Button variant="outline" fullWidth>
|
|
102
|
-
Cancel
|
|
103
|
-
</Button>
|
|
104
|
-
<Button variant="solid" type="submit" fullWidth>
|
|
105
|
-
Save
|
|
106
|
-
</Button>
|
|
107
|
-
</Stack>
|
|
108
|
-
</>
|
|
109
|
-
),
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export const Horizontal: Story = {
|
|
114
|
-
args: {
|
|
115
|
-
variant: 'horizontal',
|
|
116
|
-
maxWidth: 'lg',
|
|
117
|
-
spacing: 'md',
|
|
118
|
-
children: (
|
|
119
|
-
<>
|
|
120
|
-
<FormField name="firstName" label="First Name" required>
|
|
121
|
-
<Input placeholder="Enter first name" />
|
|
122
|
-
</FormField>
|
|
123
|
-
<FormField name="lastName" label="Last Name" required>
|
|
124
|
-
<Input placeholder="Enter last name" />
|
|
125
|
-
</FormField>
|
|
126
|
-
<FormField name="department" label="Department">
|
|
127
|
-
<Select
|
|
128
|
-
options={[
|
|
129
|
-
{ value: 'engineering', label: 'Engineering' },
|
|
130
|
-
{ value: 'marketing', label: 'Marketing' },
|
|
131
|
-
{ value: 'sales', label: 'Sales' },
|
|
132
|
-
{ value: 'hr', label: 'Human Resources' },
|
|
133
|
-
]}
|
|
134
|
-
/>
|
|
135
|
-
</FormField>
|
|
136
|
-
<Button variant="gradient" type="submit">
|
|
137
|
-
Submit Form
|
|
138
|
-
</Button>
|
|
139
|
-
</>
|
|
140
|
-
),
|
|
141
|
-
},
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
export const Inline: Story = {
|
|
145
|
-
args: {
|
|
146
|
-
variant: 'inline',
|
|
147
|
-
children: (
|
|
148
|
-
<>
|
|
149
|
-
<Input placeholder="Search..." style={{ flex: 1 }} />
|
|
150
|
-
<Select
|
|
151
|
-
options={[
|
|
152
|
-
{ value: 'all', label: 'All Categories' },
|
|
153
|
-
{ value: 'products', label: 'Products' },
|
|
154
|
-
{ value: 'services', label: 'Services' },
|
|
155
|
-
]}
|
|
156
|
-
style={{ minWidth: 150 }}
|
|
157
|
-
/>
|
|
158
|
-
<Button variant="solid">Search</Button>
|
|
159
|
-
</>
|
|
160
|
-
),
|
|
161
|
-
},
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
export const WithValidation: Story = {
|
|
165
|
-
args: {
|
|
166
|
-
variant: 'vertical',
|
|
167
|
-
maxWidth: 'sm',
|
|
168
|
-
spacing: 'md',
|
|
169
|
-
children: (
|
|
170
|
-
<>
|
|
171
|
-
<FormField name="email" label="Email" required error="Please enter a valid email address">
|
|
172
|
-
<Input type="email" error />
|
|
173
|
-
</FormField>
|
|
174
|
-
<FormField
|
|
175
|
-
name="password"
|
|
176
|
-
label="Password"
|
|
177
|
-
required
|
|
178
|
-
helperText="Password must be at least 8 characters"
|
|
179
|
-
>
|
|
180
|
-
<Input type="password" />
|
|
181
|
-
</FormField>
|
|
182
|
-
<FormField name="terms" error="You must accept the terms">
|
|
183
|
-
<Checkbox label="I accept the terms and conditions" error />
|
|
184
|
-
</FormField>
|
|
185
|
-
<Button variant="solid" type="submit" fullWidth>
|
|
186
|
-
Register
|
|
187
|
-
</Button>
|
|
188
|
-
</>
|
|
189
|
-
),
|
|
190
|
-
},
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
export const AllSpacingVariations: Story = {
|
|
194
|
-
args: {
|
|
195
|
-
variant: 'vertical',
|
|
196
|
-
maxWidth: 'md',
|
|
197
|
-
spacing: 'xs',
|
|
198
|
-
children: (
|
|
199
|
-
<>
|
|
200
|
-
<Typography variant="h6" mb={1}>
|
|
201
|
-
Extra Small Spacing (xs)
|
|
202
|
-
</Typography>
|
|
203
|
-
<FormField name="field1" label="Field 1">
|
|
204
|
-
<Input placeholder="Content" />
|
|
205
|
-
</FormField>
|
|
206
|
-
<FormField name="field2" label="Field 2">
|
|
207
|
-
<Input placeholder="Content" />
|
|
208
|
-
</FormField>
|
|
209
|
-
</>
|
|
210
|
-
),
|
|
211
|
-
},
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
export const LargeSpacing: Story = {
|
|
215
|
-
args: {
|
|
216
|
-
variant: 'vertical',
|
|
217
|
-
maxWidth: 'md',
|
|
218
|
-
spacing: 'xl',
|
|
219
|
-
children: (
|
|
220
|
-
<>
|
|
221
|
-
<Typography variant="h6" mb={1}>
|
|
222
|
-
Extra Large Spacing (xl)
|
|
223
|
-
</Typography>
|
|
224
|
-
<FormField name="field1" label="Field 1">
|
|
225
|
-
<Input placeholder="Content" />
|
|
226
|
-
</FormField>
|
|
227
|
-
<FormField name="field2" label="Field 2">
|
|
228
|
-
<Input placeholder="Content" />
|
|
229
|
-
</FormField>
|
|
230
|
-
</>
|
|
231
|
-
),
|
|
232
|
-
},
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
export const MaxWidthVariations: Story = {
|
|
236
|
-
args: {
|
|
237
|
-
variant: 'vertical',
|
|
238
|
-
maxWidth: 'sm',
|
|
239
|
-
spacing: 'md',
|
|
240
|
-
children: (
|
|
241
|
-
<>
|
|
242
|
-
<Typography variant="h6" mb={1}>
|
|
243
|
-
Small Max Width
|
|
244
|
-
</Typography>
|
|
245
|
-
<FormField name="field1" label="Field 1">
|
|
246
|
-
<Input placeholder="This form has small max width" />
|
|
247
|
-
</FormField>
|
|
248
|
-
<FormField name="field2" label="Field 2">
|
|
249
|
-
<Input placeholder="Content" />
|
|
250
|
-
</FormField>
|
|
251
|
-
</>
|
|
252
|
-
),
|
|
253
|
-
},
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
export const ComplexForm: Story = {
|
|
257
|
-
args: {
|
|
258
|
-
variant: 'vertical',
|
|
259
|
-
maxWidth: 'lg',
|
|
260
|
-
spacing: 'md',
|
|
261
|
-
children: (
|
|
262
|
-
<>
|
|
263
|
-
<Typography variant="h5" mb={2}>
|
|
264
|
-
User Profile Form
|
|
265
|
-
</Typography>
|
|
266
|
-
|
|
267
|
-
<Stack direction="row" spacing={2}>
|
|
268
|
-
<FormField name="firstName" label="First Name" required>
|
|
269
|
-
<Input placeholder="John" />
|
|
270
|
-
</FormField>
|
|
271
|
-
<FormField name="lastName" label="Last Name" required>
|
|
272
|
-
<Input placeholder="Doe" />
|
|
273
|
-
</FormField>
|
|
274
|
-
</Stack>
|
|
275
|
-
|
|
276
|
-
<FormField name="email" label="Email Address" required>
|
|
277
|
-
<Input type="email" placeholder="john.doe@example.com" />
|
|
278
|
-
</FormField>
|
|
279
|
-
|
|
280
|
-
<FormField name="bio" label="Biography" helperText="Tell us about yourself">
|
|
281
|
-
<Textarea
|
|
282
|
-
placeholder="I am a software developer with 5 years of experience..."
|
|
283
|
-
rows={4}
|
|
284
|
-
/>
|
|
285
|
-
</FormField>
|
|
286
|
-
|
|
287
|
-
<FormField name="role" label="Role" required>
|
|
288
|
-
<Select
|
|
289
|
-
options={[
|
|
290
|
-
{ value: 'developer', label: 'Developer' },
|
|
291
|
-
{ value: 'designer', label: 'Designer' },
|
|
292
|
-
{ value: 'manager', label: 'Manager' },
|
|
293
|
-
{ value: 'analyst', label: 'Analyst' },
|
|
294
|
-
]}
|
|
295
|
-
placeholder="Select your role"
|
|
296
|
-
/>
|
|
297
|
-
</FormField>
|
|
298
|
-
|
|
299
|
-
<FormField name="preferences">
|
|
300
|
-
<Stack spacing={1}>
|
|
301
|
-
<Checkbox label="Send me product updates" />
|
|
302
|
-
<Checkbox label="Send me marketing emails" />
|
|
303
|
-
<Checkbox label="Send me security alerts" />
|
|
304
|
-
</Stack>
|
|
305
|
-
</FormField>
|
|
306
|
-
|
|
307
|
-
<Stack direction="row" spacing={2} mt={2}>
|
|
308
|
-
<Button variant="outline" fullWidth>
|
|
309
|
-
Cancel
|
|
310
|
-
</Button>
|
|
311
|
-
<Button variant="solid" type="submit" fullWidth>
|
|
312
|
-
Save Profile
|
|
313
|
-
</Button>
|
|
314
|
-
</Stack>
|
|
315
|
-
</>
|
|
316
|
-
),
|
|
317
|
-
},
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
export const DisabledForm: Story = {
|
|
321
|
-
args: {
|
|
322
|
-
variant: 'vertical',
|
|
323
|
-
maxWidth: 'sm',
|
|
324
|
-
spacing: 'md',
|
|
325
|
-
children: (
|
|
326
|
-
<>
|
|
327
|
-
<Typography variant="h6" mb={2}>
|
|
328
|
-
Disabled Form State
|
|
329
|
-
</Typography>
|
|
330
|
-
<FormField name="email" label="Email" required>
|
|
331
|
-
<Input type="email" placeholder="Enter your email" disabled />
|
|
332
|
-
</FormField>
|
|
333
|
-
<FormField name="password" label="Password" required>
|
|
334
|
-
<Input type="password" placeholder="Enter your password" disabled />
|
|
335
|
-
</FormField>
|
|
336
|
-
<FormField name="remember">
|
|
337
|
-
<Checkbox label="Remember me" disabled />
|
|
338
|
-
</FormField>
|
|
339
|
-
<Button variant="solid" type="submit" fullWidth disabled>
|
|
340
|
-
Submit
|
|
341
|
-
</Button>
|
|
342
|
-
</>
|
|
343
|
-
),
|
|
344
|
-
},
|
|
345
|
-
};
|
|
346
|
-
|
|
347
|
-
export const EmptyForm: Story = {
|
|
348
|
-
args: {
|
|
349
|
-
variant: 'vertical',
|
|
350
|
-
maxWidth: 'sm',
|
|
351
|
-
spacing: 'md',
|
|
352
|
-
children: (
|
|
353
|
-
<>
|
|
354
|
-
<Typography variant="h6" mb={2}>
|
|
355
|
-
Empty Form
|
|
356
|
-
</Typography>
|
|
357
|
-
<Typography variant="body2" color="text.secondary" textAlign="center" py={4}>
|
|
358
|
-
No form fields to display
|
|
359
|
-
</Typography>
|
|
360
|
-
</>
|
|
361
|
-
),
|
|
362
|
-
},
|
|
363
|
-
};
|
|
364
|
-
|
|
365
|
-
export const ResponsiveForm: Story = {
|
|
366
|
-
parameters: {
|
|
367
|
-
viewport: {
|
|
368
|
-
viewports: {
|
|
369
|
-
mobile: { name: 'Mobile', styles: { width: '375px', height: '667px' } },
|
|
370
|
-
tablet: { name: 'Tablet', styles: { width: '768px', height: '1024px' } },
|
|
371
|
-
desktop: { name: 'Desktop', styles: { width: '1200px', height: '800px' } },
|
|
372
|
-
},
|
|
373
|
-
},
|
|
374
|
-
},
|
|
375
|
-
args: {
|
|
376
|
-
variant: 'vertical',
|
|
377
|
-
maxWidth: 'full',
|
|
378
|
-
spacing: 'md',
|
|
379
|
-
children: (
|
|
380
|
-
<>
|
|
381
|
-
<Typography variant="h6" mb={2}>
|
|
382
|
-
Responsive Form Layout
|
|
383
|
-
</Typography>
|
|
384
|
-
<Stack direction={{ xs: 'column', md: 'row' }} spacing={2}>
|
|
385
|
-
<FormField name="firstName" label="First Name" required>
|
|
386
|
-
<Input placeholder="First name" />
|
|
387
|
-
</FormField>
|
|
388
|
-
<FormField name="lastName" label="Last Name" required>
|
|
389
|
-
<Input placeholder="Last name" />
|
|
390
|
-
</FormField>
|
|
391
|
-
</Stack>
|
|
392
|
-
<FormField name="email" label="Email Address" required>
|
|
393
|
-
<Input type="email" placeholder="your.email@example.com" />
|
|
394
|
-
</FormField>
|
|
395
|
-
<Button variant="solid" type="submit" fullWidth>
|
|
396
|
-
Submit
|
|
397
|
-
</Button>
|
|
398
|
-
</>
|
|
399
|
-
),
|
|
400
|
-
},
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
// Required story exports for validation
|
|
404
|
-
export const AllVariants: Story = {
|
|
405
|
-
args: {
|
|
406
|
-
variant: 'vertical',
|
|
407
|
-
maxWidth: 'xl',
|
|
408
|
-
spacing: 'md',
|
|
409
|
-
children: (
|
|
410
|
-
<Stack spacing={4}>
|
|
411
|
-
<div>
|
|
412
|
-
<Typography variant="h6" mb={2}>
|
|
413
|
-
Vertical Layout
|
|
414
|
-
</Typography>
|
|
415
|
-
<Form variant="vertical" maxWidth="md" spacing="md">
|
|
416
|
-
<FormField name="field1" label="Field 1">
|
|
417
|
-
<Input placeholder="Vertical layout" />
|
|
418
|
-
</FormField>
|
|
419
|
-
<FormField name="field2" label="Field 2">
|
|
420
|
-
<Input placeholder="Vertical layout" />
|
|
421
|
-
</FormField>
|
|
422
|
-
</Form>
|
|
423
|
-
</div>
|
|
424
|
-
|
|
425
|
-
<div>
|
|
426
|
-
<Typography variant="h6" mb={2}>
|
|
427
|
-
Horizontal Layout
|
|
428
|
-
</Typography>
|
|
429
|
-
<Form variant="horizontal" maxWidth="lg" spacing="md">
|
|
430
|
-
<FormField name="field1" label="Field 1">
|
|
431
|
-
<Input placeholder="Horizontal layout" />
|
|
432
|
-
</FormField>
|
|
433
|
-
<FormField name="field2" label="Field 2">
|
|
434
|
-
<Input placeholder="Horizontal layout" />
|
|
435
|
-
</FormField>
|
|
436
|
-
</Form>
|
|
437
|
-
</div>
|
|
438
|
-
|
|
439
|
-
<div>
|
|
440
|
-
<Typography variant="h6" mb={2}>
|
|
441
|
-
Inline Layout
|
|
442
|
-
</Typography>
|
|
443
|
-
<Form variant="inline" spacing="md">
|
|
444
|
-
<Input placeholder="Inline layout" />
|
|
445
|
-
<Button variant="solid">Submit</Button>
|
|
446
|
-
</Form>
|
|
447
|
-
</div>
|
|
448
|
-
</Stack>
|
|
449
|
-
),
|
|
450
|
-
},
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
export const AllSizes: Story = {
|
|
454
|
-
args: {
|
|
455
|
-
variant: 'vertical',
|
|
456
|
-
spacing: 'md',
|
|
457
|
-
children: (
|
|
458
|
-
<Stack spacing={4}>
|
|
459
|
-
<div>
|
|
460
|
-
<Typography variant="h6" mb={2}>
|
|
461
|
-
Small Max Width
|
|
462
|
-
</Typography>
|
|
463
|
-
<Form variant="vertical" maxWidth="sm" spacing="md">
|
|
464
|
-
<FormField name="field" label="Small Width">
|
|
465
|
-
<Input placeholder="Small max width form" />
|
|
466
|
-
</FormField>
|
|
467
|
-
</Form>
|
|
468
|
-
</div>
|
|
469
|
-
|
|
470
|
-
<div>
|
|
471
|
-
<Typography variant="h6" mb={2}>
|
|
472
|
-
Medium Max Width
|
|
473
|
-
</Typography>
|
|
474
|
-
<Form variant="vertical" maxWidth="md" spacing="md">
|
|
475
|
-
<FormField name="field" label="Medium Width">
|
|
476
|
-
<Input placeholder="Medium max width form" />
|
|
477
|
-
</FormField>
|
|
478
|
-
</Form>
|
|
479
|
-
</div>
|
|
480
|
-
|
|
481
|
-
<div>
|
|
482
|
-
<Typography variant="h6" mb={2}>
|
|
483
|
-
Large Max Width
|
|
484
|
-
</Typography>
|
|
485
|
-
<Form variant="vertical" maxWidth="lg" spacing="md">
|
|
486
|
-
<FormField name="field" label="Large Width">
|
|
487
|
-
<Input placeholder="Large max width form" />
|
|
488
|
-
</FormField>
|
|
489
|
-
</Form>
|
|
490
|
-
</div>
|
|
491
|
-
|
|
492
|
-
<div>
|
|
493
|
-
<Typography variant="h6" mb={2}>
|
|
494
|
-
Extra Large Max Width
|
|
495
|
-
</Typography>
|
|
496
|
-
<Form variant="vertical" maxWidth="xl" spacing="md">
|
|
497
|
-
<FormField name="field" label="Extra Large Width">
|
|
498
|
-
<Input placeholder="Extra large max width form" />
|
|
499
|
-
</FormField>
|
|
500
|
-
</Form>
|
|
501
|
-
</div>
|
|
502
|
-
|
|
503
|
-
<div>
|
|
504
|
-
<Typography variant="h6" mb={2}>
|
|
505
|
-
Full Width
|
|
506
|
-
</Typography>
|
|
507
|
-
<Form variant="vertical" maxWidth="full" spacing="md">
|
|
508
|
-
<FormField name="field" label="Full Width">
|
|
509
|
-
<Input placeholder="Full width form" />
|
|
510
|
-
</FormField>
|
|
511
|
-
</Form>
|
|
512
|
-
</div>
|
|
513
|
-
</Stack>
|
|
514
|
-
),
|
|
515
|
-
},
|
|
516
|
-
};
|
|
517
|
-
|
|
518
|
-
export const AllStates: Story = {
|
|
519
|
-
args: {
|
|
520
|
-
variant: 'vertical',
|
|
521
|
-
maxWidth: 'md',
|
|
522
|
-
spacing: 'md',
|
|
523
|
-
children: (
|
|
524
|
-
<Stack spacing={4}>
|
|
525
|
-
<div>
|
|
526
|
-
<Typography variant="h6" mb={2}>
|
|
527
|
-
Default State
|
|
528
|
-
</Typography>
|
|
529
|
-
<Form variant="vertical" maxWidth="sm" spacing="md">
|
|
530
|
-
<FormField name="default" label="Default Field">
|
|
531
|
-
<Input placeholder="Default state" />
|
|
532
|
-
</FormField>
|
|
533
|
-
<Button variant="solid" type="submit">
|
|
534
|
-
Submit
|
|
535
|
-
</Button>
|
|
536
|
-
</Form>
|
|
537
|
-
</div>
|
|
538
|
-
|
|
539
|
-
<div>
|
|
540
|
-
<Typography variant="h6" mb={2}>
|
|
541
|
-
With Validation Errors
|
|
542
|
-
</Typography>
|
|
543
|
-
<Form variant="vertical" maxWidth="sm" spacing="md">
|
|
544
|
-
<FormField name="error" label="Error Field" required error="This field is required">
|
|
545
|
-
<Input placeholder="Error state" error />
|
|
546
|
-
</FormField>
|
|
547
|
-
<Button variant="solid" type="submit">
|
|
548
|
-
Submit
|
|
549
|
-
</Button>
|
|
550
|
-
</Form>
|
|
551
|
-
</div>
|
|
552
|
-
|
|
553
|
-
<div>
|
|
554
|
-
<Typography variant="h6" mb={2}>
|
|
555
|
-
Disabled State
|
|
556
|
-
</Typography>
|
|
557
|
-
<Form variant="vertical" maxWidth="sm" spacing="md">
|
|
558
|
-
<FormField name="disabled" label="Disabled Field">
|
|
559
|
-
<Input placeholder="Disabled state" disabled />
|
|
560
|
-
</FormField>
|
|
561
|
-
<Button variant="solid" type="submit" disabled>
|
|
562
|
-
Submit
|
|
563
|
-
</Button>
|
|
564
|
-
</Form>
|
|
565
|
-
</div>
|
|
566
|
-
|
|
567
|
-
<div>
|
|
568
|
-
<Typography variant="h6" mb={2}>
|
|
569
|
-
With Helper Text
|
|
570
|
-
</Typography>
|
|
571
|
-
<Form variant="vertical" maxWidth="sm" spacing="md">
|
|
572
|
-
<FormField name="helper" label="Field with Helper" helperText="This is helper text">
|
|
573
|
-
<Input placeholder="With helper text" />
|
|
574
|
-
</FormField>
|
|
575
|
-
<Button variant="solid" type="submit">
|
|
576
|
-
Submit
|
|
577
|
-
</Button>
|
|
578
|
-
</Form>
|
|
579
|
-
</div>
|
|
580
|
-
</Stack>
|
|
581
|
-
),
|
|
582
|
-
},
|
|
583
|
-
};
|
|
584
|
-
|
|
585
|
-
export const InteractiveStates: Story = {
|
|
586
|
-
args: {
|
|
587
|
-
variant: 'vertical',
|
|
588
|
-
maxWidth: 'md',
|
|
589
|
-
spacing: 'md',
|
|
590
|
-
children: (
|
|
591
|
-
<>
|
|
592
|
-
<Typography variant="h6" mb={2}>
|
|
593
|
-
Interactive Form Elements
|
|
594
|
-
</Typography>
|
|
595
|
-
<FormField name="text" label="Text Input" required>
|
|
596
|
-
<Input placeholder="Type here..." />
|
|
597
|
-
</FormField>
|
|
598
|
-
|
|
599
|
-
<FormField name="select" label="Select Field" required>
|
|
600
|
-
<Select
|
|
601
|
-
options={[
|
|
602
|
-
{ value: 'option1', label: 'Option 1' },
|
|
603
|
-
{ value: 'option2', label: 'Option 2' },
|
|
604
|
-
{ value: 'option3', label: 'Option 3' },
|
|
605
|
-
]}
|
|
606
|
-
placeholder="Select an option"
|
|
607
|
-
/>
|
|
608
|
-
</FormField>
|
|
609
|
-
|
|
610
|
-
<FormField name="textarea" label="Text Area">
|
|
611
|
-
<Textarea placeholder="Enter long text..." rows={3} />
|
|
612
|
-
</FormField>
|
|
613
|
-
|
|
614
|
-
<FormField name="checkbox">
|
|
615
|
-
<Stack spacing={1}>
|
|
616
|
-
<Checkbox label="Option A" />
|
|
617
|
-
<Checkbox label="Option B" />
|
|
618
|
-
<Checkbox label="Option C" />
|
|
619
|
-
</Stack>
|
|
620
|
-
</FormField>
|
|
621
|
-
|
|
622
|
-
<Stack direction="row" spacing={2} mt={2}>
|
|
623
|
-
<Button variant="outline" fullWidth>
|
|
624
|
-
Reset
|
|
625
|
-
</Button>
|
|
626
|
-
<Button variant="solid" type="submit" fullWidth>
|
|
627
|
-
Submit
|
|
628
|
-
</Button>
|
|
629
|
-
</Stack>
|
|
630
|
-
</>
|
|
631
|
-
),
|
|
632
|
-
},
|
|
633
|
-
};
|
|
634
|
-
|
|
635
|
-
export const Responsive: Story = {
|
|
636
|
-
parameters: {
|
|
637
|
-
viewport: {
|
|
638
|
-
viewports: {
|
|
639
|
-
mobile: { name: 'Mobile', styles: { width: '375px', height: '667px' } },
|
|
640
|
-
tablet: { name: 'Tablet', styles: { width: '768px', height: '1024px' } },
|
|
641
|
-
desktop: { name: 'Desktop', styles: { width: '1440px', height: '900px' } },
|
|
642
|
-
},
|
|
643
|
-
defaultViewport: 'desktop',
|
|
644
|
-
},
|
|
645
|
-
},
|
|
646
|
-
args: {
|
|
647
|
-
variant: 'vertical',
|
|
648
|
-
maxWidth: 'full',
|
|
649
|
-
spacing: 'md',
|
|
650
|
-
children: (
|
|
651
|
-
<>
|
|
652
|
-
<Typography variant="h5" mb={3}>
|
|
653
|
-
Responsive Form
|
|
654
|
-
</Typography>
|
|
655
|
-
<Stack direction={{ xs: 'column', sm: 'column', md: 'row' }} spacing={2} mb={2}>
|
|
656
|
-
<FormField name="firstName" label="First Name" required>
|
|
657
|
-
<Input placeholder="First name" />
|
|
658
|
-
</FormField>
|
|
659
|
-
<FormField name="lastName" label="Last Name" required>
|
|
660
|
-
<Input placeholder="Last name" />
|
|
661
|
-
</FormField>
|
|
662
|
-
</Stack>
|
|
663
|
-
|
|
664
|
-
<FormField name="email" label="Email" required>
|
|
665
|
-
<Input type="email" placeholder="email@example.com" />
|
|
666
|
-
</FormField>
|
|
667
|
-
|
|
668
|
-
<FormField name="phone" label="Phone">
|
|
669
|
-
<Input type="tel" placeholder="+1 (555) 000-0000" />
|
|
670
|
-
</FormField>
|
|
671
|
-
|
|
672
|
-
<FormField name="address" label="Address">
|
|
673
|
-
<Textarea placeholder="Enter your address..." rows={2} />
|
|
674
|
-
</FormField>
|
|
675
|
-
|
|
676
|
-
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={2} mt={3}>
|
|
677
|
-
<Button variant="outline" fullWidth>
|
|
678
|
-
Cancel
|
|
679
|
-
</Button>
|
|
680
|
-
<Button variant="solid" type="submit" fullWidth>
|
|
681
|
-
Save
|
|
682
|
-
</Button>
|
|
683
|
-
</Stack>
|
|
684
|
-
</>
|
|
685
|
-
),
|
|
686
|
-
},
|
|
687
|
-
};
|