@oicl/openbridge-webcomponents 2.0.0-next.82 → 2.0.0-next.84
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 +1147 -460
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +591 -193
- package/dist/components/textbox/textbox.css.js +29 -5
- package/dist/components/textbox/textbox.css.js.map +1 -1
- package/dist/components/textbox/textbox.d.ts +5 -0
- package/dist/components/textbox/textbox.d.ts.map +1 -1
- package/dist/components/textbox/textbox.js +6 -1
- package/dist/components/textbox/textbox.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +611 -230
- 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 +280 -61
- 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 +529 -247
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
- package/package.json +2 -2
|
@@ -61711,12 +61711,6 @@ var ReadoutSetpointMode = /* @__PURE__ */ ((ReadoutSetpointMode2) => {
|
|
|
61711
61711
|
ReadoutSetpointMode2["setpointTemporary"] = "setpoint-temporary";
|
|
61712
61712
|
return ReadoutSetpointMode2;
|
|
61713
61713
|
})(ReadoutSetpointMode || {});
|
|
61714
|
-
var ReadoutSetpointValueTypography = /* @__PURE__ */ ((ReadoutSetpointValueTypography2) => {
|
|
61715
|
-
ReadoutSetpointValueTypography2["regular"] = "regular";
|
|
61716
|
-
ReadoutSetpointValueTypography2["medium"] = "medium";
|
|
61717
|
-
ReadoutSetpointValueTypography2["large"] = "large";
|
|
61718
|
-
return ReadoutSetpointValueTypography2;
|
|
61719
|
-
})(ReadoutSetpointValueTypography || {});
|
|
61720
61714
|
let ObcReadoutSetpoint = class extends i$4 {
|
|
61721
61715
|
constructor() {
|
|
61722
61716
|
super(...arguments);
|
|
@@ -106197,6 +106191,11 @@ const componentStyle$o = i$7`* {
|
|
|
106197
106191
|
justify-content: var(--alignment-justify, flex-end);
|
|
106198
106192
|
height: var(--height);
|
|
106199
106193
|
overflow: hidden;
|
|
106194
|
+
/* Opt-in: animate a \`size\` change (height + font-size below). Defaults to 0s
|
|
106195
|
+
(instant, current behavior) so existing usages and snapshots are unchanged;
|
|
106196
|
+
a consumer sets \`--obc-textbox-size-transition\` (e.g. 300ms) to animate the
|
|
106197
|
+
swap — used by readout-list-item's setpoint flip-flop. */
|
|
106198
|
+
transition: height var(--obc-textbox-size-transition, 0s) ease;
|
|
106200
106199
|
}
|
|
106201
106200
|
|
|
106202
106201
|
/* The spacer must share the content's exact font metrics so the width it
|
|
@@ -106208,6 +106207,8 @@ const componentStyle$o = i$7`* {
|
|
|
106208
106207
|
font-size: calc(var(--height) - 2 * var(--padding));
|
|
106209
106208
|
font-size-adjust: cap-height 1;
|
|
106210
106209
|
white-space: nowrap;
|
|
106210
|
+
/* Opt-in size animation — see \`.inner-wrapper\`. */
|
|
106211
|
+
transition: font-size var(--obc-textbox-size-transition, 0s) ease;
|
|
106211
106212
|
}
|
|
106212
106213
|
|
|
106213
106214
|
.content {
|
|
@@ -106215,23 +106216,40 @@ const componentStyle$o = i$7`* {
|
|
|
106215
106216
|
text-box-edge: cap alphabetic;
|
|
106216
106217
|
}
|
|
106217
106218
|
|
|
106218
|
-
|
|
106219
|
+
/* Opt-in numeric mode: fixed-width lining numerals so values stay
|
|
106220
|
+
column-aligned and width-stable. Applied to the spacer too so the reserved
|
|
106221
|
+
width matches the rendered digits exactly. */
|
|
106222
|
+
|
|
106223
|
+
.wrapper.tabular-nums .content,
|
|
106224
|
+
.wrapper.tabular-nums .length-spacer {
|
|
106225
|
+
font-variant-numeric: tabular-nums lining-nums;
|
|
106226
|
+
font-feature-settings:
|
|
106227
|
+
"ss04" on,
|
|
106228
|
+
"tnum" on,
|
|
106229
|
+
"lnum" on;
|
|
106230
|
+
}
|
|
106231
|
+
|
|
106232
|
+
/* Size override is set on \`.wrapper\` (not \`.inner-wrapper\`) so it reaches BOTH
|
|
106233
|
+
the visible \`.content\` AND the sibling \`.length-spacer\`; otherwise the spacer
|
|
106234
|
+
keeps the default (m) \`--height\` and reserves width at the wrong font size. */
|
|
106235
|
+
|
|
106236
|
+
.wrapper.size-xs {
|
|
106219
106237
|
--height: 16px;
|
|
106220
106238
|
}
|
|
106221
106239
|
|
|
106222
|
-
.wrapper.size-s
|
|
106240
|
+
.wrapper.size-s {
|
|
106223
106241
|
--height: 20px;
|
|
106224
106242
|
}
|
|
106225
106243
|
|
|
106226
|
-
.wrapper.size-m
|
|
106244
|
+
.wrapper.size-m {
|
|
106227
106245
|
--height: 24px;
|
|
106228
106246
|
}
|
|
106229
106247
|
|
|
106230
|
-
.wrapper.size-l
|
|
106248
|
+
.wrapper.size-l {
|
|
106231
106249
|
--height: 32px;
|
|
106232
106250
|
}
|
|
106233
106251
|
|
|
106234
|
-
.wrapper.size-xl
|
|
106252
|
+
.wrapper.size-xl {
|
|
106235
106253
|
--height: 40px;
|
|
106236
106254
|
}
|
|
106237
106255
|
|
|
@@ -106280,12 +106298,27 @@ var __decorateClass$sW = (decorators, target, key, kind) => {
|
|
|
106280
106298
|
if (kind && result) __defProp$sU(target, key, result);
|
|
106281
106299
|
return result;
|
|
106282
106300
|
};
|
|
106301
|
+
var ObcTextboxSize = /* @__PURE__ */ ((ObcTextboxSize2) => {
|
|
106302
|
+
ObcTextboxSize2["xs"] = "xs";
|
|
106303
|
+
ObcTextboxSize2["s"] = "s";
|
|
106304
|
+
ObcTextboxSize2["m"] = "m";
|
|
106305
|
+
ObcTextboxSize2["l"] = "l";
|
|
106306
|
+
ObcTextboxSize2["xl"] = "xl";
|
|
106307
|
+
return ObcTextboxSize2;
|
|
106308
|
+
})(ObcTextboxSize || {});
|
|
106309
|
+
var ObcTextboxFontWeight = /* @__PURE__ */ ((ObcTextboxFontWeight2) => {
|
|
106310
|
+
ObcTextboxFontWeight2["regular"] = "regular";
|
|
106311
|
+
ObcTextboxFontWeight2["semibold"] = "semibold";
|
|
106312
|
+
ObcTextboxFontWeight2["bold"] = "bold";
|
|
106313
|
+
return ObcTextboxFontWeight2;
|
|
106314
|
+
})(ObcTextboxFontWeight || {});
|
|
106283
106315
|
let ObcTextbox = class extends i$4 {
|
|
106284
106316
|
constructor() {
|
|
106285
106317
|
super(...arguments);
|
|
106286
106318
|
this.alignment = "right";
|
|
106287
106319
|
this.size = "m";
|
|
106288
106320
|
this.fontWeight = "regular";
|
|
106321
|
+
this.tabularNums = false;
|
|
106289
106322
|
}
|
|
106290
106323
|
render() {
|
|
106291
106324
|
return b`
|
|
@@ -106294,7 +106327,8 @@ let ObcTextbox = class extends i$4 {
|
|
|
106294
106327
|
wrapper: true,
|
|
106295
106328
|
[`alignment-${this.alignment}`]: true,
|
|
106296
106329
|
[`size-${this.size}`]: true,
|
|
106297
|
-
[`font-weight-${this.fontWeight}`]: true
|
|
106330
|
+
[`font-weight-${this.fontWeight}`]: true,
|
|
106331
|
+
"tabular-nums": this.tabularNums
|
|
106298
106332
|
})}
|
|
106299
106333
|
>
|
|
106300
106334
|
<div class="inner-wrapper">
|
|
@@ -106319,6 +106353,9 @@ __decorateClass$sW([
|
|
|
106319
106353
|
__decorateClass$sW([
|
|
106320
106354
|
n$3({ type: String })
|
|
106321
106355
|
], ObcTextbox.prototype, "fontWeight", 2);
|
|
106356
|
+
__decorateClass$sW([
|
|
106357
|
+
n$3({ type: Boolean })
|
|
106358
|
+
], ObcTextbox.prototype, "tabularNums", 2);
|
|
106322
106359
|
ObcTextbox = __decorateClass$sW([
|
|
106323
106360
|
customElement("obc-textbox")
|
|
106324
106361
|
], ObcTextbox);
|
|
@@ -222126,264 +222163,645 @@ const componentStyle$4 = i$7`* {
|
|
|
222126
222163
|
width: 100%;
|
|
222127
222164
|
}
|
|
222128
222165
|
|
|
222166
|
+
/* ---------- Root / surface ----------
|
|
222167
|
+
* \`.root\` is the touch target (a <button> when clickable, otherwise a <div>).
|
|
222168
|
+
* \`.surface\` is the visible box that carries padding, corner radius, the
|
|
222169
|
+
* data-quality background/border, and — when clickable — the flat interaction
|
|
222170
|
+
* states. */
|
|
222171
|
+
|
|
222129
222172
|
.root {
|
|
222173
|
+
display: block;
|
|
222174
|
+
inline-size: 100%;
|
|
222175
|
+
margin: 0;
|
|
222176
|
+
/* Neutralise the native <button> chrome (default padding + appearance) when
|
|
222177
|
+
\`.root\` is the clickable touch target, so clickable rows don't inset their
|
|
222178
|
+
\`.surface\` and misalign with non-clickable \`<div>\` rows. */
|
|
222179
|
+
padding: 0;
|
|
222180
|
+
border: none;
|
|
222181
|
+
background: none;
|
|
222182
|
+
appearance: none;
|
|
222183
|
+
font: inherit;
|
|
222184
|
+
color: inherit;
|
|
222185
|
+
text-align: inherit;
|
|
222186
|
+
}
|
|
222187
|
+
|
|
222188
|
+
.root.clickable {
|
|
222189
|
+
cursor: pointer;
|
|
222190
|
+
/* prettier-ignore */
|
|
222191
|
+
}
|
|
222192
|
+
|
|
222193
|
+
.root.clickable {
|
|
222194
|
+
cursor: pointer;
|
|
222195
|
+
}
|
|
222196
|
+
|
|
222197
|
+
.root.clickable:focus {
|
|
222198
|
+
outline: none;
|
|
222199
|
+
}
|
|
222200
|
+
|
|
222201
|
+
.root.clickable .surface {
|
|
222202
|
+
border-color: var(--flat-enabled-border-color);
|
|
222203
|
+
background-color: var(--flat-enabled-background-color);
|
|
222204
|
+
border-width: 1px;
|
|
222205
|
+
border-style: solid;
|
|
222206
|
+
cursor: pointer;
|
|
222207
|
+
--base-border-color: var(--flat-enabled-border-color);
|
|
222208
|
+
--base-background-color: var(--flat-enabled-background-color);
|
|
222209
|
+
}
|
|
222210
|
+
|
|
222211
|
+
.root.clickable.activated .surface {
|
|
222212
|
+
border-color: var(--flat-activated-border-color);
|
|
222213
|
+
background-color: var(--flat-activated-background-color);
|
|
222214
|
+
--base-border-color: var(--flat-activated-border-color);
|
|
222215
|
+
--base-background-color: var(--flat-activated-background-color);
|
|
222216
|
+
}
|
|
222217
|
+
|
|
222218
|
+
@media (hover:hover) {
|
|
222219
|
+
|
|
222220
|
+
.root.clickable:hover .surface {
|
|
222221
|
+
border-color: color-mix(in srgb, var(--flat-hover-border-color) calc(var(--obc-can-hover) * 100%), var(--base-border-color));
|
|
222222
|
+
background-color: color-mix(in srgb, var(--flat-hover-background-color) calc(var(--obc-can-hover) * 100%), var(--base-background-color));
|
|
222223
|
+
}
|
|
222224
|
+
}
|
|
222225
|
+
|
|
222226
|
+
.root.clickable:active .surface {
|
|
222227
|
+
border-color: var(--flat-pressed-border-color);
|
|
222228
|
+
background-color: var(--flat-pressed-background-color);
|
|
222229
|
+
}
|
|
222230
|
+
|
|
222231
|
+
.root.clickable:focus-visible .surface {
|
|
222232
|
+
outline-color: var(--border-focus-color);
|
|
222233
|
+
outline-width: var(--global-size-spacing-border-weight-focusframe);
|
|
222234
|
+
outline-style: solid;
|
|
222235
|
+
border-color: var(--container-global-color);
|
|
222236
|
+
z-index: 1;
|
|
222237
|
+
}
|
|
222238
|
+
|
|
222239
|
+
.root.clickable:disabled .surface {
|
|
222240
|
+
border-color: var(--flat-disabled-border-color);
|
|
222241
|
+
background-color: var(--flat-disabled-background-color);
|
|
222242
|
+
cursor: not-allowed;
|
|
222243
|
+
color: var(--on-flat-disabled-color) !important;
|
|
222244
|
+
}
|
|
222245
|
+
|
|
222246
|
+
.root.clickable.disabled .surface {
|
|
222247
|
+
border-color: var(--flat-disabled-border-color);
|
|
222248
|
+
background-color: var(--flat-disabled-background-color);
|
|
222249
|
+
cursor: not-allowed;
|
|
222250
|
+
color: var(--on-flat-disabled-color) !important;
|
|
222251
|
+
}
|
|
222252
|
+
|
|
222253
|
+
.root.clickable:disabled {
|
|
222254
|
+
cursor: not-allowed;
|
|
222255
|
+
}
|
|
222256
|
+
|
|
222257
|
+
.root.clickable.disabled {
|
|
222258
|
+
cursor: not-allowed;
|
|
222259
|
+
}
|
|
222260
|
+
|
|
222261
|
+
.root.clickable:focus {
|
|
222262
|
+
outline: none;
|
|
222263
|
+
}
|
|
222264
|
+
|
|
222265
|
+
/* Flip-flop: animate the value↔setpoint cap-height swap by forwarding obc-textbox's
|
|
222266
|
+
opt-in size-transition var. 300ms matches the instrument setpoint marker
|
|
222267
|
+
(svghelpers/setpoint.ts). Override via \`--obc-readout-list-item-flip-flop-duration\`. */
|
|
222268
|
+
|
|
222269
|
+
.root.flip-flop {
|
|
222270
|
+
--obc-textbox-size-transition: var(
|
|
222271
|
+
--obc-readout-list-item-flip-flop-duration,
|
|
222272
|
+
300ms
|
|
222273
|
+
);
|
|
222274
|
+
}
|
|
222275
|
+
|
|
222276
|
+
.surface {
|
|
222277
|
+
display: block;
|
|
222278
|
+
inline-size: 100%;
|
|
222279
|
+
border-radius: var(--global-border-radius-border-radius-base);
|
|
222280
|
+
}
|
|
222281
|
+
|
|
222282
|
+
/* Clickable corner variants. The \`.clickable\` qualifier is redundant for
|
|
222283
|
+
matching (a \`border-*\` class is only ever set alongside \`.clickable\`) but
|
|
222284
|
+
raises specificity to (0,4,0) so the interactive corner shape wins over the
|
|
222285
|
+
data-quality rules below — which also target \`.surface\` at (0,3,0) — when a
|
|
222286
|
+
row is both clickable and low-integrity/invalid. Standalone data-quality rows
|
|
222287
|
+
keep their own radius. */
|
|
222288
|
+
|
|
222289
|
+
.root.clickable.border-squared .surface {
|
|
222290
|
+
border-radius: 0;
|
|
222291
|
+
}
|
|
222292
|
+
|
|
222293
|
+
.root.clickable.border-round-corners .surface {
|
|
222294
|
+
border-radius: var(--global-border-radius-border-radius-floating);
|
|
222295
|
+
}
|
|
222296
|
+
|
|
222297
|
+
.root.clickable.border-round .surface {
|
|
222298
|
+
border-radius: var(--global-border-radius-border-radius-round);
|
|
222299
|
+
}
|
|
222300
|
+
|
|
222301
|
+
/* ---------- Content row ----------
|
|
222302
|
+
* Label on the left, value/unit cluster on the right, optional source after a
|
|
222303
|
+
* trailing divider. All segments bottom-align so cap heights sit on a shared
|
|
222304
|
+
* baseline. */
|
|
222305
|
+
|
|
222306
|
+
.content {
|
|
222307
|
+
display: flex;
|
|
222308
|
+
align-items: flex-end;
|
|
222309
|
+
justify-content: space-between;
|
|
222310
|
+
inline-size: 100%;
|
|
222311
|
+
min-inline-size: 0;
|
|
222312
|
+
}
|
|
222313
|
+
|
|
222314
|
+
/* Reserve the value cap-height per tier so the row height and the bottom
|
|
222315
|
+
baseline stay constant regardless of which parts (label / value / unit / src /
|
|
222316
|
+
setpoint / advice / icons) are present. */
|
|
222317
|
+
|
|
222318
|
+
.size-small .content {
|
|
222319
|
+
min-block-size: var(
|
|
222320
|
+
--global-typography-instrument-value-regular-container-height
|
|
222321
|
+
);
|
|
222322
|
+
}
|
|
222323
|
+
|
|
222324
|
+
.size-medium .content {
|
|
222325
|
+
min-block-size: var(
|
|
222326
|
+
--global-typography-instrument-value-medium-container-height
|
|
222327
|
+
);
|
|
222328
|
+
}
|
|
222329
|
+
|
|
222330
|
+
.size-large .content {
|
|
222331
|
+
min-block-size: var(
|
|
222332
|
+
--global-typography-instrument-value-large-container-height
|
|
222333
|
+
);
|
|
222334
|
+
}
|
|
222335
|
+
|
|
222336
|
+
/* The value is the primary data, so under width pressure the label side yields
|
|
222337
|
+
first: the label-container shrinks (and clips a too-long label) while
|
|
222338
|
+
\`.value-area\` keeps its intrinsic width. */
|
|
222339
|
+
|
|
222340
|
+
.label-container {
|
|
222130
222341
|
display: inline-flex;
|
|
222131
222342
|
align-items: flex-end;
|
|
222132
|
-
|
|
222133
|
-
|
|
222343
|
+
gap: var(--global-size-spacing-target-padding);
|
|
222344
|
+
flex: 1 1 auto;
|
|
222345
|
+
min-inline-size: 0;
|
|
222346
|
+
overflow: hidden;
|
|
222134
222347
|
}
|
|
222135
222348
|
|
|
222136
|
-
.
|
|
222137
|
-
|
|
222138
|
-
|
|
222139
|
-
|
|
222140
|
-
|
|
222141
|
-
|
|
222142
|
-
|
|
222143
|
-
width: 100%;
|
|
222144
|
-
}
|
|
222349
|
+
.label-stack {
|
|
222350
|
+
display: inline-flex;
|
|
222351
|
+
flex-direction: column;
|
|
222352
|
+
align-items: flex-start;
|
|
222353
|
+
justify-content: flex-end;
|
|
222354
|
+
min-inline-size: 0;
|
|
222355
|
+
}
|
|
222145
222356
|
|
|
222146
|
-
.
|
|
222147
|
-
|
|
222148
|
-
|
|
222149
|
-
|
|
222150
|
-
|
|
222151
|
-
|
|
222357
|
+
.value-area {
|
|
222358
|
+
display: inline-flex;
|
|
222359
|
+
align-items: flex-end;
|
|
222360
|
+
justify-content: flex-end;
|
|
222361
|
+
flex: 0 0 auto;
|
|
222362
|
+
min-inline-size: 0;
|
|
222363
|
+
}
|
|
222152
222364
|
|
|
222153
|
-
.
|
|
222154
|
-
|
|
222155
|
-
|
|
222156
|
-
|
|
222157
|
-
|
|
222158
|
-
}
|
|
222365
|
+
.value-cluster {
|
|
222366
|
+
display: inline-flex;
|
|
222367
|
+
align-items: flex-end;
|
|
222368
|
+
justify-content: flex-end;
|
|
222369
|
+
}
|
|
222159
222370
|
|
|
222160
|
-
.
|
|
222161
|
-
|
|
222162
|
-
|
|
222163
|
-
|
|
222164
|
-
justify-content: flex-end;
|
|
222165
|
-
}
|
|
222371
|
+
.unit-area {
|
|
222372
|
+
display: inline-flex;
|
|
222373
|
+
align-items: flex-end;
|
|
222374
|
+
}
|
|
222166
222375
|
|
|
222167
|
-
|
|
222168
|
-
display: inline-flex;
|
|
222169
|
-
align-items: center;
|
|
222170
|
-
gap: var(--global-size-spacing-target-padding);
|
|
222171
|
-
}
|
|
222376
|
+
/* ---------- Readout building block (advice / setpoint / value) ---------- */
|
|
222172
222377
|
|
|
222173
|
-
.
|
|
222174
|
-
|
|
222175
|
-
|
|
222176
|
-
|
|
222177
|
-
font-feature-settings:
|
|
222178
|
-
"liga" off,
|
|
222179
|
-
"clig" off,
|
|
222180
|
-
"ss04" on;
|
|
222181
|
-
display: flex;
|
|
222182
|
-
align-items: flex-end;
|
|
222183
|
-
block-size: var(--global-typography-instrument-label-container-height);
|
|
222184
|
-
max-block-size: var(--global-typography-instrument-label-container-height);
|
|
222185
|
-
padding-bottom: var(--global-typography-instrument-label-padding-bottom);
|
|
222186
|
-
overflow: hidden;
|
|
222187
|
-
font-size: var(--global-typography-instrument-label-font-size);
|
|
222188
|
-
line-height: var(--global-typography-instrument-label-line-height);
|
|
222189
|
-
color: var(--element-inactive-color);
|
|
222190
|
-
}
|
|
222378
|
+
.block {
|
|
222379
|
+
display: inline-flex;
|
|
222380
|
+
align-items: flex-end;
|
|
222381
|
+
}
|
|
222191
222382
|
|
|
222192
|
-
|
|
222193
|
-
|
|
222194
|
-
font-size: var(--global-typography-instrument-unit-font-size);
|
|
222195
|
-
line-height: var(--global-typography-instrument-unit-line-height);
|
|
222196
|
-
font-feature-settings:
|
|
222197
|
-
"liga" off,
|
|
222198
|
-
"clig" off,
|
|
222199
|
-
"ss04" on;
|
|
222200
|
-
display: flex;
|
|
222201
|
-
align-items: flex-end;
|
|
222202
|
-
block-size: var(--global-typography-instrument-unit-container-height);
|
|
222203
|
-
max-block-size: var(--global-typography-instrument-unit-container-height);
|
|
222204
|
-
padding-bottom: var(--global-typography-instrument-unit-padding-bottom);
|
|
222205
|
-
overflow: hidden;
|
|
222206
|
-
font-size: var(--global-typography-instrument-unit-font-size);
|
|
222207
|
-
line-height: var(--global-typography-instrument-unit-line-height);
|
|
222208
|
-
}
|
|
222383
|
+
/* Number + its (setpoint/advice) degree glyph, hugging with no gap — the
|
|
222384
|
+
\`.block\` gap only separates the icon from this group. */
|
|
222209
222385
|
|
|
222210
|
-
.
|
|
222211
|
-
|
|
222212
|
-
|
|
222386
|
+
.block-content {
|
|
222387
|
+
display: inline-flex;
|
|
222388
|
+
align-items: flex-end;
|
|
222389
|
+
}
|
|
222213
222390
|
|
|
222214
|
-
.
|
|
222215
|
-
|
|
222216
|
-
|
|
222391
|
+
.block-icon {
|
|
222392
|
+
display: inline-flex;
|
|
222393
|
+
align-items: center;
|
|
222394
|
+
justify-content: center;
|
|
222395
|
+
flex: none;
|
|
222396
|
+
color: inherit;
|
|
222397
|
+
/* Centre the icon against the block's text rather than bottom-aligning it (the
|
|
222398
|
+
block is flex-end). Matters for the value block, whose text is taller than
|
|
222399
|
+
the icon, so the value icon lines up with the number like the smaller
|
|
222400
|
+
setpoint/advice icons do. */
|
|
222401
|
+
align-self: center;
|
|
222402
|
+
}
|
|
222217
222403
|
|
|
222218
|
-
.
|
|
222219
|
-
|
|
222220
|
-
|
|
222221
|
-
|
|
222222
|
-
|
|
222223
|
-
|
|
222224
|
-
|
|
222404
|
+
.block-icon obi-input-right,
|
|
222405
|
+
.block-icon obi-notification-advice,
|
|
222406
|
+
.block-icon ::slotted(*) {
|
|
222407
|
+
display: block;
|
|
222408
|
+
inline-size: 100%;
|
|
222409
|
+
block-size: 100%;
|
|
222410
|
+
}
|
|
222225
222411
|
|
|
222226
|
-
.
|
|
222227
|
-
|
|
222228
|
-
|
|
222229
|
-
|
|
222230
|
-
|
|
222412
|
+
.hinted-zero {
|
|
222413
|
+
color: var(
|
|
222414
|
+
--obc-readout-list-item-hinted-color,
|
|
222415
|
+
var(--element-inactive-color)
|
|
222416
|
+
);
|
|
222417
|
+
}
|
|
222231
222418
|
|
|
222232
|
-
|
|
222233
|
-
|
|
222234
|
-
align-items: flex-end;
|
|
222235
|
-
justify-content: flex-end;
|
|
222236
|
-
gap: var(
|
|
222237
|
-
--instrument-components-readout-new-list-item-medium-value-container-gap
|
|
222238
|
-
);
|
|
222239
|
-
}
|
|
222419
|
+
/* ---------- Text colours (overridable via custom properties) ----------
|
|
222420
|
+
* obc-textbox does not set its own colour, so it inherits these. */
|
|
222240
222421
|
|
|
222241
|
-
.
|
|
222242
|
-
|
|
222243
|
-
|
|
222244
|
-
justify-content: center;
|
|
222245
|
-
color: inherit;
|
|
222246
|
-
}
|
|
222422
|
+
.block-value {
|
|
222423
|
+
color: var(--obc-readout-list-item-value-color, var(--element-neutral-color));
|
|
222424
|
+
}
|
|
222247
222425
|
|
|
222248
|
-
.
|
|
222249
|
-
|
|
222250
|
-
|
|
222251
|
-
|
|
222252
|
-
|
|
222253
|
-
|
|
222426
|
+
.block-value.tone-enhanced {
|
|
222427
|
+
color: var(
|
|
222428
|
+
--obc-readout-list-item-value-enhanced-color,
|
|
222429
|
+
var(--element-neutral-enhanced-color)
|
|
222430
|
+
);
|
|
222431
|
+
}
|
|
222254
222432
|
|
|
222255
|
-
|
|
222256
|
-
|
|
222257
|
-
|
|
222258
|
-
|
|
222433
|
+
/* The setpoint shares the value's colour state: neutral by default, enhanced
|
|
222434
|
+
(blue) only when the row is enhanced — never a blue setpoint next to a grey
|
|
222435
|
+
value. \`--instrument-enhanced-secondary-color\` is the same #2d548b as the
|
|
222436
|
+
value's \`--element-neutral-enhanced-color\`. */
|
|
222259
222437
|
|
|
222260
|
-
.
|
|
222261
|
-
|
|
222262
|
-
|
|
222263
|
-
|
|
222264
|
-
|
|
222265
|
-
|
|
222438
|
+
.block-setpoint {
|
|
222439
|
+
color: var(
|
|
222440
|
+
--obc-readout-list-item-setpoint-color,
|
|
222441
|
+
var(--element-neutral-color)
|
|
222442
|
+
);
|
|
222443
|
+
/* Flip-flop emphasis + pop-up fade animate at 100ms. */
|
|
222444
|
+
transition:
|
|
222445
|
+
opacity 100ms ease,
|
|
222446
|
+
color 100ms ease;
|
|
222447
|
+
}
|
|
222266
222448
|
|
|
222267
|
-
.
|
|
222268
|
-
|
|
222269
|
-
|
|
222270
|
-
)
|
|
222271
|
-
|
|
222272
|
-
|
|
222449
|
+
.block-setpoint.tone-enhanced {
|
|
222450
|
+
color: var(
|
|
222451
|
+
--obc-readout-list-item-setpoint-enhanced-color,
|
|
222452
|
+
var(--instrument-enhanced-secondary-color)
|
|
222453
|
+
);
|
|
222454
|
+
}
|
|
222273
222455
|
|
|
222274
|
-
|
|
222275
|
-
|
|
222276
|
-
--instrument-components-readout-new-list-item-regular-content-container-gap
|
|
222277
|
-
);
|
|
222278
|
-
}
|
|
222456
|
+
/* Pop-up: fade the setpoint out once value === setpoint, keeping its space so
|
|
222457
|
+
the value stays column-aligned. */
|
|
222279
222458
|
|
|
222280
|
-
.
|
|
222281
|
-
|
|
222282
|
-
|
|
222283
|
-
);
|
|
222284
|
-
}
|
|
222459
|
+
.block-setpoint.is-hiding {
|
|
222460
|
+
opacity: 0;
|
|
222461
|
+
}
|
|
222285
222462
|
|
|
222286
|
-
.
|
|
222287
|
-
|
|
222288
|
-
|
|
222463
|
+
.block-setpoint.is-hidden {
|
|
222464
|
+
opacity: 0;
|
|
222465
|
+
visibility: hidden;
|
|
222466
|
+
}
|
|
222289
222467
|
|
|
222290
|
-
|
|
222291
|
-
|
|
222292
|
-
|
|
222293
|
-
|
|
222294
|
-
|
|
222468
|
+
/* Touching / focus state: the setpoint triangle takes the marker's focus look — a
|
|
222469
|
+
pale fill (--base-blue-100) with a dark 1px edge (--element-neutral-enhanced),
|
|
222470
|
+
mirroring \`svghelpers/setpoint.ts\` focus (fill base-blue-100 + 2px stroke).
|
|
222471
|
+
The glyph icon is \`fill: currentColor\` and can't take a CSS \`stroke\`, so the
|
|
222472
|
+
edge is layered drop-shadows. The setpoint number keeps its normal, readable
|
|
222473
|
+
colour. */
|
|
222295
222474
|
|
|
222296
|
-
.
|
|
222297
|
-
|
|
222298
|
-
|
|
222299
|
-
)
|
|
222300
|
-
|
|
222301
|
-
|
|
222302
|
-
);
|
|
222303
|
-
}
|
|
222475
|
+
.block-setpoint.touching {
|
|
222476
|
+
--_touching-outline: var(
|
|
222477
|
+
--obc-readout-list-item-setpoint-touching-outline-color,
|
|
222478
|
+
var(--element-neutral-enhanced-color)
|
|
222479
|
+
);
|
|
222480
|
+
}
|
|
222304
222481
|
|
|
222305
|
-
.
|
|
222306
|
-
|
|
222307
|
-
|
|
222308
|
-
|
|
222309
|
-
|
|
222482
|
+
.block-setpoint.touching .block-icon {
|
|
222483
|
+
color: var(
|
|
222484
|
+
--obc-readout-list-item-setpoint-touching-color,
|
|
222485
|
+
var(--base-blue-100)
|
|
222486
|
+
);
|
|
222487
|
+
filter: drop-shadow(1px 0 0 var(--_touching-outline))
|
|
222488
|
+
drop-shadow(-1px 0 0 var(--_touching-outline))
|
|
222489
|
+
drop-shadow(0 1px 0 var(--_touching-outline))
|
|
222490
|
+
drop-shadow(0 -1px 0 var(--_touching-outline));
|
|
222491
|
+
}
|
|
222310
222492
|
|
|
222311
|
-
.
|
|
222312
|
-
|
|
222313
|
-
|
|
222314
|
-
|
|
222315
|
-
|
|
222493
|
+
.block-advice {
|
|
222494
|
+
color: var(
|
|
222495
|
+
--obc-readout-list-item-advice-color,
|
|
222496
|
+
var(--element-neutral-color)
|
|
222497
|
+
);
|
|
222498
|
+
}
|
|
222316
222499
|
|
|
222317
|
-
.
|
|
222318
|
-
|
|
222319
|
-
|
|
222320
|
-
)
|
|
222321
|
-
|
|
222322
|
-
|
|
222323
|
-
);
|
|
222324
|
-
}
|
|
222500
|
+
.label {
|
|
222501
|
+
color: var(
|
|
222502
|
+
--obc-readout-list-item-label-color,
|
|
222503
|
+
var(--element-inactive-color)
|
|
222504
|
+
);
|
|
222505
|
+
}
|
|
222325
222506
|
|
|
222326
|
-
.
|
|
222327
|
-
|
|
222328
|
-
|
|
222507
|
+
.unit {
|
|
222508
|
+
color: var(--obc-readout-list-item-unit-color, var(--element-inactive-color));
|
|
222509
|
+
}
|
|
222329
222510
|
|
|
222330
|
-
.
|
|
222331
|
-
|
|
222332
|
-
|
|
222511
|
+
.source {
|
|
222512
|
+
color: var(
|
|
222513
|
+
--obc-readout-list-item-source-color,
|
|
222514
|
+
var(--element-neutral-color)
|
|
222515
|
+
);
|
|
222516
|
+
}
|
|
222333
222517
|
|
|
222334
|
-
|
|
222335
|
-
|
|
222336
|
-
|
|
222337
|
-
|
|
222338
|
-
}
|
|
222518
|
+
/* ---------- Per-block data quality ----------
|
|
222519
|
+
* Independent of (and nests inside) the row-level data-quality frame. Uses
|
|
222520
|
+
* \`outline\` (not \`border\`) so the chip never shifts the block's width — the
|
|
222521
|
+
* value stays column-aligned across rows. */
|
|
222339
222522
|
|
|
222340
|
-
.
|
|
222341
|
-
|
|
222342
|
-
|
|
222523
|
+
.block.data-low-integrity,
|
|
222524
|
+
.block.data-invalid,
|
|
222525
|
+
.source.data-low-integrity,
|
|
222526
|
+
.source.data-invalid {
|
|
222527
|
+
outline: 1px solid;
|
|
222528
|
+
border-radius: var(--global-border-radius-border-radius-check);
|
|
222529
|
+
}
|
|
222343
222530
|
|
|
222344
|
-
.
|
|
222345
|
-
|
|
222346
|
-
|
|
222531
|
+
.block.data-low-integrity,
|
|
222532
|
+
.source.data-low-integrity {
|
|
222533
|
+
background: var(--alert-low-integrity-background-color);
|
|
222534
|
+
outline-color: var(--alert-low-integrity-border-color);
|
|
222535
|
+
}
|
|
222347
222536
|
|
|
222348
|
-
.
|
|
222349
|
-
|
|
222350
|
-
|
|
222537
|
+
.block.data-invalid,
|
|
222538
|
+
.source.data-invalid {
|
|
222539
|
+
background: var(--alert-invalid-background-color);
|
|
222540
|
+
outline-color: var(--alert-invalid-border-color);
|
|
222541
|
+
}
|
|
222351
222542
|
|
|
222352
|
-
.
|
|
222353
|
-
|
|
222354
|
-
|
|
222543
|
+
.leading-icon {
|
|
222544
|
+
display: inline-flex;
|
|
222545
|
+
align-items: center;
|
|
222546
|
+
justify-content: center;
|
|
222547
|
+
flex: none;
|
|
222548
|
+
color: var(--element-neutral-color);
|
|
222549
|
+
}
|
|
222355
222550
|
|
|
222356
|
-
.
|
|
222357
|
-
|
|
222358
|
-
|
|
222359
|
-
|
|
222360
|
-
|
|
222551
|
+
.leading-icon ::slotted(*) {
|
|
222552
|
+
display: block;
|
|
222553
|
+
inline-size: 100%;
|
|
222554
|
+
block-size: 100%;
|
|
222555
|
+
}
|
|
222361
222556
|
|
|
222362
|
-
.
|
|
222363
|
-
|
|
222364
|
-
|
|
222557
|
+
.divider {
|
|
222558
|
+
flex: none;
|
|
222559
|
+
inline-size: 1px;
|
|
222560
|
+
background-color: var(--border-outline-color);
|
|
222561
|
+
align-self: stretch;
|
|
222562
|
+
}
|
|
222365
222563
|
|
|
222366
|
-
|
|
222367
|
-
|
|
222368
|
-
|
|
222369
|
-
|
|
222370
|
-
|
|
222564
|
+
/* ---------- Value↔unit gap & degree column ----------
|
|
222565
|
+
* Default 2px between the value digits and the unit. A degree (or a
|
|
222566
|
+
* hasDegreeSpacer reserve) replaces the 2px with a cap-height degree column
|
|
222567
|
+
* whose width scales with the value size, so value digits + units align across
|
|
222568
|
+
* degree / no-degree rows of the same value size. */
|
|
222569
|
+
|
|
222570
|
+
.value-unit-gap {
|
|
222571
|
+
flex: none;
|
|
222572
|
+
inline-size: var(
|
|
222573
|
+
--instrument-components-readout-new-general-horizontal-trim-padding
|
|
222574
|
+
);
|
|
222575
|
+
}
|
|
222576
|
+
|
|
222577
|
+
.degree-column {
|
|
222578
|
+
flex: none;
|
|
222579
|
+
display: inline-flex;
|
|
222580
|
+
align-items: flex-end;
|
|
222581
|
+
justify-content: center;
|
|
222582
|
+
inline-size: var(--_obc-readout-list-item-degree-width, 0);
|
|
222583
|
+
overflow: clip;
|
|
222584
|
+
color: var(--obc-readout-list-item-value-color, var(--element-neutral-color));
|
|
222585
|
+
}
|
|
222586
|
+
|
|
222587
|
+
.degree-column.tone-enhanced {
|
|
222588
|
+
color: var(
|
|
222589
|
+
--obc-readout-list-item-value-enhanced-color,
|
|
222590
|
+
var(--element-neutral-enhanced-color)
|
|
222591
|
+
);
|
|
222592
|
+
}
|
|
222593
|
+
|
|
222594
|
+
/* Setpoint/advice degree glyphs inherit their block's colour. */
|
|
222595
|
+
|
|
222596
|
+
.degree-column.degree-inherit {
|
|
222597
|
+
color: inherit;
|
|
222598
|
+
}
|
|
222599
|
+
|
|
222600
|
+
.degree-column.degree-xs {
|
|
222601
|
+
--_obc-readout-list-item-degree-width: var(
|
|
222602
|
+
--global-typography-instrument-value-small-degree-unit-width
|
|
222603
|
+
);
|
|
222604
|
+
}
|
|
222605
|
+
|
|
222606
|
+
.degree-column.degree-s {
|
|
222607
|
+
--_obc-readout-list-item-degree-width: var(
|
|
222608
|
+
--global-typography-instrument-value-regular-degree-unit-width
|
|
222609
|
+
);
|
|
222610
|
+
}
|
|
222611
|
+
|
|
222612
|
+
.degree-column.degree-m {
|
|
222613
|
+
--_obc-readout-list-item-degree-width: var(
|
|
222614
|
+
--global-typography-instrument-value-medium-degree-unit-width
|
|
222615
|
+
);
|
|
222616
|
+
}
|
|
222617
|
+
|
|
222618
|
+
.degree-column.degree-l,
|
|
222619
|
+
.degree-column.degree-xl {
|
|
222620
|
+
--_obc-readout-list-item-degree-width: var(
|
|
222621
|
+
--global-typography-instrument-value-large-degree-unit-width
|
|
222622
|
+
);
|
|
222623
|
+
}
|
|
222624
|
+
|
|
222625
|
+
/* Degree spacer: rendered AFTER the unit on a non-degree row that sets
|
|
222626
|
+
hasDegreeSpacer. Its width (degree-compensation-padding = degree-column width
|
|
222627
|
+
minus the 2px value↔unit gap) shifts the unit left so the row's value digits
|
|
222628
|
+
stay aligned with degree rows in the same column. */
|
|
222629
|
+
|
|
222630
|
+
.degree-spacer {
|
|
222631
|
+
flex: none;
|
|
222632
|
+
align-self: stretch;
|
|
222633
|
+
inline-size: var(--_obc-readout-list-item-degree-spacer-width, 0);
|
|
222634
|
+
}
|
|
222635
|
+
|
|
222636
|
+
.size-small .degree-spacer {
|
|
222637
|
+
--_obc-readout-list-item-degree-spacer-width: var(
|
|
222638
|
+
--instrument-components-readout-new-list-item-regular-degree-compensation-padding
|
|
222639
|
+
);
|
|
222640
|
+
}
|
|
222641
|
+
|
|
222642
|
+
.size-medium .degree-spacer {
|
|
222643
|
+
--_obc-readout-list-item-degree-spacer-width: var(
|
|
222644
|
+
--instrument-components-readout-new-list-item-medium-degree-compensation-padding
|
|
222645
|
+
);
|
|
222646
|
+
}
|
|
222647
|
+
|
|
222648
|
+
.size-large .degree-spacer {
|
|
222649
|
+
--_obc-readout-list-item-degree-spacer-width: var(
|
|
222650
|
+
--instrument-components-readout-new-list-item-large-degree-compensation-padding
|
|
222651
|
+
);
|
|
222652
|
+
}
|
|
222653
|
+
|
|
222654
|
+
/* ---------- Size tiers ----------
|
|
222655
|
+
* Public small/medium/large map to the design token regular/medium/large
|
|
222656
|
+
* tiers. */
|
|
222657
|
+
|
|
222658
|
+
.size-small .surface {
|
|
222659
|
+
padding-inline: var(
|
|
222660
|
+
--instrument-components-readout-new-list-item-regular-container-padding-horizontal
|
|
222661
|
+
);
|
|
222662
|
+
padding-block: var(
|
|
222663
|
+
--instrument-components-readout-new-list-item-regular-container-padding-vertical
|
|
222664
|
+
);
|
|
222665
|
+
}
|
|
222666
|
+
|
|
222667
|
+
.size-small .content {
|
|
222668
|
+
gap: var(
|
|
222669
|
+
--instrument-components-readout-new-list-item-regular-content-container-gap
|
|
222670
|
+
);
|
|
222671
|
+
}
|
|
222672
|
+
|
|
222673
|
+
.size-small .value-cluster {
|
|
222674
|
+
gap: var(
|
|
222675
|
+
--instrument-components-readout-new-list-item-regular-value-container-gap
|
|
222676
|
+
);
|
|
222677
|
+
}
|
|
222678
|
+
|
|
222679
|
+
.size-small .block {
|
|
222680
|
+
gap: var(--instrument-components-readout-new-general-regular-icon-gap);
|
|
222681
|
+
}
|
|
222682
|
+
|
|
222683
|
+
.size-small .block-icon,
|
|
222684
|
+
.size-small .leading-icon {
|
|
222685
|
+
inline-size: var(
|
|
222686
|
+
--instrument-components-readout-new-general-regular-icon-size
|
|
222687
|
+
);
|
|
222688
|
+
block-size: var(
|
|
222689
|
+
--instrument-components-readout-new-general-regular-icon-size
|
|
222690
|
+
);
|
|
222691
|
+
}
|
|
222692
|
+
|
|
222693
|
+
.size-small .divider {
|
|
222694
|
+
block-size: var(
|
|
222695
|
+
--global-typography-instrument-value-regular-container-height
|
|
222696
|
+
);
|
|
222697
|
+
}
|
|
222698
|
+
|
|
222699
|
+
.size-medium .surface {
|
|
222700
|
+
padding-inline: var(
|
|
222701
|
+
--instrument-components-readout-new-list-item-medium-container-padding-horizontal
|
|
222702
|
+
);
|
|
222703
|
+
padding-block: var(
|
|
222704
|
+
--instrument-components-readout-new-list-item-medium-container-padding-vertical
|
|
222705
|
+
);
|
|
222706
|
+
}
|
|
222707
|
+
|
|
222708
|
+
.size-medium .content {
|
|
222709
|
+
gap: var(
|
|
222710
|
+
--instrument-components-readout-new-list-item-medium-content-container-gap
|
|
222711
|
+
);
|
|
222712
|
+
}
|
|
222713
|
+
|
|
222714
|
+
.size-medium .value-cluster {
|
|
222715
|
+
gap: var(
|
|
222716
|
+
--instrument-components-readout-new-list-item-medium-value-container-gap
|
|
222717
|
+
);
|
|
222718
|
+
}
|
|
222719
|
+
|
|
222720
|
+
.size-medium .block {
|
|
222721
|
+
gap: var(--instrument-components-readout-new-general-medium-icon-gap);
|
|
222722
|
+
}
|
|
222723
|
+
|
|
222724
|
+
.size-medium .block-icon,
|
|
222725
|
+
.size-medium .leading-icon {
|
|
222726
|
+
inline-size: var(
|
|
222727
|
+
--instrument-components-readout-new-general-medium-icon-size
|
|
222728
|
+
);
|
|
222729
|
+
block-size: var(--instrument-components-readout-new-general-medium-icon-size);
|
|
222730
|
+
}
|
|
222731
|
+
|
|
222732
|
+
.size-medium .divider {
|
|
222733
|
+
block-size: var(--global-typography-instrument-value-medium-container-height);
|
|
222734
|
+
}
|
|
222735
|
+
|
|
222736
|
+
.size-large .surface {
|
|
222737
|
+
padding-inline: var(
|
|
222738
|
+
--instrument-components-readout-new-list-item-large-container-padding-horizontal
|
|
222739
|
+
);
|
|
222740
|
+
padding-block: var(
|
|
222741
|
+
--instrument-components-readout-new-list-item-large-container-padding-vertical
|
|
222742
|
+
);
|
|
222743
|
+
min-block-size: var(
|
|
222744
|
+
--instrument-components-readout-new-list-item-large-min-height
|
|
222745
|
+
);
|
|
222746
|
+
}
|
|
222747
|
+
|
|
222748
|
+
.size-large .content {
|
|
222749
|
+
gap: var(--instrument-components-readout-new-list-item-large-content-gap);
|
|
222750
|
+
}
|
|
222751
|
+
|
|
222752
|
+
.size-large .value-cluster {
|
|
222753
|
+
gap: var(--instrument-components-readout-new-list-item-large-value-gap);
|
|
222754
|
+
}
|
|
222755
|
+
|
|
222756
|
+
.size-large .block {
|
|
222757
|
+
gap: var(--instrument-components-readout-new-general-large-icon-gap);
|
|
222758
|
+
}
|
|
222759
|
+
|
|
222760
|
+
.size-large .block-icon,
|
|
222761
|
+
.size-large .leading-icon {
|
|
222762
|
+
inline-size: var(--instrument-components-readout-new-general-large-icon-size);
|
|
222763
|
+
block-size: var(--instrument-components-readout-new-general-large-icon-size);
|
|
222764
|
+
}
|
|
222765
|
+
|
|
222766
|
+
.size-large .divider {
|
|
222767
|
+
block-size: var(--global-typography-instrument-value-large-container-height);
|
|
222768
|
+
}
|
|
222769
|
+
|
|
222770
|
+
/* ---------- Stacking ----------
|
|
222771
|
+
* leading-unit / leading-src move the unit / source up beside the label and
|
|
222772
|
+
* suppress the trailing variant. (Handled in markup; these rules tighten the
|
|
222773
|
+
* label-stack gap.) */
|
|
222774
|
+
|
|
222775
|
+
.stacking-leading-src .content {
|
|
222776
|
+
gap: var(--global-size-spacing-target-padding);
|
|
222777
|
+
}
|
|
222778
|
+
|
|
222779
|
+
/* ---------- Data quality ----------
|
|
222780
|
+
* Orthogonal to the alert frame — both can apply at once. */
|
|
222781
|
+
|
|
222782
|
+
.root.data-low-integrity .surface,
|
|
222783
|
+
.root.data-invalid .surface {
|
|
222784
|
+
/* \`outline\` (not \`border\`) so the data-quality frame does not inset the
|
|
222785
|
+
content by 1px — keeps the row's value column-aligned with unframed rows.
|
|
222786
|
+
Matches the per-block data-quality rules. */
|
|
222787
|
+
outline: 1px solid var(--_obc-readout-list-item-data-border);
|
|
222788
|
+
background: var(--_obc-readout-list-item-data-background);
|
|
222789
|
+
border-radius: var(--global-border-radius-border-radius-check);
|
|
222790
|
+
}
|
|
222371
222791
|
|
|
222372
222792
|
.root.data-low-integrity {
|
|
222373
|
-
|
|
222374
|
-
|
|
222375
|
-
|
|
222376
|
-
|
|
222377
|
-
|
|
222378
|
-
);
|
|
222379
|
-
}
|
|
222793
|
+
--_obc-readout-list-item-data-background: var(
|
|
222794
|
+
--alert-low-integrity-background-color
|
|
222795
|
+
);
|
|
222796
|
+
--_obc-readout-list-item-data-border: var(--alert-low-integrity-border-color);
|
|
222797
|
+
}
|
|
222380
222798
|
|
|
222381
222799
|
.root.data-invalid {
|
|
222382
|
-
|
|
222383
|
-
|
|
222384
|
-
|
|
222385
|
-
|
|
222386
|
-
|
|
222800
|
+
--_obc-readout-list-item-data-background: var(
|
|
222801
|
+
--alert-invalid-background-color
|
|
222802
|
+
);
|
|
222803
|
+
--_obc-readout-list-item-data-border: var(--alert-invalid-border-color);
|
|
222804
|
+
}
|
|
222387
222805
|
`;
|
|
222388
222806
|
var __defProp$f = Object.defineProperty;
|
|
222389
222807
|
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
@@ -222398,278 +222816,517 @@ var __decorateClass$f = (decorators, target, key, kind) => {
|
|
|
222398
222816
|
let ObcReadoutListItem = class extends i$4 {
|
|
222399
222817
|
constructor() {
|
|
222400
222818
|
super(...arguments);
|
|
222401
|
-
this.
|
|
222402
|
-
this.
|
|
222403
|
-
this.
|
|
222404
|
-
this.dataState = "none";
|
|
222405
|
-
this.alert = false;
|
|
222406
|
-
this.label = "";
|
|
222407
|
-
this.unit = "";
|
|
222408
|
-
this.src = "";
|
|
222409
|
-
this.value = void 0;
|
|
222410
|
-
this.setpointValue = void 0;
|
|
222819
|
+
this.hasValue = true;
|
|
222820
|
+
this.value = null;
|
|
222821
|
+
this.off = false;
|
|
222411
222822
|
this.hasSetpoint = false;
|
|
222412
|
-
this.
|
|
222413
|
-
this.
|
|
222414
|
-
this.hasLabel = false;
|
|
222415
|
-
this.hasSource = false;
|
|
222823
|
+
this.hasAdvice = false;
|
|
222824
|
+
this.clickable = false;
|
|
222416
222825
|
this.hasLeadingIcon = false;
|
|
222417
|
-
this.
|
|
222826
|
+
this.hasDegree = false;
|
|
222827
|
+
this.hasDegreeSpacer = false;
|
|
222418
222828
|
this.fractionDigits = 0;
|
|
222419
|
-
this.
|
|
222420
|
-
this.
|
|
222421
|
-
this.
|
|
222422
|
-
this.
|
|
222829
|
+
this.maxDigits = 0;
|
|
222830
|
+
this.alert = false;
|
|
222831
|
+
this.deferredSetpointHidePhase = "none";
|
|
222832
|
+
this.hasCompletedFirstUpdate = false;
|
|
222423
222833
|
}
|
|
222424
|
-
get
|
|
222425
|
-
return this.size
|
|
222834
|
+
get resolvedSize() {
|
|
222835
|
+
return this.size ?? "small";
|
|
222426
222836
|
}
|
|
222427
|
-
get
|
|
222428
|
-
|
|
222429
|
-
if (this.size === "priority") {
|
|
222430
|
-
return ReadoutSetpointSize.small;
|
|
222431
|
-
}
|
|
222432
|
-
if (this.size === "enhanced") {
|
|
222433
|
-
return ReadoutSetpointSize.regular;
|
|
222434
|
-
}
|
|
222435
|
-
}
|
|
222436
|
-
if (this.size === "enhanced") {
|
|
222437
|
-
return ReadoutSetpointSize.large;
|
|
222438
|
-
}
|
|
222439
|
-
return ReadoutSetpointSize.regular;
|
|
222837
|
+
get resolvedStacking() {
|
|
222838
|
+
return this.stacking ?? "trailing-unit";
|
|
222440
222839
|
}
|
|
222441
|
-
get
|
|
222442
|
-
|
|
222443
|
-
|
|
222840
|
+
get resolvedPriority() {
|
|
222841
|
+
return this.priority ?? "regular";
|
|
222842
|
+
}
|
|
222843
|
+
get resolvedFractionDigits() {
|
|
222844
|
+
return this.fractionDigits ?? 0;
|
|
222845
|
+
}
|
|
222846
|
+
get resolvedMaxDigits() {
|
|
222847
|
+
return this.maxDigits ?? 0;
|
|
222848
|
+
}
|
|
222849
|
+
get resolvedClickable() {
|
|
222850
|
+
const clickable = this.clickable;
|
|
222851
|
+
if (!clickable) {
|
|
222852
|
+
return false;
|
|
222444
222853
|
}
|
|
222445
|
-
if (
|
|
222446
|
-
return
|
|
222854
|
+
if (clickable === true) {
|
|
222855
|
+
return {
|
|
222856
|
+
border: "squared"
|
|
222857
|
+
/* squared */
|
|
222858
|
+
};
|
|
222447
222859
|
}
|
|
222448
|
-
|
|
222449
|
-
|
|
222450
|
-
|
|
222451
|
-
|
|
222452
|
-
|
|
222453
|
-
|
|
222454
|
-
|
|
222455
|
-
|
|
222860
|
+
return {
|
|
222861
|
+
border: clickable.border ?? "squared"
|
|
222862
|
+
/* squared */
|
|
222863
|
+
};
|
|
222864
|
+
}
|
|
222865
|
+
get isAtSetpoint() {
|
|
222866
|
+
if (!this.hasSetpoint || this.value === null || this.setpoint === void 0) {
|
|
222867
|
+
return false;
|
|
222456
222868
|
}
|
|
222869
|
+
const formatOptions = this.numericFormatOptions(this.resolvedMaxDigits);
|
|
222870
|
+
return formatNumericValue(this.value, formatOptions) === formatNumericValue(this.setpoint, formatOptions);
|
|
222871
|
+
}
|
|
222872
|
+
get resolvedSetpointInteraction() {
|
|
222873
|
+
return this.setpointOptions?.interaction ?? "always-visible";
|
|
222457
222874
|
}
|
|
222458
|
-
get
|
|
222875
|
+
get isFlipFlop() {
|
|
222876
|
+
return this.resolvedSetpointInteraction === "flip-flop";
|
|
222877
|
+
}
|
|
222878
|
+
get isPopUp() {
|
|
222879
|
+
return this.resolvedSetpointInteraction === "pop-up";
|
|
222880
|
+
}
|
|
222881
|
+
get setpointTouching() {
|
|
222882
|
+
return this.setpointOptions?.touching ?? false;
|
|
222883
|
+
}
|
|
222884
|
+
/**
|
|
222885
|
+
* The setpoint is rendered "emphasised" (primary size + SemiBold weight) when
|
|
222886
|
+
* it is the focus of attention: while actively adjusting (`touching`), or while
|
|
222887
|
+
* a flip-flop has the value away from the setpoint. Otherwise it is a secondary
|
|
222888
|
+
* (smaller, regular-weight) reference next to the value.
|
|
222889
|
+
*/
|
|
222890
|
+
get isSetpointEmphasized() {
|
|
222459
222891
|
if (!this.hasSetpoint) {
|
|
222460
|
-
return
|
|
222892
|
+
return false;
|
|
222461
222893
|
}
|
|
222462
|
-
if (this.
|
|
222463
|
-
return
|
|
222894
|
+
if (this.setpointTouching) {
|
|
222895
|
+
return true;
|
|
222464
222896
|
}
|
|
222465
|
-
return
|
|
222897
|
+
return this.isFlipFlop && !this.isAtSetpoint;
|
|
222466
222898
|
}
|
|
222467
|
-
|
|
222468
|
-
|
|
222469
|
-
|
|
222470
|
-
|
|
222471
|
-
|
|
222899
|
+
/**
|
|
222900
|
+
* The row's enhanced (in-command) colour state, applied uniformly to BOTH the
|
|
222901
|
+
* value and the setpoint — they are always either both neutral or both enhanced
|
|
222902
|
+
* (never a blue setpoint next to a grey value). Driven by `priority` only;
|
|
222903
|
+
* `valueOptions.weight` changes weight, not colour.
|
|
222904
|
+
*/
|
|
222905
|
+
get rowEnhanced() {
|
|
222906
|
+
return this.resolvedPriority === "enhanced";
|
|
222472
222907
|
}
|
|
222473
|
-
|
|
222474
|
-
|
|
222908
|
+
/** Primary value-typography size for the current density tier. */
|
|
222909
|
+
get primarySize() {
|
|
222910
|
+
switch (this.resolvedSize) {
|
|
222911
|
+
case "large":
|
|
222912
|
+
return ObcTextboxSize.l;
|
|
222913
|
+
case "medium":
|
|
222914
|
+
return ObcTextboxSize.m;
|
|
222915
|
+
default:
|
|
222916
|
+
return ObcTextboxSize.s;
|
|
222917
|
+
}
|
|
222475
222918
|
}
|
|
222476
|
-
|
|
222477
|
-
|
|
222478
|
-
|
|
222919
|
+
/** Secondary (de-emphasised) value-typography size for the current density tier. */
|
|
222920
|
+
get secondarySize() {
|
|
222921
|
+
switch (this.resolvedSize) {
|
|
222922
|
+
case "large":
|
|
222923
|
+
return ObcTextboxSize.s;
|
|
222924
|
+
case "medium":
|
|
222925
|
+
return ObcTextboxSize.s;
|
|
222926
|
+
default:
|
|
222927
|
+
return ObcTextboxSize.xs;
|
|
222479
222928
|
}
|
|
222480
|
-
return Priority.enhanced;
|
|
222481
222929
|
}
|
|
222482
|
-
get
|
|
222483
|
-
if (this.
|
|
222484
|
-
return
|
|
222930
|
+
get valueSize() {
|
|
222931
|
+
if (this.isSetpointEmphasized) {
|
|
222932
|
+
return this.secondarySize;
|
|
222485
222933
|
}
|
|
222486
|
-
return
|
|
222934
|
+
return this.primarySize;
|
|
222487
222935
|
}
|
|
222488
|
-
get
|
|
222489
|
-
return this.
|
|
222936
|
+
get setpointSize() {
|
|
222937
|
+
return this.isSetpointEmphasized ? this.primarySize : this.secondarySize;
|
|
222490
222938
|
}
|
|
222491
|
-
|
|
222492
|
-
|
|
222939
|
+
/** Value font weight passes straight to obc-textbox; regular when unset. Colour is separate. */
|
|
222940
|
+
get valueWeight() {
|
|
222941
|
+
return this.valueOptions?.weight ?? ObcTextboxFontWeight.regular;
|
|
222493
222942
|
}
|
|
222494
|
-
|
|
222495
|
-
|
|
222943
|
+
/** Setpoint is SemiBold only while emphasised, otherwise regular weight. */
|
|
222944
|
+
get setpointWeight() {
|
|
222945
|
+
return this.isSetpointEmphasized ? ObcTextboxFontWeight.semibold : ObcTextboxFontWeight.regular;
|
|
222496
222946
|
}
|
|
222497
|
-
|
|
222498
|
-
|
|
222499
|
-
|
|
222947
|
+
numericFormatOptions(maxDigits) {
|
|
222948
|
+
return {
|
|
222949
|
+
showZeroPadding: false,
|
|
222950
|
+
minValueLength: maxDigits,
|
|
222951
|
+
fractionDigits: this.resolvedFractionDigits
|
|
222952
|
+
};
|
|
222953
|
+
}
|
|
222954
|
+
/** Widest possible value string for width reservation (e.g. `"000.0"`). */
|
|
222955
|
+
get reserverText() {
|
|
222956
|
+
const maxDigits = this.resolvedMaxDigits;
|
|
222957
|
+
if (maxDigits <= 0) {
|
|
222958
|
+
return "";
|
|
222500
222959
|
}
|
|
222501
|
-
const
|
|
222502
|
-
const
|
|
222503
|
-
|
|
222504
|
-
|
|
222505
|
-
|
|
222506
|
-
|
|
222507
|
-
|
|
222508
|
-
|
|
222509
|
-
|
|
222960
|
+
const fractionDigits = this.resolvedFractionDigits;
|
|
222961
|
+
const integer = "0".repeat(Math.max(maxDigits, 1));
|
|
222962
|
+
return fractionDigits > 0 ? `${integer}.${"0".repeat(fractionDigits)}` : integer;
|
|
222963
|
+
}
|
|
222964
|
+
/**
|
|
222965
|
+
* Effective width reserver for a numeric block: the wider of the explicit
|
|
222966
|
+
* `spaceReserver` and the `maxDigits`/`fractionDigits`-derived reserve, so an
|
|
222967
|
+
* explicit reserver can never reserve *less* than the formatted value needs.
|
|
222968
|
+
* Under tabular-nums the rendered width is proportional to character count, so
|
|
222969
|
+
* "wider" compares string length.
|
|
222970
|
+
*/
|
|
222971
|
+
widerReserver(explicit, derived) {
|
|
222972
|
+
if (!explicit) {
|
|
222973
|
+
return derived;
|
|
222510
222974
|
}
|
|
222511
|
-
if (
|
|
222512
|
-
return
|
|
222513
|
-
<div class="label-inline" part="label-inline">
|
|
222514
|
-
<div class="label" part="label">${this.label}</div>
|
|
222515
|
-
<div class="source source-inline" part="source-inline">
|
|
222516
|
-
${this.src}
|
|
222517
|
-
</div>
|
|
222518
|
-
</div>
|
|
222519
|
-
`;
|
|
222975
|
+
if (!derived) {
|
|
222976
|
+
return explicit;
|
|
222520
222977
|
}
|
|
222521
|
-
return
|
|
222522
|
-
<div class="label-stack" part="label-stack">
|
|
222523
|
-
<div class="label" part="label">${this.label}</div>
|
|
222524
|
-
${showsLeadingUnit ? b`<div class="unit unit-leading" part="unit-leading">
|
|
222525
|
-
${this.unit}
|
|
222526
|
-
</div>` : A}
|
|
222527
|
-
${showsLeadingSrc ? b`<div class="source source-inline" part="source-inline">
|
|
222528
|
-
${this.src}
|
|
222529
|
-
</div>` : A}
|
|
222530
|
-
</div>
|
|
222531
|
-
`;
|
|
222978
|
+
return explicit.length >= derived.length ? explicit : derived;
|
|
222532
222979
|
}
|
|
222533
|
-
|
|
222534
|
-
|
|
222535
|
-
|
|
222980
|
+
/** classMap fragment for a block / source carrying per-block data quality. */
|
|
222981
|
+
dataQualityClasses(dataQuality) {
|
|
222982
|
+
return {
|
|
222983
|
+
"data-low-integrity": dataQuality === "low-integrity",
|
|
222984
|
+
"data-invalid": dataQuality === "invalid"
|
|
222985
|
+
/* invalid */
|
|
222986
|
+
};
|
|
222987
|
+
}
|
|
222988
|
+
renderIcon(role) {
|
|
222989
|
+
if (role === "value") {
|
|
222990
|
+
if (!this.valueOptions?.hasIcon) {
|
|
222991
|
+
return A;
|
|
222992
|
+
}
|
|
222993
|
+
return b`<span class="block-icon" aria-hidden="true"
|
|
222994
|
+
><slot name="value-icon"></slot
|
|
222995
|
+
></span>`;
|
|
222536
222996
|
}
|
|
222537
|
-
|
|
222538
|
-
|
|
222997
|
+
if (role === "setpoint") {
|
|
222998
|
+
return b`<span class="block-icon" aria-hidden="true">
|
|
222999
|
+
<slot name="setpoint-icon"><obi-input-right></obi-input-right></slot>
|
|
223000
|
+
</span>`;
|
|
223001
|
+
}
|
|
223002
|
+
return b`<span class="block-icon" aria-hidden="true">
|
|
223003
|
+
<slot name="advice-icon"
|
|
223004
|
+
><obi-notification-advice></obi-notification-advice
|
|
223005
|
+
></slot>
|
|
222539
223006
|
</span>`;
|
|
222540
223007
|
}
|
|
222541
|
-
|
|
222542
|
-
|
|
222543
|
-
|
|
222544
|
-
|
|
222545
|
-
|
|
222546
|
-
|
|
222547
|
-
|
|
222548
|
-
|
|
222549
|
-
|
|
222550
|
-
|
|
222551
|
-
|
|
222552
|
-
|
|
222553
|
-
|
|
222554
|
-
|
|
222555
|
-
|
|
222556
|
-
|
|
222557
|
-
|
|
222558
|
-
|
|
222559
|
-
|
|
223008
|
+
renderBlock(config) {
|
|
223009
|
+
const formatOptions = this.numericFormatOptions(this.resolvedMaxDigits);
|
|
223010
|
+
const valueForFormat = config.value ?? void 0;
|
|
223011
|
+
const text = config.off ? "OFF" : formatNumericValue(valueForFormat, formatOptions);
|
|
223012
|
+
const hinted = config.off || !config.hintedZeros ? "" : getHintZeros(valueForFormat, {
|
|
223013
|
+
...formatOptions,
|
|
223014
|
+
minValueLength: formatOptions.minValueLength + formatOptions.fractionDigits
|
|
223015
|
+
});
|
|
223016
|
+
const reserver = this.widerReserver(
|
|
223017
|
+
config.spaceReserver,
|
|
223018
|
+
this.reserverText
|
|
223019
|
+
);
|
|
223020
|
+
const block = b`
|
|
223021
|
+
<div
|
|
223022
|
+
class=${e$1({
|
|
223023
|
+
block: true,
|
|
223024
|
+
[`block-${config.role}`]: true,
|
|
223025
|
+
"tone-enhanced": config.enhanced,
|
|
223026
|
+
...this.dataQualityClasses(config.dataQuality),
|
|
223027
|
+
...config.extraClasses ?? {}
|
|
223028
|
+
})}
|
|
223029
|
+
part="block block-${config.role}"
|
|
222560
223030
|
>
|
|
222561
|
-
|
|
222562
|
-
|
|
223031
|
+
${this.renderIcon(config.role)}
|
|
223032
|
+
<span class="block-content">
|
|
223033
|
+
<obc-textbox
|
|
223034
|
+
class="block-text"
|
|
223035
|
+
.size=${config.size}
|
|
223036
|
+
.fontWeight=${config.weight}
|
|
223037
|
+
.tabularNums=${true}
|
|
223038
|
+
>
|
|
223039
|
+
${hinted ? b`<span class="hinted-zero" aria-hidden="true"
|
|
223040
|
+
>${hinted}</span
|
|
223041
|
+
>` : A}${text}
|
|
223042
|
+
${reserver ? b`<span slot="length">${reserver}</span>` : A}
|
|
223043
|
+
</obc-textbox>
|
|
223044
|
+
${config.hasDegree ? this.renderDegreeGlyph(config.size, { inherit: true }) : A}
|
|
223045
|
+
</span>
|
|
223046
|
+
</div>
|
|
222563
223047
|
`;
|
|
223048
|
+
return wrapWithAlertFrame(config.alert ?? false, block);
|
|
222564
223049
|
}
|
|
222565
|
-
|
|
223050
|
+
/**
|
|
223051
|
+
* A cap-height `°` column whose width scales with the value size. Used after
|
|
223052
|
+
* the value (as the value↔unit boundary, via {@link renderValueUnitGap}) and
|
|
223053
|
+
* inside the setpoint / advice blocks. `inherit` makes the glyph take the
|
|
223054
|
+
* surrounding block's colour (setpoint/advice); otherwise it uses the value
|
|
223055
|
+
* colour, optionally `enhanced`.
|
|
223056
|
+
*/
|
|
223057
|
+
renderDegreeGlyph(size, opts = {}) {
|
|
222566
223058
|
return b`
|
|
222567
|
-
<
|
|
222568
|
-
|
|
222569
|
-
|
|
222570
|
-
|
|
222571
|
-
|
|
222572
|
-
|
|
222573
|
-
|
|
222574
|
-
|
|
222575
|
-
.hugContent=${true}
|
|
222576
|
-
.value=${this.value}
|
|
222577
|
-
.showZeroPadding=${this.showZeroPadding}
|
|
222578
|
-
.fractionDigits=${this.fractionDigits}
|
|
222579
|
-
.minValueLength=${this.minValueLength}
|
|
222580
|
-
.hasHintedZeros=${this.hasHintedZeros}
|
|
222581
|
-
.hasDegree=${this.hasDegree}
|
|
223059
|
+
<span
|
|
223060
|
+
class=${e$1({
|
|
223061
|
+
"degree-column": true,
|
|
223062
|
+
[`degree-${size}`]: true,
|
|
223063
|
+
"tone-enhanced": !opts.inherit && Boolean(opts.enhanced),
|
|
223064
|
+
"degree-inherit": Boolean(opts.inherit)
|
|
223065
|
+
})}
|
|
223066
|
+
part="degree"
|
|
222582
223067
|
>
|
|
222583
|
-
|
|
222584
|
-
|
|
223068
|
+
<obc-textbox class="degree-glyph" .size=${size} alignment="center"
|
|
223069
|
+
>°</obc-textbox
|
|
223070
|
+
>
|
|
223071
|
+
</span>
|
|
222585
223072
|
`;
|
|
222586
223073
|
}
|
|
222587
|
-
|
|
223074
|
+
/**
|
|
223075
|
+
* The gap rendered between the value digits and the unit.
|
|
223076
|
+
*
|
|
223077
|
+
* - `hasDegree`: a cap-height `°` column whose width scales with the value
|
|
223078
|
+
* size (the `°` replaces the default gap).
|
|
223079
|
+
* - otherwise: the default 2px gap (only when a trailing unit follows).
|
|
223080
|
+
*
|
|
223081
|
+
* `hasDegreeSpacer` deliberately does NOT add anything here — it keeps the 2px
|
|
223082
|
+
* gap and instead widens the unit column via {@link renderDegreeSpacer} (a
|
|
223083
|
+
* spacer AFTER the unit). That way a non-degree row's value digits stay
|
|
223084
|
+
* aligned with degree rows (degree column width = spacer width + 2px gap)
|
|
223085
|
+
* while its unit shifts left. Mirrors Figma `1:2920` (spacer) / `1:2970`
|
|
223086
|
+
* (degree).
|
|
223087
|
+
*
|
|
223088
|
+
* TODO(designer): cross-size alignment is deferred. Degree rows of different
|
|
223089
|
+
* value sizes have different `°` column widths (6/8/12px), so their value digit
|
|
223090
|
+
* edges stagger by `degree-width`. For degree rows of mixed sizes you cannot
|
|
223091
|
+
* align the value digit edges AND keep the unit column aligned — resolving it
|
|
223092
|
+
* needs a design decision (a constant degree reserve, which widens the smaller
|
|
223093
|
+
* rows' `°`, OR pinning the value edge and letting the unit column stagger).
|
|
223094
|
+
*/
|
|
223095
|
+
renderValueUnitGap() {
|
|
223096
|
+
if (!this.hasValue) {
|
|
223097
|
+
return A;
|
|
223098
|
+
}
|
|
223099
|
+
const hasTrailingUnit = Boolean(this.unit) && this.resolvedStacking !== "leading-unit";
|
|
223100
|
+
if ((this.hasDegree ?? false) && !this.off) {
|
|
223101
|
+
return this.renderDegreeGlyph(this.valueSize, {
|
|
223102
|
+
enhanced: this.rowEnhanced
|
|
223103
|
+
});
|
|
223104
|
+
}
|
|
223105
|
+
if (hasTrailingUnit) {
|
|
223106
|
+
return b`<span class="value-unit-gap" aria-hidden="true"></span>`;
|
|
223107
|
+
}
|
|
223108
|
+
return A;
|
|
223109
|
+
}
|
|
223110
|
+
/**
|
|
223111
|
+
* A spacer rendered AFTER the unit when `hasDegreeSpacer` is set on a
|
|
223112
|
+
* non-degree row. Its width (`degree-compensation-padding`) = the degree
|
|
223113
|
+
* column width minus the 2px gap, so the row's value digits align with degree
|
|
223114
|
+
* rows in the same column while its unit shifts left. See
|
|
223115
|
+
* {@link renderValueUnitGap}.
|
|
223116
|
+
*/
|
|
223117
|
+
renderDegreeSpacer() {
|
|
223118
|
+
const hasDegree = this.hasDegree ?? false;
|
|
223119
|
+
const hasDegreeSpacer = this.hasDegreeSpacer ?? false;
|
|
223120
|
+
if (hasDegree || !hasDegreeSpacer) {
|
|
223121
|
+
return A;
|
|
223122
|
+
}
|
|
223123
|
+
return b`<span
|
|
223124
|
+
class="degree-spacer"
|
|
223125
|
+
part="degree-spacer"
|
|
223126
|
+
aria-hidden="true"
|
|
223127
|
+
></span>`;
|
|
223128
|
+
}
|
|
223129
|
+
renderTextbox(role, text, reserver, state2) {
|
|
223130
|
+
const weight = role === "label" ? ObcTextboxFontWeight.semibold : ObcTextboxFontWeight.regular;
|
|
223131
|
+
const box = b`
|
|
223132
|
+
<obc-textbox
|
|
223133
|
+
class=${e$1({
|
|
223134
|
+
[role]: true,
|
|
223135
|
+
...this.dataQualityClasses(state2?.dataQuality)
|
|
223136
|
+
})}
|
|
223137
|
+
part=${role}
|
|
223138
|
+
.size=${ObcTextboxSize.xs}
|
|
223139
|
+
.fontWeight=${weight}
|
|
223140
|
+
alignment="left"
|
|
223141
|
+
>
|
|
223142
|
+
${text}
|
|
223143
|
+
${reserver ? b`<span slot="length">${reserver}</span>` : A}
|
|
223144
|
+
</obc-textbox>
|
|
223145
|
+
`;
|
|
223146
|
+
return wrapWithAlertFrame(state2?.alert ?? false, box);
|
|
223147
|
+
}
|
|
223148
|
+
renderValueCluster() {
|
|
223149
|
+
const popUpAtSetpoint = this.isPopUp && this.isAtSetpoint && !this.setpointTouching;
|
|
223150
|
+
const setpointExtraClasses = {
|
|
223151
|
+
"is-hiding": popUpAtSetpoint && this.deferredSetpointHidePhase === "hiding",
|
|
223152
|
+
"is-hidden": popUpAtSetpoint && this.deferredSetpointHidePhase === "hidden",
|
|
223153
|
+
touching: this.setpointTouching
|
|
223154
|
+
};
|
|
222588
223155
|
return b`
|
|
222589
|
-
<div class="value-
|
|
222590
|
-
${this.
|
|
222591
|
-
|
|
222592
|
-
|
|
223156
|
+
<div class="value-cluster" part="value-cluster">
|
|
223157
|
+
${this.hasAdvice ? this.renderBlock({
|
|
223158
|
+
role: "advice",
|
|
223159
|
+
value: this.advice,
|
|
223160
|
+
size: this.secondarySize,
|
|
223161
|
+
enhanced: false,
|
|
223162
|
+
weight: ObcTextboxFontWeight.regular,
|
|
223163
|
+
hintedZeros: this.adviceOptions?.hintedZeros ?? false,
|
|
223164
|
+
spaceReserver: this.adviceOptions?.spaceReserver,
|
|
223165
|
+
hasDegree: this.hasDegree ?? false,
|
|
223166
|
+
dataQuality: this.adviceOptions?.dataQuality,
|
|
223167
|
+
alert: this.adviceOptions?.alert
|
|
223168
|
+
}) : A}
|
|
223169
|
+
${this.hasSetpoint ? this.renderBlock({
|
|
223170
|
+
role: "setpoint",
|
|
223171
|
+
value: this.setpoint,
|
|
223172
|
+
size: this.setpointSize,
|
|
223173
|
+
// Value and setpoint share the enhanced colour state (both neutral
|
|
223174
|
+
// or both enhanced); the setpoint is bold only while emphasised.
|
|
223175
|
+
enhanced: this.rowEnhanced,
|
|
223176
|
+
weight: this.setpointWeight,
|
|
223177
|
+
hintedZeros: this.setpointOptions?.hintedZeros ?? false,
|
|
223178
|
+
spaceReserver: this.setpointOptions?.spaceReserver,
|
|
223179
|
+
hasDegree: this.hasDegree ?? false,
|
|
223180
|
+
extraClasses: setpointExtraClasses,
|
|
223181
|
+
dataQuality: this.setpointOptions?.dataQuality,
|
|
223182
|
+
alert: this.setpointOptions?.alert
|
|
223183
|
+
}) : A}
|
|
223184
|
+
${this.hasValue ? this.renderBlock({
|
|
223185
|
+
role: "value",
|
|
223186
|
+
value: this.value,
|
|
223187
|
+
size: this.valueSize,
|
|
223188
|
+
enhanced: this.rowEnhanced,
|
|
223189
|
+
weight: this.valueWeight,
|
|
223190
|
+
hintedZeros: this.valueOptions?.hintedZeros ?? false,
|
|
223191
|
+
spaceReserver: this.valueOptions?.spaceReserver,
|
|
223192
|
+
off: this.off,
|
|
223193
|
+
dataQuality: this.valueOptions?.dataQuality,
|
|
223194
|
+
alert: this.valueOptions?.alert
|
|
223195
|
+
}) : A}
|
|
223196
|
+
</div>
|
|
223197
|
+
`;
|
|
223198
|
+
}
|
|
223199
|
+
renderLabelContainer() {
|
|
223200
|
+
const stacking = this.resolvedStacking;
|
|
223201
|
+
const showLeadingUnit = stacking === "leading-unit" && Boolean(this.unit);
|
|
223202
|
+
const showLeadingSrc = stacking === "leading-src" && Boolean(this.src);
|
|
223203
|
+
return b`
|
|
223204
|
+
<div class="label-container" part="label-container">
|
|
223205
|
+
${this.hasLeadingIcon ? b`<span class="leading-icon" aria-hidden="true"
|
|
223206
|
+
><slot name="leading-icon"></slot
|
|
223207
|
+
></span>` : A}
|
|
223208
|
+
<div class="label-stack" part="label-stack">
|
|
223209
|
+
${this.label ? this.renderTextbox("label", this.label) : A}
|
|
223210
|
+
${showLeadingUnit ? this.renderTextbox(
|
|
223211
|
+
"unit",
|
|
223212
|
+
this.unit ?? "",
|
|
223213
|
+
this.unitOptions?.spaceReserver
|
|
223214
|
+
) : A}
|
|
223215
|
+
${showLeadingSrc ? this.renderTextbox(
|
|
223216
|
+
"source",
|
|
223217
|
+
this.src ?? "",
|
|
223218
|
+
this.srcOptions?.spaceReserver,
|
|
223219
|
+
this.srcOptions
|
|
223220
|
+
) : A}
|
|
223221
|
+
</div>
|
|
222593
223222
|
</div>
|
|
222594
223223
|
`;
|
|
222595
223224
|
}
|
|
222596
223225
|
renderTrailingUnit() {
|
|
222597
|
-
if (
|
|
223226
|
+
if (this.resolvedStacking === "leading-unit" || !this.unit) {
|
|
222598
223227
|
return A;
|
|
222599
223228
|
}
|
|
222600
|
-
return
|
|
222601
|
-
|
|
222602
|
-
|
|
223229
|
+
return this.renderTextbox(
|
|
223230
|
+
"unit",
|
|
223231
|
+
this.unit,
|
|
223232
|
+
this.unitOptions?.spaceReserver
|
|
223233
|
+
);
|
|
222603
223234
|
}
|
|
222604
223235
|
renderTrailingSource() {
|
|
222605
|
-
if (!this.
|
|
223236
|
+
if (this.resolvedStacking === "leading-src" || !this.src) {
|
|
222606
223237
|
return A;
|
|
222607
223238
|
}
|
|
222608
223239
|
return b`
|
|
222609
223240
|
<div class="divider" part="divider" aria-hidden="true"></div>
|
|
222610
|
-
|
|
222611
|
-
|
|
222612
|
-
|
|
223241
|
+
${this.renderTextbox(
|
|
223242
|
+
"source",
|
|
223243
|
+
this.src,
|
|
223244
|
+
this.srcOptions?.spaceReserver,
|
|
223245
|
+
this.srcOptions
|
|
223246
|
+
)}
|
|
222613
223247
|
`;
|
|
222614
223248
|
}
|
|
222615
|
-
|
|
222616
|
-
return
|
|
222617
|
-
|
|
222618
|
-
|
|
222619
|
-
<div
|
|
222620
|
-
|
|
222621
|
-
|
|
222622
|
-
|
|
222623
|
-
[`stacking-${this.stacking}`]: true,
|
|
222624
|
-
"priority-enhanced": this.priority === "enhanced",
|
|
222625
|
-
"priority-setpoint": this.priority === "setpoint",
|
|
222626
|
-
"priority-setpoint-flip-flop": this.priority === "setpoint-flip-flop",
|
|
222627
|
-
"data-none": this.dataState === "none",
|
|
222628
|
-
"data-low-integrity": this.dataState === "low-integrity",
|
|
222629
|
-
"data-invalid": this.dataState === "invalid",
|
|
222630
|
-
"has-leading-icon": this.hasLeadingIcon,
|
|
222631
|
-
"has-value-icon": this.hasValueIcon
|
|
222632
|
-
})}
|
|
222633
|
-
part="root"
|
|
222634
|
-
>
|
|
222635
|
-
<div class="content" part="content">
|
|
222636
|
-
<div class="label-container" part="label-container">
|
|
222637
|
-
${this.hasLeadingIcon ? b`<span class="leading-icon" aria-hidden="true"
|
|
222638
|
-
><slot name="leading-icon"></slot
|
|
222639
|
-
></span>` : A}
|
|
222640
|
-
${this.renderLabelContainer()}
|
|
222641
|
-
</div>
|
|
222642
|
-
|
|
222643
|
-
${this.labelOnly ? A : b`
|
|
222644
|
-
<div class="value-container" part="value-container">
|
|
222645
|
-
${this.renderValue()} ${this.renderTrailingUnit()}
|
|
222646
|
-
</div>
|
|
222647
|
-
|
|
222648
|
-
${this.renderTrailingSource()}
|
|
222649
|
-
`}
|
|
223249
|
+
renderContent() {
|
|
223250
|
+
return b`
|
|
223251
|
+
<div class="content" part="content">
|
|
223252
|
+
${this.renderLabelContainer()}
|
|
223253
|
+
<div class="value-area" part="value-area">
|
|
223254
|
+
${this.renderValueCluster()} ${this.renderValueUnitGap()}
|
|
223255
|
+
<div class="unit-area" part="unit-area">
|
|
223256
|
+
${this.renderTrailingUnit()} ${this.renderDegreeSpacer()}
|
|
222650
223257
|
</div>
|
|
222651
223258
|
</div>
|
|
222652
|
-
|
|
222653
|
-
|
|
222654
|
-
|
|
223259
|
+
${this.renderTrailingSource()}
|
|
223260
|
+
</div>
|
|
223261
|
+
`;
|
|
223262
|
+
}
|
|
223263
|
+
updated(changed) {
|
|
223264
|
+
super.updated(changed);
|
|
223265
|
+
const firstUpdate = !this.hasCompletedFirstUpdate;
|
|
223266
|
+
this.hasCompletedFirstUpdate = true;
|
|
223267
|
+
if (!this.isPopUp || this.setpointTouching) {
|
|
223268
|
+
this.clearDeferredSetpointHide();
|
|
223269
|
+
return;
|
|
223270
|
+
}
|
|
223271
|
+
const shouldHide = this.hasSetpoint && this.isAtSetpoint;
|
|
223272
|
+
if (firstUpdate) {
|
|
223273
|
+
this.deferredSetpointHidePhase = shouldHide ? "hidden" : "none";
|
|
223274
|
+
return;
|
|
223275
|
+
}
|
|
223276
|
+
if (!shouldHide) {
|
|
223277
|
+
this.clearDeferredSetpointHide();
|
|
223278
|
+
return;
|
|
223279
|
+
}
|
|
223280
|
+
if (this.deferredSetpointHidePhase !== "none") {
|
|
223281
|
+
return;
|
|
223282
|
+
}
|
|
223283
|
+
this.deferredSetpointHidePhase = "hiding";
|
|
223284
|
+
window.clearTimeout(this.deferredSetpointHideTimer);
|
|
223285
|
+
this.deferredSetpointHideTimer = window.setTimeout(() => {
|
|
223286
|
+
this.deferredSetpointHidePhase = "hidden";
|
|
223287
|
+
this.deferredSetpointHideTimer = void 0;
|
|
223288
|
+
}, 100);
|
|
223289
|
+
}
|
|
223290
|
+
clearDeferredSetpointHide() {
|
|
223291
|
+
if (this.deferredSetpointHidePhase !== "none") {
|
|
223292
|
+
this.deferredSetpointHidePhase = "none";
|
|
223293
|
+
}
|
|
223294
|
+
window.clearTimeout(this.deferredSetpointHideTimer);
|
|
223295
|
+
this.deferredSetpointHideTimer = void 0;
|
|
223296
|
+
}
|
|
223297
|
+
disconnectedCallback() {
|
|
223298
|
+
window.clearTimeout(this.deferredSetpointHideTimer);
|
|
223299
|
+
this.deferredSetpointHideTimer = void 0;
|
|
223300
|
+
if (this.deferredSetpointHidePhase === "hiding") {
|
|
223301
|
+
this.deferredSetpointHidePhase = "hidden";
|
|
223302
|
+
}
|
|
223303
|
+
super.disconnectedCallback();
|
|
223304
|
+
}
|
|
223305
|
+
render() {
|
|
223306
|
+
const clickable = this.resolvedClickable;
|
|
223307
|
+
const dataQuality = this.dataQuality;
|
|
223308
|
+
const classes = e$1({
|
|
223309
|
+
root: true,
|
|
223310
|
+
[`size-${this.resolvedSize}`]: true,
|
|
223311
|
+
[`stacking-${this.resolvedStacking}`]: true,
|
|
223312
|
+
[`priority-${this.resolvedPriority}`]: true,
|
|
223313
|
+
"data-low-integrity": dataQuality === "low-integrity",
|
|
223314
|
+
"data-invalid": dataQuality === "invalid",
|
|
223315
|
+
"flip-flop": this.isFlipFlop,
|
|
223316
|
+
clickable: Boolean(clickable),
|
|
223317
|
+
[`border-${clickable ? clickable.border : "squared"}`]: Boolean(clickable)
|
|
223318
|
+
});
|
|
223319
|
+
const surface = b`<div class="surface" part="surface">
|
|
223320
|
+
${this.renderContent()}
|
|
223321
|
+
</div>`;
|
|
223322
|
+
const root = clickable ? b`<button class=${classes} part="root" type="button">
|
|
223323
|
+
${surface}
|
|
223324
|
+
</button>` : b`<div class=${classes} part="root">${surface}</div>`;
|
|
223325
|
+
const alert = this.alert === true ? {} : this.alert;
|
|
223326
|
+
return wrapWithAlertFrame(alert, root, true);
|
|
222655
223327
|
}
|
|
222656
223328
|
};
|
|
222657
223329
|
ObcReadoutListItem.styles = r$7(componentStyle$4);
|
|
222658
|
-
__decorateClass$f([
|
|
222659
|
-
n$3({ type: String })
|
|
222660
|
-
], ObcReadoutListItem.prototype, "size", 2);
|
|
222661
|
-
__decorateClass$f([
|
|
222662
|
-
n$3({ type: String })
|
|
222663
|
-
], ObcReadoutListItem.prototype, "stacking", 2);
|
|
222664
|
-
__decorateClass$f([
|
|
222665
|
-
n$3({ type: String })
|
|
222666
|
-
], ObcReadoutListItem.prototype, "priority", 2);
|
|
222667
|
-
__decorateClass$f([
|
|
222668
|
-
n$3({ type: String })
|
|
222669
|
-
], ObcReadoutListItem.prototype, "dataState", 2);
|
|
222670
|
-
__decorateClass$f([
|
|
222671
|
-
n$3({ type: Object })
|
|
222672
|
-
], ObcReadoutListItem.prototype, "alert", 2);
|
|
222673
223330
|
__decorateClass$f([
|
|
222674
223331
|
n$3({ type: String })
|
|
222675
223332
|
], ObcReadoutListItem.prototype, "label", 2);
|
|
@@ -222679,48 +223336,78 @@ __decorateClass$f([
|
|
|
222679
223336
|
__decorateClass$f([
|
|
222680
223337
|
n$3({ type: String })
|
|
222681
223338
|
], ObcReadoutListItem.prototype, "src", 2);
|
|
223339
|
+
__decorateClass$f([
|
|
223340
|
+
n$3({ type: Boolean, attribute: false })
|
|
223341
|
+
], ObcReadoutListItem.prototype, "hasValue", 2);
|
|
222682
223342
|
__decorateClass$f([
|
|
222683
223343
|
n$3({ type: Number })
|
|
222684
223344
|
], ObcReadoutListItem.prototype, "value", 2);
|
|
222685
223345
|
__decorateClass$f([
|
|
222686
|
-
n$3({ type:
|
|
222687
|
-
], ObcReadoutListItem.prototype, "
|
|
223346
|
+
n$3({ type: Boolean })
|
|
223347
|
+
], ObcReadoutListItem.prototype, "off", 2);
|
|
222688
223348
|
__decorateClass$f([
|
|
222689
223349
|
n$3({ type: Boolean })
|
|
222690
223350
|
], ObcReadoutListItem.prototype, "hasSetpoint", 2);
|
|
222691
223351
|
__decorateClass$f([
|
|
222692
|
-
n$3({ type:
|
|
222693
|
-
], ObcReadoutListItem.prototype, "
|
|
223352
|
+
n$3({ type: Number })
|
|
223353
|
+
], ObcReadoutListItem.prototype, "setpoint", 2);
|
|
222694
223354
|
__decorateClass$f([
|
|
222695
223355
|
n$3({ type: Boolean })
|
|
222696
|
-
], ObcReadoutListItem.prototype, "
|
|
223356
|
+
], ObcReadoutListItem.prototype, "hasAdvice", 2);
|
|
222697
223357
|
__decorateClass$f([
|
|
222698
|
-
n$3({ type:
|
|
222699
|
-
], ObcReadoutListItem.prototype, "
|
|
223358
|
+
n$3({ type: Number })
|
|
223359
|
+
], ObcReadoutListItem.prototype, "advice", 2);
|
|
222700
223360
|
__decorateClass$f([
|
|
222701
|
-
n$3({ type:
|
|
222702
|
-
], ObcReadoutListItem.prototype, "
|
|
223361
|
+
n$3({ type: String })
|
|
223362
|
+
], ObcReadoutListItem.prototype, "size", 2);
|
|
223363
|
+
__decorateClass$f([
|
|
223364
|
+
n$3({ type: String })
|
|
223365
|
+
], ObcReadoutListItem.prototype, "priority", 2);
|
|
223366
|
+
__decorateClass$f([
|
|
223367
|
+
n$3({ type: String })
|
|
223368
|
+
], ObcReadoutListItem.prototype, "stacking", 2);
|
|
223369
|
+
__decorateClass$f([
|
|
223370
|
+
n$3({ type: Object })
|
|
223371
|
+
], ObcReadoutListItem.prototype, "clickable", 2);
|
|
222703
223372
|
__decorateClass$f([
|
|
222704
223373
|
n$3({ type: Boolean })
|
|
222705
223374
|
], ObcReadoutListItem.prototype, "hasLeadingIcon", 2);
|
|
222706
223375
|
__decorateClass$f([
|
|
222707
223376
|
n$3({ type: Boolean })
|
|
222708
|
-
], ObcReadoutListItem.prototype, "
|
|
223377
|
+
], ObcReadoutListItem.prototype, "hasDegree", 2);
|
|
223378
|
+
__decorateClass$f([
|
|
223379
|
+
n$3({ type: Boolean })
|
|
223380
|
+
], ObcReadoutListItem.prototype, "hasDegreeSpacer", 2);
|
|
222709
223381
|
__decorateClass$f([
|
|
222710
223382
|
n$3({ type: Number })
|
|
222711
223383
|
], ObcReadoutListItem.prototype, "fractionDigits", 2);
|
|
222712
|
-
__decorateClass$f([
|
|
222713
|
-
n$3({ type: Boolean })
|
|
222714
|
-
], ObcReadoutListItem.prototype, "showZeroPadding", 2);
|
|
222715
223384
|
__decorateClass$f([
|
|
222716
223385
|
n$3({ type: Number })
|
|
222717
|
-
], ObcReadoutListItem.prototype, "
|
|
223386
|
+
], ObcReadoutListItem.prototype, "maxDigits", 2);
|
|
222718
223387
|
__decorateClass$f([
|
|
222719
|
-
n$3({ type:
|
|
222720
|
-
], ObcReadoutListItem.prototype, "
|
|
223388
|
+
n$3({ type: String })
|
|
223389
|
+
], ObcReadoutListItem.prototype, "dataQuality", 2);
|
|
222721
223390
|
__decorateClass$f([
|
|
222722
|
-
n$3({ type:
|
|
222723
|
-
], ObcReadoutListItem.prototype, "
|
|
223391
|
+
n$3({ type: Object })
|
|
223392
|
+
], ObcReadoutListItem.prototype, "alert", 2);
|
|
223393
|
+
__decorateClass$f([
|
|
223394
|
+
n$3({ type: Object })
|
|
223395
|
+
], ObcReadoutListItem.prototype, "valueOptions", 2);
|
|
223396
|
+
__decorateClass$f([
|
|
223397
|
+
n$3({ type: Object })
|
|
223398
|
+
], ObcReadoutListItem.prototype, "setpointOptions", 2);
|
|
223399
|
+
__decorateClass$f([
|
|
223400
|
+
n$3({ type: Object })
|
|
223401
|
+
], ObcReadoutListItem.prototype, "adviceOptions", 2);
|
|
223402
|
+
__decorateClass$f([
|
|
223403
|
+
n$3({ type: Object })
|
|
223404
|
+
], ObcReadoutListItem.prototype, "unitOptions", 2);
|
|
223405
|
+
__decorateClass$f([
|
|
223406
|
+
n$3({ type: Object })
|
|
223407
|
+
], ObcReadoutListItem.prototype, "srcOptions", 2);
|
|
223408
|
+
__decorateClass$f([
|
|
223409
|
+
r$3()
|
|
223410
|
+
], ObcReadoutListItem.prototype, "deferredSetpointHidePhase", 2);
|
|
222724
223411
|
ObcReadoutListItem = __decorateClass$f([
|
|
222725
223412
|
customElement("obc-readout-list-item")
|
|
222726
223413
|
], ObcReadoutListItem);
|