From 4d3e3c97e1a283f41f1ee53c1183adc60076ba3d Mon Sep 17 00:00:00 2001 From: Rajdeep Chandra Date: Wed, 20 May 2026 14:04:24 +0530 Subject: [PATCH 1/2] chore(tabs): add @internal JSDoc tags to private and implementation-only properties Private backing fields (_density, _direction, _keyboardActivation), internal state (@state() selectionIndicatorStyle, shouldAnimate), cached collections (_tabs), the ResizeObserver instance, and the static INDICATOR_BASE_SIZE constant were all missing @internal tags. The CEM analyzer picked them up and surfaced them in the Storybook Controls panel as public API. Adding @internal ensures they are excluded from the generated manifest and no longer appear as consumer-facing controls. Co-authored-by: Cursor --- 2nd-gen/packages/core/components/tabs/Tabs.base.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/2nd-gen/packages/core/components/tabs/Tabs.base.ts b/2nd-gen/packages/core/components/tabs/Tabs.base.ts index 85b5cfba48a..92b16a056f9 100644 --- a/2nd-gen/packages/core/components/tabs/Tabs.base.ts +++ b/2nd-gen/packages/core/components/tabs/Tabs.base.ts @@ -106,6 +106,7 @@ export abstract class TabsBase extends SpectrumElement { this.requestUpdate('keyboardActivation', old); } + /** @internal */ private _keyboardActivation: KeyboardActivation = KEYBOARD_ACTIVATION_DEFAULT; /** @@ -139,6 +140,7 @@ export abstract class TabsBase extends SpectrumElement { this.requestUpdate('density', old); } + /** @internal */ private _density: TabDensity = TAB_DENSITY_DEFAULT; /** @@ -181,6 +183,7 @@ export abstract class TabsBase extends SpectrumElement { this.requestUpdate('direction', oldDirection); } + /** @internal */ private _direction: TabsDirection = TABS_DEFAULT_DIRECTION; /** @@ -209,9 +212,12 @@ export abstract class TabsBase extends SpectrumElement { // IMPLEMENTATION // ────────────────────── + /** @internal */ private static readonly INDICATOR_BASE_SIZE = 100; /** + * @internal + * * Inline style applied to the selection indicator element. * Computed from the selected tab's position and dimensions. */ @@ -219,6 +225,8 @@ export abstract class TabsBase extends SpectrumElement { protected selectionIndicatorStyle = ''; /** + * @internal + * * Suppresses the transition on the very first indicator placement * so it doesn't animate from the origin. */ @@ -226,6 +234,8 @@ export abstract class TabsBase extends SpectrumElement { protected shouldAnimate = false; /** + * @internal + * * Cached list of tab elements managed by this container. Updated * via `handleTabSlotChange`. */ @@ -565,6 +575,7 @@ export abstract class TabsBase extends SpectrumElement { } }; + /** @internal */ private _resizeObserver?: ResizeObserver; // ─────────────────────────────────── From 3cbcdd0e2ceadb05ab9d76ac2961e140f765cb95 Mon Sep 17 00:00:00 2001 From: Rajdeep Chandra Date: Fri, 22 May 2026 19:47:26 +0530 Subject: [PATCH 2/2] chore(tabs): mark shadowRootOptions and updateSelectionIndicator as internal Both are implementation details that should not appear in the CEM manifest or Storybook Controls: shadowRootOptions configures shadow DOM setup, and updateSelectionIndicator is a protected method called automatically by lifecycle hooks. Co-authored-by: Cursor --- 2nd-gen/packages/core/components/tabs/Tabs.base.ts | 2 ++ 2nd-gen/packages/swc/components/tabs/Tabs.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/2nd-gen/packages/core/components/tabs/Tabs.base.ts b/2nd-gen/packages/core/components/tabs/Tabs.base.ts index 92b16a056f9..8041cd482c0 100644 --- a/2nd-gen/packages/core/components/tabs/Tabs.base.ts +++ b/2nd-gen/packages/core/components/tabs/Tabs.base.ts @@ -529,6 +529,8 @@ export abstract class TabsBase extends SpectrumElement { // ─────────────────────────────────── /** + * @internal + * * Recalculates the selection indicator's position and size based * on the currently selected tab element. Uses CSS transforms for * smooth animation between tab positions. diff --git a/2nd-gen/packages/swc/components/tabs/Tabs.ts b/2nd-gen/packages/swc/components/tabs/Tabs.ts index a71ff045f20..a1da4349b78 100644 --- a/2nd-gen/packages/swc/components/tabs/Tabs.ts +++ b/2nd-gen/packages/swc/components/tabs/Tabs.ts @@ -42,6 +42,8 @@ import styles from './tabs.css'; */ export class Tabs extends TabsBase { /** + * @internal + * * Shadow `delegatesFocus: true` keeps native focus-delegation where supported; * `TabsBase.focus()` focuses the selected slotted tab explicitly so * programmatic `focus()` matches 1st-gen expectations regardless of engine.