@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,151 @@
|
|
|
1
|
+
# `<obc-tab-row>`
|
|
2
|
+
|
|
3
|
+
A horizontal tab navigation bar for switching between multiple content sections.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ui-components-menus-and-navigation-tab-row--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/tab-row/tab-row.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-tab-row>` – A horizontal tab navigation bar for switching between multiple content sections.
|
|
8
|
+
|
|
9
|
+
Displays a row of interactive tabs, each representing a distinct view or section. Supports subtitles, badges, icons, close buttons, and an optional "add new tab" action. Designed for use cases where users need to quickly switch between related content areas, such as dashboards, settings, or document editors.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
- **Tab Selection:** Only one tab can be selected at a time; selection is managed via the `selectedTabId` property.
|
|
15
|
+
- **Closeable Tabs:** Optionally display a close button on each tab (`hasClose`), allowing users to remove tabs dynamically.
|
|
16
|
+
- **Add New Tab:** Optionally show an "add new tab" button at the end of the row (`hasAddNewTab`), emitting an event when clicked.
|
|
17
|
+
- **Panels:** With `hasPanels`, the row also renders one panel per tab from the `tab-<id>-panel` slot, shows the selected one and links each tab to its panel.
|
|
18
|
+
- **Subtitles:** Optionally show secondary contextual text below each tab title (`showSubtitle` and `subtitle`).
|
|
19
|
+
- **Badges:** Tabs can display badges with counts and types (e.g., notification, alarm, enhance), supporting different badge sizes and optional hiding of the number.
|
|
20
|
+
- **Icons:** Each tab can show a leading icon (customizable via slot), and optionally a badge icon.
|
|
21
|
+
- **Disabled Tabs:** Individual tabs can be disabled to prevent user interaction.
|
|
22
|
+
- **Hug Mode:** When `hug` is enabled, tabs use a compact layout with reduced padding.
|
|
23
|
+
- **Responsive Layout:** Tabs are arranged horizontally and adapt to the available width.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Usage Guidelines
|
|
28
|
+
Use `<obc-tab-row>` to organize content into logical sections that users can switch between without leaving the current page. Ideal for navigation in multi-view interfaces, such as settings panels, dashboards, or editors. Each tab should represent a distinct, high-level section. Avoid using tabs for navigation between unrelated pages or for single-action toggles.
|
|
29
|
+
|
|
30
|
+
- Use badges to highlight new activity or counts (e.g., unread messages).
|
|
31
|
+
- Use the close button for tabs that represent removable or temporary content (e.g., documents, chat sessions).
|
|
32
|
+
- The "add new tab" action is suitable for interfaces where users can create new sections dynamically.
|
|
33
|
+
- For best accessibility, ensure each tab has a unique `id` and descriptive `title`.
|
|
34
|
+
|
|
35
|
+
**TODO(designer):** Confirm if there are recommended limits on the number of tabs, or guidance for handling overflow (e.g., scrolling, collapsing).
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Example
|
|
40
|
+
```html
|
|
41
|
+
<obc-tab-row
|
|
42
|
+
.tabs=${[
|
|
43
|
+
{id: 'tab1', title: 'Inbox', subtitle: 'Monitoring', hasBadge: true, badgeCount: 5, badgeType: 'notification'},
|
|
44
|
+
{id: 'tab2', title: 'Updates'},
|
|
45
|
+
{id: 'tab3', title: 'Settings', hasLeadingIcon: true}
|
|
46
|
+
]}
|
|
47
|
+
selectedTabId="tab1"
|
|
48
|
+
show-subtitle
|
|
49
|
+
hasClose
|
|
50
|
+
hasAddNewTab
|
|
51
|
+
>
|
|
52
|
+
<obi-placeholder slot="tab-tab1-icon"></obi-placeholder>
|
|
53
|
+
<obi-placeholder slot="tab-tab3-icon"></obi-placeholder>
|
|
54
|
+
</obc-tab-row>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Slots
|
|
60
|
+
|
|
61
|
+
| Slot Name | Renders When... | Purpose |
|
|
62
|
+
|--------------------------|------------------------------------|------------------------------------------------------|
|
|
63
|
+
| `tab-<id>-icon` | If `hasLeadingIcon` is true | Leading icon for a specific tab (replaceable) |
|
|
64
|
+
| `tab-<id>-<iconSlotName>` | For each badge that declares an `iconSlotName` | Custom icon for a specific tab's badge (replaceable). The deprecated single-badge path uses `tab-<id>-badge-icon`. |
|
|
65
|
+
| `tab-<id>-panel` | If `hasPanels` is true | Content of the panel a specific tab shows |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Keyboard
|
|
70
|
+
[APG Tabs](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/) with manual
|
|
71
|
+
activation: the row is one tab stop, entered on the selected tab; `Left`
|
|
72
|
+
and `Right` move focus between enabled tabs and wrap, `Home` and `End` go to
|
|
73
|
+
the edges, and `Enter` or `Space` selects the focused tab. Focus does not
|
|
74
|
+
select on its own, so a keyboard user can pass over tabs without loading
|
|
75
|
+
each panel. With `hasClose`, `Delete` closes the focused tab and focus
|
|
76
|
+
moves to the tab that takes its place; the close buttons stay out of the tab
|
|
77
|
+
sequence. The tab list is named by `label`, and the add-new-tab button sits
|
|
78
|
+
after it as its own tab stop.
|
|
79
|
+
|
|
80
|
+
With `hasPanels`, each panel is a `tabpanel` named after its tab and each
|
|
81
|
+
tab points at its panel through `aria-controls`, set by element reflection
|
|
82
|
+
(`ariaControlsElements`), which an engine without it ignores. Use it rather than panels
|
|
83
|
+
of your own next to the row: the row cannot link those, and a panel outside
|
|
84
|
+
cannot name itself after a tab inside, because a reference can point out of
|
|
85
|
+
a shadow root but never into one. Such a panel needs its own `aria-label`.
|
|
86
|
+
|
|
87
|
+
Left out: `aria-labelledby` on the panels, which cannot reach a tab inside
|
|
88
|
+
`obc-tab-item`, so they carry the tab's title as `aria-label` instead; and
|
|
89
|
+
activating the next tab after a `Delete`, which the pattern makes optional.
|
|
90
|
+
|
|
91
|
+
## Events
|
|
92
|
+
- `tab-selected` – Fired when a tab is selected. Detail: `{tab, id, index}`.
|
|
93
|
+
- `tab-closed` – Fired when a tab's close button is clicked, or `Delete` is pressed on a tab. Detail: `{tab, id, index}`.
|
|
94
|
+
- `add-new-tab` – Fired when the "add new tab" button is clicked. No detail.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Best Practices
|
|
99
|
+
- Only one tab should be selected at a time.
|
|
100
|
+
- Use badges sparingly to avoid overwhelming the user.
|
|
101
|
+
- Avoid using the close button for tabs that should always be present.
|
|
102
|
+
- For accessibility, ensure tab titles are clear and concise.
|
|
103
|
+
- If using custom icons, provide them via the appropriate named slot for each tab.
|
|
104
|
+
|
|
105
|
+
## Properties
|
|
106
|
+
|
|
107
|
+
| Property | Attribute | Type | Default | Description |
|
|
108
|
+
| --- | --- | --- | --- | --- |
|
|
109
|
+
| tabs | tabs | `TabData[]` | `[]` | Tabs to display. Each carries a unique `id`, a `title`, an optional `subtitle` with a per-tab `showSubtitle` override, `hasLeadingIcon`, `disabled`, and a `badges` array that takes precedence over the deprecated single-badge fields (`hasBadge`, `badgeCount`, `badgeType`, `badgeSize`, `badgeShowNumber`, `showLeadingBadgeIcon`). |
|
|
110
|
+
| selectedTabId | selected-tab-id | `string` | `''` | The `id` of the currently selected tab. Only one tab can be selected at a time. Changing this property updates the selected tab visually and emits the `tab-selected` event when changed by user interaction. |
|
|
111
|
+
| hasClose | has-close | `boolean` | `false` | Whether to display a close button on each tab. When enabled, users can remove tabs individually. |
|
|
112
|
+
| centerContent | centerContent | `boolean` | `false` | |
|
|
113
|
+
| hug | hug | `boolean` | `false` | Enables "hug" mode for a more compact tab layout with reduced padding. |
|
|
114
|
+
| showSubtitle | show-subtitle | `boolean` | `false` | Whether to display subtitle text for each tab. Individual tabs can override this with `tab.showSubtitle`. |
|
|
115
|
+
| hasAddNewTab | has-add-new-tab | `boolean` | `false` | Whether to display an "add new tab" button at the end of the tab row. When clicked, emits the `add-new-tab` event. |
|
|
116
|
+
| hasPanels | has-panels | `boolean` | `false` | Renders one panel per tab from its `tab-<id>-panel` slot, shows the selected one, and links each tab to its panel for assistive technology. |
|
|
117
|
+
| label | label | `string` | `'Tabs'` | Accessible name of the tab list, read out before its tabs. |
|
|
118
|
+
|
|
119
|
+
## Events
|
|
120
|
+
|
|
121
|
+
| Event | Type | Description |
|
|
122
|
+
| --- | --- | --- |
|
|
123
|
+
| tab-selected | `CustomEvent<{tab: TabData, id: string, index: number}>` | Fired when a tab is selected. |
|
|
124
|
+
| tab-closed | `CustomEvent<{tab: TabData, id: string, index: number}>` | Fired when a tab's close button is clicked, or `Delete` is pressed on a tab. |
|
|
125
|
+
| add-new-tab | `CustomEvent<void>` | Fired when the "add new tab" button is clicked. |
|
|
126
|
+
|
|
127
|
+
## Slots
|
|
128
|
+
|
|
129
|
+
| Slot | Description |
|
|
130
|
+
| --- | --- |
|
|
131
|
+
| tab-<id>-icon | Leading icon slot for each tab (shown when `hasLeadingIcon` is true for that tab) |
|
|
132
|
+
| tab-<id>-<iconSlotName> | Custom badge icon slot for each tab, one per badge that declares an `iconSlotName`. The deprecated single-badge path uses `tab-<id>-badge-icon`. |
|
|
133
|
+
| tab-<id>-panel | Content of the panel for each tab (rendered when `hasPanels` is true) |
|
|
134
|
+
|
|
135
|
+
## Stories
|
|
136
|
+
|
|
137
|
+
- [Primary](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-tab-row--primary)
|
|
138
|
+
- [Hug Mode](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-tab-row--hug-mode)
|
|
139
|
+
- [Center Content](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-tab-row--center-content)
|
|
140
|
+
- [No Close](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-tab-row--no-close)
|
|
141
|
+
- [Hug Mode No Close](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-tab-row--hug-mode-no-close)
|
|
142
|
+
- [With Add New Tab](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-tab-row--with-add-new-tab)
|
|
143
|
+
- [With Badges](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-tab-row--with-badges)
|
|
144
|
+
- [With Subtitles](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-tab-row--with-subtitles)
|
|
145
|
+
- [Disabled Tabs](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-tab-row--disabled-tabs)
|
|
146
|
+
- [No Leading Icons](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-tab-row--no-leading-icons)
|
|
147
|
+
- [With Panels](https://openbridge-next-storybook.web.app/?path=/story/ui-components-menus-and-navigation-tab-row--with-panels)
|
|
148
|
+
|
|
149
|
+
## See also
|
|
150
|
+
|
|
151
|
+
- [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# `<obc-tabbed-card>`
|
|
2
|
+
|
|
3
|
+
A card component that organizes content into multiple tabbed sections, allowing users to switch between views without leaving the current context.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ui-components-sections-tabbed-card--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/tabbed-card/tabbed-card.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-tabbed-card>` – A card component that organizes content into multiple tabbed sections, allowing users to switch between views without leaving the current context.
|
|
8
|
+
|
|
9
|
+
Displays a horizontal row of tabs at the top, each associated with a content panel below. Users can navigate between tabs using mouse or keyboard, with the active tab's content shown in the main area. This pattern is ideal for grouping related information or settings within a compact space.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
- **Configurable Tab Count:** Supports 1–5 tabs, each with a custom title and content area.
|
|
15
|
+
- **Flexible Content Structure:**
|
|
16
|
+
- **Default Slot Mode:** When `hasDefaultSlotOnly` is true, all tab content is provided via the default slot, and the consumer is responsible for toggling content based on the selected tab.
|
|
17
|
+
- **Named Slot Mode:** When `hasDefaultSlotOnly` is false (default), each tab uses its own named slots (`tab-title-x`, `tab-content-x`) for title and content.
|
|
18
|
+
- **Keyboard Navigation:** Supports Left/Right Arrow to move between tabs, Home/End to jump to first/last tab, following WAI-ARIA Tabs Pattern for accessibility.
|
|
19
|
+
- **Active Tab Highlighting:** Visually distinguishes the selected tab and its content panel.
|
|
20
|
+
- **Automatic Tab Activation:** Tabs activate on focus, which shortens keyboard navigation.
|
|
21
|
+
- **Responsive Layout:** Adapts to container width and height.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Usage Guidelines
|
|
26
|
+
Use `obc-tabbed-card` to present related content or controls in a compact, organized manner, such as settings panels, dashboards, or multi-step forms. Ideal when users need to switch between several views without navigating away from the current page. Avoid using tabs for unrelated content or when only a single view is needed.
|
|
27
|
+
|
|
28
|
+
- For up to five tabs, supply each tab's title and content using the corresponding named slots.
|
|
29
|
+
- If you need to control tab content visibility yourself (e.g., for advanced state management), set `hasDefaultSlotOnly` and provide all content in the default slot.
|
|
30
|
+
- Keyboard users can navigate tabs using arrow keys, Home, and End.
|
|
31
|
+
- For best accessibility, keep tab titles concise and ensure content is meaningfully grouped.
|
|
32
|
+
|
|
33
|
+
**TODO(designer):** Clarify if there are recommended limits for tab title length or content complexity, and if there are visual guidelines for tab overflow (more than five tabs).
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Slots
|
|
38
|
+
|
|
39
|
+
| Slot Name | Renders When... | Purpose |
|
|
40
|
+
|-------------------|-------------------------------|------------------------------------------|
|
|
41
|
+
| (default) | `hasDefaultSlotOnly` is true | All tab content (consumer toggles views) |
|
|
42
|
+
| tab-title-0 | Always | Title for the first tab |
|
|
43
|
+
| tab-content-0 | Always (unless default slot) | Content for the first tab |
|
|
44
|
+
| tab-icon-0 | hasTabIcons is true | Icon for the first tab |
|
|
45
|
+
| tab-title-1 | nTabs > 1 | Title for the second tab |
|
|
46
|
+
| tab-content-1 | nTabs > 1 | Content for the second tab |
|
|
47
|
+
| tab-icon-1 | hasTabIcons is true | Icon for the second tab |
|
|
48
|
+
| tab-title-2 | nTabs > 2 | Title for the third tab |
|
|
49
|
+
| tab-content-2 | nTabs > 2 | Content for the third tab |
|
|
50
|
+
| tab-icon-2 | hasTabIcons is true | Icon for the third tab |
|
|
51
|
+
| tab-title-3 | nTabs > 3 | Title for the fourth tab |
|
|
52
|
+
| tab-content-3 | nTabs > 3 | Content for the fourth tab |
|
|
53
|
+
| tab-icon-3 | hasTabIcons is true | Icon for the fourth tab |
|
|
54
|
+
| tab-title-4 | nTabs > 4 | Title for the fifth tab |
|
|
55
|
+
| tab-content-4 | nTabs > 4 | Content for the fifth tab |
|
|
56
|
+
| tab-icon-4 | hasTabIcons is true | Icon for the fifth tab |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Properties and Attributes
|
|
61
|
+
- `nTabs` (number): Number of tabs to display (default: 1). Determines how many tab-title/content slot pairs are rendered.
|
|
62
|
+
- `selectedTab` (number): Index of the currently selected tab (default: 0). Updates automatically on user interaction.
|
|
63
|
+
- `hasDefaultSlotOnly` (boolean): If true, only the default slot is rendered for tab content, and the consumer is responsible for toggling content based on the selected tab.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Events
|
|
68
|
+
- `tab-change` – Fired whenever the selected tab changes, with detail `{tab: number}` indicating the new tab index.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Best Practices & Constraints
|
|
73
|
+
- Keep tab titles short for optimal display.
|
|
74
|
+
- Use tabs for closely related content; avoid mixing unrelated features in a single tabbed card.
|
|
75
|
+
- For accessibility, ensure each tab has a unique, descriptive title.
|
|
76
|
+
- Do not exceed five tabs for best usability; if more are needed, consider alternative navigation patterns.
|
|
77
|
+
- When using `hasDefaultSlotOnly`, ensure your content updates in sync with the `selectedTab` property.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Example
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<obc-tabbed-card nTabs="3">
|
|
85
|
+
<span slot="tab-title-0">Overview</span>
|
|
86
|
+
<span slot="tab-title-1">Details</span>
|
|
87
|
+
<span slot="tab-title-2">Settings</span>
|
|
88
|
+
|
|
89
|
+
<div slot="tab-content-0">Overview Content</div>
|
|
90
|
+
<div slot="tab-content-1">Details Content</div>
|
|
91
|
+
<div slot="tab-content-2">Settings Content</div>
|
|
92
|
+
</obc-tabbed-card>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
In this example, three tabs are shown, each with its own title and content panel.
|
|
96
|
+
|
|
97
|
+
## Keyboard
|
|
98
|
+
[APG Tabs](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/) with automatic
|
|
99
|
+
activation: the tab list is one tab stop on the selected tab, `Left` and
|
|
100
|
+
`Right` move to the previous and next tab and wrap, `Home` and `End` go to
|
|
101
|
+
the ends, and a tab is selected as soon as it has focus. Each tab points at
|
|
102
|
+
its panel, and each panel is named by its tab.
|
|
103
|
+
|
|
104
|
+
Left out: `Delete`, since the tabs cannot be closed; and with
|
|
105
|
+
`hasDefaultSlotOnly` the tabs other than the selected one point at no panel,
|
|
106
|
+
because there is only one.
|
|
107
|
+
|
|
108
|
+
## Properties
|
|
109
|
+
|
|
110
|
+
| Property | Attribute | Type | Default | Description |
|
|
111
|
+
| --- | --- | --- | --- | --- |
|
|
112
|
+
| nTabs | nTabs | `number` | `1` | Number of tabs to display (1–5). Determines how many tab-title/content slot pairs are rendered. |
|
|
113
|
+
| selectedTab | selectedTab | `number` | `0` | Index of the currently selected tab (zero-based). Updates automatically on user interaction. |
|
|
114
|
+
| hasDefaultSlotOnly | hasDefaultSlotOnly | `boolean` | `false` | If true, only the default slot is rendered for tab content, and the consumer is responsible for toggling content based on the selected tab. When false (default), each tab uses its own named slots for title and content. |
|
|
115
|
+
| hasTabIcons | hasTabIcons | `boolean` | `false` | If true, each tab will have an icon slot. |
|
|
116
|
+
|
|
117
|
+
## Events
|
|
118
|
+
|
|
119
|
+
| Event | Type | Description |
|
|
120
|
+
| --- | --- | --- |
|
|
121
|
+
| tab-change | `CustomEvent<{tab:number}>` | Fired when the selected tab changes |
|
|
122
|
+
|
|
123
|
+
## Slots
|
|
124
|
+
|
|
125
|
+
| Slot | Description |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| (default) | Default slot for tab content (used only when `hasDefaultSlotOnly` is true) |
|
|
128
|
+
| tab-title-0 | Title for the first tab |
|
|
129
|
+
| tab-content-0 | Content for the first tab |
|
|
130
|
+
| tab-title-1 | Title for the second tab |
|
|
131
|
+
| tab-content-1 | Content for the second tab |
|
|
132
|
+
| tab-title-2 | Title for the third tab |
|
|
133
|
+
| tab-content-2 | Content for the third tab |
|
|
134
|
+
| tab-title-3 | Title for the fourth tab |
|
|
135
|
+
| tab-content-3 | Content for the fourth tab |
|
|
136
|
+
| tab-title-4 | Title for the fifth tab |
|
|
137
|
+
| tab-content-4 | Content for the fifth tab |
|
|
138
|
+
| tab-icon-0 | Icon for the first tab |
|
|
139
|
+
| tab-icon-1 | Icon for the second tab |
|
|
140
|
+
| tab-icon-2 | Icon for the third tab |
|
|
141
|
+
| tab-icon-3 | Icon for the fourth tab |
|
|
142
|
+
| tab-icon-4 | Icon for the fifth tab |
|
|
143
|
+
|
|
144
|
+
## Stories
|
|
145
|
+
|
|
146
|
+
- [Primary](https://openbridge-next-storybook.web.app/?path=/story/ui-components-sections-tabbed-card--primary)
|
|
147
|
+
- [Default Slot Only](https://openbridge-next-storybook.web.app/?path=/story/ui-components-sections-tabbed-card--default-slot-only)
|
|
148
|
+
- [With Five Tabs](https://openbridge-next-storybook.web.app/?path=/story/ui-components-sections-tabbed-card--with-five-tabs)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# `<obc-table-header-item>`
|
|
2
|
+
|
|
3
|
+
No summary yet.
|
|
4
|
+
|
|
5
|
+
Lifecycle: beta. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ui-components-tables-building-blocks-table-header-item--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/table-header-item/table-header-item.ts)
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
| Property | Attribute | Type | Default | Description |
|
|
10
|
+
| --- | --- | --- | --- | --- |
|
|
11
|
+
| type | type | `ObcTableHeaderItemType` | | |
|
|
12
|
+
| disabled | disabled | `boolean` | `false` | |
|
|
13
|
+
| hasLeadingIcon | hasLeadingIcon | `boolean` | `false` | |
|
|
14
|
+
| sortDirection | sortDirection | `ObcTableHeaderItemSortDirection` | | Available when `sortable==true`. |
|
|
15
|
+
| showDivider | showDivider | `boolean` | `false` | |
|
|
16
|
+
| checked | checked | `boolean` | `false` | |
|
|
17
|
+
| sortable | sortable | `boolean` | `false` | |
|
|
18
|
+
|
|
19
|
+
## Events
|
|
20
|
+
|
|
21
|
+
None.
|
|
22
|
+
|
|
23
|
+
## Slots
|
|
24
|
+
|
|
25
|
+
| Slot | Description |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| leading-icon | Leading icon (shown when `hasLeadingIcon` is true). |
|
|
28
|
+
| (default) | Header label content (hidden when `type` is `IconOnly`). |
|
|
29
|
+
|
|
30
|
+
## Stories
|
|
31
|
+
|
|
32
|
+
- [Primary](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-building-blocks-table-header-item--primary)
|
|
33
|
+
- [Checked](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-building-blocks-table-header-item--checked)
|
|
34
|
+
- [Sortable](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-building-blocks-table-header-item--sortable)
|
|
35
|
+
- [No Icon](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-building-blocks-table-header-item--no-icon)
|
|
36
|
+
- [Icon Only](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-building-blocks-table-header-item--icon-only)
|
|
37
|
+
- [Narrow](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-building-blocks-table-header-item--narrow)
|
|
38
|
+
- [With Leading Icon](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-building-blocks-table-header-item--with-leading-icon)
|
|
39
|
+
- [With Sort Arrows](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-building-blocks-table-header-item--with-sort-arrows)
|
|
40
|
+
- [With Sort Descending](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-building-blocks-table-header-item--with-sort-descending)
|
|
41
|
+
- [With Divider](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-building-blocks-table-header-item--with-divider)
|
|
42
|
+
- [Disabled](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-building-blocks-table-header-item--disabled)
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# `<obc-table>`
|
|
2
|
+
|
|
3
|
+
renders tabular data with configurable columns and cell types.
|
|
4
|
+
|
|
5
|
+
Lifecycle: beta. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ui-components-tables-table--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/table/table.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-table>` renders tabular data with configurable columns and cell types.
|
|
8
|
+
|
|
9
|
+
Overview
|
|
10
|
+
Use this component to display structured datasets with optional selection, sorting, and rich cell
|
|
11
|
+
rendering. It accepts `data` and `columns` and renders rows based on column configuration.
|
|
12
|
+
|
|
13
|
+
Features/Variants
|
|
14
|
+
- Selectable rows with header “select all” checkbox via `selectable=true`.
|
|
15
|
+
- Cell rendering variants: `checkbox`, `tag`, `horizontal-bar`, and `button` cell types.
|
|
16
|
+
- Visual variants: `rowDivider`, `striped`, `narrowHeader`, and `showHeader`.
|
|
17
|
+
- Sorting support for sortable columns via column definitions.
|
|
18
|
+
- Hierarchical rows via `parentId`, `level`, `expandable` and `expanded`.
|
|
19
|
+
|
|
20
|
+
Usage Guidelines
|
|
21
|
+
- Controlled selection: pass `selectedRowIds` and update it on `selection-change`.
|
|
22
|
+
- Uncontrolled selection: pass `defaultSelectedRowIds` and listen to `selection-change`.
|
|
23
|
+
- Use `selectAllAriaLabel` to customize the header checkbox accessibility label.
|
|
24
|
+
- Hierarchy is controlled, and flat: pass only the rows that are currently
|
|
25
|
+
visible, each with the `parentId` of its parent row, and drop a collapsed
|
|
26
|
+
group's descendants from `data` on `expand-toggle`. The table draws the
|
|
27
|
+
indent and the chevron, keeps each sibling set sorted within its parent,
|
|
28
|
+
and owns no expansion state of its own.
|
|
29
|
+
|
|
30
|
+
Slots/Content
|
|
31
|
+
- This component does not expose public slots. Provide content via `data` and `columns`.
|
|
32
|
+
|
|
33
|
+
Events
|
|
34
|
+
- `row-click` fires when a row is clicked.
|
|
35
|
+
- `cell-button-click` fires when a button cell is clicked.
|
|
36
|
+
- `cell-checkbox-change` fires when a checkbox cell changes.
|
|
37
|
+
- `cell-tag-click` fires when a tag inside a cell is clicked.
|
|
38
|
+
- `selection-change` fires when row selection changes (source: `row` or `header`).
|
|
39
|
+
- `expand-toggle` fires when a group row's chevron or expand key is used.
|
|
40
|
+
|
|
41
|
+
Accessibility
|
|
42
|
+
A table with hierarchical rows renders as a
|
|
43
|
+
[treegrid](https://www.w3.org/WAI/ARIA/apg/patterns/treegrid/): rows carry
|
|
44
|
+
`aria-level`, and group rows `aria-expanded`. Right expands a collapsed
|
|
45
|
+
group, Left collapses an expanded one or moves to the parent row. Cell-level
|
|
46
|
+
arrow navigation, which the full pattern also specifies, is out of scope —
|
|
47
|
+
arrow keys move between rows, matching the flat table.
|
|
48
|
+
|
|
49
|
+
Left out: cell-level arrow navigation, and one tab stop for the grid. Each
|
|
50
|
+
row is a button in the tab sequence, and so is every control inside a cell.
|
|
51
|
+
Rows are `<button role="row">`, cells are `cell` rather than `gridcell`, and
|
|
52
|
+
a selectable hierarchy renders no `aria-selected` on its rows and no
|
|
53
|
+
`aria-multiselectable` on the grid.
|
|
54
|
+
|
|
55
|
+
Best Practices
|
|
56
|
+
- Keep column `key` values stable across renders to avoid selection or sorting resets.
|
|
57
|
+
- Prefer `selectedRowIds` for deterministic state in apps with external stores.
|
|
58
|
+
- For dense tables, combine `narrowHeader` and `rowDivider` for visual clarity.
|
|
59
|
+
|
|
60
|
+
Example (keywords: table, data grid, grid, tabular, datatable)
|
|
61
|
+
```ts
|
|
62
|
+
html`<obc-table
|
|
63
|
+
.data=${rows}
|
|
64
|
+
.columns=${columns}
|
|
65
|
+
selectable
|
|
66
|
+
striped
|
|
67
|
+
|
|
68
|
+
## Properties
|
|
69
|
+
|
|
70
|
+
| Property | Attribute | Type | Default | Description |
|
|
71
|
+
| --- | --- | --- | --- | --- |
|
|
72
|
+
| ariaLabel | aria-label | `string \| null` | `null` | Accessible name of the table, mapped to the `aria-label` attribute and forwarded to the grid. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. |
|
|
73
|
+
| data | data | `ObcTableRow[]` | `[]` | |
|
|
74
|
+
| columns | columns | `ObcTableColumn[]` | `[]` | |
|
|
75
|
+
| rowDivider | rowDivider | `boolean` | `false` | |
|
|
76
|
+
| narrowHeader | narrowHeader | `boolean` | `false` | Available when `showHeader==true`. |
|
|
77
|
+
| showHeader | | `boolean` | `true` | |
|
|
78
|
+
| striped | striped | `boolean` | `false` | |
|
|
79
|
+
| selectable | selectable | `boolean` | `false` | |
|
|
80
|
+
| selectedRowIds | selectedRowIds | `string[] \| undefined` | | Available when `selectable==true`. |
|
|
81
|
+
| defaultSelectedRowIds | defaultSelectedRowIds | `string[] \| undefined` | | Available when `selectable==true && selectedRowIds==undefined`. |
|
|
82
|
+
| selectAllAriaLabel | selectAllAriaLabel | `string` | `'Select all rows'` | Available when `selectable==true && showHeader==true`. |
|
|
83
|
+
| sortedData | | | | |
|
|
84
|
+
|
|
85
|
+
## Events
|
|
86
|
+
|
|
87
|
+
| Event | Type | Description |
|
|
88
|
+
| --- | --- | --- |
|
|
89
|
+
| row-click | `ObcTableRowClickEvent` | Fired when a row is clicked. |
|
|
90
|
+
| cell-button-click | `ObcTableCellClickEvent` | Fired when a cell button is clicked. |
|
|
91
|
+
| cell-checkbox-change | `ObcTableCellCheckboxChangeEvent` | Fired when a cell checkbox is changed. |
|
|
92
|
+
| cell-tag-click | `ObcTableCellTagClickEvent` | Fired when a tag inside a cell is clicked. |
|
|
93
|
+
| selection-change | `ObcTableSelectionChangeEvent` | Fired when row selection changes. |
|
|
94
|
+
| expand-toggle | `ObcTableExpandToggleEvent` | Fired when a group row is expanded or collapsed. |
|
|
95
|
+
|
|
96
|
+
## Slots
|
|
97
|
+
|
|
98
|
+
None.
|
|
99
|
+
|
|
100
|
+
## Stories
|
|
101
|
+
|
|
102
|
+
- [Primary](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--primary)
|
|
103
|
+
- [Playground](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--playground): Interactive playground for table selection, row styling, and header options.
|
|
104
|
+
- [Checkbox Cells](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--checkbox-cells)
|
|
105
|
+
- [Tag Multi Tag Cells](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--tag-multi-tag-cells)
|
|
106
|
+
- [Horizontal Bar Cells](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--horizontal-bar-cells)
|
|
107
|
+
- [Selectable Table](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--selectable-table)
|
|
108
|
+
- [Row Divider](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--row-divider)
|
|
109
|
+
- [Narrow Header](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--narrow-header)
|
|
110
|
+
- [Striped](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--striped)
|
|
111
|
+
- [Vertical Data](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--vertical-data)
|
|
112
|
+
- [Override Column Size](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--override-column-size)
|
|
113
|
+
- [Full Height Case](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--full-height-case)
|
|
114
|
+
- [Small Height Case](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--small-height-case)
|
|
115
|
+
- [Adding Data](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--adding-data)
|
|
116
|
+
- [Removing Data](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--removing-data)
|
|
117
|
+
- [Interactive](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--interactive)
|
|
118
|
+
- [Hierarchy](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--hierarchy): Rows form a tree through `parentId` and `level`. The table draws the indent and the chevron and reports `expand-toggle`; the story owns which rows are collapsed and passes only the visible ones. Sorting the System column reorders each sibling set on its own, so a child never leaves its parent.
|
|
119
|
+
- [Cyclic Hierarchy](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--cyclic-hierarchy): Regression guard. Both tables get the same three rows, two of which name each other as `parentId`. `sortWithinSiblings()` walks down from rows whose `parentId` is absent from the data, so the cycle yields no root; the rows it cannot reach are re-entered as a top-level sibling set instead of being dropped. Both tables list all three rows, in the sort order each is given. Make all three rows cyclic and all three still render.
|
|
120
|
+
- [Cycle With Descendants](https://openbridge-next-storybook.web.app/?path=/story/ui-components-tables-table--cycle-with-descendants): Regression guard for the blast radius of a cycle. Pump sensor has one ordinary parent and is in no cycle, but its parent sits in one, so recovering only the cycle members would still lose it. All four rows render in both tables; Pump sensor stays under Pump A, because the recovered rows are walked, not flattened.
|
|
121
|
+
|
|
122
|
+
## See also
|
|
123
|
+
|
|
124
|
+
- [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# `<obc-tag>`
|
|
2
|
+
|
|
3
|
+
No summary yet.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ui-components-selection-controls-and-switches-tag--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/tag/tag.ts)
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
| Property | Attribute | Type | Default | Description |
|
|
10
|
+
| --- | --- | --- | --- | --- |
|
|
11
|
+
| label | label | `string` | `'Label'` | |
|
|
12
|
+
| color | color | `TagColor` | | |
|
|
13
|
+
| size | size | `TagSize` | | |
|
|
14
|
+
| hasIcon | hasIcon | `boolean` | `false` | |
|
|
15
|
+
|
|
16
|
+
## Events
|
|
17
|
+
|
|
18
|
+
None.
|
|
19
|
+
|
|
20
|
+
## Slots
|
|
21
|
+
|
|
22
|
+
| Slot | Description |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| (default) | Leading icon content (shown when `hasIcon` is true). |
|
|
25
|
+
|
|
26
|
+
## Stories
|
|
27
|
+
|
|
28
|
+
- [Primary](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--primary)
|
|
29
|
+
- [Large](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--large)
|
|
30
|
+
- [All Sizes And Colors](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--all-sizes-and-colors)
|
|
31
|
+
- [Without Icon](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--without-icon)
|
|
32
|
+
- [Gray](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--gray)
|
|
33
|
+
- [Blue](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--blue)
|
|
34
|
+
- [Cyan](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--cyan)
|
|
35
|
+
- [Teal](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--teal)
|
|
36
|
+
- [Green](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--green)
|
|
37
|
+
- [Yellow](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--yellow)
|
|
38
|
+
- [Orange](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--orange)
|
|
39
|
+
- [Red](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--red)
|
|
40
|
+
- [Purple](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--purple)
|
|
41
|
+
- [Indigo](https://openbridge-next-storybook.web.app/?path=/story/ui-components-selection-controls-and-switches-tag--indigo)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# `<obc-text-input-field>`
|
|
2
|
+
|
|
3
|
+
A text input field component with optional icons, label, and helper text.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ui-components-input-controls-text-input-field--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/components/text-input-field/text-input-field.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-text-input-field>` – A text input field component with optional icons, label, and helper text.
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
| Property | Attribute | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- | --- |
|
|
13
|
+
| value | value | `string` | `''` | |
|
|
14
|
+
| placeholder | placeholder | `string` | `''` | |
|
|
15
|
+
| type | type | `HTMLInputTypeAttribute` | | |
|
|
16
|
+
| textAlign | textAlign | `ObcTextInputFieldTextAlign` | | |
|
|
17
|
+
| disabled | disabled | `boolean` | `false` | |
|
|
18
|
+
| readonly | readonly | `boolean` | `false` | |
|
|
19
|
+
| error | error | `boolean` | `false` | |
|
|
20
|
+
| errorText | errorText | `string` | `''` | Available when `error==true`. |
|
|
21
|
+
| rejectUpdatesOnFocus | rejectUpdatesOnFocus | `boolean` | `false` | If true, the input field will not update its value on focus |
|
|
22
|
+
| rejectUpdates | rejectUpdates | `boolean` | `false` | If true, the value will only be initially set, and not updated on change |
|
|
23
|
+
| rejectDuplicateUpdates | rejectDuplicateUpdates | `boolean` | `false` | If true, the input field will not update its value if the value is the same as the previous value This is useful to avoid React re-rendering to reset the value. |
|
|
24
|
+
| name | name | `string` | `''` | Name attribute for form integration |
|
|
25
|
+
| maxlength | maxlength | `number \| undefined` | | Maximum number of characters allowed |
|
|
26
|
+
| minlength | minlength | `number \| undefined` | | Minimum number of characters required |
|
|
27
|
+
| size | size | `ObcTextInputFieldSize` | | |
|
|
28
|
+
| hasLeadingIcon | hasLeadingIcon | `boolean` | `false` | |
|
|
29
|
+
| hasClearButton | hasClearButton | `boolean` | `false` | Shows a clear button when the input has a value |
|
|
30
|
+
| helperText | helperText | `string` | `''` | |
|
|
31
|
+
| label | label | `string` | `''` | |
|
|
32
|
+
| required | required | `boolean` | `false` | |
|
|
33
|
+
| hasLabelIcon | hasLabelIcon | `boolean` | `false` | Available when `label!=''`. |
|
|
34
|
+
| labelPlacement | labelPlacement | `ObcTextInputFieldPlacement` | | Available when `label!=''`. |
|
|
35
|
+
| hasHelperIcon | hasHelperIcon | `boolean` | `false` | |
|
|
36
|
+
| helperPlacement | helperPlacement | `ObcTextInputFieldPlacement` | | |
|
|
37
|
+
|
|
38
|
+
## Events
|
|
39
|
+
|
|
40
|
+
| Event | Type | Description |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| clear | `CustomEvent` | Fired when the clear button is clicked |
|
|
43
|
+
| input | `InputEvent` | Standard input event on value change |
|
|
44
|
+
| change | `CustomEvent<{value: string}>` | Dispatched on value change, carrying the committed value |
|
|
45
|
+
| blur | | Fired when the input field is blurred |
|
|
46
|
+
|
|
47
|
+
## Slots
|
|
48
|
+
|
|
49
|
+
| Slot | Description |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| leading-icon | Icon displayed before the input value (when `hasLeadingIcon` is true) |
|
|
52
|
+
| label-icon | Icon displayed before the label text (when `hasLabelIcon` is true) |
|
|
53
|
+
| helper-icon | Icon displayed before helper or error text (when `hasHelperIcon` is true) |
|
|
54
|
+
|
|
55
|
+
## Stories
|
|
56
|
+
|
|
57
|
+
- [Default](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--default)
|
|
58
|
+
- [With Placeholder](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--with-placeholder)
|
|
59
|
+
- [With Leading Icon](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--with-leading-icon)
|
|
60
|
+
- [With Clear Button](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--with-clear-button)
|
|
61
|
+
- [With Leading Icon And Clear Button](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--with-leading-icon-and-clear-button)
|
|
62
|
+
- [Align Left](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--align-left)
|
|
63
|
+
- [Align Center](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--align-center)
|
|
64
|
+
- [Size Regular](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--size-regular)
|
|
65
|
+
- [Size Large](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--size-large)
|
|
66
|
+
- [With Label](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--with-label)
|
|
67
|
+
- [With Label Required](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--with-label-required)
|
|
68
|
+
- [With Label Icon](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--with-label-icon)
|
|
69
|
+
- [Label Placement Left](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--label-placement-left)
|
|
70
|
+
- [Label Placement Center](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--label-placement-center)
|
|
71
|
+
- [Label Placement Right](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--label-placement-right)
|
|
72
|
+
- [With Helper Text](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--with-helper-text)
|
|
73
|
+
- [With Helper Text Icon](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--with-helper-text-icon)
|
|
74
|
+
- [Helper Placement Left](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--helper-placement-left)
|
|
75
|
+
- [Helper Placement Center](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--helper-placement-center)
|
|
76
|
+
- [Helper Placement Right](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--helper-placement-right)
|
|
77
|
+
- [Type Text](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--type-text)
|
|
78
|
+
- [Type Password](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--type-password): Password fields automatically include a visibility toggle button.
|
|
79
|
+
- [Type Email](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--type-email)
|
|
80
|
+
- [Type Search](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--type-search)
|
|
81
|
+
- [Disabled](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--disabled)
|
|
82
|
+
- [Readonly](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--readonly): Read-only fields allow selection and copying but prevent editing.
|
|
83
|
+
- [Error](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--error)
|
|
84
|
+
- [Error With Label](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--error-with-label)
|
|
85
|
+
- [Error With Icon](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--error-with-icon)
|
|
86
|
+
- [Complete](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--complete)
|
|
87
|
+
- [Complete Center](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--complete-center)
|
|
88
|
+
- [Complete Disabled](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--complete-disabled)
|
|
89
|
+
- [Complete Error](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--complete-error)
|
|
90
|
+
- [Search Field](https://openbridge-next-storybook.web.app/?path=/story/ui-components-input-controls-text-input-field--search-field): A search input with leading search icon and built-in clear button.
|
|
91
|
+
|
|
92
|
+
## See also
|
|
93
|
+
|
|
94
|
+
- [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
|