@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,516 +0,0 @@
|
|
|
1
|
-
import AccountBalance from '@mui/icons-material/AccountBalance';
|
|
2
|
-
import Analytics from '@mui/icons-material/Analytics';
|
|
3
|
-
import Business from '@mui/icons-material/Business';
|
|
4
|
-
import Category from '@mui/icons-material/Category';
|
|
5
|
-
import Dashboard from '@mui/icons-material/Dashboard';
|
|
6
|
-
import Help from '@mui/icons-material/Help';
|
|
7
|
-
import Home from '@mui/icons-material/Home';
|
|
8
|
-
import Inventory from '@mui/icons-material/Inventory';
|
|
9
|
-
import LocalShipping from '@mui/icons-material/LocalShipping';
|
|
10
|
-
import Notifications from '@mui/icons-material/Notifications';
|
|
11
|
-
import People from '@mui/icons-material/People';
|
|
12
|
-
import Receipt from '@mui/icons-material/Receipt';
|
|
13
|
-
import Report from '@mui/icons-material/Report';
|
|
14
|
-
import Settings from '@mui/icons-material/Settings';
|
|
15
|
-
import ShoppingCart from '@mui/icons-material/ShoppingCart';
|
|
16
|
-
import { Box, Typography } from '@mui/material';
|
|
17
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
18
|
-
|
|
19
|
-
import { NavigationMenu } from '../NavigationMenu';
|
|
20
|
-
|
|
21
|
-
const meta: Meta<typeof NavigationMenu> = {
|
|
22
|
-
title: 'Navigation/NavigationMenu',
|
|
23
|
-
component: NavigationMenu,
|
|
24
|
-
parameters: {
|
|
25
|
-
layout: 'fullscreen',
|
|
26
|
-
docs: {
|
|
27
|
-
description: {
|
|
28
|
-
component:
|
|
29
|
-
'A flexible navigation menu component supporting horizontal, vertical, and mega menu layouts with nested items and customization options.',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
tags: ['autodocs', 'component:NavigationMenu'],
|
|
34
|
-
argTypes: {
|
|
35
|
-
variant: {
|
|
36
|
-
control: 'select',
|
|
37
|
-
options: ['horizontal', 'vertical', 'mega'],
|
|
38
|
-
description: 'Layout variant of the navigation menu',
|
|
39
|
-
},
|
|
40
|
-
size: {
|
|
41
|
-
control: 'select',
|
|
42
|
-
options: ['sm', 'md', 'lg'],
|
|
43
|
-
description: 'Size of the menu items',
|
|
44
|
-
},
|
|
45
|
-
color: {
|
|
46
|
-
control: 'select',
|
|
47
|
-
options: ['default', 'primary', 'secondary'],
|
|
48
|
-
description: 'Color scheme for the menu',
|
|
49
|
-
},
|
|
50
|
-
minimal: {
|
|
51
|
-
control: 'boolean',
|
|
52
|
-
description: 'Minimal style with no borders, shadows, or container backgrounds',
|
|
53
|
-
},
|
|
54
|
-
collapsible: {
|
|
55
|
-
control: 'boolean',
|
|
56
|
-
description: 'Whether the vertical menu can be collapsed',
|
|
57
|
-
},
|
|
58
|
-
collapsed: {
|
|
59
|
-
control: 'boolean',
|
|
60
|
-
description: 'Whether the vertical menu is collapsed',
|
|
61
|
-
},
|
|
62
|
-
showDividers: {
|
|
63
|
-
control: 'boolean',
|
|
64
|
-
description: 'Whether to show dividers between menu sections',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export default meta;
|
|
70
|
-
type Story = StoryObj<typeof meta>;
|
|
71
|
-
|
|
72
|
-
const basicVerticalItems = [
|
|
73
|
-
{
|
|
74
|
-
id: '1',
|
|
75
|
-
label: 'Dashboard',
|
|
76
|
-
icon: <Dashboard />,
|
|
77
|
-
href: '#',
|
|
78
|
-
active: true,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
id: '2',
|
|
82
|
-
label: 'Orders',
|
|
83
|
-
icon: <ShoppingCart />,
|
|
84
|
-
href: '#',
|
|
85
|
-
badge: 5,
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
id: '3',
|
|
89
|
-
label: 'Customers',
|
|
90
|
-
icon: <People />,
|
|
91
|
-
href: '#',
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
id: '4',
|
|
95
|
-
label: 'Inventory',
|
|
96
|
-
icon: <Inventory />,
|
|
97
|
-
href: '#',
|
|
98
|
-
children: [
|
|
99
|
-
{ id: '4-1', label: 'All Items', href: '#' },
|
|
100
|
-
{ id: '4-2', label: 'Categories', href: '#' },
|
|
101
|
-
{ id: '4-3', label: 'Suppliers', href: '#' },
|
|
102
|
-
],
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
id: '5',
|
|
106
|
-
label: 'Reports',
|
|
107
|
-
icon: <Analytics />,
|
|
108
|
-
href: '#',
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
id: '6',
|
|
112
|
-
label: 'Settings',
|
|
113
|
-
icon: <Settings />,
|
|
114
|
-
href: '#',
|
|
115
|
-
},
|
|
116
|
-
];
|
|
117
|
-
|
|
118
|
-
const horizontalItems = [
|
|
119
|
-
{ id: '1', label: 'Home', href: '#', active: true },
|
|
120
|
-
{ id: '2', label: 'Products', href: '#' },
|
|
121
|
-
{ id: '3', label: 'Services', href: '#' },
|
|
122
|
-
{ id: '4', label: 'About', href: '#' },
|
|
123
|
-
{ id: '5', label: 'Contact', href: '#' },
|
|
124
|
-
];
|
|
125
|
-
|
|
126
|
-
const megaMenuItems = [
|
|
127
|
-
{
|
|
128
|
-
id: 'operations',
|
|
129
|
-
label: 'Operations',
|
|
130
|
-
children: [
|
|
131
|
-
{ id: 'dashboard', label: 'Dashboard', icon: <Dashboard />, href: '#' },
|
|
132
|
-
{ id: 'orders', label: 'Orders', icon: <ShoppingCart />, href: '#' },
|
|
133
|
-
{ id: 'shipping', label: 'Shipping', icon: <LocalShipping />, href: '#' },
|
|
134
|
-
{ id: 'invoices', label: 'Invoices', icon: <Receipt />, href: '#' },
|
|
135
|
-
],
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
id: 'management',
|
|
139
|
-
label: 'Management',
|
|
140
|
-
children: [
|
|
141
|
-
{ id: 'inventory', label: 'Inventory', icon: <Inventory />, href: '#' },
|
|
142
|
-
{ id: 'customers', label: 'Customers', icon: <People />, href: '#' },
|
|
143
|
-
{ id: 'suppliers', label: 'Suppliers', icon: <Business />, href: '#' },
|
|
144
|
-
{ id: 'categories', label: 'Categories', icon: <Category />, href: '#' },
|
|
145
|
-
],
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
id: 'analytics',
|
|
149
|
-
label: 'Analytics & Reports',
|
|
150
|
-
children: [
|
|
151
|
-
{ id: 'analytics', label: 'Analytics', icon: <Analytics />, href: '#' },
|
|
152
|
-
{ id: 'reports', label: 'Reports', icon: <Report />, href: '#' },
|
|
153
|
-
{ id: 'finance', label: 'Finance', icon: <AccountBalance />, href: '#' },
|
|
154
|
-
],
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
id: 'system',
|
|
158
|
-
label: 'System',
|
|
159
|
-
children: [
|
|
160
|
-
{ id: 'settings', label: 'Settings', icon: <Settings />, href: '#' },
|
|
161
|
-
{ id: 'help', label: 'Help & Support', icon: <Help />, href: '#' },
|
|
162
|
-
{ id: 'notifications', label: 'Notifications', icon: <Notifications />, href: '#' },
|
|
163
|
-
],
|
|
164
|
-
},
|
|
165
|
-
];
|
|
166
|
-
|
|
167
|
-
const logo = (
|
|
168
|
-
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
|
169
|
-
<Home color="primary" />
|
|
170
|
-
<Typography variant="h6" fontWeight="bold">
|
|
171
|
-
Procurement
|
|
172
|
-
</Typography>
|
|
173
|
-
</Box>
|
|
174
|
-
);
|
|
175
|
-
|
|
176
|
-
// Required default story export
|
|
177
|
-
export const Default: Story = {
|
|
178
|
-
args: {
|
|
179
|
-
variant: 'vertical',
|
|
180
|
-
items: basicVerticalItems,
|
|
181
|
-
size: 'md',
|
|
182
|
-
},
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
// Required AllVariants story export
|
|
186
|
-
export const AllVariants: Story = {
|
|
187
|
-
render: () => (
|
|
188
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
|
189
|
-
<Box>
|
|
190
|
-
<Typography variant="h6" sx={{ mb: 2 }}>
|
|
191
|
-
Vertical Variant
|
|
192
|
-
</Typography>
|
|
193
|
-
<Box sx={{ height: 300, border: '1px solid', borderColor: 'divider', borderRadius: 1 }}>
|
|
194
|
-
<NavigationMenu variant="vertical" items={basicVerticalItems} logo={logo} />
|
|
195
|
-
</Box>
|
|
196
|
-
</Box>
|
|
197
|
-
<Box>
|
|
198
|
-
<Typography variant="h6" sx={{ mb: 2 }}>
|
|
199
|
-
Horizontal Variant
|
|
200
|
-
</Typography>
|
|
201
|
-
<NavigationMenu variant="horizontal" items={horizontalItems} />
|
|
202
|
-
</Box>
|
|
203
|
-
<Box>
|
|
204
|
-
<Typography variant="h6" sx={{ mb: 2 }}>
|
|
205
|
-
Mega Menu Variant
|
|
206
|
-
</Typography>
|
|
207
|
-
<NavigationMenu variant="mega" items={megaMenuItems} logo={logo} />
|
|
208
|
-
</Box>
|
|
209
|
-
</Box>
|
|
210
|
-
),
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
// Required AllSizes story export
|
|
214
|
-
export const AllSizes: Story = {
|
|
215
|
-
render: () => (
|
|
216
|
-
<Box sx={{ display: 'flex', gap: 4 }}>
|
|
217
|
-
<Box>
|
|
218
|
-
<Typography variant="subtitle2" sx={{ mb: 1 }}>
|
|
219
|
-
Small
|
|
220
|
-
</Typography>
|
|
221
|
-
<Box sx={{ height: 400, width: 250, border: '1px solid', borderColor: 'divider' }}>
|
|
222
|
-
<NavigationMenu variant="vertical" items={basicVerticalItems} size="sm" />
|
|
223
|
-
</Box>
|
|
224
|
-
</Box>
|
|
225
|
-
<Box>
|
|
226
|
-
<Typography variant="subtitle2" sx={{ mb: 1 }}>
|
|
227
|
-
Medium
|
|
228
|
-
</Typography>
|
|
229
|
-
<Box sx={{ height: 400, width: 280, border: '1px solid', borderColor: 'divider' }}>
|
|
230
|
-
<NavigationMenu variant="vertical" items={basicVerticalItems} size="md" />
|
|
231
|
-
</Box>
|
|
232
|
-
</Box>
|
|
233
|
-
<Box>
|
|
234
|
-
<Typography variant="subtitle2" sx={{ mb: 1 }}>
|
|
235
|
-
Large
|
|
236
|
-
</Typography>
|
|
237
|
-
<Box sx={{ height: 400, width: 320, border: '1px solid', borderColor: 'divider' }}>
|
|
238
|
-
<NavigationMenu variant="vertical" items={basicVerticalItems} size="lg" />
|
|
239
|
-
</Box>
|
|
240
|
-
</Box>
|
|
241
|
-
</Box>
|
|
242
|
-
),
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
// Required AllStates story export
|
|
246
|
-
export const AllStates: Story = {
|
|
247
|
-
render: () => {
|
|
248
|
-
const stateItems = [
|
|
249
|
-
{ id: '1', label: 'Active Item', icon: <Dashboard />, active: true, href: '#' },
|
|
250
|
-
{ id: '2', label: 'Normal Item', icon: <ShoppingCart />, href: '#' },
|
|
251
|
-
{ id: '3', label: 'Disabled Item', icon: <People />, disabled: true, href: '#' },
|
|
252
|
-
{ id: '4', label: 'Item with Badge', icon: <Notifications />, badge: 5, href: '#' },
|
|
253
|
-
{
|
|
254
|
-
id: '5',
|
|
255
|
-
label: 'Item with Description',
|
|
256
|
-
icon: <Settings />,
|
|
257
|
-
description: 'Additional info',
|
|
258
|
-
href: '#',
|
|
259
|
-
},
|
|
260
|
-
];
|
|
261
|
-
|
|
262
|
-
return (
|
|
263
|
-
<Box sx={{ display: 'flex', gap: 4 }}>
|
|
264
|
-
<Box>
|
|
265
|
-
<Typography variant="subtitle2" sx={{ mb: 1 }}>
|
|
266
|
-
Vertical States
|
|
267
|
-
</Typography>
|
|
268
|
-
<Box sx={{ height: 400, width: 280, border: '1px solid', borderColor: 'divider' }}>
|
|
269
|
-
<NavigationMenu variant="vertical" items={stateItems} />
|
|
270
|
-
</Box>
|
|
271
|
-
</Box>
|
|
272
|
-
<Box>
|
|
273
|
-
<Typography variant="subtitle2" sx={{ mb: 1 }}>
|
|
274
|
-
Collapsed State
|
|
275
|
-
</Typography>
|
|
276
|
-
<Box sx={{ height: 400, border: '1px solid', borderColor: 'divider' }}>
|
|
277
|
-
<NavigationMenu
|
|
278
|
-
variant="vertical"
|
|
279
|
-
items={stateItems}
|
|
280
|
-
collapsed={true}
|
|
281
|
-
collapsible={true}
|
|
282
|
-
/>
|
|
283
|
-
</Box>
|
|
284
|
-
</Box>
|
|
285
|
-
</Box>
|
|
286
|
-
);
|
|
287
|
-
},
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
// Required InteractiveStates story export
|
|
291
|
-
export const InteractiveStates: Story = {
|
|
292
|
-
args: {
|
|
293
|
-
variant: 'vertical',
|
|
294
|
-
items: [
|
|
295
|
-
{ id: '1', label: 'Hover Me', icon: <Dashboard />, href: '#' },
|
|
296
|
-
{ id: '2', label: 'Focus Me', icon: <ShoppingCart />, href: '#' },
|
|
297
|
-
{ id: '3', label: 'Active', icon: <People />, active: true, href: '#' },
|
|
298
|
-
{ id: '4', label: 'Disabled', icon: <Settings />, disabled: true, href: '#' },
|
|
299
|
-
],
|
|
300
|
-
size: 'md',
|
|
301
|
-
},
|
|
302
|
-
parameters: {
|
|
303
|
-
pseudo: {
|
|
304
|
-
hover: ['[role="button"]:nth-of-type(1)'],
|
|
305
|
-
focus: ['[role="button"]:nth-of-type(2)'],
|
|
306
|
-
},
|
|
307
|
-
},
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
// Required Responsive story export
|
|
311
|
-
export const Responsive: Story = {
|
|
312
|
-
render: () => (
|
|
313
|
-
<Box>
|
|
314
|
-
<Typography variant="h6" sx={{ mb: 2 }}>
|
|
315
|
-
Responsive Navigation
|
|
316
|
-
</Typography>
|
|
317
|
-
<Box
|
|
318
|
-
sx={{
|
|
319
|
-
display: 'flex',
|
|
320
|
-
flexDirection: { xs: 'column', md: 'row' },
|
|
321
|
-
gap: 2,
|
|
322
|
-
p: 2,
|
|
323
|
-
border: '1px solid',
|
|
324
|
-
borderColor: 'divider',
|
|
325
|
-
borderRadius: 1,
|
|
326
|
-
}}
|
|
327
|
-
>
|
|
328
|
-
<Box sx={{ display: { xs: 'block', md: 'none' } }}>
|
|
329
|
-
<NavigationMenu variant="horizontal" items={horizontalItems} size="sm" />
|
|
330
|
-
</Box>
|
|
331
|
-
<Box sx={{ display: { xs: 'none', md: 'block' } }}>
|
|
332
|
-
<NavigationMenu variant="vertical" items={basicVerticalItems} size="md" logo={logo} />
|
|
333
|
-
</Box>
|
|
334
|
-
<Box sx={{ flex: 1, p: 2, bgcolor: 'grey.50', minHeight: 200 }}>
|
|
335
|
-
<Typography variant="body1">
|
|
336
|
-
Content Area (resize viewport to see responsive behavior)
|
|
337
|
-
</Typography>
|
|
338
|
-
</Box>
|
|
339
|
-
</Box>
|
|
340
|
-
</Box>
|
|
341
|
-
),
|
|
342
|
-
parameters: {
|
|
343
|
-
viewport: {
|
|
344
|
-
defaultViewport: 'responsive',
|
|
345
|
-
},
|
|
346
|
-
},
|
|
347
|
-
};
|
|
348
|
-
|
|
349
|
-
export const MegaMenu: Story = {
|
|
350
|
-
args: {
|
|
351
|
-
variant: 'mega',
|
|
352
|
-
items: megaMenuItems,
|
|
353
|
-
size: 'md',
|
|
354
|
-
logo,
|
|
355
|
-
},
|
|
356
|
-
decorators: [
|
|
357
|
-
(Story) => (
|
|
358
|
-
<Box>
|
|
359
|
-
<Story />
|
|
360
|
-
<Box sx={{ p: 3, bgcolor: 'grey.50', minHeight: '300px' }}>
|
|
361
|
-
<Typography variant="h4">Content Below Mega Menu</Typography>
|
|
362
|
-
<Typography variant="body1" sx={{ mt: 2 }}>
|
|
363
|
-
The mega menu organizes navigation items into logical sections.
|
|
364
|
-
</Typography>
|
|
365
|
-
</Box>
|
|
366
|
-
</Box>
|
|
367
|
-
),
|
|
368
|
-
],
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
export const MinimalHorizontal: Story = {
|
|
372
|
-
args: {
|
|
373
|
-
variant: 'horizontal',
|
|
374
|
-
items: [
|
|
375
|
-
{ id: '1', label: 'Dashboard', icon: <Home />, href: '#', active: true },
|
|
376
|
-
{
|
|
377
|
-
id: '2',
|
|
378
|
-
label: 'Products',
|
|
379
|
-
icon: <ShoppingCart />,
|
|
380
|
-
href: '#',
|
|
381
|
-
children: [
|
|
382
|
-
{ id: '2-1', label: 'Electronics', icon: <Inventory />, href: '#' },
|
|
383
|
-
{ id: '2-2', label: 'Clothing', href: '#' },
|
|
384
|
-
],
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
id: '3',
|
|
388
|
-
label: 'Services',
|
|
389
|
-
icon: <Business />,
|
|
390
|
-
href: '#',
|
|
391
|
-
children: [
|
|
392
|
-
{ id: '3-1', label: 'Consulting', icon: <Help />, href: '#' },
|
|
393
|
-
{ id: '3-2', label: 'Support', icon: <People />, href: '#' },
|
|
394
|
-
],
|
|
395
|
-
},
|
|
396
|
-
{ id: '4', label: 'Analytics', icon: <Analytics />, href: '#' },
|
|
397
|
-
{ id: '5', label: 'Settings', icon: <Settings />, href: '#' },
|
|
398
|
-
],
|
|
399
|
-
size: 'md',
|
|
400
|
-
minimal: true,
|
|
401
|
-
},
|
|
402
|
-
decorators: [
|
|
403
|
-
(Story) => (
|
|
404
|
-
<Box>
|
|
405
|
-
<Story />
|
|
406
|
-
<Box sx={{ p: 3, bgcolor: 'grey.50', minHeight: '400px' }}>
|
|
407
|
-
<Typography variant="h4">Minimal Horizontal Navigation</Typography>
|
|
408
|
-
<Typography variant="body1" sx={{ mt: 2 }}>
|
|
409
|
-
This demonstrates the horizontal navigation with the minimal prop enabled, removing all
|
|
410
|
-
decorative borders, shadows, and background styling while maintaining full functionality.
|
|
411
|
-
</Typography>
|
|
412
|
-
<Typography variant="body2" sx={{ mt: 1, color: 'text.secondary' }}>
|
|
413
|
-
Ideal for clean, text-focused navigation bars where you want minimal visual weight.
|
|
414
|
-
</Typography>
|
|
415
|
-
</Box>
|
|
416
|
-
</Box>
|
|
417
|
-
),
|
|
418
|
-
],
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
export const MinimalVertical: Story = {
|
|
422
|
-
args: {
|
|
423
|
-
variant: 'vertical',
|
|
424
|
-
items: basicVerticalItems,
|
|
425
|
-
size: 'md',
|
|
426
|
-
minimal: true,
|
|
427
|
-
logo,
|
|
428
|
-
},
|
|
429
|
-
decorators: [
|
|
430
|
-
(Story) => (
|
|
431
|
-
<Box sx={{ height: '600px', display: 'flex' }}>
|
|
432
|
-
<Story />
|
|
433
|
-
<Box sx={{ flex: 1, p: 3, bgcolor: 'grey.50' }}>
|
|
434
|
-
<Typography variant="h4">Minimal Vertical Navigation</Typography>
|
|
435
|
-
<Typography variant="body1" sx={{ mt: 2 }}>
|
|
436
|
-
Vertical navigation with minimal styling - no decorative backgrounds, borders, or shadows.
|
|
437
|
-
Perfect for sidebar navigation where you want a clean, unobtrusive appearance.
|
|
438
|
-
</Typography>
|
|
439
|
-
</Box>
|
|
440
|
-
</Box>
|
|
441
|
-
),
|
|
442
|
-
],
|
|
443
|
-
};
|
|
444
|
-
|
|
445
|
-
export const MinimalMega: Story = {
|
|
446
|
-
args: {
|
|
447
|
-
variant: 'mega',
|
|
448
|
-
items: megaMenuItems,
|
|
449
|
-
size: 'md',
|
|
450
|
-
minimal: true,
|
|
451
|
-
logo,
|
|
452
|
-
},
|
|
453
|
-
decorators: [
|
|
454
|
-
(Story) => (
|
|
455
|
-
<Box>
|
|
456
|
-
<Story />
|
|
457
|
-
<Box sx={{ p: 3, bgcolor: 'grey.50', minHeight: '300px' }}>
|
|
458
|
-
<Typography variant="h4">Minimal Mega Menu</Typography>
|
|
459
|
-
<Typography variant="body1" sx={{ mt: 2 }}>
|
|
460
|
-
Mega menu layout with minimal prop - removes container backgrounds and decorative styling
|
|
461
|
-
while maintaining the structured grid layout.
|
|
462
|
-
</Typography>
|
|
463
|
-
</Box>
|
|
464
|
-
</Box>
|
|
465
|
-
),
|
|
466
|
-
],
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
export const MinimalComparison: Story = {
|
|
470
|
-
render: () => (
|
|
471
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
|
472
|
-
<Box>
|
|
473
|
-
<Typography variant="h6" sx={{ mb: 2 }}>
|
|
474
|
-
Default Horizontal (with styling)
|
|
475
|
-
</Typography>
|
|
476
|
-
<NavigationMenu
|
|
477
|
-
variant="horizontal"
|
|
478
|
-
items={[
|
|
479
|
-
{ id: '1', label: 'Home', icon: <Home />, href: '#', active: true },
|
|
480
|
-
{ id: '2', label: 'Products', icon: <ShoppingCart />, href: '#' },
|
|
481
|
-
{ id: '3', label: 'Analytics', icon: <Analytics />, href: '#' },
|
|
482
|
-
{ id: '4', label: 'Settings', icon: <Settings />, href: '#' },
|
|
483
|
-
]}
|
|
484
|
-
size="md"
|
|
485
|
-
/>
|
|
486
|
-
</Box>
|
|
487
|
-
<Box>
|
|
488
|
-
<Typography variant="h6" sx={{ mb: 2 }}>
|
|
489
|
-
Minimal Horizontal (no decorative styling)
|
|
490
|
-
</Typography>
|
|
491
|
-
<NavigationMenu
|
|
492
|
-
variant="horizontal"
|
|
493
|
-
items={[
|
|
494
|
-
{ id: '1', label: 'Home', icon: <Home />, href: '#', active: true },
|
|
495
|
-
{ id: '2', label: 'Products', icon: <ShoppingCart />, href: '#' },
|
|
496
|
-
{ id: '3', label: 'Analytics', icon: <Analytics />, href: '#' },
|
|
497
|
-
{ id: '4', label: 'Settings', icon: <Settings />, href: '#' },
|
|
498
|
-
]}
|
|
499
|
-
size="md"
|
|
500
|
-
minimal
|
|
501
|
-
/>
|
|
502
|
-
</Box>
|
|
503
|
-
<Box sx={{ p: 3, bgcolor: 'grey.50', borderRadius: 1 }}>
|
|
504
|
-
<Typography variant="body1">
|
|
505
|
-
The minimal prop removes all decorative backgrounds, borders, and shadows from the
|
|
506
|
-
navigation container while maintaining full interactive functionality. It's perfect for
|
|
507
|
-
scenarios where you want clean, text-focused navigation without visual weight.
|
|
508
|
-
</Typography>
|
|
509
|
-
<Typography variant="body2" sx={{ mt: 1, color: 'text.secondary' }}>
|
|
510
|
-
Compare the visual difference between the two menus above - the minimal version has no
|
|
511
|
-
container background or shadow, creating a lighter appearance.
|
|
512
|
-
</Typography>
|
|
513
|
-
</Box>
|
|
514
|
-
</Box>
|
|
515
|
-
),
|
|
516
|
-
};
|