Skip to content

Commit f087756

Browse files
mainframevclaude
andcommitted
refactor(react-headless-components-preview): consolidate Tag stories under Tags/, simplify render re-exports
Moves the headless Tag, InteractionTag, and TagGroup story folders into a single `stories/src/Tags/` parent, mirroring how the v9 canonical package groups them under `Components/Tags/<Component>` in the Storybook nav. The new layout keeps the SSR-test convention of per-component `index.stories.tsx` metas (which the SSR validator deliberately skips) while updating each meta's title to `Components/Tags/<Component>`. Also simplifies the five `render*.ts` files in the library to single-line re-export specifiers (`export { X_unstable as X } from '@fluentui/react-tags';`) instead of the previous import-then-const-re-export pattern. The api-extractor output collapses accordingly (one less indirection in the .d.ts). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e021a51 commit f087756

24 files changed

Lines changed: 28 additions & 71 deletions

change/@fluentui-react-headless-components-preview-3cc555dc-e346-4c29-bcd0-c8dfbf38544d.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"type": "minor",
3-
"comment": "Add headless Tag, InteractionTag, InteractionTagPrimary, InteractionTagSecondary, TagGroup. Available as ./tag, ./interaction-tag, ./interaction-tag-primary, ./interaction-tag-secondary, ./tag-group subpath exports. Delegates to @fluentui/react-tags base hooks; no icons, styles, Tabster, or floating-ui.",
3+
"comment": "feat: add headless Tags components",
44
"packageName": "@fluentui/react-headless-components-preview",
55
"email": "vgenaev@gmail.com",
66
"dependentChangeType": "patch"

packages/react-components/react-headless-components-preview/library/etc/interaction-tag-primary.api.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
import type { ForwardRefComponent } from '@fluentui/react-utilities';
88
import type { InteractionTagPrimaryBaseProps } from '@fluentui/react-tags';
9-
import { InteractionTagPrimaryBaseState } from '@fluentui/react-tags';
10-
import { InteractionTagPrimaryContextValues as InteractionTagPrimaryContextValues_2 } from '@fluentui/react-tags';
9+
import type { InteractionTagPrimaryBaseState } from '@fluentui/react-tags';
10+
import type { InteractionTagPrimaryContextValues as InteractionTagPrimaryContextValues_2 } from '@fluentui/react-tags';
1111
import type { InteractionTagPrimarySlots as InteractionTagPrimarySlots_2 } from '@fluentui/react-tags';
12-
import { JSXElement } from '@fluentui/react-utilities';
1312
import * as React_2 from 'react';
13+
import { renderInteractionTagPrimary_unstable as renderInteractionTagPrimary } from '@fluentui/react-tags';
1414

1515
// @public
1616
export const InteractionTagPrimary: ForwardRefComponent<InteractionTagPrimaryProps>;
@@ -33,8 +33,7 @@ export type InteractionTagPrimaryState = InteractionTagPrimaryBaseState & {
3333
};
3434
};
3535

36-
// @public
37-
export const renderInteractionTagPrimary: (state: InteractionTagPrimaryBaseState, contextValues: InteractionTagPrimaryContextValues_2) => JSXElement;
36+
export { renderInteractionTagPrimary }
3837

3938
// @public
4039
export const useInteractionTagPrimary: (props: InteractionTagPrimaryProps, ref: React_2.Ref<HTMLButtonElement>) => InteractionTagPrimaryState;

packages/react-components/react-headless-components-preview/library/etc/interaction-tag-secondary.api.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
import type { ForwardRefComponent } from '@fluentui/react-utilities';
88
import type { InteractionTagSecondaryBaseProps } from '@fluentui/react-tags';
9-
import { InteractionTagSecondaryBaseState } from '@fluentui/react-tags';
9+
import type { InteractionTagSecondaryBaseState } from '@fluentui/react-tags';
1010
import type { InteractionTagSecondarySlots as InteractionTagSecondarySlots_2 } from '@fluentui/react-tags';
11-
import { JSXElement } from '@fluentui/react-utilities';
1211
import type * as React_2 from 'react';
12+
import { renderInteractionTagSecondary_unstable as renderInteractionTagSecondary } from '@fluentui/react-tags';
1313

1414
// @public
1515
export const InteractionTagSecondary: ForwardRefComponent<InteractionTagSecondaryProps>;
@@ -28,8 +28,7 @@ export type InteractionTagSecondaryState = InteractionTagSecondaryBaseState & {
2828
};
2929
};
3030

31-
// @public
32-
export const renderInteractionTagSecondary: (state: InteractionTagSecondaryBaseState) => JSXElement;
31+
export { renderInteractionTagSecondary }
3332

3433
// @public
3534
export const useInteractionTagSecondary: (props: InteractionTagSecondaryProps, ref: React_2.Ref<HTMLButtonElement>) => InteractionTagSecondaryState;

packages/react-components/react-headless-components-preview/library/etc/interaction-tag.api.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
import type { ForwardRefComponent } from '@fluentui/react-utilities';
88
import type { InteractionTagBaseProps } from '@fluentui/react-tags';
9-
import { InteractionTagBaseState } from '@fluentui/react-tags';
10-
import { InteractionTagContextValue } from '@fluentui/react-tags';
9+
import type { InteractionTagBaseState } from '@fluentui/react-tags';
10+
import type { InteractionTagContextValue } from '@fluentui/react-tags';
1111
import type { InteractionTagSlots as InteractionTagSlots_2 } from '@fluentui/react-tags';
12-
import { JSXElement } from '@fluentui/react-utilities';
1312
import * as React_2 from 'react';
13+
import { renderInteractionTag_unstable as renderInteractionTag } from '@fluentui/react-tags';
1414

1515
// @public
1616
export const InteractionTag: ForwardRefComponent<InteractionTagProps>;
@@ -34,10 +34,7 @@ export type InteractionTagState = InteractionTagBaseState & {
3434
};
3535
};
3636

37-
// @public
38-
export const renderInteractionTag: (state: InteractionTagBaseState, contextValues: {
39-
interactionTag: InteractionTagContextValue;
40-
}) => JSXElement;
37+
export { renderInteractionTag }
4138

4239
// @public
4340
export const useInteractionTag: (props: InteractionTagProps, ref: React_2.Ref<HTMLDivElement>) => InteractionTagState;

packages/react-components/react-headless-components-preview/library/etc/tag-group.api.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@
55
```ts
66

77
import type { ForwardRefComponent } from '@fluentui/react-utilities';
8-
import { JSXElement } from '@fluentui/react-utilities';
98
import * as React_2 from 'react';
9+
import { renderTagGroup_unstable as renderTagGroup } from '@fluentui/react-tags';
1010
import type { TagGroupBaseProps } from '@fluentui/react-tags';
11-
import { TagGroupBaseState } from '@fluentui/react-tags';
11+
import type { TagGroupBaseState } from '@fluentui/react-tags';
1212
import type { TagGroupContextValue } from '@fluentui/react-tags';
13-
import { TagGroupContextValues as TagGroupContextValues_2 } from '@fluentui/react-tags';
1413
import type { TagGroupSlots as TagGroupSlots_2 } from '@fluentui/react-tags';
1514

16-
// @public
17-
export const renderTagGroup: (state: TagGroupBaseState, contextValue: TagGroupContextValues_2) => JSXElement;
15+
export { renderTagGroup }
1816

1917
// @public
2018
export const TagGroup: ForwardRefComponent<TagGroupProps>;
@@ -41,7 +39,7 @@ export type TagGroupState = TagGroupBaseState & {
4139
// @public
4240
export const useTagGroup: (props: TagGroupProps, ref: React_2.Ref<HTMLDivElement>) => TagGroupState;
4341

44-
// @public
42+
// @public (undocumented)
4543
export const useTagGroupContextValues: (state: TagGroupState) => TagGroupContextValues;
4644

4745
// (No @packageDocumentation comment for this package)

packages/react-components/react-headless-components-preview/library/etc/tag.api.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
```ts
66

77
import type { ForwardRefComponent } from '@fluentui/react-utilities';
8-
import { JSXElement } from '@fluentui/react-utilities';
98
import * as React_2 from 'react';
9+
import { renderTag_unstable as renderTag } from '@fluentui/react-tags';
1010
import type { TagBaseProps } from '@fluentui/react-tags';
11-
import { TagBaseState } from '@fluentui/react-tags';
12-
import { TagContextValues as TagContextValues_2 } from '@fluentui/react-tags';
11+
import type { TagBaseState } from '@fluentui/react-tags';
12+
import type { TagContextValues as TagContextValues_2 } from '@fluentui/react-tags';
1313
import type { TagSlots as TagSlots_2 } from '@fluentui/react-tags';
1414

15-
// @public
16-
export const renderTag: (state: TagBaseState, contextValues: TagContextValues_2) => JSXElement;
15+
export { renderTag }
1716

1817
// @public
1918
export const Tag: ForwardRefComponent<TagProps>;
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
import { renderInteractionTag_unstable } from '@fluentui/react-tags';
2-
3-
/**
4-
* Renders the final JSX of the InteractionTag component, given the state and context values.
5-
*/
6-
export const renderInteractionTag = renderInteractionTag_unstable;
1+
export { renderInteractionTag_unstable as renderInteractionTag } from '@fluentui/react-tags';
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
import { renderInteractionTagPrimary_unstable } from '@fluentui/react-tags';
2-
3-
/**
4-
* Renders the final JSX of the InteractionTagPrimary component.
5-
*/
6-
export const renderInteractionTagPrimary = renderInteractionTagPrimary_unstable;
1+
export { renderInteractionTagPrimary_unstable as renderInteractionTagPrimary } from '@fluentui/react-tags';
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
import { renderInteractionTagSecondary_unstable } from '@fluentui/react-tags';
2-
3-
/**
4-
* Renders the final JSX of the InteractionTagSecondary component.
5-
*/
6-
export const renderInteractionTagSecondary = renderInteractionTagSecondary_unstable;
1+
export { renderInteractionTagSecondary_unstable as renderInteractionTagSecondary } from '@fluentui/react-tags';
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
import { renderTag_unstable } from '@fluentui/react-tags';
2-
3-
/**
4-
* Renders the final JSX of the Tag component, given the state and context values.
5-
*/
6-
export const renderTag = renderTag_unstable;
1+
export { renderTag_unstable as renderTag } from '@fluentui/react-tags';

0 commit comments

Comments
 (0)