@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.22 → 2.2.0-next.23

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 (338) hide show
  1. package/custom-elements-manifest.config.mjs +2 -1
  2. package/custom-elements.json +312 -17
  3. package/llms/components/obc-accordion-card.md +141 -0
  4. package/llms/components/obc-accordion-item.md +90 -0
  5. package/llms/components/obc-advice-button.md +87 -0
  6. package/llms/components/obc-advice-floating-item.md +113 -0
  7. package/llms/components/obc-advice-menu-item.md +87 -0
  8. package/llms/components/obc-advice-message-item.md +138 -0
  9. package/llms/components/obc-alert-button-item.md +117 -0
  10. package/llms/components/obc-alert-button.md +134 -0
  11. package/llms/components/obc-alert-counter-item.md +74 -0
  12. package/llms/components/obc-alert-detail-page.md +45 -0
  13. package/llms/components/obc-alert-floating-item.md +53 -0
  14. package/llms/components/obc-alert-frame.md +142 -0
  15. package/llms/components/obc-alert-icon.md +79 -0
  16. package/llms/components/obc-alert-list-details-experimental.md +89 -0
  17. package/llms/components/obc-alert-list-details.md +38 -0
  18. package/llms/components/obc-alert-list-page-small.md +39 -0
  19. package/llms/components/obc-alert-list.md +37 -0
  20. package/llms/components/obc-alert-menu-item.md +128 -0
  21. package/llms/components/obc-alert-menu.md +115 -0
  22. package/llms/components/obc-alert-subsystem-button.md +88 -0
  23. package/llms/components/obc-alert-subsystem-counter.md +110 -0
  24. package/llms/components/obc-analog-threeway-valve.md +106 -0
  25. package/llms/components/obc-analog-valve.md +74 -0
  26. package/llms/components/obc-app-button.md +83 -0
  27. package/llms/components/obc-app-menu.md +69 -0
  28. package/llms/components/obc-area-graph.md +333 -0
  29. package/llms/components/obc-attachment-list-item.md +49 -0
  30. package/llms/components/obc-audio-output.md +59 -0
  31. package/llms/components/obc-audio-recording-item.md +91 -0
  32. package/llms/components/obc-automation-badge.md +66 -0
  33. package/llms/components/obc-automation-button-readout-stack.md +71 -0
  34. package/llms/components/obc-automation-button.md +86 -0
  35. package/llms/components/obc-automation-input-modal.md +48 -0
  36. package/llms/components/obc-automation-readout.md +32 -0
  37. package/llms/components/obc-automation-tank.md +156 -0
  38. package/llms/components/obc-azimuth-thruster-labeled.md +56 -0
  39. package/llms/components/obc-azimuth-thruster.md +80 -0
  40. package/llms/components/obc-badge-command.md +26 -0
  41. package/llms/components/obc-badge.md +151 -0
  42. package/llms/components/obc-bar-horizontal.md +123 -0
  43. package/llms/components/obc-bar-vertical.md +125 -0
  44. package/llms/components/obc-battery-icon.md +38 -0
  45. package/llms/components/obc-bearing-indicator.md +27 -0
  46. package/llms/components/obc-bipolar-transistor.md +64 -0
  47. package/llms/components/obc-breadcrumb.md +58 -0
  48. package/llms/components/obc-brilliance-menu.md +115 -0
  49. package/llms/components/obc-bus.md +64 -0
  50. package/llms/components/obc-button.md +110 -0
  51. package/llms/components/obc-calendar.md +91 -0
  52. package/llms/components/obc-capacitor.md +64 -0
  53. package/llms/components/obc-card.md +103 -0
  54. package/llms/components/obc-chart-object-vessel-button.md +103 -0
  55. package/llms/components/obc-chat-message.md +35 -0
  56. package/llms/components/obc-check-button.md +104 -0
  57. package/llms/components/obc-checkbox-item.md +95 -0
  58. package/llms/components/obc-checkbox-list.md +73 -0
  59. package/llms/components/obc-checkbox.md +97 -0
  60. package/llms/components/obc-circular-progress.md +36 -0
  61. package/llms/components/obc-clock.md +86 -0
  62. package/llms/components/obc-command-button.md +56 -0
  63. package/llms/components/obc-command-menu.md +135 -0
  64. package/llms/components/obc-communication-table.md +31 -0
  65. package/llms/components/obc-compass-flat.md +79 -0
  66. package/llms/components/obc-compass-indicator.md +61 -0
  67. package/llms/components/obc-compass-sector.md +110 -0
  68. package/llms/components/obc-compass.md +157 -0
  69. package/llms/components/obc-context-menu-input.md +191 -0
  70. package/llms/components/obc-converter.md +64 -0
  71. package/llms/components/obc-corner-line.md +29 -0
  72. package/llms/components/obc-current.md +79 -0
  73. package/llms/components/obc-damper.md +62 -0
  74. package/llms/components/obc-date-item.md +66 -0
  75. package/llms/components/obc-depth-actual.md +69 -0
  76. package/llms/components/obc-depth-indicator.md +31 -0
  77. package/llms/components/obc-depth-top-band.md +43 -0
  78. package/llms/components/obc-depth.md +94 -0
  79. package/llms/components/obc-diagnostic-button.md +71 -0
  80. package/llms/components/obc-diagnostic-menu.md +88 -0
  81. package/llms/components/obc-digital-threeway-valve.md +112 -0
  82. package/llms/components/obc-digital-valve.md +78 -0
  83. package/llms/components/obc-diodes.md +64 -0
  84. package/llms/components/obc-direction-line.md +28 -0
  85. package/llms/components/obc-divider.md +44 -0
  86. package/llms/components/obc-donut-chart.md +116 -0
  87. package/llms/components/obc-draft-trim.md +67 -0
  88. package/llms/components/obc-dropdown-button.md +99 -0
  89. package/llms/components/obc-electricity-battery.md +83 -0
  90. package/llms/components/obc-elevated-card-radio-group.md +103 -0
  91. package/llms/components/obc-elevated-card-radio.md +104 -0
  92. package/llms/components/obc-elevated-card.md +146 -0
  93. package/llms/components/obc-end-point-line.md +29 -0
  94. package/llms/components/obc-event-item.md +47 -0
  95. package/llms/components/obc-event-list.md +37 -0
  96. package/llms/components/obc-fan.md +68 -0
  97. package/llms/components/obc-filter-chip.md +91 -0
  98. package/llms/components/obc-filter.md +64 -0
  99. package/llms/components/obc-floating-item.md +125 -0
  100. package/llms/components/obc-form-container.md +45 -0
  101. package/llms/components/obc-form-footer-container.md +34 -0
  102. package/llms/components/obc-form-group.md +80 -0
  103. package/llms/components/obc-form-item.md +95 -0
  104. package/llms/components/obc-gauge-bar-indicator.md +46 -0
  105. package/llms/components/obc-gauge-generator.md +102 -0
  106. package/llms/components/obc-gauge-horizontal.md +169 -0
  107. package/llms/components/obc-gauge-motors-and-pumps.md +110 -0
  108. package/llms/components/obc-gauge-proportional.md +134 -0
  109. package/llms/components/obc-gauge-radial-indicator.md +76 -0
  110. package/llms/components/obc-gauge-radial.md +163 -0
  111. package/llms/components/obc-gauge-trend-indicator.md +53 -0
  112. package/llms/components/obc-gauge-trend.md +271 -0
  113. package/llms/components/obc-gauge-valve.md +114 -0
  114. package/llms/components/obc-gauge-vertical.md +169 -0
  115. package/llms/components/obc-gnss-skyplot.md +80 -0
  116. package/llms/components/obc-graph-mini.md +28 -0
  117. package/llms/components/obc-ground.md +64 -0
  118. package/llms/components/obc-heading-indicator.md +42 -0
  119. package/llms/components/obc-heading.md +106 -0
  120. package/llms/components/obc-heat-exchanger.md +80 -0
  121. package/llms/components/obc-heat-pump.md +79 -0
  122. package/llms/components/obc-heave-indicator.md +38 -0
  123. package/llms/components/obc-heave.md +60 -0
  124. package/llms/components/obc-horizontal-line.md +29 -0
  125. package/llms/components/obc-hydraulic-check-valve.md +36 -0
  126. package/llms/components/obc-hydraulic-separator.md +80 -0
  127. package/llms/components/obc-hydraulic-valve-4-3.md +71 -0
  128. package/llms/components/obc-hydraulic-valve-x-2.md +68 -0
  129. package/llms/components/obc-icon-button.md +117 -0
  130. package/llms/components/obc-icon-check-button.md +85 -0
  131. package/llms/components/obc-indicator-battery.md +69 -0
  132. package/llms/components/obc-indicator-engine.md +39 -0
  133. package/llms/components/obc-indicator-generator.md +59 -0
  134. package/llms/components/obc-indicator-graph.md +33 -0
  135. package/llms/components/obc-indicator-tank-atmospheric.md +69 -0
  136. package/llms/components/obc-input-chip.md +96 -0
  137. package/llms/components/obc-instrument-field.md +172 -0
  138. package/llms/components/obc-instrument-radial.md +77 -0
  139. package/llms/components/obc-integration-app-bar.md +41 -0
  140. package/llms/components/obc-integration-bar-dropdown.md +71 -0
  141. package/llms/components/obc-integration-bar.md +72 -0
  142. package/llms/components/obc-integration-button.md +62 -0
  143. package/llms/components/obc-integration-dropdown-button.md +75 -0
  144. package/llms/components/obc-integration-fleet-button.md +41 -0
  145. package/llms/components/obc-integration-tabs.md +28 -0
  146. package/llms/components/obc-integration-vessel-menu.md +58 -0
  147. package/llms/components/obc-integration-vessel-selector.md +32 -0
  148. package/llms/components/obc-keyboard-full.md +175 -0
  149. package/llms/components/obc-keyboard-numeric.md +77 -0
  150. package/llms/components/obc-line-cross.md +28 -0
  151. package/llms/components/obc-line-graph.md +164 -0
  152. package/llms/components/obc-line-overlap.md +28 -0
  153. package/llms/components/obc-logic.md +64 -0
  154. package/llms/components/obc-main-engine-indicator.md +55 -0
  155. package/llms/components/obc-main-engine.md +54 -0
  156. package/llms/components/obc-menu-button.md +158 -0
  157. package/llms/components/obc-message-menu-item.md +165 -0
  158. package/llms/components/obc-modal-window.md +139 -0
  159. package/llms/components/obc-mosfet.md +64 -0
  160. package/llms/components/obc-motor.md +73 -0
  161. package/llms/components/obc-navigation-item-group.md +82 -0
  162. package/llms/components/obc-navigation-item.md +138 -0
  163. package/llms/components/obc-navigation-menu.md +135 -0
  164. package/llms/components/obc-non-return-valve.md +79 -0
  165. package/llms/components/obc-notification-badge-button.md +87 -0
  166. package/llms/components/obc-notification-button.md +92 -0
  167. package/llms/components/obc-notification-floating-item.md +121 -0
  168. package/llms/components/obc-notification-menu-item.md +87 -0
  169. package/llms/components/obc-notification-message-item.md +127 -0
  170. package/llms/components/obc-number-input-field.md +97 -0
  171. package/llms/components/obc-pagination.md +95 -0
  172. package/llms/components/obc-pie-chart.md +120 -0
  173. package/llms/components/obc-pitch-indicator.md +39 -0
  174. package/llms/components/obc-pitch-roll-heave.md +86 -0
  175. package/llms/components/obc-pitch-roll-yaw.md +72 -0
  176. package/llms/components/obc-pitch-roll.md +63 -0
  177. package/llms/components/obc-pitch.md +81 -0
  178. package/llms/components/obc-pivot-item-group.md +79 -0
  179. package/llms/components/obc-pivot-item.md +75 -0
  180. package/llms/components/obc-poi-aton.md +68 -0
  181. package/llms/components/obc-poi-button-aton.md +54 -0
  182. package/llms/components/obc-poi-button-data.md +53 -0
  183. package/llms/components/obc-poi-button-vessel.md +55 -0
  184. package/llms/components/obc-poi-button.md +94 -0
  185. package/llms/components/obc-poi-card-header.md +90 -0
  186. package/llms/components/obc-poi-card.md +110 -0
  187. package/llms/components/obc-poi-controller.md +151 -0
  188. package/llms/components/obc-poi-data.md +72 -0
  189. package/llms/components/obc-poi-graphic-line.md +70 -0
  190. package/llms/components/obc-poi-group.md +85 -0
  191. package/llms/components/obc-poi-header.md +71 -0
  192. package/llms/components/obc-poi-layer-stack.md +85 -0
  193. package/llms/components/obc-poi-layer.md +110 -0
  194. package/llms/components/obc-poi-line.md +70 -0
  195. package/llms/components/obc-poi-object-aton.md +45 -0
  196. package/llms/components/obc-poi-object-data.md +48 -0
  197. package/llms/components/obc-poi-object-vessel.md +95 -0
  198. package/llms/components/obc-poi-object.md +82 -0
  199. package/llms/components/obc-poi-pointer.md +70 -0
  200. package/llms/components/obc-poi-selection-frame.md +66 -0
  201. package/llms/components/obc-poi-vessel.md +70 -0
  202. package/llms/components/obc-poi.md +140 -0
  203. package/llms/components/obc-polar-chart.md +126 -0
  204. package/llms/components/obc-position-deviation.md +84 -0
  205. package/llms/components/obc-pressure-reduction-valve.md +88 -0
  206. package/llms/components/obc-pressure-sustain-valve.md +85 -0
  207. package/llms/components/obc-progress-bar.md +102 -0
  208. package/llms/components/obc-progress-button.md +111 -0
  209. package/llms/components/obc-progress-indicator-dots.md +57 -0
  210. package/llms/components/obc-propulsion-azimuth-indicator.md +48 -0
  211. package/llms/components/obc-pump.md +76 -0
  212. package/llms/components/obc-radial-bar-chart.md +103 -0
  213. package/llms/components/obc-radio.md +82 -0
  214. package/llms/components/obc-rate-of-turn.md +95 -0
  215. package/llms/components/obc-readout-block.md +137 -0
  216. package/llms/components/obc-readout-list-item.md +142 -0
  217. package/llms/components/obc-readout-list.md +85 -0
  218. package/llms/components/obc-readout.md +169 -0
  219. package/llms/components/obc-resistor.md +64 -0
  220. package/llms/components/obc-rich-button.md +92 -0
  221. package/llms/components/obc-roll-indicator.md +38 -0
  222. package/llms/components/obc-roll.md +56 -0
  223. package/llms/components/obc-rot-indicator.md +32 -0
  224. package/llms/components/obc-rot-linear.md +68 -0
  225. package/llms/components/obc-rot-sector.md +125 -0
  226. package/llms/components/obc-router.md +64 -0
  227. package/llms/components/obc-rudder-indicator.md +54 -0
  228. package/llms/components/obc-rudder.md +112 -0
  229. package/llms/components/obc-ruler-pointer.md +57 -0
  230. package/llms/components/obc-scrollbar.md +57 -0
  231. package/llms/components/obc-sequence-card.md +119 -0
  232. package/llms/components/obc-sequence-connector.md +70 -0
  233. package/llms/components/obc-sequence-item.md +64 -0
  234. package/llms/components/obc-sequence-loading-spinner.md +70 -0
  235. package/llms/components/obc-sequence-modal.md +89 -0
  236. package/llms/components/obc-sequence-step.md +48 -0
  237. package/llms/components/obc-sequence-toolbar.md +108 -0
  238. package/llms/components/obc-slide-button.md +111 -0
  239. package/llms/components/obc-slider-double.md +137 -0
  240. package/llms/components/obc-slider.md +143 -0
  241. package/llms/components/obc-source.md +64 -0
  242. package/llms/components/obc-speed-arrows.md +39 -0
  243. package/llms/components/obc-speed-directions.md +66 -0
  244. package/llms/components/obc-speed-gauge.md +124 -0
  245. package/llms/components/obc-speed-indicator.md +37 -0
  246. package/llms/components/obc-split-button.md +144 -0
  247. package/llms/components/obc-start-stop-switch.md +126 -0
  248. package/llms/components/obc-status-indicator.md +30 -0
  249. package/llms/components/obc-stepper-box.md +90 -0
  250. package/llms/components/obc-surge-sway-yaw.md +95 -0
  251. package/llms/components/obc-switch.md +69 -0
  252. package/llms/components/obc-system-button.md +112 -0
  253. package/llms/components/obc-system-menu.md +67 -0
  254. package/llms/components/obc-tab-item.md +161 -0
  255. package/llms/components/obc-tab-row.md +151 -0
  256. package/llms/components/obc-tabbed-card.md +148 -0
  257. package/llms/components/obc-table-header-item.md +42 -0
  258. package/llms/components/obc-table.md +124 -0
  259. package/llms/components/obc-tag.md +41 -0
  260. package/llms/components/obc-text-input-field.md +94 -0
  261. package/llms/components/obc-textarea-field.md +186 -0
  262. package/llms/components/obc-textbox.md +80 -0
  263. package/llms/components/obc-three-way-line.md +29 -0
  264. package/llms/components/obc-thruster.md +64 -0
  265. package/llms/components/obc-title-container.md +81 -0
  266. package/llms/components/obc-toggle-button-group.md +184 -0
  267. package/llms/components/obc-toggle-button-option.md +126 -0
  268. package/llms/components/obc-toggle-button-three-state.md +38 -0
  269. package/llms/components/obc-toggle-button-vertical-group.md +142 -0
  270. package/llms/components/obc-toggle-button-vertical-option.md +110 -0
  271. package/llms/components/obc-toggle-switch.md +126 -0
  272. package/llms/components/obc-toggletip.md +135 -0
  273. package/llms/components/obc-tooltip.md +106 -0
  274. package/llms/components/obc-top-bar.md +194 -0
  275. package/llms/components/obc-top-view-propulsion.md +84 -0
  276. package/llms/components/obc-topbar-message-item.md +150 -0
  277. package/llms/components/obc-transformer.md +64 -0
  278. package/llms/components/obc-transmitter-button.md +101 -0
  279. package/llms/components/obc-transmitter-stack.md +79 -0
  280. package/llms/components/obc-transmitter.md +114 -0
  281. package/llms/components/obc-tree-navigation-group.md +69 -0
  282. package/llms/components/obc-tree-navigation-item.md +110 -0
  283. package/llms/components/obc-tree-navigation.md +73 -0
  284. package/llms/components/obc-tunnel-thruster.md +59 -0
  285. package/llms/components/obc-user-button.md +107 -0
  286. package/llms/components/obc-user-menu.md +154 -0
  287. package/llms/components/obc-valve-analog-three-way-icon.md +69 -0
  288. package/llms/components/obc-valve-analog-two-way-icon.md +39 -0
  289. package/llms/components/obc-velocity-projection-plot.md +34 -0
  290. package/llms/components/obc-vendor-button.md +63 -0
  291. package/llms/components/obc-vertical-line.md +33 -0
  292. package/llms/components/obc-watch-flat.md +54 -0
  293. package/llms/components/obc-watch.md +206 -0
  294. package/llms/components/obc-wind-indicator.md +52 -0
  295. package/llms/components/obc-wind-propulsion.md +92 -0
  296. package/llms/components/obc-wind.md +46 -0
  297. package/llms/docs/ar-poi-projection.md +36 -0
  298. package/llms/docs/automation-sequence-step-diagram-playground.md +13 -0
  299. package/llms/docs/building-blocks-advice.md +31 -0
  300. package/llms/docs/building-blocks-external-scale.md +138 -0
  301. package/llms/docs/building-blocks-setpoint.md +119 -0
  302. package/llms/docs/introduction-advice-system.md +161 -0
  303. package/llms/docs/introduction-getting-started.md +94 -0
  304. package/llms/docs/introduction-introduction.md +27 -0
  305. package/llms/docs/introduction-join-the-project.md +11 -0
  306. package/llms/docs/introduction-migration-guide-2-0-to-2-1.md +126 -0
  307. package/llms/docs/introduction-migration-guide-2-1-to-2-2.md +106 -0
  308. package/llms/docs/introduction-migration-guide.md +1063 -0
  309. package/llms/docs/palettes-categorical-colour.md +9 -0
  310. package/llms/llms-full.txt +28380 -0
  311. package/llms/llms.txt +368 -0
  312. package/package.json +12 -2
  313. package/script/cem-plugins/lifecycle.d.mts +6 -0
  314. package/script/cem-plugins/lifecycle.mjs +48 -0
  315. package/script/cem-plugins.test.ts +52 -1
  316. package/script/generate-llms-txt.ts +34 -0
  317. package/script/llms/channel.test.ts +69 -0
  318. package/script/llms/channel.ts +63 -0
  319. package/script/llms/generate.test.ts +143 -0
  320. package/script/llms/generate.ts +229 -0
  321. package/script/llms/manifest.test.ts +160 -0
  322. package/script/llms/manifest.ts +109 -0
  323. package/script/llms/markdown.test.ts +22 -0
  324. package/script/llms/markdown.ts +37 -0
  325. package/script/llms/mdx.test.ts +172 -0
  326. package/script/llms/mdx.ts +171 -0
  327. package/script/llms/render-component.test.ts +290 -0
  328. package/script/llms/render-component.ts +208 -0
  329. package/script/llms/render-guides.test.ts +105 -0
  330. package/script/llms/render-guides.ts +51 -0
  331. package/script/llms/render-llms-txt.test.ts +222 -0
  332. package/script/llms/render-llms-txt.ts +185 -0
  333. package/script/llms/sources.test.ts +118 -0
  334. package/script/llms/sources.ts +89 -0
  335. package/script/llms/stories.test.ts +193 -0
  336. package/script/llms/stories.ts +256 -0
  337. package/script/llms/types.ts +95 -0
  338. package/script/prepare-full-bundle.ts +1 -0
@@ -0,0 +1,120 @@
1
+ # `<obc-pie-chart>`
2
+
3
+ A customizable pie chart component for visualizing proportional data as segments, with optional sunburst subsegments and outer labels.
4
+
5
+ Lifecycle: beta. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/bars-and-graphs-pie-chart--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/bars-graphs/pie-chart/pie-chart.ts)
6
+
7
+ `<obc-pie-chart>` – A customizable pie chart component for visualizing proportional data as segments, with optional sunburst subsegments and outer labels.
8
+
9
+ This component renders an interactive pie chart powered by Chart.js, displaying data segments as arcs with optional outer labels and a sunburst mode for hierarchical data. It supports customizable colors, percentage or unit display, and adapts its layout based on available space. Labels are hidden when the chart is too small (< 192px height), ensuring clarity at all sizes.
10
+
11
+ ## Features
12
+ - **Fixed Height ⇒ Fixed Circumference:** The chart's circumference is determined by the `fixedHeight` property (default: 320px). This ensures the donut's circumference remains consistent and matches other radial instruments, regardless of the available browser or container width. The chart does not scale to fill the width; instead, it always uses the specified fixed height to define its size and circumference.
13
+ - **Layout:**
14
+ - Full 360° pie chart layout.
15
+ - **Outer Labels:**
16
+ - Optional labels positioned outside the chart showing segment names and values.
17
+ - Supports percentage or custom units (e.g., "kW", "kg", "MB").
18
+ - Configurable decimal places and maximum label length (with trimming).
19
+ - **Sunburst Mode:**
20
+ - Enable hierarchical data display with interactive subsegments (children) as an outer ring.
21
+ - Click a segment to expand/collapse its children in the sunburst ring.
22
+ - **Customization:**
23
+ - Custom segment colors (with automatic fallback to theme palette).
24
+ - Adjustable outer label formatting and units.
25
+ - **Color Priority:** Set `priority` to `Priority.enhanced` to use the blue/enhanced
26
+ color palette instead of the default gray/regular palette (default: `Priority.regular`).
27
+ - **Responsive Behavior:**
28
+ - Automatically hides labels when height < 192px.
29
+ - Maintains aspect ratio and adjusts padding for optimal label positioning.
30
+ - **Theme Integration:**
31
+ - Colors update automatically when the `data-obc-theme` attribute changes on the `<html>` element.
32
+ - Example:
33
+ ```
34
+ <html lang="en" data-obc-theme="day"></html>
35
+ ```
36
+
37
+ ## Example
38
+
39
+ **Basic Usage**
40
+ ```html
41
+ <obc-pie-chart></obc-pie-chart>
42
+ <script>
43
+ document.querySelector('obc-pie-chart').data = [
44
+ {label: 'A', value: 50},
45
+ {label: 'B', value: 30},
46
+ {label: 'C', value: 20}
47
+ ];
48
+ </script>
49
+ ```
50
+
51
+ **With Sunburst Subsegments**
52
+ ```html
53
+ <obc-pie-chart></obc-pie-chart>
54
+ <script>
55
+ const chart = document.querySelector('obc-pie-chart');
56
+ chart.sunburst = true;
57
+ chart.data = [
58
+ {label: 'A', value: 50, children: [
59
+ {label: 'A1', value: 30},
60
+ {label: 'A2', value: 20}
61
+ ]},
62
+ {label: 'B', value: 30}
63
+ ];
64
+ </script>
65
+ ```
66
+
67
+ **Custom Colors and Units**
68
+ ```html
69
+ <obc-pie-chart></obc-pie-chart>
70
+ <script>
71
+ const chart = document.querySelector('obc-pie-chart');
72
+ chart.showOuterLabels = true;
73
+ chart.outerLabelUnit = 'kW';
74
+ chart.outerLabelDecimalPlaces = 2;
75
+ chart.data = [
76
+ {label: 'Critical', value: 20},
77
+ {label: 'Warning', value: 35},
78
+ {label: 'Normal', value: 45}
79
+ ];
80
+ chart.colors = ['#e74c3c', '#f39c12', '#2ecc71'];
81
+ </script>
82
+ ```
83
+
84
+ ## Properties
85
+
86
+ | Property | Attribute | Type | Default | Description |
87
+ | --- | --- | --- | --- | --- |
88
+ | data | | `PieChartDataItem[]` | `[]` | Chart data segments with optional children subsegments for sunburst mode (set via JavaScript). |
89
+ | colors | | `string[]` | `[]` | Custom segment colors (set via JavaScript) with fallback to theme palette |
90
+ | priority | priority | `Priority` | | |
91
+ | showOuterLabels | showOuterLabels | `boolean` | `false` | Show outer labels, default: false |
92
+ | showUnit | showUnit | `boolean` | `false` | Whether to show unit in labels, default: false |
93
+ | sunburst | sunburst | `boolean` | `false` | Enable sunburst mode: clicking a segment expands or collapses its children as an outer ring, default: false |
94
+ | outerLabelUnit | outerLabelUnit | `string` | `'%'` | Unit string to append to outer labels, default: "%" |
95
+ | outerLabelMaxLength | outerLabelMaxLength | `number` | `0` | Maximum character length for labels before trim (0 = no limit), default: 0 Available when `showOuterLabels==true`. |
96
+ | outerLabelDecimalPlaces | outerLabelDecimalPlaces | `number` | `0` | Number of decimal places in labels, default: 0 |
97
+ | legend | legend | `boolean` | `false` | Whether to display the legend below the chart, default: false |
98
+ | showDebugOverlay | showDebugOverlay | `boolean` | `false` | Show debug overlay for development, default: false |
99
+ | fixedHeight | fixedHeight | `number` | `320` | Fixed height of the chart in pixels (determines chart circumference), default: 320. The chart's circumference is always based on this fixed height to match other radial instruments. |
100
+
101
+ ## Events
102
+
103
+ None.
104
+
105
+ ## Slots
106
+
107
+ None.
108
+
109
+ ## Stories
110
+
111
+ - [Default Pie](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-pie-chart--default)
112
+ - [Sunburst Subsegments Pie (click interaction)](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-pie-chart--sunburst)
113
+ - [Long Label Unit Pie](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-pie-chart--long-unit)
114
+ - [Trim Label Length Pie](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-pie-chart--trim-labels)
115
+ - [Decimal Places Pie](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-pie-chart--with-decimals)
116
+ - [Minimal Height Pie (48px)](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-pie-chart--min-height)
117
+ - [Threshold Height Pie (192px, where labels appear)](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-pie-chart--threshold-height)
118
+ - [With Legend Pie](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-pie-chart--with-legend)
119
+ - [Custom Colors](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-pie-chart--custom-colors)
120
+ - [Realtime](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-pie-chart--realtime)
@@ -0,0 +1,39 @@
1
+ # `<obc-pitch-indicator>`
2
+
3
+ Compact pitch indicator with a horizontal reference line, side track, and vessel pointer.
4
+
5
+ Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/indicators-pitch-indicator--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/pitch-indicator/pitch-indicator.ts)
6
+
7
+ `<obc-pitch-indicator>` – Compact pitch indicator with a horizontal reference line, side track, and vessel pointer.
8
+
9
+ Presents a normalized value as a rotating vessel group and a filled sector inside the side track. The component footprint is **48×48** px, with the inner graphic sized to **36×36**.
10
+
11
+ ## Features
12
+
13
+ - **Variants:** `enhanced` and `regular` share the same geometry and behavior, with the dynamic elements switching between enhanced and regular secondary colors.
14
+ - **Normalized value:** `value` in `[-1, 1]` maps directly to the track angle.
15
+ - **Tokens:** Frame uses instrument frame tokens; the live sector and pointer use regular or enhanced secondary tokens by variant.
16
+
17
+ ## Usage Guidelines
18
+
19
+ Use for compact layouts where you need a small pitch cue next to other compact indicators.
20
+
21
+ ## Properties
22
+
23
+ | Property | Attribute | Type | Default | Description |
24
+ | --- | --- | --- | --- | --- |
25
+ | type | type | `PitchIndicatorType` | | |
26
+ | value | value | `number` | `0` | |
27
+
28
+ ## Events
29
+
30
+ None.
31
+
32
+ ## Slots
33
+
34
+ None.
35
+
36
+ ## Stories
37
+
38
+ - [Enhanced](https://openbridge-next-storybook.web.app/?path=/story/indicators-pitch-indicator--enhanced)
39
+ - [Regular](https://openbridge-next-storybook.web.app/?path=/story/indicators-pitch-indicator--regular)
@@ -0,0 +1,86 @@
1
+ # `<obc-pitch-roll-heave>`
2
+
3
+ Combined pitch, roll and heave indicator.
4
+
5
+ Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/instruments-pitch-roll-heave--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/pitch-roll-heave/pitch-roll-heave.ts)
6
+
7
+ `<obc-pitch-roll-heave>` — Combined pitch, roll and heave indicator.
8
+
9
+ Places a pitch arc, a roll arc and a linear heave column around one watch
10
+ face. The heave column occupies the same radial slot as the arcs, and its
11
+ height is derived from the pitch arc so its top and bottom edges sit level
12
+ with the pitch arc's end caps.
13
+
14
+ Variants (`type`):
15
+ - `single-scale` (default) — pitch on the right, roll at the bottom, heave in
16
+ the left slot, vessel silhouettes in the centre.
17
+ - `dual-scale` — pitch and roll mirrored onto the opposite sides, with the
18
+ heave column moved to the centre.
19
+
20
+ Set `hasReadout` to replace the centre content with stacked pitch, roll and
21
+ heave readouts, and `zoomToFitArc` to enlarge narrow arcs so they fill the
22
+ available space.
23
+
24
+ ## Properties
25
+
26
+ | Property | Attribute | Type | Default | Description |
27
+ | --- | --- | --- | --- | --- |
28
+ | type | type | `ObcPitchRollHeaveType` | | |
29
+ | pitch | pitch | `number` | `0` | |
30
+ | roll | roll | `number` | `0` | |
31
+ | heave | heave | `number` | `0` | |
32
+ | minAvgPitch | minAvgPitch | `number` | `0` | |
33
+ | maxAvgPitch | maxAvgPitch | `number` | `0` | |
34
+ | minAvgRoll | minAvgRoll | `number` | `0` | |
35
+ | maxAvgRoll | maxAvgRoll | `number` | `0` | |
36
+ | minTrendHeave | minTrendHeave | `number` | `0` | |
37
+ | maxTrendHeave | maxTrendHeave | `number` | `0` | |
38
+ | heaveRange | heaveRange | `number` | `10` | Half-extent of the heave scale in metres; the column spans `±heaveRange`. |
39
+ | pitchArcAngle | pitchArcAngle | `number` | `30` | Half-extent of the pitch arc in degrees. Also drives the heave column height, which is `2 · outerRadius · sin(pitchArcAngle)` so the column's edges stay level with the pitch arc's end caps. |
40
+ | rollArcAngle | rollArcAngle | `number` | `45` | Half-extent of the roll arc in degrees. |
41
+ | zoomToFitArc | zoomToFitArc | `boolean` | `false` | |
42
+ | hasReadout | hasReadout | `boolean` | `false` | Replaces the centre content with stacked pitch, roll and heave readouts. Ignored when `type` is `dual-scale`, where the heave column occupies the centre. Available when `type==singleScale`. |
43
+ | pitchLabel | pitchLabel | `string` | `'Pitch'` | Available when `hasReadout==true`. |
44
+ | rollLabel | rollLabel | `string` | `'Roll'` | Available when `hasReadout==true`. |
45
+ | heaveLabel | heaveLabel | `string` | `'Heave'` | Available when `hasReadout==true`. |
46
+ | unit | unit | `string` | `'DEG'` | Unit shown in the pitch and roll readouts. Available when `hasReadout==true`. |
47
+ | heaveUnit | heaveUnit | `string` | `'m'` | Unit shown in the heave readout. Available when `hasReadout==true`. |
48
+ | fractionDigits | fractionDigits | `number` | `0` | Available when `hasReadout==true`. |
49
+ | vesselImageFore | vesselImageFore | `VesselImage` | | Available when `type==singleScale && hasReadout==false`. |
50
+ | vesselImageSide | vesselImageSide | `VesselImage` | | Available when `type==singleScale && hasReadout==false`. |
51
+ | vesselImageForeSrc | | `VesselImageSrc \| undefined` | | Image URLs per palette (`{bright, day, dusk, night}`, SVG, PNG or data URLs) drawn instead of `vesselImageFore` in the same 160 × 160 box. A palette without a URL falls back to the nearest one (see `VesselImageSrc`). Available when `type==singleScale && hasReadout==false`. |
52
+ | vesselImageSideSrc | | `VesselImageSrc \| undefined` | | Image URLs per palette (`{bright, day, dusk, night}`, SVG, PNG or data URLs) drawn instead of `vesselImageSide` in the same 160 × 160 box. A palette without a URL falls back to the nearest one (see `VesselImageSrc`). Available when `type==singleScale && hasReadout==false`. |
53
+ | scaleForeImage | scaleForeImage | `number` | `1` | Available when `type==singleScale && hasReadout==false`. |
54
+ | maxPitchAdvice | maxPitchAdvice | `number \| undefined` | `undefined` | |
55
+ | maxRollAdvice | maxRollAdvice | `number \| undefined` | `undefined` | |
56
+ | triggerPitchAdvice | triggerPitchAdvice | `boolean` | `false` | Available when `maxPitchAdvice!=undefined`. |
57
+ | triggerRollAdvice | triggerRollAdvice | `boolean` | `false` | Available when `maxRollAdvice!=undefined`. |
58
+ | heaveAdvice | heaveAdvice | `AdviceInput[]` | `[]` | Advice ranges and points on the heave column, in metres; see `svghelpers/advice.ts` for the shape. |
59
+ | priority | priority | `Priority` | | |
60
+ | priorityElements | | `PitchRollHeavePriorityElement[]` | `[ PitchRollHeavePriorityElement.pitch, PitchRollHeavePriorityElement.roll, PitchRollHeavePriorityElement.heave, ]` | |
61
+
62
+ ## Events
63
+
64
+ None.
65
+
66
+ ## Slots
67
+
68
+ None.
69
+
70
+ ## Stories
71
+
72
+ - [Primary](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-heave--primary)
73
+ - [Enhanced](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-heave--enhanced)
74
+ - [Dual Scale](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-heave--dual-scale)
75
+ - [Dual Scale Enhanced](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-heave--dual-scale-enhanced)
76
+ - [With Readout](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-heave--with-readout)
77
+ - [With Readout Enhanced](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-heave--with-readout-enhanced)
78
+ - [Advice](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-heave--advice)
79
+ - [Zoomed In](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-heave--zoomed-in)
80
+ - [Zoomed In Dual Scale](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-heave--zoomed-in-dual-scale)
81
+ - [Zoomed In Narrow](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-heave--zoomed-in-narrow)
82
+
83
+ ## See also
84
+
85
+ - [Advice System](https://openbridge-next-storybook.web.app/docs/introduction-advice-system.md)
86
+ - [Migration Guide 2.1 to 2.2](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide-2-1-to-2-2.md)
@@ -0,0 +1,72 @@
1
+ # `<obc-pitch-roll-yaw>`
2
+
3
+ Polar attitude instrument combining pitch, roll and yaw in a single circular face.
4
+
5
+ Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/instruments-pitch-roll-yaw--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/pitch-roll-yaw/pitch-roll-yaw.ts)
6
+
7
+ `<obc-pitch-roll-yaw>` – Polar attitude instrument combining pitch, roll
8
+ and yaw in a single circular face. Pitch and roll place a dot on a polar
9
+ grid (up = positive pitch, right = positive roll); yaw is shown on the
10
+ outer scale, which spans −180° (left, counter-clockwise) to +180° with 0°
11
+ at the top.
12
+
13
+ ## Features / Variants
14
+
15
+ - **`type`:** `level` (default) shows the attitude dot with a halo and a
16
+ yaw trend band with a current-yaw dot on the scale; `actual-motion` adds
17
+ a top-view vessel image, an optional motion-envelope circle
18
+ (`motionRadius`) and replaces the trend band with a live yaw bar swept
19
+ from 0° to `yaw`; `historical-motion` shows the vessel image with a trail
20
+ of past attitude samples (`motionHistory`) plus the yaw trend band.
21
+ - **Scale range:** `range` sets the pitch/roll value at the outermost grid
22
+ circle; the dot is clamped to the grid edge beyond it.
23
+ - **Yaw trend band:** `minAvgYaw`/`maxAvgYaw` render a rounded band on the
24
+ scale in the `level` and `historical-motion` variants.
25
+ - **Labels:** `showLabels` adds 0/90/180/-90 labels outside the scale.
26
+ - **Priority:** `priority` switches every indication between the `regular`
27
+ and `enhanced` palette.
28
+
29
+ ## Usage Guidelines
30
+
31
+ Use when combined attitude and yaw deviation should be monitored in one
32
+ compact face. For per-axis arc instruments use `obc-pitch-roll` or
33
+ `obc-pitch-roll-heave`; for heading against a compass card use
34
+ `obc-compass`.
35
+
36
+ ## Properties
37
+
38
+ | Property | Attribute | Type | Default | Description |
39
+ | --- | --- | --- | --- | --- |
40
+ | type | type | `PitchRollYawType` | | |
41
+ | pitch | pitch | `number` | `0` | Pitch in degrees; positive moves the attitude dot up. |
42
+ | roll | roll | `number` | `0` | Roll in degrees; positive moves the attitude dot right. |
43
+ | yaw | yaw | `number` | `0` | Yaw deviation in degrees on the ±180° scale (0° = top, positive = clockwise). Shown as a dot on the scale in the `level` and `historical-motion` variants and as the end of the live yaw bar in the `actual-motion` variant. |
44
+ | minAvgYaw | minAvgYaw | `number` | `0` | Available when `type!='actual-motion'`. |
45
+ | maxAvgYaw | maxAvgYaw | `number` | `0` | Available when `type!='actual-motion'`. |
46
+ | range | range | `number` | `20` | Pitch/roll value at the outermost grid circle. Default `20`. |
47
+ | motionRadius | motionRadius | `number` | `0` | Radius of the motion-envelope circle in the same unit as `pitch`/`roll`. Hidden when `0`. Available when `type=='actual-motion'`. |
48
+ | motionHistory | | `PitchRollSample[]` | `[]` | Past attitude samples, oldest first; rendered as a fading trail. Available when `type=='historical-motion'`. |
49
+ | vesselImage | vesselImage | `VesselImage` | | Available when `type!='level'`. |
50
+ | vesselImageSrc | | `VesselImageSrc \| undefined` | | Image URLs per palette (`{bright, day, dusk, night}`, SVG, PNG or data URLs) drawn instead of `vesselImage` in the same 160 × 160 box. A palette without a URL falls back to the nearest one (see `VesselImageSrc`). Available when `type!='level'`. |
51
+ | priority | priority | `Priority` | | |
52
+ | showLabels | showLabels | `boolean` | `false` | When `true`, shows 0/90/180/-90 labels outside the scale. |
53
+
54
+ ## Events
55
+
56
+ None.
57
+
58
+ ## Slots
59
+
60
+ None.
61
+
62
+ ## Stories
63
+
64
+ - [Level](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-yaw--level)
65
+ - [Level Enhanced](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-yaw--level-enhanced)
66
+ - [Actual Motion](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-yaw--actual-motion)
67
+ - [Actual Motion Enhanced](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-yaw--actual-motion-enhanced)
68
+ - [Historical Motion](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-yaw--historical-motion)
69
+ - [Historical Motion Enhanced](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-yaw--historical-motion-enhanced)
70
+ - [Rov Vessel](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-yaw--rov-vessel)
71
+ - [Drone Vessel](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-yaw--drone-vessel)
72
+ - [With Labels](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll-yaw--with-labels)
@@ -0,0 +1,63 @@
1
+ # `<obc-pitch-roll>`
2
+
3
+ No summary yet.
4
+
5
+ Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/instruments-pitch-roll--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/pitch-roll/pitch-roll.ts)
6
+
7
+ ## Properties
8
+
9
+ | Property | Attribute | Type | Default | Description |
10
+ | --- | --- | --- | --- | --- |
11
+ | type | type | `PitchRollType` | | `dual-scale` (default) shows pitch and roll arcs on both opposing sides; `single-scale` shows one pitch arc on the right and one roll arc at the bottom, completed by a thin ring. |
12
+ | pitch | pitch | `number` | `0` | |
13
+ | roll | roll | `number` | `0` | |
14
+ | minAvgPitch | minAvgPitch | `number` | `0` | |
15
+ | maxAvgPitch | maxAvgPitch | `number` | `0` | |
16
+ | minAvgRoll | minAvgRoll | `number` | `0` | |
17
+ | maxAvgRoll | maxAvgRoll | `number` | `0` | |
18
+ | vesselImageFore | vesselImageFore | `VesselImage` | | |
19
+ | vesselImageSide | vesselImageSide | `VesselImage` | | |
20
+ | vesselImageForeSrc | | `VesselImageSrc \| undefined` | | Image URLs per palette (`{bright, day, dusk, night}`, SVG, PNG or data URLs) drawn instead of `vesselImageFore` in the same 160 × 160 box. A palette without a URL falls back to the nearest one (see `VesselImageSrc`). Available when `hasReadout==false`. |
21
+ | vesselImageSideSrc | | `VesselImageSrc \| undefined` | | Image URLs per palette (`{bright, day, dusk, night}`, SVG, PNG or data URLs) drawn instead of `vesselImageSide` in the same 160 × 160 box. A palette without a URL falls back to the nearest one (see `VesselImageSrc`). Available when `hasReadout==false`. |
22
+ | scaleForeImage | scaleForeImage | `number` | `1` | |
23
+ | maxPitchAdvice | maxPitchAdvice | `number \| undefined` | `undefined` | |
24
+ | maxRollAdvice | maxRollAdvice | `number \| undefined` | `undefined` | |
25
+ | triggerPitchAdvice | triggerPitchAdvice | `boolean` | `false` | Available when `maxPitchAdvice!=undefined`. |
26
+ | triggerRollAdvice | triggerRollAdvice | `boolean` | `false` | Available when `maxRollAdvice!=undefined`. |
27
+ | priority | priority | `Priority` | | |
28
+ | priorityElements | | `PitchRollPriorityElement[]` | `[ PitchRollPriorityElement.pitch, PitchRollPriorityElement.roll, ]` | |
29
+ | hasReadout | hasReadout | `boolean` | `false` | When `true`, the centre shows two stacked `<obc-readout>`s (pitch above roll) instead of the vessel images. Default `false`. |
30
+ | pitchLabel | pitchLabel | `string` | `'Pitch'` | Label for the pitch readout. Default `Pitch`. Available when `hasReadout==true`. |
31
+ | rollLabel | rollLabel | `string` | `'Roll'` | Label for the roll readout. Default `Roll`. Available when `hasReadout==true`. |
32
+ | unit | unit | `string` | `'DEG'` | Unit shown in both readouts. Default `DEG`. Available when `hasReadout==true`. |
33
+ | fractionDigits | fractionDigits | `number` | `0` | Number of fraction digits shown in both readouts. Default `0`. Available when `hasReadout==true`. |
34
+ | zoomToFitArc | zoomToFitArc | `boolean` | `false` | |
35
+ | arcAngle | arcAngle | `number` | `30` | Half-extent of each of the four watch arcs in degrees, measured from the arc's natural center (0°/90°/180°/270°). Each arc spans `center ± arcAngle`. Default `30` reproduces the historical 60°-wide arcs; smaller values produce narrower arcs that, combined with `zoomToFitArc`, reveal more detail in the relevant motion range. |
36
+ | pitchArcAngle | pitchArcAngle | `number \| undefined` | | Per-axis override for the pitch arcs, top and bottom, falling back to `arcAngle` when undefined — for rectangular layouts where pitch and roll need different angular extents. |
37
+ | rollArcAngle | rollArcAngle | `number \| undefined` | | Per-axis override for the roll arcs, left and right, falling back to `arcAngle` when undefined. |
38
+
39
+ ## Events
40
+
41
+ None.
42
+
43
+ ## Slots
44
+
45
+ None.
46
+
47
+ ## Stories
48
+
49
+ - [Primary](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll--primary)
50
+ - [With Readout](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll--with-readout)
51
+ - [Zoomed In With Readout](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll--zoomed-in-with-readout)
52
+ - [Rov](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll--rov)
53
+ - [Scaled Fore Image](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll--scaled-fore-image)
54
+ - [Zoomed In](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll--zoomed-in)
55
+ - [Zoomed In Narrow](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll--zoomed-in-narrow)
56
+ - [Zoomed In Rectangular](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll--zoomed-in-rectangular)
57
+ - [Single Scale](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll--single-scale)
58
+ - [Single Scale With Readout](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll--single-scale-with-readout)
59
+ - [Single Scale Zoomed In](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch-roll--single-scale-zoomed-in)
60
+
61
+ ## See also
62
+
63
+ - [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
@@ -0,0 +1,81 @@
1
+ # `<obc-pitch>`
2
+
3
+ Pitch (trim) indicator with a side arc scale.
4
+
5
+ Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/building-blocks-single-axis-inclinometer-base--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/pitch/pitch.ts)
6
+
7
+ `<obc-pitch>` — Pitch (trim) indicator with a side arc scale.
8
+
9
+ Shows `pitch` against a watch arc centred on the right, with an average-pitch
10
+ band and a rotating indicator. Supports an optional opposite-side scale
11
+ (`dual-scale`), a centre readout (`hasReadout`), and a `regular`/`enhanced`
12
+ palette.
13
+
14
+ ## Single Axis Inclinometer Base (abstract base class)
15
+
16
+ Shared base for the single-axis inclinometers `<obc-pitch>` and `<obc-roll>`.
17
+
18
+ Captures everything the two instruments have in common so each subclass only
19
+ supplies its axis-specific pieces:
20
+
21
+ - **Optional centre readout** (`hasReadout`) showing the value, label and unit
22
+ instead of the horizon line, rotating indicator and vessel.
23
+ - **Arc framing** via `arcAngle` (half-extent in degrees) with optional
24
+ `zoomToFitArc` enlargement of a narrow arc onto its own layer.
25
+ - **Average band** and a rotating value indicator.
26
+ - **Caution advice bands** derived from the subclass threshold.
27
+ - **`regular` / `enhanced` palette** via `priority`.
28
+ - **Optional opposite-side scale** (`dual-scale`).
29
+
30
+ ### Concrete implementations
31
+
32
+ - `<obc-pitch>`: arc centred on the right; horizontal indicator line.
33
+ - `<obc-roll>`: arc centred at the bottom; vertical indicator line.
34
+
35
+ The base is declared as a concrete `class` (with hooks that throw if not
36
+ overridden) rather than `abstract` so the auto-generated framework wrappers
37
+ type-check. It is never registered as a custom element — use `obc-pitch` or
38
+ `obc-roll`.
39
+
40
+ ## Properties
41
+
42
+ | Property | Attribute | Type | Default | Description |
43
+ | --- | --- | --- | --- | --- |
44
+ | pitch | pitch | `number` | `0` | |
45
+ | minAvgPitch | minAvgPitch | `number` | `0` | |
46
+ | maxAvgPitch | maxAvgPitch | `number` | `0` | |
47
+ | vesselImageSide | vesselImageSide | `VesselImage` | | |
48
+ | vesselImageSideSrc | | `VesselImageSrc \| undefined` | | Image URLs per palette (`{bright, day, dusk, night}`, SVG, PNG or data URLs) drawn instead of `vesselImageSide` in the same 160 × 160 box. A palette without a URL falls back to the nearest one (see `VesselImageSrc`). |
49
+ | maxPitchAdvice | maxPitchAdvice | `number \| undefined` | `undefined` | |
50
+ | triggerPitchAdvice | triggerPitchAdvice | `boolean` | `false` | |
51
+ | label | label | `string` | `'Pitch'` | Readout label. Default `Pitch`. |
52
+ | unit | unit | `string` | `'DEG'` | Readout unit. Default `DEG`. |
53
+ | fractionDigits | fractionDigits | `number` | `0` | Number of fraction digits shown in the readout. Default `0`. |
54
+ | type | type | `ObcPitchType` | | `single-scale` shows one arc on the right (default); `dual-scale` also shows the scale on the opposite (left) arc (the indicator's opposite end). |
55
+ | zoomToFitArc | zoomToFitArc | `boolean` | `false` | |
56
+ | hasReadout | hasReadout | `boolean` | `false` | When `true`, the centre shows an `<obc-readout>` with the value instead of the horizon line, rotating indicator and vessel. Default `false`. |
57
+ | priority | priority | `Priority` | | Colour palette for the scale fill / indicator and the readout value: `regular` (default) or `enhanced`. |
58
+ | arcAngle | arcAngle | `number` | `45` | Half-extent of the watch arc in degrees: the arc spans `centre ± arcAngle` and values sit at their true position within it, so `45` gives the historical 90°-wide arc. With `zoomToFitArc`, a narrower arc is enlarged on its own layer while the vessel image and the indicator line keep their natural size on a separate central layer — the two layers are deliberately disconnected. |
59
+
60
+ ## Events
61
+
62
+ None.
63
+
64
+ ## Slots
65
+
66
+ None.
67
+
68
+ ## Stories
69
+
70
+ - [Pitch](https://openbridge-next-storybook.web.app/?path=/story/building-blocks-single-axis-inclinometer-base--pitch)
71
+ - [Pitch With Readout](https://openbridge-next-storybook.web.app/?path=/story/building-blocks-single-axis-inclinometer-base--pitch-with-readout)
72
+ - [Roll](https://openbridge-next-storybook.web.app/?path=/story/building-blocks-single-axis-inclinometer-base--roll)
73
+ - [Primary](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch--primary)
74
+ - [Zoomed In](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch--zoomed-in)
75
+ - [Zoomed In Narrow](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch--zoomed-in-narrow)
76
+ - [With Readout](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch--with-readout)
77
+ - [Dual Scale](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch--dual-scale)
78
+ - [Enhanced](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch--enhanced)
79
+ - [With Custom Vessel Image](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch--with-custom-vessel-image)
80
+ - [With Custom Vessel Image Zoomed In](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch--with-custom-vessel-image-zoomed-in)
81
+ - [Fish Cage](https://openbridge-next-storybook.web.app/?path=/story/instruments-pitch--fish-cage): The fish cage seen from the side, the way Figma 47546:222683 shows it on the pitch instrument.
@@ -0,0 +1,79 @@
1
+ # `<obc-pivot-item-group>`
2
+
3
+ A container for managing a set of pivot items (tab-like or segmented controls) with single selection.
4
+
5
+ Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ui-components-menus-and-navigation-pivot-item--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/pivot-item-group/pivot-item-group.ts)
6
+
7
+ `<obc-pivot-item-group>` – A container for managing a set of pivot items (tab-like or segmented controls) with single selection.
8
+
9
+ Groups multiple `<obc-pivot-item>` components and handles their selection logic, ensuring only one item is selected at a time (or none, if allowed). Provides a way to visually and functionally organize navigation or filtering controls in either a horizontal or vertical layout.
10
+
11
+ ## Features
12
+ - **Single selection management:** Only one pivot item can be selected at a time. Optionally allows deselecting all.
13
+ - **Layout direction:** Supports `horizontal` (default, items in a row) or `vertical` (items stacked in a column) via the `direction` property.
14
+ - **Deselect option:** When `allowDeselect` is true, clicking the selected item will deselect it (no item selected).
15
+ - **Syncs child state:** Automatically updates all child `<obc-pivot-item>` components to reflect the current selection and layout direction.
16
+ - **Change event:** Emits a `change` event whenever the selection changes, with the new value.
17
+
18
+ ## Usage Guidelines
19
+ Use `obc-pivot-item-group` to present a set of mutually exclusive options, such as navigation tabs, segmented controls, or filter toggles. Ideal for scenarios where users need to switch between views, categories, or modes.
20
+ For independent toggles, use a different component (e.g., checkboxes or chips).
21
+
22
+ - Set the `direction` property to `vertical` for sidebar or stacked layouts, or leave as `horizontal` for toolbar/tab layouts.
23
+ - Use `allowDeselect` if you want to permit users to clear their selection entirely.
24
+ - Place one or more `<obc-pivot-item>` elements as children; each should have a unique `value` property.
25
+
26
+ **TODO(designer):** Clarify if there are recommended use cases or visual constraints for horizontal vs. vertical layouts, and if there are accessibility guidelines for keyboard navigation.
27
+
28
+ ## Slots and Content Structure
29
+ | Slot Name | Renders When... | Purpose |
30
+ |-----------|-----------------|---------|
31
+ | (default) | Always | Place one or more `<obc-pivot-item>` elements here. Each represents a selectable option. |
32
+
33
+ ## Events
34
+ - `change` – Fired whenever the selected value changes. Event detail: `{selectedValue: string}`.
35
+
36
+ ## Best Practices and Constraints
37
+ - Ensure each child `<obc-pivot-item>` has a unique `value` property.
38
+ - Only use `allowDeselect` if having no selection is a valid state for your use case.
39
+ - For accessibility, ensure the group and items are labeled appropriately (see `<obc-pivot-item>` docs for ARIA guidance).
40
+
41
+ **Example:**
42
+ ```html
43
+ <obc-pivot-item-group direction="horizontal" selectedValue="a">
44
+ <obc-pivot-item value="a">Option A</obc-pivot-item>
45
+ <obc-pivot-item value="b">Option B</obc-pivot-item>
46
+ <obc-pivot-item value="c">Option C</obc-pivot-item>
47
+ </obc-pivot-item-group>
48
+ ```
49
+
50
+ ## Properties
51
+
52
+ | Property | Attribute | Type | Default | Description |
53
+ | --- | --- | --- | --- | --- |
54
+ | direction | direction | `ObcPivotItemDirection` | `ObcPivotItemDirection.horizontal` | Layout direction for the group: `'horizontal'` (default, items in a row) or `'vertical'` (items stacked). Changing this updates the direction of all child pivot items. |
55
+ | selectedValue | selectedValue | `string` | `''` | The value of the currently selected pivot item. Set this to control selection programmatically, or listen for the `change` event to react to user selection. Defaults to empty string (no selection). |
56
+ | allowDeselect | allowDeselect | `boolean` | `false` | If true, allows the user to deselect the currently selected item by clicking it again (resulting in no selection). If false (default), one item is always selected unless `selectedValue` is empty. Available when `selectedValue!=''`. |
57
+
58
+ ## Events
59
+
60
+ | Event | Type | Description |
61
+ | --- | --- | --- |
62
+ | change | `CustomEvent<{selectedValue: string}>` | Fired when the selected value changes. |
63
+
64
+ ## Slots
65
+
66
+ | Slot | Description |
67
+ | --- | --- |
68
+ | (default) | Default slot for one or more `<obc-pivot-item>` elements. |
69
+
70
+ ## Stories
71
+
72
+ - [Horizontal](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-pivot-item--horizontal)
73
+ - [Vertical](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-pivot-item--vertical)
74
+ - [Icon Only Horizontal](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-pivot-item--icon-only-horizontal): When using icons only, use `width: fit-content` on the container that encapsulates the components.
75
+ - [Icon Only Vertical](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-pivot-item--icon-only-vertical): When using icons only, use `width: fit-content` on the container that encapsulates the components.
76
+ - [Label Only Horizontal](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-pivot-item--label-only-horizontal)
77
+ - [Label Only Vertical](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-pivot-item--label-only-vertical)
78
+ - [With Divider Horizontal](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-pivot-item--with-divider-horizontal)
79
+ - [Disabled](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-pivot-item--disabled)
@@ -0,0 +1,75 @@
1
+ # `<obc-pivot-item>`
2
+
3
+ A selectable tab or navigation item for use in pivot/tab bars and segmented controls.
4
+
5
+ Lifecycle: stable. [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/pivot-item/pivot-item.ts)
6
+
7
+ `<obc-pivot-item>` – A selectable tab or navigation item for use in pivot/tab bars and segmented controls.
8
+
9
+ Represents a single option within a group of pivot items, supporting icon-only, label-only, or combined icon+label layouts. Designed for navigation or view switching scenarios where users select one option from a set. Can be arranged horizontally or vertically to fit different UI layouts.
10
+
11
+ ---
12
+
13
+ ## Features
14
+ - **Direction:** Supports `horizontal` (default) or `vertical` layout, adapting to the orientation of the containing group.
15
+ - **Icon and Label Options:** Can display a leading icon (via the `icon` slot), a text label (via the `label` property), or both. Each can be toggled independently.
16
+ - **Selection State:** Indicates the currently selected item with a visual highlight (active tab stroke). Only one item should be selected in a group at a time.
17
+ - **Disabled State:** Can be disabled to prevent interaction and visually indicate inactivity.
18
+
19
+ ---
20
+
21
+ ## Usage Guidelines
22
+ Use `obc-pivot-item` within an `obc-pivot-item-group` to create tab bars, segmented controls, or navigation rails. Ideal for switching between views, pages, or content sections. Choose horizontal orientation for top navigation bars and vertical for side navigation or tool selectors. Use icons for compact layouts or when representing actions visually; combine with labels for clarity. Avoid using for persistent navigation (use a menu or list instead).
23
+
24
+ **TODO(designer):** Confirm if there are recommended limits on icon or label length, and if divider usage is preferred in certain layouts.
25
+
26
+ ---
27
+
28
+ ## Slots
29
+ | Slot Name | Renders When... | Purpose |
30
+ |-----------|------------------------|-------------------------------------------|
31
+ | icon | `hasLeadingIcon` true | Leading icon representing the item. Place an icon such as `<obi-home slot="icon"></obi-home>`. |
32
+
33
+ ---
34
+
35
+ ## Events
36
+ - `selected` – Fired when the item is clicked and becomes selected. Event detail: `{ value: string }`.
37
+
38
+ ---
39
+
40
+ ## Example:
41
+ ```
42
+ <obc-pivot-item
43
+ value="home"
44
+ label="Home"
45
+ hasLeadingIcon
46
+ hasLabel
47
+ >
48
+ <obi-home slot="icon"></obi-home>
49
+ </obc-pivot-item>
50
+ ```
51
+ In this example, the item displays a home icon and a label. When clicked (and not already selected/disabled), it emits a `selected` event.
52
+
53
+ ## Properties
54
+
55
+ | Property | Attribute | Type | Default | Description |
56
+ | --- | --- | --- | --- | --- |
57
+ | value | value | `string` | `''` | The value associated with this pivot item. Used to identify the item within a group. Set a unique value for each item in a group to track selection state. |
58
+ | selected | selected | `boolean` | `false` | Whether this item is currently selected. Only one item should be selected in a group. When `true`, the item is visually highlighted and does not emit the `selected` event on click. |
59
+ | direction | direction | `ObcPivotItemDirection` | | Layout direction for the item: `horizontal` (default) or `vertical`. Should match the direction of the containing group. Use `horizontal` for row/tab layouts and `vertical` for column/rail layouts. |
60
+ | hasLeadingIcon | hasLeadingIcon | `boolean` | `false` | Whether to display a leading icon. If true, renders the `icon` slot. Place an icon element (e.g., `<obi-home slot="icon"></obi-home>`) in the slot to show an icon. |
61
+ | hasLabel | hasLabel | `boolean` | `false` | Whether to display a text label. If true and `label` is non-empty, shows the label. Use in combination with `hasLeadingIcon` for icon+label layouts. |
62
+ | label | label | `string` | `''` | The text label to display for the item. Only shown if `hasLabel` is true and label is non-empty. Keep labels concise for best appearance, especially in horizontal layouts. |
63
+ | disabled | disabled | `boolean` | `false` | Disables the item, preventing interaction and applying a disabled style. When `true`, the item cannot be selected and is visually muted. |
64
+
65
+ ## Events
66
+
67
+ | Event | Type | Description |
68
+ | --- | --- | --- |
69
+ | selected | `CustomEvent<{value: string}>` | When the item is clicked and becomes selected |
70
+
71
+ ## Slots
72
+
73
+ | Slot | Description |
74
+ | --- | --- |
75
+ | icon | Leading icon slot (shown when `hasLeadingIcon` is true) |