import * as React from 'react' import type { StoryFn, Meta } from '@storybook/react-webpack5' import { NavigationBar, UserMenu } from '.' import { ToolbarSectionRight, ToolbarSectionLeft } from '../section' import { ToolbarButtonEmptyInverse } from '../button' import { Activity, Board, ChevronRight, Help, Knowledgebase, Logout, Notification, Overview, Settings, Support, Tools, User, Videocamera, } from '@planview/pv-icons' import { LogoAdaptiveWork, LogoAdvisorExpress, LogoAdvisor, LogoAgilePlace, LogoBarometer, LogoChangePoint, LogoDaptiv, LogoEA, LogoIdeaPlace, LogoOKR, LogoPortfolios, LogoPPMPro, LogoPVAdmin, LogoRoadmaps, LogoProjectPlace, LogoHub, LogoViz, LogoProjectAdvantage, } from '../logos' import { Avatar, ListItem, ListItemDivider } from '@planview/pv-uikit' import { SearchInput } from './search-input' import { ToolbarDropdownMenu } from '../dropdown' import { align, theme, iconSizes } from '@planview/pv-utilities' import styled from 'styled-components' export default { title: 'pv-toolbar/NavigationBar', tags: ['autodocs'], component: NavigationBar, args: { logo: , }, argTypes: { productSwitcher: { control: { type: 'radio', }, defaultValue: undefined, options: ['Without', 'With'], mapping: { Without: undefined, With: (
} />
), }, }, children: { control: false, }, logo: { options: [ 'AdaptiveWork', 'PVAdmin', 'Advisor', 'AdvisorExpress', 'AgilePlace', 'Barometer', 'ChangePoint', 'Daptiv', 'EA', 'IdeaPlace', 'OKR', 'Portfolios', 'PPMPro', 'ProjectPlace', 'RoadMaps', 'Hub', 'Viz', 'ProjectAdvantage', ], mapping: { AdaptiveWork: , PVAdmin: , Advisor: , AdvisorExpress: , AgilePlace: , Barometer: , ChangePoint: , Daptiv: , EA: , IdeaPlace: , OKR: , Portfolios: , PPMPro: , ProjectPlace: , RoadMaps: , Hub: , Viz: , ProjectAdvantage: , }, }, }, parameters: { badges: ['intl'], }, } satisfies Meta export const Default: StoryFn = (args) => ( }> My overview } tooltip="Start zoom meeting" /> } tooltip="Knowledge center" /> } tooltip="Notifications" /> } > } label="Settings" /> } label="Help" /> } label="Customer support" /> } label="Log out" /> ) /** * Example showing the navigation bar without the left separator, since there is no content in the `ToolbarSectionLeft` as recommended in the [best practices](https://design.planview.com/components/navigation/navigation-bar#left-section) for the Navigation bar. */ export const WithoutSeparator: StoryFn = (args) => ( } tooltip="Start zoom meeting" /> } tooltip="Knowledge center" /> } tooltip="Notifications" /> } > } label="Settings" /> } label="Help" /> } label="Customer support" /> } label="Log out" /> ) WithoutSeparator.parameters = { docs: { source: { code: ` ...rest of the content omitted for brevity `, }, }, } const BreadCrumbContainer = styled.div` ${align.centerV}; ` export const BreadCrumb: StoryFn = () => ( } > ( } activated={props['aria-expanded']} {...props} > Context )} > } selected label="Context item 1" /> } label="Context item 2" /> ( } activated={props['aria-expanded']} {...props} > Sub context )} > } label="Sub context item 1" /> } selected label="Sub context item 2" /> } label="Sub context item 3" /> ) BreadCrumb.storyName = 'Example how to construct a breadcrumb' BreadCrumb.parameters = { controls: { disabled: true, hideNoControlsWarning: true }, docs: { description: { story: `Example below shows a breadcrumb constructed using \`ToolbarDropdownMenu\` -components. In some cases the bread-crumb would be made up of a set of links instead. This can be achieved using the \`ToolbarItem\` to create custom, keyboard navigable content. `, }, source: { code: ` } > ( } activated={props['aria-expanded']} {...props} > Context )} > } selected label="Context item 1" /> } label="Context item 2" /> ( } activated={props['aria-expanded']} {...props} > Sub context )} > } label="Sub context item 1" /> } selected label="Sub context item 2" /> } label="Sub context item 3" /> `, }, }, }