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

feat: add slot event part docs to foundation #5912

Merged
merged 12 commits into from
May 2, 2022
Next Next commit
add docs for accordion through breadcrumb-item
  • Loading branch information
chrisdholt committed May 2, 2022
commit 460897f4a38ada5ff305350e149091f14c16d8d7
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ export type AccordionItemOptions = FoundationElementDefinition &

/**
* An individual item in an {@link @microsoft/fast-foundation#(Accordion:class) }.
*
* @slot start - Content which can be provided between the heading and the icon
* @slot end - Content which can be provided between the start slot and icon
* @slot heading - Content which serves as the accordion item heading and text of the expand button
* @slot - The default slot for accordion item content
* @slot - expanded-icon - The expanded icon
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The analyzer uses the hyphen as the separator between the name and the description. These hyphens between @slot and the name should be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I did almost all of these manually, I'll do one last check for any time it's not the default slot.

* @slot - collapsed-icon - The collapsed icon
* @fires change - Fires a custom 'change' event when the button is invoked
* @csspart heading - Wraps the button
* @csspart button - The button which serves to invoke the item
* @csspart heading-content - Wraps the slot for the heading content within the button
* @csspart icon - The icon container
* @csspart expanded-icon - The expanded icon slot
* @csspart collapsed-icon - The collapsed icon
* @csspart region - The wrapper for the accordion item content
*
* @public
*/
export class AccordionItem extends FoundationElement {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export enum AccordionExpandMode {
/**
* An Accordion Custom HTML Element
* Implements {@link https://www.w3.org/TR/wai-aria-practices-1.1/#accordion | ARIA Accordion}.
*
* @fires change - Fires a custom 'change' event when the active item changes
* @csspart item - The slot for the accordion items
* @public
*
* @remarks
Expand Down
6 changes: 6 additions & 0 deletions packages/web-components/fast-foundation/src/anchor/anchor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export type AnchorOptions = FoundationElementDefinition & StartEndOptions;
* An Anchor Custom HTML Element.
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.
*
* @slot start - Content which can be provided before the button content
* @slot end - Content which can be provided after the button content
* @slot - The default slot for accordion item content
* @csspart control - The anchor element
* @csspart content - The button content
*
* @public
*/
export class Anchor extends FoundationElement {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ interface Dimension {
/**
* An anchored region Custom HTML Element.
*
* @slot - The default slot for the content
* @fires loaded - Fires a custom 'loaded' event when the region is loaded and visible
* @fires positionchange - Fires a custom 'positionchange' event when the position has changed
*
* @public
*/
export class AnchoredRegion extends FoundationElement {
Expand Down
8 changes: 8 additions & 0 deletions packages/web-components/fast-foundation/src/avatar/avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ export type AvatarOptions = FoundationElementDefinition & {
/**
* An Avatar Custom HTML Element
*
* @slot media - Used for media such as an image
* @slot - The default slot for avatar text, commonly a name or initials
* @slot badge - Used to provide a badge, such as a status badge
* @csspart backplate - The wrapping container for the avatar
* @csspart link - The avatar link
* @csspart media - The media slot
* @csspart content - The default slot
*
* @public
*/
export class Avatar extends FoundationElement {
Expand Down
2 changes: 2 additions & 0 deletions packages/web-components/fast-foundation/src/badge/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { FoundationElement } from "../foundation-element/foundation-element.js";

/**
* A Badge Custom HTML Element.
* @slot - The default slot for the badge
* @csspart control - The element representing the badge, which wraps the default slot
*
* @public
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { applyMixins } from "../utilities/apply-mixins.js";

/**
* Breadcrumb Item configuration options
*
* @slot - The default slot for when no href is provided or for providing your own custom elements
* @slot separator - The slot for providing a custom separator
* @csspart listitem - The wrapping container for the item, represents a semantic listitem
* @csspart separator - The wrapping element for the separator
*
* @public
*/
export type BreadcrumbItemOptions = FoundationElementDefinition &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { FoundationElement } from "../foundation-element/foundation-element.js";

/**
* A Breadcrumb Custom HTML Element.
* @slot - The default slot for the breadcrumb items
* @csspart list - The element wrapping the slotted items
*
* @public
*/
Expand Down