Skip to content

Commit

Permalink
feat: update exports from fast foundation to be explicit and provide …
Browse files Browse the repository at this point in the history
…package exports (#6808)

* add explicit exports to component index files

* fix explicit exports for certain files

* add export paths for each component and utilities

* update change file

* update design token path to point to exports file
  • Loading branch information
chrisdholt authored Aug 17, 2023
1 parent 8a23a94 commit 98a726c
Show file tree
Hide file tree
Showing 50 changed files with 424 additions and 135 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "add export paths with extensions for each fast-foundation component and utilities",
"packageName": "@microsoft/fast-foundation",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
186 changes: 185 additions & 1 deletion packages/web-components/fast-foundation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,192 @@
"types": "./dist/dts/index.d.ts",
"default": "./dist/esm/index.js"
},
"./accordion.js": {
"types": "./dist/dts/accordion/index.d.ts",
"default": "./dist/esm/accordion/index.js"
},
"./accordion-item.js": {
"types": "./dist/dts/accordion-item/index.d.ts",
"default": "./dist/esm/accordion-item/index.js"
},
"./anchor.js": {
"types": "./dist/dts/anchor/index.d.ts",
"default": "./dist/esm/anchor/index.js"
},
"./anchored-region.js": {
"types": "./dist/dts/anchored-region/index.d.ts",
"default": "./dist/esm/anchored-region/index.js"
},
"./avatar.js": {
"types": "./dist/dts/avatar/index.d.ts",
"default": "./dist/esm/avatar/index.js"
},
"./badge.js": {
"types": "./dist/dts/badge/index.d.ts",
"default": "./dist/esm/badge/index.js"
},
"./breadcrumb.js": {
"types": "./dist/dts/breadcrumb/index.d.ts",
"default": "./dist/esm/breadcrumb/index.js"
},
"./breadcrumb-item.js": {
"types": "./dist/dts/breadcrumb-item/index.d.ts",
"default": "./dist/esm/breadcrumb-item/index.js"
},
"./button.js": {
"types": "./dist/dts/button/index.d.ts",
"default": "./dist/esm/button/index.js"
},
"./calendar.js": {
"types": "./dist/dts/calendar/index.d.ts",
"default": "./dist/esm/calendar/index.js"
},
"./card.js": {
"types": "./dist/dts/card/index.d.ts",
"default": "./dist/esm/card/index.js"
},
"./checkbox.js": {
"types": "./dist/dts/checkbox/index.d.ts",
"default": "./dist/esm/checkbox/index.js"
},
"./combobox.js": {
"types": "./dist/dts/combobox/index.d.ts",
"default": "./dist/esm/combobox/index.js"
},
"./data-grid.js": {
"types": "./dist/dts/data-grid/index.d.ts",
"default": "./dist/esm/data-grid/index.js"
},
"./design-token.js": {
"types": "./dist/dts/design-token/exports.d.ts",
"default": "./dist/esm/design-token/exports.js"
},
"./dialog.js": {
"types": "./dist/dts/dialog/index.d.ts",
"default": "./dist/esm/dialog/index.js"
},
"./disclosure.js": {
"types": "./dist/dts/disclosure/index.d.ts",
"default": "./dist/esm/disclosure/index.js"
},
"./divider.js": {
"types": "./dist/dts/divider/index.d.ts",
"default": "./dist/esm/divider/index.js"
},
"./flipper.js": {
"types": "./dist/dts/flipper/index.d.ts",
"default": "./dist/esm/flipper/index.js"
},
"./horizontal-scroll.js": {
"types": "./dist/dts/horizontal-scroll/index.d.ts",
"default": "./dist/esm/horizontal-scroll/index.js"
},
"./listbox.js": {
"types": "./dist/dts/listbox/index.d.ts",
"default": "./dist/esm/listbox/index.js"
},
"./listbox-option.js": {
"types": "./dist/dts/listbox-option/index.d.ts",
"default": "./dist/esm/listbox-option/index.js"
},
"./menu.js": {
"types": "./dist/dts/menu/index.d.ts",
"default": "./dist/esm/menu/index.js"
},
"./menu-item.js": {
"types": "./dist/dts/menu-item/index.d.ts",
"default": "./dist/esm/menu-item/index.js"
},
"./number-field.js": {
"types": "./dist/dts/number-field/index.d.ts",
"default": "./dist/esm/number-field/index.js"
},
"./picker.js": {
"types": "./dist/dts/picker/index.d.ts",
"default": "./dist/esm/picker/index.js"
},
"./progress.js": {
"types": "./dist/dts/progress/index.d.ts",
"default": "./dist/esm/progress/index.js"
},
"./progress-ring.js": {
"types": "./dist/dts/progress-ring/index.d.ts",
"default": "./dist/esm/progress-ring/index.js"
},
"./radio.js": {
"types": "./dist/dts/radio/index.d.ts",
"default": "./dist/esm/radio/index.js"
},
"./radio-group.js": {
"types": "./dist/dts/radio-group/index.d.ts",
"default": "./dist/esm/radio-group/index.js"
},
"./search.js": {
"types": "./dist/dts/search/index.d.ts",
"default": "./dist/esm/search/index.js"
},
"./select.js": {
"types": "./dist/dts/select/index.d.ts",
"default": "./dist/esm/select/index.js"
},
"./skeleton.js": {
"types": "./dist/dts/skeleton/index.d.ts",
"default": "./dist/esm/skeleton/index.js"
},
"./slider.js": {
"types": "./dist/dts/slider/index.d.ts",
"default": "./dist/esm/slider/index.js"
},
"./slider-label.js": {
"types": "./dist/dts/slider-label/index.d.ts",
"default": "./dist/esm/slider-label/index.js"
},
"./switch.js": {
"types": "./dist/dts/switch/index.d.ts",
"default": "./dist/esm/switch/index.js"
},
"./tab.js": {
"types": "./dist/dts/tab/index.d.ts",
"default": "./dist/esm/tab/index.js"
},
"./tab-panel.js": {
"types": "./dist/dts/tab-panel/index.d.ts",
"default": "./dist/esm/tab-panel/index.js"
},
"./tabs.js": {
"types": "./dist/dts/tabs/index.d.ts",
"default": "./dist/esm/tabs/index.js"
},
"./text-area.js": {
"types": "./dist/dts/text-area/index.d.ts",
"default": "./dist/esm/text-area/index.js"
},
"./text-field.js": {
"types": "./dist/dts/text-field/index.d.ts",
"default": "./dist/esm/text-field/index.js"
},
"./toolbar.js": {
"types": "./dist/dts/toolbar/index.d.ts",
"default": "./dist/esm/toolbar/index.js"
},
"./tooltip.js": {
"types": "./dist/dts/tooltip/index.d.ts",
"default": "./dist/esm/tooltip/index.js"
},
"./tree-item.js": {
"types": "./dist/dts/tree-item/index.d.ts",
"default": "./dist/esm/tree-item/index.js"
},
"./tree-view.js": {
"types": "./dist/dts/tree-view/index.d.ts",
"default": "./dist/esm/tree-view/index.js"
},
"./utilities.js": {
"types": "./dist/dts/utilities/index.d.ts",
"default": "./dist/esm/utilities/index.js"
},
"./custom-elements.json": "./dist/custom-elements.json",
"./design-token-core": {
"./design-token-core.js": {
"types": "./dist/dts/design-token/core/exports.d.ts",
"default": "./dist/esm/design-token/core/exports.js"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./accordion-item.template.js";
export * from "./accordion-item.js";
export { accordionItemTemplate } from "./accordion-item.template.js";
export { AccordionItemOptions, FASTAccordionItem } from "./accordion-item.js";
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./accordion.js";
export * from "./accordion.options.js";
export * from "./accordion.template.js";
export { FASTAccordion } from "./accordion.js";
export { AccordionExpandMode } from "./accordion.options.js";
export { accordionTemplate } from "./accordion.template.js";
6 changes: 3 additions & 3 deletions packages/web-components/fast-foundation/src/anchor/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./anchor.js";
export * from "./anchor.options.js";
export * from "./anchor.template.js";
export { AnchorOptions, DelegatesARIALink, FASTAnchor } from "./anchor.js";
export { AnchorTarget } from "./anchor.options.js";
export { anchorTemplate } from "./anchor.template.js";
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
export * from "./anchored-region-config.js";
export * from "./anchored-region.js";
export * from "./anchored-region.options.js";
export * from "./anchored-region.template.js";
export {
AnchoredRegionConfig,
FlyoutPosBottom,
FlyoutPosBottomFill,
FlyoutPosTallest,
FlyoutPosTallestFill,
FlyoutPosTop,
FlyoutPosTopFill,
} from "./anchored-region-config.js";
export { FASTAnchoredRegion } from "./anchored-region.js";
export {
AnchoredRegionPositionLabel,
AutoUpdateMode,
AxisPositioningMode,
AxisScalingMode,
Dimension,
HorizontalPosition,
VerticalPosition,
} from "./anchored-region.options.js";
export { anchoredRegionTemplate } from "./anchored-region.template.js";
4 changes: 2 additions & 2 deletions packages/web-components/fast-foundation/src/avatar/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./avatar.template.js";
export * from "./avatar.js";
export { avatarTemplate } from "./avatar.template.js";
export { AvatarOptions, FASTAvatar } from "./avatar.js";
4 changes: 2 additions & 2 deletions packages/web-components/fast-foundation/src/badge/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./badge.template.js";
export * from "./badge.js";
export { badgeTemplate } from "./badge.template.js";
export { FASTBadge } from "./badge.js";
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./breadcrumb-item.template.js";
export * from "./breadcrumb-item.js";
export { breadcrumbItemTemplate } from "./breadcrumb-item.template.js";
export { BreadcrumbItemOptions, FASTBreadcrumbItem } from "./breadcrumb-item.js";
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./breadcrumb.template.js";
export * from "./breadcrumb.js";
export { breadcrumbTemplate } from "./breadcrumb.template.js";
export { FASTBreadcrumb } from "./breadcrumb.js";
6 changes: 3 additions & 3 deletions packages/web-components/fast-foundation/src/button/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./button.js";
export * from "./button.options.js";
export * from "./button.template.js";
export { ButtonOptions, DelegatesARIAButton, FASTButton } from "./button.js";
export { ButtonType } from "./button.options.js";
export { buttonTemplate } from "./button.template.js";
23 changes: 19 additions & 4 deletions packages/web-components/fast-foundation/src/calendar/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
export * from "./calendar.js";
export * from "./calendar.options.js";
export * from "./calendar.template.js";
export * from "./date-formatter.js";
export {
CalendarDateInfo,
CalendarInfo,
CalendarOptions,
FASTCalendar,
MonthInfo,
WeekdayText,
} from "./calendar.js";
export { DayFormat, WeekdayFormat, MonthFormat, YearFormat } from "./calendar.options.js";
export {
calendarCellTemplate,
calendarRowTemplate,
calendarTemplate,
calendarTitleTemplate,
calendarWeekdayTemplate,
interactiveCalendarGridTemplate,
noninteractiveCalendarTemplate,
} from "./calendar.template.js";
export { DateFormatter } from "./date-formatter.js";
4 changes: 2 additions & 2 deletions packages/web-components/fast-foundation/src/card/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./card.template.js";
export * from "./card.js";
export { cardTemplate } from "./card.template.js";
export { FASTCard } from "./card.js";
4 changes: 2 additions & 2 deletions packages/web-components/fast-foundation/src/checkbox/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./checkbox.template.js";
export * from "./checkbox.js";
export { checkboxTemplate } from "./checkbox.template.js";
export { CheckboxOptions, FASTCheckbox } from "./checkbox.js";
6 changes: 3 additions & 3 deletions packages/web-components/fast-foundation/src/combobox/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./combobox.js";
export * from "./combobox.options.js";
export * from "./combobox.template.js";
export { ComboboxOptions, DelegatesARIACombobox, FASTCombobox } from "./combobox.js";
export { ComboboxAutocomplete } from "./combobox.options.js";
export { comboboxTemplate } from "./combobox.template.js";
26 changes: 20 additions & 6 deletions packages/web-components/fast-foundation/src/data-grid/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
export * from "./data-grid.template.js";
export * from "./data-grid.js";
export * from "./data-grid-row.template.js";
export * from "./data-grid-row.js";
export * from "./data-grid-cell.template.js";
export * from "./data-grid-cell.js";
export { DataGridOptions, dataGridTemplate } from "./data-grid.template.js";
export {
ColumnDefinition,
DataGridRowTypes,
DataGridSelectionBehavior,
DataGridSelectionMode,
FASTDataGrid,
GenerateHeaderOptions,
} from "./data-grid.js";
export {
dataGridRowTemplate,
CellItemTemplateOptions,
} from "./data-grid-row.template.js";
export { FASTDataGridRow } from "./data-grid-row.js";
export { dataGridCellTemplate } from "./data-grid-cell.template.js";
export {
DataGridCellTypes,
defaultCellFocusTargetCallback,
FASTDataGridCell,
} from "./data-grid-cell.js";
4 changes: 2 additions & 2 deletions packages/web-components/fast-foundation/src/dialog/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./dialog.template.js";
export * from "./dialog.js";
export { dialogTemplate } from "./dialog.template.js";
export { FASTDialog } from "./dialog.js";
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./disclosure.template.js";
export * from "./disclosure.js";
export { disclosureTemplate } from "./disclosure.template.js";
export { DisclosureOptions, FASTDisclosure } from "./disclosure.js";
6 changes: 3 additions & 3 deletions packages/web-components/fast-foundation/src/divider/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./divider.options.js";
export * from "./divider.template.js";
export * from "./divider.js";
export { DividerOrientation, DividerRole } from "./divider.options.js";
export { dividerTemplate } from "./divider.template.js";
export { FASTDivider } from "./divider.js";
4 changes: 2 additions & 2 deletions packages/web-components/fast-foundation/src/flipper/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./flipper.template.js";
export * from "./flipper.js";
export { flipperTemplate } from "./flipper.template.js";
export { FASTFlipper, FlipperDirection, FlipperOptions } from "./flipper.js";
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
export * from "./form-associated.js";
export {
CheckableFormAssociated,
CheckableFormAssociatedElement,
ConstructableFormAssociated,
FormAssociated,
FormAssociatedElement,
FormAssociatedProxy,
ProxyElement,
supportsElementInternals,
} from "./form-associated.js";
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export * from "./horizontal-scroll.js";
export * from "./horizontal-scroll.options.js";
export * from "./horizontal-scroll.template.js";
export { FASTHorizontalScroll } from "./horizontal-scroll.js";
export {
HorizontalScrollOptions,
HorizontalScrollView,
ScrollEasing,
} from "./horizontal-scroll.options.js";
export { horizontalScrollTemplate } from "./horizontal-scroll.template.js";
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
export * from "./listbox-option.js";
export * from "./listbox-option.template.js";
export {
DelegatesARIAListboxOption,
ListboxOptionOptions,
isListboxOption,
FASTListboxOption,
} from "./listbox-option.js";
export { listboxOptionTemplate } from "./listbox-option.template.js";
Loading

0 comments on commit 98a726c

Please sign in to comment.