@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.151 → 2.0.0-next.152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/vitest.setup.ts +12 -1
- package/bundle/openbridge-webcomponents.bundle.js +989 -319
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +1514 -77
- package/dist/alert-severity.d.ts +12 -9
- package/dist/alert-severity.d.ts.map +1 -1
- package/dist/alert-severity.js +30 -38
- package/dist/alert-severity.js.map +1 -1
- package/dist/building-blocks/bar-horizontal/bar-horizontal.d.ts +6 -0
- package/dist/building-blocks/bar-horizontal/bar-horizontal.d.ts.map +1 -1
- package/dist/building-blocks/bar-horizontal/bar-horizontal.js +6 -1
- package/dist/building-blocks/bar-horizontal/bar-horizontal.js.map +1 -1
- package/dist/building-blocks/bar-vertical/bar-vertical.d.ts +6 -0
- package/dist/building-blocks/bar-vertical/bar-vertical.d.ts.map +1 -1
- package/dist/building-blocks/bar-vertical/bar-vertical.js +6 -1
- package/dist/building-blocks/bar-vertical/bar-vertical.js.map +1 -1
- package/dist/building-blocks/chart-line/chart-line-base.d.ts +129 -0
- package/dist/building-blocks/chart-line/chart-line-base.d.ts.map +1 -1
- package/dist/building-blocks/chart-line/chart-line-base.js +464 -79
- package/dist/building-blocks/chart-line/chart-line-base.js.map +1 -1
- package/dist/building-blocks/external-scale/external-scale.d.ts +11 -0
- package/dist/building-blocks/external-scale/external-scale.d.ts.map +1 -1
- package/dist/building-blocks/external-scale/external-scale.js +45 -12
- package/dist/building-blocks/external-scale/external-scale.js.map +1 -1
- package/dist/charthelpers/index.d.ts +1 -0
- package/dist/charthelpers/index.d.ts.map +1 -1
- package/dist/charthelpers/index.js +7 -1
- package/dist/charthelpers/index.js.map +1 -1
- package/dist/charthelpers/range-labels.d.ts +55 -0
- package/dist/charthelpers/range-labels.d.ts.map +1 -0
- package/dist/charthelpers/range-labels.js +36 -0
- package/dist/charthelpers/range-labels.js.map +1 -0
- package/dist/components/alert-button/alert-button.css.js +13 -21
- package/dist/components/alert-button/alert-button.css.js.map +1 -1
- package/dist/components/alert-button/alert-button.d.ts +9 -4
- package/dist/components/alert-button/alert-button.d.ts.map +1 -1
- package/dist/components/alert-button/alert-button.js +24 -15
- package/dist/components/alert-button/alert-button.js.map +1 -1
- package/dist/components/alert-frame/alert-frame.css.js +109 -33
- package/dist/components/alert-frame/alert-frame.css.js.map +1 -1
- package/dist/components/alert-frame/alert-frame.d.ts +34 -7
- package/dist/components/alert-frame/alert-frame.d.ts.map +1 -1
- package/dist/components/alert-frame/alert-frame.js +134 -30
- package/dist/components/alert-frame/alert-frame.js.map +1 -1
- package/dist/components/alert-icon/alert-icon.d.ts +10 -7
- package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
- package/dist/components/alert-icon/alert-icon.js +37 -60
- package/dist/components/alert-icon/alert-icon.js.map +1 -1
- package/dist/components/alert-menu-item/alert-menu-item.css.js +1 -4
- package/dist/components/alert-menu-item/alert-menu-item.css.js.map +1 -1
- package/dist/components/date-item/date-item.css.js +3 -3
- package/dist/components/keyboard-full/keyboard-full.css.js +4 -4
- package/dist/components/message-menu-item/message-menu-item.css.js +2 -6
- package/dist/components/message-menu-item/message-menu-item.css.js.map +1 -1
- package/dist/components/sequence-toolbar/sequence-toolbar.css.js +1 -2
- package/dist/components/sequence-toolbar/sequence-toolbar.css.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/navigation-instruments/gauge-trend/gauge-trend.d.ts +6 -0
- package/dist/navigation-instruments/gauge-trend/gauge-trend.d.ts.map +1 -1
- package/dist/navigation-instruments/gauge-trend/gauge-trend.js +8 -0
- package/dist/navigation-instruments/gauge-trend/gauge-trend.js.map +1 -1
- package/dist/navigation-instruments/instrument-field/instrument-field.css.js +2 -2
- package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
- package/dist/navigation-instruments/readout/readout.js +2 -1
- package/dist/navigation-instruments/readout/readout.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js +2 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
- package/dist/openbridge.css +19 -4
- package/dist/palettes/blinking.d.ts +14 -4
- package/dist/palettes/blinking.d.ts.map +1 -1
- package/dist/palettes/blinking.js +41 -35
- package/dist/palettes/blinking.js.map +1 -1
- package/dist/palettes/flashing-controller.d.ts +21 -0
- package/dist/palettes/flashing-controller.d.ts.map +1 -0
- package/dist/palettes/flashing-controller.js +45 -0
- package/dist/palettes/flashing-controller.js.map +1 -0
- package/dist/svghelpers/index.d.ts +1 -0
- package/dist/svghelpers/index.d.ts.map +1 -1
- package/dist/svghelpers/index.js +2 -0
- package/dist/svghelpers/index.js.map +1 -1
- package/dist/svghelpers/rounded-rect.d.ts +15 -0
- package/dist/svghelpers/rounded-rect.d.ts.map +1 -0
- package/dist/svghelpers/rounded-rect.js +29 -0
- package/dist/svghelpers/rounded-rect.js.map +1 -0
- package/dist/types.d.ts +14 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/script/check-css-variables.ts +2 -15
- package/src/alert-severity.spec.ts +56 -0
- package/src/alert-severity.ts +45 -43
- package/src/bars-graphs/area-graph/area-graph.stories.ts +235 -1
- package/src/bars-graphs/line-graph/line-graph.stories.ts +24 -0
- package/src/building-blocks/bar-horizontal/bar-horizontal.ts +7 -0
- package/src/building-blocks/bar-vertical/bar-vertical.ts +7 -0
- package/src/building-blocks/chart-line/chart-line-base.spec.ts +767 -0
- package/src/building-blocks/chart-line/chart-line-base.stories.ts +124 -0
- package/src/building-blocks/chart-line/chart-line-base.ts +671 -97
- package/src/building-blocks/chart-line/chart-sizing-battleground.stories.ts +17 -0
- package/src/building-blocks/external-scale/external-scale.spec.ts +154 -0
- package/src/building-blocks/external-scale/external-scale.ts +78 -20
- package/src/charthelpers/index.ts +1 -0
- package/src/charthelpers/range-labels.spec.ts +46 -0
- package/src/charthelpers/range-labels.ts +93 -0
- package/src/components/alert-button/alert-button.css +10 -23
- package/src/components/alert-button/alert-button.spec.ts +56 -15
- package/src/components/alert-button/alert-button.stories.ts +5 -1
- package/src/components/alert-button/alert-button.ts +33 -24
- package/src/components/alert-frame/alert-flash-scenario.stories.ts +669 -0
- package/src/components/alert-frame/alert-frame.css +106 -33
- package/src/components/alert-frame/alert-frame.spec.ts +176 -17
- package/src/components/alert-frame/alert-frame.stories.ts +61 -0
- package/src/components/alert-frame/alert-frame.ts +179 -41
- package/src/components/alert-icon/alert-icon.spec.ts +82 -27
- package/src/components/alert-icon/alert-icon.stories.ts +7 -1
- package/src/components/alert-icon/alert-icon.ts +48 -74
- package/src/components/alert-menu-item/alert-menu-item.css +1 -4
- package/src/components/date-item/date-item.css +3 -3
- package/src/components/keyboard-full/keyboard-full.css +4 -4
- package/src/components/message-menu-item/message-menu-item.css +2 -6
- package/src/components/sequence-toolbar/sequence-toolbar.css +1 -2
- package/src/navigation-instruments/gauge-trend/gauge-trend.stories.ts +29 -0
- package/src/navigation-instruments/gauge-trend/gauge-trend.ts +11 -0
- package/src/navigation-instruments/instrument-field/instrument-field.css +2 -2
- package/src/navigation-instruments/readout/readout.ts +2 -1
- package/src/navigation-instruments/readout-list-item/readout-list-item.ts +2 -1
- package/src/palettes/blinking.spec.ts +83 -0
- package/src/palettes/blinking.ts +47 -35
- package/src/palettes/flashing-controller.ts +62 -0
- package/src/palettes/manual.css +18 -4
- package/src/svghelpers/index.ts +1 -0
- package/src/svghelpers/rounded-rect.spec.ts +47 -0
- package/src/svghelpers/rounded-rect.ts +42 -0
- package/src/types.ts +20 -0
|
@@ -22,7 +22,9 @@ const compentStyle = css`* {
|
|
|
22
22
|
.wrapper {
|
|
23
23
|
--bg-color: var(--alert-alarm-color);
|
|
24
24
|
--thickness: var(--global-size-spacing-border-weight-alertframe);
|
|
25
|
-
|
|
25
|
+
/* 0/1 from the flash-<tempo> classes below; steady when no class applies. */
|
|
26
|
+
--blink-on: 0;
|
|
27
|
+
--blink-off: 1;
|
|
26
28
|
color: var(--on-alarm-active-color);
|
|
27
29
|
position: relative;
|
|
28
30
|
width: 100%;
|
|
@@ -32,12 +34,12 @@ const compentStyle = css`* {
|
|
|
32
34
|
);
|
|
33
35
|
outline: var(--thickness) solid var(--bg-color);
|
|
34
36
|
outline-offset: 0;
|
|
37
|
+
/* +2 px outward while on, both thicknesses (Figma Flash=yes: 2 → 4 px). */
|
|
35
38
|
--blink-width: 2px;
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
.wrapper.thickness-small {
|
|
39
42
|
--thickness: 2px;
|
|
40
|
-
--blink-width: 1px;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
.wrapper.wrap-content {
|
|
@@ -49,17 +51,69 @@ const compentStyle = css`* {
|
|
|
49
51
|
width: 100%;
|
|
50
52
|
}
|
|
51
53
|
|
|
54
|
+
.wrapper.flash-fast {
|
|
55
|
+
--blink-on: var(--flash-fast-on);
|
|
56
|
+
--blink-off: var(--flash-fast-off);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.wrapper.flash-slow {
|
|
60
|
+
--blink-on: var(--flash-slow-on);
|
|
61
|
+
--blink-off: var(--flash-slow-off);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.wrapper.flash-very-slow {
|
|
65
|
+
--blink-on: var(--flash-very-slow-on);
|
|
66
|
+
--blink-off: var(--flash-very-slow-off);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.wrapper {
|
|
70
|
+
|
|
71
|
+
--flash-transition: 50ms linear;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.wrapper.flash-effect-outline-eased {
|
|
75
|
+
transition: outline-width var(--flash-transition);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.wrapper.flash-effect-outline-eased .flap {
|
|
79
|
+
transition: box-shadow var(--flash-transition);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.wrapper.flash-effect-outline-eased .mask {
|
|
83
|
+
transition:
|
|
84
|
+
top var(--flash-transition),
|
|
85
|
+
bottom var(--flash-transition),
|
|
86
|
+
left var(--flash-transition),
|
|
87
|
+
right var(--flash-transition);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.wrapper.flash-effect-outline-eased .dash path {
|
|
91
|
+
transition: stroke-width var(--flash-transition);
|
|
92
|
+
}
|
|
93
|
+
|
|
52
94
|
.wrapper {
|
|
53
95
|
|
|
54
96
|
--blink-width-dynamic: calc(var(--blink-width) * var(--blink-on));
|
|
97
|
+
/* One knob for flap and masks, so they cannot drift apart from the outline. */
|
|
98
|
+
--flap-grow: 0px;
|
|
55
99
|
}
|
|
56
100
|
|
|
57
|
-
.wrapper.unacked-active {
|
|
101
|
+
.wrapper.unacked-active,.wrapper.unacked-rectified {
|
|
58
102
|
outline-width: calc(var(--thickness) + var(--blink-width-dynamic));
|
|
59
103
|
}
|
|
60
104
|
|
|
105
|
+
.wrapper.unacked-active {
|
|
106
|
+
--flap-grow: var(--blink-width-dynamic);
|
|
107
|
+
}
|
|
108
|
+
|
|
61
109
|
.wrapper.unacked-rectified {
|
|
62
|
-
|
|
110
|
+
/* The dashed stroke is centred, so it moves out by half its growth. */
|
|
111
|
+
--flap-grow: calc(var(--blink-width-dynamic) / 2);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.wrapper.unacked-rectified {
|
|
115
|
+
/* The dash pattern (12/6) needs an SVG stroke; outlines have no dash array. */
|
|
116
|
+
outline-style: none;
|
|
63
117
|
}
|
|
64
118
|
|
|
65
119
|
.wrapper.alarm,.wrapper.level-high {
|
|
@@ -69,23 +123,16 @@ const compentStyle = css`* {
|
|
|
69
123
|
|
|
70
124
|
.wrapper.warning,.wrapper.level-medium {
|
|
71
125
|
--bg-color: var(--alert-warning-color);
|
|
72
|
-
--blink-on: var(--warning-blink-on);
|
|
73
126
|
color: var(--on-warning-active-color);
|
|
74
127
|
}
|
|
75
128
|
|
|
76
129
|
.wrapper.caution,.wrapper.level-low {
|
|
77
130
|
--bg-color: var(--alert-caution-color);
|
|
78
|
-
--blink-on: 1;
|
|
79
131
|
color: var(--on-caution-active-color);
|
|
80
132
|
}
|
|
81
133
|
|
|
82
|
-
.wrapper.level-low {
|
|
83
|
-
--blink-on: var(--low-blink-on);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
134
|
.wrapper.level-critical {
|
|
87
135
|
--bg-color: var(--critical-enabled-background-color);
|
|
88
|
-
--blink-on: var(--critical-blink-on);
|
|
89
136
|
color: var(--on-critical-active-color);
|
|
90
137
|
}
|
|
91
138
|
|
|
@@ -140,7 +187,7 @@ const compentStyle = css`* {
|
|
|
140
187
|
width: calc(
|
|
141
188
|
var(--ui-components-button-border-radius) + var(--thickness) + 0.5px
|
|
142
189
|
);
|
|
143
|
-
top:
|
|
190
|
+
top: calc(-1 * var(--flap-grow));
|
|
144
191
|
left: calc(
|
|
145
192
|
-1 * var(--ui-components-button-border-radius) - var(--thickness)
|
|
146
193
|
);
|
|
@@ -153,15 +200,11 @@ const compentStyle = css`* {
|
|
|
153
200
|
);
|
|
154
201
|
}
|
|
155
202
|
|
|
156
|
-
.unacked-active .up:is(.flap .mask) {
|
|
157
|
-
top: calc(-1 * var(--blink-width-dynamic));
|
|
158
|
-
}
|
|
159
|
-
|
|
160
203
|
.down:is(.flap .mask) {
|
|
161
204
|
width: calc(
|
|
162
205
|
var(--ui-components-button-border-radius) + var(--thickness) + 0.5px
|
|
163
206
|
);
|
|
164
|
-
bottom:
|
|
207
|
+
bottom: calc(-1 * var(--flap-grow));
|
|
165
208
|
left: calc(
|
|
166
209
|
-1 * var(--ui-components-button-border-radius) - var(--thickness)
|
|
167
210
|
);
|
|
@@ -174,10 +217,6 @@ const compentStyle = css`* {
|
|
|
174
217
|
);
|
|
175
218
|
}
|
|
176
219
|
|
|
177
|
-
.unacked-active .down:is(.flap .mask) {
|
|
178
|
-
bottom: calc(-1 * var(--blink-width-dynamic));
|
|
179
|
-
}
|
|
180
|
-
|
|
181
220
|
.left:is(.flap .mask) {
|
|
182
221
|
height: calc(
|
|
183
222
|
var(--ui-components-button-border-radius) + var(--thickness) + 0.5px
|
|
@@ -185,7 +224,7 @@ const compentStyle = css`* {
|
|
|
185
224
|
top: calc(
|
|
186
225
|
-1 * var(--ui-components-button-border-radius) - var(--thickness)
|
|
187
226
|
);
|
|
188
|
-
left:
|
|
227
|
+
left: calc(-1 * var(--flap-grow));
|
|
189
228
|
clip-path: polygon(
|
|
190
229
|
0 0,
|
|
191
230
|
0 100%,
|
|
@@ -195,10 +234,6 @@ const compentStyle = css`* {
|
|
|
195
234
|
);
|
|
196
235
|
}
|
|
197
236
|
|
|
198
|
-
.unacked-active .left:is(.flap .mask) {
|
|
199
|
-
left: calc(-1 * var(--blink-width-dynamic));
|
|
200
|
-
}
|
|
201
|
-
|
|
202
237
|
.top .left:is(.flap .mask) {
|
|
203
238
|
top: unset;
|
|
204
239
|
bottom: calc(
|
|
@@ -220,7 +255,7 @@ const compentStyle = css`* {
|
|
|
220
255
|
top: calc(
|
|
221
256
|
-1 * var(--ui-components-button-border-radius) - var(--thickness)
|
|
222
257
|
);
|
|
223
|
-
right:
|
|
258
|
+
right: calc(-1 * var(--flap-grow));
|
|
224
259
|
clip-path: polygon(
|
|
225
260
|
100% 0,
|
|
226
261
|
100% 100%,
|
|
@@ -244,10 +279,6 @@ const compentStyle = css`* {
|
|
|
244
279
|
);
|
|
245
280
|
}
|
|
246
281
|
|
|
247
|
-
.unacked-active .right:is(.flap .mask) {
|
|
248
|
-
right: calc(-1 * var(--blink-width-dynamic));
|
|
249
|
-
}
|
|
250
|
-
|
|
251
282
|
.flap.large {
|
|
252
283
|
flex-direction: column;
|
|
253
284
|
top: calc(-1 * var(--thickness));
|
|
@@ -345,8 +376,35 @@ const compentStyle = css`* {
|
|
|
345
376
|
overflow: hidden;
|
|
346
377
|
}
|
|
347
378
|
|
|
348
|
-
|
|
349
|
-
|
|
379
|
+
/* Grows the flap outward with the outline, never toward the content: shifted
|
|
380
|
+
copies leave the inner edge where it is (an outline would cross it). */
|
|
381
|
+
|
|
382
|
+
.flap.small,
|
|
383
|
+
.flap.large {
|
|
384
|
+
box-shadow:
|
|
385
|
+
var(--flap-grow) 0 0 0 var(--bg-color),
|
|
386
|
+
0 calc(-1 * var(--flap-grow)) 0 0 var(--bg-color),
|
|
387
|
+
0 var(--flap-grow) 0 0 var(--bg-color),
|
|
388
|
+
var(--flap-grow) calc(-1 * var(--flap-grow)) 0 0 var(--bg-color),
|
|
389
|
+
var(--flap-grow) var(--flap-grow) 0 0 var(--bg-color);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.flap.bottom {
|
|
393
|
+
box-shadow:
|
|
394
|
+
0 var(--flap-grow) 0 0 var(--bg-color),
|
|
395
|
+
calc(-1 * var(--flap-grow)) 0 0 0 var(--bg-color),
|
|
396
|
+
var(--flap-grow) 0 0 0 var(--bg-color),
|
|
397
|
+
calc(-1 * var(--flap-grow)) var(--flap-grow) 0 0 var(--bg-color),
|
|
398
|
+
var(--flap-grow) var(--flap-grow) 0 0 var(--bg-color);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.flap.top {
|
|
402
|
+
box-shadow:
|
|
403
|
+
0 calc(-1 * var(--flap-grow)) 0 0 var(--bg-color),
|
|
404
|
+
calc(-1 * var(--flap-grow)) 0 0 0 var(--bg-color),
|
|
405
|
+
var(--flap-grow) 0 0 0 var(--bg-color),
|
|
406
|
+
calc(-1 * var(--flap-grow)) calc(-1 * var(--flap-grow)) 0 0 var(--bg-color),
|
|
407
|
+
var(--flap-grow) calc(-1 * var(--flap-grow)) 0 0 var(--bg-color);
|
|
350
408
|
}
|
|
351
409
|
|
|
352
410
|
::slotted([slot="label"]) {
|
|
@@ -361,6 +419,24 @@ const compentStyle = css`* {
|
|
|
361
419
|
display: block;
|
|
362
420
|
flex-shrink: 0;
|
|
363
421
|
}
|
|
422
|
+
|
|
423
|
+
.dash {
|
|
424
|
+
/* Overridden inline per render from the measured thickness. */
|
|
425
|
+
--dash-pad: 0px;
|
|
426
|
+
position: absolute;
|
|
427
|
+
top: calc(-1 * var(--dash-pad));
|
|
428
|
+
left: calc(-1 * var(--dash-pad));
|
|
429
|
+
overflow: visible;
|
|
430
|
+
pointer-events: none;
|
|
431
|
+
fill: none;
|
|
432
|
+
stroke: var(--bg-color);
|
|
433
|
+
stroke-dasharray: 12 6;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.dash path {
|
|
437
|
+
/* Animated on the one path: a wider second path would drift its dashes. */
|
|
438
|
+
stroke-width: calc(var(--thickness) + var(--blink-width-dynamic));
|
|
439
|
+
}
|
|
364
440
|
`;
|
|
365
441
|
export {
|
|
366
442
|
compentStyle as default
|
|
@@ -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,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, TemplateResult, HTMLTemplateResult } from 'lit';
|
|
2
|
-
import { AlertType } from '../../types.js';
|
|
2
|
+
import { AlertType, FlashingSpeed, ResolvedFlashingSpeed } from '../../types.js';
|
|
3
|
+
import { FlashingController } from '../../palettes/flashing-controller.js';
|
|
3
4
|
import '../../icons/icon-alarm-badge.js';
|
|
4
5
|
import '../../icons/icon-warning-badge.js';
|
|
5
6
|
import '../../icons/icon-caution-badge.js';
|
|
@@ -35,6 +36,16 @@ export declare enum ObcAlertFrameMode {
|
|
|
35
36
|
unackedActive = "unacked-active",
|
|
36
37
|
unackedRectified = "unacked-rectified"
|
|
37
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* How the frame renders the on phase of a flash: `outline` grows the outline
|
|
41
|
+
* outward by 2 px in one step (the design); `outline-eased` grows it the same
|
|
42
|
+
* way over a 50 ms transition. The eased variant exists for design evaluation
|
|
43
|
+
* and may be removed (#1224).
|
|
44
|
+
*/
|
|
45
|
+
export declare enum ObcAlertFrameFlashEffect {
|
|
46
|
+
Outline = "outline",
|
|
47
|
+
OutlineEased = "outline-eased"
|
|
48
|
+
}
|
|
38
49
|
/**
|
|
39
50
|
* Text size options for flip-flap typography.
|
|
40
51
|
* - `regular`: Standard text size (default).
|
|
@@ -49,6 +60,7 @@ export interface AlertFrameConfig {
|
|
|
49
60
|
thickness?: ObcAlertFrameThickness;
|
|
50
61
|
status?: AlertType;
|
|
51
62
|
mode?: ObcAlertFrameMode;
|
|
63
|
+
flashingSpeed?: FlashingSpeed;
|
|
52
64
|
textSize?: AlertFrameTextSize;
|
|
53
65
|
showIcon?: boolean;
|
|
54
66
|
showAlertCategoryIcon?: boolean;
|
|
@@ -66,7 +78,7 @@ export interface AlertFrameConfig {
|
|
|
66
78
|
* - `bottom-flip`: Adds a bottom flap with a status icon, label, and timer slots.
|
|
67
79
|
* - **Thickness options:** Choose between `small` (thin border) and `large` (thick border) for visual emphasis.
|
|
68
80
|
* - **Status indication:** Displays different color schemes and icons for the legacy statuses (`alarm`, `warning`, `caution`) and the level statuses (`level-critical`, `level-high`, `level-medium`, `level-low`, `level-diagnostic`).
|
|
69
|
-
* - **Acknowledgement mode:** The `mode` property reflects the alert lifecycle state — `acked-active` (default), `unacked-active
|
|
81
|
+
* - **Acknowledgement mode:** The `mode` property reflects the alert lifecycle state — `acked-active` (default, steady), `unacked-active` (flashes) and `unacked-rectified` (dashed, flashes) — and `flashingSpeed` picks the tempo.
|
|
70
82
|
* - **Content wrapping:** When `wrapContent` is true, the frame wraps and sizes itself to its slotted content rather than overlaying a fixed region.
|
|
71
83
|
* - **Customizable corners:** Each corner can be set to a sharp (non-rounded) edge for integration with other UI elements.
|
|
72
84
|
* - **Slot-based content:** Supports custom icons, labels, and timers in flap variants via named slots.
|
|
@@ -133,6 +145,12 @@ export interface AlertFrameConfig {
|
|
|
133
145
|
* @property sharpEdgeTopRight - If true, the top-right corner will be sharp (not rounded).
|
|
134
146
|
* @property sharpEdgeBottomLeft - If true, the bottom-left corner will be sharp (not rounded).
|
|
135
147
|
* @property sharpEdgeBottomRight - If true, the bottom-right corner will be sharp (not rounded).
|
|
148
|
+
* @property flashingSpeed - Flash tempo: `default` resolves from the alert type and mode
|
|
149
|
+
* (critical/alarm/high fast, warning/medium slow, low very slow, every rectified alert very
|
|
150
|
+
* slow, caution and diagnostic fixed), `fast`, `slow`, `very-slow` force a tempo, `fixed`
|
|
151
|
+
* never flashes. Acknowledged frames are always steady.
|
|
152
|
+
* @property flashEffect - `outline` (default) grows the outline by 2 px while on in one step;
|
|
153
|
+
* `outline-eased` grows it over a 50 ms transition, a design-evaluation option.
|
|
136
154
|
* @slot - Default slot for main alert content.
|
|
137
155
|
* @slot icon - Custom icon for the flap (large-side-flip, bottom-flip).
|
|
138
156
|
* @slot label - Label text for the bottom flap (bottom-flip only).
|
|
@@ -171,6 +189,20 @@ export declare class ObcAlertFrame extends LitElement {
|
|
|
171
189
|
* - `unacked-rectified`: Condition cleared but not yet acknowledged.
|
|
172
190
|
*/
|
|
173
191
|
mode: ObcAlertFrameMode;
|
|
192
|
+
/** Flash tempo: `default` resolves from the alert type and mode (critical/alarm/high fast, warning/medium slow, low very slow, every rectified alert very slow, caution and diagnostic fixed), `fast`, `slow`, `very-slow` force a tempo, `fixed` never flashes. Acknowledged frames are always steady. */
|
|
193
|
+
flashingSpeed: FlashingSpeed;
|
|
194
|
+
/** `outline` (default) grows the outline by 2 px while on in one step; `outline-eased` grows it over a 50 ms transition, a design-evaluation option. */
|
|
195
|
+
flashEffect: ObcAlertFrameFlashEffect;
|
|
196
|
+
protected readonly flashing: FlashingController;
|
|
197
|
+
private dashBox?;
|
|
198
|
+
private wrapper?;
|
|
199
|
+
private dashObserver?;
|
|
200
|
+
private measureDash;
|
|
201
|
+
connectedCallback(): void;
|
|
202
|
+
updated(): void;
|
|
203
|
+
disconnectedCallback(): void;
|
|
204
|
+
private renderDash;
|
|
205
|
+
get resolvedFlashingSpeed(): ResolvedFlashingSpeed;
|
|
174
206
|
/** When true, the frame wraps and sizes itself to its slotted content instead of overlaying a fixed region. Reflected to an attribute for CSS styling. */
|
|
175
207
|
wrapContent: boolean;
|
|
176
208
|
/** When true, the frame stretches to fill the full width of its container instead of hugging its content. Reflected to an attribute for CSS styling. */
|
|
@@ -187,11 +219,6 @@ export declare class ObcAlertFrame extends LitElement {
|
|
|
187
219
|
showIcon: boolean;
|
|
188
220
|
showAlertCategoryIcon: boolean;
|
|
189
221
|
render(): TemplateResult<1>;
|
|
190
|
-
private _blinkAnimationCancel?;
|
|
191
|
-
private syncBlinking;
|
|
192
|
-
connectedCallback(): void;
|
|
193
|
-
updated(): void;
|
|
194
|
-
disconnectedCallback(): void;
|
|
195
222
|
private flap;
|
|
196
223
|
private renderBadgeIcon;
|
|
197
224
|
static styles: import('lit').CSSResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-frame.d.ts","sourceRoot":"","sources":["../../../src/components/alert-frame/alert-frame.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAIV,cAAc,EACd,kBAAkB,EACnB,MAAM,KAAK,CAAC;AAIb,OAAO,iCAAiC,CAAC;AACzC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,uBAAuB,CAAC;AAE/B,OAAO,
|
|
1
|
+
{"version":3,"file":"alert-frame.d.ts","sourceRoot":"","sources":["../../../src/components/alert-frame/alert-frame.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { unsafeCSS, LitElement,
|
|
2
|
-
import { property } from "lit/decorators.js";
|
|
1
|
+
import { unsafeCSS, LitElement, nothing, html } from "lit";
|
|
2
|
+
import { property, state, query } from "lit/decorators.js";
|
|
3
3
|
import compentStyle from "./alert-frame.css.js";
|
|
4
4
|
import { classMap } from "lit/directives/class-map.js";
|
|
5
5
|
import "../../icons/icon-alarm-badge.js";
|
|
@@ -8,9 +8,10 @@ import "../../icons/icon-caution-badge.js";
|
|
|
8
8
|
import "../../icons/icon-critical-badge.js";
|
|
9
9
|
import "./diagnostic-badge.js";
|
|
10
10
|
import { customElement } from "../../decorator.js";
|
|
11
|
-
import { AlertType } from "../../types.js";
|
|
12
|
-
import { getAlertBadgeComponent, AlertBadgeComponent } from "../../alert-severity.js";
|
|
13
|
-
import {
|
|
11
|
+
import { AlertType, FlashingSpeed } from "../../types.js";
|
|
12
|
+
import { resolveFlashingSpeed, AlertFlashPhase, getAlertBadgeComponent, AlertBadgeComponent } from "../../alert-severity.js";
|
|
13
|
+
import { FlashingController } from "../../palettes/flashing-controller.js";
|
|
14
|
+
import { roundedRectPath } from "../../svghelpers/rounded-rect.js";
|
|
14
15
|
var __defProp = Object.defineProperty;
|
|
15
16
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
16
17
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -40,11 +41,20 @@ var ObcAlertFrameMode = /* @__PURE__ */ ((ObcAlertFrameMode2) => {
|
|
|
40
41
|
ObcAlertFrameMode2["unackedRectified"] = "unacked-rectified";
|
|
41
42
|
return ObcAlertFrameMode2;
|
|
42
43
|
})(ObcAlertFrameMode || {});
|
|
44
|
+
var ObcAlertFrameFlashEffect = /* @__PURE__ */ ((ObcAlertFrameFlashEffect2) => {
|
|
45
|
+
ObcAlertFrameFlashEffect2["Outline"] = "outline";
|
|
46
|
+
ObcAlertFrameFlashEffect2["OutlineEased"] = "outline-eased";
|
|
47
|
+
return ObcAlertFrameFlashEffect2;
|
|
48
|
+
})(ObcAlertFrameFlashEffect || {});
|
|
43
49
|
var AlertFrameTextSize = /* @__PURE__ */ ((AlertFrameTextSize2) => {
|
|
44
50
|
AlertFrameTextSize2["Regular"] = "regular";
|
|
45
51
|
AlertFrameTextSize2["Large"] = "large";
|
|
46
52
|
return AlertFrameTextSize2;
|
|
47
53
|
})(AlertFrameTextSize || {});
|
|
54
|
+
const DASH_FLASH_GROWTH_PX = 2;
|
|
55
|
+
function sameDashBox(a, b) {
|
|
56
|
+
return b !== void 0 && a.width === b.width && a.height === b.height && a.thickness === b.thickness && a.radii.every((r, i) => r === b.radii[i]);
|
|
57
|
+
}
|
|
48
58
|
let ObcAlertFrame = class extends LitElement {
|
|
49
59
|
constructor() {
|
|
50
60
|
super(...arguments);
|
|
@@ -52,6 +62,34 @@ let ObcAlertFrame = class extends LitElement {
|
|
|
52
62
|
this.thickness = "small";
|
|
53
63
|
this.status = AlertType.Alarm;
|
|
54
64
|
this.mode = "acked-active";
|
|
65
|
+
this.flashingSpeed = FlashingSpeed.Default;
|
|
66
|
+
this.flashEffect = "outline";
|
|
67
|
+
this.flashing = new FlashingController(
|
|
68
|
+
this,
|
|
69
|
+
() => this.resolvedFlashingSpeed
|
|
70
|
+
);
|
|
71
|
+
this.measureDash = () => {
|
|
72
|
+
const wrapper = this.wrapper;
|
|
73
|
+
if (!wrapper) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const style = getComputedStyle(wrapper);
|
|
77
|
+
const px = (value) => parseFloat(value) || 0;
|
|
78
|
+
const box = {
|
|
79
|
+
width: wrapper.offsetWidth,
|
|
80
|
+
height: wrapper.offsetHeight,
|
|
81
|
+
thickness: px(style.getPropertyValue("--thickness")),
|
|
82
|
+
radii: [
|
|
83
|
+
px(style.borderTopLeftRadius),
|
|
84
|
+
px(style.borderTopRightRadius),
|
|
85
|
+
px(style.borderBottomRightRadius),
|
|
86
|
+
px(style.borderBottomLeftRadius)
|
|
87
|
+
]
|
|
88
|
+
};
|
|
89
|
+
if (!sameDashBox(box, this.dashBox)) {
|
|
90
|
+
this.dashBox = box;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
55
93
|
this.wrapContent = false;
|
|
56
94
|
this.fullWidth = false;
|
|
57
95
|
this.sharpEdgeTopLeft = false;
|
|
@@ -62,6 +100,79 @@ let ObcAlertFrame = class extends LitElement {
|
|
|
62
100
|
this.showIcon = false;
|
|
63
101
|
this.showAlertCategoryIcon = true;
|
|
64
102
|
}
|
|
103
|
+
connectedCallback() {
|
|
104
|
+
super.connectedCallback();
|
|
105
|
+
if (this.hasUpdated) {
|
|
106
|
+
this.requestUpdate();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
updated() {
|
|
110
|
+
const wantsDash = this.mode === "unacked-rectified" && this.isConnected;
|
|
111
|
+
if (wantsDash && !this.dashObserver && this.wrapper) {
|
|
112
|
+
this.dashObserver = new ResizeObserver(this.measureDash);
|
|
113
|
+
this.dashObserver.observe(this.wrapper);
|
|
114
|
+
}
|
|
115
|
+
if (wantsDash) {
|
|
116
|
+
this.measureDash();
|
|
117
|
+
}
|
|
118
|
+
if (!wantsDash && this.dashObserver) {
|
|
119
|
+
this.dashObserver.disconnect();
|
|
120
|
+
this.dashObserver = void 0;
|
|
121
|
+
this.dashBox = void 0;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
disconnectedCallback() {
|
|
125
|
+
super.disconnectedCallback();
|
|
126
|
+
this.dashObserver?.disconnect();
|
|
127
|
+
this.dashObserver = void 0;
|
|
128
|
+
}
|
|
129
|
+
renderDash() {
|
|
130
|
+
const box = this.dashBox;
|
|
131
|
+
if (this.mode !== "unacked-rectified" || !box) {
|
|
132
|
+
return nothing;
|
|
133
|
+
}
|
|
134
|
+
const pad = box.thickness + DASH_FLASH_GROWTH_PX;
|
|
135
|
+
const centreline = {
|
|
136
|
+
x: pad - box.thickness / 2,
|
|
137
|
+
y: pad - box.thickness / 2,
|
|
138
|
+
width: box.width + box.thickness,
|
|
139
|
+
height: box.height + box.thickness,
|
|
140
|
+
// A radius of 0 is a sharp edge and must stay square.
|
|
141
|
+
radii: box.radii.map(
|
|
142
|
+
(r) => r > 0 ? r + box.thickness / 2 : 0
|
|
143
|
+
)
|
|
144
|
+
};
|
|
145
|
+
const width = box.width + 2 * pad;
|
|
146
|
+
const height = box.height + 2 * pad;
|
|
147
|
+
return html`<svg
|
|
148
|
+
class="dash"
|
|
149
|
+
aria-hidden="true"
|
|
150
|
+
width=${width}
|
|
151
|
+
height=${height}
|
|
152
|
+
viewBox="0 0 ${width} ${height}"
|
|
153
|
+
style="--dash-pad: ${pad}px"
|
|
154
|
+
>
|
|
155
|
+
<path d=${roundedRectPath(centreline)}></path>
|
|
156
|
+
</svg>`;
|
|
157
|
+
}
|
|
158
|
+
get resolvedFlashingSpeed() {
|
|
159
|
+
switch (this.mode) {
|
|
160
|
+
case "unacked-active":
|
|
161
|
+
return resolveFlashingSpeed(
|
|
162
|
+
this.flashingSpeed,
|
|
163
|
+
this.status,
|
|
164
|
+
AlertFlashPhase.Active
|
|
165
|
+
);
|
|
166
|
+
case "unacked-rectified":
|
|
167
|
+
return resolveFlashingSpeed(
|
|
168
|
+
this.flashingSpeed,
|
|
169
|
+
this.status,
|
|
170
|
+
AlertFlashPhase.Rectified
|
|
171
|
+
);
|
|
172
|
+
default:
|
|
173
|
+
return FlashingSpeed.Fixed;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
65
176
|
render() {
|
|
66
177
|
return html`
|
|
67
178
|
<div
|
|
@@ -77,37 +188,16 @@ let ObcAlertFrame = class extends LitElement {
|
|
|
77
188
|
"sharp-edge-top-right": this.sharpEdgeTopRight,
|
|
78
189
|
"sharp-edge-bottom-left": this.sharpEdgeBottomLeft,
|
|
79
190
|
"sharp-edge-bottom-right": this.sharpEdgeBottomRight,
|
|
80
|
-
[this.mode]: true
|
|
191
|
+
[this.mode]: true,
|
|
192
|
+
["flash-" + this.resolvedFlashingSpeed]: true,
|
|
193
|
+
["flash-effect-" + this.flashEffect]: true
|
|
81
194
|
})}
|
|
82
195
|
>
|
|
83
196
|
<slot></slot>
|
|
84
|
-
${this.flap()}
|
|
197
|
+
${this.renderDash()} ${this.flap()}
|
|
85
198
|
</div>
|
|
86
199
|
`;
|
|
87
200
|
}
|
|
88
|
-
syncBlinking() {
|
|
89
|
-
if (this.mode !== "unacked-active" && this._blinkAnimationCancel) {
|
|
90
|
-
this._blinkAnimationCancel();
|
|
91
|
-
this._blinkAnimationCancel = void 0;
|
|
92
|
-
}
|
|
93
|
-
if (this.mode === "unacked-active" && !this._blinkAnimationCancel) {
|
|
94
|
-
this._blinkAnimationCancel = blinkingAll(this);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
connectedCallback() {
|
|
98
|
-
super.connectedCallback();
|
|
99
|
-
if (this.hasUpdated) {
|
|
100
|
-
this.syncBlinking();
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
updated() {
|
|
104
|
-
this.syncBlinking();
|
|
105
|
-
}
|
|
106
|
-
disconnectedCallback() {
|
|
107
|
-
super.disconnectedCallback();
|
|
108
|
-
this._blinkAnimationCancel?.();
|
|
109
|
-
this._blinkAnimationCancel = void 0;
|
|
110
|
-
}
|
|
111
201
|
flap() {
|
|
112
202
|
if (this.type === "regular") {
|
|
113
203
|
return nothing;
|
|
@@ -186,6 +276,18 @@ __decorateClass([
|
|
|
186
276
|
__decorateClass([
|
|
187
277
|
property({ type: String })
|
|
188
278
|
], ObcAlertFrame.prototype, "mode", 2);
|
|
279
|
+
__decorateClass([
|
|
280
|
+
property({ type: String })
|
|
281
|
+
], ObcAlertFrame.prototype, "flashingSpeed", 2);
|
|
282
|
+
__decorateClass([
|
|
283
|
+
property({ type: String })
|
|
284
|
+
], ObcAlertFrame.prototype, "flashEffect", 2);
|
|
285
|
+
__decorateClass([
|
|
286
|
+
state()
|
|
287
|
+
], ObcAlertFrame.prototype, "dashBox", 2);
|
|
288
|
+
__decorateClass([
|
|
289
|
+
query(".wrapper")
|
|
290
|
+
], ObcAlertFrame.prototype, "wrapper", 2);
|
|
189
291
|
__decorateClass([
|
|
190
292
|
property({ type: Boolean, reflect: true })
|
|
191
293
|
], ObcAlertFrame.prototype, "wrapContent", 2);
|
|
@@ -225,6 +327,7 @@ function wrapWithAlertFrame(options, content, fullWidth = false) {
|
|
|
225
327
|
.thickness=${options.thickness ?? "small"}
|
|
226
328
|
.status=${options.status ?? AlertType.Alarm}
|
|
227
329
|
.mode=${options.mode ?? "acked-active"}
|
|
330
|
+
.flashingSpeed=${options.flashingSpeed ?? FlashingSpeed.Default}
|
|
228
331
|
.showIcon=${options.showIcon ?? false}
|
|
229
332
|
.showAlertCategoryIcon=${options.showAlertCategoryIcon ?? true}
|
|
230
333
|
.wrapContent=${true}
|
|
@@ -235,6 +338,7 @@ function wrapWithAlertFrame(options, content, fullWidth = false) {
|
|
|
235
338
|
export {
|
|
236
339
|
AlertFrameTextSize,
|
|
237
340
|
ObcAlertFrame,
|
|
341
|
+
ObcAlertFrameFlashEffect,
|
|
238
342
|
ObcAlertFrameMode,
|
|
239
343
|
AlertType as ObcAlertFrameStatus,
|
|
240
344
|
ObcAlertFrameThickness,
|