diff --git a/packages/web-components/docs/api-report.md b/packages/web-components/docs/api-report.md index d7d2ec099f59b..2566812701c73 100644 --- a/packages/web-components/docs/api-report.md +++ b/packages/web-components/docs/api-report.md @@ -150,6 +150,59 @@ export const accordionItemStyles: (context: ElementDefinitionContext, definition // @public export const accordionStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ElementStyles; +// @public +export const allComponents: { + fluentAccordion: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentAccordionItem: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentAnchor: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentAnchoredRegion: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentBadge: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentBreadcrumb: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentBreadcrumbItem: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentButton: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentCard: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentCheckbox: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentCombobox: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentDataGrid: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentDataGridCell: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentDataGridRow: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentDesignSystemProvider: (overrideDefinition?: OverrideFoundationElementDefinition< { + baseName: string; + template: ViewTemplate; + styles: ElementStyles; + }> | undefined) => FoundationElementRegistry< { + baseName: string; + template: ViewTemplate; + styles: ElementStyles; + }, DesignSystemProvider>; + fluentDialog: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentDivider: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentFlipper: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentHorizontalScroll: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentListbox: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentOption: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentMenu: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentMenuItem: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentNumberField: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentProgress: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentProgressRing: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentRadio: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentRadioGroup: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentSelect: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentSkeleton: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentSlider: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentSliderLabel: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentSwitch: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; + fluentTabs: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentTab: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentTabPanel: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentTextArea: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentTextField: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentTooltip: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentTreeView: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry; + fluentTreeItem: (overrideDefinition?: OverrideFoundationElementDefinition | undefined) => FoundationElementRegistry>; +}; + // Warning: (ae-internal-missing-underscore) The name "ambientShadow" should be prefixed with an underscore because the declaration is marked as @internal // // @internal @@ -1267,6 +1320,15 @@ export const typeRampPlus6FontSize: CSSDesignToken; // @public (undocumented) export const typeRampPlus6LineHeight: CSSDesignToken; +// Warnings were encountered during analysis: +// +// dist/dts/custom-elements.d.ts:47:5 - (ae-incompatible-release-tags) The symbol "fluentAnchor" is marked as @public, but its signature references "Anchor" which is marked as @internal +// dist/dts/custom-elements.d.ts:49:5 - (ae-incompatible-release-tags) The symbol "fluentBadge" is marked as @public, but its signature references "Badge" which is marked as @internal +// dist/dts/custom-elements.d.ts:52:5 - (ae-incompatible-release-tags) The symbol "fluentButton" is marked as @public, but its signature references "Button" which is marked as @internal +// dist/dts/custom-elements.d.ts:89:5 - (ae-incompatible-release-tags) The symbol "fluentTextArea" is marked as @public, but its signature references "TextArea" which is marked as @internal +// dist/dts/custom-elements.d.ts:90:5 - (ae-incompatible-release-tags) The symbol "fluentTextField" is marked as @public, but its signature references "TextField" which is marked as @internal +// dist/dts/custom-elements.d.ts:91:5 - (ae-incompatible-release-tags) The symbol "fluentTooltip" is marked as @public, but its signature references "Tooltip" which is marked as @internal + // (No @packageDocumentation comment for this package) ``` diff --git a/packages/web-components/src/custom-elements.ts b/packages/web-components/src/custom-elements.ts index b95b2a45bfb89..eca7d34ddb82c 100644 --- a/packages/web-components/src/custom-elements.ts +++ b/packages/web-components/src/custom-elements.ts @@ -1,38 +1,130 @@ /** * Export all custom element definitions */ -export { fluentAccordion, fluentAccordionItem } from './accordion/index'; -export { fluentAnchor } from './anchor/index'; -export { fluentAnchoredRegion } from './anchored-region/index'; -export { fluentBadge } from './badge/index'; -export { fluentBreadcrumb } from './breadcrumb/index'; -export { fluentBreadcrumbItem } from './breadcrumb-item/index'; -export { fluentButton } from './button/index'; -export { fluentCard } from './card/index'; -export { fluentCheckbox } from './checkbox/index'; -export { fluentCombobox } from './combobox/index'; -export { fluentDataGrid, fluentDataGridCell, fluentDataGridRow } from './data-grid/index'; -export { fluentDesignSystemProvider } from './design-system-provider/index'; -export { fluentDialog } from './dialog/index'; -export { fluentDivider } from './divider/index'; -export { fluentFlipper } from './flipper/index'; -export { fluentHorizontalScroll } from './horizontal-scroll/index'; -export { fluentListbox } from './listbox/index'; -export { fluentOption } from './listbox-option/index'; -export { fluentMenu } from './menu/index'; -export { fluentMenuItem } from './menu-item/index'; -export { fluentNumberField } from './number-field/index'; -export { fluentProgress, fluentProgressRing } from './progress/index'; -export { fluentRadio } from './radio/index'; -export { fluentRadioGroup } from './radio-group/index'; -export { fluentSelect } from './select/index'; -export { fluentSkeleton } from './skeleton/index'; -export { fluentSlider } from './slider/index'; -export { fluentSliderLabel } from './slider-label/index'; -export { fluentSwitch } from './switch/index'; -export { fluentTabs, fluentTab, fluentTabPanel } from './tabs/index'; -export { fluentTextArea } from './text-area/index'; -export { fluentTextField } from './text-field/index'; -export { fluentTooltip } from './tooltip/index'; -export { fluentTreeView } from './tree-view/index'; -export { fluentTreeItem } from './tree-item/index'; +import { fluentAccordion, fluentAccordionItem } from './accordion/index'; +import { fluentAnchor } from './anchor/index'; +import { fluentAnchoredRegion } from './anchored-region/index'; +import { fluentBadge } from './badge/index'; +import { fluentBreadcrumb } from './breadcrumb/index'; +import { fluentBreadcrumbItem } from './breadcrumb-item/index'; +import { fluentButton } from './button/index'; +import { fluentCard } from './card/index'; +import { fluentCheckbox } from './checkbox/index'; +import { fluentCombobox } from './combobox/index'; +import { fluentDataGrid, fluentDataGridCell, fluentDataGridRow } from './data-grid/index'; +import { fluentDesignSystemProvider } from './design-system-provider/index'; +import { fluentDialog } from './dialog/index'; +import { fluentDivider } from './divider/index'; +import { fluentFlipper } from './flipper/index'; +import { fluentHorizontalScroll } from './horizontal-scroll/index'; +import { fluentListbox } from './listbox/index'; +import { fluentOption } from './listbox-option/index'; +import { fluentMenu } from './menu/index'; +import { fluentMenuItem } from './menu-item/index'; +import { fluentNumberField } from './number-field/index'; +import { fluentProgress, fluentProgressRing } from './progress/index'; +import { fluentRadio } from './radio/index'; +import { fluentRadioGroup } from './radio-group/index'; +import { fluentSelect } from './select/index'; +import { fluentSkeleton } from './skeleton/index'; +import { fluentSlider } from './slider/index'; +import { fluentSliderLabel } from './slider-label/index'; +import { fluentSwitch } from './switch/index'; +import { fluentTab, fluentTabPanel, fluentTabs } from './tabs/index'; +import { fluentTextArea } from './text-area/index'; +import { fluentTextField } from './text-field/index'; +import { fluentTooltip } from './tooltip/index'; +import { fluentTreeView } from './tree-view/index'; +import { fluentTreeItem } from './tree-item/index'; + +export { + fluentAccordion, + fluentAccordionItem, + fluentAnchor, + fluentAnchoredRegion, + fluentBadge, + fluentBreadcrumb, + fluentBreadcrumbItem, + fluentButton, + fluentCard, + fluentCheckbox, + fluentCombobox, + fluentDataGrid, + fluentDataGridCell, + fluentDataGridRow, + fluentDesignSystemProvider, + fluentDialog, + fluentDivider, + fluentFlipper, + fluentHorizontalScroll, + fluentListbox, + fluentOption, + fluentMenu, + fluentMenuItem, + fluentNumberField, + fluentProgress, + fluentProgressRing, + fluentRadio, + fluentRadioGroup, + fluentSelect, + fluentSkeleton, + fluentSlider, + fluentSliderLabel, + fluentSwitch, + fluentTabs, + fluentTab, + fluentTabPanel, + fluentTextArea, + fluentTextField, + fluentTooltip, + fluentTreeView, + fluentTreeItem, +}; + +/** + * All Fluent UI Web Components + * @public + */ +export const allComponents = { + fluentAccordion, + fluentAccordionItem, + fluentAnchor, + fluentAnchoredRegion, + fluentBadge, + fluentBreadcrumb, + fluentBreadcrumbItem, + fluentButton, + fluentCard, + fluentCheckbox, + fluentCombobox, + fluentDataGrid, + fluentDataGridCell, + fluentDataGridRow, + fluentDesignSystemProvider, + fluentDialog, + fluentDivider, + fluentFlipper, + fluentHorizontalScroll, + fluentListbox, + fluentOption, + fluentMenu, + fluentMenuItem, + fluentNumberField, + fluentProgress, + fluentProgressRing, + fluentRadio, + fluentRadioGroup, + fluentSelect, + fluentSkeleton, + fluentSlider, + fluentSliderLabel, + fluentSwitch, + fluentTabs, + fluentTab, + fluentTabPanel, + fluentTextArea, + fluentTextField, + fluentTooltip, + fluentTreeView, + fluentTreeItem, +}; diff --git a/packages/web-components/src/index-rollup.ts b/packages/web-components/src/index-rollup.ts index 022cf16b8c125..dfd0eefe2c3ee 100644 --- a/packages/web-components/src/index-rollup.ts +++ b/packages/web-components/src/index-rollup.ts @@ -1,7 +1,7 @@ // TODO: Is exporting Foundation still necessary with the updated API's? // export * from "@microsoft/fast-element"; import { DesignSystem } from '@microsoft/fast-foundation'; -import * as fluentComponents from './custom-elements'; +import { allComponents } from './custom-elements'; export * from './index'; @@ -10,4 +10,4 @@ export * from './index'; */ export const fluentDesignSystem = DesignSystem.getOrCreate() .withPrefix('fluent') - .register(...Object.values(fluentComponents).map(definition => definition())); + .register(...Object.values(allComponents).map(definition => definition()));