@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,85 @@
|
|
|
1
|
+
# `<obc-icon-check-button>`
|
|
2
|
+
|
|
3
|
+
An icon-based toggle button for binary selection, similar to an icon checkbox or toggle chip.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ui-components-selection-controls-and-switches-icon-check-button--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/icon-check-button/icon-check-button.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-icon-check-button>` – An icon-based toggle button for binary selection, similar to an icon checkbox or toggle chip.
|
|
8
|
+
|
|
9
|
+
This component displays a clickable icon (with optional label) that toggles between checked and unchecked states. It is designed for use cases where a compact, visually prominent toggle is needed, such as toolbars, filter panels, or quick-access settings.
|
|
10
|
+
|
|
11
|
+
Appears as a button with a customizable icon and, optionally, a label beneath. The checked state is visually indicated, and the component supports disabled and alert modes for additional feedback.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
- **Toggleable State:** Click to switch between checked and unchecked. Visual styling updates to reflect the state.
|
|
15
|
+
- **Icon Slot:** Main icon is provided via the `icon` slot, allowing use of any OpenBridge icon (e.g., `<obi-placeholder>`).
|
|
16
|
+
- **Optional Label:** Set `hasLabel` to display a text label below the icon (controlled by the `label` property).
|
|
17
|
+
- **Disabled Mode:** Prevents interaction and applies disabled styling when `disabled` is true.
|
|
18
|
+
- **Alert State:** When `hasAlert` is true, adds alert styling (e.g., red border) to draw attention.
|
|
19
|
+
- **Accessible:** Uses `aria-pressed` and `aria-disabled` for assistive technologies.
|
|
20
|
+
|
|
21
|
+
## Variants
|
|
22
|
+
- **Icon Only:** Set `hasLabel` to false for a compact, icon-only toggle.
|
|
23
|
+
- **Icon with Label:** Set `hasLabel` to true and provide a `label` for a descriptive toggle.
|
|
24
|
+
- **Checked/Unchecked:** Visual state changes based on the `checked` property.
|
|
25
|
+
- **Alert:** Adds alert styling when `hasAlert` is true (e.g., for error or warning indication).
|
|
26
|
+
- **Disabled:** Prevents user interaction and dims appearance.
|
|
27
|
+
|
|
28
|
+
## Usage Guidelines
|
|
29
|
+
Use `obc-icon-check-button` for toggling settings, filters, or actions where a visual icon cue is helpful. Ideal for toolbars, filter chips, or quick-access toggles. Avoid using for mutually exclusive choices—use radio buttons or segmented controls for those scenarios.
|
|
30
|
+
|
|
31
|
+
- Use the `checked` property to control the toggle state programmatically.
|
|
32
|
+
- Use `disabled` to prevent interaction when needed.
|
|
33
|
+
- Use `hasAlert` to visually highlight the button for urgent or attention-required states.
|
|
34
|
+
- For accessibility, ensure the icon meaning is clear and provide a label when possible.
|
|
35
|
+
|
|
36
|
+
**TODO(designer):** Clarify if there are recommended icons or color conventions for alert state, and if there are best practices for label length.
|
|
37
|
+
|
|
38
|
+
## Slots
|
|
39
|
+
| Slot Name | Renders When... | Purpose |
|
|
40
|
+
|-----------|----------------|---------|
|
|
41
|
+
| icon | Always | Main icon representing the toggle action or state. |
|
|
42
|
+
|
|
43
|
+
## Events
|
|
44
|
+
- `icon-check-button-click` – Fired when the button is clicked and the checked state changes. Event detail: `{checked: boolean}`.
|
|
45
|
+
|
|
46
|
+
## Example
|
|
47
|
+
```
|
|
48
|
+
<obc-icon-check-button checked hasLabel label="Settings">
|
|
49
|
+
<obi-placeholder slot="icon"></obi-placeholder>
|
|
50
|
+
</obc-icon-check-button>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Properties
|
|
54
|
+
|
|
55
|
+
| Property | Attribute | Type | Default | Description |
|
|
56
|
+
| --- | --- | --- | --- | --- |
|
|
57
|
+
| checked | checked | `boolean` | `false` | Whether the button is currently checked (selected). When true, the button displays its checked styling. Toggling this property updates the visual state. |
|
|
58
|
+
| disabled | disabled | `boolean` | `false` | If true, prevents interaction and shows disabled styling. When disabled, the button cannot be toggled and appears dimmed. |
|
|
59
|
+
| hasLabel | hasLabel | `boolean` | `false` | If true, displays the label text below the icon. When false, only the icon is shown (icon-only mode). |
|
|
60
|
+
| label | label | `string` | `''` | Text to display below the icon (when `hasLabel` is true). Used to describe the toggle action or state for clarity and accessibility. Available when `hasLabel==true`. |
|
|
61
|
+
| hasAlert | hasAlert | `boolean` | `false` | If true, adds alert styling to the button. Use to visually indicate an alert, warning, or attention-required state. |
|
|
62
|
+
| externalControl | externalControl | `boolean` | `false` | If true, the button is controlled externally. Use to control the button state from outside the component. |
|
|
63
|
+
|
|
64
|
+
## Events
|
|
65
|
+
|
|
66
|
+
| Event | Type | Description |
|
|
67
|
+
| --- | --- | --- |
|
|
68
|
+
| icon-check-button-click | `CustomEvent<{checked: boolean}>` | Fired when the button is clicked and the checked state changes. |
|
|
69
|
+
|
|
70
|
+
## Slots
|
|
71
|
+
|
|
72
|
+
| Slot | Description |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| icon | Main icon representing the toggle action or state. |
|
|
75
|
+
|
|
76
|
+
## Stories
|
|
77
|
+
|
|
78
|
+
- [Primary](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-icon-check-button--primary)
|
|
79
|
+
- [Checked](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-icon-check-button--checked)
|
|
80
|
+
- [Without Label](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-icon-check-button--without-label)
|
|
81
|
+
- [Disabled](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-icon-check-button--disabled)
|
|
82
|
+
- [Disabledchecked](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-icon-check-button--disabledchecked)
|
|
83
|
+
- [With Alert](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-icon-check-button--with-alert)
|
|
84
|
+
- [Icon Only](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-icon-check-button--icon-only)
|
|
85
|
+
- [Long Label](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-icon-check-button--long-label)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# `<obc-indicator-battery>`
|
|
2
|
+
|
|
3
|
+
Compact 48×48 battery charge indicator.
|
|
4
|
+
|
|
5
|
+
Lifecycle: beta. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/automation-indicators-indicator-battery--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/automation/indicator-battery/indicator-battery.ts)
|
|
6
|
+
|
|
7
|
+
Compact 48×48 battery charge indicator.
|
|
8
|
+
|
|
9
|
+
## Features / Variants
|
|
10
|
+
- `variant`: `bar` (bottom-up percentage fill) or `trend` (history graph
|
|
11
|
+
with a current-value micro-bar)
|
|
12
|
+
- `direction`: `vertical` or `horizontal` battery shell
|
|
13
|
+
- `value`: color scheme — `regular`, `enhanced` or `categorical`
|
|
14
|
+
- `level`: current charge 0–100 (%), drives the fill and micro-bar
|
|
15
|
+
- `data`: history samples 0–100 (%) drawn as the trend graph
|
|
16
|
+
- `hasIcon`: centered icon overlay (bar variant only)
|
|
17
|
+
|
|
18
|
+
## Usage Guidelines
|
|
19
|
+
Use as an at-a-glance charge indicator in dashboards and lists. For a
|
|
20
|
+
full-featured tank/battery cell with readouts, badges and setpoints, use
|
|
21
|
+
`obc-automation-tank` (type `battery`) instead.
|
|
22
|
+
|
|
23
|
+
## Best Practices / Constraints
|
|
24
|
+
- `level` and `data` values are clamped to 0–100; values outside that
|
|
25
|
+
range are pinned to the nearest bound.
|
|
26
|
+
- The `trend` variant needs at least two `data` samples to draw a line;
|
|
27
|
+
with fewer it shows only the current-value micro-bar.
|
|
28
|
+
- The `icon` slot renders only in the `bar` variant; it is ignored in
|
|
29
|
+
`trend`.
|
|
30
|
+
- Display-only: the root SVG is `aria-hidden`; convey battery state to
|
|
31
|
+
assistive tech through adjacent text if it is not otherwise available.
|
|
32
|
+
|
|
33
|
+
## Slots
|
|
34
|
+
| Slot | Condition | Purpose |
|
|
35
|
+
| ------ | ----------------------------- | ------------------------------ |
|
|
36
|
+
| `icon` | `hasIcon` and `variant='bar'` | Icon overlay (`obi-*` element) |
|
|
37
|
+
|
|
38
|
+
## Properties
|
|
39
|
+
|
|
40
|
+
| Property | Attribute | Type | Default | Description |
|
|
41
|
+
| --- | --- | --- | --- | --- |
|
|
42
|
+
| direction | direction | `IndicatorDirection` | | |
|
|
43
|
+
| variant | variant | `IndicatorBatteryVariant` | | |
|
|
44
|
+
| value | value | `IndicatorBatteryValue` | | |
|
|
45
|
+
| level | level | `number` | `0` | Current charge, 0-100 (%) |
|
|
46
|
+
| data | data | `number[]` | `[]` | History samples, 0-100 (%) each, oldest first |
|
|
47
|
+
| hasIcon | hasIcon | `boolean` | `false` | |
|
|
48
|
+
|
|
49
|
+
## Events
|
|
50
|
+
|
|
51
|
+
None.
|
|
52
|
+
|
|
53
|
+
## Slots
|
|
54
|
+
|
|
55
|
+
| Slot | Description |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| icon | Centered icon overlay, defaults to `obi-energy-battery` |
|
|
58
|
+
|
|
59
|
+
## Stories
|
|
60
|
+
|
|
61
|
+
- [Default](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-battery--default)
|
|
62
|
+
- [Bar Horizontal](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-battery--bar-horizontal)
|
|
63
|
+
- [Trend Vertical](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-battery--trend-vertical)
|
|
64
|
+
- [Trend Horizontal](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-battery--trend-horizontal)
|
|
65
|
+
- [Enhanced](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-battery--enhanced)
|
|
66
|
+
- [Categorical](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-battery--categorical)
|
|
67
|
+
- [Trend Enhanced](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-battery--trend-enhanced)
|
|
68
|
+
- [Trend Categorical](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-battery--trend-categorical)
|
|
69
|
+
- [With Icon](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-battery--with-icon)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# `<obc-indicator-engine>`
|
|
2
|
+
|
|
3
|
+
Compact 48×48 engine indicator glyph.
|
|
4
|
+
|
|
5
|
+
Lifecycle: beta. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/automation-indicators-indicator-engine--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/automation/indicator-engine/indicator-engine.ts)
|
|
6
|
+
|
|
7
|
+
Compact 48×48 engine indicator glyph.
|
|
8
|
+
|
|
9
|
+
## Features / Variants
|
|
10
|
+
- `direction`: `vertical` (upright block with side rails) or `horizontal`
|
|
11
|
+
(lying block on a base rail)
|
|
12
|
+
- `value`: cylinder color — `static`, `regular` or `enhanced`
|
|
13
|
+
|
|
14
|
+
## Usage Guidelines
|
|
15
|
+
Use as a static engine presence/state glyph in dashboards and lists.
|
|
16
|
+
It carries no numeric value; pair it with readouts or other indicators
|
|
17
|
+
when quantities must be shown.
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
| Property | Attribute | Type | Default | Description |
|
|
22
|
+
| --- | --- | --- | --- | --- |
|
|
23
|
+
| value | value | `IndicatorEngineValue` | | |
|
|
24
|
+
| direction | direction | `IndicatorDirection` | | |
|
|
25
|
+
|
|
26
|
+
## Events
|
|
27
|
+
|
|
28
|
+
None.
|
|
29
|
+
|
|
30
|
+
## Slots
|
|
31
|
+
|
|
32
|
+
None.
|
|
33
|
+
|
|
34
|
+
## Stories
|
|
35
|
+
|
|
36
|
+
- [Default](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-engine--default)
|
|
37
|
+
- [Horizontal](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-engine--horizontal)
|
|
38
|
+
- [Regular](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-engine--regular)
|
|
39
|
+
- [Enhanced](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-engine--enhanced)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# `<obc-indicator-generator>`
|
|
2
|
+
|
|
3
|
+
Compact generator status indicator (48×48; 56×56 as double-bar).
|
|
4
|
+
|
|
5
|
+
Lifecycle: beta. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/automation-indicators-indicator-generator--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/automation/indicator-generator/indicator-generator.ts)
|
|
6
|
+
|
|
7
|
+
Compact generator status indicator (48×48; 56×56 as double-bar).
|
|
8
|
+
|
|
9
|
+
## Features / Variants
|
|
10
|
+
- `variant`: `button` (plain disc), `bar` (disc with a circular progress
|
|
11
|
+
ring) or `double-bar` (disc with two concentric progress rings)
|
|
12
|
+
- `value`: visual scheme — `off`, `regular`, `filled`, `enhanced` or
|
|
13
|
+
`categorical`; `off` hides the progress rings
|
|
14
|
+
- `level`: 0–100 (%), sweep of the (outer) progress ring, clockwise from
|
|
15
|
+
12 o'clock
|
|
16
|
+
- `secondaryLevel`: 0–100 (%), sweep of the inner ring (double-bar only)
|
|
17
|
+
|
|
18
|
+
## Usage Guidelines
|
|
19
|
+
Use as an at-a-glance generator load indicator in dashboards and lists.
|
|
20
|
+
For schematic (P&ID) placement with button behavior, use the electric
|
|
21
|
+
generator automation devices instead.
|
|
22
|
+
|
|
23
|
+
## Slots
|
|
24
|
+
| Slot | Condition | Purpose |
|
|
25
|
+
| ------ | --------- | ------------------------------------------------ |
|
|
26
|
+
| `icon` | always | Center icon, defaults to the generator G~ glyph |
|
|
27
|
+
|
|
28
|
+
## Properties
|
|
29
|
+
|
|
30
|
+
| Property | Attribute | Type | Default | Description |
|
|
31
|
+
| --- | --- | --- | --- | --- |
|
|
32
|
+
| variant | variant | `IndicatorGeneratorVariant` | | |
|
|
33
|
+
| value | value | `IndicatorGeneratorValue` | | |
|
|
34
|
+
| level | level | `number` | `0` | Outer progress ring sweep, 0-100 (%) |
|
|
35
|
+
| secondaryLevel | secondaryLevel | `number` | `0` | Inner progress ring sweep, 0-100 (%), double-bar only |
|
|
36
|
+
|
|
37
|
+
## Events
|
|
38
|
+
|
|
39
|
+
None.
|
|
40
|
+
|
|
41
|
+
## Slots
|
|
42
|
+
|
|
43
|
+
| Slot | Description |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| icon | Center icon, defaults to the generator G~ glyph |
|
|
46
|
+
|
|
47
|
+
## Stories
|
|
48
|
+
|
|
49
|
+
- [Default](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-generator--default)
|
|
50
|
+
- [Button Regular](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-generator--button-regular)
|
|
51
|
+
- [Button Enhanced](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-generator--button-enhanced)
|
|
52
|
+
- [Button Categorical](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-generator--button-categorical)
|
|
53
|
+
- [Bar Regular](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-generator--bar-regular)
|
|
54
|
+
- [Bar Enhanced](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-generator--bar-enhanced)
|
|
55
|
+
- [Bar Categorical](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-generator--bar-categorical)
|
|
56
|
+
- [Button Filled](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-generator--button-filled)
|
|
57
|
+
- [Bar Filled](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-generator--bar-filled)
|
|
58
|
+
- [Double Bar](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-generator--double-bar)
|
|
59
|
+
- [Double Bar Filled](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-generator--double-bar-filled)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `<obc-indicator-graph>`
|
|
2
|
+
|
|
3
|
+
No summary yet.
|
|
4
|
+
|
|
5
|
+
Lifecycle: beta. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/bars-and-graphs-indicator-graph--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/indicator-graph/indicator-graph.ts)
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
| Property | Attribute | Type | Default | Description |
|
|
10
|
+
| --- | --- | --- | --- | --- |
|
|
11
|
+
| data | data | `[number[], number[]]` | `[[], []]` | The data to display in the graph, first array is the x values, second array is the y values |
|
|
12
|
+
| layout | layout | `ObcIndicatorGraphLayout` | `{}` | |
|
|
13
|
+
|
|
14
|
+
## Events
|
|
15
|
+
|
|
16
|
+
None.
|
|
17
|
+
|
|
18
|
+
## Slots
|
|
19
|
+
|
|
20
|
+
None.
|
|
21
|
+
|
|
22
|
+
## Stories
|
|
23
|
+
|
|
24
|
+
- [Primary](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-indicator-graph--primary)
|
|
25
|
+
- [No Zero Line](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-indicator-graph--no-zero-line)
|
|
26
|
+
- [With Range](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-indicator-graph--with-range)
|
|
27
|
+
- [Enhanced](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-indicator-graph--enhanced)
|
|
28
|
+
- [Small](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-indicator-graph--small)
|
|
29
|
+
- [Medium](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-indicator-graph--medium)
|
|
30
|
+
- [Large](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-indicator-graph--large)
|
|
31
|
+
- [With Fill](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-indicator-graph--with-fill)
|
|
32
|
+
- [Realtime](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-indicator-graph--realtime)
|
|
33
|
+
- [Below Zero](https://openbridge-next-storybook.web.app/?path=/story/bars-and-graphs-indicator-graph--below-zero)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# `<obc-indicator-tank-atmospheric>`
|
|
2
|
+
|
|
3
|
+
Compact 48×48 atmospheric tank level indicator.
|
|
4
|
+
|
|
5
|
+
Lifecycle: beta. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/automation-indicators-indicator-tank-atmospheric--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/automation/indicator-tank-atmospheric/indicator-tank-atmospheric.ts)
|
|
6
|
+
|
|
7
|
+
Compact 48×48 atmospheric tank level indicator.
|
|
8
|
+
|
|
9
|
+
## Features / Variants
|
|
10
|
+
- `variant`: `bar` (bottom-up percentage fill) or `trend` (history graph
|
|
11
|
+
with a current-value micro-bar)
|
|
12
|
+
- `direction`: `vertical` or `horizontal` tank outline
|
|
13
|
+
- `value`: color scheme — `regular`, `enhanced` or `medium`
|
|
14
|
+
- `level`: current tank level 0–100 (%), drives the fill and micro-bar
|
|
15
|
+
- `data`: history samples 0–100 (%) drawn as the trend graph
|
|
16
|
+
- `hasIcon`: centered icon overlay (bar variant only)
|
|
17
|
+
|
|
18
|
+
## Usage Guidelines
|
|
19
|
+
Use as an at-a-glance level indicator in dashboards and lists. For a
|
|
20
|
+
full-featured tank cell with readouts, badges and setpoints, use
|
|
21
|
+
`obc-automation-tank` instead.
|
|
22
|
+
|
|
23
|
+
## Best Practices / Constraints
|
|
24
|
+
- `level` and `data` values are clamped to 0–100; values outside that
|
|
25
|
+
range are pinned to the nearest bound.
|
|
26
|
+
- The `trend` variant needs at least two `data` samples to draw a line;
|
|
27
|
+
with fewer it shows only the current-value micro-bar.
|
|
28
|
+
- The `icon` slot renders only in the `bar` variant; it is ignored in
|
|
29
|
+
`trend`.
|
|
30
|
+
- Display-only: the root SVG is `aria-hidden`; convey tank level to
|
|
31
|
+
assistive tech through adjacent text if it is not otherwise available.
|
|
32
|
+
|
|
33
|
+
## Slots
|
|
34
|
+
| Slot | Condition | Purpose |
|
|
35
|
+
| ------ | ----------------------------- | ------------------------------ |
|
|
36
|
+
| `icon` | `hasIcon` and `variant='bar'` | Icon overlay (`obi-*` element) |
|
|
37
|
+
|
|
38
|
+
## Properties
|
|
39
|
+
|
|
40
|
+
| Property | Attribute | Type | Default | Description |
|
|
41
|
+
| --- | --- | --- | --- | --- |
|
|
42
|
+
| direction | direction | `IndicatorDirection` | | |
|
|
43
|
+
| variant | variant | `IndicatorTankAtmosphericVariant` | | |
|
|
44
|
+
| value | value | `IndicatorTankAtmosphericValue` | | |
|
|
45
|
+
| level | level | `number` | `0` | Current level, 0-100 (%) |
|
|
46
|
+
| data | data | `number[]` | `[]` | History samples, 0-100 (%) each, oldest first |
|
|
47
|
+
| hasIcon | hasIcon | `boolean` | `false` | |
|
|
48
|
+
|
|
49
|
+
## Events
|
|
50
|
+
|
|
51
|
+
None.
|
|
52
|
+
|
|
53
|
+
## Slots
|
|
54
|
+
|
|
55
|
+
| Slot | Description |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| icon | Centered icon overlay, defaults to `obi-tank` |
|
|
58
|
+
|
|
59
|
+
## Stories
|
|
60
|
+
|
|
61
|
+
- [Default](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-tank-atmospheric--default)
|
|
62
|
+
- [Bar Horizontal](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-tank-atmospheric--bar-horizontal)
|
|
63
|
+
- [Trend Vertical](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-tank-atmospheric--trend-vertical)
|
|
64
|
+
- [Trend Horizontal](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-tank-atmospheric--trend-horizontal)
|
|
65
|
+
- [Enhanced](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-tank-atmospheric--enhanced)
|
|
66
|
+
- [Medium](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-tank-atmospheric--medium)
|
|
67
|
+
- [Trend Enhanced](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-tank-atmospheric--trend-enhanced)
|
|
68
|
+
- [Trend Medium](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-tank-atmospheric--trend-medium)
|
|
69
|
+
- [With Icon](https://openbridge-next-storybook.web.app/?path=/story/automation-indicators-indicator-tank-atmospheric--with-icon)
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# `<obc-input-chip>`
|
|
2
|
+
|
|
3
|
+
A removable chip component for displaying labeled tokens, tags, or filter selections.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ui-components-selection-controls-and-switches-input-chip--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/input-chip/input-chip.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-input-chip>` – A removable chip component for displaying labeled tokens, tags, or filter selections.
|
|
8
|
+
|
|
9
|
+
Presents a compact, interactive element with a label and optional leading icon, commonly used to represent user input, selections, or applied filters. The chip can be removed via a close icon, supporting workflows where users manage lists of discrete items (such as tags, categories, or filter criteria).
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
- **Label:** Displays a text label representing the chip's content.
|
|
15
|
+
- **Removable:** Includes a trailing close icon button for removal; emits a custom event when removed.
|
|
16
|
+
- **Leading Icon (optional):** Supports an optional leading icon or avatar via slot, controlled by the `showIcon` property.
|
|
17
|
+
- **Disabled State:** Can be disabled to prevent interaction and removal.
|
|
18
|
+
- **Accessible:** Button element with appropriate ARIA labeling for assistive technologies.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Usage Guidelines
|
|
23
|
+
Use `obc-input-chip` to visually represent user selections, tags, or filters that can be individually removed. Ideal for input fields with autocomplete/tagging, filter bars, or anywhere a compact, removable token is needed. Avoid using for persistent, non-removable status indicators—use a static label or badge instead.
|
|
24
|
+
|
|
25
|
+
**Synonyms:** tag, token, pill, filter chip, removable label.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Slots
|
|
30
|
+
| Slot Name | Renders When... | Purpose |
|
|
31
|
+
|-----------|---------------------|----------------------------------------------|
|
|
32
|
+
| (default) | `showIcon` is true | Leading icon/avatar for the chip (optional). |
|
|
33
|
+
|
|
34
|
+
Place an icon or avatar in the default slot to display it at the start of the chip. The slot is only rendered if `showIcon` is true.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Properties
|
|
39
|
+
- `label` (string): The text label displayed inside the chip.
|
|
40
|
+
- `disabled` (boolean): Disables the chip, preventing removal and interaction.
|
|
41
|
+
- `showIcon` (boolean): Controls whether the leading icon slot is shown. Defaults to true.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Events
|
|
46
|
+
- `remove-chip` – Fired when the chip is removed (via close icon click). Event detail contains the chip's label.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Best Practices & Constraints
|
|
51
|
+
- Keep chip labels concise for best visual fit.
|
|
52
|
+
- Use the leading icon slot for context (e.g., user avatar, filter icon) only when it adds value.
|
|
53
|
+
- Disabled chips cannot be removed and appear visually inactive.
|
|
54
|
+
- Removal is triggered by clicking the close icon; listen for the `remove-chip` event to update your data model.
|
|
55
|
+
- For accessibility, ensure the `label` property accurately describes the chip's content.
|
|
56
|
+
- Do not use chips for critical alerts or persistent status—use banners or badges instead.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Example:
|
|
61
|
+
```html
|
|
62
|
+
<obc-input-chip label="Tag" showIcon>
|
|
63
|
+
<obi-placeholder></obi-placeholder>
|
|
64
|
+
</obc-input-chip>
|
|
65
|
+
```
|
|
66
|
+
In this example, the chip displays the label "Tag" with a leading icon and can be removed by clicking the close icon.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
**TODO(designer):** Confirm if there are recommended maximum label lengths or visual constraints for chip content.
|
|
71
|
+
|
|
72
|
+
## Properties
|
|
73
|
+
|
|
74
|
+
| Property | Attribute | Type | Default | Description |
|
|
75
|
+
| --- | --- | --- | --- | --- |
|
|
76
|
+
| label | label | `string` | `'Label'` | The text label displayed inside the chip. Represents the chip's content (e.g., tag, filter, or token label). |
|
|
77
|
+
| disabled | disabled | `boolean` | `false` | Disables the chip, preventing removal and interaction. When true, the chip appears visually inactive and cannot be removed. |
|
|
78
|
+
| showIcon | showIcon | `boolean` | `false` | Controls whether the leading icon slot is shown. When true, displays the default slot for an icon/avatar at the start of the chip. |
|
|
79
|
+
|
|
80
|
+
## Events
|
|
81
|
+
|
|
82
|
+
| Event | Type | Description |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| remove-chip | `CustomEvent<{label: string}>` | Fired when the chip is removed (via close icon click). Event detail contains the chip's label. |
|
|
85
|
+
|
|
86
|
+
## Slots
|
|
87
|
+
|
|
88
|
+
| Slot | Description |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| (default) | Default leading-icon slot (shown when `showIcon` is true) |
|
|
91
|
+
|
|
92
|
+
## Stories
|
|
93
|
+
|
|
94
|
+
- [Input Chip With Icon](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-input-chip--input-chip-with-icon)
|
|
95
|
+
- [Input Chip Without Icon](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-input-chip--input-chip-without-icon)
|
|
96
|
+
- [Disabled Input Chip](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-input-chip--disabled-input-chip)
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# `<obc-instrument-field>`
|
|
2
|
+
|
|
3
|
+
A component for displaying navigation instrument data.
|
|
4
|
+
|
|
5
|
+
Lifecycle: deprecated. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/instruments-instrument-field-deprecated--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/instrument-field/instrument-field.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-instrument-field>` – A component for displaying navigation instrument data.
|
|
8
|
+
|
|
9
|
+
This component is used to show a primary value, an optional setpoint, units, and a source (e.g., GPS, Gyro).
|
|
10
|
+
It supports different sizes, horizontal/vertical layouts, and configurable numeric formatting.
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
- **Sizes:** Supports `regular` and `enhanced` sizes.
|
|
14
|
+
- **Setpoint:** Optional setpoint display with an arrow indicator.
|
|
15
|
+
- **Source Picker:** Optional source selection with a dropdown and context menu.
|
|
16
|
+
- **Formatting:** Customizable integer and fraction digits, with optional zero padding.
|
|
17
|
+
- **Status Indicators:** Supports an "OFF" state and neutral color mode.
|
|
18
|
+
- **Layouts:** Can be oriented horizontally or vertically, with various alignment options.
|
|
19
|
+
|
|
20
|
+
## Slots
|
|
21
|
+
| Slot Name | Purpose |
|
|
22
|
+
|---------------------|-------------------------------------------------------------------------|
|
|
23
|
+
| off-value | Content to display when the `off` property is true (defaults to "OFF"). |
|
|
24
|
+
|
|
25
|
+
## Instrument Field → Readout
|
|
26
|
+
|
|
27
|
+
`<obc-instrument-field>` is deprecated in favour of `<obc-readout>`. Each story
|
|
28
|
+
below shows the legacy component next to its closest `<obc-readout>`
|
|
29
|
+
configuration and states how close the result is, so external consumers have a
|
|
30
|
+
recipe for migrating. Verdicts follow the Figma 6.1 review (#1145).
|
|
31
|
+
|
|
32
|
+
### Verdicts
|
|
33
|
+
|
|
34
|
+
| Badge | Meaning |
|
|
35
|
+
|-------|---------|
|
|
36
|
+
| **Fully covered** | The readout API expresses the case. Only the shared restyle below differs. |
|
|
37
|
+
| **Differs** | Reproducible, but with a case-specific difference on top of the restyle. |
|
|
38
|
+
| **Not reachable** | Cannot be produced with `<obc-readout>` as it stands. |
|
|
39
|
+
|
|
40
|
+
Nothing is pixel-identical: `<obc-readout>` is the OB 6.1 redraw of the same
|
|
41
|
+
information, so **Fully covered** means "no API gap", not "same pixels".
|
|
42
|
+
|
|
43
|
+
### Shared restyle differences
|
|
44
|
+
|
|
45
|
+
These apply to *every* story below and are not repeated in each verdict.
|
|
46
|
+
|
|
47
|
+
1. **Typography** — `obc-instrument-field` sizes text by `font-size`; the readout
|
|
48
|
+
stack sizes it by cap height through `obc-textbox`. The tiers line up by
|
|
49
|
+
design, not by measurement.
|
|
50
|
+
2. **Label size & weight** — per the 6.1 review, large readouts render the
|
|
51
|
+
label at textbox `s` (bigger than the legacy tag) and labels are SemiBold
|
|
52
|
+
only on `enhanced`-priority readouts. The legacy `tag` is always regular
|
|
53
|
+
weight, so the weights agree at `priority="regular"` and differ (SemiBold)
|
|
54
|
+
at `priority="enhanced"`. `labelOptions.size: 'xs'` opts back into the
|
|
55
|
+
dense label.
|
|
56
|
+
3. **Setpoint marker** — the `obi-input-right` chevron replaces the legacy
|
|
57
|
+
inline triangle. Since 6.1 the marker's size follows the setpoint block's
|
|
58
|
+
rendered size (16px beside an `s` setpoint, 24px beside `l`).
|
|
59
|
+
4. **Setpoint emphasis** — `<obc-readout>` defaults to primary-secondary (the
|
|
60
|
+
setpoint one tier below the value). The 6.1 `equal-size` interaction now
|
|
61
|
+
reproduces the legacy layouts that rendered both at the same size:
|
|
62
|
+
|
|
63
|
+
| Legacy layout | Legacy setpoint/value | Readout equivalent |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| vertical + `regular` | 16px / 16px | `size="small"` + `equal-size` |
|
|
66
|
+
| vertical + `enhanced` | 16px / 34px | `size="large"` (default) |
|
|
67
|
+
| horizontal + `regular` | 16px / 16px | not reachable — see *Horizontal Regular* |
|
|
68
|
+
| horizontal + `enhanced` | 34px / 34px | `size="large"` + `equal-size` |
|
|
69
|
+
|
|
70
|
+
5. **Hinted zeros** — legacy paints them `--border-outline-color`; per the 6.1
|
|
71
|
+
review the readout uses the lighter `--element-disabled-color` and always
|
|
72
|
+
regular weight.
|
|
73
|
+
6. **Vertical source** — legacy renders the source directly under the label
|
|
74
|
+
with no divider, and since 6.1 the vertical readout does the same (only the
|
|
75
|
+
horizontal direction separates the source with a vertical rule).
|
|
76
|
+
|
|
77
|
+
### Property mapping
|
|
78
|
+
|
|
79
|
+
| `<obc-instrument-field>` | `<obc-readout>` |
|
|
80
|
+
|---|---|
|
|
81
|
+
| `size="regular"` | `size="small"` |
|
|
82
|
+
| `size="enhanced"` | `size="large"` |
|
|
83
|
+
| — | `size="medium"` (new intermediate tier) |
|
|
84
|
+
| `tag` | `label` |
|
|
85
|
+
| `unit`, `src`, `value`, `setpoint`, `hasSetpoint`, `fractionDigits` | same names |
|
|
86
|
+
| `hasSrc` | derived from a non-blank `src` |
|
|
87
|
+
| *(default)* | `priority="enhanced"` |
|
|
88
|
+
| `neutralColor` | `priority="regular"` |
|
|
89
|
+
| `showZeroPadding` | `valueOptions.hintedZeros` |
|
|
90
|
+
| `maxDigits` | `maxDigits` — **different semantics**, see *Max Digits With Decimals* |
|
|
91
|
+
| `horizontal` | `direction="horizontal"` |
|
|
92
|
+
| `center` | `alignment="center"` |
|
|
93
|
+
| `labelOnly` | `hasValue={false}` |
|
|
94
|
+
| *(equal-sized setpoint layouts)* | `setpointOptions.interaction="equal-size"` |
|
|
95
|
+
| `autoHideSetpoint` | `setpointOptions.interaction="pop-up"` |
|
|
96
|
+
| `autoHideDeadband` | *no equivalent* — see *Auto Hide Deadband* |
|
|
97
|
+
| `--obc-instrument-field-source-width` | `srcOptions.spaceReserver` |
|
|
98
|
+
| `--obc-instrument-field-tag-width` | `labelOptions.spaceReserver` (new in 6.1) |
|
|
99
|
+
| `off-value` slot | `offText` (plain string only) |
|
|
100
|
+
|
|
101
|
+
The colour mapping is exact rather than approximate:
|
|
102
|
+
`--element-neutral-enhanced-color` (readout, enhanced) and
|
|
103
|
+
`--instrument-enhanced-secondary-color` (instrument-field, default) resolve to
|
|
104
|
+
the same value in every theme.
|
|
105
|
+
|
|
106
|
+
## Properties
|
|
107
|
+
|
|
108
|
+
| Property | Attribute | Type | Default | Description |
|
|
109
|
+
| --- | --- | --- | --- | --- |
|
|
110
|
+
| size | size | `InstrumentFieldSize` | | The size of the instrument field. |
|
|
111
|
+
| setpoint | setpoint | `number \| undefined` | | The setpoint value to display. |
|
|
112
|
+
| hasSetpoint | hasSetpoint | `boolean` | `false` | Whether to show the setpoint. |
|
|
113
|
+
| hasSrc | hasSrc | `boolean` | `false` | Whether to show the source (src) field. |
|
|
114
|
+
| value | value | `number \| undefined` | | The primary value to display. |
|
|
115
|
+
| maxDigits | maxDigits | `number` | `1` | The maximum number of integer digits to show (for zero padding). |
|
|
116
|
+
| showZeroPadding | showZeroPadding | `boolean` | `false` | Whether to show leading zeros up to `maxDigits`. |
|
|
117
|
+
| fractionDigits | fractionDigits | `number` | `0` | The number of decimal places to display. |
|
|
118
|
+
| tag | tag | `string` | `''` | The tag or label for the data (e.g., "HDG", "SPD"). |
|
|
119
|
+
| unit | unit | `string` | `''` | The unit of measurement (e.g., "DEG", "KN"). |
|
|
120
|
+
| src | src | `string` | `''` | The current source name (e.g., "GPS 1"). |
|
|
121
|
+
| neutralColor | neutralColor | `boolean` | `false` | If true, uses a neutral color scheme instead of the default instrument color. |
|
|
122
|
+
| horizontal | horizontal | `boolean` | `false` | If true, uses a horizontal layout. |
|
|
123
|
+
| center | center | `boolean` | `false` | If true, centers the content. |
|
|
124
|
+
| labelOnly | labelOnly | `boolean` | `false` | If true, only the label (tag and unit) is displayed. |
|
|
125
|
+
| off | off | `boolean` | `false` | If true, displays the "off" state (e.g., showing "OFF" instead of value). |
|
|
126
|
+
| autoHideSetpoint | autoHideSetpoint | `boolean` | `false` | If true, automatically hides the setpoint when the value is close to it. |
|
|
127
|
+
| autoHideDeadband | autoHideDeadband | `number` | `0` | The deadband within which the setpoint is hidden if `autoHideSetpoint` is true. |
|
|
128
|
+
| setpointValueBlueNumbers | | `string` | | Returns the formatted setpoint value as a string. If the setpoint is undefined, it returns a dashed string. |
|
|
129
|
+
| valueBlueNumbers | | `string` | | Returns the formatted primary value as a string. If the value is undefined, it returns a dashed string. |
|
|
130
|
+
| hintZeros | | `string` | | Generates a string of hint zeros for alignment when `showZeroPadding` is false. These zeros are typically displayed with lower opacity. |
|
|
131
|
+
|
|
132
|
+
## Events
|
|
133
|
+
|
|
134
|
+
None.
|
|
135
|
+
|
|
136
|
+
## Slots
|
|
137
|
+
|
|
138
|
+
| Slot | Description |
|
|
139
|
+
| --- | --- |
|
|
140
|
+
| off-value | Content to display when the `off` property is true (defaults to "OFF"). |
|
|
141
|
+
|
|
142
|
+
## CSS parts
|
|
143
|
+
|
|
144
|
+
| Part | Description |
|
|
145
|
+
| --- | --- |
|
|
146
|
+
| label | The container for the tag and unit. |
|
|
147
|
+
| tag | The tag text element. |
|
|
148
|
+
|
|
149
|
+
## Stories
|
|
150
|
+
|
|
151
|
+
- [Primary](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--primary)
|
|
152
|
+
- [Undefined Setpoint](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--undefined-setpoint)
|
|
153
|
+
- [Enhanced](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--enhanced)
|
|
154
|
+
- [Enhanced With Src](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--enhanced-with-src)
|
|
155
|
+
- [Enhanced Zero Padding](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--enhanced-zero-padding)
|
|
156
|
+
- [No Setpoint](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--no-setpoint)
|
|
157
|
+
- [With Decimals](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--with-decimals)
|
|
158
|
+
- [Neutral Color](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--neutral-color)
|
|
159
|
+
- [Horizontal](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--horizontal)
|
|
160
|
+
- [Horizontal With Src](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--horizontal-with-src)
|
|
161
|
+
- [Vertical Center](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--vertical-center)
|
|
162
|
+
- [Horizontal Regular](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--horizontal-regular)
|
|
163
|
+
- [Label Only](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--label-only)
|
|
164
|
+
- [Auto Hide Setpoint](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--auto-hide-setpoint)
|
|
165
|
+
- [Off](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--off)
|
|
166
|
+
- [Align Multiple](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--align-multiple)
|
|
167
|
+
- [Max Digits With Decimals](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--max-digits-with-decimals)
|
|
168
|
+
- [Auto Hide Deadband](https://openbridge-next-storybook.web.app/?path=/story/instruments-instrument-field-deprecated--auto-hide-deadband)
|
|
169
|
+
|
|
170
|
+
## See also
|
|
171
|
+
|
|
172
|
+
- [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
|