@sula-tech/webcomponents 0.24.0 → 0.24.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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sula-workbench-menu.cjs.entry.js +29 -5
- package/dist/cjs/sula-workbench-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/sula-workbench-menu.entry.cjs.js.map +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.js +48 -4
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.js.map +1 -1
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.stories.js +40 -0
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.stories.js.map +1 -1
- package/dist/components/sula-workbench-menu.js +32 -6
- package/dist/components/sula-workbench-menu.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sula-workbench-menu.entry.js +29 -5
- package/dist/esm/sula-workbench-menu.entry.js.map +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/types/components/sula-workbench-menu/sula-workbench-menu.d.ts +7 -0
- package/dist/types/components/sula-workbench-menu/sula-workbench-menu.stories.d.ts +23 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/webcomponents/{p-68a6d489.entry.js → p-50ad82d0.entry.js} +26 -6
- package/dist/webcomponents/p-50ad82d0.entry.js.map +1 -0
- package/dist/webcomponents/sula-workbench-menu.entry.esm.js.map +1 -1
- package/dist/webcomponents/webcomponents.esm.js +4 -2
- package/package.json +1 -1
- package/dist/webcomponents/p-68a6d489.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sula-workbench-menu.js","sourceRoot":"","sources":["../../../src/components/sula-workbench-menu/sula-workbench-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAO,MAAM,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ch, h } from '@stencil/core';\nimport { SulaMenuDensity, SulaMenuLabelOverflow } from '../sula-menu/model/sula-menu.model';\nimport { SulaProfileMenuItem, SulaProfileMenuSwitchChange } from '../sula-profile-menu/model/sula-profile-menu.model';\nimport { SulaWorkbenchMenuDirection, SulaWorkbenchMenuItem, SulaWorkbenchMenuPath, SulaWorkbenchMenuUser } from './model/sula-workbench-menu.model';\n\ntype CrumbMenuState = { open: boolean; left: number; top: number };\n\n/**\n * Navigation menu that combines an inline expandable tree with a drill-down panel.\n * Levels above `drilldownLevel` expand in place, as in `sula-menu`. Items at or below\n * that level with children open a single-level panel with a breadcrumb trail.\n *\n * @part shell - Main visual container of the menu.\n * @part title - Menu title, or the current level title while drilled in.\n * @part main-item-label - Label of each top-level item.\n * @part item-label - Label of each item inside the drill-down panel.\n * @part toggle-label - Label of the collapse/expand control.\n * @slot profile-content - Extra content rendered inside the profile popover.\n * @part profile-popover - Popover opened from the user area.\n * @cssprop --sula-menu-width - Width of the expanded menu. Defaults to 256px.\n * @cssprop --sula-menu-collapsed-width - Width of the collapsed menu. Defaults to 88px.\n */\n@Component({\n tag: 'sula-workbench-menu',\n styleUrl: 'sula-workbench-menu.scss',\n shadow: true,\n})\nexport class SulaWorkbenchMenu {\n @Element() el: HTMLElement;\n\n /**\n * Menu title\n */\n @Prop()\n menuTitle: string = '';\n\n /**\n * Menu image\n */\n @Prop()\n image: string = '';\n\n /**\n * Menu width in expanded state. Use a CSS length that does not depend on the\n * host width, for example: 256px, 20rem or clamp(16rem, 25vw, 24rem).\n */\n @Prop()\n width: string = '';\n\n /**\n * Density applied to menu items.\n */\n @Prop()\n density: SulaMenuDensity = SulaMenuDensity.Default;\n\n /**\n * Overflow behavior for item labels.\n */\n @Prop()\n labelOverflow: SulaMenuLabelOverflow = SulaMenuLabelOverflow.Wrap;\n\n /**\n * Depth (1-based) from which items with children open a drill-down panel instead of expanding in place.\n * With the default of 3, the first two levels expand inline and deeper branches drill down.\n */\n @Prop()\n drilldownLevel: number = 3;\n\n /**\n * Menu items. Each item may use `icon` (icon font class) or `image` (URL or data URI of an image or SVG).\n */\n @Prop({ mutable: true, reflect: true })\n items: SulaWorkbenchMenuItem[] = [];\n\n /**\n * Logged user shown at the bottom of the menu. Without a photo, the initials are shown.\n */\n @Prop()\n user?: SulaWorkbenchMenuUser;\n\n /**\n * Icon used for items without `icon` or `image`. Use an empty string to show no icon.\n */\n @Prop()\n defaultIcon: string = 'ph ph-dot-outline';\n\n /**\n * Options of the profile popover. Use `divider` for a separator and `hasSwitch` + `active` for a toggle row.\n */\n @Prop({ mutable: true })\n profileItems: SulaProfileMenuItem[] = [];\n\n /**\n * Emitted when a leaf item is selected\n */\n @Event()\n itemSelected: EventEmitter<SulaWorkbenchMenuItem>;\n\n /**\n * Emitted when any item is clicked\n */\n @Event()\n itemClicked: EventEmitter<SulaWorkbenchMenuItem>;\n\n /**\n * Emitted when the drill-down level changes, with the ids from the root to the level shown (empty at the root)\n */\n @Event()\n levelChanged: EventEmitter<SulaWorkbenchMenuPath>;\n\n /**\n * Emitted when the user area is clicked. Call `preventDefault()` to keep the profile popover closed.\n */\n @Event({ cancelable: true })\n profileClicked: EventEmitter<SulaWorkbenchMenuUser>;\n\n /**\n * Emitted when a profile popover option without switch is clicked. The popover closes.\n */\n @Event()\n profileItemClicked: EventEmitter<SulaProfileMenuItem>;\n\n /**\n * Emitted when the switch of a profile popover option changes. The popover stays open.\n */\n @Event()\n profileSwitchChanged: EventEmitter<SulaProfileMenuSwitchChange>;\n\n /**\n * Emitted when the menu is toggled between collapsed and expanded states\n * True: Menu is expanded\n * False: Menu is collapsed\n */\n @Event()\n menuToggled: EventEmitter<boolean>;\n\n @State()\n collapsed: boolean = false;\n\n @State()\n previewExpanded: boolean = false;\n\n @State()\n stack: SulaWorkbenchMenuItem[] = [];\n\n @State()\n direction: SulaWorkbenchMenuDirection = 'forward';\n\n @State()\n selectedPath: SulaWorkbenchMenuPath = [];\n\n @State()\n crumbMenu: CrumbMenuState = { open: false, left: 0, top: 0 };\n\n @State()\n profileOpen: boolean = false;\n\n private crumbEllipsisEl?: HTMLElement;\n private crumbDropdownEl?: HTMLElement;\n private shellEl?: HTMLElement;\n private userInfoEl?: HTMLElement;\n private profileEl?: HTMLElement;\n private hovering = false;\n\n private get normalizedWidth() {\n const value = this.width?.trim();\n return value ? value : undefined;\n }\n\n private get hostStyleVariables() {\n return {\n ...(this.normalizedWidth ? { '--sula-menu-width': this.normalizedWidth } : {}),\n };\n }\n\n componentWillLoad() {\n this.syncWithItems(this.items);\n }\n\n @Watch('items')\n syncWithItems(items: SulaWorkbenchMenuItem[]) {\n const nextSelected = this.findSelectedIds(items);\n if (nextSelected) {\n this.selectedPath = nextSelected;\n } else if (!this.selectedPath.length || !this.isStillSelectable(items, this.selectedPath)) {\n this.selectedPath = [];\n }\n this.stack = this.rebuildStack(items, this.stack);\n }\n\n componentDidRender() {\n this.positionProfile();\n }\n\n @Listen('click', { target: 'document' })\n onDocumentClick(event: MouseEvent) {\n const path = event.composedPath();\n if (this.profileOpen && !path.includes(this.profileEl) && !path.includes(this.userInfoEl)) this.closeProfile();\n if (!this.crumbMenu.open) return;\n if (path.includes(this.crumbEllipsisEl) || path.includes(this.crumbDropdownEl)) return;\n this.closeCrumbMenu();\n }\n\n @Listen('keydown', { target: 'document' })\n onDocumentKeydown(event: KeyboardEvent) {\n if (event.key !== 'Escape') return;\n this.closeCrumbMenu();\n if (this.profileOpen) {\n this.closeProfile();\n this.userInfoEl?.focus();\n }\n }\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.positionProfile();\n }\n\n private getVisibleItems(items?: SulaWorkbenchMenuItem[]) {\n return items?.filter(item => !item.hidden) ?? [];\n }\n\n private hasVisibleChildren(item: Pick<SulaWorkbenchMenuItem, 'children'>) {\n return this.getVisibleItems(item.children).length > 0;\n }\n\n private isDrilled() {\n return this.stack.length >= this.drilldownLevel;\n }\n\n private findSelectedIds(items: SulaWorkbenchMenuItem[], trail: string[] = []): string[] | undefined {\n for (const item of this.getVisibleItems(items)) {\n if (!this.hasVisibleChildren(item)) {\n if (item.selected) return [...trail, item.id];\n continue;\n }\n const nested = this.findSelectedIds(item.children, [...trail, item.id]);\n if (nested) return nested;\n }\n return undefined;\n }\n\n private isStillSelectable(items: SulaWorkbenchMenuItem[], path: string[]) {\n const found = this.findPath(items, path[path.length - 1]);\n return !!found && !this.hasVisibleChildren(found[found.length - 1]);\n }\n\n private toggleExpanded(items: SulaWorkbenchMenuItem[], id: string): SulaWorkbenchMenuItem[] {\n return items.map(item => {\n if (item.id === id) return { ...item, expanded: !item.expanded };\n if (!item.children) return item;\n return { ...item, children: this.toggleExpanded(item.children, id) };\n });\n }\n\n private findPath(items: SulaWorkbenchMenuItem[], id: string, trail: SulaWorkbenchMenuItem[] = []): SulaWorkbenchMenuItem[] | undefined {\n for (const item of this.getVisibleItems(items)) {\n const next = [...trail, item];\n if (item.id === id) return next;\n const nested = this.findPath(item.children ?? [], id, next);\n if (nested) return nested;\n }\n return undefined;\n }\n\n private rebuildStack(items: SulaWorkbenchMenuItem[], previous: SulaWorkbenchMenuItem[]) {\n const next: SulaWorkbenchMenuItem[] = [];\n let level = items;\n\n for (const ancestor of previous) {\n const match = this.getVisibleItems(level).find(item => item.id === ancestor.id);\n if (!match) break;\n next.push(match);\n level = match.children ?? [];\n }\n\n return next;\n }\n\n private isActive(item: SulaWorkbenchMenuItem, branch: boolean) {\n if (branch) return this.selectedPath.includes(item.id);\n return this.selectedPath.length > 0 && this.selectedPath[this.selectedPath.length - 1] === item.id;\n }\n\n private isFaded(item: SulaWorkbenchMenuItem, active: boolean) {\n return !!item.disabled && !active;\n }\n\n private emitLevel() {\n this.levelChanged.emit(this.stack.map(item => item.id));\n }\n\n private toggleInline(id: string) {\n this.items = this.toggleExpanded(this.items, id);\n }\n\n private enterDrill(item: SulaWorkbenchMenuItem) {\n const path = this.findPath(this.items, item.id) ?? [item];\n this.direction = 'forward';\n this.stack = path;\n this.closeCrumbMenu();\n this.emitLevel();\n }\n\n private markSelected(items: SulaWorkbenchMenuItem[], id: string): SulaWorkbenchMenuItem[] {\n return items.map(item => ({\n ...item,\n selected: item.id === id,\n ...(item.children ? { children: this.markSelected(item.children, id) } : {}),\n }));\n }\n\n // Selection lives on the items (like `expanded`), so re-assigning items when a branch is\n // toggled keeps the user's choice instead of falling back to the initially selected item.\n private selectItem(item: SulaWorkbenchMenuItem) {\n const path = this.findPath(this.items, item.id) ?? [item];\n this.items = this.markSelected(this.items, item.id);\n this.selectedPath = path.map(p => p.id);\n this.itemSelected.emit(item);\n }\n\n private handleRowClick(item: SulaWorkbenchMenuItem, depth: number) {\n if (item.disabled) return;\n\n this.itemClicked.emit(item);\n\n if (this.hasVisibleChildren(item)) {\n if (depth < this.drilldownLevel) {\n this.toggleInline(item.id);\n } else {\n this.enterDrill(item);\n }\n return;\n }\n\n this.selectItem(item);\n }\n\n private goToDepth(index: number) {\n this.direction = 'back';\n this.stack = index < 0 ? [] : this.stack.slice(0, index + 1);\n this.closeCrumbMenu();\n this.emitLevel();\n }\n\n private toggleCrumbMenu(event: MouseEvent) {\n if (this.crumbMenu.open) {\n this.closeCrumbMenu();\n return;\n }\n const button = event.currentTarget as HTMLElement;\n this.crumbMenu = {\n open: true,\n left: button.offsetLeft,\n top: button.offsetTop + button.offsetHeight + 6,\n };\n }\n\n private closeCrumbMenu() {\n if (this.crumbMenu.open) this.crumbMenu = { ...this.crumbMenu, open: false };\n }\n\n private toggleMenu() {\n this.closeProfile();\n if (this.collapsed) {\n this.collapsed = false;\n this.previewExpanded = false;\n this.menuToggled.emit(true);\n return;\n }\n\n this.collapsed = true;\n this.menuToggled.emit(false);\n this.previewExpanded = false;\n }\n\n private handleMenuMouseEnter() {\n this.hovering = true;\n if (this.collapsed) this.previewExpanded = true;\n }\n\n // While the popover is open the preview stays expanded, so the popover keeps its anchor.\n private handleMenuMouseLeave() {\n this.hovering = false;\n if (this.collapsed && !this.profileOpen) this.previewExpanded = false;\n }\n\n private toggleProfile() {\n if (this.profileOpen) {\n this.closeProfile();\n return;\n }\n if (this.profileClicked.emit(this.user).defaultPrevented) return;\n this.profileOpen = true;\n requestAnimationFrame(() => this.profileEl?.focus());\n }\n\n private closeProfile() {\n if (!this.profileOpen) return;\n this.profileOpen = false;\n if (this.collapsed && !this.hovering) this.previewExpanded = false;\n }\n\n // Fixed position, so ancestors with overflow hidden do not clip the popover.\n private positionProfile() {\n if (!this.profileOpen || !this.profileEl || !this.userInfoEl || !this.shellEl) return;\n const gap = 8;\n const inset = 12;\n const anchor = this.userInfoEl.getBoundingClientRect();\n const shell = this.shellEl.getBoundingClientRect();\n const style = this.profileEl.style;\n\n if (!this.collapsed || this.previewExpanded) {\n style.left = `${shell.left + inset}px`;\n style.width = `${shell.width - inset * 2}px`;\n style.bottom = `${window.innerHeight - anchor.top + gap}px`;\n return;\n }\n\n style.left = `${shell.right + gap}px`;\n style.width = '';\n style.bottom = `${window.innerHeight - anchor.bottom}px`;\n }\n\n // Inner events are composed; stopping them avoids clashing with this menu's own itemClicked.\n private handleProfileItemClicked(event: CustomEvent<SulaProfileMenuItem>) {\n event.stopPropagation();\n this.closeProfile();\n this.profileItemClicked.emit(event.detail);\n }\n\n private handleProfileSwitchChanged(event: CustomEvent<SulaProfileMenuSwitchChange>) {\n event.stopPropagation();\n const { item } = event.detail;\n this.profileItems = this.profileItems.map(current => (current.id === item.id ? item : current));\n this.profileSwitchChanged.emit(event.detail);\n }\n\n private renderProfilePopover(expandedView: boolean) {\n return (\n <div\n part=\"profile-popover\"\n role=\"dialog\"\n aria-label={`Perfil de ${this.user.name}`}\n aria-hidden={String(!this.profileOpen)}\n tabIndex={-1}\n ref={el => (this.profileEl = el)}\n class={{\n 'profile-popover': true,\n 'profile-popover--open': this.profileOpen,\n 'profile-popover--side': !expandedView,\n }}\n >\n <sula-profile-menu\n user={this.user}\n items={this.profileItems}\n onItemClicked={event => this.handleProfileItemClicked(event)}\n onSwitchChanged={event => this.handleProfileSwitchChanged(event)}\n >\n <slot name=\"profile-content\"></slot>\n </sula-profile-menu>\n </div>\n );\n }\n\n private isValidIcon(icon?: string) {\n return !!icon && /ph-[a-z]/.test(icon);\n }\n\n private isSvg(image: string) {\n return /^data:image\\/svg\\+xml/i.test(image) || /\\.svg(\\?|#|$)/i.test(image);\n }\n\n private iconOf(item: SulaWorkbenchMenuItem) {\n return this.isValidIcon(item.icon) ? item.icon : this.defaultIcon;\n }\n\n private hasIcon(item: SulaWorkbenchMenuItem) {\n return !!item.image || this.isValidIcon(this.iconOf(item));\n }\n\n private renderItemIcon(item: SulaWorkbenchMenuItem, customClass: string, size: 'sm' | 'md' | 'lg', faded = false) {\n if (!this.hasIcon(item)) return null;\n if (item.image && this.isSvg(item.image)) {\n // SVGs are painted with currentColor through a mask, so they follow the same state colors as the icon font.\n return (\n <span\n class={`menu-item-image menu-item-image--mask menu-item-image--${size} ${customClass}`}\n style={{ '--menu-item-image': `url(\"${item.image.replace(/\"/g, '%22')}\")` }}\n aria-hidden=\"true\"\n ></span>\n );\n }\n if (item.image) {\n return (\n <img\n class={{ 'menu-item-image': true, [`menu-item-image--${size}`]: true, 'is-faded': faded }}\n src={item.image}\n alt=\"\"\n />\n );\n }\n return <sula-icon icon={this.iconOf(item)} customClass={customClass}></sula-icon>;\n }\n\n private getInitials(name: string) {\n return name\n .split(' ')\n .filter(Boolean)\n .slice(0, 2)\n .map(part => part[0].toUpperCase())\n .join('');\n }\n\n private renderUserInfo(expandedView: boolean) {\n const user = this.user;\n return (\n <button\n type=\"button\"\n class={{\n 'user-info flex min-w-0 cursor-pointer items-center rounded-xs p-8 text-left hover:bg-states-empty-bg-hover': true,\n 'user-info--active bg-states-empty-bg-hover': this.profileOpen,\n 'w-full': expandedView,\n }}\n title={`Ver perfil de ${user.name}`}\n aria-label={`Ver perfil de ${user.name}`}\n aria-haspopup=\"dialog\"\n aria-expanded={String(this.profileOpen)}\n ref={el => (this.userInfoEl = el)}\n onClick={() => this.toggleProfile()}\n >\n <span class=\"user-avatar flex h-9 w-9 flex-none items-center justify-center overflow-hidden rounded-full bg-brand-primary text-sm font-semibold text-negative-negative-1\">\n {user.photo ? <img src={user.photo} alt={user.name} /> : this.getInitials(user.name)}\n </span>\n <span\n aria-hidden={!expandedView}\n class={{\n 'user-copy': true,\n 'ml-8': true,\n 'user-copy--visible': expandedView,\n 'user-copy--hidden': !expandedView,\n }}\n >\n <span part=\"user-name\" class=\"user-name truncate text-sm font-semibold text-text-primary\">\n {user.name}\n </span>\n {user.email && <span part=\"user-email\" class=\"user-email truncate text-xs text-text-secondary\">{user.email}</span>}\n </span>\n </button>\n );\n }\n\n private getIconClass(active: boolean, faded: boolean, size: string) {\n if (faded) return `text-icon-disabled ${size}`;\n if (active) return `text-brand-primary ${size}`;\n return `text-icon-primary ${size}`;\n }\n\n private renderCollapseButton() {\n const label = this.collapsed ? 'Expandir menu' : 'Recolher menu';\n return (\n <button\n type=\"button\"\n class=\"menu-toggle flex flex-none items-center justify-center\"\n title={label}\n aria-label={label}\n aria-expanded={String(!this.collapsed)}\n onClick={() => this.toggleMenu()}\n >\n <sula-icon icon={`ph-bold ph-caret-${this.collapsed ? 'right' : 'left'}`} customClass=\"text-lg\"></sula-icon>\n </button>\n );\n }\n\n private renderRootHeader(expandedView: boolean) {\n return (\n <div\n class={{\n 'menu-header flex items-center': true,\n 'mb-40': expandedView,\n 'mb-24 flex-col justify-center px-0': !expandedView,\n }}\n >\n {this.image && (\n <div class={{ 'menu-brand-image max-h-10 max-w-10 overflow-hidden': true, 'mr-6': expandedView }}>\n <img src={this.image} alt={this.menuTitle} />\n </div>\n )}\n <div\n aria-hidden={!expandedView}\n title={expandedView ? this.menuTitle : undefined}\n class={{\n 'menu-title menu-copy': true,\n 'menu-copy--visible': expandedView,\n 'menu-copy--hidden': !expandedView,\n }}\n >\n <h1 part=\"title\" class=\"truncate text-2xl font-bold leading-7 text-text-secondary\">\n {this.menuTitle}\n </h1>\n </div>\n {this.renderCollapseButton()}\n </div>\n );\n }\n\n private renderTrail(ancestors: SulaWorkbenchMenuItem[]) {\n const hasHidden = ancestors.length > 2;\n const visible = hasHidden ? ancestors.slice(-2) : ancestors;\n const crumbs: JSX.Element[] = [];\n\n if (hasHidden) {\n crumbs.push(\n <button\n key=\"ellipsis\"\n type=\"button\"\n class=\"crumb-btn crumb-btn--ellipsis\"\n aria-haspopup=\"true\"\n aria-expanded={String(this.crumbMenu.open)}\n title={`${ancestors.length - 2} nível(is) anterior(es)`}\n ref={el => (this.crumbEllipsisEl = el)}\n onClick={event => this.toggleCrumbMenu(event)}\n >\n <sula-icon icon=\"ph-bold ph-dots-three\" customClass=\"text-base text-text-secondary\"></sula-icon>\n </button>,\n );\n }\n\n visible.forEach(ancestor => {\n crumbs.push(\n <button\n key={ancestor.id}\n type=\"button\"\n class=\"crumb-btn\"\n title={ancestor.label}\n onClick={() => this.goToDepth(this.stack.indexOf(ancestor))}\n >\n {ancestor.label}\n </button>,\n );\n });\n\n const nodes: JSX.Element[] = [];\n crumbs.forEach((crumb, index) => {\n if (index > 0) nodes.push(<sula-icon key={`sep-${index}`} icon=\"ph ph-caret-right\" customClass=\"crumb-sep text-xs\"></sula-icon>);\n nodes.push(crumb);\n });\n\n return (\n <nav class=\"crumb-trail flex min-w-0 items-center\" aria-label=\"Caminho de navegação\">\n {nodes}\n </nav>\n );\n }\n\n private renderCrumbDropdown(ancestors: SulaWorkbenchMenuItem[]) {\n if (!this.crumbMenu.open || ancestors.length <= 2) return null;\n const hidden = ancestors.slice(0, -2);\n\n return (\n <div\n class=\"crumb-dropdown\"\n role=\"menu\"\n ref={el => (this.crumbDropdownEl = el)}\n style={{ left: `${this.crumbMenu.left}px`, top: `${this.crumbMenu.top}px` }}\n >\n {hidden.map(ancestor => (\n <button\n key={ancestor.id}\n type=\"button\"\n role=\"menuitem\"\n class=\"crumb-dropdown-item\"\n onClick={() => this.goToDepth(this.stack.indexOf(ancestor))}\n >\n <span class=\"item-icon flex flex-none items-center justify-center\">{this.renderItemIcon(ancestor, 'text-sm text-icon-primary', 'sm')}</span>\n <span class=\"truncate\">{ancestor.label}</span>\n </button>\n ))}\n </div>\n );\n }\n\n private renderDrillHeader(activeParent: SulaWorkbenchMenuItem) {\n const ancestors = this.stack.slice(0, -1);\n const backLabel = ancestors.length ? ancestors[ancestors.length - 1].label : this.menuTitle || 'Início';\n const backButton = (\n <button\n type=\"button\"\n class=\"back-btn\"\n title={`Voltar para ${backLabel}`}\n aria-label={`Voltar para ${backLabel}`}\n onClick={() => this.goToDepth(this.stack.length - 2)}\n >\n <sula-icon icon=\"ph ph-arrow-left\" customClass=\"text-lg text-icon-primary\"></sula-icon>\n </button>\n );\n\n return (\n <div class=\"menu-header menu-header--drilldown mb-16 flex flex-col border-b border-line-general pb-24\">\n <div class=\"identity-row flex items-center\">\n <button type=\"button\" class=\"identity-strip\" title={`Ir para o início de ${this.menuTitle}`} onClick={() => this.goToDepth(-1)}>\n {this.image && (\n <span class=\"identity-image\">\n <img src={this.image} alt=\"\" />\n </span>\n )}\n <span class=\"identity-label truncate\">{this.menuTitle}</span>\n </button>\n {this.renderCollapseButton()}\n </div>\n\n {ancestors.length > 0 && (\n <div class=\"breadcrumb-row\">\n {backButton}\n {this.renderTrail(ancestors)}\n {this.renderCrumbDropdown(ancestors)}\n </div>\n )}\n\n <div class={{ 'context-row flex items-center min-w-0': true, 'mt-8': ancestors.length > 0 }}>\n {ancestors.length === 0 && backButton}\n {this.hasIcon(activeParent) && (\n <span class=\"context-icon flex flex-none items-center justify-center\">\n {this.renderItemIcon(activeParent, 'text-xl text-brand-primary', 'md')}\n </span>\n )}\n <h1 part=\"title\" class=\"context-title truncate text-xl font-semibold leading-tight text-text-primary\">\n {activeParent.label}\n </h1>\n </div>\n </div>\n );\n }\n\n private renderDrillRow(item: SulaWorkbenchMenuItem, reserve: boolean) {\n const branch = this.hasVisibleChildren(item);\n const active = this.isActive(item, branch);\n const faded = this.isFaded(item, active);\n\n return (\n <li class=\"list-none\" key={item.id}>\n <div\n class={{\n 'menu-item flex items-center justify-between rounded-xs px-8': true,\n 'cursor-pointer hover:bg-states-empty-bg-hover': !item.disabled && !active,\n 'cursor-pointer': !item.disabled && active,\n 'cursor-not-allowed': !!item.disabled,\n }}\n aria-disabled={!!item.disabled}\n onClick={() => this.handleRowClick(item, this.stack.length + 1)}\n >\n <span class=\"flex min-w-0 flex-1 items-center gap-8\">\n {this.renderIconSlot(item, this.getIconClass(active, faded, 'text-base'), faded, reserve)}\n <span\n part=\"item-label\"\n class={{\n 'menu-item-label truncate': this.labelOverflow !== SulaMenuLabelOverflow.Wrap,\n 'menu-item-label menu-item-label--wrap': this.labelOverflow === SulaMenuLabelOverflow.Wrap,\n 'font-bold text-text-primary': active,\n 'text-text-disabled': faded,\n 'text-text-secondary': !active && !faded,\n }}\n >\n {item.label}\n </span>\n </span>\n {branch && <sula-icon icon=\"ph ph-caret-right\" customClass={faded ? 'text-text-disabled text-xs' : 'text-text-secondary text-xs'}></sula-icon>}\n </div>\n </li>\n );\n }\n\n private renderDrillPanel() {\n const activeParent = this.stack[this.stack.length - 1];\n const panelKey = this.stack.map(item => item.id).join('/');\n\n return (\n <ul\n key={panelKey}\n class={{\n 'menu-panel flex flex-col': true,\n 'menu-panel--forward': this.direction === 'forward',\n 'menu-panel--back': this.direction === 'back',\n }}\n >\n {this.getVisibleItems(activeParent.children).map(item => this.renderDrillRow(item, this.siblingsHaveIcon(activeParent.children)))}\n </ul>\n );\n }\n\n private getMainIconClass(active: boolean, faded: boolean) {\n if (faded) return 'text-icon-disabled text-base';\n if (active) return 'text-brand-primary text-base';\n return 'text-icon-primary text-base';\n }\n\n private getMainCaretClass(active: boolean, faded: boolean) {\n if (faded) return 'text-text-disabled text-xs';\n if (active) return 'text-text-primary text-xs';\n return 'text-text-secondary text-xs';\n }\n\n private getSubIconClass(faded: boolean, selected = false) {\n if (faded) return 'text-icon-disabled text-base';\n if (selected) return 'text-brand-primary text-base';\n return 'text-icon-primary text-base';\n }\n\n private getSubCaretClass(faded: boolean) {\n return faded ? 'text-icon-disabled text-xs' : 'text-icon-primary text-xs';\n }\n\n private siblingsHaveIcon(items: SulaWorkbenchMenuItem[]) {\n return this.getVisibleItems(items).some(sibling => this.hasIcon(sibling));\n }\n\n private renderIconSlot(item: SulaWorkbenchMenuItem, customClass: string, faded: boolean, reserve = true) {\n if (!reserve && !this.hasIcon(item)) return null;\n return <span class=\"item-icon flex flex-none items-center justify-center\">{this.renderItemIcon(item, customClass, 'lg', faded)}</span>;\n }\n\n private renderMainRow(item: SulaWorkbenchMenuItem, expandedView: boolean, branch: boolean, expanded: boolean, active: boolean, faded: boolean, reserve: boolean) {\n const labelOverflowTruncate = this.labelOverflow === SulaMenuLabelOverflow.Truncate;\n return (\n <div\n class={{\n 'menu-item flex items-center rounded-xs px-8': true,\n 'cursor-pointer hover:bg-states-empty-bg-hover': !item.disabled,\n 'cursor-not-allowed': !!item.disabled,\n 'justify-between': expandedView,\n 'justify-center': !expandedView,\n }}\n title={!expandedView ? item.label : undefined}\n aria-disabled={!!item.disabled}\n onClick={() => this.handleRowClick(item, 1)}\n >\n <div class={{ 'flex items-center': true, 'flex-1 min-w-0 gap-8': expandedView, 'justify-center': !expandedView }}>\n {this.renderIconSlot(item, this.getMainIconClass(active, faded), faded, reserve)}\n <span\n part=\"main-item-label\"\n title={expandedView ? item.label : undefined}\n aria-hidden={!expandedView}\n class={{\n 'menu-item-label menu-copy': true,\n 'menu-item-label--truncate': labelOverflowTruncate,\n 'menu-item-label--wrap': !labelOverflowTruncate,\n 'menu-copy--visible': expandedView,\n 'menu-copy--hidden': !expandedView,\n 'font-bold text-text-primary': active,\n 'text-text-disabled': faded,\n 'text-text-secondary': !active && !faded,\n }}\n >\n {item.label}\n </span>\n </div>\n {branch && (\n <sula-icon\n aria-hidden={!expandedView}\n class={{\n 'menu-item-caret flex items-center justify-center': true,\n 'menu-item-caret--expanded': expanded,\n 'menu-item-caret--visible': expandedView,\n 'menu-item-caret--hidden': !expandedView,\n }}\n icon=\"ph ph-caret-down\"\n customClass={this.getMainCaretClass(active, faded)}\n ></sula-icon>\n )}\n </div>\n );\n }\n\n private renderSubRow(item: SulaWorkbenchMenuItem, expandedView: boolean, branch: boolean, expanded: boolean, active: boolean, faded: boolean, drill: boolean, reserve: boolean) {\n const caretIcon = drill ? 'ph-bold ph-caret-right' : `ph-bold ph-caret-${expanded && expandedView ? 'up' : 'down'}`;\n const onClick = () => this.handleRowClick(item, this.depthOf(item));\n const rowClass = {\n 'submenu-item flex min-w-0 items-center rounded-xs py-8 pr-8 select-none': true,\n 'submenu-item--branch w-full': branch,\n 'cursor-pointer hover:bg-states-empty-bg-hover': !item.disabled,\n 'cursor-not-allowed': !!item.disabled,\n 'font-bold': active && branch,\n };\n const label = (\n <span\n class={{\n 'submenu-item-label min-w-0 flex-1': true,\n 'ml-8': reserve || this.hasIcon(item),\n 'menu-item-label--truncate': this.labelOverflow === SulaMenuLabelOverflow.Truncate,\n 'menu-item-label--wrap': this.labelOverflow !== SulaMenuLabelOverflow.Truncate,\n 'text-text-primary': !faded,\n 'text-text-disabled': faded,\n 'font-bold': active,\n }}\n >\n {item.label}\n </span>\n );\n\n if (!branch) {\n return (\n <a class={rowClass} style={{ paddingLeft: '8px' }} title={item.label} aria-disabled={!!item.disabled} onClick={onClick}>\n {this.renderIconSlot(item, this.getSubIconClass(faded, active && !branch), faded, reserve)}\n {label}\n </a>\n );\n }\n\n return (\n <a class={rowClass} style={{ paddingLeft: '8px' }} title={item.label} aria-disabled={!!item.disabled} onClick={onClick}>\n <div class=\"submenu-item-branch-content flex min-w-0 flex-1 items-center\">\n {this.renderIconSlot(item, this.getSubIconClass(faded, active && !branch), faded, reserve)}\n {label}\n </div>\n <div class=\"submenu-item-branch-caret flex flex-none items-center justify-end pl-8\">\n <sula-icon icon={caretIcon} customClass={this.getSubCaretClass(faded)}></sula-icon>\n </div>\n </a>\n );\n }\n\n private depthOf(item: SulaWorkbenchMenuItem) {\n const path = this.findPath(this.items, item.id);\n return path ? path.length : 1;\n }\n\n private renderInlineList(items: SulaWorkbenchMenuItem[], depth: number, expandedView: boolean) {\n const reserve = this.siblingsHaveIcon(items);\n return this.getVisibleItems(items).map(item => {\n const branch = this.hasVisibleChildren(item);\n const drill = branch && depth >= this.drilldownLevel;\n const inline = branch && !drill;\n const expanded = inline && !!item.expanded;\n const active = this.isActive(item, branch) || expanded;\n const faded = this.isFaded(item, active);\n\n const row =\n depth === 1\n ? this.renderMainRow(item, expandedView, branch, expanded, active, faded, reserve)\n : this.renderSubRow(item, expandedView, branch, expanded, active, faded, drill, reserve);\n\n return (\n <li class={{ 'decoration-none list-none': true, 'menu-group': depth === 1, 'is-selected': depth > 1 && active && !branch }} key={item.id}>\n {row}\n {inline && (\n <ul\n aria-hidden={!expandedView || !expanded}\n class={{\n submenu: true,\n 'submenu--expanded': expandedView && expanded,\n 'ml-[8px] border-l border-line-general pl-8': depth === 1,\n 'submenu-branch ml-[24px] border-l border-line-general pl-8': depth > 1,\n }}\n >\n {this.renderInlineList(item.children, depth + 1, expandedView)}\n </ul>\n )}\n </li>\n );\n });\n }\n\n render() {\n const expandedView = !this.collapsed || this.previewExpanded;\n const drilled = expandedView && this.isDrilled();\n const activeParent = this.stack[this.stack.length - 1];\n\n return (\n <Host\n class={{\n 'menu-host--collapsed': this.collapsed,\n 'menu-host--preview': this.collapsed && this.previewExpanded,\n 'menu-host--density-compact': this.density === SulaMenuDensity.Compact,\n 'menu-host--density-comfortable': this.density === SulaMenuDensity.Comfortable,\n }}\n style={this.hostStyleVariables}\n onMouseEnter={() => this.handleMenuMouseEnter()}\n onMouseLeave={() => this.handleMenuMouseLeave()}\n >\n <aside\n part=\"shell\"\n ref={el => (this.shellEl = el)}\n class={{\n 'menu-shell flex h-full flex-col bg-surface-body shadow-md z-50': true,\n 'menu-shell--collapsed': this.collapsed && !this.previewExpanded,\n 'menu-shell--expanded': expandedView,\n 'menu-shell--preview': this.collapsed && this.previewExpanded,\n }}\n >\n {drilled ? this.renderDrillHeader(activeParent) : this.renderRootHeader(expandedView)}\n\n <nav\n class={{\n 'menu-nav flex h-full flex-col overflow-y-auto overflow-x-hidden': true,\n 'px-12': !expandedView,\n }}\n >\n {drilled ? (\n this.renderDrillPanel()\n ) : (\n <ul class=\"flex flex-col\">{this.renderInlineList(this.items, 1, expandedView)}</ul>\n )}\n </nav>\n\n {this.user && (\n <div class=\"menu-footer border-t border-line-general pt-12\">\n {this.renderUserInfo(expandedView)}\n </div>\n )}\n </aside>\n\n {this.user && this.renderProfilePopover(expandedView)}\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sula-workbench-menu.js","sourceRoot":"","sources":["../../../src/components/sula-workbench-menu/sula-workbench-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAO,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAM5F;;;;;;;;;;;;;;GAcG;AAMH,MAAM,OAAO,iBAAiB;IAL9B;QAQE;;WAEG;QAEH,cAAS,GAAW,EAAE,CAAC;QAEvB;;WAEG;QAEH,UAAK,GAAW,EAAE,CAAC;QAEnB;;;WAGG;QAEH,UAAK,GAAW,EAAE,CAAC;QAEnB;;WAEG;QAEH,YAAO,GAAoB,eAAe,CAAC,OAAO,CAAC;QAEnD;;WAEG;QAEH,kBAAa,GAA0B,qBAAqB,CAAC,IAAI,CAAC;QAElE;;;WAGG;QAEH,mBAAc,GAAW,CAAC,CAAC;QAS3B;;WAEG;QAEH,UAAK,GAA4B,EAAE,CAAC;QAQpC;;WAEG;QAEH,gBAAW,GAAW,mBAAmB,CAAC;QAE1C;;WAEG;QAEH,iBAAY,GAA0B,EAAE,CAAC;QA+CzC,cAAS,GAAY,KAAK,CAAC;QAG3B,oBAAe,GAAY,KAAK,CAAC;Q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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, JSX, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaMenuDensity, SulaMenuLabelOverflow } from '../sula-menu/model/sula-menu.model';\nimport { SulaProfileMenuItem, SulaProfileMenuSwitchChange } from '../sula-profile-menu/model/sula-profile-menu.model';\nimport { SulaWorkbenchMenuDirection, SulaWorkbenchMenuItem, SulaWorkbenchMenuPath, SulaWorkbenchMenuUser } from './model/sula-workbench-menu.model';\n\ntype CrumbMenuState = { open: boolean; left: number; top: number };\n\n/**\n * Navigation menu that combines an inline expandable tree with a drill-down panel.\n * Levels above `drilldownLevel` expand in place, as in `sula-menu`. Items at or below\n * that level with children open a single-level panel with a breadcrumb trail.\n *\n * @part shell - Main visual container of the menu.\n * @part title - Menu title, or the current level title while drilled in.\n * @part main-item-label - Label of each top-level item.\n * @part item-label - Label of each item inside the drill-down panel.\n * @part toggle-label - Label of the collapse/expand control.\n * @slot profile-content - Extra content rendered inside the profile popover.\n * @part profile-popover - Popover opened from the user area.\n * @cssprop --sula-menu-width - Width of the expanded menu. Defaults to 256px.\n * @cssprop --sula-menu-collapsed-width - Width of the collapsed menu. Defaults to 88px.\n */\n@Component({\n tag: 'sula-workbench-menu',\n styleUrl: 'sula-workbench-menu.scss',\n shadow: true,\n})\nexport class SulaWorkbenchMenu {\n @Element() el: HTMLElement;\n\n /**\n * Menu title\n */\n @Prop()\n menuTitle: string = '';\n\n /**\n * Menu image\n */\n @Prop()\n image: string = '';\n\n /**\n * Menu width in expanded state. Use a CSS length that does not depend on the\n * host width, for example: 256px, 20rem or clamp(16rem, 25vw, 24rem).\n */\n @Prop()\n width: string = '';\n\n /**\n * Density applied to menu items.\n */\n @Prop()\n density: SulaMenuDensity = SulaMenuDensity.Default;\n\n /**\n * Overflow behavior for item labels.\n */\n @Prop()\n labelOverflow: SulaMenuLabelOverflow = SulaMenuLabelOverflow.Wrap;\n\n /**\n * Depth (1-based) from which items with children open a drill-down panel instead of expanding in place.\n * With the default of 3, the first two levels expand inline and deeper branches drill down.\n */\n @Prop()\n drilldownLevel: number = 3;\n\n /**\n * Controls the drill-down from the host: ids from the root to the item whose children are shown.\n * An empty array shows the tree (leaves the drill-down). Leave it undefined to let only user clicks navigate.\n */\n @Prop()\n drillPath?: string[];\n\n /**\n * Menu items. Each item may use `icon` (icon font class) or `image` (URL or data URI of an image or SVG).\n */\n @Prop({ mutable: true, reflect: true })\n items: SulaWorkbenchMenuItem[] = [];\n\n /**\n * Logged user shown at the bottom of the menu. Without a photo, the initials are shown.\n */\n @Prop()\n user?: SulaWorkbenchMenuUser;\n\n /**\n * Icon used for items without `icon` or `image`. Use an empty string to show no icon.\n */\n @Prop()\n defaultIcon: string = 'ph ph-dot-outline';\n\n /**\n * Options of the profile popover. Use `divider` for a separator and `hasSwitch` + `active` for a toggle row.\n */\n @Prop({ mutable: true })\n profileItems: SulaProfileMenuItem[] = [];\n\n /**\n * Emitted when a leaf item is selected\n */\n @Event()\n itemSelected: EventEmitter<SulaWorkbenchMenuItem>;\n\n /**\n * Emitted when any item is clicked\n */\n @Event()\n itemClicked: EventEmitter<SulaWorkbenchMenuItem>;\n\n /**\n * Emitted when the drill-down level changes, with the ids from the root to the level shown (empty at the root)\n */\n @Event()\n levelChanged: EventEmitter<SulaWorkbenchMenuPath>;\n\n /**\n * Emitted when the user area is clicked. Call `preventDefault()` to keep the profile popover closed.\n */\n @Event({ cancelable: true })\n profileClicked: EventEmitter<SulaWorkbenchMenuUser>;\n\n /**\n * Emitted when a profile popover option without switch is clicked. The popover closes.\n */\n @Event()\n profileItemClicked: EventEmitter<SulaProfileMenuItem>;\n\n /**\n * Emitted when the switch of a profile popover option changes. The popover stays open.\n */\n @Event()\n profileSwitchChanged: EventEmitter<SulaProfileMenuSwitchChange>;\n\n /**\n * Emitted when the menu is toggled between collapsed and expanded states\n * True: Menu is expanded\n * False: Menu is collapsed\n */\n @Event()\n menuToggled: EventEmitter<boolean>;\n\n @State()\n collapsed: boolean = false;\n\n @State()\n previewExpanded: boolean = false;\n\n @State()\n stack: SulaWorkbenchMenuItem[] = [];\n\n @State()\n direction: SulaWorkbenchMenuDirection = 'forward';\n\n @State()\n selectedPath: SulaWorkbenchMenuPath = [];\n\n @State()\n crumbMenu: CrumbMenuState = { open: false, left: 0, top: 0 };\n\n @State()\n profileOpen: boolean = false;\n\n private crumbEllipsisEl?: HTMLElement;\n private crumbDropdownEl?: HTMLElement;\n private shellEl?: HTMLElement;\n private userInfoEl?: HTMLElement;\n private profileEl?: HTMLElement;\n private hovering = false;\n\n private get normalizedWidth() {\n const value = this.width?.trim();\n return value ? value : undefined;\n }\n\n private get hostStyleVariables() {\n return {\n ...(this.normalizedWidth ? { '--sula-menu-width': this.normalizedWidth } : {}),\n };\n }\n\n componentWillLoad() {\n this.syncWithItems(this.items);\n }\n\n @Watch('items')\n syncWithItems(items: SulaWorkbenchMenuItem[]) {\n const nextSelected = this.findSelectedIds(items);\n if (nextSelected) {\n this.selectedPath = nextSelected;\n } else if (!this.selectedPath.length || !this.isStillSelectable(items, this.selectedPath)) {\n this.selectedPath = [];\n }\n this.stack = this.rebuildStack(items, this.stack);\n if (this.drillPath) this.applyDrillPath(this.drillPath);\n }\n\n @Watch('drillPath')\n syncDrillPath(path?: string[]) {\n if (path) this.applyDrillPath(path);\n }\n\n private applyDrillPath(path: string[]) {\n const next: SulaWorkbenchMenuItem[] = [];\n let level = this.items;\n for (const id of path) {\n const match = this.getVisibleItems(level).find(item => item.id === id);\n if (!match) break;\n next.push(match);\n level = match.children ?? [];\n }\n\n const same = next.length === this.stack.length && next.every((item, index) => item.id === this.stack[index].id);\n if (same) return;\n\n this.direction = next.length < this.stack.length ? 'back' : 'forward';\n this.stack = next;\n }\n\n componentDidRender() {\n this.positionProfile();\n }\n\n @Listen('click', { target: 'document' })\n onDocumentClick(event: MouseEvent) {\n const path = event.composedPath();\n if (this.profileOpen && !path.includes(this.profileEl) && !path.includes(this.userInfoEl)) this.closeProfile();\n if (!this.crumbMenu.open) return;\n if (path.includes(this.crumbEllipsisEl) || path.includes(this.crumbDropdownEl)) return;\n this.closeCrumbMenu();\n }\n\n @Listen('keydown', { target: 'document' })\n onDocumentKeydown(event: KeyboardEvent) {\n if (event.key !== 'Escape') return;\n this.closeCrumbMenu();\n if (this.profileOpen) {\n this.closeProfile();\n this.userInfoEl?.focus();\n }\n }\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.positionProfile();\n }\n\n private getVisibleItems(items?: SulaWorkbenchMenuItem[]) {\n return items?.filter(item => !item.hidden) ?? [];\n }\n\n private hasVisibleChildren(item: Pick<SulaWorkbenchMenuItem, 'children'>) {\n return this.getVisibleItems(item.children).length > 0;\n }\n\n private isDrilled() {\n return this.stack.length >= this.drilldownLevel;\n }\n\n private findSelectedIds(items: SulaWorkbenchMenuItem[], trail: string[] = []): string[] | undefined {\n for (const item of this.getVisibleItems(items)) {\n if (!this.hasVisibleChildren(item)) {\n if (item.selected) return [...trail, item.id];\n continue;\n }\n const nested = this.findSelectedIds(item.children, [...trail, item.id]);\n if (nested) return nested;\n }\n return undefined;\n }\n\n private isStillSelectable(items: SulaWorkbenchMenuItem[], path: string[]) {\n const found = this.findPath(items, path[path.length - 1]);\n return !!found && !this.hasVisibleChildren(found[found.length - 1]);\n }\n\n private toggleExpanded(items: SulaWorkbenchMenuItem[], id: string): SulaWorkbenchMenuItem[] {\n return items.map(item => {\n if (item.id === id) return { ...item, expanded: !item.expanded };\n if (!item.children) return item;\n return { ...item, children: this.toggleExpanded(item.children, id) };\n });\n }\n\n private findPath(items: SulaWorkbenchMenuItem[], id: string, trail: SulaWorkbenchMenuItem[] = []): SulaWorkbenchMenuItem[] | undefined {\n for (const item of this.getVisibleItems(items)) {\n const next = [...trail, item];\n if (item.id === id) return next;\n const nested = this.findPath(item.children ?? [], id, next);\n if (nested) return nested;\n }\n return undefined;\n }\n\n private rebuildStack(items: SulaWorkbenchMenuItem[], previous: SulaWorkbenchMenuItem[]) {\n const next: SulaWorkbenchMenuItem[] = [];\n let level = items;\n\n for (const ancestor of previous) {\n const match = this.getVisibleItems(level).find(item => item.id === ancestor.id);\n if (!match) break;\n next.push(match);\n level = match.children ?? [];\n }\n\n return next;\n }\n\n private isActive(item: SulaWorkbenchMenuItem, branch: boolean) {\n if (branch) return this.selectedPath.includes(item.id);\n return this.selectedPath.length > 0 && this.selectedPath[this.selectedPath.length - 1] === item.id;\n }\n\n private isFaded(item: SulaWorkbenchMenuItem, active: boolean) {\n return !!item.disabled && !active;\n }\n\n private emitLevel() {\n this.levelChanged.emit(this.stack.map(item => item.id));\n }\n\n private toggleInline(id: string) {\n this.items = this.toggleExpanded(this.items, id);\n }\n\n private enterDrill(item: SulaWorkbenchMenuItem) {\n const path = this.findPath(this.items, item.id) ?? [item];\n this.direction = 'forward';\n this.stack = path;\n this.closeCrumbMenu();\n this.emitLevel();\n }\n\n private markSelected(items: SulaWorkbenchMenuItem[], id: string): SulaWorkbenchMenuItem[] {\n return items.map(item => ({\n ...item,\n selected: item.id === id,\n ...(item.children ? { children: this.markSelected(item.children, id) } : {}),\n }));\n }\n\n // Selection lives on the items (like `expanded`), so re-assigning items when a branch is\n // toggled keeps the user's choice instead of falling back to the initially selected item.\n private selectItem(item: SulaWorkbenchMenuItem) {\n const path = this.findPath(this.items, item.id) ?? [item];\n this.items = this.markSelected(this.items, item.id);\n this.selectedPath = path.map(p => p.id);\n this.itemSelected.emit(item);\n }\n\n private handleRowClick(item: SulaWorkbenchMenuItem, depth: number) {\n if (item.disabled) return;\n\n this.itemClicked.emit(item);\n\n if (this.hasVisibleChildren(item)) {\n if (depth < this.drilldownLevel) {\n this.toggleInline(item.id);\n } else {\n this.enterDrill(item);\n }\n return;\n }\n\n this.selectItem(item);\n }\n\n private goToDepth(index: number) {\n this.direction = 'back';\n this.stack = index < 0 ? [] : this.stack.slice(0, index + 1);\n this.closeCrumbMenu();\n this.emitLevel();\n }\n\n private toggleCrumbMenu(event: MouseEvent) {\n if (this.crumbMenu.open) {\n this.closeCrumbMenu();\n return;\n }\n const button = event.currentTarget as HTMLElement;\n this.crumbMenu = {\n open: true,\n left: button.offsetLeft,\n top: button.offsetTop + button.offsetHeight + 6,\n };\n }\n\n private closeCrumbMenu() {\n if (this.crumbMenu.open) this.crumbMenu = { ...this.crumbMenu, open: false };\n }\n\n private toggleMenu() {\n this.closeProfile();\n if (this.collapsed) {\n this.collapsed = false;\n this.previewExpanded = false;\n this.menuToggled.emit(true);\n return;\n }\n\n this.collapsed = true;\n this.menuToggled.emit(false);\n this.previewExpanded = false;\n }\n\n private handleMenuMouseEnter() {\n this.hovering = true;\n if (this.collapsed) this.previewExpanded = true;\n }\n\n // While the popover is open the preview stays expanded, so the popover keeps its anchor.\n private handleMenuMouseLeave() {\n this.hovering = false;\n if (this.collapsed && !this.profileOpen) this.previewExpanded = false;\n }\n\n private toggleProfile() {\n if (this.profileOpen) {\n this.closeProfile();\n return;\n }\n if (this.profileClicked.emit(this.user).defaultPrevented) return;\n this.profileOpen = true;\n requestAnimationFrame(() => this.profileEl?.focus());\n }\n\n private closeProfile() {\n if (!this.profileOpen) return;\n this.profileOpen = false;\n if (this.collapsed && !this.hovering) this.previewExpanded = false;\n }\n\n // Fixed position, so ancestors with overflow hidden do not clip the popover.\n private positionProfile() {\n if (!this.profileOpen || !this.profileEl || !this.userInfoEl || !this.shellEl) return;\n const gap = 8;\n const inset = 12;\n const anchor = this.userInfoEl.getBoundingClientRect();\n const shell = this.shellEl.getBoundingClientRect();\n const style = this.profileEl.style;\n\n if (!this.collapsed || this.previewExpanded) {\n style.left = `${shell.left + inset}px`;\n style.width = `${shell.width - inset * 2}px`;\n style.bottom = `${window.innerHeight - anchor.top + gap}px`;\n return;\n }\n\n style.left = `${shell.right + gap}px`;\n style.width = '';\n style.bottom = `${window.innerHeight - anchor.bottom}px`;\n }\n\n // Inner events are composed; stopping them avoids clashing with this menu's own itemClicked.\n private handleProfileItemClicked(event: CustomEvent<SulaProfileMenuItem>) {\n event.stopPropagation();\n this.closeProfile();\n this.profileItemClicked.emit(event.detail);\n }\n\n private handleProfileSwitchChanged(event: CustomEvent<SulaProfileMenuSwitchChange>) {\n event.stopPropagation();\n const { item } = event.detail;\n this.profileItems = this.profileItems.map(current => (current.id === item.id ? item : current));\n this.profileSwitchChanged.emit(event.detail);\n }\n\n private renderProfilePopover(expandedView: boolean) {\n return (\n <div\n part=\"profile-popover\"\n role=\"dialog\"\n aria-label={`Perfil de ${this.user.name}`}\n aria-hidden={String(!this.profileOpen)}\n tabIndex={-1}\n ref={el => (this.profileEl = el)}\n class={{\n 'profile-popover': true,\n 'profile-popover--open': this.profileOpen,\n 'profile-popover--side': !expandedView,\n }}\n >\n <sula-profile-menu\n user={this.user}\n items={this.profileItems}\n onItemClicked={event => this.handleProfileItemClicked(event)}\n onSwitchChanged={event => this.handleProfileSwitchChanged(event)}\n >\n <slot name=\"profile-content\"></slot>\n </sula-profile-menu>\n </div>\n );\n }\n\n private isValidIcon(icon?: string) {\n return !!icon && /ph-[a-z]/.test(icon);\n }\n\n private isSvg(image: string) {\n return /^data:image\\/svg\\+xml/i.test(image) || /\\.svg(\\?|#|$)/i.test(image);\n }\n\n private iconOf(item: SulaWorkbenchMenuItem) {\n return this.isValidIcon(item.icon) ? item.icon : this.defaultIcon;\n }\n\n private hasIcon(item: SulaWorkbenchMenuItem) {\n return !!item.image || this.isValidIcon(this.iconOf(item));\n }\n\n private renderItemIcon(item: SulaWorkbenchMenuItem, customClass: string, size: 'sm' | 'md' | 'lg', faded = false) {\n if (!this.hasIcon(item)) return null;\n if (item.image && this.isSvg(item.image)) {\n // SVGs are painted with currentColor through a mask, so they follow the same state colors as the icon font.\n return (\n <span\n class={`menu-item-image menu-item-image--mask menu-item-image--${size} ${customClass}`}\n style={{ '--menu-item-image': `url(\"${item.image.replace(/\"/g, '%22')}\")` }}\n aria-hidden=\"true\"\n ></span>\n );\n }\n if (item.image) {\n return (\n <img\n class={{ 'menu-item-image': true, [`menu-item-image--${size}`]: true, 'is-faded': faded }}\n src={item.image}\n alt=\"\"\n />\n );\n }\n return <sula-icon icon={this.iconOf(item)} customClass={customClass}></sula-icon>;\n }\n\n private getInitials(name: string) {\n return name\n .split(' ')\n .filter(Boolean)\n .slice(0, 2)\n .map(part => part[0].toUpperCase())\n .join('');\n }\n\n private renderUserInfo(expandedView: boolean) {\n const user = this.user;\n return (\n <button\n type=\"button\"\n class={{\n 'user-info flex min-w-0 cursor-pointer items-center rounded-xs p-8 text-left hover:bg-states-empty-bg-hover': true,\n 'user-info--active bg-states-empty-bg-hover': this.profileOpen,\n 'w-full': expandedView,\n }}\n title={`Ver perfil de ${user.name}`}\n aria-label={`Ver perfil de ${user.name}`}\n aria-haspopup=\"dialog\"\n aria-expanded={String(this.profileOpen)}\n ref={el => (this.userInfoEl = el)}\n onClick={() => this.toggleProfile()}\n >\n <span class=\"user-avatar flex h-9 w-9 flex-none items-center justify-center overflow-hidden rounded-full bg-brand-primary text-sm font-semibold text-negative-negative-1\">\n {user.photo ? <img src={user.photo} alt={user.name} /> : this.getInitials(user.name)}\n </span>\n <span\n aria-hidden={!expandedView}\n class={{\n 'user-copy': true,\n 'ml-8': true,\n 'user-copy--visible': expandedView,\n 'user-copy--hidden': !expandedView,\n }}\n >\n <span part=\"user-name\" class=\"user-name truncate text-sm font-semibold text-text-primary\">\n {user.name}\n </span>\n {user.email && <span part=\"user-email\" class=\"user-email truncate text-xs text-text-secondary\">{user.email}</span>}\n </span>\n </button>\n );\n }\n\n private getIconClass(active: boolean, faded: boolean, size: string) {\n if (faded) return `text-icon-disabled ${size}`;\n if (active) return `text-brand-primary ${size}`;\n return `text-icon-primary ${size}`;\n }\n\n private renderCollapseButton() {\n const label = this.collapsed ? 'Expandir menu' : 'Recolher menu';\n return (\n <button\n type=\"button\"\n class=\"menu-toggle flex flex-none items-center justify-center\"\n title={label}\n aria-label={label}\n aria-expanded={String(!this.collapsed)}\n onClick={() => this.toggleMenu()}\n >\n <sula-icon icon={`ph-bold ph-caret-${this.collapsed ? 'right' : 'left'}`} customClass=\"text-lg\"></sula-icon>\n </button>\n );\n }\n\n private renderRootHeader(expandedView: boolean) {\n return (\n <div\n class={{\n 'menu-header flex items-center': true,\n 'mb-40': expandedView,\n 'mb-24 flex-col justify-center px-0': !expandedView,\n }}\n >\n {this.image && (\n <div class={{ 'menu-brand-image max-h-10 max-w-10 overflow-hidden': true, 'mr-6': expandedView }}>\n <img src={this.image} alt={this.menuTitle} />\n </div>\n )}\n <div\n aria-hidden={!expandedView}\n title={expandedView ? this.menuTitle : undefined}\n class={{\n 'menu-title menu-copy': true,\n 'menu-copy--visible': expandedView,\n 'menu-copy--hidden': !expandedView,\n }}\n >\n <h1 part=\"title\" class=\"truncate text-2xl font-bold leading-7 text-text-secondary\">\n {this.menuTitle}\n </h1>\n </div>\n {this.renderCollapseButton()}\n </div>\n );\n }\n\n private renderTrail(ancestors: SulaWorkbenchMenuItem[]) {\n const hasHidden = ancestors.length > 2;\n const visible = hasHidden ? ancestors.slice(-2) : ancestors;\n const crumbs: JSX.Element[] = [];\n\n if (hasHidden) {\n crumbs.push(\n <button\n key=\"ellipsis\"\n type=\"button\"\n class=\"crumb-btn crumb-btn--ellipsis\"\n aria-haspopup=\"true\"\n aria-expanded={String(this.crumbMenu.open)}\n title={`${ancestors.length - 2} nível(is) anterior(es)`}\n ref={el => (this.crumbEllipsisEl = el)}\n onClick={event => this.toggleCrumbMenu(event)}\n >\n <sula-icon icon=\"ph-bold ph-dots-three\" customClass=\"text-base text-text-secondary\"></sula-icon>\n </button>,\n );\n }\n\n visible.forEach(ancestor => {\n crumbs.push(\n <button\n key={ancestor.id}\n type=\"button\"\n class=\"crumb-btn\"\n title={ancestor.label}\n onClick={() => this.goToDepth(this.stack.indexOf(ancestor))}\n >\n {ancestor.label}\n </button>,\n );\n });\n\n const nodes: JSX.Element[] = [];\n crumbs.forEach((crumb, index) => {\n if (index > 0) nodes.push(<sula-icon key={`sep-${index}`} icon=\"ph ph-caret-right\" customClass=\"crumb-sep text-xs\"></sula-icon>);\n nodes.push(crumb);\n });\n\n return (\n <nav class=\"crumb-trail flex min-w-0 items-center\" aria-label=\"Caminho de navegação\">\n {nodes}\n </nav>\n );\n }\n\n private renderCrumbDropdown(ancestors: SulaWorkbenchMenuItem[]) {\n if (!this.crumbMenu.open || ancestors.length <= 2) return null;\n const hidden = ancestors.slice(0, -2);\n\n return (\n <div\n class=\"crumb-dropdown\"\n role=\"menu\"\n ref={el => (this.crumbDropdownEl = el)}\n style={{ left: `${this.crumbMenu.left}px`, top: `${this.crumbMenu.top}px` }}\n >\n {hidden.map(ancestor => (\n <button\n key={ancestor.id}\n type=\"button\"\n role=\"menuitem\"\n class=\"crumb-dropdown-item\"\n onClick={() => this.goToDepth(this.stack.indexOf(ancestor))}\n >\n <span class=\"item-icon flex flex-none items-center justify-center\">{this.renderItemIcon(ancestor, 'text-sm text-icon-primary', 'sm')}</span>\n <span class=\"truncate\">{ancestor.label}</span>\n </button>\n ))}\n </div>\n );\n }\n\n private renderDrillHeader(activeParent: SulaWorkbenchMenuItem) {\n const ancestors = this.stack.slice(0, -1);\n const backLabel = ancestors.length ? ancestors[ancestors.length - 1].label : this.menuTitle || 'Início';\n const backButton = (\n <button\n type=\"button\"\n class=\"back-btn\"\n title={`Voltar para ${backLabel}`}\n aria-label={`Voltar para ${backLabel}`}\n onClick={() => this.goToDepth(this.stack.length - 2)}\n >\n <sula-icon icon=\"ph ph-arrow-left\" customClass=\"text-lg text-icon-primary\"></sula-icon>\n </button>\n );\n\n return (\n <div class=\"menu-header menu-header--drilldown mb-16 flex flex-col border-b border-line-general pb-24\">\n <div class=\"identity-row flex items-center\">\n <button type=\"button\" class=\"identity-strip\" title={`Ir para o início de ${this.menuTitle}`} onClick={() => this.goToDepth(-1)}>\n {this.image && (\n <span class=\"identity-image\">\n <img src={this.image} alt=\"\" />\n </span>\n )}\n <span class=\"identity-label truncate\">{this.menuTitle}</span>\n </button>\n {this.renderCollapseButton()}\n </div>\n\n {ancestors.length > 0 && (\n <div class=\"breadcrumb-row\">\n {backButton}\n {this.renderTrail(ancestors)}\n {this.renderCrumbDropdown(ancestors)}\n </div>\n )}\n\n <div class={{ 'context-row flex items-center min-w-0': true, 'mt-8': ancestors.length > 0 }}>\n {ancestors.length === 0 && backButton}\n {this.hasIcon(activeParent) && (\n <span class=\"context-icon flex flex-none items-center justify-center\">\n {this.renderItemIcon(activeParent, 'text-xl text-brand-primary', 'md')}\n </span>\n )}\n <h1 part=\"title\" class=\"context-title truncate text-xl font-semibold leading-tight text-text-primary\">\n {activeParent.label}\n </h1>\n </div>\n </div>\n );\n }\n\n private renderDrillRow(item: SulaWorkbenchMenuItem, reserve: boolean) {\n const branch = this.hasVisibleChildren(item);\n const active = this.isActive(item, branch);\n const faded = this.isFaded(item, active);\n\n return (\n <li class=\"list-none\" key={item.id}>\n <div\n class={{\n 'menu-item flex items-center justify-between rounded-xs px-8': true,\n 'cursor-pointer hover:bg-states-empty-bg-hover': !item.disabled && !active,\n 'cursor-pointer': !item.disabled && active,\n 'cursor-not-allowed': !!item.disabled,\n }}\n aria-disabled={!!item.disabled}\n onClick={() => this.handleRowClick(item, this.stack.length + 1)}\n >\n <span class=\"flex min-w-0 flex-1 items-center gap-8\">\n {this.renderIconSlot(item, this.getIconClass(active, faded, 'text-base'), faded, reserve)}\n <span\n part=\"item-label\"\n class={{\n 'menu-item-label truncate': this.labelOverflow !== SulaMenuLabelOverflow.Wrap,\n 'menu-item-label menu-item-label--wrap': this.labelOverflow === SulaMenuLabelOverflow.Wrap,\n 'font-bold text-text-primary': active,\n 'text-text-disabled': faded,\n 'text-text-secondary': !active && !faded,\n }}\n >\n {item.label}\n </span>\n </span>\n {branch && <sula-icon icon=\"ph ph-caret-right\" customClass={faded ? 'text-text-disabled text-xs' : 'text-text-secondary text-xs'}></sula-icon>}\n </div>\n </li>\n );\n }\n\n private renderDrillPanel() {\n const activeParent = this.stack[this.stack.length - 1];\n const panelKey = this.stack.map(item => item.id).join('/');\n\n return (\n <ul\n key={panelKey}\n class={{\n 'menu-panel flex flex-col': true,\n 'menu-panel--forward': this.direction === 'forward',\n 'menu-panel--back': this.direction === 'back',\n }}\n >\n {this.getVisibleItems(activeParent.children).map(item => this.renderDrillRow(item, this.siblingsHaveIcon(activeParent.children)))}\n </ul>\n );\n }\n\n private getMainIconClass(active: boolean, faded: boolean) {\n if (faded) return 'text-icon-disabled text-base';\n if (active) return 'text-brand-primary text-base';\n return 'text-icon-primary text-base';\n }\n\n private getMainCaretClass(active: boolean, faded: boolean) {\n if (faded) return 'text-text-disabled text-xs';\n if (active) return 'text-text-primary text-xs';\n return 'text-text-secondary text-xs';\n }\n\n private getSubIconClass(faded: boolean, selected = false) {\n if (faded) return 'text-icon-disabled text-base';\n if (selected) return 'text-brand-primary text-base';\n return 'text-icon-primary text-base';\n }\n\n private getSubCaretClass(faded: boolean) {\n return faded ? 'text-icon-disabled text-xs' : 'text-icon-primary text-xs';\n }\n\n private siblingsHaveIcon(items: SulaWorkbenchMenuItem[]) {\n return this.getVisibleItems(items).some(sibling => this.hasIcon(sibling));\n }\n\n private renderIconSlot(item: SulaWorkbenchMenuItem, customClass: string, faded: boolean, reserve = true) {\n if (!reserve && !this.hasIcon(item)) return null;\n return <span class=\"item-icon flex flex-none items-center justify-center\">{this.renderItemIcon(item, customClass, 'lg', faded)}</span>;\n }\n\n private renderMainRow(item: SulaWorkbenchMenuItem, expandedView: boolean, branch: boolean, expanded: boolean, active: boolean, faded: boolean, reserve: boolean) {\n const labelOverflowTruncate = this.labelOverflow === SulaMenuLabelOverflow.Truncate;\n return (\n <div\n class={{\n 'menu-item flex items-center rounded-xs px-8': true,\n 'cursor-pointer hover:bg-states-empty-bg-hover': !item.disabled,\n 'cursor-not-allowed': !!item.disabled,\n 'justify-between': expandedView,\n 'justify-center': !expandedView,\n }}\n title={!expandedView ? item.label : undefined}\n aria-disabled={!!item.disabled}\n onClick={() => this.handleRowClick(item, 1)}\n >\n <div class={{ 'flex items-center': true, 'flex-1 min-w-0 gap-8': expandedView, 'justify-center': !expandedView }}>\n {this.renderIconSlot(item, this.getMainIconClass(active, faded), faded, reserve)}\n <span\n part=\"main-item-label\"\n title={expandedView ? item.label : undefined}\n aria-hidden={!expandedView}\n class={{\n 'menu-item-label menu-copy': true,\n 'menu-item-label--truncate': labelOverflowTruncate,\n 'menu-item-label--wrap': !labelOverflowTruncate,\n 'menu-copy--visible': expandedView,\n 'menu-copy--hidden': !expandedView,\n 'font-bold text-text-primary': active,\n 'text-text-disabled': faded,\n 'text-text-secondary': !active && !faded,\n }}\n >\n {item.label}\n </span>\n </div>\n {branch && (\n <sula-icon\n aria-hidden={!expandedView}\n class={{\n 'menu-item-caret flex items-center justify-center': true,\n 'menu-item-caret--expanded': expanded,\n 'menu-item-caret--visible': expandedView,\n 'menu-item-caret--hidden': !expandedView,\n }}\n icon=\"ph ph-caret-down\"\n customClass={this.getMainCaretClass(active, faded)}\n ></sula-icon>\n )}\n </div>\n );\n }\n\n private renderSubRow(item: SulaWorkbenchMenuItem, expandedView: boolean, branch: boolean, expanded: boolean, active: boolean, faded: boolean, drill: boolean, reserve: boolean) {\n const caretIcon = drill ? 'ph-bold ph-caret-right' : `ph-bold ph-caret-${expanded && expandedView ? 'up' : 'down'}`;\n const onClick = () => this.handleRowClick(item, this.depthOf(item));\n const rowClass = {\n 'submenu-item flex min-w-0 items-center rounded-xs py-8 pr-8 select-none': true,\n 'submenu-item--branch w-full': branch,\n 'cursor-pointer hover:bg-states-empty-bg-hover': !item.disabled,\n 'cursor-not-allowed': !!item.disabled,\n 'font-bold': active && branch,\n };\n const label = (\n <span\n class={{\n 'submenu-item-label min-w-0 flex-1': true,\n 'ml-8': reserve || this.hasIcon(item),\n 'menu-item-label--truncate': this.labelOverflow === SulaMenuLabelOverflow.Truncate,\n 'menu-item-label--wrap': this.labelOverflow !== SulaMenuLabelOverflow.Truncate,\n 'text-text-primary': !faded,\n 'text-text-disabled': faded,\n 'font-bold': active,\n }}\n >\n {item.label}\n </span>\n );\n\n if (!branch) {\n return (\n <a class={rowClass} style={{ paddingLeft: '8px' }} title={item.label} aria-disabled={!!item.disabled} onClick={onClick}>\n {this.renderIconSlot(item, this.getSubIconClass(faded, active && !branch), faded, reserve)}\n {label}\n </a>\n );\n }\n\n return (\n <a class={rowClass} style={{ paddingLeft: '8px' }} title={item.label} aria-disabled={!!item.disabled} onClick={onClick}>\n <div class=\"submenu-item-branch-content flex min-w-0 flex-1 items-center\">\n {this.renderIconSlot(item, this.getSubIconClass(faded, active && !branch), faded, reserve)}\n {label}\n </div>\n <div class=\"submenu-item-branch-caret flex flex-none items-center justify-end pl-8\">\n <sula-icon icon={caretIcon} customClass={this.getSubCaretClass(faded)}></sula-icon>\n </div>\n </a>\n );\n }\n\n private depthOf(item: SulaWorkbenchMenuItem) {\n const path = this.findPath(this.items, item.id);\n return path ? path.length : 1;\n }\n\n private renderInlineList(items: SulaWorkbenchMenuItem[], depth: number, expandedView: boolean) {\n const reserve = this.siblingsHaveIcon(items);\n return this.getVisibleItems(items).map(item => {\n const branch = this.hasVisibleChildren(item);\n const drill = branch && depth >= this.drilldownLevel;\n const inline = branch && !drill;\n const expanded = inline && !!item.expanded;\n const active = this.isActive(item, branch) || expanded;\n const faded = this.isFaded(item, active);\n\n const row =\n depth === 1\n ? this.renderMainRow(item, expandedView, branch, expanded, active, faded, reserve)\n : this.renderSubRow(item, expandedView, branch, expanded, active, faded, drill, reserve);\n\n return (\n <li class={{ 'decoration-none list-none': true, 'menu-group': depth === 1, 'is-selected': depth > 1 && active && !branch }} key={item.id}>\n {row}\n {inline && (\n <ul\n aria-hidden={!expandedView || !expanded}\n class={{\n submenu: true,\n 'submenu--expanded': expandedView && expanded,\n 'ml-[8px] border-l border-line-general pl-8': depth === 1,\n 'submenu-branch ml-[24px] border-l border-line-general pl-8': depth > 1,\n }}\n >\n {this.renderInlineList(item.children, depth + 1, expandedView)}\n </ul>\n )}\n </li>\n );\n });\n }\n\n render() {\n const expandedView = !this.collapsed || this.previewExpanded;\n const drilled = expandedView && this.isDrilled();\n const activeParent = this.stack[this.stack.length - 1];\n\n return (\n <Host\n class={{\n 'menu-host--collapsed': this.collapsed,\n 'menu-host--preview': this.collapsed && this.previewExpanded,\n 'menu-host--density-compact': this.density === SulaMenuDensity.Compact,\n 'menu-host--density-comfortable': this.density === SulaMenuDensity.Comfortable,\n }}\n style={this.hostStyleVariables}\n onMouseEnter={() => this.handleMenuMouseEnter()}\n onMouseLeave={() => this.handleMenuMouseLeave()}\n >\n <aside\n part=\"shell\"\n ref={el => (this.shellEl = el)}\n class={{\n 'menu-shell flex h-full flex-col bg-surface-body shadow-md z-50': true,\n 'menu-shell--collapsed': this.collapsed && !this.previewExpanded,\n 'menu-shell--expanded': expandedView,\n 'menu-shell--preview': this.collapsed && this.previewExpanded,\n }}\n >\n {drilled ? this.renderDrillHeader(activeParent) : this.renderRootHeader(expandedView)}\n\n <nav\n class={{\n 'menu-nav flex h-full flex-col overflow-y-auto overflow-x-hidden': true,\n 'px-12': !expandedView,\n }}\n >\n {drilled ? (\n this.renderDrillPanel()\n ) : (\n <ul class=\"flex flex-col\">{this.renderInlineList(this.items, 1, expandedView)}</ul>\n )}\n </nav>\n\n {this.user && (\n <div class=\"menu-footer border-t border-line-general pt-12\">\n {this.renderUserInfo(expandedView)}\n </div>\n )}\n </aside>\n\n {this.user && this.renderProfilePopover(expandedView)}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -213,6 +213,10 @@ export default {
|
|
|
213
213
|
control: { type: 'number', min: 1 },
|
|
214
214
|
description: 'Nível (1-based) a partir do qual itens com filhos abrem drill-down em vez de expandir em linha.',
|
|
215
215
|
},
|
|
216
|
+
drillPath: {
|
|
217
|
+
control: 'object',
|
|
218
|
+
description: 'Controla o drill-down pelo host: ids da raiz até o item cujos filhos aparecem. Array vazio volta à árvore; undefined deixa só os cliques navegarem.',
|
|
219
|
+
},
|
|
216
220
|
items: { control: 'object', description: 'Árvore de itens, recursiva.' },
|
|
217
221
|
itemSelected: { action: 'itemSelected', description: 'Emitido ao selecionar um item folha.' },
|
|
218
222
|
itemClicked: { action: 'itemClicked', description: 'Emitido a cada clique em um item.' },
|
|
@@ -240,6 +244,7 @@ const Template = (args) => {
|
|
|
240
244
|
el.density = args.density;
|
|
241
245
|
el.labelOverflow = args.labelOverflow;
|
|
242
246
|
el.drilldownLevel = args.drilldownLevel;
|
|
247
|
+
el.drillPath = args.drillPath;
|
|
243
248
|
el.items = cloneItems(args.items);
|
|
244
249
|
el.user = args.user;
|
|
245
250
|
el.profileItems = ((_a = args.profileItems) !== null && _a !== void 0 ? _a : hubProfileItems).map(item => (Object.assign({}, item)));
|
|
@@ -337,6 +342,41 @@ CustomProfileItems.parameters = {
|
|
|
337
342
|
},
|
|
338
343
|
},
|
|
339
344
|
};
|
|
345
|
+
export const ControlledDrillPath = (args) => {
|
|
346
|
+
const container = Template(args);
|
|
347
|
+
const menu = container.querySelector('sula-workbench-menu');
|
|
348
|
+
const paths = {
|
|
349
|
+
Tree: [],
|
|
350
|
+
'Cobertura': ['claims', 'claims-auto', 'claims-auto-coverage'],
|
|
351
|
+
'Terceiros': ['claims', 'claims-auto', 'claims-auto-coverage', 'claims-auto-third'],
|
|
352
|
+
};
|
|
353
|
+
const toolbar = document.createElement('div');
|
|
354
|
+
toolbar.style.cssText = 'display:flex;gap:8px;margin:20px 20px 0';
|
|
355
|
+
Object.entries(paths).forEach(([label, path]) => {
|
|
356
|
+
const button = document.createElement('sula-button');
|
|
357
|
+
button.text = label;
|
|
358
|
+
button.addEventListener('click', () => (menu.drillPath = path));
|
|
359
|
+
toolbar.appendChild(button);
|
|
360
|
+
});
|
|
361
|
+
const wrapper = document.createElement('div');
|
|
362
|
+
wrapper.append(toolbar, container);
|
|
363
|
+
return wrapper;
|
|
364
|
+
};
|
|
365
|
+
ControlledDrillPath.args = {
|
|
366
|
+
menuTitle: 'Sula Hub',
|
|
367
|
+
density: SulaMenuDensity.Default,
|
|
368
|
+
labelOverflow: SulaMenuLabelOverflow.Wrap,
|
|
369
|
+
drilldownLevel: 3,
|
|
370
|
+
items: workbenchItems,
|
|
371
|
+
user: sampleUser,
|
|
372
|
+
};
|
|
373
|
+
ControlledDrillPath.parameters = {
|
|
374
|
+
docs: {
|
|
375
|
+
description: {
|
|
376
|
+
story: 'O host controla o drill-down pela propriedade drillPath: os botões acima entram em Cobertura, em Terceiros ou voltam para a árvore. Ids desconhecidos interrompem o caminho no último nível válido.',
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
};
|
|
340
380
|
export const InlineOnly = Template.bind({});
|
|
341
381
|
InlineOnly.args = {
|
|
342
382
|
menuTitle: 'Sula Hub',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sula-workbench-menu.stories.js","sourceRoot":"","sources":["../../../src/components/sula-workbench-menu/sula-workbench-menu.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAsB5F,MAAM,UAAU,GAAG,2BAA2B,kBAAkB,CAAC;;;;;CAKhE,CAAC,EAAE,CAAC;AAEL,MAAM,OAAO,GAAG,2BAA2B,kBAAkB,CAAC;;;;;CAK7D,CAAC,EAAE,CAAC;AAEL,MAAM,cAAc,GAA4B;IAC/C,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,E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CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,EAAE,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;AACtF,6BAA6B,CAAC,UAAU,GAAG;IAC1C,IAAI,EAAE;QACL,WAAW,EAAE;YACZ,KAAK,EACJ,wRAAwR;SACzR;KACD;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,EAAE,CAAC,gBAAgB,CAAC,eAAe,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AACpI,8BAA8B,CAAC,UAAU,GAAG;IAC3C,IAAI,EAAE;QACL,WAAW,EAAE;YACZ,KAAK,EACJ,oTAAoT;SACrT;KACD;CACD,CAAC","sourcesContent":["import { SulaMenuDensity, SulaMenuLabelOverflow } from '../sula-menu/model/sula-menu.model';\nimport { SulaMenuMainItem } from '../sula-menu/model/sula-menu.model';\nimport { SulaProfileMenuItem, SulaProfileMenuSwitchChange } from '../sula-profile-menu/model/sula-profile-menu.model';\nimport { SulaWorkbenchMenuItem, SulaWorkbenchMenuUser } from './model/sula-workbench-menu.model';\n\ntype StoryArgs = {\n\tmenuTitle: string;\n\tdensity: SulaMenuDensity;\n\tlabelOverflow: SulaMenuLabelOverflow;\n\tdrilldownLevel: number;\n\titems: SulaWorkbenchMenuItem[];\n\tuser: SulaWorkbenchMenuUser;\n\tprofileItems?: SulaProfileMenuItem[];\n\tprofileClicked: EventListener;\n\tprofileItemClicked: EventListener;\n\tprofileSwitchChanged: EventListener;\n\titemSelected: EventListener;\n\titemClicked: EventListener;\n\tlevelChanged: EventListener;\n\tmenuToggled: EventListener;\n};\n\nconst SHIELD_SVG = `data:image/svg+xml;utf8,${encodeURIComponent(`\n\t<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#6c6e6e\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t<path d=\"M12 3l7 3v5c0 4.5-3 8.2-7 10-4-1.8-7-5.5-7-10V6l7-3z\"/>\n\t\t<path d=\"M9 12l2 2 4-4\"/>\n\t</svg>\n`)}`;\n\nconst CAR_SVG = `data:image/svg+xml;utf8,${encodeURIComponent(`\n\t<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#6c6e6e\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t<path d=\"M4 16v-3.2L6 8h12l2 4.8V16\"/>\n\t\t<path d=\"M4 16h16v2.4a.8.8 0 0 1-.8.8h-1.4a.8.8 0 0 1-.8-.8V17H7v1.4a.8.8 0 0 1-.8.8H4.8a.8.8 0 0 1-.8-.8Z\"/>\n\t</svg>\n`)}`;\n\nconst workbenchItems: SulaWorkbenchMenuItem[] = [\n\t{ id: 'overview', label: 'Visão Geral', icon: 'ph ph-house-line' },\n\t{\n\t\tid: 'claims',\n\t\tlabel: 'Sinistros',\n\t\ticon: 'ph ph-warning-circle',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'claims-auto',\n\t\t\t\tlabel: 'Auto',\n\t\t\t\ticon: 'ph ph-car',\n\t\t\t\texpanded: true,\n\t\t\t\tchildren: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'claims-auto-coverage',\n\t\t\t\t\t\tlabel: 'Cobertura',\n\t\t\t\t\t\ticon: 'ph ph-shield-check',\n\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: 'claims-auto-third',\n\t\t\t\t\t\t\t\tlabel: 'Terceiros',\n\t\t\t\t\t\t\t\ticon: 'ph ph-users-three',\n\t\t\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tid: 'claims-auto-third-docs',\n\t\t\t\t\t\t\t\t\t\tlabel: 'Documentação',\n\t\t\t\t\t\t\t\t\t\ticon: 'ph ph-folder-open',\n\t\t\t\t\t\t\t\t\t\tchildren: [{ id: 'claims-auto-third-address', label: 'Comprovante de residência', icon: 'ph ph-map-pin', selected: true }],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{ id: 'claims-auto-own', label: 'Próprio', icon: 'ph ph-car-profile' },\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t\t{ id: 'claims-auto-glass', label: 'Vidros', icon: 'ph ph-wrench' },\n\t\t\t\t\t{ id: 'claims-auto-other', label: 'Outros (ícone padrão)' },\n\t\t\t\t],\n\t\t\t},\n\t\t\t{ id: 'claims-home', label: 'Residencial', icon: 'ph ph-house', children: [{ id: 'claims-home-fire', label: 'Incêndio', icon: 'ph ph-fire' }] },\n\t\t\t{ id: 'claims-vehicle', label: 'Veículos', icon: 'ph ph-car', image: CAR_SVG },\n\t\t\t{ id: 'claims-life', label: 'Vida', icon: 'ph ph-heartbeat' },\n\t\t],\n\t},\n\t{\n\t\tid: 'policies',\n\t\tlabel: 'Apólices',\n\t\ticon: 'ph ph-files',\n\t\timage: SHIELD_SVG,\n\t\tchildren: [\n\t\t\t{ id: 'policies-issued', label: 'Emitidas', icon: 'ph ph-file-text' },\n\t\t\t{ id: 'policies-review', label: 'Em análise', icon: 'ph ph-clipboard-text' },\n\t\t],\n\t},\n\t{ id: 'settings', label: 'Configurações', icon: 'ph ph-gear-six', children: [{ id: 'settings-users', label: 'Usuários', icon: 'ph ph-users-three' }] },\n];\n\nconst BRAND_IMAGE = `data:image/svg+xml;utf8,${encodeURIComponent(`\n\t<svg width=\"80\" height=\"80\" viewBox=\"0 0 80 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<rect width=\"80\" height=\"80\" rx=\"20\" fill=\"#E5231B\"/>\n\t\t<path d=\"M52 24H35.5C31.3579 24 28 27.3579 28 31.5C28 35.6421 31.3579 39 35.5 39H44.5C48.6421 39 52 42.3579 52 46.5C52 50.6421 48.6421 54 44.5 54H28\" stroke=\"white\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n\t</svg>\n`)}`;\n\n// Same items as the menu in production today, to compare both components with identical content.\nconst currentMenuItems: SulaWorkbenchMenuItem[] = [\n\t{ id: 'dashboard', label: 'Dashboard', icon: 'ph ph-house', selected: true },\n\t{ id: 'exemplo', label: 'Exemplo menu', icon: 'ph ph-archive', children: [{ id: 'exemplo-usuarios', label: 'Usuários', icon: 'ph ph-user' }] },\n\t{ id: 'contas', label: 'Contas Médicas', icon: 'ph ph-align-right', children: [{ id: 'guias', label: 'Guias', icon: 'ph ph-align-center-horizontal-simple' }] },\n\t{\n\t\tid: 'ppa',\n\t\tlabel: 'PPA (Portal Plataforma Antifraude)',\n\t\ticon: 'ph ph-air-traffic-control',\n\t\tchildren: [\n\t\t\t{ id: 'ppa-prestadores', label: 'Prestadores', icon: 'ph ph-ambulance' },\n\t\t\t{ id: 'ppa-usuarios', label: 'Usuários', icon: 'ph ph-user' },\n\t\t\t{ id: 'ppa-prestadores-local', label: 'Prestadores-LOCAL', icon: 'ph ph-' },\n\t\t\t{ id: 'ppa-usuarios-local', label: 'Usuarios-LOCAL', icon: 'ph ph-' },\n\t\t\t{ id: 'ppa-prestadores-lilian', label: 'Prestadores Lilian', icon: 'ph ph-address-book' },\n\t\t],\n\t},\n\t{\n\t\tid: 'sula-audit',\n\t\tlabel: 'Sula Audit',\n\t\ticon: 'ph ph-airplane-in-flight',\n\t\tchildren: [\n\t\t\t{ id: 'audit-home', label: 'Home', icon: 'ph ph-house' },\n\t\t\t{ id: 'audit-prestadores', label: 'Prestadores auditados', icon: 'ph ph-airplay' },\n\t\t],\n\t},\n\t{\n\t\tid: 'dev-portal',\n\t\tlabel: 'Dev Portal',\n\t\ticon: 'ph ph-code-simple',\n\t\tchildren: [\n\t\t\t{ id: 'dev-devsecops', label: 'DevSecOps', icon: 'ph ph-chart-line' },\n\t\t\t{ id: 'dev-tech-radar', label: 'Tech Radar', icon: 'ph ph-target' },\n\t\t\t{ id: 'dev-portal-eda', label: 'Portal EDA', icon: 'ph ph-' },\n\t\t],\n\t},\n\t{\n\t\tid: 'sula-os',\n\t\tlabel: 'Sula OS',\n\t\ticon: 'ph ph-browsers',\n\t\tchildren: [\n\t\t\t{ id: 'os-dashboard', label: 'Dashboard', icon: 'ph ph-gauge' },\n\t\t\t{ id: 'os-canvas', label: 'Canvas', icon: 'ph ph-frame-corners' },\n\t\t],\n\t},\n\t{\n\t\tid: 'tech-portal',\n\t\tlabel: 'Tech Portal',\n\t\ticon: 'ph ph-address-book',\n\t\tchildren: [\n\t\t\t{ id: 'tech-home', label: 'Home', icon: 'ph ph-users-four' },\n\t\t\t{ id: 'tech-busca', label: 'Busca', icon: 'ph ph-user-circle-gear' },\n\t\t\t{ id: 'tech-perfil', label: 'Meu perfil', icon: 'ph ph-user-circle' },\n\t\t\t{\n\t\t\t\tid: 'tech-cadastros',\n\t\t\t\tlabel: 'Cadastros',\n\t\t\t\ticon: 'ph ph-table',\n\t\t\t\tchildren: [\n\t\t\t\t\t{ id: 'tech-empresas', label: 'Empresas terceiras', icon: 'ph ph-' },\n\t\t\t\t\t{ id: 'tech-tribos', label: 'Tribos', icon: 'ph ph-' },\n\t\t\t\t\t{ id: 'tech-capitulos', label: 'Capítulos/Jornadas', icon: 'ph ph-' },\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tid: 'configuracoes',\n\t\tlabel: 'Configurações',\n\t\ticon: 'ph ph-gear',\n\t\tchildren: [\n\t\t\t{ id: 'conf-menus', label: 'Menus', icon: 'ph ph-layout' },\n\t\t\t{ id: 'conf-usuarios', label: 'Usuários', icon: 'ph ph-users' },\n\t\t\t{ id: 'conf-tenant', label: 'Tenant', icon: 'ph ph-building' },\n\t\t\t{ id: 'conf-chaves', label: 'Chaves de APIs', icon: 'ph ph-key' },\n\t\t\t{\n\t\t\t\tid: 'conf-permissoes',\n\t\t\t\tlabel: 'Permissões',\n\t\t\t\ticon: 'ph ph-lock',\n\t\t\t\tchildren: [\n\t\t\t\t\t{ id: 'perm-papeis', label: 'Papéis', icon: 'ph ph-' },\n\t\t\t\t\t{ id: 'perm-recursos', label: 'Recursos', icon: 'ph ph-' },\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst sampleUser: SulaWorkbenchMenuUser = { name: 'Ana Ribeiro', email: 'ana.ribeiro@sula.com.br' };\n\nconst hubProfileItems: SulaProfileMenuItem[] = [\n\t{ id: 'account', label: 'Minha conta', icon: 'ph ph-user-circle' },\n\t{ id: 'dark-mode', label: 'Modo escuro', icon: 'ph ph-moon', hasSwitch: true, active: false },\n\t{ id: 'divider-logout', divider: true },\n\t{ id: 'logout', label: 'Sair', icon: 'ph ph-sign-out' },\n];\n\nconst cloneItems = (items: SulaWorkbenchMenuItem[]): SulaWorkbenchMenuItem[] =>\n\titems.map(item => ({ ...item, children: item.children ? cloneItems(item.children) : undefined }));\n\nconst createStoryShell = () => {\n\tconst container = document.createElement('div');\n\tcontainer.style.margin = '20px';\n\tcontainer.style.padding = '24px';\n\tcontainer.style.background = 'linear-gradient(180deg, #f8f9f9 0%, #eef2f2 100%)';\n\tcontainer.style.borderRadius = '24px';\n\tcontainer.style.boxSizing = 'border-box';\n\n\tconst shell = document.createElement('div');\n\tshell.style.display = 'flex';\n\tshell.style.width = '960px';\n\tshell.style.maxWidth = '100%';\n\tshell.style.height = '720px';\n\tshell.style.borderRadius = '24px';\n\tshell.style.background = '#ffffff';\n\tshell.style.border = '1px solid #dfe5e5';\n\tshell.style.boxShadow = '0 20px 48px rgba(15, 23, 42, 0.08)';\n\n\tconst contentPanel = document.createElement('div');\n\tcontentPanel.style.flex = '1';\n\tcontentPanel.style.padding = '40px';\n\tcontentPanel.style.borderRadius = '0 24px 24px 0';\n\tcontentPanel.style.color = '#6c6e6e';\n\tcontentPanel.style.fontSize = '14px';\n\tcontentPanel.textContent = 'Área de conteúdo. Níveis 1 a 2 expandem em linha; a partir do nível 3 com filhos, o menu entra em drill-down com breadcrumb.';\n\n\tshell.appendChild(contentPanel);\n\tcontainer.appendChild(shell);\n\treturn { container, shell };\n};\n\nexport default {\n\ttitle: 'Components/sula-workbench-menu',\n\ttags: ['autodocs'],\n\targTypes: {\n\t\tmenuTitle: { control: 'text', defaultValue: 'Sula Hub', description: 'Título do menu.' },\n\t\tdensity: {\n\t\t\tcontrol: { type: 'select' },\n\t\t\toptions: Object.values(SulaMenuDensity),\n\t\t\tdescription: 'Densidade visual dos itens.',\n\t\t},\n\t\tlabelOverflow: {\n\t\t\tcontrol: { type: 'select' },\n\t\t\toptions: Object.values(SulaMenuLabelOverflow),\n\t\t\tdescription: 'Quebra ou ellipsis dos labels.',\n\t\t},\n\t\tdrilldownLevel: {\n\t\t\tcontrol: { type: 'number', min: 1 },\n\t\t\tdescription: 'Nível (1-based) a partir do qual itens com filhos abrem drill-down em vez de expandir em linha.',\n\t\t},\n\t\titems: { control: 'object', description: 'Árvore de itens, recursiva.' },\n\t\titemSelected: { action: 'itemSelected', description: 'Emitido ao selecionar um item folha.' },\n\t\titemClicked: { action: 'itemClicked', description: 'Emitido a cada clique em um item.' },\n\t\tlevelChanged: { action: 'levelChanged', description: 'Emitido ao entrar ou voltar de nível no drill-down.' },\n\t\tuser: { control: 'object', description: 'Usuário logado exibido no rodapé: name (obrigatório), email e photo (URL ou data URI). Sem photo, mostra as iniciais.' },\n\t\tprofileClicked: { action: 'profileClicked', description: 'Emitido ao clicar na área do usuário. Abre o menu de perfil, a menos que o evento seja cancelado com preventDefault().' },\n\t\tprofileItems: { control: 'object', description: 'Opções do menu de perfil: id, label, icon, hasSwitch + active, divider, disabled, hidden.' },\n\t\tprofileItemClicked: { action: 'profileItemClicked', description: 'Emitido ao clicar em uma opção sem switch do menu de perfil. O popover fecha.' },\n\t\tprofileSwitchChanged: { action: 'profileSwitchChanged', description: 'Emitido ao alternar o switch de uma opção, com { item, active }. O popover continua aberto.' },\n\t\tmenuToggled: { action: 'menuToggled', description: 'Emitido ao colapsar ou expandir o menu.' },\n\t},\n\tparameters: {\n\t\tdocs: {\n\t\t\tdescription: {\n\t\t\t\tcomponent:\n\t\t\t\t\t'Menu que combina a navegação em árvore do sula-menu (níveis 1 e 2 expandem em linha) com o drill-down: a partir do nível configurado em drilldownLevel (padrão 3), itens com filhos abrem um painel de um nível com breadcrumb e botão de voltar.',\n\t\t\t},\n\t\t},\n\t},\n};\n\nconst Template: any = (args: StoryArgs) => {\n\tconst { container, shell } = createStoryShell();\n\tconst el = document.createElement('sula-workbench-menu');\n\n\tel.menuTitle = args.menuTitle;\n\tel.density = args.density;\n\tel.labelOverflow = args.labelOverflow;\n\tel.drilldownLevel = args.drilldownLevel;\n\tel.items = cloneItems(args.items);\n\tel.user = args.user;\n\tel.profileItems = (args.profileItems ?? hubProfileItems).map(item => ({ ...item }));\n\n\tel.addEventListener('itemSelected', args.itemSelected);\n\tel.addEventListener('itemClicked', args.itemClicked);\n\tel.addEventListener('levelChanged', args.levelChanged);\n\tel.addEventListener('menuToggled', args.menuToggled);\n\tel.addEventListener('profileClicked', args.profileClicked);\n\tel.addEventListener('profileItemClicked', args.profileItemClicked);\n\tel.addEventListener('profileSwitchChanged', args.profileSwitchChanged);\n\n\tshell.prepend(el);\n\treturn container;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n\tmenuTitle: 'Sula Hub',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\tdrilldownLevel: 3,\n\titems: workbenchItems,\n\tuser: sampleUser,\n};\nDefault.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory:\n\t\t\t\t'Exemplo com 6 níveis reais. Sinistros e Auto já vêm expandidos; em Cobertura (nível 3) o item Terceiros abre o drill-down. \"Apólices\" e \"Veículos\" usam um SVG no lugar do ícone de fonte (propriedade image do item). O rodapé mostra o usuário logado; clicar nele emite profileClicked.',\n\t\t},\n\t},\n};\n\nexport const WithoutPhotoOrEmail = Template.bind({});\nWithoutPhotoOrEmail.args = {\n\tmenuTitle: 'Sula Hub',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\tdrilldownLevel: 3,\n\titems: workbenchItems,\n\tuser: { name: 'Carlos Mendes' },\n};\nWithoutPhotoOrEmail.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Usuário sem foto nem e-mail: o avatar mostra as iniciais e o nome aparece sozinho.',\n\t\t},\n\t},\n};\n\nexport const WithProfileMenu = (args: StoryArgs) => {\n\tconst container = Template(args);\n\tconst menu = container.querySelector('sula-workbench-menu');\n\t// Example of the host application applying the theme chosen in the profile popover.\n\tmenu.addEventListener('profileSwitchChanged', (event: CustomEvent<SulaProfileMenuSwitchChange>) => {\n\t\tif (event.detail.item.id === 'dark-mode') document.documentElement.classList.toggle('dark', event.detail.active);\n\t});\n\treturn container;\n};\nWithProfileMenu.args = {\n\tmenuTitle: 'Sula Hub',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\tdrilldownLevel: 3,\n\titems: currentMenuItems,\n\tuser: { name: 'Lucas Reichert', email: 'lucas.reichert@sulamerica.com.br' },\n\tprofileItems: hubProfileItems,\n};\nWithProfileMenu.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory:\n\t\t\t\t'Clique no usuário do rodapé para abrir o menu de perfil, que substitui o header da aplicação. Com o menu expandido, o popover abre acima do usuário, na largura do menu; recolhido, abre ao lado do rail. Fecha com clique fora, Esc ou novo clique no usuário. As opções vêm de profileItems (label, icon, hasSwitch, divider...): cliques emitem profileItemClicked e switches emitem profileSwitchChanged. Aqui a story aplica a classe .dark no documentElement quando o switch dark-mode muda. Para não abrir o popover e tratar o clique por conta própria, chame preventDefault() em profileClicked. Conteúdo extra pode ser passado com slot=\"profile-content\".',\n\t\t},\n\t},\n};\n\nexport const CustomProfileItems = Template.bind({});\nCustomProfileItems.args = {\n\tmenuTitle: 'Sula Hub',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\tdrilldownLevel: 3,\n\titems: workbenchItems,\n\tuser: sampleUser,\n\tprofileItems: [\n\t\t{ id: 'profile', label: 'Meu perfil', icon: 'ph ph-identification-card' },\n\t\t{ id: 'notifications', label: 'Notificações', icon: 'ph ph-bell', hasSwitch: true, active: true },\n\t\t{ id: 'compact', label: 'Modo compacto', icon: 'ph ph-rows', hasSwitch: true, active: false },\n\t\t{ id: 'divider-help', divider: true },\n\t\t{ id: 'help', label: 'Central de ajuda', icon: 'ph ph-question' },\n\t\t{ id: 'billing', label: 'Faturamento', icon: 'ph ph-credit-card', disabled: true },\n\t\t{ id: 'divider-logout', divider: true },\n\t\t{ id: 'logout', label: 'Sair', icon: 'ph ph-sign-out' },\n\t],\n};\nCustomProfileItems.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Outra aplicação com opções próprias: dois switches, item desabilitado e dois divisores. Basta trocar profileItems.',\n\t\t},\n\t},\n};\n\nexport const InlineOnly = Template.bind({});\nInlineOnly.args = {\n\tmenuTitle: 'Sula Hub',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\tdrilldownLevel: 99,\n\titems: workbenchItems,\n\tuser: sampleUser,\n};\nInlineOnly.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Com drilldownLevel acima da profundidade da árvore, o componente se comporta como o sula-menu, expandindo tudo em linha.',\n\t\t},\n\t},\n};\n\nconst createComparisonShell = () => {\n\tconst container = document.createElement('div');\n\tcontainer.style.margin = '20px';\n\tcontainer.style.padding = '24px';\n\tcontainer.style.background = '#eef2f2';\n\tcontainer.style.borderRadius = '24px';\n\tcontainer.style.boxSizing = 'border-box';\n\tcontainer.style.display = 'flex';\n\tcontainer.style.gap = '32px';\n\tcontainer.style.alignItems = 'flex-start';\n\treturn container;\n};\n\nconst createComparisonColumn = (title: string) => {\n\tconst column = document.createElement('div');\n\tconst caption = document.createElement('div');\n\tcaption.textContent = title;\n\tcaption.style.font = '600 13px sans-serif';\n\tcaption.style.color = '#6c6e6e';\n\tcaption.style.marginBottom = '12px';\n\tconst box = document.createElement('div');\n\tbox.style.height = '720px';\n\tbox.style.width = '350px';\n\tbox.style.display = 'flex';\n\tbox.style.background = '#ffffff';\n\tbox.style.border = '1px solid #e5e6e6';\n\tbox.style.borderRadius = '16px';\n\tbox.style.overflow = 'hidden';\n\tcolumn.appendChild(caption);\n\tcolumn.appendChild(box);\n\treturn { column, box };\n};\n\n// Fourth level under Tech Portal > Cadastros > Tribos. The current sula-menu stops at the third level,\n// so in it \"Tribos\" stays a leaf; in the new menu it opens the drill-down.\nconst withFourthLevel = (items: SulaWorkbenchMenuItem[]): SulaWorkbenchMenuItem[] =>\n\tcloneItems(items).map(item => {\n\t\tif (item.id !== 'tech-portal') return item;\n\t\treturn {\n\t\t\t...item,\n\t\t\texpanded: true,\n\t\t\tchildren: item.children!.map(child => {\n\t\t\t\tif (child.id !== 'tech-cadastros') return child;\n\t\t\t\treturn {\n\t\t\t\t\t...child,\n\t\t\t\t\texpanded: true,\n\t\t\t\t\tchildren: child.children!.map(grandchild =>\n\t\t\t\t\t\tgrandchild.id === 'tech-tribos'\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t...grandchild,\n\t\t\t\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t\t\t\t{ id: 'tribo-saude', label: 'Tribo Saúde', icon: 'ph ph-heartbeat', selected: true },\n\t\t\t\t\t\t\t\t\t\t{ id: 'tribo-odonto', label: 'Tribo Odonto', icon: 'ph ph-tooth' },\n\t\t\t\t\t\t\t\t\t\t{ id: 'tribo-auto', label: 'Tribo Auto e Massificados', icon: 'ph ph-car' },\n\t\t\t\t\t\t\t\t\t\t{ id: 'tribo-dados', label: 'Tribo Dados e Analytics', icon: 'ph ph-chart-line-up' },\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: grandchild,\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}),\n\t\t};\n\t});\n\nconst withoutSelection = (items: SulaWorkbenchMenuItem[]): SulaWorkbenchMenuItem[] =>\n\titems.map(item => ({ ...item, selected: false, children: item.children ? withoutSelection(item.children) : undefined }));\n\nconst clickMenuRow = (menu: HTMLElement, label: string) => {\n\tconst row = Array.from(menu.shadowRoot!.querySelectorAll<HTMLElement>('.menu-item, .submenu-item')).find(el => el.textContent?.trim() === label);\n\trow?.click();\n};\n\nconst renderComparison = (items: SulaWorkbenchMenuItem[], drillTo?: string) => {\n\tconst container = createComparisonShell();\n\n\tconst current = createComparisonColumn('sula-menu (atual)');\n\tconst currentMenu = document.createElement('sula-menu');\n\tcurrentMenu.menuTitle = 'Sula Hub';\n\tcurrentMenu.image = BRAND_IMAGE;\n\tcurrentMenu.items = cloneItems(items) as unknown as SulaMenuMainItem[];\n\tcurrent.box.appendChild(currentMenu);\n\n\tconst workbench = createComparisonColumn('sula-workbench-menu (novo)');\n\tconst workbenchMenu = document.createElement('sula-workbench-menu');\n\tworkbenchMenu.menuTitle = 'Sula Hub';\n\tworkbenchMenu.image = BRAND_IMAGE;\n\tworkbenchMenu.user = sampleUser;\n\tworkbenchMenu.items = cloneItems(items);\n\tworkbench.box.appendChild(workbenchMenu);\n\n\tif (drillTo) {\n\t\tcustomElements\n\t\t\t.whenDefined('sula-workbench-menu')\n\t\t\t.then(() => workbenchMenu.componentOnReady())\n\t\t\t.then(() => clickMenuRow(workbenchMenu, drillTo));\n\t}\n\n\tcontainer.appendChild(current.column);\n\tcontainer.appendChild(workbench.column);\n\treturn container;\n};\n\nexport const ComparisonWithCurrentSulaMenu = () => renderComparison(currentMenuItems);\nComparisonWithCurrentSulaMenu.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory:\n\t\t\t\t'Os mesmos itens do menu atual de produção, renderizados no sula-menu (atual) e no sula-workbench-menu (novo), lado a lado, para comparar espaçamento, ícones e hierarquia. O menu novo mostra o perfil do usuário no rodapé, que substitui o \"Ocultar menu\" (o recolher fica no topo).',\n\t\t},\n\t},\n};\n\nexport const ComparisonDrilldownFourthLevel = () => renderComparison(withFourthLevel(withoutSelection(currentMenuItems)), 'Tribos');\nComparisonDrilldownFourthLevel.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory:\n\t\t\t\t'Mesmos itens do menu atual com um quarto nível em Tech Portal > Cadastros > Tribos. No sula-menu (atual) a árvore para no terceiro nível e Tribos fica sem os filhos. No sula-workbench-menu (novo), Tribos abre o drill-down: breadcrumb com o caminho, botão de voltar e os itens do quarto nível em tela cheia.',\n\t\t},\n\t},\n};\n"]}
|
|
1
|
+
{"version":3,"file":"sula-workbench-menu.stories.js","sourceRoot":"","sources":["../../../src/components/sula-workbench-menu/sula-workbench-menu.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAuB5F,MAAM,UAAU,GAAG,2BAA2B,kBAAkB,CAAC;;;;;CAKhE,CAAC,EAAE,CAAC;AAEL,MAAM,OAAO,GAAG,2BAA2B,kBAAkB,CAAC;;;;;CAK7D,CAAC,EAAE,CAAC;AAEL,MAAM,cAAc,GAA4B;IAC/C,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,kBAAkB,EAAE;IAClE;QACC,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,sBAAsB;QAC5B,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE;YACT;gBACC,EAAE,EAAE,aAAa;gBACjB,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,WAAW;gBACjB,QAAQ,EAAE,IAAI;gBACd,QAAQ,EAAE;oBACT;wBACC,EAAE,EAAE,sB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OAAO,SAAS,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,EAAE,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;AACtF,6BAA6B,CAAC,UAAU,GAAG;IAC1C,IAAI,EAAE;QACL,WAAW,EAAE;YACZ,KAAK,EACJ,wRAAwR;SACzR;KACD;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,EAAE,CAAC,gBAAgB,CAAC,eAAe,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AACpI,8BAA8B,CAAC,UAAU,GAAG;IAC3C,IAAI,EAAE;QACL,WAAW,EAAE;YACZ,KAAK,EACJ,oTAAoT;SACrT;KACD;CACD,CAAC","sourcesContent":["import { SulaMenuDensity, SulaMenuLabelOverflow } from '../sula-menu/model/sula-menu.model';\nimport { SulaMenuMainItem } from '../sula-menu/model/sula-menu.model';\nimport { SulaProfileMenuItem, SulaProfileMenuSwitchChange } from '../sula-profile-menu/model/sula-profile-menu.model';\nimport { SulaWorkbenchMenuItem, SulaWorkbenchMenuUser } from './model/sula-workbench-menu.model';\n\ntype StoryArgs = {\n\tmenuTitle: string;\n\tdensity: SulaMenuDensity;\n\tlabelOverflow: SulaMenuLabelOverflow;\n\tdrilldownLevel: number;\n\tdrillPath?: string[];\n\titems: SulaWorkbenchMenuItem[];\n\tuser: SulaWorkbenchMenuUser;\n\tprofileItems?: SulaProfileMenuItem[];\n\tprofileClicked: EventListener;\n\tprofileItemClicked: EventListener;\n\tprofileSwitchChanged: EventListener;\n\titemSelected: EventListener;\n\titemClicked: EventListener;\n\tlevelChanged: EventListener;\n\tmenuToggled: EventListener;\n};\n\nconst SHIELD_SVG = `data:image/svg+xml;utf8,${encodeURIComponent(`\n\t<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#6c6e6e\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t<path d=\"M12 3l7 3v5c0 4.5-3 8.2-7 10-4-1.8-7-5.5-7-10V6l7-3z\"/>\n\t\t<path d=\"M9 12l2 2 4-4\"/>\n\t</svg>\n`)}`;\n\nconst CAR_SVG = `data:image/svg+xml;utf8,${encodeURIComponent(`\n\t<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#6c6e6e\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t<path d=\"M4 16v-3.2L6 8h12l2 4.8V16\"/>\n\t\t<path d=\"M4 16h16v2.4a.8.8 0 0 1-.8.8h-1.4a.8.8 0 0 1-.8-.8V17H7v1.4a.8.8 0 0 1-.8.8H4.8a.8.8 0 0 1-.8-.8Z\"/>\n\t</svg>\n`)}`;\n\nconst workbenchItems: SulaWorkbenchMenuItem[] = [\n\t{ id: 'overview', label: 'Visão Geral', icon: 'ph ph-house-line' },\n\t{\n\t\tid: 'claims',\n\t\tlabel: 'Sinistros',\n\t\ticon: 'ph ph-warning-circle',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'claims-auto',\n\t\t\t\tlabel: 'Auto',\n\t\t\t\ticon: 'ph ph-car',\n\t\t\t\texpanded: true,\n\t\t\t\tchildren: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'claims-auto-coverage',\n\t\t\t\t\t\tlabel: 'Cobertura',\n\t\t\t\t\t\ticon: 'ph ph-shield-check',\n\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: 'claims-auto-third',\n\t\t\t\t\t\t\t\tlabel: 'Terceiros',\n\t\t\t\t\t\t\t\ticon: 'ph ph-users-three',\n\t\t\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tid: 'claims-auto-third-docs',\n\t\t\t\t\t\t\t\t\t\tlabel: 'Documentação',\n\t\t\t\t\t\t\t\t\t\ticon: 'ph ph-folder-open',\n\t\t\t\t\t\t\t\t\t\tchildren: [{ id: 'claims-auto-third-address', label: 'Comprovante de residência', icon: 'ph ph-map-pin', selected: true }],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{ id: 'claims-auto-own', label: 'Próprio', icon: 'ph ph-car-profile' },\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t\t{ id: 'claims-auto-glass', label: 'Vidros', icon: 'ph ph-wrench' },\n\t\t\t\t\t{ id: 'claims-auto-other', label: 'Outros (ícone padrão)' },\n\t\t\t\t],\n\t\t\t},\n\t\t\t{ id: 'claims-home', label: 'Residencial', icon: 'ph ph-house', children: [{ id: 'claims-home-fire', label: 'Incêndio', icon: 'ph ph-fire' }] },\n\t\t\t{ id: 'claims-vehicle', label: 'Veículos', icon: 'ph ph-car', image: CAR_SVG },\n\t\t\t{ id: 'claims-life', label: 'Vida', icon: 'ph ph-heartbeat' },\n\t\t],\n\t},\n\t{\n\t\tid: 'policies',\n\t\tlabel: 'Apólices',\n\t\ticon: 'ph ph-files',\n\t\timage: SHIELD_SVG,\n\t\tchildren: [\n\t\t\t{ id: 'policies-issued', label: 'Emitidas', icon: 'ph ph-file-text' },\n\t\t\t{ id: 'policies-review', label: 'Em análise', icon: 'ph ph-clipboard-text' },\n\t\t],\n\t},\n\t{ id: 'settings', label: 'Configurações', icon: 'ph ph-gear-six', children: [{ id: 'settings-users', label: 'Usuários', icon: 'ph ph-users-three' }] },\n];\n\nconst BRAND_IMAGE = `data:image/svg+xml;utf8,${encodeURIComponent(`\n\t<svg width=\"80\" height=\"80\" viewBox=\"0 0 80 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<rect width=\"80\" height=\"80\" rx=\"20\" fill=\"#E5231B\"/>\n\t\t<path d=\"M52 24H35.5C31.3579 24 28 27.3579 28 31.5C28 35.6421 31.3579 39 35.5 39H44.5C48.6421 39 52 42.3579 52 46.5C52 50.6421 48.6421 54 44.5 54H28\" stroke=\"white\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n\t</svg>\n`)}`;\n\n// Same items as the menu in production today, to compare both components with identical content.\nconst currentMenuItems: SulaWorkbenchMenuItem[] = [\n\t{ id: 'dashboard', label: 'Dashboard', icon: 'ph ph-house', selected: true },\n\t{ id: 'exemplo', label: 'Exemplo menu', icon: 'ph ph-archive', children: [{ id: 'exemplo-usuarios', label: 'Usuários', icon: 'ph ph-user' }] },\n\t{ id: 'contas', label: 'Contas Médicas', icon: 'ph ph-align-right', children: [{ id: 'guias', label: 'Guias', icon: 'ph ph-align-center-horizontal-simple' }] },\n\t{\n\t\tid: 'ppa',\n\t\tlabel: 'PPA (Portal Plataforma Antifraude)',\n\t\ticon: 'ph ph-air-traffic-control',\n\t\tchildren: [\n\t\t\t{ id: 'ppa-prestadores', label: 'Prestadores', icon: 'ph ph-ambulance' },\n\t\t\t{ id: 'ppa-usuarios', label: 'Usuários', icon: 'ph ph-user' },\n\t\t\t{ id: 'ppa-prestadores-local', label: 'Prestadores-LOCAL', icon: 'ph ph-' },\n\t\t\t{ id: 'ppa-usuarios-local', label: 'Usuarios-LOCAL', icon: 'ph ph-' },\n\t\t\t{ id: 'ppa-prestadores-lilian', label: 'Prestadores Lilian', icon: 'ph ph-address-book' },\n\t\t],\n\t},\n\t{\n\t\tid: 'sula-audit',\n\t\tlabel: 'Sula Audit',\n\t\ticon: 'ph ph-airplane-in-flight',\n\t\tchildren: [\n\t\t\t{ id: 'audit-home', label: 'Home', icon: 'ph ph-house' },\n\t\t\t{ id: 'audit-prestadores', label: 'Prestadores auditados', icon: 'ph ph-airplay' },\n\t\t],\n\t},\n\t{\n\t\tid: 'dev-portal',\n\t\tlabel: 'Dev Portal',\n\t\ticon: 'ph ph-code-simple',\n\t\tchildren: [\n\t\t\t{ id: 'dev-devsecops', label: 'DevSecOps', icon: 'ph ph-chart-line' },\n\t\t\t{ id: 'dev-tech-radar', label: 'Tech Radar', icon: 'ph ph-target' },\n\t\t\t{ id: 'dev-portal-eda', label: 'Portal EDA', icon: 'ph ph-' },\n\t\t],\n\t},\n\t{\n\t\tid: 'sula-os',\n\t\tlabel: 'Sula OS',\n\t\ticon: 'ph ph-browsers',\n\t\tchildren: [\n\t\t\t{ id: 'os-dashboard', label: 'Dashboard', icon: 'ph ph-gauge' },\n\t\t\t{ id: 'os-canvas', label: 'Canvas', icon: 'ph ph-frame-corners' },\n\t\t],\n\t},\n\t{\n\t\tid: 'tech-portal',\n\t\tlabel: 'Tech Portal',\n\t\ticon: 'ph ph-address-book',\n\t\tchildren: [\n\t\t\t{ id: 'tech-home', label: 'Home', icon: 'ph ph-users-four' },\n\t\t\t{ id: 'tech-busca', label: 'Busca', icon: 'ph ph-user-circle-gear' },\n\t\t\t{ id: 'tech-perfil', label: 'Meu perfil', icon: 'ph ph-user-circle' },\n\t\t\t{\n\t\t\t\tid: 'tech-cadastros',\n\t\t\t\tlabel: 'Cadastros',\n\t\t\t\ticon: 'ph ph-table',\n\t\t\t\tchildren: [\n\t\t\t\t\t{ id: 'tech-empresas', label: 'Empresas terceiras', icon: 'ph ph-' },\n\t\t\t\t\t{ id: 'tech-tribos', label: 'Tribos', icon: 'ph ph-' },\n\t\t\t\t\t{ id: 'tech-capitulos', label: 'Capítulos/Jornadas', icon: 'ph ph-' },\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tid: 'configuracoes',\n\t\tlabel: 'Configurações',\n\t\ticon: 'ph ph-gear',\n\t\tchildren: [\n\t\t\t{ id: 'conf-menus', label: 'Menus', icon: 'ph ph-layout' },\n\t\t\t{ id: 'conf-usuarios', label: 'Usuários', icon: 'ph ph-users' },\n\t\t\t{ id: 'conf-tenant', label: 'Tenant', icon: 'ph ph-building' },\n\t\t\t{ id: 'conf-chaves', label: 'Chaves de APIs', icon: 'ph ph-key' },\n\t\t\t{\n\t\t\t\tid: 'conf-permissoes',\n\t\t\t\tlabel: 'Permissões',\n\t\t\t\ticon: 'ph ph-lock',\n\t\t\t\tchildren: [\n\t\t\t\t\t{ id: 'perm-papeis', label: 'Papéis', icon: 'ph ph-' },\n\t\t\t\t\t{ id: 'perm-recursos', label: 'Recursos', icon: 'ph ph-' },\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst sampleUser: SulaWorkbenchMenuUser = { name: 'Ana Ribeiro', email: 'ana.ribeiro@sula.com.br' };\n\nconst hubProfileItems: SulaProfileMenuItem[] = [\n\t{ id: 'account', label: 'Minha conta', icon: 'ph ph-user-circle' },\n\t{ id: 'dark-mode', label: 'Modo escuro', icon: 'ph ph-moon', hasSwitch: true, active: false },\n\t{ id: 'divider-logout', divider: true },\n\t{ id: 'logout', label: 'Sair', icon: 'ph ph-sign-out' },\n];\n\nconst cloneItems = (items: SulaWorkbenchMenuItem[]): SulaWorkbenchMenuItem[] =>\n\titems.map(item => ({ ...item, children: item.children ? cloneItems(item.children) : undefined }));\n\nconst createStoryShell = () => {\n\tconst container = document.createElement('div');\n\tcontainer.style.margin = '20px';\n\tcontainer.style.padding = '24px';\n\tcontainer.style.background = 'linear-gradient(180deg, #f8f9f9 0%, #eef2f2 100%)';\n\tcontainer.style.borderRadius = '24px';\n\tcontainer.style.boxSizing = 'border-box';\n\n\tconst shell = document.createElement('div');\n\tshell.style.display = 'flex';\n\tshell.style.width = '960px';\n\tshell.style.maxWidth = '100%';\n\tshell.style.height = '720px';\n\tshell.style.borderRadius = '24px';\n\tshell.style.background = '#ffffff';\n\tshell.style.border = '1px solid #dfe5e5';\n\tshell.style.boxShadow = '0 20px 48px rgba(15, 23, 42, 0.08)';\n\n\tconst contentPanel = document.createElement('div');\n\tcontentPanel.style.flex = '1';\n\tcontentPanel.style.padding = '40px';\n\tcontentPanel.style.borderRadius = '0 24px 24px 0';\n\tcontentPanel.style.color = '#6c6e6e';\n\tcontentPanel.style.fontSize = '14px';\n\tcontentPanel.textContent = 'Área de conteúdo. Níveis 1 a 2 expandem em linha; a partir do nível 3 com filhos, o menu entra em drill-down com breadcrumb.';\n\n\tshell.appendChild(contentPanel);\n\tcontainer.appendChild(shell);\n\treturn { container, shell };\n};\n\nexport default {\n\ttitle: 'Components/sula-workbench-menu',\n\ttags: ['autodocs'],\n\targTypes: {\n\t\tmenuTitle: { control: 'text', defaultValue: 'Sula Hub', description: 'Título do menu.' },\n\t\tdensity: {\n\t\t\tcontrol: { type: 'select' },\n\t\t\toptions: Object.values(SulaMenuDensity),\n\t\t\tdescription: 'Densidade visual dos itens.',\n\t\t},\n\t\tlabelOverflow: {\n\t\t\tcontrol: { type: 'select' },\n\t\t\toptions: Object.values(SulaMenuLabelOverflow),\n\t\t\tdescription: 'Quebra ou ellipsis dos labels.',\n\t\t},\n\t\tdrilldownLevel: {\n\t\t\tcontrol: { type: 'number', min: 1 },\n\t\t\tdescription: 'Nível (1-based) a partir do qual itens com filhos abrem drill-down em vez de expandir em linha.',\n\t\t},\n\t\tdrillPath: {\n\t\t\tcontrol: 'object',\n\t\t\tdescription: 'Controla o drill-down pelo host: ids da raiz até o item cujos filhos aparecem. Array vazio volta à árvore; undefined deixa só os cliques navegarem.',\n\t\t},\n\t\titems: { control: 'object', description: 'Árvore de itens, recursiva.' },\n\t\titemSelected: { action: 'itemSelected', description: 'Emitido ao selecionar um item folha.' },\n\t\titemClicked: { action: 'itemClicked', description: 'Emitido a cada clique em um item.' },\n\t\tlevelChanged: { action: 'levelChanged', description: 'Emitido ao entrar ou voltar de nível no drill-down.' },\n\t\tuser: { control: 'object', description: 'Usuário logado exibido no rodapé: name (obrigatório), email e photo (URL ou data URI). Sem photo, mostra as iniciais.' },\n\t\tprofileClicked: { action: 'profileClicked', description: 'Emitido ao clicar na área do usuário. Abre o menu de perfil, a menos que o evento seja cancelado com preventDefault().' },\n\t\tprofileItems: { control: 'object', description: 'Opções do menu de perfil: id, label, icon, hasSwitch + active, divider, disabled, hidden.' },\n\t\tprofileItemClicked: { action: 'profileItemClicked', description: 'Emitido ao clicar em uma opção sem switch do menu de perfil. O popover fecha.' },\n\t\tprofileSwitchChanged: { action: 'profileSwitchChanged', description: 'Emitido ao alternar o switch de uma opção, com { item, active }. O popover continua aberto.' },\n\t\tmenuToggled: { action: 'menuToggled', description: 'Emitido ao colapsar ou expandir o menu.' },\n\t},\n\tparameters: {\n\t\tdocs: {\n\t\t\tdescription: {\n\t\t\t\tcomponent:\n\t\t\t\t\t'Menu que combina a navegação em árvore do sula-menu (níveis 1 e 2 expandem em linha) com o drill-down: a partir do nível configurado em drilldownLevel (padrão 3), itens com filhos abrem um painel de um nível com breadcrumb e botão de voltar.',\n\t\t\t},\n\t\t},\n\t},\n};\n\nconst Template: any = (args: StoryArgs) => {\n\tconst { container, shell } = createStoryShell();\n\tconst el = document.createElement('sula-workbench-menu');\n\n\tel.menuTitle = args.menuTitle;\n\tel.density = args.density;\n\tel.labelOverflow = args.labelOverflow;\n\tel.drilldownLevel = args.drilldownLevel;\n\tel.drillPath = args.drillPath;\n\tel.items = cloneItems(args.items);\n\tel.user = args.user;\n\tel.profileItems = (args.profileItems ?? hubProfileItems).map(item => ({ ...item }));\n\n\tel.addEventListener('itemSelected', args.itemSelected);\n\tel.addEventListener('itemClicked', args.itemClicked);\n\tel.addEventListener('levelChanged', args.levelChanged);\n\tel.addEventListener('menuToggled', args.menuToggled);\n\tel.addEventListener('profileClicked', args.profileClicked);\n\tel.addEventListener('profileItemClicked', args.profileItemClicked);\n\tel.addEventListener('profileSwitchChanged', args.profileSwitchChanged);\n\n\tshell.prepend(el);\n\treturn container;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n\tmenuTitle: 'Sula Hub',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\tdrilldownLevel: 3,\n\titems: workbenchItems,\n\tuser: sampleUser,\n};\nDefault.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory:\n\t\t\t\t'Exemplo com 6 níveis reais. Sinistros e Auto já vêm expandidos; em Cobertura (nível 3) o item Terceiros abre o drill-down. \"Apólices\" e \"Veículos\" usam um SVG no lugar do ícone de fonte (propriedade image do item). O rodapé mostra o usuário logado; clicar nele emite profileClicked.',\n\t\t},\n\t},\n};\n\nexport const WithoutPhotoOrEmail = Template.bind({});\nWithoutPhotoOrEmail.args = {\n\tmenuTitle: 'Sula Hub',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\tdrilldownLevel: 3,\n\titems: workbenchItems,\n\tuser: { name: 'Carlos Mendes' },\n};\nWithoutPhotoOrEmail.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Usuário sem foto nem e-mail: o avatar mostra as iniciais e o nome aparece sozinho.',\n\t\t},\n\t},\n};\n\nexport const WithProfileMenu = (args: StoryArgs) => {\n\tconst container = Template(args);\n\tconst menu = container.querySelector('sula-workbench-menu');\n\t// Example of the host application applying the theme chosen in the profile popover.\n\tmenu.addEventListener('profileSwitchChanged', (event: CustomEvent<SulaProfileMenuSwitchChange>) => {\n\t\tif (event.detail.item.id === 'dark-mode') document.documentElement.classList.toggle('dark', event.detail.active);\n\t});\n\treturn container;\n};\nWithProfileMenu.args = {\n\tmenuTitle: 'Sula Hub',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\tdrilldownLevel: 3,\n\titems: currentMenuItems,\n\tuser: { name: 'Lucas Reichert', email: 'lucas.reichert@sulamerica.com.br' },\n\tprofileItems: hubProfileItems,\n};\nWithProfileMenu.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory:\n\t\t\t\t'Clique no usuário do rodapé para abrir o menu de perfil, que substitui o header da aplicação. Com o menu expandido, o popover abre acima do usuário, na largura do menu; recolhido, abre ao lado do rail. Fecha com clique fora, Esc ou novo clique no usuário. As opções vêm de profileItems (label, icon, hasSwitch, divider...): cliques emitem profileItemClicked e switches emitem profileSwitchChanged. Aqui a story aplica a classe .dark no documentElement quando o switch dark-mode muda. Para não abrir o popover e tratar o clique por conta própria, chame preventDefault() em profileClicked. Conteúdo extra pode ser passado com slot=\"profile-content\".',\n\t\t},\n\t},\n};\n\nexport const CustomProfileItems = Template.bind({});\nCustomProfileItems.args = {\n\tmenuTitle: 'Sula Hub',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\tdrilldownLevel: 3,\n\titems: workbenchItems,\n\tuser: sampleUser,\n\tprofileItems: [\n\t\t{ id: 'profile', label: 'Meu perfil', icon: 'ph ph-identification-card' },\n\t\t{ id: 'notifications', label: 'Notificações', icon: 'ph ph-bell', hasSwitch: true, active: true },\n\t\t{ id: 'compact', label: 'Modo compacto', icon: 'ph ph-rows', hasSwitch: true, active: false },\n\t\t{ id: 'divider-help', divider: true },\n\t\t{ id: 'help', label: 'Central de ajuda', icon: 'ph ph-question' },\n\t\t{ id: 'billing', label: 'Faturamento', icon: 'ph ph-credit-card', disabled: true },\n\t\t{ id: 'divider-logout', divider: true },\n\t\t{ id: 'logout', label: 'Sair', icon: 'ph ph-sign-out' },\n\t],\n};\nCustomProfileItems.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Outra aplicação com opções próprias: dois switches, item desabilitado e dois divisores. Basta trocar profileItems.',\n\t\t},\n\t},\n};\n\nexport const ControlledDrillPath = (args: StoryArgs) => {\n\tconst container = Template(args);\n\tconst menu = container.querySelector('sula-workbench-menu');\n\tconst paths: Record<string, string[]> = {\n\t\tTree: [],\n\t\t'Cobertura': ['claims', 'claims-auto', 'claims-auto-coverage'],\n\t\t'Terceiros': ['claims', 'claims-auto', 'claims-auto-coverage', 'claims-auto-third'],\n\t};\n\n\tconst toolbar = document.createElement('div');\n\ttoolbar.style.cssText = 'display:flex;gap:8px;margin:20px 20px 0';\n\tObject.entries(paths).forEach(([label, path]) => {\n\t\tconst button = document.createElement('sula-button');\n\t\tbutton.text = label;\n\t\tbutton.addEventListener('click', () => (menu.drillPath = path));\n\t\ttoolbar.appendChild(button);\n\t});\n\n\tconst wrapper = document.createElement('div');\n\twrapper.append(toolbar, container);\n\treturn wrapper;\n};\nControlledDrillPath.args = {\n\tmenuTitle: 'Sula Hub',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\tdrilldownLevel: 3,\n\titems: workbenchItems,\n\tuser: sampleUser,\n};\nControlledDrillPath.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'O host controla o drill-down pela propriedade drillPath: os botões acima entram em Cobertura, em Terceiros ou voltam para a árvore. Ids desconhecidos interrompem o caminho no último nível válido.',\n\t\t},\n\t},\n};\n\nexport const InlineOnly = Template.bind({});\nInlineOnly.args = {\n\tmenuTitle: 'Sula Hub',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\tdrilldownLevel: 99,\n\titems: workbenchItems,\n\tuser: sampleUser,\n};\nInlineOnly.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Com drilldownLevel acima da profundidade da árvore, o componente se comporta como o sula-menu, expandindo tudo em linha.',\n\t\t},\n\t},\n};\n\nconst createComparisonShell = () => {\n\tconst container = document.createElement('div');\n\tcontainer.style.margin = '20px';\n\tcontainer.style.padding = '24px';\n\tcontainer.style.background = '#eef2f2';\n\tcontainer.style.borderRadius = '24px';\n\tcontainer.style.boxSizing = 'border-box';\n\tcontainer.style.display = 'flex';\n\tcontainer.style.gap = '32px';\n\tcontainer.style.alignItems = 'flex-start';\n\treturn container;\n};\n\nconst createComparisonColumn = (title: string) => {\n\tconst column = document.createElement('div');\n\tconst caption = document.createElement('div');\n\tcaption.textContent = title;\n\tcaption.style.font = '600 13px sans-serif';\n\tcaption.style.color = '#6c6e6e';\n\tcaption.style.marginBottom = '12px';\n\tconst box = document.createElement('div');\n\tbox.style.height = '720px';\n\tbox.style.width = '350px';\n\tbox.style.display = 'flex';\n\tbox.style.background = '#ffffff';\n\tbox.style.border = '1px solid #e5e6e6';\n\tbox.style.borderRadius = '16px';\n\tbox.style.overflow = 'hidden';\n\tcolumn.appendChild(caption);\n\tcolumn.appendChild(box);\n\treturn { column, box };\n};\n\n// Fourth level under Tech Portal > Cadastros > Tribos. The current sula-menu stops at the third level,\n// so in it \"Tribos\" stays a leaf; in the new menu it opens the drill-down.\nconst withFourthLevel = (items: SulaWorkbenchMenuItem[]): SulaWorkbenchMenuItem[] =>\n\tcloneItems(items).map(item => {\n\t\tif (item.id !== 'tech-portal') return item;\n\t\treturn {\n\t\t\t...item,\n\t\t\texpanded: true,\n\t\t\tchildren: item.children!.map(child => {\n\t\t\t\tif (child.id !== 'tech-cadastros') return child;\n\t\t\t\treturn {\n\t\t\t\t\t...child,\n\t\t\t\t\texpanded: true,\n\t\t\t\t\tchildren: child.children!.map(grandchild =>\n\t\t\t\t\t\tgrandchild.id === 'tech-tribos'\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t...grandchild,\n\t\t\t\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t\t\t\t{ id: 'tribo-saude', label: 'Tribo Saúde', icon: 'ph ph-heartbeat', selected: true },\n\t\t\t\t\t\t\t\t\t\t{ id: 'tribo-odonto', label: 'Tribo Odonto', icon: 'ph ph-tooth' },\n\t\t\t\t\t\t\t\t\t\t{ id: 'tribo-auto', label: 'Tribo Auto e Massificados', icon: 'ph ph-car' },\n\t\t\t\t\t\t\t\t\t\t{ id: 'tribo-dados', label: 'Tribo Dados e Analytics', icon: 'ph ph-chart-line-up' },\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: grandchild,\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}),\n\t\t};\n\t});\n\nconst withoutSelection = (items: SulaWorkbenchMenuItem[]): SulaWorkbenchMenuItem[] =>\n\titems.map(item => ({ ...item, selected: false, children: item.children ? withoutSelection(item.children) : undefined }));\n\nconst clickMenuRow = (menu: HTMLElement, label: string) => {\n\tconst row = Array.from(menu.shadowRoot!.querySelectorAll<HTMLElement>('.menu-item, .submenu-item')).find(el => el.textContent?.trim() === label);\n\trow?.click();\n};\n\nconst renderComparison = (items: SulaWorkbenchMenuItem[], drillTo?: string) => {\n\tconst container = createComparisonShell();\n\n\tconst current = createComparisonColumn('sula-menu (atual)');\n\tconst currentMenu = document.createElement('sula-menu');\n\tcurrentMenu.menuTitle = 'Sula Hub';\n\tcurrentMenu.image = BRAND_IMAGE;\n\tcurrentMenu.items = cloneItems(items) as unknown as SulaMenuMainItem[];\n\tcurrent.box.appendChild(currentMenu);\n\n\tconst workbench = createComparisonColumn('sula-workbench-menu (novo)');\n\tconst workbenchMenu = document.createElement('sula-workbench-menu');\n\tworkbenchMenu.menuTitle = 'Sula Hub';\n\tworkbenchMenu.image = BRAND_IMAGE;\n\tworkbenchMenu.user = sampleUser;\n\tworkbenchMenu.items = cloneItems(items);\n\tworkbench.box.appendChild(workbenchMenu);\n\n\tif (drillTo) {\n\t\tcustomElements\n\t\t\t.whenDefined('sula-workbench-menu')\n\t\t\t.then(() => workbenchMenu.componentOnReady())\n\t\t\t.then(() => clickMenuRow(workbenchMenu, drillTo));\n\t}\n\n\tcontainer.appendChild(current.column);\n\tcontainer.appendChild(workbench.column);\n\treturn container;\n};\n\nexport const ComparisonWithCurrentSulaMenu = () => renderComparison(currentMenuItems);\nComparisonWithCurrentSulaMenu.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory:\n\t\t\t\t'Os mesmos itens do menu atual de produção, renderizados no sula-menu (atual) e no sula-workbench-menu (novo), lado a lado, para comparar espaçamento, ícones e hierarquia. O menu novo mostra o perfil do usuário no rodapé, que substitui o \"Ocultar menu\" (o recolher fica no topo).',\n\t\t},\n\t},\n};\n\nexport const ComparisonDrilldownFourthLevel = () => renderComparison(withFourthLevel(withoutSelection(currentMenuItems)), 'Tribos');\nComparisonDrilldownFourthLevel.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory:\n\t\t\t\t'Mesmos itens do menu atual com um quarto nível em Tech Portal > Cadastros > Tribos. No sula-menu (atual) a árvore para no terceiro nível e Tribos fica sem os filhos. No sula-workbench-menu (novo), Tribos abre o drill-down: breadcrumb com o caminho, botão de voltar e os itens do quarto nível em tela cheia.',\n\t\t},\n\t},\n};\n"]}
|