@oicl/openbridge-webcomponents 2.2.0-next.5 → 2.2.0-next.6

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 (50) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +542 -6
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +854 -197
  4. package/dist/components/alert-button-item/alert-button-item.css.js +65 -1
  5. package/dist/components/alert-button-item/alert-button-item.css.js.map +1 -1
  6. package/dist/components/alert-button-item/alert-button-item.d.ts +14 -1
  7. package/dist/components/alert-button-item/alert-button-item.d.ts.map +1 -1
  8. package/dist/components/alert-button-item/alert-button-item.js +19 -2
  9. package/dist/components/alert-button-item/alert-button-item.js.map +1 -1
  10. package/dist/components/alert-subsystem-button/alert-subsystem-button.css.js +120 -0
  11. package/dist/components/alert-subsystem-button/alert-subsystem-button.css.js.map +1 -0
  12. package/dist/components/alert-subsystem-button/alert-subsystem-button.d.ts +105 -0
  13. package/dist/components/alert-subsystem-button/alert-subsystem-button.d.ts.map +1 -0
  14. package/dist/components/alert-subsystem-button/alert-subsystem-button.js +107 -0
  15. package/dist/components/alert-subsystem-button/alert-subsystem-button.js.map +1 -0
  16. package/dist/components/alert-subsystem-counter/alert-subsystem-counter.css.js +4 -0
  17. package/dist/components/alert-subsystem-counter/alert-subsystem-counter.css.js.map +1 -1
  18. package/dist/components/alert-subsystem-counter/alert-subsystem-counter.d.ts +3 -1
  19. package/dist/components/alert-subsystem-counter/alert-subsystem-counter.d.ts.map +1 -1
  20. package/dist/components/alert-subsystem-counter/alert-subsystem-counter.js +7 -1
  21. package/dist/components/alert-subsystem-counter/alert-subsystem-counter.js.map +1 -1
  22. package/dist/components/diagnostic-button/diagnostic-button.css.js +18 -0
  23. package/dist/components/diagnostic-button/diagnostic-button.css.js.map +1 -0
  24. package/dist/components/diagnostic-button/diagnostic-button.d.ts +71 -0
  25. package/dist/components/diagnostic-button/diagnostic-button.d.ts.map +1 -0
  26. package/dist/components/diagnostic-button/diagnostic-button.js +52 -0
  27. package/dist/components/diagnostic-button/diagnostic-button.js.map +1 -0
  28. package/dist/components/diagnostic-menu/diagnostic-menu.css.js +109 -0
  29. package/dist/components/diagnostic-menu/diagnostic-menu.css.js.map +1 -0
  30. package/dist/components/diagnostic-menu/diagnostic-menu.d.ts +111 -0
  31. package/dist/components/diagnostic-menu/diagnostic-menu.d.ts.map +1 -0
  32. package/dist/components/diagnostic-menu/diagnostic-menu.js +90 -0
  33. package/dist/components/diagnostic-menu/diagnostic-menu.js.map +1 -0
  34. package/dist/components/icon-button/icon-button.js +2 -2
  35. package/dist/components/icon-button/icon-button.js.map +1 -1
  36. package/dist/components/top-bar/top-bar.css.js +1 -0
  37. package/dist/components/top-bar/top-bar.css.js.map +1 -1
  38. package/dist/components/top-bar/top-bar.d.ts +4 -0
  39. package/dist/components/top-bar/top-bar.d.ts.map +1 -1
  40. package/dist/components/top-bar/top-bar.js +1 -0
  41. package/dist/components/top-bar/top-bar.js.map +1 -1
  42. package/dist/generated/locales/es-419.d.ts +6 -0
  43. package/dist/generated/locales/es-419.d.ts.map +1 -1
  44. package/dist/generated/locales/es-419.js +6 -0
  45. package/dist/generated/locales/es-419.js.map +1 -1
  46. package/dist/generated/locales/fi-FI.d.ts +6 -0
  47. package/dist/generated/locales/fi-FI.d.ts.map +1 -1
  48. package/dist/generated/locales/fi-FI.js +6 -0
  49. package/dist/generated/locales/fi-FI.js.map +1 -1
  50. package/package.json +1 -1
@@ -0,0 +1,107 @@
1
+ import { alertCountsLabel, rankAlertCounts } from "../../alert-severity.js";
2
+ import { customElement } from "../../decorator.js";
3
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
4
+ import "../../icons/icon-alert-list.js";
5
+ import "../icon-button/icon-button.js";
6
+ import "../alert-counter-item/alert-counter-item.js";
7
+ import alert_subsystem_button_default from "./alert-subsystem-button.css.js";
8
+ import "../alert-subsystem-counter/alert-subsystem-counter.js";
9
+ import { localized, msg } from "@lit/localize";
10
+ import { LitElement, html, unsafeCSS } from "lit";
11
+ import { property } from "lit/decorators.js";
12
+ //#region src/components/alert-subsystem-button/alert-subsystem-button.ts
13
+ var ObcAlertSubsystemButton = class ObcAlertSubsystemButton extends LitElement {
14
+ constructor(..._args) {
15
+ super(..._args);
16
+ this.counts = {};
17
+ this.hasAlert = false;
18
+ this.label = "";
19
+ this.emptyText = "No alerts";
20
+ this.disabled = false;
21
+ this.counterDisabled = false;
22
+ this.listDisabled = false;
23
+ this.listButtonLabel = "";
24
+ this.ariaLabel = null;
25
+ this.handleCounterClick = (e) => {
26
+ e.stopPropagation();
27
+ this.dispatchEvent(new CustomEvent("counter-click"));
28
+ };
29
+ this.handleListClick = (e) => {
30
+ e.stopPropagation();
31
+ this.dispatchEvent(new CustomEvent("alert-list-click"));
32
+ };
33
+ }
34
+ /** The flag the counter gets: `hasAlert` with nothing to draw reads as none. */
35
+ get showsCounts() {
36
+ return this.hasAlert && rankAlertCounts(this.counts).length > 0;
37
+ }
38
+ get counterName() {
39
+ if (this.ariaLabel) return this.ariaLabel;
40
+ const state = this.showsCounts ? alertCountsLabel(this.counts) : this.emptyText;
41
+ return [this.label, state].filter((part) => part !== "").join(", ") || msg("Alerts");
42
+ }
43
+ render() {
44
+ return html`
45
+ <div class="wrapper">
46
+ <button
47
+ class="counter-button"
48
+ data-testid="counter-button"
49
+ ?disabled=${this.disabled || this.counterDisabled}
50
+ aria-label=${this.counterName}
51
+ @click=${this.handleCounterClick}
52
+ >
53
+ <div class="visible-wrapper">
54
+ <obc-alert-subsystem-counter
55
+ class="counter"
56
+ .label=${this.label}
57
+ .hasAlert=${this.showsCounts}
58
+ .emptyText=${this.emptyText}
59
+ >
60
+ <slot name="icon" slot="icon"></slot>
61
+ <obc-alert-counter-item
62
+ slot="badges"
63
+ .counts=${this.counts}
64
+ ></obc-alert-counter-item>
65
+ </obc-alert-subsystem-counter>
66
+ </div>
67
+ </button>
68
+ <obc-icon-button
69
+ class="list-button"
70
+ data-testid="list-button"
71
+ variant="normal"
72
+ cornerRight
73
+ ?disabled=${this.disabled || this.listDisabled}
74
+ aria-label=${this.listButtonLabel || msg("Alert list")}
75
+ @click=${this.handleListClick}
76
+ >
77
+ <slot name="list-icon"
78
+ ><obi-alert-list aria-hidden="true"></obi-alert-list
79
+ ></slot>
80
+ </obc-icon-button>
81
+ </div>
82
+ `;
83
+ }
84
+ static {
85
+ this.styles = unsafeCSS(alert_subsystem_button_default);
86
+ }
87
+ };
88
+ __decorate([property({
89
+ type: Object,
90
+ attribute: false
91
+ })], ObcAlertSubsystemButton.prototype, "counts", void 0);
92
+ __decorate([property({ type: Boolean })], ObcAlertSubsystemButton.prototype, "hasAlert", void 0);
93
+ __decorate([property({ type: String })], ObcAlertSubsystemButton.prototype, "label", void 0);
94
+ __decorate([property({ type: String })], ObcAlertSubsystemButton.prototype, "emptyText", void 0);
95
+ __decorate([property({ type: Boolean })], ObcAlertSubsystemButton.prototype, "disabled", void 0);
96
+ __decorate([property({ type: Boolean })], ObcAlertSubsystemButton.prototype, "counterDisabled", void 0);
97
+ __decorate([property({ type: Boolean })], ObcAlertSubsystemButton.prototype, "listDisabled", void 0);
98
+ __decorate([property({ type: String })], ObcAlertSubsystemButton.prototype, "listButtonLabel", void 0);
99
+ __decorate([property({
100
+ type: String,
101
+ attribute: "aria-label"
102
+ })], ObcAlertSubsystemButton.prototype, "ariaLabel", void 0);
103
+ ObcAlertSubsystemButton = __decorate([customElement("obc-alert-subsystem-button"), localized()], ObcAlertSubsystemButton);
104
+ //#endregion
105
+ export { ObcAlertSubsystemButton };
106
+
107
+ //# sourceMappingURL=alert-subsystem-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-subsystem-button.js","names":[],"sources":["../../../src/components/alert-subsystem-button/alert-subsystem-button.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {localized, msg} from '@lit/localize';\nimport componentStyle from './alert-subsystem-button.css?inline';\nimport {customElement} from '../../decorator.js';\nimport '../alert-subsystem-counter/alert-subsystem-counter.js';\nimport '../alert-counter-item/alert-counter-item.js';\nimport '../icon-button/icon-button.js';\nimport '../../icons/icon-alert-list.js';\nimport type {AlertCounts} from '../../types.js';\nimport {alertCountsLabel, rankAlertCounts} from '../../alert-severity.js';\n\n/**\n * `<obc-alert-subsystem-button>` – A subsystem's alert counts as a split\n * control: the counts open the alert menu, the list icon goes to the alert\n * list page.\n *\n * The left half is `obc-alert-subsystem-counter` with the per-severity\n * `counts` drawn by `obc-alert-counter-item`, inside a button of the normal\n * style; the right half is an icon button with the alert list icon. The two\n * share one edge, as the halves of `obc-split-button` do.\n *\n * ---\n *\n * ### Features\n * - **Counts:** `counts` per severity, drawn as badges; `hasAlert` off, or\n * on with nothing counted, shows `emptyText` instead.\n * - **Label and icon:** `label` and the `icon` slot, as on the counter.\n * - **Two halves:** `counter-click` from the counts, `alert-list-click` from\n * the list icon; `counterDisabled` and `listDisabled` disable one half,\n * `disabled` both.\n * - **List icon:** the `list-icon` slot, the alert list icon when empty.\n *\n * ---\n *\n * ### Usage Guidelines\n * - Show `obc-alert-menu` on `counter-click` and navigate on\n * `alert-list-click`; the button reports the clicks and nothing more.\n * - Two native buttons, each a tab stop, activated by Enter and Space\n * ([APG button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/)).\n * Left out: nothing.\n * - **TODO(designer):** the design draws an empty placeholder badge for each\n * zero count; no counter in the library does, so only non-zero counts are\n * drawn (#1396).\n * - **TODO(designer):** a disabled counter half dims its frame, while the\n * severity badges keep their colour and the label its active colour; the\n * design has no disabled variant.\n *\n * ---\n *\n * ### Example\n *\n * ```html\n * <obc-alert-subsystem-button label=\"HVAC\" hasAlert .counts=${{countCaution: 2}}>\n * <obi-placeholder slot=\"icon\"></obi-placeholder>\n * </obc-alert-subsystem-button>\n * ```\n *\n * @property counts - Alert count per severity, drawn as badges in the counter half.\n * @availableWhen counts hasAlert==true\n * @property hasAlert - Whether the subsystem has active alerts: `true` draws the badges, `false` the `emptyText`; `true` with nothing counted shows the `emptyText` as well.\n * @property label - The subsystem label, before the badges.\n * @property emptyText - Text shown instead of the badges when `hasAlert` is `false` or nothing is counted.\n * @property disabled - Disables both halves.\n * @property counterDisabled - Disables the counter half alone.\n * @property listDisabled - Disables the list half alone.\n * @property listButtonLabel - Accessible name of the list half; \"Alert list\" when left empty.\n * @property ariaLabel - Accessible name of the counter half, mapped to the `aria-label` attribute; replaces the generated \"HVAC, 2 Caution\", or \"Alerts\" when the half has neither a label nor text. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary.\n * @slot icon - Leading icon of the counter half.\n * @slot list-icon - Icon of the list half; the alert list icon when empty.\n * @fires {CustomEvent<void>} counter-click - Fired when the counter half is clicked.\n * @fires {CustomEvent<void>} alert-list-click - Fired when the list half is clicked.\n * @experimental\n */\n@customElement('obc-alert-subsystem-button')\n@localized()\nexport class ObcAlertSubsystemButton extends LitElement {\n @property({type: Object, attribute: false}) counts: AlertCounts = {};\n @property({type: Boolean}) hasAlert = false;\n @property({type: String}) label = '';\n @property({type: String}) emptyText = 'No alerts';\n @property({type: Boolean}) disabled = false;\n @property({type: Boolean}) counterDisabled = false;\n @property({type: Boolean}) listDisabled = false;\n @property({type: String}) listButtonLabel = '';\n\n // Reactive so a consumer changing the name re-renders the inner button.\n @property({type: String, attribute: 'aria-label'})\n override ariaLabel: string | null = null;\n\n /** The flag the counter gets: `hasAlert` with nothing to draw reads as none. */\n private get showsCounts(): boolean {\n return this.hasAlert && rankAlertCounts(this.counts).length > 0;\n }\n\n private get counterName(): string {\n if (this.ariaLabel) {\n return this.ariaLabel;\n }\n const state = this.showsCounts\n ? alertCountsLabel(this.counts)\n : this.emptyText;\n return (\n [this.label, state].filter((part) => part !== '').join(', ') ||\n msg('Alerts')\n );\n }\n\n private handleCounterClick = (e: Event) => {\n e.stopPropagation();\n this.dispatchEvent(new CustomEvent('counter-click'));\n };\n\n private handleListClick = (e: Event) => {\n e.stopPropagation();\n this.dispatchEvent(new CustomEvent('alert-list-click'));\n };\n\n override render() {\n return html`\n <div class=\"wrapper\">\n <button\n class=\"counter-button\"\n data-testid=\"counter-button\"\n ?disabled=${this.disabled || this.counterDisabled}\n aria-label=${this.counterName}\n @click=${this.handleCounterClick}\n >\n <div class=\"visible-wrapper\">\n <obc-alert-subsystem-counter\n class=\"counter\"\n .label=${this.label}\n .hasAlert=${this.showsCounts}\n .emptyText=${this.emptyText}\n >\n <slot name=\"icon\" slot=\"icon\"></slot>\n <obc-alert-counter-item\n slot=\"badges\"\n .counts=${this.counts}\n ></obc-alert-counter-item>\n </obc-alert-subsystem-counter>\n </div>\n </button>\n <obc-icon-button\n class=\"list-button\"\n data-testid=\"list-button\"\n variant=\"normal\"\n cornerRight\n ?disabled=${this.disabled || this.listDisabled}\n aria-label=${this.listButtonLabel || msg('Alert list')}\n @click=${this.handleListClick}\n >\n <slot name=\"list-icon\"\n ><obi-alert-list aria-hidden=\"true\"></obi-alert-list\n ></slot>\n </obc-icon-button>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-subsystem-button': ObcAlertSubsystemButton;\n }\n}\n"],"mappings":";;;;;;;;;;;;AA4EO,IAAM,0BAAN,MAAM,gCAAgC,WAAW;;;EACY,KAAA,SAAA,CAAC;EAC7B,KAAA,WAAA;EACJ,KAAA,QAAA;EACI,KAAA,YAAA;EACA,KAAA,WAAA;EACO,KAAA,kBAAA;EACH,KAAA,eAAA;EACE,KAAA,kBAAA;EAIR,KAAA,YAAA;EAoBN,KAAA,sBAAA,MAAa;GACzC,EAAE,gBAAgB;GAClB,KAAK,cAAc,IAAI,YAAY,eAAe,CAAC;EACrD;EAE2B,KAAA,mBAAA,MAAa;GACtC,EAAE,gBAAgB;GAClB,KAAK,cAAc,IAAI,YAAY,kBAAkB,CAAC;EACxD;;;CAzBA,IAAY,cAAuB;EACjC,OAAO,KAAK,YAAY,gBAAgB,KAAK,MAAM,CAAC,CAAC,SAAS;CAChE;CAEA,IAAY,cAAsB;EAChC,IAAI,KAAK,WACP,OAAO,KAAK;EAEd,MAAM,QAAQ,KAAK,cACf,iBAAiB,KAAK,MAAM,IAC5B,KAAK;EACT,OACE,CAAC,KAAK,OAAO,KAAK,CAAC,CAAC,QAAQ,SAAS,SAAS,EAAE,CAAC,CAAC,KAAK,IAAI,KAC3D,IAAI,QAAQ;CAEhB;CAYA,SAAkB;EAChB,OAAO,IAAI;;;;;sBAKO,KAAK,YAAY,KAAK,gBAAgB;uBACrC,KAAK,YAAY;mBACrB,KAAK,mBAAmB;;;;;uBAKpB,KAAK,MAAM;0BACR,KAAK,YAAY;2BAChB,KAAK,UAAU;;;;;0BAKhB,KAAK,OAAO;;;;;;;;;;sBAUhB,KAAK,YAAY,KAAK,aAAa;uBAClC,KAAK,mBAAmB,IAAI,YAAY,EAAE;mBAC9C,KAAK,gBAAgB;;;;;;;;CAQtC;;EAEyB,KAAA,SAAA,UAAU,8BAAc;;AACnD;AApFG,WAAA,CAAA,SAAS;CAAC,MAAM;CAAQ,WAAW;AAAK,CAAC,CAAA,GAAA,wBAAA,WAAA,UAAA,KAAA,CAAA;AACzC,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,wBAAA,WAAA,YAAA,KAAA,CAAA;AACxB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,wBAAA,WAAA,SAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,wBAAA,WAAA,aAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,wBAAA,WAAA,YAAA,KAAA,CAAA;AACxB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,wBAAA,WAAA,mBAAA,KAAA,CAAA;AACxB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,wBAAA,WAAA,gBAAA,KAAA,CAAA;AACxB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,wBAAA,WAAA,mBAAA,KAAA,CAAA;AAGvB,WAAA,CAAA,SAAS;CAAC,MAAM;CAAQ,WAAW;AAAY,CAAC,CAAA,GAAA,wBAAA,WAAA,aAAA,KAAA,CAAA;AAblD,0BAAA,WAAA,CAAA,cAAc,4BAA4B,GAC1C,UAAU,CAAA,GAAA,uBAAA"}
@@ -32,6 +32,10 @@ var alert_subsystem_counter_default = css`* {
32
32
  min-width: 0; /* lets the label shrink below its text width */
33
33
  }
34
34
 
35
+ .leading-container.no-leading {
36
+ display: none; /* no label and no icon: the badges take the whole frame, with no leading hole */
37
+ }
38
+
35
39
  .icon {
36
40
  flex-shrink: 0;
37
41
  width: var(--global-size-spacing-icon-icon-size-regular);
@@ -1 +1 @@
1
- {"version":3,"file":"alert-subsystem-counter.css.js","names":[],"sources":["../../../src/components/alert-subsystem-counter/alert-subsystem-counter.css?inline"],"sourcesContent":[":host {\n display: block;\n}\n\n.frame {\n box-sizing: border-box; /* the host width is the frame width, border included */\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px;\n border-radius: 6px;\n background: var(--container-section-color);\n border: 1px solid var(--border-outline-color);\n}\n\n.frame.orientation-vertical {\n flex-direction: column;\n align-items: stretch;\n}\n\n.leading-container {\n display: flex;\n flex: 1 0 0; /* takes the width the badges leave over, so the label can truncate */\n align-items: center;\n gap: 4px;\n min-width: 0; /* lets the label shrink below its text width */\n}\n\n.icon {\n flex-shrink: 0;\n width: var(--global-size-spacing-icon-icon-size-regular);\n height: var(--global-size-spacing-icon-icon-size-regular);\n color: var(--on-indent-neutral-color);\n}\n\n.icon.no-icon {\n display: none; /* collapses the flex gap too, so an iconless counter has no leading hole */\n}\n\n.label {\n @mixin font-body;\n flex: 1 0 0;\n min-width: 0; /* required for text-overflow to kick in inside a flex item */\n padding-left: 4px;\n color: var(--element-inactive-color);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.frame.has-alert .label {\n @mixin font-body-active;\n color: var(--on-indent-active-color);\n}\n\n.trailing-container {\n display: flex;\n flex-shrink: 0; /* badges keep their size; the label is what gives way */\n align-items: center;\n gap: 4px;\n}\n\n.frame.orientation-horizontal .trailing-container {\n justify-content: flex-end;\n}\n\n.frame.orientation-vertical .trailing-container {\n align-self: flex-start; /* hugs its content under the label instead of stretching across the frame */\n}\n\n.frame:not(.has-alert) .trailing-container {\n justify-content: center;\n /* same row height as the large badges it stands in for */\n height: var(--ui-components-badge-min-size-large);\n padding: 0 8px;\n}\n\n.empty {\n @mixin font-label;\n color: var(--element-inactive-color);\n white-space: nowrap;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"alert-subsystem-counter.css.js","names":[],"sources":["../../../src/components/alert-subsystem-counter/alert-subsystem-counter.css?inline"],"sourcesContent":[":host {\n display: block;\n}\n\n.frame {\n box-sizing: border-box; /* the host width is the frame width, border included */\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px;\n border-radius: 6px;\n background: var(--container-section-color);\n border: 1px solid var(--border-outline-color);\n}\n\n.frame.orientation-vertical {\n flex-direction: column;\n align-items: stretch;\n}\n\n.leading-container {\n display: flex;\n flex: 1 0 0; /* takes the width the badges leave over, so the label can truncate */\n align-items: center;\n gap: 4px;\n min-width: 0; /* lets the label shrink below its text width */\n}\n\n.leading-container.no-leading {\n display: none; /* no label and no icon: the badges take the whole frame, with no leading hole */\n}\n\n.icon {\n flex-shrink: 0;\n width: var(--global-size-spacing-icon-icon-size-regular);\n height: var(--global-size-spacing-icon-icon-size-regular);\n color: var(--on-indent-neutral-color);\n}\n\n.icon.no-icon {\n display: none; /* collapses the flex gap too, so an iconless counter has no leading hole */\n}\n\n.label {\n @mixin font-body;\n flex: 1 0 0;\n min-width: 0; /* required for text-overflow to kick in inside a flex item */\n padding-left: 4px;\n color: var(--element-inactive-color);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.frame.has-alert .label {\n @mixin font-body-active;\n color: var(--on-indent-active-color);\n}\n\n.trailing-container {\n display: flex;\n flex-shrink: 0; /* badges keep their size; the label is what gives way */\n align-items: center;\n gap: 4px;\n}\n\n.frame.orientation-horizontal .trailing-container {\n justify-content: flex-end;\n}\n\n.frame.orientation-vertical .trailing-container {\n align-self: flex-start; /* hugs its content under the label instead of stretching across the frame */\n}\n\n.frame:not(.has-alert) .trailing-container {\n justify-content: center;\n /* same row height as the large badges it stands in for */\n height: var(--ui-components-badge-min-size-large);\n padding: 0 8px;\n}\n\n.empty {\n @mixin font-label;\n color: var(--element-inactive-color);\n white-space: nowrap;\n}\n"],"mappings":""}
@@ -30,7 +30,8 @@ export declare enum ObcAlertSubsystemCounterOrientation {
30
30
  * - **Configurable empty text:** Customize the message shown when there are no
31
31
  * alerts via `emptyText`.
32
32
  * - **Optional leading icon:** Provide an icon through the `icon` slot; omit it
33
- * and the leading box collapses with no empty gap.
33
+ * and the leading box collapses with no empty gap; with no label either, the
34
+ * whole leading column goes and the badges take the frame.
34
35
  *
35
36
  * ---
36
37
  *
@@ -79,6 +80,7 @@ export declare enum ObcAlertSubsystemCounterOrientation {
79
80
  * @property emptyText - Text shown in the trailing area when `hasAlert` is `false`.
80
81
  * @availableWhen emptyText hasAlert==false
81
82
  * @slot icon - Optional leading 24px icon.
83
+ * @csspart frame - The framed box, for a host that draws its own frame around the counter.
82
84
  * @slot badges - Count badges shown when `hasAlert` is true.
83
85
  * @beta
84
86
  */
@@ -1 +1 @@
1
- {"version":3,"file":"alert-subsystem-counter.d.ts","sourceRoot":"","sources":["../../../src/components/alert-subsystem-counter/alert-subsystem-counter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAMhD;;;;;GAKG;AACH,oBAAY,mCAAmC;IAC7C,UAAU,eAAe;IACzB,QAAQ,aAAa;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,qBACa,wBAAyB,SAAQ,UAAU;IAC5B,KAAK,SAAM;IACX,WAAW,EAAE,mCAAmC,CACzB;IACtB,QAAQ,UAAS;IAClB,SAAS,SAAe;IAEzC,OAAO,CAAC,OAAO,CAAS;IAEjC,OAAO,CAAC,oBAAoB;IAKnB,MAAM;IA0Bf,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,6BAA6B,EAAE,wBAAwB,CAAC;KACzD;CACF"}
1
+ {"version":3,"file":"alert-subsystem-counter.d.ts","sourceRoot":"","sources":["../../../src/components/alert-subsystem-counter/alert-subsystem-counter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAMhD;;;;;GAKG;AACH,oBAAY,mCAAmC;IAC7C,UAAU,eAAe;IACzB,QAAQ,aAAa;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH,qBACa,wBAAyB,SAAQ,UAAU;IAC5B,KAAK,SAAM;IACX,WAAW,EAAE,mCAAmC,CACzB;IACtB,QAAQ,UAAS;IAClB,SAAS,SAAe;IAEzC,OAAO,CAAC,OAAO,CAAS;IAEjC,OAAO,CAAC,oBAAoB;IAKnB,MAAM;IAgCf,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,6BAA6B,EAAE,wBAAwB,CAAC;KACzD;CACF"}
@@ -32,13 +32,19 @@ var ObcAlertSubsystemCounter = class ObcAlertSubsystemCounter extends LitElement
32
32
  render() {
33
33
  return html`
34
34
  <div
35
+ part="frame"
35
36
  class=${classMap({
36
37
  frame: true,
37
38
  ["orientation-" + this.orientation]: true,
38
39
  "has-alert": this.hasAlert
39
40
  })}
40
41
  >
41
- <div class="leading-container">
42
+ <div
43
+ class=${classMap({
44
+ "leading-container": true,
45
+ "no-leading": !this.hasIcon && this.label === ""
46
+ })}
47
+ >
42
48
  <div class=${classMap({
43
49
  icon: true,
44
50
  "no-icon": !this.hasIcon
@@ -1 +1 @@
1
- {"version":3,"file":"alert-subsystem-counter.js","names":[],"sources":["../../../src/components/alert-subsystem-counter/alert-subsystem-counter.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport componentStyle from './alert-subsystem-counter.css?inline';\nimport {customElement} from '../../decorator.js';\n\n/**\n * `ObcAlertSubsystemCounterOrientation` – Layout direction for the counter.\n *\n * - `horizontal`: Icon, label, and badges sit in a single row.\n * - `vertical`: Badges (or empty text) sit on their own line below the label.\n */\nexport enum ObcAlertSubsystemCounterOrientation {\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n}\n\n/**\n * `<obc-alert-subsystem-counter>` – A framed summary of a subsystem's alert\n * counts: a leading icon, a label, and a trailing set of slotted count badges.\n *\n * When there are no active alerts it shows a muted label and an empty-state\n * message instead of the badges. The count badges themselves are supplied by\n * the consumer as slotted `obc-badge` elements; this component provides only\n * the frame, layout, label, and empty state.\n *\n * ---\n *\n * ### Features\n * - **Orientation:** `horizontal` (single row) or `vertical` (badges on a line\n * below the label).\n * - **Alert state:** `hasAlert` toggles between an active (bold label, badges)\n * and an inactive (muted label, empty text) presentation.\n * - **Freeform label:** Pass a full title or an abbreviation — the label is\n * plain text decided by the caller and truncates with an ellipsis.\n * - **Configurable empty text:** Customize the message shown when there are no\n * alerts via `emptyText`.\n * - **Optional leading icon:** Provide an icon through the `icon` slot; omit it\n * and the leading box collapses with no empty gap.\n *\n * ---\n *\n * ### Usage Guidelines\n * - Use this component to give an at-a-glance count of outstanding alerts for a\n * single subsystem, grouped by severity.\n * - Provide one slotted badge per severity in the `badges` slot, typically\n * `<obc-badge size=\"large\">` with a severity `type` and a `number`. The\n * badge `type` values are the same severity vocabulary as `AlertType`\n * (`alarm`, `warning`, `caution` and the `level-*` family); order them\n * highest severity first, as `ALERT_SEVERITY_PRIORITY` does.\n * - Set `hasAlert` to `false` to present the resolved/clear state; the badges\n * are then not rendered and `emptyText` is shown. The component does not\n * derive the state from the slotted badges — the consumer owns it.\n * - Choose `vertical` orientation in narrow containers where the badges do not\n * fit beside the label.\n * - The counter is display-only: it renders no button and fires no events. For\n * a clickable subsystem entry with badges, see `obc-tree-navigation-item`\n * (`alertBadges`) or `obc-integration-fleet-button` (`alerts`).\n *\n * ---\n *\n * ### Slots\n *\n * | Slot Name | Renders When... | Purpose |\n * |-----------|------------------------|----------------------------------------------------|\n * | `icon` | The slot has content | Leading 24px icon (e.g. `<obi-placeholder>`). |\n * | `badges` | `hasAlert` is true | Count badges, one per severity (`<obc-badge>`). |\n *\n * ---\n *\n * ### Example\n *\n * ```html\n * <obc-alert-subsystem-counter label=\"Label\" hasAlert>\n * <obi-placeholder slot=\"icon\"></obi-placeholder>\n * <obc-badge slot=\"badges\" size=\"large\" type=\"alarm\" .number=${9}></obc-badge>\n * <obc-badge slot=\"badges\" size=\"large\" type=\"warning\" .number=${4}></obc-badge>\n * <obc-badge slot=\"badges\" size=\"large\" type=\"caution\" .number=${2}></obc-badge>\n * </obc-alert-subsystem-counter>\n * ```\n *\n * @property label - The subsystem label. Pass a full title or an abbreviation as plain text.\n * @property orientation - Layout direction: `horizontal` (default) keeps icon, label and badges in one row; `vertical` moves the badges (or empty text) to a line below the label.\n * @property hasAlert - Whether the subsystem has active alerts. `true` shows the label bold and renders the `badges` slot; `false` mutes the label and shows `emptyText` instead of the badges.\n * @property emptyText - Text shown in the trailing area when `hasAlert` is `false`.\n * @availableWhen emptyText hasAlert==false\n * @slot icon - Optional leading 24px icon.\n * @slot badges - Count badges shown when `hasAlert` is true.\n * @beta\n */\n@customElement('obc-alert-subsystem-counter')\nexport class ObcAlertSubsystemCounter extends LitElement {\n @property({type: String}) label = '';\n @property({type: String}) orientation: ObcAlertSubsystemCounterOrientation =\n ObcAlertSubsystemCounterOrientation.Horizontal;\n @property({type: Boolean}) hasAlert = false;\n @property({type: String}) emptyText = 'No alerts';\n\n @state() private hasIcon = false;\n\n private handleIconSlotChange(e: Event) {\n const slot = e.target as HTMLSlotElement;\n this.hasIcon = slot.assignedNodes({flatten: true}).length > 0;\n }\n\n override render() {\n return html`\n <div\n class=${classMap({\n frame: true,\n ['orientation-' + this.orientation]: true,\n 'has-alert': this.hasAlert,\n })}\n >\n <div class=\"leading-container\">\n <div class=${classMap({icon: true, 'no-icon': !this.hasIcon})}>\n <slot name=\"icon\" @slotchange=${this.handleIconSlotChange}></slot>\n </div>\n <div class=\"label\">${this.label}</div>\n </div>\n <div class=\"trailing-container\">\n ${\n this.hasAlert\n ? html`<slot name=\"badges\" class=\"badges\"></slot>`\n : html`<span class=\"empty\">${this.emptyText}</span>`\n }\n </div>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-subsystem-counter': ObcAlertSubsystemCounter;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,IAAY,sCAAL,yBAAA,qCAAA;CACL,oCAAA,gBAAA;CACA,oCAAA,cAAA;;AACF,EAAA,CAAA,CAAA;AA4EO,IAAM,2BAAN,MAAM,iCAAiC,WAAW;;;EACrB,KAAA,QAAA;;EAGI,KAAA,WAAA;EACA,KAAA,YAAA;EAEX,KAAA,UAAA;;CAE3B,qBAA6B,GAAU;EACrC,MAAM,OAAO,EAAE;EACf,KAAK,UAAU,KAAK,cAAc,EAAC,SAAS,KAAI,CAAC,CAAC,CAAC,SAAS;CAC9D;CAEA,SAAkB;EAChB,OAAO,IAAI;;gBAEC,SAAS;GACf,OAAO;IACN,iBAAiB,KAAK,cAAc;GACrC,aAAa,KAAK;EACpB,CAAC,EAAE;;;uBAGY,SAAS;GAAC,MAAM;GAAM,WAAW,CAAC,KAAK;EAAO,CAAC,EAAE;4CAC5B,KAAK,qBAAqB;;+BAEvC,KAAK,MAAM;;;YAI9B,KAAK,WACD,IAAI,+CACJ,IAAI,uBAAuB,KAAK,UAAU,SAC/C;;;;CAIT;;EAEyB,KAAA,SAAA,UAAU,+BAAc;;AACnD;AAxCG,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,yBAAA,WAAA,SAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,yBAAA,WAAA,eAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,yBAAA,WAAA,YAAA,KAAA,CAAA;AACxB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,yBAAA,WAAA,aAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,MAAM,CAAA,GAAA,yBAAA,WAAA,WAAA,KAAA,CAAA;AARR,2BAAA,WAAA,CAAA,cAAc,6BAA6B,CAAA,GAAA,wBAAA"}
1
+ {"version":3,"file":"alert-subsystem-counter.js","names":[],"sources":["../../../src/components/alert-subsystem-counter/alert-subsystem-counter.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport componentStyle from './alert-subsystem-counter.css?inline';\nimport {customElement} from '../../decorator.js';\n\n/**\n * `ObcAlertSubsystemCounterOrientation` – Layout direction for the counter.\n *\n * - `horizontal`: Icon, label, and badges sit in a single row.\n * - `vertical`: Badges (or empty text) sit on their own line below the label.\n */\nexport enum ObcAlertSubsystemCounterOrientation {\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n}\n\n/**\n * `<obc-alert-subsystem-counter>` – A framed summary of a subsystem's alert\n * counts: a leading icon, a label, and a trailing set of slotted count badges.\n *\n * When there are no active alerts it shows a muted label and an empty-state\n * message instead of the badges. The count badges themselves are supplied by\n * the consumer as slotted `obc-badge` elements; this component provides only\n * the frame, layout, label, and empty state.\n *\n * ---\n *\n * ### Features\n * - **Orientation:** `horizontal` (single row) or `vertical` (badges on a line\n * below the label).\n * - **Alert state:** `hasAlert` toggles between an active (bold label, badges)\n * and an inactive (muted label, empty text) presentation.\n * - **Freeform label:** Pass a full title or an abbreviation — the label is\n * plain text decided by the caller and truncates with an ellipsis.\n * - **Configurable empty text:** Customize the message shown when there are no\n * alerts via `emptyText`.\n * - **Optional leading icon:** Provide an icon through the `icon` slot; omit it\n * and the leading box collapses with no empty gap; with no label either, the\n * whole leading column goes and the badges take the frame.\n *\n * ---\n *\n * ### Usage Guidelines\n * - Use this component to give an at-a-glance count of outstanding alerts for a\n * single subsystem, grouped by severity.\n * - Provide one slotted badge per severity in the `badges` slot, typically\n * `<obc-badge size=\"large\">` with a severity `type` and a `number`. The\n * badge `type` values are the same severity vocabulary as `AlertType`\n * (`alarm`, `warning`, `caution` and the `level-*` family); order them\n * highest severity first, as `ALERT_SEVERITY_PRIORITY` does.\n * - Set `hasAlert` to `false` to present the resolved/clear state; the badges\n * are then not rendered and `emptyText` is shown. The component does not\n * derive the state from the slotted badges — the consumer owns it.\n * - Choose `vertical` orientation in narrow containers where the badges do not\n * fit beside the label.\n * - The counter is display-only: it renders no button and fires no events. For\n * a clickable subsystem entry with badges, see `obc-tree-navigation-item`\n * (`alertBadges`) or `obc-integration-fleet-button` (`alerts`).\n *\n * ---\n *\n * ### Slots\n *\n * | Slot Name | Renders When... | Purpose |\n * |-----------|------------------------|----------------------------------------------------|\n * | `icon` | The slot has content | Leading 24px icon (e.g. `<obi-placeholder>`). |\n * | `badges` | `hasAlert` is true | Count badges, one per severity (`<obc-badge>`). |\n *\n * ---\n *\n * ### Example\n *\n * ```html\n * <obc-alert-subsystem-counter label=\"Label\" hasAlert>\n * <obi-placeholder slot=\"icon\"></obi-placeholder>\n * <obc-badge slot=\"badges\" size=\"large\" type=\"alarm\" .number=${9}></obc-badge>\n * <obc-badge slot=\"badges\" size=\"large\" type=\"warning\" .number=${4}></obc-badge>\n * <obc-badge slot=\"badges\" size=\"large\" type=\"caution\" .number=${2}></obc-badge>\n * </obc-alert-subsystem-counter>\n * ```\n *\n * @property label - The subsystem label. Pass a full title or an abbreviation as plain text.\n * @property orientation - Layout direction: `horizontal` (default) keeps icon, label and badges in one row; `vertical` moves the badges (or empty text) to a line below the label.\n * @property hasAlert - Whether the subsystem has active alerts. `true` shows the label bold and renders the `badges` slot; `false` mutes the label and shows `emptyText` instead of the badges.\n * @property emptyText - Text shown in the trailing area when `hasAlert` is `false`.\n * @availableWhen emptyText hasAlert==false\n * @slot icon - Optional leading 24px icon.\n * @csspart frame - The framed box, for a host that draws its own frame around the counter.\n * @slot badges - Count badges shown when `hasAlert` is true.\n * @beta\n */\n@customElement('obc-alert-subsystem-counter')\nexport class ObcAlertSubsystemCounter extends LitElement {\n @property({type: String}) label = '';\n @property({type: String}) orientation: ObcAlertSubsystemCounterOrientation =\n ObcAlertSubsystemCounterOrientation.Horizontal;\n @property({type: Boolean}) hasAlert = false;\n @property({type: String}) emptyText = 'No alerts';\n\n @state() private hasIcon = false;\n\n private handleIconSlotChange(e: Event) {\n const slot = e.target as HTMLSlotElement;\n this.hasIcon = slot.assignedNodes({flatten: true}).length > 0;\n }\n\n override render() {\n return html`\n <div\n part=\"frame\"\n class=${classMap({\n frame: true,\n ['orientation-' + this.orientation]: true,\n 'has-alert': this.hasAlert,\n })}\n >\n <div\n class=${classMap({\n 'leading-container': true,\n 'no-leading': !this.hasIcon && this.label === '',\n })}\n >\n <div class=${classMap({icon: true, 'no-icon': !this.hasIcon})}>\n <slot name=\"icon\" @slotchange=${this.handleIconSlotChange}></slot>\n </div>\n <div class=\"label\">${this.label}</div>\n </div>\n <div class=\"trailing-container\">\n ${\n this.hasAlert\n ? html`<slot name=\"badges\" class=\"badges\"></slot>`\n : html`<span class=\"empty\">${this.emptyText}</span>`\n }\n </div>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-subsystem-counter': ObcAlertSubsystemCounter;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,IAAY,sCAAL,yBAAA,qCAAA;CACL,oCAAA,gBAAA;CACA,oCAAA,cAAA;;AACF,EAAA,CAAA,CAAA;AA8EO,IAAM,2BAAN,MAAM,iCAAiC,WAAW;;;EACrB,KAAA,QAAA;;EAGI,KAAA,WAAA;EACA,KAAA,YAAA;EAEX,KAAA,UAAA;;CAE3B,qBAA6B,GAAU;EACrC,MAAM,OAAO,EAAE;EACf,KAAK,UAAU,KAAK,cAAc,EAAC,SAAS,KAAI,CAAC,CAAC,CAAC,SAAS;CAC9D;CAEA,SAAkB;EAChB,OAAO,IAAI;;;gBAGC,SAAS;GACf,OAAO;IACN,iBAAiB,KAAK,cAAc;GACrC,aAAa,KAAK;EACpB,CAAC,EAAE;;;kBAGO,SAAS;GACf,qBAAqB;GACrB,cAAc,CAAC,KAAK,WAAW,KAAK,UAAU;EAChD,CAAC,EAAE;;uBAEU,SAAS;GAAC,MAAM;GAAM,WAAW,CAAC,KAAK;EAAO,CAAC,EAAE;4CAC5B,KAAK,qBAAqB;;+BAEvC,KAAK,MAAM;;;YAI9B,KAAK,WACD,IAAI,+CACJ,IAAI,uBAAuB,KAAK,UAAU,SAC/C;;;;CAIT;;EAEyB,KAAA,SAAA,UAAU,+BAAc;;AACnD;AA9CG,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,yBAAA,WAAA,SAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,yBAAA,WAAA,eAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,yBAAA,WAAA,YAAA,KAAA,CAAA;AACxB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,yBAAA,WAAA,aAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,MAAM,CAAA,GAAA,yBAAA,WAAA,WAAA,KAAA,CAAA;AARR,2BAAA,WAAA,CAAA,cAAc,6BAA6B,CAAA,GAAA,wBAAA"}
@@ -0,0 +1,18 @@
1
+ import { css } from "lit";
2
+ //#region src/components/diagnostic-button/diagnostic-button.css?inline
3
+ var diagnostic_button_default = css`* {
4
+ -webkit-tap-highlight-color: transparent;
5
+ }
6
+
7
+ :host {
8
+ display: inline-flex;
9
+ }
10
+
11
+ .item {
12
+ flex-grow: 1; /* fills the width a parent gives the host, as the item does inside the alert button */
13
+ }
14
+ `;
15
+ //#endregion
16
+ export { diagnostic_button_default as default };
17
+
18
+ //# sourceMappingURL=diagnostic-button.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic-button.css.js","names":[],"sources":["../../../src/components/diagnostic-button/diagnostic-button.css?inline"],"sourcesContent":[":host {\n display: inline-flex;\n}\n\n.item {\n flex-grow: 1; /* fills the width a parent gives the host, as the item does inside the alert button */\n}\n"],"mappings":""}
@@ -0,0 +1,71 @@
1
+ import { LitElement } from 'lit';
2
+ import '../alert-button-item/alert-button-item.js';
3
+ import '../alert-frame/diagnostic-badge.js';
4
+ /**
5
+ * `<obc-diagnostic-button>` – The top bar's diagnostic button: the asterisk
6
+ * and the number of diagnostics, selected while its menu is showing.
7
+ *
8
+ * The diagnostic counterpart of `obc-alert-button`: `obc-alert-button-item`
9
+ * with the diagnostic asterisk in its icon slot and a name of its own. It
10
+ * opens `obc-diagnostic-menu`, as the alert button opens the alert menu.
11
+ *
12
+ * ---
13
+ *
14
+ * ### Features
15
+ * - **Counter:** `nAlerts` is drawn next to the asterisk; 0 shows the
16
+ * asterisk alone.
17
+ * - **Activated:** `activated` draws the selected style while the diagnostic
18
+ * menu is showing.
19
+ * - **Name:** "Diagnostics, 3" is announced, and repeated when the count
20
+ * changes; `aria-label` replaces it.
21
+ *
22
+ * ---
23
+ *
24
+ * ### Usage Guidelines
25
+ * - Slot it into `obc-top-bar`'s `diagnostics` slot, after the alert button,
26
+ * or place it in a toolbar on its own.
27
+ * - Open the menu from `click` the way a bar button opens a menu: flip a
28
+ * flag of your own, bind it to the menu's `open`, to `activated` and to
29
+ * `aria-expanded`, and reset it on the menu's `close`.
30
+ * - A native button, so Enter and Space activate it
31
+ * ([APG button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/)).
32
+ * Left out: nothing.
33
+ * - **TODO(designer):** the design draws a six-armed asterisk with rounded
34
+ * arms that is not in the icon library; the button draws
35
+ * `obi-diagnostic-badge`, the sharp asterisk of the diagnostic alert icon,
36
+ * until the icon is added (#1396).
37
+ *
38
+ * ---
39
+ *
40
+ * ### Example
41
+ *
42
+ * ```html
43
+ * <obc-diagnostic-button nAlerts="3" activated></obc-diagnostic-button>
44
+ * ```
45
+ *
46
+ * @property nAlerts - Number of diagnostics, drawn as the counter; 0 shows the asterisk alone.
47
+ * @property activated - Draws the selected style while the diagnostic menu is showing; bind it to the flag that drives the menu's `open`.
48
+ * @property ariaLabel - Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute; replaces the generated "Diagnostics, 3". `aria-labelledby` is not supported: ID references cannot cross the shadow boundary.
49
+ * @property ariaExpanded - Whether the diagnostic menu is showing, forwarded to the inner `<button>` as `aria-expanded`; mapped to the `aria-expanded` attribute. Bind it with `activated`; left unset, the button announces no menu.
50
+ * @fires click - Fired when the button is clicked.
51
+ * @experimental
52
+ */
53
+ export declare class ObcDiagnosticButton extends LitElement {
54
+ /** Number of diagnostics, drawn as the counter; 0 shows the asterisk alone. */
55
+ nAlerts: number;
56
+ /** Draws the selected style while the diagnostic menu is showing; bind it to the flag that drives the menu's `open`. */
57
+ activated: boolean;
58
+ /** Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute; replaces the generated "Diagnostics, 3". `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
59
+ ariaLabel: string | null;
60
+ /** Whether the diagnostic menu is showing, forwarded to the inner `<button>` as `aria-expanded`; mapped to the `aria-expanded` attribute. Bind it with `activated`; left unset, the button announces no menu. */
61
+ ariaExpanded: string | null;
62
+ private get accessibleName();
63
+ render(): import('lit-html').TemplateResult<1>;
64
+ static styles: import('lit').CSSResult;
65
+ }
66
+ declare global {
67
+ interface HTMLElementTagNameMap {
68
+ 'obc-diagnostic-button': ObcDiagnosticButton;
69
+ }
70
+ }
71
+ //# sourceMappingURL=diagnostic-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic-button.d.ts","sourceRoot":"","sources":["../../../src/components/diagnostic-button/diagnostic-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAMhD,OAAO,2CAA2C,CAAC;AACnD,OAAO,oCAAoC,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,qBAEa,mBAAoB,SAAQ,UAAU;IACvB,OAAO,SAAK;IACX,SAAS,UAAS;IAIpC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAGhC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE5C,OAAO,KAAK,cAAc,GAOzB;IAEQ,MAAM;IAYf,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,uBAAuB,EAAE,mBAAmB,CAAC;KAC9C;CACF"}
@@ -0,0 +1,52 @@
1
+ import { customElement } from "../../decorator.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
3
+ import "../alert-frame/diagnostic-badge.js";
4
+ import "../alert-button-item/alert-button-item.js";
5
+ import diagnostic_button_default from "./diagnostic-button.css.js";
6
+ import { localized, msg } from "@lit/localize";
7
+ import { LitElement, html, unsafeCSS } from "lit";
8
+ import { property } from "lit/decorators.js";
9
+ import { ifDefined } from "lit/directives/if-defined.js";
10
+ //#region src/components/diagnostic-button/diagnostic-button.ts
11
+ var ObcDiagnosticButton = class ObcDiagnosticButton extends LitElement {
12
+ constructor(..._args) {
13
+ super(..._args);
14
+ this.nAlerts = 0;
15
+ this.activated = false;
16
+ this.ariaLabel = null;
17
+ this.ariaExpanded = null;
18
+ }
19
+ get accessibleName() {
20
+ if (this.ariaLabel) return this.ariaLabel;
21
+ return this.nAlerts > 0 ? `${msg("Diagnostics")}, ${this.nAlerts}` : msg("Diagnostics");
22
+ }
23
+ render() {
24
+ return html`<obc-alert-button-item
25
+ class="item"
26
+ .nAlerts=${this.nAlerts}
27
+ counter
28
+ .activated=${this.activated}
29
+ aria-label=${this.accessibleName}
30
+ aria-expanded=${ifDefined(this.ariaExpanded ?? void 0)}
31
+ ><obi-diagnostic-badge slot="icon"></obi-diagnostic-badge
32
+ ></obc-alert-button-item>`;
33
+ }
34
+ static {
35
+ this.styles = unsafeCSS(diagnostic_button_default);
36
+ }
37
+ };
38
+ __decorate([property({ type: Number })], ObcDiagnosticButton.prototype, "nAlerts", void 0);
39
+ __decorate([property({ type: Boolean })], ObcDiagnosticButton.prototype, "activated", void 0);
40
+ __decorate([property({
41
+ type: String,
42
+ attribute: "aria-label"
43
+ })], ObcDiagnosticButton.prototype, "ariaLabel", void 0);
44
+ __decorate([property({
45
+ type: String,
46
+ attribute: "aria-expanded"
47
+ })], ObcDiagnosticButton.prototype, "ariaExpanded", void 0);
48
+ ObcDiagnosticButton = __decorate([customElement("obc-diagnostic-button"), localized()], ObcDiagnosticButton);
49
+ //#endregion
50
+ export { ObcDiagnosticButton };
51
+
52
+ //# sourceMappingURL=diagnostic-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic-button.js","names":[],"sources":["../../../src/components/diagnostic-button/diagnostic-button.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {ifDefined} from 'lit/directives/if-defined.js';\nimport {localized, msg} from '@lit/localize';\nimport componentStyle from './diagnostic-button.css?inline';\nimport {customElement} from '../../decorator.js';\nimport '../alert-button-item/alert-button-item.js';\nimport '../alert-frame/diagnostic-badge.js';\n\n/**\n * `<obc-diagnostic-button>` – The top bar's diagnostic button: the asterisk\n * and the number of diagnostics, selected while its menu is showing.\n *\n * The diagnostic counterpart of `obc-alert-button`: `obc-alert-button-item`\n * with the diagnostic asterisk in its icon slot and a name of its own. It\n * opens `obc-diagnostic-menu`, as the alert button opens the alert menu.\n *\n * ---\n *\n * ### Features\n * - **Counter:** `nAlerts` is drawn next to the asterisk; 0 shows the\n * asterisk alone.\n * - **Activated:** `activated` draws the selected style while the diagnostic\n * menu is showing.\n * - **Name:** \"Diagnostics, 3\" is announced, and repeated when the count\n * changes; `aria-label` replaces it.\n *\n * ---\n *\n * ### Usage Guidelines\n * - Slot it into `obc-top-bar`'s `diagnostics` slot, after the alert button,\n * or place it in a toolbar on its own.\n * - Open the menu from `click` the way a bar button opens a menu: flip a\n * flag of your own, bind it to the menu's `open`, to `activated` and to\n * `aria-expanded`, and reset it on the menu's `close`.\n * - A native button, so Enter and Space activate it\n * ([APG button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/)).\n * Left out: nothing.\n * - **TODO(designer):** the design draws a six-armed asterisk with rounded\n * arms that is not in the icon library; the button draws\n * `obi-diagnostic-badge`, the sharp asterisk of the diagnostic alert icon,\n * until the icon is added (#1396).\n *\n * ---\n *\n * ### Example\n *\n * ```html\n * <obc-diagnostic-button nAlerts=\"3\" activated></obc-diagnostic-button>\n * ```\n *\n * @property nAlerts - Number of diagnostics, drawn as the counter; 0 shows the asterisk alone.\n * @property activated - Draws the selected style while the diagnostic menu is showing; bind it to the flag that drives the menu's `open`.\n * @property ariaLabel - Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute; replaces the generated \"Diagnostics, 3\". `aria-labelledby` is not supported: ID references cannot cross the shadow boundary.\n * @property ariaExpanded - Whether the diagnostic menu is showing, forwarded to the inner `<button>` as `aria-expanded`; mapped to the `aria-expanded` attribute. Bind it with `activated`; left unset, the button announces no menu.\n * @fires click - Fired when the button is clicked.\n * @experimental\n */\n@customElement('obc-diagnostic-button')\n@localized()\nexport class ObcDiagnosticButton extends LitElement {\n @property({type: Number}) nAlerts = 0;\n @property({type: Boolean}) activated = false;\n\n // Reactive so a consumer changing the name re-renders the inner button.\n @property({type: String, attribute: 'aria-label'})\n override ariaLabel: string | null = null;\n\n @property({type: String, attribute: 'aria-expanded'})\n override ariaExpanded: string | null = null;\n\n private get accessibleName(): string {\n if (this.ariaLabel) {\n return this.ariaLabel;\n }\n return this.nAlerts > 0\n ? `${msg('Diagnostics')}, ${this.nAlerts}`\n : msg('Diagnostics');\n }\n\n override render() {\n return html`<obc-alert-button-item\n class=\"item\"\n .nAlerts=${this.nAlerts}\n counter\n .activated=${this.activated}\n aria-label=${this.accessibleName}\n aria-expanded=${ifDefined(this.ariaExpanded ?? undefined)}\n ><obi-diagnostic-badge slot=\"icon\"></obi-diagnostic-badge\n ></obc-alert-button-item>`;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-diagnostic-button': ObcDiagnosticButton;\n }\n}\n"],"mappings":";;;;;;;;;;AA4DO,IAAM,sBAAN,MAAM,4BAA4B,WAAW;;;EACd,KAAA,UAAA;EACG,KAAA,YAAA;EAIH,KAAA,YAAA;EAGG,KAAA,eAAA;;CAEvC,IAAY,iBAAyB;EACnC,IAAI,KAAK,WACP,OAAO,KAAK;EAEd,OAAO,KAAK,UAAU,IAClB,GAAG,IAAI,aAAa,EAAE,IAAI,KAAK,YAC/B,IAAI,aAAa;CACvB;CAEA,SAAkB;EAChB,OAAO,IAAI;;iBAEE,KAAK,QAAQ;;mBAEX,KAAK,UAAU;mBACf,KAAK,eAAe;sBACjB,UAAU,KAAK,gBAAgB,KAAA,CAAS,EAAE;;;CAG9D;;EAEyB,KAAA,SAAA,UAAU,yBAAc;;AACnD;AAhCG,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,oBAAA,WAAA,WAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,oBAAA,WAAA,aAAA,KAAA,CAAA;AAGxB,WAAA,CAAA,SAAS;CAAC,MAAM;CAAQ,WAAW;AAAY,CAAC,CAAA,GAAA,oBAAA,WAAA,aAAA,KAAA,CAAA;AAGhD,WAAA,CAAA,SAAS;CAAC,MAAM;CAAQ,WAAW;AAAe,CAAC,CAAA,GAAA,oBAAA,WAAA,gBAAA,KAAA,CAAA;AAVrD,sBAAA,WAAA,CAAA,cAAc,uBAAuB,GACrC,UAAU,CAAA,GAAA,mBAAA"}
@@ -0,0 +1,109 @@
1
+ import { css } from "lit";
2
+ //#region src/components/diagnostic-menu/diagnostic-menu.css?inline
3
+ var diagnostic_menu_default = css`* {
4
+ -webkit-tap-highlight-color: transparent;
5
+ }
6
+
7
+ :host([popover]) {
8
+ /* The browser pins a popover to all four edges and lets the automatic
9
+ margins centre it. Unpinning drops it back where it would normally sit,
10
+ for the consumer to position from. */
11
+ inset: auto;
12
+ margin: 0;
13
+
14
+ padding: 0;
15
+ border: none;
16
+ background: none;
17
+ color: inherit;
18
+
19
+ /* The menus scroll their own content. */
20
+ overflow: visible;
21
+
22
+ /* The browser shrink-wraps a popover to its contents. */
23
+ width: auto;
24
+ height: auto;
25
+ }
26
+
27
+ * {
28
+ box-sizing: border-box;
29
+ }
30
+
31
+ :host {
32
+ display: block;
33
+ }
34
+
35
+ .wrapper {
36
+ border-radius: 8px;
37
+ background: var(--container-global-color, #fcfcfc);
38
+ /* Shadow/Floating */
39
+ box-shadow: var(--shadow-floating);
40
+ border-radius: var(--app-components-app-menu-border-radius);
41
+ width: var(
42
+ --app-components-alert-menu-width
43
+ ); /* beside the alert menu under one bar; the design's 696 px binds no token */
44
+ height: 560px; /* the alert menu's box, so the two line up; the design hugs its rows */
45
+ max-width: 100vw;
46
+ display: flex;
47
+ flex-direction: column;
48
+ overflow: hidden; /* the card radius clips the rows and the footer */
49
+ }
50
+
51
+ .title-container {
52
+ display: flex;
53
+ align-items: center;
54
+ padding: var(--app-components-user-menu-margin-vertical)
55
+ var(--app-components-user-menu-margin-horizontal)
56
+ var(--app-components-user-menu-padding-vertical);
57
+ }
58
+
59
+ .title {
60
+ font-family: var(--global-typography-font-family);
61
+ font-weight: var(--global-typography-ui-overline-font-weight);
62
+ font-size: var(--global-typography-ui-overline-font-size);
63
+ line-height: var(--global-typography-ui-overline-line-height);
64
+ letter-spacing: var(--global-typography-ui-overline-letter-spacing);
65
+ font-feature-settings:
66
+ "liga" off,
67
+ "clig" off,
68
+ "ss04" on;
69
+ margin: 0;
70
+ padding-inline: var(--app-components-system-menu-padding-horizontal);
71
+ color: var(--element-neutral-color);
72
+ }
73
+
74
+ .list {
75
+ flex: 1 1 0;
76
+ min-height: 0; /* the list scrolls instead of growing the card */
77
+ overflow: hidden;
78
+ position: relative;
79
+ padding: 4px; /* the design's row column inset */
80
+ }
81
+
82
+ .empty-badge {
83
+ display: block;
84
+ width: 100%;
85
+ height: 100%;
86
+ color: var(--element-neutral-color);
87
+ }
88
+
89
+ .action {
90
+ display: flex;
91
+ flex-shrink: 0;
92
+ flex-wrap: wrap;
93
+ align-items: center;
94
+ gap: var(--app-components-alert-menu-button-spacing);
95
+ padding: var(--app-components-user-menu-padding-vertical)
96
+ var(--app-components-alert-menu-footer-padding-horizontal);
97
+ border-top: 1px solid var(--border-divider-color);
98
+ background: var(--container-global-color);
99
+ }
100
+
101
+ ::slotted(*) {
102
+ display: block;
103
+ will-change: transform;
104
+ }
105
+ `;
106
+ //#endregion
107
+ export { diagnostic_menu_default as default };
108
+
109
+ //# sourceMappingURL=diagnostic-menu.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic-menu.css.js","names":[],"sources":["../../../src/components/diagnostic-menu/diagnostic-menu.css?inline"],"sourcesContent":["@mixin soft-dismiss;\n\n* {\n box-sizing: border-box;\n}\n\n:host {\n display: block;\n}\n\n.wrapper {\n @mixin card;\n border-radius: var(--app-components-app-menu-border-radius);\n width: var(\n --app-components-alert-menu-width\n ); /* beside the alert menu under one bar; the design's 696 px binds no token */\n height: 560px; /* the alert menu's box, so the two line up; the design hugs its rows */\n max-width: 100vw;\n display: flex;\n flex-direction: column;\n overflow: hidden; /* the card radius clips the rows and the footer */\n}\n\n.title-container {\n display: flex;\n align-items: center;\n padding: var(--app-components-user-menu-margin-vertical)\n var(--app-components-user-menu-margin-horizontal)\n var(--app-components-user-menu-padding-vertical);\n}\n\n.title {\n @mixin font-overline;\n margin: 0;\n padding-inline: var(--app-components-system-menu-padding-horizontal);\n color: var(--element-neutral-color);\n}\n\n.list {\n flex: 1 1 0;\n min-height: 0; /* the list scrolls instead of growing the card */\n overflow: hidden;\n position: relative;\n padding: 4px; /* the design's row column inset */\n}\n\n.empty-badge {\n display: block;\n width: 100%;\n height: 100%;\n color: var(--element-neutral-color);\n}\n\n.action {\n display: flex;\n flex-shrink: 0;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--app-components-alert-menu-button-spacing);\n padding: var(--app-components-user-menu-padding-vertical)\n var(--app-components-alert-menu-footer-padding-horizontal);\n border-top: 1px solid var(--border-divider-color);\n background: var(--container-global-color);\n}\n\n::slotted(*) {\n display: block;\n will-change: transform;\n}\n"],"mappings":""}
@@ -0,0 +1,111 @@
1
+ import { LitElement } from 'lit';
2
+ import { PopoverController } from '../../internal/popover-controller.js';
3
+ import '../button/button.js';
4
+ import '../../icons/icon-chevron-right-google.js';
5
+ import '../alert-frame/diagnostic-badge.js';
6
+ import '../../building-blocks/alert-list/alert-list.js';
7
+ export type ObcDiagnosticMenuAckAllVisibleClickEvent = CustomEvent<{
8
+ visibleElements: {
9
+ element: HTMLElement;
10
+ index: number;
11
+ }[];
12
+ }>;
13
+ /**
14
+ * `<obc-diagnostic-menu>` – The panel the diagnostic button opens: a titled
15
+ * list of diagnostics with an acknowledge-all and a list button.
16
+ *
17
+ * The diagnostic counterpart of `obc-alert-menu`, without its tabs and its
18
+ * silence button: a title row, the slotted `obc-message-menu-item` rows in a
19
+ * scrolling list with an empty state, and a footer with "ACK all visible" and
20
+ * "Diagnostics list".
21
+ *
22
+ * ---
23
+ *
24
+ * ### Features
25
+ * - **Title row:** `menuTitle`, "Diagnostics" when left empty.
26
+ * - **Rows:** any number of `obc-message-menu-item` children; the list
27
+ * scrolls, slides new rows into place and shows an empty state the
28
+ * `empty-*` slots replace.
29
+ * - **ACK all visible:** enabled by `canAckAll`; fires
30
+ * `ack-all-visible-click` with the rows in view, as the alert menu does.
31
+ * - **Diagnostics list:** `showDiagnosticListButton` shows the button that
32
+ * fires `go-to-diagnostic-list-click` for the full list page.
33
+ * - **Soft dismiss:** `softDismiss` and `open` close the menu on a click
34
+ * outside or `Escape`, as every menu does.
35
+ *
36
+ * ---
37
+ *
38
+ * ### Usage Guidelines
39
+ * - Open it from `obc-diagnostic-button`'s `click` with a flag of your own,
40
+ * bound to `open` and to the button's `activated`, and reset on `close`.
41
+ * - A row is acknowledged through its own `primary-action-click`; the footer
42
+ * button reports every row in view at once.
43
+ * - Position it yourself, under the top bar's diagnostic button.
44
+ * - **TODO(designer):** the design draws an open-in-new glyph after
45
+ * "Diagnostics list" and a 696 px card that hugs its rows; neither the
46
+ * glyph nor a width token is in the library, so the button draws the
47
+ * chevron of the alert menu's "Alerts" button and the card keeps the alert
48
+ * menu's width and height (#1396).
49
+ *
50
+ * ---
51
+ *
52
+ * ### Example
53
+ *
54
+ * ```html
55
+ * <obc-diagnostic-menu canAckAll>
56
+ * <obc-message-menu-item title="Simulate" description="Value is simulated" day="Yesterday" time="09:12:34" primaryActionLabel="Action" hasPrimaryIcon>
57
+ * <obi-placeholder slot="primary-icon"></obi-placeholder>
58
+ * </obc-message-menu-item>
59
+ * </obc-diagnostic-menu>
60
+ * ```
61
+ *
62
+ * @property menuTitle - Title of the menu; "Diagnostics" when left empty.
63
+ * @property canAckAll - Enables the "ACK all visible" button; set it while a row in view can be acknowledged.
64
+ * @availableWhen canAckAll showAckAllButton==true
65
+ * @property showAckAllButton - Shows the "ACK all visible" button in the footer.
66
+ * @property showDiagnosticListButton - Shows the "Diagnostics list" button in the footer.
67
+ * @property softDismiss - Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click. Leave it off to show and hide the menu yourself.
68
+ * @property open - Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
69
+ * @availableWhen open softDismiss==true
70
+ * @slot - The diagnostics as `obc-message-menu-item` rows.
71
+ * @slot empty-title - Title of the empty state, "No diagnostics" when left unfilled.
72
+ * @slot empty-description - Description of the empty state.
73
+ * @slot empty-icon - Icon of the empty state, the diagnostic asterisk when left unfilled.
74
+ * @fires {ObcDiagnosticMenuAckAllVisibleClickEvent} ack-all-visible-click - Fired when the "ACK all visible" button is clicked, with the rows in view.
75
+ * @fires {CustomEvent<void>} go-to-diagnostic-list-click - Fired when the "Diagnostics list" button is clicked.
76
+ * @fires {CustomEvent<void>} close - Fired when the menu closed on its own, from a click outside, `Escape`, or another menu opening. `open` is already `false` by the time it arrives; reset the flag you bind to `open` here, or the next click on the button finds it still set and asks a closed menu to close.
77
+ * @experimental
78
+ */
79
+ export declare class ObcDiagnosticMenu extends LitElement {
80
+ /** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click. Leave it off to show and hide the menu yourself. */
81
+ softDismiss: boolean;
82
+ /**
83
+ * Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
84
+ *
85
+ * Available when `softDismiss==true`.
86
+ */
87
+ open: boolean;
88
+ protected readonly softDismissController: PopoverController;
89
+ /** Title of the menu; "Diagnostics" when left empty. */
90
+ menuTitle: string;
91
+ /**
92
+ * Enables the "ACK all visible" button; set it while a row in view can be acknowledged.
93
+ *
94
+ * Available when `showAckAllButton==true`.
95
+ */
96
+ canAckAll: boolean;
97
+ /** Shows the "ACK all visible" button in the footer. */
98
+ showAckAllButton: boolean;
99
+ /** Shows the "Diagnostics list" button in the footer. */
100
+ showDiagnosticListButton: boolean;
101
+ private list;
102
+ private handleAckAllVisibleClick;
103
+ render(): import('lit-html').TemplateResult<1>;
104
+ static styles: import('lit').CSSResult;
105
+ }
106
+ declare global {
107
+ interface HTMLElementTagNameMap {
108
+ 'obc-diagnostic-menu': ObcDiagnosticMenu;
109
+ }
110
+ }
111
+ //# sourceMappingURL=diagnostic-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic-menu.d.ts","sourceRoot":"","sources":["../../../src/components/diagnostic-menu/diagnostic-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAKzD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,0CAA0C,CAAC;AAClD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,gDAAgD,CAAC;AAExD,OAAO,EAAC,iBAAiB,EAAC,MAAM,sCAAsC,CAAC;AAEvE,MAAM,MAAM,wCAAwC,GAAG,WAAW,CAAC;IACjE,eAAe,EAAE;QAAC,OAAO,EAAE,WAAW,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;CAC1D,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,qBAEa,iBAAkB,SAAQ,UAAU;IACpB,WAAW,UAAS;IAEpB,IAAI,UAAS;IAExC,SAAS,CAAC,QAAQ,CAAC,qBAAqB,oBAA+B;IAE7C,SAAS,SAAM;IAEd,SAAS,UAAS;IAEA,gBAAgB,UAAQ;IAExB,wBAAwB,UAAQ;IAE7D,OAAO,CAAC,IAAI,CAAgB;IAE5C,OAAO,CAAC,wBAAwB;IAQvB,MAAM;IAsDf,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}