@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.119 → 2.0.0-next.121

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 (51) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +118 -14
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +45 -1
  4. package/dist/components/alert-button/alert-button.d.ts +3 -0
  5. package/dist/components/alert-button/alert-button.d.ts.map +1 -1
  6. package/dist/components/alert-button/alert-button.js +12 -0
  7. package/dist/components/alert-button/alert-button.js.map +1 -1
  8. package/dist/components/alert-frame/alert-frame.css.js +1 -0
  9. package/dist/components/alert-frame/alert-frame.css.js.map +1 -1
  10. package/dist/components/alert-frame/alert-frame.d.ts +5 -0
  11. package/dist/components/alert-frame/alert-frame.d.ts.map +1 -1
  12. package/dist/components/alert-frame/alert-frame.js +24 -0
  13. package/dist/components/alert-frame/alert-frame.js.map +1 -1
  14. package/dist/components/alert-icon/alert-icon.d.ts +5 -0
  15. package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
  16. package/dist/components/alert-icon/alert-icon.js +26 -0
  17. package/dist/components/alert-icon/alert-icon.js.map +1 -1
  18. package/dist/integration-systems/integration-button/integration-button.css.js +20 -13
  19. package/dist/integration-systems/integration-button/integration-button.css.js.map +1 -1
  20. package/dist/integration-systems/integration-button/integration-button.d.ts +1 -1
  21. package/dist/integration-systems/integration-button/integration-button.js +1 -1
  22. package/dist/integration-systems/integration-button/integration-button.js.map +1 -1
  23. package/dist/integration-systems/integration-dropdown-button/integration-dropdown-button.css.js +1 -0
  24. package/dist/integration-systems/integration-dropdown-button/integration-dropdown-button.css.js.map +1 -1
  25. package/dist/openbridge.css +0 -73
  26. package/dist/palettes/blinking.d.ts +6 -0
  27. package/dist/palettes/blinking.d.ts.map +1 -0
  28. package/dist/palettes/blinking.js +44 -0
  29. package/dist/palettes/blinking.js.map +1 -0
  30. package/package.json +4 -2
  31. package/script/agent-docs/emitters.ts +189 -0
  32. package/script/agent-docs/frontmatter.ts +118 -0
  33. package/script/check-slot-event-docs.ts +2 -2
  34. package/script/sync-agent-docs.test.ts +298 -0
  35. package/script/sync-agent-docs.ts +156 -0
  36. package/src/components/alert-button/alert-button.spec.ts +58 -0
  37. package/src/components/alert-button/alert-button.ts +16 -0
  38. package/src/components/alert-frame/alert-frame.css +1 -0
  39. package/src/components/alert-frame/alert-frame.spec.ts +122 -0
  40. package/src/components/alert-frame/alert-frame.stories.ts +12 -0
  41. package/src/components/alert-frame/alert-frame.ts +37 -0
  42. package/src/components/alert-icon/alert-icon.spec.ts +76 -0
  43. package/src/components/alert-icon/alert-icon.ts +38 -0
  44. package/src/icons/AGENTS.md +6 -0
  45. package/src/integration-systems/integration-button/integration-button.css +20 -13
  46. package/src/integration-systems/integration-button/integration-button.stories.ts +70 -44
  47. package/src/integration-systems/integration-button/integration-button.ts +2 -2
  48. package/src/integration-systems/integration-dropdown-button/integration-dropdown-button.css +1 -0
  49. package/src/palettes/blinking.ts +46 -0
  50. package/src/palettes/manual.css +0 -42
  51. package/src/palettes/variables.css +0 -36
@@ -42211,6 +42211,19 @@
42211
42211
  },
42212
42212
  "privacy": "private",
42213
42213
  "readonly": true
42214
+ },
42215
+ {
42216
+ "kind": "field",
42217
+ "name": "_blinkAnimationCancel",
42218
+ "type": {
42219
+ "text": "() => void | undefined"
42220
+ },
42221
+ "privacy": "private"
42222
+ },
42223
+ {
42224
+ "kind": "method",
42225
+ "name": "installBlinking",
42226
+ "privacy": "private"
42214
42227
  }
42215
42228
  ],
42216
42229
  "events": [
@@ -42680,6 +42693,19 @@
42680
42693
  },
42681
42694
  "default": "true"
42682
42695
  },
42696
+ {
42697
+ "kind": "field",
42698
+ "name": "_blinkAnimationCancel",
42699
+ "type": {
42700
+ "text": "() => void | undefined"
42701
+ },
42702
+ "privacy": "private"
42703
+ },
42704
+ {
42705
+ "kind": "method",
42706
+ "name": "syncBlinking",
42707
+ "privacy": "private"
42708
+ },
42683
42709
  {
42684
42710
  "kind": "method",
42685
42711
  "name": "flap",
@@ -42932,6 +42958,24 @@
42932
42958
  "text": "TemplateResult | typeof nothing"
42933
42959
  }
42934
42960
  }
42961
+ },
42962
+ {
42963
+ "kind": "field",
42964
+ "name": "_blinkAnimationCancel",
42965
+ "type": {
42966
+ "text": "() => void | undefined"
42967
+ },
42968
+ "privacy": "private"
42969
+ },
42970
+ {
42971
+ "kind": "method",
42972
+ "name": "syncBlinking",
42973
+ "privacy": "private",
42974
+ "return": {
42975
+ "type": {
42976
+ "text": "void"
42977
+ }
42978
+ }
42935
42979
  }
42936
42980
  ],
42937
42981
  "attributes": [
@@ -73218,7 +73262,7 @@
73218
73262
  "name": "ObcIntegrationButton",
73219
73263
  "slots": [
73220
73264
  {
73221
- "description": "Icon before label (shown when `hasLeadingIcon` is true)",
73265
+ "description": "Icon before label (shown when `hasLeadingIcon` is true); rendered at the large icon size when `hasStatus` is true",
73222
73266
  "name": "leading-icon"
73223
73267
  },
73224
73268
  {
@@ -180,6 +180,9 @@ export declare class ObcAlertButton extends LitElement {
180
180
  private alertIconNegative;
181
181
  private get activeType();
182
182
  private get showSilenceButtonDynamic();
183
+ private _blinkAnimationCancel?;
184
+ private installBlinking;
185
+ updated(): void;
183
186
  render(): import('lit-html').TemplateResult<1>;
184
187
  static styles: import('lit').CSSResult;
185
188
  }
@@ -1 +1 @@
1
- {"version":3,"file":"alert-button.d.ts","sourceRoot":"","sources":["../../../src/components/alert-button/alert-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAGzD,OAAO,4BAA4B,CAAC;AACpC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,yCAAyC,CAAC;AACjD,OAAO,gDAAgD,CAAC;AACxD,OAAO,iCAAiC,CAAC;AACzC,OAAO,0CAA0C,CAAC;AAClD,OAAO,4CAA4C,CAAC;AACpD,OAAO,4CAA4C,CAAC;AACpD,OAAO,mDAAmD,CAAC;AAC3D,OAAO,qDAAqD,CAAC;AAC7D,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AASzC;;;;;;GAMG;AACH,oBAAY,kBAAkB;IAC5B,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH,qBACa,cAAe,SAAQ,UAAU;IAC5C;;;;OAIG;IACuB,OAAO,SAAK;IAEtC;;;;OAIG;IACuB,SAAS,CAAC,EAAE,SAAS,CAAC;IAEhD;;;;;;OAMG;IACuB,IAAI,qBAA6B;IAE3D;;;;OAIG;IACwB,KAAK,UAAS;IAEzC;;;;OAIG;IACwB,iBAAiB,UAAS;IAErD;;;;OAIG;IACwB,qBAAqB,UAAS;IAEzD;;;;OAIG;IACwB,OAAO,UAAS;IAE3C;;;;OAIG;IACwB,QAAQ,UAAS;IAE5C;;;;;;;OAOG;IACuB,mBAAmB,SAAK;IAElD;;;;;;;OAOG;IACuB,4BAA4B,SAAK;IAElD,OAAO,CAAC,KAAK,CAAqB;IAE3C,OAAO,CAAC,cAAc,CAEpB;IAEO,iBAAiB;IAKjB,oBAAoB;IAK7B,OAAO,CAAC,sBAAsB;IAiC9B,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,iBAAiB;IASzB,OAAO,KAAK,UAAU,GAQrB;IAED,OAAO,KAAK,wBAAwB,GAMnC;IAEQ,MAAM;IA2Df,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
1
+ {"version":3,"file":"alert-button.d.ts","sourceRoot":"","sources":["../../../src/components/alert-button/alert-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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AwB,GAMnC;IAED,OAAO,CAAC,qBAAqB,CAAC,CAAa;IAE3C,OAAO,CAAC,eAAe;IAKd,OAAO;IAIP,MAAM;IA2Df,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -15,6 +15,7 @@ import "../../manual-icon/icon-alerts-diagnostic-twotone.js";
15
15
  import { getAlertTwotoneComponent, AlertTwotoneComponent, supportsBlinking } from "../../alert-severity.js";
16
16
  import { classMap } from "lit/directives/class-map.js";
17
17
  import { customElement } from "../../decorator.js";
18
+ import { blinkingAll } from "../../palettes/blinking.js";
18
19
  var __defProp = Object.defineProperty;
19
20
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
20
21
  var __decorateClass = (decorators, target, key, kind) => {
@@ -51,9 +52,13 @@ let ObcAlertButton = class extends LitElement {
51
52
  connectedCallback() {
52
53
  super.connectedCallback();
53
54
  window.addEventListener("resize", this.resizeListener);
55
+ if (this.hasUpdated) {
56
+ this.installBlinking();
57
+ }
54
58
  }
55
59
  disconnectedCallback() {
56
60
  window.removeEventListener("resize", this.resizeListener);
61
+ this._blinkAnimationCancel?.();
57
62
  super.disconnectedCallback();
58
63
  }
59
64
  renderAlertTwotoneIcon() {
@@ -115,6 +120,13 @@ let ObcAlertButton = class extends LitElement {
115
120
  get showSilenceButtonDynamic() {
116
121
  return this.showSilenceButton && this.width >= this.silenceButtonMinBreakpointPx && this.activeType !== "flat";
117
122
  }
123
+ installBlinking() {
124
+ this._blinkAnimationCancel?.();
125
+ this._blinkAnimationCancel = blinkingAll(this);
126
+ }
127
+ updated() {
128
+ this.installBlinking();
129
+ }
118
130
  render() {
119
131
  const hasAlerts = this.nAlerts > 0;
120
132
  const showCounter = this.counter && hasAlerts && this.activeType !== "flat";
@@ -1 +1 @@
1
- {"version":3,"file":"alert-button.js","sources":["../../../src/components/alert-button/alert-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport compentStyle from './alert-button.css?inline';\nimport '../../icons/icon-alerts.js';\nimport '../../icons/icon-alerts-active.js';\nimport '../../icons/icon-notification.js';\nimport '../../icons/icon-notification-advice.js';\nimport '../../icons/icon-notification-advice-active.js';\nimport '../../icons/icon-silence-iec.js';\nimport '../../icons/icon-alerts-alarm-twotone.js';\nimport '../../icons/icon-alerts-warning-twotone.js';\nimport '../../icons/icon-alerts-caution-twotone.js';\nimport '../../manual-icon/icon-alerts-critical-twotone.js';\nimport '../../manual-icon/icon-alerts-diagnostic-twotone.js';\nimport {AlertType} from '../../types.js';\nimport {\n getAlertTwotoneComponent,\n AlertTwotoneComponent,\n supportsBlinking,\n} from '../../alert-severity.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\n\n/**\n * `ObcAlertButtonType` – Enum for alert button visual and behavioral variants.\n *\n * - `flat`: Minimal, icon-only button for compact spaces.\n * - `normal`: Standard button with icon and optional counter.\n * - `enhanced`: Emphasized button with additional styling for high-priority alerts.\n */\nexport enum ObcAlertButtonType {\n Flat = 'flat',\n Normal = 'normal',\n Enhanced = 'enhanced',\n}\n\n/**\n * `<obc-alert-button>` – A compact, icon-based button for displaying alert or notification status and count.\n *\n * This component provides a visual indicator for active alerts or notifications, supporting different alert types (such as alarm, warning, or caution) and an optional counter badge. It can also include a secondary \"silence\" action button for muting alerts, adapting its layout responsively for different screen widths.\n *\n * Appears in toolbars or notification areas to give users a quick overview of alert status and provide direct access to alert-related actions.\n *\n * ## Features\n *\n * - **Variants:**\n * - **Flat:** Minimal, icon-only button for space-constrained layouts.\n * - **Normal:** Standard button with icon and optional alert counter.\n * - **Enhanced:** Visually prominent button for high-priority alerts, with accent styling.\n * - **Alert Types:** Supports `alarm`, `warning`, `caution`, or no alert (idle). Icon and color adapt to the alert type.\n * - **Alert Counter:** Optional badge displays the number of active alerts (except in flat mode).\n * - **Silence Button:** Optional secondary button to mute or silence alerts, shown when enabled and at sufficient width.\n * - **Blinking Animation:** Can animate (blink) to draw attention to active alerts (except for caution type).\n * - **Responsive Layout:** Automatically switches to flat mode below a configurable width, and hides the silence button below another configurable width.\n * - **Large Size Option:** Increases button height and padding for touch-friendly or prominent use.\n *\n * ## Usage Guidelines\n *\n * Use `<obc-alert-button>` to provide a persistent, easily accessible indicator of alert or notification status. Ideal for toolbars, headers, or notification panels where users need to be aware of active alerts and may need to silence them quickly.\n *\n * - Use the counter to show the number of active alerts when relevant.\n * - Use the silence button to provide a quick mute action, but only when space allows.\n * - Choose the variant (`flat`, `normal`, `enhanced`) based on available space and the importance of the alert.\n * - The blinking feature should be reserved for urgent or high-priority alerts to avoid unnecessary distraction.\n *\n * **TODO(designer):** Confirm if there are recommended default behaviors for auto-blinking, and if there are any design constraints for when to use each variant.\n *\n * ## Properties\n *\n * - `nAlerts` (number): Number of active alerts to display in the counter badge.\n * - `alertType` (`AlertType`): Type of alert (`alarm`, `warning`, `caution`, or undefined for idle).\n * - `type` (`ObcAlertButtonType`): Visual variant of the button (`flat`, `normal`, `enhanced`). Default is `normal`.\n * - `counter` (boolean): Whether to show the alert counter badge (not available in flat mode).\n * - `showSilenceButton` (boolean): Whether to display the silence button (hidden in flat mode or below min breakpoint).\n * - `silenceButtonDisabled` (boolean): Disables the silence button when true.\n * - `flatMaxBreakpointPx` (number): Maximum width (in px) for normal/enhanced mode; below this, switches to flat mode.\n * - `silenceButtonMinBreakpointPx` (number): Minimum width (in px) to show the silence button; below this, it is hidden.\n * - `blinking` (boolean): Enables blinking animation for active alerts (not for caution type).\n * - `large` (boolean): Increases button size for prominent or touch-friendly use.\n *\n * ## Events\n *\n * - `click-alert` – Fired when the main alert button is clicked.\n * - `click-silence` – Fired when the silence button is clicked.\n *\n * ## Best Practices & Constraints\n *\n * - Only show the counter when there are active alerts and the button is not in flat mode.\n * - The silence button is only visible if enabled, the width is above the minimum breakpoint, and the button is not flat.\n * - Blinking should be used sparingly to avoid overwhelming the user.\n * - Use the large variant for touch interfaces or when the button needs to stand out.\n *\n * ## Example\n *\n * ```html\n * <obc-alert-button\n * nAlerts=\"3\"\n * alertType=\"alarm\"\n * type=\"enhanced\"\n * counter\n * showSilenceButton\n * blinking\n * large\n * flatMaxBreakpointPx=\"600\"\n * silenceButtonMinBreakpointPx=\"600\"\n * ></obc-alert-button>\n * ```\n *\n * In this example, the button shows an alarm icon, a counter badge with \"3\", is styled as enhanced, blinks to indicate urgency, and includes a silence button if the width allows.\n *\n * @slot - No content slots. All content is provided via properties.\n * @fires {CustomEvent<void>} click-alert - Fired when the main alert button is clicked.\n * @fires {CustomEvent<void>} click-silence - Fired when the silence button is clicked.\n * @stable\n */\n@customElement('obc-alert-button')\nexport class ObcAlertButton extends LitElement {\n /**\n * Number of active alerts to display in the counter badge.\n *\n * If set to 0, the button appears in the idle state.\n */\n @property({type: Number}) nAlerts = 0;\n\n /**\n * Type of alert to display.\n *\n * Determines the icon and color scheme. Can be `alarm`, `warning`, `caution`, or undefined for idle state.\n */\n @property({type: String}) alertType?: AlertType;\n\n /**\n * Visual variant of the button.\n *\n * - `flat`: Minimal, icon-only button for compact layouts.\n * - `normal`: Standard button with icon and optional counter (default).\n * - `enhanced`: Emphasized button for high-priority alerts.\n */\n @property({type: String}) type = ObcAlertButtonType.Normal;\n\n /**\n * Increases button size for touch-friendly or prominent use.\n *\n * Adds extra height and padding.\n */\n @property({type: Boolean}) large = false;\n\n /**\n * Whether to display the silence button.\n *\n * The silence button is only shown if this is true, the width is above `silenceButtonMinBreakpointPx`, and the button is not in flat mode.\n */\n @property({type: Boolean}) showSilenceButton = false;\n\n /**\n * Disables the silence button when true.\n *\n * @availableWhen showSilenceButton==true\n */\n @property({type: Boolean}) silenceButtonDisabled = false;\n\n /**\n * Whether to show the alert counter badge.\n *\n * Only shown when there are active alerts and the button is not in flat mode.\n */\n @property({type: Boolean}) counter = false;\n\n /**\n * Enables blinking animation for active alerts.\n *\n * Blinking is only shown for alarm and warning types, not for caution.\n */\n @property({type: Boolean}) blinking = false;\n\n /**\n * Maximum width (in px) for normal/enhanced mode.\n *\n * If the available width is less than this value, the button switches to flat mode.\n * Only applies when `type` is set to `normal` or `enhanced`.\n *\n * @availableWhen type!=flat\n */\n @property({type: Number}) flatMaxBreakpointPx = 0;\n\n /**\n * Minimum width (in px) to show the silence button.\n *\n * If the available width is less than this value, the silence button is hidden.\n * Only applies when `showSilenceButton` is true.\n *\n * @availableWhen showSilenceButton==true\n */\n @property({type: Number}) silenceButtonMinBreakpointPx = 0;\n\n @state() private width = window.innerWidth;\n\n private resizeListener = () => {\n this.width = window.innerWidth;\n };\n\n override connectedCallback() {\n super.connectedCallback();\n window.addEventListener('resize', this.resizeListener);\n }\n\n override disconnectedCallback() {\n window.removeEventListener('resize', this.resizeListener);\n super.disconnectedCallback();\n }\n\n private renderAlertTwotoneIcon() {\n const twotone = this.alertType\n ? getAlertTwotoneComponent(this.alertType)\n : AlertTwotoneComponent.Caution;\n switch (twotone) {\n case AlertTwotoneComponent.Critical:\n return html`<obi-alerts-critical-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-critical-twotone>`;\n case AlertTwotoneComponent.Diagnostic:\n return html`<obi-alerts-diagnostic-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-diagnostic-twotone>`;\n case AlertTwotoneComponent.Warning:\n return html`<obi-alerts-warning-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-warning-twotone>`;\n case AlertTwotoneComponent.Caution:\n return html`<obi-alerts-caution-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-caution-twotone>`;\n default:\n return html`<obi-alerts-alarm-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-alarm-twotone>`;\n }\n }\n\n private alertIcon() {\n const isIdle = this.nAlerts === 0;\n if (isIdle) {\n return html`<obi-alerts class=\"icon\"></obi-alerts>`;\n }\n if (this.type === ObcAlertButtonType.Enhanced) {\n return html`<obi-alerts-active class=\"icon\"></obi-alerts-active>`;\n }\n return this.renderAlertTwotoneIcon();\n }\n\n private alertIconNegative() {\n const useIdle =\n this.nAlerts === 0 || this.type !== ObcAlertButtonType.Enhanced;\n if (useIdle) {\n return html`<obi-alerts class=\"icon\"></obi-alerts>`;\n }\n return this.renderAlertTwotoneIcon();\n }\n\n private get activeType(): ObcAlertButtonType {\n if (this.type === ObcAlertButtonType.Flat) {\n return ObcAlertButtonType.Flat;\n }\n if (this.width < this.flatMaxBreakpointPx) {\n return ObcAlertButtonType.Flat;\n }\n return this.type;\n }\n\n private get showSilenceButtonDynamic(): boolean {\n return (\n this.showSilenceButton &&\n this.width >= this.silenceButtonMinBreakpointPx &&\n this.activeType !== ObcAlertButtonType.Flat\n );\n }\n\n override render() {\n const hasAlerts = this.nAlerts > 0;\n const showCounter =\n this.counter && hasAlerts && this.activeType !== ObcAlertButtonType.Flat;\n const showBlinking =\n this.blinking &&\n hasAlerts &&\n this.alertType !== undefined &&\n supportsBlinking(this.alertType, false);\n return html`\n <div\n class=${classMap({\n wrapper: true,\n [`alert-type-${this.alertType ?? 'none'}`]: true,\n counter: showCounter,\n 'has-silence': this.showSilenceButtonDynamic,\n [`type-${this.activeType}`]: true,\n blinking: showBlinking,\n large: this.large,\n })}\n >\n <button\n class=\"alert-button\"\n @click=${() => this.dispatchEvent(new CustomEvent('click-alert'))}\n >\n ${showBlinking\n ? html` <div class=\"blink\">\n ${this.alertIconNegative()}\n ${showCounter\n ? html`<div class=\"badge\">${this.nAlerts}</div>`\n : null}\n </div>`\n : nothing}\n <div class=\"visible-wrapper\">\n ${this.alertIcon()}\n ${showCounter\n ? html`<div class=\"badge\">${this.nAlerts}</div>`\n : nothing}\n </div>\n </button>\n\n ${this.showSilenceButtonDynamic\n ? html`\n <button\n class=\"silence-button\"\n @click=${() =>\n this.dispatchEvent(new CustomEvent('click-silence'))}\n ?disabled=${this.silenceButtonDisabled}\n >\n <div class=\"visible-wrapper\">\n <obi-silence-iec class=\"icon\"></obi-silence-iec>\n </div>\n </button>\n `\n : null}\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-button': ObcAlertButton;\n }\n}\n"],"names":["ObcAlertButtonType"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BO,IAAK,uCAAAA,wBAAL;AACLA,sBAAA,MAAA,IAAO;AACPA,sBAAA,QAAA,IAAS;AACTA,sBAAA,UAAA,IAAW;AAHD,SAAAA;AAAA,GAAA,sBAAA,CAAA,CAAA;AAsFL,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAAxC,cAAA;AAAA,UAAA,GAAA,SAAA;AAMqB,SAAA,UAAU;AAgBV,SAAA,OAAO;AAON,SAAA,QAAQ;AAOR,SAAA,oBAAoB;AAOpB,SAAA,wBAAwB;AAOxB,SAAA,UAAU;AAOV,SAAA,WAAW;AAUZ,SAAA,sBAAsB;AAUtB,SAAA,+BAA+B;AAEhD,SAAQ,QAAQ,OAAO;AAEhC,SAAQ,iBAAiB,MAAM;AAC7B,WAAK,QAAQ,OAAO;AAAA,IACtB;AAAA,EAAA;AAAA,EAES,oBAAoB;AAC3B,UAAM,kBAAA;AACN,WAAO,iBAAiB,UAAU,KAAK,cAAc;AAAA,EACvD;AAAA,EAES,uBAAuB;AAC9B,WAAO,oBAAoB,UAAU,KAAK,cAAc;AACxD,UAAM,qBAAA;AAAA,EACR;AAAA,EAEQ,yBAAyB;AAC/B,UAAM,UAAU,KAAK,YACjB,yBAAyB,KAAK,SAAS,IACvC,sBAAsB;AAC1B,YAAQ,SAAA;AAAA,MACN,KAAK,sBAAsB;AACzB,eAAO;AAAA;AAAA;AAAA;AAAA,MAIT,KAAK,sBAAsB;AACzB,eAAO;AAAA;AAAA;AAAA;AAAA,MAIT,KAAK,sBAAsB;AACzB,eAAO;AAAA;AAAA;AAAA;AAAA,MAIT,KAAK,sBAAsB;AACzB,eAAO;AAAA;AAAA;AAAA;AAAA,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,eAmEe,WAAA,uBAAA,CAAA;AAUA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA7Eb,eA6Ee,WAAA,gCAAA,CAAA;AAET,gBAAA;AAAA,EAAhB,MAAA;AAAM,GA/EI,eA+EM,WAAA,SAAA,CAAA;AA/EN,iBAAN,gBAAA;AAAA,EADN,cAAc,kBAAkB;AAAA,GACpB,cAAA;"}
1
+ {"version":3,"file":"alert-button.js","sources":["../../../src/components/alert-button/alert-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport compentStyle from './alert-button.css?inline';\nimport '../../icons/icon-alerts.js';\nimport '../../icons/icon-alerts-active.js';\nimport '../../icons/icon-notification.js';\nimport '../../icons/icon-notification-advice.js';\nimport '../../icons/icon-notification-advice-active.js';\nimport '../../icons/icon-silence-iec.js';\nimport '../../icons/icon-alerts-alarm-twotone.js';\nimport '../../icons/icon-alerts-warning-twotone.js';\nimport '../../icons/icon-alerts-caution-twotone.js';\nimport '../../manual-icon/icon-alerts-critical-twotone.js';\nimport '../../manual-icon/icon-alerts-diagnostic-twotone.js';\nimport {AlertType} from '../../types.js';\nimport {\n getAlertTwotoneComponent,\n AlertTwotoneComponent,\n supportsBlinking,\n} from '../../alert-severity.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\nimport {blinkingAll} from '../../palettes/blinking.js';\n\n/**\n * `ObcAlertButtonType` – Enum for alert button visual and behavioral variants.\n *\n * - `flat`: Minimal, icon-only button for compact spaces.\n * - `normal`: Standard button with icon and optional counter.\n * - `enhanced`: Emphasized button with additional styling for high-priority alerts.\n */\nexport enum ObcAlertButtonType {\n Flat = 'flat',\n Normal = 'normal',\n Enhanced = 'enhanced',\n}\n\n/**\n * `<obc-alert-button>` – A compact, icon-based button for displaying alert or notification status and count.\n *\n * This component provides a visual indicator for active alerts or notifications, supporting different alert types (such as alarm, warning, or caution) and an optional counter badge. It can also include a secondary \"silence\" action button for muting alerts, adapting its layout responsively for different screen widths.\n *\n * Appears in toolbars or notification areas to give users a quick overview of alert status and provide direct access to alert-related actions.\n *\n * ## Features\n *\n * - **Variants:**\n * - **Flat:** Minimal, icon-only button for space-constrained layouts.\n * - **Normal:** Standard button with icon and optional alert counter.\n * - **Enhanced:** Visually prominent button for high-priority alerts, with accent styling.\n * - **Alert Types:** Supports `alarm`, `warning`, `caution`, or no alert (idle). Icon and color adapt to the alert type.\n * - **Alert Counter:** Optional badge displays the number of active alerts (except in flat mode).\n * - **Silence Button:** Optional secondary button to mute or silence alerts, shown when enabled and at sufficient width.\n * - **Blinking Animation:** Can animate (blink) to draw attention to active alerts (except for caution type).\n * - **Responsive Layout:** Automatically switches to flat mode below a configurable width, and hides the silence button below another configurable width.\n * - **Large Size Option:** Increases button height and padding for touch-friendly or prominent use.\n *\n * ## Usage Guidelines\n *\n * Use `<obc-alert-button>` to provide a persistent, easily accessible indicator of alert or notification status. Ideal for toolbars, headers, or notification panels where users need to be aware of active alerts and may need to silence them quickly.\n *\n * - Use the counter to show the number of active alerts when relevant.\n * - Use the silence button to provide a quick mute action, but only when space allows.\n * - Choose the variant (`flat`, `normal`, `enhanced`) based on available space and the importance of the alert.\n * - The blinking feature should be reserved for urgent or high-priority alerts to avoid unnecessary distraction.\n *\n * **TODO(designer):** Confirm if there are recommended default behaviors for auto-blinking, and if there are any design constraints for when to use each variant.\n *\n * ## Properties\n *\n * - `nAlerts` (number): Number of active alerts to display in the counter badge.\n * - `alertType` (`AlertType`): Type of alert (`alarm`, `warning`, `caution`, or undefined for idle).\n * - `type` (`ObcAlertButtonType`): Visual variant of the button (`flat`, `normal`, `enhanced`). Default is `normal`.\n * - `counter` (boolean): Whether to show the alert counter badge (not available in flat mode).\n * - `showSilenceButton` (boolean): Whether to display the silence button (hidden in flat mode or below min breakpoint).\n * - `silenceButtonDisabled` (boolean): Disables the silence button when true.\n * - `flatMaxBreakpointPx` (number): Maximum width (in px) for normal/enhanced mode; below this, switches to flat mode.\n * - `silenceButtonMinBreakpointPx` (number): Minimum width (in px) to show the silence button; below this, it is hidden.\n * - `blinking` (boolean): Enables blinking animation for active alerts (not for caution type).\n * - `large` (boolean): Increases button size for prominent or touch-friendly use.\n *\n * ## Events\n *\n * - `click-alert` – Fired when the main alert button is clicked.\n * - `click-silence` – Fired when the silence button is clicked.\n *\n * ## Best Practices & Constraints\n *\n * - Only show the counter when there are active alerts and the button is not in flat mode.\n * - The silence button is only visible if enabled, the width is above the minimum breakpoint, and the button is not flat.\n * - Blinking should be used sparingly to avoid overwhelming the user.\n * - Use the large variant for touch interfaces or when the button needs to stand out.\n *\n * ## Example\n *\n * ```html\n * <obc-alert-button\n * nAlerts=\"3\"\n * alertType=\"alarm\"\n * type=\"enhanced\"\n * counter\n * showSilenceButton\n * blinking\n * large\n * flatMaxBreakpointPx=\"600\"\n * silenceButtonMinBreakpointPx=\"600\"\n * ></obc-alert-button>\n * ```\n *\n * In this example, the button shows an alarm icon, a counter badge with \"3\", is styled as enhanced, blinks to indicate urgency, and includes a silence button if the width allows.\n *\n * @slot - No content slots. All content is provided via properties.\n * @fires {CustomEvent<void>} click-alert - Fired when the main alert button is clicked.\n * @fires {CustomEvent<void>} click-silence - Fired when the silence button is clicked.\n * @stable\n */\n@customElement('obc-alert-button')\nexport class ObcAlertButton extends LitElement {\n /**\n * Number of active alerts to display in the counter badge.\n *\n * If set to 0, the button appears in the idle state.\n */\n @property({type: Number}) nAlerts = 0;\n\n /**\n * Type of alert to display.\n *\n * Determines the icon and color scheme. Can be `alarm`, `warning`, `caution`, or undefined for idle state.\n */\n @property({type: String}) alertType?: AlertType;\n\n /**\n * Visual variant of the button.\n *\n * - `flat`: Minimal, icon-only button for compact layouts.\n * - `normal`: Standard button with icon and optional counter (default).\n * - `enhanced`: Emphasized button for high-priority alerts.\n */\n @property({type: String}) type = ObcAlertButtonType.Normal;\n\n /**\n * Increases button size for touch-friendly or prominent use.\n *\n * Adds extra height and padding.\n */\n @property({type: Boolean}) large = false;\n\n /**\n * Whether to display the silence button.\n *\n * The silence button is only shown if this is true, the width is above `silenceButtonMinBreakpointPx`, and the button is not in flat mode.\n */\n @property({type: Boolean}) showSilenceButton = false;\n\n /**\n * Disables the silence button when true.\n *\n * @availableWhen showSilenceButton==true\n */\n @property({type: Boolean}) silenceButtonDisabled = false;\n\n /**\n * Whether to show the alert counter badge.\n *\n * Only shown when there are active alerts and the button is not in flat mode.\n */\n @property({type: Boolean}) counter = false;\n\n /**\n * Enables blinking animation for active alerts.\n *\n * Blinking is only shown for alarm and warning types, not for caution.\n */\n @property({type: Boolean}) blinking = false;\n\n /**\n * Maximum width (in px) for normal/enhanced mode.\n *\n * If the available width is less than this value, the button switches to flat mode.\n * Only applies when `type` is set to `normal` or `enhanced`.\n *\n * @availableWhen type!=flat\n */\n @property({type: Number}) flatMaxBreakpointPx = 0;\n\n /**\n * Minimum width (in px) to show the silence button.\n *\n * If the available width is less than this value, the silence button is hidden.\n * Only applies when `showSilenceButton` is true.\n *\n * @availableWhen showSilenceButton==true\n */\n @property({type: Number}) silenceButtonMinBreakpointPx = 0;\n\n @state() private width = window.innerWidth;\n\n private resizeListener = () => {\n this.width = window.innerWidth;\n };\n\n override connectedCallback() {\n super.connectedCallback();\n window.addEventListener('resize', this.resizeListener);\n if (this.hasUpdated) {\n this.installBlinking();\n }\n }\n\n override disconnectedCallback() {\n window.removeEventListener('resize', this.resizeListener);\n this._blinkAnimationCancel?.();\n super.disconnectedCallback();\n }\n\n private renderAlertTwotoneIcon() {\n const twotone = this.alertType\n ? getAlertTwotoneComponent(this.alertType)\n : AlertTwotoneComponent.Caution;\n switch (twotone) {\n case AlertTwotoneComponent.Critical:\n return html`<obi-alerts-critical-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-critical-twotone>`;\n case AlertTwotoneComponent.Diagnostic:\n return html`<obi-alerts-diagnostic-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-diagnostic-twotone>`;\n case AlertTwotoneComponent.Warning:\n return html`<obi-alerts-warning-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-warning-twotone>`;\n case AlertTwotoneComponent.Caution:\n return html`<obi-alerts-caution-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-caution-twotone>`;\n default:\n return html`<obi-alerts-alarm-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-alarm-twotone>`;\n }\n }\n\n private alertIcon() {\n const isIdle = this.nAlerts === 0;\n if (isIdle) {\n return html`<obi-alerts class=\"icon\"></obi-alerts>`;\n }\n if (this.type === ObcAlertButtonType.Enhanced) {\n return html`<obi-alerts-active class=\"icon\"></obi-alerts-active>`;\n }\n return this.renderAlertTwotoneIcon();\n }\n\n private alertIconNegative() {\n const useIdle =\n this.nAlerts === 0 || this.type !== ObcAlertButtonType.Enhanced;\n if (useIdle) {\n return html`<obi-alerts class=\"icon\"></obi-alerts>`;\n }\n return this.renderAlertTwotoneIcon();\n }\n\n private get activeType(): ObcAlertButtonType {\n if (this.type === ObcAlertButtonType.Flat) {\n return ObcAlertButtonType.Flat;\n }\n if (this.width < this.flatMaxBreakpointPx) {\n return ObcAlertButtonType.Flat;\n }\n return this.type;\n }\n\n private get showSilenceButtonDynamic(): boolean {\n return (\n this.showSilenceButton &&\n this.width >= this.silenceButtonMinBreakpointPx &&\n this.activeType !== ObcAlertButtonType.Flat\n );\n }\n\n private _blinkAnimationCancel?: () => void;\n\n private installBlinking() {\n this._blinkAnimationCancel?.();\n this._blinkAnimationCancel = blinkingAll(this);\n }\n\n override updated() {\n this.installBlinking();\n }\n\n override render() {\n const hasAlerts = this.nAlerts > 0;\n const showCounter =\n this.counter && hasAlerts && this.activeType !== ObcAlertButtonType.Flat;\n const showBlinking =\n this.blinking &&\n hasAlerts &&\n this.alertType !== undefined &&\n supportsBlinking(this.alertType, false);\n return html`\n <div\n class=${classMap({\n wrapper: true,\n [`alert-type-${this.alertType ?? 'none'}`]: true,\n counter: showCounter,\n 'has-silence': this.showSilenceButtonDynamic,\n [`type-${this.activeType}`]: true,\n blinking: showBlinking,\n large: this.large,\n })}\n >\n <button\n class=\"alert-button\"\n @click=${() => this.dispatchEvent(new CustomEvent('click-alert'))}\n >\n ${showBlinking\n ? html` <div class=\"blink\">\n ${this.alertIconNegative()}\n ${showCounter\n ? html`<div class=\"badge\">${this.nAlerts}</div>`\n : null}\n </div>`\n : nothing}\n <div class=\"visible-wrapper\">\n ${this.alertIcon()}\n ${showCounter\n ? html`<div class=\"badge\">${this.nAlerts}</div>`\n : nothing}\n </div>\n </button>\n\n ${this.showSilenceButtonDynamic\n ? html`\n <button\n class=\"silence-button\"\n @click=${() =>\n this.dispatchEvent(new CustomEvent('click-silence'))}\n ?disabled=${this.silenceButtonDisabled}\n >\n <div class=\"visible-wrapper\">\n <obi-silence-iec class=\"icon\"></obi-silence-iec>\n </div>\n </button>\n `\n : null}\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-button': ObcAlertButton;\n }\n}\n"],"names":["ObcAlertButtonType"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BO,IAAK,uCAAAA,wBAAL;AACLA,sBAAA,MAAA,IAAO;AACPA,sBAAA,QAAA,IAAS;AACTA,sBAAA,UAAA,IAAW;AAHD,SAAAA;AAAA,GAAA,sBAAA,CAAA,CAAA;AAsFL,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAAxC,cAAA;AAAA,UAAA,GAAA,SAAA;AAMqB,SAAA,UAAU;AAgBV,SAAA,OAAO;AAON,SAAA,QAAQ;AAOR,SAAA,oBAAoB;AAOpB,SAAA,wBAAwB;AAOxB,SAAA,UAAU;AAOV,SAAA,WAAW;AAUZ,SAAA,sBAAsB;AAUtB,SAAA,+BAA+B;AAEhD,SAAQ,QAAQ,OAAO;AAEhC,SAAQ,iBAAiB,MAAM;AAC7B,WAAK,QAAQ,OAAO;AAAA,IACtB;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;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAbb,eAae,WAAA,aAAA,CAAA;AASA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAtBb,eAsBe,WAAA,QAAA,CAAA;AAOC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GA7Bd,eA6BgB,WAAA,SAAA,CAAA;AAOA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GApCd,eAoCgB,WAAA,qBAAA,CAAA;AAOA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GA3Cd,eA2CgB,WAAA,yBAAA,CAAA;AAOA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAlDd,eAkDgB,WAAA,WAAA,CAAA;AAOA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAzDd,eAyDgB,WAAA,YAAA,CAAA;AAUD,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAnEb,eAmEe,WAAA,uBAAA,CAAA;AAUA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA7Eb,eA6Ee,WAAA,gCAAA,CAAA;AAET,gBAAA;AAAA,EAAhB,MAAA;AAAM,GA/EI,eA+EM,WAAA,SAAA,CAAA;AA/EN,iBAAN,gBAAA;AAAA,EADN,cAAc,kBAAkB;AAAA,GACpB,cAAA;"}
@@ -85,6 +85,7 @@ const compentStyle = css`* {
85
85
 
86
86
  .wrapper.level-critical {
87
87
  --bg-color: var(--critical-enabled-background-color);
88
+ --blink-on: var(--critical-blink-on);
88
89
  color: var(--on-critical-active-color);
89
90
  }
90
91
 
@@ -1 +1 @@
1
- {"version":3,"file":"alert-frame.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"alert-frame.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -193,6 +193,11 @@ export declare class ObcAlertFrame extends LitElement {
193
193
  showIcon: boolean;
194
194
  showAlertCategoryIcon: boolean;
195
195
  render(): TemplateResult<1>;
196
+ private _blinkAnimationCancel?;
197
+ private syncBlinking;
198
+ connectedCallback(): void;
199
+ updated(): void;
200
+ disconnectedCallback(): void;
196
201
  private flap;
197
202
  private renderBadgeIcon;
198
203
  static styles: import('lit').CSSResult;
@@ -1 +1 @@
1
- {"version":3,"file":"alert-fr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AgB,EAAE,OAAO,CAAS;IAE7D;;OAEG;IACwB,iBAAiB,EAAE,OAAO,CAAS;IAE9D;;OAEG;IACwB,mBAAmB,EAAE,OAAO,CAAS;IAEhE;;OAEG;IACwB,oBAAoB,EAAE,OAAO,CAAS;IAEvC,QAAQ,EAAE,kBAAkB,CACzB;IAEF,QAAQ,EAAE,OAAO,CAAS;IACR,qBAAqB,EAAE,OAAO,CACpE;IAEE,MAAM;IAwBf,OAAO,CAAC,qBAAqB,CAAC,CAAa;IAE3C,OAAO,CAAC,YAAY;IAiBX,iBAAiB;IAOjB,OAAO;IAIP,oBAAoB;IAM7B,OAAO,CAAC,IAAI;IAmEZ,OAAO,CAAC,eAAe;IAmBvB,OAAgB,MAAM,0BAA2B;CAClD;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,gBAAgB,GAAG,OAAO,GAAG,SAAS,EAC/C,OAAO,EAAE,kBAAkB,EAC3B,SAAS,GAAE,OAAe,GACzB,kBAAkB,CAepB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
@@ -10,6 +10,7 @@ import "./diagnostic-badge.js";
10
10
  import { customElement } from "../../decorator.js";
11
11
  import { AlertType } from "../../types.js";
12
12
  import { getAlertBadgeComponent, AlertBadgeComponent } from "../../alert-severity.js";
13
+ import { blinkingAll } from "../../palettes/blinking.js";
13
14
  var __defProp = Object.defineProperty;
14
15
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15
16
  var __decorateClass = (decorators, target, key, kind) => {
@@ -84,6 +85,29 @@ let ObcAlertFrame = class extends LitElement {
84
85
  </div>
85
86
  `;
86
87
  }
88
+ syncBlinking() {
89
+ if (this.mode !== "unacked-active" && this._blinkAnimationCancel) {
90
+ this._blinkAnimationCancel();
91
+ this._blinkAnimationCancel = void 0;
92
+ }
93
+ if (this.mode === "unacked-active" && !this._blinkAnimationCancel) {
94
+ this._blinkAnimationCancel = blinkingAll(this);
95
+ }
96
+ }
97
+ connectedCallback() {
98
+ super.connectedCallback();
99
+ if (this.hasUpdated) {
100
+ this.syncBlinking();
101
+ }
102
+ }
103
+ updated() {
104
+ this.syncBlinking();
105
+ }
106
+ disconnectedCallback() {
107
+ super.disconnectedCallback();
108
+ this._blinkAnimationCancel?.();
109
+ this._blinkAnimationCancel = void 0;
110
+ }
87
111
  flap() {
88
112
  if (this.type === "regular") {
89
113
  return nothing;
@@ -1 +1 @@
1
- {"version":3,"file":"alert-frame.js","sources":["../../../src/components/alert-frame/alert-frame.ts"],"sourcesContent":["import {\n LitElement,\n html,\n unsafeCSS,\n nothing,\n TemplateResult,\n HTMLTemplateResult,\n} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport compentStyle from './alert-frame.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../../icons/icon-alarm-badge.js';\nimport '../../icons/icon-warning-badge.js';\nimport '../../icons/icon-caution-badge.js';\nimport './critical-badge.js';\nimport './diagnostic-badge.js';\nimport {customElement} from '../../decorator.js';\nimport {AlertType} from '../../types.js';\nimport {\n getAlertBadgeComponent,\n AlertBadgeComponent,\n} from '../../alert-severity.js';\n\nexport {AlertType as ObcAlertFrameStatus} from '../../types.js';\n\n/**\n * Enum representing the available frame styles for an alert component.\n *\n * - Regular (\"regular\"): Standard alert frame layout.\n * - SmallSideFlip (\"small-side-flip\"): Flipped frame with a small side edge.\n * - LargeSideFlip (\"large-side-flip\"): Flipped frame with a large side edge.\n * - BottomFlip (\"bottom-flip\"): Frame flipped to the bottom position.\n */\nexport enum ObcAlertFrameType {\n Regular = 'regular',\n SmallSideFlip = 'small-side-flip',\n LargeSideFlip = 'large-side-flip',\n BottomFlip = 'bottom-flip',\n TopFlip = 'top-flip',\n}\n\n/**\n * Thickness options for the alert frame border.\n * - `small`: Thin border (default).\n * - `large`: Thick border for higher emphasis.\n */\nexport enum ObcAlertFrameThickness {\n Small = 'small',\n Large = 'large',\n}\n\nexport enum ObcAlertFrameMode {\n ackedActive = 'acked-active',\n unackedActive = 'unacked-active',\n unackedRectified = 'unacked-rectified',\n}\n\n/**\n * Text size options for flip-flap typography.\n * - `regular`: Standard text size (default).\n * - `large`: Larger text for increased visibility.\n */\nexport enum AlertFrameTextSize {\n Regular = 'regular',\n Large = 'large',\n}\n\nexport interface AlertFrameConfig {\n type?: ObcAlertFrameType;\n thickness?: ObcAlertFrameThickness;\n status?: AlertType;\n mode?: ObcAlertFrameMode;\n textSize?: AlertFrameTextSize;\n showIcon?: boolean;\n showAlertCategoryIcon?: boolean;\n}\n\n/**\n * `<obc-alert-frame>` – A bordered frame component for visually emphasizing alert or status messages.\n *\n * The alert frame provides a prominent outline and optional \"flap\" with status icon to draw attention to critical information or UI regions. It supports multiple visual variants and thicknesses, and can be configured to indicate different alert statuses (alarm, warning, caution). The component is designed to wrap content and visually distinguish it from the surrounding UI.\n *\n * ### Features\n * - **Variants (type):**\n * - `regular`: Standard outlined frame with no flap or icon.\n * - `small-side-flip`: Adds a small side flap with a status icon at the top right.\n * - `large-side-flip`: Adds a larger, vertical side flap with a status icon and optional custom icon.\n * - `bottom-flip`: Adds a bottom flap with a status icon, label, and timer slots.\n * - **Thickness options:** Choose between `small` (thin border) and `large` (thick border) for visual emphasis.\n * - **Status indication:** Displays different color schemes and icons for the legacy statuses (`alarm`, `warning`, `caution`) and the level statuses (`level-critical`, `level-high`, `level-medium`, `level-low`, `level-diagnostic`).\n * - **Acknowledgement mode:** The `mode` property reflects the alert lifecycle state — `acked-active` (default), `unacked-active`, and `unacked-rectified` — driving the blinking/animation treatment of the frame.\n * - **Content wrapping:** When `wrapContent` is true, the frame wraps and sizes itself to its slotted content rather than overlaying a fixed region.\n * - **Customizable corners:** Each corner can be set to a sharp (non-rounded) edge for integration with other UI elements.\n * - **Slot-based content:** Supports custom icons, labels, and timers in flap variants via named slots.\n *\n * ### Usage Guidelines\n * Use `obc-alert-frame` to highlight important content, such as alerts, warnings, or status panels. The flap variants are ideal for drawing extra attention to urgent or time-sensitive information, while the regular type provides a subtle but clear border. Choose the status to match the severity of the message (alarm, warning, caution). Adjust thickness for visual hierarchy—use large for high-priority alerts and small for less critical notices.\n *\n * **TODO(designer):** Provide guidance on when to use each flap type (small-side-flip, large-side-flip, bottom-flip) and recommended scenarios for sharp edge usage.\n *\n * ### Features/Variants\n * - **Type (Visual Variant):**\n * - `regular`: Simple outlined frame, no flap or icon.\n * - `small-side-flip`: Small right-side flap with status icon.\n * - `large-side-flip`: Large vertical right-side flap with status icon and optional custom icon.\n * - `bottom-flip`: Bottom flap with status icon, label, and timer.\n * - **Thickness:** `small` (default) or `large` for border width.\n * - **Status:** `alarm`, `warning`, `caution`, or the level severities (`level-critical`, `level-high`, `level-medium`, `level-low`, `level-diagnostic`)—affects color and icon.\n * - **Mode:** `acked-active` (default), `unacked-active`, or `unacked-rectified`—affects blinking/animation.\n * - **Corner Customization:** Each corner can be made sharp (not rounded) via boolean properties.\n *\n * ### Slots and Content Structure\n *\n * | Slot Name | Renders When... | Purpose |\n * |-----------|-----------------|---------|\n * | (default) | Always | Main content inside the alert frame. |\n * | icon | `large-side-flip` or `bottom-flip` | Custom icon displayed in the flap (in addition to status icon). |\n * | label | `bottom-flip` only | Label text shown in the bottom flap. |\n * | timer | `bottom-flip` only | Timer or time label in the bottom flap. |\n *\n * ### Properties and Attributes\n * - `type`: Selects the visual variant/flap style. Default is `small-side-flip`.\n * - `thickness`: Controls border thickness (`small` or `large`). Default is `small`.\n * - `status`: Sets the alert status and color/icon (`alarm`, `warning`, `caution`, or the `level-*` severities). Default is `alarm`.\n * - `mode`: Acknowledgement lifecycle state (`acked-active`, `unacked-active`, `unacked-rectified`) controlling blinking/animation. Default is `acked-active`.\n * - `wrapContent`: When true, the frame wraps and sizes to its slotted content instead of overlaying a fixed region. Default is `false`.\n * - `sharpEdgeTopLeft`, `sharpEdgeTopRight`, `sharpEdgeBottomLeft`, `sharpEdgeBottomRight`: Boolean flags to make each corner sharp instead of rounded.\n *\n * ### Best Practices and Constraints\n * - Use the status property to match the severity of the alert.\n * - Only use the bottom-flip variant when both label and timer are relevant.\n * - For visual consistency, align sharp edge settings with adjacent UI elements.\n * - The default slot is for the main content; use named slots for icons, labels, and timers as needed.\n *\n * ### Example:\n * ```\n * <obc-alert-frame\n * type=\"bottom-flip\"\n * thickness=\"large\"\n * status=\"warning\"\n * sharpEdgeTopLeft\n * >\n * <obi-placeholder slot=\"icon\"></obi-placeholder>\n * <div slot=\"label\">Low Battery</div>\n * <div slot=\"timer\">00:15</div>\n * <div>Critical system message goes here.</div>\n * </obc-alert-frame>\n * ```\n *\n * @slot - Default slot for main alert content.\n * @slot icon - Custom icon for the flap (large-side-flip, bottom-flip).\n * @slot label - Label text for the bottom flap (bottom-flip only).\n * @slot timer - Timer or time label for the bottom flap (bottom-flip only).\n * @beta\n */\n@customElement('obc-alert-frame')\nexport class ObcAlertFrame extends LitElement {\n /**\n * Visual variant of the alert frame.\n * - `regular`: Outlined frame only.\n * - `small-side-flip`: Small right-side flap with status icon.\n * - `large-side-flip`: Large vertical right-side flap with status icon and optional custom icon.\n * - `bottom-flip`: Bottom flap with status icon, label, and timer.\n *\n * Default: `small-side-flip`\n */\n @property({type: String}) type: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n\n /**\n * Border thickness of the alert frame.\n * - `small`: Thin border (default).\n * - `large`: Thick border for higher emphasis.\n */\n @property({type: String}) thickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n\n /**\n * Status of the alert, controlling color scheme and icon.\n * - `alarm`: Highest severity (default).\n * - `warning`: Medium severity.\n * - `caution`: Lower severity.\n * - `level-critical`, `level-high`, `level-medium`, `level-low`, `level-diagnostic`: level severity levels, styled to match their legacy equivalents.\n */\n @property({type: String}) status: AlertType = AlertType.Alarm;\n\n /**\n * Acknowledgement lifecycle state, controlling the frame's blinking/animation.\n * - `acked-active`: Active and acknowledged (default); no blinking.\n * - `unacked-active`: Active and not yet acknowledged; blinks.\n * - `unacked-rectified`: Condition cleared but not yet acknowledged.\n */\n @property({type: String}) mode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n\n /**\n * When true, the frame wraps and sizes itself to its slotted content instead\n * of overlaying a fixed region. Reflected to an attribute for CSS styling.\n */\n @property({type: Boolean, reflect: true}) wrapContent: boolean = false;\n\n /**\n * When true, the frame stretches to fill the full width of its container\n * instead of hugging its content. Reflected to an attribute for CSS styling.\n */\n @property({type: Boolean, reflect: true}) fullWidth: boolean = false;\n\n /**\n * If true, the top-left corner will be sharp (not rounded).\n */\n @property({type: Boolean}) sharpEdgeTopLeft: boolean = false;\n\n /**\n * If true, the top-right corner will be sharp (not rounded).\n */\n @property({type: Boolean}) sharpEdgeTopRight: boolean = false;\n\n /**\n * If true, the bottom-left corner will be sharp (not rounded).\n */\n @property({type: Boolean}) sharpEdgeBottomLeft: boolean = false;\n\n /**\n * If true, the bottom-right corner will be sharp (not rounded).\n */\n @property({type: Boolean}) sharpEdgeBottomRight: boolean = false;\n\n @property({type: String}) textSize: AlertFrameTextSize =\n AlertFrameTextSize.Regular;\n\n @property({type: Boolean}) showIcon: boolean = false;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n\n override render() {\n return html`\n <div\n class=${classMap({\n wrapper: true,\n 'wrap-content': this.wrapContent,\n 'full-width': this.fullWidth,\n ['thickness-' + this.thickness]: true,\n [this.type]: true,\n [this.status]: true,\n ['text-size-' + this.textSize]: true,\n 'sharp-edge-top-left': this.sharpEdgeTopLeft,\n 'sharp-edge-top-right': this.sharpEdgeTopRight,\n 'sharp-edge-bottom-left': this.sharpEdgeBottomLeft,\n 'sharp-edge-bottom-right': this.sharpEdgeBottomRight,\n [this.mode]: true,\n })}\n >\n <slot></slot>\n ${this.flap()}\n </div>\n `;\n }\n\n private flap() {\n if (this.type === ObcAlertFrameType.Regular) {\n return nothing;\n }\n\n if (\n this.type === ObcAlertFrameType.SmallSideFlip &&\n !this.showAlertCategoryIcon\n ) {\n return nothing;\n }\n\n if (\n this.type === ObcAlertFrameType.LargeSideFlip &&\n !this.showIcon &&\n !this.showAlertCategoryIcon\n ) {\n return nothing;\n }\n\n let icon: TemplateResult | typeof nothing;\n if (!this.showAlertCategoryIcon) {\n icon = nothing;\n } else {\n icon = this.renderBadgeIcon();\n }\n\n if (this.type === ObcAlertFrameType.SmallSideFlip) {\n return html`<div class=\"flap small\">\n ${icon}\n <div class=\"mask up\"></div>\n </div>`;\n }\n if (this.type === ObcAlertFrameType.LargeSideFlip) {\n return html`<div class=\"flap large\">\n ${icon}\n ${this.showIcon\n ? html`<div class=\"icon\"><slot name=\"icon\"></slot></div>`\n : nothing}\n <div class=\"mask up\"></div>\n <div class=\"mask down\"></div>\n </div>`;\n }\n if (\n this.type === ObcAlertFrameType.BottomFlip ||\n this.type === ObcAlertFrameType.TopFlip\n ) {\n return html`<div\n class=\"flap ${this.type === ObcAlertFrameType.BottomFlip\n ? 'bottom'\n : 'top'}\"\n >\n ${icon}\n ${this.showIcon\n ? html`<div class=\"icon\"><slot name=\"icon\"></slot></div>`\n : nothing}\n <div class=\"label\"><slot name=\"label\"></slot></div>\n <div class=\"spacer\"></div>\n <div class=\"timer\"><slot name=\"timer\"></slot></div>\n <div class=\"mask right\"></div>\n <div class=\"mask left\"></div>\n </div>`;\n }\n console.error('Unknown type of alert frame:', this.type);\n return nothing;\n }\n\n private renderBadgeIcon(): TemplateResult {\n switch (getAlertBadgeComponent(this.status)) {\n case AlertBadgeComponent.Critical:\n return html`<obi-critical-badge\n class=\"icon badge\"\n ></obi-critical-badge>`;\n case AlertBadgeComponent.Warning:\n return html`<obi-warning-badge class=\"icon badge\"></obi-warning-badge>`;\n case AlertBadgeComponent.Caution:\n return html`<obi-caution-badge class=\"icon badge\"></obi-caution-badge>`;\n case AlertBadgeComponent.Diagnostic:\n return html`<obi-diagnostic-badge\n class=\"icon badge\"\n ></obi-diagnostic-badge>`;\n default:\n return html`<obi-alarm-badge class=\"icon badge\"></obi-alarm-badge>`;\n }\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\nexport function wrapWithAlertFrame(\n options: AlertFrameConfig | boolean | undefined,\n content: HTMLTemplateResult,\n fullWidth: boolean = false\n): HTMLTemplateResult {\n if (typeof options !== 'object' || options === null) {\n return content;\n }\n return html`<obc-alert-frame\n .type=${options.type ?? ObcAlertFrameType.SmallSideFlip}\n .thickness=${options.thickness ?? ObcAlertFrameThickness.Small}\n .status=${options.status ?? AlertType.Alarm}\n .mode=${options.mode ?? ObcAlertFrameMode.ackedActive}\n .showIcon=${options.showIcon ?? false}\n .showAlertCategoryIcon=${options.showAlertCategoryIcon ?? true}\n .wrapContent=${true}\n .fullWidth=${fullWidth}\n >${content}</obc-alert-frame\n >`;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-frame': ObcAlertFrame;\n }\n}\n"],"names":["ObcAlertFrameType","ObcAlertFrameThickness","ObcAlertFrameMode","AlertFrameTextSize"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiCO,IAAK,sCAAAA,uBAAL;AACLA,qBAAA,SAAA,IAAU;AACVA,qBAAA,eAAA,IAAgB;AAChBA,qBAAA,eAAA,IAAgB;AAChBA,qBAAA,YAAA,IAAa;AACbA,qBAAA,SAAA,IAAU;AALA,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;AAaL,IAAK,2CAAAC,4BAAL;AACLA,0BAAA,OAAA,IAAQ;AACRA,0BAAA,OAAA,IAAQ;AAFE,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAKL,IAAK,sCAAAC,uBAAL;AACLA,qBAAA,aAAA,IAAc;AACdA,qBAAA,eAAA,IAAgB;AAChBA,qBAAA,kBAAA,IAAmB;AAHT,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;AAWL,IAAK,uCAAAC,wBAAL;AACLA,sBAAA,SAAA,IAAU;AACVA,sBAAA,OAAA,IAAQ;AAFE,SAAAA;AAAA,GAAA,sBAAA,CAAA,C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iBACN,SAAS;AAAA,OACnB,OAAO;AAAA;AAEd;"}
1
+ {"version":3,"file":"alert-frame.js","sources":["../../../src/components/alert-frame/alert-frame.ts"],"sourcesContent":["import {\n LitElement,\n html,\n unsafeCSS,\n nothing,\n TemplateResult,\n HTMLTemplateResult,\n} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport compentStyle from './alert-frame.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../../icons/icon-alarm-badge.js';\nimport '../../icons/icon-warning-badge.js';\nimport '../../icons/icon-caution-badge.js';\nimport './critical-badge.js';\nimport './diagnostic-badge.js';\nimport {customElement} from '../../decorator.js';\nimport {AlertType} from '../../types.js';\nimport {\n getAlertBadgeComponent,\n AlertBadgeComponent,\n} from '../../alert-severity.js';\nimport {blinkingAll} from '../../palettes/blinking.js';\n\nexport {AlertType as ObcAlertFrameStatus} from '../../types.js';\n\n/**\n * Enum representing the available frame styles for an alert component.\n *\n * - Regular (\"regular\"): Standard alert frame layout.\n * - SmallSideFlip (\"small-side-flip\"): Flipped frame with a small side edge.\n * - LargeSideFlip (\"large-side-flip\"): Flipped frame with a large side edge.\n * - BottomFlip (\"bottom-flip\"): Frame flipped to the bottom position.\n */\nexport enum ObcAlertFrameType {\n Regular = 'regular',\n SmallSideFlip = 'small-side-flip',\n LargeSideFlip = 'large-side-flip',\n BottomFlip = 'bottom-flip',\n TopFlip = 'top-flip',\n}\n\n/**\n * Thickness options for the alert frame border.\n * - `small`: Thin border (default).\n * - `large`: Thick border for higher emphasis.\n */\nexport enum ObcAlertFrameThickness {\n Small = 'small',\n Large = 'large',\n}\n\nexport enum ObcAlertFrameMode {\n ackedActive = 'acked-active',\n unackedActive = 'unacked-active',\n unackedRectified = 'unacked-rectified',\n}\n\n/**\n * Text size options for flip-flap typography.\n * - `regular`: Standard text size (default).\n * - `large`: Larger text for increased visibility.\n */\nexport enum AlertFrameTextSize {\n Regular = 'regular',\n Large = 'large',\n}\n\nexport interface AlertFrameConfig {\n type?: ObcAlertFrameType;\n thickness?: ObcAlertFrameThickness;\n status?: AlertType;\n mode?: ObcAlertFrameMode;\n textSize?: AlertFrameTextSize;\n showIcon?: boolean;\n showAlertCategoryIcon?: boolean;\n}\n\n/**\n * `<obc-alert-frame>` – A bordered frame component for visually emphasizing alert or status messages.\n *\n * The alert frame provides a prominent outline and optional \"flap\" with status icon to draw attention to critical information or UI regions. It supports multiple visual variants and thicknesses, and can be configured to indicate different alert statuses (alarm, warning, caution). The component is designed to wrap content and visually distinguish it from the surrounding UI.\n *\n * ### Features\n * - **Variants (type):**\n * - `regular`: Standard outlined frame with no flap or icon.\n * - `small-side-flip`: Adds a small side flap with a status icon at the top right.\n * - `large-side-flip`: Adds a larger, vertical side flap with a status icon and optional custom icon.\n * - `bottom-flip`: Adds a bottom flap with a status icon, label, and timer slots.\n * - **Thickness options:** Choose between `small` (thin border) and `large` (thick border) for visual emphasis.\n * - **Status indication:** Displays different color schemes and icons for the legacy statuses (`alarm`, `warning`, `caution`) and the level statuses (`level-critical`, `level-high`, `level-medium`, `level-low`, `level-diagnostic`).\n * - **Acknowledgement mode:** The `mode` property reflects the alert lifecycle state — `acked-active` (default), `unacked-active`, and `unacked-rectified` — driving the blinking/animation treatment of the frame.\n * - **Content wrapping:** When `wrapContent` is true, the frame wraps and sizes itself to its slotted content rather than overlaying a fixed region.\n * - **Customizable corners:** Each corner can be set to a sharp (non-rounded) edge for integration with other UI elements.\n * - **Slot-based content:** Supports custom icons, labels, and timers in flap variants via named slots.\n *\n * ### Usage Guidelines\n * Use `obc-alert-frame` to highlight important content, such as alerts, warnings, or status panels. The flap variants are ideal for drawing extra attention to urgent or time-sensitive information, while the regular type provides a subtle but clear border. Choose the status to match the severity of the message (alarm, warning, caution). Adjust thickness for visual hierarchy—use large for high-priority alerts and small for less critical notices.\n *\n * **TODO(designer):** Provide guidance on when to use each flap type (small-side-flip, large-side-flip, bottom-flip) and recommended scenarios for sharp edge usage.\n *\n * ### Features/Variants\n * - **Type (Visual Variant):**\n * - `regular`: Simple outlined frame, no flap or icon.\n * - `small-side-flip`: Small right-side flap with status icon.\n * - `large-side-flip`: Large vertical right-side flap with status icon and optional custom icon.\n * - `bottom-flip`: Bottom flap with status icon, label, and timer.\n * - **Thickness:** `small` (default) or `large` for border width.\n * - **Status:** `alarm`, `warning`, `caution`, or the level severities (`level-critical`, `level-high`, `level-medium`, `level-low`, `level-diagnostic`)—affects color and icon.\n * - **Mode:** `acked-active` (default), `unacked-active`, or `unacked-rectified`—affects blinking/animation.\n * - **Corner Customization:** Each corner can be made sharp (not rounded) via boolean properties.\n *\n * ### Slots and Content Structure\n *\n * | Slot Name | Renders When... | Purpose |\n * |-----------|-----------------|---------|\n * | (default) | Always | Main content inside the alert frame. |\n * | icon | `large-side-flip` or `bottom-flip` | Custom icon displayed in the flap (in addition to status icon). |\n * | label | `bottom-flip` only | Label text shown in the bottom flap. |\n * | timer | `bottom-flip` only | Timer or time label in the bottom flap. |\n *\n * ### Properties and Attributes\n * - `type`: Selects the visual variant/flap style. Default is `small-side-flip`.\n * - `thickness`: Controls border thickness (`small` or `large`). Default is `small`.\n * - `status`: Sets the alert status and color/icon (`alarm`, `warning`, `caution`, or the `level-*` severities). Default is `alarm`.\n * - `mode`: Acknowledgement lifecycle state (`acked-active`, `unacked-active`, `unacked-rectified`) controlling blinking/animation. Default is `acked-active`.\n * - `wrapContent`: When true, the frame wraps and sizes to its slotted content instead of overlaying a fixed region. Default is `false`.\n * - `sharpEdgeTopLeft`, `sharpEdgeTopRight`, `sharpEdgeBottomLeft`, `sharpEdgeBottomRight`: Boolean flags to make each corner sharp instead of rounded.\n *\n * ### Best Practices and Constraints\n * - Use the status property to match the severity of the alert.\n * - Only use the bottom-flip variant when both label and timer are relevant.\n * - For visual consistency, align sharp edge settings with adjacent UI elements.\n * - The default slot is for the main content; use named slots for icons, labels, and timers as needed.\n *\n * ### Example:\n * ```\n * <obc-alert-frame\n * type=\"bottom-flip\"\n * thickness=\"large\"\n * status=\"warning\"\n * sharpEdgeTopLeft\n * >\n * <obi-placeholder slot=\"icon\"></obi-placeholder>\n * <div slot=\"label\">Low Battery</div>\n * <div slot=\"timer\">00:15</div>\n * <div>Critical system message goes here.</div>\n * </obc-alert-frame>\n * ```\n *\n * @slot - Default slot for main alert content.\n * @slot icon - Custom icon for the flap (large-side-flip, bottom-flip).\n * @slot label - Label text for the bottom flap (bottom-flip only).\n * @slot timer - Timer or time label for the bottom flap (bottom-flip only).\n * @beta\n */\n@customElement('obc-alert-frame')\nexport class ObcAlertFrame extends LitElement {\n /**\n * Visual variant of the alert frame.\n * - `regular`: Outlined frame only.\n * - `small-side-flip`: Small right-side flap with status icon.\n * - `large-side-flip`: Large vertical right-side flap with status icon and optional custom icon.\n * - `bottom-flip`: Bottom flap with status icon, label, and timer.\n *\n * Default: `small-side-flip`\n */\n @property({type: String}) type: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n\n /**\n * Border thickness of the alert frame.\n * - `small`: Thin border (default).\n * - `large`: Thick border for higher emphasis.\n */\n @property({type: String}) thickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n\n /**\n * Status of the alert, controlling color scheme and icon.\n * - `alarm`: Highest severity (default).\n * - `warning`: Medium severity.\n * - `caution`: Lower severity.\n * - `level-critical`, `level-high`, `level-medium`, `level-low`, `level-diagnostic`: level severity levels, styled to match their legacy equivalents.\n */\n @property({type: String}) status: AlertType = AlertType.Alarm;\n\n /**\n * Acknowledgement lifecycle state, controlling the frame's blinking/animation.\n * - `acked-active`: Active and acknowledged (default); no blinking.\n * - `unacked-active`: Active and not yet acknowledged; blinks.\n * - `unacked-rectified`: Condition cleared but not yet acknowledged.\n */\n @property({type: String}) mode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n\n /**\n * When true, the frame wraps and sizes itself to its slotted content instead\n * of overlaying a fixed region. Reflected to an attribute for CSS styling.\n */\n @property({type: Boolean, reflect: true}) wrapContent: boolean = false;\n\n /**\n * When true, the frame stretches to fill the full width of its container\n * instead of hugging its content. Reflected to an attribute for CSS styling.\n */\n @property({type: Boolean, reflect: true}) fullWidth: boolean = false;\n\n /**\n * If true, the top-left corner will be sharp (not rounded).\n */\n @property({type: Boolean}) sharpEdgeTopLeft: boolean = false;\n\n /**\n * If true, the top-right corner will be sharp (not rounded).\n */\n @property({type: Boolean}) sharpEdgeTopRight: boolean = false;\n\n /**\n * If true, the bottom-left corner will be sharp (not rounded).\n */\n @property({type: Boolean}) sharpEdgeBottomLeft: boolean = false;\n\n /**\n * If true, the bottom-right corner will be sharp (not rounded).\n */\n @property({type: Boolean}) sharpEdgeBottomRight: boolean = false;\n\n @property({type: String}) textSize: AlertFrameTextSize =\n AlertFrameTextSize.Regular;\n\n @property({type: Boolean}) showIcon: boolean = false;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n\n override render() {\n return html`\n <div\n class=${classMap({\n wrapper: true,\n 'wrap-content': this.wrapContent,\n 'full-width': this.fullWidth,\n ['thickness-' + this.thickness]: true,\n [this.type]: true,\n [this.status]: true,\n ['text-size-' + this.textSize]: true,\n 'sharp-edge-top-left': this.sharpEdgeTopLeft,\n 'sharp-edge-top-right': this.sharpEdgeTopRight,\n 'sharp-edge-bottom-left': this.sharpEdgeBottomLeft,\n 'sharp-edge-bottom-right': this.sharpEdgeBottomRight,\n [this.mode]: true,\n })}\n >\n <slot></slot>\n ${this.flap()}\n </div>\n `;\n }\n\n private _blinkAnimationCancel?: () => void;\n\n private syncBlinking() {\n if (\n this.mode !== ObcAlertFrameMode.unackedActive &&\n this._blinkAnimationCancel\n ) {\n this._blinkAnimationCancel();\n this._blinkAnimationCancel = undefined;\n }\n\n if (\n this.mode === ObcAlertFrameMode.unackedActive &&\n !this._blinkAnimationCancel\n ) {\n this._blinkAnimationCancel = blinkingAll(this);\n }\n }\n\n override connectedCallback() {\n super.connectedCallback();\n if (this.hasUpdated) {\n this.syncBlinking();\n }\n }\n\n override updated() {\n this.syncBlinking();\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n this._blinkAnimationCancel?.();\n this._blinkAnimationCancel = undefined;\n }\n\n private flap() {\n if (this.type === ObcAlertFrameType.Regular) {\n return nothing;\n }\n\n if (\n this.type === ObcAlertFrameType.SmallSideFlip &&\n !this.showAlertCategoryIcon\n ) {\n return nothing;\n }\n\n if (\n this.type === ObcAlertFrameType.LargeSideFlip &&\n !this.showIcon &&\n !this.showAlertCategoryIcon\n ) {\n return nothing;\n }\n\n let icon: TemplateResult | typeof nothing;\n if (!this.showAlertCategoryIcon) {\n icon = nothing;\n } else {\n icon = this.renderBadgeIcon();\n }\n\n if (this.type === ObcAlertFrameType.SmallSideFlip) {\n return html`<div class=\"flap small\">\n ${icon}\n <div class=\"mask up\"></div>\n </div>`;\n }\n if (this.type === ObcAlertFrameType.LargeSideFlip) {\n return html`<div class=\"flap large\">\n ${icon}\n ${this.showIcon\n ? html`<div class=\"icon\"><slot name=\"icon\"></slot></div>`\n : nothing}\n <div class=\"mask up\"></div>\n <div class=\"mask down\"></div>\n </div>`;\n }\n if (\n this.type === ObcAlertFrameType.BottomFlip ||\n this.type === ObcAlertFrameType.TopFlip\n ) {\n return html`<div\n class=\"flap ${this.type === ObcAlertFrameType.BottomFlip\n ? 'bottom'\n : 'top'}\"\n >\n ${icon}\n ${this.showIcon\n ? html`<div class=\"icon\"><slot name=\"icon\"></slot></div>`\n : nothing}\n <div class=\"label\"><slot name=\"label\"></slot></div>\n <div class=\"spacer\"></div>\n <div class=\"timer\"><slot name=\"timer\"></slot></div>\n <div class=\"mask right\"></div>\n <div class=\"mask left\"></div>\n </div>`;\n }\n console.error('Unknown type of alert frame:', this.type);\n return nothing;\n }\n\n private renderBadgeIcon(): TemplateResult {\n switch (getAlertBadgeComponent(this.status)) {\n case AlertBadgeComponent.Critical:\n return html`<obi-critical-badge\n class=\"icon badge\"\n ></obi-critical-badge>`;\n case AlertBadgeComponent.Warning:\n return html`<obi-warning-badge class=\"icon badge\"></obi-warning-badge>`;\n case AlertBadgeComponent.Caution:\n return html`<obi-caution-badge class=\"icon badge\"></obi-caution-badge>`;\n case AlertBadgeComponent.Diagnostic:\n return html`<obi-diagnostic-badge\n class=\"icon badge\"\n ></obi-diagnostic-badge>`;\n default:\n return html`<obi-alarm-badge class=\"icon badge\"></obi-alarm-badge>`;\n }\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\nexport function wrapWithAlertFrame(\n options: AlertFrameConfig | boolean | undefined,\n content: HTMLTemplateResult,\n fullWidth: boolean = false\n): HTMLTemplateResult {\n if (typeof options !== 'object' || options === null) {\n return content;\n }\n return html`<obc-alert-frame\n .type=${options.type ?? ObcAlertFrameType.SmallSideFlip}\n .thickness=${options.thickness ?? ObcAlertFrameThickness.Small}\n .status=${options.status ?? AlertType.Alarm}\n .mode=${options.mode ?? ObcAlertFrameMode.ackedActive}\n .showIcon=${options.showIcon ?? false}\n .showAlertCategoryIcon=${options.showAlertCategoryIcon ?? true}\n .wrapContent=${true}\n .fullWidth=${fullWidth}\n >${content}</obc-alert-frame\n >`;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-frame': ObcAlertFrame;\n }\n}\n"],"names":["ObcAlertFrameType","ObcAlertFrameThickness","ObcAlertFrameMode","AlertFrameTextSize"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAkCO,IAAK,sCAAAA,uBAAL;AACLA,qBAAA,SAAA,IAAU;AACVA,qBAAA,eAAA,IAAgB;AAChBA,qBAAA,eAAA,IAAgB;AAChBA,qBAAA,YAAA,IAAa;AACbA,qBAAA,SAAA,IAAU;AALA,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;AAaL,IAAK,2CAAAC,4BAAL;AACLA,0BAAA,OAAA,IAAQ;AACRA,0BAAA,OAAA,IAAQ;AAFE,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAKL,IAAK,sCAAAC,uBAAL;AACLA,qBAAA,aAAA,IAAc;AACdA,qBAAA,eAAA,IA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AA,GAvEb,cAuEe,WAAA,YAAA,CAAA;AAGC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GA1Ed,cA0EgB,WAAA,YAAA,CAAA;AACkB,gBAAA;AAAA,EAA5C,SAAS,EAAC,MAAM,SAAS,WAAW,OAAM;AAAA,GA3EhC,cA2EkC,WAAA,yBAAA,CAAA;AA3ElC,gBAAN,gBAAA;AAAA,EADN,cAAc,iBAAiB;AAAA,GACnB,aAAA;AAmON,SAAS,mBACd,SACA,SACA,YAAqB,OACD;AACpB,MAAI,OAAO,YAAY,YAAY,YAAY,MAAM;AACnD,WAAO;AAAA,EACT;AACA,SAAO;AAAA,YACG,QAAQ,QAAQ,iBAAA;AAAA,iBACX,QAAQ,aAAa,OAAA;AAAA,cACxB,QAAQ,UAAU,UAAU,KAAK;AAAA,YACnC,QAAQ,QAAQ,cAAA;AAAA,gBACZ,QAAQ,YAAY,KAAK;AAAA,6BACZ,QAAQ,yBAAyB,IAAI;AAAA,mBAC/C,IAAI;AAAA,iBACN,SAAS;AAAA,OACnB,OAAO;AAAA;AAEd;"}
@@ -78,6 +78,11 @@ export declare class ObcAlertIcon extends LitElement {
78
78
  } | null;
79
79
  private renderStaticIcon;
80
80
  render(): TemplateResult<1>;
81
+ private _blinkAnimationCancel?;
82
+ private syncBlinking;
83
+ connectedCallback(): void;
84
+ updated(): void;
85
+ disconnectedCallback(): void;
81
86
  static styles: import('lit').CSSResult;
82
87
  }
83
88
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"alert-icon.d.ts","sourceRoot":"","sources":["../../../src/components/alert-icon/alert-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAa,cAAc,EAAU,MAAM,KAAK,CAAC;AAGnE,OAAO,uCAAuC,CAAC;AAE/C,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAMzC,OAAO,yCAAyC,CAAC;AACjD,OAAO,2CAA2C,CAAC;AACnD,OAA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C;KAChC;CACF"}
@@ -33,6 +33,7 @@ import { lowUnacknowledgedB, lowUnacknowledgedA } from "./icons/icon-low-unackno
33
33
  import { lowSilencedB, lowSilencedA } from "./icons/icon-low-silenced.js";
34
34
  import { lowRectifiedB, lowRectifiedA } from "./icons/icon-low-rectified.js";
35
35
  import { lowAcknowledged } from "./icons/icon-low-acknowledged.js";
36
+ import { blinkingAll } from "../../palettes/blinking.js";
36
37
  var __defProp = Object.defineProperty;
37
38
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
38
39
  var __decorateClass = (decorators, target, key, kind) => {
@@ -341,6 +342,31 @@ let ObcAlertIcon = class extends LitElement {
341
342
  }
342
343
  return html`<div class="wrapper">${this.renderStaticIcon()}</div>`;
343
344
  }
345
+ syncBlinking() {
346
+ if (this._blinkAnimationCancel && !supportsBlinking(this._effectiveType, this.acknowledged ?? false)) {
347
+ this._blinkAnimationCancel();
348
+ this._blinkAnimationCancel = void 0;
349
+ }
350
+ if (!this._blinkAnimationCancel && supportsBlinking(this._effectiveType, this.acknowledged ?? false)) {
351
+ this._blinkAnimationCancel = blinkingAll(this);
352
+ }
353
+ }
354
+ connectedCallback() {
355
+ super.connectedCallback();
356
+ if (this.hasUpdated) {
357
+ this.syncBlinking();
358
+ }
359
+ }
360
+ updated() {
361
+ this.syncBlinking();
362
+ }
363
+ disconnectedCallback() {
364
+ super.disconnectedCallback();
365
+ if (this._blinkAnimationCancel) {
366
+ this._blinkAnimationCancel();
367
+ this._blinkAnimationCancel = void 0;
368
+ }
369
+ }
344
370
  };
345
371
  ObcAlertIcon.styles = css`
346
372
  .wrapper {
@@ -1 +1 @@
1
- {"version":3,"file":"alert-icon.js","sources":["../../../src/components/alert-icon/alert-icon.ts"],"sourcesContent":["import {LitElement, html, css, TemplateResult, nothing} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../../icons/icon-caution-color-iec.js';\nimport {customElement} from '../../decorator.js';\nimport {AlertType} from '../../types.js';\nimport {\n getAlertBlinkMode,\n getBamAlertTypeForBlinking,\n supportsBlinking,\n} from '../../alert-severity.js';\nimport '../../icons/icon-alarm-badge-outline.js';\nimport '../../icons/icon-warning-badge-outline.js';\nimport '../../icons/icon-caution-badge-outline.js';\nimport '../../icons/icon-alarm-acknowledged-iec.js';\nimport '../../icons/icon-warning-acknowledged-iec.js';\nimport '../../icons/icon-alarm-rectified-iec.js';\nimport '../../icons/icon-warning-rectified-iec.js';\nimport '../../icons/icon-alarm-rectified-outlined.js';\nimport '../../icons/icon-warning-rectified-outlined.js';\nimport '../../icons/icon-alarm-silenced-iec.js';\nimport '../../icons/icon-alarm-silenced-outlined.js';\nimport '../../icons/icon-warning-silenced-iec.js';\nimport '../../icons/icon-warning-silenced-outlined.js';\nimport '../../icons/icon-alarm-unacknowledged-iec.js';\nimport '../../icons/icon-alarm-acknowledged-outlined.js';\nimport '../../icons/icon-warning-unacknowledged-iec.js';\nimport '../../icons/icon-warning-unacknowledged-outlined.js';\n\nimport '../alert-frame/critical-badge.js';\nimport '../alert-frame/diagnostic-badge.js';\nimport {criticalA, criticalB} from './icons/icon-critical.js';\nimport {\n criticalUnacknowledgedA,\n criticalUnacknowledgedB,\n} from './icons/icon-critical-unacknowledged.js';\nimport {\n criticalSilencedA,\n criticalSilencedB,\n} from './icons/icon-critical-silenced.js';\nimport {\n criticalRectifiedA,\n criticalRectifiedB,\n} from './icons/icon-critical-rectified.js';\nimport {criticalAcknowledged} from './icons/icon-critical-acknowledged.js';\nimport {\n lowUnacknowledgedA,\n lowUnacknowledgedB,\n} from './icons/icon-low-unacknowledged.js';\nimport {lowSilencedA, lowSilencedB} from './icons/icon-low-silenced.js';\nimport {lowRectifiedA, lowRectifiedB} from './icons/icon-low-rectified.js';\nimport {lowAcknowledged} from './icons/icon-low-acknowledged.js';\n\nenum AlertIconState {\n Silenced = 'silenced',\n Unacknowledged = 'unacknowledged',\n Acknowledged = 'acknowledged',\n Rectified = 'rectified',\n}\n\nenum AlertIconName {\n AlarmSilenced = 'alarm-silenced',\n AlarmUnack = 'alarm-unack',\n AlarmRectified = 'alarm-rectified',\n WarningUnack = 'warning-unack',\n WarningRectified = 'warning-rectified',\n WarningSilenced = 'warning-silenced',\n Critical = 'critical',\n CriticalUnack = 'critical-unack',\n CriticalSilenced = 'critical-silenced',\n CriticalRectified = 'critical-rectified',\n LowUnack = 'low-unack',\n LowSilenced = 'low-silenced',\n LowRectified = 'low-rectified',\n}\n\nconst mapping = {\n [AlertIconName.AlarmSilenced]: {\n a: html`<obi-alarm-silenced-iec usecsscolor></obi-alarm-silenced-iec>`,\n b: html`<obi-alarm-silenced-outlined\n usecsscolor\n ></obi-alarm-silenced-outlined>`,\n },\n [AlertIconName.AlarmUnack]: {\n a: html`<obi-alarm-unacknowledged-iec\n usecsscolor\n ></obi-alarm-unacknowledged-iec>`,\n b: html`<obi-alarm-acknowledged-outlined\n usecsscolor\n ></obi-alarm-acknowledged-outlined>`,\n },\n [AlertIconName.AlarmRectified]: {\n a: html`<obi-alarm-rectified-iec usecsscolor></obi-alarm-rectified-iec>`,\n b: html`<obi-alarm-rectified-outlined\n usecsscolor\n ></obi-alarm-rectified-outlined>`,\n },\n [AlertIconName.WarningUnack]: {\n a: html`<obi-warning-unacknowledged-iec\n usecsscolor\n ></obi-warning-unacknowledged-iec>`,\n b: html`<obi-warning-unacknowledged-outlined\n usecsscolor\n ></obi-warning-unacknowledged-outlined>`,\n },\n [AlertIconName.WarningRectified]: {\n a: html`<obi-warning-rectified-iec\n usecsscolor\n ></obi-warning-rectified-iec>`,\n b: html`<obi-warning-rectified-outlined\n usecsscolor\n ></obi-warning-rectified-outlined>`,\n },\n [AlertIconName.WarningSilenced]: {\n a: html`<obi-warning-silenced-iec usecsscolor></obi-warning-silenced-iec>`,\n b: html`<obi-warning-silenced-outlined\n usecsscolor\n ></obi-warning-silenced-outlined>`,\n },\n [AlertIconName.Critical]: {\n a: criticalA,\n b: criticalB,\n },\n [AlertIconName.CriticalUnack]: {\n a: criticalUnacknowledgedA,\n b: criticalUnacknowledgedB,\n },\n [AlertIconName.CriticalSilenced]: {\n a: criticalSilencedA,\n b: criticalSilencedB,\n },\n [AlertIconName.CriticalRectified]: {\n a: criticalRectifiedA,\n b: criticalRectifiedB,\n },\n [AlertIconName.LowUnack]: {\n a: lowUnacknowledgedA,\n b: lowUnacknowledgedB,\n },\n [AlertIconName.LowSilenced]: {\n a: lowSilencedA,\n b: lowSilencedB,\n },\n [AlertIconName.LowRectified]: {\n a: lowRectifiedA,\n b: lowRectifiedB,\n },\n};\n/**\n * `obc-alert-icon` – Animated alert icon for signaling alarm and warning states.\n *\n * Displays a specialized icon with a blinking effect to visually indicate alert or warning conditions. The icon type is determined by the `name` property, supporting both alarm and warning variants in different states (such as silenced, unacknowledged, or rectified).\n *\n * Appears in notification areas, alert banners, or status panels to draw attention to active or historical alert conditions. The blinking animation helps highlight urgency or status changes without requiring user interaction.\n *\n * ## Features\n * - **Multiple Icon Types:** Supports all alarm and warning types.\n * - **Blinking Animation:** Uses two SVG layers with alternating opacity to create a blinking effect, visually emphasizing the alert or warning state.\n * - **Adaptive Styling:** Applies different CSS variables for alarm and warning types to allow for distinct visual cues (e.g., color, blink timing).\n * - **Scalable:** Designed to fit any container size; scales with its parent element.\n *\n * ## Usage Guidelines\n * Use `obc-alert-icon` to visually represent the status of alarms or warnings in notification panels, alert lists, or system status areas. The blinking effect is intended to draw user attention to active or recent alert conditions. Select the appropriate `name` value to match the alert state you wish to indicate.\n *\n * **TODO(designer):** Provide guidance on when to use each icon variant (e.g., when to use \"rectified\" vs. \"silenced\"), and any best practices for icon placement or blink timing.\n *\n * ## Properties\n * - `type` (AlertType): The type of alarm to display.\n * - `status` (AlarmStatus): The status of the alarm to display.\n *\n * ## Best Practices\n * - Only use the blinking alert icon for states that require immediate or prominent user attention.\n * - Ensure the icon is sized appropriately for its context (e.g., 32x32px or 64x64px for status panels).\n * - Avoid using multiple blinking icons in close proximity to prevent visual overload.\n *\n * ## Example\n * ```html\n * <obc-alert-icon .alarmType=${alarm.type} .alarmStatus=${alarm.status}></obc-alert-icon>\n * ```\n *\n * @stable\n */\n@customElement('obc-alert-icon')\nexport class ObcAlertIcon extends LitElement {\n @property({type: String}) alertType: AlertType = AlertType.Alarm;\n /* @deprecated use `alertType` instead */\n @property({type: String}) type?: AlertType;\n /**\n * @availableWhen type in [Alarm, Warning, LevelHigh, LevelMedium, LevelLow]\n */\n @property({type: Boolean}) acknowledged?: boolean;\n /**\n * @availableWhen type in [Alarm, Warning, LevelHigh, LevelMedium, LevelLow]\n */\n @property({type: Boolean}) active?: boolean;\n @property({type: Boolean}) silenced?: boolean;\n\n private get _effectiveType(): AlertType {\n if (this.type) {\n return this.type;\n }\n return this.alertType;\n }\n\n private get bamType(): AlertType {\n return getBamAlertTypeForBlinking(this._effectiveType);\n }\n\n private get _effectiveState(): AlertIconState {\n if (this.active === false) {\n return AlertIconState.Rectified;\n } else if (this.acknowledged) {\n return AlertIconState.Acknowledged;\n } else if (this.silenced) {\n return AlertIconState.Silenced;\n } else if (this.active === true) {\n return AlertIconState.Unacknowledged;\n }\n return AlertIconState.Unacknowledged;\n }\n\n get icon() {\n if (this._effectiveType === AlertType.LevelCritical) {\n switch (this._effectiveState) {\n case AlertIconState.Rectified:\n return mapping[AlertIconName.CriticalRectified];\n case AlertIconState.Silenced:\n return mapping[AlertIconName.CriticalSilenced];\n case AlertIconState.Unacknowledged:\n return mapping[AlertIconName.CriticalUnack];\n default:\n return mapping[AlertIconName.Critical];\n }\n } else if (this._effectiveType === AlertType.LevelLow) {\n switch (this._effectiveState) {\n case AlertIconState.Rectified:\n return mapping[AlertIconName.LowRectified];\n case AlertIconState.Silenced:\n return mapping[AlertIconName.LowSilenced];\n case AlertIconState.Unacknowledged:\n return mapping[AlertIconName.LowUnack];\n default:\n return mapping[AlertIconName.LowUnack];\n }\n } else if (this.bamType === AlertType.Alarm) {\n switch (this._effectiveState) {\n case AlertIconState.Rectified:\n return mapping[AlertIconName.AlarmRectified];\n case AlertIconState.Silenced:\n return mapping[AlertIconName.AlarmSilenced];\n case AlertIconState.Unacknowledged:\n return mapping[AlertIconName.AlarmUnack];\n default:\n return null;\n }\n } else if (this.bamType === AlertType.Warning) {\n if (this.active === false) {\n return mapping[AlertIconName.WarningRectified];\n } else if (this.acknowledged) {\n return mapping[AlertIconName.WarningSilenced];\n } else {\n return mapping[AlertIconName.WarningUnack];\n }\n }\n\n return null;\n }\n\n private renderStaticIcon(): TemplateResult | typeof nothing {\n // Caution and diagnostic always show a fixed symbol, regardless of state.\n if (this._effectiveType === AlertType.Caution) {\n return html`<obi-caution-color-iec usecsscolor></obi-caution-color-iec>`;\n }\n if (this._effectiveType === AlertType.LevelDiagnostic) {\n return html`<obi-diagnostic-badge\n style=\"color: var(--alert-diagnostic-color);\"\n ></obi-diagnostic-badge>`;\n }\n if (this._effectiveState === AlertIconState.Acknowledged) {\n if (this._effectiveType === AlertType.LevelCritical) {\n return html`${criticalAcknowledged}`;\n }\n if (this._effectiveType === AlertType.LevelLow) {\n return html`${lowAcknowledged}`;\n }\n switch (this.bamType) {\n case AlertType.Alarm:\n return html`<obi-alarm-acknowledged-iec\n usecsscolor\n ></obi-alarm-acknowledged-iec>`;\n case AlertType.Warning:\n return html`<obi-warning-acknowledged-iec\n usecsscolor\n ></obi-warning-acknowledged-iec>`;\n default:\n return nothing;\n }\n } else if (this._effectiveState === AlertIconState.Rectified) {\n if (this._effectiveType === AlertType.LevelCritical) {\n return html`${criticalRectifiedB}`;\n }\n if (this._effectiveType === AlertType.LevelLow) {\n return html`${lowRectifiedB}`;\n }\n switch (this.bamType) {\n case AlertType.Alarm:\n return html`<obi-alarm-rectified-outlined\n usecsscolor\n ></obi-alarm-rectified-outlined>`;\n case AlertType.Warning:\n return html`<obi-warning-rectified-outlined\n usecsscolor\n ></obi-warning-rectified-outlined>`;\n default:\n return nothing;\n }\n }\n return nothing;\n }\n\n override render() {\n if (!this._effectiveType) {\n return html`<div>No alarm</div>`;\n }\n if (supportsBlinking(this._effectiveType, this.acknowledged ?? false)) {\n const icons = this.icon;\n if (!icons) {\n throw new Error('No icon found');\n }\n const blinkMode = getAlertBlinkMode(this._effectiveType);\n return html`\n <div\n class=${classMap({\n wrapper: true,\n [`blink-${blinkMode}`]: true,\n })}\n >\n <span class=\"a\">${icons.a}</span>\n <span class=\"b\">${icons.b}</span>\n </div>\n `;\n }\n return html`<div class=\"wrapper\">${this.renderStaticIcon()}</div>`;\n }\n\n static override styles = css`\n .wrapper {\n height: 100%;\n width: 100%;\n position: relative;\n\n obi-diagnostic-badge,\n obi-critical-badge {\n display: block;\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n }\n\n svg,\n .a,\n .b {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n }\n &.blink-alarm .a {\n opacity: var(--alarm-blink-on);\n }\n\n &.blink-alarm .b {\n opacity: var(--alarm-blink-off);\n }\n\n &.blink-critical .a {\n opacity: var(--critical-blink-on);\n }\n\n &.blink-critical .b {\n opacity: var(--critical-blink-off);\n }\n\n &.blink-warning .a {\n opacity: var(--warning-blink-on);\n }\n\n &.blink-warning .b {\n opacity: var(--warning-blink-off);\n }\n\n &.blink-low .a {\n opacity: var(--low-blink-on);\n }\n\n &.blink-low .b {\n opacity: var(--low-blink-off);\n }\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-icon': ObcAlertIcon;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,MAAM,UAAU;AAAA,EACd;AAAA,IAAC;AAAA;AAAA,KAA8B;AAAA,IAC7B,GAAG;AAAA,IACH,GAAG;AAAA;AAAA;AAAA,EAAA;AAAA,EAIL;AAAA,IAAC;AAAA;AAAA,KAA2B;AAAA,IAC1B,GAAG;AAAA;AAAA;AAAA,IAGH,GAAG;AAAA;AAAA;AAAA,EAAA;AAAA,EAIL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AAC,MAAM,QAAA,CAAQ;AAAA,GAXd,aAWgB,WAAA,UAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAZd,aAYgB,WAAA,YAAA,CAAA;AAZhB,eAAN,gBAAA;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB,YAAA;"}
1
+ {"version":3,"file":"alert-icon.js","sources":["../../../src/components/alert-icon/alert-icon.ts"],"sourcesContent":["import {LitElement, html, css, TemplateResult, nothing} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../../icons/icon-caution-color-iec.js';\nimport {customElement} from '../../decorator.js';\nimport {AlertType} from '../../types.js';\nimport {\n getAlertBlinkMode,\n getBamAlertTypeForBlinking,\n supportsBlinking,\n} from '../../alert-severity.js';\nimport '../../icons/icon-alarm-badge-outline.js';\nimport '../../icons/icon-warning-badge-outline.js';\nimport '../../icons/icon-caution-badge-outline.js';\nimport '../../icons/icon-alarm-acknowledged-iec.js';\nimport '../../icons/icon-warning-acknowledged-iec.js';\nimport '../../icons/icon-alarm-rectified-iec.js';\nimport '../../icons/icon-warning-rectified-iec.js';\nimport '../../icons/icon-alarm-rectified-outlined.js';\nimport '../../icons/icon-warning-rectified-outlined.js';\nimport '../../icons/icon-alarm-silenced-iec.js';\nimport '../../icons/icon-alarm-silenced-outlined.js';\nimport '../../icons/icon-warning-silenced-iec.js';\nimport '../../icons/icon-warning-silenced-outlined.js';\nimport '../../icons/icon-alarm-unacknowledged-iec.js';\nimport '../../icons/icon-alarm-acknowledged-outlined.js';\nimport '../../icons/icon-warning-unacknowledged-iec.js';\nimport '../../icons/icon-warning-unacknowledged-outlined.js';\n\nimport '../alert-frame/critical-badge.js';\nimport '../alert-frame/diagnostic-badge.js';\nimport {criticalA, criticalB} from './icons/icon-critical.js';\nimport {\n criticalUnacknowledgedA,\n criticalUnacknowledgedB,\n} from './icons/icon-critical-unacknowledged.js';\nimport {\n criticalSilencedA,\n criticalSilencedB,\n} from './icons/icon-critical-silenced.js';\nimport {\n criticalRectifiedA,\n criticalRectifiedB,\n} from './icons/icon-critical-rectified.js';\nimport {criticalAcknowledged} from './icons/icon-critical-acknowledged.js';\nimport {\n lowUnacknowledgedA,\n lowUnacknowledgedB,\n} from './icons/icon-low-unacknowledged.js';\nimport {lowSilencedA, lowSilencedB} from './icons/icon-low-silenced.js';\nimport {lowRectifiedA, lowRectifiedB} from './icons/icon-low-rectified.js';\nimport {lowAcknowledged} from './icons/icon-low-acknowledged.js';\nimport {blinkingAll} from '../../palettes/blinking.js';\n\nenum AlertIconState {\n Silenced = 'silenced',\n Unacknowledged = 'unacknowledged',\n Acknowledged = 'acknowledged',\n Rectified = 'rectified',\n}\n\nenum AlertIconName {\n AlarmSilenced = 'alarm-silenced',\n AlarmUnack = 'alarm-unack',\n AlarmRectified = 'alarm-rectified',\n WarningUnack = 'warning-unack',\n WarningRectified = 'warning-rectified',\n WarningSilenced = 'warning-silenced',\n Critical = 'critical',\n CriticalUnack = 'critical-unack',\n CriticalSilenced = 'critical-silenced',\n CriticalRectified = 'critical-rectified',\n LowUnack = 'low-unack',\n LowSilenced = 'low-silenced',\n LowRectified = 'low-rectified',\n}\n\nconst mapping = {\n [AlertIconName.AlarmSilenced]: {\n a: html`<obi-alarm-silenced-iec usecsscolor></obi-alarm-silenced-iec>`,\n b: html`<obi-alarm-silenced-outlined\n usecsscolor\n ></obi-alarm-silenced-outlined>`,\n },\n [AlertIconName.AlarmUnack]: {\n a: html`<obi-alarm-unacknowledged-iec\n usecsscolor\n ></obi-alarm-unacknowledged-iec>`,\n b: html`<obi-alarm-acknowledged-outlined\n usecsscolor\n ></obi-alarm-acknowledged-outlined>`,\n },\n [AlertIconName.AlarmRectified]: {\n a: html`<obi-alarm-rectified-iec usecsscolor></obi-alarm-rectified-iec>`,\n b: html`<obi-alarm-rectified-outlined\n usecsscolor\n ></obi-alarm-rectified-outlined>`,\n },\n [AlertIconName.WarningUnack]: {\n a: html`<obi-warning-unacknowledged-iec\n usecsscolor\n ></obi-warning-unacknowledged-iec>`,\n b: html`<obi-warning-unacknowledged-outlined\n usecsscolor\n ></obi-warning-unacknowledged-outlined>`,\n },\n [AlertIconName.WarningRectified]: {\n a: html`<obi-warning-rectified-iec\n usecsscolor\n ></obi-warning-rectified-iec>`,\n b: html`<obi-warning-rectified-outlined\n usecsscolor\n ></obi-warning-rectified-outlined>`,\n },\n [AlertIconName.WarningSilenced]: {\n a: html`<obi-warning-silenced-iec usecsscolor></obi-warning-silenced-iec>`,\n b: html`<obi-warning-silenced-outlined\n usecsscolor\n ></obi-warning-silenced-outlined>`,\n },\n [AlertIconName.Critical]: {\n a: criticalA,\n b: criticalB,\n },\n [AlertIconName.CriticalUnack]: {\n a: criticalUnacknowledgedA,\n b: criticalUnacknowledgedB,\n },\n [AlertIconName.CriticalSilenced]: {\n a: criticalSilencedA,\n b: criticalSilencedB,\n },\n [AlertIconName.CriticalRectified]: {\n a: criticalRectifiedA,\n b: criticalRectifiedB,\n },\n [AlertIconName.LowUnack]: {\n a: lowUnacknowledgedA,\n b: lowUnacknowledgedB,\n },\n [AlertIconName.LowSilenced]: {\n a: lowSilencedA,\n b: lowSilencedB,\n },\n [AlertIconName.LowRectified]: {\n a: lowRectifiedA,\n b: lowRectifiedB,\n },\n};\n/**\n * `obc-alert-icon` – Animated alert icon for signaling alarm and warning states.\n *\n * Displays a specialized icon with a blinking effect to visually indicate alert or warning conditions. The icon type is determined by the `name` property, supporting both alarm and warning variants in different states (such as silenced, unacknowledged, or rectified).\n *\n * Appears in notification areas, alert banners, or status panels to draw attention to active or historical alert conditions. The blinking animation helps highlight urgency or status changes without requiring user interaction.\n *\n * ## Features\n * - **Multiple Icon Types:** Supports all alarm and warning types.\n * - **Blinking Animation:** Uses two SVG layers with alternating opacity to create a blinking effect, visually emphasizing the alert or warning state.\n * - **Adaptive Styling:** Applies different CSS variables for alarm and warning types to allow for distinct visual cues (e.g., color, blink timing).\n * - **Scalable:** Designed to fit any container size; scales with its parent element.\n *\n * ## Usage Guidelines\n * Use `obc-alert-icon` to visually represent the status of alarms or warnings in notification panels, alert lists, or system status areas. The blinking effect is intended to draw user attention to active or recent alert conditions. Select the appropriate `name` value to match the alert state you wish to indicate.\n *\n * **TODO(designer):** Provide guidance on when to use each icon variant (e.g., when to use \"rectified\" vs. \"silenced\"), and any best practices for icon placement or blink timing.\n *\n * ## Properties\n * - `type` (AlertType): The type of alarm to display.\n * - `status` (AlarmStatus): The status of the alarm to display.\n *\n * ## Best Practices\n * - Only use the blinking alert icon for states that require immediate or prominent user attention.\n * - Ensure the icon is sized appropriately for its context (e.g., 32x32px or 64x64px for status panels).\n * - Avoid using multiple blinking icons in close proximity to prevent visual overload.\n *\n * ## Example\n * ```html\n * <obc-alert-icon .alarmType=${alarm.type} .alarmStatus=${alarm.status}></obc-alert-icon>\n * ```\n *\n * @stable\n */\n@customElement('obc-alert-icon')\nexport class ObcAlertIcon extends LitElement {\n @property({type: String}) alertType: AlertType = AlertType.Alarm;\n /* @deprecated use `alertType` instead */\n @property({type: String}) type?: AlertType;\n /**\n * @availableWhen type in [Alarm, Warning, LevelHigh, LevelMedium, LevelLow]\n */\n @property({type: Boolean}) acknowledged?: boolean;\n /**\n * @availableWhen type in [Alarm, Warning, LevelHigh, LevelMedium, LevelLow]\n */\n @property({type: Boolean}) active?: boolean;\n @property({type: Boolean}) silenced?: boolean;\n\n private get _effectiveType(): AlertType {\n if (this.type) {\n return this.type;\n }\n return this.alertType;\n }\n\n private get bamType(): AlertType {\n return getBamAlertTypeForBlinking(this._effectiveType);\n }\n\n private get _effectiveState(): AlertIconState {\n if (this.active === false) {\n return AlertIconState.Rectified;\n } else if (this.acknowledged) {\n return AlertIconState.Acknowledged;\n } else if (this.silenced) {\n return AlertIconState.Silenced;\n } else if (this.active === true) {\n return AlertIconState.Unacknowledged;\n }\n return AlertIconState.Unacknowledged;\n }\n\n get icon() {\n if (this._effectiveType === AlertType.LevelCritical) {\n switch (this._effectiveState) {\n case AlertIconState.Rectified:\n return mapping[AlertIconName.CriticalRectified];\n case AlertIconState.Silenced:\n return mapping[AlertIconName.CriticalSilenced];\n case AlertIconState.Unacknowledged:\n return mapping[AlertIconName.CriticalUnack];\n default:\n return mapping[AlertIconName.Critical];\n }\n } else if (this._effectiveType === AlertType.LevelLow) {\n switch (this._effectiveState) {\n case AlertIconState.Rectified:\n return mapping[AlertIconName.LowRectified];\n case AlertIconState.Silenced:\n return mapping[AlertIconName.LowSilenced];\n case AlertIconState.Unacknowledged:\n return mapping[AlertIconName.LowUnack];\n default:\n return mapping[AlertIconName.LowUnack];\n }\n } else if (this.bamType === AlertType.Alarm) {\n switch (this._effectiveState) {\n case AlertIconState.Rectified:\n return mapping[AlertIconName.AlarmRectified];\n case AlertIconState.Silenced:\n return mapping[AlertIconName.AlarmSilenced];\n case AlertIconState.Unacknowledged:\n return mapping[AlertIconName.AlarmUnack];\n default:\n return null;\n }\n } else if (this.bamType === AlertType.Warning) {\n if (this.active === false) {\n return mapping[AlertIconName.WarningRectified];\n } else if (this.acknowledged) {\n return mapping[AlertIconName.WarningSilenced];\n } else {\n return mapping[AlertIconName.WarningUnack];\n }\n }\n\n return null;\n }\n\n private renderStaticIcon(): TemplateResult | typeof nothing {\n // Caution and diagnostic always show a fixed symbol, regardless of state.\n if (this._effectiveType === AlertType.Caution) {\n return html`<obi-caution-color-iec usecsscolor></obi-caution-color-iec>`;\n }\n if (this._effectiveType === AlertType.LevelDiagnostic) {\n return html`<obi-diagnostic-badge\n style=\"color: var(--alert-diagnostic-color);\"\n ></obi-diagnostic-badge>`;\n }\n if (this._effectiveState === AlertIconState.Acknowledged) {\n if (this._effectiveType === AlertType.LevelCritical) {\n return html`${criticalAcknowledged}`;\n }\n if (this._effectiveType === AlertType.LevelLow) {\n return html`${lowAcknowledged}`;\n }\n switch (this.bamType) {\n case AlertType.Alarm:\n return html`<obi-alarm-acknowledged-iec\n usecsscolor\n ></obi-alarm-acknowledged-iec>`;\n case AlertType.Warning:\n return html`<obi-warning-acknowledged-iec\n usecsscolor\n ></obi-warning-acknowledged-iec>`;\n default:\n return nothing;\n }\n } else if (this._effectiveState === AlertIconState.Rectified) {\n if (this._effectiveType === AlertType.LevelCritical) {\n return html`${criticalRectifiedB}`;\n }\n if (this._effectiveType === AlertType.LevelLow) {\n return html`${lowRectifiedB}`;\n }\n switch (this.bamType) {\n case AlertType.Alarm:\n return html`<obi-alarm-rectified-outlined\n usecsscolor\n ></obi-alarm-rectified-outlined>`;\n case AlertType.Warning:\n return html`<obi-warning-rectified-outlined\n usecsscolor\n ></obi-warning-rectified-outlined>`;\n default:\n return nothing;\n }\n }\n return nothing;\n }\n\n override render() {\n if (!this._effectiveType) {\n return html`<div>No alarm</div>`;\n }\n if (supportsBlinking(this._effectiveType, this.acknowledged ?? false)) {\n const icons = this.icon;\n if (!icons) {\n throw new Error('No icon found');\n }\n const blinkMode = getAlertBlinkMode(this._effectiveType);\n return html`\n <div\n class=${classMap({\n wrapper: true,\n [`blink-${blinkMode}`]: true,\n })}\n >\n <span class=\"a\">${icons.a}</span>\n <span class=\"b\">${icons.b}</span>\n </div>\n `;\n }\n return html`<div class=\"wrapper\">${this.renderStaticIcon()}</div>`;\n }\n\n private _blinkAnimationCancel?: () => void;\n\n private syncBlinking(): void {\n if (\n this._blinkAnimationCancel &&\n !supportsBlinking(this._effectiveType, this.acknowledged ?? false)\n ) {\n this._blinkAnimationCancel();\n this._blinkAnimationCancel = undefined;\n }\n if (\n !this._blinkAnimationCancel &&\n supportsBlinking(this._effectiveType, this.acknowledged ?? false)\n ) {\n this._blinkAnimationCancel = blinkingAll(this);\n }\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (this.hasUpdated) {\n this.syncBlinking();\n }\n }\n\n override updated(): void {\n this.syncBlinking();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this._blinkAnimationCancel) {\n this._blinkAnimationCancel();\n this._blinkAnimationCancel = undefined;\n }\n }\n\n static override styles = css`\n .wrapper {\n height: 100%;\n width: 100%;\n position: relative;\n\n obi-diagnostic-badge,\n obi-critical-badge {\n display: block;\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n }\n\n svg,\n .a,\n .b {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n }\n &.blink-alarm .a {\n opacity: var(--alarm-blink-on);\n }\n\n &.blink-alarm .b {\n opacity: var(--alarm-blink-off);\n }\n\n &.blink-critical .a {\n opacity: var(--critical-blink-on);\n }\n\n &.blink-critical .b {\n opacity: var(--critical-blink-off);\n }\n\n &.blink-warning .a {\n opacity: var(--warning-blink-on);\n }\n\n &.blink-warning .b {\n opacity: var(--warning-blink-off);\n }\n\n &.blink-low .a {\n opacity: var(--low-blink-on);\n }\n\n &.blink-low .b {\n opacity: var(--low-blink-off);\n }\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-icon': ObcAlertIcon;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EA,MAAM,UAAU;AAAA,EACd;AAAA,IAAC;AAAA;AAAA,KAA8B;AAAA,IAC7B,GAAG;AAAA,IACH,GAAG;AAAA;AAAA;AAAA,EAAA;AAAA,EAIL;AAAA,IAAC;AAAA;AAAA,KAA2B;AAAA,IAC1B,GAAG;AAAA;AAAA;AAAA,IAGH,GAAG;AAAA;AAAA;AAAA,EAAA;AAAA,EAIL;AAAA,IAAC;AAAA;AAAA,KAA+B;AAAA,IAC9B,GAAG;AAAA,IACH,GAAG;AAAA;AAAA;AAAA,EAAA;AAAA,EAIL;AAAA,IAAC;AAAA;AAAA,KAA6B;AAAA,IAC5B,GAAG;AAAA;AAAA;AAAA,IAGH,GAAG;AAAA;AAAA;AAAA,EAAA;AAAA,EAIL;AAAA,IAAC;AAAA;AAAA,KAAiC;AAAA,IAChC,GAAG;AAAA;AAAA;AAAA,IAGH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A,CAAO;AAAA,GADb,aACe,WAAA,aAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAHb,aAGe,WAAA,QAAA,CAAA;AAIC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAPd,aAOgB,WAAA,gBAAA,CAAA;AAIA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAXd,aAWgB,WAAA,UAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAZd,aAYgB,WAAA,YAAA,CAAA;AAZhB,eAAN,gBAAA;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB,YAAA;"}
@@ -106,9 +106,13 @@ const compentStyle = css`* {
106
106
  "liga" off,
107
107
  "clig" off,
108
108
  "ss04" on;
109
+ --leading-icon-size: var(
110
+ --app-components-integration-system-navigation-item-horizontal-icon-size
111
+ );
109
112
  anchor-name: --touch-target;
110
113
  display: flex;
111
114
  align-items: center;
115
+ text-align: left;
112
116
  gap: 4px;
113
117
  flex: 1;
114
118
  min-height: var(
@@ -263,22 +267,25 @@ const compentStyle = css`* {
263
267
  color: var(--integration-on-normal-neutral-color);
264
268
  }
265
269
 
266
- .touch-target .icon.leading {
267
- width: var(
268
- --app-components-integration-system-navigation-item-horizontal-icon-size
269
- );
270
- height: var(
271
- --app-components-integration-system-navigation-item-horizontal-icon-size
270
+ .touch-target.has-status {
271
+ --leading-icon-size: var(
272
+ --app-components-integration-system-navigation-item-horizontal-icon-size-large
272
273
  );
273
- min-width: var(
274
- --app-components-integration-system-navigation-item-horizontal-icon-size
275
- );
276
- flex: 0 0
277
- var(
278
- --app-components-integration-system-navigation-item-horizontal-icon-size
279
- );
280
274
  }
281
275
 
276
+ .touch-target .icon.leading {
277
+ width: var(--leading-icon-size);
278
+ height: var(--leading-icon-size);
279
+ min-width: var(--leading-icon-size);
280
+ flex: 0 0 var(--leading-icon-size);
281
+ }
282
+
283
+ :is(.touch-target .icon.leading) ::slotted(*) {
284
+ display: block;
285
+ width: 100%;
286
+ height: 100%;
287
+ }
288
+
282
289
  .touch-target .icon.trailing {
283
290
  width: 28px;
284
291
  height: 24px;
@@ -1 +1 @@
1
- {"version":3,"file":"integration-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"integration-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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