@oicl/openbridge-webcomponents 2.0.0-next.57 → 2.0.0-next.59

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 (133) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +6585 -4581
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +1047 -83
  4. package/dist/alert-severity.d.ts +38 -0
  5. package/dist/alert-severity.d.ts.map +1 -0
  6. package/dist/alert-severity.js +176 -0
  7. package/dist/alert-severity.js.map +1 -0
  8. package/dist/ar/building-blocks/poi-header/poi-header.css.js +38 -7
  9. package/dist/ar/building-blocks/poi-header/poi-header.css.js.map +1 -1
  10. package/dist/ar/building-blocks/poi-header/poi-header.d.ts +7 -2
  11. package/dist/ar/building-blocks/poi-header/poi-header.d.ts.map +1 -1
  12. package/dist/ar/building-blocks/poi-header/poi-header.js +5 -0
  13. package/dist/ar/building-blocks/poi-header/poi-header.js.map +1 -1
  14. package/dist/ar/poi-button/poi-button.css.js +110 -32
  15. package/dist/ar/poi-button/poi-button.css.js.map +1 -1
  16. package/dist/ar/poi-button/poi-button.d.ts +7 -2
  17. package/dist/ar/poi-button/poi-button.d.ts.map +1 -1
  18. package/dist/ar/poi-button/poi-button.js +15 -0
  19. package/dist/ar/poi-button/poi-button.js.map +1 -1
  20. package/dist/ar/types.d.ts +6 -1
  21. package/dist/ar/types.d.ts.map +1 -1
  22. package/dist/ar/types.js +5 -0
  23. package/dist/ar/types.js.map +1 -1
  24. package/dist/automation/automation-badge/automation-badge.d.ts +9 -1
  25. package/dist/automation/automation-badge/automation-badge.d.ts.map +1 -1
  26. package/dist/automation/automation-badge/automation-badge.js +119 -12
  27. package/dist/automation/automation-badge/automation-badge.js.map +1 -1
  28. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +25 -1
  29. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
  30. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +7 -2
  31. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
  32. package/dist/automation/automation-button/abstract-automation-button.d.ts +10 -3
  33. package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
  34. package/dist/automation/automation-button/abstract-automation-button.js +23 -2
  35. package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
  36. package/dist/automation/automation-button/automation-button.css.js +9 -4
  37. package/dist/automation/automation-button/automation-button.css.js.map +1 -1
  38. package/dist/automation/automation-button/automation-button.d.ts +4 -2
  39. package/dist/automation/automation-button/automation-button.d.ts.map +1 -1
  40. package/dist/automation/automation-button/automation-button.js +24 -6
  41. package/dist/automation/automation-button/automation-button.js.map +1 -1
  42. package/dist/automation/automation-tank/automation-tank.d.ts +3 -2
  43. package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
  44. package/dist/automation/automation-tank/automation-tank.js +13 -2
  45. package/dist/automation/automation-tank/automation-tank.js.map +1 -1
  46. package/dist/building-blocks/instrument-radial/instrument-radial.d.ts +10 -0
  47. package/dist/building-blocks/instrument-radial/instrument-radial.d.ts.map +1 -1
  48. package/dist/building-blocks/instrument-radial/instrument-radial.js +86 -21
  49. package/dist/building-blocks/instrument-radial/instrument-radial.js.map +1 -1
  50. package/dist/components/accordion-card/accordion-card.css.js +34 -0
  51. package/dist/components/accordion-card/accordion-card.css.js.map +1 -1
  52. package/dist/components/accordion-card/accordion-card.d.ts +3 -2
  53. package/dist/components/accordion-card/accordion-card.d.ts.map +1 -1
  54. package/dist/components/accordion-card/accordion-card.js +4 -3
  55. package/dist/components/accordion-card/accordion-card.js.map +1 -1
  56. package/dist/components/alert-button/alert-button.css.js +744 -7
  57. package/dist/components/alert-button/alert-button.css.js.map +1 -1
  58. package/dist/components/alert-button/alert-button.d.ts +3 -1
  59. package/dist/components/alert-button/alert-button.d.ts.map +1 -1
  60. package/dist/components/alert-button/alert-button.js +33 -31
  61. package/dist/components/alert-button/alert-button.js.map +1 -1
  62. package/dist/components/alert-frame/alert-frame.css.js +116 -29
  63. package/dist/components/alert-frame/alert-frame.css.js.map +1 -1
  64. package/dist/components/alert-frame/alert-frame.d.ts +42 -15
  65. package/dist/components/alert-frame/alert-frame.d.ts.map +1 -1
  66. package/dist/components/alert-frame/alert-frame.js +68 -17
  67. package/dist/components/alert-frame/alert-frame.js.map +1 -1
  68. package/dist/components/alert-frame/critical-badge.d.ts +12 -0
  69. package/dist/components/alert-frame/critical-badge.d.ts.map +1 -0
  70. package/dist/components/alert-frame/critical-badge.js +47 -0
  71. package/dist/components/alert-frame/critical-badge.js.map +1 -0
  72. package/dist/components/alert-frame/diagnostic-badge.d.ts +12 -0
  73. package/dist/components/alert-frame/diagnostic-badge.d.ts.map +1 -0
  74. package/dist/components/alert-frame/diagnostic-badge.js +60 -0
  75. package/dist/components/alert-frame/diagnostic-badge.js.map +1 -0
  76. package/dist/components/alert-icon/alert-icon.d.ts +6 -1
  77. package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
  78. package/dist/components/alert-icon/alert-icon.js +96 -38
  79. package/dist/components/alert-icon/alert-icon.js.map +1 -1
  80. package/dist/components/alert-icon/icons/icon-critical.d.ts +3 -0
  81. package/dist/components/alert-icon/icons/icon-critical.d.ts.map +1 -0
  82. package/dist/components/alert-icon/icons/icon-critical.js +26 -0
  83. package/dist/components/alert-icon/icons/icon-critical.js.map +1 -0
  84. package/dist/components/alert-list-details/alert-list-details.d.ts.map +1 -1
  85. package/dist/components/alert-list-details/alert-list-details.js +6 -7
  86. package/dist/components/alert-list-details/alert-list-details.js.map +1 -1
  87. package/dist/components/badge/badge.css.js +50 -2
  88. package/dist/components/badge/badge.css.js.map +1 -1
  89. package/dist/components/badge/badge.d.ts +13 -2
  90. package/dist/components/badge/badge.d.ts.map +1 -1
  91. package/dist/components/badge/badge.js +54 -0
  92. package/dist/components/badge/badge.js.map +1 -1
  93. package/dist/index.js +2 -1
  94. package/dist/manual-icon/icon-alerts-critical-twotone.d.ts +30 -0
  95. package/dist/manual-icon/icon-alerts-critical-twotone.d.ts.map +1 -0
  96. package/dist/manual-icon/icon-alerts-critical-twotone.js +55 -0
  97. package/dist/manual-icon/icon-alerts-critical-twotone.js.map +1 -0
  98. package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts +30 -0
  99. package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts.map +1 -0
  100. package/dist/manual-icon/icon-alerts-diagnostic-twotone.js +55 -0
  101. package/dist/manual-icon/icon-alerts-diagnostic-twotone.js.map +1 -0
  102. package/dist/navigation-instruments/gauge-radial/gauge-radial.css.js +99 -0
  103. package/dist/navigation-instruments/gauge-radial/gauge-radial.css.js.map +1 -0
  104. package/dist/navigation-instruments/gauge-radial/gauge-radial.d.ts +42 -7
  105. package/dist/navigation-instruments/gauge-radial/gauge-radial.d.ts.map +1 -1
  106. package/dist/navigation-instruments/gauge-radial/gauge-radial.js +178 -31
  107. package/dist/navigation-instruments/gauge-radial/gauge-radial.js.map +1 -1
  108. package/dist/navigation-instruments/readout/readout.css.js +7 -18
  109. package/dist/navigation-instruments/readout/readout.css.js.map +1 -1
  110. package/dist/navigation-instruments/readout/readout.d.ts +6 -7
  111. package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
  112. package/dist/navigation-instruments/readout/readout.js +54 -52
  113. package/dist/navigation-instruments/readout/readout.js.map +1 -1
  114. package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +9 -36
  115. package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js.map +1 -1
  116. package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts +8 -8
  117. package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts.map +1 -1
  118. package/dist/navigation-instruments/readout-list-item/readout-list-item.js +49 -42
  119. package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
  120. package/dist/navigation-instruments/watch/tickmark.d.ts +2 -1
  121. package/dist/navigation-instruments/watch/tickmark.d.ts.map +1 -1
  122. package/dist/navigation-instruments/watch/tickmark.js +24 -4
  123. package/dist/navigation-instruments/watch/tickmark.js.map +1 -1
  124. package/dist/navigation-instruments/watch/watch.d.ts +23 -1
  125. package/dist/navigation-instruments/watch/watch.d.ts.map +1 -1
  126. package/dist/navigation-instruments/watch/watch.js +48 -20
  127. package/dist/navigation-instruments/watch/watch.js.map +1 -1
  128. package/dist/openbridge.css +155 -0
  129. package/dist/types.d.ts +7 -1
  130. package/dist/types.d.ts.map +1 -1
  131. package/dist/types.js +18 -7
  132. package/dist/types.js.map +1 -1
  133. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"alert-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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  import '../../icons/icon-notification.js';
6
- import '../../icons/icon-notification-filled.js';
7
6
  import '../../icons/icon-notification-advice.js';
8
7
  import '../../icons/icon-notification-advice-active.js';
9
8
  import '../../icons/icon-silence-iec.js';
10
9
  import '../../icons/icon-alerts-alarm-twotone.js';
11
10
  import '../../icons/icon-alerts-warning-twotone.js';
12
11
  import '../../icons/icon-alerts-caution-twotone.js';
12
+ import '../../manual-icon/icon-alerts-critical-twotone.js';
13
+ import '../../manual-icon/icon-alerts-diagnostic-twotone.js';
13
14
  /**
14
15
  * `ObcAlertButtonType` – Enum for alert button visual and behavioral variants.
15
16
  *
@@ -167,6 +168,7 @@ export declare class ObcAlertButton extends LitElement {
167
168
  private resizeListener;
168
169
  connectedCallback(): void;
169
170
  disconnectedCallback(): void;
171
+ private renderAlertTwotoneIcon;
170
172
  private alertIcon;
171
173
  private alertIconNegative;
172
174
  private get activeType();
@@ -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,yCAAyC,CAAC;AACjD,OAAO,gDAAgD,CAAC;AACxD,OAAO,iCAAiC,CAAC;AACzC,OAAO,0CAA0C,CAAC;AAClD,OAAO,4CAA4C,CAAC;AACpD,OAAO,4CAA4C,CAAC;AACpD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIzC;;;;;;GAMG;AACH,oBAAY,kBAAkB;IAC5B,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;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;;OAEG;IACwB,qBAAqB,UAAS;IAEzD;;;;OAIG;IACwB,OAAO,UAAS;IAE3C;;;;OAIG;IACwB,QAAQ,UAAS;IAE5C;;;;;OAKG;IACuB,mBAAmB,SAAK;IAElD;;;;;OAKG;IACuB,4BAA4B,SAAK;IAElD,OAAO,CAAC,KAAK,CAAqB;IAE3C,OAAO,CAAC,cAAc,CAEpB;IAEO,iBAAiB;IAKjB,oBAAoB;IAK7B,OAAO,CAAC,SAAS;IA2BjB,OAAO,CAAC,iBAAiB;IAwBzB,OAAO,KAAK,UAAU,GAQrB;IAED,OAAO,KAAK,wBAAwB,GAMnC;IAEQ,MAAM;IAwDf,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,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;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;;OAEG;IACwB,qBAAqB,UAAS;IAEzD;;;;OAIG;IACwB,OAAO,UAAS;IAE3C;;;;OAIG;IACwB,QAAQ,UAAS;IAE5C;;;;;OAKG;IACuB,mBAAmB,SAAK;IAElD;;;;;OAKG;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"}
@@ -4,14 +4,15 @@ import compentStyle from "./alert-button.css.js";
4
4
  import "../../icons/icon-alerts.js";
5
5
  import "../../icons/icon-alerts-active.js";
6
6
  import "../../icons/icon-notification.js";
7
- import "../../icons/icon-notification-filled.js";
8
7
  import "../../icons/icon-notification-advice.js";
9
8
  import "../../icons/icon-notification-advice-active.js";
10
9
  import "../../icons/icon-silence-iec.js";
11
10
  import "../../icons/icon-alerts-alarm-twotone.js";
12
11
  import "../../icons/icon-alerts-warning-twotone.js";
13
12
  import "../../icons/icon-alerts-caution-twotone.js";
14
- import { AlertType } from "../../types.js";
13
+ import "../../manual-icon/icon-alerts-critical-twotone.js";
14
+ import "../../manual-icon/icon-alerts-diagnostic-twotone.js";
15
+ import { getAlertTwotoneComponent, AlertTwotoneComponent, supportsBlinking } from "../../alert-severity.js";
15
16
  import { classMap } from "lit/directives/class-map.js";
16
17
  import { customElement } from "../../decorator.js";
17
18
  var __defProp = Object.defineProperty;
@@ -55,51 +56,52 @@ let ObcAlertButton = class extends LitElement {
55
56
  window.removeEventListener("resize", this.resizeListener);
56
57
  super.disconnectedCallback();
57
58
  }
58
- alertIcon() {
59
- const isIdle = this.nAlerts === 0;
60
- if (isIdle) {
61
- return html`<obi-alerts class="icon"></obi-alerts>`;
62
- } else {
63
- if (this.type === "enhanced") {
64
- return html`<obi-alerts-active class="icon"></obi-alerts-active>`;
65
- } else if (this.alertType === AlertType.Alarm) {
66
- return html`<obi-alerts-alarm-twotone
59
+ renderAlertTwotoneIcon() {
60
+ const twotone = this.alertType ? getAlertTwotoneComponent(this.alertType) : AlertTwotoneComponent.Caution;
61
+ switch (twotone) {
62
+ case AlertTwotoneComponent.Critical:
63
+ return html`<obi-alerts-critical-twotone
67
64
  useCssColor
68
65
  class="icon"
69
- ></obi-alerts-alarm-twotone>`;
70
- } else if (this.alertType === AlertType.Warning) {
66
+ ></obi-alerts-critical-twotone>`;
67
+ case AlertTwotoneComponent.Diagnostic:
68
+ return html`<obi-alerts-diagnostic-twotone
69
+ useCssColor
70
+ class="icon"
71
+ ></obi-alerts-diagnostic-twotone>`;
72
+ case AlertTwotoneComponent.Warning:
71
73
  return html`<obi-alerts-warning-twotone
72
74
  useCssColor
73
75
  class="icon"
74
76
  ></obi-alerts-warning-twotone>`;
75
- } else {
77
+ case AlertTwotoneComponent.Caution:
76
78
  return html`<obi-alerts-caution-twotone
77
79
  useCssColor
78
80
  class="icon"
79
81
  ></obi-alerts-caution-twotone>`;
80
- }
82
+ default:
83
+ return html`<obi-alerts-alarm-twotone
84
+ useCssColor
85
+ class="icon"
86
+ ></obi-alerts-alarm-twotone>`;
87
+ }
88
+ }
89
+ alertIcon() {
90
+ const isIdle = this.nAlerts === 0;
91
+ if (isIdle) {
92
+ return html`<obi-alerts class="icon"></obi-alerts>`;
93
+ }
94
+ if (this.type === "enhanced") {
95
+ return html`<obi-alerts-active class="icon"></obi-alerts-active>`;
81
96
  }
97
+ return this.renderAlertTwotoneIcon();
82
98
  }
83
99
  alertIconNegative() {
84
100
  const useIdle = this.nAlerts === 0 || this.type !== "enhanced";
85
101
  if (useIdle) {
86
102
  return html`<obi-alerts class="icon"></obi-alerts>`;
87
- } else if (this.alertType === AlertType.Alarm) {
88
- return html`<obi-alerts-alarm-twotone
89
- useCssColor
90
- class="icon"
91
- ></obi-alerts-alarm-twotone>`;
92
- } else if (this.alertType === AlertType.Warning) {
93
- return html`<obi-alerts-warning-twotone
94
- useCssColor
95
- class="icon"
96
- ></obi-alerts-warning-twotone>`;
97
- } else {
98
- return html`<obi-alerts-caution-twotone
99
- useCssColor
100
- class="icon"
101
- ></obi-alerts-caution-twotone>`;
102
103
  }
104
+ return this.renderAlertTwotoneIcon();
103
105
  }
104
106
  get activeType() {
105
107
  if (this.type === "flat") {
@@ -116,7 +118,7 @@ let ObcAlertButton = class extends LitElement {
116
118
  render() {
117
119
  const hasAlerts = this.nAlerts > 0;
118
120
  const showCounter = this.counter && hasAlerts && this.activeType !== "flat";
119
- const showBlinking = this.blinking && hasAlerts && this.alertType !== AlertType.Caution;
121
+ const showBlinking = this.blinking && hasAlerts && this.alertType !== void 0 && supportsBlinking(this.alertType);
120
122
  return html`
121
123
  <div
122
124
  class=${classMap({
@@ -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-filled.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 {AlertType} from '../../types.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 click-alert {CustomEvent<void>} Fired when the main alert button is clicked.\n * @fires click-silence {CustomEvent<void>} Fired when the silence button is clicked.\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 @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 @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 @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 alertIcon() {\n const isIdle = this.nAlerts === 0;\n if (isIdle) {\n return html`<obi-alerts class=\"icon\"></obi-alerts>`;\n } else {\n if (this.type === ObcAlertButtonType.Enhanced) {\n return html`<obi-alerts-active class=\"icon\"></obi-alerts-active>`;\n } else if (this.alertType === AlertType.Alarm) {\n return html`<obi-alerts-alarm-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-alarm-twotone>`;\n } else if (this.alertType === AlertType.Warning) {\n return html`<obi-alerts-warning-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-warning-twotone>`;\n } else {\n return html`<obi-alerts-caution-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-caution-twotone>`;\n // }\n }\n }\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 } else if (this.alertType === AlertType.Alarm) {\n return html`<obi-alerts-alarm-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-alarm-twotone>`;\n } else if (this.alertType === AlertType.Warning) {\n return html`<obi-alerts-warning-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-warning-twotone>`;\n } else {\n return html`<obi-alerts-caution-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-caution-twotone>`;\n // }\n }\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 && hasAlerts && this.alertType !== AlertType.Caution;\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":";;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,IAAK,uCAAAA,wBAAL;AACLA,sBAAA,MAAA,IAAO;AACPA,sBAAA,QAAA,IAAS;AACTA,sBAAA,UAAA,IAAW;AAHD,SAA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UAAU,YAAY;AAhNrB,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GANb,eAMe,WAAA,WAAA,CAAA;AAOA,gBAAA;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;AAKA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAzCd,eAyCgB,WAAA,yBAAA,CAAA;AAOA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAhDd,eAgDgB,WAAA,WAAA,CAAA;AAOA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAvDd,eAuDgB,WAAA,YAAA,CAAA;AAQD,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA/Db,eA+De,WAAA,uBAAA,CAAA;AAQA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAvEb,eAuEe,WAAA,gCAAA,CAAA;AAET,gBAAA;AAAA,EAAhB,MAAA;AAAM,GAzEI,eAyEM,WAAA,SAAA,CAAA;AAzEN,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';\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 click-alert {CustomEvent<void>} Fired when the main alert button is clicked.\n * @fires click-silence {CustomEvent<void>} Fired when the silence button is clicked.\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 @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 @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 @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);\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"],"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AAAM,GAzEI,eAyEM,WAAA,SAAA,CAAA;AAzEN,iBAAN,gBAAA;AAAA,EADN,cAAc,kBAAkB;AAAA,GACpB,cAAA;"}
@@ -6,15 +6,19 @@ const compentStyle = css`
6
6
 
7
7
  :host {
8
8
  position: absolute;
9
- top: 0;
10
- left: 0;
11
- right: 0;
12
- bottom: 0;
9
+ inset: 0;
10
+ }
11
+
12
+ :host([wrapcontent]) {
13
+ position: unset;
14
+ width: fit-content;
15
+ height: fit-content;
13
16
  }
14
17
 
15
18
  .wrapper {
16
19
  --bg-color: var(--alert-alarm-color);
17
20
  --thickness: var(--global-size-spacing-border-weight-alertframe);
21
+ --blink-on: var(--alarm-blink-on);
18
22
  color: var(--on-alarm-active-color);
19
23
  position: relative;
20
24
  width: 100%;
@@ -23,23 +27,64 @@ const compentStyle = css`
23
27
  var(--ui-components-button-border-radius) + var(--thickness) / 2
24
28
  );
25
29
  outline: var(--thickness) solid var(--bg-color);
26
- outline-offset: calc(-1 * var(--thickness));
30
+ outline-offset: 0;
31
+ --blink-width: 2px;
27
32
  }
28
33
 
29
34
  .wrapper.thickness-small {
30
35
  --thickness: 2px;
36
+ --blink-width: 1px;
37
+ }
38
+
39
+ .wrapper.wrap-content {
40
+ width: fit-content;
41
+ height: fit-content;
42
+ }
43
+
44
+ .wrapper {
45
+
46
+ --blink-width-dynamic: calc(var(--blink-width) * var(--blink-on));
47
+ }
48
+
49
+ .wrapper.unacked-active {
50
+ outline-width: calc(var(--thickness) + var(--blink-width-dynamic));
51
+ }
52
+
53
+ .wrapper.unacked-rectified {
54
+ outline-style: dashed;
31
55
  }
32
56
 
33
- .wrapper.warning {
57
+ .wrapper.alarm,.wrapper.isa-high {
58
+ --bg-color: var(--alert-alarm-color);
59
+ color: var(--on-alarm-active-color);
60
+ }
61
+
62
+ .wrapper.warning,.wrapper.isa-medium {
34
63
  --bg-color: var(--alert-warning-color);
64
+ --blink-on: var(--warning-blink-on);
35
65
  color: var(--on-warning-active-color);
36
66
  }
37
67
 
38
- .wrapper.caution {
68
+ .wrapper.caution,.wrapper.isa-low {
39
69
  --bg-color: var(--alert-caution-color);
70
+ --blink-on: 1;
40
71
  color: var(--on-caution-active-color);
41
72
  }
42
73
 
74
+ .wrapper.isa-low {
75
+ --blink-on: var(--low-blink-on);
76
+ }
77
+
78
+ .wrapper.isa-critical {
79
+ --bg-color: var(--critical-enabled-background-color);
80
+ color: var(--on-critical-active-color);
81
+ }
82
+
83
+ .wrapper.isa-diagnostic {
84
+ --bg-color: var(--notification-enabled-background-color);
85
+ color: var(--on-notification-active-color);
86
+ }
87
+
43
88
  .wrapper.sharp-edge-top-left {
44
89
  border-top-left-radius: 0;
45
90
  }
@@ -68,9 +113,9 @@ const compentStyle = css`
68
113
  }
69
114
 
70
115
  .flap.small {
71
- top: 0;
116
+ top: calc(-1 * var(--thickness));
72
117
  right: calc(
73
- -1 * var(--app-components-alert-frame-icon-size) + var(--thickness) / 2 -
118
+ -1 * var(--app-components-alert-frame-icon-size) - var(--thickness) / 2 -
74
119
  var(--ui-components-badge-padding) * 2
75
120
  );
76
121
  }
@@ -83,9 +128,13 @@ const compentStyle = css`
83
128
  }
84
129
 
85
130
  .up:is(.flap .mask) {
86
- width: calc(var(--ui-components-button-border-radius) + 1px);
131
+ width: calc(
132
+ var(--ui-components-button-border-radius) + var(--thickness) + 0.5px
133
+ );
87
134
  top: 0;
88
- left: calc(-1 * var(--ui-components-button-border-radius));
135
+ left: calc(
136
+ -1 * var(--ui-components-button-border-radius) - var(--thickness)
137
+ );
89
138
  clip-path: polygon(
90
139
  0 0,
91
140
  100% 0,
@@ -95,10 +144,18 @@ const compentStyle = css`
95
144
  );
96
145
  }
97
146
 
147
+ .unacked-active .up:is(.flap .mask) {
148
+ top: calc(-1 * var(--blink-width-dynamic));
149
+ }
150
+
98
151
  .down:is(.flap .mask) {
99
- width: calc(var(--ui-components-button-border-radius) + 1px);
152
+ width: calc(
153
+ var(--ui-components-button-border-radius) + var(--thickness) + 0.5px
154
+ );
100
155
  bottom: 0;
101
- left: calc(-1 * var(--ui-components-button-border-radius));
156
+ left: calc(
157
+ -1 * var(--ui-components-button-border-radius) - var(--thickness)
158
+ );
102
159
  clip-path: polygon(
103
160
  0 100%,
104
161
  100% 100%,
@@ -108,9 +165,17 @@ const compentStyle = css`
108
165
  );
109
166
  }
110
167
 
168
+ .unacked-active .down:is(.flap .mask) {
169
+ bottom: calc(-1 * var(--blink-width-dynamic));
170
+ }
171
+
111
172
  .left:is(.flap .mask) {
112
- height: calc(var(--ui-components-button-border-radius) + 1px);
113
- top: calc(-1 * var(--ui-components-button-border-radius));
173
+ height: calc(
174
+ var(--ui-components-button-border-radius) + var(--thickness) + 0.5px
175
+ );
176
+ top: calc(
177
+ -1 * var(--ui-components-button-border-radius) - var(--thickness)
178
+ );
114
179
  left: 0;
115
180
  clip-path: polygon(
116
181
  0 0,
@@ -121,21 +186,31 @@ const compentStyle = css`
121
186
  );
122
187
  }
123
188
 
189
+ .unacked-active .left:is(.flap .mask) {
190
+ left: calc(-1 * var(--blink-width-dynamic));
191
+ }
192
+
124
193
  .top .left:is(.flap .mask) {
125
194
  top: unset;
126
- bottom: calc(-1 * var(--ui-components-button-border-radius));
195
+ bottom: calc(
196
+ -1 * var(--ui-components-button-border-radius) - var(--thickness)
197
+ );
127
198
  clip-path: polygon(
199
+ 0 100%,
128
200
  0 0,
129
201
  100% 0,
130
- var(--thickness) 50%,
131
202
  50% var(--thickness),
132
- 0 100%
203
+ var(--thickness) 50%
133
204
  );
134
205
  }
135
206
 
136
207
  .right:is(.flap .mask) {
137
- height: calc(var(--ui-components-button-border-radius) + 1px);
138
- top: calc(-1 * var(--ui-components-button-border-radius));
208
+ height: calc(
209
+ var(--ui-components-button-border-radius) + var(--thickness) + 0.5px
210
+ );
211
+ top: calc(
212
+ -1 * var(--ui-components-button-border-radius) - var(--thickness)
213
+ );
139
214
  right: 0;
140
215
  clip-path: polygon(
141
216
  100% 0,
@@ -148,20 +223,26 @@ const compentStyle = css`
148
223
 
149
224
  .top .right:is(.flap .mask) {
150
225
  top: unset;
151
- bottom: calc(-1 * var(--ui-components-button-border-radius));
226
+ bottom: calc(
227
+ -1 * var(--ui-components-button-border-radius) - var(--thickness)
228
+ );
152
229
  clip-path: polygon(
153
- 0 0,
154
- 100% 0,
155
230
  100% 100%,
231
+ 100% 0,
232
+ 0 0,
156
233
  50% var(--thickness),
157
234
  calc(100% - var(--thickness)) 50%
158
235
  );
159
236
  }
160
237
 
238
+ .unacked-active .right:is(.flap .mask) {
239
+ right: calc(-1 * var(--blink-width-dynamic));
240
+ }
241
+
161
242
  .flap.large {
162
243
  flex-direction: column;
163
- top: 0;
164
- bottom: 0;
244
+ top: calc(-1 * var(--thickness));
245
+ bottom: calc(-1 * var(--thickness));
165
246
  right: calc(
166
247
  -1 * var(--app-components-alert-frame-icon-size) + var(--thickness) / 2 -
167
248
  var(--ui-components-badge-padding) * 2
@@ -172,12 +253,13 @@ const compentStyle = css`
172
253
  }
173
254
 
174
255
  .flap.bottom,.flap.top {
175
- left: 0;
176
- right: 0;
256
+ left: calc(-1 * var(--thickness));
257
+ right: calc(-1 * var(--thickness));
177
258
  padding: var(--app-components-alert-frame-large-flip-padding-vertical)
178
259
  var(--app-components-alert-frame-large-flip-4px-padding-horizontal);
179
260
  bottom: calc(
180
- var(--thickness) / 2 - var(--global-typography-ui-label-line-height) -
261
+ -1 * var(--thickness) / 2 -
262
+ var(--global-typography-ui-label-line-height) -
181
263
  var(--app-components-alert-frame-large-flip-padding-vertical) * 2
182
264
  );
183
265
  border-radius: 0px 0px var(--button-border-radius-bottom-right)
@@ -232,7 +314,8 @@ const compentStyle = css`
232
314
  .flap.top {
233
315
  bottom: unset !important;
234
316
  top: calc(
235
- var(--thickness) / 2 - var(--global-typography-ui-label-line-height) -
317
+ -1 * var(--thickness) / 2 -
318
+ var(--global-typography-ui-label-line-height) -
236
319
  var(--app-components-alert-frame-large-flip-padding-vertical) * 2
237
320
  );
238
321
  border-radius: var(--button-border-radius-bottom-right)
@@ -253,6 +336,10 @@ const compentStyle = css`
253
336
  overflow: hidden;
254
337
  }
255
338
 
339
+ .unacked-active .flap {
340
+ outline: var(--bg-color) solid var(--blink-width-dynamic);
341
+ }
342
+
256
343
  ::slotted([slot="label"]) {
257
344
  text-overflow: ellipsis;
258
345
  white-space: nowrap;
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,11 @@
1
- import { LitElement, TemplateResult } from 'lit';
1
+ import { LitElement, TemplateResult, HTMLTemplateResult } from 'lit';
2
+ import { AlertType } from '../../types.js';
2
3
  import '../../icons/icon-alarm-badge.js';
3
4
  import '../../icons/icon-warning-badge.js';
4
5
  import '../../icons/icon-caution-badge.js';
6
+ import './critical-badge.js';
7
+ import './diagnostic-badge.js';
8
+ export { AlertType as ObcAlertFrameStatus } from '../../types.js';
5
9
  /**
6
10
  * Enum representing the available frame styles for an alert component.
7
11
  *
@@ -26,16 +30,10 @@ export declare enum ObcAlertFrameThickness {
26
30
  Small = "small",
27
31
  Large = "large"
28
32
  }
29
- /**
30
- * Status options for the alert frame, controlling color and icon.
31
- * - `alarm`: Highest severity (default).
32
- * - `warning`: Medium severity.
33
- * - `caution`: Lower severity.
34
- */
35
- export declare enum ObcAlertFrameStatus {
36
- Alarm = "alarm",
37
- Warning = "warning",
38
- Caution = "caution"
33
+ export declare enum ObcAlertFrameMode {
34
+ ackedActive = "acked-active",
35
+ unackedActive = "unacked-active",
36
+ unackedRectified = "unacked-rectified"
39
37
  }
40
38
  /**
41
39
  * Text size options for flip-flap typography.
@@ -46,6 +44,15 @@ export declare enum AlertFrameTextSize {
46
44
  Regular = "regular",
47
45
  Large = "large"
48
46
  }
47
+ export interface AlertFrameConfig {
48
+ type?: ObcAlertFrameType;
49
+ thickness?: ObcAlertFrameThickness;
50
+ status?: AlertType;
51
+ mode?: ObcAlertFrameMode;
52
+ textSize?: AlertFrameTextSize;
53
+ showIcon?: boolean;
54
+ showAlertCategoryIcon?: boolean;
55
+ }
49
56
  /**
50
57
  * `<obc-alert-frame>` – A bordered frame component for visually emphasizing alert or status messages.
51
58
  *
@@ -58,7 +65,9 @@ export declare enum AlertFrameTextSize {
58
65
  * - `large-side-flip`: Adds a larger, vertical side flap with a status icon and optional custom icon.
59
66
  * - `bottom-flip`: Adds a bottom flap with a status icon, label, and timer slots.
60
67
  * - **Thickness options:** Choose between `small` (thin border) and `large` (thick border) for visual emphasis.
61
- * - **Status indication:** Displays different color schemes and icons for `alarm`, `warning`, or `caution` states.
68
+ * - **Status indication:** Displays different color schemes and icons for the legacy statuses (`alarm`, `warning`, `caution`) and the ISA statuses (`isa-critical`, `isa-high`, `isa-medium`, `isa-low`, `isa-diagnostic`).
69
+ * - **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.
70
+ * - **Content wrapping:** When `wrapContent` is true, the frame wraps and sizes itself to its slotted content rather than overlaying a fixed region.
62
71
  * - **Customizable corners:** Each corner can be set to a sharp (non-rounded) edge for integration with other UI elements.
63
72
  * - **Slot-based content:** Supports custom icons, labels, and timers in flap variants via named slots.
64
73
  *
@@ -74,7 +83,8 @@ export declare enum AlertFrameTextSize {
74
83
  * - `large-side-flip`: Large vertical right-side flap with status icon and optional custom icon.
75
84
  * - `bottom-flip`: Bottom flap with status icon, label, and timer.
76
85
  * - **Thickness:** `small` (default) or `large` for border width.
77
- * - **Status:** `alarm`, `warning`, or `caution`—affects color and icon.
86
+ * - **Status:** `alarm`, `warning`, `caution`, or the ISA severities (`isa-critical`, `isa-high`, `isa-medium`, `isa-low`, `isa-diagnostic`)—affects color and icon.
87
+ * - **Mode:** `acked-active` (default), `unacked-active`, or `unacked-rectified`—affects blinking/animation.
78
88
  * - **Corner Customization:** Each corner can be made sharp (not rounded) via boolean properties.
79
89
  *
80
90
  * ### Slots and Content Structure
@@ -89,7 +99,9 @@ export declare enum AlertFrameTextSize {
89
99
  * ### Properties and Attributes
90
100
  * - `type`: Selects the visual variant/flap style. Default is `small-side-flip`.
91
101
  * - `thickness`: Controls border thickness (`small` or `large`). Default is `small`.
92
- * - `status`: Sets the alert status and color/icon (`alarm`, `warning`, `caution`). Default is `alarm`.
102
+ * - `status`: Sets the alert status and color/icon (`alarm`, `warning`, `caution`, or the `isa-*` severities). Default is `alarm`.
103
+ * - `mode`: Acknowledgement lifecycle state (`acked-active`, `unacked-active`, `unacked-rectified`) controlling blinking/animation. Default is `acked-active`.
104
+ * - `wrapContent`: When true, the frame wraps and sizes to its slotted content instead of overlaying a fixed region. Default is `false`.
93
105
  * - `sharpEdgeTopLeft`, `sharpEdgeTopRight`, `sharpEdgeBottomLeft`, `sharpEdgeBottomRight`: Boolean flags to make each corner sharp instead of rounded.
94
106
  *
95
107
  * ### Best Practices and Constraints
@@ -140,8 +152,21 @@ export declare class ObcAlertFrame extends LitElement {
140
152
  * - `alarm`: Highest severity (default).
141
153
  * - `warning`: Medium severity.
142
154
  * - `caution`: Lower severity.
155
+ * - `isa-critical`, `isa-high`, `isa-medium`, `isa-low`, `isa-diagnostic`: ISA severity levels, styled to match their legacy equivalents.
156
+ */
157
+ status: AlertType;
158
+ /**
159
+ * Acknowledgement lifecycle state, controlling the frame's blinking/animation.
160
+ * - `acked-active`: Active and acknowledged (default); no blinking.
161
+ * - `unacked-active`: Active and not yet acknowledged; blinks.
162
+ * - `unacked-rectified`: Condition cleared but not yet acknowledged.
163
+ */
164
+ mode: ObcAlertFrameMode;
165
+ /**
166
+ * When true, the frame wraps and sizes itself to its slotted content instead
167
+ * of overlaying a fixed region. Reflected to an attribute for CSS styling.
143
168
  */
144
- status: ObcAlertFrameStatus;
169
+ wrapContent: boolean;
145
170
  /**
146
171
  * If true, the top-left corner will be sharp (not rounded).
147
172
  */
@@ -163,8 +188,10 @@ export declare class ObcAlertFrame extends LitElement {
163
188
  showAlertCategoryIcon: boolean;
164
189
  render(): TemplateResult<1>;
165
190
  private flap;
191
+ private renderBadgeIcon;
166
192
  static styles: import('lit').CSSResult;
167
193
  }
194
+ export declare function wrapWithAlertFrame(options: AlertFrameConfig | boolean | undefined, content: HTMLTemplateResult): HTMLTemplateResult;
168
195
  declare global {
169
196
  interface HTMLElementTagNameMap {
170
197
  'obc-alert-frame': ObcAlertFrame;
@@ -1 +1 @@
1
- {"version":3,"file":"alert-frame.d.ts","sourceRoot":"","sources":["../../../src/components/alert-frame/alert-frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA4B,cAAc,EAAC,MAAM,KAAK,CAAC;AAIzE,OAAO,iCAAiC,CAAC;AACzC,OAAO,mCA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