Skip to content

Commit

Permalink
chore: add API docs for fast-components (#3321)
Browse files Browse the repository at this point in the history
* Document component implementations

* document recipes

* update the rest of the elements

* update site

* wire docs to ci

* pretty pretty
  • Loading branch information
nicholasrice authored Jun 16, 2020
1 parent a913a6b commit 3fb5043
Show file tree
Hide file tree
Showing 38 changed files with 4,898 additions and 3,365 deletions.
174 changes: 145 additions & 29 deletions packages/web-components/fast-components/docs/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,37 +192,153 @@ export const accentForegroundRestBehavior: import("@microsoft/fast-foundation").
// @public
export function createColorPalette(baseColor: any): string[];

// @public (undocumented)
// @public
export class FASTAccordion extends Accordion {
}

// @public (undocumented)
// @public
export class FASTAccordionItem extends AccordionItem {
}

// @public (undocumented)
// @public
export class FASTAnchor extends Anchor {
}

// @public (undocumented)
// @public
export class FASTBadge extends Badge {
}

// @public (undocumented)
// @public
export class FASTButton extends Button {
}

// @public (undocumented)
// @public
export class FASTCard extends Card {
}

// @public (undocumented)
// @public
export class FASTCheckbox extends Checkbox {
}

// Warning: (ae-forgotten-export) The symbol "FASTDesignSystem" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
// @public
export interface FASTDesignSystem {
accentBaseColor: string;
// (undocumented)
accentFillActiveDelta: number;
// (undocumented)
accentFillFocusDelta: number;
// (undocumented)
accentFillHoverDelta: number;
accentFillRestDelta: number;
// (undocumented)
accentFillSelectedDelta: number;
// (undocumented)
accentForegroundActiveDelta: number;
// (undocumented)
accentForegroundFocusDelta: number;
// (undocumented)
accentForegroundHoverDelta: number;
accentForegroundRestDelta: number;
accentPalette: string[];
backgroundColor: string;
baseHeightMultiplier: number;
baseHorizontalSpacingMultiplier: number;
baseLayerLuminance: number;
cornerRadius: number;
density: number;
designUnit: number;
disabledOpacity: number;
focusOutlineWidth: number;
neutralDividerRestDelta: number;
// (undocumented)
neutralFillActiveDelta: number;
neutralFillCardDelta: number;
// (undocumented)
neutralFillFocusDelta: number;
// (undocumented)
neutralFillHoverDelta: number;
// (undocumented)
neutralFillInputActiveDelta: number;
// (undocumented)
neutralFillInputFocusDelta: number;
// (undocumented)
neutralFillInputHoverDelta: number;
neutralFillInputRestDelta: number;
// (undocumented)
neutralFillInputSelectedDelta: number;
// (undocumented)
neutralFillRestDelta: number;
// (undocumented)
neutralFillSelectedDelta: number;
// (undocumented)
neutralFillStealthActiveDelta: number;
// (undocumented)
neutralFillStealthFocusDelta: number;
// (undocumented)
neutralFillStealthHoverDelta: number;
neutralFillStealthRestDelta: number;
// (undocumented)
neutralFillStealthSelectedDelta: number;
// (undocumented)
neutralFillToggleActiveDelta: number;
// (undocumented)
neutralFillToggleFocusDelta: number;
neutralFillToggleHoverDelta: number;
// (undocumented)
neutralForegroundActiveDelta: number;
// (undocumented)
neutralForegroundFocusDelta: number;
neutralForegroundHoverDelta: number;
// (undocumented)
neutralOutlineActiveDelta: number;
// (undocumented)
neutralOutlineFocusDelta: number;
// (undocumented)
neutralOutlineHoverDelta: number;
neutralOutlineRestDelta: number;
neutralPalette: string[];
outlineWidth: number;
// (undocumented)
typeRampBaseFontSize: string;
// (undocumented)
typeRampBaseLineHeight: string;
// (undocumented)
typeRampMinus1FontSize: string;
// (undocumented)
typeRampMinus1LineHeight: string;
typeRampMinus2FontSize: string;
// (undocumented)
typeRampMinus2LineHeight: string;
// (undocumented)
typeRampPlus1FontSize: string;
// (undocumented)
typeRampPlus1LineHeight: string;
// (undocumented)
typeRampPlus2FontSize: string;
// (undocumented)
typeRampPlus2LineHeight: string;
// (undocumented)
typeRampPlus3FontSize: string;
// (undocumented)
typeRampPlus3LineHeight: string;
// (undocumented)
typeRampPlus4FontSize: string;
// (undocumented)
typeRampPlus4LineHeight: string;
// (undocumented)
typeRampPlus5FontSize: string;
// (undocumented)
typeRampPlus5LineHeight: string;
// (undocumented)
typeRampPlus6FontSize: string;
// (undocumented)
typeRampPlus6LineHeight: string;
}

// @public
export const fastDesignSystemDefaults: FASTDesignSystem;

// @public
export class FASTDesignSystemProvider extends DesignSystemProvider implements FASTDesignSystem {
accentBaseColor: string;
// (undocumented)
Expand Down Expand Up @@ -357,71 +473,71 @@ export class FASTDesignSystemProvider extends DesignSystemProvider implements FA
typeRampPlus6LineHeight: string;
}

// @public (undocumented)
// @public
export class FASTDialog extends Dialog {
}

// @public (undocumented)
// @public
export class FASTDivider extends Divider {
}

// @public (undocumented)
// @public
export class FASTFlipper extends Flipper {
}

// @public (undocumented)
// @public
export class FASTMenu extends Menu {
}

// @public (undocumented)
// @public
export class FASTMenuItem extends MenuItem {
}

// @public (undocumented)
// @public
export class FASTProgress extends BaseProgress {
}

// @public (undocumented)
// @public
export class FASTProgressRing extends BaseProgress {
}

// @public (undocumented)
// @public
export class FASTRadio extends Radio {
}

// @public (undocumented)
// @public
export class FASTRadioGroup extends RadioGroup {
}

// @public (undocumented)
// @public
export class FASTSlider extends Slider {
}

// @public (undocumented)
// @public
export class FASTSliderLabel extends SliderLabel {
}

// @public (undocumented)
// @public
export class FASTSwitch extends Switch {
}

// @public (undocumented)
// @public
export class FASTTab extends Tab {
}

// @public (undocumented)
// @public
export class FASTTabPanel extends TabPanel {
}

// @public (undocumented)
// @public
export class FASTTabs extends Tabs {
}

// @public (undocumented)
// @public
export class FASTTextArea extends TextArea {
}

// @public (undocumented)
// @public
export class FASTTextField extends TextField {
}

Expand Down Expand Up @@ -451,14 +567,14 @@ export const neutralFillActive: SwatchRecipe;
export const neutralFillActiveBehavior: import("@microsoft/fast-foundation").CSSCustomPropertyBehavior;

// Warning: (ae-forgotten-export) The symbol "Swatch" needs to be exported by the entry point index.d.ts
// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "neutralFillCard" because one of its declarations is marked as @internal
// Warning: (ae-internal-missing-underscore) The name "neutralFillCard" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export function neutralFillCard(designSystem: FASTDesignSystem): Swatch;

// Warning: (ae-forgotten-export) The symbol "SwatchResolver" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
// @internal (undocumented)
export function neutralFillCard(backgroundResolver: SwatchResolver): SwatchResolver;

// @public
Expand Down
3 changes: 2 additions & 1 deletion packages/web-components/fast-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"scripts": {
"clean:dist": "node ../../../build/clean.js dist",
"doc": "api-extractor run --local",
"doc:ci": "api-extractor run",
"build": "npm run generate-default-palettes && tsc -p ./tsconfig.json && rollup -c && npm run doc",
"dev": "tsc -p ./tsconfig.json -w",
"tdd": "npm run dev & npm run test-chrome:watch",
Expand All @@ -32,7 +33,7 @@
"start": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"generate-default-palettes": "node -r esm build/generate-default-palettes.js",
"test": "npm run test-chrome:verbose",
"test": "yarn test-chrome:verbose && yarn doc:ci",
"test-node": "mocha --reporter min --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'",
"test-node:watch": "mocha --reporter min --exit dist/esm/__test__/setup-node.js --watch './dist/esm/**/*.spec.js'",
"test-node:verbose": "mocha --reporter spec --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ import {
} from "@microsoft/fast-foundation";
import { AccordionItemStyles as styles } from "./accordion-item.styles";

/**
* The FAST Accordion Item Element. Implements {@link @microsoft/fast-foundation#AccordionItem},
* {@link @microsoft/fast-foundation#AccordionItemTemplate}
*
*
* @public
* @remarks
* HTML Element: \<fast-accordion-item\>
*/
@customElement({
name: "fast-accordion-item",
template,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ import { AccordionStyles as styles } from "./accordion.styles";

export * from "./accordion-item/index";

/**
* The FAST Accordion Element. Implements {@link @microsoft/fast-foundation#Accordion},
* {@link @microsoft/fast-foundation#AccordionTemplate}
*
*
* @public
* @remarks
* HTML Element: \<fast-accordion\>
*/
@customElement({
name: "fast-accordion",
template,
Expand Down
10 changes: 9 additions & 1 deletion packages/web-components/fast-components/src/anchor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ import { customElement } from "@microsoft/fast-element";
import { Anchor, AnchorTemplate as template } from "@microsoft/fast-foundation";
import { AnchorStyles as styles } from "./anchor.styles";

// Anchor
/**
* The FAST Anchor Element. Implements {@link @microsoft/fast-foundation#Anchor},
* {@link @microsoft/fast-foundation#AnchorTemplate}
*
*
* @public
* @remarks
* HTML Element: \<fast-anchor\>
*/
@customElement({
name: "fast-anchor",
template,
Expand Down
9 changes: 9 additions & 0 deletions packages/web-components/fast-components/src/badge/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { customElement } from "@microsoft/fast-element";
import { Badge, BadgeTemplate as template } from "@microsoft/fast-foundation";
import { BadgeStyles as styles } from "./badge.styles";

/**
* The FAST Badge Element. Implements {@link @microsoft/fast-foundation#Badge},
* {@link @microsoft/fast-foundation#BadgeTemplate}
*
*
* @public
* @remarks
* HTML Element: \<fast-badge\>
*/
@customElement({
name: "fast-badge",
template,
Expand Down
10 changes: 9 additions & 1 deletion packages/web-components/fast-components/src/button/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ import { customElement } from "@microsoft/fast-element";
import { Button, ButtonTemplate as template } from "@microsoft/fast-foundation";
import { ButtonStyles as styles } from "./button.styles";

// Button
/**
* The FAST Button Element. Implements {@link @microsoft/fast-foundation#Button},
* {@link @microsoft/fast-foundation#ButtonTemplate}
*
*
* @public
* @remarks
* HTML Element: \<fast-button\>
*/
@customElement({
name: "fast-button",
template,
Expand Down
9 changes: 9 additions & 0 deletions packages/web-components/fast-components/src/card/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { customElement } from "@microsoft/fast-element";
import { Card, CardTemplate as template } from "@microsoft/fast-foundation";
import { CardStyles as styles } from "./card.styles";

/**
* The FAST Card Element. Implements {@link @microsoft/fast-foundation#Card},
* {@link @microsoft/fast-foundation#CardTemplate}
*
*
* @public
* @remarks
* HTML Element: \<fast-card\>
*/
@customElement({
name: "fast-card",
template,
Expand Down
Loading

0 comments on commit 3fb5043

Please sign in to comment.