Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export web-components patterns #32182

Merged
merged 5 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Export patterns.",
"packageName": "@fluentui/web-components",
"email": "[email protected]",
"dependentChangeType": "patch"
}
32 changes: 28 additions & 4 deletions packages/web-components/docs/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/// <reference types="web" />

import { CaptureType } from '@microsoft/fast-element';
import { CSSDirective } from '@microsoft/fast-element';
import { Direction } from '@microsoft/fast-web-utilities';
import { ElementStyles } from '@microsoft/fast-element';
Expand Down Expand Up @@ -61,8 +62,6 @@ export class AccordionItem extends BaseAccordionItem {
sizeChanged(prev: AccordionItemSize, next: AccordionItemSize): void;
}

// Warning: (ae-forgotten-export) The symbol "StartEnd" needs to be exported by the entry point index.d.ts
//
// @internal
export interface AccordionItem extends StartEnd {
}
Expand All @@ -81,8 +80,6 @@ export const AccordionItemMarkerPosition: {
// @public
export type AccordionItemMarkerPosition = ValuesOf<typeof AccordionItemMarkerPosition>;

// Warning: (ae-forgotten-export) The symbol "StartEndOptions" needs to be exported by the entry point index.d.ts
//
// @public
export type AccordionItemOptions = StartEndOptions<AccordionItem> & {
expandedIcon?: StaticallyComposableHTML<AccordionItem>;
Expand Down Expand Up @@ -2229,6 +2226,14 @@ export const durationUltraFast = "var(--durationUltraFast)";
// @public
export const durationUltraSlow = "var(--durationUltraSlow)";

// @public
export type EndOptions<TSource = any, TParent = any> = {
end?: StaticallyComposableHTML<TSource, TParent>;
};

// @public
export function endSlotTemplate<TSource extends StartEnd = StartEnd, TParent = any>(options: EndOptions<TSource, TParent>): CaptureType<TSource, TParent>;

// @public
export class Field extends BaseField {
labelPosition: FieldLabelPosition;
Expand Down Expand Up @@ -3223,6 +3228,25 @@ export const SpinnerStyles: ElementStyles;
// @public (undocumented)
export const SpinnerTemplate: ViewTemplate<Spinner, any>;

// @public
export class StartEnd {
// (undocumented)
end: HTMLSlotElement;
// (undocumented)
start: HTMLSlotElement;
}

// @public
export type StartEndOptions<TSource = any, TParent = any> = StartOptions<TSource, TParent> & EndOptions<TSource, TParent>;

// @public
export type StartOptions<TSource = any, TParent = any> = {
start?: StaticallyComposableHTML<TSource, TParent>;
};

// @public
export function startSlotTemplate<TSource extends StartEnd = StartEnd, TParent = any>(options: StartOptions<TSource, TParent>): CaptureType<TSource, TParent>;

// @public
export const strokeWidthThick = "var(--strokeWidthThick)";

Expand Down
2 changes: 2 additions & 0 deletions packages/web-components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ export {
export type { MenuItemColumnCount, MenuItemOptions } from './menu-item/index.js';
export { MenuList, MenuListDefinition, MenuListStyles, MenuListTemplate } from './menu-list/index.js';
export { Menu, MenuDefinition, MenuStyles, MenuTemplate } from './menu/index.js';
export { StartEnd, endSlotTemplate, startSlotTemplate } from './patterns/start-end.js';
export type { StartOptions, EndOptions, StartEndOptions } from './patterns/start-end.js';
export {
BaseProgressBar,
ProgressBar,
Expand Down
Loading