@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
|
@@ -12,15 +12,20 @@ import '../../icons/icon-alerts-warning-twotone.js';
|
|
|
12
12
|
import '../../icons/icon-alerts-caution-twotone.js';
|
|
13
13
|
import '../../manual-icon/icon-alerts-critical-twotone.js';
|
|
14
14
|
import '../../manual-icon/icon-alerts-diagnostic-twotone.js';
|
|
15
|
-
import {AlertType} from '../../types.js';
|
|
16
15
|
import {
|
|
16
|
+
AlertType,
|
|
17
|
+
FlashingSpeed,
|
|
18
|
+
type ResolvedFlashingSpeed,
|
|
19
|
+
} from '../../types.js';
|
|
20
|
+
import {
|
|
21
|
+
AlertFlashPhase,
|
|
17
22
|
getAlertTwotoneComponent,
|
|
18
23
|
AlertTwotoneComponent,
|
|
19
|
-
|
|
24
|
+
resolveFlashingSpeed,
|
|
20
25
|
} from '../../alert-severity.js';
|
|
21
26
|
import {classMap} from 'lit/directives/class-map.js';
|
|
22
27
|
import {customElement} from '../../decorator.js';
|
|
23
|
-
import {
|
|
28
|
+
import {FlashingController} from '../../palettes/flashing-controller.js';
|
|
24
29
|
|
|
25
30
|
/**
|
|
26
31
|
* `ObcAlertButtonType` – Enum for alert button visual and behavioral variants.
|
|
@@ -77,6 +82,7 @@ export enum ObcAlertButtonType {
|
|
|
77
82
|
* - `flatMaxBreakpointPx` (number): Maximum width (in px) for normal/enhanced mode; below this, switches to flat mode.
|
|
78
83
|
* - `silenceButtonMinBreakpointPx` (number): Minimum width (in px) to show the silence button; below this, it is hidden.
|
|
79
84
|
* - `blinking` (boolean): Enables blinking animation for active alerts (not for caution type).
|
|
85
|
+
* - `flashingSpeed`: tempo of the blink (`default` follows the alert type: critical/alarm/high fast, warning/medium slow, low very slow; `fixed` never flashes).
|
|
80
86
|
* - `large` (boolean): Increases button size for prominent or touch-friendly use.
|
|
81
87
|
*
|
|
82
88
|
* ## Events
|
|
@@ -109,6 +115,8 @@ export enum ObcAlertButtonType {
|
|
|
109
115
|
*
|
|
110
116
|
* 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.
|
|
111
117
|
*
|
|
118
|
+
* @property flashingSpeed - Flash tempo while `blinking` is on: `default` resolves from
|
|
119
|
+
* `alertType`, `fast`, `slow`, `very-slow` force a tempo, `fixed` never flashes.
|
|
112
120
|
* @property silenceButtonDisabled - Disables the silence button when true.
|
|
113
121
|
* @availableWhen silenceButtonDisabled showSilenceButton==true
|
|
114
122
|
* @slot - No content slots. All content is provided via properties.
|
|
@@ -171,6 +179,25 @@ export class ObcAlertButton extends LitElement {
|
|
|
171
179
|
*/
|
|
172
180
|
@property({type: Boolean}) blinking = false;
|
|
173
181
|
|
|
182
|
+
@property({type: String}) flashingSpeed: FlashingSpeed =
|
|
183
|
+
FlashingSpeed.Default;
|
|
184
|
+
|
|
185
|
+
protected readonly flashing = new FlashingController(
|
|
186
|
+
this,
|
|
187
|
+
() => this.resolvedFlashingSpeed
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
get resolvedFlashingSpeed(): ResolvedFlashingSpeed {
|
|
191
|
+
if (!this.blinking || this.nAlerts <= 0 || this.alertType === undefined) {
|
|
192
|
+
return FlashingSpeed.Fixed;
|
|
193
|
+
}
|
|
194
|
+
return resolveFlashingSpeed(
|
|
195
|
+
this.flashingSpeed,
|
|
196
|
+
this.alertType,
|
|
197
|
+
AlertFlashPhase.Active
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
174
201
|
/**
|
|
175
202
|
* Maximum width (in px) for normal/enhanced mode.
|
|
176
203
|
*
|
|
@@ -200,14 +227,10 @@ export class ObcAlertButton extends LitElement {
|
|
|
200
227
|
override connectedCallback() {
|
|
201
228
|
super.connectedCallback();
|
|
202
229
|
window.addEventListener('resize', this.resizeListener);
|
|
203
|
-
if (this.hasUpdated) {
|
|
204
|
-
this.installBlinking();
|
|
205
|
-
}
|
|
206
230
|
}
|
|
207
231
|
|
|
208
232
|
override disconnectedCallback() {
|
|
209
233
|
window.removeEventListener('resize', this.resizeListener);
|
|
210
|
-
this._blinkAnimationCancel?.();
|
|
211
234
|
super.disconnectedCallback();
|
|
212
235
|
}
|
|
213
236
|
|
|
@@ -282,26 +305,12 @@ export class ObcAlertButton extends LitElement {
|
|
|
282
305
|
);
|
|
283
306
|
}
|
|
284
307
|
|
|
285
|
-
private _blinkAnimationCancel?: () => void;
|
|
286
|
-
|
|
287
|
-
private installBlinking() {
|
|
288
|
-
this._blinkAnimationCancel?.();
|
|
289
|
-
this._blinkAnimationCancel = blinkingAll(this);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
override updated() {
|
|
293
|
-
this.installBlinking();
|
|
294
|
-
}
|
|
295
|
-
|
|
296
308
|
override render() {
|
|
297
309
|
const hasAlerts = this.nAlerts > 0;
|
|
298
310
|
const showCounter =
|
|
299
311
|
this.counter && hasAlerts && this.activeType !== ObcAlertButtonType.Flat;
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
hasAlerts &&
|
|
303
|
-
this.alertType !== undefined &&
|
|
304
|
-
supportsBlinking(this.alertType, false);
|
|
312
|
+
const tempo = this.resolvedFlashingSpeed;
|
|
313
|
+
const showBlinking = tempo !== FlashingSpeed.Fixed;
|
|
305
314
|
return html`
|
|
306
315
|
<div
|
|
307
316
|
class=${classMap({
|
|
@@ -310,7 +319,7 @@ export class ObcAlertButton extends LitElement {
|
|
|
310
319
|
counter: showCounter,
|
|
311
320
|
'has-silence': this.showSilenceButtonDynamic,
|
|
312
321
|
[`type-${this.activeType}`]: true,
|
|
313
|
-
|
|
322
|
+
[`flash-${tempo}`]: true,
|
|
314
323
|
large: this.large,
|
|
315
324
|
})}
|
|
316
325
|
>
|