@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.142 → 2.0.0-next.144

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +131 -30
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +54 -20
  4. package/dist/components/alert-list-details/alert-list-details.js +2 -2
  5. package/dist/components/alert-list-details/alert-list-details.js.map +1 -1
  6. package/dist/components/app-button/app-button.css.js +56 -0
  7. package/dist/components/app-button/app-button.css.js.map +1 -1
  8. package/dist/integration-systems/integration-app-bar/integration-app-bar.css.js +12 -1
  9. package/dist/integration-systems/integration-app-bar/integration-app-bar.css.js.map +1 -1
  10. package/dist/integration-systems/integration-app-bar/integration-app-bar.d.ts +2 -2
  11. package/dist/integration-systems/integration-app-bar/integration-app-bar.d.ts.map +1 -1
  12. package/dist/integration-systems/integration-app-bar/integration-app-bar.js +1 -21
  13. package/dist/integration-systems/integration-app-bar/integration-app-bar.js.map +1 -1
  14. package/dist/navigation-instruments/readout/readout.d.ts +11 -2
  15. package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
  16. package/dist/navigation-instruments/readout/readout.js +18 -0
  17. package/dist/navigation-instruments/readout/readout.js.map +1 -1
  18. package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +25 -0
  19. package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js.map +1 -1
  20. package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts +20 -4
  21. package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts.map +1 -1
  22. package/dist/navigation-instruments/readout-list-item/readout-list-item.js +18 -6
  23. package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
  24. package/package.json +1 -1
  25. package/src/components/alert-list-details/alert-list-details.ts +2 -2
  26. package/src/components/app-button/app-button.css +2 -0
  27. package/src/components/app-button/app-button.stories.ts +26 -0
  28. package/src/integration-systems/integration-app-bar/integration-app-bar-sizing.stories.ts +130 -0
  29. package/src/integration-systems/integration-app-bar/integration-app-bar.css +11 -1
  30. package/src/integration-systems/integration-app-bar/integration-app-bar.ts +3 -27
  31. package/src/navigation-instruments/readout/readout.stories.ts +57 -4
  32. package/src/navigation-instruments/readout/readout.ts +28 -1
  33. package/src/navigation-instruments/readout-list/readout-list.stories.ts +62 -2
  34. package/src/navigation-instruments/readout-list-item/readout-list-item.css +21 -0
  35. package/src/navigation-instruments/readout-list-item/readout-list-item.stories.ts +56 -3
  36. package/src/navigation-instruments/readout-list-item/readout-list-item.ts +37 -19
@@ -71,12 +71,15 @@ export type ReadoutListItemSize = ReadoutBlockSize;
71
71
  * Placement of the unit/source relative to the label and value.
72
72
  * - `trailing-unit`: unit after the value, source after a trailing divider.
73
73
  * - `leading-unit`: unit beside/under the label.
74
- * - `leading-src`: source beside/under the label (no trailing source).
74
+ * - `leading-src`: source under the label (no trailing source).
75
+ * - `leading-src-inline`: source on the label's line, after it (no trailing
76
+ * source); keeps the row one line high.
75
77
  */
76
78
  export enum ReadoutListItemStacking {
77
79
  trailingUnit = 'trailing-unit',
78
80
  leadingUnit = 'leading-unit',
79
81
  leadingSrc = 'leading-src',
82
+ leadingSrcInline = 'leading-src-inline',
80
83
  }
81
84
 
82
85
  /**
@@ -208,7 +211,12 @@ export interface ReadoutAdviceOptions extends ReadoutBlockState {
208
211
  }
209
212
 
210
213
  export interface ReadoutReserverOptions {
211
- /** Longest expected string to reserve width for (aligns multiple rows), e.g. `"miles"`. */
214
+ /**
215
+ * Longest expected string to reserve width for (aligns multiple rows), e.g.
216
+ * `"miles"`. A row without a unit still renders the reserved (blank)
217
+ * trailing column, so its value and degree stay on the grid of the rows
218
+ * that have one. `leading-unit` stacking has no trailing column to reserve.
219
+ */
212
220
  spaceReserver?: string;
213
221
  }
214
222
 
@@ -273,7 +281,8 @@ export interface ReadoutSrcOptions extends ReadoutBlockState {
273
281
  * - **Building blocks:** value, optional setpoint, and optional advice segments,
274
282
  * each cap-height-aligned and able to reserve a stable width.
275
283
  * - **Sizes:** `small`, `medium`, `large` density scales.
276
- * - **Stacking:** `trailing-unit`, `leading-unit`, `leading-src` placement.
284
+ * - **Stacking:** `trailing-unit`, `leading-unit`, `leading-src`,
285
+ * `leading-src-inline` placement.
277
286
  * - **Priority:** `regular`/`enhanced` colour emphasis; per-value `weight`
278
287
  * (`regular`/`semibold`/`bold`) is independent of colour.
279
288
  * - **Setpoint flip-flop:** swaps emphasis between value and setpoint as the
@@ -406,10 +415,30 @@ export class ObcReadoutListItem extends LitElement {
406
415
  return this.stacking ?? ReadoutListItemStacking.trailingUnit;
407
416
  }
408
417
 
418
+ /** Both leading-src stackings move the source into the label stack. */
419
+ private get hasLeadingSrc(): boolean {
420
+ const stacking = this.resolvedStacking;
421
+ return (
422
+ stacking === ReadoutListItemStacking.leadingSrc ||
423
+ stacking === ReadoutListItemStacking.leadingSrcInline
424
+ );
425
+ }
426
+
409
427
  private get resolvedPriority(): ReadoutListItemPriority {
410
428
  return this.priority ?? ReadoutListItemPriority.regular;
411
429
  }
412
430
 
431
+ /**
432
+ * Whether a unit box follows the value: a unit, or a reserver alone — the
433
+ * blank reserved column keeps a unit-less row aligned with its neighbours.
434
+ */
435
+ private get hasTrailingUnitBox(): boolean {
436
+ return (
437
+ this.resolvedStacking !== ReadoutListItemStacking.leadingUnit &&
438
+ (Boolean(this.unit) || Boolean(this.unitOptions?.spaceReserver))
439
+ );
440
+ }
441
+
413
442
  private get resolvedFractionDigits(): number {
414
443
  return this.fractionDigits ?? 0;
415
444
  }
@@ -713,16 +742,12 @@ export class ObcReadoutListItem extends LitElement {
713
742
  if (!this.hasValue) {
714
743
  return nothing;
715
744
  }
716
- const hasTrailingUnit =
717
- Boolean(this.unit) &&
718
- this.resolvedStacking !== ReadoutListItemStacking.leadingUnit;
719
-
720
745
  if ((this.hasDegree ?? false) && !this.off) {
721
746
  return this.renderDegreeGlyph(this.valueSize, {
722
747
  enhanced: this.rowEnhanced,
723
748
  });
724
749
  }
725
- if (hasTrailingUnit) {
750
+ if (this.hasTrailingUnitBox) {
726
751
  return html`<span class="value-unit-gap" aria-hidden="true"></span>`;
727
752
  }
728
753
  return nothing;
@@ -914,8 +939,7 @@ export class ObcReadoutListItem extends LitElement {
914
939
  const stacking = this.resolvedStacking;
915
940
  const showLeadingUnit =
916
941
  stacking === ReadoutListItemStacking.leadingUnit && Boolean(this.unit);
917
- const showLeadingSrc =
918
- stacking === ReadoutListItemStacking.leadingSrc && Boolean(this.src);
942
+ const showLeadingSrc = this.hasLeadingSrc && Boolean(this.src);
919
943
 
920
944
  return html`
921
945
  <div class="label-container" part="label-container">
@@ -946,15 +970,12 @@ export class ObcReadoutListItem extends LitElement {
946
970
  }
947
971
 
948
972
  private renderTrailingUnit(): TemplateResult | typeof nothing {
949
- if (
950
- this.resolvedStacking === ReadoutListItemStacking.leadingUnit ||
951
- !this.unit
952
- ) {
973
+ if (!this.hasTrailingUnitBox) {
953
974
  return nothing;
954
975
  }
955
976
  return this.renderTextbox(
956
977
  'unit',
957
- this.unit,
978
+ this.unit ?? '',
958
979
  this.unitOptions?.spaceReserver
959
980
  );
960
981
  }
@@ -1004,10 +1025,7 @@ export class ObcReadoutListItem extends LitElement {
1004
1025
  }
1005
1026
 
1006
1027
  private renderTrailingSource(): TemplateResult | typeof nothing {
1007
- if (
1008
- this.resolvedStacking === ReadoutListItemStacking.leadingSrc ||
1009
- !this.src
1010
- ) {
1028
+ if (this.hasLeadingSrc || !this.src) {
1011
1029
  return nothing;
1012
1030
  }
1013
1031
  return html`