diff --git a/change/@fluentui-web-components-b0669382-c509-4801-bd44-9849e8570a92.json b/change/@fluentui-web-components-b0669382-c509-4801-bd44-9849e8570a92.json new file mode 100644 index 00000000000000..77a57797f6f18a --- /dev/null +++ b/change/@fluentui-web-components-b0669382-c509-4801-bd44-9849e8570a92.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Removes dependancy on fast-foundation classes and templates", + "packageName": "@fluentui/web-components", + "email": "jes@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/web-components/docs/api-report.md b/packages/web-components/docs/api-report.md index 042a9ff09a728b..2cf13edf679c07 100644 --- a/packages/web-components/docs/api-report.md +++ b/packages/web-components/docs/api-report.md @@ -4,65 +4,60 @@ ```ts -import type { AnchorOptions as AnchorButtonOptions } from '@microsoft/fast-foundation/anchor.js'; -import type { ButtonOptions } from '@microsoft/fast-foundation/button.js'; -import { DividerOrientation } from '@microsoft/fast-foundation/divider.js'; -import { DividerRole } from '@microsoft/fast-foundation/divider.js'; +import type { Constructable } from '@microsoft/fast-element'; +import { Direction } from '@microsoft/fast-web-utilities'; import { ElementStyles } from '@microsoft/fast-element'; import { ElementViewTemplate } from '@microsoft/fast-element'; -import { FASTAccordion } from '@microsoft/fast-foundation/accordion.js'; -import { FASTAccordionItem } from '@microsoft/fast-foundation/accordion-item.js'; -import { FASTAnchor } from '@microsoft/fast-foundation/anchor.js'; -import { FASTButton } from '@microsoft/fast-foundation/button.js'; -import { FASTCheckbox } from '@microsoft/fast-foundation/checkbox.js'; -import { FASTDivider } from '@microsoft/fast-foundation/divider.js'; import { FASTElement } from '@microsoft/fast-element'; import { FASTElementDefinition } from '@microsoft/fast-element'; -import { FASTMenu } from '@microsoft/fast-foundation/menu.js'; -import { FASTMenuItem } from '@microsoft/fast-foundation/menu-item.js'; -import { FASTProgress } from '@microsoft/fast-foundation/progress.js'; -import { FASTProgressRing } from '@microsoft/fast-foundation/progress-ring.js'; -import { FASTRadio } from '@microsoft/fast-foundation/radio.js'; -import { FASTRadioGroup } from '@microsoft/fast-foundation/radio-group.js'; -import { FASTSlider } from '@microsoft/fast-foundation/slider.js'; -import { FASTSwitch } from '@microsoft/fast-foundation/switch.js'; -import { FASTTab } from '@microsoft/fast-foundation/tab.js'; -import { FASTTabPanel } from '@microsoft/fast-foundation/tab-panel.js'; -import { FASTTabs } from '@microsoft/fast-foundation/tabs.js'; -import { FASTTextField } from '@microsoft/fast-foundation/text-field.js'; -import { MenuItemRole } from '@microsoft/fast-foundation/menu-item.js'; -import { RadioGroupOrientation } from '@microsoft/fast-foundation/radio-group.js'; -import { SliderOrientation } from '@microsoft/fast-foundation/slider.js'; -import { StartEnd } from '@microsoft/fast-foundation/patterns.js'; -import { StartEndOptions } from '@microsoft/fast-foundation/patterns.js'; -import type { StaticallyComposableHTML } from '@microsoft/fast-foundation/utilities.js'; -import { TabsOrientation } from '@microsoft/fast-foundation/tabs.js'; -import { TextFieldType as TextInputType } from '@microsoft/fast-foundation/text-field.js'; +import { HTMLDirective } from '@microsoft/fast-element'; +import { Orientation } from '@microsoft/fast-web-utilities'; +import type { SyntheticViewTemplate } from '@microsoft/fast-element'; import type { Theme } from '@fluentui/tokens'; -import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js'; // @public -export class Accordion extends FASTAccordion { +export class Accordion extends FASTElement { + // (undocumented) + protected accordionItems: Element[]; + // Warning: (ae-forgotten-export) The symbol "AccordionExpandMode" needs to be exported by the entry point index.d.ts + expandmode: AccordionExpandMode; + // (undocumented) + expandmodeChanged(prev: AccordionExpandMode, next: AccordionExpandMode): void; + // @internal (undocumented) + handleChange(source: any, propertyName: string): void; + // @internal (undocumented) + slottedAccordionItems: HTMLElement[]; + // @internal (undocumented) + slottedAccordionItemsChanged(oldValue: HTMLElement[], newValue: HTMLElement[]): void; } -// @public +// @public (undocumented) export const accordionDefinition: FASTElementDefinition; -// Warning: (ae-internal-missing-underscore) The name "AccordionItem" should be prefixed with an underscore because the declaration is marked as @internal +// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "AccordionItem" because one of its declarations is marked as @internal // -// @internal (undocumented) -export class AccordionItem extends FASTAccordionItem { - // @public +// @public +export class AccordionItem extends FASTElement { block: boolean; - // @public + // @internal (undocumented) + clickHandler: (e: MouseEvent) => void; + disabled: boolean; + // @internal (undocumented) + expandbutton: HTMLElement; + expanded: boolean; expandIconPosition?: AccordionItemExpandIconPosition; - // @public + headinglevel: 1 | 2 | 3 | 4 | 5 | 6; + id: string; size?: AccordionItemSize; } -// Warning: (ae-incompatible-release-tags) The symbol "definition" is marked as @public, but its signature references "AccordionItem" which is marked as @internal +// Warning: (ae-forgotten-export) The symbol "StartEnd" needs to be exported by the entry point index.d.ts // -// @public +// @internal +export interface AccordionItem extends StartEnd { +} + +// @public (undocumented) export const accordionItemDefinition: FASTElementDefinition; // @public @@ -71,9 +66,19 @@ export const AccordionItemExpandIconPosition: { readonly end: "end"; }; +// Warning: (ae-forgotten-export) The symbol "ValuesOf" needs to be exported by the entry point index.d.ts +// // @public export type AccordionItemExpandIconPosition = ValuesOf; +// Warning: (ae-forgotten-export) The symbol "StartEndOptions" needs to be exported by the entry point index.d.ts +// +// @public +export type AccordionItemOptions = StartEndOptions & { + expandedIcon?: StaticallyComposableHTML; + collapsedIcon?: StaticallyComposableHTML; +}; + // @public export const AccordionItemSize: { readonly small: "small"; @@ -88,8 +93,6 @@ export type AccordionItemSize = ValuesOf; // @public (undocumented) export const accordionItemStyles: ElementStyles; -// Warning: (ae-incompatible-release-tags) The symbol "template" is marked as @public, but its signature references "AccordionItem" which is marked as @internal -// // @public export const accordionItemTemplate: ElementViewTemplate; @@ -99,11 +102,16 @@ export const accordionStyles: ElementStyles; // @public (undocumented) export const accordionTemplate: ElementViewTemplate; +// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "AnchorButton" because one of its declarations is marked as @internal +// // @public -export class AnchorButton extends FASTAnchor { +export class AnchorButton extends FASTElement { appearance?: AnchorButtonAppearance | undefined; // (undocumented) connectedCallback(): void; + control: HTMLAnchorElement; + // @internal + defaultSlottedContent: HTMLElement[]; disabled?: boolean; // (undocumented) protected disabledChanged(prev: boolean, next: boolean): void; @@ -112,9 +120,21 @@ export class AnchorButton extends FASTAnchor { protected disabledFocusableChanged(prev: boolean, next: boolean): void; // (undocumented) disconnectedCallback(): void; + download: string; + href: string; + hreflang: string; iconOnly: boolean; + ping: string; + referrerpolicy: string; + rel: string; shape?: AnchorButtonShape | undefined; size?: AnchorButtonSize; + target: AnchorTarget; + type: string; +} + +// @internal +export interface AnchorButton extends StartEnd, DelegatesARIALink { } // @public @@ -129,11 +149,9 @@ export const AnchorButtonAppearance: { // @public export type AnchorButtonAppearance = ValuesOf; -// @public +// @public (undocumented) export const AnchorButtonDefinition: FASTElementDefinition; -export { AnchorButtonOptions } - // @public export const AnchorButtonShape: { readonly circular: "circular"; @@ -157,6 +175,22 @@ export type AnchorButtonSize = ValuesOf; // @public export const AnchorButtonTemplate: ElementViewTemplate; +// @public +type AnchorOptions = StartEndOptions; +export { AnchorOptions as AnchorButtonOptions } +export { AnchorOptions } + +// @public +export const AnchorTarget: { + readonly _self: "_self"; + readonly _blank: "_blank"; + readonly _parent: "_parent"; + readonly _top: "_top"; +}; + +// @public +export type AnchorTarget = ValuesOf; + // @public export class Avatar extends FASTElement { active?: AvatarActive | undefined; @@ -349,7 +383,7 @@ export const BadgeColor: { // @public export type BadgeColor = ValuesOf; -// @public +// @public (undocumented) export const BadgeDefinition: FASTElementDefinition; // Warning: (ae-internal-missing-underscore) The name "BadgeOptions" should be prefixed with an underscore because the declaration is marked as @internal @@ -406,19 +440,53 @@ export const borderRadiusSmall = "--borderRadiusSmall"; // @public (undocumented) export const borderRadiusXLarge = "--borderRadiusXLarge"; +// Warning: (ae-forgotten-export) The symbol "FormAssociatedButton" needs to be exported by the entry point index.d.ts +// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "Button" because one of its declarations is marked as @internal +// // @public -export class Button extends FASTButton { +export class Button extends FormAssociatedButton { appearance?: ButtonAppearance | undefined; - // (undocumented) + autofocus: boolean; + // @internal (undocumented) connectedCallback(): void; + // (undocumented) + control: HTMLButtonElement; + defaultSlottedContent: HTMLElement[]; disabledFocusable?: boolean; // (undocumented) protected disabledFocusableChanged(prev: boolean, next: boolean): void; // (undocumented) disconnectedCallback(): void; + formaction: string; + // (undocumented) + protected formactionChanged(): void; + formenctype: string; + // (undocumented) + protected formenctypeChanged(): void; + formId: string; + formmethod: string; + // (undocumented) + protected formmethodChanged(): void; + formnovalidate: boolean; + // (undocumented) + protected formnovalidateChanged(): void; + formtarget: '_self' | '_blank' | '_parent' | '_top'; + // (undocumented) + protected formtargetChanged(): void; iconOnly: boolean; shape?: ButtonShape | undefined; size?: ButtonSize; + type: ButtonType; + // (undocumented) + protected typeChanged(previous: ButtonType | undefined, next: ButtonType): void; + // Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: The package "@fluentui/web-components" does not have an export "FormAssociated" + // + // (undocumented) + validate(): void; +} + +// @internal +export interface Button extends StartEnd, DelegatesARIAButton { } // @public @@ -433,9 +501,11 @@ export const ButtonAppearance: { // @public export type ButtonAppearance = ValuesOf; -// @public +// @public (undocumented) export const ButtonDefinition: FASTElementDefinition; +// @public +type ButtonOptions = StartEndOptions + ${startSlotTemplate(options)} + ${endSlotTemplate(options)} +