@oicl/openbridge-webcomponents-full-bundle 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 (185) 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
  134. package/src/alert-severity.ts +225 -0
  135. package/src/ar/building-blocks/poi-header/poi-header.css +38 -7
  136. package/src/ar/building-blocks/poi-header/poi-header.ts +6 -1
  137. package/src/ar/poi-button/poi-button.css +126 -32
  138. package/src/ar/poi-button/poi-button.ts +16 -1
  139. package/src/ar/types.ts +5 -0
  140. package/src/automation/automation-badge/automation-badge.ts +124 -17
  141. package/src/automation/automation-button/abstract-automation-button-storybook-helpers.ts +5 -0
  142. package/src/automation/automation-button/abstract-automation-button.ts +21 -3
  143. package/src/automation/automation-button/automation-button.css +9 -4
  144. package/src/automation/automation-button/automation-button.ts +25 -7
  145. package/src/automation/automation-tank/automation-tank.stories.ts +22 -0
  146. package/src/automation/automation-tank/automation-tank.ts +12 -3
  147. package/src/building-blocks/instrument-radial/instrument-radial.stories.ts +21 -0
  148. package/src/building-blocks/instrument-radial/instrument-radial.ts +118 -21
  149. package/src/components/accordion-card/accordion-card.css +33 -0
  150. package/src/components/accordion-card/accordion-card.stories.ts +2 -1
  151. package/src/components/accordion-card/accordion-card.ts +3 -4
  152. package/src/components/alert-button/alert-button.css +89 -5
  153. package/src/components/alert-button/alert-button.stories.ts +43 -0
  154. package/src/components/alert-button/alert-button.ts +43 -32
  155. package/src/components/alert-frame/alert-frame.css +116 -29
  156. package/src/components/alert-frame/alert-frame.stories.ts +63 -3
  157. package/src/components/alert-frame/alert-frame.ts +114 -23
  158. package/src/components/alert-frame/critical-badge.ts +39 -0
  159. package/src/components/alert-frame/diagnostic-badge.ts +52 -0
  160. package/src/components/alert-icon/alert-icon.stories.ts +41 -0
  161. package/src/components/alert-icon/alert-icon.ts +101 -38
  162. package/src/components/alert-icon/icons/icon-critical.ts +23 -0
  163. package/src/components/alert-list-details/alert-list-details.stories.ts +67 -0
  164. package/src/components/alert-list-details/alert-list-details.ts +11 -10
  165. package/src/components/badge/badge.css +52 -2
  166. package/src/components/badge/badge.stories.ts +75 -0
  167. package/src/components/badge/badge.ts +70 -2
  168. package/src/main.css +1 -0
  169. package/src/manual-icon/icon-alerts-critical-twotone.ts +60 -0
  170. package/src/manual-icon/icon-alerts-diagnostic-twotone.ts +60 -0
  171. package/src/mixins/alert.css +29 -0
  172. package/src/navigation-instruments/gauge-radial/gauge-radial.css +85 -0
  173. package/src/navigation-instruments/gauge-radial/gauge-radial.stories.ts +149 -7
  174. package/src/navigation-instruments/gauge-radial/gauge-radial.ts +212 -33
  175. package/src/navigation-instruments/readout/readout.css +7 -24
  176. package/src/navigation-instruments/readout/readout.stories.ts +57 -4
  177. package/src/navigation-instruments/readout/readout.ts +69 -63
  178. package/src/navigation-instruments/readout-list-item/readout-list-item.css +9 -42
  179. package/src/navigation-instruments/readout-list-item/readout-list-item.stories.ts +57 -14
  180. package/src/navigation-instruments/readout-list-item/readout-list-item.ts +54 -44
  181. package/src/navigation-instruments/watch/tickmark.ts +33 -6
  182. package/src/navigation-instruments/watch/watch.ts +60 -25
  183. package/src/palettes/critical.md +95 -0
  184. package/src/palettes/manual.css +165 -0
  185. package/src/types.ts +20 -3
@@ -1,14 +1,18 @@
1
1
  :host {
2
2
  position: absolute;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
3
+ inset: 0;
4
+ }
5
+
6
+ :host([wrapcontent]) {
7
+ position: unset;
8
+ width: fit-content;
9
+ height: fit-content;
7
10
  }
8
11
 
9
12
  .wrapper {
10
13
  --bg-color: var(--alert-alarm-color);
11
14
  --thickness: var(--global-size-spacing-border-weight-alertframe);
15
+ --blink-on: var(--alarm-blink-on);
12
16
  color: var(--on-alarm-active-color);
13
17
  position: relative;
14
18
  width: 100%;
@@ -17,21 +21,62 @@
17
21
  var(--ui-components-button-border-radius) + var(--thickness) / 2
18
22
  );
19
23
  outline: var(--thickness) solid var(--bg-color);
20
- outline-offset: calc(-1 * var(--thickness));
24
+ outline-offset: 0;
25
+ --blink-width: 2px;
21
26
  &.thickness-small {
22
27
  --thickness: 2px;
28
+ --blink-width: 1px;
29
+ }
30
+
31
+ &.wrap-content {
32
+ width: fit-content;
33
+ height: fit-content;
34
+ }
35
+
36
+ --blink-width-dynamic: calc(var(--blink-width) * var(--blink-on));
37
+
38
+ &.unacked-active {
39
+ outline-width: calc(var(--thickness) + var(--blink-width-dynamic));
40
+ }
41
+
42
+ &.unacked-rectified {
43
+ outline-style: dashed;
44
+ }
45
+
46
+ &.alarm,
47
+ &.isa-high {
48
+ --bg-color: var(--alert-alarm-color);
49
+ color: var(--on-alarm-active-color);
23
50
  }
24
51
 
25
- &.warning {
52
+ &.warning,
53
+ &.isa-medium {
26
54
  --bg-color: var(--alert-warning-color);
55
+ --blink-on: var(--warning-blink-on);
27
56
  color: var(--on-warning-active-color);
28
57
  }
29
58
 
30
- &.caution {
59
+ &.caution,
60
+ &.isa-low {
31
61
  --bg-color: var(--alert-caution-color);
62
+ --blink-on: 1;
32
63
  color: var(--on-caution-active-color);
33
64
  }
34
65
 
66
+ &.isa-low {
67
+ --blink-on: var(--low-blink-on);
68
+ }
69
+
70
+ &.isa-critical {
71
+ --bg-color: var(--critical-enabled-background-color);
72
+ color: var(--on-critical-active-color);
73
+ }
74
+
75
+ &.isa-diagnostic {
76
+ --bg-color: var(--notification-enabled-background-color);
77
+ color: var(--on-notification-active-color);
78
+ }
79
+
35
80
  &.sharp-edge-top-left {
36
81
  border-top-left-radius: 0;
37
82
  }
@@ -60,9 +105,9 @@
60
105
  gap: 2px;
61
106
 
62
107
  &.small {
63
- top: 0;
108
+ top: calc(-1 * var(--thickness));
64
109
  right: calc(
65
- -1 * var(--app-components-alert-frame-icon-size) + var(--thickness) / 2 -
110
+ -1 * var(--app-components-alert-frame-icon-size) - var(--thickness) / 2 -
66
111
  var(--ui-components-badge-padding) * 2
67
112
  );
68
113
  }
@@ -74,9 +119,13 @@
74
119
  background-color: var(--bg-color);
75
120
 
76
121
  &.up {
77
- width: calc(var(--ui-components-button-border-radius) + 1px);
122
+ width: calc(
123
+ var(--ui-components-button-border-radius) + var(--thickness) + 0.5px
124
+ );
78
125
  top: 0;
79
- left: calc(-1 * var(--ui-components-button-border-radius));
126
+ left: calc(
127
+ -1 * var(--ui-components-button-border-radius) - var(--thickness)
128
+ );
80
129
  clip-path: polygon(
81
130
  0 0,
82
131
  100% 0,
@@ -84,12 +133,20 @@
84
133
  calc(100% - var(--thickness)) 50%,
85
134
  50% var(--thickness)
86
135
  );
136
+
137
+ .unacked-active & {
138
+ top: calc(-1 * var(--blink-width-dynamic));
139
+ }
87
140
  }
88
141
 
89
142
  &.down {
90
- width: calc(var(--ui-components-button-border-radius) + 1px);
143
+ width: calc(
144
+ var(--ui-components-button-border-radius) + var(--thickness) + 0.5px
145
+ );
91
146
  bottom: 0;
92
- left: calc(-1 * var(--ui-components-button-border-radius));
147
+ left: calc(
148
+ -1 * var(--ui-components-button-border-radius) - var(--thickness)
149
+ );
93
150
  clip-path: polygon(
94
151
  0 100%,
95
152
  100% 100%,
@@ -97,11 +154,19 @@
97
154
  50% calc(100% - var(--thickness)),
98
155
  calc(100% - var(--thickness)) 50%
99
156
  );
157
+
158
+ .unacked-active & {
159
+ bottom: calc(-1 * var(--blink-width-dynamic));
160
+ }
100
161
  }
101
162
 
102
163
  &.left {
103
- height: calc(var(--ui-components-button-border-radius) + 1px);
104
- top: calc(-1 * var(--ui-components-button-border-radius));
164
+ height: calc(
165
+ var(--ui-components-button-border-radius) + var(--thickness) + 0.5px
166
+ );
167
+ top: calc(
168
+ -1 * var(--ui-components-button-border-radius) - var(--thickness)
169
+ );
105
170
  left: 0;
106
171
  clip-path: polygon(
107
172
  0 0,
@@ -111,22 +176,32 @@
111
176
  var(--thickness) 50%
112
177
  );
113
178
 
179
+ .unacked-active & {
180
+ left: calc(-1 * var(--blink-width-dynamic));
181
+ }
182
+
114
183
  .top & {
115
184
  top: unset;
116
- bottom: calc(-1 * var(--ui-components-button-border-radius));
185
+ bottom: calc(
186
+ -1 * var(--ui-components-button-border-radius) - var(--thickness)
187
+ );
117
188
  clip-path: polygon(
189
+ 0 100%,
118
190
  0 0,
119
191
  100% 0,
120
- var(--thickness) 50%,
121
192
  50% var(--thickness),
122
- 0 100%
193
+ var(--thickness) 50%
123
194
  );
124
195
  }
125
196
  }
126
197
 
127
198
  &.right {
128
- height: calc(var(--ui-components-button-border-radius) + 1px);
129
- top: calc(-1 * var(--ui-components-button-border-radius));
199
+ height: calc(
200
+ var(--ui-components-button-border-radius) + var(--thickness) + 0.5px
201
+ );
202
+ top: calc(
203
+ -1 * var(--ui-components-button-border-radius) - var(--thickness)
204
+ );
130
205
  right: 0;
131
206
  clip-path: polygon(
132
207
  100% 0,
@@ -138,22 +213,28 @@
138
213
 
139
214
  .top & {
140
215
  top: unset;
141
- bottom: calc(-1 * var(--ui-components-button-border-radius));
216
+ bottom: calc(
217
+ -1 * var(--ui-components-button-border-radius) - var(--thickness)
218
+ );
142
219
  clip-path: polygon(
143
- 0 0,
144
- 100% 0,
145
220
  100% 100%,
221
+ 100% 0,
222
+ 0 0,
146
223
  50% var(--thickness),
147
224
  calc(100% - var(--thickness)) 50%
148
225
  );
149
226
  }
227
+
228
+ .unacked-active & {
229
+ right: calc(-1 * var(--blink-width-dynamic));
230
+ }
150
231
  }
151
232
  }
152
233
 
153
234
  &.large {
154
235
  flex-direction: column;
155
- top: 0;
156
- bottom: 0;
236
+ top: calc(-1 * var(--thickness));
237
+ bottom: calc(-1 * var(--thickness));
157
238
  right: calc(
158
239
  -1 * var(--app-components-alert-frame-icon-size) + var(--thickness) / 2 -
159
240
  var(--ui-components-badge-padding) * 2
@@ -165,12 +246,13 @@
165
246
 
166
247
  &.bottom,
167
248
  &.top {
168
- left: 0;
169
- right: 0;
249
+ left: calc(-1 * var(--thickness));
250
+ right: calc(-1 * var(--thickness));
170
251
  padding: var(--app-components-alert-frame-large-flip-padding-vertical)
171
252
  var(--app-components-alert-frame-large-flip-4px-padding-horizontal);
172
253
  bottom: calc(
173
- var(--thickness) / 2 - var(--global-typography-ui-label-line-height) -
254
+ -1 * var(--thickness) / 2 -
255
+ var(--global-typography-ui-label-line-height) -
174
256
  var(--app-components-alert-frame-large-flip-padding-vertical) * 2
175
257
  );
176
258
  border-radius: 0px 0px var(--button-border-radius-bottom-right)
@@ -200,7 +282,8 @@
200
282
  &.top {
201
283
  bottom: unset !important;
202
284
  top: calc(
203
- var(--thickness) / 2 - var(--global-typography-ui-label-line-height) -
285
+ -1 * var(--thickness) / 2 -
286
+ var(--global-typography-ui-label-line-height) -
204
287
  var(--app-components-alert-frame-large-flip-padding-vertical) * 2
205
288
  );
206
289
  border-radius: var(--button-border-radius-bottom-right)
@@ -222,6 +305,10 @@
222
305
  }
223
306
  }
224
307
 
308
+ .unacked-active .flap {
309
+ outline: var(--bg-color) solid var(--blink-width-dynamic);
310
+ }
311
+
225
312
  ::slotted([slot="label"]) {
226
313
  text-overflow: ellipsis;
227
314
  white-space: nowrap;
@@ -5,6 +5,7 @@ import {
5
5
  ObcAlertFrameType,
6
6
  ObcAlertFrameStatus,
7
7
  AlertFrameTextSize,
8
+ ObcAlertFrameMode,
8
9
  } from './alert-frame.js';
9
10
  import './alert-frame.js';
10
11
  import '../../icons/icon-placeholder.js';
@@ -18,6 +19,7 @@ const meta: Meta<typeof ObcAlertFrame> = {
18
19
  type: ObcAlertFrameType.SmallSideFlip,
19
20
  thickness: ObcAlertFrameThickness.Small,
20
21
  status: ObcAlertFrameStatus.Alarm,
22
+ mode: ObcAlertFrameMode.ackedActive,
21
23
  demoWidth: 200,
22
24
  showIcon: true,
23
25
  showAlertCategoryIcon: true,
@@ -29,6 +31,12 @@ const meta: Meta<typeof ObcAlertFrame> = {
29
31
  type: 'select',
30
32
  },
31
33
  },
34
+ mode: {
35
+ options: Object.values(ObcAlertFrameMode),
36
+ control: {
37
+ type: 'select',
38
+ },
39
+ },
32
40
  thickness: {
33
41
  options: Object.values(ObcAlertFrameThickness),
34
42
  control: {
@@ -52,17 +60,19 @@ const meta: Meta<typeof ObcAlertFrame> = {
52
60
  },
53
61
  render(args) {
54
62
  return html` <div style="width: fit-content; position: relative;">
55
- <div
56
- style="width: ${args.demoWidth}px; height: 150px; background-color: #999"
57
- ></div>
58
63
  <obc-alert-frame
59
64
  .type=${args.type}
60
65
  .thickness=${args.thickness}
66
+ .mode=${args.mode}
61
67
  .status=${args.status}
62
68
  .textSize=${args.textSize}
63
69
  .showIcon=${args.showIcon}
64
70
  .showAlertCategoryIcon=${args.showAlertCategoryIcon}
71
+ .wrapContent=${true}
65
72
  >
73
+ <div
74
+ style="width: ${args.demoWidth}px; height: 150px; background-color: #999"
75
+ ></div>
66
76
  <obi-placeholder slot="icon"></obi-placeholder>
67
77
  <div slot="label">Label</div>
68
78
  <div slot="timer">00:00</div>
@@ -88,6 +98,14 @@ export const AlarmThinn: Story = {
88
98
  },
89
99
  };
90
100
 
101
+ export const UnackedActiveThick: Story = {
102
+ args: {
103
+ mode: ObcAlertFrameMode.unackedActive,
104
+ thickness: ObcAlertFrameThickness.Large,
105
+ type: ObcAlertFrameType.Regular,
106
+ },
107
+ };
108
+
91
109
  export const AlarmThickSmallSideFlip: Story = {
92
110
  args: {
93
111
  thickness: ObcAlertFrameThickness.Large,
@@ -201,3 +219,45 @@ export const AlarmThickTopFlipNoIcons: Story = {
201
219
  },
202
220
  render: AlarmThickTopFlip.render,
203
221
  };
222
+
223
+ export const IsaCritical: Story = {
224
+ args: {
225
+ status: ObcAlertFrameStatus.IsaCritical,
226
+ },
227
+ };
228
+
229
+ export const IsaHigh: Story = {
230
+ args: {
231
+ status: ObcAlertFrameStatus.IsaHigh,
232
+ },
233
+ };
234
+
235
+ export const IsaMedium: Story = {
236
+ args: {
237
+ status: ObcAlertFrameStatus.IsaMedium,
238
+ },
239
+ };
240
+
241
+ export const IsaLow: Story = {
242
+ args: {
243
+ status: ObcAlertFrameStatus.IsaLow,
244
+ },
245
+ };
246
+
247
+ export const IsaDiagnostic: Story = {
248
+ args: {
249
+ status: ObcAlertFrameStatus.IsaDiagnostic,
250
+ },
251
+ };
252
+
253
+ export const RectifiedUnactive: Story = {
254
+ args: {
255
+ type: ObcAlertFrameType.Regular,
256
+ thickness: ObcAlertFrameThickness.Large,
257
+ status: ObcAlertFrameStatus.Alarm,
258
+ demoWidth: 200,
259
+ showIcon: true,
260
+ showAlertCategoryIcon: true,
261
+ mode: ObcAlertFrameMode.unackedRectified,
262
+ },
263
+ };
@@ -1,11 +1,27 @@
1
- import {LitElement, html, unsafeCSS, nothing, TemplateResult} from 'lit';
1
+ import {
2
+ LitElement,
3
+ html,
4
+ unsafeCSS,
5
+ nothing,
6
+ TemplateResult,
7
+ HTMLTemplateResult,
8
+ } from 'lit';
2
9
  import {property} from 'lit/decorators.js';
3
10
  import compentStyle from './alert-frame.css?inline';
4
11
  import {classMap} from 'lit/directives/class-map.js';
5
12
  import '../../icons/icon-alarm-badge.js';
6
13
  import '../../icons/icon-warning-badge.js';
7
14
  import '../../icons/icon-caution-badge.js';
15
+ import './critical-badge.js';
16
+ import './diagnostic-badge.js';
8
17
  import {customElement} from '../../decorator.js';
18
+ import {AlertType} from '../../types.js';
19
+ import {
20
+ getAlertBadgeComponent,
21
+ AlertBadgeComponent,
22
+ } from '../../alert-severity.js';
23
+
24
+ export {AlertType as ObcAlertFrameStatus} from '../../types.js';
9
25
 
10
26
  /**
11
27
  * Enum representing the available frame styles for an alert component.
@@ -33,16 +49,10 @@ export enum ObcAlertFrameThickness {
33
49
  Large = 'large',
34
50
  }
35
51
 
36
- /**
37
- * Status options for the alert frame, controlling color and icon.
38
- * - `alarm`: Highest severity (default).
39
- * - `warning`: Medium severity.
40
- * - `caution`: Lower severity.
41
- */
42
- export enum ObcAlertFrameStatus {
43
- Alarm = 'alarm',
44
- Warning = 'warning',
45
- Caution = 'caution',
52
+ export enum ObcAlertFrameMode {
53
+ ackedActive = 'acked-active',
54
+ unackedActive = 'unacked-active',
55
+ unackedRectified = 'unacked-rectified',
46
56
  }
47
57
 
48
58
  /**
@@ -55,6 +65,16 @@ export enum AlertFrameTextSize {
55
65
  Large = 'large',
56
66
  }
57
67
 
68
+ export interface AlertFrameConfig {
69
+ type?: ObcAlertFrameType;
70
+ thickness?: ObcAlertFrameThickness;
71
+ status?: AlertType;
72
+ mode?: ObcAlertFrameMode;
73
+ textSize?: AlertFrameTextSize;
74
+ showIcon?: boolean;
75
+ showAlertCategoryIcon?: boolean;
76
+ }
77
+
58
78
  /**
59
79
  * `<obc-alert-frame>` – A bordered frame component for visually emphasizing alert or status messages.
60
80
  *
@@ -67,7 +87,9 @@ export enum AlertFrameTextSize {
67
87
  * - `large-side-flip`: Adds a larger, vertical side flap with a status icon and optional custom icon.
68
88
  * - `bottom-flip`: Adds a bottom flap with a status icon, label, and timer slots.
69
89
  * - **Thickness options:** Choose between `small` (thin border) and `large` (thick border) for visual emphasis.
70
- * - **Status indication:** Displays different color schemes and icons for `alarm`, `warning`, or `caution` states.
90
+ * - **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`).
91
+ * - **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.
92
+ * - **Content wrapping:** When `wrapContent` is true, the frame wraps and sizes itself to its slotted content rather than overlaying a fixed region.
71
93
  * - **Customizable corners:** Each corner can be set to a sharp (non-rounded) edge for integration with other UI elements.
72
94
  * - **Slot-based content:** Supports custom icons, labels, and timers in flap variants via named slots.
73
95
  *
@@ -83,7 +105,8 @@ export enum AlertFrameTextSize {
83
105
  * - `large-side-flip`: Large vertical right-side flap with status icon and optional custom icon.
84
106
  * - `bottom-flip`: Bottom flap with status icon, label, and timer.
85
107
  * - **Thickness:** `small` (default) or `large` for border width.
86
- * - **Status:** `alarm`, `warning`, or `caution`—affects color and icon.
108
+ * - **Status:** `alarm`, `warning`, `caution`, or the ISA severities (`isa-critical`, `isa-high`, `isa-medium`, `isa-low`, `isa-diagnostic`)—affects color and icon.
109
+ * - **Mode:** `acked-active` (default), `unacked-active`, or `unacked-rectified`—affects blinking/animation.
87
110
  * - **Corner Customization:** Each corner can be made sharp (not rounded) via boolean properties.
88
111
  *
89
112
  * ### Slots and Content Structure
@@ -98,7 +121,9 @@ export enum AlertFrameTextSize {
98
121
  * ### Properties and Attributes
99
122
  * - `type`: Selects the visual variant/flap style. Default is `small-side-flip`.
100
123
  * - `thickness`: Controls border thickness (`small` or `large`). Default is `small`.
101
- * - `status`: Sets the alert status and color/icon (`alarm`, `warning`, `caution`). Default is `alarm`.
124
+ * - `status`: Sets the alert status and color/icon (`alarm`, `warning`, `caution`, or the `isa-*` severities). Default is `alarm`.
125
+ * - `mode`: Acknowledgement lifecycle state (`acked-active`, `unacked-active`, `unacked-rectified`) controlling blinking/animation. Default is `acked-active`.
126
+ * - `wrapContent`: When true, the frame wraps and sizes to its slotted content instead of overlaying a fixed region. Default is `false`.
102
127
  * - `sharpEdgeTopLeft`, `sharpEdgeTopRight`, `sharpEdgeBottomLeft`, `sharpEdgeBottomRight`: Boolean flags to make each corner sharp instead of rounded.
103
128
  *
104
129
  * ### Best Practices and Constraints
@@ -154,9 +179,24 @@ export class ObcAlertFrame extends LitElement {
154
179
  * - `alarm`: Highest severity (default).
155
180
  * - `warning`: Medium severity.
156
181
  * - `caution`: Lower severity.
182
+ * - `isa-critical`, `isa-high`, `isa-medium`, `isa-low`, `isa-diagnostic`: ISA severity levels, styled to match their legacy equivalents.
183
+ */
184
+ @property({type: String}) status: AlertType = AlertType.Alarm;
185
+
186
+ /**
187
+ * Acknowledgement lifecycle state, controlling the frame's blinking/animation.
188
+ * - `acked-active`: Active and acknowledged (default); no blinking.
189
+ * - `unacked-active`: Active and not yet acknowledged; blinks.
190
+ * - `unacked-rectified`: Condition cleared but not yet acknowledged.
191
+ */
192
+ @property({type: String}) mode: ObcAlertFrameMode =
193
+ ObcAlertFrameMode.ackedActive;
194
+
195
+ /**
196
+ * When true, the frame wraps and sizes itself to its slotted content instead
197
+ * of overlaying a fixed region. Reflected to an attribute for CSS styling.
157
198
  */
158
- @property({type: String}) status: ObcAlertFrameStatus =
159
- ObcAlertFrameStatus.Alarm;
199
+ @property({type: Boolean, reflect: true}) wrapContent: boolean = false;
160
200
 
161
201
  /**
162
202
  * If true, the top-left corner will be sharp (not rounded).
@@ -190,6 +230,7 @@ export class ObcAlertFrame extends LitElement {
190
230
  <div
191
231
  class=${classMap({
192
232
  wrapper: true,
233
+ 'wrap-content': this.wrapContent,
193
234
  ['thickness-' + this.thickness]: true,
194
235
  [this.type]: true,
195
236
  [this.status]: true,
@@ -198,6 +239,7 @@ export class ObcAlertFrame extends LitElement {
198
239
  'sharp-edge-top-right': this.sharpEdgeTopRight,
199
240
  'sharp-edge-bottom-left': this.sharpEdgeBottomLeft,
200
241
  'sharp-edge-bottom-right': this.sharpEdgeBottomRight,
242
+ [this.mode]: true,
201
243
  })}
202
244
  >
203
245
  <slot></slot>
@@ -211,15 +253,26 @@ export class ObcAlertFrame extends LitElement {
211
253
  return nothing;
212
254
  }
213
255
 
214
- let icon: TemplateResult | typeof nothing = html`<obi-alarm-badge
215
- class="icon badge"
216
- ></obi-alarm-badge>`;
256
+ if (
257
+ this.type === ObcAlertFrameType.SmallSideFlip &&
258
+ !this.showAlertCategoryIcon
259
+ ) {
260
+ return nothing;
261
+ }
262
+
263
+ if (
264
+ this.type === ObcAlertFrameType.LargeSideFlip &&
265
+ !this.showIcon &&
266
+ !this.showAlertCategoryIcon
267
+ ) {
268
+ return nothing;
269
+ }
270
+
271
+ let icon: TemplateResult | typeof nothing;
217
272
  if (!this.showAlertCategoryIcon) {
218
273
  icon = nothing;
219
- } else if (this.status === ObcAlertFrameStatus.Warning) {
220
- icon = html`<obi-warning-badge class="icon badge"></obi-warning-badge>`;
221
- } else if (this.status === ObcAlertFrameStatus.Caution) {
222
- icon = html`<obi-caution-badge class="icon badge"></obi-caution-badge>`;
274
+ } else {
275
+ icon = this.renderBadgeIcon();
223
276
  }
224
277
 
225
278
  if (this.type === ObcAlertFrameType.SmallSideFlip) {
@@ -262,9 +315,47 @@ export class ObcAlertFrame extends LitElement {
262
315
  return nothing;
263
316
  }
264
317
 
318
+ private renderBadgeIcon(): TemplateResult {
319
+ switch (getAlertBadgeComponent(this.status)) {
320
+ case AlertBadgeComponent.Critical:
321
+ return html`<obi-critical-badge
322
+ class="icon badge"
323
+ ></obi-critical-badge>`;
324
+ case AlertBadgeComponent.Warning:
325
+ return html`<obi-warning-badge class="icon badge"></obi-warning-badge>`;
326
+ case AlertBadgeComponent.Caution:
327
+ return html`<obi-caution-badge class="icon badge"></obi-caution-badge>`;
328
+ case AlertBadgeComponent.Diagnostic:
329
+ return html`<obi-diagnostic-badge
330
+ class="icon badge"
331
+ ></obi-diagnostic-badge>`;
332
+ default:
333
+ return html`<obi-alarm-badge class="icon badge"></obi-alarm-badge>`;
334
+ }
335
+ }
336
+
265
337
  static override styles = unsafeCSS(compentStyle);
266
338
  }
267
339
 
340
+ export function wrapWithAlertFrame(
341
+ options: AlertFrameConfig | boolean | undefined,
342
+ content: HTMLTemplateResult
343
+ ): HTMLTemplateResult {
344
+ if (typeof options !== 'object' || options === null) {
345
+ return content;
346
+ }
347
+ return html`<obc-alert-frame
348
+ .type=${options.type ?? ObcAlertFrameType.SmallSideFlip}
349
+ .thickness=${options.thickness ?? ObcAlertFrameThickness.Small}
350
+ .status=${options.status ?? AlertType.Alarm}
351
+ .mode=${options.mode ?? ObcAlertFrameMode.ackedActive}
352
+ .showIcon=${options.showIcon ?? false}
353
+ .showAlertCategoryIcon=${options.showAlertCategoryIcon ?? true}
354
+ .wrapContent=${true}
355
+ >${content}</obc-alert-frame
356
+ >`;
357
+ }
358
+
268
359
  declare global {
269
360
  interface HTMLElementTagNameMap {
270
361
  'obc-alert-frame': ObcAlertFrame;
@@ -0,0 +1,39 @@
1
+ import {LitElement, html, css, svg} from 'lit';
2
+ import {customElement} from '../../decorator.js';
3
+
4
+ @customElement('obi-critical-badge')
5
+ export class ObiCriticalBadge extends LitElement {
6
+ private icon = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
7
+ <path d="M 22,12
8
+ L 17,20.66
9
+ L 7,20.66
10
+ L 2,12
11
+ L 7,3.34
12
+ L 17,3.34
13
+ Z"
14
+ fill="currentColor"/>
15
+ </svg>
16
+ `;
17
+
18
+ override render() {
19
+ return html` <div class="wrapper">${this.icon}</div> `;
20
+ }
21
+
22
+ static override styles = css`
23
+ .wrapper {
24
+ height: 100%;
25
+ width: 100%;
26
+ line-height: 0;
27
+ }
28
+ .wrapper > * {
29
+ height: 100%;
30
+ width: 100%;
31
+ }
32
+ `;
33
+ }
34
+
35
+ declare global {
36
+ interface HTMLElementTagNameMap {
37
+ 'obi-critical-badge': ObiCriticalBadge;
38
+ }
39
+ }
@@ -0,0 +1,52 @@
1
+ import {LitElement, html, css, svg} from 'lit';
2
+ import {customElement} from '../../decorator.js';
3
+
4
+ @customElement('obi-diagnostic-badge')
5
+ export class ObiDiagnosticBadge extends LitElement {
6
+ private icon = svg`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="100" height="100">
7
+ <path d="M 10.5,2
8
+ L 13.5,2
9
+ L 13.5,9.4
10
+ L 19.91,5.7
11
+ L 21.41,8.3
12
+ L 15,12
13
+ L 21.41,15.7
14
+ L 19.91,18.3
15
+ L 13.5,14.6
16
+ L 13.5,22
17
+ L 10.5,22
18
+ L 10.5,14.6
19
+ L 4.09,18.3
20
+ L 2.59,15.7
21
+ L 9,12
22
+ L 2.59,8.3
23
+ L 4.09,5.7
24
+ L 10.5,9.4
25
+ Z"
26
+ fill="currentColor" />
27
+ </svg>
28
+
29
+ `;
30
+
31
+ override render() {
32
+ return html` <div class="wrapper">${this.icon}</div> `;
33
+ }
34
+
35
+ static override styles = css`
36
+ .wrapper {
37
+ height: 100%;
38
+ width: 100%;
39
+ line-height: 0;
40
+ }
41
+ .wrapper > * {
42
+ height: 100%;
43
+ width: 100%;
44
+ }
45
+ `;
46
+ }
47
+
48
+ declare global {
49
+ interface HTMLElementTagNameMap {
50
+ 'obi-diagnostic-badge': ObiDiagnosticBadge;
51
+ }
52
+ }