@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,54 @@
|
|
|
1
|
+
# `<obc-main-engine>`
|
|
2
|
+
|
|
3
|
+
A main engine's two columns: thrust, split at zero, and speed from the bottom.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/instruments-main-engine--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/main-engine/main-engine.ts)
|
|
6
|
+
|
|
7
|
+
A main engine's two columns: thrust, split at zero, and speed from the
|
|
8
|
+
bottom. Each column takes its own advice list, resolved against that
|
|
9
|
+
column's value and setpoint under one trigger mode and one emphasis
|
|
10
|
+
setting, like the azimuth thruster's two axes.
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
| Property | Attribute | Type | Default | Description |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| thrust | thrust | `number` | `0` | |
|
|
17
|
+
| thrustSetpoint | thrustSetpoint | `number \| undefined` | | |
|
|
18
|
+
| thrustTouching | thrustTouching | `boolean` | `false` | |
|
|
19
|
+
| atThrustSetpoint | atThrustSetpoint | `boolean` | `false` | |
|
|
20
|
+
| speed | speed | `number` | `0` | |
|
|
21
|
+
| speedSetpoint | speedSetpoint | `number \| undefined` | | |
|
|
22
|
+
| speedTouching | speedTouching | `boolean` | `false` | |
|
|
23
|
+
| atSpeedSetpoint | atSpeedSetpoint | `boolean` | `false` | |
|
|
24
|
+
| autoAtThrustSetpoint | | `boolean` | `true` | |
|
|
25
|
+
| autoAtSpeedSetpoint | | `boolean` | `true` | |
|
|
26
|
+
| autoAtThrustSetpointDeadband | autoAtThrustSetpointDeadband | `number` | `1` | |
|
|
27
|
+
| autoAtSpeedSetpointDeadband | autoAtSpeedSetpointDeadband | `number` | `1` | |
|
|
28
|
+
| thrustSetpointAtZeroDeadband | thrustSetpointAtZeroDeadband | `number` | `0.5` | |
|
|
29
|
+
| speedSetpointAtZeroDeadband | speedSetpointAtZeroDeadband | `number` | `0.5` | |
|
|
30
|
+
| state | state | `InstrumentState` | | |
|
|
31
|
+
| priority | priority | `Priority` | | |
|
|
32
|
+
| thrustAdvices | | `AdviceInput[]` | `[]` | Advice ranges and points on the thrust column, in percent of thrust; a band across zero is split at the zero line. |
|
|
33
|
+
| speedAdvices | | `AdviceInput[]` | `[]` | Advice ranges and points on the speed column, in percent of speed, drawn on the column's outer side. |
|
|
34
|
+
| adviceTrigger | adviceTrigger | `AdviceTrigger` | | Which readings trigger an advice on both columns: the value, the setpoint, or either (the default). Available when `thrustAdvices!=[] \|\| speedAdvices!=[]`. |
|
|
35
|
+
| adviceEmphasis | adviceEmphasis | `boolean` | `false` | The design's emphasis rules between go-to and no-go bands, off by default. Available when `thrustAdvices!=[] \|\| speedAdvices!=[]`. |
|
|
36
|
+
|
|
37
|
+
## Events
|
|
38
|
+
|
|
39
|
+
None.
|
|
40
|
+
|
|
41
|
+
## Slots
|
|
42
|
+
|
|
43
|
+
None.
|
|
44
|
+
|
|
45
|
+
## Stories
|
|
46
|
+
|
|
47
|
+
- [In Command](https://openbridge-next-storybook.web.app/?path=/story/instruments-main-engine--in-command)
|
|
48
|
+
- [Not In Command](https://openbridge-next-storybook.web.app/?path=/story/instruments-main-engine--not-in-command)
|
|
49
|
+
- [Off](https://openbridge-next-storybook.web.app/?path=/story/instruments-main-engine--off)
|
|
50
|
+
- [With Advices](https://openbridge-next-storybook.web.app/?path=/story/instruments-main-engine--with-advices): Each column takes its own list: the thrust bands are split at zero and the speed bands sit on the speed column's outer side. The readings sit inside the optimal bands, which trigger.
|
|
51
|
+
|
|
52
|
+
## See also
|
|
53
|
+
|
|
54
|
+
- [Advice System](https://openbridge-next-storybook.web.app/docs/introduction-advice-system.md)
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# `<obc-menu-button>`
|
|
2
|
+
|
|
3
|
+
A dropdown menu button for selecting one or more options from a contextual menu.
|
|
4
|
+
|
|
5
|
+
Lifecycle: beta. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ui-components-buttons-menu-button--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/menu-button/menu-button.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-menu-button>` – A dropdown menu button for selecting one or more options from a contextual menu.
|
|
8
|
+
|
|
9
|
+
Provides a button that opens a configurable context menu, supporting single or multi-select, nested/flyout submenus, and multi-column layouts. The button can display a label, an optional icon, and adapts to various menu types (regular, checkboxes, flyout, multi-column, etc.).
|
|
10
|
+
|
|
11
|
+
Appears as a compact button that, when clicked, reveals a menu for actions, filtering, or grouped selections. Useful for toolbars, filter bars, or anywhere contextual actions or selections are needed without taking up persistent space.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
- **Menu Types:** Supports multiple menu variants via `menuType`:
|
|
15
|
+
- `Regular`: Standard single-select menu (action menu).
|
|
16
|
+
- `Checkboxes`: Multi-select with checkboxes.
|
|
17
|
+
- `NestedCheckboxes`: Hierarchical multi-select with nested checkboxes.
|
|
18
|
+
- `Flyout`: Multi-level flyout menu (supports nested groups).
|
|
19
|
+
- `Multi`: Multi-column menu (for large option sets).
|
|
20
|
+
- `MultiWithSubtitles`: Multi-column menu with group subtitles.
|
|
21
|
+
- **Selection Modes:**
|
|
22
|
+
- Single-select or multi-select (controlled by `multiSelect` and `menuType`).
|
|
23
|
+
- Per-group selection (only one item per group/column, via `selectPerGroup`).
|
|
24
|
+
- Optionally persist selection state (`persistSelection`).
|
|
25
|
+
- **Layout Options:**
|
|
26
|
+
- Full width (`fullWidth`) or fit-content.
|
|
27
|
+
- Menu can open above or below the button (`openTop`).
|
|
28
|
+
- Multi-column and grouped layouts (`columnGroups`, `itemsPerColumn`).
|
|
29
|
+
- Optional title bar with close button (`hasTitleBar`, `menuTitle`).
|
|
30
|
+
- **Content Customization:**
|
|
31
|
+
- Optional icon slot in button (`hasIcon`).
|
|
32
|
+
- Option icons and hierarchical/nested option structures.
|
|
33
|
+
- **Accessibility & Keyboard:**
|
|
34
|
+
- Keyboard navigation and ARIA roles.
|
|
35
|
+
- Disabled state disables both button and menu.
|
|
36
|
+
- **Events:**
|
|
37
|
+
- Emits `change` when selection changes.
|
|
38
|
+
- Emits `item-click` when an item is clicked.
|
|
39
|
+
- Emits `close` when the menu closes.
|
|
40
|
+
|
|
41
|
+
## Usage Guidelines
|
|
42
|
+
Use `obc-menu-button` to present a compact button that reveals a contextual menu for actions, filtering, or grouped selections. Ideal for toolbars, filter bars, or overflow menus where space is limited but multiple or hierarchical options are needed. Choose the menu type and selection mode based on your use case:
|
|
43
|
+
- Use `menuType="Regular"` for simple single-action menus.
|
|
44
|
+
- Use `multiSelect` or `menuType="Checkboxes"` for multi-select scenarios (e.g., filtering).
|
|
45
|
+
- Use `menuType="Flyout"` for hierarchical or grouped actions.
|
|
46
|
+
- Use `menuType="Multi"` or `menuType="MultiWithSubtitles"` for large sets of options, grouped or split across columns.
|
|
47
|
+
- Use the icon slot for visual context (e.g., filter, settings, actions).
|
|
48
|
+
- Avoid using for persistent navigation—this is for contextual, transient actions or selections.
|
|
49
|
+
|
|
50
|
+
**TODO(designer):** Confirm recommended use cases for each menu type and when to use per-group selection.
|
|
51
|
+
|
|
52
|
+
## Slots
|
|
53
|
+
| Slot Name | Renders When... | Purpose |
|
|
54
|
+
|-----------|---------------------|-----------------------------------------|
|
|
55
|
+
| `icon` | `hasIcon` is true | Icon displayed at the start of the button. |
|
|
56
|
+
|
|
57
|
+
## Properties & Attributes
|
|
58
|
+
- `label`: Text label shown on the button.
|
|
59
|
+
- `options`: Array of menu options (each with value, label, optional icon, children, etc.).
|
|
60
|
+
- `selectedValues`: Array of currently selected option values.
|
|
61
|
+
- `fullWidth`: If true, button stretches to fill its container.
|
|
62
|
+
- `hasIcon`: If true, shows the `icon` slot.
|
|
63
|
+
- `menuType`: Controls menu variant (see Features above). Defaults to `Regular`.
|
|
64
|
+
- `multiSelect`: If true, enables multi-select (overrides default for menuType).
|
|
65
|
+
- `selectPerGroup`: If true, only one selection per group/column (flyout/multi-column).
|
|
66
|
+
- `hasTitleBar`: If true, shows a title bar with close button in the menu.
|
|
67
|
+
- `menuTitle`: Title text for the menu (if `hasTitleBar` is true).
|
|
68
|
+
- `columnGroups`: Used for `multi-with-subtitles` layout; defines grouped columns.
|
|
69
|
+
- `itemsPerColumn`: Number of items per column in multi-column layouts.
|
|
70
|
+
- `openTop`: If true, menu opens above the button.
|
|
71
|
+
- `disabled`: Disables both the button and the menu.
|
|
72
|
+
|
|
73
|
+
## Events
|
|
74
|
+
- `change` – Fired when the menu selection changes (returns selected values and options).
|
|
75
|
+
- `item-click` – Fired when a menu item is clicked (returns value and option).
|
|
76
|
+
- `open` – Fired when the menu is opened.
|
|
77
|
+
- `close` – Fired when the menu is closed.
|
|
78
|
+
|
|
79
|
+
## Best Practices & Constraints
|
|
80
|
+
- Only use multi-select for scenarios where users may need to select multiple items (e.g., filters, bulk actions).
|
|
81
|
+
- For action menus (single-select, no persistence), set `persistSelection` to false.
|
|
82
|
+
- Use per-group selection (`selectPerGroup`) for grouped flyout or multi-column menus where only one selection per group is allowed.
|
|
83
|
+
- Avoid nesting too deeply in flyout menus for usability.
|
|
84
|
+
- If using icons in options, supply them via the `icon` property of each option (e.g., `<obi-placeholder></obi-placeholder>`).
|
|
85
|
+
- The button is fully keyboard accessible and supports ARIA roles for menu and menuitem.
|
|
86
|
+
- Menu closes automatically on selection (unless in multi-select mode).
|
|
87
|
+
|
|
88
|
+
## Example
|
|
89
|
+
```html
|
|
90
|
+
<obc-menu-button
|
|
91
|
+
label="Actions"
|
|
92
|
+
.options=${[
|
|
93
|
+
{ value: 'edit', label: 'Edit', icon: html`<obi-placeholder></obi-placeholder>` },
|
|
94
|
+
{ value: 'delete', label: 'Delete' }
|
|
95
|
+
]}
|
|
96
|
+
.selectedValues=${['edit']}
|
|
97
|
+
hasIcon
|
|
98
|
+
>
|
|
99
|
+
<obi-placeholder slot="icon"></obi-placeholder>
|
|
100
|
+
</obc-menu-button>
|
|
101
|
+
```
|
|
102
|
+
In this example, the button displays an icon and label, and opens a menu with two options (one with an icon).
|
|
103
|
+
|
|
104
|
+
## Properties
|
|
105
|
+
|
|
106
|
+
| Property | Attribute | Type | Default | Description |
|
|
107
|
+
| --- | --- | --- | --- | --- |
|
|
108
|
+
| label | label | `string` | `''` | The label displayed on the button. If empty, the button can be rendered as icon-only. |
|
|
109
|
+
| options | options | `ContextMenuOption[]` | `[]` | Menu options, each with a unique `value` and a `label`, and optionally an `icon` template, `children` for a nested or flyout menu, and a `level` giving the nesting depth in a hierarchical menu. |
|
|
110
|
+
| selectedValues | selectedValues | `string[]` | `[]` | Array of currently selected option values. Used to control which options are checked/selected in the menu. |
|
|
111
|
+
| fullWidth | fullWidth | `boolean` | `false` | Whether the button should fill the full width of its container. If true, the button stretches to 100% width. |
|
|
112
|
+
| hasIcon | hasIcon | `boolean` | `false` | Whether the button should show an icon slot. If true, the `icon` slot is rendered at the start of the button. |
|
|
113
|
+
| menuType | menuType | `ContextMenuType` | `ContextMenuType.Regular` | Context menu variant, which sets the layout and the selection behaviour: `regular` (default) is single-select, `checkboxes` and `nested-checkboxes` are flat and hierarchical multi-select, `flyout` is a multi-level flyout, and `multi` and `multi-with-subtitles` lay the menu out in columns. |
|
|
114
|
+
| multiSelect | multiSelect | `boolean \| undefined` | | Whether multiple selections are allowed. Overrides the default selection mode for the chosen variant. If not explicitly set, defaults based on `menuType`. |
|
|
115
|
+
| selectPerGroup | selectPerGroup | `boolean \| undefined` | | Allows single selection per group (flyout/multi-column only). When true, only one item per group/column can be selected. |
|
|
116
|
+
| hasTitleBar | hasTitleBar | `boolean` | `false` | Whether to show a title bar with close button at the top of the menu. If true, the menu displays a title bar (use `menuTitle` for text). |
|
|
117
|
+
| menuTitle | menuTitle | `string` | `''` | Title text displayed in the title bar (if `hasTitleBar` is true). |
|
|
118
|
+
| columnGroups | columnGroups | `ColumnGroup[]` | `[]` | Array of column groups for the `multi-with-subtitles` layout. Used to define grouped columns with subtitles in multi-column menus. |
|
|
119
|
+
| itemsPerColumn | itemsPerColumn | `number` | `5` | Number of items per column in multi-column layouts. Used for `Multi` and `MultiWithSubtitles` menu types. |
|
|
120
|
+
| openTop | openTop | `boolean` | `false` | Render the dropdown context menu above or below the button. If true, the menu opens above the button; otherwise, it opens below. |
|
|
121
|
+
| disabled | disabled | `boolean` | `false` | Whether both parts of the button are disabled. Disables both the button and the menu. |
|
|
122
|
+
|
|
123
|
+
## Events
|
|
124
|
+
|
|
125
|
+
| Event | Type | Description |
|
|
126
|
+
| --- | --- | --- |
|
|
127
|
+
| change | `ObcSplitButtonChangeEvent` | Fired when the menu selection changes. |
|
|
128
|
+
| item-click | `ObcMenuButtonItemClickEvent` | Fired when a menu item is clicked. |
|
|
129
|
+
| open | `CustomEvent<void>` | Fired when the menu is opened. |
|
|
130
|
+
| close | `CustomEvent<void>` | Fired when the menu is closed. |
|
|
131
|
+
|
|
132
|
+
## Slots
|
|
133
|
+
|
|
134
|
+
| Slot | Description |
|
|
135
|
+
| --- | --- |
|
|
136
|
+
| icon | Icon displayed at the start of the button when `hasIcon` is true. |
|
|
137
|
+
|
|
138
|
+
## Stories
|
|
139
|
+
|
|
140
|
+
- [Regular](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--regular): Default regular context menu button with icon and label.
|
|
141
|
+
- [Icon Only](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--icon-only): Icon-only context menu button without label.
|
|
142
|
+
- [Open Top](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--open-top): Context menu that opens above the button.
|
|
143
|
+
- [Disabled](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--disabled): Default regular context menu button with icon and label.
|
|
144
|
+
- [Regular (Multi-Select with Checkboxes)](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--regular-multi-select): Multi-select with checkboxes (automatically converted from regular).
|
|
145
|
+
- [Action Menu (No Selection Persistence)](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--action-menu): Single-select without persistence (like action menus).
|
|
146
|
+
- [Nested Checkboxes](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--nested-checkboxes): Nested checkboxes with hierarchical structure.
|
|
147
|
+
- [Flyout Menu With Multi Select](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--flyout-menu-with-multi-select): Multi-select flyout menu (automatically uses nested checkboxes).
|
|
148
|
+
- [Flyout Menu Without Persistent State](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--flyout-menu-without-persistent-state): Flyout menu with grouped actions.
|
|
149
|
+
- [Flyout Menu With Persistent State](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--flyout-menu-with-persistent-state): Per-group selection flyout menu with persistence.
|
|
150
|
+
- [Multi-Column (Multi-Select)](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--multi-column-multi-select): Multi-column menu (multi-select: checkboxes in each column).
|
|
151
|
+
- [Multi-Column With Subtitles (Multi-Select)](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--multi-column-with-subtitles-multi-select): Multi-column menu with subtitles/groups (multi-select: checkboxes per group).
|
|
152
|
+
- [Multi-Column (One Selection Per Column)](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--multi-column-with-one-selection)
|
|
153
|
+
- [Multi-Column (One Selection Per Column)](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--multi-column-group-selection): Multi-column menu (single selection per column/group allowed).
|
|
154
|
+
- [Multi-Column With Subtitles (One Per Group)](https://openbridge-next-storybook.web.app/?path=/story/ui-components-buttons-menu-button--multi-column-with-subtitles-group-selection): Multi-column with subtitles/groups (one selection per group/column).
|
|
155
|
+
|
|
156
|
+
## See also
|
|
157
|
+
|
|
158
|
+
- [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# `<obc-message-menu-item>`
|
|
2
|
+
|
|
3
|
+
An expandable message or notification item for use in message lists, notification panels, or alert menus.
|
|
4
|
+
|
|
5
|
+
Lifecycle: beta. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ui-components-message-and-alerts-message-menu-item--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/message-menu-item/message-menu-item.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-message-menu-item>` – An expandable message or notification item for use in message lists, notification panels, or alert menus.
|
|
8
|
+
|
|
9
|
+
Displays a concise message row with optional icons, title, description, timestamp, and action buttons. Clicking the item expands it to reveal the full content. Designed for scannable lists where users may need to quickly review and act on individual messages.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Size Variants:**
|
|
14
|
+
- `single-line`: Compact layout with title and description on one line (default).
|
|
15
|
+
- `double-line`: Two-line layout with title on top and description below.
|
|
16
|
+
- When clicked, both variants expand to show full multi-line content.
|
|
17
|
+
|
|
18
|
+
- **Stack Direction:**
|
|
19
|
+
- `stackVertical=false` (default): Action buttons appear inline to the right of the content.
|
|
20
|
+
- `stackVertical=true`: Action buttons appear below the content, spanning full width.
|
|
21
|
+
|
|
22
|
+
- **Icon Options:**
|
|
23
|
+
- Primary and secondary icon slots for visual context or status indicators.
|
|
24
|
+
- Enhanced icon mode (`enhancedIcon`) increases icon size for emphasis.
|
|
25
|
+
- Trailing icon slot (horizontal layout only) for additional actions.
|
|
26
|
+
- Shelved state (`isShelved`) displays a shelf icon automatically.
|
|
27
|
+
|
|
28
|
+
- **Actions:**
|
|
29
|
+
- Supports up to two action buttons via `primaryActionLabel` and `secondaryActionLabel`.
|
|
30
|
+
- Each action can be independently disabled by setting `enablePrimaryAction` or `enableSecondaryAction` to `false`.
|
|
31
|
+
- In vertical layout, action buttons expand to full width.
|
|
32
|
+
|
|
33
|
+
- **Timestamp:**
|
|
34
|
+
- Optional day and time display via `day` and `time` properties.
|
|
35
|
+
|
|
36
|
+
## Usage Guidelines
|
|
37
|
+
|
|
38
|
+
Use `obc-message-menu-item` to present individual notifications, alerts, or messages within a scrollable list. Ideal for scenarios where users need to quickly scan items, expand for details, or take immediate action.
|
|
39
|
+
|
|
40
|
+
- Use `single-line` for high-density lists where space is limited.
|
|
41
|
+
- Use `double-line` when the description needs more visibility in the collapsed state.
|
|
42
|
+
- Keep `stackVertical=false` (default) when actions should be quickly accessible inline.
|
|
43
|
+
- Use `stackVertical=true` when actions need more prominence or when space is narrow.
|
|
44
|
+
- Enable `enhancedIcon` to highlight important or priority messages.
|
|
45
|
+
- Use `isShelved` to indicate messages that have been temporarily set aside.
|
|
46
|
+
- Set `enablePrimaryAction` / `enableSecondaryAction` to `false` when an action is temporarily unavailable (e.g. awaiting a precondition) rather than removing the button.
|
|
47
|
+
|
|
48
|
+
## Slots
|
|
49
|
+
|
|
50
|
+
Text content for `title`, `description`, and `action-label` supports both props (for plain text) and slots (for rich HTML like `CO<sub>2</sub>`).
|
|
51
|
+
To use a slot, set the corresponding `has*Slot` prop to `true`.
|
|
52
|
+
|
|
53
|
+
| Slot Name | Enabled By | Purpose |
|
|
54
|
+
|------------------|--------------------------|---------------------------------------------------|
|
|
55
|
+
| `title` | `hasTitleSlot=true` | Message title. Use slot for rich HTML. |
|
|
56
|
+
| `description` | `hasDescriptionSlot=true`| Message description. Use slot for rich HTML. |
|
|
57
|
+
| `action-label` | `hasActionLabelSlot=true`| Primary action button label. Use slot for rich HTML. |
|
|
58
|
+
| `primary-icon` | `hasPrimaryIcon=true` | Main icon representing message type or status. |
|
|
59
|
+
| `secondary-icon` | `hasSecondaryIcon=true` | Additional icon for secondary status or context. |
|
|
60
|
+
| `trailing-icon` | `hasTrailingIcon=true` (horizontal only) | Icon button after action buttons. |
|
|
61
|
+
|
|
62
|
+
## Events
|
|
63
|
+
|
|
64
|
+
- `message-click` – Fired when the message item is clicked. Detail includes `{ open: boolean }`.
|
|
65
|
+
- `primary-action-click` – Fired when the primary action button is clicked.
|
|
66
|
+
- `secondary-action-click` – Fired when the secondary action button is clicked.
|
|
67
|
+
|
|
68
|
+
## Example
|
|
69
|
+
|
|
70
|
+
Using props (simple text):
|
|
71
|
+
```html
|
|
72
|
+
<obc-message-menu-item
|
|
73
|
+
size="double-line"
|
|
74
|
+
title="System Update"
|
|
75
|
+
description="A new update is available for installation."
|
|
76
|
+
day="Yesterday"
|
|
77
|
+
time="14:32"
|
|
78
|
+
primaryActionLabel="Install"
|
|
79
|
+
hasPrimaryIcon
|
|
80
|
+
>
|
|
81
|
+
<obi-placeholder slot="primary-icon"></obi-placeholder>
|
|
82
|
+
</obc-message-menu-item>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Using slots (rich HTML):
|
|
86
|
+
```html
|
|
87
|
+
<obc-message-menu-item
|
|
88
|
+
size="double-line"
|
|
89
|
+
day="Yesterday"
|
|
90
|
+
time="14:32"
|
|
91
|
+
hasPrimaryIcon
|
|
92
|
+
hasTitleSlot
|
|
93
|
+
hasDescriptionSlot
|
|
94
|
+
hasActionLabelSlot
|
|
95
|
+
>
|
|
96
|
+
<span slot="title">High CO<sub>2</sub> level</span>
|
|
97
|
+
<span slot="description">CO<sub>2</sub> concentration exceeds safe limits.</span>
|
|
98
|
+
<span slot="action-label">Acknowledge</span>
|
|
99
|
+
<obi-placeholder slot="primary-icon"></obi-placeholder>
|
|
100
|
+
</obc-message-menu-item>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Properties
|
|
104
|
+
|
|
105
|
+
| Property | Attribute | Type | Default | Description |
|
|
106
|
+
| --- | --- | --- | --- | --- |
|
|
107
|
+
| size | size | `ObcMessageMenuItemSize` | | |
|
|
108
|
+
| stackVertical | stackVertical | `boolean` | `false` | |
|
|
109
|
+
| enhancedIcon | enhancedIcon | `boolean` | `false` | |
|
|
110
|
+
| open | open | `boolean` | `false` | |
|
|
111
|
+
| title | title | `string` | `''` | |
|
|
112
|
+
| description | description | `string` | `''` | |
|
|
113
|
+
| day | day | `string` | `''` | |
|
|
114
|
+
| time | time | `string` | `''` | |
|
|
115
|
+
| primaryActionLabel | primaryActionLabel | `string` | `''` | Available when `hasActionLabelSlot==false`. |
|
|
116
|
+
| secondaryActionLabel | secondaryActionLabel | `string` | `''` | |
|
|
117
|
+
| enablePrimaryAction | | `boolean` | `true` | |
|
|
118
|
+
| enableSecondaryAction | | `boolean` | `true` | |
|
|
119
|
+
| hasPrimaryIcon | hasPrimaryIcon | `boolean` | `false` | |
|
|
120
|
+
| hasSecondaryIcon | hasSecondaryIcon | `boolean` | `false` | |
|
|
121
|
+
| hasTrailingIcon | hasTrailingIcon | `boolean` | `false` | Available when `stackVertical==false`. |
|
|
122
|
+
| isShelved | isShelved | `boolean` | `false` | |
|
|
123
|
+
| hasActionLabelSlot | hasActionLabelSlot | `boolean` | `false` | |
|
|
124
|
+
|
|
125
|
+
## Events
|
|
126
|
+
|
|
127
|
+
| Event | Type | Description |
|
|
128
|
+
| --- | --- | --- |
|
|
129
|
+
| message-click | `CustomEvent<{open: boolean}>` | Fired when the message item is clicked. |
|
|
130
|
+
| primary-action-click | `CustomEvent<void>` | Fired when the primary action button is clicked. |
|
|
131
|
+
| secondary-action-click | `CustomEvent<void>` | Fired when the secondary action button is clicked. |
|
|
132
|
+
|
|
133
|
+
## Slots
|
|
134
|
+
|
|
135
|
+
| Slot | Description |
|
|
136
|
+
| --- | --- |
|
|
137
|
+
| title | Message title (shown when `hasTitleSlot` is true). |
|
|
138
|
+
| description | Message description (shown when `hasDescriptionSlot` is true). |
|
|
139
|
+
| action-label | Primary action button label (shown when `hasActionLabelSlot` is true). |
|
|
140
|
+
| primary-icon | Main icon representing the message type or status (shown when `hasPrimaryIcon` is true). |
|
|
141
|
+
| secondary-icon | Additional icon for secondary status/context (shown when `hasSecondaryIcon` is true). |
|
|
142
|
+
| trailing-icon | Icon after action buttons, horizontal layout only (shown when `hasTrailingIcon` is true). |
|
|
143
|
+
|
|
144
|
+
## Stories
|
|
145
|
+
|
|
146
|
+
- [Horizontal Single Line](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--horizontal-single-line)
|
|
147
|
+
- [Horizontal Double Line](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--horizontal-double-line)
|
|
148
|
+
- [Horizontal Open](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--horizontal-open)
|
|
149
|
+
- [Horizontal Enhanced Single Line](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--horizontal-enhanced-single-line)
|
|
150
|
+
- [Horizontal Enhanced Double Line](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--horizontal-enhanced-double-line)
|
|
151
|
+
- [Horizontal Enhanced Open](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--horizontal-enhanced-open)
|
|
152
|
+
- [Vertical Single Line](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--vertical-single-line)
|
|
153
|
+
- [Vertical Double Line](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--vertical-double-line)
|
|
154
|
+
- [Vertical Open](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--vertical-open)
|
|
155
|
+
- [Vertical Enhanced Single Line](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--vertical-enhanced-single-line)
|
|
156
|
+
- [Vertical Enhanced Double Line](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--vertical-enhanced-double-line)
|
|
157
|
+
- [Vertical Enhanced Open](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--vertical-enhanced-open)
|
|
158
|
+
- [Horizontal With Two Actions](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--horizontal-with-two-actions)
|
|
159
|
+
- [Horizontal With One Disabled Action](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--horizontal-with-one-disabled-action)
|
|
160
|
+
- [Horizontal With Trailing Icon](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--horizontal-with-trailing-icon)
|
|
161
|
+
- [Horizontal With Secondary Icon](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--horizontal-with-secondary-icon)
|
|
162
|
+
- [Vertical With Two Actions](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--vertical-with-two-actions)
|
|
163
|
+
- [Vertical With Secondary Icon](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--vertical-with-secondary-icon)
|
|
164
|
+
- [Shelved](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--shelved)
|
|
165
|
+
- [Shelved Vertical](https://openbridge-next-storybook.web.app/?path=/story/ui-components-message-and-alerts-message-menu-item--shelved-vertical)
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# `<obc-modal-window>`
|
|
2
|
+
|
|
3
|
+
A modular dialog component for displaying content and capturing user actions.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/application-components-containers-modal-window-sizing--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/modal-window/modal-window.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-modal-window>` – A modular dialog component for displaying content and capturing user actions.
|
|
8
|
+
|
|
9
|
+
The `obc-modal-window` provides a structured layout with a header (title and leading icon), a content area, and a footer with action buttons (Cancel, Done, and an optional custom action).
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
- **Flexible Sizing:** Supports `small`, `medium`, and `large` sizes to accommodate different content amounts.
|
|
13
|
+
- **Header Customization:** Includes a title slot and an optional leading icon slot.
|
|
14
|
+
- **Action Management:** Built-in "Cancel" and "Done" buttons, plus an optional additional action button.
|
|
15
|
+
- **Responsive Actions:** Action buttons automatically switch between horizontal and vertical layouts based on the modal size.
|
|
16
|
+
|
|
17
|
+
## Slots
|
|
18
|
+
| Slot Name | Renders When... | Purpose |
|
|
19
|
+
|---------------|----------------------------|----------------------------------------------------|
|
|
20
|
+
| leading-icon | `hasLeadingIcon` is true | Icon displayed before the title |
|
|
21
|
+
| title | Always | Main heading text for the modal |
|
|
22
|
+
| content | Always | Primary content area of the modal |
|
|
23
|
+
| option-label | `hasOptionalAction` is true | Label for the optional action button |
|
|
24
|
+
| cancel-label | `hasCancelAction` is true | Label for the cancel button |
|
|
25
|
+
| done-label | Always | Label for the primary (done) button |
|
|
26
|
+
|
|
27
|
+
## Properties
|
|
28
|
+
- `size` (ObcModalWindowSize): Controls the width and layout of the modal. Default is `large`.
|
|
29
|
+
- `hasOptionalAction` (boolean): Shows an additional action button when true.
|
|
30
|
+
- `hasLeadingIcon` (boolean): Shows the leading icon slot when true.
|
|
31
|
+
- `hasCancelAction` (boolean): Shows the footer cancel button when true. Default is `true`.
|
|
32
|
+
- `hasCloseAction` (boolean): Shows the header close (X) button when true. Default is `true`.
|
|
33
|
+
|
|
34
|
+
## Events
|
|
35
|
+
- `close-click`: Fired when the close (X) button in the header is clicked.
|
|
36
|
+
- `cancel-click`: Fired when the cancel button is clicked.
|
|
37
|
+
- `done-click`: Fired when the done button is clicked.
|
|
38
|
+
- `option-click`: Fired when the optional action button is clicked.
|
|
39
|
+
|
|
40
|
+
## Keyboard
|
|
41
|
+
Follows the APG modal dialog pattern
|
|
42
|
+
(https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/). The component has
|
|
43
|
+
no open state: rendering it opens it and removing it closes it, so focus
|
|
44
|
+
moves onto the dialog when it connects, `Tab` and `Shift+Tab` cycle inside
|
|
45
|
+
it, and focus returns to the element that opened it when it disconnects.
|
|
46
|
+
`Escape` fires `close-click`, or `cancel-click` when there is no close
|
|
47
|
+
button; a dialog with neither has to be resolved with its Done button.
|
|
48
|
+
Focus lands on the dialog container rather than its first button, so a
|
|
49
|
+
dialog opened with `Enter` cannot be dismissed by the same key press. The
|
|
50
|
+
container is a landing point, not an operable control, so it carries no
|
|
51
|
+
focus ring; the ring stays on the dialog's controls.
|
|
52
|
+
|
|
53
|
+
Left out: a description (`aria-describedby`), and `Escape` for a dialog
|
|
54
|
+
that has neither a close nor a cancel button.
|
|
55
|
+
|
|
56
|
+
## Sizing
|
|
57
|
+
By default the modal is as tall as its content, capped at `90vh`. To give it
|
|
58
|
+
an explicit height, set the `--obc-modal-window-height` custom property on
|
|
59
|
+
the element — either a fixed value (`--obc-modal-window-height: 360px`) or
|
|
60
|
+
`100%` to fill a host element that is sized by its container. The `90vh` cap
|
|
61
|
+
always applies, and the content area scrolls when the content does not fit.
|
|
62
|
+
|
|
63
|
+
## Example:
|
|
64
|
+
```html
|
|
65
|
+
<obc-modal-window size="medium" hasLeadingIcon>
|
|
66
|
+
<span slot="leading-icon"><obi-info></obi-info></span>
|
|
67
|
+
<span slot="title">Settings</span>
|
|
68
|
+
<div slot="content">
|
|
69
|
+
<p>Adjust your preferences here.</p>
|
|
70
|
+
</div>
|
|
71
|
+
<span slot="cancel-label">Discard</span>
|
|
72
|
+
<span slot="done-label">Save</span>
|
|
73
|
+
</obc-modal-window>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
By default `obc-modal-window` is as tall as its content,
|
|
77
|
+
capped at `90vh`. To size it externally, set the
|
|
78
|
+
`--obc-modal-window-height` custom property on the element — a fixed value,
|
|
79
|
+
or `100%` to follow a host element sized by its container. The `90vh` cap
|
|
80
|
+
always applies and the content area scrolls when the content does not fit.
|
|
81
|
+
|
|
82
|
+
Every frame below is 349 × 360 px, outlined.
|
|
83
|
+
|
|
84
|
+
## Properties
|
|
85
|
+
|
|
86
|
+
| Property | Attribute | Type | Default | Description |
|
|
87
|
+
| --- | --- | --- | --- | --- |
|
|
88
|
+
| size | size | | | Controls the modal window size and action button layout. |
|
|
89
|
+
| hasOptionalAction | hasOptionalAction | `boolean` | `false` | Whether to show an optional third action button. |
|
|
90
|
+
| hasLeadingIcon | hasLeadingIcon | `boolean` | `false` | Whether to show the leading icon slot in the header. |
|
|
91
|
+
| hasCancelAction | | `boolean` | `true` | Whether to show the footer cancel button. |
|
|
92
|
+
| hasCloseAction | | `boolean` | `true` | Whether to show the header close (X) button. |
|
|
93
|
+
| closeLabel | closeLabel | `string` | `'Close'` | Accessible name of the header close button; the icon carries none. |
|
|
94
|
+
|
|
95
|
+
## Events
|
|
96
|
+
|
|
97
|
+
| Event | Type | Description |
|
|
98
|
+
| --- | --- | --- |
|
|
99
|
+
| close-click | `CustomEvent` | Fired when the close button is clicked, or `Escape` is pressed while it is shown. |
|
|
100
|
+
| cancel-click | `CustomEvent` | Fired when the cancel button is clicked, or `Escape` is pressed while there is no close button. |
|
|
101
|
+
| done-click | `CustomEvent` | Fired when the done button is clicked. |
|
|
102
|
+
| option-click | `CustomEvent` | Fired when the optional action button is clicked. |
|
|
103
|
+
|
|
104
|
+
## Slots
|
|
105
|
+
|
|
106
|
+
| Slot | Description |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| leading-icon | Slot for an icon to appear before the title (shown when `hasLeadingIcon` is true) |
|
|
109
|
+
| title | Slot for the modal title text |
|
|
110
|
+
| content | Slot for the main content area |
|
|
111
|
+
| option-label | Slot for the label of the optional action button (shown when `hasOptionalAction` is true) |
|
|
112
|
+
| cancel-label | Slot for the label of the cancel button (shown when `hasCancelAction` is true) |
|
|
113
|
+
| done-label | Slot for the label of the done button |
|
|
114
|
+
|
|
115
|
+
## CSS custom properties
|
|
116
|
+
|
|
117
|
+
| Property | Description |
|
|
118
|
+
| --- | --- |
|
|
119
|
+
| --obc-modal-window-height | Height of the modal window. Defaults to content height (capped at 90vh); set a fixed value or `100%` to size the modal externally. |
|
|
120
|
+
|
|
121
|
+
## Stories
|
|
122
|
+
|
|
123
|
+
- [Content Height By Default](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window-sizing--content-height-by-default): Without `--obc-modal-window-height` the modal keeps its content height, also when a flex container stretches the host element. Nothing an ancestor does can change the modal's height implicitly.
|
|
124
|
+
- [Fixed Height](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window-sizing--fixed-height): A fixed `--obc-modal-window-height` sizes the modal exactly. The body takes whatever the title bar and the action row leave, with no fixed heights anywhere, and slotted content of `height: 100%` fills it. Values taller than the viewport are still capped at `90vh`.
|
|
125
|
+
- [Fill Container](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window-sizing--fill-container): `--obc-modal-window-height: 100%` makes the modal follow the host element's height: let a flex container stretch the host, or give the element an explicit `height`. Use this when the surrounding layout owns the modal's size.
|
|
126
|
+
- [Large](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window--large)
|
|
127
|
+
- [Medium](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window--medium)
|
|
128
|
+
- [Small](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window--small)
|
|
129
|
+
- [Large Without Optional Action](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window--large-without-optional-action)
|
|
130
|
+
- [Medium Without Optional Action](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window--medium-without-optional-action)
|
|
131
|
+
- [Small Without Optional Action](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window--small-without-optional-action)
|
|
132
|
+
- [Without Leading Icon](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window--without-leading-icon)
|
|
133
|
+
- [Without Cancel](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window--without-cancel)
|
|
134
|
+
- [Without Close](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window--without-close)
|
|
135
|
+
- [Without Cancel And Close](https://openbridge-next-storybook.web.app/?path=/story/application-components-containers-modal-window--without-cancel-and-close)
|
|
136
|
+
|
|
137
|
+
## See also
|
|
138
|
+
|
|
139
|
+
- [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# `<obc-mosfet>`
|
|
2
|
+
|
|
3
|
+
No summary yet.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/automation-automation-devices-mosfet--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/automation/mosfet/mosfet.ts)
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
| Property | Attribute | Type | Default | Description |
|
|
10
|
+
| --- | --- | --- | --- | --- |
|
|
11
|
+
| alternativeIcon | alternativeIcon | `MosfetAlternativeIcon` | | |
|
|
12
|
+
| icon | | `TemplateResult` | | |
|
|
13
|
+
| turnedOn | turnedOn | `boolean` | `false` | Whether the device is on. Selects the on icon and the `On` state row instead of `Off`. Not named `on`, which Svelte binds as an event listener in markup (#1090). |
|
|
14
|
+
| on | on | `boolean \| undefined` | | Alias of `turnedOn` for 1.x markup: setting it sets `turnedOn`. |
|
|
15
|
+
| variant | variant | `SquaredVariant` | | |
|
|
16
|
+
| orientation | orientation | `AutomationButtonOrientation` | | |
|
|
17
|
+
| extraReadouts | | `AutomationButtonReadoutStack[]` | | |
|
|
18
|
+
| showReadoutStack | | `boolean` | `true` | |
|
|
19
|
+
| 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. |
|
|
20
|
+
| readoutPosition | readoutPosition | `AutomationButtonReadoutPosition \| undefined` | `undefined` | Available when `showReadoutStack==true`. |
|
|
21
|
+
| showStatus | | `boolean` | `true` | Available when `showReadoutStack==true`. |
|
|
22
|
+
| showStatusIcon | | `boolean` | `false` | |
|
|
23
|
+
| readoutSize | readoutSize | `AutomationButtonReadoutStackSize` | | Available when `showReadoutStack==true`. |
|
|
24
|
+
| tag | tag | `string \| null` | `null` | Available when `showReadoutStack==true`. |
|
|
25
|
+
| positioning | positioning | `AutomationButtonPositioning` | | |
|
|
26
|
+
| activated | activated | `boolean` | `false` | Enables the activated background color, used to indicate that the button is activated/selected. |
|
|
27
|
+
| alert | alert | `boolean` | `false` | |
|
|
28
|
+
| alertFrameType | alertFrameType | `ObcAlertFrameType` | | Available when `alert==true`. |
|
|
29
|
+
| alertFrameThickness | alertFrameThickness | `ObcAlertFrameThickness` | | Available when `alert==true`. |
|
|
30
|
+
| alertFrameStatus | alertFrameStatus | `AlertType` | | Available when `alert==true`. |
|
|
31
|
+
| alertFrameMode | alertFrameMode | `ObcAlertFrameMode` | | Available when `alert==true`. |
|
|
32
|
+
| showAlertCategoryIcon | | `boolean` | `true` | Available when `alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]`. |
|
|
33
|
+
| showAlertIcon | showAlertIcon | `boolean` | `false` | Available when `alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]`. |
|
|
34
|
+
| progress | progress | `boolean` | `false` | Shows a progress indicator, used to indicate that an user action is in progress |
|
|
35
|
+
| progressMode | progressMode | `CircularProgressMode` | | Available when `progress==true`. |
|
|
36
|
+
| progressValue | progressValue | `number` | `0` | Available when `progress==true && progressMode in [determinate, progressiveIndeterminate]`. |
|
|
37
|
+
| badgeControl | badgeControl | `AutomationButtonBadgeControl` | | |
|
|
38
|
+
| badgeCommandLocked | badgeCommandLocked | `AutomationButtonBadgeCommandLocked` | | |
|
|
39
|
+
| badgeInterlock | badgeInterlock | `AutomationButtonBadgeInterlock` | | |
|
|
40
|
+
| badgeAlert | badgeAlert | `AutomationButtonBadgeAlert` | | |
|
|
41
|
+
| 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. |
|
|
42
|
+
| 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. |
|
|
43
|
+
| badgeTopRight | | `HTMLElement[]` | | |
|
|
44
|
+
| badgeTopLeft | | `HTMLElement[]` | | |
|
|
45
|
+
| badgeBottomLeft | | `HTMLElement[]` | | |
|
|
46
|
+
| badgeBottomRight | | `HTMLElement[]` | | |
|
|
47
|
+
|
|
48
|
+
## Events
|
|
49
|
+
|
|
50
|
+
None.
|
|
51
|
+
|
|
52
|
+
## Slots
|
|
53
|
+
|
|
54
|
+
None.
|
|
55
|
+
|
|
56
|
+
## Stories
|
|
57
|
+
|
|
58
|
+
- [On](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-mosfet--on)
|
|
59
|
+
- [Off](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-mosfet--off)
|
|
60
|
+
- [Static](https://openbridge-next-storybook.web.app/?path=/story/automation-automation-devices-mosfet--static)
|
|
61
|
+
|
|
62
|
+
## See also
|
|
63
|
+
|
|
64
|
+
- [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
|