@oicl/openbridge-webcomponents 2.0.0-next.57 → 2.0.0-next.59

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 (133) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +6585 -4581
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +1047 -83
  4. package/dist/alert-severity.d.ts +38 -0
  5. package/dist/alert-severity.d.ts.map +1 -0
  6. package/dist/alert-severity.js +176 -0
  7. package/dist/alert-severity.js.map +1 -0
  8. package/dist/ar/building-blocks/poi-header/poi-header.css.js +38 -7
  9. package/dist/ar/building-blocks/poi-header/poi-header.css.js.map +1 -1
  10. package/dist/ar/building-blocks/poi-header/poi-header.d.ts +7 -2
  11. package/dist/ar/building-blocks/poi-header/poi-header.d.ts.map +1 -1
  12. package/dist/ar/building-blocks/poi-header/poi-header.js +5 -0
  13. package/dist/ar/building-blocks/poi-header/poi-header.js.map +1 -1
  14. package/dist/ar/poi-button/poi-button.css.js +110 -32
  15. package/dist/ar/poi-button/poi-button.css.js.map +1 -1
  16. package/dist/ar/poi-button/poi-button.d.ts +7 -2
  17. package/dist/ar/poi-button/poi-button.d.ts.map +1 -1
  18. package/dist/ar/poi-button/poi-button.js +15 -0
  19. package/dist/ar/poi-button/poi-button.js.map +1 -1
  20. package/dist/ar/types.d.ts +6 -1
  21. package/dist/ar/types.d.ts.map +1 -1
  22. package/dist/ar/types.js +5 -0
  23. package/dist/ar/types.js.map +1 -1
  24. package/dist/automation/automation-badge/automation-badge.d.ts +9 -1
  25. package/dist/automation/automation-badge/automation-badge.d.ts.map +1 -1
  26. package/dist/automation/automation-badge/automation-badge.js +119 -12
  27. package/dist/automation/automation-badge/automation-badge.js.map +1 -1
  28. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +25 -1
  29. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
  30. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +7 -2
  31. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
  32. package/dist/automation/automation-button/abstract-automation-button.d.ts +10 -3
  33. package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
  34. package/dist/automation/automation-button/abstract-automation-button.js +23 -2
  35. package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
  36. package/dist/automation/automation-button/automation-button.css.js +9 -4
  37. package/dist/automation/automation-button/automation-button.css.js.map +1 -1
  38. package/dist/automation/automation-button/automation-button.d.ts +4 -2
  39. package/dist/automation/automation-button/automation-button.d.ts.map +1 -1
  40. package/dist/automation/automation-button/automation-button.js +24 -6
  41. package/dist/automation/automation-button/automation-button.js.map +1 -1
  42. package/dist/automation/automation-tank/automation-tank.d.ts +3 -2
  43. package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
  44. package/dist/automation/automation-tank/automation-tank.js +13 -2
  45. package/dist/automation/automation-tank/automation-tank.js.map +1 -1
  46. package/dist/building-blocks/instrument-radial/instrument-radial.d.ts +10 -0
  47. package/dist/building-blocks/instrument-radial/instrument-radial.d.ts.map +1 -1
  48. package/dist/building-blocks/instrument-radial/instrument-radial.js +86 -21
  49. package/dist/building-blocks/instrument-radial/instrument-radial.js.map +1 -1
  50. package/dist/components/accordion-card/accordion-card.css.js +34 -0
  51. package/dist/components/accordion-card/accordion-card.css.js.map +1 -1
  52. package/dist/components/accordion-card/accordion-card.d.ts +3 -2
  53. package/dist/components/accordion-card/accordion-card.d.ts.map +1 -1
  54. package/dist/components/accordion-card/accordion-card.js +4 -3
  55. package/dist/components/accordion-card/accordion-card.js.map +1 -1
  56. package/dist/components/alert-button/alert-button.css.js +744 -7
  57. package/dist/components/alert-button/alert-button.css.js.map +1 -1
  58. package/dist/components/alert-button/alert-button.d.ts +3 -1
  59. package/dist/components/alert-button/alert-button.d.ts.map +1 -1
  60. package/dist/components/alert-button/alert-button.js +33 -31
  61. package/dist/components/alert-button/alert-button.js.map +1 -1
  62. package/dist/components/alert-frame/alert-frame.css.js +116 -29
  63. package/dist/components/alert-frame/alert-frame.css.js.map +1 -1
  64. package/dist/components/alert-frame/alert-frame.d.ts +42 -15
  65. package/dist/components/alert-frame/alert-frame.d.ts.map +1 -1
  66. package/dist/components/alert-frame/alert-frame.js +68 -17
  67. package/dist/components/alert-frame/alert-frame.js.map +1 -1
  68. package/dist/components/alert-frame/critical-badge.d.ts +12 -0
  69. package/dist/components/alert-frame/critical-badge.d.ts.map +1 -0
  70. package/dist/components/alert-frame/critical-badge.js +47 -0
  71. package/dist/components/alert-frame/critical-badge.js.map +1 -0
  72. package/dist/components/alert-frame/diagnostic-badge.d.ts +12 -0
  73. package/dist/components/alert-frame/diagnostic-badge.d.ts.map +1 -0
  74. package/dist/components/alert-frame/diagnostic-badge.js +60 -0
  75. package/dist/components/alert-frame/diagnostic-badge.js.map +1 -0
  76. package/dist/components/alert-icon/alert-icon.d.ts +6 -1
  77. package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
  78. package/dist/components/alert-icon/alert-icon.js +96 -38
  79. package/dist/components/alert-icon/alert-icon.js.map +1 -1
  80. package/dist/components/alert-icon/icons/icon-critical.d.ts +3 -0
  81. package/dist/components/alert-icon/icons/icon-critical.d.ts.map +1 -0
  82. package/dist/components/alert-icon/icons/icon-critical.js +26 -0
  83. package/dist/components/alert-icon/icons/icon-critical.js.map +1 -0
  84. package/dist/components/alert-list-details/alert-list-details.d.ts.map +1 -1
  85. package/dist/components/alert-list-details/alert-list-details.js +6 -7
  86. package/dist/components/alert-list-details/alert-list-details.js.map +1 -1
  87. package/dist/components/badge/badge.css.js +50 -2
  88. package/dist/components/badge/badge.css.js.map +1 -1
  89. package/dist/components/badge/badge.d.ts +13 -2
  90. package/dist/components/badge/badge.d.ts.map +1 -1
  91. package/dist/components/badge/badge.js +54 -0
  92. package/dist/components/badge/badge.js.map +1 -1
  93. package/dist/index.js +2 -1
  94. package/dist/manual-icon/icon-alerts-critical-twotone.d.ts +30 -0
  95. package/dist/manual-icon/icon-alerts-critical-twotone.d.ts.map +1 -0
  96. package/dist/manual-icon/icon-alerts-critical-twotone.js +55 -0
  97. package/dist/manual-icon/icon-alerts-critical-twotone.js.map +1 -0
  98. package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts +30 -0
  99. package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts.map +1 -0
  100. package/dist/manual-icon/icon-alerts-diagnostic-twotone.js +55 -0
  101. package/dist/manual-icon/icon-alerts-diagnostic-twotone.js.map +1 -0
  102. package/dist/navigation-instruments/gauge-radial/gauge-radial.css.js +99 -0
  103. package/dist/navigation-instruments/gauge-radial/gauge-radial.css.js.map +1 -0
  104. package/dist/navigation-instruments/gauge-radial/gauge-radial.d.ts +42 -7
  105. package/dist/navigation-instruments/gauge-radial/gauge-radial.d.ts.map +1 -1
  106. package/dist/navigation-instruments/gauge-radial/gauge-radial.js +178 -31
  107. package/dist/navigation-instruments/gauge-radial/gauge-radial.js.map +1 -1
  108. package/dist/navigation-instruments/readout/readout.css.js +7 -18
  109. package/dist/navigation-instruments/readout/readout.css.js.map +1 -1
  110. package/dist/navigation-instruments/readout/readout.d.ts +6 -7
  111. package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
  112. package/dist/navigation-instruments/readout/readout.js +54 -52
  113. package/dist/navigation-instruments/readout/readout.js.map +1 -1
  114. package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +9 -36
  115. package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js.map +1 -1
  116. package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts +8 -8
  117. package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts.map +1 -1
  118. package/dist/navigation-instruments/readout-list-item/readout-list-item.js +49 -42
  119. package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
  120. package/dist/navigation-instruments/watch/tickmark.d.ts +2 -1
  121. package/dist/navigation-instruments/watch/tickmark.d.ts.map +1 -1
  122. package/dist/navigation-instruments/watch/tickmark.js +24 -4
  123. package/dist/navigation-instruments/watch/tickmark.js.map +1 -1
  124. package/dist/navigation-instruments/watch/watch.d.ts +23 -1
  125. package/dist/navigation-instruments/watch/watch.d.ts.map +1 -1
  126. package/dist/navigation-instruments/watch/watch.js +48 -20
  127. package/dist/navigation-instruments/watch/watch.js.map +1 -1
  128. package/dist/openbridge.css +155 -0
  129. package/dist/types.d.ts +7 -1
  130. package/dist/types.d.ts.map +1 -1
  131. package/dist/types.js +18 -7
  132. package/dist/types.js.map +1 -1
  133. package/package.json +1 -1
@@ -0,0 +1,55 @@
1
+ import { css, LitElement, svg, html } from "lit";
2
+ import { property } from "lit/decorators.js";
3
+ import { customElement } from "../decorator.js";
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __decorateClass = (decorators, target, key, kind) => {
7
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
8
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
9
+ if (decorator = decorators[i])
10
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11
+ if (kind && result) __defProp(target, key, result);
12
+ return result;
13
+ };
14
+ let ObiAlertsCriticalTwotone = class extends LitElement {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.useCssColor = false;
18
+ this.icon = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
19
+ <path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z" fill="currentColor"/>
20
+ <path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z" fill="currentColor"/>
21
+ </svg>
22
+ `;
23
+ this.iconCss = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
24
+ <path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z" style="fill: var(--alert-critical-color)"/>
25
+ <path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z" style="fill: var(--alert-critical-outline-color)"/>
26
+ </svg>
27
+ `;
28
+ }
29
+ render() {
30
+ return html`
31
+ <div class="wrapper">${this.useCssColor ? this.iconCss : this.icon}</div>
32
+ `;
33
+ }
34
+ };
35
+ ObiAlertsCriticalTwotone.styles = css`
36
+ .wrapper {
37
+ height: 100%;
38
+ width: 100%;
39
+ line-height: 0;
40
+ }
41
+ .wrapper > * {
42
+ height: 100%;
43
+ width: 100%;
44
+ }
45
+ `;
46
+ __decorateClass([
47
+ property({ type: Boolean })
48
+ ], ObiAlertsCriticalTwotone.prototype, "useCssColor", 2);
49
+ ObiAlertsCriticalTwotone = __decorateClass([
50
+ customElement("obi-alerts-critical-twotone")
51
+ ], ObiAlertsCriticalTwotone);
52
+ export {
53
+ ObiAlertsCriticalTwotone
54
+ };
55
+ //# sourceMappingURL=icon-alerts-critical-twotone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-alerts-critical-twotone.js","sources":["../../src/manual-icon/icon-alerts-critical-twotone.ts"],"sourcesContent":["import {LitElement, html, css, svg} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {customElement} from '../decorator.js';\n\n/**\n * `<obi-alerts-critical-twotone>` – Two-tone bell icon for the ISA \"critical\" alert severity.\n *\n * Renders the alert (bell) glyph as a layered two-tone shape so the silhouette and\n * fill can be tinted independently. Used wherever a critical-severity alert needs an\n * icon representation (badges, frames, lists).\n *\n * ### Features\n * - **Color modes:** Set `useCssColor` to render with the critical design tokens\n * (`--alert-critical-color` / `--alert-critical-outline-color`); leave it `false`\n * (default) to render with `currentColor` so the icon inherits its parent's color.\n *\n * ### Properties and Attributes\n * - `useCssColor` (boolean): When true, fills the two tones with the critical color\n * tokens instead of `currentColor`. Defaults to `false`.\n */\n@customElement('obi-alerts-critical-twotone')\nexport class ObiAlertsCriticalTwotone extends LitElement {\n @property({type: Boolean}) useCssColor = false;\n\n private icon = svg`<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z\" fill=\"currentColor\"/>\n<path d=\"M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z\" fill=\"currentColor\"/>\n</svg>\n`;\n\n private iconCss = svg`<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z\" style=\"fill: var(--alert-critical-color)\"/>\n<path d=\"M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z\" style=\"fill: var(--alert-critical-outline-color)\"/>\n</svg>\n`;\n\n override render() {\n return html`\n <div class=\"wrapper\">${this.useCssColor ? this.iconCss : this.icon}</div>\n `;\n }\n\n static override styles = css`\n .wrapper {\n height: 100%;\n width: 100%;\n line-height: 0;\n }\n .wrapper > * {\n height: 100%;\n width: 100%;\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obi-alerts-critical-twotone': ObiAlertsCriticalTwotone;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAqBO,IAAM,2BAAN,cAAuC,WAAW;AAAA,EAAlD,cAAA;AAAA,UAAA,GAAA,SAAA;AACsB,SAAA,cAAc;AAEzC,SAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAMf,SAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAAA,EAMT,SAAS;AAChB,WAAO;AAAA,6BACkB,KAAK,cAAc,KAAK,UAAU,KAAK,IAAI;AAAA;AAAA,EAEtE;AAaF;AAhCa,yBAqBK,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AApBE,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GADd,yBACgB,WAAA,eAAA,CAAA;AADhB,2BAAN,gBAAA;AAAA,EADN,cAAc,6BAA6B;AAAA,GAC/B,wBAAA;"}
@@ -0,0 +1,30 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * `<obi-alerts-diagnostic-twotone>` – Two-tone bell icon for the ISA "diagnostic" alert severity.
4
+ *
5
+ * Renders the alert (bell) glyph as a layered two-tone shape so the silhouette and
6
+ * fill can be tinted independently. Used wherever a diagnostic-severity alert needs an
7
+ * icon representation (badges, frames, lists).
8
+ *
9
+ * ### Features
10
+ * - **Color modes:** Set `useCssColor` to render with the diagnostic design tokens
11
+ * (`--alert-diagnostic-color` / `--alert-diagnostic-outline-color`); leave it `false`
12
+ * (default) to render with `currentColor` so the icon inherits its parent's color.
13
+ *
14
+ * ### Properties and Attributes
15
+ * - `useCssColor` (boolean): When true, fills the two tones with the diagnostic color
16
+ * tokens instead of `currentColor`. Defaults to `false`.
17
+ */
18
+ export declare class ObiAlertsDiagnosticTwotone extends LitElement {
19
+ useCssColor: boolean;
20
+ private icon;
21
+ private iconCss;
22
+ render(): import('lit-html').TemplateResult<1>;
23
+ static styles: import('lit').CSSResult;
24
+ }
25
+ declare global {
26
+ interface HTMLElementTagNameMap {
27
+ 'obi-alerts-diagnostic-twotone': ObiAlertsDiagnosticTwotone;
28
+ }
29
+ }
30
+ //# sourceMappingURL=icon-alerts-diagnostic-twotone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-alerts-diagnostic-twotone.d.ts","sourceRoot":"","sources":["../../src/manual-icon/icon-alerts-diagnostic-twotone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAiB,MAAM,KAAK,CAAC;AAI/C;;;;;;;;;;;;;;;GAeG;AACH,qBACa,0BAA2B,SAAQ,UAAU;IAC7B,WAAW,UAAS;IAE/C,OAAO,CAAC,IAAI,CAIZ;IAEA,OAAO,CAAC,OAAO,CAIf;IAES,MAAM;IAMf,OAAgB,MAAM,0BAUpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,+BAA+B,EAAE,0BAA0B,CAAC;KAC7D;CACF"}
@@ -0,0 +1,55 @@
1
+ import { css, LitElement, svg, html } from "lit";
2
+ import { property } from "lit/decorators.js";
3
+ import { customElement } from "../decorator.js";
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __decorateClass = (decorators, target, key, kind) => {
7
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
8
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
9
+ if (decorator = decorators[i])
10
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11
+ if (kind && result) __defProp(target, key, result);
12
+ return result;
13
+ };
14
+ let ObiAlertsDiagnosticTwotone = class extends LitElement {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.useCssColor = false;
18
+ this.icon = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
19
+ <path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z" fill="currentColor"/>
20
+ <path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z" fill="currentColor"/>
21
+ </svg>
22
+ `;
23
+ this.iconCss = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
24
+ <path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z" style="fill: var(--alert-diagnostic-color)"/>
25
+ <path d="M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z" style="fill: var(--alert-diagnostic-outline-color)"/>
26
+ </svg>
27
+ `;
28
+ }
29
+ render() {
30
+ return html`
31
+ <div class="wrapper">${this.useCssColor ? this.iconCss : this.icon}</div>
32
+ `;
33
+ }
34
+ };
35
+ ObiAlertsDiagnosticTwotone.styles = css`
36
+ .wrapper {
37
+ height: 100%;
38
+ width: 100%;
39
+ line-height: 0;
40
+ }
41
+ .wrapper > * {
42
+ height: 100%;
43
+ width: 100%;
44
+ }
45
+ `;
46
+ __decorateClass([
47
+ property({ type: Boolean })
48
+ ], ObiAlertsDiagnosticTwotone.prototype, "useCssColor", 2);
49
+ ObiAlertsDiagnosticTwotone = __decorateClass([
50
+ customElement("obi-alerts-diagnostic-twotone")
51
+ ], ObiAlertsDiagnosticTwotone);
52
+ export {
53
+ ObiAlertsDiagnosticTwotone
54
+ };
55
+ //# sourceMappingURL=icon-alerts-diagnostic-twotone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-alerts-diagnostic-twotone.js","sources":["../../src/manual-icon/icon-alerts-diagnostic-twotone.ts"],"sourcesContent":["import {LitElement, html, css, svg} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {customElement} from '../decorator.js';\n\n/**\n * `<obi-alerts-diagnostic-twotone>` – Two-tone bell icon for the ISA \"diagnostic\" alert severity.\n *\n * Renders the alert (bell) glyph as a layered two-tone shape so the silhouette and\n * fill can be tinted independently. Used wherever a diagnostic-severity alert needs an\n * icon representation (badges, frames, lists).\n *\n * ### Features\n * - **Color modes:** Set `useCssColor` to render with the diagnostic design tokens\n * (`--alert-diagnostic-color` / `--alert-diagnostic-outline-color`); leave it `false`\n * (default) to render with `currentColor` so the icon inherits its parent's color.\n *\n * ### Properties and Attributes\n * - `useCssColor` (boolean): When true, fills the two tones with the diagnostic color\n * tokens instead of `currentColor`. Defaults to `false`.\n */\n@customElement('obi-alerts-diagnostic-twotone')\nexport class ObiAlertsDiagnosticTwotone extends LitElement {\n @property({type: Boolean}) useCssColor = false;\n\n private icon = svg`<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z\" fill=\"currentColor\"/>\n<path d=\"M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z\" fill=\"currentColor\"/>\n</svg>\n`;\n\n private iconCss = svg`<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z\" style=\"fill: var(--alert-diagnostic-color)\"/>\n<path d=\"M4 19V17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H20V19H4ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z\" style=\"fill: var(--alert-diagnostic-outline-color)\"/>\n</svg>\n`;\n\n override render() {\n return html`\n <div class=\"wrapper\">${this.useCssColor ? this.iconCss : this.icon}</div>\n `;\n }\n\n static override styles = css`\n .wrapper {\n height: 100%;\n width: 100%;\n line-height: 0;\n }\n .wrapper > * {\n height: 100%;\n width: 100%;\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obi-alerts-diagnostic-twotone': ObiAlertsDiagnosticTwotone;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAqBO,IAAM,6BAAN,cAAyC,WAAW;AAAA,EAApD,cAAA;AAAA,UAAA,GAAA,SAAA;AACsB,SAAA,cAAc;AAEzC,SAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAMf,SAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAAA,EAMT,SAAS;AAChB,WAAO;AAAA,6BACkB,KAAK,cAAc,KAAK,UAAU,KAAK,IAAI;AAAA;AAAA,EAEtE;AAaF;AAhCa,2BAqBK,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AApBE,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GADd,2BACgB,WAAA,eAAA,CAAA;AADhB,6BAAN,gBAAA;AAAA,EADN,cAAc,+BAA+B;AAAA,GACjC,0BAAA;"}
@@ -0,0 +1,99 @@
1
+ import { css } from "lit";
2
+ const componentStyle = css`
3
+ * {
4
+ -webkit-tap-highlight-color: transparent;
5
+ }
6
+
7
+ :host {
8
+ display: block;
9
+ width: 100%;
10
+ height: 100%;
11
+ }
12
+
13
+ /* Host takes each sector's crop aspect (see \`sectorClips\`): 270/90 square, 180
14
+ wide — so the dial is the same size at any width. */
15
+
16
+ :host([sector="270"]),
17
+ :host([sector="90-left"]),
18
+ :host([sector="90-right"]) {
19
+ height: auto;
20
+ aspect-ratio: 1;
21
+ }
22
+
23
+ /* 448 / 251 = the 180° crop's aspect (448 wide × 448·(1 − 44%) tall); keep in
24
+ sync with \`sectorClips\` bottom=44 in gauge-radial.ts. */
25
+
26
+ :host([sector="180"]) {
27
+ height: auto;
28
+ aspect-ratio: 448 / 251;
29
+ }
30
+
31
+ .gauge-radial-root {
32
+ /* Readout vertical placement per layout (% of the cropped host), tuned to the
33
+ watch geometry — re-check if the ring radii or the 448 box change. Which
34
+ layout uses which is in renderReadouts(). */
35
+ --readout-meta-top: 72%;
36
+ --readout-meta-top-needle: 63%;
37
+ --readout-meta-top-180: 60%;
38
+
39
+ position: relative;
40
+ width: 100%;
41
+ height: 100%;
42
+ }
43
+
44
+ .gauge-radial-root .gauge-readout-value {
45
+ position: absolute;
46
+ left: 50%;
47
+ top: 50%;
48
+ transform: translate(-50%, -50%);
49
+ z-index: 1;
50
+ }
51
+
52
+ .gauge-radial-root .gauge-readout-meta {
53
+ position: absolute;
54
+ left: 50%;
55
+ top: var(--readout-meta-top);
56
+ transform: translateX(-50%);
57
+ z-index: 1;
58
+ }
59
+
60
+ .gauge-radial-root.type-needle .gauge-readout-meta {
61
+ top: var(--readout-meta-top-needle);
62
+ }
63
+
64
+ .gauge-radial-root.sector-180 .gauge-readout-meta {
65
+ top: var(--readout-meta-top-180);
66
+ }
67
+
68
+ /* Nudge the corner readout inward (up + toward center) so it sits inside the
69
+ open quadrant rather than hugging the box corner. Symmetric for both
70
+ orientations — only the horizontal edge differs. */
71
+
72
+ .gauge-radial-root.sector-90-left .gauge-readout-meta,.gauge-radial-root.sector-90-right .gauge-readout-meta {
73
+ --readout-90-inset: 6%;
74
+ bottom: var(--readout-90-inset);
75
+ top: auto;
76
+ transform: none;
77
+ }
78
+
79
+ .gauge-radial-root.sector-90-left .gauge-readout-meta {
80
+ left: auto;
81
+ right: var(--readout-90-inset);
82
+ }
83
+
84
+ .gauge-radial-root.sector-90-right .gauge-readout-meta {
85
+ left: var(--readout-90-inset);
86
+ right: auto;
87
+ }
88
+
89
+ /* 90-right readout sits in the bottom-left corner, so left-align the value
90
+ under the label (enhanced readouts right-align the value by default). */
91
+
92
+ .gauge-radial-root.sector-90-right .gauge-readout-meta::part(value-wrapper) {
93
+ justify-self: start;
94
+ }
95
+ `;
96
+ export {
97
+ componentStyle as default
98
+ };
99
+ //# sourceMappingURL=gauge-radial.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gauge-radial.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,13 +1,20 @@
1
- import { LitElement } from 'lit';
1
+ import { LitElement, TemplateResult } from 'lit';
2
2
  import { AdviceType } from '../watch/advice.js';
3
3
  import { InstrumentState, Priority } from '../types.js';
4
4
  import { TickmarkStyle } from '../watch/tickmark.js';
5
5
  import '../../building-blocks/instrument-radial/instrument-radial.js';
6
+ import '../readout/readout.js';
6
7
  export declare enum ObcGaugeRadialType {
7
8
  filled = "filled",
8
9
  bar = "bar",
9
10
  needle = "needle"
10
11
  }
12
+ export declare enum GaugeRadialSector {
13
+ deg270 = "270",
14
+ deg180 = "180",
15
+ deg90Left = "90-left",
16
+ deg90Right = "90-right"
17
+ }
11
18
  export interface GaugeRadialAdvice {
12
19
  minValue: number;
13
20
  maxValue: number;
@@ -29,14 +36,17 @@ declare const ObcGaugeRadial_base: (new (...args: any[]) => import('../../svghel
29
36
  *
30
37
  * - **Three display types**: `filled` (solid arc), `bar` (thinner arc), and
31
38
  * `needle` (pointer indicator) via the `type` property.
32
- * - **Full-range mapping**: The configured `minValue..maxValue` always spans
33
- * the full 270° sweep. Symmetric ranges still place `0` at 12 o'clock.
39
+ * - **Sector sweep**: `sector` selects the arc span (`270`, `180`, `90-left`, or `90-right`).
40
+ * The configured `minValue..maxValue` always spans the full sector. For the
41
+ * centered sectors (`270`, `180`) a symmetric range places `0` at 12 o'clock;
42
+ * for `90-left`/`90-right` the range midpoint sits at the middle of the quadrant.
34
43
  * - **Setpoint via mixin**: `setpoint`, `newSetpoint`, `touching`,
35
44
  * `autoAtSetpointDeadband`, `setpointOverride`, and all other setpoint
36
45
  * properties are provided by `SetpointMixin` and forwarded to the inner
37
46
  * `<obc-instrument-radial>`.
38
47
  * - **Advice zones**: Pass an array of {@link GaugeRadialAdvice} objects to
39
- * render caution/alert arcs on the gauge.
48
+ * render caution/alert arcs on the gauge. Not shown on the `90-left` /
49
+ * `90-right` sectors.
40
50
  *
41
51
  * ## Usage Guidelines
42
52
  *
@@ -45,6 +55,12 @@ declare const ObcGaugeRadial_base: (new (...args: any[]) => import('../../svghel
45
55
  * - Provide `primaryTickmarkInterval` and `secondaryTickmarkInterval` to
46
56
  * control tickmark density.
47
57
  * - Enable `showLabels` to show numeric labels at primary tickmarks.
58
+ * - Enable `showReadout` with optional `label` and `unit`. Layout depends on `sector`
59
+ * and `type`: **270** filled/bar — value at center + a label-only `meta` row in
60
+ * the bottom gap (two separate readouts); **180** filled/bar — a single centered
61
+ * stack (value + label/unit) at the bottom; **270** needle — bottom stack;
62
+ * **180** needle — no readout; **90-left** / **90-right** filled/bar — corner
63
+ * readout in a square host; **90** needle — no readout.
48
64
  *
49
65
  * ## Best Practices
50
66
  *
@@ -61,7 +77,7 @@ declare const ObcGaugeRadial_base: (new (...args: any[]) => import('../../svghel
61
77
  * minValue="0"
62
78
  * maxValue="100"
63
79
  * type="filled"
64
- * enhanced
80
+ * priority="enhanced"
65
81
  * showLabels
66
82
  * primaryTickmarkInterval="25"
67
83
  * secondaryTickmarkInterval="5"
@@ -89,9 +105,28 @@ export declare class ObcGaugeRadial extends ObcGaugeRadial_base {
89
105
  type: ObcGaugeRadialType;
90
106
  tickmarksInside: boolean;
91
107
  tickmarkStyle: TickmarkStyle;
108
+ /** Caution/alert arcs. Ignored on `sector: 90-left` / `90-right`. */
92
109
  advices: GaugeRadialAdvice[];
93
- getAngle(v: number): number;
94
- render(): import('lit-html').TemplateResult<1>;
110
+ sector: GaugeRadialSector;
111
+ showReadout: boolean;
112
+ label: string;
113
+ unit: string;
114
+ fractionDigits: number;
115
+ private get sectorAngles();
116
+ /**
117
+ * Per-edge crop (%) of the shared, origin-centered 448 SVG box each sector
118
+ * shows. All sectors render at the same natural scale, so the dial stays the
119
+ * same size; the sector only windows a different part (270 whole, 180 wide,
120
+ * 90 a quadrant).
121
+ */
122
+ private get sectorClips();
123
+ private get isSector90();
124
+ getAngle: (v: number) => number;
125
+ /** Renders one gauge readout; `withMeta`/`labelOnly` pick parts. */
126
+ private renderReadout;
127
+ private renderReadouts;
128
+ render(): TemplateResult<1>;
129
+ static styles: import('lit').CSSResult;
95
130
  }
96
131
  declare global {
97
132
  interface HTMLElementTagNameMap {
@@ -1 +1 @@
1
- {"version":3,"file":"gauge-radial.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/gauge-radial/gauge-radial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAGrC,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,MAAM,aAAa,CAAC;AAEtD,OAAO,8DAA8D,CAAC;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAEnD,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB;;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,qBACa,cAAe,SAAQ,mBAAyB;IACjC,KAAK,SAAK;IACV,QAAQ,SAAO;IACf,QAAQ,SAAK;IACZ,UAAU,EAAE,OAAO,CAAS;IAC7B,uBAAuB,SAAM;IAC7B,yBAAyB,SAAM;IACzD;;;OAGG;IACuB,wBAAwB,EAAE,MAAM,GAAG,SAAS,CAC1D;IACc,KAAK,EAAE,eAAe,CAA0B;IAChD,QAAQ,EAAE,QAAQ,CAAoB;IACtC,IAAI,EAAE,kBAAkB,CACtB;IACD,eAAe,EAAE,OAAO,CAAS;IAClC,aAAa,EAAE,aAAa,CAC9B;IACmB,OAAO,EAAE,iBAAiB,EAAE,CAAM;IAE7E,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IASlB,MAAM;CA8BhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
1
+ {"version":3,"file":"gauge-radial.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/gauge-radial/gauge-radial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA4B,KAAK,cAAc,EAAC,MAAM,KAAK,CAAC;AAK9E,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,MAAM,aAAa,CAAC;AAEtD,OAAO,8DAA8D,CAAC;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AACnD,OAAO,uBAAuB,CAAC;AAM/B,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,oBAAY,iBAAiB;IAC3B,MAAM,QAAQ;IACd,MAAM,QAAQ;IACd,SAAS,YAAY;IACrB,UAAU,aAAa;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB;;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,qBACa,cAAe,SAAQ,mBAAyB;IACjC,KAAK,SAAK;IACV,QAAQ,SAAO;IACf,QAAQ,SAAK;IACZ,UAAU,EAAE,OAAO,CAAS;IAC7B,uBAAuB,SAAM;IAC7B,yBAAyB,SAAM;IACzD;;;OAGG;IACuB,wBAAwB,EAAE,MAAM,GAAG,SAAS,CAC1D;IACc,KAAK,EAAE,eAAe,CAA0B;IAChD,QAAQ,EAAE,QAAQ,CAAoB;IACtC,IAAI,EAAE,kBAAkB,CACtB;IACD,eAAe,EAAE,OAAO,CAAS;IAClC,aAAa,EAAE,aAAa,CAC9B;IACxB,qEAAqE;IAC1B,OAAO,EAAE,iBAAiB,EAAE,CAAM;IACpC,MAAM,EAAE,iBAAiB,CACvC;IACA,WAAW,UAAS;IACrB,KAAK,SAAM;IACX,IAAI,SAAM;IACV,cAAc,SAAK;IAE7C,OAAO,KAAK,YAAY,GAYvB;IAED;;;;;OAKG;IACH,OAAO,KAAK,WAAW,GAiBtB;IAED,OAAO,KAAK,UAAU,GAKrB;IAID,QAAQ,GAAI,GAAG,MAAM,KAAG,MAAM,CAQ5B;IAEF,oEAAoE;IACpE,OAAO,CAAC,aAAa;IA+BrB,OAAO,CAAC,cAAc;IAiDb,MAAM;IAgDf,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -1,10 +1,13 @@
1
- import { LitElement, html } from "lit";
1
+ import { LitElement, html, nothing, unsafeCSS } from "lit";
2
+ import { classMap } from "lit/directives/class-map.js";
3
+ import componentStyle from "./gauge-radial.css.js";
2
4
  import { customElement } from "../../decorator.js";
3
5
  import { property } from "lit/decorators.js";
4
6
  import { InstrumentState, Priority } from "../types.js";
5
7
  import { SetpointMixin } from "../../svghelpers/setpoint-mixin.js";
6
8
  import "../../building-blocks/instrument-radial/instrument-radial.js";
7
9
  import { TickmarkStyle } from "../watch/tickmark.js";
10
+ import { ReadoutStackVerticalAlignment, ReadoutVariant } from "../readout/readout.js";
8
11
  var __defProp = Object.defineProperty;
9
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
10
13
  var __decorateClass = (decorators, target, key, kind) => {
@@ -21,6 +24,13 @@ var ObcGaugeRadialType = /* @__PURE__ */ ((ObcGaugeRadialType2) => {
21
24
  ObcGaugeRadialType2["needle"] = "needle";
22
25
  return ObcGaugeRadialType2;
23
26
  })(ObcGaugeRadialType || {});
27
+ var GaugeRadialSector = /* @__PURE__ */ ((GaugeRadialSector2) => {
28
+ GaugeRadialSector2["deg270"] = "270";
29
+ GaugeRadialSector2["deg180"] = "180";
30
+ GaugeRadialSector2["deg90Left"] = "90-left";
31
+ GaugeRadialSector2["deg90Right"] = "90-right";
32
+ return GaugeRadialSector2;
33
+ })(GaugeRadialSector || {});
24
34
  let ObcGaugeRadial = class extends SetpointMixin(LitElement) {
25
35
  constructor() {
26
36
  super(...arguments);
@@ -37,45 +47,166 @@ let ObcGaugeRadial = class extends SetpointMixin(LitElement) {
37
47
  this.tickmarksInside = false;
38
48
  this.tickmarkStyle = TickmarkStyle.regular;
39
49
  this.advices = [];
50
+ this.sector = "270";
51
+ this.showReadout = false;
52
+ this.label = "";
53
+ this.unit = "";
54
+ this.fractionDigits = 0;
55
+ this.getAngle = (v) => {
56
+ const { sweep, start } = this.sectorAngles;
57
+ const span = this.maxValue - this.minValue;
58
+ if (!Number.isFinite(span) || span <= 0) {
59
+ return start;
60
+ }
61
+ return (v - this.minValue) / span * sweep + start;
62
+ };
40
63
  }
41
- getAngle(v) {
42
- const span = this.maxValue - this.minValue;
43
- if (!Number.isFinite(span) || span <= 0) {
44
- return -135;
64
+ get sectorAngles() {
65
+ switch (this.sector) {
66
+ case "180":
67
+ return { sweep: 180, start: -90 };
68
+ case "90-left":
69
+ return { sweep: 90, start: -90 };
70
+ case "90-right":
71
+ return { sweep: 90, start: 0 };
72
+ case "270":
73
+ default:
74
+ return { sweep: 270, start: -135 };
45
75
  }
46
- return (v - this.minValue) / span * 270 - 135;
76
+ }
77
+ /**
78
+ * Per-edge crop (%) of the shared, origin-centered 448 SVG box each sector
79
+ * shows. All sectors render at the same natural scale, so the dial stays the
80
+ * same size; the sector only windows a different part (270 whole, 180 wide,
81
+ * 90 a quadrant).
82
+ */
83
+ get sectorClips() {
84
+ switch (this.sector) {
85
+ case "180":
86
+ return { top: 0, bottom: 44, left: 0, right: 0 };
87
+ case "90-left":
88
+ return { top: 0, bottom: 45, left: 0, right: 45 };
89
+ case "90-right":
90
+ return { top: 0, bottom: 45, left: 45, right: 0 };
91
+ case "270":
92
+ default:
93
+ return { top: 0, bottom: 0, left: 0, right: 0 };
94
+ }
95
+ }
96
+ get isSector90() {
97
+ return this.sector === "90-left" || this.sector === "90-right";
98
+ }
99
+ /** Renders one gauge readout; `withMeta`/`labelOnly` pick parts. */
100
+ renderReadout({
101
+ className,
102
+ variant,
103
+ alignment = ReadoutStackVerticalAlignment.vertical,
104
+ withMeta = true,
105
+ labelOnly = false
106
+ }) {
107
+ const withValue = !labelOnly;
108
+ return html`
109
+ <obc-readout
110
+ class=${className}
111
+ direction="vertical"
112
+ ?labelOnly=${labelOnly}
113
+ .variant=${variant}
114
+ .alignment=${alignment}
115
+ .valuePriority=${withValue ? this.priority : void 0}
116
+ .value=${withValue ? this.value : void 0}
117
+ .fractionDigits=${this.fractionDigits}
118
+ .label=${withMeta ? this.label : ""}
119
+ .unit=${withMeta ? this.unit : ""}
120
+ ></obc-readout>
121
+ `;
122
+ }
123
+ renderReadouts() {
124
+ if (!this.showReadout) {
125
+ return nothing;
126
+ }
127
+ const isNeedle = this.type === "needle";
128
+ const is90 = this.isSector90;
129
+ const is180 = this.sector === "180";
130
+ if (isNeedle && (is180 || is90)) {
131
+ return nothing;
132
+ }
133
+ if (is90) {
134
+ return this.renderReadout({
135
+ className: "gauge-readout-meta",
136
+ variant: ReadoutVariant.enhanced
137
+ });
138
+ }
139
+ if (isNeedle || is180) {
140
+ return this.renderReadout({
141
+ className: "gauge-readout-meta",
142
+ variant: ReadoutVariant.stack,
143
+ alignment: ReadoutStackVerticalAlignment.center
144
+ });
145
+ }
146
+ return html`
147
+ ${this.renderReadout({
148
+ className: "gauge-readout-value",
149
+ variant: ReadoutVariant.enhanced,
150
+ withMeta: false
151
+ })}
152
+ ${this.label || this.unit ? this.renderReadout({
153
+ className: "gauge-readout-meta",
154
+ variant: ReadoutVariant.stack,
155
+ alignment: ReadoutStackVerticalAlignment.center,
156
+ labelOnly: true
157
+ }) : nothing}
158
+ `;
47
159
  }
48
160
  render() {
161
+ const clips = this.sectorClips;
49
162
  return html`
50
- <obc-instrument-radial
51
- .value=${this.value}
52
- .state=${this.state}
53
- .priority=${this.priority}
54
- .setpoint=${this.setpoint}
55
- .newSetpoint=${this.newSetpoint}
56
- .setpointAtZeroDeadband=${this.setpointAtZeroDeadband}
57
- .setpointOverride=${this.setpointOverride}
58
- .touching=${this.touching}
59
- .autoAtSetpoint=${this.autoAtSetpoint}
60
- .autoAtSetpointDeadband=${this.autoAtSetpointDeadband}
61
- .animateSetpoint=${this.animateSetpoint}
62
- .maxValue=${this.maxValue}
63
- .minValue=${this.minValue}
64
- .getAngle=${this.getAngle}
65
- .showLabels=${this.showLabels}
66
- .primaryTickmarkInterval=${this.primaryTickmarkInterval}
67
- .secondaryTickmarkInterval=${this.secondaryTickmarkInterval}
68
- .tertiaryTickmarkInterval=${this.tertiaryTickmarkInterval}
69
- .type=${this.type}
70
- .needleType=${this.type}
71
- .tickmarksInside=${this.tickmarksInside}
72
- .tickmarkStyle=${this.tickmarkStyle}
73
- .advices=${this.advices}
163
+ <div
164
+ class=${classMap({
165
+ "gauge-radial-root": true,
166
+ "type-needle": this.type === "needle",
167
+ "sector-180": this.sector === "180",
168
+ "sector-90-left": this.sector === "90-left",
169
+ "sector-90-right": this.sector === "90-right"
170
+ /* deg90Right */
171
+ })}
74
172
  >
75
- </obc-instrument-radial>
173
+ <obc-instrument-radial
174
+ .value=${this.value}
175
+ .state=${this.state}
176
+ .priority=${this.priority}
177
+ .setpoint=${this.setpoint}
178
+ .newSetpoint=${this.newSetpoint}
179
+ .setpointAtZeroDeadband=${this.setpointAtZeroDeadband}
180
+ .setpointOverride=${this.setpointOverride}
181
+ .touching=${this.touching}
182
+ .autoAtSetpoint=${this.autoAtSetpoint}
183
+ .autoAtSetpointDeadband=${this.autoAtSetpointDeadband}
184
+ .animateSetpoint=${this.animateSetpoint}
185
+ .maxValue=${this.maxValue}
186
+ .minValue=${this.minValue}
187
+ .getAngle=${this.getAngle}
188
+ .showLabels=${this.showLabels}
189
+ .primaryTickmarkInterval=${this.primaryTickmarkInterval}
190
+ .secondaryTickmarkInterval=${this.secondaryTickmarkInterval}
191
+ .tertiaryTickmarkInterval=${this.tertiaryTickmarkInterval}
192
+ .type=${this.type}
193
+ .needleType=${this.type}
194
+ .tickmarksInside=${this.tickmarksInside}
195
+ .tickmarkStyle=${this.tickmarkStyle}
196
+ .advices=${this.isSector90 ? [] : this.advices}
197
+ .clipTop=${clips.top}
198
+ .clipBottom=${clips.bottom}
199
+ .clipLeft=${clips.left}
200
+ .clipRight=${clips.right}
201
+ .endLabelsMaxMin=${this.sector === "180"}
202
+ >
203
+ </obc-instrument-radial>
204
+ ${this.renderReadouts()}
205
+ </div>
76
206
  `;
77
207
  }
78
208
  };
209
+ ObcGaugeRadial.styles = unsafeCSS(componentStyle);
79
210
  __decorateClass([
80
211
  property({ type: Number })
81
212
  ], ObcGaugeRadial.prototype, "value", 2);
@@ -115,10 +246,26 @@ __decorateClass([
115
246
  __decorateClass([
116
247
  property({ type: Array, attribute: false })
117
248
  ], ObcGaugeRadial.prototype, "advices", 2);
249
+ __decorateClass([
250
+ property({ type: String, reflect: true })
251
+ ], ObcGaugeRadial.prototype, "sector", 2);
252
+ __decorateClass([
253
+ property({ type: Boolean })
254
+ ], ObcGaugeRadial.prototype, "showReadout", 2);
255
+ __decorateClass([
256
+ property({ type: String })
257
+ ], ObcGaugeRadial.prototype, "label", 2);
258
+ __decorateClass([
259
+ property({ type: String })
260
+ ], ObcGaugeRadial.prototype, "unit", 2);
261
+ __decorateClass([
262
+ property({ type: Number })
263
+ ], ObcGaugeRadial.prototype, "fractionDigits", 2);
118
264
  ObcGaugeRadial = __decorateClass([
119
265
  customElement("obc-gauge-radial")
120
266
  ], ObcGaugeRadial);
121
267
  export {
268
+ GaugeRadialSector,
122
269
  ObcGaugeRadial,
123
270
  ObcGaugeRadialType
124
271
  };