@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.1 → 2.2.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7455,7 +7455,7 @@
7455
7455
  {
7456
7456
  "kind": "variable",
7457
7457
  "name": "ObcTopBar",
7458
- "default": "class ObcTopBar extends LitElement { constructor(..._args) { super(..._args); this.appTitle = \"App\"; this.pageName = \"Page\"; this.menuButtonIcon = \"menu\"; this.menuButtonActivated = false; this.dimmingButtonActivated = false; this.appsButtonActivated = false; this.leftMoreButtonActivated = false; this.userButtonActivated = false; this.userButtonDisabled = false; this.tall = false; this.wideMenuButton = false; this.showAppsButton = false; this.showDimmingButton = false; this.showUserButton = false; this.showClock = false; this.showDate = false; this.showAppIcon = false; this.inactive = false; this.appButtonBreakpointPx = 500; this.dimmingButtonBreakpointPx = 500; this.appTitleBreakpointPx = 500; this.userButtonBreakpointPx = 500; this.appIconBreakpointPx = 500; this.settings = false; this.breadcrumbItems = []; this.leftButtonEvent = null; this.leftButtonTimeout = null; this.isLeftButtonDown = false; this.isEmergencyBrightness = false; } dimmingButtonClicked() { /** * Fired when the dimming (day/night) button is clicked. * @event dimming-button-clicked */ this.dispatchEvent(new CustomEvent(\"dimming-button-clicked\")); } appsButtonClicked() { /** * Fired when the apps button is clicked. * @event apps-button-clicked */ this.dispatchEvent(new CustomEvent(\"apps-button-clicked\")); } leftMoreButtonClicked() { /** * Fired when the left more button is clicked. * @event left-more-button-clicked */ this.dispatchEvent(new CustomEvent(\"left-more-button-clicked\")); } userButtonClicked() { /** * Fired when the user/profile button is clicked. * @event user-button-clicked */ this.dispatchEvent(new CustomEvent(\"user-button-clicked\")); } leftButtonDown(event) { this.leftButtonEvent = event; this.isLeftButtonDown = true; this.leftButtonTimeout = setTimeout(() => { this.leftButtonEvent = null; this.dispatchEvent(new CustomEvent(\"emergency-brightness-start\")); this.isEmergencyBrightness = true; }, 500); } /** * Ends a hold. The event a short press stands for is dispatched from the * `click` that follows, not here: a menu opened while the pointer is still * going up gets closed again by that same click in current browsers, which * see it as a click outside a popover that has just opened. */ leftButtonUp() { if (this.leftButtonTimeout) { clearTimeout(this.leftButtonTimeout); this.leftButtonTimeout = null; } if (this.isEmergencyBrightness) { this.dispatchEvent(new CustomEvent(\"emergency-brightness-stop\")); this.isEmergencyBrightness = false; } this.isLeftButtonDown = false; } /** * Sends the event a press of the hold button stands for. * * Enter, Space and a screen reader's activate command arrive as a `click` * with `detail` 0 and no pointer press before it, so they get the event * directly. A pointer click arrives with `detail` 1 after the press: the * event stored on the way down is sent now, unless the press ran long * enough to start emergency brightness, which used it up. */ leftButtonActivate(event, type) { if (event.detail === 0) { this.dispatchEvent(new CustomEvent(type)); return; } if (!this.leftButtonEvent) return; this.dispatchEvent(this.leftButtonEvent); this.leftButtonEvent = null; } leftButtonLeave() { if (!this.isLeftButtonDown) return; if (this.leftButtonTimeout) { clearInterval(this.leftButtonTimeout); this.leftButtonTimeout = null; } if (this.isEmergencyBrightness) { this.dispatchEvent(new CustomEvent(\"emergency-brightness-stop\")); this.isEmergencyBrightness = false; } this.isLeftButtonDown = false; } render() { const leftGroup = []; if (this.settings) { leftGroup.push(html`<div class=\"menu-button\"> <obc-icon-button variant=\"flat\" aria-label=${msg(\"Close\")} @pointerdown=${() => this.leftButtonDown(new CustomEvent(\"close\"))} @pointerup=${() => this.leftButtonUp()} @pointerleave=${() => this.leftButtonLeave()} @click=${(event) => this.leftButtonActivate(event, \"close\")} > <obi-close-google></obi-close-google> </obc-icon-button> </div>`); leftGroup.push(html`<obc-icon-button variant=\"flat\" aria-label=${msg(\"Back\")} @click=${() => this.dispatchEvent(new CustomEvent(\"back\"))} > <obi-arrow-left-google></obi-arrow-left-google> </obc-icon-button>`); leftGroup.push(html`<div class=\"title\">${this.appTitle}</div>`); leftGroup.push(html`<obc-breadcrumb .items=${this.breadcrumbItems} @breadcrumb-click=${(e) => this.dispatchEvent(new CustomEvent(\"breadcrumb-click\", { detail: e.detail }))} ></obc-breadcrumb>`); } else { if (!this.inactive) leftGroup.push(html`<div class=\"menu-button ${this.wideMenuButton ? \"wide\" : null}\"> <obc-icon-button variant=\"flat\" aria-label=${this.menuButtonIcon === \"menu\" ? msg(\"Menu\") : msg(\"Home\")} @pointerdown=${() => this.leftButtonDown(new CustomEvent(\"menu-button-clicked\"))} @pointerup=${() => this.leftButtonUp()} @pointerleave=${() => this.leftButtonLeave()} @click=${(event) => this.leftButtonActivate(event, \"menu-button-clicked\")} ?activated=${this.menuButtonActivated} > ${this.menuButtonIcon === \"menu\" ? html`<obi-menu-iec></obi-menu-iec>` : html`<obi-home></obi-home>`} </obc-icon-button> </div>`); if (this.showAppIcon) leftGroup.push(html`<div class=\"app-icon\"><slot name=\"app-icon\"></slot></div>`); leftGroup.push(html`<div class=\"title\">${this.appTitle}</div>`); leftGroup.push(html`<div class=\"page-name\">${this.pageName}</div>`); leftGroup.push(html`<slot name=\"command-button\"></slot>`); } const breakpointMoreButton = Math.max(this.appButtonBreakpointPx, this.dimmingButtonBreakpointPx); return html` <style> @media (max-width: ${breakpointMoreButton}px) { .left-more-button { display: revert !important; } .group.left > * { margin-right: 4px; margin-left: 4px; } } @media (max-width: ${this.appButtonBreakpointPx}px) { .apps-button { display: none; } } @media (max-width: ${this.dimmingButtonBreakpointPx}px) { .dimming-button { display: none; } } @media (max-width: ${this.appTitleBreakpointPx}px) { .title { display: none !important; /* the stylesheet's display wins over this inline rule otherwise */ } } @media (max-width: ${this.userButtonBreakpointPx}px) { .user-button { display: none; } } @media (max-width: ${this.appIconBreakpointPx}px) { .app-icon { display: none; } } </style> <nav class=${classMap({ wrapper: true, inactive: this.inactive, settings: this.settings, tall: this.tall })} > <div class=\"left group\">${leftGroup}</div> <div class=\"right group\"> <div class=\"alert-container\"> <slot name=\"alerts\"></slot> </div> ${this.showDimmingButton && !this.inactive ? html`<obc-icon-button class=\"dimming-button\" part=\"dimming-button\" variant=\"flat\" aria-label=${msg(\"Dimming\")} @click=${this.dimmingButtonClicked} ?activated=${this.dimmingButtonActivated} > <obi-palette-day-night-iec></obi-palette-day-night-iec> </obc-icon-button>` : null} ${this.showUserButton && !this.inactive ? html`<obc-icon-button class=\"user-button\" variant=\"flat\" part=\"user-button\" aria-label=${msg(\"User\")} @click=${this.userButtonClicked} ?activated=${this.userButtonActivated} ?disabled=${this.userButtonDisabled} > <obi-user></obi-user> </obc-icon-button>` : null} ${this.showAppsButton && !this.inactive ? html`<obc-icon-button class=\"apps-button\" variant=\"flat\" part=\"apps-button\" aria-label=${msg(\"Apps\")} @click=${this.appsButtonClicked} ?activated=${this.appsButtonActivated} > <obi-applications></obi-applications> </obc-icon-button>` : null} ${this.showClock ? html`<slot name=\"clock\"></slot>` : null} ${!this.inactive ? html`<obc-icon-button class=\"left-more-button\" part=\"left-more-button\" variant=\"flat\" aria-label=${msg(\"More\")} @click=${this.leftMoreButtonClicked} ?activated=${this.leftMoreButtonActivated} > <obi-more-vertical-google></obi-more-vertical-google> </obc-icon-button>` : null} </div> </nav> `; } static { this.styles = unsafeCSS(top_bar_default); } }"
7458
+ "default": "class ObcTopBar extends LitElement { constructor(..._args) { super(..._args); this.appTitle = \"App\"; this.pageName = \"Page\"; this.menuButtonIcon = \"menu\"; this.menuButtonActivated = false; this.dimmingButtonActivated = false; this.appsButtonActivated = false; this.moreButtonActivated = false; this.userButtonActivated = false; this.userButtonDisabled = false; this.tall = false; this.wideMenuButton = false; this.showAppsButton = false; this.showDimmingButton = false; this.showUserButton = false; this.showClock = false; this.showDate = false; this.showAppIcon = false; this.inactive = false; this.appButtonBreakpointPx = 500; this.dimmingButtonBreakpointPx = 500; this.appTitleBreakpointPx = 500; this.userButtonBreakpointPx = 500; this.appIconBreakpointPx = 500; this.settings = false; this.breadcrumbItems = []; this.leftButtonEvent = null; this.leftButtonTimeout = null; this.isLeftButtonDown = false; this.isEmergencyBrightness = false; } dimmingButtonClicked() { /** * Fired when the dimming (day/night) button is clicked. * @event dimming-button-clicked */ this.dispatchEvent(new CustomEvent(\"dimming-button-clicked\")); } appsButtonClicked() { /** * Fired when the apps button is clicked. * @event apps-button-clicked */ this.dispatchEvent(new CustomEvent(\"apps-button-clicked\")); } /** * Copies the deprecated `leftMoreButtonActivated` into * `moreButtonActivated`. A plain field rather than a getter/setter alias: * the Vue wrapper writes every prop back on its second render, and a getter * would then write `false` over the new property. */ willUpdate(changed) { super.willUpdate(changed); if (changed.has(\"leftMoreButtonActivated\") && this.leftMoreButtonActivated !== void 0) this.moreButtonActivated = this.leftMoreButtonActivated; } moreButtonClicked() { /** * Fired when the more button is clicked. * @event more-button-clicked */ this.dispatchEvent(new CustomEvent(\"more-button-clicked\")); /** * Deprecated alias of `more-button-clicked`; removed in 4.0.0. * @event left-more-button-clicked */ this.dispatchEvent(new CustomEvent(\"left-more-button-clicked\")); } userButtonClicked() { /** * Fired when the user/profile button is clicked. * @event user-button-clicked */ this.dispatchEvent(new CustomEvent(\"user-button-clicked\")); } leftButtonDown(event) { this.leftButtonEvent = event; this.isLeftButtonDown = true; this.leftButtonTimeout = setTimeout(() => { this.leftButtonEvent = null; this.dispatchEvent(new CustomEvent(\"emergency-brightness-start\")); this.isEmergencyBrightness = true; }, 500); } /** * Ends a hold. The event a short press stands for is dispatched from the * `click` that follows, not here: a menu opened while the pointer is still * going up gets closed again by that same click in current browsers, which * see it as a click outside a popover that has just opened. */ leftButtonUp() { if (this.leftButtonTimeout) { clearTimeout(this.leftButtonTimeout); this.leftButtonTimeout = null; } if (this.isEmergencyBrightness) { this.dispatchEvent(new CustomEvent(\"emergency-brightness-stop\")); this.isEmergencyBrightness = false; } this.isLeftButtonDown = false; } /** * Sends the event a press of the hold button stands for. * * Enter, Space and a screen reader's activate command arrive as a `click` * with `detail` 0 and no pointer press before it, so they get the event * directly. A pointer click arrives with `detail` 1 after the press: the * event stored on the way down is sent now, unless the press ran long * enough to start emergency brightness, which used it up. */ leftButtonActivate(event, type) { if (event.detail === 0) { this.dispatchEvent(new CustomEvent(type)); return; } if (!this.leftButtonEvent) return; this.dispatchEvent(this.leftButtonEvent); this.leftButtonEvent = null; } leftButtonLeave() { if (!this.isLeftButtonDown) return; if (this.leftButtonTimeout) { clearInterval(this.leftButtonTimeout); this.leftButtonTimeout = null; } if (this.isEmergencyBrightness) { this.dispatchEvent(new CustomEvent(\"emergency-brightness-stop\")); this.isEmergencyBrightness = false; } this.isLeftButtonDown = false; } render() { const leftGroup = []; if (this.settings) { leftGroup.push(html`<div class=\"menu-button\"> <obc-icon-button variant=\"flat\" aria-label=${msg(\"Close\")} @pointerdown=${() => this.leftButtonDown(new CustomEvent(\"close\"))} @pointerup=${() => this.leftButtonUp()} @pointerleave=${() => this.leftButtonLeave()} @click=${(event) => this.leftButtonActivate(event, \"close\")} > <obi-close-google></obi-close-google> </obc-icon-button> </div>`); leftGroup.push(html`<obc-icon-button variant=\"flat\" aria-label=${msg(\"Back\")} @click=${() => this.dispatchEvent(new CustomEvent(\"back\"))} > <obi-arrow-left-google></obi-arrow-left-google> </obc-icon-button>`); leftGroup.push(html`<div class=\"title\">${this.appTitle}</div>`); leftGroup.push(html`<obc-breadcrumb .items=${this.breadcrumbItems} @breadcrumb-click=${(e) => this.dispatchEvent(new CustomEvent(\"breadcrumb-click\", { detail: e.detail }))} ></obc-breadcrumb>`); } else { if (!this.inactive) leftGroup.push(html`<div class=\"menu-button ${this.wideMenuButton ? \"wide\" : null}\"> <obc-icon-button variant=\"flat\" aria-label=${this.menuButtonIcon === \"menu\" ? msg(\"Menu\") : msg(\"Home\")} @pointerdown=${() => this.leftButtonDown(new CustomEvent(\"menu-button-clicked\"))} @pointerup=${() => this.leftButtonUp()} @pointerleave=${() => this.leftButtonLeave()} @click=${(event) => this.leftButtonActivate(event, \"menu-button-clicked\")} ?activated=${this.menuButtonActivated} > ${this.menuButtonIcon === \"menu\" ? html`<obi-menu-iec></obi-menu-iec>` : html`<obi-home></obi-home>`} </obc-icon-button> </div>`); if (this.showAppIcon) leftGroup.push(html`<div class=\"app-icon\"><slot name=\"app-icon\"></slot></div>`); leftGroup.push(html`<div class=\"title\">${this.appTitle}</div>`); leftGroup.push(html`<div class=\"page-name\">${this.pageName}</div>`); leftGroup.push(html`<slot name=\"command-button\"></slot>`); } const breakpointMoreButton = Math.max(this.appButtonBreakpointPx, this.dimmingButtonBreakpointPx, this.userButtonBreakpointPx, this.appIconBreakpointPx); return html` <style> @media (max-width: ${breakpointMoreButton}px) { .more-button { display: revert !important; } .group.left > * { margin-right: 4px; margin-left: 4px; } } @media (max-width: ${this.appButtonBreakpointPx}px) { .apps-button { display: none; } } @media (max-width: ${this.dimmingButtonBreakpointPx}px) { .dimming-button { display: none; } } @media (max-width: ${this.appTitleBreakpointPx}px) { .title { display: none !important; /* the stylesheet's display wins over this inline rule otherwise */ } } @media (max-width: ${this.userButtonBreakpointPx}px) { .user-button { display: none; } } @media (max-width: ${this.appIconBreakpointPx}px) { .app-icon { display: none; } } </style> <nav class=${classMap({ wrapper: true, inactive: this.inactive, settings: this.settings, tall: this.tall })} > <div class=\"left group\">${leftGroup}</div> <div class=\"right group\"> <div class=\"alert-container\"> <slot name=\"alerts\"></slot> </div> ${this.showDimmingButton && !this.inactive ? html`<obc-icon-button class=\"dimming-button\" part=\"dimming-button\" variant=\"flat\" aria-label=${msg(\"Dimming\")} @click=${this.dimmingButtonClicked} ?activated=${this.dimmingButtonActivated} > <obi-palette-day-night-iec></obi-palette-day-night-iec> </obc-icon-button>` : null} ${this.showUserButton && !this.inactive ? html`<obc-icon-button class=\"user-button\" variant=\"flat\" part=\"user-button\" aria-label=${msg(\"User\")} @click=${this.userButtonClicked} ?activated=${this.userButtonActivated} ?disabled=${this.userButtonDisabled} > <obi-user></obi-user> </obc-icon-button>` : null} ${this.showAppsButton && !this.inactive ? html`<obc-icon-button class=\"apps-button\" variant=\"flat\" part=\"apps-button\" aria-label=${msg(\"Apps\")} @click=${this.appsButtonClicked} ?activated=${this.appsButtonActivated} > <obi-applications></obi-applications> </obc-icon-button>` : null} ${this.showClock ? html`<slot name=\"clock\"></slot>` : null} ${!this.inactive ? html`<obc-icon-button class=\"more-button\" part=\"more-button left-more-button\" variant=\"flat\" aria-label=${msg(\"More\")} @click=${this.moreButtonClicked} ?activated=${this.moreButtonActivated} > <obi-more-vertical-google></obi-more-vertical-google> </obc-icon-button>` : null} </div> </nav> `; } static { this.styles = unsafeCSS(top_bar_default); } }"
7459
7459
  }
7460
7460
  ],
7461
7461
  "exports": [
@@ -74827,8 +74827,18 @@
74827
74827
  "declarations": [
74828
74828
  {
74829
74829
  "kind": "class",
74830
- "description": "`<obc-top-bar>` – A responsive top navigation bar component for application layouts.\n\nProvides a flexible, highly configurable top bar for application interfaces, supporting navigation, context display, quick actions, and status indicators. The top bar adapts to screen size and can show or hide elements such as menu, app icon, breadcrumbs, user/profile, clock, and alert notifications.\n\nAppears at the top of the UI, organizing primary navigation and contextual actions in a single, persistent region. Designed for use as the main app bar or header in multi-pane or dashboard-style layouts.\n\n## Features\n- **Configurable Sections:** Supports left and right-aligned groups for navigation, context, and actions.\n- **Menu Button:** Optional menu button for opening navigation drawers or sidebars; can be styled as wide or regular.\n- **App Icon Slot:** Customizable slot for displaying an application or brand icon.\n- **App Title & Page Name:** Displays the current application and page context.\n- **Breadcrumbs:** Optional breadcrumb navigation for hierarchical context (in settings mode).\n- **Command Button Slot:** Slot for inserting a primary command/action button.\n- **Alert/Notification Area:** Slot for alert indicators, notification badges, or custom alert components.\n- **Dimming Button:** Optional button for toggling display modes (e.g., day/night).\n- **User/Profile Button:** Optional user icon for profile/account actions.\n- **Apps Button:** Optional button for accessing additional applications or modules.\n- **Clock & Date:** Optional digital clock and date display, responsive to screen size.\n- **Responsive Layout:** Multiple breakpoint properties to control visibility and layout of elements based on viewport width.\n- **Settings Mode:** Special mode with close, back, and forward navigation, breadcrumbs, and app title.\n- **Tall Variant:** Optional increased height for touch or accessibility needs.\n- **Inactive State:** Disables interactive elements and visually de-emphasizes the bar.\n\n## Variants\n- **Regular:** Standard top bar with menu, app icon, title, page name, and action slots.\n- **Settings:** Shows close, back, forward buttons, breadcrumbs, and app title for configuration or settings screens.\n- **Inactive:** Visually muted and disables interaction (e.g., when the app is locked or in a modal state).\n- **Tall:** Increases the height of the bar for improved touch targets.\n\n## Usage Guidelines\nUse `<obc-top-bar>` as the persistent header for your application, providing navigation, context, and quick access to key actions or status. Configure which elements appear via boolean properties and slots. Adjust breakpoint properties to control responsive behavior for each section.\n\n- Place navigation, branding, and context (title, breadcrumbs) on the left; actions, alerts, and status (clock, user, apps) on the right.\n- Use the `settings` property for configuration or setup screens to enable close/back/forward navigation and breadcrumbs.\n- Use the `inactive` property to visually disable the bar and its actions when the app is not interactive.\n- Insert custom icons or buttons using the `app-icon` and `command-button` slots.\n- Use the `alerts` slot to display alert indicators, notification badges, or custom alert components.\n\n**TODO(designer):** Clarify recommended combinations of visible elements for different app contexts (e.g., when to show both user and apps buttons, or best practices for alert placement).\n\n## Slots\n\n| Slot Name | Renders When... | Purpose |\n|------------------|---------------------------------|----------------------------------------------------------------|\n| `app-icon` | `showAppIcon` is true | Custom icon representing the application or brand. |\n| `command-button` | Always (if provided) | Primary command or action button for the current context. |\n| `alerts` | Always (if provided) | Area for alert indicators, notification badges, or alert items.|\n| `clock` | Always (if provided) | Clock component for displaying the current time. |\n\n## Events\n- `menu-button-clicked` – Fired when the menu button is clicked.\n- `dimming-button-clicked` – Fired when the dimming (day/night) button is clicked.\n- `apps-button-clicked` – Fired when the apps button is clicked.\n- `left-more-button-clicked` – Fired when the left more button is clicked.\n- `user-button-clicked` – Fired when the user/profile button is clicked.\n- `close` – Fired in settings mode when the close button is clicked.\n- `back` – Fired in settings mode when the back button is clicked.\n- `forward` – Fired in settings mode when the forward button is clicked.\n- `emergency-brightness-start` – Fired when the menu button is held for 500ms. This should increase the brightness of the screen slowly. Used when the screen is too dark.\n- `emergency-brightness-stop` – Fired when the menu button is released.\n\n## Keyboard\nEvery control in the bar is its own tab stop and activates on `Enter` and\n`Space`. The bar is a navigation landmark, not an APG toolbar: its controls\nare separate components and slotted consumer content, so a roving tabindex\nacross them is deliberately not implemented. The emergency-brightness hold\nis a pointer gesture only; from the keyboard the menu button opens the menu.\n\n## Best Practices and Constraints\n- Only show interactive elements relevant to the current context to avoid clutter.\n- Use the `alerts` slot for transient or critical notifications; persistent alerts may require a different component.\n- For accessibility, give all interactive elements labels and focus handling.\n- Adjust breakpoint properties to optimize the layout for different device sizes.\n- In settings mode, use breadcrumbs to provide clear navigation context.\n\n## Example\n\n```html\n<obc-top-bar\n appTitle=\"My App\"\n pageName=\"Dashboard\"\n showAppsButton\n showDimmingButton\n showClock\n showUserButton\n showAppIcon\n>\n <obi-placeholder slot=\"app-icon\"></obi-placeholder>\n <obc-command-button slot=\"command-button\"></obc-command-button>\n <obc-topbar-message-item slot=\"alerts\"></obc-topbar-message-item>\n <obc-clock slot=\"clock\"></obc-clock>\n</obc-top-bar>\n```",
74830
+ "description": "`<obc-top-bar>` – A responsive top navigation bar component for application layouts.\n\nProvides a flexible, highly configurable top bar for application interfaces, supporting navigation, context display, quick actions, and status indicators. The top bar adapts to screen size and can show or hide elements such as menu, app icon, breadcrumbs, user/profile, clock, and alert notifications.\n\nAppears at the top of the UI, organizing primary navigation and contextual actions in a single, persistent region. Designed for use as the main app bar or header in multi-pane or dashboard-style layouts.\n\n## Features\n- **Configurable Sections:** Supports left and right-aligned groups for navigation, context, and actions.\n- **Menu Button:** Optional menu button for opening navigation drawers or sidebars; can be styled as wide or regular.\n- **App Icon Slot:** Customizable slot for displaying an application or brand icon.\n- **App Title & Page Name:** Displays the current application and page context.\n- **Breadcrumbs:** Optional breadcrumb navigation for hierarchical context (in settings mode).\n- **Command Button Slot:** Slot for inserting a primary command/action button.\n- **Alert/Notification Area:** Slot for alert indicators, notification badges, or custom alert components.\n- **Dimming Button:** Optional button for toggling display modes (e.g., day/night).\n- **User/Profile Button:** Optional user icon for profile/account actions.\n- **Apps Button:** Optional button for accessing additional applications or modules.\n- **Clock & Date:** Optional digital clock and date display, responsive to screen size.\n- **Responsive Layout:** Multiple breakpoint properties to control visibility and layout of elements based on viewport width.\n- **Settings Mode:** Special mode with close, back, and forward navigation, breadcrumbs, and app title.\n- **Tall Variant:** Optional increased height for touch or accessibility needs.\n- **Inactive State:** Disables interactive elements and visually de-emphasizes the bar.\n\n## Variants\n- **Regular:** Standard top bar with menu, app icon, title, page name, and action slots.\n- **Settings:** Shows close, back, forward buttons, breadcrumbs, and app title for configuration or settings screens.\n- **Inactive:** Visually muted and disables interaction (e.g., when the app is locked or in a modal state).\n- **Tall:** Increases the height of the bar for improved touch targets.\n\n## Usage Guidelines\nUse `<obc-top-bar>` as the persistent header for your application, providing navigation, context, and quick access to key actions or status. Configure which elements appear via boolean properties and slots. Adjust breakpoint properties to control responsive behavior for each section.\n\n- Place navigation, branding, and context (title, breadcrumbs) on the left; actions, alerts, and status (clock, user, apps) on the right.\n- Use the `settings` property for configuration or setup screens to enable close/back/forward navigation and breadcrumbs.\n- Use the `inactive` property to visually disable the bar and its actions when the app is not interactive.\n- Insert custom icons or buttons using the `app-icon` and `command-button` slots.\n- Use the `alerts` slot to display alert indicators, notification badges, or custom alert components.\n\n**TODO(designer):** Clarify recommended combinations of visible elements for different app contexts (e.g., when to show both user and apps buttons, or best practices for alert placement).\n\n## Slots\n\n| Slot Name | Renders When... | Purpose |\n|------------------|---------------------------------|----------------------------------------------------------------|\n| `app-icon` | `showAppIcon` is true | Custom icon representing the application or brand. |\n| `command-button` | Always (if provided) | Primary command or action button for the current context. |\n| `alerts` | Always (if provided) | Area for alert indicators, notification badges, or alert items.|\n| `clock` | Always (if provided) | Clock component for displaying the current time. |\n\n## Events\n- `menu-button-clicked` – Fired when the menu button is clicked.\n- `dimming-button-clicked` – Fired when the dimming (day/night) button is clicked.\n- `apps-button-clicked` – Fired when the apps button is clicked.\n- `more-button-clicked` – Fired when the more button is clicked.\n- `left-more-button-clicked` – Deprecated alias of `more-button-clicked`, fired with it; removed in 4.0.0.\n- `user-button-clicked` – Fired when the user/profile button is clicked.\n- `close` – Fired in settings mode when the close button is clicked.\n- `back` – Fired in settings mode when the back button is clicked.\n- `forward` – Fired in settings mode when the forward button is clicked.\n- `emergency-brightness-start` – Fired when the menu button is held for 500ms. This should increase the brightness of the screen slowly. Used when the screen is too dark.\n- `emergency-brightness-stop` – Fired when the menu button is released.\n\n## Keyboard\nEvery control in the bar is its own tab stop and activates on `Enter` and\n`Space`. The bar is a navigation landmark, not an APG toolbar: its controls\nare separate components and slotted consumer content, so a roving tabindex\nacross them is deliberately not implemented. The emergency-brightness hold\nis a pointer gesture only; from the keyboard the menu button opens the menu.\n\n## Best Practices and Constraints\n- Only show interactive elements relevant to the current context to avoid clutter.\n- Use the `alerts` slot for transient or critical notifications; persistent alerts may require a different component.\n- For accessibility, give all interactive elements labels and focus handling.\n- Adjust breakpoint properties to optimize the layout for different device sizes.\n- In settings mode, use breadcrumbs to provide clear navigation context.\n\n## Example\n\n```html\n<obc-top-bar\n appTitle=\"My App\"\n pageName=\"Dashboard\"\n showAppsButton\n showDimmingButton\n showClock\n showUserButton\n showAppIcon\n>\n <obi-placeholder slot=\"app-icon\"></obi-placeholder>\n <obc-command-button slot=\"command-button\"></obc-command-button>\n <obc-topbar-message-item slot=\"alerts\"></obc-topbar-message-item>\n <obc-clock slot=\"clock\"></obc-clock>\n</obc-top-bar>\n```",
74831
74831
  "name": "ObcTopBar",
74832
+ "cssParts": [
74833
+ {
74834
+ "description": "The more button shown below the breakpoints.",
74835
+ "name": "more-button"
74836
+ },
74837
+ {
74838
+ "description": "Deprecated alias of the `more-button` part; removed in 4.0.0.",
74839
+ "name": "left-more-button"
74840
+ }
74841
+ ],
74832
74842
  "slots": [
74833
74843
  {
74834
74844
  "description": "Custom icon representing the application or brand (shown when `showAppIcon` is true)",
@@ -74899,12 +74909,20 @@
74899
74909
  },
74900
74910
  {
74901
74911
  "kind": "field",
74902
- "name": "leftMoreButtonActivated",
74912
+ "name": "moreButtonActivated",
74903
74913
  "type": {
74904
74914
  "text": "boolean"
74905
74915
  },
74906
74916
  "default": "false",
74907
- "description": "Highlights the left more button as active."
74917
+ "description": "Highlights the more button as active."
74918
+ },
74919
+ {
74920
+ "kind": "field",
74921
+ "name": "leftMoreButtonActivated",
74922
+ "type": {
74923
+ "text": "boolean | undefined"
74924
+ },
74925
+ "deprecated": "Use `moreButtonActivated`. Removed in 4.0.0."
74908
74926
  },
74909
74927
  {
74910
74928
  "kind": "field",
@@ -75080,7 +75098,25 @@
75080
75098
  },
75081
75099
  {
75082
75100
  "kind": "method",
75083
- "name": "leftMoreButtonClicked",
75101
+ "name": "willUpdate",
75102
+ "return": {
75103
+ "type": {
75104
+ "text": "void"
75105
+ }
75106
+ },
75107
+ "parameters": [
75108
+ {
75109
+ "name": "changed",
75110
+ "type": {
75111
+ "text": "PropertyValues<this>"
75112
+ }
75113
+ }
75114
+ ],
75115
+ "description": "Copies the deprecated `leftMoreButtonActivated` into\n`moreButtonActivated`. A plain field rather than a getter/setter alias:\nthe Vue wrapper writes every prop back on its second render, and a getter\nwould then write `false` over the new property."
75116
+ },
75117
+ {
75118
+ "kind": "method",
75119
+ "name": "moreButtonClicked",
75084
75120
  "privacy": "private"
75085
75121
  },
75086
75122
  {
@@ -75193,12 +75229,19 @@
75193
75229
  },
75194
75230
  "description": "Fired when the apps button is clicked"
75195
75231
  },
75232
+ {
75233
+ "name": "more-button-clicked",
75234
+ "type": {
75235
+ "text": "CustomEvent"
75236
+ },
75237
+ "description": "Fired when the more button is clicked"
75238
+ },
75196
75239
  {
75197
75240
  "name": "left-more-button-clicked",
75198
75241
  "type": {
75199
75242
  "text": "CustomEvent"
75200
75243
  },
75201
- "description": "Fired when the left more button is clicked"
75244
+ "description": "Deprecated: listen to `more-button-clicked` instead. Fired together with it; removed in 4.0.0."
75202
75245
  },
75203
75246
  {
75204
75247
  "name": "user-button-clicked",
@@ -73,7 +73,7 @@ var top_bar_default = css`* {
73
73
  /* Controls never shrink: a squeeze reaches the texts, then overflows the end */
74
74
  .menu-button,
75
75
  .app-icon,
76
- .left-more-button,
76
+ .more-button,
77
77
  .dimming-button,
78
78
  .user-button,
79
79
  .apps-button,
@@ -129,7 +129,7 @@ var top_bar_default = css`* {
129
129
  "ss04" on;
130
130
  }
131
131
 
132
- .left-more-button {
132
+ .more-button {
133
133
  display: none;
134
134
  }
135
135
 
@@ -1 +1 @@
1
- {"version":3,"file":"top-bar.css.js","names":[],"sources":["../../../src/components/top-bar/top-bar.css?inline"],"sourcesContent":["* {\n box-sizing: border-box;\n}\n\n.wrapper {\n height: var(--app-components-topbar-touch-target-size);\n padding: 0px var(--app-components-topbar-margin-global);\n user-select: none;\n\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n &:not(.inactive) {\n background: var(--container-global-color, #fcfcfc);\n box-shadow: var(--shadow-flat);\n }\n\n &.tall {\n height: var(--app-components-topbar-touch-target-tall);\n }\n\n &.inactive {\n padding-left: calc(\n var(--app-components-topbar-margin-global) +\n var(--app-components-topbar-padding-left-small)\n ); /* no menu button: inset the title instead */\n }\n}\n\n/* ---- One flex line ----\n Flattened because a squeeze must reach the texts, not a group: a shrinkable\n left group collapses under an unshrinkable alert and covers the menu button. */\n\n.group {\n display: contents;\n\n .settings &.left > * {\n margin-right: 0;\n margin-left: 0;\n }\n\n &.left .title {\n padding-right: var(--app-components-topbar-label-spacing);\n }\n\n &.left .menu-button {\n margin-right: 0;\n margin-left: 0;\n\n &.wide {\n margin-left: 8px;\n margin-right: 8px;\n }\n }\n\n .app-icon {\n padding-right: var(--app-components-topbar-label-spacing);\n width: var(--app-components-topbar-icon-size);\n height: var(--app-components-topbar-icon-size);\n box-sizing: content-box;\n color: var(--element-neutral-color);\n }\n}\n\n/* Controls never shrink: a squeeze reaches the texts, then overflows the end */\n.menu-button,\n.app-icon,\n.left-more-button,\n.dimming-button,\n.user-button,\n.apps-button,\n::slotted([slot=\"command-button\"]),\n::slotted([slot=\"clock\"]) {\n flex-shrink: 0;\n}\n\n.alert-container {\n display: flex;\n flex: 1 1 0; /* zero basis: fills what the texts leave, holds its min-content in a squeeze */\n gap: var(--app-components-topbar-label-spacing);\n align-items: center;\n justify-content: right;\n}\n\n/* ---- Text gives way first ---- */\n\n.title,\n.page-name {\n overflow: hidden;\n color: var(--element-active-color, #1a1a1a);\n}\n\n.title {\n flex-shrink: 3; /* the app title gives way before the page name */\n min-width: 2em; /* room for \"A…\": narrower boxes paint a clipped glyph instead */\n white-space: nowrap;\n text-overflow: ellipsis;\n @mixin font-body;\n}\n\n.page-name {\n min-width: 0; /* shrink below the longest word instead of pushing buttons out */\n display: -webkit-box; /* two lines, then an ellipsis */\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n @mixin font-body-active;\n}\n\n.left-more-button {\n display: none;\n}\n\n.divider {\n width: 1px;\n height: var(--ui-components-divider-height-small);\n background: var(--border-divider-color);\n}\n"],"mappings":""}
1
+ {"version":3,"file":"top-bar.css.js","names":[],"sources":["../../../src/components/top-bar/top-bar.css?inline"],"sourcesContent":["* {\n box-sizing: border-box;\n}\n\n.wrapper {\n height: var(--app-components-topbar-touch-target-size);\n padding: 0px var(--app-components-topbar-margin-global);\n user-select: none;\n\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n &:not(.inactive) {\n background: var(--container-global-color, #fcfcfc);\n box-shadow: var(--shadow-flat);\n }\n\n &.tall {\n height: var(--app-components-topbar-touch-target-tall);\n }\n\n &.inactive {\n padding-left: calc(\n var(--app-components-topbar-margin-global) +\n var(--app-components-topbar-padding-left-small)\n ); /* no menu button: inset the title instead */\n }\n}\n\n/* ---- One flex line ----\n Flattened because a squeeze must reach the texts, not a group: a shrinkable\n left group collapses under an unshrinkable alert and covers the menu button. */\n\n.group {\n display: contents;\n\n .settings &.left > * {\n margin-right: 0;\n margin-left: 0;\n }\n\n &.left .title {\n padding-right: var(--app-components-topbar-label-spacing);\n }\n\n &.left .menu-button {\n margin-right: 0;\n margin-left: 0;\n\n &.wide {\n margin-left: 8px;\n margin-right: 8px;\n }\n }\n\n .app-icon {\n padding-right: var(--app-components-topbar-label-spacing);\n width: var(--app-components-topbar-icon-size);\n height: var(--app-components-topbar-icon-size);\n box-sizing: content-box;\n color: var(--element-neutral-color);\n }\n}\n\n/* Controls never shrink: a squeeze reaches the texts, then overflows the end */\n.menu-button,\n.app-icon,\n.more-button,\n.dimming-button,\n.user-button,\n.apps-button,\n::slotted([slot=\"command-button\"]),\n::slotted([slot=\"clock\"]) {\n flex-shrink: 0;\n}\n\n.alert-container {\n display: flex;\n flex: 1 1 0; /* zero basis: fills what the texts leave, holds its min-content in a squeeze */\n gap: var(--app-components-topbar-label-spacing);\n align-items: center;\n justify-content: right;\n}\n\n/* ---- Text gives way first ---- */\n\n.title,\n.page-name {\n overflow: hidden;\n color: var(--element-active-color, #1a1a1a);\n}\n\n.title {\n flex-shrink: 3; /* the app title gives way before the page name */\n min-width: 2em; /* room for \"A…\": narrower boxes paint a clipped glyph instead */\n white-space: nowrap;\n text-overflow: ellipsis;\n @mixin font-body;\n}\n\n.page-name {\n min-width: 0; /* shrink below the longest word instead of pushing buttons out */\n display: -webkit-box; /* two lines, then an ellipsis */\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n @mixin font-body-active;\n}\n\n.more-button {\n display: none;\n}\n\n.divider {\n width: 1px;\n height: var(--ui-components-divider-height-small);\n background: var(--border-divider-color);\n}\n"],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { LitElement } from 'lit';
1
+ import { LitElement, PropertyValues } from 'lit';
2
2
  import { BreadcrumbItem } from '../breadcrumb/breadcrumb.js';
3
3
  import '../icon-button/icon-button.js';
4
4
  import '../clock/clock.js';
@@ -71,7 +71,8 @@ export declare enum ObcTopBarMenuButtonIcon {
71
71
  * - `menu-button-clicked` – Fired when the menu button is clicked.
72
72
  * - `dimming-button-clicked` – Fired when the dimming (day/night) button is clicked.
73
73
  * - `apps-button-clicked` – Fired when the apps button is clicked.
74
- * - `left-more-button-clicked` – Fired when the left more button is clicked.
74
+ * - `more-button-clicked` – Fired when the more button is clicked.
75
+ * - `left-more-button-clicked` – Deprecated alias of `more-button-clicked`, fired with it; removed in 4.0.0.
75
76
  * - `user-button-clicked` – Fired when the user/profile button is clicked.
76
77
  * - `close` – Fired in settings mode when the close button is clicked.
77
78
  * - `back` – Fired in settings mode when the back button is clicked.
@@ -122,8 +123,8 @@ export declare enum ObcTopBarMenuButtonIcon {
122
123
  * @availableWhen dimmingButtonActivated showDimmingButton==true && inactive==false
123
124
  * @property appsButtonActivated - Highlights the apps button as active.
124
125
  * @availableWhen appsButtonActivated showAppsButton==true && inactive==false
125
- * @property leftMoreButtonActivated - Highlights the left more button as active.
126
- * @availableWhen leftMoreButtonActivated inactive==false
126
+ * @property moreButtonActivated - Highlights the more button as active.
127
+ * @availableWhen moreButtonActivated inactive==false
127
128
  * @property userButtonActivated - Highlights the user/profile button as active.
128
129
  * @availableWhen userButtonActivated showUserButton==true && inactive==false
129
130
  * @property userButtonDisabled - Disables the user/profile button.
@@ -153,13 +154,16 @@ export declare enum ObcTopBarMenuButtonIcon {
153
154
  * @fires menu-button-clicked - Fired when the menu button is clicked
154
155
  * @fires dimming-button-clicked - Fired when the dimming (day/night) button is clicked
155
156
  * @fires apps-button-clicked - Fired when the apps button is clicked
156
- * @fires left-more-button-clicked - Fired when the left more button is clicked
157
+ * @fires more-button-clicked - Fired when the more button is clicked
158
+ * @fires left-more-button-clicked - Deprecated: listen to `more-button-clicked` instead. Fired together with it; removed in 4.0.0.
157
159
  * @fires user-button-clicked - Fired when the user/profile button is clicked
158
160
  * @fires close - Fired in settings mode when the close button is clicked
159
161
  * @fires back - Fired in settings mode when the back button is clicked
160
162
  * @fires emergency-brightness-start - Fired when the menu button is held for 500ms. This should increase the brightness of the screen slowly. Used when the screen is too dark.
161
163
  * @fires emergency-brightness-stop - Fired when the menu button is released.
162
164
  * @fires {BreadcrumbClickEvent} breadcrumb-click - Fired when a breadcrumb item is clicked.
165
+ * @csspart more-button - The more button shown below the breakpoints.
166
+ * @csspart left-more-button - Deprecated alias of the `more-button` part; removed in 4.0.0.
163
167
  * @stable
164
168
  */
165
169
  export declare class ObcTopBar extends LitElement {
@@ -174,8 +178,12 @@ export declare class ObcTopBar extends LitElement {
174
178
  dimmingButtonActivated: boolean;
175
179
  /** Highlights the apps button as active. */
176
180
  appsButtonActivated: boolean;
177
- /** Highlights the left more button as active. */
178
- leftMoreButtonActivated: boolean;
181
+ /** Highlights the more button as active. */
182
+ moreButtonActivated: boolean;
183
+ /**
184
+ * @deprecated Use `moreButtonActivated`. Removed in 4.0.0.
185
+ */
186
+ leftMoreButtonActivated?: boolean;
179
187
  /** Highlights the user/profile button as active. */
180
188
  userButtonActivated: boolean;
181
189
  /** Disables the user/profile button. */
@@ -214,7 +222,14 @@ export declare class ObcTopBar extends LitElement {
214
222
  breadcrumbItems: BreadcrumbItem[];
215
223
  private dimmingButtonClicked;
216
224
  private appsButtonClicked;
217
- private leftMoreButtonClicked;
225
+ /**
226
+ * Copies the deprecated `leftMoreButtonActivated` into
227
+ * `moreButtonActivated`. A plain field rather than a getter/setter alias:
228
+ * the Vue wrapper writes every prop back on its second render, and a getter
229
+ * would then write `false` over the new property.
230
+ */
231
+ willUpdate(changed: PropertyValues<this>): void;
232
+ private moreButtonClicked;
218
233
  private userButtonClicked;
219
234
  private leftButtonEvent;
220
235
  private leftButtonTimeout;
@@ -1 +1 @@
1
- {"version":3,"file":"top-bar.d.ts","sourceRoot":"","sources":["../../../src/components/top-bar/top-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAKhD,OAAO,+BAA+B,CAAC;AACvC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,6BAA6B,CAAC;AACrC,OAAO,8BAA8B,CAAC;AACtC,OAAO,0BAA0B,CAAC;AAClC,OAAO,kCAAkC,CAAC;AAC1C,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B,mBAAmB,UAAS;IAG5B,mBAAmB,UAAS;IAE5B;;OAEG;IAEH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAGlC,mBAAmB,UAAS;IAG5B,kBAAkB,UAAS;IAEA,IAAI,UAAS;IAEb,cAAc,UAAS;IAEvB,cAAc,UAAS;IAGlD,iBAAiB,UAAS;IAEC,cAAc,UAAS;IAEvB,SAAS,UAAS;IAElB,QAAQ,UAAS;IAEjB,WAAW,UAAS;IAEpB,QAAQ,UAAS;IAG5C,qBAAqB,SAAO;IAG5B,yBAAyB,SAAO;IAGhC,oBAAoB,SAAO;IAG3B,sBAAsB,SAAO;IAG7B,mBAAmB,SAAO;IAEC,QAAQ,UAAS;IAG5C,eAAe,EAAE,cAAc,EAAE,CAAM;IAEvC,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,iBAAiB;IAQzB;;;;;OAKG;IACM,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAUxD,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,eAAe,CAA4B;IACnD,OAAO,CAAC,iBAAiB,CAA+B;IACxD,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,qBAAqB,CAAS;IAEtC,OAAO,CAAC,cAAc;IAUtB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAYpB;;;;;;;;OAQG;IACH,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,eAAe;IAad,MAAM;IA2Mf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,SAAS,CAAC;KAC1B;CACF"}
@@ -33,7 +33,7 @@ var ObcTopBar = class ObcTopBar extends LitElement {
33
33
  this.menuButtonActivated = false;
34
34
  this.dimmingButtonActivated = false;
35
35
  this.appsButtonActivated = false;
36
- this.leftMoreButtonActivated = false;
36
+ this.moreButtonActivated = false;
37
37
  this.userButtonActivated = false;
38
38
  this.userButtonDisabled = false;
39
39
  this.tall = false;
@@ -71,9 +71,24 @@ var ObcTopBar = class ObcTopBar extends LitElement {
71
71
  */
72
72
  this.dispatchEvent(new CustomEvent("apps-button-clicked"));
73
73
  }
74
- leftMoreButtonClicked() {
74
+ /**
75
+ * Copies the deprecated `leftMoreButtonActivated` into
76
+ * `moreButtonActivated`. A plain field rather than a getter/setter alias:
77
+ * the Vue wrapper writes every prop back on its second render, and a getter
78
+ * would then write `false` over the new property.
79
+ */
80
+ willUpdate(changed) {
81
+ super.willUpdate(changed);
82
+ if (changed.has("leftMoreButtonActivated") && this.leftMoreButtonActivated !== void 0) this.moreButtonActivated = this.leftMoreButtonActivated;
83
+ }
84
+ moreButtonClicked() {
85
+ /**
86
+ * Fired when the more button is clicked.
87
+ * @event more-button-clicked
88
+ */
89
+ this.dispatchEvent(new CustomEvent("more-button-clicked"));
75
90
  /**
76
- * Fired when the left more button is clicked.
91
+ * Deprecated alias of `more-button-clicked`; removed in 4.0.0.
77
92
  * @event left-more-button-clicked
78
93
  */
79
94
  this.dispatchEvent(new CustomEvent("left-more-button-clicked"));
@@ -187,11 +202,11 @@ var ObcTopBar = class ObcTopBar extends LitElement {
187
202
  leftGroup.push(html`<div class="page-name">${this.pageName}</div>`);
188
203
  leftGroup.push(html`<slot name="command-button"></slot>`);
189
204
  }
190
- const breakpointMoreButton = Math.max(this.appButtonBreakpointPx, this.dimmingButtonBreakpointPx);
205
+ const breakpointMoreButton = Math.max(this.appButtonBreakpointPx, this.dimmingButtonBreakpointPx, this.userButtonBreakpointPx, this.appIconBreakpointPx);
191
206
  return html`
192
207
  <style>
193
208
  @media (max-width: ${breakpointMoreButton}px) {
194
- .left-more-button {
209
+ .more-button {
195
210
  display: revert !important;
196
211
  }
197
212
 
@@ -277,12 +292,12 @@ var ObcTopBar = class ObcTopBar extends LitElement {
277
292
  </obc-icon-button>` : null}
278
293
  ${this.showClock ? html`<slot name="clock"></slot>` : null}
279
294
  ${!this.inactive ? html`<obc-icon-button
280
- class="left-more-button"
281
- part="left-more-button"
295
+ class="more-button"
296
+ part="more-button left-more-button"
282
297
  variant="flat"
283
298
  aria-label=${msg("More")}
284
- @click=${this.leftMoreButtonClicked}
285
- ?activated=${this.leftMoreButtonActivated}
299
+ @click=${this.moreButtonClicked}
300
+ ?activated=${this.moreButtonActivated}
286
301
  >
287
302
  <obi-more-vertical-google></obi-more-vertical-google>
288
303
  </obc-icon-button>` : null}
@@ -300,6 +315,7 @@ __decorate([property({ type: String })], ObcTopBar.prototype, "menuButtonIcon",
300
315
  __decorate([property({ type: Boolean })], ObcTopBar.prototype, "menuButtonActivated", void 0);
301
316
  __decorate([property({ type: Boolean })], ObcTopBar.prototype, "dimmingButtonActivated", void 0);
302
317
  __decorate([property({ type: Boolean })], ObcTopBar.prototype, "appsButtonActivated", void 0);
318
+ __decorate([property({ type: Boolean })], ObcTopBar.prototype, "moreButtonActivated", void 0);
303
319
  __decorate([property({ type: Boolean })], ObcTopBar.prototype, "leftMoreButtonActivated", void 0);
304
320
  __decorate([property({ type: Boolean })], ObcTopBar.prototype, "userButtonActivated", void 0);
305
321
  __decorate([property({ type: Boolean })], ObcTopBar.prototype, "userButtonDisabled", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"top-bar.js","names":[],"sources":["../../../src/components/top-bar/top-bar.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {msg} from '@lit/localize';\nimport compentStyle from './top-bar.css?inline';\nimport '../icon-button/icon-button.js';\nimport '../clock/clock.js';\nimport '../divider/divider.js';\nimport '../breadcrumb/breadcrumb.js';\nimport '../../icons/icon-menu-iec.js';\nimport '../../icons/icon-home.js';\nimport '../../icons/icon-close-google.js';\nimport '../../icons/icon-arrow-left-google.js';\nimport '../../icons/icon-arrow-right-google.js';\nimport '../../icons/icon-palette-day-night-iec.js';\nimport '../../icons/icon-applications.js';\nimport '../../icons/icon-more-vertical-google.js';\nimport '../../icons/icon-user.js';\nimport {\n BreadcrumbClickEvent,\n BreadcrumbItem,\n} from '../breadcrumb/breadcrumb.js';\nimport {customElement} from '../../decorator.js';\n\nexport enum ObcTopBarMenuButtonIcon {\n Menu = 'menu',\n Home = 'home',\n}\n\n/**\n * `<obc-top-bar>` – A responsive top navigation bar component for application layouts.\n *\n * Provides a flexible, highly configurable top bar for application interfaces, supporting navigation, context display, quick actions, and status indicators. The top bar adapts to screen size and can show or hide elements such as menu, app icon, breadcrumbs, user/profile, clock, and alert notifications.\n *\n * Appears at the top of the UI, organizing primary navigation and contextual actions in a single, persistent region. Designed for use as the main app bar or header in multi-pane or dashboard-style layouts.\n *\n * ## Features\n * - **Configurable Sections:** Supports left and right-aligned groups for navigation, context, and actions.\n * - **Menu Button:** Optional menu button for opening navigation drawers or sidebars; can be styled as wide or regular.\n * - **App Icon Slot:** Customizable slot for displaying an application or brand icon.\n * - **App Title & Page Name:** Displays the current application and page context.\n * - **Breadcrumbs:** Optional breadcrumb navigation for hierarchical context (in settings mode).\n * - **Command Button Slot:** Slot for inserting a primary command/action button.\n * - **Alert/Notification Area:** Slot for alert indicators, notification badges, or custom alert components.\n * - **Dimming Button:** Optional button for toggling display modes (e.g., day/night).\n * - **User/Profile Button:** Optional user icon for profile/account actions.\n * - **Apps Button:** Optional button for accessing additional applications or modules.\n * - **Clock & Date:** Optional digital clock and date display, responsive to screen size.\n * - **Responsive Layout:** Multiple breakpoint properties to control visibility and layout of elements based on viewport width.\n * - **Settings Mode:** Special mode with close, back, and forward navigation, breadcrumbs, and app title.\n * - **Tall Variant:** Optional increased height for touch or accessibility needs.\n * - **Inactive State:** Disables interactive elements and visually de-emphasizes the bar.\n *\n * ## Variants\n * - **Regular:** Standard top bar with menu, app icon, title, page name, and action slots.\n * - **Settings:** Shows close, back, forward buttons, breadcrumbs, and app title for configuration or settings screens.\n * - **Inactive:** Visually muted and disables interaction (e.g., when the app is locked or in a modal state).\n * - **Tall:** Increases the height of the bar for improved touch targets.\n *\n * ## Usage Guidelines\n * Use `<obc-top-bar>` as the persistent header for your application, providing navigation, context, and quick access to key actions or status. Configure which elements appear via boolean properties and slots. Adjust breakpoint properties to control responsive behavior for each section.\n *\n * - Place navigation, branding, and context (title, breadcrumbs) on the left; actions, alerts, and status (clock, user, apps) on the right.\n * - Use the `settings` property for configuration or setup screens to enable close/back/forward navigation and breadcrumbs.\n * - Use the `inactive` property to visually disable the bar and its actions when the app is not interactive.\n * - Insert custom icons or buttons using the `app-icon` and `command-button` slots.\n * - Use the `alerts` slot to display alert indicators, notification badges, or custom alert components.\n *\n * **TODO(designer):** Clarify recommended combinations of visible elements for different app contexts (e.g., when to show both user and apps buttons, or best practices for alert placement).\n *\n * ## Slots\n *\n * | Slot Name | Renders When... | Purpose |\n * |------------------|---------------------------------|----------------------------------------------------------------|\n * | `app-icon` | `showAppIcon` is true | Custom icon representing the application or brand. |\n * | `command-button` | Always (if provided) | Primary command or action button for the current context. |\n * | `alerts` | Always (if provided) | Area for alert indicators, notification badges, or alert items.|\n * | `clock` | Always (if provided) | Clock component for displaying the current time. |\n *\n * ## Events\n * - `menu-button-clicked` – Fired when the menu button is clicked.\n * - `dimming-button-clicked` – Fired when the dimming (day/night) button is clicked.\n * - `apps-button-clicked` – Fired when the apps button is clicked.\n * - `left-more-button-clicked` – Fired when the left more button is clicked.\n * - `user-button-clicked` – Fired when the user/profile button is clicked.\n * - `close` – Fired in settings mode when the close button is clicked.\n * - `back` – Fired in settings mode when the back button is clicked.\n * - `forward` – Fired in settings mode when the forward button is clicked.\n * - `emergency-brightness-start` – Fired when the menu button is held for 500ms. This should increase the brightness of the screen slowly. Used when the screen is too dark.\n * - `emergency-brightness-stop` – Fired when the menu button is released.\n *\n * ## Keyboard\n * Every control in the bar is its own tab stop and activates on `Enter` and\n * `Space`. The bar is a navigation landmark, not an APG toolbar: its controls\n * are separate components and slotted consumer content, so a roving tabindex\n * across them is deliberately not implemented. The emergency-brightness hold\n * is a pointer gesture only; from the keyboard the menu button opens the menu.\n *\n * ## Best Practices and Constraints\n * - Only show interactive elements relevant to the current context to avoid clutter.\n * - Use the `alerts` slot for transient or critical notifications; persistent alerts may require a different component.\n * - For accessibility, give all interactive elements labels and focus handling.\n * - Adjust breakpoint properties to optimize the layout for different device sizes.\n * - In settings mode, use breadcrumbs to provide clear navigation context.\n *\n * ## Example\n *\n * ```html\n * <obc-top-bar\n * appTitle=\"My App\"\n * pageName=\"Dashboard\"\n * showAppsButton\n * showDimmingButton\n * showClock\n * showUserButton\n * showAppIcon\n * >\n * <obi-placeholder slot=\"app-icon\"></obi-placeholder>\n * <obc-command-button slot=\"command-button\"></obc-command-button>\n * <obc-topbar-message-item slot=\"alerts\"></obc-topbar-message-item>\n * <obc-clock slot=\"clock\"></obc-clock>\n * </obc-top-bar>\n * ```\n *\n * @availableWhen menuButtonIcon settings==false && inactive==false\n * @property appTitle - Sets the main application title displayed in the top bar.\n * @property pageName - Sets the current page or section name displayed in the top bar.\n * @availableWhen pageName settings==false\n * @property menuButtonActivated - Highlights the menu button as active.\n * @availableWhen menuButtonActivated settings==false && inactive==false\n * @property dimmingButtonActivated - Highlights the dimming (day/night) button as active.\n * @availableWhen dimmingButtonActivated showDimmingButton==true && inactive==false\n * @property appsButtonActivated - Highlights the apps button as active.\n * @availableWhen appsButtonActivated showAppsButton==true && inactive==false\n * @property leftMoreButtonActivated - Highlights the left more button as active.\n * @availableWhen leftMoreButtonActivated inactive==false\n * @property userButtonActivated - Highlights the user/profile button as active.\n * @availableWhen userButtonActivated showUserButton==true && inactive==false\n * @property userButtonDisabled - Disables the user/profile button.\n * @availableWhen userButtonDisabled showUserButton==true && inactive==false\n * @property tall - Increases the height of the top bar for larger touch targets.\n * @property wideMenuButton - Expands the menu button for wide-rail layouts.\n * @availableWhen wideMenuButton settings==false && inactive==false\n * @property showAppsButton - Shows or hides the apps button.\n * @property showDimmingButton - Shows or hides the dimming (day/night) button.\n * @property showUserButton - Shows or hides the user/profile button.\n * @property showClock - Shows or hides the clock.\n * @property showDate - Shows or hides the date in the clock display.\n * @property showAppIcon - Shows or hides the app icon slot.\n * @property inactive - Disables interaction and visually de-emphasizes the bar.\n * @property appButtonBreakpointPx - Controls the breakpoint (in px) for showing/hiding the apps button.\n * @property dimmingButtonBreakpointPx - Controls the breakpoint (in px) for showing/hiding the dimming button.\n * @property appTitleBreakpointPx - Controls the breakpoint (in px) for showing/hiding the app title.\n * @property userButtonBreakpointPx - Controls the breakpoint (in px) for showing/hiding the user button.\n * @property appIconBreakpointPx - Controls the breakpoint (in px) for showing/hiding the app icon.\n * @property settings - Enables settings mode, displaying close, back buttons, breadcrumbs, and app title.\n * @property breadcrumbItems - Array of breadcrumb items for navigation (used in settings mode).\n * @availableWhen breadcrumbItems settings==true\n * @slot app-icon - Custom icon representing the application or brand (shown when `showAppIcon` is true)\n * @slot command-button - Primary command/action button for the current context\n * @slot alerts - Area for alert indicators, notification badges, or alert items\n * @slot clock - Clock component for displaying the current time (shown when `showClock` is true)\n * @fires menu-button-clicked - Fired when the menu button is clicked\n * @fires dimming-button-clicked - Fired when the dimming (day/night) button is clicked\n * @fires apps-button-clicked - Fired when the apps button is clicked\n * @fires left-more-button-clicked - Fired when the left more button is clicked\n * @fires user-button-clicked - Fired when the user/profile button is clicked\n * @fires close - Fired in settings mode when the close button is clicked\n * @fires back - Fired in settings mode when the back button is clicked\n * @fires emergency-brightness-start - Fired when the menu button is held for 500ms. This should increase the brightness of the screen slowly. Used when the screen is too dark.\n * @fires emergency-brightness-stop - Fired when the menu button is released.\n * @fires {BreadcrumbClickEvent} breadcrumb-click - Fired when a breadcrumb item is clicked.\n * @stable\n */\n@customElement('obc-top-bar')\nexport class ObcTopBar extends LitElement {\n @property({type: String}) appTitle = 'App';\n\n @property({type: String}) pageName = 'Page';\n\n @property({type: String}) menuButtonIcon = ObcTopBarMenuButtonIcon.Menu;\n\n @property({type: Boolean})\n menuButtonActivated = false;\n\n @property({type: Boolean})\n dimmingButtonActivated = false;\n\n @property({type: Boolean})\n appsButtonActivated = false;\n\n @property({type: Boolean})\n leftMoreButtonActivated = false;\n\n @property({type: Boolean})\n userButtonActivated = false;\n\n @property({type: Boolean})\n userButtonDisabled = false;\n\n @property({type: Boolean}) tall = false;\n\n @property({type: Boolean}) wideMenuButton = false;\n\n @property({type: Boolean}) showAppsButton = false;\n\n @property({type: Boolean})\n showDimmingButton = false;\n\n @property({type: Boolean}) showUserButton = false;\n\n @property({type: Boolean}) showClock = false;\n\n @property({type: Boolean}) showDate = false;\n\n @property({type: Boolean}) showAppIcon = false;\n\n @property({type: Boolean}) inactive = false;\n\n @property({type: Number})\n appButtonBreakpointPx = 500;\n\n @property({type: Number})\n dimmingButtonBreakpointPx = 500;\n\n @property({type: Number})\n appTitleBreakpointPx = 500;\n\n @property({type: Number})\n userButtonBreakpointPx = 500;\n\n @property({type: Number})\n appIconBreakpointPx = 500;\n\n @property({type: Boolean}) settings = false;\n\n @property({type: Array})\n breadcrumbItems: BreadcrumbItem[] = [];\n\n private dimmingButtonClicked() {\n /**\n * Fired when the dimming (day/night) button is clicked.\n * @event dimming-button-clicked\n */\n this.dispatchEvent(new CustomEvent('dimming-button-clicked'));\n }\n\n private appsButtonClicked() {\n /**\n * Fired when the apps button is clicked.\n * @event apps-button-clicked\n */\n this.dispatchEvent(new CustomEvent('apps-button-clicked'));\n }\n\n private leftMoreButtonClicked() {\n /**\n * Fired when the left more button is clicked.\n * @event left-more-button-clicked\n */\n this.dispatchEvent(new CustomEvent('left-more-button-clicked'));\n }\n\n private userButtonClicked() {\n /**\n * Fired when the user/profile button is clicked.\n * @event user-button-clicked\n */\n this.dispatchEvent(new CustomEvent('user-button-clicked'));\n }\n\n private leftButtonEvent: null | CustomEvent = null;\n private leftButtonTimeout: null | NodeJS.Timeout = null;\n private isLeftButtonDown = false;\n private isEmergencyBrightness = false;\n\n private leftButtonDown(event: CustomEvent) {\n this.leftButtonEvent = event;\n this.isLeftButtonDown = true;\n this.leftButtonTimeout = setTimeout(() => {\n this.leftButtonEvent = null;\n this.dispatchEvent(new CustomEvent('emergency-brightness-start'));\n this.isEmergencyBrightness = true;\n }, 500);\n }\n\n /**\n * Ends a hold. The event a short press stands for is dispatched from the\n * `click` that follows, not here: a menu opened while the pointer is still\n * going up gets closed again by that same click in current browsers, which\n * see it as a click outside a popover that has just opened.\n */\n private leftButtonUp() {\n if (this.leftButtonTimeout) {\n clearTimeout(this.leftButtonTimeout);\n this.leftButtonTimeout = null;\n }\n if (this.isEmergencyBrightness) {\n this.dispatchEvent(new CustomEvent('emergency-brightness-stop'));\n this.isEmergencyBrightness = false;\n }\n this.isLeftButtonDown = false;\n }\n\n /**\n * Sends the event a press of the hold button stands for.\n *\n * Enter, Space and a screen reader's activate command arrive as a `click`\n * with `detail` 0 and no pointer press before it, so they get the event\n * directly. A pointer click arrives with `detail` 1 after the press: the\n * event stored on the way down is sent now, unless the press ran long\n * enough to start emergency brightness, which used it up.\n */\n private leftButtonActivate(event: MouseEvent, type: string) {\n if (event.detail === 0) {\n this.dispatchEvent(new CustomEvent(type));\n return;\n }\n if (!this.leftButtonEvent) return;\n this.dispatchEvent(this.leftButtonEvent);\n this.leftButtonEvent = null;\n }\n\n private leftButtonLeave() {\n if (!this.isLeftButtonDown) return;\n if (this.leftButtonTimeout) {\n clearInterval(this.leftButtonTimeout);\n this.leftButtonTimeout = null;\n }\n if (this.isEmergencyBrightness) {\n this.dispatchEvent(new CustomEvent('emergency-brightness-stop'));\n this.isEmergencyBrightness = false;\n }\n this.isLeftButtonDown = false;\n }\n\n override render() {\n const leftGroup = [];\n if (this.settings) {\n leftGroup.push(\n html`<div class=\"menu-button\">\n <obc-icon-button\n variant=\"flat\"\n aria-label=${msg('Close')}\n @pointerdown=${() => this.leftButtonDown(new CustomEvent('close'))}\n @pointerup=${() => this.leftButtonUp()}\n @pointerleave=${() => this.leftButtonLeave()}\n @click=${(event: MouseEvent) =>\n this.leftButtonActivate(event, 'close')}\n >\n <obi-close-google></obi-close-google>\n </obc-icon-button>\n </div>`\n );\n leftGroup.push(\n html`<obc-icon-button\n variant=\"flat\"\n aria-label=${msg('Back')}\n @click=${() => this.dispatchEvent(new CustomEvent('back'))}\n >\n <obi-arrow-left-google></obi-arrow-left-google>\n </obc-icon-button>`\n );\n leftGroup.push(html`<div class=\"title\">${this.appTitle}</div>`);\n leftGroup.push(\n html`<obc-breadcrumb\n .items=${this.breadcrumbItems}\n @breadcrumb-click=${(e: BreadcrumbClickEvent) =>\n this.dispatchEvent(\n new CustomEvent('breadcrumb-click', {\n detail: e.detail,\n }) as BreadcrumbClickEvent\n )}\n ></obc-breadcrumb>`\n );\n } else {\n if (!this.inactive) {\n leftGroup.push(\n html`<div class=\"menu-button ${this.wideMenuButton ? 'wide' : null}\">\n <obc-icon-button\n variant=\"flat\"\n aria-label=${\n this.menuButtonIcon === ObcTopBarMenuButtonIcon.Menu\n ? msg('Menu')\n : msg('Home')\n }\n @pointerdown=${() =>\n this.leftButtonDown(new CustomEvent('menu-button-clicked'))}\n @pointerup=${() => this.leftButtonUp()}\n @pointerleave=${() => this.leftButtonLeave()}\n @click=${(event: MouseEvent) =>\n this.leftButtonActivate(event, 'menu-button-clicked')}\n ?activated=${this.menuButtonActivated}\n >\n ${\n this.menuButtonIcon === ObcTopBarMenuButtonIcon.Menu\n ? html`<obi-menu-iec></obi-menu-iec>`\n : html`<obi-home></obi-home>`\n }\n </obc-icon-button>\n </div>`\n );\n }\n if (this.showAppIcon) {\n leftGroup.push(\n html`<div class=\"app-icon\"><slot name=\"app-icon\"></slot></div>`\n );\n }\n leftGroup.push(html`<div class=\"title\">${this.appTitle}</div>`);\n leftGroup.push(html`<div class=\"page-name\">${this.pageName}</div>`);\n leftGroup.push(html`<slot name=\"command-button\"></slot>`);\n }\n\n const breakpointMoreButton = Math.max(\n this.appButtonBreakpointPx,\n this.dimmingButtonBreakpointPx\n );\n\n return html`\n <style>\n @media (max-width: ${breakpointMoreButton}px) {\n .left-more-button {\n display: revert !important;\n }\n\n .group.left > * {\n margin-right: 4px;\n margin-left: 4px;\n }\n }\n\n @media (max-width: ${this.appButtonBreakpointPx}px) {\n .apps-button {\n display: none;\n }\n }\n\n @media (max-width: ${this.dimmingButtonBreakpointPx}px) {\n .dimming-button {\n display: none;\n }\n }\n\n @media (max-width: ${this.appTitleBreakpointPx}px) {\n .title {\n display: none !important; /* the stylesheet's display wins over this inline rule otherwise */\n }\n }\n\n @media (max-width: ${this.userButtonBreakpointPx}px) {\n .user-button {\n display: none;\n }\n }\n\n @media (max-width: ${this.appIconBreakpointPx}px) {\n .app-icon {\n display: none;\n }\n }\n </style>\n <nav\n class=${classMap({\n wrapper: true,\n inactive: this.inactive,\n settings: this.settings,\n tall: this.tall,\n })}\n >\n <div class=\"left group\">${leftGroup}</div>\n <div class=\"right group\">\n <div class=\"alert-container\">\n <slot name=\"alerts\"></slot>\n </div>\n ${\n this.showDimmingButton && !this.inactive\n ? html`<obc-icon-button\n class=\"dimming-button\"\n part=\"dimming-button\"\n variant=\"flat\"\n aria-label=${msg('Dimming')}\n @click=${this.dimmingButtonClicked}\n ?activated=${this.dimmingButtonActivated}\n >\n <obi-palette-day-night-iec></obi-palette-day-night-iec>\n </obc-icon-button>`\n : null\n }\n ${\n this.showUserButton && !this.inactive\n ? html`<obc-icon-button\n class=\"user-button\"\n variant=\"flat\"\n part=\"user-button\"\n aria-label=${msg('User')}\n @click=${this.userButtonClicked}\n ?activated=${this.userButtonActivated}\n ?disabled=${this.userButtonDisabled}\n >\n <obi-user></obi-user>\n </obc-icon-button>`\n : null\n }\n ${\n this.showAppsButton && !this.inactive\n ? html`<obc-icon-button\n class=\"apps-button\"\n variant=\"flat\"\n part=\"apps-button\"\n aria-label=${msg('Apps')}\n @click=${this.appsButtonClicked}\n ?activated=${this.appsButtonActivated}\n >\n <obi-applications></obi-applications>\n </obc-icon-button>`\n : null\n }\n ${this.showClock ? html`<slot name=\"clock\"></slot>` : null}\n ${\n !this.inactive\n ? html`<obc-icon-button\n class=\"left-more-button\"\n part=\"left-more-button\"\n variant=\"flat\"\n aria-label=${msg('More')}\n @click=${this.leftMoreButtonClicked}\n ?activated=${this.leftMoreButtonActivated}\n >\n <obi-more-vertical-google></obi-more-vertical-google>\n </obc-icon-button>`\n : null\n }\n </div>\n </nav>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-top-bar': ObcTopBar;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,IAAY,0BAAL,yBAAA,yBAAA;CACL,wBAAA,UAAA;CACA,wBAAA,UAAA;;AACF,EAAA,CAAA,CAAA;AAoJO,IAAM,YAAN,MAAM,kBAAkB,WAAW;;;EACH,KAAA,WAAA;EAEA,KAAA,WAAA;;EAKf,KAAA,sBAAA;EAGG,KAAA,yBAAA;EAGH,KAAA,sBAAA;EAGI,KAAA,0BAAA;EAGJ,KAAA,sBAAA;EAGD,KAAA,qBAAA;EAEa,KAAA,OAAA;EAEU,KAAA,iBAAA;EAEA,KAAA,iBAAA;EAGxB,KAAA,oBAAA;EAEwB,KAAA,iBAAA;EAEL,KAAA,YAAA;EAED,KAAA,WAAA;EAEG,KAAA,cAAA;EAEH,KAAA,WAAA;EAGd,KAAA,wBAAA;EAGI,KAAA,4BAAA;EAGL,KAAA,uBAAA;EAGE,KAAA,yBAAA;EAGH,KAAA,sBAAA;EAEgB,KAAA,WAAA;EAGF,KAAA,kBAAA,CAAC;EAkCS,KAAA,kBAAA;EACK,KAAA,oBAAA;EACxB,KAAA,mBAAA;EACK,KAAA,wBAAA;;CAnChC,uBAA+B;;;;;EAK7B,KAAK,cAAc,IAAI,YAAY,wBAAwB,CAAC;CAC9D;CAEA,oBAA4B;;;;;EAK1B,KAAK,cAAc,IAAI,YAAY,qBAAqB,CAAC;CAC3D;CAEA,wBAAgC;;;;;EAK9B,KAAK,cAAc,IAAI,YAAY,0BAA0B,CA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AAA,CAAA;AAGvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,UAAA,WAAA,wBAAA,KAAA,CAAA;AAGvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,UAAA,WAAA,0BAAA,KAAA,CAAA;AAGvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,UAAA,WAAA,uBAAA,KAAA,CAAA;AAGvB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,UAAA,WAAA,YAAA,KAAA,CAAA;AAExB,WAAA,CAAA,SAAS,EAAC,MAAM,MAAK,CAAC,CAAA,GAAA,UAAA,WAAA,mBAAA,KAAA,CAAA;AA9DxB,YAAA,WAAA,CAAA,cAAc,aAAa,CAAA,GAAA,SAAA"}
1
+ {"version":3,"file":"top-bar.js","names":[],"sources":["../../../src/components/top-bar/top-bar.ts"],"sourcesContent":["import {LitElement, PropertyValues, html, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {msg} from '@lit/localize';\nimport compentStyle from './top-bar.css?inline';\nimport '../icon-button/icon-button.js';\nimport '../clock/clock.js';\nimport '../divider/divider.js';\nimport '../breadcrumb/breadcrumb.js';\nimport '../../icons/icon-menu-iec.js';\nimport '../../icons/icon-home.js';\nimport '../../icons/icon-close-google.js';\nimport '../../icons/icon-arrow-left-google.js';\nimport '../../icons/icon-arrow-right-google.js';\nimport '../../icons/icon-palette-day-night-iec.js';\nimport '../../icons/icon-applications.js';\nimport '../../icons/icon-more-vertical-google.js';\nimport '../../icons/icon-user.js';\nimport {\n BreadcrumbClickEvent,\n BreadcrumbItem,\n} from '../breadcrumb/breadcrumb.js';\nimport {customElement} from '../../decorator.js';\n\nexport enum ObcTopBarMenuButtonIcon {\n Menu = 'menu',\n Home = 'home',\n}\n\n/**\n * `<obc-top-bar>` – A responsive top navigation bar component for application layouts.\n *\n * Provides a flexible, highly configurable top bar for application interfaces, supporting navigation, context display, quick actions, and status indicators. The top bar adapts to screen size and can show or hide elements such as menu, app icon, breadcrumbs, user/profile, clock, and alert notifications.\n *\n * Appears at the top of the UI, organizing primary navigation and contextual actions in a single, persistent region. Designed for use as the main app bar or header in multi-pane or dashboard-style layouts.\n *\n * ## Features\n * - **Configurable Sections:** Supports left and right-aligned groups for navigation, context, and actions.\n * - **Menu Button:** Optional menu button for opening navigation drawers or sidebars; can be styled as wide or regular.\n * - **App Icon Slot:** Customizable slot for displaying an application or brand icon.\n * - **App Title & Page Name:** Displays the current application and page context.\n * - **Breadcrumbs:** Optional breadcrumb navigation for hierarchical context (in settings mode).\n * - **Command Button Slot:** Slot for inserting a primary command/action button.\n * - **Alert/Notification Area:** Slot for alert indicators, notification badges, or custom alert components.\n * - **Dimming Button:** Optional button for toggling display modes (e.g., day/night).\n * - **User/Profile Button:** Optional user icon for profile/account actions.\n * - **Apps Button:** Optional button for accessing additional applications or modules.\n * - **Clock & Date:** Optional digital clock and date display, responsive to screen size.\n * - **Responsive Layout:** Multiple breakpoint properties to control visibility and layout of elements based on viewport width.\n * - **Settings Mode:** Special mode with close, back, and forward navigation, breadcrumbs, and app title.\n * - **Tall Variant:** Optional increased height for touch or accessibility needs.\n * - **Inactive State:** Disables interactive elements and visually de-emphasizes the bar.\n *\n * ## Variants\n * - **Regular:** Standard top bar with menu, app icon, title, page name, and action slots.\n * - **Settings:** Shows close, back, forward buttons, breadcrumbs, and app title for configuration or settings screens.\n * - **Inactive:** Visually muted and disables interaction (e.g., when the app is locked or in a modal state).\n * - **Tall:** Increases the height of the bar for improved touch targets.\n *\n * ## Usage Guidelines\n * Use `<obc-top-bar>` as the persistent header for your application, providing navigation, context, and quick access to key actions or status. Configure which elements appear via boolean properties and slots. Adjust breakpoint properties to control responsive behavior for each section.\n *\n * - Place navigation, branding, and context (title, breadcrumbs) on the left; actions, alerts, and status (clock, user, apps) on the right.\n * - Use the `settings` property for configuration or setup screens to enable close/back/forward navigation and breadcrumbs.\n * - Use the `inactive` property to visually disable the bar and its actions when the app is not interactive.\n * - Insert custom icons or buttons using the `app-icon` and `command-button` slots.\n * - Use the `alerts` slot to display alert indicators, notification badges, or custom alert components.\n *\n * **TODO(designer):** Clarify recommended combinations of visible elements for different app contexts (e.g., when to show both user and apps buttons, or best practices for alert placement).\n *\n * ## Slots\n *\n * | Slot Name | Renders When... | Purpose |\n * |------------------|---------------------------------|----------------------------------------------------------------|\n * | `app-icon` | `showAppIcon` is true | Custom icon representing the application or brand. |\n * | `command-button` | Always (if provided) | Primary command or action button for the current context. |\n * | `alerts` | Always (if provided) | Area for alert indicators, notification badges, or alert items.|\n * | `clock` | Always (if provided) | Clock component for displaying the current time. |\n *\n * ## Events\n * - `menu-button-clicked` – Fired when the menu button is clicked.\n * - `dimming-button-clicked` – Fired when the dimming (day/night) button is clicked.\n * - `apps-button-clicked` – Fired when the apps button is clicked.\n * - `more-button-clicked` – Fired when the more button is clicked.\n * - `left-more-button-clicked` – Deprecated alias of `more-button-clicked`, fired with it; removed in 4.0.0.\n * - `user-button-clicked` – Fired when the user/profile button is clicked.\n * - `close` – Fired in settings mode when the close button is clicked.\n * - `back` – Fired in settings mode when the back button is clicked.\n * - `forward` – Fired in settings mode when the forward button is clicked.\n * - `emergency-brightness-start` – Fired when the menu button is held for 500ms. This should increase the brightness of the screen slowly. Used when the screen is too dark.\n * - `emergency-brightness-stop` – Fired when the menu button is released.\n *\n * ## Keyboard\n * Every control in the bar is its own tab stop and activates on `Enter` and\n * `Space`. The bar is a navigation landmark, not an APG toolbar: its controls\n * are separate components and slotted consumer content, so a roving tabindex\n * across them is deliberately not implemented. The emergency-brightness hold\n * is a pointer gesture only; from the keyboard the menu button opens the menu.\n *\n * ## Best Practices and Constraints\n * - Only show interactive elements relevant to the current context to avoid clutter.\n * - Use the `alerts` slot for transient or critical notifications; persistent alerts may require a different component.\n * - For accessibility, give all interactive elements labels and focus handling.\n * - Adjust breakpoint properties to optimize the layout for different device sizes.\n * - In settings mode, use breadcrumbs to provide clear navigation context.\n *\n * ## Example\n *\n * ```html\n * <obc-top-bar\n * appTitle=\"My App\"\n * pageName=\"Dashboard\"\n * showAppsButton\n * showDimmingButton\n * showClock\n * showUserButton\n * showAppIcon\n * >\n * <obi-placeholder slot=\"app-icon\"></obi-placeholder>\n * <obc-command-button slot=\"command-button\"></obc-command-button>\n * <obc-topbar-message-item slot=\"alerts\"></obc-topbar-message-item>\n * <obc-clock slot=\"clock\"></obc-clock>\n * </obc-top-bar>\n * ```\n *\n * @availableWhen menuButtonIcon settings==false && inactive==false\n * @property appTitle - Sets the main application title displayed in the top bar.\n * @property pageName - Sets the current page or section name displayed in the top bar.\n * @availableWhen pageName settings==false\n * @property menuButtonActivated - Highlights the menu button as active.\n * @availableWhen menuButtonActivated settings==false && inactive==false\n * @property dimmingButtonActivated - Highlights the dimming (day/night) button as active.\n * @availableWhen dimmingButtonActivated showDimmingButton==true && inactive==false\n * @property appsButtonActivated - Highlights the apps button as active.\n * @availableWhen appsButtonActivated showAppsButton==true && inactive==false\n * @property moreButtonActivated - Highlights the more button as active.\n * @availableWhen moreButtonActivated inactive==false\n * @property userButtonActivated - Highlights the user/profile button as active.\n * @availableWhen userButtonActivated showUserButton==true && inactive==false\n * @property userButtonDisabled - Disables the user/profile button.\n * @availableWhen userButtonDisabled showUserButton==true && inactive==false\n * @property tall - Increases the height of the top bar for larger touch targets.\n * @property wideMenuButton - Expands the menu button for wide-rail layouts.\n * @availableWhen wideMenuButton settings==false && inactive==false\n * @property showAppsButton - Shows or hides the apps button.\n * @property showDimmingButton - Shows or hides the dimming (day/night) button.\n * @property showUserButton - Shows or hides the user/profile button.\n * @property showClock - Shows or hides the clock.\n * @property showDate - Shows or hides the date in the clock display.\n * @property showAppIcon - Shows or hides the app icon slot.\n * @property inactive - Disables interaction and visually de-emphasizes the bar.\n * @property appButtonBreakpointPx - Controls the breakpoint (in px) for showing/hiding the apps button.\n * @property dimmingButtonBreakpointPx - Controls the breakpoint (in px) for showing/hiding the dimming button.\n * @property appTitleBreakpointPx - Controls the breakpoint (in px) for showing/hiding the app title.\n * @property userButtonBreakpointPx - Controls the breakpoint (in px) for showing/hiding the user button.\n * @property appIconBreakpointPx - Controls the breakpoint (in px) for showing/hiding the app icon.\n * @property settings - Enables settings mode, displaying close, back buttons, breadcrumbs, and app title.\n * @property breadcrumbItems - Array of breadcrumb items for navigation (used in settings mode).\n * @availableWhen breadcrumbItems settings==true\n * @slot app-icon - Custom icon representing the application or brand (shown when `showAppIcon` is true)\n * @slot command-button - Primary command/action button for the current context\n * @slot alerts - Area for alert indicators, notification badges, or alert items\n * @slot clock - Clock component for displaying the current time (shown when `showClock` is true)\n * @fires menu-button-clicked - Fired when the menu button is clicked\n * @fires dimming-button-clicked - Fired when the dimming (day/night) button is clicked\n * @fires apps-button-clicked - Fired when the apps button is clicked\n * @fires more-button-clicked - Fired when the more button is clicked\n * @fires left-more-button-clicked - Deprecated: listen to `more-button-clicked` instead. Fired together with it; removed in 4.0.0.\n * @fires user-button-clicked - Fired when the user/profile button is clicked\n * @fires close - Fired in settings mode when the close button is clicked\n * @fires back - Fired in settings mode when the back button is clicked\n * @fires emergency-brightness-start - Fired when the menu button is held for 500ms. This should increase the brightness of the screen slowly. Used when the screen is too dark.\n * @fires emergency-brightness-stop - Fired when the menu button is released.\n * @fires {BreadcrumbClickEvent} breadcrumb-click - Fired when a breadcrumb item is clicked.\n * @csspart more-button - The more button shown below the breakpoints.\n * @csspart left-more-button - Deprecated alias of the `more-button` part; removed in 4.0.0.\n * @stable\n */\n@customElement('obc-top-bar')\nexport class ObcTopBar extends LitElement {\n @property({type: String}) appTitle = 'App';\n\n @property({type: String}) pageName = 'Page';\n\n @property({type: String}) menuButtonIcon = ObcTopBarMenuButtonIcon.Menu;\n\n @property({type: Boolean})\n menuButtonActivated = false;\n\n @property({type: Boolean})\n dimmingButtonActivated = false;\n\n @property({type: Boolean})\n appsButtonActivated = false;\n\n @property({type: Boolean})\n moreButtonActivated = false;\n\n /**\n * @deprecated Use `moreButtonActivated`. Removed in 4.0.0.\n */\n @property({type: Boolean})\n leftMoreButtonActivated?: boolean;\n\n @property({type: Boolean})\n userButtonActivated = false;\n\n @property({type: Boolean})\n userButtonDisabled = false;\n\n @property({type: Boolean}) tall = false;\n\n @property({type: Boolean}) wideMenuButton = false;\n\n @property({type: Boolean}) showAppsButton = false;\n\n @property({type: Boolean})\n showDimmingButton = false;\n\n @property({type: Boolean}) showUserButton = false;\n\n @property({type: Boolean}) showClock = false;\n\n @property({type: Boolean}) showDate = false;\n\n @property({type: Boolean}) showAppIcon = false;\n\n @property({type: Boolean}) inactive = false;\n\n @property({type: Number})\n appButtonBreakpointPx = 500;\n\n @property({type: Number})\n dimmingButtonBreakpointPx = 500;\n\n @property({type: Number})\n appTitleBreakpointPx = 500;\n\n @property({type: Number})\n userButtonBreakpointPx = 500;\n\n @property({type: Number})\n appIconBreakpointPx = 500;\n\n @property({type: Boolean}) settings = false;\n\n @property({type: Array})\n breadcrumbItems: BreadcrumbItem[] = [];\n\n private dimmingButtonClicked() {\n /**\n * Fired when the dimming (day/night) button is clicked.\n * @event dimming-button-clicked\n */\n this.dispatchEvent(new CustomEvent('dimming-button-clicked'));\n }\n\n private appsButtonClicked() {\n /**\n * Fired when the apps button is clicked.\n * @event apps-button-clicked\n */\n this.dispatchEvent(new CustomEvent('apps-button-clicked'));\n }\n\n /**\n * Copies the deprecated `leftMoreButtonActivated` into\n * `moreButtonActivated`. A plain field rather than a getter/setter alias:\n * the Vue wrapper writes every prop back on its second render, and a getter\n * would then write `false` over the new property.\n */\n override willUpdate(changed: PropertyValues<this>): void {\n super.willUpdate(changed);\n if (\n changed.has('leftMoreButtonActivated') &&\n this.leftMoreButtonActivated !== undefined\n ) {\n this.moreButtonActivated = this.leftMoreButtonActivated;\n }\n }\n\n private moreButtonClicked() {\n /**\n * Fired when the more button is clicked.\n * @event more-button-clicked\n */\n this.dispatchEvent(new CustomEvent('more-button-clicked'));\n /**\n * Deprecated alias of `more-button-clicked`; removed in 4.0.0.\n * @event left-more-button-clicked\n */\n this.dispatchEvent(new CustomEvent('left-more-button-clicked'));\n }\n\n private userButtonClicked() {\n /**\n * Fired when the user/profile button is clicked.\n * @event user-button-clicked\n */\n this.dispatchEvent(new CustomEvent('user-button-clicked'));\n }\n\n private leftButtonEvent: null | CustomEvent = null;\n private leftButtonTimeout: null | NodeJS.Timeout = null;\n private isLeftButtonDown = false;\n private isEmergencyBrightness = false;\n\n private leftButtonDown(event: CustomEvent) {\n this.leftButtonEvent = event;\n this.isLeftButtonDown = true;\n this.leftButtonTimeout = setTimeout(() => {\n this.leftButtonEvent = null;\n this.dispatchEvent(new CustomEvent('emergency-brightness-start'));\n this.isEmergencyBrightness = true;\n }, 500);\n }\n\n /**\n * Ends a hold. The event a short press stands for is dispatched from the\n * `click` that follows, not here: a menu opened while the pointer is still\n * going up gets closed again by that same click in current browsers, which\n * see it as a click outside a popover that has just opened.\n */\n private leftButtonUp() {\n if (this.leftButtonTimeout) {\n clearTimeout(this.leftButtonTimeout);\n this.leftButtonTimeout = null;\n }\n if (this.isEmergencyBrightness) {\n this.dispatchEvent(new CustomEvent('emergency-brightness-stop'));\n this.isEmergencyBrightness = false;\n }\n this.isLeftButtonDown = false;\n }\n\n /**\n * Sends the event a press of the hold button stands for.\n *\n * Enter, Space and a screen reader's activate command arrive as a `click`\n * with `detail` 0 and no pointer press before it, so they get the event\n * directly. A pointer click arrives with `detail` 1 after the press: the\n * event stored on the way down is sent now, unless the press ran long\n * enough to start emergency brightness, which used it up.\n */\n private leftButtonActivate(event: MouseEvent, type: string) {\n if (event.detail === 0) {\n this.dispatchEvent(new CustomEvent(type));\n return;\n }\n if (!this.leftButtonEvent) return;\n this.dispatchEvent(this.leftButtonEvent);\n this.leftButtonEvent = null;\n }\n\n private leftButtonLeave() {\n if (!this.isLeftButtonDown) return;\n if (this.leftButtonTimeout) {\n clearInterval(this.leftButtonTimeout);\n this.leftButtonTimeout = null;\n }\n if (this.isEmergencyBrightness) {\n this.dispatchEvent(new CustomEvent('emergency-brightness-stop'));\n this.isEmergencyBrightness = false;\n }\n this.isLeftButtonDown = false;\n }\n\n override render() {\n const leftGroup = [];\n if (this.settings) {\n leftGroup.push(\n html`<div class=\"menu-button\">\n <obc-icon-button\n variant=\"flat\"\n aria-label=${msg('Close')}\n @pointerdown=${() => this.leftButtonDown(new CustomEvent('close'))}\n @pointerup=${() => this.leftButtonUp()}\n @pointerleave=${() => this.leftButtonLeave()}\n @click=${(event: MouseEvent) =>\n this.leftButtonActivate(event, 'close')}\n >\n <obi-close-google></obi-close-google>\n </obc-icon-button>\n </div>`\n );\n leftGroup.push(\n html`<obc-icon-button\n variant=\"flat\"\n aria-label=${msg('Back')}\n @click=${() => this.dispatchEvent(new CustomEvent('back'))}\n >\n <obi-arrow-left-google></obi-arrow-left-google>\n </obc-icon-button>`\n );\n leftGroup.push(html`<div class=\"title\">${this.appTitle}</div>`);\n leftGroup.push(\n html`<obc-breadcrumb\n .items=${this.breadcrumbItems}\n @breadcrumb-click=${(e: BreadcrumbClickEvent) =>\n this.dispatchEvent(\n new CustomEvent('breadcrumb-click', {\n detail: e.detail,\n }) as BreadcrumbClickEvent\n )}\n ></obc-breadcrumb>`\n );\n } else {\n if (!this.inactive) {\n leftGroup.push(\n html`<div class=\"menu-button ${this.wideMenuButton ? 'wide' : null}\">\n <obc-icon-button\n variant=\"flat\"\n aria-label=${\n this.menuButtonIcon === ObcTopBarMenuButtonIcon.Menu\n ? msg('Menu')\n : msg('Home')\n }\n @pointerdown=${() =>\n this.leftButtonDown(new CustomEvent('menu-button-clicked'))}\n @pointerup=${() => this.leftButtonUp()}\n @pointerleave=${() => this.leftButtonLeave()}\n @click=${(event: MouseEvent) =>\n this.leftButtonActivate(event, 'menu-button-clicked')}\n ?activated=${this.menuButtonActivated}\n >\n ${\n this.menuButtonIcon === ObcTopBarMenuButtonIcon.Menu\n ? html`<obi-menu-iec></obi-menu-iec>`\n : html`<obi-home></obi-home>`\n }\n </obc-icon-button>\n </div>`\n );\n }\n if (this.showAppIcon) {\n leftGroup.push(\n html`<div class=\"app-icon\"><slot name=\"app-icon\"></slot></div>`\n );\n }\n leftGroup.push(html`<div class=\"title\">${this.appTitle}</div>`);\n leftGroup.push(html`<div class=\"page-name\">${this.pageName}</div>`);\n leftGroup.push(html`<slot name=\"command-button\"></slot>`);\n }\n\n const breakpointMoreButton = Math.max(\n this.appButtonBreakpointPx,\n this.dimmingButtonBreakpointPx,\n this.userButtonBreakpointPx,\n this.appIconBreakpointPx\n );\n\n return html`\n <style>\n @media (max-width: ${breakpointMoreButton}px) {\n .more-button {\n display: revert !important;\n }\n\n .group.left > * {\n margin-right: 4px;\n margin-left: 4px;\n }\n }\n\n @media (max-width: ${this.appButtonBreakpointPx}px) {\n .apps-button {\n display: none;\n }\n }\n\n @media (max-width: ${this.dimmingButtonBreakpointPx}px) {\n .dimming-button {\n display: none;\n }\n }\n\n @media (max-width: ${this.appTitleBreakpointPx}px) {\n .title {\n display: none !important; /* the stylesheet's display wins over this inline rule otherwise */\n }\n }\n\n @media (max-width: ${this.userButtonBreakpointPx}px) {\n .user-button {\n display: none;\n }\n }\n\n @media (max-width: ${this.appIconBreakpointPx}px) {\n .app-icon {\n display: none;\n }\n }\n </style>\n <nav\n class=${classMap({\n wrapper: true,\n inactive: this.inactive,\n settings: this.settings,\n tall: this.tall,\n })}\n >\n <div class=\"left group\">${leftGroup}</div>\n <div class=\"right group\">\n <div class=\"alert-container\">\n <slot name=\"alerts\"></slot>\n </div>\n ${\n this.showDimmingButton && !this.inactive\n ? html`<obc-icon-button\n class=\"dimming-button\"\n part=\"dimming-button\"\n variant=\"flat\"\n aria-label=${msg('Dimming')}\n @click=${this.dimmingButtonClicked}\n ?activated=${this.dimmingButtonActivated}\n >\n <obi-palette-day-night-iec></obi-palette-day-night-iec>\n </obc-icon-button>`\n : null\n }\n ${\n this.showUserButton && !this.inactive\n ? html`<obc-icon-button\n class=\"user-button\"\n variant=\"flat\"\n part=\"user-button\"\n aria-label=${msg('User')}\n @click=${this.userButtonClicked}\n ?activated=${this.userButtonActivated}\n ?disabled=${this.userButtonDisabled}\n >\n <obi-user></obi-user>\n </obc-icon-button>`\n : null\n }\n ${\n this.showAppsButton && !this.inactive\n ? html`<obc-icon-button\n class=\"apps-button\"\n variant=\"flat\"\n part=\"apps-button\"\n aria-label=${msg('Apps')}\n @click=${this.appsButtonClicked}\n ?activated=${this.appsButtonActivated}\n >\n <obi-applications></obi-applications>\n </obc-icon-button>`\n : null\n }\n ${this.showClock ? html`<slot name=\"clock\"></slot>` : null}\n ${\n !this.inactive\n ? html`<obc-icon-button\n class=\"more-button\"\n part=\"more-button left-more-button\"\n variant=\"flat\"\n aria-label=${msg('More')}\n @click=${this.moreButtonClicked}\n ?activated=${this.moreButtonActivated}\n >\n <obi-more-vertical-google></obi-more-vertical-google>\n </obc-icon-button>`\n : null\n }\n </div>\n </nav>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-top-bar': ObcTopBar;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,IAAY,0BAAL,yBAAA,yBAAA;CACL,wBAAA,UAAA;CACA,wBAAA,UAAA;;AACF,EAAA,CAAA,CAAA;AAwJO,IAAM,YAAN,MAAM,kBAAkB,WAAW;;;EACH,KAAA,WAAA;EAEA,KAAA,WAAA;;EAKf,KAAA,sBAAA;EAGG,KAAA,yBAAA;EAGH,KAAA,sBAAA;EAGA,KAAA,sBAAA;EASA,KAAA,sBAAA;EAGD,KAAA,qBAAA;EAEa,KAAA,OAAA;EAEU,KAAA,iBAAA;EAEA,KAAA,iBAAA;EAGxB,KAAA,oBAAA;EAEwB,KAAA,iBAAA;EAEL,KAAA,YAAA;EAED,KAAA,WAAA;EAEG,KAAA,cAAA;EAEH,KAAA,WAAA;EAGd,KAAA,wBAAA;EAGI,KAAA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A"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-full-bundle",
3
- "version": "2.2.0-next.1",
3
+ "version": "2.2.0-next.2",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,60 @@
1
+ import {afterEach, describe, expect, it} from 'vitest';
2
+ import './top-bar.js';
3
+ import type {ObcTopBar} from './top-bar.js';
4
+
5
+ const cleanup: Array<() => void> = [];
6
+ afterEach(() => {
7
+ while (cleanup.length) cleanup.pop()!();
8
+ });
9
+
10
+ async function mount(init: (bar: ObcTopBar) => void = () => {}) {
11
+ const bar = document.createElement('obc-top-bar') as ObcTopBar;
12
+ init(bar);
13
+ document.body.append(bar);
14
+ cleanup.push(() => bar.remove());
15
+ await bar.updateComplete;
16
+ const button = bar.shadowRoot!.querySelector<HTMLElement>('.more-button')!;
17
+ return {bar, button};
18
+ }
19
+
20
+ describe('obc-top-bar more button', () => {
21
+ it('fires more-button-clicked and the deprecated left-more-button-clicked', async () => {
22
+ const {bar, button} = await mount();
23
+ const events: string[] = [];
24
+ bar.addEventListener('more-button-clicked', () =>
25
+ events.push('more-button-clicked')
26
+ );
27
+ bar.addEventListener('left-more-button-clicked', () =>
28
+ events.push('left-more-button-clicked')
29
+ );
30
+ button.click();
31
+ expect(events).toEqual(['more-button-clicked', 'left-more-button-clicked']);
32
+ });
33
+
34
+ it('exposes both the more-button and the deprecated left-more-button part', async () => {
35
+ const {button} = await mount();
36
+ expect(button.part.contains('more-button')).toBe(true);
37
+ expect(button.part.contains('left-more-button')).toBe(true);
38
+ });
39
+
40
+ it('moreButtonActivated activates the button', async () => {
41
+ const {bar, button} = await mount((bar) => {
42
+ bar.moreButtonActivated = true;
43
+ });
44
+ expect(button.hasAttribute('activated')).toBe(true);
45
+ bar.moreButtonActivated = false;
46
+ await bar.updateComplete;
47
+ expect(button.hasAttribute('activated')).toBe(false);
48
+ });
49
+
50
+ it('the deprecated leftMoreButtonActivated still activates the button', async () => {
51
+ const {bar, button} = await mount((bar) => {
52
+ bar.setAttribute('leftMoreButtonActivated', '');
53
+ });
54
+ expect(bar.moreButtonActivated).toBe(true);
55
+ expect(button.hasAttribute('activated')).toBe(true);
56
+ bar.leftMoreButtonActivated = false;
57
+ await bar.updateComplete;
58
+ expect(button.hasAttribute('activated')).toBe(false);
59
+ });
60
+ });
@@ -67,7 +67,7 @@
67
67
  /* Controls never shrink: a squeeze reaches the texts, then overflows the end */
68
68
  .menu-button,
69
69
  .app-icon,
70
- .left-more-button,
70
+ .more-button,
71
71
  .dimming-button,
72
72
  .user-button,
73
73
  .apps-button,
@@ -109,7 +109,7 @@
109
109
  @mixin font-body-active;
110
110
  }
111
111
 
112
- .left-more-button {
112
+ .more-button {
113
113
  display: none;
114
114
  }
115
115