aural-ui 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +456 -0
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +1327 -0
- package/dist/components/aspect-ratio/index.tsx +10 -0
- package/dist/components/aspect-ratio/meta.ts +8 -0
- package/dist/components/avatar/Avatar.stories.tsx +645 -0
- package/dist/components/avatar/index.tsx +50 -0
- package/dist/components/avatar/meta.ts +8 -0
- package/dist/components/badge/Badge.stories.tsx +169 -0
- package/dist/components/badge/index.tsx +28 -0
- package/dist/components/badge/meta.ts +6 -0
- package/dist/components/banner/Banner.stories.tsx +475 -0
- package/dist/components/banner/index.tsx +256 -0
- package/dist/components/banner/meta.ts +36 -0
- package/dist/components/button/Button.stories.tsx +74 -0
- package/dist/components/button/index.tsx +158 -0
- package/dist/components/button/meta.ts +33 -0
- package/dist/components/card/Card.stories.tsx +377 -0
- package/dist/components/card/index.tsx +85 -0
- package/dist/components/card/meta.ts +14 -0
- package/dist/components/char-count/CharCount.stories.tsx +334 -0
- package/dist/components/char-count/index.tsx +51 -0
- package/dist/components/char-count/meta.ts +13 -0
- package/dist/components/checkbox/Checkbox.stories.tsx +209 -0
- package/dist/components/checkbox/index.tsx +34 -0
- package/dist/components/checkbox/meta.ts +19 -0
- package/dist/components/chip/Chip.stories.tsx +207 -0
- package/dist/components/chip/index.tsx +92 -0
- package/dist/components/chip/meta.ts +17 -0
- package/dist/components/circular-loader/CircularLoader.stories.tsx +741 -0
- package/dist/components/circular-loader/index.tsx +138 -0
- package/dist/components/circular-loader/meta.ts +11 -0
- package/dist/components/collapsible/Collapsible.stories.tsx +319 -0
- package/dist/components/collapsible/index.tsx +158 -0
- package/dist/components/collapsible/meta.ts +22 -0
- package/dist/components/command/Command.stories.tsx +996 -0
- package/dist/components/command/index.tsx +324 -0
- package/dist/components/command/meta.ts +18 -0
- package/dist/components/dialog/Dialog.stories.tsx +963 -0
- package/dist/components/dialog/index.tsx +250 -0
- package/dist/components/dialog/meta.ts +28 -0
- package/dist/components/divider/Divider.stories.tsx +633 -0
- package/dist/components/divider/index.tsx +181 -0
- package/dist/components/divider/meta.ts +12 -0
- package/dist/components/dot-loader/DotLoader.stories.tsx +352 -0
- package/dist/components/dot-loader/index.tsx +78 -0
- package/dist/components/dot-loader/meta.ts +14 -0
- package/dist/components/dropdown/Dropdown.stories.tsx +1210 -0
- package/dist/components/dropdown/index.tsx +479 -0
- package/dist/components/dropdown/meta.ts +21 -0
- package/dist/components/form/Form.stories.tsx +320 -0
- package/dist/components/form/index.tsx +183 -0
- package/dist/components/form/meta.ts +11 -0
- package/dist/components/helper-text/HelperText.stories.tsx +254 -0
- package/dist/components/helper-text/index.tsx +102 -0
- package/dist/components/helper-text/meta.ts +18 -0
- package/dist/components/hover-card/HoverCard.stories.tsx +1328 -0
- package/dist/components/hover-card/index.tsx +42 -0
- package/dist/components/hover-card/meta.ts +12 -0
- package/dist/components/icon-button/IconButton.stories.tsx +252 -0
- package/dist/components/icon-button/index.tsx +130 -0
- package/dist/components/icon-button/meta.ts +20 -0
- package/dist/components/if-else/if-else.stories.tsx +100 -0
- package/dist/components/if-else/index.tsx +56 -0
- package/dist/components/if-else/meta.ts +6 -0
- package/dist/components/index.ts +70 -0
- package/dist/components/input/Input.stories.tsx +431 -0
- package/dist/components/input/index.tsx +487 -0
- package/dist/components/input/meta.ts +28 -0
- package/dist/components/label/Label.stories.tsx +200 -0
- package/dist/components/label/index.tsx +43 -0
- package/dist/components/label/meta.ts +14 -0
- package/dist/components/list/List.stories.tsx +963 -0
- package/dist/components/list/index.tsx +567 -0
- package/dist/components/list/meta.ts +24 -0
- package/dist/components/marquee/Marquee.stories.tsx +819 -0
- package/dist/components/marquee/index.tsx +107 -0
- package/dist/components/marquee/meta.ts +6 -0
- package/dist/components/overlay/Overlay.stories.tsx +954 -0
- package/dist/components/overlay/index.tsx +58 -0
- package/dist/components/overlay/meta.ts +10 -0
- package/dist/components/pagination/Pagination.stories.tsx +354 -0
- package/dist/components/pagination/index.tsx +455 -0
- package/dist/components/pagination/meta.ts +29 -0
- package/dist/components/popover/Popover.stories.tsx +1037 -0
- package/dist/components/popover/index.tsx +67 -0
- package/dist/components/popover/meta.ts +12 -0
- package/dist/components/radio/Radio.stories.tsx +146 -0
- package/dist/components/radio/index.tsx +41 -0
- package/dist/components/radio/meta.ts +19 -0
- package/dist/components/resizable/Resizable.stories.tsx +866 -0
- package/dist/components/resizable/index.tsx +55 -0
- package/dist/components/resizable/meta.ts +12 -0
- package/dist/components/scroll-area/ScrollArea.stories.tsx +1104 -0
- package/dist/components/scroll-area/index.tsx +55 -0
- package/dist/components/scroll-area/meta.ts +8 -0
- package/dist/components/search/Search.stories.tsx +678 -0
- package/dist/components/search/index.tsx +141 -0
- package/dist/components/search/meta.ts +6 -0
- package/dist/components/select/Select.stories.tsx +962 -0
- package/dist/components/select/index.tsx +512 -0
- package/dist/components/select/meta.ts +40 -0
- package/dist/components/sheet/Sheet.stories.tsx +1060 -0
- package/dist/components/sheet/index.tsx +440 -0
- package/dist/components/sheet/meta.ts +38 -0
- package/dist/components/skelton/Skelton.stories.tsx +859 -0
- package/dist/components/skelton/index.tsx +17 -0
- package/dist/components/skelton/meta.ts +6 -0
- package/dist/components/slider/Slider.stories.tsx +876 -0
- package/dist/components/slider/index.tsx +156 -0
- package/dist/components/slider/meta.ts +29 -0
- package/dist/components/stepper/Stepper.stories.tsx +639 -0
- package/dist/components/stepper/index.tsx +650 -0
- package/dist/components/stepper/meta.ts +19 -0
- package/dist/components/switch/Switch.stories.tsx +85 -0
- package/dist/components/switch/index.tsx +37 -0
- package/dist/components/switch/meta.ts +24 -0
- package/dist/components/switch-case/SwitchCase.stories.tsx +209 -0
- package/dist/components/switch-case/index.tsx +89 -0
- package/dist/components/switch-case/meta.ts +6 -0
- package/dist/components/table/Table.stories.tsx +1095 -0
- package/dist/components/table/index.tsx +113 -0
- package/dist/components/table/meta.ts +20 -0
- package/dist/components/tabs/Tabs.stories.tsx +1379 -0
- package/dist/components/tabs/index.tsx +186 -0
- package/dist/components/tabs/meta.ts +25 -0
- package/dist/components/tag/Tag.stories.tsx +625 -0
- package/dist/components/tag/index.tsx +320 -0
- package/dist/components/tag/meta.ts +52 -0
- package/dist/components/textarea/TextArea.stories.tsx +723 -0
- package/dist/components/textarea/index.tsx +480 -0
- package/dist/components/textarea/meta.ts +23 -0
- package/dist/components/toast/Toast.stories.tsx +1427 -0
- package/dist/components/toast/index.tsx +26 -0
- package/dist/components/toast/meta.ts +19 -0
- package/dist/components/toggle/Toggle.stories.tsx +1093 -0
- package/dist/components/toggle/index.tsx +44 -0
- package/dist/components/toggle/meta.ts +19 -0
- package/dist/components/tooltip/Tooltip.stories.tsx +1548 -0
- package/dist/components/tooltip/index.tsx +304 -0
- package/dist/components/tooltip/meta.ts +21 -0
- package/dist/components/typography/Typography.stories.tsx +197 -0
- package/dist/components/typography/index.tsx +184 -0
- package/dist/components/typography/meta.ts +38 -0
- package/dist/fonts/LabGrotesque-Regular.ttf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Bold.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Light.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Medium.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Regular.otf +0 -0
- package/dist/fonts/PPSupplySans-Regular (1).otf +0 -0
- package/dist/fonts/PPSupplySans-Regular.otf +0 -0
- package/dist/fonts/PPSupplySans-Ultralight.otf +0 -0
- package/dist/hooks/index.ts +3 -0
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +997 -0
- package/dist/hooks/use-previous/index.ts +15 -0
- package/dist/hooks/use-previous/meta.ts +6 -0
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +983 -0
- package/dist/hooks/use-standalone-pagination/index.ts +146 -0
- package/dist/hooks/use-standalone-pagination/meta.ts +6 -0
- package/dist/icons/Icons.stories.tsx +29 -0
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +991 -0
- package/dist/icons/alert-icon/index.tsx +48 -0
- package/dist/icons/alert-icon/meta.ts +8 -0
- package/dist/icons/all-icons.tsx +738 -0
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +1031 -0
- package/dist/icons/angle-down-icon/index.tsx +25 -0
- package/dist/icons/angle-down-icon/meta.ts +8 -0
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +1080 -0
- package/dist/icons/arrow-box-left-icon/index.tsx +24 -0
- package/dist/icons/arrow-box-left-icon/meta.ts +8 -0
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +1151 -0
- package/dist/icons/arrow-right-icon/index.tsx +26 -0
- package/dist/icons/arrow-right-icon/meta.ts +8 -0
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +1273 -0
- package/dist/icons/arrow-right-up-icon/index.tsx +24 -0
- package/dist/icons/arrow-right-up-icon/meta.ts +8 -0
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +670 -0
- package/dist/icons/art-board-icon/index.tsx +24 -0
- package/dist/icons/art-board-icon/meta.ts +7 -0
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +1244 -0
- package/dist/icons/audio-bar-icon/index.tsx +19 -0
- package/dist/icons/audio-bar-icon/meta.ts +8 -0
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +1239 -0
- package/dist/icons/bubble-check-icon/index.tsx +24 -0
- package/dist/icons/bubble-check-icon/meta.ts +8 -0
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +1228 -0
- package/dist/icons/bubble-crossed-icon/index.tsx +24 -0
- package/dist/icons/bubble-crossed-icon/meta.ts +8 -0
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +912 -0
- package/dist/icons/bubble-sparkle-icon/index.tsx +26 -0
- package/dist/icons/bubble-sparkle-icon/meta.ts +8 -0
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-double-left-icon/index.tsx +34 -0
- package/dist/icons/chevron-double-left-icon/meta.ts +8 -0
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-double-right-icon/index.tsx +34 -0
- package/dist/icons/chevron-double-right-icon/meta.ts +8 -0
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +1001 -0
- package/dist/icons/chevron-down-icon/index.tsx +27 -0
- package/dist/icons/chevron-down-icon/meta.ts +8 -0
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +1029 -0
- package/dist/icons/chevron-left-icon/index.tsx +27 -0
- package/dist/icons/chevron-left-icon/meta.ts +8 -0
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-right-icon/index.tsx +27 -0
- package/dist/icons/chevron-right-icon/meta.ts +8 -0
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +1036 -0
- package/dist/icons/chevron-up-icon/index.tsx +27 -0
- package/dist/icons/chevron-up-icon/meta.ts +8 -0
- package/dist/icons/command-icon/CommandIcon.stories.tsx +1098 -0
- package/dist/icons/command-icon/index.tsx +24 -0
- package/dist/icons/command-icon/meta.ts +8 -0
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +1061 -0
- package/dist/icons/cross-circle-icon/index.tsx +23 -0
- package/dist/icons/cross-circle-icon/meta.ts +8 -0
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +1027 -0
- package/dist/icons/cross-icon/index.tsx +24 -0
- package/dist/icons/cross-icon/meta.ts +8 -0
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +1092 -0
- package/dist/icons/edit-big-icon/index.tsx +22 -0
- package/dist/icons/edit-big-icon/meta.ts +8 -0
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +1090 -0
- package/dist/icons/eye-close-icon/index.tsx +26 -0
- package/dist/icons/eye-close-icon/meta.ts +8 -0
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +1098 -0
- package/dist/icons/eye-open-icon/index.tsx +24 -0
- package/dist/icons/eye-open-icon/meta.ts +8 -0
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +1071 -0
- package/dist/icons/feature-shine-icon/index.tsx +29 -0
- package/dist/icons/feature-shine-icon/meta.ts +8 -0
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +1115 -0
- package/dist/icons/file-chart-icon/index.tsx +24 -0
- package/dist/icons/file-chart-icon/meta.ts +8 -0
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +668 -0
- package/dist/icons/file-text-icon/index.tsx +24 -0
- package/dist/icons/file-text-icon/meta.ts +8 -0
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +1239 -0
- package/dist/icons/grip-vertical-icon/index.tsx +28 -0
- package/dist/icons/grip-vertical-icon/meta.ts +8 -0
- package/dist/icons/image-icon/ImageIcon.stories.tsx +1181 -0
- package/dist/icons/image-icon/index.tsx +24 -0
- package/dist/icons/image-icon/meta.ts +8 -0
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +1248 -0
- package/dist/icons/import-folder-icon/index.tsx +22 -0
- package/dist/icons/import-folder-icon/meta.ts +8 -0
- package/dist/icons/index.ts +46 -0
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +1272 -0
- package/dist/icons/light-bulb-simple-icon/index.tsx +24 -0
- package/dist/icons/light-bulb-simple-icon/meta.ts +8 -0
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +1245 -0
- package/dist/icons/magic-book-icon/index.tsx +32 -0
- package/dist/icons/magic-book-icon/meta.ts +8 -0
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +1251 -0
- package/dist/icons/maintenance-icon/index.tsx +23 -0
- package/dist/icons/maintenance-icon/meta.ts +8 -0
- package/dist/icons/message-icon/MessageIcon.stories.tsx +595 -0
- package/dist/icons/message-icon/index.tsx +30 -0
- package/dist/icons/message-icon/meta.ts +8 -0
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +1245 -0
- package/dist/icons/move-horizontal-icon/index.tsx +23 -0
- package/dist/icons/move-horizontal-icon/meta.ts +8 -0
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +1196 -0
- package/dist/icons/move-vertical-icon/index.tsx +23 -0
- package/dist/icons/move-vertical-icon/meta.ts +8 -0
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +1167 -0
- package/dist/icons/page-search-icon/index.tsx +21 -0
- package/dist/icons/page-search-icon/meta.ts +8 -0
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +1131 -0
- package/dist/icons/pencil-icon/index.tsx +21 -0
- package/dist/icons/pencil-icon/meta.ts +8 -0
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +1151 -0
- package/dist/icons/plus-icon/index.tsx +24 -0
- package/dist/icons/plus-icon/meta.ts +8 -0
- package/dist/icons/search-icon/SearchIcon.stories.tsx +1181 -0
- package/dist/icons/search-icon/index.tsx +24 -0
- package/dist/icons/search-icon/meta.ts +8 -0
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +1167 -0
- package/dist/icons/site-logo-icon/index.tsx +79 -0
- package/dist/icons/site-logo-icon/meta.ts +8 -0
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +637 -0
- package/dist/icons/spinner-gradient-icon/index.tsx +53 -0
- package/dist/icons/spinner-gradient-icon/meta.ts +8 -0
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +644 -0
- package/dist/icons/spinner-solid-icon/index.tsx +59 -0
- package/dist/icons/spinner-solid-icon/meta.ts +8 -0
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +736 -0
- package/dist/icons/spinner-solid-neutral-icon/index.tsx +53 -0
- package/dist/icons/spinner-solid-neutral-icon/meta.ts +8 -0
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +1204 -0
- package/dist/icons/tick-circle-icon/index.tsx +23 -0
- package/dist/icons/tick-circle-icon/meta.ts +8 -0
- package/dist/icons/tick-icon/TickIcon.stories.tsx +1340 -0
- package/dist/icons/tick-icon/index.tsx +24 -0
- package/dist/icons/tick-icon/meta.ts +8 -0
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +996 -0
- package/dist/icons/trash-icon/index.tsx +24 -0
- package/dist/icons/trash-icon/meta.ts +8 -0
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +947 -0
- package/dist/icons/upload-icon/index.tsx +24 -0
- package/dist/icons/upload-icon/meta.ts +8 -0
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +1045 -0
- package/dist/icons/vertical-menu-icon/index.tsx +27 -0
- package/dist/icons/vertical-menu-icon/meta.ts +8 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +206 -0
- package/dist/lib/utils.ts +6 -0
- package/dist/styles/aural-theme.css +1008 -0
- package/package.json +142 -0
|
@@ -0,0 +1,639 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { Stepper } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Stepper> = {
|
|
7
|
+
title: "Components/UI/Stepper",
|
|
8
|
+
component: Stepper,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered",
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component:
|
|
14
|
+
"A flexible stepper component that guides users through a multi-step process. Supports both automatic step generation and custom composition patterns with clickable navigation.",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
tags: ["autodocs"],
|
|
19
|
+
argTypes: {
|
|
20
|
+
steps: {
|
|
21
|
+
control: { type: "number", min: 1, max: 10 },
|
|
22
|
+
description: "Number of steps to generate automatically",
|
|
23
|
+
},
|
|
24
|
+
activeStep: {
|
|
25
|
+
control: { type: "number", min: 0, max: 9 },
|
|
26
|
+
description: "Currently active step (0-indexed)",
|
|
27
|
+
},
|
|
28
|
+
variant: {
|
|
29
|
+
control: { type: "select" },
|
|
30
|
+
options: ["primary", "positive", "negative", "warning"],
|
|
31
|
+
description: "Visual variant of the stepper",
|
|
32
|
+
},
|
|
33
|
+
orientation: {
|
|
34
|
+
control: { type: "select" },
|
|
35
|
+
options: ["horizontal", "vertical"],
|
|
36
|
+
description: "Layout orientation",
|
|
37
|
+
},
|
|
38
|
+
size: {
|
|
39
|
+
control: { type: "select" },
|
|
40
|
+
options: ["sm", "md", "lg"],
|
|
41
|
+
description: "Size of the step indicators",
|
|
42
|
+
},
|
|
43
|
+
stepLabels: {
|
|
44
|
+
control: { type: "object" },
|
|
45
|
+
description: "Array of labels for each step",
|
|
46
|
+
},
|
|
47
|
+
onStepClick: {
|
|
48
|
+
action: "stepClicked",
|
|
49
|
+
description: "Callback function when a step is clicked",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default meta
|
|
55
|
+
type Story = StoryObj<typeof Stepper>
|
|
56
|
+
|
|
57
|
+
// Basic Examples
|
|
58
|
+
export const Default: Story = {
|
|
59
|
+
args: {
|
|
60
|
+
steps: 4,
|
|
61
|
+
activeStep: 1,
|
|
62
|
+
variant: "primary",
|
|
63
|
+
orientation: "horizontal",
|
|
64
|
+
size: "md",
|
|
65
|
+
className: "text-fm-primary w-[600px]",
|
|
66
|
+
stepLabels: ["Step 1", "Step 2", "Step 3", "Step 4"],
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const WithLabels: Story = {
|
|
71
|
+
args: {
|
|
72
|
+
steps: 4,
|
|
73
|
+
activeStep: 1,
|
|
74
|
+
variant: "primary",
|
|
75
|
+
orientation: "horizontal",
|
|
76
|
+
size: "md",
|
|
77
|
+
className: "text-fm-primary w-[600px]",
|
|
78
|
+
stepLabels: ["Account", "Profile", "Payment", "Confirmation"],
|
|
79
|
+
},
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const Completed: Story = {
|
|
83
|
+
args: {
|
|
84
|
+
steps: 4,
|
|
85
|
+
activeStep: 4,
|
|
86
|
+
variant: "primary",
|
|
87
|
+
orientation: "horizontal",
|
|
88
|
+
size: "md",
|
|
89
|
+
className: "text-fm-primary w-[600px]",
|
|
90
|
+
stepLabels: ["Account", "Profile", "Payment", "Confirmation"],
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Clickable Examples
|
|
95
|
+
export const ClickableBasic: Story = {
|
|
96
|
+
render: () => {
|
|
97
|
+
const [activeStep, setActiveStep] = React.useState(1)
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<div className="space-y-4">
|
|
101
|
+
<div className="text-fm-primary text-sm">
|
|
102
|
+
Click on any step to navigate. Current step: {activeStep + 1}
|
|
103
|
+
</div>
|
|
104
|
+
<Stepper
|
|
105
|
+
steps={4}
|
|
106
|
+
activeStep={activeStep}
|
|
107
|
+
variant="primary"
|
|
108
|
+
className="text-fm-primary w-[600px]"
|
|
109
|
+
stepLabels={["Account", "Profile", "Payment", "Confirmation"]}
|
|
110
|
+
onStepClick={(stepIndex) => setActiveStep(stepIndex)}
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
)
|
|
114
|
+
},
|
|
115
|
+
parameters: {
|
|
116
|
+
docs: {
|
|
117
|
+
description: {
|
|
118
|
+
story:
|
|
119
|
+
"Stepper with clickable steps. Users can click on any step to navigate directly.",
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export const ClickableWithRestrictions: Story = {
|
|
126
|
+
render: () => {
|
|
127
|
+
const [activeStep, setActiveStep] = React.useState(0)
|
|
128
|
+
|
|
129
|
+
const handleStepClick = (stepIndex: number) => {
|
|
130
|
+
// Only allow navigation to completed steps or the next step
|
|
131
|
+
if (stepIndex <= activeStep + 1) {
|
|
132
|
+
setActiveStep(stepIndex)
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return (
|
|
137
|
+
<div className="space-y-4">
|
|
138
|
+
<div className="text-fm-primary text-sm">
|
|
139
|
+
Click on completed steps or the next step to navigate. Current step:{" "}
|
|
140
|
+
{activeStep + 1}
|
|
141
|
+
</div>
|
|
142
|
+
<Stepper
|
|
143
|
+
steps={5}
|
|
144
|
+
activeStep={activeStep}
|
|
145
|
+
variant="primary"
|
|
146
|
+
className="text-fm-primary w-[700px]"
|
|
147
|
+
stepLabels={["Start", "Info", "Review", "Payment", "Complete"]}
|
|
148
|
+
onStepClick={handleStepClick}
|
|
149
|
+
/>
|
|
150
|
+
<div className="flex gap-2">
|
|
151
|
+
<button
|
|
152
|
+
onClick={() => setActiveStep(Math.max(0, activeStep - 1))}
|
|
153
|
+
disabled={activeStep === 0}
|
|
154
|
+
className="rounded bg-gray-200 px-3 py-1 text-sm disabled:opacity-50"
|
|
155
|
+
>
|
|
156
|
+
Previous
|
|
157
|
+
</button>
|
|
158
|
+
<button
|
|
159
|
+
onClick={() => setActiveStep(Math.min(4, activeStep + 1))}
|
|
160
|
+
disabled={activeStep === 4}
|
|
161
|
+
className="rounded bg-blue-500 px-3 py-1 text-sm text-white disabled:opacity-50"
|
|
162
|
+
>
|
|
163
|
+
Next
|
|
164
|
+
</button>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
)
|
|
168
|
+
},
|
|
169
|
+
parameters: {
|
|
170
|
+
docs: {
|
|
171
|
+
description: {
|
|
172
|
+
story:
|
|
173
|
+
"Stepper with navigation restrictions. Users can only click on completed steps or the immediate next step.",
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export const ClickableVertical: Story = {
|
|
180
|
+
render: () => {
|
|
181
|
+
const [activeStep, setActiveStep] = React.useState(1)
|
|
182
|
+
|
|
183
|
+
return (
|
|
184
|
+
<div className="flex gap-8">
|
|
185
|
+
<div className="space-y-4">
|
|
186
|
+
<div className="text-fm-primary text-sm">
|
|
187
|
+
Vertical clickable stepper
|
|
188
|
+
</div>
|
|
189
|
+
<Stepper
|
|
190
|
+
steps={4}
|
|
191
|
+
activeStep={activeStep}
|
|
192
|
+
variant="positive"
|
|
193
|
+
orientation="vertical"
|
|
194
|
+
className="text-fm-primary h-[400px]"
|
|
195
|
+
stepLabels={["Setup", "Configure", "Test", "Deploy"]}
|
|
196
|
+
onStepClick={(stepIndex) => setActiveStep(stepIndex)}
|
|
197
|
+
/>
|
|
198
|
+
</div>
|
|
199
|
+
<div className="min-w-[300px] rounded-lg bg-gray-50 p-4">
|
|
200
|
+
<h3 className="mb-2 font-semibold">Step Content</h3>
|
|
201
|
+
<p className="text-sm text-gray-600">
|
|
202
|
+
Content for step:{" "}
|
|
203
|
+
{["Setup", "Configure", "Test", "Deploy"][activeStep] ||
|
|
204
|
+
"Completed"}
|
|
205
|
+
</p>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
)
|
|
209
|
+
},
|
|
210
|
+
parameters: {
|
|
211
|
+
layout: "padded",
|
|
212
|
+
docs: {
|
|
213
|
+
description: {
|
|
214
|
+
story: "Vertical orientation stepper with clickable navigation.",
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export const ClickableCompound: Story = {
|
|
221
|
+
render: () => {
|
|
222
|
+
const [activeStep, setActiveStep] = React.useState(0)
|
|
223
|
+
const steps = ["Personal", "Address", "Payment", "Review"]
|
|
224
|
+
|
|
225
|
+
return (
|
|
226
|
+
<div className="space-y-6">
|
|
227
|
+
<Stepper
|
|
228
|
+
variant="primary"
|
|
229
|
+
activeStep={activeStep}
|
|
230
|
+
onStepClick={(stepIndex) => setActiveStep(stepIndex)}
|
|
231
|
+
>
|
|
232
|
+
{steps.map((step, index) => (
|
|
233
|
+
<Stepper.Step
|
|
234
|
+
key={index}
|
|
235
|
+
index={index}
|
|
236
|
+
label={step}
|
|
237
|
+
isLast={index === steps.length - 1}
|
|
238
|
+
/>
|
|
239
|
+
))}
|
|
240
|
+
|
|
241
|
+
<Stepper.Content>
|
|
242
|
+
<div className="min-h-[200px] rounded-lg bg-blue-50 p-6">
|
|
243
|
+
<h3 className="mb-4 text-lg font-semibold">
|
|
244
|
+
{steps[activeStep]} Information
|
|
245
|
+
</h3>
|
|
246
|
+
<p className="mb-6 text-gray-600">
|
|
247
|
+
Please fill out your {steps[activeStep].toLowerCase()}{" "}
|
|
248
|
+
information below.
|
|
249
|
+
</p>
|
|
250
|
+
|
|
251
|
+
<div className="flex gap-4">
|
|
252
|
+
<button
|
|
253
|
+
onClick={() => setActiveStep(Math.max(0, activeStep - 1))}
|
|
254
|
+
disabled={activeStep === 0}
|
|
255
|
+
className="rounded bg-gray-200 px-4 py-2 text-gray-700 disabled:opacity-50"
|
|
256
|
+
>
|
|
257
|
+
Previous
|
|
258
|
+
</button>
|
|
259
|
+
<button
|
|
260
|
+
onClick={() =>
|
|
261
|
+
setActiveStep(Math.min(steps.length - 1, activeStep + 1))
|
|
262
|
+
}
|
|
263
|
+
disabled={activeStep === steps.length - 1}
|
|
264
|
+
className="rounded bg-blue-500 px-4 py-2 text-white disabled:opacity-50"
|
|
265
|
+
>
|
|
266
|
+
{activeStep === steps.length - 1 ? "Complete" : "Next"}
|
|
267
|
+
</button>
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
270
|
+
</Stepper.Content>
|
|
271
|
+
</Stepper>
|
|
272
|
+
</div>
|
|
273
|
+
)
|
|
274
|
+
},
|
|
275
|
+
parameters: {
|
|
276
|
+
layout: "padded",
|
|
277
|
+
docs: {
|
|
278
|
+
description: {
|
|
279
|
+
story:
|
|
280
|
+
"Compound component pattern with clickable steps and integrated content area.",
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export const ClickableAllVariants: Story = {
|
|
287
|
+
render: () => {
|
|
288
|
+
const [activeSteps, setActiveSteps] = React.useState({
|
|
289
|
+
primary: 1,
|
|
290
|
+
positive: 2,
|
|
291
|
+
negative: 0,
|
|
292
|
+
warning: 3,
|
|
293
|
+
})
|
|
294
|
+
|
|
295
|
+
const handleStepClick = (
|
|
296
|
+
variant: keyof typeof activeSteps,
|
|
297
|
+
stepIndex: number
|
|
298
|
+
) => {
|
|
299
|
+
setActiveSteps((prev) => ({
|
|
300
|
+
...prev,
|
|
301
|
+
[variant]: stepIndex,
|
|
302
|
+
}))
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
return (
|
|
306
|
+
<div className="text-fm-primary space-y-8">
|
|
307
|
+
{(["primary", "positive", "negative", "warning"] as const).map(
|
|
308
|
+
(variant) => (
|
|
309
|
+
<div key={variant} className="space-y-2">
|
|
310
|
+
<h4 className="text-sm font-medium capitalize">
|
|
311
|
+
{variant} - Active Step: {activeSteps[variant] + 1}
|
|
312
|
+
</h4>
|
|
313
|
+
<Stepper
|
|
314
|
+
steps={4}
|
|
315
|
+
activeStep={activeSteps[variant]}
|
|
316
|
+
variant={variant}
|
|
317
|
+
stepLabels={["Step 1", "Step 2", "Step 3", "Step 4"]}
|
|
318
|
+
onStepClick={(stepIndex) => handleStepClick(variant, stepIndex)}
|
|
319
|
+
/>
|
|
320
|
+
</div>
|
|
321
|
+
)
|
|
322
|
+
)}
|
|
323
|
+
</div>
|
|
324
|
+
)
|
|
325
|
+
},
|
|
326
|
+
parameters: {
|
|
327
|
+
layout: "padded",
|
|
328
|
+
docs: {
|
|
329
|
+
description: {
|
|
330
|
+
story:
|
|
331
|
+
"All variants with clickable functionality to demonstrate different visual styles.",
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export const ClickableWithKeyboard: Story = {
|
|
338
|
+
render: () => {
|
|
339
|
+
const [activeStep, setActiveStep] = React.useState(1)
|
|
340
|
+
|
|
341
|
+
return (
|
|
342
|
+
<div className="space-y-4">
|
|
343
|
+
<div className="rounded-lg bg-yellow-50 p-4 text-sm">
|
|
344
|
+
<strong>Keyboard Navigation:</strong>
|
|
345
|
+
<ul className="mt-2 space-y-1">
|
|
346
|
+
<li>• Use Tab to focus on clickable steps</li>
|
|
347
|
+
<li>• Press Enter or Space to navigate to a step</li>
|
|
348
|
+
<li>• Use mouse click for direct navigation</li>
|
|
349
|
+
</ul>
|
|
350
|
+
</div>
|
|
351
|
+
<Stepper
|
|
352
|
+
steps={5}
|
|
353
|
+
activeStep={activeStep}
|
|
354
|
+
variant="primary"
|
|
355
|
+
className="text-fm-primary w-[700px]"
|
|
356
|
+
stepLabels={["Start", "Personal", "Details", "Review", "Finish"]}
|
|
357
|
+
onStepClick={(stepIndex) => setActiveStep(stepIndex)}
|
|
358
|
+
aria-label="Registration process stepper"
|
|
359
|
+
/>
|
|
360
|
+
<div className="text-fm-primary text-sm">
|
|
361
|
+
Current step: {activeStep + 1} of 5
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
364
|
+
)
|
|
365
|
+
},
|
|
366
|
+
parameters: {
|
|
367
|
+
docs: {
|
|
368
|
+
description: {
|
|
369
|
+
story:
|
|
370
|
+
"Demonstrates keyboard accessibility features for clickable steps. Focus management and ARIA labels provide screen reader support.",
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// Variant Examples
|
|
377
|
+
export const PrimaryVariant: Story = {
|
|
378
|
+
args: {
|
|
379
|
+
steps: 4,
|
|
380
|
+
activeStep: 2,
|
|
381
|
+
variant: "primary",
|
|
382
|
+
className: "text-fm-primary w-[600px]",
|
|
383
|
+
stepLabels: ["Step 1", "Step 2", "Step 3", "Step 4"],
|
|
384
|
+
},
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export const PositiveVariant: Story = {
|
|
388
|
+
args: {
|
|
389
|
+
steps: 4,
|
|
390
|
+
activeStep: 2,
|
|
391
|
+
variant: "positive",
|
|
392
|
+
className: "text-fm-primary w-[600px]",
|
|
393
|
+
stepLabels: ["Step 1", "Step 2", "Step 3", "Step 4"],
|
|
394
|
+
},
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export const NegativeVariant: Story = {
|
|
398
|
+
args: {
|
|
399
|
+
steps: 4,
|
|
400
|
+
activeStep: 2,
|
|
401
|
+
variant: "negative",
|
|
402
|
+
className: "text-fm-primary w-[600px]",
|
|
403
|
+
stepLabels: ["Step 1", "Step 2", "Step 3", "Step 4"],
|
|
404
|
+
},
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export const WarningVariant: Story = {
|
|
408
|
+
args: {
|
|
409
|
+
steps: 4,
|
|
410
|
+
activeStep: 2,
|
|
411
|
+
variant: "warning",
|
|
412
|
+
className: "text-fm-primary w-[600px]",
|
|
413
|
+
stepLabels: ["Step 1", "Step 2", "Step 3", "Step 4"],
|
|
414
|
+
},
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// Size Examples
|
|
418
|
+
export const SmallSize: Story = {
|
|
419
|
+
args: {
|
|
420
|
+
steps: 4,
|
|
421
|
+
activeStep: 2,
|
|
422
|
+
variant: "primary",
|
|
423
|
+
className: "text-fm-primary w-[600px]",
|
|
424
|
+
size: "sm",
|
|
425
|
+
stepLabels: ["Step 1", "Step 2", "Step 3", "Step 4"],
|
|
426
|
+
},
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export const MediumSize: Story = {
|
|
430
|
+
args: {
|
|
431
|
+
steps: 4,
|
|
432
|
+
activeStep: 2,
|
|
433
|
+
variant: "primary",
|
|
434
|
+
size: "md",
|
|
435
|
+
className: "text-fm-primary w-[600px]",
|
|
436
|
+
stepLabels: ["Step 1", "Step 2", "Step 3", "Step 4"],
|
|
437
|
+
},
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export const LargeSize: Story = {
|
|
441
|
+
args: {
|
|
442
|
+
steps: 4,
|
|
443
|
+
activeStep: 2,
|
|
444
|
+
variant: "primary",
|
|
445
|
+
size: "lg",
|
|
446
|
+
className: "text-fm-primary w-[600px]",
|
|
447
|
+
stepLabels: ["Step 1", "Step 2", "Step 3", "Step 4"],
|
|
448
|
+
},
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// Orientation Examples
|
|
452
|
+
export const HorizontalOrientation: Story = {
|
|
453
|
+
args: {
|
|
454
|
+
steps: 4,
|
|
455
|
+
activeStep: 2,
|
|
456
|
+
variant: "primary",
|
|
457
|
+
orientation: "horizontal",
|
|
458
|
+
className: "text-fm-primary w-[600px]",
|
|
459
|
+
stepLabels: ["Step 1", "Step 2", "Step 3", "Step 4"],
|
|
460
|
+
},
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export const VerticalOrientation: Story = {
|
|
464
|
+
args: {
|
|
465
|
+
steps: 4,
|
|
466
|
+
activeStep: 2,
|
|
467
|
+
variant: "primary",
|
|
468
|
+
orientation: "vertical",
|
|
469
|
+
stepLabels: ["Step 1", "Step 2", "Step 3", "Step 4"],
|
|
470
|
+
className: "text-fm-primary h-[400px]",
|
|
471
|
+
},
|
|
472
|
+
parameters: {
|
|
473
|
+
layout: "padded",
|
|
474
|
+
},
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// Interactive Example
|
|
478
|
+
export const Interactive: Story = {
|
|
479
|
+
render: () => {
|
|
480
|
+
const [activeStep, setActiveStep] = React.useState(0)
|
|
481
|
+
const steps = [
|
|
482
|
+
"Account Setup",
|
|
483
|
+
"Personal Info",
|
|
484
|
+
"Preferences",
|
|
485
|
+
"Review",
|
|
486
|
+
"Complete",
|
|
487
|
+
]
|
|
488
|
+
|
|
489
|
+
return (
|
|
490
|
+
<div className="space-y-8">
|
|
491
|
+
<Stepper activeStep={activeStep}>
|
|
492
|
+
{steps.map((step, index) => (
|
|
493
|
+
<Stepper.Step
|
|
494
|
+
key={index}
|
|
495
|
+
index={index}
|
|
496
|
+
label={step}
|
|
497
|
+
isLast={index === steps.length - 1}
|
|
498
|
+
/>
|
|
499
|
+
))}
|
|
500
|
+
<Stepper.Content>
|
|
501
|
+
<div className="min-h-[200px] rounded-lg bg-gray-50 p-6">
|
|
502
|
+
<h3 className="mb-4 text-lg font-semibold">
|
|
503
|
+
{steps[activeStep] || "Completed!"}
|
|
504
|
+
</h3>
|
|
505
|
+
<p className="mb-6 text-gray-600">
|
|
506
|
+
{activeStep < steps.length
|
|
507
|
+
? `This is the content for ${steps[activeStep]}`
|
|
508
|
+
: "All steps completed successfully!"}
|
|
509
|
+
</p>
|
|
510
|
+
|
|
511
|
+
<div className="flex gap-4">
|
|
512
|
+
<button
|
|
513
|
+
onClick={() => setActiveStep(Math.max(0, activeStep - 1))}
|
|
514
|
+
disabled={activeStep === 0}
|
|
515
|
+
className="rounded bg-gray-200 px-4 py-2 text-gray-700 disabled:opacity-50"
|
|
516
|
+
>
|
|
517
|
+
Previous
|
|
518
|
+
</button>
|
|
519
|
+
<button
|
|
520
|
+
onClick={() =>
|
|
521
|
+
setActiveStep(Math.min(steps.length, activeStep + 1))
|
|
522
|
+
}
|
|
523
|
+
disabled={activeStep >= steps.length}
|
|
524
|
+
className="rounded bg-blue-500 px-4 py-2 text-white disabled:opacity-50"
|
|
525
|
+
>
|
|
526
|
+
{activeStep === steps.length - 1 ? "Complete" : "Next"}
|
|
527
|
+
</button>
|
|
528
|
+
</div>
|
|
529
|
+
</div>
|
|
530
|
+
</Stepper.Content>
|
|
531
|
+
</Stepper>
|
|
532
|
+
</div>
|
|
533
|
+
)
|
|
534
|
+
},
|
|
535
|
+
parameters: {
|
|
536
|
+
layout: "padded",
|
|
537
|
+
},
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// Custom Composition Example
|
|
541
|
+
export const CustomComposition: Story = {
|
|
542
|
+
render: () => (
|
|
543
|
+
<Stepper variant="primary" activeStep={1}>
|
|
544
|
+
<Stepper.Step index={0} label="Start" />
|
|
545
|
+
<Stepper.Step index={1} label="Progress" />
|
|
546
|
+
<Stepper.Step index={2} label="Finish" isLast />
|
|
547
|
+
|
|
548
|
+
<Stepper.Content>
|
|
549
|
+
<div className="rounded-lg bg-blue-50 p-4">
|
|
550
|
+
<p>Custom content area with flexible composition</p>
|
|
551
|
+
</div>
|
|
552
|
+
</Stepper.Content>
|
|
553
|
+
</Stepper>
|
|
554
|
+
),
|
|
555
|
+
parameters: {
|
|
556
|
+
layout: "padded",
|
|
557
|
+
},
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
// All Variants Showcase
|
|
561
|
+
export const AllVariants: Story = {
|
|
562
|
+
render: () => (
|
|
563
|
+
<div className="text-fm-primary space-y-8">
|
|
564
|
+
{(["primary", "positive", "negative", "warning"] as const).map(
|
|
565
|
+
(variant) => (
|
|
566
|
+
<div key={variant} className="space-y-2">
|
|
567
|
+
<h4 className="text-sm font-medium capitalize">{variant}</h4>
|
|
568
|
+
<Stepper
|
|
569
|
+
steps={4}
|
|
570
|
+
activeStep={2}
|
|
571
|
+
variant={variant}
|
|
572
|
+
stepLabels={["Step 1", "Step 2", "Step 3", "Step 4"]}
|
|
573
|
+
/>
|
|
574
|
+
</div>
|
|
575
|
+
)
|
|
576
|
+
)}
|
|
577
|
+
</div>
|
|
578
|
+
),
|
|
579
|
+
parameters: {
|
|
580
|
+
layout: "padded",
|
|
581
|
+
},
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
// Progressive States Example
|
|
585
|
+
export const ProgressiveStates: Story = {
|
|
586
|
+
render: () => {
|
|
587
|
+
const steps = ["Not Started", "In Progress", "Completed"]
|
|
588
|
+
|
|
589
|
+
return (
|
|
590
|
+
<div className="text-fm-primary space-y-8">
|
|
591
|
+
{[0, 1, 2, 3].map((activeStep) => (
|
|
592
|
+
<div key={activeStep} className="space-y-2">
|
|
593
|
+
<h4 className="text-sm font-medium">
|
|
594
|
+
Active Step: {activeStep}{" "}
|
|
595
|
+
{activeStep === 3 ? "(All Complete)" : ""}
|
|
596
|
+
</h4>
|
|
597
|
+
<Stepper
|
|
598
|
+
steps={3}
|
|
599
|
+
activeStep={activeStep}
|
|
600
|
+
variant="primary"
|
|
601
|
+
stepLabels={steps}
|
|
602
|
+
/>
|
|
603
|
+
</div>
|
|
604
|
+
))}
|
|
605
|
+
</div>
|
|
606
|
+
)
|
|
607
|
+
},
|
|
608
|
+
parameters: {
|
|
609
|
+
layout: "padded",
|
|
610
|
+
},
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
// Vertical with Content Example
|
|
614
|
+
export const VerticalWithContent: Story = {
|
|
615
|
+
render: () => (
|
|
616
|
+
<div className="text-fm-primary">
|
|
617
|
+
<Stepper
|
|
618
|
+
steps={4}
|
|
619
|
+
activeStep={2}
|
|
620
|
+
variant="primary"
|
|
621
|
+
orientation="vertical"
|
|
622
|
+
stepLabels={["Account", "Profile", "Settings", "Review"]}
|
|
623
|
+
className="h-[800px]"
|
|
624
|
+
>
|
|
625
|
+
<Stepper.Content>
|
|
626
|
+
<div className="rounded-lg bg-gray-50 p-6 text-gray-600">
|
|
627
|
+
<h3 className="mb-4 text-lg font-semibold">
|
|
628
|
+
Settings Configuration
|
|
629
|
+
</h3>
|
|
630
|
+
<p>Configure your account settings and preferences.</p>
|
|
631
|
+
</div>
|
|
632
|
+
</Stepper.Content>
|
|
633
|
+
</Stepper>
|
|
634
|
+
</div>
|
|
635
|
+
),
|
|
636
|
+
parameters: {
|
|
637
|
+
layout: "padded",
|
|
638
|
+
},
|
|
639
|
+
}
|