@oicl/openbridge-webcomponents-full-bundle 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 (185) 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
  134. package/src/alert-severity.ts +225 -0
  135. package/src/ar/building-blocks/poi-header/poi-header.css +38 -7
  136. package/src/ar/building-blocks/poi-header/poi-header.ts +6 -1
  137. package/src/ar/poi-button/poi-button.css +126 -32
  138. package/src/ar/poi-button/poi-button.ts +16 -1
  139. package/src/ar/types.ts +5 -0
  140. package/src/automation/automation-badge/automation-badge.ts +124 -17
  141. package/src/automation/automation-button/abstract-automation-button-storybook-helpers.ts +5 -0
  142. package/src/automation/automation-button/abstract-automation-button.ts +21 -3
  143. package/src/automation/automation-button/automation-button.css +9 -4
  144. package/src/automation/automation-button/automation-button.ts +25 -7
  145. package/src/automation/automation-tank/automation-tank.stories.ts +22 -0
  146. package/src/automation/automation-tank/automation-tank.ts +12 -3
  147. package/src/building-blocks/instrument-radial/instrument-radial.stories.ts +21 -0
  148. package/src/building-blocks/instrument-radial/instrument-radial.ts +118 -21
  149. package/src/components/accordion-card/accordion-card.css +33 -0
  150. package/src/components/accordion-card/accordion-card.stories.ts +2 -1
  151. package/src/components/accordion-card/accordion-card.ts +3 -4
  152. package/src/components/alert-button/alert-button.css +89 -5
  153. package/src/components/alert-button/alert-button.stories.ts +43 -0
  154. package/src/components/alert-button/alert-button.ts +43 -32
  155. package/src/components/alert-frame/alert-frame.css +116 -29
  156. package/src/components/alert-frame/alert-frame.stories.ts +63 -3
  157. package/src/components/alert-frame/alert-frame.ts +114 -23
  158. package/src/components/alert-frame/critical-badge.ts +39 -0
  159. package/src/components/alert-frame/diagnostic-badge.ts +52 -0
  160. package/src/components/alert-icon/alert-icon.stories.ts +41 -0
  161. package/src/components/alert-icon/alert-icon.ts +101 -38
  162. package/src/components/alert-icon/icons/icon-critical.ts +23 -0
  163. package/src/components/alert-list-details/alert-list-details.stories.ts +67 -0
  164. package/src/components/alert-list-details/alert-list-details.ts +11 -10
  165. package/src/components/badge/badge.css +52 -2
  166. package/src/components/badge/badge.stories.ts +75 -0
  167. package/src/components/badge/badge.ts +70 -2
  168. package/src/main.css +1 -0
  169. package/src/manual-icon/icon-alerts-critical-twotone.ts +60 -0
  170. package/src/manual-icon/icon-alerts-diagnostic-twotone.ts +60 -0
  171. package/src/mixins/alert.css +29 -0
  172. package/src/navigation-instruments/gauge-radial/gauge-radial.css +85 -0
  173. package/src/navigation-instruments/gauge-radial/gauge-radial.stories.ts +149 -7
  174. package/src/navigation-instruments/gauge-radial/gauge-radial.ts +212 -33
  175. package/src/navigation-instruments/readout/readout.css +7 -24
  176. package/src/navigation-instruments/readout/readout.stories.ts +57 -4
  177. package/src/navigation-instruments/readout/readout.ts +69 -63
  178. package/src/navigation-instruments/readout-list-item/readout-list-item.css +9 -42
  179. package/src/navigation-instruments/readout-list-item/readout-list-item.stories.ts +57 -14
  180. package/src/navigation-instruments/readout-list-item/readout-list-item.ts +54 -44
  181. package/src/navigation-instruments/watch/tickmark.ts +33 -6
  182. package/src/navigation-instruments/watch/watch.ts +60 -25
  183. package/src/palettes/critical.md +95 -0
  184. package/src/palettes/manual.css +165 -0
  185. package/src/types.ts +20 -3
package/src/main.css CHANGED
@@ -1,4 +1,5 @@
1
1
  @import "palettes/variables.css";
2
+ @import "palettes/manual.css";
2
3
  @import "components/radio/radio.css";
3
4
 
4
5
  html {
@@ -0,0 +1,60 @@
1
+ import {LitElement, html, css, svg} from 'lit';
2
+ import {property} from 'lit/decorators.js';
3
+ import {customElement} from '../decorator.js';
4
+
5
+ /**
6
+ * `<obi-alerts-critical-twotone>` – Two-tone bell icon for the ISA "critical" alert severity.
7
+ *
8
+ * Renders the alert (bell) glyph as a layered two-tone shape so the silhouette and
9
+ * fill can be tinted independently. Used wherever a critical-severity alert needs an
10
+ * icon representation (badges, frames, lists).
11
+ *
12
+ * ### Features
13
+ * - **Color modes:** Set `useCssColor` to render with the critical design tokens
14
+ * (`--alert-critical-color` / `--alert-critical-outline-color`); leave it `false`
15
+ * (default) to render with `currentColor` so the icon inherits its parent's color.
16
+ *
17
+ * ### Properties and Attributes
18
+ * - `useCssColor` (boolean): When true, fills the two tones with the critical color
19
+ * tokens instead of `currentColor`. Defaults to `false`.
20
+ */
21
+ @customElement('obi-alerts-critical-twotone')
22
+ export class ObiAlertsCriticalTwotone extends LitElement {
23
+ @property({type: Boolean}) useCssColor = false;
24
+
25
+ private icon = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
26
+ <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"/>
27
+ <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"/>
28
+ </svg>
29
+ `;
30
+
31
+ private iconCss = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
32
+ <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)"/>
33
+ <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)"/>
34
+ </svg>
35
+ `;
36
+
37
+ override render() {
38
+ return html`
39
+ <div class="wrapper">${this.useCssColor ? this.iconCss : this.icon}</div>
40
+ `;
41
+ }
42
+
43
+ static override styles = css`
44
+ .wrapper {
45
+ height: 100%;
46
+ width: 100%;
47
+ line-height: 0;
48
+ }
49
+ .wrapper > * {
50
+ height: 100%;
51
+ width: 100%;
52
+ }
53
+ `;
54
+ }
55
+
56
+ declare global {
57
+ interface HTMLElementTagNameMap {
58
+ 'obi-alerts-critical-twotone': ObiAlertsCriticalTwotone;
59
+ }
60
+ }
@@ -0,0 +1,60 @@
1
+ import {LitElement, html, css, svg} from 'lit';
2
+ import {property} from 'lit/decorators.js';
3
+ import {customElement} from '../decorator.js';
4
+
5
+ /**
6
+ * `<obi-alerts-diagnostic-twotone>` – Two-tone bell icon for the ISA "diagnostic" alert severity.
7
+ *
8
+ * Renders the alert (bell) glyph as a layered two-tone shape so the silhouette and
9
+ * fill can be tinted independently. Used wherever a diagnostic-severity alert needs an
10
+ * icon representation (badges, frames, lists).
11
+ *
12
+ * ### Features
13
+ * - **Color modes:** Set `useCssColor` to render with the diagnostic design tokens
14
+ * (`--alert-diagnostic-color` / `--alert-diagnostic-outline-color`); leave it `false`
15
+ * (default) to render with `currentColor` so the icon inherits its parent's color.
16
+ *
17
+ * ### Properties and Attributes
18
+ * - `useCssColor` (boolean): When true, fills the two tones with the diagnostic color
19
+ * tokens instead of `currentColor`. Defaults to `false`.
20
+ */
21
+ @customElement('obi-alerts-diagnostic-twotone')
22
+ export class ObiAlertsDiagnosticTwotone extends LitElement {
23
+ @property({type: Boolean}) useCssColor = false;
24
+
25
+ private icon = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
26
+ <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"/>
27
+ <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"/>
28
+ </svg>
29
+ `;
30
+
31
+ private iconCss = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
32
+ <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)"/>
33
+ <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)"/>
34
+ </svg>
35
+ `;
36
+
37
+ override render() {
38
+ return html`
39
+ <div class="wrapper">${this.useCssColor ? this.iconCss : this.icon}</div>
40
+ `;
41
+ }
42
+
43
+ static override styles = css`
44
+ .wrapper {
45
+ height: 100%;
46
+ width: 100%;
47
+ line-height: 0;
48
+ }
49
+ .wrapper > * {
50
+ height: 100%;
51
+ width: 100%;
52
+ }
53
+ `;
54
+ }
55
+
56
+ declare global {
57
+ interface HTMLElementTagNameMap {
58
+ 'obi-alerts-diagnostic-twotone': ObiAlertsDiagnosticTwotone;
59
+ }
60
+ }
@@ -1,3 +1,32 @@
1
+ @define-mixin alert-critical $wrapperClass {
2
+ &:focus {
3
+ outline: none;
4
+ }
5
+
6
+ & $(wrapperClass) {
7
+ border: 1px solid var(--critical-enabled-border-color);
8
+ background: var(--critical-enabled-background-color);
9
+ }
10
+
11
+ &:hover $(wrapperClass) {
12
+ border-color: var(--critical-hover-border-color);
13
+ background-color: var(--critical-hover-background-color);
14
+ }
15
+
16
+ &:active $(wrapperClass) {
17
+ border-color: var(--critical-pressed-border-color);
18
+ background-color: var(--critical-pressed-background-color);
19
+ }
20
+
21
+ &:focus-visible $(wrapperClass) {
22
+ background-color: var(--critical-focused-background-color);
23
+ border-color: var(--critical-focused-border-color);
24
+ outline-color: var(--border-outline-color);
25
+ outline-width: 4px;
26
+ outline-style: solid;
27
+ }
28
+ }
29
+
1
30
  @define-mixin alert-alarm $wrapperClass {
2
31
  &:focus {
3
32
  outline: none;
@@ -0,0 +1,85 @@
1
+ :host {
2
+ display: block;
3
+ width: 100%;
4
+ height: 100%;
5
+ }
6
+
7
+ /* Host takes each sector's crop aspect (see `sectorClips`): 270/90 square, 180
8
+ wide — so the dial is the same size at any width. */
9
+ :host([sector="270"]),
10
+ :host([sector="90-left"]),
11
+ :host([sector="90-right"]) {
12
+ height: auto;
13
+ aspect-ratio: 1;
14
+ }
15
+
16
+ /* 448 / 251 = the 180° crop's aspect (448 wide × 448·(1 − 44%) tall); keep in
17
+ sync with `sectorClips` bottom=44 in gauge-radial.ts. */
18
+ :host([sector="180"]) {
19
+ height: auto;
20
+ aspect-ratio: 448 / 251;
21
+ }
22
+
23
+ .gauge-radial-root {
24
+ /* Readout vertical placement per layout (% of the cropped host), tuned to the
25
+ watch geometry — re-check if the ring radii or the 448 box change. Which
26
+ layout uses which is in renderReadouts(). */
27
+ --readout-meta-top: 72%;
28
+ --readout-meta-top-needle: 63%;
29
+ --readout-meta-top-180: 60%;
30
+
31
+ position: relative;
32
+ width: 100%;
33
+ height: 100%;
34
+
35
+ .gauge-readout-value {
36
+ position: absolute;
37
+ left: 50%;
38
+ top: 50%;
39
+ transform: translate(-50%, -50%);
40
+ z-index: 1;
41
+ }
42
+
43
+ .gauge-readout-meta {
44
+ position: absolute;
45
+ left: 50%;
46
+ top: var(--readout-meta-top);
47
+ transform: translateX(-50%);
48
+ z-index: 1;
49
+ }
50
+
51
+ &.type-needle .gauge-readout-meta {
52
+ top: var(--readout-meta-top-needle);
53
+ }
54
+
55
+ &.sector-180 .gauge-readout-meta {
56
+ top: var(--readout-meta-top-180);
57
+ }
58
+
59
+ /* Nudge the corner readout inward (up + toward center) so it sits inside the
60
+ open quadrant rather than hugging the box corner. Symmetric for both
61
+ orientations — only the horizontal edge differs. */
62
+ &.sector-90-left .gauge-readout-meta,
63
+ &.sector-90-right .gauge-readout-meta {
64
+ --readout-90-inset: 6%;
65
+ bottom: var(--readout-90-inset);
66
+ top: auto;
67
+ transform: none;
68
+ }
69
+
70
+ &.sector-90-left .gauge-readout-meta {
71
+ left: auto;
72
+ right: var(--readout-90-inset);
73
+ }
74
+
75
+ &.sector-90-right .gauge-readout-meta {
76
+ left: var(--readout-90-inset);
77
+ right: auto;
78
+ }
79
+
80
+ /* 90-right readout sits in the bottom-left corner, so left-align the value
81
+ under the label (enhanced readouts right-align the value by default). */
82
+ &.sector-90-right .gauge-readout-meta::part(value-wrapper) {
83
+ justify-self: start;
84
+ }
85
+ }
@@ -1,33 +1,57 @@
1
1
  import type {Meta, StoryObj} from '@storybook/web-components-vite';
2
- import {ObcGaugeRadial, ObcGaugeRadialType} from './gauge-radial.js';
2
+ import {
3
+ GaugeRadialSector,
4
+ ObcGaugeRadial,
5
+ ObcGaugeRadialType,
6
+ } from './gauge-radial.js';
3
7
  import './gauge-radial.js';
4
8
  import {widthDecorator} from '../../storybook-util.js';
5
9
  import {AdviceType} from '../watch/advice.js';
6
10
  import {TickmarkStyle} from '../watch/tickmark.js';
7
11
  import {InstrumentState, Priority} from '../types.js';
8
12
 
9
- const meta: Meta<typeof ObcGaugeRadial> = {
13
+ type GaugeRadialStoryArgs = Partial<ObcGaugeRadial> & {
14
+ width?: number;
15
+ height?: number;
16
+ };
17
+
18
+ const meta = {
10
19
  title: 'Instruments/Gauge Radial',
11
- tags: ['6.0'],
20
+ tags: ['autodocs', '6.0'],
12
21
  component: 'obc-gauge-radial',
13
22
  decorators: [widthDecorator],
14
23
  args: {
15
24
  width: 400,
16
25
  },
17
26
  argTypes: {
18
- state: {control: 'select', options: Object.values(InstrumentState)},
27
+ width: {control: {type: 'range', min: 100, max: 1000, step: 1}},
28
+ height: {control: {type: 'range', min: 100, max: 1000, step: 1}},
29
+ type: {control: 'select', options: Object.values(ObcGaugeRadialType)},
30
+ sector: {control: 'select', options: Object.values(GaugeRadialSector)},
19
31
  priority: {control: 'select', options: Object.values(Priority)},
20
- tickmarksInside: {control: 'boolean'},
32
+ state: {control: 'select', options: Object.values(InstrumentState)},
21
33
  tickmarkStyle: {
22
34
  control: 'select',
23
35
  options: Object.values(TickmarkStyle),
24
36
  },
25
37
  showLabels: {control: 'boolean'},
38
+ tickmarksInside: {control: 'boolean'},
39
+ showReadout: {control: 'boolean'},
40
+ value: {control: 'number'},
41
+ minValue: {control: 'number'},
42
+ maxValue: {control: 'number'},
43
+ primaryTickmarkInterval: {control: 'number'},
44
+ secondaryTickmarkInterval: {control: 'number'},
45
+ tertiaryTickmarkInterval: {control: 'number'},
46
+ fractionDigits: {control: 'number'},
47
+ label: {control: 'text'},
48
+ unit: {control: 'text'},
49
+ advices: {control: 'object'},
26
50
  },
27
- } satisfies Meta<ObcGaugeRadial>;
51
+ } satisfies Meta<GaugeRadialStoryArgs>;
28
52
 
29
53
  export default meta;
30
- type Story = StoryObj<ObcGaugeRadial>;
54
+ type Story = StoryObj<GaugeRadialStoryArgs>;
31
55
 
32
56
  export const Positive: Story = {
33
57
  args: {
@@ -128,6 +152,124 @@ export const IrregularRange: Story = {
128
152
  },
129
153
  };
130
154
 
155
+ const sectorStoryArgs = {
156
+ value: 50,
157
+ minValue: 0,
158
+ maxValue: 100,
159
+ type: ObcGaugeRadialType.filled,
160
+ showLabels: true,
161
+ } as const;
162
+
163
+ export const Sector270: Story = {
164
+ args: {
165
+ ...sectorStoryArgs,
166
+ sector: GaugeRadialSector.deg270,
167
+ },
168
+ };
169
+
170
+ export const Sector180: Story = {
171
+ args: {
172
+ ...sectorStoryArgs,
173
+ sector: GaugeRadialSector.deg180,
174
+ },
175
+ };
176
+
177
+ export const Sector180WithReadout: Story = {
178
+ args: {
179
+ ...sectorStoryArgs,
180
+ sector: GaugeRadialSector.deg180,
181
+ showReadout: true,
182
+ label: 'Label',
183
+ unit: 'unit',
184
+ value: 123,
185
+ },
186
+ };
187
+
188
+ // Regression for the width-derived "Max-min" end-label inset: wide labels on
189
+ // both ends (-250 / 1000). The old per-side literals (11/6) broke for these;
190
+ // min/max are interval multiples so the end labels sit on the primary grid.
191
+ export const Sector180WideEndLabels: Story = {
192
+ args: {
193
+ ...sectorStoryArgs,
194
+ sector: GaugeRadialSector.deg180,
195
+ tickmarksInside: true,
196
+ minValue: -250,
197
+ maxValue: 1000,
198
+ value: 500,
199
+ primaryTickmarkInterval: 250,
200
+ secondaryTickmarkInterval: 50,
201
+ },
202
+ };
203
+
204
+ export const Sector90Left: Story = {
205
+ args: {
206
+ ...sectorStoryArgs,
207
+ sector: GaugeRadialSector.deg90Left,
208
+ width: 200,
209
+ },
210
+ };
211
+
212
+ export const Sector90Right: Story = {
213
+ args: {
214
+ ...sectorStoryArgs,
215
+ sector: GaugeRadialSector.deg90Right,
216
+ width: 200,
217
+ },
218
+ };
219
+
220
+ export const Sector90LeftWithReadout: Story = {
221
+ args: {
222
+ ...sectorStoryArgs,
223
+ sector: GaugeRadialSector.deg90Left,
224
+ showReadout: true,
225
+ label: 'Label',
226
+ unit: 'unit',
227
+ value: 123,
228
+ width: 200,
229
+ },
230
+ };
231
+
232
+ export const Sector90RightWithReadout: Story = {
233
+ args: {
234
+ ...sectorStoryArgs,
235
+ sector: GaugeRadialSector.deg90Right,
236
+ showReadout: true,
237
+ label: 'Label',
238
+ unit: 'unit',
239
+ value: 123,
240
+ width: 200,
241
+ },
242
+ };
243
+
244
+ const readoutStoryArgs = {
245
+ value: 123,
246
+ minValue: 0,
247
+ maxValue: 100,
248
+ type: ObcGaugeRadialType.filled,
249
+ sector: GaugeRadialSector.deg270,
250
+ showReadout: true,
251
+ label: 'Label',
252
+ unit: 'unit',
253
+ } as const;
254
+
255
+ export const WithReadout: Story = {
256
+ args: readoutStoryArgs,
257
+ };
258
+
259
+ export const WithReadoutEnhanced: Story = {
260
+ args: {
261
+ ...readoutStoryArgs,
262
+ priority: Priority.enhanced,
263
+ },
264
+ };
265
+
266
+ export const WithReadoutNeedle: Story = {
267
+ args: {
268
+ ...readoutStoryArgs,
269
+ type: ObcGaugeRadialType.needle,
270
+ },
271
+ };
272
+
131
273
  export const WideAdviceSpan: Story = {
132
274
  args: {
133
275
  value: 320,