Skip to content

Commit 00b9226

Browse files
committed
fix: update storybook to use custom element definitions and fix rollup (#4629)
* update storybook to use custom element defintions * Change files Co-authored-by: nicholasrice <[email protected]>
1 parent dbaeec1 commit 00b9226

File tree

5 files changed

+68
-1
lines changed

5 files changed

+68
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "patch",
3+
"packageName": "@microsoft/fast-components",
4+
"email": "[email protected]",
5+
"dependentChangeType": "patch"
6+
}

packages/web-components/fast-components/.storybook/preview.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import "../src/design-system-provider";
2+
import * as FAST from "../src/index-rollup";
3+
4+
FAST;
25

36
const withThemeProvider = Story => `
47
<fast-design-system-provider id="root-provider" use-defaults>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/**
2+
* Export all custom element definitions
3+
*/
4+
export { fastAccordion, fastAccordionItem } from "./accordion/index";
5+
export { fastAnchor } from "./anchor/index";
6+
export { fastAnchoredRegion } from "./anchored-region/index";
7+
export { fastBadge } from "./badge/index";
8+
export { fastBreadcrumb } from "./breadcrumb/index";
9+
export { fastBreadcrumbItem } from "./breadcrumb-item/index";
10+
export { fastButton } from "./button/index";
11+
// export * from "./card/index";
12+
export { fastCheckbox } from "./checkbox/index";
13+
export { fastCombobox } from "./combobox/index";
14+
// export * from "./data-grid/index";
15+
// export * from "./design-system-provider/index";
16+
export { fastDialog } from "./dialog/index";
17+
export { fastDisclosure } from "./disclosure/index";
18+
export { fastDivider } from "./divider/index";
19+
export { fastFlipper } from "./flipper/index";
20+
export { fastHorizontalScroll } from "./horizontal-scroll/index";
21+
export { fastListbox } from "./listbox/index";
22+
export { fastOption } from "./listbox-option/index";
23+
export { fastMenu } from "./menu/index";
24+
export { fastMenuItem } from "./menu-item/index";
25+
export { fastNumberField } from "./number-field/index";
26+
export { fastProgress } from "./progress/index";
27+
export { fastProgressRing } from "./progress-ring/index";
28+
export { fastRadio } from "./radio/index";
29+
export { fastRadioGroup } from "./radio-group/index";
30+
export { fastSelect } from "./select/index";
31+
export { fastSkeleton } from "./skeleton/index";
32+
export { fastSlider } from "./slider/index";
33+
export { fastSliderLabel } from "./slider-label/index";
34+
export { fastSwitch } from "./switch/index";
35+
export { fastTabs, fastTab, fastTabPanel } from "./tabs/index";
36+
export { fastTextArea } from "./text-area/index";
37+
export { fastTextField } from "./text-field/index";
38+
export { fastTooltip } from "./tooltip/index";
39+
export { fastTreeView } from "./tree-view/index";
40+
export { fastTreeItem } from "./tree-item/index";
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
// TODO: Is exporting Foundation still necessary with the updated API's?
22
// export * from "@microsoft/fast-element";
3-
// export * from "@microsoft/fast-foundation";
3+
import { DesignSystem } from "@microsoft/fast-foundation";
4+
import * as fastComponents from "./custom-elements";
5+
46
export * from "./index";
7+
8+
/**
9+
* TODO rename this to FASTDesignSystem when {@link @FASTDesignSystem} interface is removed.
10+
*/
11+
export const fastDesignSystem = new DesignSystem();
12+
13+
Object.values(fastComponents).forEach(definition => {
14+
fastDesignSystem.register(definition());
15+
});
16+
17+
fastDesignSystem.applyTo(document.body);

packages/web-components/fast-components/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Export all custom element definitions.
3+
*/
4+
export * from "./custom-elements";
5+
16
export * from "./accordion/index";
27
export * from "./anchor/index";
38
export * from "./anchored-region/index";

0 commit comments

Comments
 (0)