@oicl/openbridge-webcomponents 2.0.0-next.89 → 2.0.0-next.90
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 +157 -10
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +22 -0
- package/dist/navigation-instruments/readout-list/readout-list.css.js +5 -3
- package/dist/navigation-instruments/readout-list/readout-list.css.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +80 -0
- 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 +32 -0
- 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 +74 -8
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
- package/package.json +1 -1
|
@@ -222992,6 +222992,86 @@ obc-readout-block {
|
|
|
222992
222992
|
align-items: flex-end;
|
|
222993
222993
|
}
|
|
222994
222994
|
|
|
222995
|
+
/* ---------- Value reading (value + degree + unit) ----------
|
|
222996
|
+
* Groups the value block, its degree column and the trailing unit so the value
|
|
222997
|
+
* alert frame can wrap all three. Layout-neutral: it adds no gap, so the content
|
|
222998
|
+
* sits exactly where it did when these were siblings of \`.value-area\`. */
|
|
222999
|
+
|
|
223000
|
+
.value-reading {
|
|
223001
|
+
position: relative;
|
|
223002
|
+
display: inline-flex;
|
|
223003
|
+
align-items: flex-end;
|
|
223004
|
+
}
|
|
223005
|
+
|
|
223006
|
+
/* ---------- Value data quality (low-integrity / invalid) ----------
|
|
223007
|
+
* The value's per-block data-quality chip, applied to the whole reading (value +
|
|
223008
|
+
* degree + unit) rather than hugging the value alone — the same logic as the
|
|
223009
|
+
* value alert frame, minus its custom padding. Same look as the block/source
|
|
223010
|
+
* chip (1px outline, check radius, alert-quality colours). Uses \`outline\` (not
|
|
223011
|
+
* \`border\`) so it never shifts the value's width / cross-row column alignment.
|
|
223012
|
+
* Setpoint/advice keep their own in-block chip; the row-level data quality on
|
|
223013
|
+
* \`.surface\` is unchanged. */
|
|
223014
|
+
|
|
223015
|
+
.value-reading.data-low-integrity,
|
|
223016
|
+
.value-reading.data-invalid {
|
|
223017
|
+
outline: 1px solid;
|
|
223018
|
+
border-radius: var(--global-border-radius-border-radius-check);
|
|
223019
|
+
}
|
|
223020
|
+
|
|
223021
|
+
.value-reading.data-low-integrity {
|
|
223022
|
+
background: var(--alert-low-integrity-background-color);
|
|
223023
|
+
outline-color: var(--alert-low-integrity-border-color);
|
|
223024
|
+
}
|
|
223025
|
+
|
|
223026
|
+
.value-reading.data-invalid {
|
|
223027
|
+
background: var(--alert-invalid-background-color);
|
|
223028
|
+
outline-color: var(--alert-invalid-border-color);
|
|
223029
|
+
}
|
|
223030
|
+
|
|
223031
|
+
/* ---------- Value alert overlay ----------
|
|
223032
|
+
* A pure overlay around the value reading: it reserves no space, so toggling the
|
|
223033
|
+
* frame never changes the row height or breaks cross-row column alignment. The
|
|
223034
|
+
* box is offset outward by (padding − stroke/2) on each axis so the alert-frame's
|
|
223035
|
+
* outline (drawn outside its box) lands CENTRED on the 4px/2px padding line
|
|
223036
|
+
* (half inside / half outside), matching Figma 58:10120. */
|
|
223037
|
+
|
|
223038
|
+
.value-alert-overlay {
|
|
223039
|
+
--_obc-readout-value-frame-padding-horizontal: 4px;
|
|
223040
|
+
--_obc-readout-value-frame-padding-vertical: 2px;
|
|
223041
|
+
/* Must match obc-alert-frame's ACTUAL outline width so the stroke stays centred
|
|
223042
|
+
on the 4px/2px line. \`thickness-small\` is hard-coded to 2px in
|
|
223043
|
+
alert-frame.css (it does NOT use the themed stroke-width token), so use a
|
|
223044
|
+
literal 2px here; \`thickness-large\` is handled below. */
|
|
223045
|
+
--_obc-readout-value-frame-stroke: 2px;
|
|
223046
|
+
position: absolute;
|
|
223047
|
+
inset-inline: calc(
|
|
223048
|
+
-1 *
|
|
223049
|
+
(
|
|
223050
|
+
var(--_obc-readout-value-frame-padding-horizontal) -
|
|
223051
|
+
var(--_obc-readout-value-frame-stroke) / 2
|
|
223052
|
+
)
|
|
223053
|
+
);
|
|
223054
|
+
inset-block: calc(
|
|
223055
|
+
-1 *
|
|
223056
|
+
(
|
|
223057
|
+
var(--_obc-readout-value-frame-padding-vertical) -
|
|
223058
|
+
var(--_obc-readout-value-frame-stroke) / 2
|
|
223059
|
+
)
|
|
223060
|
+
);
|
|
223061
|
+
/* Display-only: never intercept clicks on a clickable row. */
|
|
223062
|
+
pointer-events: none;
|
|
223063
|
+
}
|
|
223064
|
+
|
|
223065
|
+
/* thickness=large: obc-alert-frame's large outline uses the alert-frame border
|
|
223066
|
+
weight token, so the overlay's outward offset must use the same width to keep
|
|
223067
|
+
the stroke centred on the padding line. */
|
|
223068
|
+
|
|
223069
|
+
.value-alert-overlay.thickness-large {
|
|
223070
|
+
--_obc-readout-value-frame-stroke: var(
|
|
223071
|
+
--global-size-spacing-border-weight-alertframe
|
|
223072
|
+
);
|
|
223073
|
+
}
|
|
223074
|
+
|
|
222995
223075
|
/* The readout building blocks (advice / setpoint / value) now render inside
|
|
222996
223076
|
\`obc-readout-block\`; their layout / colour / hinted-zero / data-quality CSS
|
|
222997
223077
|
lives there. The list-item only bridges the public colour vars (see top) and
|
|
@@ -223637,6 +223717,33 @@ let ObcReadoutListItem = class extends i$4 {
|
|
|
223637
223717
|
dataQuality: this.setpointOptions?.dataQuality,
|
|
223638
223718
|
alert: this.setpointOptions?.alert
|
|
223639
223719
|
}) : A}
|
|
223720
|
+
${this.renderValueReading()}
|
|
223721
|
+
</div>
|
|
223722
|
+
`;
|
|
223723
|
+
}
|
|
223724
|
+
/**
|
|
223725
|
+
* The value reading: the value block, its degree column and the trailing unit
|
|
223726
|
+
* grouped in one relatively-positioned wrapper so the value alert frame AND the
|
|
223727
|
+
* value data-quality chip can wrap value + degree + unit together (Figma
|
|
223728
|
+
* 58:10120).
|
|
223729
|
+
*
|
|
223730
|
+
* Moving the degree / unit into this wrapper (the new last child of
|
|
223731
|
+
* `.value-cluster`) preserves every existing gap, so the underlying content
|
|
223732
|
+
* stays column-aligned with or without the frame / chip. Both the value alert
|
|
223733
|
+
* (overlay) and the value data-quality chip are applied here — NOT inside
|
|
223734
|
+
* `obc-readout-block` — so they extend over the unit; setpoint/advice keep their
|
|
223735
|
+
* own block-level frame and chip. The chip uses `outline` (not `border`), so it
|
|
223736
|
+
* never shifts the value's width / column alignment.
|
|
223737
|
+
*/
|
|
223738
|
+
renderValueReading() {
|
|
223739
|
+
return b`
|
|
223740
|
+
<div
|
|
223741
|
+
class=${e$1({
|
|
223742
|
+
"value-reading": true,
|
|
223743
|
+
...this.dataQualityClasses(this.valueOptions?.dataQuality)
|
|
223744
|
+
})}
|
|
223745
|
+
part="value-reading"
|
|
223746
|
+
>
|
|
223640
223747
|
${this.hasValue ? this.renderBlock({
|
|
223641
223748
|
variant: ReadoutBlockVariant.value,
|
|
223642
223749
|
value: this.value,
|
|
@@ -223646,10 +223753,51 @@ let ObcReadoutListItem = class extends i$4 {
|
|
|
223646
223753
|
hintedZeros: this.valueOptions?.hintedZeros ?? false,
|
|
223647
223754
|
spaceReserver: this.valueOptions?.spaceReserver,
|
|
223648
223755
|
off: this.off,
|
|
223649
|
-
hasIcon: this.valueOptions?.hasIcon ?? false
|
|
223650
|
-
dataQuality: this.valueOptions?.dataQuality,
|
|
223651
|
-
alert: this.valueOptions?.alert
|
|
223756
|
+
hasIcon: this.valueOptions?.hasIcon ?? false
|
|
223652
223757
|
}) : A}
|
|
223758
|
+
${this.renderValueUnitGap()}
|
|
223759
|
+
<div class="unit-area" part="unit-area">
|
|
223760
|
+
${this.renderTrailingUnit()} ${this.renderDegreeSpacer()}
|
|
223761
|
+
</div>
|
|
223762
|
+
${this.renderValueAlertOverlay()}
|
|
223763
|
+
</div>
|
|
223764
|
+
`;
|
|
223765
|
+
}
|
|
223766
|
+
/**
|
|
223767
|
+
* The value alert frame, drawn as a pure overlay around the value reading
|
|
223768
|
+
* (value + degree + unit). It reserves no space — the `obc-alert-frame` sits in
|
|
223769
|
+
* an absolutely-positioned box offset outward (see `.value-alert-overlay` in
|
|
223770
|
+
* the CSS) so its stroke is centred on the 4px/2px padding line and toggling it
|
|
223771
|
+
* never shifts content or row height. Renders only when `valueOptions.alert` is
|
|
223772
|
+
* a config object.
|
|
223773
|
+
*/
|
|
223774
|
+
renderValueAlertOverlay() {
|
|
223775
|
+
const alert = this.valueOptions?.alert;
|
|
223776
|
+
if (typeof alert !== "object" || alert === null) {
|
|
223777
|
+
return A;
|
|
223778
|
+
}
|
|
223779
|
+
const thickness = alert.thickness ?? ObcAlertFrameThickness.Small;
|
|
223780
|
+
return b`
|
|
223781
|
+
<div
|
|
223782
|
+
class=${e$1({
|
|
223783
|
+
"value-alert-overlay": true,
|
|
223784
|
+
// The outward offset is thickness-dependent (see the CSS): large frames
|
|
223785
|
+
// draw a wider outline, so the box must sit further out to stay centred.
|
|
223786
|
+
"thickness-large": thickness === ObcAlertFrameThickness.Large
|
|
223787
|
+
})}
|
|
223788
|
+
aria-hidden="true"
|
|
223789
|
+
>
|
|
223790
|
+
<obc-alert-frame
|
|
223791
|
+
part="value-alert-frame"
|
|
223792
|
+
.type=${alert.type ?? ObcAlertFrameType.Regular}
|
|
223793
|
+
.thickness=${thickness}
|
|
223794
|
+
.status=${alert.status ?? AlertType.Alarm}
|
|
223795
|
+
.mode=${alert.mode ?? ObcAlertFrameMode.ackedActive}
|
|
223796
|
+
.showIcon=${alert.showIcon ?? false}
|
|
223797
|
+
.showAlertCategoryIcon=${alert.showAlertCategoryIcon ?? true}
|
|
223798
|
+
.wrapContent=${false}
|
|
223799
|
+
.fullWidth=${false}
|
|
223800
|
+
></obc-alert-frame>
|
|
223653
223801
|
</div>
|
|
223654
223802
|
`;
|
|
223655
223803
|
}
|
|
@@ -223708,10 +223856,7 @@ let ObcReadoutListItem = class extends i$4 {
|
|
|
223708
223856
|
<div class="content" part="content">
|
|
223709
223857
|
${this.renderLabelContainer()}
|
|
223710
223858
|
<div class="value-area" part="value-area">
|
|
223711
|
-
${this.renderValueCluster()}
|
|
223712
|
-
<div class="unit-area" part="unit-area">
|
|
223713
|
-
${this.renderTrailingUnit()} ${this.renderDegreeSpacer()}
|
|
223714
|
-
</div>
|
|
223859
|
+
${this.renderValueCluster()}
|
|
223715
223860
|
</div>
|
|
223716
223861
|
${this.renderTrailingSource()}
|
|
223717
223862
|
</div>
|
|
@@ -223883,13 +224028,15 @@ const componentStyle$4 = i$7`* {
|
|
|
223883
224028
|
width: 100%;
|
|
223884
224029
|
}
|
|
223885
224030
|
|
|
223886
|
-
/* Vertical stack of rows. The
|
|
223887
|
-
|
|
224031
|
+
/* Vertical stack of rows. The 8px default row gap leaves room for a value alert
|
|
224032
|
+
frame, which overhangs ~3px above and below each row — so two stacked rows that
|
|
224033
|
+
both carry an alarm frame never collide. Override via
|
|
224034
|
+
\`--obc-readout-list-row-gap\`. */
|
|
223888
224035
|
|
|
223889
224036
|
.list {
|
|
223890
224037
|
display: flex;
|
|
223891
224038
|
flex-direction: column;
|
|
223892
|
-
gap: var(--obc-readout-list-row-gap,
|
|
224039
|
+
gap: var(--obc-readout-list-row-gap, 8px);
|
|
223893
224040
|
width: 100%;
|
|
223894
224041
|
}
|
|
223895
224042
|
`;
|