@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.58 → 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.
- package/bundle/openbridge-webcomponents.bundle.js +5999 -4348
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +755 -75
- package/dist/alert-severity.d.ts +38 -0
- package/dist/alert-severity.d.ts.map +1 -0
- package/dist/alert-severity.js +176 -0
- package/dist/alert-severity.js.map +1 -0
- package/dist/ar/building-blocks/poi-header/poi-header.css.js +38 -7
- package/dist/ar/building-blocks/poi-header/poi-header.css.js.map +1 -1
- package/dist/ar/building-blocks/poi-header/poi-header.d.ts +7 -2
- package/dist/ar/building-blocks/poi-header/poi-header.d.ts.map +1 -1
- package/dist/ar/building-blocks/poi-header/poi-header.js +5 -0
- package/dist/ar/building-blocks/poi-header/poi-header.js.map +1 -1
- package/dist/ar/poi-button/poi-button.css.js +110 -32
- package/dist/ar/poi-button/poi-button.css.js.map +1 -1
- package/dist/ar/poi-button/poi-button.d.ts +7 -2
- package/dist/ar/poi-button/poi-button.d.ts.map +1 -1
- package/dist/ar/poi-button/poi-button.js +15 -0
- package/dist/ar/poi-button/poi-button.js.map +1 -1
- package/dist/ar/types.d.ts +6 -1
- package/dist/ar/types.d.ts.map +1 -1
- package/dist/ar/types.js +5 -0
- package/dist/ar/types.js.map +1 -1
- package/dist/automation/automation-badge/automation-badge.d.ts +9 -1
- package/dist/automation/automation-badge/automation-badge.d.ts.map +1 -1
- package/dist/automation/automation-badge/automation-badge.js +119 -12
- package/dist/automation/automation-badge/automation-badge.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +25 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +7 -2
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.d.ts +10 -3
- package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.js +23 -2
- package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
- package/dist/automation/automation-button/automation-button.css.js +9 -4
- package/dist/automation/automation-button/automation-button.css.js.map +1 -1
- package/dist/automation/automation-button/automation-button.d.ts +4 -2
- package/dist/automation/automation-button/automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/automation-button.js +24 -6
- package/dist/automation/automation-button/automation-button.js.map +1 -1
- package/dist/automation/automation-tank/automation-tank.d.ts +3 -2
- package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
- package/dist/automation/automation-tank/automation-tank.js +13 -2
- package/dist/automation/automation-tank/automation-tank.js.map +1 -1
- package/dist/components/accordion-card/accordion-card.css.js +34 -0
- package/dist/components/accordion-card/accordion-card.css.js.map +1 -1
- package/dist/components/accordion-card/accordion-card.d.ts +3 -2
- package/dist/components/accordion-card/accordion-card.d.ts.map +1 -1
- package/dist/components/accordion-card/accordion-card.js +4 -3
- package/dist/components/accordion-card/accordion-card.js.map +1 -1
- package/dist/components/alert-button/alert-button.css.js +744 -7
- package/dist/components/alert-button/alert-button.css.js.map +1 -1
- package/dist/components/alert-button/alert-button.d.ts +3 -1
- package/dist/components/alert-button/alert-button.d.ts.map +1 -1
- package/dist/components/alert-button/alert-button.js +33 -31
- package/dist/components/alert-button/alert-button.js.map +1 -1
- package/dist/components/alert-frame/alert-frame.css.js +116 -29
- package/dist/components/alert-frame/alert-frame.css.js.map +1 -1
- package/dist/components/alert-frame/alert-frame.d.ts +42 -15
- package/dist/components/alert-frame/alert-frame.d.ts.map +1 -1
- package/dist/components/alert-frame/alert-frame.js +68 -17
- package/dist/components/alert-frame/alert-frame.js.map +1 -1
- package/dist/components/alert-frame/critical-badge.d.ts +12 -0
- package/dist/components/alert-frame/critical-badge.d.ts.map +1 -0
- package/dist/components/alert-frame/critical-badge.js +47 -0
- package/dist/components/alert-frame/critical-badge.js.map +1 -0
- package/dist/components/alert-frame/diagnostic-badge.d.ts +12 -0
- package/dist/components/alert-frame/diagnostic-badge.d.ts.map +1 -0
- package/dist/components/alert-frame/diagnostic-badge.js +60 -0
- package/dist/components/alert-frame/diagnostic-badge.js.map +1 -0
- package/dist/components/alert-icon/alert-icon.d.ts +6 -1
- package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
- package/dist/components/alert-icon/alert-icon.js +96 -38
- package/dist/components/alert-icon/alert-icon.js.map +1 -1
- package/dist/components/alert-icon/icons/icon-critical.d.ts +3 -0
- package/dist/components/alert-icon/icons/icon-critical.d.ts.map +1 -0
- package/dist/components/alert-icon/icons/icon-critical.js +26 -0
- package/dist/components/alert-icon/icons/icon-critical.js.map +1 -0
- package/dist/components/alert-list-details/alert-list-details.d.ts.map +1 -1
- package/dist/components/alert-list-details/alert-list-details.js +6 -7
- package/dist/components/alert-list-details/alert-list-details.js.map +1 -1
- package/dist/components/badge/badge.css.js +50 -2
- package/dist/components/badge/badge.css.js.map +1 -1
- package/dist/components/badge/badge.d.ts +13 -2
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +54 -0
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/manual-icon/icon-alerts-critical-twotone.d.ts +30 -0
- package/dist/manual-icon/icon-alerts-critical-twotone.d.ts.map +1 -0
- package/dist/manual-icon/icon-alerts-critical-twotone.js +55 -0
- package/dist/manual-icon/icon-alerts-critical-twotone.js.map +1 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts +30 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts.map +1 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.js +55 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.js.map +1 -0
- package/dist/navigation-instruments/readout/readout.css.js +3 -18
- package/dist/navigation-instruments/readout/readout.css.js.map +1 -1
- package/dist/navigation-instruments/readout/readout.d.ts +6 -7
- package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
- package/dist/navigation-instruments/readout/readout.js +54 -52
- package/dist/navigation-instruments/readout/readout.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +9 -36
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts +8 -8
- 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 +49 -42
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
- package/dist/openbridge.css +155 -0
- package/dist/types.d.ts +7 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +18 -7
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/src/alert-severity.ts +225 -0
- package/src/ar/building-blocks/poi-header/poi-header.css +38 -7
- package/src/ar/building-blocks/poi-header/poi-header.ts +6 -1
- package/src/ar/poi-button/poi-button.css +126 -32
- package/src/ar/poi-button/poi-button.ts +16 -1
- package/src/ar/types.ts +5 -0
- package/src/automation/automation-badge/automation-badge.ts +124 -17
- package/src/automation/automation-button/abstract-automation-button-storybook-helpers.ts +5 -0
- package/src/automation/automation-button/abstract-automation-button.ts +21 -3
- package/src/automation/automation-button/automation-button.css +9 -4
- package/src/automation/automation-button/automation-button.ts +25 -7
- package/src/automation/automation-tank/automation-tank.stories.ts +22 -0
- package/src/automation/automation-tank/automation-tank.ts +12 -3
- package/src/components/accordion-card/accordion-card.css +33 -0
- package/src/components/accordion-card/accordion-card.stories.ts +2 -1
- package/src/components/accordion-card/accordion-card.ts +3 -4
- package/src/components/alert-button/alert-button.css +89 -5
- package/src/components/alert-button/alert-button.stories.ts +43 -0
- package/src/components/alert-button/alert-button.ts +43 -32
- package/src/components/alert-frame/alert-frame.css +116 -29
- package/src/components/alert-frame/alert-frame.stories.ts +63 -3
- package/src/components/alert-frame/alert-frame.ts +114 -23
- package/src/components/alert-frame/critical-badge.ts +39 -0
- package/src/components/alert-frame/diagnostic-badge.ts +52 -0
- package/src/components/alert-icon/alert-icon.stories.ts +41 -0
- package/src/components/alert-icon/alert-icon.ts +101 -38
- package/src/components/alert-icon/icons/icon-critical.ts +23 -0
- package/src/components/alert-list-details/alert-list-details.stories.ts +67 -0
- package/src/components/alert-list-details/alert-list-details.ts +11 -10
- package/src/components/badge/badge.css +52 -2
- package/src/components/badge/badge.stories.ts +75 -0
- package/src/components/badge/badge.ts +70 -2
- package/src/main.css +1 -0
- package/src/manual-icon/icon-alerts-critical-twotone.ts +60 -0
- package/src/manual-icon/icon-alerts-diagnostic-twotone.ts +60 -0
- package/src/mixins/alert.css +29 -0
- package/src/navigation-instruments/readout/readout.css +3 -24
- package/src/navigation-instruments/readout/readout.stories.ts +57 -4
- package/src/navigation-instruments/readout/readout.ts +69 -63
- package/src/navigation-instruments/readout-list-item/readout-list-item.css +9 -42
- package/src/navigation-instruments/readout-list-item/readout-list-item.stories.ts +57 -14
- package/src/navigation-instruments/readout-list-item/readout-list-item.ts +54 -44
- package/src/palettes/critical.md +95 -0
- package/src/palettes/manual.css +165 -0
- package/src/types.ts +20 -3
package/src/main.css
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {LitElement, html, css, svg} from 'lit';
|
|
2
|
+
import {property} from 'lit/decorators.js';
|
|
3
|
+
import {customElement} from '../decorator.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* `<obi-alerts-critical-twotone>` – Two-tone bell icon for the ISA "critical" alert severity.
|
|
7
|
+
*
|
|
8
|
+
* Renders the alert (bell) glyph as a layered two-tone shape so the silhouette and
|
|
9
|
+
* fill can be tinted independently. Used wherever a critical-severity alert needs an
|
|
10
|
+
* icon representation (badges, frames, lists).
|
|
11
|
+
*
|
|
12
|
+
* ### Features
|
|
13
|
+
* - **Color modes:** Set `useCssColor` to render with the critical design tokens
|
|
14
|
+
* (`--alert-critical-color` / `--alert-critical-outline-color`); leave it `false`
|
|
15
|
+
* (default) to render with `currentColor` so the icon inherits its parent's color.
|
|
16
|
+
*
|
|
17
|
+
* ### Properties and Attributes
|
|
18
|
+
* - `useCssColor` (boolean): When true, fills the two tones with the critical color
|
|
19
|
+
* tokens instead of `currentColor`. Defaults to `false`.
|
|
20
|
+
*/
|
|
21
|
+
@customElement('obi-alerts-critical-twotone')
|
|
22
|
+
export class ObiAlertsCriticalTwotone extends LitElement {
|
|
23
|
+
@property({type: Boolean}) useCssColor = false;
|
|
24
|
+
|
|
25
|
+
private icon = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
26
|
+
<path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z" fill="currentColor"/>
|
|
27
|
+
<path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z" fill="currentColor"/>
|
|
28
|
+
</svg>
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
private iconCss = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
32
|
+
<path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z" style="fill: var(--alert-critical-color)"/>
|
|
33
|
+
<path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z" style="fill: var(--alert-critical-outline-color)"/>
|
|
34
|
+
</svg>
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
override render() {
|
|
38
|
+
return html`
|
|
39
|
+
<div class="wrapper">${this.useCssColor ? this.iconCss : this.icon}</div>
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static override styles = css`
|
|
44
|
+
.wrapper {
|
|
45
|
+
height: 100%;
|
|
46
|
+
width: 100%;
|
|
47
|
+
line-height: 0;
|
|
48
|
+
}
|
|
49
|
+
.wrapper > * {
|
|
50
|
+
height: 100%;
|
|
51
|
+
width: 100%;
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare global {
|
|
57
|
+
interface HTMLElementTagNameMap {
|
|
58
|
+
'obi-alerts-critical-twotone': ObiAlertsCriticalTwotone;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {LitElement, html, css, svg} from 'lit';
|
|
2
|
+
import {property} from 'lit/decorators.js';
|
|
3
|
+
import {customElement} from '../decorator.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* `<obi-alerts-diagnostic-twotone>` – Two-tone bell icon for the ISA "diagnostic" alert severity.
|
|
7
|
+
*
|
|
8
|
+
* Renders the alert (bell) glyph as a layered two-tone shape so the silhouette and
|
|
9
|
+
* fill can be tinted independently. Used wherever a diagnostic-severity alert needs an
|
|
10
|
+
* icon representation (badges, frames, lists).
|
|
11
|
+
*
|
|
12
|
+
* ### Features
|
|
13
|
+
* - **Color modes:** Set `useCssColor` to render with the diagnostic design tokens
|
|
14
|
+
* (`--alert-diagnostic-color` / `--alert-diagnostic-outline-color`); leave it `false`
|
|
15
|
+
* (default) to render with `currentColor` so the icon inherits its parent's color.
|
|
16
|
+
*
|
|
17
|
+
* ### Properties and Attributes
|
|
18
|
+
* - `useCssColor` (boolean): When true, fills the two tones with the diagnostic color
|
|
19
|
+
* tokens instead of `currentColor`. Defaults to `false`.
|
|
20
|
+
*/
|
|
21
|
+
@customElement('obi-alerts-diagnostic-twotone')
|
|
22
|
+
export class ObiAlertsDiagnosticTwotone extends LitElement {
|
|
23
|
+
@property({type: Boolean}) useCssColor = false;
|
|
24
|
+
|
|
25
|
+
private icon = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
26
|
+
<path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z" fill="currentColor"/>
|
|
27
|
+
<path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z" fill="currentColor"/>
|
|
28
|
+
</svg>
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
private iconCss = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
32
|
+
<path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z" style="fill: var(--alert-diagnostic-color)"/>
|
|
33
|
+
<path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z" style="fill: var(--alert-diagnostic-outline-color)"/>
|
|
34
|
+
</svg>
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
override render() {
|
|
38
|
+
return html`
|
|
39
|
+
<div class="wrapper">${this.useCssColor ? this.iconCss : this.icon}</div>
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static override styles = css`
|
|
44
|
+
.wrapper {
|
|
45
|
+
height: 100%;
|
|
46
|
+
width: 100%;
|
|
47
|
+
line-height: 0;
|
|
48
|
+
}
|
|
49
|
+
.wrapper > * {
|
|
50
|
+
height: 100%;
|
|
51
|
+
width: 100%;
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare global {
|
|
57
|
+
interface HTMLElementTagNameMap {
|
|
58
|
+
'obi-alerts-diagnostic-twotone': ObiAlertsDiagnosticTwotone;
|
|
59
|
+
}
|
|
60
|
+
}
|
package/src/mixins/alert.css
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
@define-mixin alert-critical $wrapperClass {
|
|
2
|
+
&:focus {
|
|
3
|
+
outline: none;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
& $(wrapperClass) {
|
|
7
|
+
border: 1px solid var(--critical-enabled-border-color);
|
|
8
|
+
background: var(--critical-enabled-background-color);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&:hover $(wrapperClass) {
|
|
12
|
+
border-color: var(--critical-hover-border-color);
|
|
13
|
+
background-color: var(--critical-hover-background-color);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:active $(wrapperClass) {
|
|
17
|
+
border-color: var(--critical-pressed-border-color);
|
|
18
|
+
background-color: var(--critical-pressed-background-color);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:focus-visible $(wrapperClass) {
|
|
22
|
+
background-color: var(--critical-focused-background-color);
|
|
23
|
+
border-color: var(--critical-focused-border-color);
|
|
24
|
+
outline-color: var(--border-outline-color);
|
|
25
|
+
outline-width: 4px;
|
|
26
|
+
outline-style: solid;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
1
30
|
@define-mixin alert-alarm $wrapperClass {
|
|
2
31
|
&:focus {
|
|
3
32
|
outline: none;
|
|
@@ -34,43 +34,22 @@
|
|
|
34
34
|
grid-template-areas: "meta";
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
&:is(
|
|
38
|
-
.alert-low-integrity,
|
|
39
|
-
.alert-invalid,
|
|
40
|
-
.alert-caution,
|
|
41
|
-
.alert-warning,
|
|
42
|
-
.alert-alarm
|
|
43
|
-
) {
|
|
37
|
+
&:is(.data-low-integrity, .data-invalid) {
|
|
44
38
|
border-width: 1px;
|
|
45
39
|
border-style: solid;
|
|
46
40
|
border-radius: var(--global-border-radius-border-radius-base);
|
|
47
41
|
}
|
|
48
42
|
|
|
49
|
-
&.
|
|
43
|
+
&.data-low-integrity {
|
|
50
44
|
background: var(--alert-low-integrity-background-color);
|
|
51
45
|
border-color: var(--alert-low-integrity-border-color);
|
|
52
46
|
}
|
|
53
47
|
|
|
54
|
-
&.
|
|
48
|
+
&.data-invalid {
|
|
55
49
|
background: var(--alert-invalid-background-color);
|
|
56
50
|
border-color: var(--alert-invalid-border-color);
|
|
57
51
|
}
|
|
58
52
|
|
|
59
|
-
&.alert-caution {
|
|
60
|
-
background: var(--alert-caution-container-background-color);
|
|
61
|
-
border-color: var(--alert-caution-container-border-color);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&.alert-warning {
|
|
65
|
-
background: var(--alert-warning-container-background-color);
|
|
66
|
-
border-color: var(--alert-warning-container-border-color);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&.alert-alarm {
|
|
70
|
-
background: var(--alert-alarm-container-background-color);
|
|
71
|
-
border-color: var(--alert-alarm-container-border-color);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
53
|
&.stack {
|
|
75
54
|
padding-bottom: calc(
|
|
76
55
|
var(--obc-readout-padding-horizontal-safe) +
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
ReadoutDirection,
|
|
11
11
|
ReadoutSetpointInteraction,
|
|
12
|
-
|
|
12
|
+
ReadoutDataState,
|
|
13
13
|
ReadoutVariant,
|
|
14
14
|
ReadoutStackVerticalAlignment,
|
|
15
15
|
} from './readout.js';
|
|
@@ -19,6 +19,12 @@ import {
|
|
|
19
19
|
ReadoutAdviceFormat,
|
|
20
20
|
ReadoutAdviceState,
|
|
21
21
|
} from '../readout-advice/readout-advice.js';
|
|
22
|
+
import {AlertType} from '../../types.js';
|
|
23
|
+
import {
|
|
24
|
+
ObcAlertFrameMode,
|
|
25
|
+
ObcAlertFrameThickness,
|
|
26
|
+
ObcAlertFrameType,
|
|
27
|
+
} from '../../components/alert-frame/alert-frame.js';
|
|
22
28
|
|
|
23
29
|
const meta: Meta<ObcReadout> = {
|
|
24
30
|
title: 'Instruments/Readout',
|
|
@@ -57,11 +63,11 @@ const meta: Meta<ObcReadout> = {
|
|
|
57
63
|
},
|
|
58
64
|
options: Object.values(Priority),
|
|
59
65
|
},
|
|
60
|
-
|
|
66
|
+
dataState: {
|
|
61
67
|
control: {
|
|
62
68
|
type: 'select',
|
|
63
69
|
},
|
|
64
|
-
options: Object.values(
|
|
70
|
+
options: Object.values(ReadoutDataState),
|
|
65
71
|
},
|
|
66
72
|
setpointInteraction: {
|
|
67
73
|
control: {
|
|
@@ -193,7 +199,7 @@ function renderComponent(args: ObcReadout): TemplateResult {
|
|
|
193
199
|
<obc-readout
|
|
194
200
|
.variant=${args.variant}
|
|
195
201
|
.valuePriority=${args.valuePriority}
|
|
196
|
-
.
|
|
202
|
+
.dataState=${args.dataState}
|
|
197
203
|
.direction=${args.direction}
|
|
198
204
|
.setpointInteraction=${args.setpointInteraction}
|
|
199
205
|
.setpointSize=${args.setpointSize}
|
|
@@ -219,6 +225,7 @@ function renderComponent(args: ObcReadout): TemplateResult {
|
|
|
219
225
|
.fractionDigits=${args.fractionDigits}
|
|
220
226
|
.alignment=${args.alignment}
|
|
221
227
|
.off=${args.off}
|
|
228
|
+
.alert=${args.alert}
|
|
222
229
|
>
|
|
223
230
|
</obc-readout>
|
|
224
231
|
`;
|
|
@@ -252,3 +259,49 @@ export const Center: Story = {
|
|
|
252
259
|
|
|
253
260
|
render: (args) => renderComponent(args as ObcReadout),
|
|
254
261
|
};
|
|
262
|
+
|
|
263
|
+
export const DataLowIntegrity: Story = {
|
|
264
|
+
args: {
|
|
265
|
+
value: 42,
|
|
266
|
+
label: 'RPM',
|
|
267
|
+
unit: 'rpm',
|
|
268
|
+
dataState: ReadoutDataState.lowIntegrity,
|
|
269
|
+
},
|
|
270
|
+
render: (args) => renderComponent(args as ObcReadout),
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
export const DataInvalid: Story = {
|
|
274
|
+
args: {
|
|
275
|
+
value: 42,
|
|
276
|
+
label: 'RPM',
|
|
277
|
+
unit: 'rpm',
|
|
278
|
+
dataState: ReadoutDataState.invalid,
|
|
279
|
+
},
|
|
280
|
+
render: (args) => renderComponent(args as ObcReadout),
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
export const Alarm: Story = {
|
|
284
|
+
args: {
|
|
285
|
+
value: 42,
|
|
286
|
+
label: 'RPM',
|
|
287
|
+
unit: 'rpm',
|
|
288
|
+
alert: {
|
|
289
|
+
status: 'alarm',
|
|
290
|
+
mode: 'acked-active',
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
render: (args) => renderComponent(args as ObcReadout),
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
export const IsaCritical: Story = {
|
|
297
|
+
args: {
|
|
298
|
+
value: 42,
|
|
299
|
+
label: 'RPM',
|
|
300
|
+
unit: 'rpm',
|
|
301
|
+
alert: {
|
|
302
|
+
status: 'isa-critical',
|
|
303
|
+
mode: 'unacked-active',
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
render: (args) => renderComponent(args as ObcReadout),
|
|
307
|
+
};
|
|
@@ -34,6 +34,10 @@ import {
|
|
|
34
34
|
ReadoutSetpointSize,
|
|
35
35
|
} from '../readout-setpoint/readout-setpoint.js';
|
|
36
36
|
import '../readout-setpoint/readout-setpoint.js';
|
|
37
|
+
import {
|
|
38
|
+
type AlertFrameConfig,
|
|
39
|
+
wrapWithAlertFrame,
|
|
40
|
+
} from '../../components/alert-frame/alert-frame.js';
|
|
37
41
|
|
|
38
42
|
export enum ReadoutVariant {
|
|
39
43
|
regular = 'regular',
|
|
@@ -41,13 +45,10 @@ export enum ReadoutVariant {
|
|
|
41
45
|
stack = 'stack',
|
|
42
46
|
}
|
|
43
47
|
|
|
44
|
-
export enum
|
|
48
|
+
export enum ReadoutDataState {
|
|
45
49
|
none = 'none',
|
|
46
50
|
lowIntegrity = 'low-integrity',
|
|
47
51
|
invalid = 'invalid',
|
|
48
|
-
caution = 'caution',
|
|
49
|
-
warning = 'warning',
|
|
50
|
-
alarm = 'alarm',
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
export enum ReadoutSetpointInteraction {
|
|
@@ -123,8 +124,7 @@ export class ObcReadout extends LitElement {
|
|
|
123
124
|
@property({type: String}) src?: string;
|
|
124
125
|
@property({type: Boolean}) off = false;
|
|
125
126
|
@property({type: String}) valuePriority?: Priority;
|
|
126
|
-
@property({type: String})
|
|
127
|
-
ReadoutAlertState.none;
|
|
127
|
+
@property({type: String}) dataState: ReadoutDataState = ReadoutDataState.none;
|
|
128
128
|
@property({type: String}) setpointInteraction: ReadoutSetpointInteraction =
|
|
129
129
|
ReadoutSetpointInteraction.alwaysVisible;
|
|
130
130
|
@property({type: String}) direction: ReadoutDirection =
|
|
@@ -161,6 +161,8 @@ export class ObcReadout extends LitElement {
|
|
|
161
161
|
@property({type: String}) sourceType?: ReadoutSourceType;
|
|
162
162
|
@property({type: Boolean}) hasLeadingIcon = false;
|
|
163
163
|
|
|
164
|
+
@property({type: Object}) alert: AlertFrameConfig | boolean = false;
|
|
165
|
+
|
|
164
166
|
@property({type: Boolean, attribute: false}) sourceHug = true;
|
|
165
167
|
@property({type: Boolean}) hasSourceLeadingIcon = false;
|
|
166
168
|
@property({type: Boolean, attribute: false}) hasSourceTrailingIcon = true;
|
|
@@ -1033,63 +1035,67 @@ export class ObcReadout extends LitElement {
|
|
|
1033
1035
|
}
|
|
1034
1036
|
|
|
1035
1037
|
override render() {
|
|
1036
|
-
return
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
this.
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
this.
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
this.
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1038
|
+
return wrapWithAlertFrame(
|
|
1039
|
+
this.alert,
|
|
1040
|
+
html`
|
|
1041
|
+
<div
|
|
1042
|
+
class=${classMap({
|
|
1043
|
+
readout: true,
|
|
1044
|
+
[this.variant]: true,
|
|
1045
|
+
[this.direction]: true,
|
|
1046
|
+
'alignment-left': this.alignment === 'left',
|
|
1047
|
+
'alignment-center': this.alignment === 'center',
|
|
1048
|
+
'alignment-vertical': this.alignment === 'vertical',
|
|
1049
|
+
'interaction-always-visible':
|
|
1050
|
+
this.interactionMode === ReadoutSetpointInteraction.alwaysVisible,
|
|
1051
|
+
'interaction-flip-flop':
|
|
1052
|
+
this.setpointInteractionEnabled &&
|
|
1053
|
+
this.interactionMode === ReadoutSetpointInteraction.flipFlop,
|
|
1054
|
+
'interaction-pop-up':
|
|
1055
|
+
this.setpointInteractionEnabled &&
|
|
1056
|
+
this.interactionMode === ReadoutSetpointInteraction.popUp,
|
|
1057
|
+
'focus-setpoint':
|
|
1058
|
+
this.setpointInteractionEnabled && this.flipFlopSetpointFocused,
|
|
1059
|
+
'focus-value':
|
|
1060
|
+
this.setpointInteractionEnabled && this.flipFlopValueFocused,
|
|
1061
|
+
'data-none': this.dataState === ReadoutDataState.none,
|
|
1062
|
+
'data-low-integrity':
|
|
1063
|
+
this.dataState === ReadoutDataState.lowIntegrity,
|
|
1064
|
+
'data-invalid': this.dataState === ReadoutDataState.invalid,
|
|
1065
|
+
'has-source': this.hasSrc,
|
|
1066
|
+
'has-setpoint': this.hasSetpoint,
|
|
1067
|
+
'has-setpoint-button':
|
|
1068
|
+
this.isHorizontal &&
|
|
1069
|
+
this.setpointFormat === ReadoutSetpointFormat.button,
|
|
1070
|
+
'no-hug': !this.hug,
|
|
1071
|
+
'label-only': this.labelOnly,
|
|
1072
|
+
})}
|
|
1073
|
+
>
|
|
1074
|
+
${!this.labelOnly && this.isVertical ? this.renderAdvice() : nothing}
|
|
1075
|
+
${!this.labelOnly && this.isVertical
|
|
1076
|
+
? this.renderSetpoint()
|
|
1077
|
+
: nothing}
|
|
1078
|
+
${!this.labelOnly && this.isVertical
|
|
1079
|
+
? this.renderValueZone()
|
|
1080
|
+
: nothing}
|
|
1081
|
+
${(this.labelOnly || this.isVertical) &&
|
|
1082
|
+
this.shouldRenderReadoutMetaZone
|
|
1083
|
+
? renderReadoutMetaZone({
|
|
1084
|
+
labelValue: this.label,
|
|
1085
|
+
unitValue: this.unit,
|
|
1086
|
+
})
|
|
1087
|
+
: nothing}
|
|
1088
|
+
${!this.labelOnly && this.hasSrc && this.isVertical
|
|
1089
|
+
? this.renderSource()
|
|
1090
|
+
: nothing}
|
|
1091
|
+
${!this.labelOnly && this.isHorizontal
|
|
1092
|
+
? this.renderHorizontalLayout()
|
|
1093
|
+
: nothing}
|
|
1094
|
+
${this.renderSourcePickerSlot()}
|
|
1095
|
+
</div>
|
|
1096
|
+
${this.renderSourcePickerContent()}
|
|
1097
|
+
`
|
|
1098
|
+
);
|
|
1093
1099
|
}
|
|
1094
1100
|
|
|
1095
1101
|
static override styles = unsafeCSS(componentStyle);
|
|
@@ -228,58 +228,25 @@
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
&:is(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
.alert-caution,
|
|
235
|
-
.alert-warning,
|
|
236
|
-
.alert-alarm
|
|
237
|
-
) {
|
|
238
|
-
background: var(--_obc-readout-list-item-alert-background);
|
|
239
|
-
border: 1px solid var(--_obc-readout-list-item-alert-border);
|
|
231
|
+
&:is(.data-low-integrity, .data-invalid) {
|
|
232
|
+
background: var(--_obc-readout-list-item-data-background);
|
|
233
|
+
border: 1px solid var(--_obc-readout-list-item-data-border);
|
|
240
234
|
border-radius: 4px;
|
|
241
235
|
}
|
|
242
236
|
|
|
243
|
-
&.
|
|
244
|
-
--_obc-readout-list-item-
|
|
237
|
+
&.data-low-integrity {
|
|
238
|
+
--_obc-readout-list-item-data-background: var(
|
|
245
239
|
--alert-low-integrity-background-color
|
|
246
240
|
);
|
|
247
|
-
--_obc-readout-list-item-
|
|
241
|
+
--_obc-readout-list-item-data-border: var(
|
|
248
242
|
--alert-low-integrity-border-color
|
|
249
243
|
);
|
|
250
244
|
}
|
|
251
245
|
|
|
252
|
-
&.
|
|
253
|
-
--_obc-readout-list-item-
|
|
246
|
+
&.data-invalid {
|
|
247
|
+
--_obc-readout-list-item-data-background: var(
|
|
254
248
|
--alert-invalid-background-color
|
|
255
249
|
);
|
|
256
|
-
--_obc-readout-list-item-
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
&.alert-caution {
|
|
260
|
-
--_obc-readout-list-item-alert-background: var(
|
|
261
|
-
--alert-caution-container-background-color
|
|
262
|
-
);
|
|
263
|
-
--_obc-readout-list-item-alert-border: var(
|
|
264
|
-
--alert-caution-container-border-color
|
|
265
|
-
);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
&.alert-warning {
|
|
269
|
-
--_obc-readout-list-item-alert-background: var(
|
|
270
|
-
--alert-warning-container-background-color
|
|
271
|
-
);
|
|
272
|
-
--_obc-readout-list-item-alert-border: var(
|
|
273
|
-
--alert-warning-container-border-color
|
|
274
|
-
);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
&.alert-alarm {
|
|
278
|
-
--_obc-readout-list-item-alert-background: var(
|
|
279
|
-
--alert-alarm-container-background-color
|
|
280
|
-
);
|
|
281
|
-
--_obc-readout-list-item-alert-border: var(
|
|
282
|
-
--alert-alarm-container-border-color
|
|
283
|
-
);
|
|
250
|
+
--_obc-readout-list-item-data-border: var(--alert-invalid-border-color);
|
|
284
251
|
}
|
|
285
252
|
}
|