@oicl/openbridge-webcomponents 2.0.0-next.124 → 2.0.0-next.125

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.
Files changed (28) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +72 -15
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +19 -0
  4. package/dist/components/keyboard-full/keyboard-full.d.ts +5 -0
  5. package/dist/components/keyboard-full/keyboard-full.d.ts.map +1 -1
  6. package/dist/components/keyboard-full/keyboard-full.js +15 -8
  7. package/dist/components/keyboard-full/keyboard-full.js.map +1 -1
  8. package/dist/components/number-input-field/number-input-field.css.js +19 -0
  9. package/dist/components/number-input-field/number-input-field.css.js.map +1 -1
  10. package/dist/components/number-input-field/number-input-field.d.ts.map +1 -1
  11. package/dist/components/number-input-field/number-input-field.js +3 -0
  12. package/dist/components/number-input-field/number-input-field.js.map +1 -1
  13. package/dist/components/text-input-field/text-input-field.css.js +19 -0
  14. package/dist/components/text-input-field/text-input-field.css.js.map +1 -1
  15. package/dist/components/text-input-field/text-input-field.d.ts.map +1 -1
  16. package/dist/components/text-input-field/text-input-field.js +2 -1
  17. package/dist/components/text-input-field/text-input-field.js.map +1 -1
  18. package/dist/navigation-instruments/bearing-indicator/bearing-indicator.css.js +6 -2
  19. package/dist/navigation-instruments/bearing-indicator/bearing-indicator.css.js.map +1 -1
  20. package/dist/navigation-instruments/compass-indicator/compass-indicator.css.js +6 -2
  21. package/dist/navigation-instruments/compass-indicator/compass-indicator.css.js.map +1 -1
  22. package/dist/navigation-instruments/gauge-horizontal/gauge-horizontal.d.ts.map +1 -1
  23. package/dist/navigation-instruments/gauge-horizontal/gauge-horizontal.js +1 -1
  24. package/dist/navigation-instruments/gauge-horizontal/gauge-horizontal.js.map +1 -1
  25. package/dist/navigation-instruments/gauge-vertical/gauge-vertical.d.ts.map +1 -1
  26. package/dist/navigation-instruments/gauge-vertical/gauge-vertical.js +1 -1
  27. package/dist/navigation-instruments/gauge-vertical/gauge-vertical.js.map +1 -1
  28. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"text-input-field.js","sources":["../../../src/components/text-input-field/text-input-field.ts"],"sourcesContent":["import {\n LitElement,\n html,\n nothing,\n unsafeCSS,\n TemplateResult,\n PropertyValues,\n} from 'lit';\nimport {property, state, query} from 'lit/decorators.js';\nimport {ifDefined} from 'lit/directives/if-defined.js';\nimport componentStyle from './text-input-field.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\nimport '../icon-button/icon-button.js';\nimport '../../icons/icon-close-google.js';\nimport '../../icons/icon-visibility-on-google.js';\nimport '../../icons/icon-visibility-off-google.js';\n\nexport type ObcTextInputFieldBlurEvent = CustomEvent<{value: string}>;\n\n/**\n * Common HTML input types for practical use with `<obc-text-input-field>`.\n * Focuses on the most commonly used input types in real applications.\n */\nexport enum HTMLInputTypeAttribute {\n Text = 'text',\n Password = 'password',\n Email = 'email',\n Tel = 'tel',\n Url = 'url',\n Search = 'search',\n Date = 'date',\n Time = 'time',\n}\n\nexport enum ObcTextInputFieldTextAlign {\n Left = 'left',\n Center = 'center',\n}\n\nexport enum ObcTextInputFieldSize {\n Regular = 'regular',\n Large = 'large',\n}\n\nexport enum ObcTextInputFieldPlacement {\n Left = 'left',\n Center = 'center',\n Right = 'right',\n}\n\n/**\n * `<obc-text-input-field>` – A text input field component with optional icons, label, and helper text.\n *\n *\n *\n * @slot leading-icon - Icon displayed before the input value (when `hasLeadingIcon` is true)\n * @slot label-icon - Icon displayed before the label text (when `hasLabelIcon` is true)\n * @slot helper-icon - Icon displayed before helper or error text (when `hasHelperIcon` is true)\n * @fires input - Standard input event on value change\n * @fires {CustomEvent<{value: string}>} change - Dispatched on value change, carrying the committed value\n * @fires clear - Fired when the clear button is clicked\n * @fires blur - Fired when the input field is blurred\n * @stable\n */\n@customElement('obc-text-input-field')\nexport class ObcTextInputField extends LitElement {\n @property({type: String}) value = '';\n @property({type: String}) placeholder = '';\n @property({type: String}) type: HTMLInputTypeAttribute =\n HTMLInputTypeAttribute.Text;\n @property({type: String}) textAlign: ObcTextInputFieldTextAlign =\n ObcTextInputFieldTextAlign.Left;\n\n @property({type: Boolean, reflect: true}) disabled = false;\n @property({type: Boolean, reflect: true}) readonly = false;\n @property({type: Boolean, reflect: true}) error = false;\n /** @availableWhen error==true */\n @property({type: String}) errorText = '';\n /** If true, the input field will not update its value on focus */\n @property({type: Boolean}) rejectUpdatesOnFocus = false;\n /** If true, the value will only be initially set, and not updated on change */\n @property({type: Boolean}) rejectUpdates = false;\n\n /** If true, the input field will not update its value if the value is the same as the previous value\n * This is useful to avoid React re-rendering to reset the value.\n */\n @property({type: Boolean}) rejectDuplicateUpdates = false;\n\n /** Name attribute for form integration */\n @property({type: String}) name = '';\n\n /** Maximum number of characters allowed */\n @property({type: Number}) maxlength?: number;\n\n /** Minimum number of characters required */\n @property({type: Number}) minlength?: number;\n\n @property({type: String}) size: ObcTextInputFieldSize =\n ObcTextInputFieldSize.Regular;\n\n @property({type: Boolean}) hasLeadingIcon = false;\n\n /** Shows a clear button when the input has a value */\n @property({type: Boolean}) hasClearButton = false;\n\n @property({type: String}) helperText = '';\n\n @property({type: String}) label = '';\n @property({type: Boolean}) required = false;\n /** @availableWhen label!='' */\n @property({type: Boolean}) hasLabelIcon = false;\n /** @availableWhen label!='' */\n @property({type: String}) labelPlacement: ObcTextInputFieldPlacement =\n ObcTextInputFieldPlacement.Left;\n\n @property({type: Boolean}) hasHelperIcon = false;\n @property({type: String}) helperPlacement: ObcTextInputFieldPlacement =\n ObcTextInputFieldPlacement.Left;\n\n /** Internal state for password visibility toggle */\n @state() private passwordVisible = false;\n @state() private hasFocus = false;\n @state() private previousValue = '';\n @state() private previousInputElementValue = '';\n\n @query('.value-input') private inputElement?: HTMLInputElement;\n\n private onInput(e: Event) {\n this.value = (e.target as HTMLInputElement).value;\n this.previousInputElementValue = this.value;\n }\n\n private onFocus() {\n this.hasFocus = true;\n }\n\n private onBlur() {\n this.hasFocus = false;\n }\n\n private handleClear(e: Event) {\n // Prevent label click from triggering unwanted focus behavior\n e.stopPropagation();\n\n this.value = '';\n this.inputElement!.value = '';\n this.dispatchEvent(\n new CustomEvent('clear', {bubbles: true, composed: true})\n );\n // Dispatch input and change events for consistency with native behavior\n this.dispatchEvent(\n new InputEvent('input', {bubbles: true, composed: true})\n );\n this.dispatchEvent(new Event('change', {bubbles: true, composed: true}));\n\n // Return focus to the input field\n this.inputElement?.focus();\n }\n\n private togglePasswordVisibility(e: Event) {\n // Prevent label click from triggering unwanted focus behavior\n e.stopPropagation();\n this.passwordVisible = !this.passwordVisible;\n }\n\n private getInputMode(): string {\n switch (this.type) {\n case HTMLInputTypeAttribute.Tel:\n return 'tel';\n case HTMLInputTypeAttribute.Email:\n return 'email';\n case HTMLInputTypeAttribute.Url:\n return 'url';\n case HTMLInputTypeAttribute.Search:\n return 'search';\n default:\n return 'text';\n }\n }\n\n private renderFooterText(\n text: string,\n isError: boolean\n ): TemplateResult | typeof nothing {\n if (!text) return nothing;\n return html`<div\n id=\"helper-text\"\n class=${classMap({\n [isError ? 'error-text' : 'helper-text']: true,\n [`helper-placement-${this.helperPlacement}`]: true,\n })}\n >\n ${this.hasHelperIcon\n ? html`<div class=\"helper-icon\"><slot name=\"helper-icon\"></slot></div>`\n : nothing}\n ${text}\n </div>`;\n }\n\n private fireChangeEvent(e: Event) {\n const target = e.target as HTMLInputElement;\n this.dispatchEvent(\n new CustomEvent('change', {detail: {value: target.value}})\n );\n }\n\n private get shouldUpdateValue(): boolean {\n if (this.rejectUpdates) return false;\n if (this.rejectUpdatesOnFocus && this.hasFocus) return false;\n if (this.rejectDuplicateUpdates && this.value === this.previousValue) {\n return false;\n }\n return true;\n }\n\n private get isEmpty(): boolean {\n const currentValue =\n !this.shouldUpdateValue && this.inputElement\n ? this.inputElement.value\n : this.value;\n return currentValue.trim().length === 0;\n }\n\n override willUpdate(changedProperties: PropertyValues) {\n if (\n changedProperties.has('value') &&\n !this.shouldUpdateValue &&\n this.inputElement\n ) {\n this.value = this.inputElement.value;\n }\n }\n\n override updated() {\n if (\n this.rejectDuplicateUpdates &&\n this.value !== this.previousValue &&\n (this.previousInputElementValue !== this.value || !this.hasFocus)\n ) {\n this.previousValue = this.value;\n }\n }\n\n override render() {\n const hasHelperOrError =\n Boolean(this.helperText) || Boolean(this.error && this.errorText);\n const showClearButton =\n this.hasClearButton && this.value.length > 0 && !this.disabled;\n const isPasswordField = this.type === HTMLInputTypeAttribute.Password;\n const showPasswordToggle = isPasswordField && !this.disabled;\n const isClearButtonVisible = showClearButton && !showPasswordToggle;\n const effectiveType =\n isPasswordField && this.passwordVisible\n ? HTMLInputTypeAttribute.Text\n : this.type;\n\n // Determine trailing button state for padding adjustment\n const hasTrailingButton = showPasswordToggle || isClearButtonVisible;\n\n let value = this.value;\n\n if (!this.shouldUpdateValue && this.inputElement) {\n value = this.inputElement.value;\n }\n\n return html`\n <label\n class=${classMap({\n wrapper: true,\n [`align-${this.textAlign}`]: true,\n [`size-${this.size}`]: true,\n error: this.error,\n disabled: this.disabled,\n empty: this.isEmpty,\n helpertext: hasHelperOrError,\n haslabel: Boolean(this.label),\n 'has-trailing-button': hasTrailingButton,\n })}\n >\n ${this.label\n ? html`<div\n class=${classMap({\n 'label-text-container': true,\n [`label-placement-${this.labelPlacement}`]: true,\n })}\n >\n ${this.hasLabelIcon\n ? html`<div class=\"label-icon\">\n <slot name=\"label-icon\"></slot>\n </div>`\n : nothing}\n <span class=\"label-text\">${this.label}</span>\n ${this.required\n ? html`<div class=\"required-indicator\"></div>`\n : nothing}\n </div>`\n : nothing}\n\n <div class=\"horizontal-container\">\n <div class=\"input-field-container\">\n ${this.hasLeadingIcon\n ? html`<div class=\"leading-icon\">\n <slot name=\"leading-icon\"></slot>\n </div>`\n : nothing}\n <div class=\"label-container\">\n <input\n type=${effectiveType}\n inputmode=${this.getInputMode()}\n class=\"value-input\"\n .value=${value}\n @focus=${this.onFocus}\n @blur=${this.onBlur}\n .placeholder=${this.placeholder}\n name=${ifDefined(this.name || undefined)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n maxlength=${ifDefined(this.maxlength)}\n minlength=${ifDefined(this.minlength)}\n aria-invalid=${this.error ? 'true' : 'false'}\n aria-describedby=${ifDefined(\n hasHelperOrError ? 'helper-text' : undefined\n )}\n autocomplete=\"off\"\n @input=${this.onInput}\n @change=${this.fireChangeEvent}\n />\n </div>\n ${showPasswordToggle\n ? html`<obc-icon-button\n variant=\"flat\"\n class=\"trailing-icon-button\"\n @click=${this.togglePasswordVisibility}\n aria-label=${this.passwordVisible\n ? 'Hide password'\n : 'Show password'}\n >\n ${this.passwordVisible\n ? html`<obi-visibility-on-google></obi-visibility-on-google>`\n : html`<obi-visibility-off-google></obi-visibility-off-google>`}\n </obc-icon-button>`\n : nothing}\n ${isClearButtonVisible\n ? html`<obc-icon-button\n variant=\"flat\"\n class=\"trailing-icon-button\"\n @click=${this.handleClear}\n aria-label=\"Clear input\"\n >\n <obi-close-google></obi-close-google>\n </obc-icon-button>`\n : nothing}\n </div>\n </div>\n\n ${this.error && this.errorText\n ? this.renderFooterText(this.errorText, true)\n : this.renderFooterText(this.helperText, false)}\n </label>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-text-input-field': ObcTextInputField;\n }\n}\n"],"names":["HTMLInputTypeAttribute","ObcTextInputFieldTextAlign","ObcTextInputFieldSize","ObcTextInputFieldPlacement"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBO,IAAK,2CAAAA,4BAAL;AACLA,0BAAA,MAAA,IAAO;AACPA,0BAAA,UAAA,IAAW;AACXA,0BAAA,OAAA,IAAQ;AACRA,0BAAA,KAAA,IAAM;AACNA,0BAAA,KAAA,IAAM;AACNA,0BAAA,QAAA,IAAS;AACTA,0BAAA,MAAA,IAAO;AACPA,0B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SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAnDb,kBAmDe,WAAA,mBAAA,CAAA;AAIT,gBAAA;AAAA,EAAhB,MAAA;AAAM,GAvDI,kBAuDM,WAAA,mBAAA,CAAA;AACA,gBAAA;AAAA,EAAhB,MAAA;AAAM,GAxDI,kBAwDM,WAAA,YAAA,CAAA;AACA,gBAAA;AAAA,EAAhB,MAAA;AAAM,GAzDI,kBAyDM,WAAA,iBAAA,CAAA;AACA,gBAAA;AAAA,EAAhB,MAAA;AAAM,GA1DI,kBA0DM,WAAA,6BAAA,CAAA;AAEc,gBAAA;AAAA,EAA9B,MAAM,cAAc;AAAA,GA5DV,kBA4DoB,WAAA,gBAAA,CAAA;AA5DpB,oBAAN,gBAAA;AAAA,EADN,cAAc,sBAAsB;AAAA,GACxB,iBAAA;"}
1
+ {"version":3,"file":"text-input-field.js","sources":["../../../src/components/text-input-field/text-input-field.ts"],"sourcesContent":["import {\n LitElement,\n html,\n nothing,\n unsafeCSS,\n TemplateResult,\n PropertyValues,\n} from 'lit';\nimport {property, state, query} from 'lit/decorators.js';\nimport {ifDefined} from 'lit/directives/if-defined.js';\nimport componentStyle from './text-input-field.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\nimport '../icon-button/icon-button.js';\nimport '../../icons/icon-close-google.js';\nimport '../../icons/icon-visibility-on-google.js';\nimport '../../icons/icon-visibility-off-google.js';\n\nexport type ObcTextInputFieldBlurEvent = CustomEvent<{value: string}>;\n\n/**\n * Common HTML input types for practical use with `<obc-text-input-field>`.\n * Focuses on the most commonly used input types in real applications.\n */\nexport enum HTMLInputTypeAttribute {\n Text = 'text',\n Password = 'password',\n Email = 'email',\n Tel = 'tel',\n Url = 'url',\n Search = 'search',\n Date = 'date',\n Time = 'time',\n}\n\nexport enum ObcTextInputFieldTextAlign {\n Left = 'left',\n Center = 'center',\n}\n\nexport enum ObcTextInputFieldSize {\n Regular = 'regular',\n Large = 'large',\n}\n\nexport enum ObcTextInputFieldPlacement {\n Left = 'left',\n Center = 'center',\n Right = 'right',\n}\n\n/**\n * `<obc-text-input-field>` – A text input field component with optional icons, label, and helper text.\n *\n *\n *\n * @slot leading-icon - Icon displayed before the input value (when `hasLeadingIcon` is true)\n * @slot label-icon - Icon displayed before the label text (when `hasLabelIcon` is true)\n * @slot helper-icon - Icon displayed before helper or error text (when `hasHelperIcon` is true)\n * @fires input - Standard input event on value change\n * @fires {CustomEvent<{value: string}>} change - Dispatched on value change, carrying the committed value\n * @fires clear - Fired when the clear button is clicked\n * @fires blur - Fired when the input field is blurred\n * @stable\n */\n@customElement('obc-text-input-field')\nexport class ObcTextInputField extends LitElement {\n @property({type: String}) value = '';\n @property({type: String}) placeholder = '';\n @property({type: String}) type: HTMLInputTypeAttribute =\n HTMLInputTypeAttribute.Text;\n @property({type: String}) textAlign: ObcTextInputFieldTextAlign =\n ObcTextInputFieldTextAlign.Left;\n\n @property({type: Boolean, reflect: true}) disabled = false;\n @property({type: Boolean, reflect: true}) readonly = false;\n @property({type: Boolean, reflect: true}) error = false;\n /** @availableWhen error==true */\n @property({type: String}) errorText = '';\n /** If true, the input field will not update its value on focus */\n @property({type: Boolean}) rejectUpdatesOnFocus = false;\n /** If true, the value will only be initially set, and not updated on change */\n @property({type: Boolean}) rejectUpdates = false;\n\n /** If true, the input field will not update its value if the value is the same as the previous value\n * This is useful to avoid React re-rendering to reset the value.\n */\n @property({type: Boolean}) rejectDuplicateUpdates = false;\n\n /** Name attribute for form integration */\n @property({type: String}) name = '';\n\n /** Maximum number of characters allowed */\n @property({type: Number}) maxlength?: number;\n\n /** Minimum number of characters required */\n @property({type: Number}) minlength?: number;\n\n @property({type: String}) size: ObcTextInputFieldSize =\n ObcTextInputFieldSize.Regular;\n\n @property({type: Boolean}) hasLeadingIcon = false;\n\n /** Shows a clear button when the input has a value */\n @property({type: Boolean}) hasClearButton = false;\n\n @property({type: String}) helperText = '';\n\n @property({type: String}) label = '';\n @property({type: Boolean}) required = false;\n /** @availableWhen label!='' */\n @property({type: Boolean}) hasLabelIcon = false;\n /** @availableWhen label!='' */\n @property({type: String}) labelPlacement: ObcTextInputFieldPlacement =\n ObcTextInputFieldPlacement.Left;\n\n @property({type: Boolean}) hasHelperIcon = false;\n @property({type: String}) helperPlacement: ObcTextInputFieldPlacement =\n ObcTextInputFieldPlacement.Left;\n\n /** Internal state for password visibility toggle */\n @state() private passwordVisible = false;\n @state() private hasFocus = false;\n @state() private previousValue = '';\n @state() private previousInputElementValue = '';\n\n @query('.value-input') private inputElement?: HTMLInputElement;\n\n private onInput(e: Event) {\n this.value = (e.target as HTMLInputElement).value;\n this.previousInputElementValue = this.value;\n }\n\n private onFocus() {\n this.hasFocus = true;\n }\n\n private onBlur() {\n this.hasFocus = false;\n }\n\n private handleClear(e: Event) {\n // Prevent label click from triggering unwanted focus behavior\n e.stopPropagation();\n\n this.value = '';\n this.inputElement!.value = '';\n this.dispatchEvent(\n new CustomEvent('clear', {bubbles: true, composed: true})\n );\n // Dispatch input and change events for consistency with native behavior\n this.dispatchEvent(\n new InputEvent('input', {bubbles: true, composed: true})\n );\n this.dispatchEvent(new Event('change', {bubbles: true, composed: true}));\n\n // Return focus to the input field\n this.inputElement?.focus();\n }\n\n private togglePasswordVisibility(e: Event) {\n // Prevent label click from triggering unwanted focus behavior\n e.stopPropagation();\n this.passwordVisible = !this.passwordVisible;\n }\n\n private getInputMode(): string {\n switch (this.type) {\n case HTMLInputTypeAttribute.Tel:\n return 'tel';\n case HTMLInputTypeAttribute.Email:\n return 'email';\n case HTMLInputTypeAttribute.Url:\n return 'url';\n case HTMLInputTypeAttribute.Search:\n return 'search';\n default:\n return 'text';\n }\n }\n\n private renderFooterText(\n text: string,\n isError: boolean\n ): TemplateResult | typeof nothing {\n if (!text) return nothing;\n return html`<div\n id=\"helper-text\"\n class=${classMap({\n [isError ? 'error-text' : 'helper-text']: true,\n [`helper-placement-${this.helperPlacement}`]: true,\n })}\n >\n ${this.hasHelperIcon\n ? html`<div class=\"helper-icon\"><slot name=\"helper-icon\"></slot></div>`\n : nothing}\n ${text}\n </div>`;\n }\n\n private fireChangeEvent(e: Event) {\n const target = e.target as HTMLInputElement;\n this.dispatchEvent(\n new CustomEvent('change', {detail: {value: target.value}})\n );\n }\n\n private get shouldUpdateValue(): boolean {\n if (this.rejectUpdates) return false;\n if (this.rejectUpdatesOnFocus && this.hasFocus) return false;\n if (this.rejectDuplicateUpdates && this.value === this.previousValue) {\n return false;\n }\n return true;\n }\n\n private get isEmpty(): boolean {\n const currentValue =\n !this.shouldUpdateValue && this.inputElement\n ? this.inputElement.value\n : this.value;\n return currentValue.trim().length === 0;\n }\n\n override willUpdate(changedProperties: PropertyValues) {\n if (\n changedProperties.has('value') &&\n !this.shouldUpdateValue &&\n this.inputElement\n ) {\n this.value = this.inputElement.value;\n }\n }\n\n override updated() {\n if (\n this.rejectDuplicateUpdates &&\n this.value !== this.previousValue &&\n (this.previousInputElementValue !== this.value || !this.hasFocus)\n ) {\n this.previousValue = this.value;\n }\n }\n\n override render() {\n const hasHelperOrError =\n Boolean(this.helperText) || Boolean(this.error && this.errorText);\n const showClearButton =\n this.hasClearButton &&\n this.value.length > 0 &&\n !this.disabled &&\n !this.readonly;\n const isPasswordField = this.type === HTMLInputTypeAttribute.Password;\n const showPasswordToggle = isPasswordField && !this.disabled;\n const isClearButtonVisible = showClearButton && !showPasswordToggle;\n const effectiveType =\n isPasswordField && this.passwordVisible\n ? HTMLInputTypeAttribute.Text\n : this.type;\n\n // Determine trailing button state for padding adjustment\n const hasTrailingButton = showPasswordToggle || isClearButtonVisible;\n\n let value = this.value;\n\n if (!this.shouldUpdateValue && this.inputElement) {\n value = this.inputElement.value;\n }\n\n return html`\n <label\n class=${classMap({\n wrapper: true,\n [`align-${this.textAlign}`]: true,\n [`size-${this.size}`]: true,\n error: this.error,\n disabled: this.disabled,\n readonly: this.readonly,\n empty: this.isEmpty,\n helpertext: hasHelperOrError,\n haslabel: Boolean(this.label),\n 'has-trailing-button': hasTrailingButton,\n })}\n >\n ${this.label\n ? html`<div\n class=${classMap({\n 'label-text-container': true,\n [`label-placement-${this.labelPlacement}`]: true,\n })}\n >\n ${this.hasLabelIcon\n ? html`<div class=\"label-icon\">\n <slot name=\"label-icon\"></slot>\n </div>`\n : nothing}\n <span class=\"label-text\">${this.label}</span>\n ${this.required\n ? html`<div class=\"required-indicator\"></div>`\n : nothing}\n </div>`\n : nothing}\n\n <div class=\"horizontal-container\">\n <div class=\"input-field-container\">\n ${this.hasLeadingIcon\n ? html`<div class=\"leading-icon\">\n <slot name=\"leading-icon\"></slot>\n </div>`\n : nothing}\n <div class=\"label-container\">\n <input\n type=${effectiveType}\n inputmode=${this.getInputMode()}\n class=\"value-input\"\n .value=${value}\n @focus=${this.onFocus}\n @blur=${this.onBlur}\n .placeholder=${this.placeholder}\n name=${ifDefined(this.name || undefined)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n maxlength=${ifDefined(this.maxlength)}\n minlength=${ifDefined(this.minlength)}\n aria-invalid=${this.error ? 'true' : 'false'}\n aria-describedby=${ifDefined(\n hasHelperOrError ? 'helper-text' : undefined\n )}\n autocomplete=\"off\"\n @input=${this.onInput}\n @change=${this.fireChangeEvent}\n />\n </div>\n ${showPasswordToggle\n ? html`<obc-icon-button\n variant=\"flat\"\n class=\"trailing-icon-button\"\n @click=${this.togglePasswordVisibility}\n aria-label=${this.passwordVisible\n ? 'Hide password'\n : 'Show password'}\n >\n ${this.passwordVisible\n ? html`<obi-visibility-on-google></obi-visibility-on-google>`\n : html`<obi-visibility-off-google></obi-visibility-off-google>`}\n </obc-icon-button>`\n : nothing}\n ${isClearButtonVisible\n ? html`<obc-icon-button\n variant=\"flat\"\n class=\"trailing-icon-button\"\n @click=${this.handleClear}\n aria-label=\"Clear input\"\n >\n <obi-close-google></obi-close-google>\n </obc-icon-button>`\n : nothing}\n </div>\n </div>\n\n ${this.error && this.errorText\n ? this.renderFooterText(this.errorText, true)\n : this.renderFooterText(this.helperText, false)}\n </label>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-text-input-field': ObcTextInputField;\n }\n}\n"],"names":["HTMLInputTypeAttribute","ObcTextInputFieldTextAlign","ObcTextInputFieldSize","ObcTextInputFieldPlacement"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBO,IAAK,2CAAAA,4BAAL;AACLA,0BAAA,MAAA,IAAO;AACPA,0BAAA,UAAA,IAAW;AACXA,0BAAA,OAAA,IAAQ;AACRA,0BAAA,KAAA,IAAM;AACNA,0BAAA,KAAA,IAAM;AACNA,0BAAA,QAAA,IAAS;AACTA,0BAAA,MAAA,IAAO;AACPA,0BAAA,MAAA,IAAO;AARG,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAWL,IAAK,+CAAAC,gCAAL;AACLA,8BAAA,MAAA,IAAO;AACPA,8BAAA,QAAA,IAAS;AAFC,SAAAA;AAAA,GAAA,8BAAA,CAAA,CAAA;AAKL,IAAK,0CAAAC,2BAAL;AACLA,yBAAA,SAAA,IAAU;AACVA,yBAAA,OAAA,IAAQ;AAFE,SAAAA;AAAA,GAAA,yBAAA,CAAA,CAAA;AAKL,IAAK,+CAAAC,gCAAL;AACLA,8BAAA,MAAA,IAAO;AACPA,8BAAA,QAAA,IAAS;AACTA,8BAAA,OAAA,IAAQ;AAHE,SAAAA;AAAA,GAAA,8BAAA,CAAA,CAAA;AAqBL,IAAM,oBAAN,cAAgC,WAAW;AAAA,EAA3C,cAAA;AAAA,UAAA,GAAA,SAAA;AACqB,SAAA,QAAQ;AACR,SAAA,cAAc;AACd,SAAA,OACxB;AACwB,SAAA,YACxB;AAEwC,SAAA,WAAW;AACX,SAAA,WAAW;AACX,SAAA,QAAQ;AAExB,SAAA,YAAY;AAEX,SAAA,uBAAuB;AAEvB,SAAA,gBAAgB;AAKhB,SAAA,yBAAyB;AAG1B,SAAA,OAAO;AAQP,SAAA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B,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA1Cb,kBA0Ce,WAAA,SAAA,CAAA;AACC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GA3Cd,kBA2CgB,WAAA,YAAA,CAAA;AAEA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GA7Cd,kBA6CgB,WAAA,gBAAA,CAAA;AAED,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA/Cb,kBA+Ce,WAAA,kBAAA,CAAA;AAGC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAlDd,kBAkDgB,WAAA,iBAAA,CAAA;AACD,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAnDb,kBAmDe,WAAA,mBAAA,CAAA;AAIT,gBAAA;AAAA,EAAhB,MAAA;AAAM,GAvDI,kBAuDM,WAAA,mBAAA,CAAA;AACA,gBAAA;AAAA,EAAhB,MAAA;AAAM,GAxDI,kBAwDM,WAAA,YAAA,CAAA;AACA,gBAAA;AAAA,EAAhB,MAAA;AAAM,GAzDI,kBAyDM,WAAA,iBAAA,CAAA;AACA,gBAAA;AAAA,EAAhB,MAAA;AAAM,GA1DI,kBA0DM,WAAA,6BAAA,CAAA;AAEc,gBAAA;AAAA,EAA9B,MAAM,cAAc;AAAA,GA5DV,kBA4DoB,WAAA,gBAAA,CAAA;AA5DpB,oBAAN,gBAAA;AAAA,EADN,cAAc,sBAAsB;AAAA,GACxB,iBAAA;"}
@@ -1,7 +1,11 @@
1
1
  import { css } from "lit";
2
2
  const compentStyle = css`* {
3
- -webkit-tap-highlight-color: transparent
4
- }`;
3
+ -webkit-tap-highlight-color: transparent;
4
+ }
5
+ svg {
6
+ display: block;
7
+ }
8
+ `;
5
9
  export {
6
10
  compentStyle as default
7
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"bearing-indicator.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"bearing-indicator.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,7 +1,11 @@
1
1
  import { css } from "lit";
2
2
  const componentStyle = css`* {
3
- -webkit-tap-highlight-color: transparent
4
- }`;
3
+ -webkit-tap-highlight-color: transparent;
4
+ }
5
+ svg {
6
+ display: block;
7
+ }
8
+ `;
5
9
  export {
6
10
  componentStyle as default
7
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"compass-indicator.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"compass-indicator.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"gauge-horizontal.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/gauge-horizontal/gauge-horizontal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AAIxC,OAAO,EACL,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACT,MAAM,aAAa,CAAC;AAKrB,OAAO,EAQL,SAAS,EACT,QAAQ,EACR,cAAc,EAEd,iBAAiB,EAClB,MAAM,wDAAwD,CAAC;AAEhE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,mDAAmD,CAAC;AAGpF,OAAO,EACL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,eAAe,EACf,iBAAiB,GAClB,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AACH,qBACa,kBAAmB,SAAQ,uBAEtC;IACA,0BAA0B;IACA,QAAQ,SAAK;IACvC,0B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ACX,KAAK,CAAC,EAAE,MAAM,CAAa;IAErD,gDAAgD;IACtB,KAAK,EAAE,eAAe,CAA0B;IAE1E;;;OAGG;IACwB,OAAO,UAAS;IAE3C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAwC;IACvE,6GAA6G;IAClE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAM;IAEzE;;;;;OAKG;IACwB,qBAAqB,UAAS;IAEhD,MAAM;IA+EN,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAUzC,OAAO,CAAC,OAAO,EAAE,cAAc;IAiBxC;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;cAuCL,gBAAgB;CAGpC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,kBAAkB,CAAC;KAC5C;CACF"}
1
+ {"version":3,"file":"gauge-horizontal.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/gauge-horizontal/gauge-horizontal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AAIxC,OAAO,EACL,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACT,MAAM,aAAa,CAAC;AAKrB,OAAO,EAQL,SAAS,EACT,QAAQ,EACR,cAAc,EAEd,iBAAiB,EAClB,MAAM,wDAAwD,CAAC;AAEhE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,mDAAmD,CAAC;AAGpF,OAAO,EACL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,eAAe,EACf,iBAAiB,GAClB,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AACH,qBACa,kBAAmB,SAAQ,uBAEtC;IACA,0BAA0B;IACA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,CAAa;IACvD,qCAAqC;IACX,KAAK,CAAC,EAAE,MAAM,CAAa;IAErD,gDAAgD;IACtB,KAAK,EAAE,eAAe,CAA0B;IAE1E;;;OAGG;IACwB,OAAO,UAAS;IAE3C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAwC;IACvE,6GAA6G;IAClE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAM;IAEzE;;;;;OAKG;IACwB,qBAAqB,UAAS;IAEhD,MAAM;IAiFN,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAUzC,OAAO,CAAC,OAAO,EAAE,cAAc;IAiBxC;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;cAuCL,gBAAgB;CAGpC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,kBAAkB,CAAC;KAC5C;CACF"}
@@ -140,7 +140,7 @@ let ObcGaugeHorizontal = class extends SetpointMixin(LitElement, {
140
140
  height=${this.fixedAspectRatio ? "100%" : `${viewBox.height}px`}
141
141
  viewBox="${viewBox.x} ${viewBox.y} ${viewBox.width} ${viewBox.height}"
142
142
  preserveAspectRatio="${preserveAspectRatio}"
143
- style="--scale: ${this.fixedAspectRatio ? this._scale : 1};"
143
+ style="--scale: ${this.fixedAspectRatio ? this._scale : 1}; display: block;"
144
144
  part="svg"
145
145
  >
146
146
  ${parts.barContainer} ${parts.barFill} ${parts.scaleBackground}
@@ -1 +1 @@
1
- {"version":3,"file":"gauge-horizontal.js","sources":["../../../src/navigation-instruments/gauge-horizontal/gauge-horizontal.ts"],"sourcesContent":["import {LitElement, html} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport type {PropertyValues} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport {ResizeController} from '@lit-labs/observers/resize-controller.js';\nimport {CHART_DIMENSIONS} from '../../charthelpers/constants.js';\nimport {\n InstrumentState,\n FrameStyle,\n BorderRadiusPosition,\n Priority,\n} from '../types.js';\nimport type {\n ExternalScaleAdvice,\n ExternalScaleConfig,\n} from '../../building-blocks/external-scale/external-scale.js';\nimport {\n computeExternalScaleViewBox,\n computeFixedAspectRatioScale,\n computeExternalScaleLayout,\n renderExternalScale,\n toExternalScaleLayoutConfig,\n computeScaleDimensionsForReport,\n computeExternalScaleEffectiveBarThickness,\n ScaleType,\n FillMode,\n AdvicePosition,\n ExternalScaleOrientation,\n ExternalScaleSide,\n} from '../../building-blocks/external-scale/external-scale.js';\nimport {SetpointMixin} from '../../svghelpers/setpoint-mixin.js';\nimport type {LinearAdvice} from '../../building-blocks/instrument-linear/advice.js';\n\n// Re-export shared enums for convenience\nexport {\n ScaleType,\n FillMode,\n AdvicePosition,\n FrameStyle,\n BorderRadiusPosition,\n InstrumentState,\n ExternalScaleSide,\n};\n\n/**\n * `<obc-gauge-horizontal>` – A horizontal gauge component with bar and scale background.\n *\n * Use `obc-gauge-horizontal` when you need a standalone horizontal gauge with a visible scale\n * and bar. This is ideal for displaying single values like speed, power, or progress where\n * the scale context is always needed.\n *\n * This is the same as `obc-bar-horizontal` (both use `external-scale.ts`)\n * but with several properties fixed for consistent gauge appearance.\n * Unlike `obc-bar-horizontal`, this component always shows the bar and scale background.\n *\n * ---\n *\n * ### Features\n * - **Fixed Layout:** Width (384px), padding (32px), bar/tick/label thicknesses, and border radius are fixed for consistent gauge appearance.\n * - **Scale Configuration:**\n * - Configurable `minValue` and `maxValue` for the value range.\n * - Optional main, primary, secondary, and tertiary tickmarks at specified intervals.\n * - Labels shown at primary tickmark intervals (controlled via `showLabels`).\n * - **Side Positioning:** Can be placed on the `top` or `bottom` side via the `side` property.\n * - **Value Display:**\n * - `value` property drives the bar fill.\n * - `fillMode` controls visualization: `fill` shows bar from `fillMin` to `fillMax`; `tint` adds a marker at the `value` position.\n * - Set `priority` to `Priority.enhanced` to use the blue/enhanced color palette for bar fill and setpoint (default: `Priority.regular`).\n * - **Setpoint Marker:**\n * - Optional `setpoint` value displays a marker.\n * - Automatic at-setpoint detection with configurable deadband.\n * - **Advice Overlays:** Render advice ranges with different types and hinted states.\n * - **Fixed Aspect Ratio:** When enabled, scales the component proportionally while keeping label font-size constant.\n * - **Dimension Reporting:** Dispatches `scale-dimensions-changed` events for parent chart integration.\n *\n * ---\n *\n * ### Fixed Properties (not configurable)\n * - `width`: 384px\n * - `paddingLeft`/`paddingRight`: 32px (`CHART_DIMENSIONS.CANVAS_PADDING`)\n * - `barThickness`: 48px\n * - `tickThickness`: 24px\n * - `labelThickness`: 60px\n * - `borderRadius`: 8px (matches obc-component-size-medium)\n * - `scaleType`: regular\n * - `frameStyle`: regular\n * - `hasBar`: true\n * - `hasScale`: true\n * - `scaleBackground`: true\n * - `fixedAspectRatio`: true (always scales proportionally)\n *\n * ---\n *\n * ### Implementation\n * This is a higher fidelity implementation of the concept shown in `instrument-linear.ts`,\n * providing a complete gauge with container, scale background, tickmarks, labels, advice overlays, and setpoint marker.\n *\n * This is a thin web-component wrapper around the pure SVG building-block renderer in `external-scale.ts`.\n * It sets up the outer `<svg>`/`viewBox` for a horizontal scale and delegates rendering/layout to:\n * - `computeExternalScaleLayout(...)`\n * - `renderExternalScale(config)`\n *\n * For renderer documentation see: **Building Blocks/External Scale**.\n *\n * For a version where these properties are user-configurable, see **Bars and Graphs/Bar Horizontal**.\n *\n * ---\n *\n * ### Events\n * - `scale-dimensions-changed` – Fired when layout-affecting properties (`side`, `showLabels`) change, reporting dimensions to parent chart components.\n *\n * ---\n *\n * ### Example\n *\n * ```html\n * <obc-gauge-horizontal\n * min-value=\"0\"\n * max-value=\"100\"\n * value=\"75\"\n * primary-tickmark-interval=\"20\"\n * secondary-tickmark-interval=\"10\"\n * setpoint=\"80\"\n * side=\"bottom\"\n * ></obc-gauge-horizontal>\n * ```\n *\n * @fires {CustomEvent} scale-dimensions-changed - Fired when layout-affecting properties change, providing dimension info for parent chart integration.\n * @stable\n */\n@customElement('obc-gauge-horizontal')\nexport class ObcGaugeHorizontal extends SetpointMixin(LitElement, {\n defaultDeadband: 1,\n}) {\n /** Minimum scale value */\n @property({type: Number}) minValue = 0;\n /** Maximum scale value */\n @property({type: Number}) maxValue = 100;\n\n private readonly width = 384;\n private readonly paddingLeft = CHART_DIMENSIONS.CANVAS_PADDING;\n private readonly paddingRight = CHART_DIMENSIONS.CANVAS_PADDING;\n\n /** Which side of the chart area this scale lives on (top or bottom) */\n @property({type: String}) side: ExternalScaleSide = ExternalScaleSide.bottom;\n\n /**\n * When true, freezes all internal calculations and scales the entire component\n * proportionally (like CSS transform:scale), except label font-size remains constant.\n * When false (default), dimensions react to component properties.\n *\n * This property is intentionally not exposed as a public API or Storybook control.\n * It can be set programmatically by parent components (e.g., GaugeTrend).\n */\n fixedAspectRatio = false;\n\n /**\n * Reference size for proportional scaling when fixedAspectRatio is true.\n * At this width, the scale renders at native 1:1 (matches Figma design).\n * Above this width, the scale grows proportionally; below, it shrinks.\n * @default 384\n */\n scaleReferenceSize = 384;\n\n @state()\n private _scale = 1;\n\n // ResizeController automatically subscribes/unsubscribes based on component lifecycle\n // @ts-expect-error - Controller is used for side effects, not accessed directly\n private _resizeController = new ResizeController(this, {\n callback: (entries) => {\n if (!this.fixedAspectRatio) return;\n\n const entry = entries[0];\n if (!entry) return;\n\n // Use the centralized function that computes scale based on reference size\n // For horizontal scales, compare container width to reference size\n const containerMainAxisSize = entry.contentRect.width;\n\n const scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.horizontal,\n containerMainAxisSize,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n // Guard against zero-sized containers, but allow fractional scales < 1\n this._scale = scale > 0 ? scale : 1;\n\n // Report scaled dimensions to parent chart\n this.reportDimensions();\n },\n });\n\n /** Show numerical value labels at primary tickmarks */\n @property({type: Boolean, attribute: false}) showLabels = true;\n private readonly barThickness = 48;\n private readonly tickThickness = 24;\n private readonly labelThickness = 60;\n\n /** Array of values for main tickmarks. When undefined, no main tickmarks shown. When empty array [], defaults to [minValue, 0, maxValue]. */\n @property({type: Array, attribute: false}) mainTickmarks?: number[] = [];\n /** Interval for primary (longest) tickmarks with labels */\n @property({type: Number}) primaryTickmarkInterval?: number = undefined;\n /** Interval for secondary (medium) tickmarks */\n @property({type: Number}) secondaryTickmarkInterval?: number = undefined;\n /** Interval for tertiary (shortest) tickmarks */\n @property({type: Number}) tertiaryTickmarkInterval?: number = undefined;\n private readonly scaleType: ScaleType = ScaleType.regular;\n private readonly frameStyle: FrameStyle = FrameStyle.regular;\n /** Border radius position based on component layout */\n @property({type: String, attribute: false})\n borderRadiusPosition?: BorderRadiusPosition =\n BorderRadiusPosition.innerFirstChild;\n\n private readonly borderRadius = 8;\n\n private get hasBar(): boolean {\n return true;\n }\n\n private get scaleBackground(): boolean {\n return true;\n }\n\n private get hasScale(): boolean {\n return true;\n }\n\n /** Color priority: enhanced uses blue instrument colors for bar fill and setpoint */\n @property({type: String}) priority: Priority = Priority.regular;\n /** Fill visualization mode: 'fill' shows bar from fillMin to fillMax; 'tint' adds a marker at the value position */\n @property({type: String}) fillMode: FillMode = FillMode.fill;\n /** Minimum fill value (defaults to 0) */\n @property({type: Number}) fillMin?: number = undefined;\n /** Maximum fill value (defaults to value) */\n @property({type: Number}) fillMax?: number = undefined;\n /** Current value (bar fill level) */\n @property({type: Number}) value?: number = undefined;\n\n /** Instrument state: active, loading, or off */\n @property({type: String}) state: InstrumentState = InstrumentState.active;\n\n /**\n * @deprecated Use `touching` (from SetpointMixin) instead.\n * Kept for backward compatibility. Synced to `touching` in `willUpdate()`.\n */\n @property({type: Boolean}) focused = false;\n\n private readonly advicePosition: AdvicePosition = AdvicePosition.inner;\n /** Advice/alert overlays with min, max, type, and hinted state. When undefined or empty, no advice shown. */\n @property({type: Array, attribute: false}) advices?: LinearAdvice[] = [];\n\n /**\n * When true, displays a dot indicator at the current value position.\n * The dot is rendered in the scale band, touching its inner edge (towards the chart).\n * This provides an alternative to bar fill for highlighting the current value.\n * @default false\n */\n @property({type: Boolean}) highlightCurrentValue = false;\n\n override render() {\n const config: ExternalScaleConfig = {\n orientation: ExternalScaleOrientation.horizontal,\n side: this.side,\n length: this.width,\n paddingStart: this.paddingLeft,\n paddingEnd: this.paddingRight,\n minValue: this.minValue,\n maxValue: this.maxValue,\n hasScale: this.hasScale,\n labels: this.showLabels,\n hasBar: this.hasBar,\n scaleBackground: this.scaleBackground,\n barThickness: this.barThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n mainTickmarks: this.mainTickmarks,\n primaryTickmarkInterval: this.primaryTickmarkInterval,\n secondaryTickmarkInterval: this.secondaryTickmarkInterval,\n tertiaryTickmarkInterval: this.tertiaryTickmarkInterval,\n scaleType: this.scaleType,\n frameStyle: this.frameStyle,\n borderRadiusPosition: this.borderRadiusPosition,\n borderRadius: this.borderRadius,\n priority: this.priority,\n fillMode: this.fillMode,\n fillMin: this.fillMin,\n fillMax: this.fillMax,\n value: this.value,\n setpoint: this.setpoint,\n newSetpoint: this.newSetpoint,\n atSetpoint: this.atSetpoint,\n autoAtSetpoint: this.autoAtSetpoint,\n autoAtSetpointDeadband: this.autoAtSetpointDeadband,\n setpointAtZeroDeadband: this.setpointAtZeroDeadband,\n animateSetpoint: this.animateSetpoint,\n departingNewSetpoint: this.departingNewSetpoint,\n state: this.state,\n touching: this.touching,\n setpointOverride: this.setpointOverride,\n advicePosition: this.advicePosition,\n advices: this.advices as ExternalScaleAdvice[],\n fixedAspectRatio: this.fixedAspectRatio,\n // Gauges are always in instrument mode - they use fixed borderRadius (8px)\n // and don't respond to .obc-component-size-* CSS classes for border radius\n instrumentMode: true,\n highlightCurrentValue: this.highlightCurrentValue,\n };\n\n const layout = computeExternalScaleLayout(\n toExternalScaleLayoutConfig(config)\n );\n\n const parts = renderExternalScale(config);\n\n const viewBox = computeExternalScaleViewBox(\n {orientation: config.orientation, length: this.width},\n layout\n );\n const preserveAspectRatio = this.fixedAspectRatio\n ? 'xMidYMid meet'\n : 'none';\n\n return html`\n <svg\n width=${this.fixedAspectRatio ? '100%' : `${this.width}px`}\n height=${this.fixedAspectRatio ? '100%' : `${viewBox.height}px`}\n viewBox=\"${viewBox.x} ${viewBox.y} ${viewBox.width} ${viewBox.height}\"\n preserveAspectRatio=\"${preserveAspectRatio}\"\n style=\"--scale: ${this.fixedAspectRatio ? this._scale : 1};\"\n part=\"svg\"\n >\n ${parts.barContainer} ${parts.barFill} ${parts.scaleBackground}\n ${parts.tickmarks} ${parts.labels} ${parts.adviceOverlays}\n ${parts.currentValueDot} ${parts.setpoint}\n </svg>\n `;\n }\n\n override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n\n // Sync deprecated alias to mixin property\n // Only sync if the alias was set and the mixin property was NOT also set.\n if (changed.has('focused') && !changed.has('touching')) {\n this.touching = this.focused;\n }\n }\n\n override updated(changed: PropertyValues) {\n super.updated(changed);\n\n // Report dimensions to parent chart\n // In fixedAspectRatio mode, we report after resize events trigger _scale updates\n // In regular mode, only emit when layout-affecting properties change\n // Setpoint presence changes the reported thickness (reserved marker band),\n // so it must re-report in both aspect-ratio modes.\n if (\n (!this.fixedAspectRatio &&\n (changed.has('side') || changed.has('showLabels'))) ||\n this.setpointPresenceChanged(changed)\n ) {\n this.reportDimensions();\n }\n }\n\n /**\n * Report scale dimensions to parent chart component.\n * Always reports unscaled/reference dimensions so the parent chart can apply\n * consistent proportional scaling in fixedAspectRatioScaling mode.\n */\n private reportDimensions() {\n const effectiveBarThickness = computeExternalScaleEffectiveBarThickness({\n hasBar: this.hasBar,\n barThickness: this.barThickness,\n borderRadius: this.borderRadius,\n scaleType: this.scaleType,\n });\n\n const baseDimensions = computeScaleDimensionsForReport({\n orientation: ExternalScaleOrientation.horizontal,\n side: this.side,\n hasBar: this.hasBar,\n hasScale: this.hasScale,\n labels: this.showLabels,\n barThickness: effectiveBarThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n length: this.width,\n scaleType: this.scaleType,\n hasSetpoint:\n this.setpoint !== undefined ||\n this.newSetpoint !== undefined ||\n this.departingNewSetpoint !== undefined,\n });\n\n // Always report unscaled/reference dimensions.\n // The parent chart component handles proportional scaling consistently\n // for both external scales and chart padding in fixedAspectRatioScaling mode.\n const dimensions = baseDimensions;\n\n this.dispatchEvent(\n new CustomEvent('scale-dimensions-changed', {\n detail: dimensions,\n bubbles: true,\n composed: true,\n })\n );\n }\n\n protected override createRenderRoot() {\n return this;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-gauge-horizontal': ObcGaugeHorizontal;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAmIO,IAAM,qBAAN,cAAiC,cAAc,YAAY;AAAA,EAChE,iBAAiB;AACnB,CAAC,EAAE;AAAA,EAFI,cAAA;AAAA,UAAA,GAAA,SAAA;AAIqB,SAAA,WAAW;AAEX,SAAA,WAAW;AAErC,SAAiB,QAAQ;AACzB,SAAiB,cAAc,iBAAiB;AAChD,SAAiB,eAAe,iBAAiB;AAGvB,SAAA,OAA0B,kBAAkB;AAUtE,SAAA,mBAAmB;AAQnB,SAAA,qBAAqB;AAGrB,SAAQ,SAAS;AAIjB,SAAQ,oBAAoB,IAAI,iBAAiB,MAAM;AAAA,MACrD,UAAU,CAAC,YAAY;AACrB,YAAI,CAAC,KAAK,iBAAkB;AAE5B,cAAM,QAAQ,QAAQ,CAAC;AACvB,YAAI,CAAC,MAAO;AAIZ,cAAM,wBAAwB,MAAM,YAAY;AAEhD,cAAM,QAAQ,6BAA6B;AAAA,UACzC,aAAa,yBAAyB;AAAA,UACtC;AAAA,UACA,oBAAoB,KAAK;AAAA,QAAA,CAC1B;AAED,aAAK,SAAS,QAAQ,IAAI,QAAQ;AAGlC,aAAK,iBAAA;AAAA,MACP;AAAA,IAAA,CACD;AAG4C,SAAA,aAAa;AAC1D,SAAiB,eAAe;AAChC,SAAiB,gBAAgB;AACjC,SAAiB,iBAAiB;AAGS,SAAA,gBAA2B,CAAA;AAE5C,SAAA,0BAAmC;AAEnC,SAAA,4BAAqC;AAErC,SAAA,2BAAoC;A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AA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA7Gb,mBA6Ge,WAAA,SAAA,CAAA;AAMC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAnHd,mBAmHgB,WAAA,WAAA,CAAA;AAIgB,gBAAA;AAAA,EAA1C,SAAS,EAAC,MAAM,OAAO,WAAW,OAAM;AAAA,GAvH9B,mBAuHgC,WAAA,WAAA,CAAA;AAQhB,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GA/Hd,mBA+HgB,WAAA,yBAAA,CAAA;AA/HhB,qBAAN,gBAAA;AAAA,EADN,cAAc,sBAAsB;AAAA,GACxB,kBAAA;"}
1
+ {"version":3,"file":"gauge-horizontal.js","sources":["../../../src/navigation-instruments/gauge-horizontal/gauge-horizontal.ts"],"sourcesContent":["import {LitElement, html} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport type {PropertyValues} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport {ResizeController} from '@lit-labs/observers/resize-controller.js';\nimport {CHART_DIMENSIONS} from '../../charthelpers/constants.js';\nimport {\n InstrumentState,\n FrameStyle,\n BorderRadiusPosition,\n Priority,\n} from '../types.js';\nimport type {\n ExternalScaleAdvice,\n ExternalScaleConfig,\n} from '../../building-blocks/external-scale/external-scale.js';\nimport {\n computeExternalScaleViewBox,\n computeFixedAspectRatioScale,\n computeExternalScaleLayout,\n renderExternalScale,\n toExternalScaleLayoutConfig,\n computeScaleDimensionsForReport,\n computeExternalScaleEffectiveBarThickness,\n ScaleType,\n FillMode,\n AdvicePosition,\n ExternalScaleOrientation,\n ExternalScaleSide,\n} from '../../building-blocks/external-scale/external-scale.js';\nimport {SetpointMixin} from '../../svghelpers/setpoint-mixin.js';\nimport type {LinearAdvice} from '../../building-blocks/instrument-linear/advice.js';\n\n// Re-export shared enums for convenience\nexport {\n ScaleType,\n FillMode,\n AdvicePosition,\n FrameStyle,\n BorderRadiusPosition,\n InstrumentState,\n ExternalScaleSide,\n};\n\n/**\n * `<obc-gauge-horizontal>` – A horizontal gauge component with bar and scale background.\n *\n * Use `obc-gauge-horizontal` when you need a standalone horizontal gauge with a visible scale\n * and bar. This is ideal for displaying single values like speed, power, or progress where\n * the scale context is always needed.\n *\n * This is the same as `obc-bar-horizontal` (both use `external-scale.ts`)\n * but with several properties fixed for consistent gauge appearance.\n * Unlike `obc-bar-horizontal`, this component always shows the bar and scale background.\n *\n * ---\n *\n * ### Features\n * - **Fixed Layout:** Width (384px), padding (32px), bar/tick/label thicknesses, and border radius are fixed for consistent gauge appearance.\n * - **Scale Configuration:**\n * - Configurable `minValue` and `maxValue` for the value range.\n * - Optional main, primary, secondary, and tertiary tickmarks at specified intervals.\n * - Labels shown at primary tickmark intervals (controlled via `showLabels`).\n * - **Side Positioning:** Can be placed on the `top` or `bottom` side via the `side` property.\n * - **Value Display:**\n * - `value` property drives the bar fill.\n * - `fillMode` controls visualization: `fill` shows bar from `fillMin` to `fillMax`; `tint` adds a marker at the `value` position.\n * - Set `priority` to `Priority.enhanced` to use the blue/enhanced color palette for bar fill and setpoint (default: `Priority.regular`).\n * - **Setpoint Marker:**\n * - Optional `setpoint` value displays a marker.\n * - Automatic at-setpoint detection with configurable deadband.\n * - **Advice Overlays:** Render advice ranges with different types and hinted states.\n * - **Fixed Aspect Ratio:** When enabled, scales the component proportionally while keeping label font-size constant.\n * - **Dimension Reporting:** Dispatches `scale-dimensions-changed` events for parent chart integration.\n *\n * ---\n *\n * ### Fixed Properties (not configurable)\n * - `width`: 384px\n * - `paddingLeft`/`paddingRight`: 32px (`CHART_DIMENSIONS.CANVAS_PADDING`)\n * - `barThickness`: 48px\n * - `tickThickness`: 24px\n * - `labelThickness`: 60px\n * - `borderRadius`: 8px (matches obc-component-size-medium)\n * - `scaleType`: regular\n * - `frameStyle`: regular\n * - `hasBar`: true\n * - `hasScale`: true\n * - `scaleBackground`: true\n * - `fixedAspectRatio`: true (always scales proportionally)\n *\n * ---\n *\n * ### Implementation\n * This is a higher fidelity implementation of the concept shown in `instrument-linear.ts`,\n * providing a complete gauge with container, scale background, tickmarks, labels, advice overlays, and setpoint marker.\n *\n * This is a thin web-component wrapper around the pure SVG building-block renderer in `external-scale.ts`.\n * It sets up the outer `<svg>`/`viewBox` for a horizontal scale and delegates rendering/layout to:\n * - `computeExternalScaleLayout(...)`\n * - `renderExternalScale(config)`\n *\n * For renderer documentation see: **Building Blocks/External Scale**.\n *\n * For a version where these properties are user-configurable, see **Bars and Graphs/Bar Horizontal**.\n *\n * ---\n *\n * ### Events\n * - `scale-dimensions-changed` – Fired when layout-affecting properties (`side`, `showLabels`) change, reporting dimensions to parent chart components.\n *\n * ---\n *\n * ### Example\n *\n * ```html\n * <obc-gauge-horizontal\n * min-value=\"0\"\n * max-value=\"100\"\n * value=\"75\"\n * primary-tickmark-interval=\"20\"\n * secondary-tickmark-interval=\"10\"\n * setpoint=\"80\"\n * side=\"bottom\"\n * ></obc-gauge-horizontal>\n * ```\n *\n * @fires {CustomEvent} scale-dimensions-changed - Fired when layout-affecting properties change, providing dimension info for parent chart integration.\n * @stable\n */\n@customElement('obc-gauge-horizontal')\nexport class ObcGaugeHorizontal extends SetpointMixin(LitElement, {\n defaultDeadband: 1,\n}) {\n /** Minimum scale value */\n @property({type: Number}) minValue = 0;\n /** Maximum scale value */\n @property({type: Number}) maxValue = 100;\n\n private readonly width = 384;\n private readonly paddingLeft = CHART_DIMENSIONS.CANVAS_PADDING;\n private readonly paddingRight = CHART_DIMENSIONS.CANVAS_PADDING;\n\n /** Which side of the chart area this scale lives on (top or bottom) */\n @property({type: String}) side: ExternalScaleSide = ExternalScaleSide.bottom;\n\n /**\n * When true, freezes all internal calculations and scales the entire component\n * proportionally (like CSS transform:scale), except label font-size remains constant.\n * When false (default), dimensions react to component properties.\n *\n * This property is intentionally not exposed as a public API or Storybook control.\n * It can be set programmatically by parent components (e.g., GaugeTrend).\n */\n fixedAspectRatio = false;\n\n /**\n * Reference size for proportional scaling when fixedAspectRatio is true.\n * At this width, the scale renders at native 1:1 (matches Figma design).\n * Above this width, the scale grows proportionally; below, it shrinks.\n * @default 384\n */\n scaleReferenceSize = 384;\n\n @state()\n private _scale = 1;\n\n // ResizeController automatically subscribes/unsubscribes based on component lifecycle\n // @ts-expect-error - Controller is used for side effects, not accessed directly\n private _resizeController = new ResizeController(this, {\n callback: (entries) => {\n if (!this.fixedAspectRatio) return;\n\n const entry = entries[0];\n if (!entry) return;\n\n // Use the centralized function that computes scale based on reference size\n // For horizontal scales, compare container width to reference size\n const containerMainAxisSize = entry.contentRect.width;\n\n const scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.horizontal,\n containerMainAxisSize,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n // Guard against zero-sized containers, but allow fractional scales < 1\n this._scale = scale > 0 ? scale : 1;\n\n // Report scaled dimensions to parent chart\n this.reportDimensions();\n },\n });\n\n /** Show numerical value labels at primary tickmarks */\n @property({type: Boolean, attribute: false}) showLabels = true;\n private readonly barThickness = 48;\n private readonly tickThickness = 24;\n private readonly labelThickness = 60;\n\n /** Array of values for main tickmarks. When undefined, no main tickmarks shown. When empty array [], defaults to [minValue, 0, maxValue]. */\n @property({type: Array, attribute: false}) mainTickmarks?: number[] = [];\n /** Interval for primary (longest) tickmarks with labels */\n @property({type: Number}) primaryTickmarkInterval?: number = undefined;\n /** Interval for secondary (medium) tickmarks */\n @property({type: Number}) secondaryTickmarkInterval?: number = undefined;\n /** Interval for tertiary (shortest) tickmarks */\n @property({type: Number}) tertiaryTickmarkInterval?: number = undefined;\n private readonly scaleType: ScaleType = ScaleType.regular;\n private readonly frameStyle: FrameStyle = FrameStyle.regular;\n /** Border radius position based on component layout */\n @property({type: String, attribute: false})\n borderRadiusPosition?: BorderRadiusPosition =\n BorderRadiusPosition.innerFirstChild;\n\n private readonly borderRadius = 8;\n\n private get hasBar(): boolean {\n return true;\n }\n\n private get scaleBackground(): boolean {\n return true;\n }\n\n private get hasScale(): boolean {\n return true;\n }\n\n /** Color priority: enhanced uses blue instrument colors for bar fill and setpoint */\n @property({type: String}) priority: Priority = Priority.regular;\n /** Fill visualization mode: 'fill' shows bar from fillMin to fillMax; 'tint' adds a marker at the value position */\n @property({type: String}) fillMode: FillMode = FillMode.fill;\n /** Minimum fill value (defaults to 0) */\n @property({type: Number}) fillMin?: number = undefined;\n /** Maximum fill value (defaults to value) */\n @property({type: Number}) fillMax?: number = undefined;\n /** Current value (bar fill level) */\n @property({type: Number}) value?: number = undefined;\n\n /** Instrument state: active, loading, or off */\n @property({type: String}) state: InstrumentState = InstrumentState.active;\n\n /**\n * @deprecated Use `touching` (from SetpointMixin) instead.\n * Kept for backward compatibility. Synced to `touching` in `willUpdate()`.\n */\n @property({type: Boolean}) focused = false;\n\n private readonly advicePosition: AdvicePosition = AdvicePosition.inner;\n /** Advice/alert overlays with min, max, type, and hinted state. When undefined or empty, no advice shown. */\n @property({type: Array, attribute: false}) advices?: LinearAdvice[] = [];\n\n /**\n * When true, displays a dot indicator at the current value position.\n * The dot is rendered in the scale band, touching its inner edge (towards the chart).\n * This provides an alternative to bar fill for highlighting the current value.\n * @default false\n */\n @property({type: Boolean}) highlightCurrentValue = false;\n\n override render() {\n const config: ExternalScaleConfig = {\n orientation: ExternalScaleOrientation.horizontal,\n side: this.side,\n length: this.width,\n paddingStart: this.paddingLeft,\n paddingEnd: this.paddingRight,\n minValue: this.minValue,\n maxValue: this.maxValue,\n hasScale: this.hasScale,\n labels: this.showLabels,\n hasBar: this.hasBar,\n scaleBackground: this.scaleBackground,\n barThickness: this.barThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n mainTickmarks: this.mainTickmarks,\n primaryTickmarkInterval: this.primaryTickmarkInterval,\n secondaryTickmarkInterval: this.secondaryTickmarkInterval,\n tertiaryTickmarkInterval: this.tertiaryTickmarkInterval,\n scaleType: this.scaleType,\n frameStyle: this.frameStyle,\n borderRadiusPosition: this.borderRadiusPosition,\n borderRadius: this.borderRadius,\n priority: this.priority,\n fillMode: this.fillMode,\n fillMin: this.fillMin,\n fillMax: this.fillMax,\n value: this.value,\n setpoint: this.setpoint,\n newSetpoint: this.newSetpoint,\n atSetpoint: this.atSetpoint,\n autoAtSetpoint: this.autoAtSetpoint,\n autoAtSetpointDeadband: this.autoAtSetpointDeadband,\n setpointAtZeroDeadband: this.setpointAtZeroDeadband,\n animateSetpoint: this.animateSetpoint,\n departingNewSetpoint: this.departingNewSetpoint,\n state: this.state,\n touching: this.touching,\n setpointOverride: this.setpointOverride,\n advicePosition: this.advicePosition,\n advices: this.advices as ExternalScaleAdvice[],\n fixedAspectRatio: this.fixedAspectRatio,\n // Gauges are always in instrument mode - they use fixed borderRadius (8px)\n // and don't respond to .obc-component-size-* CSS classes for border radius\n instrumentMode: true,\n highlightCurrentValue: this.highlightCurrentValue,\n };\n\n const layout = computeExternalScaleLayout(\n toExternalScaleLayoutConfig(config)\n );\n\n const parts = renderExternalScale(config);\n\n const viewBox = computeExternalScaleViewBox(\n {orientation: config.orientation, length: this.width},\n layout\n );\n const preserveAspectRatio = this.fixedAspectRatio\n ? 'xMidYMid meet'\n : 'none';\n\n return html`\n <svg\n width=${this.fixedAspectRatio ? '100%' : `${this.width}px`}\n height=${this.fixedAspectRatio ? '100%' : `${viewBox.height}px`}\n viewBox=\"${viewBox.x} ${viewBox.y} ${viewBox.width} ${viewBox.height}\"\n preserveAspectRatio=\"${preserveAspectRatio}\"\n style=\"--scale: ${this.fixedAspectRatio\n ? this._scale\n : 1}; display: block;\"\n part=\"svg\"\n >\n ${parts.barContainer} ${parts.barFill} ${parts.scaleBackground}\n ${parts.tickmarks} ${parts.labels} ${parts.adviceOverlays}\n ${parts.currentValueDot} ${parts.setpoint}\n </svg>\n `;\n }\n\n override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n\n // Sync deprecated alias to mixin property\n // Only sync if the alias was set and the mixin property was NOT also set.\n if (changed.has('focused') && !changed.has('touching')) {\n this.touching = this.focused;\n }\n }\n\n override updated(changed: PropertyValues) {\n super.updated(changed);\n\n // Report dimensions to parent chart\n // In fixedAspectRatio mode, we report after resize events trigger _scale updates\n // In regular mode, only emit when layout-affecting properties change\n // Setpoint presence changes the reported thickness (reserved marker band),\n // so it must re-report in both aspect-ratio modes.\n if (\n (!this.fixedAspectRatio &&\n (changed.has('side') || changed.has('showLabels'))) ||\n this.setpointPresenceChanged(changed)\n ) {\n this.reportDimensions();\n }\n }\n\n /**\n * Report scale dimensions to parent chart component.\n * Always reports unscaled/reference dimensions so the parent chart can apply\n * consistent proportional scaling in fixedAspectRatioScaling mode.\n */\n private reportDimensions() {\n const effectiveBarThickness = computeExternalScaleEffectiveBarThickness({\n hasBar: this.hasBar,\n barThickness: this.barThickness,\n borderRadius: this.borderRadius,\n scaleType: this.scaleType,\n });\n\n const baseDimensions = computeScaleDimensionsForReport({\n orientation: ExternalScaleOrientation.horizontal,\n side: this.side,\n hasBar: this.hasBar,\n hasScale: this.hasScale,\n labels: this.showLabels,\n barThickness: effectiveBarThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n length: this.width,\n scaleType: this.scaleType,\n hasSetpoint:\n this.setpoint !== undefined ||\n this.newSetpoint !== undefined ||\n this.departingNewSetpoint !== undefined,\n });\n\n // Always report unscaled/reference dimensions.\n // The parent chart component handles proportional scaling consistently\n // for both external scales and chart padding in fixedAspectRatioScaling mode.\n const dimensions = baseDimensions;\n\n this.dispatchEvent(\n new CustomEvent('scale-dimensions-changed', {\n detail: dimensions,\n bubbles: true,\n composed: true,\n })\n );\n }\n\n protected override createRenderRoot() {\n return this;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-gauge-horizontal': ObcGaugeHorizontal;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAmIO,IAAM,qBAAN,cAAiC,cAAc,YAAY;AAAA,EAChE,iBAAiB;AACnB,CAAC,EAAE;AAAA,EAFI,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AAc,sBAAsB;AAAA,GACxB,kBAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"gauge-vertical.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/gauge-vertical/gauge-vertical.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AAIxC,OAAO,EACL,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACT,MAAM,aAAa,CAAC;AAKrB,OAAO,EAQL,SAAS,EACT,QAAQ,EACR,cAAc,EAEd,iBAAiB,EAClB,MAAM,wDAAwD,CAAC;AAEhE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,mDAAmD,CAAC;AAGpF,OAAO,EACL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,eAAe,EACf,iBAAiB,GAClB,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AACH,qBACa,gBAAiB,SAAQ,qBAEpC;IACA,0BAA0B;IACA,QAAQ,SAAK;IACvC,0BAA0B;IACA,QAAQ,SAAO;IAEzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAO;IAC9B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmC;IAEjE,uEAAuE;IAC7C,IAAI,EAAE,iBAAiB,CAA2B;IAE5E;;;;;;;OAOG;IACH,gBAAgB,UAAS;IAEzB;;;;;OAKG;IACH,kBAAkB,SAAO;IAGzB,OAAO,CAAC,MAAM,CAAK;IAInB,OAAO,CAAC,iBAAiB,CAsBtB;IAEH,uDAAuD;IACV,UAAU,UAAQ;IAC/D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAM;IACnC,OAAO,CAAC,Q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ACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
1
+ {"version":3,"file":"gauge-vertical.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/gauge-vertical/gauge-vertical.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AAIxC,OAAO,EACL,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACT,MAAM,aAAa,CAAC;AAKrB,OAAO,EAQL,SAAS,EACT,QAAQ,EACR,cAAc,EAEd,iBAAiB,EAClB,MAAM,wDAAwD,CAAC;AAEhE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,mDAAmD,CAAC;AAGpF,OAAO,EACL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,eAAe,EACf,iBAAiB,GAClB,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AACH,qBACa,gBAAiB,SAAQ,qBAEpC;IACA,0BAA0B;IACA,QAAQ,SAAK;IACvC,0BAA0B;IACA,QAAQ,SAAO;IAEzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAO;IAC9B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmC;IAEjE,uEAAuE;IAC7C,IAAI,EAAE,iBAAiB,CAA2B;IAE5E;;;;;;;OAOG;IACH,gBAAgB,UAAS;IAEzB;;;;;OAKG;IACH,kBAAkB,SAAO;IAGzB,OAAO,CAAC,MAAM,CAAK;IAInB,OAAO,CAAC,iBAAiB,CAsBtB;IAEH,uDAAuD;IACV,UAAU,UAAQ;IAC/D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAM;I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AAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
@@ -140,7 +140,7 @@ let ObcGaugeVertical = class extends SetpointMixin(LitElement, {
140
140
  height=${this.fixedAspectRatio ? "100%" : `${this.height}px`}
141
141
  viewBox="${viewBox.x} ${viewBox.y} ${viewBox.width} ${viewBox.height}"
142
142
  preserveAspectRatio="${preserveAspectRatio}"
143
- style="--scale: ${this.fixedAspectRatio ? this._scale : 1};"
143
+ style="--scale: ${this.fixedAspectRatio ? this._scale : 1}; display: block;"
144
144
  part="svg"
145
145
  >
146
146
  ${parts.barContainer} ${parts.barFill} ${parts.scaleBackground}
@@ -1 +1 @@
1
- {"version":3,"file":"gauge-vertical.js","sources":["../../../src/navigation-instruments/gauge-vertical/gauge-vertical.ts"],"sourcesContent":["import {LitElement, html} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport type {PropertyValues} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport {ResizeController} from '@lit-labs/observers/resize-controller.js';\nimport {CHART_DIMENSIONS} from '../../charthelpers/constants.js';\nimport {\n InstrumentState,\n FrameStyle,\n BorderRadiusPosition,\n Priority,\n} from '../types.js';\nimport type {\n ExternalScaleAdvice,\n ExternalScaleConfig,\n} from '../../building-blocks/external-scale/external-scale.js';\nimport {\n computeExternalScaleViewBox,\n computeFixedAspectRatioScale,\n computeExternalScaleLayout,\n renderExternalScale,\n toExternalScaleLayoutConfig,\n computeScaleDimensionsForReport,\n computeExternalScaleEffectiveBarThickness,\n ScaleType,\n FillMode,\n AdvicePosition,\n ExternalScaleOrientation,\n ExternalScaleSide,\n} from '../../building-blocks/external-scale/external-scale.js';\nimport {SetpointMixin} from '../../svghelpers/setpoint-mixin.js';\nimport type {LinearAdvice} from '../../building-blocks/instrument-linear/advice.js';\n\n// Re-export shared enums for convenience\nexport {\n ScaleType,\n FillMode,\n AdvicePosition,\n FrameStyle,\n BorderRadiusPosition,\n InstrumentState,\n ExternalScaleSide,\n};\n\n/**\n * `<obc-gauge-vertical>` – A vertical gauge component with bar and scale background.\n *\n * Use `obc-gauge-vertical` when you need a standalone vertical gauge with a visible scale\n * and bar. This is ideal for displaying single values like tank levels, pressure, or\n * temperature where the scale context is always needed.\n *\n * This is the same as `obc-bar-vertical` (both use `external-scale.ts`)\n * but with several properties fixed for consistent gauge appearance.\n * Unlike `obc-bar-vertical`, this component always shows the bar and scale background.\n *\n * ---\n *\n * ### Features\n * - **Fixed Layout:** Height (384px), padding (32px), bar/tick/label thicknesses, and border radius are fixed for consistent gauge appearance.\n * - **Scale Configuration:**\n * - Configurable `minValue` and `maxValue` for the value range.\n * - Optional main, primary, secondary, and tertiary tickmarks at specified intervals.\n * - Labels shown at primary tickmark intervals (controlled via `showLabels`).\n * - **Side Positioning:** Can be placed on the `left` or `right` side via the `side` property.\n * - **Value Display:**\n * - `value` property drives the bar fill.\n * - `fillMode` controls visualization: `fill` shows bar from `fillMin` to `fillMax`; `tint` adds a marker at the `value` position.\n * - Set `priority` to `Priority.enhanced` to use the blue/enhanced color palette for bar fill and setpoint (default: `Priority.regular`).\n * - **Setpoint Marker:**\n * - Optional `setpoint` value displays a marker.\n * - Automatic at-setpoint detection with configurable deadband.\n * - **Advice Overlays:** Render advice ranges with different types and hinted states.\n * - **Fixed Aspect Ratio:** When enabled, scales the component proportionally while keeping label font-size constant.\n * - **Dimension Reporting:** Dispatches `scale-dimensions-changed` events for parent chart integration.\n *\n * ---\n *\n * ### Fixed Properties (not configurable)\n * - `height`: 384px\n * - `paddingTop`/`paddingBottom`: 32px (`CHART_DIMENSIONS.CANVAS_PADDING`)\n * - `barThickness`: 48px\n * - `tickThickness`: 24px\n * - `labelThickness`: 60px\n * - `borderRadius`: 8px (matches obc-component-size-medium)\n * - `scaleType`: regular\n * - `frameStyle`: regular\n * - `hasBar`: true\n * - `hasScale`: true\n * - `scaleBackground`: true\n * - `fixedAspectRatio`: true (always scales proportionally)\n *\n * ---\n *\n * ### Implementation\n * This is a higher fidelity implementation of the concept shown in `instrument-linear.ts`,\n * providing a complete gauge with container, scale background, tickmarks, labels, advice overlays, and setpoint marker.\n *\n * This is a thin web-component wrapper around the pure SVG building-block renderer in `external-scale.ts`.\n * It sets up the outer `<svg>`/`viewBox` for a vertical scale and delegates rendering/layout to:\n * - `computeExternalScaleLayout(...)`\n * - `renderExternalScale(config)`\n *\n * For renderer documentation see: **Building Blocks/External Scale**.\n *\n * For a version where these properties are user-configurable, see **Bars and Graphs/Bar Vertical**.\n *\n * ---\n *\n * ### Events\n * - `scale-dimensions-changed` – Fired when layout-affecting properties (`side`, `showLabels`) change, reporting dimensions to parent chart components.\n *\n * ---\n *\n * ### Example\n *\n * ```html\n * <obc-gauge-vertical\n * min-value=\"0\"\n * max-value=\"100\"\n * value=\"75\"\n * primary-tickmark-interval=\"20\"\n * secondary-tickmark-interval=\"10\"\n * setpoint=\"80\"\n * side=\"right\"\n * ></obc-gauge-vertical>\n * ```\n *\n * @fires {CustomEvent} scale-dimensions-changed - Fired when layout-affecting properties change, providing dimension info for parent chart integration.\n * @stable\n */\n@customElement('obc-gauge-vertical')\nexport class ObcGaugeVertical extends SetpointMixin(LitElement, {\n defaultDeadband: 1,\n}) {\n /** Minimum scale value */\n @property({type: Number}) minValue = 0;\n /** Maximum scale value */\n @property({type: Number}) maxValue = 100;\n\n private readonly height = 384;\n private readonly paddingTop = CHART_DIMENSIONS.CANVAS_PADDING;\n private readonly paddingBottom = CHART_DIMENSIONS.CANVAS_PADDING;\n\n /** Which side of the chart area this scale lives on (left or right) */\n @property({type: String}) side: ExternalScaleSide = ExternalScaleSide.right;\n\n /**\n * When true, freezes all internal calculations and scales the entire component\n * proportionally (like CSS transform:scale), except label font-size remains constant.\n * When false (default), dimensions react to component properties.\n *\n * This property is intentionally not exposed as a public API or Storybook control.\n * It can be set programmatically by parent components (e.g., GaugeTrend).\n */\n fixedAspectRatio = false;\n\n /**\n * Reference size for proportional scaling when fixedAspectRatio is true.\n * At this height, the scale renders at native 1:1 (matches Figma design).\n * Above this height, the scale grows proportionally; below, it shrinks.\n * @default 384\n */\n scaleReferenceSize = 384;\n\n @state()\n private _scale = 1;\n\n // ResizeController automatically subscribes/unsubscribes based on component lifecycle\n // @ts-expect-error - Controller is used for side effects, not accessed directly\n private _resizeController = new ResizeController(this, {\n callback: (entries) => {\n if (!this.fixedAspectRatio) return;\n\n const entry = entries[0];\n if (!entry) return;\n\n // Use the centralized function that computes scale based on reference size\n // For vertical scales, compare container height to reference size\n const containerMainAxisSize = entry.contentRect.height;\n\n const scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.vertical,\n containerMainAxisSize,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n // Guard against zero-sized containers, but allow fractional scales < 1\n this._scale = scale > 0 ? scale : 1;\n\n // Report scaled dimensions to parent chart\n this.reportDimensions();\n },\n });\n\n /** Show numerical value labels at primary tickmarks */\n @property({type: Boolean, attribute: false}) showLabels = true;\n private readonly barThickness = 48;\n private readonly tickThickness = 24;\n private readonly labelThickness = 60;\n\n /** Array of values for main tickmarks. When undefined, no main tickmarks shown. When empty array [], defaults to [minValue, 0, maxValue]. */\n @property({type: Array, attribute: false}) mainTickmarks?: number[] = [];\n /** Interval for primary (longest) tickmarks with labels */\n @property({type: Number}) primaryTickmarkInterval?: number = undefined;\n /** Interval for secondary (medium) tickmarks */\n @property({type: Number}) secondaryTickmarkInterval?: number = undefined;\n /** Interval for tertiary (shortest) tickmarks */\n @property({type: Number}) tertiaryTickmarkInterval?: number = undefined;\n private readonly scaleType: ScaleType = ScaleType.regular;\n private readonly frameStyle: FrameStyle = FrameStyle.regular;\n /** Border radius position based on component layout */\n @property({type: String, attribute: false})\n borderRadiusPosition?: BorderRadiusPosition =\n BorderRadiusPosition.innerFirstChild;\n\n private readonly borderRadius = 8;\n\n private get hasBar(): boolean {\n return true;\n }\n\n private get scaleBackground(): boolean {\n return true;\n }\n\n private get hasScale(): boolean {\n return true;\n }\n\n /** Color priority: enhanced uses blue instrument colors for bar fill and setpoint */\n @property({type: String}) priority: Priority = Priority.regular;\n /** Fill visualization mode: 'fill' shows bar from fillMin to fillMax; 'tint' adds a marker at the value position */\n @property({type: String}) fillMode: FillMode = FillMode.fill;\n /** Minimum fill value (defaults to 0) */\n @property({type: Number}) fillMin?: number = undefined;\n /** Maximum fill value (defaults to value) */\n @property({type: Number}) fillMax?: number = undefined;\n /** Current value (bar fill level) */\n @property({type: Number}) value?: number = undefined;\n\n /** Instrument state: active, loading, or off */\n @property({type: String}) state: InstrumentState = InstrumentState.active;\n\n /**\n * @deprecated Use `touching` (from SetpointMixin) instead.\n * Kept for backward compatibility. Synced to `touching` in `willUpdate()`.\n */\n @property({type: Boolean}) focused = false;\n\n private readonly advicePosition: AdvicePosition = AdvicePosition.inner;\n /** Advice/alert overlays with min, max, type, and hinted state. When undefined or empty, no advice shown. */\n @property({type: Array, attribute: false}) advices?: LinearAdvice[] = [];\n\n /**\n * When true, displays a dot indicator at the current value position.\n * The dot is rendered in the scale band, touching its inner edge (towards the chart).\n * This provides an alternative to bar fill for highlighting the current value.\n * @default false\n */\n @property({type: Boolean}) highlightCurrentValue = false;\n\n override render() {\n const config: ExternalScaleConfig = {\n orientation: ExternalScaleOrientation.vertical,\n side: this.side,\n length: this.height,\n paddingStart: this.paddingTop,\n paddingEnd: this.paddingBottom,\n minValue: this.minValue,\n maxValue: this.maxValue,\n hasScale: this.hasScale,\n labels: this.showLabels,\n hasBar: this.hasBar,\n scaleBackground: this.scaleBackground,\n barThickness: this.barThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n mainTickmarks: this.mainTickmarks,\n primaryTickmarkInterval: this.primaryTickmarkInterval,\n secondaryTickmarkInterval: this.secondaryTickmarkInterval,\n tertiaryTickmarkInterval: this.tertiaryTickmarkInterval,\n scaleType: this.scaleType,\n frameStyle: this.frameStyle,\n borderRadiusPosition: this.borderRadiusPosition,\n borderRadius: this.borderRadius,\n priority: this.priority,\n fillMode: this.fillMode,\n fillMin: this.fillMin,\n fillMax: this.fillMax,\n value: this.value,\n setpoint: this.setpoint,\n newSetpoint: this.newSetpoint,\n atSetpoint: this.atSetpoint,\n autoAtSetpoint: this.autoAtSetpoint,\n autoAtSetpointDeadband: this.autoAtSetpointDeadband,\n setpointAtZeroDeadband: this.setpointAtZeroDeadband,\n animateSetpoint: this.animateSetpoint,\n departingNewSetpoint: this.departingNewSetpoint,\n state: this.state,\n touching: this.touching,\n setpointOverride: this.setpointOverride,\n advicePosition: this.advicePosition,\n advices: this.advices as ExternalScaleAdvice[],\n fixedAspectRatio: this.fixedAspectRatio,\n // Gauges are always in instrument mode - they use fixed borderRadius (8px)\n // and don't respond to .obc-component-size-* CSS classes for border radius\n instrumentMode: true,\n highlightCurrentValue: this.highlightCurrentValue,\n };\n\n const layout = computeExternalScaleLayout(\n toExternalScaleLayoutConfig(config)\n );\n\n const parts = renderExternalScale(config);\n\n const viewBox = computeExternalScaleViewBox(\n {orientation: config.orientation, length: this.height},\n layout\n );\n const preserveAspectRatio = this.fixedAspectRatio\n ? 'xMidYMid meet'\n : 'none';\n\n return html`\n <svg\n width=${this.fixedAspectRatio ? '100%' : `${viewBox.width}px`}\n height=${this.fixedAspectRatio ? '100%' : `${this.height}px`}\n viewBox=\"${viewBox.x} ${viewBox.y} ${viewBox.width} ${viewBox.height}\"\n preserveAspectRatio=\"${preserveAspectRatio}\"\n style=\"--scale: ${this.fixedAspectRatio ? this._scale : 1};\"\n part=\"svg\"\n >\n ${parts.barContainer} ${parts.barFill} ${parts.scaleBackground}\n ${parts.tickmarks} ${parts.labels} ${parts.adviceOverlays}\n ${parts.currentValueDot} ${parts.setpoint}\n </svg>\n `;\n }\n\n override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n\n // Sync deprecated alias to mixin property\n // Only sync if the alias was set and the mixin property was NOT also set.\n if (changed.has('focused') && !changed.has('touching')) {\n this.touching = this.focused;\n }\n }\n\n override updated(changed: PropertyValues) {\n super.updated(changed);\n\n // Report dimensions to parent chart\n // In fixedAspectRatio mode, we report after resize events trigger _scale updates\n // In regular mode, only emit when layout-affecting properties change\n // Setpoint presence changes the reported thickness (reserved marker band),\n // so it must re-report in both aspect-ratio modes.\n if (\n (!this.fixedAspectRatio &&\n (changed.has('side') || changed.has('showLabels'))) ||\n this.setpointPresenceChanged(changed)\n ) {\n this.reportDimensions();\n }\n }\n\n /**\n * Report scale dimensions to parent chart component.\n * Always reports unscaled/reference dimensions so the parent chart can apply\n * consistent proportional scaling in fixedAspectRatioScaling mode.\n */\n private reportDimensions() {\n const effectiveBarThickness = computeExternalScaleEffectiveBarThickness({\n hasBar: this.hasBar,\n barThickness: this.barThickness,\n borderRadius: this.borderRadius,\n scaleType: this.scaleType,\n });\n\n const baseDimensions = computeScaleDimensionsForReport({\n orientation: ExternalScaleOrientation.vertical,\n side: this.side,\n hasBar: this.hasBar,\n hasScale: this.hasScale,\n labels: this.showLabels,\n barThickness: effectiveBarThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n length: this.height,\n scaleType: this.scaleType,\n hasSetpoint:\n this.setpoint !== undefined ||\n this.newSetpoint !== undefined ||\n this.departingNewSetpoint !== undefined,\n });\n\n // Always report unscaled/reference dimensions.\n // The parent chart component handles proportional scaling consistently\n // for both external scales and chart padding in fixedAspectRatioScaling mode.\n const dimensions = baseDimensions;\n\n // console.debug(`[obc-gauge-vertical] Reporting dimensions:`, {\n // side: this.side,\n // thickness: dimensions.thickness,\n // height: this.height,\n // hasBar: this.hasBar,\n // hasScale: this.hasScale,\n // labels: this.labels,\n // fixedAspectRatio: this.fixedAspectRatio,\n // scale: this._scale,\n // });\n\n this.dispatchEvent(\n new CustomEvent('scale-dimensions-changed', {\n detail: dimensions,\n bubbles: true,\n composed: true,\n })\n );\n }\n\n protected override createRenderRoot() {\n return this;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-gauge-vertical': ObcGaugeVertical;\n }\n}\n"],"names":[],"mapp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AAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GA/Hd,iBA+HgB,WAAA,yBAAA,CAAA;AA/HhB,mBAAN,gBAAA;AAAA,EADN,cAAc,oBAAoB;AAAA,GACtB,gBAAA;"}
1
+ {"version":3,"file":"gauge-vertical.js","sources":["../../../src/navigation-instruments/gauge-vertical/gauge-vertical.ts"],"sourcesContent":["import {LitElement, html} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport type {PropertyValues} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport {ResizeController} from '@lit-labs/observers/resize-controller.js';\nimport {CHART_DIMENSIONS} from '../../charthelpers/constants.js';\nimport {\n InstrumentState,\n FrameStyle,\n BorderRadiusPosition,\n Priority,\n} from '../types.js';\nimport type {\n ExternalScaleAdvice,\n ExternalScaleConfig,\n} from '../../building-blocks/external-scale/external-scale.js';\nimport {\n computeExternalScaleViewBox,\n computeFixedAspectRatioScale,\n computeExternalScaleLayout,\n renderExternalScale,\n toExternalScaleLayoutConfig,\n computeScaleDimensionsForReport,\n computeExternalScaleEffectiveBarThickness,\n ScaleType,\n FillMode,\n AdvicePosition,\n ExternalScaleOrientation,\n ExternalScaleSide,\n} from '../../building-blocks/external-scale/external-scale.js';\nimport {SetpointMixin} from '../../svghelpers/setpoint-mixin.js';\nimport type {LinearAdvice} from '../../building-blocks/instrument-linear/advice.js';\n\n// Re-export shared enums for convenience\nexport {\n ScaleType,\n FillMode,\n AdvicePosition,\n FrameStyle,\n BorderRadiusPosition,\n InstrumentState,\n ExternalScaleSide,\n};\n\n/**\n * `<obc-gauge-vertical>` – A vertical gauge component with bar and scale background.\n *\n * Use `obc-gauge-vertical` when you need a standalone vertical gauge with a visible scale\n * and bar. This is ideal for displaying single values like tank levels, pressure, or\n * temperature where the scale context is always needed.\n *\n * This is the same as `obc-bar-vertical` (both use `external-scale.ts`)\n * but with several properties fixed for consistent gauge appearance.\n * Unlike `obc-bar-vertical`, this component always shows the bar and scale background.\n *\n * ---\n *\n * ### Features\n * - **Fixed Layout:** Height (384px), padding (32px), bar/tick/label thicknesses, and border radius are fixed for consistent gauge appearance.\n * - **Scale Configuration:**\n * - Configurable `minValue` and `maxValue` for the value range.\n * - Optional main, primary, secondary, and tertiary tickmarks at specified intervals.\n * - Labels shown at primary tickmark intervals (controlled via `showLabels`).\n * - **Side Positioning:** Can be placed on the `left` or `right` side via the `side` property.\n * - **Value Display:**\n * - `value` property drives the bar fill.\n * - `fillMode` controls visualization: `fill` shows bar from `fillMin` to `fillMax`; `tint` adds a marker at the `value` position.\n * - Set `priority` to `Priority.enhanced` to use the blue/enhanced color palette for bar fill and setpoint (default: `Priority.regular`).\n * - **Setpoint Marker:**\n * - Optional `setpoint` value displays a marker.\n * - Automatic at-setpoint detection with configurable deadband.\n * - **Advice Overlays:** Render advice ranges with different types and hinted states.\n * - **Fixed Aspect Ratio:** When enabled, scales the component proportionally while keeping label font-size constant.\n * - **Dimension Reporting:** Dispatches `scale-dimensions-changed` events for parent chart integration.\n *\n * ---\n *\n * ### Fixed Properties (not configurable)\n * - `height`: 384px\n * - `paddingTop`/`paddingBottom`: 32px (`CHART_DIMENSIONS.CANVAS_PADDING`)\n * - `barThickness`: 48px\n * - `tickThickness`: 24px\n * - `labelThickness`: 60px\n * - `borderRadius`: 8px (matches obc-component-size-medium)\n * - `scaleType`: regular\n * - `frameStyle`: regular\n * - `hasBar`: true\n * - `hasScale`: true\n * - `scaleBackground`: true\n * - `fixedAspectRatio`: true (always scales proportionally)\n *\n * ---\n *\n * ### Implementation\n * This is a higher fidelity implementation of the concept shown in `instrument-linear.ts`,\n * providing a complete gauge with container, scale background, tickmarks, labels, advice overlays, and setpoint marker.\n *\n * This is a thin web-component wrapper around the pure SVG building-block renderer in `external-scale.ts`.\n * It sets up the outer `<svg>`/`viewBox` for a vertical scale and delegates rendering/layout to:\n * - `computeExternalScaleLayout(...)`\n * - `renderExternalScale(config)`\n *\n * For renderer documentation see: **Building Blocks/External Scale**.\n *\n * For a version where these properties are user-configurable, see **Bars and Graphs/Bar Vertical**.\n *\n * ---\n *\n * ### Events\n * - `scale-dimensions-changed` – Fired when layout-affecting properties (`side`, `showLabels`) change, reporting dimensions to parent chart components.\n *\n * ---\n *\n * ### Example\n *\n * ```html\n * <obc-gauge-vertical\n * min-value=\"0\"\n * max-value=\"100\"\n * value=\"75\"\n * primary-tickmark-interval=\"20\"\n * secondary-tickmark-interval=\"10\"\n * setpoint=\"80\"\n * side=\"right\"\n * ></obc-gauge-vertical>\n * ```\n *\n * @fires {CustomEvent} scale-dimensions-changed - Fired when layout-affecting properties change, providing dimension info for parent chart integration.\n * @stable\n */\n@customElement('obc-gauge-vertical')\nexport class ObcGaugeVertical extends SetpointMixin(LitElement, {\n defaultDeadband: 1,\n}) {\n /** Minimum scale value */\n @property({type: Number}) minValue = 0;\n /** Maximum scale value */\n @property({type: Number}) maxValue = 100;\n\n private readonly height = 384;\n private readonly paddingTop = CHART_DIMENSIONS.CANVAS_PADDING;\n private readonly paddingBottom = CHART_DIMENSIONS.CANVAS_PADDING;\n\n /** Which side of the chart area this scale lives on (left or right) */\n @property({type: String}) side: ExternalScaleSide = ExternalScaleSide.right;\n\n /**\n * When true, freezes all internal calculations and scales the entire component\n * proportionally (like CSS transform:scale), except label font-size remains constant.\n * When false (default), dimensions react to component properties.\n *\n * This property is intentionally not exposed as a public API or Storybook control.\n * It can be set programmatically by parent components (e.g., GaugeTrend).\n */\n fixedAspectRatio = false;\n\n /**\n * Reference size for proportional scaling when fixedAspectRatio is true.\n * At this height, the scale renders at native 1:1 (matches Figma design).\n * Above this height, the scale grows proportionally; below, it shrinks.\n * @default 384\n */\n scaleReferenceSize = 384;\n\n @state()\n private _scale = 1;\n\n // ResizeController automatically subscribes/unsubscribes based on component lifecycle\n // @ts-expect-error - Controller is used for side effects, not accessed directly\n private _resizeController = new ResizeController(this, {\n callback: (entries) => {\n if (!this.fixedAspectRatio) return;\n\n const entry = entries[0];\n if (!entry) return;\n\n // Use the centralized function that computes scale based on reference size\n // For vertical scales, compare container height to reference size\n const containerMainAxisSize = entry.contentRect.height;\n\n const scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.vertical,\n containerMainAxisSize,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n // Guard against zero-sized containers, but allow fractional scales < 1\n this._scale = scale > 0 ? scale : 1;\n\n // Report scaled dimensions to parent chart\n this.reportDimensions();\n },\n });\n\n /** Show numerical value labels at primary tickmarks */\n @property({type: Boolean, attribute: false}) showLabels = true;\n private readonly barThickness = 48;\n private readonly tickThickness = 24;\n private readonly labelThickness = 60;\n\n /** Array of values for main tickmarks. When undefined, no main tickmarks shown. When empty array [], defaults to [minValue, 0, maxValue]. */\n @property({type: Array, attribute: false}) mainTickmarks?: number[] = [];\n /** Interval for primary (longest) tickmarks with labels */\n @property({type: Number}) primaryTickmarkInterval?: number = undefined;\n /** Interval for secondary (medium) tickmarks */\n @property({type: Number}) secondaryTickmarkInterval?: number = undefined;\n /** Interval for tertiary (shortest) tickmarks */\n @property({type: Number}) tertiaryTickmarkInterval?: number = undefined;\n private readonly scaleType: ScaleType = ScaleType.regular;\n private readonly frameStyle: FrameStyle = FrameStyle.regular;\n /** Border radius position based on component layout */\n @property({type: String, attribute: false})\n borderRadiusPosition?: BorderRadiusPosition =\n BorderRadiusPosition.innerFirstChild;\n\n private readonly borderRadius = 8;\n\n private get hasBar(): boolean {\n return true;\n }\n\n private get scaleBackground(): boolean {\n return true;\n }\n\n private get hasScale(): boolean {\n return true;\n }\n\n /** Color priority: enhanced uses blue instrument colors for bar fill and setpoint */\n @property({type: String}) priority: Priority = Priority.regular;\n /** Fill visualization mode: 'fill' shows bar from fillMin to fillMax; 'tint' adds a marker at the value position */\n @property({type: String}) fillMode: FillMode = FillMode.fill;\n /** Minimum fill value (defaults to 0) */\n @property({type: Number}) fillMin?: number = undefined;\n /** Maximum fill value (defaults to value) */\n @property({type: Number}) fillMax?: number = undefined;\n /** Current value (bar fill level) */\n @property({type: Number}) value?: number = undefined;\n\n /** Instrument state: active, loading, or off */\n @property({type: String}) state: InstrumentState = InstrumentState.active;\n\n /**\n * @deprecated Use `touching` (from SetpointMixin) instead.\n * Kept for backward compatibility. Synced to `touching` in `willUpdate()`.\n */\n @property({type: Boolean}) focused = false;\n\n private readonly advicePosition: AdvicePosition = AdvicePosition.inner;\n /** Advice/alert overlays with min, max, type, and hinted state. When undefined or empty, no advice shown. */\n @property({type: Array, attribute: false}) advices?: LinearAdvice[] = [];\n\n /**\n * When true, displays a dot indicator at the current value position.\n * The dot is rendered in the scale band, touching its inner edge (towards the chart).\n * This provides an alternative to bar fill for highlighting the current value.\n * @default false\n */\n @property({type: Boolean}) highlightCurrentValue = false;\n\n override render() {\n const config: ExternalScaleConfig = {\n orientation: ExternalScaleOrientation.vertical,\n side: this.side,\n length: this.height,\n paddingStart: this.paddingTop,\n paddingEnd: this.paddingBottom,\n minValue: this.minValue,\n maxValue: this.maxValue,\n hasScale: this.hasScale,\n labels: this.showLabels,\n hasBar: this.hasBar,\n scaleBackground: this.scaleBackground,\n barThickness: this.barThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n mainTickmarks: this.mainTickmarks,\n primaryTickmarkInterval: this.primaryTickmarkInterval,\n secondaryTickmarkInterval: this.secondaryTickmarkInterval,\n tertiaryTickmarkInterval: this.tertiaryTickmarkInterval,\n scaleType: this.scaleType,\n frameStyle: this.frameStyle,\n borderRadiusPosition: this.borderRadiusPosition,\n borderRadius: this.borderRadius,\n priority: this.priority,\n fillMode: this.fillMode,\n fillMin: this.fillMin,\n fillMax: this.fillMax,\n value: this.value,\n setpoint: this.setpoint,\n newSetpoint: this.newSetpoint,\n atSetpoint: this.atSetpoint,\n autoAtSetpoint: this.autoAtSetpoint,\n autoAtSetpointDeadband: this.autoAtSetpointDeadband,\n setpointAtZeroDeadband: this.setpointAtZeroDeadband,\n animateSetpoint: this.animateSetpoint,\n departingNewSetpoint: this.departingNewSetpoint,\n state: this.state,\n touching: this.touching,\n setpointOverride: this.setpointOverride,\n advicePosition: this.advicePosition,\n advices: this.advices as ExternalScaleAdvice[],\n fixedAspectRatio: this.fixedAspectRatio,\n // Gauges are always in instrument mode - they use fixed borderRadius (8px)\n // and don't respond to .obc-component-size-* CSS classes for border radius\n instrumentMode: true,\n highlightCurrentValue: this.highlightCurrentValue,\n };\n\n const layout = computeExternalScaleLayout(\n toExternalScaleLayoutConfig(config)\n );\n\n const parts = renderExternalScale(config);\n\n const viewBox = computeExternalScaleViewBox(\n {orientation: config.orientation, length: this.height},\n layout\n );\n const preserveAspectRatio = this.fixedAspectRatio\n ? 'xMidYMid meet'\n : 'none';\n\n return html`\n <svg\n width=${this.fixedAspectRatio ? '100%' : `${viewBox.width}px`}\n height=${this.fixedAspectRatio ? '100%' : `${this.height}px`}\n viewBox=\"${viewBox.x} ${viewBox.y} ${viewBox.width} ${viewBox.height}\"\n preserveAspectRatio=\"${preserveAspectRatio}\"\n style=\"--scale: ${this.fixedAspectRatio\n ? this._scale\n : 1}; display: block;\"\n part=\"svg\"\n >\n ${parts.barContainer} ${parts.barFill} ${parts.scaleBackground}\n ${parts.tickmarks} ${parts.labels} ${parts.adviceOverlays}\n ${parts.currentValueDot} ${parts.setpoint}\n </svg>\n `;\n }\n\n override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n\n // Sync deprecated alias to mixin property\n // Only sync if the alias was set and the mixin property was NOT also set.\n if (changed.has('focused') && !changed.has('touching')) {\n this.touching = this.focused;\n }\n }\n\n override updated(changed: PropertyValues) {\n super.updated(changed);\n\n // Report dimensions to parent chart\n // In fixedAspectRatio mode, we report after resize events trigger _scale updates\n // In regular mode, only emit when layout-affecting properties change\n // Setpoint presence changes the reported thickness (reserved marker band),\n // so it must re-report in both aspect-ratio modes.\n if (\n (!this.fixedAspectRatio &&\n (changed.has('side') || changed.has('showLabels'))) ||\n this.setpointPresenceChanged(changed)\n ) {\n this.reportDimensions();\n }\n }\n\n /**\n * Report scale dimensions to parent chart component.\n * Always reports unscaled/reference dimensions so the parent chart can apply\n * consistent proportional scaling in fixedAspectRatioScaling mode.\n */\n private reportDimensions() {\n const effectiveBarThickness = computeExternalScaleEffectiveBarThickness({\n hasBar: this.hasBar,\n barThickness: this.barThickness,\n borderRadius: this.borderRadius,\n scaleType: this.scaleType,\n });\n\n const baseDimensions = computeScaleDimensionsForReport({\n orientation: ExternalScaleOrientation.vertical,\n side: this.side,\n hasBar: this.hasBar,\n hasScale: this.hasScale,\n labels: this.showLabels,\n barThickness: effectiveBarThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n length: this.height,\n scaleType: this.scaleType,\n hasSetpoint:\n this.setpoint !== undefined ||\n this.newSetpoint !== undefined ||\n this.departingNewSetpoint !== undefined,\n });\n\n // Always report unscaled/reference dimensions.\n // The parent chart component handles proportional scaling consistently\n // for both external scales and chart padding in fixedAspectRatioScaling mode.\n const dimensions = baseDimensions;\n\n // console.debug(`[obc-gauge-vertical] Reporting dimensions:`, {\n // side: this.side,\n // thickness: dimensions.thickness,\n // height: this.height,\n // hasBar: this.hasBar,\n // hasScale: this.hasScale,\n // labels: this.labels,\n // fixedAspectRatio: this.fixedAspectRatio,\n // scale: this._scale,\n // });\n\n this.dispatchEvent(\n new CustomEvent('scale-dimensions-changed', {\n detail: dimensions,\n bubbles: true,\n composed: true,\n })\n );\n }\n\n protected override createRenderRoot() {\n return this;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-gauge-vertical': ObcGaugeVertical;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAmIO,IAAM,mBAAN,cAA+B,cAAc,YAAY;AAAA,EAC9D,iBAAiB;AACnB,CAAC,EAAE;AAAA,EAFI,cAAA;AAAA,UAAA,GAAA,SAAA;AAIqB,SAAA,WAAW;AAEX,SAAA,WAAW;AAErC,SAAiB,SAAS;AAC1B,SAAiB,aAAa,iBAAiB;AAC/C,SAAiB,gBAAgB,iBAAiB;AAGxB,SAAA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