@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.166 → 2.0.0-next.167
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/openbridge-webcomponents.bundle.js +2398 -2330
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +75 -3
- package/dist/components/brilliance-menu/brilliance-menu.css.js +4 -0
- package/dist/components/brilliance-menu/brilliance-menu.css.js.map +1 -1
- package/dist/components/brilliance-menu/brilliance-menu.d.ts +8 -1
- package/dist/components/brilliance-menu/brilliance-menu.d.ts.map +1 -1
- package/dist/components/brilliance-menu/brilliance-menu.js +86 -32
- package/dist/components/brilliance-menu/brilliance-menu.js.map +1 -1
- package/dist/integration-systems/integration-bar/integration-bar.d.ts +4 -0
- package/dist/integration-systems/integration-bar/integration-bar.d.ts.map +1 -1
- package/dist/integration-systems/integration-bar/integration-bar.js +5 -0
- package/dist/integration-systems/integration-bar/integration-bar.js.map +1 -1
- package/dist/integration-systems/integration-bar-dropdown/integration-bar-dropdown.d.ts +4 -0
- package/dist/integration-systems/integration-bar-dropdown/integration-bar-dropdown.d.ts.map +1 -1
- package/dist/integration-systems/integration-bar-dropdown/integration-bar-dropdown.js +5 -0
- package/dist/integration-systems/integration-bar-dropdown/integration-bar-dropdown.js.map +1 -1
- package/package.json +1 -1
- package/src/components/brilliance-menu/brilliance-menu.css +4 -0
- package/src/components/brilliance-menu/brilliance-menu.stories.ts +27 -0
- package/src/components/brilliance-menu/brilliance-menu.ts +96 -32
- package/src/integration-systems/integration-bar/integration-bar.stories.ts +19 -0
- package/src/integration-systems/integration-bar/integration-bar.ts +8 -0
- package/src/integration-systems/integration-bar-dropdown/integration-bar-dropdown.stories.ts +73 -0
- package/src/integration-systems/integration-bar-dropdown/integration-bar-dropdown.ts +8 -0
package/custom-elements.json
CHANGED
|
@@ -5512,7 +5512,7 @@
|
|
|
5512
5512
|
{
|
|
5513
5513
|
"kind": "variable",
|
|
5514
5514
|
"name": "ObcBrillianceMenu",
|
|
5515
|
-
"default": "class extends LitElement { constructor() { super(...arguments); this.palette = \"day\"; this.brightness = 50; this.showLinkBrightness = false; this.showLinkPalette = false; this.showBrightness = true; this.showPalette = true; this.showNightPalette = true; this.showDuskPalette = true; this.showDayPalette = true; this.showBrightPalette = true; this.variant = \"normal\"; this.brightnessUnit = \"%\"; this.brightnessMax = 100; this.brightnessMinorStep = 5; this.brightnessMajorStep = 25; this.brightnessInputVariant = \"buttons\"; this.showScreenControlLink = false; } willUpdate(_changed) { if (this.showPalette) { const available = this.availablePalettes; if (available.length > 0 && !available.includes(this.palette)) { this.palette = available[0]; this.dispatchEvent( new CustomEvent(\"palette-changed\", { detail: { value: this.palette } }) ); } } } /** * Handles palette selection changes and emits `palette-changed`. * @fires palette-changed * @param {CustomEvent} event */ onPaletteChanged(event) { this.palette = event.detail.value; this.dispatchEvent( new CustomEvent(\"palette-changed\", { detail: { value: event.detail.value } }) ); } /** * Handles brightness slider changes and emits `brightness-changed`. * @fires brightness-changed * @param {CustomEvent} event */ handleBrightnessChanged(event) { this.brightness = event.detail; this.dispatchEvent( new CustomEvent(\"brightness-changed\", { detail: { value: event.detail } }) ); } increaseBrightness(step) { this.brightness = Math.max( 0, Math.min(this.brightness + step, this.brightnessMax) ); this.dispatchEvent( new CustomEvent(\"brightness-changed\", { detail: { value: this.brightness } }) ); } get canIncreaseBrightness() { return this.brightness < this.brightnessMax; } get canDecreaseBrightness() { return this.brightness > 0; } /** * Handles link palette changes and emits `link-palette-changed`. * @fires link-palette-changed * @param {CustomEvent} event */ onLinkPaletteChanged(event) { this.dispatchEvent( new CustomEvent(\"link-palette-changed\", { detail: { value: event.target.checked } }) ); } /** * Handles link brightness changes and emits `link-brightness-changed`. * @fires link-brightness-changed * @param {CustomEvent} event */ onLinkBrightnessChanged(event) { this.dispatchEvent( new CustomEvent(\"link-brightness-changed\", { detail: { value: event.target.checked } }) ); } get availablePalettes() { const palettes = []; if (this.showNightPalette) palettes.push( \"night\" /* night */ ); if (this.showDuskPalette) palettes.push( \"dusk\" /* dusk */ ); if (this.showDayPalette) palettes.push( \"day\" /* day */ ); if (this.showBrightPalette) palettes.push( \"bright\" /* bright */ ); return palettes; } get canIncreasePalette() { const palettes = this.availablePalettes; const idx = palettes.indexOf(this.palette); return idx >= 0 && idx < palettes.length - 1; } get canDecreasePalette() { const palettes = this.availablePalettes; const idx = palettes.indexOf(this.palette); return idx > 0; } nextPalette() { if (this.canIncreasePalette) { const palettes = this.availablePalettes; const idx = palettes.indexOf(this.palette); this.palette = palettes[idx + 1]; this.dispatchEvent( new CustomEvent(\"palette-changed\", { detail: { value: this.palette } }) ); } } previousPalette() { if (this.canDecreasePalette) { const palettes = this.availablePalettes; const idx = palettes.indexOf(this.palette); this.palette = palettes[idx - 1]; this.dispatchEvent( new CustomEvent(\"palette-changed\", { detail: { value: this.palette } }) ); } } renderBrightness() { const title = this.variant === \"tabbed\" ? nothing : html`<div class=\"title-container\"> <h3>${msg(\"Brilliance\")}</h3> </div>`; const valueLength = this.brightness.toString().length + 0.5 * this.brightnessUnit.length; return html`${title} <div class=\"content-container brilliance\"> ${this.variant === \"compact\" ? html` <obc-slider value=${this.brightness} @value=${this.handleBrightnessChanged} min=\"0\" max=${this.brightnessMax} variant=${ObcSliderVariant.Normal} haslefticon hasrighticon > <obi-display-brilliance-low slot=\"icon-left\" ></obi-display-brilliance-low> <obi-display-brilliance-proposal slot=\"icon-right\" ></obi-display-brilliance-proposal> </obc-slider>` : html` <div class=\"value-container\"> <div class=\"value-label-container\"> <obi-display-brilliance-proposal class=\"icon\" ></obi-display-brilliance-proposal> <div class=\"label-container\" style=\"width: ${valueLength}ch\" > <div class=\"value\">${this.brightness.toFixed(0)}</div> <div class=\"unit\">${this.brightnessUnit}</div> </div> </div> <div class=\"value-slider-container\"> ${this.brightnessInputVariant === \"buttons\" ? html` <obc-slider value=${this.brightness} variant=${ObcSliderVariant.NoInput} min=\"0\" max=${this.brightnessMax} ></obc-slider> ` : html` <obc-slider value=${this.brightness} variant=${ObcSliderVariant.Enhanced} @value=${this.handleBrightnessChanged} min=\"0\" max=${this.brightnessMax} ></obc-slider> `} </div> </div> ${this.brightnessInputVariant === \"buttons\" ? html` <div class=\"icon-button-container\"> <obc-button segmentPosition=\"start\" fullWidth ?disabled=${!this.canDecreaseBrightness} class=${this.canDecreaseBrightness ? \"\" : \"disabled\"} @click=${() => this.increaseBrightness( -this.brightnessMajorStep )} > <obi-chevron-double-left-google class=\"btn-icon\" ></obi-chevron-double-left-google> </obc-button> <obc-button segmentPosition=\"middle\" fullWidth ?disabled=${!this.canDecreaseBrightness} class=${this.canDecreaseBrightness ? \"\" : \"disabled\"} @click=${() => this.increaseBrightness( -this.brightnessMinorStep )} > <obi-chevron-left-google class=\"btn-icon\" ></obi-chevron-left-google> </obc-button> <obc-button segmentPosition=\"middle\" fullWidth ?disabled=${!this.canIncreaseBrightness} class=${this.canIncreaseBrightness ? \"\" : \"disabled\"} @click=${() => this.increaseBrightness(this.brightnessMinorStep)} > <obi-chevron-right-google class=\"btn-icon\" ></obi-chevron-right-google> </obc-button> <obc-button segmentPosition=\"end\" fullWidth ?disabled=${!this.canIncreaseBrightness} class=${this.canIncreaseBrightness ? \"\" : \"disabled\"} @click=${() => this.increaseBrightness(this.brightnessMajorStep)} > <obi-chevron-double-right-google class=\"btn-icon\" ></obi-chevron-double-right-google> </obc-button> </div> ` : nothing} `} ${this.showLinkBrightness ? html`<obc-toggle-switch .label=\"${msg(\"Link\")}\" hasicon @input=${this.onLinkBrightnessChanged} > <obi-link slot=\"icon\"></obi-link> </obc-toggle-switch>` : nothing} </div>`; } get effectivePalette() { const palettes = this.availablePalettes; return palettes.includes(this.palette) ? this.palette : palettes[0]; } get paletteIcon() { if (this.effectivePalette === \"night\") { return html`<obi-palette-night class=\"icon\"></obi-palette-night>`; } else if (this.effectivePalette === \"dusk\") { return html`<obi-palette-dusk class=\"icon\"></obi-palette-dusk>`; } else if (this.effectivePalette === \"day\") { return html`<obi-palette-day class=\"icon\"></obi-palette-day>`; } else if (this.effectivePalette === \"bright\") { return html`<obi-palette-day-bright class=\"icon\" ></obi-palette-day-bright>`; } else { return nothing; } } paletteOptions() { const out = []; if (this.showNightPalette) out.push( html`<obc-toggle-button-option value=\"night\" type=\"icon\"> <obi-palette-night slot=\"icon\"></obi-palette-night> </obc-toggle-button-option>` ); if (this.showDuskPalette) out.push( html`<obc-toggle-button-option value=\"dusk\" type=\"icon\"> <obi-palette-dusk slot=\"icon\"></obi-palette-dusk> </obc-toggle-button-option>` ); if (this.showDayPalette) out.push( html`<obc-toggle-button-option value=\"day\" type=\"icon\"> <obi-palette-day slot=\"icon\"></obi-palette-day> </obc-toggle-button-option>` ); if (this.showBrightPalette) out.push( html`<obc-toggle-button-option value=\"bright\" type=\"icon\"> <obi-palette-day-bright slot=\"icon\"></obi-palette-day-bright> </obc-toggle-button-option>` ); return out; } renderPalette() { const palettes = this.availablePalettes; if (palettes.length === 0) return nothing; const paletteNames = { [ \"night\" /* night */ ]: msg(\"Night\"), [ \"dusk\" /* dusk */ ]: msg(\"Dusk\"), [ \"day\" /* day */ ]: msg(\"Day\"), [ \"bright\" /* bright */ ]: msg(\"Bright\") }; const currentPaletteName = paletteNames[this.effectivePalette]; const valueLength = currentPaletteName.length; const index = palettes.indexOf(this.effectivePalette); const nextIndex = Math.min(index + 1, palettes.length - 1); const previousIndex = Math.max(index - 1, 0); const nextPalette = paletteNames[palettes[nextIndex]]; const previousPalette = paletteNames[palettes[previousIndex]]; return html` ${this.variant === \"tabbed\" ? nothing : html` <div class=\"title-container\"> <h3>${msg(\"Day\")}/${msg(\"Night\")}</h3> </div> `} <div class=\"content-container palette ${this.showLinkPalette ? \"with-link\" : \"without-link\"}\" > ${this.variant === \"compact\" ? html` <obc-toggle-button-group value=${this.effectivePalette} @value=${this.onPaletteChanged} variant=${ObcToggleButtonOptionVariant.regular} type=${ObcToggleButtonOptionType.icon} > ${this.paletteOptions()} </obc-toggle-button-group>` : html` <div class=\"value-container\"> <div class=\"value-label-container\"> ${this.paletteIcon} <div class=\"label-container\" style=\"width: ${valueLength}ch\" > <div class=\"value\">${currentPaletteName}</div> </div> </div> <obc-progress-indicator-dots .totalSteps=${palettes.length} .currentStep=${index + 1} ></obc-progress-indicator-dots> </div> <div class=\"icon-button-container\"> <obc-button segmentPosition=\"start\" fullWidth showLeadingIcon ?disabled=${!this.canDecreasePalette} class=${this.canDecreasePalette ? \"\" : \"disabled\"} @click=${() => this.previousPalette()} > ${previousPalette} <obi-chevron-left-google slot=\"leading-icon\" ></obi-chevron-left-google> </obc-button> <obc-button segmentPosition=\"end\" fullWidth showTrailingIcon ?disabled=${!this.canIncreasePalette} class=${this.canIncreasePalette ? \"\" : \"disabled\"} @click=${() => this.nextPalette()} > ${nextPalette} <obi-chevron-right-google slot=\"trailing-icon\" ></obi-chevron-right-google> </obc-button> </div> `} ${this.showLinkPalette ? html`<obc-toggle-switch .label=\"${msg(\"Link\")}\" hasicon @input=${this.onLinkPaletteChanged} > <obi-link slot=\"icon\"></obi-link> </obc-toggle-switch>` : nothing} </div> `; } renderScreenControlLink() { if (!this.showScreenControlLink) { return nothing; } return html` <div class=\"footer\"> <obc-navigation-item .label=\"${msg(\"Screen Control\")}\" @click=${() => this.handleScreenControlLinkClicked()} hasicon > <obc-user-button slot=\"icon\" static variant=\"icon\" styleType=\"normal\"> <obi-screen-desk slot=\"icon\"></obi-screen-desk> </obc-user-button> </obc-navigation-item> </div> `; } render() { if (this.variant === \"tabbed\") { return html`<obc-tabbed-card class=\"card\" nTabs=${2} hasTabIcons> <span slot=\"tab-title-0\">${msg(\"Brilliance\")}</span> <obi-display-brilliance-iec slot=\"tab-icon-0\" ></obi-display-brilliance-iec> <span slot=\"tab-title-1\">${msg(\"Day\")}/${msg(\"Night\")}</span> <obi-palette-day-night-iec slot=\"tab-icon-1\" ></obi-palette-day-night-iec> <div slot=\"tab-content-0\"> ${this.renderBrightness()} ${this.renderScreenControlLink()} </div> <div slot=\"tab-content-1\"> ${this.renderPalette()} ${this.renderScreenControlLink()} </div> </obc-tabbed-card>`; } else { return html` <div class=\"card ${this.variant}\"> ${this.showBrightness ? this.renderBrightness() : nothing} ${this.showBrightness && this.showPalette ? html`<div class=\"divider\"></div>` : nothing} ${this.showPalette ? this.renderPalette() : nothing} ${this.renderScreenControlLink()} </div> `; } } handleScreenControlLinkClicked() { this.dispatchEvent(new CustomEvent(\"screen-control-link-clicked\")); } }"
|
|
5515
|
+
"default": "class extends LitElement { constructor() { super(...arguments); this.palette = \"day\"; this.brightness = 50; this.showLinkBrightness = false; this.showLinkPalette = false; this.showBrightness = true; this.showPalette = true; this.showNightPalette = true; this.showDuskPalette = true; this.showDayPalette = true; this.showBrightPalette = true; this.variant = \"normal\"; this.brightnessUnit = \"%\"; this.brightnessMax = 100; this.brightnessMinorStep = 5; this.brightnessMajorStep = 25; this.brightnessInputVariant = \"buttons\"; this.showScreenControlLink = false; this.showAdditionalScreenControls = false; this.selectedTabId = BRILLIANCE_TAB_ID; } willUpdate(_changed) { if (this.showPalette) { const available = this.availablePalettes; if (available.length > 0 && !available.includes(this.palette)) { this.palette = available[0]; this.dispatchEvent( new CustomEvent(\"palette-changed\", { detail: { value: this.palette } }) ); } } } /** * Handles palette selection changes and emits `palette-changed`. * @fires palette-changed * @param {CustomEvent} event */ onPaletteChanged(event) { this.palette = event.detail.value; this.dispatchEvent( new CustomEvent(\"palette-changed\", { detail: { value: event.detail.value } }) ); } /** * Handles brightness slider changes and emits `brightness-changed`. * @fires brightness-changed * @param {CustomEvent} event */ handleBrightnessChanged(event) { this.brightness = event.detail; this.dispatchEvent( new CustomEvent(\"brightness-changed\", { detail: { value: event.detail } }) ); } increaseBrightness(step) { this.brightness = Math.max( 0, Math.min(this.brightness + step, this.brightnessMax) ); this.dispatchEvent( new CustomEvent(\"brightness-changed\", { detail: { value: this.brightness } }) ); } get canIncreaseBrightness() { return this.brightness < this.brightnessMax; } get canDecreaseBrightness() { return this.brightness > 0; } /** * Handles link palette changes and emits `link-palette-changed`. * @fires link-palette-changed * @param {CustomEvent} event */ onLinkPaletteChanged(event) { this.dispatchEvent( new CustomEvent(\"link-palette-changed\", { detail: { value: event.target.checked } }) ); } /** * Handles link brightness changes and emits `link-brightness-changed`. * @fires link-brightness-changed * @param {CustomEvent} event */ onLinkBrightnessChanged(event) { this.dispatchEvent( new CustomEvent(\"link-brightness-changed\", { detail: { value: event.target.checked } }) ); } get availablePalettes() { const palettes = []; if (this.showNightPalette) palettes.push( \"night\" /* night */ ); if (this.showDuskPalette) palettes.push( \"dusk\" /* dusk */ ); if (this.showDayPalette) palettes.push( \"day\" /* day */ ); if (this.showBrightPalette) palettes.push( \"bright\" /* bright */ ); return palettes; } get canIncreasePalette() { const palettes = this.availablePalettes; const idx = palettes.indexOf(this.palette); return idx >= 0 && idx < palettes.length - 1; } get canDecreasePalette() { const palettes = this.availablePalettes; const idx = palettes.indexOf(this.palette); return idx > 0; } onTabSelected(event) { this.selectedTabId = event.detail.id; } get tabs() { return [ { id: BRILLIANCE_TAB_ID, title: msg(\"Brilliance\"), hasLeadingIcon: true }, { id: PALETTE_TAB_ID, title: `${msg(\"Day\")}/${msg(\"Night\")}`, hasLeadingIcon: true } ]; } nextPalette() { if (this.canIncreasePalette) { const palettes = this.availablePalettes; const idx = palettes.indexOf(this.palette); this.palette = palettes[idx + 1]; this.dispatchEvent( new CustomEvent(\"palette-changed\", { detail: { value: this.palette } }) ); } } previousPalette() { if (this.canDecreasePalette) { const palettes = this.availablePalettes; const idx = palettes.indexOf(this.palette); this.palette = palettes[idx - 1]; this.dispatchEvent( new CustomEvent(\"palette-changed\", { detail: { value: this.palette } }) ); } } renderBrightness() { const title = this.variant === \"tabbed\" ? nothing : html`<div class=\"title-container\"> <h3>${msg(\"Brilliance\")}</h3> </div>`; const valueLength = this.brightness.toString().length + 0.5 * this.brightnessUnit.length; return html`${title} <div class=\"content-container brilliance\"> ${this.variant === \"compact\" ? html` <obc-slider value=${this.brightness} @value=${this.handleBrightnessChanged} min=\"0\" max=${this.brightnessMax} variant=${ObcSliderVariant.Normal} haslefticon hasrighticon > <obi-display-brilliance-low slot=\"icon-left\" ></obi-display-brilliance-low> <obi-display-brilliance-proposal slot=\"icon-right\" ></obi-display-brilliance-proposal> </obc-slider>` : html` <div class=\"value-container\"> <div class=\"value-label-container\"> <obi-display-brilliance-proposal class=\"icon\" ></obi-display-brilliance-proposal> <div class=\"label-container\" style=\"width: ${valueLength}ch\" > <div class=\"value\">${this.brightness.toFixed(0)}</div> <div class=\"unit\">${this.brightnessUnit}</div> </div> </div> <div class=\"value-slider-container\"> ${this.brightnessInputVariant === \"buttons\" ? html` <obc-slider value=${this.brightness} variant=${ObcSliderVariant.NoInput} min=\"0\" max=${this.brightnessMax} ></obc-slider> ` : html` <obc-slider value=${this.brightness} variant=${ObcSliderVariant.Enhanced} @value=${this.handleBrightnessChanged} min=\"0\" max=${this.brightnessMax} ></obc-slider> `} </div> </div> ${this.brightnessInputVariant === \"buttons\" ? html` <div class=\"icon-button-container\"> <obc-button segmentPosition=\"start\" fullWidth ?disabled=${!this.canDecreaseBrightness} class=${this.canDecreaseBrightness ? \"\" : \"disabled\"} @click=${() => this.increaseBrightness( -this.brightnessMajorStep )} > <obi-chevron-double-left-google class=\"btn-icon\" ></obi-chevron-double-left-google> </obc-button> <obc-button segmentPosition=\"middle\" fullWidth ?disabled=${!this.canDecreaseBrightness} class=${this.canDecreaseBrightness ? \"\" : \"disabled\"} @click=${() => this.increaseBrightness( -this.brightnessMinorStep )} > <obi-chevron-left-google class=\"btn-icon\" ></obi-chevron-left-google> </obc-button> <obc-button segmentPosition=\"middle\" fullWidth ?disabled=${!this.canIncreaseBrightness} class=${this.canIncreaseBrightness ? \"\" : \"disabled\"} @click=${() => this.increaseBrightness(this.brightnessMinorStep)} > <obi-chevron-right-google class=\"btn-icon\" ></obi-chevron-right-google> </obc-button> <obc-button segmentPosition=\"end\" fullWidth ?disabled=${!this.canIncreaseBrightness} class=${this.canIncreaseBrightness ? \"\" : \"disabled\"} @click=${() => this.increaseBrightness(this.brightnessMajorStep)} > <obi-chevron-double-right-google class=\"btn-icon\" ></obi-chevron-double-right-google> </obc-button> </div> ` : nothing} `} ${this.showLinkBrightness ? html`<obc-toggle-switch .label=\"${msg(\"Link\")}\" hasicon @input=${this.onLinkBrightnessChanged} > <obi-link slot=\"icon\"></obi-link> </obc-toggle-switch>` : nothing} </div>`; } get effectivePalette() { const palettes = this.availablePalettes; return palettes.includes(this.palette) ? this.palette : palettes[0]; } get paletteIcon() { if (this.effectivePalette === \"night\") { return html`<obi-palette-night class=\"icon\"></obi-palette-night>`; } else if (this.effectivePalette === \"dusk\") { return html`<obi-palette-dusk class=\"icon\"></obi-palette-dusk>`; } else if (this.effectivePalette === \"day\") { return html`<obi-palette-day class=\"icon\"></obi-palette-day>`; } else if (this.effectivePalette === \"bright\") { return html`<obi-palette-day-bright class=\"icon\" ></obi-palette-day-bright>`; } else { return nothing; } } paletteOptions() { const out = []; if (this.showNightPalette) out.push( html`<obc-toggle-button-option value=\"night\" type=\"icon\"> <obi-palette-night slot=\"icon\"></obi-palette-night> </obc-toggle-button-option>` ); if (this.showDuskPalette) out.push( html`<obc-toggle-button-option value=\"dusk\" type=\"icon\"> <obi-palette-dusk slot=\"icon\"></obi-palette-dusk> </obc-toggle-button-option>` ); if (this.showDayPalette) out.push( html`<obc-toggle-button-option value=\"day\" type=\"icon\"> <obi-palette-day slot=\"icon\"></obi-palette-day> </obc-toggle-button-option>` ); if (this.showBrightPalette) out.push( html`<obc-toggle-button-option value=\"bright\" type=\"icon\"> <obi-palette-day-bright slot=\"icon\"></obi-palette-day-bright> </obc-toggle-button-option>` ); return out; } renderPalette() { const palettes = this.availablePalettes; if (palettes.length === 0) return nothing; const paletteNames = { [ \"night\" /* night */ ]: msg(\"Night\"), [ \"dusk\" /* dusk */ ]: msg(\"Dusk\"), [ \"day\" /* day */ ]: msg(\"Day\"), [ \"bright\" /* bright */ ]: msg(\"Bright\") }; const currentPaletteName = paletteNames[this.effectivePalette]; const valueLength = currentPaletteName.length; const index = palettes.indexOf(this.effectivePalette); const nextIndex = Math.min(index + 1, palettes.length - 1); const previousIndex = Math.max(index - 1, 0); const nextPalette = paletteNames[palettes[nextIndex]]; const previousPalette = paletteNames[palettes[previousIndex]]; return html` ${this.variant === \"tabbed\" ? nothing : html` <div class=\"title-container\"> <h3>${msg(\"Day\")}/${msg(\"Night\")}</h3> </div> `} <div class=\"content-container palette ${this.showLinkPalette ? \"with-link\" : \"without-link\"}\" > ${this.variant === \"compact\" ? html` <obc-toggle-button-group value=${this.effectivePalette} @value=${this.onPaletteChanged} variant=${ObcToggleButtonOptionVariant.regular} type=${ObcToggleButtonOptionType.icon} > ${this.paletteOptions()} </obc-toggle-button-group>` : html` <div class=\"value-container\"> <div class=\"value-label-container\"> ${this.paletteIcon} <div class=\"label-container\" style=\"width: ${valueLength}ch\" > <div class=\"value\">${currentPaletteName}</div> </div> </div> <obc-progress-indicator-dots .totalSteps=${palettes.length} .currentStep=${index + 1} ></obc-progress-indicator-dots> </div> <div class=\"icon-button-container\"> <obc-button segmentPosition=\"start\" fullWidth showLeadingIcon ?disabled=${!this.canDecreasePalette} class=${this.canDecreasePalette ? \"\" : \"disabled\"} @click=${() => this.previousPalette()} > ${previousPalette} <obi-chevron-left-google slot=\"leading-icon\" ></obi-chevron-left-google> </obc-button> <obc-button segmentPosition=\"end\" fullWidth showTrailingIcon ?disabled=${!this.canIncreasePalette} class=${this.canIncreasePalette ? \"\" : \"disabled\"} @click=${() => this.nextPalette()} > ${nextPalette} <obi-chevron-right-google slot=\"trailing-icon\" ></obi-chevron-right-google> </obc-button> </div> `} ${this.showLinkPalette ? html`<obc-toggle-switch .label=\"${msg(\"Link\")}\" hasicon @input=${this.onLinkPaletteChanged} > <obi-link slot=\"icon\"></obi-link> </obc-toggle-switch>` : nothing} </div> `; } renderScreenControlLink() { if (this.showScreenControlLink || this.showAdditionalScreenControls) { return html` <div class=\"footer\"> ${this.showScreenControlLink ? html` <obc-navigation-item .label=\"${msg(\"Screen Control\")}\" @click=${() => this.handleScreenControlLinkClicked()} hasicon > <obc-user-button slot=\"icon\" static variant=\"icon\" styleType=\"normal\" > <obi-screen-desk slot=\"icon\"></obi-screen-desk> </obc-user-button> </obc-navigation-item> ` : nothing} ${this.showAdditionalScreenControls ? html`<slot name=\"additional-screen-controls\"></slot>` : nothing} </div> `; } return nothing; } render() { if (this.variant === \"tabbed\") { const tabs = this.tabs; const [brillianceTab, paletteTab] = tabs; return html` <div class=\"card tabbed\"> <obc-tab-row .tabs=${tabs} .selectedTabId=${this.selectedTabId} .centerContent=${true} @tab-selected=${this.onTabSelected} > <obi-display-brilliance-iec slot=\"tab-${BRILLIANCE_TAB_ID}-icon\" ></obi-display-brilliance-iec> <obi-palette-day-night-iec slot=\"tab-${PALETTE_TAB_ID}-icon\" ></obi-palette-day-night-iec> </obc-tab-row> <!-- TODO(#1312): link the panels to their tabs once obc-tab-row supports it --> <div role=\"tabpanel\" aria-label=${brillianceTab.title} ?hidden=${this.selectedTabId !== BRILLIANCE_TAB_ID} > ${this.renderBrightness()} </div> <div role=\"tabpanel\" aria-label=${paletteTab.title} ?hidden=${this.selectedTabId !== PALETTE_TAB_ID} > ${this.renderPalette()} </div> ${this.renderScreenControlLink()} </div> `; } else { return html` <div class=\"card ${this.variant}\"> ${this.showBrightness ? this.renderBrightness() : nothing} ${this.showBrightness && this.showPalette ? html`<div class=\"divider\"></div>` : nothing} ${this.showPalette ? this.renderPalette() : nothing} ${this.renderScreenControlLink()} </div> `; } } handleScreenControlLinkClicked() { this.dispatchEvent(new CustomEvent(\"screen-control-link-clicked\")); } }"
|
|
5516
5516
|
}
|
|
5517
5517
|
],
|
|
5518
5518
|
"exports": [
|
|
@@ -8729,7 +8729,7 @@
|
|
|
8729
8729
|
{
|
|
8730
8730
|
"kind": "variable",
|
|
8731
8731
|
"name": "ObcIntegrationBarDropdown",
|
|
8732
|
-
"default": "class extends LitElement { constructor() { super(...arguments); this.showHomeButton = false; this.homeButtonActivated = false; this.showLinkButton = false; this.linkButtonActivated = false; this.showClock = false; this.showAlertButton = false; this.alertButtonActivated = false; this.showNotificationButton = false; this.notificationButtonActivated = false; this.notificationCount = 0; this.showNotificationCount = false; this.showScreenButton = false; this.screenButtonActivated = false; this.showUserButton = false; this.userButtonActivated = false; this.showDimmingButton = false; this.dimmingButtonActivated = false; this.showSystemButton = false; this.systemButtonActivated = false; this.nStatusFields = 0; } renderStatusFields() { if (this.nStatusFields <= 0) { return nothing; } const result = []; for (let i = 0; i < this.nStatusFields; i++) { if (i > 0) { result.push(html`<div class=\"divider\"></div>`); } result.push(html` <div class=\"status-item\"> <slot class=\"status-icon\" name=\"status-icon-${i + 1}\"></slot> <slot class=\"status-label\" name=\"status-label-${i + 1}\"></slot> </div> `); } return html`<div class=\"status\">${result}</div>`; } // The event name stays a literal at each call site so `cem analyze` can read it. renderIconButton(name, activated, label, icon, onClick) { return html`<obc-icon-button class=\"${name}-button\" part=\"${name}-button\" variant=\"integration\" aria-label=${label} @click=${onClick} ?activated=${activated} > ${icon} </obc-icon-button>`; } render() { return html` <div class=\"wrapper\"> <div class=\"left-side\"> ${this.showHomeButton ? this.renderIconButton( \"home\", this.homeButtonActivated, msg(\"Home\"), html`<obi-home></obi-home>`, () => this.dispatchEvent(new CustomEvent(\"home-button-clicked\")) ) : nothing} ${this.showLinkButton ? this.renderIconButton( \"link\", this.linkButtonActivated, msg(\"Link\"), html`<obi-link></obi-link>`, () => this.dispatchEvent(new CustomEvent(\"link-button-clicked\")) ) : nothing} <slot name=\"vessel-selector\"></slot> ${this.renderStatusFields()} </div> <div class=\"right-side\"> ${this.showAlertButton ? this.renderIconButton( \"alert\", this.alertButtonActivated, msg(\"Alerts\"), html`<obi-alerts></obi-alerts>`, () => this.dispatchEvent(new CustomEvent(\"alert-button-clicked\")) ) : nothing} ${this.showNotificationButton ? ( // TODO(designer): keep the Enhanced badge button here, or match the // sibling bar's plain notification icon button? (#624) html`<obc-notification-button @click=${() => this.dispatchEvent( new CustomEvent(\"notification-button-clicked\") )} .buttonStyle=${NotificationButtonStyle.Enhanced} .showCount=${this.showNotificationCount} .count=${this.notificationCount} ?isActive=${this.notificationButtonActivated} ></obc-notification-button>` ) : nothing} ${this.showScreenButton ? this.renderIconButton( \"screen\", this.screenButtonActivated, msg(\"Screen\"), html`<obi-screen-desk></obi-screen-desk>`, () => this.dispatchEvent(new CustomEvent(\"screen-button-clicked\")) ) : nothing} ${this.showSystemButton ? this.renderIconButton( \"system\", this.systemButtonActivated, msg(\"System\"), html`<obi-configure></obi-configure>`, () => this.dispatchEvent(new CustomEvent(\"system-button-clicked\")) ) : nothing} ${this.showDimmingButton ? this.renderIconButton( \"dimming\", this.dimmingButtonActivated, msg(\"Dimming\"), html`<obi-palette-day-night-iec></obi-palette-day-night-iec>`, () => this.dispatchEvent( new CustomEvent(\"dimming-button-clicked\") ) ) : nothing} ${this.showUserButton ? this.renderIconButton( \"user\", this.userButtonActivated, msg(\"User\"), html`<obi-user></obi-user>`, () => this.dispatchEvent(new CustomEvent(\"user-button-clicked\")) ) : nothing} ${this.showClock ? html`<slot name=\"clock\"></slot>` : nothing} </div> </div> `; } }"
|
|
8732
|
+
"default": "class extends LitElement { constructor() { super(...arguments); this.showHomeButton = false; this.homeButtonActivated = false; this.showLinkButton = false; this.linkButtonActivated = false; this.showClock = false; this.showAlertButton = false; this.alertButtonActivated = false; this.showNotificationButton = false; this.notificationButtonActivated = false; this.notificationCount = 0; this.showNotificationCount = false; this.showScreenButton = false; this.screenButtonActivated = false; this.showUserButton = false; this.userButtonActivated = false; this.showDimmingButton = false; this.dimmingButtonActivated = false; this.showSystemButton = false; this.systemButtonActivated = false; this.nStatusFields = 0; this.hasRightTrayLeading = false; } renderStatusFields() { if (this.nStatusFields <= 0) { return nothing; } const result = []; for (let i = 0; i < this.nStatusFields; i++) { if (i > 0) { result.push(html`<div class=\"divider\"></div>`); } result.push(html` <div class=\"status-item\"> <slot class=\"status-icon\" name=\"status-icon-${i + 1}\"></slot> <slot class=\"status-label\" name=\"status-label-${i + 1}\"></slot> </div> `); } return html`<div class=\"status\">${result}</div>`; } // The event name stays a literal at each call site so `cem analyze` can read it. renderIconButton(name, activated, label, icon, onClick) { return html`<obc-icon-button class=\"${name}-button\" part=\"${name}-button\" variant=\"integration\" aria-label=${label} @click=${onClick} ?activated=${activated} > ${icon} </obc-icon-button>`; } render() { return html` <div class=\"wrapper\"> <div class=\"left-side\"> ${this.showHomeButton ? this.renderIconButton( \"home\", this.homeButtonActivated, msg(\"Home\"), html`<obi-home></obi-home>`, () => this.dispatchEvent(new CustomEvent(\"home-button-clicked\")) ) : nothing} ${this.showLinkButton ? this.renderIconButton( \"link\", this.linkButtonActivated, msg(\"Link\"), html`<obi-link></obi-link>`, () => this.dispatchEvent(new CustomEvent(\"link-button-clicked\")) ) : nothing} <slot name=\"vessel-selector\"></slot> ${this.renderStatusFields()} </div> <div class=\"right-side\"> ${this.hasRightTrayLeading ? html`<slot name=\"right-tray-leading\"></slot>` : nothing} ${this.showAlertButton ? this.renderIconButton( \"alert\", this.alertButtonActivated, msg(\"Alerts\"), html`<obi-alerts></obi-alerts>`, () => this.dispatchEvent(new CustomEvent(\"alert-button-clicked\")) ) : nothing} ${this.showNotificationButton ? ( // TODO(designer): keep the Enhanced badge button here, or match the // sibling bar's plain notification icon button? (#624) html`<obc-notification-button @click=${() => this.dispatchEvent( new CustomEvent(\"notification-button-clicked\") )} .buttonStyle=${NotificationButtonStyle.Enhanced} .showCount=${this.showNotificationCount} .count=${this.notificationCount} ?isActive=${this.notificationButtonActivated} ></obc-notification-button>` ) : nothing} ${this.showScreenButton ? this.renderIconButton( \"screen\", this.screenButtonActivated, msg(\"Screen\"), html`<obi-screen-desk></obi-screen-desk>`, () => this.dispatchEvent(new CustomEvent(\"screen-button-clicked\")) ) : nothing} ${this.showSystemButton ? this.renderIconButton( \"system\", this.systemButtonActivated, msg(\"System\"), html`<obi-configure></obi-configure>`, () => this.dispatchEvent(new CustomEvent(\"system-button-clicked\")) ) : nothing} ${this.showDimmingButton ? this.renderIconButton( \"dimming\", this.dimmingButtonActivated, msg(\"Dimming\"), html`<obi-palette-day-night-iec></obi-palette-day-night-iec>`, () => this.dispatchEvent( new CustomEvent(\"dimming-button-clicked\") ) ) : nothing} ${this.showUserButton ? this.renderIconButton( \"user\", this.userButtonActivated, msg(\"User\"), html`<obi-user></obi-user>`, () => this.dispatchEvent(new CustomEvent(\"user-button-clicked\")) ) : nothing} ${this.showClock ? html`<slot name=\"clock\"></slot>` : nothing} </div> </div> `; } }"
|
|
8733
8733
|
}
|
|
8734
8734
|
],
|
|
8735
8735
|
"exports": [
|
|
@@ -8750,7 +8750,7 @@
|
|
|
8750
8750
|
{
|
|
8751
8751
|
"kind": "variable",
|
|
8752
8752
|
"name": "ObcIntegrationBar",
|
|
8753
|
-
"default": "class extends LitElement { constructor() { super(...arguments); this.hideHomeButton = false; this.showClock = false; this.showLinkButton = false; this.linkButtonActivated = false; this.showUserButton = false; this.userButtonActivated = false; this.showDimmingButton = false; this.dimmingButtonActivated = false; this.showSystemButton = false; this.systemButtonActivated = false; this.showScreenButton = false; this.screenButtonActivated = false; this.showNotificationButton = false; this.notificationButtonActivated = false; this.showAlertButton = false; this.alertButtonActivated = false; this.showFleetButton = false; this.fleetButtonSelected = false; this.fleetButtonActivated = false; this.fleetButtonLabel = \"Fleet\"; this.buttonsOnBar = false; } onFleetButtonClick() { this.dispatchEvent(new CustomEvent(\"fleet-button-click\")); } onHugButtonsSlotChange(event) { const slot = event.currentTarget; const assignedElements = slot.assignedElements({ flatten: true }); assignedElements.forEach((element) => { if (element.tagName === \"OBC-INTEGRATION-BUTTON\") { const integrationButton = element; integrationButton.type = IntegrationButtonType.hug; } }); this.buttonsOnBar = true; } onButtonsSlotChange() { this.buttonsOnBar = true; } render() { const isFleetButtonAnchored = this.fleetButtonActivated; return html` <nav class=\"wrapper\"> <div class=\"content-container\"> ${!this.hideHomeButton ? html`<obc-icon-button class=\"home-button\" variant=\"integration\" aria-label=${msg(\"Home\")} > <obi-home></obi-home> </obc-icon-button>` : null} ${this.showLinkButton ? html`<obc-icon-button class=${classMap({ \"link-button\": true, activated: this.linkButtonActivated })} part=\"link-button\" variant=\"integration\" aria-label=${msg(\"Link\")} @click=${() => this.dispatchEvent(new CustomEvent(\"link-button-clicked\"))} ?activated=${this.linkButtonActivated} > <obi-link></obi-link> </obc-icon-button>` : null} <div class=${classMap({ \"fleet-vessel-container\": true })}> ${this.showFleetButton ? html`<obc-integration-button class=\"fleet-button\" .variant=${IntegrationButtonVariant.normal} ?selected=${this.fleetButtonSelected} ?activated=${this.fleetButtonActivated} style=${isFleetButtonAnchored ? \"anchor-name: --integration-menu-anchor;\" : \"\"} @click=${() => this.onFleetButtonClick()} > <span slot=\"label\">${this.fleetButtonLabel}</span> </obc-integration-button>` : nothing} <div class=\"vessel-container\"> ${this.buttonsOnBar ? nothing : html`<div class=\"vessel-button-placeholder\"></div>`} <slot class=\"hug-buttons-slot\" name=\"hug-buttons\" @slotchange=${this.onHugButtonsSlotChange} ></slot> <slot class=\"integration-buttons-slot\" name=\"integration-buttons\" @slotchange=${this.onButtonsSlotChange} ></slot> </div> </div> </div> <div class=${classMap({ \"buttons-on-bar\": this.buttonsOnBar, \"right-content-container\": true })} > ${this.showAlertButton ? html`<obc-icon-button class=${classMap({ \"alert-button\": true, activated: this.alertButtonActivated })} part=\"alert-button\" variant=\"integration\" aria-label=${msg(\"Alerts\")} style=${this.alertButtonActivated ? \"anchor-name: --settings-menu-anchor;\" : \"\"} @click=${() => this.dispatchEvent(new CustomEvent(\"alert-button-clicked\"))} ?activated=${this.alertButtonActivated} > <obi-alerts></obi-alerts> </obc-icon-button>` : null} ${this.showNotificationButton ? html`<obc-icon-button class=${classMap({ \"notification-button\": true, activated: this.notificationButtonActivated })} part=\"notification-button\" variant=\"integration\" aria-label=${msg(\"Notifications\")} style=${this.notificationButtonActivated ? \"anchor-name: --settings-menu-anchor;\" : \"\"} @click=${() => this.dispatchEvent( new CustomEvent(\"notification-button-clicked\") )} ?activated=${this.notificationButtonActivated} > <obi-notification></obi-notification> </obc-icon-button>` : null} ${this.showScreenButton ? html`<obc-icon-button class=${classMap({ \"screen-button\": true, activated: this.screenButtonActivated })} part=\"screen-button\" variant=\"integration\" aria-label=${msg(\"Screen\")} style=${this.screenButtonActivated ? \"anchor-name: --settings-menu-anchor;\" : \"\"} @click=${() => this.dispatchEvent( new CustomEvent(\"screen-button-clicked\") )} ?activated=${this.screenButtonActivated} > <obi-screen-desk></obi-screen-desk> </obc-icon-button>` : null} ${this.showSystemButton ? html`<obc-icon-button class=${classMap({ \"system-button\": true, activated: this.systemButtonActivated })} part=\"system-button\" variant=\"integration\" aria-label=${msg(\"System\")} style=${this.systemButtonActivated ? \"anchor-name: --settings-menu-anchor;\" : \"\"} @click=${() => this.dispatchEvent( new CustomEvent(\"system-button-clicked\") )} ?activated=${this.systemButtonActivated} > <obi-configure></obi-configure> </obc-icon-button>` : null} ${this.showDimmingButton ? html`<obc-icon-button class=${classMap({ \"dimming-button\": true, activated: this.dimmingButtonActivated })} part=\"dimming-button\" variant=\"integration\" aria-label=${msg(\"Dimming\")} style=${this.dimmingButtonActivated ? \"anchor-name: --settings-menu-anchor;\" : \"\"} @click=${() => this.dispatchEvent( new CustomEvent(\"dimming-button-clicked\") )} ?activated=${this.dimmingButtonActivated} > <obi-palette-day-night-iec></obi-palette-day-night-iec> </obc-icon-button>` : null} ${this.showUserButton ? html`<obc-icon-button class=${classMap({ \"user-button\": true, activated: this.userButtonActivated })} part=\"user-button\" variant=\"integration\" aria-label=${msg(\"User\")} style=${this.userButtonActivated ? \"anchor-name: --settings-menu-anchor;\" : \"\"} @click=${() => this.dispatchEvent(new CustomEvent(\"user-button-clicked\"))} ?activated=${this.userButtonActivated} > <obi-user></obi-user> </obc-icon-button>` : null} ${this.showClock ? html`<slot name=\"clock\"></slot>` : null} </div> </nav> `; } }"
|
|
8753
|
+
"default": "class extends LitElement { constructor() { super(...arguments); this.hideHomeButton = false; this.showClock = false; this.showLinkButton = false; this.linkButtonActivated = false; this.showUserButton = false; this.userButtonActivated = false; this.showDimmingButton = false; this.dimmingButtonActivated = false; this.showSystemButton = false; this.systemButtonActivated = false; this.showScreenButton = false; this.screenButtonActivated = false; this.showNotificationButton = false; this.notificationButtonActivated = false; this.showAlertButton = false; this.alertButtonActivated = false; this.showFleetButton = false; this.fleetButtonSelected = false; this.fleetButtonActivated = false; this.fleetButtonLabel = \"Fleet\"; this.hasRightTrayLeading = false; this.buttonsOnBar = false; } onFleetButtonClick() { this.dispatchEvent(new CustomEvent(\"fleet-button-click\")); } onHugButtonsSlotChange(event) { const slot = event.currentTarget; const assignedElements = slot.assignedElements({ flatten: true }); assignedElements.forEach((element) => { if (element.tagName === \"OBC-INTEGRATION-BUTTON\") { const integrationButton = element; integrationButton.type = IntegrationButtonType.hug; } }); this.buttonsOnBar = true; } onButtonsSlotChange() { this.buttonsOnBar = true; } render() { const isFleetButtonAnchored = this.fleetButtonActivated; return html` <nav class=\"wrapper\"> <div class=\"content-container\"> ${!this.hideHomeButton ? html`<obc-icon-button class=\"home-button\" variant=\"integration\" aria-label=${msg(\"Home\")} > <obi-home></obi-home> </obc-icon-button>` : null} ${this.showLinkButton ? html`<obc-icon-button class=${classMap({ \"link-button\": true, activated: this.linkButtonActivated })} part=\"link-button\" variant=\"integration\" aria-label=${msg(\"Link\")} @click=${() => this.dispatchEvent(new CustomEvent(\"link-button-clicked\"))} ?activated=${this.linkButtonActivated} > <obi-link></obi-link> </obc-icon-button>` : null} <div class=${classMap({ \"fleet-vessel-container\": true })}> ${this.showFleetButton ? html`<obc-integration-button class=\"fleet-button\" .variant=${IntegrationButtonVariant.normal} ?selected=${this.fleetButtonSelected} ?activated=${this.fleetButtonActivated} style=${isFleetButtonAnchored ? \"anchor-name: --integration-menu-anchor;\" : \"\"} @click=${() => this.onFleetButtonClick()} > <span slot=\"label\">${this.fleetButtonLabel}</span> </obc-integration-button>` : nothing} <div class=\"vessel-container\"> ${this.buttonsOnBar ? nothing : html`<div class=\"vessel-button-placeholder\"></div>`} <slot class=\"hug-buttons-slot\" name=\"hug-buttons\" @slotchange=${this.onHugButtonsSlotChange} ></slot> <slot class=\"integration-buttons-slot\" name=\"integration-buttons\" @slotchange=${this.onButtonsSlotChange} ></slot> </div> </div> </div> <div class=${classMap({ \"buttons-on-bar\": this.buttonsOnBar, \"right-content-container\": true })} > ${this.hasRightTrayLeading ? html`<slot name=\"right-tray-leading\"></slot>` : nothing} ${this.showAlertButton ? html`<obc-icon-button class=${classMap({ \"alert-button\": true, activated: this.alertButtonActivated })} part=\"alert-button\" variant=\"integration\" aria-label=${msg(\"Alerts\")} style=${this.alertButtonActivated ? \"anchor-name: --settings-menu-anchor;\" : \"\"} @click=${() => this.dispatchEvent(new CustomEvent(\"alert-button-clicked\"))} ?activated=${this.alertButtonActivated} > <obi-alerts></obi-alerts> </obc-icon-button>` : null} ${this.showNotificationButton ? html`<obc-icon-button class=${classMap({ \"notification-button\": true, activated: this.notificationButtonActivated })} part=\"notification-button\" variant=\"integration\" aria-label=${msg(\"Notifications\")} style=${this.notificationButtonActivated ? \"anchor-name: --settings-menu-anchor;\" : \"\"} @click=${() => this.dispatchEvent( new CustomEvent(\"notification-button-clicked\") )} ?activated=${this.notificationButtonActivated} > <obi-notification></obi-notification> </obc-icon-button>` : null} ${this.showScreenButton ? html`<obc-icon-button class=${classMap({ \"screen-button\": true, activated: this.screenButtonActivated })} part=\"screen-button\" variant=\"integration\" aria-label=${msg(\"Screen\")} style=${this.screenButtonActivated ? \"anchor-name: --settings-menu-anchor;\" : \"\"} @click=${() => this.dispatchEvent( new CustomEvent(\"screen-button-clicked\") )} ?activated=${this.screenButtonActivated} > <obi-screen-desk></obi-screen-desk> </obc-icon-button>` : null} ${this.showSystemButton ? html`<obc-icon-button class=${classMap({ \"system-button\": true, activated: this.systemButtonActivated })} part=\"system-button\" variant=\"integration\" aria-label=${msg(\"System\")} style=${this.systemButtonActivated ? \"anchor-name: --settings-menu-anchor;\" : \"\"} @click=${() => this.dispatchEvent( new CustomEvent(\"system-button-clicked\") )} ?activated=${this.systemButtonActivated} > <obi-configure></obi-configure> </obc-icon-button>` : null} ${this.showDimmingButton ? html`<obc-icon-button class=${classMap({ \"dimming-button\": true, activated: this.dimmingButtonActivated })} part=\"dimming-button\" variant=\"integration\" aria-label=${msg(\"Dimming\")} style=${this.dimmingButtonActivated ? \"anchor-name: --settings-menu-anchor;\" : \"\"} @click=${() => this.dispatchEvent( new CustomEvent(\"dimming-button-clicked\") )} ?activated=${this.dimmingButtonActivated} > <obi-palette-day-night-iec></obi-palette-day-night-iec> </obc-icon-button>` : null} ${this.showUserButton ? html`<obc-icon-button class=${classMap({ \"user-button\": true, activated: this.userButtonActivated })} part=\"user-button\" variant=\"integration\" aria-label=${msg(\"User\")} style=${this.userButtonActivated ? \"anchor-name: --settings-menu-anchor;\" : \"\"} @click=${() => this.dispatchEvent(new CustomEvent(\"user-button-clicked\"))} ?activated=${this.userButtonActivated} > <obi-user></obi-user> </obc-icon-button>` : null} ${this.showClock ? html`<slot name=\"clock\"></slot>` : null} </div> </nav> `; } }"
|
|
8754
8754
|
}
|
|
8755
8755
|
],
|
|
8756
8756
|
"exports": [
|
|
@@ -52681,6 +52681,12 @@
|
|
|
52681
52681
|
"kind": "class",
|
|
52682
52682
|
"description": "`<obc-brilliance-menu>` – A settings menu component for adjusting display palette and brightness.\n\nProvides a combined interface for users to select a color palette (night, dusk, day, bright) and adjust screen brightness. Includes options for toggling automatic palette and brightness modes. Designed for quick access to visual environment controls in applications where adaptable display settings are important.\n\n### Features\n- **Palette Selection:** Choose between four preset palettes: night, dusk, day, and bright. Each palette is represented by an icon.\n- **Brightness Control:** Adjustable slider for fine-tuning brightness from 0 to 100. Optionally displays left/right icons for low and high brilliance.\n- **Auto Modes:** Optional toggles for enabling automatic palette switching and automatic brightness adjustment.\n- **Configurable Visibility:** Brightness controls and auto toggles can be shown or hidden via properties.\n- **Responsive Layout:** Arranged in a card-style panel for use in settings menus or overlays.\n\n### Variants\n- **Palette:** Four options—`night`, `dusk`, `day`, `bright`. Each is visually distinct and selectable via toggle button group.\n- **Auto Toggles:** `showAutoBrightness` and `showAutoPalette` properties control the presence of auto mode switches.\n- **Show Brightness:** The `showBrightness` property controls whether the brightness slider and auto brightness toggle are visible.\n\n### Usage Guidelines\nUse `obc-brilliance-menu` in settings panels or overlays where users need to quickly adjust display appearance. Ideal for scenarios requiring rapid adaptation to changing lighting conditions or user preferences.\n**TODO(designer):** Confirm if there are recommended default palette/brightness settings, and clarify intended use cases for auto toggles versus manual controls.\n\n### Properties and Configuration\n- `palette` (`ObcPalette`): The currently selected palette. Accepts `'night'`, `'dusk'`, `'day'`, or `'bright'`. Defaults to `'day'`.\n- `brightness` (`number`): Current brightness value (0–100). Defaults to `50`.\n- `showAutoBrightness` (`boolean`): If true, displays the auto brightness toggle.\n- `showAutoPalette` (`boolean`): If true, displays the auto palette toggle.\n- `showBrightness` (`boolean`): If true, shows the brightness slider and auto brightness toggle.\n\n### Events\n- `palette-changed` – Fired when the user selects a new palette. Event detail: `{ value: ObcPalette }`\n- `brightness-changed` – Fired when the brightness slider is adjusted. Event detail: `{ value: number }`\n\n### Example\n```html\n<obc-brilliance-menu\n palette=\"dusk\"\n brightness=\"75\"\n showAutoBrightness\n showAutoPalette\n></obc-brilliance-menu>\n```\nIn this example, both auto toggles are visible, the palette is set to dusk, and brightness is set to 75.",
|
|
52683
52683
|
"name": "ObcBrillianceMenu",
|
|
52684
|
+
"slots": [
|
|
52685
|
+
{
|
|
52686
|
+
"description": "Consumer-defined controls, placed after the screen control link; rendered when `showAdditionalScreenControls` is true",
|
|
52687
|
+
"name": "additional-screen-controls"
|
|
52688
|
+
}
|
|
52689
|
+
],
|
|
52684
52690
|
"members": [
|
|
52685
52691
|
{
|
|
52686
52692
|
"kind": "field",
|
|
@@ -52822,6 +52828,15 @@
|
|
|
52822
52828
|
"default": "false",
|
|
52823
52829
|
"description": "If true, displays the screen control link."
|
|
52824
52830
|
},
|
|
52831
|
+
{
|
|
52832
|
+
"kind": "field",
|
|
52833
|
+
"name": "showAdditionalScreenControls",
|
|
52834
|
+
"type": {
|
|
52835
|
+
"text": "boolean"
|
|
52836
|
+
},
|
|
52837
|
+
"default": "false",
|
|
52838
|
+
"description": "If true, displays the additional screen controls slot."
|
|
52839
|
+
},
|
|
52825
52840
|
{
|
|
52826
52841
|
"kind": "method",
|
|
52827
52842
|
"name": "willUpdate",
|
|
@@ -52926,6 +52941,37 @@
|
|
|
52926
52941
|
"name": "canDecreasePalette",
|
|
52927
52942
|
"readonly": true
|
|
52928
52943
|
},
|
|
52944
|
+
{
|
|
52945
|
+
"kind": "field",
|
|
52946
|
+
"name": "selectedTabId",
|
|
52947
|
+
"privacy": "private",
|
|
52948
|
+
"default": "'brilliance'",
|
|
52949
|
+
"type": {
|
|
52950
|
+
"text": "string"
|
|
52951
|
+
}
|
|
52952
|
+
},
|
|
52953
|
+
{
|
|
52954
|
+
"kind": "method",
|
|
52955
|
+
"name": "onTabSelected",
|
|
52956
|
+
"privacy": "private",
|
|
52957
|
+
"parameters": [
|
|
52958
|
+
{
|
|
52959
|
+
"name": "event",
|
|
52960
|
+
"type": {
|
|
52961
|
+
"text": "CustomEvent<{id: string}>"
|
|
52962
|
+
}
|
|
52963
|
+
}
|
|
52964
|
+
]
|
|
52965
|
+
},
|
|
52966
|
+
{
|
|
52967
|
+
"kind": "field",
|
|
52968
|
+
"name": "tabs",
|
|
52969
|
+
"type": {
|
|
52970
|
+
"text": "TabData[]"
|
|
52971
|
+
},
|
|
52972
|
+
"privacy": "private",
|
|
52973
|
+
"readonly": true
|
|
52974
|
+
},
|
|
52929
52975
|
{
|
|
52930
52976
|
"kind": "method",
|
|
52931
52977
|
"name": "nextPalette"
|
|
@@ -73859,6 +73905,10 @@
|
|
|
73859
73905
|
{
|
|
73860
73906
|
"description": "Custom clock content, rendered when `showClock` is true",
|
|
73861
73907
|
"name": "clock"
|
|
73908
|
+
},
|
|
73909
|
+
{
|
|
73910
|
+
"description": "Consumer-defined controls, placed first in the right-hand button group; rendered when `hasRightTrayLeading` is true",
|
|
73911
|
+
"name": "right-tray-leading"
|
|
73862
73912
|
}
|
|
73863
73913
|
],
|
|
73864
73914
|
"members": [
|
|
@@ -74042,6 +74092,15 @@
|
|
|
74042
74092
|
"default": "0",
|
|
74043
74093
|
"description": "How many `status-icon-N`/`status-label-N` slot pairs are rendered."
|
|
74044
74094
|
},
|
|
74095
|
+
{
|
|
74096
|
+
"kind": "field",
|
|
74097
|
+
"name": "hasRightTrayLeading",
|
|
74098
|
+
"type": {
|
|
74099
|
+
"text": "boolean"
|
|
74100
|
+
},
|
|
74101
|
+
"default": "false",
|
|
74102
|
+
"description": "Renders the `right-tray-leading` slot first in the right-hand button group."
|
|
74103
|
+
},
|
|
74045
74104
|
{
|
|
74046
74105
|
"kind": "method",
|
|
74047
74106
|
"name": "renderStatusFields",
|
|
@@ -74190,6 +74249,10 @@
|
|
|
74190
74249
|
{
|
|
74191
74250
|
"description": "Compact vessel integration buttons; slotted integration buttons are forced to hug type",
|
|
74192
74251
|
"name": "hug-buttons"
|
|
74252
|
+
},
|
|
74253
|
+
{
|
|
74254
|
+
"description": "Consumer-defined controls, placed first in the right-hand button group; rendered when `hasRightTrayLeading` is true",
|
|
74255
|
+
"name": "right-tray-leading"
|
|
74193
74256
|
}
|
|
74194
74257
|
],
|
|
74195
74258
|
"members": [
|
|
@@ -74373,6 +74436,15 @@
|
|
|
74373
74436
|
"default": "'Fleet'",
|
|
74374
74437
|
"description": "Label for the fleet button"
|
|
74375
74438
|
},
|
|
74439
|
+
{
|
|
74440
|
+
"kind": "field",
|
|
74441
|
+
"name": "hasRightTrayLeading",
|
|
74442
|
+
"type": {
|
|
74443
|
+
"text": "boolean"
|
|
74444
|
+
},
|
|
74445
|
+
"default": "false",
|
|
74446
|
+
"description": "Renders the `right-tray-leading` slot first in the right-hand button group"
|
|
74447
|
+
},
|
|
74376
74448
|
{
|
|
74377
74449
|
"kind": "field",
|
|
74378
74450
|
"name": "buttonsOnBar",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brilliance-menu.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"brilliance-menu.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -20,7 +20,7 @@ import '../progress-indicator-dots/progress-indicator-dots.js';
|
|
|
20
20
|
import '../navigation-item/navigation-item.js';
|
|
21
21
|
import '../app-button/app-button.js';
|
|
22
22
|
import '../user-button/user-button.js';
|
|
23
|
-
import '../
|
|
23
|
+
import '../tab-row/tab-row.js';
|
|
24
24
|
import '../../icons/icon-display-brilliance-iec.js';
|
|
25
25
|
import '../../icons/icon-palette-day-night-iec.js';
|
|
26
26
|
export declare enum ObcPalette {
|
|
@@ -116,6 +116,8 @@ export type ObcLinkBrightnessChangeEvent = CustomEvent<{
|
|
|
116
116
|
* @property brightnessMajorStep - The major step of the brightness slider.
|
|
117
117
|
* @property brightnessInputVariant - The variant of the brightness input.
|
|
118
118
|
* @property showScreenControlLink - If true, displays the screen control link.
|
|
119
|
+
* @property showAdditionalScreenControls - If true, displays the additional screen controls slot.
|
|
120
|
+
* @slot additional-screen-controls - Consumer-defined controls, placed after the screen control link; rendered when `showAdditionalScreenControls` is true
|
|
119
121
|
* @fires {ObcPaletteChangeEvent} palette-changed - When the palette is changed
|
|
120
122
|
* @fires {ObcBrightnessChangeEvent} brightness-changed - When the brightness is changed
|
|
121
123
|
* @fires {ObcLinkPaletteChangeEvent} link-palette-changed - When the link palette toggle is changed
|
|
@@ -153,6 +155,8 @@ export declare class ObcBrillianceMenu extends LitElement {
|
|
|
153
155
|
brightnessInputVariant: ObcBrillianceInputVariant;
|
|
154
156
|
/** If true, displays the screen control link. */
|
|
155
157
|
showScreenControlLink: boolean;
|
|
158
|
+
/** If true, displays the additional screen controls slot. */
|
|
159
|
+
showAdditionalScreenControls: boolean;
|
|
156
160
|
willUpdate(_changed: Map<string, unknown>): void;
|
|
157
161
|
/**
|
|
158
162
|
* Handles palette selection changes and emits `palette-changed`.
|
|
@@ -184,6 +188,9 @@ export declare class ObcBrillianceMenu extends LitElement {
|
|
|
184
188
|
get availablePalettes(): ObcPalette[];
|
|
185
189
|
get canIncreasePalette(): boolean;
|
|
186
190
|
get canDecreasePalette(): boolean;
|
|
191
|
+
private selectedTabId;
|
|
192
|
+
private onTabSelected;
|
|
193
|
+
private get tabs();
|
|
187
194
|
nextPalette(): void;
|
|
188
195
|
previousPalette(): void;
|
|
189
196
|
renderBrightness(): import('lit-html').TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brilliance-menu.d.ts","sourceRoot":"","sources":["../../../src/components/brilliance-menu/brilliance-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,UAAU,EAAQ,OAAO,EAAY,MAAM,KAAK,CAAC;AAG7E,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,mCAAmC,CAAC;AAC3C,OAAO,+CAA+C,CAAC;AACvD,OAAO,iDAAiD,CAAC;AACzD,OAAO,4CAA4C,CAAC;AACpD,OAAO,iDAAiD,CAAC;AACzD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,iCAAiC,CAAC;AACzC,OAAO,wCAAwC,CAAC;AAChD,OAAO,0BAA0B,CAAC;AAClC,OAAO,iDAAiD,CAAC;AACzD,OAAO,gDAAgD,CAAC;AACxD,OAAO,yCAAyC,CAAC;AACjD,OAAO,0CAA0C,CAAC;AAClD,OAAO,iCAAiC,CAAC;AAUzC,OAAO,uDAAuD,CAAC;AAC/D,OAAO,uCAAuC,CAAC;AAC/C,OAAO,6BAA6B,CAAC;AACrC,OAAO,+BAA+B,CAAC;AACvC,OAAO
|
|
1
|
+
{"version":3,"file":"brilliance-menu.d.ts","sourceRoot":"","sources":["../../../src/components/brilliance-menu/brilliance-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,UAAU,EAAQ,OAAO,EAAY,MAAM,KAAK,CAAC;AAG7E,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,mCAAmC,CAAC;AAC3C,OAAO,+CAA+C,CAAC;AACvD,OAAO,iDAAiD,CAAC;AACzD,OAAO,4CAA4C,CAAC;AACpD,OAAO,iDAAiD,CAAC;AACzD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,iCAAiC,CAAC;AACzC,OAAO,wCAAwC,CAAC;AAChD,OAAO,0BAA0B,CAAC;AAClC,OAAO,iDAAiD,CAAC;AACzD,OAAO,gDAAgD,CAAC;AACxD,OAAO,yCAAyC,CAAC;AACjD,OAAO,0CAA0C,CAAC;AAClD,OAAO,iCAAiC,CAAC;AAUzC,OAAO,uDAAuD,CAAC;AAC/D,OAAO,uCAAuC,CAAC;AAC/C,OAAO,6BAA6B,CAAC;AACrC,OAAO,+BAA+B,CAAC;AACvC,OAAO,uBAAuB,CAAC;AAE/B,OAAO,4CAA4C,CAAC;AACpD,OAAO,2CAA2C,CAAC;AAEnD,oBAAY,UAAU;IACpB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,oBAAY,wBAAwB;IAClC,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,oBAAY,yBAAyB;IACnC,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAC,CAAC,CAAC;AACrE,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC,CAAC;AACpE,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAC,CAAC,CAAC;AACtE,MAAM,MAAM,4BAA4B,GAAG,WAAW,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAC,CAAC,CAAC;AAKzE;;;GAGG;AAEH;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,qBAKa,iBAAkB,SAAQ,UAAU;IACrB,OAAO,EAAE,UAAU,CAAkB;IAErC,UAAU,SAAM;IAG1C,kBAAkB,UAAS;IAEA,eAAe,UAAS;IAEN,cAAc,UAAQ;IAEtB,WAAW,UAAQ;IAEnB,gBAAgB,UAAQ;IACxB,eAAe,UAAQ;IACvB,cAAc,UAAQ;IACtB,iBAAiB,UAAQ;IAE5C,OAAO,2BAAmC;IAE1C,cAAc,SAAO;IAErB,aAAa,SAAO;IAEpB,mBAAmB,SAAK;IAExB,mBAAmB,SAAM;IAEzB,sBAAsB,4BACZ;IAET,qBAAqB,UAAS;IAE9B,4BAA4B,UAAS;IAEvD,UAAU,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAclD;;;;OAIG;IACH,gBAAgB,CAAC,KAAK,EAAE,WAAW;IASnC;;;;OAIG;IACH,uBAAuB,CAAC,KAAK,EAAE,WAAW;IAS1C,kBAAkB,CAAC,IAAI,EAAE,MAAM;IAY/B,IAAI,qBAAqB,YAExB;IAED,IAAI,qBAAqB,YAExB;IAED;;;;OAIG;IACH,oBAAoB,CAAC,KAAK,EAAE,WAAW;IAQvC;;;;OAIG;IACH,uBAAuB,CAAC,KAAK,EAAE,WAAW;IAQ1C,IAAI,iBAAiB,IAAI,UAAU,EAAE,CAOpC;IAED,IAAI,kBAAkB,YAIrB;IAED,IAAI,kBAAkB,YAIrB;IAEQ,OAAO,CAAC,aAAa,CAAqB;IAEnD,OAAO,CAAC,aAAa;IAIrB,OAAO,KAAK,IAAI,GAaf;IAED,WAAW;IAaX,eAAe;IAaf,gBAAgB;IAiJhB,IAAI,gBAAgB,eAGnB;IAED,IAAI,WAAW,0DAcd;IAED,OAAO,CAAC,cAAc;IA6BtB,aAAa;IAyGb,uBAAuB;IAmCd,MAAM;IAqDf,8BAA8B;IAI9B,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unsafeCSS, LitElement, nothing, html } from "lit";
|
|
2
|
-
import { property } from "lit/decorators.js";
|
|
2
|
+
import { property, state } from "lit/decorators.js";
|
|
3
3
|
import componentStyle from "./brilliance-menu.css.js";
|
|
4
4
|
import "../button/button.js";
|
|
5
5
|
import { ObcSliderVariant } from "../slider/slider.js";
|
|
@@ -24,7 +24,7 @@ import "../progress-indicator-dots/progress-indicator-dots.js";
|
|
|
24
24
|
import "../navigation-item/navigation-item.js";
|
|
25
25
|
import "../app-button/app-button.js";
|
|
26
26
|
import "../user-button/user-button.js";
|
|
27
|
-
import "../
|
|
27
|
+
import "../tab-row/tab-row.js";
|
|
28
28
|
import "../../icons/icon-display-brilliance-iec.js";
|
|
29
29
|
import "../../icons/icon-palette-day-night-iec.js";
|
|
30
30
|
var __defProp = Object.defineProperty;
|
|
@@ -55,6 +55,8 @@ var ObcBrillianceInputVariant = /* @__PURE__ */ ((ObcBrillianceInputVariant2) =>
|
|
|
55
55
|
ObcBrillianceInputVariant2["slider"] = "slider";
|
|
56
56
|
return ObcBrillianceInputVariant2;
|
|
57
57
|
})(ObcBrillianceInputVariant || {});
|
|
58
|
+
const BRILLIANCE_TAB_ID = "brilliance";
|
|
59
|
+
const PALETTE_TAB_ID = "palette";
|
|
58
60
|
let ObcBrillianceMenu = class extends LitElement {
|
|
59
61
|
constructor() {
|
|
60
62
|
super(...arguments);
|
|
@@ -75,6 +77,8 @@ let ObcBrillianceMenu = class extends LitElement {
|
|
|
75
77
|
this.brightnessMajorStep = 25;
|
|
76
78
|
this.brightnessInputVariant = "buttons";
|
|
77
79
|
this.showScreenControlLink = false;
|
|
80
|
+
this.showAdditionalScreenControls = false;
|
|
81
|
+
this.selectedTabId = BRILLIANCE_TAB_ID;
|
|
78
82
|
}
|
|
79
83
|
willUpdate(_changed) {
|
|
80
84
|
if (this.showPalette) {
|
|
@@ -186,6 +190,23 @@ let ObcBrillianceMenu = class extends LitElement {
|
|
|
186
190
|
const idx = palettes.indexOf(this.palette);
|
|
187
191
|
return idx > 0;
|
|
188
192
|
}
|
|
193
|
+
onTabSelected(event) {
|
|
194
|
+
this.selectedTabId = event.detail.id;
|
|
195
|
+
}
|
|
196
|
+
get tabs() {
|
|
197
|
+
return [
|
|
198
|
+
{
|
|
199
|
+
id: BRILLIANCE_TAB_ID,
|
|
200
|
+
title: msg("Brilliance"),
|
|
201
|
+
hasLeadingIcon: true
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
id: PALETTE_TAB_ID,
|
|
205
|
+
title: `${msg("Day")}/${msg("Night")}`,
|
|
206
|
+
hasLeadingIcon: true
|
|
207
|
+
}
|
|
208
|
+
];
|
|
209
|
+
}
|
|
189
210
|
nextPalette() {
|
|
190
211
|
if (this.canIncreasePalette) {
|
|
191
212
|
const palettes = this.availablePalettes;
|
|
@@ -475,41 +496,68 @@ let ObcBrillianceMenu = class extends LitElement {
|
|
|
475
496
|
`;
|
|
476
497
|
}
|
|
477
498
|
renderScreenControlLink() {
|
|
478
|
-
if (
|
|
479
|
-
return
|
|
499
|
+
if (this.showScreenControlLink || this.showAdditionalScreenControls) {
|
|
500
|
+
return html`
|
|
501
|
+
<div class="footer">
|
|
502
|
+
${this.showScreenControlLink ? html`
|
|
503
|
+
<obc-navigation-item
|
|
504
|
+
.label="${msg("Screen Control")}"
|
|
505
|
+
@click=${() => this.handleScreenControlLinkClicked()}
|
|
506
|
+
hasicon
|
|
507
|
+
>
|
|
508
|
+
<obc-user-button
|
|
509
|
+
slot="icon"
|
|
510
|
+
static
|
|
511
|
+
variant="icon"
|
|
512
|
+
styleType="normal"
|
|
513
|
+
>
|
|
514
|
+
<obi-screen-desk slot="icon"></obi-screen-desk>
|
|
515
|
+
</obc-user-button>
|
|
516
|
+
</obc-navigation-item>
|
|
517
|
+
` : nothing}
|
|
518
|
+
${this.showAdditionalScreenControls ? html`<slot name="additional-screen-controls"></slot>` : nothing}
|
|
519
|
+
</div>
|
|
520
|
+
`;
|
|
480
521
|
}
|
|
481
|
-
return
|
|
482
|
-
<div class="footer">
|
|
483
|
-
<obc-navigation-item
|
|
484
|
-
.label="${msg("Screen Control")}"
|
|
485
|
-
@click=${() => this.handleScreenControlLinkClicked()}
|
|
486
|
-
hasicon
|
|
487
|
-
>
|
|
488
|
-
<obc-user-button slot="icon" static variant="icon" styleType="normal">
|
|
489
|
-
<obi-screen-desk slot="icon"></obi-screen-desk>
|
|
490
|
-
</obc-user-button>
|
|
491
|
-
</obc-navigation-item>
|
|
492
|
-
</div>
|
|
493
|
-
`;
|
|
522
|
+
return nothing;
|
|
494
523
|
}
|
|
495
524
|
render() {
|
|
496
525
|
if (this.variant === "tabbed") {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
526
|
+
const tabs = this.tabs;
|
|
527
|
+
const [brillianceTab, paletteTab] = tabs;
|
|
528
|
+
return html`
|
|
529
|
+
<div class="card tabbed">
|
|
530
|
+
<obc-tab-row
|
|
531
|
+
.tabs=${tabs}
|
|
532
|
+
.selectedTabId=${this.selectedTabId}
|
|
533
|
+
.centerContent=${true}
|
|
534
|
+
@tab-selected=${this.onTabSelected}
|
|
535
|
+
>
|
|
536
|
+
<obi-display-brilliance-iec
|
|
537
|
+
slot="tab-${BRILLIANCE_TAB_ID}-icon"
|
|
538
|
+
></obi-display-brilliance-iec>
|
|
539
|
+
<obi-palette-day-night-iec
|
|
540
|
+
slot="tab-${PALETTE_TAB_ID}-icon"
|
|
541
|
+
></obi-palette-day-night-iec>
|
|
542
|
+
</obc-tab-row>
|
|
543
|
+
<!-- TODO(#1312): link the panels to their tabs once obc-tab-row supports it -->
|
|
544
|
+
<div
|
|
545
|
+
role="tabpanel"
|
|
546
|
+
aria-label=${brillianceTab.title}
|
|
547
|
+
?hidden=${this.selectedTabId !== BRILLIANCE_TAB_ID}
|
|
548
|
+
>
|
|
549
|
+
${this.renderBrightness()}
|
|
550
|
+
</div>
|
|
551
|
+
<div
|
|
552
|
+
role="tabpanel"
|
|
553
|
+
aria-label=${paletteTab.title}
|
|
554
|
+
?hidden=${this.selectedTabId !== PALETTE_TAB_ID}
|
|
555
|
+
>
|
|
556
|
+
${this.renderPalette()}
|
|
557
|
+
</div>
|
|
558
|
+
${this.renderScreenControlLink()}
|
|
511
559
|
</div>
|
|
512
|
-
|
|
560
|
+
`;
|
|
513
561
|
} else {
|
|
514
562
|
return html`
|
|
515
563
|
<div class="card ${this.variant}">
|
|
@@ -577,6 +625,12 @@ __decorateClass([
|
|
|
577
625
|
__decorateClass([
|
|
578
626
|
property({ type: Boolean })
|
|
579
627
|
], ObcBrillianceMenu.prototype, "showScreenControlLink", 2);
|
|
628
|
+
__decorateClass([
|
|
629
|
+
property({ type: Boolean })
|
|
630
|
+
], ObcBrillianceMenu.prototype, "showAdditionalScreenControls", 2);
|
|
631
|
+
__decorateClass([
|
|
632
|
+
state()
|
|
633
|
+
], ObcBrillianceMenu.prototype, "selectedTabId", 2);
|
|
580
634
|
ObcBrillianceMenu = __decorateClass([
|
|
581
635
|
localized(),
|
|
582
636
|
customElement("obc-brilliance-menu")
|