@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.
- package/custom-elements-manifest.config.mjs +2 -1
- package/custom-elements.json +312 -17
- package/llms/components/obc-accordion-card.md +141 -0
- package/llms/components/obc-accordion-item.md +90 -0
- package/llms/components/obc-advice-button.md +87 -0
- package/llms/components/obc-advice-floating-item.md +113 -0
- package/llms/components/obc-advice-menu-item.md +87 -0
- package/llms/components/obc-advice-message-item.md +138 -0
- package/llms/components/obc-alert-button-item.md +117 -0
- package/llms/components/obc-alert-button.md +134 -0
- package/llms/components/obc-alert-counter-item.md +74 -0
- package/llms/components/obc-alert-detail-page.md +45 -0
- package/llms/components/obc-alert-floating-item.md +53 -0
- package/llms/components/obc-alert-frame.md +142 -0
- package/llms/components/obc-alert-icon.md +79 -0
- package/llms/components/obc-alert-list-details-experimental.md +89 -0
- package/llms/components/obc-alert-list-details.md +38 -0
- package/llms/components/obc-alert-list-page-small.md +39 -0
- package/llms/components/obc-alert-list.md +37 -0
- package/llms/components/obc-alert-menu-item.md +128 -0
- package/llms/components/obc-alert-menu.md +115 -0
- package/llms/components/obc-alert-subsystem-button.md +88 -0
- package/llms/components/obc-alert-subsystem-counter.md +110 -0
- package/llms/components/obc-analog-threeway-valve.md +106 -0
- package/llms/components/obc-analog-valve.md +74 -0
- package/llms/components/obc-app-button.md +83 -0
- package/llms/components/obc-app-menu.md +69 -0
- package/llms/components/obc-area-graph.md +333 -0
- package/llms/components/obc-attachment-list-item.md +49 -0
- package/llms/components/obc-audio-output.md +59 -0
- package/llms/components/obc-audio-recording-item.md +91 -0
- package/llms/components/obc-automation-badge.md +66 -0
- package/llms/components/obc-automation-button-readout-stack.md +71 -0
- package/llms/components/obc-automation-button.md +86 -0
- package/llms/components/obc-automation-input-modal.md +48 -0
- package/llms/components/obc-automation-readout.md +32 -0
- package/llms/components/obc-automation-tank.md +156 -0
- package/llms/components/obc-azimuth-thruster-labeled.md +56 -0
- package/llms/components/obc-azimuth-thruster.md +80 -0
- package/llms/components/obc-badge-command.md +26 -0
- package/llms/components/obc-badge.md +151 -0
- package/llms/components/obc-bar-horizontal.md +123 -0
- package/llms/components/obc-bar-vertical.md +125 -0
- package/llms/components/obc-battery-icon.md +38 -0
- package/llms/components/obc-bearing-indicator.md +27 -0
- package/llms/components/obc-bipolar-transistor.md +64 -0
- package/llms/components/obc-breadcrumb.md +58 -0
- package/llms/components/obc-brilliance-menu.md +115 -0
- package/llms/components/obc-bus.md +64 -0
- package/llms/components/obc-button.md +110 -0
- package/llms/components/obc-calendar.md +91 -0
- package/llms/components/obc-capacitor.md +64 -0
- package/llms/components/obc-card.md +103 -0
- package/llms/components/obc-chart-object-vessel-button.md +103 -0
- package/llms/components/obc-chat-message.md +35 -0
- package/llms/components/obc-check-button.md +104 -0
- package/llms/components/obc-checkbox-item.md +95 -0
- package/llms/components/obc-checkbox-list.md +73 -0
- package/llms/components/obc-checkbox.md +97 -0
- package/llms/components/obc-circular-progress.md +36 -0
- package/llms/components/obc-clock.md +86 -0
- package/llms/components/obc-command-button.md +56 -0
- package/llms/components/obc-command-menu.md +135 -0
- package/llms/components/obc-communication-table.md +31 -0
- package/llms/components/obc-compass-flat.md +79 -0
- package/llms/components/obc-compass-indicator.md +61 -0
- package/llms/components/obc-compass-sector.md +110 -0
- package/llms/components/obc-compass.md +157 -0
- package/llms/components/obc-context-menu-input.md +191 -0
- package/llms/components/obc-converter.md +64 -0
- package/llms/components/obc-corner-line.md +29 -0
- package/llms/components/obc-current.md +79 -0
- package/llms/components/obc-damper.md +62 -0
- package/llms/components/obc-date-item.md +66 -0
- package/llms/components/obc-depth-actual.md +69 -0
- package/llms/components/obc-depth-indicator.md +31 -0
- package/llms/components/obc-depth-top-band.md +43 -0
- package/llms/components/obc-depth.md +94 -0
- package/llms/components/obc-diagnostic-button.md +71 -0
- package/llms/components/obc-diagnostic-menu.md +88 -0
- package/llms/components/obc-digital-threeway-valve.md +112 -0
- package/llms/components/obc-digital-valve.md +78 -0
- package/llms/components/obc-diodes.md +64 -0
- package/llms/components/obc-direction-line.md +28 -0
- package/llms/components/obc-divider.md +44 -0
- package/llms/components/obc-donut-chart.md +116 -0
- package/llms/components/obc-draft-trim.md +67 -0
- package/llms/components/obc-dropdown-button.md +99 -0
- package/llms/components/obc-electricity-battery.md +83 -0
- package/llms/components/obc-elevated-card-radio-group.md +103 -0
- package/llms/components/obc-elevated-card-radio.md +104 -0
- package/llms/components/obc-elevated-card.md +146 -0
- package/llms/components/obc-end-point-line.md +29 -0
- package/llms/components/obc-event-item.md +47 -0
- package/llms/components/obc-event-list.md +37 -0
- package/llms/components/obc-fan.md +68 -0
- package/llms/components/obc-filter-chip.md +91 -0
- package/llms/components/obc-filter.md +64 -0
- package/llms/components/obc-floating-item.md +125 -0
- package/llms/components/obc-form-container.md +45 -0
- package/llms/components/obc-form-footer-container.md +34 -0
- package/llms/components/obc-form-group.md +80 -0
- package/llms/components/obc-form-item.md +95 -0
- package/llms/components/obc-gauge-bar-indicator.md +46 -0
- package/llms/components/obc-gauge-generator.md +102 -0
- package/llms/components/obc-gauge-horizontal.md +169 -0
- package/llms/components/obc-gauge-motors-and-pumps.md +110 -0
- package/llms/components/obc-gauge-proportional.md +134 -0
- package/llms/components/obc-gauge-radial-indicator.md +76 -0
- package/llms/components/obc-gauge-radial.md +163 -0
- package/llms/components/obc-gauge-trend-indicator.md +53 -0
- package/llms/components/obc-gauge-trend.md +271 -0
- package/llms/components/obc-gauge-valve.md +114 -0
- package/llms/components/obc-gauge-vertical.md +169 -0
- package/llms/components/obc-gnss-skyplot.md +80 -0
- package/llms/components/obc-graph-mini.md +28 -0
- package/llms/components/obc-ground.md +64 -0
- package/llms/components/obc-heading-indicator.md +42 -0
- package/llms/components/obc-heading.md +106 -0
- package/llms/components/obc-heat-exchanger.md +80 -0
- package/llms/components/obc-heat-pump.md +79 -0
- package/llms/components/obc-heave-indicator.md +38 -0
- package/llms/components/obc-heave.md +60 -0
- package/llms/components/obc-horizontal-line.md +29 -0
- package/llms/components/obc-hydraulic-check-valve.md +36 -0
- package/llms/components/obc-hydraulic-separator.md +80 -0
- package/llms/components/obc-hydraulic-valve-4-3.md +71 -0
- package/llms/components/obc-hydraulic-valve-x-2.md +68 -0
- package/llms/components/obc-icon-button.md +117 -0
- package/llms/components/obc-icon-check-button.md +85 -0
- package/llms/components/obc-indicator-battery.md +69 -0
- package/llms/components/obc-indicator-engine.md +39 -0
- package/llms/components/obc-indicator-generator.md +59 -0
- package/llms/components/obc-indicator-graph.md +33 -0
- package/llms/components/obc-indicator-tank-atmospheric.md +69 -0
- package/llms/components/obc-input-chip.md +96 -0
- package/llms/components/obc-instrument-field.md +172 -0
- package/llms/components/obc-instrument-radial.md +77 -0
- package/llms/components/obc-integration-app-bar.md +41 -0
- package/llms/components/obc-integration-bar-dropdown.md +71 -0
- package/llms/components/obc-integration-bar.md +72 -0
- package/llms/components/obc-integration-button.md +62 -0
- package/llms/components/obc-integration-dropdown-button.md +75 -0
- package/llms/components/obc-integration-fleet-button.md +41 -0
- package/llms/components/obc-integration-tabs.md +28 -0
- package/llms/components/obc-integration-vessel-menu.md +58 -0
- package/llms/components/obc-integration-vessel-selector.md +32 -0
- package/llms/components/obc-keyboard-full.md +175 -0
- package/llms/components/obc-keyboard-numeric.md +77 -0
- package/llms/components/obc-line-cross.md +28 -0
- package/llms/components/obc-line-graph.md +164 -0
- package/llms/components/obc-line-overlap.md +28 -0
- package/llms/components/obc-logic.md +64 -0
- package/llms/components/obc-main-engine-indicator.md +55 -0
- package/llms/components/obc-main-engine.md +54 -0
- package/llms/components/obc-menu-button.md +158 -0
- package/llms/components/obc-message-menu-item.md +165 -0
- package/llms/components/obc-modal-window.md +139 -0
- package/llms/components/obc-mosfet.md +64 -0
- package/llms/components/obc-motor.md +73 -0
- package/llms/components/obc-navigation-item-group.md +82 -0
- package/llms/components/obc-navigation-item.md +138 -0
- package/llms/components/obc-navigation-menu.md +135 -0
- package/llms/components/obc-non-return-valve.md +79 -0
- package/llms/components/obc-notification-badge-button.md +87 -0
- package/llms/components/obc-notification-button.md +92 -0
- package/llms/components/obc-notification-floating-item.md +121 -0
- package/llms/components/obc-notification-menu-item.md +87 -0
- package/llms/components/obc-notification-message-item.md +127 -0
- package/llms/components/obc-number-input-field.md +97 -0
- package/llms/components/obc-pagination.md +95 -0
- package/llms/components/obc-pie-chart.md +120 -0
- package/llms/components/obc-pitch-indicator.md +39 -0
- package/llms/components/obc-pitch-roll-heave.md +86 -0
- package/llms/components/obc-pitch-roll-yaw.md +72 -0
- package/llms/components/obc-pitch-roll.md +63 -0
- package/llms/components/obc-pitch.md +81 -0
- package/llms/components/obc-pivot-item-group.md +79 -0
- package/llms/components/obc-pivot-item.md +75 -0
- package/llms/components/obc-poi-aton.md +68 -0
- package/llms/components/obc-poi-button-aton.md +54 -0
- package/llms/components/obc-poi-button-data.md +53 -0
- package/llms/components/obc-poi-button-vessel.md +55 -0
- package/llms/components/obc-poi-button.md +94 -0
- package/llms/components/obc-poi-card-header.md +90 -0
- package/llms/components/obc-poi-card.md +110 -0
- package/llms/components/obc-poi-controller.md +151 -0
- package/llms/components/obc-poi-data.md +72 -0
- package/llms/components/obc-poi-graphic-line.md +70 -0
- package/llms/components/obc-poi-group.md +85 -0
- package/llms/components/obc-poi-header.md +71 -0
- package/llms/components/obc-poi-layer-stack.md +85 -0
- package/llms/components/obc-poi-layer.md +110 -0
- package/llms/components/obc-poi-line.md +70 -0
- package/llms/components/obc-poi-object-aton.md +45 -0
- package/llms/components/obc-poi-object-data.md +48 -0
- package/llms/components/obc-poi-object-vessel.md +95 -0
- package/llms/components/obc-poi-object.md +82 -0
- package/llms/components/obc-poi-pointer.md +70 -0
- package/llms/components/obc-poi-selection-frame.md +66 -0
- package/llms/components/obc-poi-vessel.md +70 -0
- package/llms/components/obc-poi.md +140 -0
- package/llms/components/obc-polar-chart.md +126 -0
- package/llms/components/obc-position-deviation.md +84 -0
- package/llms/components/obc-pressure-reduction-valve.md +88 -0
- package/llms/components/obc-pressure-sustain-valve.md +85 -0
- package/llms/components/obc-progress-bar.md +102 -0
- package/llms/components/obc-progress-button.md +111 -0
- package/llms/components/obc-progress-indicator-dots.md +57 -0
- package/llms/components/obc-propulsion-azimuth-indicator.md +48 -0
- package/llms/components/obc-pump.md +76 -0
- package/llms/components/obc-radial-bar-chart.md +103 -0
- package/llms/components/obc-radio.md +82 -0
- package/llms/components/obc-rate-of-turn.md +95 -0
- package/llms/components/obc-readout-block.md +137 -0
- package/llms/components/obc-readout-list-item.md +142 -0
- package/llms/components/obc-readout-list.md +85 -0
- package/llms/components/obc-readout.md +169 -0
- package/llms/components/obc-resistor.md +64 -0
- package/llms/components/obc-rich-button.md +92 -0
- package/llms/components/obc-roll-indicator.md +38 -0
- package/llms/components/obc-roll.md +56 -0
- package/llms/components/obc-rot-indicator.md +32 -0
- package/llms/components/obc-rot-linear.md +68 -0
- package/llms/components/obc-rot-sector.md +125 -0
- package/llms/components/obc-router.md +64 -0
- package/llms/components/obc-rudder-indicator.md +54 -0
- package/llms/components/obc-rudder.md +112 -0
- package/llms/components/obc-ruler-pointer.md +57 -0
- package/llms/components/obc-scrollbar.md +57 -0
- package/llms/components/obc-sequence-card.md +119 -0
- package/llms/components/obc-sequence-connector.md +70 -0
- package/llms/components/obc-sequence-item.md +64 -0
- package/llms/components/obc-sequence-loading-spinner.md +70 -0
- package/llms/components/obc-sequence-modal.md +89 -0
- package/llms/components/obc-sequence-step.md +48 -0
- package/llms/components/obc-sequence-toolbar.md +108 -0
- package/llms/components/obc-slide-button.md +111 -0
- package/llms/components/obc-slider-double.md +137 -0
- package/llms/components/obc-slider.md +143 -0
- package/llms/components/obc-source.md +64 -0
- package/llms/components/obc-speed-arrows.md +39 -0
- package/llms/components/obc-speed-directions.md +66 -0
- package/llms/components/obc-speed-gauge.md +124 -0
- package/llms/components/obc-speed-indicator.md +37 -0
- package/llms/components/obc-split-button.md +144 -0
- package/llms/components/obc-start-stop-switch.md +126 -0
- package/llms/components/obc-status-indicator.md +30 -0
- package/llms/components/obc-stepper-box.md +90 -0
- package/llms/components/obc-surge-sway-yaw.md +95 -0
- package/llms/components/obc-switch.md +69 -0
- package/llms/components/obc-system-button.md +112 -0
- package/llms/components/obc-system-menu.md +67 -0
- package/llms/components/obc-tab-item.md +161 -0
- package/llms/components/obc-tab-row.md +151 -0
- package/llms/components/obc-tabbed-card.md +148 -0
- package/llms/components/obc-table-header-item.md +42 -0
- package/llms/components/obc-table.md +124 -0
- package/llms/components/obc-tag.md +41 -0
- package/llms/components/obc-text-input-field.md +94 -0
- package/llms/components/obc-textarea-field.md +186 -0
- package/llms/components/obc-textbox.md +80 -0
- package/llms/components/obc-three-way-line.md +29 -0
- package/llms/components/obc-thruster.md +64 -0
- package/llms/components/obc-title-container.md +81 -0
- package/llms/components/obc-toggle-button-group.md +184 -0
- package/llms/components/obc-toggle-button-option.md +126 -0
- package/llms/components/obc-toggle-button-three-state.md +38 -0
- package/llms/components/obc-toggle-button-vertical-group.md +142 -0
- package/llms/components/obc-toggle-button-vertical-option.md +110 -0
- package/llms/components/obc-toggle-switch.md +126 -0
- package/llms/components/obc-toggletip.md +135 -0
- package/llms/components/obc-tooltip.md +106 -0
- package/llms/components/obc-top-bar.md +194 -0
- package/llms/components/obc-top-view-propulsion.md +84 -0
- package/llms/components/obc-topbar-message-item.md +150 -0
- package/llms/components/obc-transformer.md +64 -0
- package/llms/components/obc-transmitter-button.md +101 -0
- package/llms/components/obc-transmitter-stack.md +79 -0
- package/llms/components/obc-transmitter.md +114 -0
- package/llms/components/obc-tree-navigation-group.md +69 -0
- package/llms/components/obc-tree-navigation-item.md +110 -0
- package/llms/components/obc-tree-navigation.md +73 -0
- package/llms/components/obc-tunnel-thruster.md +59 -0
- package/llms/components/obc-user-button.md +107 -0
- package/llms/components/obc-user-menu.md +154 -0
- package/llms/components/obc-valve-analog-three-way-icon.md +69 -0
- package/llms/components/obc-valve-analog-two-way-icon.md +39 -0
- package/llms/components/obc-velocity-projection-plot.md +34 -0
- package/llms/components/obc-vendor-button.md +63 -0
- package/llms/components/obc-vertical-line.md +33 -0
- package/llms/components/obc-watch-flat.md +54 -0
- package/llms/components/obc-watch.md +206 -0
- package/llms/components/obc-wind-indicator.md +52 -0
- package/llms/components/obc-wind-propulsion.md +92 -0
- package/llms/components/obc-wind.md +46 -0
- package/llms/docs/ar-poi-projection.md +36 -0
- package/llms/docs/automation-sequence-step-diagram-playground.md +13 -0
- package/llms/docs/building-blocks-advice.md +31 -0
- package/llms/docs/building-blocks-external-scale.md +138 -0
- package/llms/docs/building-blocks-setpoint.md +119 -0
- package/llms/docs/introduction-advice-system.md +161 -0
- package/llms/docs/introduction-getting-started.md +94 -0
- package/llms/docs/introduction-introduction.md +27 -0
- package/llms/docs/introduction-join-the-project.md +11 -0
- package/llms/docs/introduction-migration-guide-2-0-to-2-1.md +126 -0
- package/llms/docs/introduction-migration-guide-2-1-to-2-2.md +106 -0
- package/llms/docs/introduction-migration-guide.md +1063 -0
- package/llms/docs/palettes-categorical-colour.md +9 -0
- package/llms/llms-full.txt +28380 -0
- package/llms/llms.txt +368 -0
- package/package.json +12 -2
- package/script/cem-plugins/lifecycle.d.mts +6 -0
- package/script/cem-plugins/lifecycle.mjs +48 -0
- package/script/cem-plugins.test.ts +52 -1
- package/script/generate-llms-txt.ts +34 -0
- package/script/llms/channel.test.ts +69 -0
- package/script/llms/channel.ts +63 -0
- package/script/llms/generate.test.ts +143 -0
- package/script/llms/generate.ts +229 -0
- package/script/llms/manifest.test.ts +160 -0
- package/script/llms/manifest.ts +109 -0
- package/script/llms/markdown.test.ts +22 -0
- package/script/llms/markdown.ts +37 -0
- package/script/llms/mdx.test.ts +172 -0
- package/script/llms/mdx.ts +171 -0
- package/script/llms/render-component.test.ts +290 -0
- package/script/llms/render-component.ts +208 -0
- package/script/llms/render-guides.test.ts +105 -0
- package/script/llms/render-guides.ts +51 -0
- package/script/llms/render-llms-txt.test.ts +222 -0
- package/script/llms/render-llms-txt.ts +185 -0
- package/script/llms/sources.test.ts +118 -0
- package/script/llms/sources.ts +89 -0
- package/script/llms/stories.test.ts +193 -0
- package/script/llms/stories.ts +256 -0
- package/script/llms/types.ts +95 -0
- package/script/prepare-full-bundle.ts +1 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# `<obc-alert-menu>`
|
|
2
|
+
|
|
3
|
+
A tabbed alert summary panel for displaying, acknowledging, and managing active alerts.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/application-components-alerts-alert-menu--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/alert-menu/alert-menu.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-alert-menu>` – A tabbed alert summary panel for displaying, acknowledging, and managing active alerts.
|
|
8
|
+
|
|
9
|
+
Provides a compact, interactive menu for reviewing current alerts, grouped by status (e.g., unacknowledged, active, shelved). Users can acknowledge visible alerts, silence notifications, or navigate to a full alert list. Designed for quick triage and management of alert items in a sidebar or overlay context.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
- **Tabbed organization:** Switch between "Unacked", "Active", and (optionally) "Shelved" tabs for focused alert review.
|
|
13
|
+
- **Alert filtering:** Each tab displays only relevant alerts: "Unacked" shows the non-shelved items still waiting for acknowledgment (`unacknowledged` or `rectified-unacknowledged`), "Active" every non-shelved item except the `rectified-unacknowledged` ones. A subclass changes the tabs and the list through the `tabs` and `renderList` hooks.
|
|
14
|
+
- **Bulk actions:** "ACK visible" button allows acknowledging all currently visible (filtered) alerts at once.
|
|
15
|
+
- **Silence and navigation:** Dedicated buttons to silence alerts or jump to the full alert list.
|
|
16
|
+
- **Dynamic content:** Supports any number of `<obc-alert-menu-item>` children, with automatic empty-state messaging and icons per tab.
|
|
17
|
+
- **Responsive layout:** Adapts to available space, with scrollable alert lists and sticky action bar.
|
|
18
|
+
- **Customizable:** Optionally show/hide the "Shelved" tab via `hasShelved` property; enable/disable bulk ACK via `canAckAll`.
|
|
19
|
+
|
|
20
|
+
## Usage Guidelines
|
|
21
|
+
Use `<obc-alert-menu>` to provide users with a focused, actionable summary of current alerts, typically in a sidebar, overlay, or dashboard context. Ideal for scenarios where users need to quickly review, acknowledge, or silence multiple alerts without leaving their current workflow. Avoid using for persistent, always-visible alert banners; for that, use a dedicated alert banner or notification system.
|
|
22
|
+
|
|
23
|
+
- Place one or more `<obc-alert-menu-item>` elements as children to populate the alert list.
|
|
24
|
+
- Use the `hasShelved` property to enable the "Shelved" tab if your application supports alert shelving.
|
|
25
|
+
- Use the `canAckAll` property to control whether the "ACK visible" button is enabled (e.g., only when there are unacknowledged alerts in view).
|
|
26
|
+
- Listen for custom events (`ack-all-visible-click`, `silence-click`, `go-to-alert-list-click`) to handle user actions.
|
|
27
|
+
|
|
28
|
+
**TODO(designer):** Confirm if there are recommended maximum numbers of alerts to display, or if there are best practices for when to use the "Shelved" tab.
|
|
29
|
+
|
|
30
|
+
## Slots
|
|
31
|
+
|
|
32
|
+
| Slot Name | Renders When... | Purpose |
|
|
33
|
+
|----------------------------------|----------------------------------|----------------------------------------------------------------|
|
|
34
|
+
| (default) | Always | Place one or more `<obc-alert-menu-item>` elements as alert rows. |
|
|
35
|
+
| empty-<tab>-title | Selected tab is empty | Custom title for the empty state (`<tab>` is one of `unacked`, `all`, `shelved`). |
|
|
36
|
+
| empty-<tab>-description | Selected tab is empty | Custom description for the empty state (`<tab>` is one of `unacked`, `all`, `shelved`). |
|
|
37
|
+
| empty-<tab>-icon | Selected tab is empty | Custom icon for the empty state (`<tab>` is one of `unacked`, `all`, `shelved`). |
|
|
38
|
+
|
|
39
|
+
## Properties
|
|
40
|
+
- `hasShelved` (boolean): If true, displays the "Shelved" tab and enables shelving support. Default: false.
|
|
41
|
+
- `canAckAll` (boolean): If true, enables the "ACK visible" button for bulk acknowledgment. Default: false.
|
|
42
|
+
- `showSilenceButton` (boolean): If true, shows the "Silence" button. Default: true.
|
|
43
|
+
- `showAlertListButton` (boolean): If true, shows the "Alerts" navigation button. Default: true.
|
|
44
|
+
|
|
45
|
+
## Events
|
|
46
|
+
- **ack-all-visible-click** – Fired when the "ACK visible" button is clicked. The event detail includes the list of visible alert elements and the current tab name.
|
|
47
|
+
- **silence-click** – Fired when the "Silence" button is clicked.
|
|
48
|
+
- **go-to-alert-list-click** – Fired when the "Alerts" navigation button is clicked.
|
|
49
|
+
|
|
50
|
+
## Best Practices and Constraints
|
|
51
|
+
- Only enable "ACK visible" when there are actionable, unacknowledged alerts in the current view.
|
|
52
|
+
- Use the "Shelved" tab only if your application supports shelving alerts; otherwise, omit it for simplicity.
|
|
53
|
+
- For accessibility, keep all alert items and action buttons keyboard navigable.
|
|
54
|
+
- Do not use this component for persistent, always-on-screen alerts; use banners or dialogs for critical, persistent notifications.
|
|
55
|
+
|
|
56
|
+
## Example
|
|
57
|
+
```
|
|
58
|
+
<obc-alert-menu hasShelved canAckAll>
|
|
59
|
+
<obc-alert-menu-item active hasTime>
|
|
60
|
+
<obi-placeholder slot="alert-icon"></obi-placeholder>
|
|
61
|
+
<span slot="title">Engine Overheat</span>
|
|
62
|
+
<span slot="description">Main engine temperature exceeds threshold</span>
|
|
63
|
+
<span slot="time">09:12:34</span>
|
|
64
|
+
</obc-alert-menu-item>
|
|
65
|
+
<!-- More alert items... -->
|
|
66
|
+
</obc-alert-menu>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Properties
|
|
70
|
+
|
|
71
|
+
| Property | Attribute | Type | Default | Description |
|
|
72
|
+
| --- | --- | --- | --- | --- |
|
|
73
|
+
| softDismiss | softDismiss | `boolean` | `false` | Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. |
|
|
74
|
+
| open | open | `boolean` | `false` | Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`. Available when `softDismiss==true`. |
|
|
75
|
+
| hasShelved | hasShelved | `boolean` | `false` | If true, displays the "Shelved" tab and enables shelving support for alerts. Set to false to hide the "Shelved" tab and related filtering. |
|
|
76
|
+
| canAckAll | canAckAll | `boolean` | `false` | If true, enables the "ACK visible" button, allowing users to acknowledge all currently visible alerts in the active tab. Should be set to true only when there are unacknowledged alerts in view. |
|
|
77
|
+
| showSilenceButton | | `boolean` | `true` | If true, shows the "Silence" button in the action bar. When hidden, the "ACK visible" button expands to fill the freed space. |
|
|
78
|
+
| showAlertListButton | | `boolean` | `true` | If true, shows the "Alerts" navigation button in the action bar. When hidden, the "ACK visible" button expands to fill the freed space. |
|
|
79
|
+
|
|
80
|
+
## Events
|
|
81
|
+
|
|
82
|
+
| Event | Type | Description |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| ack-all-visible-click | `ObcAckAllVisibleClickEvent` | Fired when the ack all visible button is clicked |
|
|
85
|
+
| silence-click | `CustomEvent` | Fired when the silence button is clicked |
|
|
86
|
+
| go-to-alert-list-click | `CustomEvent` | Fired when the go to alert list button is clicked |
|
|
87
|
+
| close | `CustomEvent<void>` | Fired when the menu closed on its own, from a click outside, `Escape`, or another menu opening. `open` is already `false` by the time it arrives; reset the flag you bind to `open` here, or the next click on the button finds it still set and asks a closed menu to close. |
|
|
88
|
+
|
|
89
|
+
## Slots
|
|
90
|
+
|
|
91
|
+
| Slot | Description |
|
|
92
|
+
| --- | --- |
|
|
93
|
+
| (default) | The alerts items as ObcAlertMenuItem |
|
|
94
|
+
| empty-<tab>-title | Custom empty-state title for the selected tab (`<tab>` is one of `unacked`, `all`, `shelved`) |
|
|
95
|
+
| empty-<tab>-description | Custom empty-state description for the selected tab (`<tab>` is one of `unacked`, `all`, `shelved`) |
|
|
96
|
+
| empty-<tab>-icon | Custom empty-state icon for the selected tab (`<tab>` is one of `unacked`, `all`, `shelved`) |
|
|
97
|
+
|
|
98
|
+
## Stories
|
|
99
|
+
|
|
100
|
+
- [Regular](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-menu--regular)
|
|
101
|
+
- [Empty](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-menu--empty)
|
|
102
|
+
- [One Item](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-menu--one-item)
|
|
103
|
+
- [No Shelf](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-menu--no-shelf)
|
|
104
|
+
- [No Silence Button](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-menu--no-silence-button)
|
|
105
|
+
- [No Alert List Button](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-menu--no-alert-list-button)
|
|
106
|
+
- [Only Ack Button](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-menu--only-ack-button)
|
|
107
|
+
- [Acknowledgment Test](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-menu--acknowledgment-test)
|
|
108
|
+
- [Ack All Test](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-menu--ack-all-test)
|
|
109
|
+
- [Ack All After Scroll Test](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-menu--ack-all-after-scroll-test)
|
|
110
|
+
- [Add Alert Test](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-menu--add-alert-test)
|
|
111
|
+
- [Make Empty Test](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-menu--make-empty-test)
|
|
112
|
+
|
|
113
|
+
## See also
|
|
114
|
+
|
|
115
|
+
- [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# `<obc-alert-subsystem-button>`
|
|
2
|
+
|
|
3
|
+
A subsystem's alert counts as a split control: the counts open the alert menu, the list icon goes to the alert list page.
|
|
4
|
+
|
|
5
|
+
Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/application-components-alerts-alert-subsystem-button--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/alert-subsystem-button/alert-subsystem-button.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-alert-subsystem-button>` – A subsystem's alert counts as a split
|
|
8
|
+
control: the counts open the alert menu, the list icon goes to the alert
|
|
9
|
+
list page.
|
|
10
|
+
|
|
11
|
+
The left half is `obc-alert-subsystem-counter` with the per-severity
|
|
12
|
+
`counts` drawn by `obc-alert-counter-item`, inside a button of the normal
|
|
13
|
+
style; the right half is an icon button with the alert list icon. The two
|
|
14
|
+
share one edge, as the halves of `obc-split-button` do.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
- **Counts:** `counts` per severity, drawn as badges; `hasAlert` off, or
|
|
20
|
+
on with nothing counted, shows `emptyText` instead.
|
|
21
|
+
- **Label and icon:** `label` and the `icon` slot, as on the counter.
|
|
22
|
+
- **Two halves:** `counter-click` from the counts, `alert-list-click` from
|
|
23
|
+
the list icon; `counterDisabled` and `listDisabled` disable one half,
|
|
24
|
+
`disabled` both.
|
|
25
|
+
- **List icon:** the `list-icon` slot, the alert list icon when empty.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Usage Guidelines
|
|
30
|
+
- Show `obc-alert-menu` on `counter-click` and navigate on
|
|
31
|
+
`alert-list-click`; the button reports the clicks and nothing more.
|
|
32
|
+
- Two native buttons, each a tab stop, activated by Enter and Space
|
|
33
|
+
([APG button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/)).
|
|
34
|
+
Left out: nothing.
|
|
35
|
+
- **TODO(designer):** the design draws an empty placeholder badge for each
|
|
36
|
+
zero count; no counter in the library does, so only non-zero counts are
|
|
37
|
+
drawn (#1396).
|
|
38
|
+
- **TODO(designer):** a disabled counter half dims its frame, while the
|
|
39
|
+
severity badges keep their colour and the label its active colour; the
|
|
40
|
+
design has no disabled variant.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Example
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<obc-alert-subsystem-button label="HVAC" hasAlert .counts=${{countCaution: 2}}>
|
|
48
|
+
<obi-placeholder slot="icon"></obi-placeholder>
|
|
49
|
+
</obc-alert-subsystem-button>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Properties
|
|
53
|
+
|
|
54
|
+
| Property | Attribute | Type | Default | Description |
|
|
55
|
+
| --- | --- | --- | --- | --- |
|
|
56
|
+
| counts | | `AlertCounts` | `{}` | Alert count per severity, drawn as badges in the counter half. Available when `hasAlert==true`. |
|
|
57
|
+
| hasAlert | hasAlert | `boolean` | `false` | Whether the subsystem has active alerts: `true` draws the badges, `false` the `emptyText`; `true` with nothing counted shows the `emptyText` as well. |
|
|
58
|
+
| label | label | `string` | `''` | The subsystem label, before the badges. |
|
|
59
|
+
| emptyText | emptyText | `string` | `'No alerts'` | Text shown instead of the badges when `hasAlert` is `false` or nothing is counted. |
|
|
60
|
+
| disabled | disabled | `boolean` | `false` | Disables both halves. |
|
|
61
|
+
| counterDisabled | counterDisabled | `boolean` | `false` | Disables the counter half alone. |
|
|
62
|
+
| listDisabled | listDisabled | `boolean` | `false` | Disables the list half alone. |
|
|
63
|
+
| listButtonLabel | listButtonLabel | `string` | `''` | Accessible name of the list half; "Alert list" when left empty. |
|
|
64
|
+
| ariaLabel | aria-label | `string \| null` | `null` | Accessible name of the counter half, mapped to the `aria-label` attribute; replaces the generated "HVAC, 2 Caution", or "Alerts" when the half has neither a label nor text. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. |
|
|
65
|
+
|
|
66
|
+
## Events
|
|
67
|
+
|
|
68
|
+
| Event | Type | Description |
|
|
69
|
+
| --- | --- | --- |
|
|
70
|
+
| counter-click | `CustomEvent<void>` | Fired when the counter half is clicked. |
|
|
71
|
+
| alert-list-click | `CustomEvent<void>` | Fired when the list half is clicked. |
|
|
72
|
+
|
|
73
|
+
## Slots
|
|
74
|
+
|
|
75
|
+
| Slot | Description |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| icon | Leading icon of the counter half. |
|
|
78
|
+
| list-icon | Icon of the list half; the alert list icon when empty. |
|
|
79
|
+
|
|
80
|
+
## Stories
|
|
81
|
+
|
|
82
|
+
- [Default](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-button--default)
|
|
83
|
+
- [With Label](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-button--with-label)
|
|
84
|
+
- [No Alerts](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-button--no-alerts)
|
|
85
|
+
- [Level Severities](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-button--level-severities)
|
|
86
|
+
- [Disabled](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-button--disabled)
|
|
87
|
+
- [Counter Disabled](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-button--counter-disabled)
|
|
88
|
+
- [List Disabled](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-button--list-disabled)
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# `<obc-alert-subsystem-counter>`
|
|
2
|
+
|
|
3
|
+
A framed summary of a subsystem's alert counts: a leading icon, a label, and a trailing set of slotted count badges.
|
|
4
|
+
|
|
5
|
+
Lifecycle: beta. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/application-components-alerts-alert-subsystem-counter--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/alert-subsystem-counter/alert-subsystem-counter.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-alert-subsystem-counter>` – A framed summary of a subsystem's alert
|
|
8
|
+
counts: a leading icon, a label, and a trailing set of slotted count badges.
|
|
9
|
+
|
|
10
|
+
When there are no active alerts it shows a muted label and an empty-state
|
|
11
|
+
message instead of the badges. The count badges themselves are supplied by
|
|
12
|
+
the consumer as slotted `obc-badge` elements; this component provides only
|
|
13
|
+
the frame, layout, label, and empty state.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
- **Orientation:** `horizontal` (single row) or `vertical` (badges on a line
|
|
19
|
+
below the label).
|
|
20
|
+
- **Alert state:** `hasAlert` toggles between an active (bold label, badges)
|
|
21
|
+
and an inactive (muted label, empty text) presentation.
|
|
22
|
+
- **Freeform label:** Pass a full title or an abbreviation — the label is
|
|
23
|
+
plain text decided by the caller and truncates with an ellipsis.
|
|
24
|
+
- **Configurable empty text:** Customize the message shown when there are no
|
|
25
|
+
alerts via `emptyText`.
|
|
26
|
+
- **Optional leading icon:** Provide an icon through the `icon` slot; omit it
|
|
27
|
+
and the leading box collapses with no empty gap; with no label either, the
|
|
28
|
+
whole leading column goes and the badges take the frame.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Usage Guidelines
|
|
33
|
+
- Use this component to give an at-a-glance count of outstanding alerts for a
|
|
34
|
+
single subsystem, grouped by severity.
|
|
35
|
+
- Provide one slotted badge per severity in the `badges` slot, typically
|
|
36
|
+
`<obc-badge size="large">` with a severity `type` and a `number`. The
|
|
37
|
+
badge `type` values are the same severity vocabulary as `AlertType`
|
|
38
|
+
(`alarm`, `warning`, `caution` and the `level-*` family); order them
|
|
39
|
+
highest severity first, as `ALERT_SEVERITY_PRIORITY` does.
|
|
40
|
+
- Set `hasAlert` to `false` to present the resolved/clear state; the badges
|
|
41
|
+
are then not rendered and `emptyText` is shown. The component does not
|
|
42
|
+
derive the state from the slotted badges — the consumer owns it.
|
|
43
|
+
- Choose `vertical` orientation in narrow containers where the badges do not
|
|
44
|
+
fit beside the label.
|
|
45
|
+
- The counter is display-only: it renders no button and fires no events. For
|
|
46
|
+
a clickable subsystem entry with badges, see `obc-tree-navigation-item`
|
|
47
|
+
(`alertBadges`) or `obc-integration-fleet-button` (`alerts`).
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Slots
|
|
52
|
+
|
|
53
|
+
| Slot Name | Renders When... | Purpose |
|
|
54
|
+
|-----------|------------------------|----------------------------------------------------|
|
|
55
|
+
| `icon` | The slot has content | Leading 24px icon (e.g. `<obi-placeholder>`). |
|
|
56
|
+
| `badges` | `hasAlert` is true | Count badges, one per severity (`<obc-badge>`). |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Example
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<obc-alert-subsystem-counter label="Label" hasAlert>
|
|
64
|
+
<obi-placeholder slot="icon"></obi-placeholder>
|
|
65
|
+
<obc-badge slot="badges" size="large" type="alarm" .number=${9}></obc-badge>
|
|
66
|
+
<obc-badge slot="badges" size="large" type="warning" .number=${4}></obc-badge>
|
|
67
|
+
<obc-badge slot="badges" size="large" type="caution" .number=${2}></obc-badge>
|
|
68
|
+
</obc-alert-subsystem-counter>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Properties
|
|
72
|
+
|
|
73
|
+
| Property | Attribute | Type | Default | Description |
|
|
74
|
+
| --- | --- | --- | --- | --- |
|
|
75
|
+
| label | label | `string` | `''` | The subsystem label. Pass a full title or an abbreviation as plain text. |
|
|
76
|
+
| orientation | orientation | `ObcAlertSubsystemCounterOrientation` | | Layout direction: `horizontal` (default) keeps icon, label and badges in one row; `vertical` moves the badges (or empty text) to a line below the label. |
|
|
77
|
+
| hasAlert | hasAlert | `boolean` | `false` | Whether the subsystem has active alerts. `true` shows the label bold and renders the `badges` slot; `false` mutes the label and shows `emptyText` instead of the badges. |
|
|
78
|
+
| emptyText | emptyText | `string` | `'No alerts'` | Text shown in the trailing area when `hasAlert` is `false`. Available when `hasAlert==false`. |
|
|
79
|
+
|
|
80
|
+
## Events
|
|
81
|
+
|
|
82
|
+
None.
|
|
83
|
+
|
|
84
|
+
## Slots
|
|
85
|
+
|
|
86
|
+
| Slot | Description |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| icon | Optional leading 24px icon. |
|
|
89
|
+
| badges | Count badges shown when `hasAlert` is true. |
|
|
90
|
+
|
|
91
|
+
## CSS parts
|
|
92
|
+
|
|
93
|
+
| Part | Description |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| frame | The framed box, for a host that draws its own frame around the counter. |
|
|
96
|
+
|
|
97
|
+
## Stories
|
|
98
|
+
|
|
99
|
+
- [Default](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-counter--default)
|
|
100
|
+
- [Abbreviation](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-counter--abbreviation)
|
|
101
|
+
- [No Alerts](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-counter--no-alerts)
|
|
102
|
+
- [Vertical](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-counter--vertical)
|
|
103
|
+
- [Vertical No Alerts](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-counter--vertical-no-alerts)
|
|
104
|
+
- [Abbreviation Vertical](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-counter--abbreviation-vertical)
|
|
105
|
+
- [Without Icon](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-counter--without-icon)
|
|
106
|
+
- [Long Label](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-counter--long-label): The label is the only element that gives way: it truncates with an ellipsis while the icon and badges keep their size.
|
|
107
|
+
- [Level Severities](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-counter--level-severities): The badge `type` accepts the whole `AlertType` vocabulary, including the `level-*` family. Slot them highest severity first, in `ALERT_SEVERITY_PRIORITY` order.
|
|
108
|
+
- [With Badge Icons](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-counter--with-badge-icons): Any `obc-badge` configuration works in the `badges` slot — here the `flat` variant with `showIcon` so each count carries its severity symbol.
|
|
109
|
+
- [Overview](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-counter--overview): A status overview composes one counter per subsystem in a grid. Counters with and without alerts, with and without icons, and with different badge families share one row height.
|
|
110
|
+
- [Overview Vertical](https://openbridge-next-storybook.web.app/?path=/story/application-components-alerts-alert-subsystem-counter--overview-vertical)
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# `<obc-analog-threeway-valve>`
|
|
2
|
+
|
|
3
|
+
three-way control valve for process diagrams, with a continuous opening per port.
|
|
4
|
+
|
|
5
|
+
Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/automation-automation-devices-analog-threeway-valve--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/automation/analog-threeway-valve/analog-threeway-valve.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-analog-threeway-valve>` – three-way control valve for process
|
|
8
|
+
diagrams, with a continuous opening per port.
|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **Three ports:** `open1`, `open2` and `open3` set each port's opening in
|
|
13
|
+
percent. Ports are numbered from the side without a port: with
|
|
14
|
+
`orientation` `bottom`, port 1 is left, port 2 is the stem at the bottom
|
|
15
|
+
and port 3 is right. The numbering turns with the symbol.
|
|
16
|
+
- **Symbol:** a partly open port shows its shut part as a band at the port
|
|
17
|
+
end, a port at 0 % is drawn plugged, and the handle shows how the most
|
|
18
|
+
open port splits between the two others (`obc-valve-analog-three-way-icon`).
|
|
19
|
+
- **Orientation:** `bottom` and `top` lay the valve on a horizontal pipe,
|
|
20
|
+
`left` and `right` on a vertical one; the value names the side the stem
|
|
21
|
+
points to.
|
|
22
|
+
- **Flow readout:** `flows` lists one readout row per flow, each with an
|
|
23
|
+
optional arrow direction and either a value with a unit (`%` when left out)
|
|
24
|
+
or a state, `{open}`, shown as `Open` or `Closed` after the arrow, or
|
|
25
|
+
after the on/off icon when there is no direction. Without flows the
|
|
26
|
+
readout shows `Open` or `Closed`.
|
|
27
|
+
- Badges, alert frame, progress and readout placement come from the shared
|
|
28
|
+
automation button base.
|
|
29
|
+
|
|
30
|
+
## Usage Guidelines
|
|
31
|
+
|
|
32
|
+
Use for a mixing or diverting valve that opens its ports continuously.
|
|
33
|
+
With fewer than two ports open no flow can pass, and the valve shows as
|
|
34
|
+
closed. For on/off ports use `obc-digital-threeway-valve`; for a two-port
|
|
35
|
+
control valve use `obc-analog-valve`.
|
|
36
|
+
|
|
37
|
+
## Properties
|
|
38
|
+
|
|
39
|
+
| Property | Attribute | Type | Default | Description |
|
|
40
|
+
| --- | --- | --- | --- | --- |
|
|
41
|
+
| open1 | open1 | `number` | `0` | Opening of port 1 in percent (0–100). |
|
|
42
|
+
| open2 | open2 | `number` | `0` | Opening of port 2, the stem, in percent (0–100). |
|
|
43
|
+
| open3 | open3 | `number` | `0` | Opening of port 3 in percent (0–100). |
|
|
44
|
+
| orientation | orientation | `ThreewayValveOrientation` | | Side the stem points to. |
|
|
45
|
+
| flows | | `ThreewayValveFlow[]` | `[]` | Readout rows, one per flow: an optional arrow direction with either a value and optional unit (default `%`) or `open` for an `Open`/`Closed` state. |
|
|
46
|
+
| variant | variant | `AnalogThreewayValveVariant` | | Visual style of the button surround. |
|
|
47
|
+
| extraReadouts | | `AutomationButtonReadoutStack[]` | | |
|
|
48
|
+
| icon | | `TemplateResult` | | |
|
|
49
|
+
| showReadoutStack | | `boolean` | `true` | |
|
|
50
|
+
| static | static | `boolean` | `false` | Draws the device as present with its state unknown: a grey button, and the static icon where the device has one. |
|
|
51
|
+
| readoutPosition | readoutPosition | `AutomationButtonReadoutPosition \| undefined` | `undefined` | Available when `showReadoutStack==true`. |
|
|
52
|
+
| showStatus | | `boolean` | `true` | Available when `showReadoutStack==true`. |
|
|
53
|
+
| showStatusIcon | | `boolean` | `false` | |
|
|
54
|
+
| readoutSize | readoutSize | `AutomationButtonReadoutStackSize` | | Available when `showReadoutStack==true`. |
|
|
55
|
+
| tag | tag | `string \| null` | `null` | Available when `showReadoutStack==true`. |
|
|
56
|
+
| positioning | positioning | `AutomationButtonPositioning` | | |
|
|
57
|
+
| activated | activated | `boolean` | `false` | Enables the activated background color, used to indicate that the button is activated/selected. |
|
|
58
|
+
| alert | alert | `boolean` | `false` | |
|
|
59
|
+
| alertFrameType | alertFrameType | `ObcAlertFrameType` | | Available when `alert==true`. |
|
|
60
|
+
| alertFrameThickness | alertFrameThickness | `ObcAlertFrameThickness` | | Available when `alert==true`. |
|
|
61
|
+
| alertFrameStatus | alertFrameStatus | `AlertType` | | Available when `alert==true`. |
|
|
62
|
+
| alertFrameMode | alertFrameMode | `ObcAlertFrameMode` | | Available when `alert==true`. |
|
|
63
|
+
| showAlertCategoryIcon | | `boolean` | `true` | Available when `alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]`. |
|
|
64
|
+
| showAlertIcon | showAlertIcon | `boolean` | `false` | Available when `alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]`. |
|
|
65
|
+
| progress | progress | `boolean` | `false` | Shows a progress indicator, used to indicate that an user action is in progress |
|
|
66
|
+
| progressMode | progressMode | `CircularProgressMode` | | Available when `progress==true`. |
|
|
67
|
+
| progressValue | progressValue | `number` | `0` | Available when `progress==true && progressMode in [determinate, progressiveIndeterminate]`. |
|
|
68
|
+
| badgeControl | badgeControl | `AutomationButtonBadgeControl` | | |
|
|
69
|
+
| badgeCommandLocked | badgeCommandLocked | `AutomationButtonBadgeCommandLocked` | | |
|
|
70
|
+
| badgeInterlock | badgeInterlock | `AutomationButtonBadgeInterlock` | | |
|
|
71
|
+
| badgeAlert | badgeAlert | `AutomationButtonBadgeAlert` | | |
|
|
72
|
+
| badgeLayout | | `AutomationButtonBadgeLayout \| undefined` | `undefined` | Which badge kind each corner shows, on top of the app-wide layout set with `setAutomationBadgeLayout()`. A corner left out keeps the app-wide badge, `null` leaves it empty, and a badge moved here leaves the corner it came from. |
|
|
73
|
+
| badgeSymbolOverride | | `AutomationBadgeSymbolOverride \| undefined` | `undefined` | Letters that replace badge symbols on this device, per badge property and value, on top of the app-wide ones set with `setAutomationBadgeSymbolOverride()`; for example `{commandLocked: {simulation: 's'}}`. `null` brings the symbol back. |
|
|
74
|
+
| badgeTopRight | | `HTMLElement[]` | | |
|
|
75
|
+
| badgeTopLeft | | `HTMLElement[]` | | |
|
|
76
|
+
| badgeBottomLeft | | `HTMLElement[]` | | |
|
|
77
|
+
| badgeBottomRight | | `HTMLElement[]` | | |
|
|
78
|
+
|
|
79
|
+
## Events
|
|
80
|
+
|
|
81
|
+
| Event | Type | Description |
|
|
82
|
+
| --- | --- | --- |
|
|
83
|
+
| click | | Fired when the valve is clicked. |
|
|
84
|
+
|
|
85
|
+
## Slots
|
|
86
|
+
|
|
87
|
+
| Slot | Description |
|
|
88
|
+
| --- | --- |
|
|
89
|
+
| badge-top-right | Content projected into the top-right badge position; overrides the badge `badgeLayout` puts in that corner. |
|
|
90
|
+
| badge-top-left | Content projected into the top-left badge position; overrides the badge `badgeLayout` puts in that corner. |
|
|
91
|
+
| badge-bottom-left | Content projected into the bottom-left badge position; overrides the badge `badgeLayout` puts in that corner. |
|
|
92
|
+
| badge-bottom-right | Content projected into the bottom-right badge position; overrides the badge `badgeLayout` puts in that corner. |
|
|
93
|
+
|
|
94
|
+
## Stories
|
|
95
|
+
|
|
96
|
+
- [Split](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-threeway-valve--split)
|
|
97
|
+
- [Open](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-threeway-valve--open)
|
|
98
|
+
- [Closed](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-threeway-valve--closed)
|
|
99
|
+
- [Port 3 Closed](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-threeway-valve--port-3-closed)
|
|
100
|
+
- [Orientation Left](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-threeway-valve--orientation-left)
|
|
101
|
+
- [Orientation Top](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-threeway-valve--orientation-top)
|
|
102
|
+
- [Orientation Right](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-threeway-valve--orientation-right)
|
|
103
|
+
|
|
104
|
+
## See also
|
|
105
|
+
|
|
106
|
+
- [Migration Guide 2.0 to 2.1](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide-2-0-to-2-1.md)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# `<obc-analog-valve>`
|
|
2
|
+
|
|
3
|
+
No summary yet.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/automation-automation-devices-analog-valve--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/automation/analog-valve/analog-valve.ts)
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
| Property | Attribute | Type | Default | Description |
|
|
10
|
+
| --- | --- | --- | --- | --- |
|
|
11
|
+
| open | open | `boolean` | `false` | |
|
|
12
|
+
| value | value | `number` | `0` | |
|
|
13
|
+
| vertical | vertical | `boolean` | `false` | |
|
|
14
|
+
| labelDirection | labelDirection | `AutomationButtonLabelDirection` | | Available when `open==true`. |
|
|
15
|
+
| variant | variant | `AnalogValveVariant` | | |
|
|
16
|
+
| handle | handle | `ObcValveHandle` | | The handle or actuator drawn on the valve. It sits on top of a horizontal pipe and to the right of a vertical one. |
|
|
17
|
+
| invertHandlePosition | invertHandlePosition | `boolean` | `false` | Put the handle on the other side of the valve. Available when `handle!=none`. |
|
|
18
|
+
| handleSize | handleSize | `AutomationButtonHandleSize` | | Size of the handle: `small` draws it from the symbol's centre, for symbols without a button around them. Available when `handle!=none`. |
|
|
19
|
+
| extraReadouts | | `AutomationButtonReadoutStack[]` | | |
|
|
20
|
+
| icon | | `TemplateResult` | | |
|
|
21
|
+
| showReadoutStack | | `boolean` | `true` | |
|
|
22
|
+
| static | static | `boolean` | `false` | Draws the device as present with its state unknown: a grey button, and the static icon where the device has one. |
|
|
23
|
+
| readoutPosition | readoutPosition | `AutomationButtonReadoutPosition \| undefined` | `undefined` | Available when `showReadoutStack==true`. |
|
|
24
|
+
| showStatus | | `boolean` | `true` | Available when `showReadoutStack==true`. |
|
|
25
|
+
| showStatusIcon | | `boolean` | `false` | |
|
|
26
|
+
| readoutSize | readoutSize | `AutomationButtonReadoutStackSize` | | Available when `showReadoutStack==true`. |
|
|
27
|
+
| tag | tag | `string \| null` | `null` | Available when `showReadoutStack==true`. |
|
|
28
|
+
| positioning | positioning | `AutomationButtonPositioning` | | |
|
|
29
|
+
| activated | activated | `boolean` | `false` | Enables the activated background color, used to indicate that the button is activated/selected. |
|
|
30
|
+
| alert | alert | `boolean` | `false` | |
|
|
31
|
+
| alertFrameType | alertFrameType | `ObcAlertFrameType` | | Available when `alert==true`. |
|
|
32
|
+
| alertFrameThickness | alertFrameThickness | `ObcAlertFrameThickness` | | Available when `alert==true`. |
|
|
33
|
+
| alertFrameStatus | alertFrameStatus | `AlertType` | | Available when `alert==true`. |
|
|
34
|
+
| alertFrameMode | alertFrameMode | `ObcAlertFrameMode` | | Available when `alert==true`. |
|
|
35
|
+
| showAlertCategoryIcon | | `boolean` | `true` | Available when `alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]`. |
|
|
36
|
+
| showAlertIcon | showAlertIcon | `boolean` | `false` | Available when `alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]`. |
|
|
37
|
+
| progress | progress | `boolean` | `false` | Shows a progress indicator, used to indicate that an user action is in progress |
|
|
38
|
+
| progressMode | progressMode | `CircularProgressMode` | | Available when `progress==true`. |
|
|
39
|
+
| progressValue | progressValue | `number` | `0` | Available when `progress==true && progressMode in [determinate, progressiveIndeterminate]`. |
|
|
40
|
+
| badgeControl | badgeControl | `AutomationButtonBadgeControl` | | |
|
|
41
|
+
| badgeCommandLocked | badgeCommandLocked | `AutomationButtonBadgeCommandLocked` | | |
|
|
42
|
+
| badgeInterlock | badgeInterlock | `AutomationButtonBadgeInterlock` | | |
|
|
43
|
+
| badgeAlert | badgeAlert | `AutomationButtonBadgeAlert` | | |
|
|
44
|
+
| badgeLayout | | `AutomationButtonBadgeLayout \| undefined` | `undefined` | Which badge kind each corner shows, on top of the app-wide layout set with `setAutomationBadgeLayout()`. A corner left out keeps the app-wide badge, `null` leaves it empty, and a badge moved here leaves the corner it came from. |
|
|
45
|
+
| badgeSymbolOverride | | `AutomationBadgeSymbolOverride \| undefined` | `undefined` | Letters that replace badge symbols on this device, per badge property and value, on top of the app-wide ones set with `setAutomationBadgeSymbolOverride()`; for example `{commandLocked: {simulation: 's'}}`. `null` brings the symbol back. |
|
|
46
|
+
| badgeTopRight | | `HTMLElement[]` | | |
|
|
47
|
+
| badgeTopLeft | | `HTMLElement[]` | | |
|
|
48
|
+
| badgeBottomLeft | | `HTMLElement[]` | | |
|
|
49
|
+
| badgeBottomRight | | `HTMLElement[]` | | |
|
|
50
|
+
|
|
51
|
+
## Events
|
|
52
|
+
|
|
53
|
+
None.
|
|
54
|
+
|
|
55
|
+
## Slots
|
|
56
|
+
|
|
57
|
+
None.
|
|
58
|
+
|
|
59
|
+
## Stories
|
|
60
|
+
|
|
61
|
+
- [Open](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-valve--open)
|
|
62
|
+
- [Closed](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-valve--closed)
|
|
63
|
+
- [Without Label Direction](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-valve--without-label-direction)
|
|
64
|
+
- [With Badges](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-valve--with-badges)
|
|
65
|
+
- [With Simulation Badge](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-valve--with-simulation-badge)
|
|
66
|
+
- [Closed With Handle](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-valve--closed-with-handle)
|
|
67
|
+
- [Open With Handle](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-valve--open-with-handle)
|
|
68
|
+
- [Handle On Every Side](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-valve--handle-on-every-side)
|
|
69
|
+
- [All Handles](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-analog-valve--all-handles)
|
|
70
|
+
|
|
71
|
+
## See also
|
|
72
|
+
|
|
73
|
+
- [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
|
|
74
|
+
- [Migration Guide 2.0 to 2.1](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide-2-0-to-2-1.md)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# `<obc-app-button>`
|
|
2
|
+
|
|
3
|
+
A compact, icon-capable button component for primary and secondary actions.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ui-components-buttons-app-button--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/app-button/app-button.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-app-button>` – A compact, icon-capable button component for primary and secondary actions.
|
|
8
|
+
|
|
9
|
+
This button displays an icon and a label, supporting both regular and small sizes. It can visually indicate a "checked" or selected state, making it suitable for toggleable actions or as a selectable button in a group.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
- **Icon support:** Accepts a custom icon via the `icon` slot, allowing for visual cues alongside the label.
|
|
13
|
+
- **Label:** Displays a text label, set via the `label` property.
|
|
14
|
+
- **Checked state:** Can be toggled to a "checked" appearance for selected or active actions.
|
|
15
|
+
- **Size variants:** Supports `normal` (default) and `small` sizes for flexible placement in toolbars or compact UIs.
|
|
16
|
+
- **Accessible touch target:** Ensures minimum size for usability.
|
|
17
|
+
|
|
18
|
+
## Variants
|
|
19
|
+
- **Normal:** Standard size for most use cases, providing a larger touch target and icon.
|
|
20
|
+
- **Small:** Reduced size for dense layouts or secondary actions.
|
|
21
|
+
- **Checked:** Visually highlights the button as selected or active.
|
|
22
|
+
|
|
23
|
+
## Usage Guidelines
|
|
24
|
+
Use `obc-app-button` for actions that benefit from both an icon and a label, such as toolbars, action panels, or toggleable controls. The `checked` state is ideal for representing toggled or selected actions (e.g., view modes, filters). For icon-only actions, consider a dedicated icon button component.
|
|
25
|
+
**TODO(designer):** Confirm if there are recommended scenarios or restrictions for using the checked state, and if this button is intended for use in toggle groups.
|
|
26
|
+
|
|
27
|
+
## Slots
|
|
28
|
+
| Slot Name | Renders When... | Purpose |
|
|
29
|
+
|-----------|-----------------|---------|
|
|
30
|
+
| icon | Always | Displays the leading icon for the button. Use an OpenBridge icon such as `<obi-placeholder></obi-placeholder>`. |
|
|
31
|
+
|
|
32
|
+
## Properties and Attributes
|
|
33
|
+
- `label` (string): Sets the button's text label. Default: "Button".
|
|
34
|
+
- `checked` (boolean): If true, applies the "checked" visual style.
|
|
35
|
+
- `size` (`'normal'` \| `'small'`): Controls the button's size. Default: `'normal'`.
|
|
36
|
+
|
|
37
|
+
## Events
|
|
38
|
+
- Emits a standard `click` event (`onClick` handler in framework wrappers) when activated.
|
|
39
|
+
|
|
40
|
+
## Best Practices
|
|
41
|
+
- Ensure the icon used in the `icon` slot is visually clear at small sizes.
|
|
42
|
+
- Use the `checked` state to indicate selection, not for general emphasis.
|
|
43
|
+
- Maintain consistent sizing within button groups for visual harmony.
|
|
44
|
+
|
|
45
|
+
## Example:
|
|
46
|
+
```html
|
|
47
|
+
<obc-app-button label="Search" size="normal">
|
|
48
|
+
<obi-search slot="icon"></obi-search>
|
|
49
|
+
</obc-app-button>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Properties
|
|
53
|
+
|
|
54
|
+
| Property | Attribute | Type | Default | Description |
|
|
55
|
+
| --- | --- | --- | --- | --- |
|
|
56
|
+
| label | label | `string` | `'Button'` | Sets the button's text label. Available when `showLabel==true`. |
|
|
57
|
+
| checked | checked | `boolean` | `false` | If true, applies the "checked" visual style to indicate selection or active state. |
|
|
58
|
+
| showLabel | | `boolean` | `true` | If true, shows the button's label. |
|
|
59
|
+
| integration | integration | `boolean` | `false` | If true, applies integration styles for the integration app bar. |
|
|
60
|
+
| size | size | | `AppButtonSize.Normal` | Controls the button's size variant. Accepts `'normal'` (default) or `'small'`. |
|
|
61
|
+
| disabled | disabled | `boolean` | `false` | |
|
|
62
|
+
|
|
63
|
+
## Events
|
|
64
|
+
|
|
65
|
+
| Event | Type | Description |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| click | | Fired when the button is clicked (if not disabled). |
|
|
68
|
+
|
|
69
|
+
## Slots
|
|
70
|
+
|
|
71
|
+
| Slot | Description |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| icon | Displays the leading icon for the button. |
|
|
74
|
+
|
|
75
|
+
## Stories
|
|
76
|
+
|
|
77
|
+
- [Primary](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-app-button--primary)
|
|
78
|
+
- [Checked](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-app-button--checked)
|
|
79
|
+
- [Small](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-app-button--small)
|
|
80
|
+
- [Small Hide Label](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-app-button--small-hide-label)
|
|
81
|
+
- [Integration](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-app-button--integration)
|
|
82
|
+
- [Integration Hover Uses Integration Colors](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-app-button--integration-hover-uses-integration-colors)
|
|
83
|
+
- [Disabled](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-app-button--disabled)
|