@oicl/openbridge-webcomponents 2.0.0-next.128 → 2.0.0-next.129
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 +12321 -11895
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +227 -3
- package/dist/building-blocks/readout-block/readout-block.css.js +53 -19
- package/dist/building-blocks/readout-block/readout-block.css.js.map +1 -1
- package/dist/building-blocks/readout-block/readout-block.d.ts +55 -0
- package/dist/building-blocks/readout-block/readout-block.d.ts.map +1 -1
- package/dist/building-blocks/readout-block/readout-block.js +57 -2
- package/dist/building-blocks/readout-block/readout-block.js.map +1 -1
- package/dist/navigation-instruments/readout/readout-shared.d.ts +23 -0
- package/dist/navigation-instruments/readout/readout-shared.d.ts.map +1 -1
- package/dist/navigation-instruments/readout/readout-shared.js +8 -0
- package/dist/navigation-instruments/readout/readout-shared.js.map +1 -1
- package/dist/navigation-instruments/readout/readout.css.js +138 -31
- package/dist/navigation-instruments/readout/readout.css.js.map +1 -1
- package/dist/navigation-instruments/readout/readout.d.ts +63 -3
- package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
- package/dist/navigation-instruments/readout/readout.js +127 -27
- package/dist/navigation-instruments/readout/readout.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +64 -1
- 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 +77 -2
- 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 +100 -23
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import { ReadoutBlockSize, ReadoutBlockDataQuality } from '../../building-blocks/readout-block/readout-block.js';
|
|
3
|
-
import { ReadoutListItemSetpointInteraction, ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions, ReadoutReserverOptions, ReadoutSrcOptions } from '../readout-list-item/readout-list-item.js';
|
|
3
|
+
import { ReadoutListItemSetpointInteraction, ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions, ReadoutLabelOptions, ReadoutReserverOptions, ReadoutSrcOptions } from '../readout-list-item/readout-list-item.js';
|
|
4
4
|
import { Priority } from '../types.js';
|
|
5
5
|
import { ReadoutValueType } from './readout-formatters.js';
|
|
6
6
|
import { AlertFrameConfig } from '../../components/alert-frame/alert-frame.js';
|
|
@@ -10,9 +10,12 @@ import '../../components/button/button.js';
|
|
|
10
10
|
import '../../components/context-menu-input/context-menu-input.js';
|
|
11
11
|
import '../../icons/icon-chevron-right-google.js';
|
|
12
12
|
import '../../icons/icon-drop-down-google.js';
|
|
13
|
+
import '../../icons/icon-delta.js';
|
|
13
14
|
export { ObcTextboxFontWeight } from '../../components/textbox/textbox.js';
|
|
14
15
|
export { ReadoutValueType } from './readout-formatters.js';
|
|
15
|
-
export
|
|
16
|
+
export { ReadoutAdviceCategory } from '../../building-blocks/readout-block/readout-block.js';
|
|
17
|
+
export { ReadoutSourceState } from '../readout-list-item/readout-list-item.js';
|
|
18
|
+
export type { ReadoutBlockState, ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions, ReadoutLabelOptions, ReadoutReserverOptions, ReadoutSrcOptions, } from '../readout-list-item/readout-list-item.js';
|
|
16
19
|
/**
|
|
17
20
|
* Density/size scale of the readout (an alias of `ReadoutBlockSize`).
|
|
18
21
|
* - `small`: regular value typography (smallest, densest).
|
|
@@ -40,6 +43,9 @@ export type ReadoutDataQuality = ReadoutBlockDataQuality;
|
|
|
40
43
|
* How the setpoint segment behaves relative to the value (an alias of
|
|
41
44
|
* `ReadoutListItemSetpointInteraction`).
|
|
42
45
|
* - `always-visible` (default): the setpoint is always shown.
|
|
46
|
+
* - `equal-size`: value and setpoint are always shown at the same (primary)
|
|
47
|
+
* size (Figma 6.1 "Equal size") — the value does not demote while
|
|
48
|
+
* `touching`, unlike the other modes.
|
|
43
49
|
* - `flip-flop`: value and setpoint swap emphasis (size) as the value reaches
|
|
44
50
|
* the setpoint.
|
|
45
51
|
* - `pop-up`: the setpoint is shown only while the value has not reached it,
|
|
@@ -101,6 +107,11 @@ export declare enum ReadoutSourceInteraction {
|
|
|
101
107
|
/**
|
|
102
108
|
* Per-source options. Extends the shared per-block state (data quality, alert,
|
|
103
109
|
* space reserver) with the readout's source interactivity.
|
|
110
|
+
*
|
|
111
|
+
* `state` and `deviation` apply to the plain (non-interactive) source only —
|
|
112
|
+
* the Figma 6.1 sheets do not define them on the picker / flyout buttons, so
|
|
113
|
+
* those branches render without a state chip or deviation line
|
|
114
|
+
* (TODO(designer): pending a design for interactive source states).
|
|
104
115
|
*/
|
|
105
116
|
export interface ReadoutSourceOptions extends ReadoutSrcOptions {
|
|
106
117
|
/** Interactivity of the source row (default `none`). */
|
|
@@ -154,6 +165,7 @@ export interface ReadoutSourceOptions extends ReadoutSrcOptions {
|
|
|
154
165
|
* ### Slots
|
|
155
166
|
* | Slot Name | Renders When | Purpose |
|
|
156
167
|
* |--------------------|---------------------------------------|--------------------------------------|
|
|
168
|
+
* | leading-icon | `hasLeadingIcon` | Icon before the label/unit meta zone.|
|
|
157
169
|
* | value-icon | `valueOptions.hasIcon` | Icon before the value. |
|
|
158
170
|
* | setpoint-icon | `hasSetpoint` | Overrides the default setpoint icon. |
|
|
159
171
|
* | advice-icon | `hasAdvice` | Overrides the default advice icon. |
|
|
@@ -162,6 +174,7 @@ export interface ReadoutSourceOptions extends ReadoutSrcOptions {
|
|
|
162
174
|
* @fires {CustomEvent<{value: string, label?: string}>} source-change - Fired when a source picker option is selected.
|
|
163
175
|
* @fires {CustomEvent<{src: string}>} source-flyout-click - Fired when the source row is clicked while `srcOptions.interaction == 'flyout'`.
|
|
164
176
|
*
|
|
177
|
+
* @slot leading-icon - Icon before the label/unit meta zone.
|
|
165
178
|
* @slot value-icon - Icon before the value.
|
|
166
179
|
* @slot setpoint-icon - Overrides the default setpoint icon.
|
|
167
180
|
* @slot advice-icon - Overrides the default advice icon.
|
|
@@ -199,6 +212,13 @@ export declare class ObcReadout extends LitElement {
|
|
|
199
212
|
hasAdvice: boolean;
|
|
200
213
|
/** @availableWhen hasAdvice==true */
|
|
201
214
|
advice?: number;
|
|
215
|
+
/**
|
|
216
|
+
* Density tier. Applies to the vertical direction only — the horizontal
|
|
217
|
+
* arrangement exists in the large tier alone (Figma 6.1: it relies on the
|
|
218
|
+
* label+unit stack aligning with the L-size value caps), so `size` is
|
|
219
|
+
* ignored when `direction` is `horizontal`.
|
|
220
|
+
* @availableWhen direction==vertical
|
|
221
|
+
*/
|
|
202
222
|
size?: ReadoutSize;
|
|
203
223
|
priority?: ReadoutPriority;
|
|
204
224
|
direction?: ReadoutDirection;
|
|
@@ -206,9 +226,16 @@ export declare class ObcReadout extends LitElement {
|
|
|
206
226
|
stacking?: ReadoutStacking;
|
|
207
227
|
/** @availableWhen direction==vertical && stacking==stacked */
|
|
208
228
|
alignment?: ReadoutAlignment;
|
|
229
|
+
/**
|
|
230
|
+
* Render the cap-height degree glyph (`°`) after the ACTUAL VALUE only —
|
|
231
|
+
* the setpoint / advice blocks never carry one (Figma 6.1 review: the unit
|
|
232
|
+
* is written once for the readout, and the degree follows the same rule).
|
|
233
|
+
*/
|
|
209
234
|
hasDegree: boolean;
|
|
210
235
|
/** @availableWhen hasDegree==false */
|
|
211
236
|
hasDegreeSpacer: boolean;
|
|
237
|
+
/** Show the `leading-icon` slot before the label/unit meta zone. */
|
|
238
|
+
hasLeadingIcon: boolean;
|
|
212
239
|
/**
|
|
213
240
|
* Also formats the numeric setpoint / advice blocks, which stay numeric
|
|
214
241
|
* even when the value is text. Must be between 0 and 100 — the range
|
|
@@ -238,6 +265,8 @@ export declare class ObcReadout extends LitElement {
|
|
|
238
265
|
setpointOptions?: ReadoutSetpointOptions;
|
|
239
266
|
/** @availableWhen hasAdvice==true */
|
|
240
267
|
adviceOptions?: ReadoutAdviceOptions;
|
|
268
|
+
/** @availableWhen label!='' */
|
|
269
|
+
labelOptions?: ReadoutLabelOptions;
|
|
241
270
|
/** @availableWhen unit!='' */
|
|
242
271
|
unitOptions?: ReadoutReserverOptions;
|
|
243
272
|
/** @availableWhen src!='' */
|
|
@@ -277,6 +306,7 @@ export declare class ObcReadout extends LitElement {
|
|
|
277
306
|
private get isAtSetpoint();
|
|
278
307
|
private get resolvedSetpointInteraction();
|
|
279
308
|
private get isFlipFlop();
|
|
309
|
+
private get isEqualSize();
|
|
280
310
|
private get isPopUp();
|
|
281
311
|
private get setpointTouching();
|
|
282
312
|
/**
|
|
@@ -308,6 +338,22 @@ export declare class ObcReadout extends LitElement {
|
|
|
308
338
|
private get setpointSize();
|
|
309
339
|
/** Value font weight passes straight to obc-textbox; regular when unset. Colour is separate. */
|
|
310
340
|
private get valueWeight();
|
|
341
|
+
/**
|
|
342
|
+
* Label size. The Figma 6.1 title block defaults large readouts to `s` — a
|
|
343
|
+
* scannable label should not sit at the smallest permitted size — while
|
|
344
|
+
* small/medium tiers stay `xs`; `labelOptions.size` overrides either way
|
|
345
|
+
* (per the design team, for context / density / secondary instruments).
|
|
346
|
+
* The `s` default was confirmed by the design team (2026-08-17).
|
|
347
|
+
* TODO(designer): the medium-tier default is unverified in the new sheets
|
|
348
|
+
* (only XS and S exist on the title's size axis).
|
|
349
|
+
*/
|
|
350
|
+
private get labelSize();
|
|
351
|
+
/**
|
|
352
|
+
* Label weight: SemiBold only for enhanced (in-command) readouts, regular
|
|
353
|
+
* otherwise — the designer reduced the amount of semibold in the interface
|
|
354
|
+
* (Figma 6.1 review).
|
|
355
|
+
*/
|
|
356
|
+
private get labelWeight();
|
|
311
357
|
/** Setpoint is SemiBold only while emphasised, otherwise regular weight. */
|
|
312
358
|
private get setpointWeight();
|
|
313
359
|
private numericFormatOptions;
|
|
@@ -359,7 +405,21 @@ export declare class ObcReadout extends LitElement {
|
|
|
359
405
|
/** The label/unit meta zone; `stacking` picks the inline or stacked arrangement. */
|
|
360
406
|
private renderMetaZone;
|
|
361
407
|
private renderSourceContent;
|
|
362
|
-
/**
|
|
408
|
+
/**
|
|
409
|
+
* The plain (non-interactive) source: the textbox plus its optional state
|
|
410
|
+
* chip and deviation line. The regular no-deviation case renders the bare
|
|
411
|
+
* textbox — the pre-6.1 output; a state or deviation wraps it in the
|
|
412
|
+
* `.source-block` stack. The picker / flyout button variants do not carry
|
|
413
|
+
* state / deviation yet — TODO(designer): undefined in the 6.1 sheets.
|
|
414
|
+
*/
|
|
415
|
+
private renderSourceBlock;
|
|
416
|
+
/**
|
|
417
|
+
* The source row (vertical) / segment (horizontal). Only the horizontal
|
|
418
|
+
* direction draws an auto divider before the source — the Figma 6.1 review
|
|
419
|
+
* (node 95:24490 "remove dividers", 95:26891 "Source-divider are there")
|
|
420
|
+
* keeps the vertical source row divider-free while the horizontal flow
|
|
421
|
+
* separates the source with a vertical rule.
|
|
422
|
+
*/
|
|
363
423
|
private renderSource;
|
|
364
424
|
private getSourcePickerNavigationItems;
|
|
365
425
|
private createSourcePickerOptionIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readout.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/readout/readout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgD,MAAM,KAAK,CAAC;AAK9E,OAAO,qCAAqC,CAAC;AAK7C,OAAO,sDAAsD,CAAC;AAC9D,OAAO,EAEL,gBAAgB,EAChB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"readout.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/readout/readout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgD,MAAM,KAAK,CAAC;AAK9E,OAAO,qCAAqC,CAAC;AAK7C,OAAO,sDAAsD,CAAC;AAC9D,OAAO,EAEL,gBAAg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OG;IACH,OAAO,CAAC,uBAAuB;IA+B/B,oFAAoF;IACpF,OAAO,CAAC,cAAc;IA2CtB,OAAO,CAAC,mBAAmB;IA2D3B;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB;IAsCzB;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAoBpB,OAAO,CAAC,8BAA8B;IAiBtC,OAAO,CAAC,4BAA4B;IAQpC,OAAO,CAAC,uBAAuB;IAgB/B,OAAO,CAAC,6BAA6B;IAWrC,OAAO,CAAC,uBAAuB,CAc7B;IAEF,OAAO,CAAC,2BAA2B;IAiBnC;;;;;;OAMG;IACH,OAAO,KAAK,oBAAoB,GAQ/B;IAED,OAAO,CAAC,yBAAyB;IAqBjC,OAAO,CAAC,sBAAsB;IAY9B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,0BAA0B;IAwClC;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAyB5B;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;cAuBX,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAazD,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAoDrD,OAAO,CAAC,yBAAyB;IAQxB,oBAAoB,IAAI,IAAI;IAa5B,MAAM;IAkCf,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -4,17 +4,18 @@ import { classMap } from "lit/directives/class-map.js";
|
|
|
4
4
|
import componentStyle from "./readout.css.js";
|
|
5
5
|
import { customElement } from "../../decorator.js";
|
|
6
6
|
import { ObcTextboxFontWeight, ObcTextboxSize } from "../../components/textbox/textbox.js";
|
|
7
|
-
import { ReadoutBlockHidePhase, ReadoutBlockSize, ReadoutBlockVariant, ReadoutBlockDataQuality } from "../../building-blocks/readout-block/readout-block.js";
|
|
8
|
-
import { ReadoutListItemSetpointInteraction } from "../readout-list-item/readout-list-item.js";
|
|
7
|
+
import { ReadoutBlockHidePhase, ReadoutBlockSize, ReadoutBlockVariant, ReadoutAdviceCategory, ReadoutBlockDataQuality } from "../../building-blocks/readout-block/readout-block.js";
|
|
8
|
+
import { ReadoutListItemSetpointInteraction, ReadoutSourceState } from "../readout-list-item/readout-list-item.js";
|
|
9
9
|
import { Priority } from "../types.js";
|
|
10
10
|
import { ReadoutValueType, resolveReadoutDigitCount, isReadoutDigitCountMissing, resolveReadoutNumericValue, assertReadoutValueType, assertReadoutFractionDigits } from "./readout-formatters.js";
|
|
11
|
-
import { isDisplayedAtSetpoint, readoutPrimarySize, readoutSecondarySize, readoutSetpointWeight, readoutNumericFormatOptions, readoutDataQualityClasses, resolveSetpointHidePhase } from "./readout-shared.js";
|
|
11
|
+
import { isDisplayedAtSetpoint, readoutPrimarySize, readoutSecondarySize, readoutValueSize, readoutSetpointSize, readoutSetpointWeight, readoutNumericFormatOptions, readoutDataQualityClasses, resolveSetpointHidePhase } from "./readout-shared.js";
|
|
12
12
|
import { wrapWithAlertFrame, ObcAlertFrameThickness, ObcAlertFrameType, ObcAlertFrameMode } from "../../components/alert-frame/alert-frame.js";
|
|
13
13
|
import { AlertType } from "../../types.js";
|
|
14
14
|
import "../../components/button/button.js";
|
|
15
15
|
import { ContextMenuType } from "../../components/context-menu-input/context-menu-input.js";
|
|
16
16
|
import "../../icons/icon-chevron-right-google.js";
|
|
17
17
|
import "../../icons/icon-drop-down-google.js";
|
|
18
|
+
import "../../icons/icon-delta.js";
|
|
18
19
|
var __defProp = Object.defineProperty;
|
|
19
20
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
20
21
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -63,6 +64,7 @@ let ObcReadout = class extends LitElement {
|
|
|
63
64
|
this.hasAdvice = false;
|
|
64
65
|
this.hasDegree = false;
|
|
65
66
|
this.hasDegreeSpacer = false;
|
|
67
|
+
this.hasLeadingIcon = false;
|
|
66
68
|
this.fractionDigits = 0;
|
|
67
69
|
this.maxDigits = 0;
|
|
68
70
|
this.alert = false;
|
|
@@ -97,6 +99,9 @@ let ObcReadout = class extends LitElement {
|
|
|
97
99
|
};
|
|
98
100
|
}
|
|
99
101
|
get resolvedSize() {
|
|
102
|
+
if (this.isHorizontal) {
|
|
103
|
+
return ReadoutSize.large;
|
|
104
|
+
}
|
|
100
105
|
return this.size ?? ReadoutSize.small;
|
|
101
106
|
}
|
|
102
107
|
get resolvedPriority() {
|
|
@@ -155,6 +160,9 @@ let ObcReadout = class extends LitElement {
|
|
|
155
160
|
get isFlipFlop() {
|
|
156
161
|
return this.resolvedSetpointInteraction === ReadoutSetpointInteraction.flipFlop;
|
|
157
162
|
}
|
|
163
|
+
get isEqualSize() {
|
|
164
|
+
return this.resolvedSetpointInteraction === ReadoutSetpointInteraction.equalSize;
|
|
165
|
+
}
|
|
158
166
|
get isPopUp() {
|
|
159
167
|
return this.resolvedSetpointInteraction === ReadoutSetpointInteraction.popUp;
|
|
160
168
|
}
|
|
@@ -203,18 +211,45 @@ let ObcReadout = class extends LitElement {
|
|
|
203
211
|
return readoutSecondarySize(this.resolvedSize);
|
|
204
212
|
}
|
|
205
213
|
get valueSize() {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
214
|
+
return readoutValueSize({
|
|
215
|
+
primary: this.primarySize,
|
|
216
|
+
secondary: this.secondarySize,
|
|
217
|
+
setpointEmphasized: this.isSetpointEmphasized,
|
|
218
|
+
equalSize: this.isEqualSize
|
|
219
|
+
});
|
|
210
220
|
}
|
|
211
221
|
get setpointSize() {
|
|
212
|
-
return
|
|
222
|
+
return readoutSetpointSize({
|
|
223
|
+
primary: this.primarySize,
|
|
224
|
+
secondary: this.secondarySize,
|
|
225
|
+
emphasized: this.isSetpointEmphasized,
|
|
226
|
+
equalSize: this.isEqualSize
|
|
227
|
+
});
|
|
213
228
|
}
|
|
214
229
|
/** Value font weight passes straight to obc-textbox; regular when unset. Colour is separate. */
|
|
215
230
|
get valueWeight() {
|
|
216
231
|
return this.valueOptions?.weight ?? ObcTextboxFontWeight.regular;
|
|
217
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* Label size. The Figma 6.1 title block defaults large readouts to `s` — a
|
|
235
|
+
* scannable label should not sit at the smallest permitted size — while
|
|
236
|
+
* small/medium tiers stay `xs`; `labelOptions.size` overrides either way
|
|
237
|
+
* (per the design team, for context / density / secondary instruments).
|
|
238
|
+
* The `s` default was confirmed by the design team (2026-08-17).
|
|
239
|
+
* TODO(designer): the medium-tier default is unverified in the new sheets
|
|
240
|
+
* (only XS and S exist on the title's size axis).
|
|
241
|
+
*/
|
|
242
|
+
get labelSize() {
|
|
243
|
+
return this.labelOptions?.size ?? (this.resolvedSize === ReadoutSize.large ? ObcTextboxSize.s : ObcTextboxSize.xs);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Label weight: SemiBold only for enhanced (in-command) readouts, regular
|
|
247
|
+
* otherwise — the designer reduced the amount of semibold in the interface
|
|
248
|
+
* (Figma 6.1 review).
|
|
249
|
+
*/
|
|
250
|
+
get labelWeight() {
|
|
251
|
+
return this.rowEnhanced ? ObcTextboxFontWeight.semibold : ObcTextboxFontWeight.regular;
|
|
252
|
+
}
|
|
218
253
|
/** Setpoint is SemiBold only while emphasised, otherwise regular weight. */
|
|
219
254
|
get setpointWeight() {
|
|
220
255
|
return readoutSetpointWeight(this.isSetpointEmphasized);
|
|
@@ -263,6 +298,8 @@ let ObcReadout = class extends LitElement {
|
|
|
263
298
|
.hidePhase=${config.hidePhase ?? ReadoutBlockHidePhase.none}
|
|
264
299
|
.dataQuality=${config.dataQuality}
|
|
265
300
|
.alert=${config.alert ?? false}
|
|
301
|
+
.category=${config.category ?? ReadoutAdviceCategory.regular}
|
|
302
|
+
.active=${config.active ?? false}
|
|
266
303
|
>
|
|
267
304
|
${config.ghost ? nothing : this.renderForwardedIcon(config.variant)}
|
|
268
305
|
</obc-readout-block>
|
|
@@ -311,7 +348,8 @@ let ObcReadout = class extends LitElement {
|
|
|
311
348
|
return nothing;
|
|
312
349
|
}
|
|
313
350
|
renderTextbox(role, text, reserver, blockState) {
|
|
314
|
-
const weight = role === "label" ?
|
|
351
|
+
const weight = role === "label" ? this.labelWeight : ObcTextboxFontWeight.regular;
|
|
352
|
+
const size = role === "label" ? this.labelSize : ObcTextboxSize.xs;
|
|
315
353
|
const box = html`
|
|
316
354
|
<obc-textbox
|
|
317
355
|
class=${classMap({
|
|
@@ -319,7 +357,7 @@ let ObcReadout = class extends LitElement {
|
|
|
319
357
|
...this.dataQualityClasses(blockState?.dataQuality)
|
|
320
358
|
})}
|
|
321
359
|
part=${role}
|
|
322
|
-
.size=${
|
|
360
|
+
.size=${size}
|
|
323
361
|
.fontWeight=${weight}
|
|
324
362
|
alignment="left"
|
|
325
363
|
>
|
|
@@ -336,6 +374,11 @@ let ObcReadout = class extends LitElement {
|
|
|
336
374
|
this.deferredSetpointHidePhase
|
|
337
375
|
);
|
|
338
376
|
}
|
|
377
|
+
// `hasDegree` is deliberately NOT forwarded to the advice / setpoint blocks:
|
|
378
|
+
// the degree glyph renders on the actual value only (Figma 6.1 review,
|
|
379
|
+
// 2026-08-18) — the unit is written once for the whole readout, and the
|
|
380
|
+
// degree follows the same rule; the setpoint / advice implicitly share it.
|
|
381
|
+
// `obc-readout-list-item` keeps its own per-row convention.
|
|
339
382
|
renderAdviceBlock() {
|
|
340
383
|
return this.renderBlock({
|
|
341
384
|
variant: ReadoutBlockVariant.advice,
|
|
@@ -345,9 +388,10 @@ let ObcReadout = class extends LitElement {
|
|
|
345
388
|
weight: ObcTextboxFontWeight.regular,
|
|
346
389
|
hintedZeros: this.adviceOptions?.hintedZeros ?? false,
|
|
347
390
|
spaceReserver: this.adviceOptions?.spaceReserver,
|
|
348
|
-
hasDegree: this.hasDegree ?? false,
|
|
349
391
|
dataQuality: this.adviceOptions?.dataQuality,
|
|
350
|
-
alert: this.adviceOptions?.alert
|
|
392
|
+
alert: this.adviceOptions?.alert,
|
|
393
|
+
category: this.adviceOptions?.category,
|
|
394
|
+
active: this.adviceOptions?.active
|
|
351
395
|
});
|
|
352
396
|
}
|
|
353
397
|
renderSetpointBlock() {
|
|
@@ -361,7 +405,6 @@ let ObcReadout = class extends LitElement {
|
|
|
361
405
|
weight: this.setpointWeight,
|
|
362
406
|
hintedZeros: this.setpointOptions?.hintedZeros ?? false,
|
|
363
407
|
spaceReserver: this.setpointOptions?.spaceReserver,
|
|
364
|
-
hasDegree: this.hasDegree ?? false,
|
|
365
408
|
touching: this.setpointTouching,
|
|
366
409
|
hidePhase: this.setpointHidePhase,
|
|
367
410
|
dataQuality: this.setpointOptions?.dataQuality,
|
|
@@ -455,12 +498,21 @@ let ObcReadout = class extends LitElement {
|
|
|
455
498
|
})}
|
|
456
499
|
part="meta-wrapper"
|
|
457
500
|
>
|
|
458
|
-
${this.
|
|
459
|
-
|
|
501
|
+
${this.hasLeadingIcon ? html`<span class="leading-icon" aria-hidden="true"
|
|
502
|
+
><slot name="leading-icon"></slot
|
|
503
|
+
></span>` : nothing}
|
|
504
|
+
<div class="meta-labels" part="meta-labels">
|
|
505
|
+
${this.label ? this.renderTextbox(
|
|
506
|
+
"label",
|
|
507
|
+
this.label,
|
|
508
|
+
this.labelOptions?.spaceReserver
|
|
509
|
+
) : nothing}
|
|
510
|
+
${this.unit ? this.renderTextbox(
|
|
460
511
|
"unit",
|
|
461
512
|
this.unit,
|
|
462
513
|
this.unitOptions?.spaceReserver
|
|
463
514
|
) : nothing}
|
|
515
|
+
</div>
|
|
464
516
|
</div>
|
|
465
517
|
`;
|
|
466
518
|
}
|
|
@@ -513,28 +565,67 @@ let ObcReadout = class extends LitElement {
|
|
|
513
565
|
`;
|
|
514
566
|
return wrapWithAlertFrame(this.srcOptions?.alert ?? false, button);
|
|
515
567
|
}
|
|
516
|
-
return this.
|
|
568
|
+
return this.renderSourceBlock(src);
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* The plain (non-interactive) source: the textbox plus its optional state
|
|
572
|
+
* chip and deviation line. The regular no-deviation case renders the bare
|
|
573
|
+
* textbox — the pre-6.1 output; a state or deviation wraps it in the
|
|
574
|
+
* `.source-block` stack. The picker / flyout button variants do not carry
|
|
575
|
+
* state / deviation yet — TODO(designer): undefined in the 6.1 sheets.
|
|
576
|
+
*/
|
|
577
|
+
renderSourceBlock(src) {
|
|
578
|
+
const state2 = this.srcOptions?.state ?? ReadoutSourceState.regular;
|
|
579
|
+
const deviation = this.srcOptions?.deviation;
|
|
580
|
+
const hasDeviation = deviation !== void 0 && Number.isFinite(deviation);
|
|
581
|
+
const box = this.renderTextbox(
|
|
517
582
|
"source",
|
|
518
583
|
src,
|
|
519
584
|
this.srcOptions?.spaceReserver,
|
|
520
585
|
this.srcOptions
|
|
521
586
|
);
|
|
587
|
+
if (state2 === ReadoutSourceState.regular && !hasDeviation) {
|
|
588
|
+
return box;
|
|
589
|
+
}
|
|
590
|
+
return html`
|
|
591
|
+
<div
|
|
592
|
+
class=${classMap({
|
|
593
|
+
"source-block": true,
|
|
594
|
+
[`source-state-${state2}`]: state2 !== ReadoutSourceState.regular
|
|
595
|
+
})}
|
|
596
|
+
part="source-block"
|
|
597
|
+
>
|
|
598
|
+
${box}
|
|
599
|
+
${hasDeviation ? html`<span class="source-deviation">
|
|
600
|
+
<obi-delta aria-hidden="true"></obi-delta>
|
|
601
|
+
<obc-textbox
|
|
602
|
+
class="source-deviation-value"
|
|
603
|
+
.size=${ObcTextboxSize.xs}
|
|
604
|
+
.tabularNums=${true}
|
|
605
|
+
alignment="left"
|
|
606
|
+
>${deviation}</obc-textbox
|
|
607
|
+
>
|
|
608
|
+
</span>` : nothing}
|
|
609
|
+
</div>
|
|
610
|
+
`;
|
|
522
611
|
}
|
|
523
|
-
/**
|
|
612
|
+
/**
|
|
613
|
+
* The source row (vertical) / segment (horizontal). Only the horizontal
|
|
614
|
+
* direction draws an auto divider before the source — the Figma 6.1 review
|
|
615
|
+
* (node 95:24490 "remove dividers", 95:26891 "Source-divider are there")
|
|
616
|
+
* keeps the vertical source row divider-free while the horizontal flow
|
|
617
|
+
* separates the source with a vertical rule.
|
|
618
|
+
*/
|
|
524
619
|
renderSource() {
|
|
525
620
|
if (!this.hasSrc) {
|
|
526
621
|
return nothing;
|
|
527
622
|
}
|
|
528
623
|
return html`
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
})}
|
|
535
|
-
part="divider"
|
|
536
|
-
aria-hidden="true"
|
|
537
|
-
></div>
|
|
624
|
+
${this.isHorizontal ? html`<div
|
|
625
|
+
class="divider divider-vertical"
|
|
626
|
+
part="divider"
|
|
627
|
+
aria-hidden="true"
|
|
628
|
+
></div>` : nothing}
|
|
538
629
|
<div class="source-row" part="source-wrapper">
|
|
539
630
|
${this.renderSourceContent()}
|
|
540
631
|
</div>
|
|
@@ -657,10 +748,11 @@ let ObcReadout = class extends LitElement {
|
|
|
657
748
|
valueSize: this.primarySize,
|
|
658
749
|
enhanced: false,
|
|
659
750
|
// The emphasised setpoint is SemiBold — reserve its widest form.
|
|
751
|
+
// No degree: the visible setpoint block carries none (the degree
|
|
752
|
+
// renders on the actual value only), so the ghost mirrors it.
|
|
660
753
|
weight: ObcTextboxFontWeight.semibold,
|
|
661
754
|
hintedZeros: this.setpointOptions?.hintedZeros ?? false,
|
|
662
755
|
spaceReserver: this.setpointOptions?.spaceReserver,
|
|
663
|
-
hasDegree: this.hasDegree ?? false,
|
|
664
756
|
alert: this.setpointOptions?.alert,
|
|
665
757
|
ghost: true
|
|
666
758
|
}) : html`${this.renderBlock({
|
|
@@ -866,6 +958,9 @@ __decorateClass([
|
|
|
866
958
|
__decorateClass([
|
|
867
959
|
property({ type: Boolean })
|
|
868
960
|
], ObcReadout.prototype, "hasDegreeSpacer", 2);
|
|
961
|
+
__decorateClass([
|
|
962
|
+
property({ type: Boolean })
|
|
963
|
+
], ObcReadout.prototype, "hasLeadingIcon", 2);
|
|
869
964
|
__decorateClass([
|
|
870
965
|
property({ type: Number })
|
|
871
966
|
], ObcReadout.prototype, "fractionDigits", 2);
|
|
@@ -887,6 +982,9 @@ __decorateClass([
|
|
|
887
982
|
__decorateClass([
|
|
888
983
|
property({ type: Object })
|
|
889
984
|
], ObcReadout.prototype, "adviceOptions", 2);
|
|
985
|
+
__decorateClass([
|
|
986
|
+
property({ type: Object })
|
|
987
|
+
], ObcReadout.prototype, "labelOptions", 2);
|
|
890
988
|
__decorateClass([
|
|
891
989
|
property({ type: Object })
|
|
892
990
|
], ObcReadout.prototype, "unitOptions", 2);
|
|
@@ -914,6 +1012,7 @@ ObcReadout = __decorateClass([
|
|
|
914
1012
|
export {
|
|
915
1013
|
ObcReadout,
|
|
916
1014
|
ObcTextboxFontWeight,
|
|
1015
|
+
ReadoutAdviceCategory,
|
|
917
1016
|
ReadoutAlignment,
|
|
918
1017
|
ReadoutDataQuality,
|
|
919
1018
|
ReadoutDirection,
|
|
@@ -921,6 +1020,7 @@ export {
|
|
|
921
1020
|
ReadoutSetpointInteraction,
|
|
922
1021
|
ReadoutSize,
|
|
923
1022
|
ReadoutSourceInteraction,
|
|
1023
|
+
ReadoutSourceState,
|
|
924
1024
|
ReadoutStacking,
|
|
925
1025
|
ReadoutValueType
|
|
926
1026
|
};
|