@12-apps/ui 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +16 -8
- package/src/button/index.ts +1 -0
- package/src/social-login-button/index.ts +1 -0
- package/src/{social-login-button.tsx → social-login-button/social-login-button.tsx} +5 -5
- package/src/user-avatar/index.ts +1 -0
- package/src/{user-avatar.tsx → user-avatar/user-avatar.tsx} +4 -4
- package/eslint.config.js +0 -89
- package/src/__tests__/data-grid.test.tsx +0 -125
- package/src/__tests__/package-wiring.test.ts +0 -41
- package/src/__tests__/setup.ts +0 -1
- package/src/__tests__/social-login-button.test.tsx +0 -186
- package/src/__tests__/user-avatar.test.tsx +0 -195
- package/src/__tests__/viewport.test.ts +0 -50
- package/src/components/command/__tests__/command.test.tsx +0 -112
- package/src/components/data-display/Alert/Alert.stories.tsx +0 -559
- package/src/components/data-display/Alert/Alert.test.stories.tsx +0 -707
- package/src/components/data-display/AlertDialog/AlertDialog.stories.tsx +0 -362
- package/src/components/data-display/AlertDialog/AlertDialog.test.stories.tsx +0 -763
- package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.stories.tsx +0 -230
- package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.test.stories.tsx +0 -270
- package/src/components/data-display/Avatar/Avatar.stories.tsx +0 -721
- package/src/components/data-display/Avatar/Avatar.test.stories.tsx +0 -822
- package/src/components/data-display/Badge/Badge.stories.tsx +0 -1134
- package/src/components/data-display/Badge/Badge.test.stories.tsx +0 -1194
- package/src/components/data-display/Banner/Banner.stories.tsx +0 -528
- package/src/components/data-display/Banner/Banner.test.stories.tsx +0 -511
- package/src/components/data-display/Carousel/Carousel.stories.tsx +0 -607
- package/src/components/data-display/Carousel/Carousel.test.stories.tsx +0 -701
- package/src/components/data-display/Chart/Chart.stories.tsx +0 -568
- package/src/components/data-display/Chart/Chart.test.stories.tsx +0 -174
- package/src/components/data-display/Chart/SpecChart.stories.tsx +0 -150
- package/src/components/data-display/Chart/SpecChart.test.stories.tsx +0 -56
- package/src/components/data-display/Chart/__tests__/SpecChart.test.tsx +0 -60
- package/src/components/data-display/Chart/__tests__/chart-format.test.ts +0 -43
- package/src/components/data-display/Chart/__tests__/chart-spec.test.ts +0 -119
- package/src/components/data-display/Chip/Chip.stories.tsx +0 -252
- package/src/components/data-display/Chip/Chip.test.stories.tsx +0 -266
- package/src/components/data-display/DataGrid/DataGrid.stories.tsx +0 -515
- package/src/components/data-display/DataGrid/DataGrid.test.stories.tsx +0 -653
- package/src/components/data-display/DataViews/__tests__/DataViewsGrid.test.tsx +0 -271
- package/src/components/data-display/DataViews/__tests__/DataViewsTableBase.test.tsx +0 -134
- package/src/components/data-display/DataViews/__tests__/SaveViewModal.test.tsx +0 -83
- package/src/components/data-display/DataViews/__tests__/data-views-filter.test.ts +0 -115
- package/src/components/data-display/DataViews/__tests__/data-views-preview.test.ts +0 -53
- package/src/components/data-display/DataViews/__tests__/range-pill.test.tsx +0 -114
- package/src/components/data-display/DataViews/base-card.stories.tsx +0 -136
- package/src/components/data-display/DescriptionItem/DescriptionItem.stories.tsx +0 -254
- package/src/components/data-display/EmptyState/EmptyState.stories.tsx +0 -282
- package/src/components/data-display/EmptyState/EmptyState.test.stories.tsx +0 -441
- package/src/components/data-display/ErrorState/ErrorState.stories.tsx +0 -110
- package/src/components/data-display/ErrorState/ErrorState.test.stories.tsx +0 -133
- package/src/components/data-display/HoverCard/HoverCard.stories.tsx +0 -650
- package/src/components/data-display/HoverCard/HoverCard.test.stories.tsx +0 -929
- package/src/components/data-display/InteractiveTooltip/InteractiveTooltip.stories.tsx +0 -411
- package/src/components/data-display/LazyImage/LazyImage.stories.tsx +0 -387
- package/src/components/data-display/Lightbox/Lightbox.stories.tsx +0 -315
- package/src/components/data-display/Lightbox/Lightbox.test.stories.tsx +0 -598
- package/src/components/data-display/LoadingState/LoadingState.stories.tsx +0 -124
- package/src/components/data-display/LoadingState/LoadingState.test.stories.tsx +0 -99
- package/src/components/data-display/MapPreview/MapPreview.stories.tsx +0 -458
- package/src/components/data-display/MapPreview/MapPreview.test.stories.tsx +0 -394
- package/src/components/data-display/Popover/Popover.stories.tsx +0 -295
- package/src/components/data-display/Popover/Popover.test.stories.tsx +0 -1162
- package/src/components/data-display/Progress/Progress.stories.tsx +0 -481
- package/src/components/data-display/Progress/Progress.test.stories.tsx +0 -2070
- package/src/components/data-display/SectionOnboarding/SectionOnboarding.stories.tsx +0 -160
- package/src/components/data-display/SectionOnboarding/SectionOnboarding.test.stories.tsx +0 -190
- package/src/components/data-display/Sheet/Sheet.stories.tsx +0 -883
- package/src/components/data-display/Sheet/Sheet.test.stories.tsx +0 -1105
- package/src/components/data-display/StatCard/StatCard.stories.tsx +0 -167
- package/src/components/data-display/StatCard/StatCard.test.stories.tsx +0 -240
- package/src/components/data-display/Stepper/Stepper.stories.tsx +0 -540
- package/src/components/data-display/Stepper/Stepper.test.stories.tsx +0 -600
- package/src/components/data-display/Table/Table.stories.tsx +0 -803
- package/src/components/data-display/Table/Table.test.stories.tsx +0 -369
- package/src/components/data-display/Timeline/Timeline.stories.tsx +0 -442
- package/src/components/data-display/Timeline/Timeline.test.stories.tsx +0 -930
- package/src/components/data-display/TimingDiagram/TimingDiagram.stories.tsx +0 -475
- package/src/components/data-display/TimingDiagram/TimingDiagram.test.stories.tsx +0 -734
- package/src/components/data-display/Tooltip/Tooltip.stories.tsx +0 -468
- package/src/components/data-display/Tooltip/Tooltip.test.stories.tsx +0 -1154
- package/src/components/feedback/ConfirmAction/ConfirmAction.stories.tsx +0 -146
- package/src/components/feedback/ConfirmAction/ConfirmAction.test.stories.tsx +0 -114
- package/src/components/feedback/ConfirmAction/__tests__/confirm-action.test.tsx +0 -288
- package/src/components/feedback/Dialog/Dialog.stories.tsx +0 -833
- package/src/components/feedback/Dialog/Dialog.test.stories.tsx +0 -964
- package/src/components/feedback/Dialog/__tests__/dialog-content-spacing.test.tsx +0 -66
- package/src/components/feedback/Modal/Modal.stories.tsx +0 -765
- package/src/components/feedback/Modal/Modal.test.stories.tsx +0 -251
- package/src/components/feedback/Sonner/Sonner.stories.tsx +0 -698
- package/src/components/feedback/Sonner/Sonner.test.stories.tsx +0 -896
- package/src/components/feedback/StackedModal/StackedModal.stories.tsx +0 -1783
- package/src/components/feedback/StackedModal/StackedModal.test.stories.tsx +0 -973
- package/src/components/feedback/StackedModal/__tests__/stacked-modal-viewport.test.tsx +0 -104
- package/src/components/feedback/Toast/Toast.stories.tsx +0 -548
- package/src/components/feedback/Toast/Toast.test.stories.tsx +0 -834
- package/src/components/feedback/TutorialOverlay/TutorialOverlay.stories.tsx +0 -691
- package/src/components/feedback/TutorialOverlay/TutorialOverlay.test.stories.tsx +0 -634
- package/src/components/form/AddressAutocomplete/AddressAutocomplete.stories.tsx +0 -665
- package/src/components/form/AddressAutocomplete/AddressAutocomplete.test.stories.tsx +0 -727
- package/src/components/form/Autocomplete/Autocomplete.stories.tsx +0 -715
- package/src/components/form/Autocomplete/Autocomplete.test.stories.tsx +0 -825
- package/src/components/form/Button/Button.stories.tsx +0 -365
- package/src/components/form/Button/Button.test.stories.tsx +0 -607
- package/src/components/form/Calendar/Calendar.stories.tsx +0 -349
- package/src/components/form/Calendar/Calendar.test.stories.tsx +0 -464
- package/src/components/form/CepField/CepField.stories.tsx +0 -138
- package/src/components/form/CepField/CepField.test.stories.tsx +0 -281
- package/src/components/form/Checkbox/Checkbox.stories.tsx +0 -265
- package/src/components/form/Checkbox/Checkbox.test.stories.tsx +0 -181
- package/src/components/form/CodeEditor/CodeEditor.stories.tsx +0 -871
- package/src/components/form/CodeEditor/CodeEditor.test.stories.tsx +0 -574
- package/src/components/form/Command/Command.stories.tsx +0 -580
- package/src/components/form/Command/Command.test.stories.tsx +0 -215
- package/src/components/form/CreatableSelect/CreatableSelect.stories.tsx +0 -112
- package/src/components/form/CreatableSelect/CreatableSelect.test.stories.tsx +0 -134
- package/src/components/form/Form/Form.stories.tsx +0 -687
- package/src/components/form/Form/Form.test.stories.tsx +0 -601
- package/src/components/form/Input/Input.stories.tsx +0 -260
- package/src/components/form/Input/Input.test.stories.tsx +0 -1191
- package/src/components/form/InputOTP/InputOTP.stories.tsx +0 -774
- package/src/components/form/InputOTP/InputOTP.test.stories.tsx +0 -588
- package/src/components/form/Label/Label.stories.tsx +0 -473
- package/src/components/form/Label/Label.test.stories.tsx +0 -915
- package/src/components/form/Menubar/Menubar.stories.tsx +0 -472
- package/src/components/form/Menubar/Menubar.test.stories.tsx +0 -584
- package/src/components/form/PasswordStrength/PasswordStrength.stories.tsx +0 -562
- package/src/components/form/PasswordStrength/PasswordStrength.test.stories.tsx +0 -327
- package/src/components/form/PhoneInput/PhoneInput.stories.tsx +0 -495
- package/src/components/form/PhoneInput/PhoneInput.test.stories.tsx +0 -666
- package/src/components/form/RadioGroup/RadioGroup.stories.tsx +0 -518
- package/src/components/form/RadioGroup/RadioGroup.test.stories.tsx +0 -685
- package/src/components/form/RichTextEditor/RichTextEditor.stories.tsx +0 -261
- package/src/components/form/RichTextEditor/RichTextEditor.test.stories.tsx +0 -491
- package/src/components/form/SearchPalette/SearchPalette.stories.tsx +0 -135
- package/src/components/form/Select/Select.stories.tsx +0 -364
- package/src/components/form/Select/Select.test.stories.tsx +0 -985
- package/src/components/form/Slider/Slider.stories.tsx +0 -418
- package/src/components/form/Slider/Slider.test.stories.tsx +0 -1042
- package/src/components/form/Switch/Switch.stories.tsx +0 -697
- package/src/components/form/Switch/Switch.test.stories.tsx +0 -597
- package/src/components/form/Textarea/Textarea.stories.tsx +0 -473
- package/src/components/form/Textarea/Textarea.test.stories.tsx +0 -702
- package/src/components/form/Toggle/Toggle.stories.tsx +0 -638
- package/src/components/form/Toggle/Toggle.test.stories.tsx +0 -1159
- package/src/components/form/ToggleGroup/ToggleGroup.stories.tsx +0 -617
- package/src/components/form/ToggleGroup/ToggleGroup.test.stories.tsx +0 -915
- package/src/components/form/UploadButton/UploadButton.stories.tsx +0 -367
- package/src/components/form/UploadButton/UploadButton.test.stories.tsx +0 -573
- package/src/components/form/total-form/total-form.test.tsx +0 -214
- package/src/components/layout/Accordion/Accordion.stories.tsx +0 -694
- package/src/components/layout/Accordion/Accordion.test.stories.tsx +0 -1344
- package/src/components/layout/Card/Card.stories.tsx +0 -591
- package/src/components/layout/Card/Card.test.stories.tsx +0 -1134
- package/src/components/layout/CardGrid/__tests__/CardGrid.test.tsx +0 -92
- package/src/components/layout/Collapsible/Collapsible.stories.tsx +0 -180
- package/src/components/layout/Collapsible/Collapsible.test.stories.tsx +0 -308
- package/src/components/layout/Container/Container.stories.tsx +0 -557
- package/src/components/layout/Container/Container.test.stories.tsx +0 -745
- package/src/components/layout/ContentToolbar/ContentToolbar.stories.tsx +0 -129
- package/src/components/layout/ContentToolbar/ContentToolbar.test.stories.tsx +0 -251
- package/src/components/layout/ContentToolbar/__tests__/ColumnsMenu.test.tsx +0 -39
- package/src/components/layout/ContentToolbar/__tests__/MultiSelectDropdown.test.tsx +0 -131
- package/src/components/layout/ContentToolbar/__tests__/SavedViewsMenu.test.tsx +0 -99
- package/src/components/layout/Dashboard/Dashboard.stories.tsx +0 -104
- package/src/components/layout/Dashboard/Dashboard.test.stories.tsx +0 -190
- package/src/components/layout/Drawer/Drawer.stories.tsx +0 -658
- package/src/components/layout/Drawer/Drawer.test.stories.tsx +0 -1343
- package/src/components/layout/Resizable/Resizable.stories.tsx +0 -1039
- package/src/components/layout/Resizable/Resizable.test.stories.tsx +0 -754
- package/src/components/layout/ScrollArea/ScrollArea.stories.tsx +0 -651
- package/src/components/layout/ScrollArea/ScrollArea.test.stories.tsx +0 -619
- package/src/components/layout/Separator/Separator.stories.tsx +0 -563
- package/src/components/layout/Separator/Separator.test.stories.tsx +0 -518
- package/src/components/layout/SettingsLayout/SettingsLayout.stories.tsx +0 -192
- package/src/components/layout/SettingsLayout/SettingsLayout.test.stories.tsx +0 -175
- package/src/components/layout/Sidebar/Sidebar.stories.tsx +0 -609
- package/src/components/layout/Sidebar/Sidebar.test.stories.tsx +0 -1324
- package/src/components/layout/Skeleton/Skeleton.stories.tsx +0 -689
- package/src/components/layout/Skeleton/Skeleton.test.stories.tsx +0 -521
- package/src/components/layout/Spacer/Spacer.stories.tsx +0 -502
- package/src/components/layout/Spacer/Spacer.test.stories.tsx +0 -474
- package/src/components/layout/TableFilter/TableFilter.stories.tsx +0 -82
- package/src/components/layout/TableFilter/TableFilter.test.stories.tsx +0 -87
- package/src/components/navigation/Breadcrumbs/Breadcrumbs.stories.tsx +0 -638
- package/src/components/navigation/Breadcrumbs/Breadcrumbs.test.stories.tsx +0 -1008
- package/src/components/navigation/CommandPalette/CommandPalette.stories.tsx +0 -386
- package/src/components/navigation/CommandPalette/CommandPalette.test.stories.tsx +0 -435
- package/src/components/navigation/ContextMenu/ContextMenu.stories.tsx +0 -614
- package/src/components/navigation/ContextMenu/ContextMenu.test.stories.tsx +0 -845
- package/src/components/navigation/DropdownMenu/DropdownMenu.stories.tsx +0 -578
- package/src/components/navigation/DropdownMenu/DropdownMenu.test.stories.tsx +0 -660
- package/src/components/navigation/NavigationMenu/stories/NavigationMenu.stories.tsx +0 -516
- package/src/components/navigation/NavigationMenu/stories/NavigationMenu.test.stories.tsx +0 -935
- package/src/components/navigation/NavigationMenu/stories/NavigationMenuHorizontal.stories.tsx +0 -501
- package/src/components/navigation/NavigationMenu/stories/NavigationMenuVertical.stories.tsx +0 -453
- package/src/components/navigation/Pagination/Pagination.stories.tsx +0 -602
- package/src/components/navigation/Pagination/Pagination.test.stories.tsx +0 -520
- package/src/components/navigation/Tabs/Tabs.stories.tsx +0 -1004
- package/src/components/navigation/Tabs/Tabs.test.stories.tsx +0 -1225
- package/src/components/typography/Blockquote/Blockquote.stories.tsx +0 -359
- package/src/components/typography/Blockquote/Blockquote.test.stories.tsx +0 -432
- package/src/components/typography/Code/Code.stories.tsx +0 -686
- package/src/components/typography/Code/Code.test.stories.tsx +0 -703
- package/src/components/typography/Heading/Heading.stories.tsx +0 -451
- package/src/components/typography/Heading/Heading.test.stories.tsx +0 -830
- package/src/components/typography/Paragraph/Paragraph.stories.tsx +0 -280
- package/src/components/typography/Paragraph/Paragraph.test.stories.tsx +0 -231
- package/src/components/typography/Text/Text.stories.tsx +0 -359
- package/src/components/typography/Text/Text.test.stories.tsx +0 -759
- package/src/components/utility/AnimatedIcon/AnimatedIcon.stories.tsx +0 -945
- package/src/components/utility/AnimatedIcon/AnimatedIcon.test.stories.tsx +0 -603
- package/src/components/utility/AspectRatio/AspectRatio.stories.tsx +0 -414
- package/src/components/utility/AspectRatio/AspectRatio.test.stories.tsx +0 -859
- package/src/components/utility/InfiniteScroll/InfiniteScroll.stories.tsx +0 -620
- package/src/components/utility/InfiniteScroll/InfiniteScroll.test.stories.tsx +0 -361
- package/src/components/utility/InstallPrompt/InstallPrompt.stories.tsx +0 -118
- package/src/components/utility/InstallPrompt/InstallPrompt.test.stories.tsx +0 -83
- package/src/components/utility/InstallPrompt/__tests__/InstallPrompt.ios.test.tsx +0 -65
- package/src/components/utility/InstallPrompt/__tests__/usePwaInstall.test.tsx +0 -271
- package/src/components/utility/Portal/Portal.stories.tsx +0 -340
- package/src/components/utility/Portal/Portal.test.stories.tsx +0 -2086
- package/src/components/utility/Transition/Transition.stories.tsx +0 -493
- package/src/components/utility/Transition/Transition.test.stories.tsx +0 -854
- package/src/components/utility/VirtualList/VirtualList.stories.tsx +0 -1073
- package/src/components/utility/VirtualList/VirtualList.test.stories.tsx +0 -1085
- package/src/components/utility/WorkflowStep/WorkflowStep.stories.tsx +0 -431
- package/src/components/utility/WorkflowStep/WorkflowStep.test.stories.tsx +0 -364
- /package/src/{button.tsx → button/button.tsx} +0 -0
package/src/components/navigation/NavigationMenu/stories/NavigationMenuHorizontal.stories.tsx
DELETED
|
@@ -1,501 +0,0 @@
|
|
|
1
|
-
import Analytics from '@mui/icons-material/Analytics';
|
|
2
|
-
import Business from '@mui/icons-material/Business';
|
|
3
|
-
import Dashboard from '@mui/icons-material/Dashboard';
|
|
4
|
-
import Help from '@mui/icons-material/Help';
|
|
5
|
-
import Home from '@mui/icons-material/Home';
|
|
6
|
-
import Inventory from '@mui/icons-material/Inventory';
|
|
7
|
-
import Notifications from '@mui/icons-material/Notifications';
|
|
8
|
-
import People from '@mui/icons-material/People';
|
|
9
|
-
import Report from '@mui/icons-material/Report';
|
|
10
|
-
import Settings from '@mui/icons-material/Settings';
|
|
11
|
-
import ShoppingCart from '@mui/icons-material/ShoppingCart';
|
|
12
|
-
import { Box, Typography } from '@mui/material';
|
|
13
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
14
|
-
|
|
15
|
-
import { NavigationMenu } from '../NavigationMenu';
|
|
16
|
-
|
|
17
|
-
const meta: Meta<typeof NavigationMenu> = {
|
|
18
|
-
title: 'Navigation/NavigationMenu/Horizontal',
|
|
19
|
-
component: NavigationMenu,
|
|
20
|
-
parameters: {
|
|
21
|
-
layout: 'fullscreen',
|
|
22
|
-
docs: {
|
|
23
|
-
description: {
|
|
24
|
-
component:
|
|
25
|
-
'A flexible navigation menu component supporting horizontal, vertical, and mega menu layouts with nested items and customization options.',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
tags: ['autodocs', 'component:NavigationMenu'],
|
|
30
|
-
argTypes: {
|
|
31
|
-
variant: {
|
|
32
|
-
control: 'select',
|
|
33
|
-
options: ['horizontal', 'vertical', 'mega'],
|
|
34
|
-
description: 'Layout variant of the navigation menu',
|
|
35
|
-
},
|
|
36
|
-
size: {
|
|
37
|
-
control: 'select',
|
|
38
|
-
options: ['sm', 'md', 'lg'],
|
|
39
|
-
description: 'Size of the menu items',
|
|
40
|
-
},
|
|
41
|
-
color: {
|
|
42
|
-
control: 'select',
|
|
43
|
-
options: ['default', 'primary', 'secondary'],
|
|
44
|
-
description: 'Color scheme for the menu',
|
|
45
|
-
},
|
|
46
|
-
collapsible: {
|
|
47
|
-
control: 'boolean',
|
|
48
|
-
description: 'Whether the vertical menu can be collapsed',
|
|
49
|
-
},
|
|
50
|
-
collapsed: {
|
|
51
|
-
control: 'boolean',
|
|
52
|
-
description: 'Whether the vertical menu is collapsed',
|
|
53
|
-
},
|
|
54
|
-
showDividers: {
|
|
55
|
-
control: 'boolean',
|
|
56
|
-
description: 'Whether to show dividers between menu sections',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export default meta;
|
|
62
|
-
type Story = StoryObj<typeof meta>;
|
|
63
|
-
|
|
64
|
-
const horizontalItems = [
|
|
65
|
-
{ id: '1', label: 'Home', href: '#', active: true },
|
|
66
|
-
{ id: '2', label: 'Products', href: '#' },
|
|
67
|
-
{ id: '3', label: 'Services', href: '#' },
|
|
68
|
-
{ id: '4', label: 'About', href: '#' },
|
|
69
|
-
{ id: '5', label: 'Contact', href: '#' },
|
|
70
|
-
];
|
|
71
|
-
|
|
72
|
-
const horizontalItemsWithSubitems = [
|
|
73
|
-
{ id: '1', label: 'Home', href: '#', active: true },
|
|
74
|
-
{
|
|
75
|
-
id: '2',
|
|
76
|
-
label: 'Products',
|
|
77
|
-
href: '#',
|
|
78
|
-
children: [
|
|
79
|
-
{ id: '2-1', label: 'Electronics', href: '#' },
|
|
80
|
-
{ id: '2-2', label: 'Clothing', href: '#' },
|
|
81
|
-
{ id: '2-3', label: 'Books', href: '#' },
|
|
82
|
-
{ id: '2-4', label: 'Sports & Outdoors', href: '#' },
|
|
83
|
-
],
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
id: '3',
|
|
87
|
-
label: 'Services',
|
|
88
|
-
href: '#',
|
|
89
|
-
children: [
|
|
90
|
-
{ id: '3-1', label: 'Consulting', href: '#' },
|
|
91
|
-
{ id: '3-2', label: 'Support', href: '#' },
|
|
92
|
-
{ id: '3-3', label: 'Training', href: '#' },
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
id: '4',
|
|
97
|
-
label: 'Resources',
|
|
98
|
-
href: '#',
|
|
99
|
-
children: [
|
|
100
|
-
{ id: '4-1', label: 'Documentation', href: '#' },
|
|
101
|
-
{ id: '4-2', label: 'Blog', href: '#' },
|
|
102
|
-
{ id: '4-3', label: 'Case Studies', href: '#' },
|
|
103
|
-
{ id: '4-4', label: 'Downloads', href: '#' },
|
|
104
|
-
],
|
|
105
|
-
},
|
|
106
|
-
{ id: '5', label: 'Contact', href: '#' },
|
|
107
|
-
];
|
|
108
|
-
|
|
109
|
-
const horizontalItemsWithSubitemsAndIcons = [
|
|
110
|
-
{ id: '1', label: 'Dashboard', icon: <Home />, href: '#', active: true },
|
|
111
|
-
{
|
|
112
|
-
id: '2',
|
|
113
|
-
label: 'Products',
|
|
114
|
-
icon: <ShoppingCart />,
|
|
115
|
-
href: '#',
|
|
116
|
-
children: [
|
|
117
|
-
{ id: '2-1', label: 'Electronics', icon: <Inventory />, href: '#' },
|
|
118
|
-
{ id: '2-2', label: 'Clothing', href: '#' },
|
|
119
|
-
{ id: '2-3', label: 'Books', href: '#' },
|
|
120
|
-
{ id: '2-4', label: 'Sports & Outdoors', href: '#' },
|
|
121
|
-
],
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
id: '3',
|
|
125
|
-
label: 'Services',
|
|
126
|
-
icon: <Business />,
|
|
127
|
-
href: '#',
|
|
128
|
-
children: [
|
|
129
|
-
{ id: '3-1', label: 'Consulting', icon: <Help />, href: '#' },
|
|
130
|
-
{ id: '3-2', label: 'Support', icon: <People />, href: '#' },
|
|
131
|
-
{ id: '3-3', label: 'Training', href: '#' },
|
|
132
|
-
],
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
id: '4',
|
|
136
|
-
label: 'Analytics',
|
|
137
|
-
icon: <Analytics />,
|
|
138
|
-
href: '#',
|
|
139
|
-
children: [
|
|
140
|
-
{ id: '4-1', label: 'Reports', icon: <Report />, href: '#' },
|
|
141
|
-
{ id: '4-2', label: 'Dashboard', icon: <Dashboard />, href: '#' },
|
|
142
|
-
{ id: '4-3', label: 'Metrics', href: '#' },
|
|
143
|
-
],
|
|
144
|
-
},
|
|
145
|
-
{ id: '5', label: 'Settings', icon: <Settings />, href: '#' },
|
|
146
|
-
];
|
|
147
|
-
|
|
148
|
-
export const HorizontalDefault: Story = {
|
|
149
|
-
args: {
|
|
150
|
-
variant: 'horizontal',
|
|
151
|
-
items: horizontalItems,
|
|
152
|
-
size: 'md',
|
|
153
|
-
},
|
|
154
|
-
decorators: [
|
|
155
|
-
(Story) => (
|
|
156
|
-
<Box>
|
|
157
|
-
<Story />
|
|
158
|
-
<Box sx={{ p: 3, bgcolor: 'grey.50', minHeight: '400px' }}>
|
|
159
|
-
<Typography variant="h4">Page Content</Typography>
|
|
160
|
-
<Typography variant="body1" sx={{ mt: 2 }}>
|
|
161
|
-
This is the main page content below the horizontal navigation.
|
|
162
|
-
</Typography>
|
|
163
|
-
</Box>
|
|
164
|
-
</Box>
|
|
165
|
-
),
|
|
166
|
-
],
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
export const HorizontalWithIcons: Story = {
|
|
171
|
-
args: {
|
|
172
|
-
variant: 'horizontal',
|
|
173
|
-
items: [
|
|
174
|
-
{ id: '1', label: 'Home', icon: <Home />, href: '#', active: true },
|
|
175
|
-
{ id: '2', label: 'Dashboard', icon: <Dashboard />, href: '#' },
|
|
176
|
-
{ id: '3', label: 'Orders', icon: <ShoppingCart />, href: '#', badge: 3 },
|
|
177
|
-
{ id: '4', label: 'Analytics', icon: <Analytics />, href: '#' },
|
|
178
|
-
{ id: '5', label: 'Settings', icon: <Settings />, href: '#' },
|
|
179
|
-
],
|
|
180
|
-
size: 'md',
|
|
181
|
-
},
|
|
182
|
-
decorators: [
|
|
183
|
-
(Story) => (
|
|
184
|
-
<Box>
|
|
185
|
-
<Story />
|
|
186
|
-
<Box sx={{ p: 3, bgcolor: 'grey.50', minHeight: '400px' }}>
|
|
187
|
-
<Typography variant="h4">Horizontal Menu with Icons</Typography>
|
|
188
|
-
<Typography variant="body1" sx={{ mt: 2 }}>
|
|
189
|
-
This navigation menu demonstrates horizontal layout with icons, badges, and active states.
|
|
190
|
-
Notice how the active item shows no pointer cursor and has no hover effects.
|
|
191
|
-
</Typography>
|
|
192
|
-
</Box>
|
|
193
|
-
</Box>
|
|
194
|
-
),
|
|
195
|
-
],
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
export const HorizontalIconsSmall: Story = {
|
|
199
|
-
args: {
|
|
200
|
-
variant: 'horizontal',
|
|
201
|
-
items: [
|
|
202
|
-
{ id: '1', label: 'Home', icon: <Home />, href: '#', active: true },
|
|
203
|
-
{ id: '2', label: 'Products', icon: <Inventory />, href: '#' },
|
|
204
|
-
{ id: '3', label: 'Orders', icon: <ShoppingCart />, href: '#', badge: 5 },
|
|
205
|
-
{ id: '4', label: 'Customers', icon: <People />, href: '#' },
|
|
206
|
-
{ id: '5', label: 'Reports', icon: <Report />, href: '#' },
|
|
207
|
-
{ id: '6', label: 'Settings', icon: <Settings />, href: '#' },
|
|
208
|
-
],
|
|
209
|
-
size: 'sm',
|
|
210
|
-
},
|
|
211
|
-
decorators: [
|
|
212
|
-
(Story) => (
|
|
213
|
-
<Box>
|
|
214
|
-
<Story />
|
|
215
|
-
<Box sx={{ p: 3, bgcolor: 'grey.50', minHeight: '300px' }}>
|
|
216
|
-
<Typography variant="h5">Compact Horizontal Navigation</Typography>
|
|
217
|
-
<Typography variant="body2" sx={{ mt: 1 }}>
|
|
218
|
-
Small size variant for compact header navigation with icons.
|
|
219
|
-
</Typography>
|
|
220
|
-
</Box>
|
|
221
|
-
</Box>
|
|
222
|
-
),
|
|
223
|
-
],
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
export const HorizontalIconsLarge: Story = {
|
|
227
|
-
args: {
|
|
228
|
-
variant: 'horizontal',
|
|
229
|
-
items: [
|
|
230
|
-
{ id: '1', label: 'Dashboard', icon: <Dashboard />, href: '#', active: true },
|
|
231
|
-
{ id: '2', label: 'Analytics', icon: <Analytics />, href: '#' },
|
|
232
|
-
{ id: '3', label: 'Inventory', icon: <Inventory />, href: '#' },
|
|
233
|
-
{ id: '4', label: 'Notifications', icon: <Notifications />, href: '#', badge: 12 },
|
|
234
|
-
],
|
|
235
|
-
size: 'lg',
|
|
236
|
-
},
|
|
237
|
-
decorators: [
|
|
238
|
-
(Story) => (
|
|
239
|
-
<Box>
|
|
240
|
-
<Story />
|
|
241
|
-
<Box sx={{ p: 4, bgcolor: 'grey.50', minHeight: '400px' }}>
|
|
242
|
-
<Typography variant="h3">Large Horizontal Navigation</Typography>
|
|
243
|
-
<Typography variant="body1" sx={{ mt: 2 }}>
|
|
244
|
-
Large size variant ideal for prominent main navigation with clear visual hierarchy.
|
|
245
|
-
</Typography>
|
|
246
|
-
</Box>
|
|
247
|
-
</Box>
|
|
248
|
-
),
|
|
249
|
-
],
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
export const HorizontalWithSubitems: Story = {
|
|
253
|
-
args: {
|
|
254
|
-
variant: 'horizontal',
|
|
255
|
-
items: horizontalItemsWithSubitems,
|
|
256
|
-
size: 'md',
|
|
257
|
-
},
|
|
258
|
-
decorators: [
|
|
259
|
-
(Story) => (
|
|
260
|
-
<Box>
|
|
261
|
-
<Story />
|
|
262
|
-
<Box sx={{ p: 3, bgcolor: 'grey.50', minHeight: '400px' }}>
|
|
263
|
-
<Typography variant="h4">Horizontal Navigation with Dropdown Subitems</Typography>
|
|
264
|
-
<Typography variant="body1" sx={{ mt: 2 }}>
|
|
265
|
-
This demonstrates horizontal navigation with dropdown menus for items that have children.
|
|
266
|
-
Hover over "Products", "Services", or "Resources" to see the dropdown menus appear automatically.
|
|
267
|
-
</Typography>
|
|
268
|
-
<Typography variant="body2" sx={{ mt: 1, color: 'text.secondary' }}>
|
|
269
|
-
The dropdowns remain open when you mouse over them, providing easy access to nested items.
|
|
270
|
-
</Typography>
|
|
271
|
-
</Box>
|
|
272
|
-
</Box>
|
|
273
|
-
),
|
|
274
|
-
],
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
export const HorizontalWithSubitemsAndIcons: Story = {
|
|
278
|
-
args: {
|
|
279
|
-
variant: 'horizontal',
|
|
280
|
-
items: horizontalItemsWithSubitemsAndIcons,
|
|
281
|
-
size: 'md',
|
|
282
|
-
},
|
|
283
|
-
decorators: [
|
|
284
|
-
(Story) => (
|
|
285
|
-
<Box>
|
|
286
|
-
<Story />
|
|
287
|
-
<Box sx={{ p: 3, bgcolor: 'grey.50', minHeight: '400px' }}>
|
|
288
|
-
<Typography variant="h4">Horizontal Navigation with Icons & Dropdowns</Typography>
|
|
289
|
-
<Typography variant="body1" sx={{ mt: 2 }}>
|
|
290
|
-
Enhanced horizontal navigation featuring both icons and dropdown menus.
|
|
291
|
-
This combines visual hierarchy with functional organization.
|
|
292
|
-
</Typography>
|
|
293
|
-
<Typography variant="body2" sx={{ mt: 1, color: 'text.secondary' }}>
|
|
294
|
-
Icons help users quickly identify menu sections, while dropdowns provide
|
|
295
|
-
organized access to related functionality.
|
|
296
|
-
</Typography>
|
|
297
|
-
</Box>
|
|
298
|
-
</Box>
|
|
299
|
-
),
|
|
300
|
-
],
|
|
301
|
-
};
|
|
302
|
-
|
|
303
|
-
export const HorizontalInfiniteLevel: Story = {
|
|
304
|
-
args: {
|
|
305
|
-
variant: 'horizontal',
|
|
306
|
-
items: [
|
|
307
|
-
{
|
|
308
|
-
id: '1',
|
|
309
|
-
label: 'Home',
|
|
310
|
-
icon: <Home />,
|
|
311
|
-
href: '#',
|
|
312
|
-
active: true,
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
id: '2',
|
|
316
|
-
label: 'Organization',
|
|
317
|
-
icon: <Business />,
|
|
318
|
-
children: [
|
|
319
|
-
{
|
|
320
|
-
id: '2-1',
|
|
321
|
-
label: 'Departments',
|
|
322
|
-
children: [
|
|
323
|
-
{
|
|
324
|
-
id: '2-1-1',
|
|
325
|
-
label: 'Engineering',
|
|
326
|
-
children: [
|
|
327
|
-
{
|
|
328
|
-
id: '2-1-1-1',
|
|
329
|
-
label: 'Frontend',
|
|
330
|
-
children: [
|
|
331
|
-
{ id: '2-1-1-1-1', label: 'React Team', href: '#' },
|
|
332
|
-
{ id: '2-1-1-1-2', label: 'Vue Team', href: '#' },
|
|
333
|
-
{ id: '2-1-1-1-3', label: 'Design System', href: '#' },
|
|
334
|
-
],
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
id: '2-1-1-2',
|
|
338
|
-
label: 'Backend',
|
|
339
|
-
children: [
|
|
340
|
-
{ id: '2-1-1-2-1', label: 'API Team', href: '#' },
|
|
341
|
-
{ id: '2-1-1-2-2', label: 'Database Team', href: '#' },
|
|
342
|
-
{ id: '2-1-1-2-3', label: 'Infrastructure', href: '#' },
|
|
343
|
-
],
|
|
344
|
-
},
|
|
345
|
-
],
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
id: '2-1-2',
|
|
349
|
-
label: 'Sales',
|
|
350
|
-
children: [
|
|
351
|
-
{
|
|
352
|
-
id: '2-1-2-1',
|
|
353
|
-
label: 'Regions',
|
|
354
|
-
children: [
|
|
355
|
-
{
|
|
356
|
-
id: '2-1-2-1-1',
|
|
357
|
-
label: 'Americas',
|
|
358
|
-
children: [
|
|
359
|
-
{ id: '2-1-2-1-1-1', label: 'North', href: '#', badge: 5 },
|
|
360
|
-
{ id: '2-1-2-1-1-2', label: 'South', href: '#' },
|
|
361
|
-
],
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
id: '2-1-2-1-2',
|
|
365
|
-
label: 'EMEA', // cSpell:ignore EMEA
|
|
366
|
-
children: [
|
|
367
|
-
{ id: '2-1-2-1-2-1', label: 'Europe', href: '#' },
|
|
368
|
-
{ id: '2-1-2-1-2-2', label: 'Middle East', href: '#' },
|
|
369
|
-
{ id: '2-1-2-1-2-3', label: 'Africa', href: '#' },
|
|
370
|
-
],
|
|
371
|
-
},
|
|
372
|
-
],
|
|
373
|
-
},
|
|
374
|
-
],
|
|
375
|
-
},
|
|
376
|
-
],
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
id: '2-2',
|
|
380
|
-
label: 'Resources',
|
|
381
|
-
children: [
|
|
382
|
-
{ id: '2-2-1', label: 'Documentation', href: '#' },
|
|
383
|
-
{ id: '2-2-2', label: 'Training Materials', href: '#' },
|
|
384
|
-
],
|
|
385
|
-
},
|
|
386
|
-
],
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
id: '3',
|
|
390
|
-
label: 'Products',
|
|
391
|
-
icon: <ShoppingCart />,
|
|
392
|
-
children: [
|
|
393
|
-
{
|
|
394
|
-
id: '3-1',
|
|
395
|
-
label: 'Categories',
|
|
396
|
-
children: [
|
|
397
|
-
{
|
|
398
|
-
id: '3-1-1',
|
|
399
|
-
label: 'Electronics',
|
|
400
|
-
children: [
|
|
401
|
-
{ id: '3-1-1-1', label: 'Computers', href: '#' },
|
|
402
|
-
{ id: '3-1-1-2', label: 'Phones', href: '#' },
|
|
403
|
-
{ id: '3-1-1-3', label: 'Accessories', href: '#' },
|
|
404
|
-
],
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
id: '3-1-2',
|
|
408
|
-
label: 'Clothing',
|
|
409
|
-
children: [
|
|
410
|
-
{ id: '3-1-2-1', label: "Men's", href: '#' },
|
|
411
|
-
{ id: '3-1-2-2', label: "Women's", href: '#' },
|
|
412
|
-
],
|
|
413
|
-
},
|
|
414
|
-
],
|
|
415
|
-
},
|
|
416
|
-
{ id: '3-2', label: 'New Arrivals', href: '#', badge: 'NEW' },
|
|
417
|
-
],
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
id: '4',
|
|
421
|
-
label: 'Analytics',
|
|
422
|
-
icon: <Analytics />,
|
|
423
|
-
children: [
|
|
424
|
-
{
|
|
425
|
-
id: '4-1',
|
|
426
|
-
label: 'Reports',
|
|
427
|
-
children: [
|
|
428
|
-
{ id: '4-1-1', label: 'Sales Report', href: '#' },
|
|
429
|
-
{ id: '4-1-2', label: 'Traffic Report', href: '#' },
|
|
430
|
-
],
|
|
431
|
-
},
|
|
432
|
-
{ id: '4-2', label: 'Real-time Dashboard', href: '#' },
|
|
433
|
-
],
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
id: '5',
|
|
437
|
-
label: 'Settings',
|
|
438
|
-
icon: <Settings />,
|
|
439
|
-
href: '#',
|
|
440
|
-
},
|
|
441
|
-
],
|
|
442
|
-
size: 'md',
|
|
443
|
-
},
|
|
444
|
-
decorators: [
|
|
445
|
-
(Story) => (
|
|
446
|
-
<Box>
|
|
447
|
-
<Story />
|
|
448
|
-
<Box sx={{ p: 3, bgcolor: 'grey.50', minHeight: '500px' }}>
|
|
449
|
-
<Typography variant="h4">Horizontal Navigation with Deep Nesting</Typography>
|
|
450
|
-
<Typography variant="body1" sx={{ mt: 2 }}>
|
|
451
|
-
This example demonstrates horizontal navigation with deeply nested dropdowns (up to 6
|
|
452
|
-
levels). Hover over "Organization" to see the deep hierarchy.
|
|
453
|
-
</Typography>
|
|
454
|
-
<Typography variant="body2" sx={{ mt: 1, color: 'text.secondary' }}>
|
|
455
|
-
Path example: Organization → Departments → Engineering → Frontend → React Team (5
|
|
456
|
-
levels)
|
|
457
|
-
</Typography>
|
|
458
|
-
<Typography variant="body2" sx={{ mt: 1, color: 'text.secondary' }}>
|
|
459
|
-
Deepest path: Organization → Departments → Sales → Regions → Americas → North (6
|
|
460
|
-
levels!)
|
|
461
|
-
</Typography>
|
|
462
|
-
<Typography variant="body2" sx={{ mt: 1, color: 'info.main' }}>
|
|
463
|
-
Note: In horizontal menus, nested children expand vertically within the dropdown using
|
|
464
|
-
collapse/expand behavior for better UX.
|
|
465
|
-
</Typography>
|
|
466
|
-
</Box>
|
|
467
|
-
</Box>
|
|
468
|
-
),
|
|
469
|
-
],
|
|
470
|
-
};
|
|
471
|
-
export const HorizontalVariants: Story = {
|
|
472
|
-
render: () => (
|
|
473
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
|
474
|
-
<Box>
|
|
475
|
-
<Typography variant="h6" sx={{ mb: 2 }}>
|
|
476
|
-
Simple Horizontal Navigation
|
|
477
|
-
</Typography>
|
|
478
|
-
<NavigationMenu variant="horizontal" items={horizontalItems} size="md" />
|
|
479
|
-
</Box>
|
|
480
|
-
<Box>
|
|
481
|
-
<Typography variant="h6" sx={{ mb: 2 }}>
|
|
482
|
-
Horizontal with Dropdown Subitems
|
|
483
|
-
</Typography>
|
|
484
|
-
<NavigationMenu variant="horizontal" items={horizontalItemsWithSubitems} size="md" />
|
|
485
|
-
</Box>
|
|
486
|
-
<Box>
|
|
487
|
-
<Typography variant="h6" sx={{ mb: 2 }}>
|
|
488
|
-
Horizontal with Icons & Dropdowns
|
|
489
|
-
</Typography>
|
|
490
|
-
<NavigationMenu variant="horizontal" items={horizontalItemsWithSubitemsAndIcons} size="md" />
|
|
491
|
-
</Box>
|
|
492
|
-
<Box sx={{ p: 3, bgcolor: 'grey.50', borderRadius: 1 }}>
|
|
493
|
-
<Typography variant="body1">
|
|
494
|
-
These examples demonstrate the progression from simple horizontal navigation
|
|
495
|
-
to more complex dropdown-enabled layouts. The component can handle both
|
|
496
|
-
text-only and icon-enhanced menu items with nested children.
|
|
497
|
-
</Typography>
|
|
498
|
-
</Box>
|
|
499
|
-
</Box>
|
|
500
|
-
),
|
|
501
|
-
};
|