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

normalize storybook fixtures #6316

Merged
merged 58 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
e01c460
add storybook types and renderComponent helper
radium-v Aug 24, 2022
9430f66
add ES2017.Object lib to tsconfig
radium-v Aug 25, 2022
c77d67b
update eslintrc
radium-v Aug 24, 2022
7ed374d
add hidden debug story
radium-v Aug 24, 2022
2489d57
move accordion types to options module
radium-v Aug 24, 2022
f6e3b33
move anchor types to options module
radium-v Aug 24, 2022
986e0c1
move anchored-region types to options module
radium-v Aug 24, 2022
03ee30b
move button types to options module
radium-v Aug 24, 2022
250bb9e
move horizontal-scroll types to options module
radium-v Aug 24, 2022
80aeb93
move picker types to options module
radium-v Aug 24, 2022
ee2e36a
move slider types to options module
radium-v Aug 24, 2022
8a3526e
normalize accordion stories
radium-v Aug 24, 2022
c62b4bc
normalize accordion-item stories
radium-v Aug 24, 2022
7f18105
normalize anchor stories
radium-v Aug 24, 2022
55c838b
normalize anchored-region stories
radium-v Aug 24, 2022
b83bc6d
normalize avatar stories
radium-v Aug 24, 2022
c843576
normalize badge stories
radium-v Aug 24, 2022
26c640f
normalize breadcrumb stories
radium-v Aug 24, 2022
8e41e2f
normalize breadcrumb-item stories
radium-v Aug 24, 2022
406eed2
normalize button stories
radium-v Aug 24, 2022
350e07a
normalize calendar stories
radium-v Aug 24, 2022
6a0dfd7
normalize card stories
radium-v Aug 24, 2022
7e47a1c
normalize checkbox stories
radium-v Aug 24, 2022
e33d6b9
normalize combobox stories
radium-v Aug 24, 2022
6d28b4c
normalize data-grid, data-grid-row, and data-grid-cell stories
radium-v Aug 24, 2022
70d3511
normalize dialog stories
radium-v Aug 24, 2022
eec2a75
normalize disclosure stories
radium-v Aug 24, 2022
a8d891f
normalize divider stories
radium-v Aug 24, 2022
fa8a758
normalize flipper stories
radium-v Aug 24, 2022
fd60ac9
normalize horizontal-scroll stories
radium-v Aug 24, 2022
11092d7
normalize listbox stories
radium-v Aug 24, 2022
29cf0e3
normalize listbox-option stories
radium-v Aug 24, 2022
0403d15
normalize menu stories
radium-v Aug 24, 2022
6a87904
normalize menu-item stories
radium-v Aug 24, 2022
ab2826d
normalize number-field stories
radium-v Aug 24, 2022
21c11a2
normalize picker stories
radium-v Aug 24, 2022
419300b
normalize progress stories
radium-v Aug 24, 2022
93538ab
normalize progress and progress-ring stories
radium-v Aug 24, 2022
8048777
normalize radio stories
radium-v Aug 24, 2022
6e76347
normalize radio-group stories
radium-v Aug 24, 2022
b67bfac
normalize search stories
radium-v Aug 24, 2022
88287d0
normalize select stories
radium-v Aug 24, 2022
d5199ae
normalize skeleton stories
radium-v Aug 24, 2022
68fd386
normalize slider stories
radium-v Aug 24, 2022
692c71d
normalize slider-label stories
radium-v Aug 24, 2022
a07547a
normalize switch stories
radium-v Aug 24, 2022
4e31b72
normalize tab stories
radium-v Aug 24, 2022
fa40533
normalize tab-panel stories
radium-v Aug 24, 2022
5b25a67
normalize tabs stories
radium-v Aug 24, 2022
e61f90b
normalize text-area stories
radium-v Aug 24, 2022
66fa192
normalize text-field stories
radium-v Aug 24, 2022
c9960c4
normalize toolbar stories
radium-v Aug 24, 2022
0ea1583
normalize tooltip stories
radium-v Aug 24, 2022
99c9a36
normalize tree-item stories
radium-v Aug 24, 2022
8d87342
normalize tree-view stories
radium-v Aug 24, 2022
de58e06
update api-report and READMEs
radium-v Aug 25, 2022
3b44e4c
Change files
radium-v Aug 25, 2022
aa20826
patch flipper
radium-v Aug 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "normalize storybook stories",
"packageName": "@microsoft/fast-foundation",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
22 changes: 15 additions & 7 deletions packages/web-components/fast-foundation/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,20 @@
},
"extendDefaults": true
}
],
"no-restricted-imports": [
"error",
{
"patterns": ["**/stories/**"]
}
]
}
},
"overrides": [
{
"files": ["**/*.ts"],
"excludedFiles": ["**/*.stories.ts"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": ["**/stories/**"]
}
]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This is a special story that allows us to load a blank preview page for
* playwright tests which need to generate elements and insert them directly,
* rather than start with a pre-determined element.
*/

import type { Meta } from "@storybook/html";

export default {
title: "Debug",
} as Meta;

export const Blank = () => "";
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const path = require("path");

module.exports = {
addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
stories: ["../src/**/stories/*.stories.ts"],
stories: ["../src/**/stories/*.stories.ts", "debug.stories.ts"],
framework: "@storybook/html",
features: {
babelModeV7: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<style>
/* hide the blank debug "story" from the sidebar */
[data-item-id*="debug"] {
display: none !important;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@
--type-ramp-plus-6-line-height: 72px;
}

html {
html,
.docs-story {
background-color: var(--fill-color);
color: var(--neutral-foreground-rest);
min-height: 100%;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@microsoft/fast-element/polyfills";
import "../src/anchor/stories/anchor.register.js";
import "../src/anchored-region/stories/anchored-region.register.js";
import "../src/avatar/stories/avatar.register.js";
Expand Down
131 changes: 115 additions & 16 deletions packages/web-components/fast-foundation/docs/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,34 @@ export interface AnchoredRegionConfig {
}

// @public
export type AnchoredRegionPositionLabel = "start" | "insetStart" | "insetEnd" | "end" | "center";
export const AnchoredRegionPositionLabel: {
readonly start: "start";
readonly insetStart: "insetStart";
readonly insetEnd: "insetEnd";
readonly end: "end";
readonly center: "center";
};

// @public
export type AnchoredRegionPositionLabel = typeof AnchoredRegionPositionLabel[keyof typeof AnchoredRegionPositionLabel];

// @public
export function anchoredRegionTemplate(): ElementViewTemplate<FASTAnchoredRegion>;

// @public
export type AnchorOptions = StartEndOptions;

// @public
export const AnchorTarget: {
readonly _self: "_self";
readonly _blank: "_blank";
readonly _parent: "_parent";
readonly _top: "_top";
};

// @public
export type AnchorTarget = typeof AnchorTarget[keyof typeof AnchorTarget];

// @public
export function anchorTemplate(options?: AnchorOptions): ElementViewTemplate<FASTAnchor>;

Expand Down Expand Up @@ -102,7 +122,7 @@ export const AutoUpdateMode: {
readonly auto: "auto";
};

// @public (undocumented)
// @public
export type AutoUpdateMode = typeof AutoUpdateMode[keyof typeof AutoUpdateMode];

// @public
Expand All @@ -114,10 +134,24 @@ export type AvatarOptions = {
export function avatarTemplate(options?: AvatarOptions): ElementViewTemplate<FASTAvatar>;

// @public
export type AxisPositioningMode = "uncontrolled" | "locktodefault" | "dynamic";
export const AxisPositioningMode: {
readonly uncontrolled: "uncontrolled";
readonly locktodefault: "locktodefault";
readonly dynamic: "dynamic";
};

// @public
export type AxisScalingMode = "anchor" | "fill" | "content";
export type AxisPositioningMode = typeof AxisPositioningMode[keyof typeof AxisPositioningMode];

// @public
export const AxisScalingMode: {
readonly anchor: "anchor";
readonly content: "content";
readonly fill: "fill";
};

// @public
export type AxisScalingMode = typeof AxisScalingMode[keyof typeof AxisScalingMode];

// @public
export function badgeTemplate(): ElementViewTemplate<FASTBadge>;
Expand All @@ -139,6 +173,16 @@ export type ButtonOptions = StartEndOptions;
// @public
export function buttonTemplate(options?: ButtonOptions): ElementViewTemplate<FASTButton>;

// @public
export const ButtonType: {
readonly submit: "submit";
readonly reset: "reset";
readonly button: "button";
};

// @public
export type ButtonType = typeof ButtonType[keyof typeof ButtonType];

// @public
export function calendarCellTemplate(options: CalendarOptions, todayString: string): ViewTemplate<CalendarDateInfo>;

Expand Down Expand Up @@ -534,6 +578,16 @@ export interface DesignTokenSubscriber<T extends DesignToken<any>> {
// @public
export function dialogTemplate(): ElementViewTemplate<FASTDialog>;

// Warning: (ae-internal-missing-underscore) The name "Dimension" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export interface Dimension {
// (undocumented)
height: number;
// (undocumented)
width: number;
}

// @public @deprecated
export const disabledCursor = "not-allowed";

Expand Down Expand Up @@ -606,7 +660,7 @@ export class FASTAnchor extends FASTElement {
ping: string;
referrerpolicy: string;
rel: string;
target: "_self" | "_blank" | "_parent" | "_top";
target: AnchorTarget;
type: string;
}

Expand Down Expand Up @@ -761,9 +815,9 @@ export class FASTButton extends FormAssociatedButton {
formtarget: "_self" | "_blank" | "_parent" | "_top";
// (undocumented)
protected formtargetChanged(): void;
type: "submit" | "reset" | "button";
type: ButtonType;
// (undocumented)
protected typeChanged(previous: "submit" | "reset" | "button" | void, next: "submit" | "reset" | "button"): void;
protected typeChanged(previous: ButtonType | undefined, next: ButtonType): void;
validate(): void;
}

Expand Down Expand Up @@ -1057,7 +1111,7 @@ export class FASTHorizontalScroll extends FASTElement {
// (undocumented)
disconnectedCallback(): void;
duration: string;
easing: ScrollEasing;
easing: ScrollEasing | string;
flippersHiddenFromAT: boolean;
keyupHandler(e: Event & KeyboardEvent): void;
nextFlipperContainer: HTMLDivElement;
Expand Down Expand Up @@ -1430,7 +1484,7 @@ export class FASTPicker extends FormAssociatedPicker {
menuOptionTemplate: ViewTemplate;
// (undocumented)
protected menuOptionTemplateChanged(): void;
menuPlacement: menuConfigs;
menuPlacement: MenuPlacement;
// (undocumented)
protected menuPlacementChanged(): void;
// @internal
Expand Down Expand Up @@ -2236,7 +2290,17 @@ export const getDirection: (rootNode: HTMLElement) => Direction;
export const hidden = ":host([hidden]){display:none}";

// @public
export type HorizontalPosition = "start" | "end" | "left" | "right" | "center" | "unset";
export const HorizontalPosition: {
readonly start: "start";
readonly end: "end";
readonly left: "left";
readonly right: "right";
readonly center: "center";
readonly unset: "unset";
};

// @public
export type HorizontalPosition = typeof HorizontalPosition[keyof typeof HorizontalPosition];

// @public
export type HorizontalScrollOptions = StartEndOptions & {
Expand All @@ -2248,7 +2312,13 @@ export type HorizontalScrollOptions = StartEndOptions & {
export function horizontalScrollTemplate(options?: HorizontalScrollOptions): ElementViewTemplate<FASTHorizontalScroll>;

// @public
export type HorizontalScrollView = "default" | "mobile";
export const HorizontalScrollView: {
readonly default: "default";
readonly mobile: "mobile";
};

// @public
export type HorizontalScrollView = typeof HorizontalScrollView[keyof typeof HorizontalScrollView];

// Warning: (ae-internal-missing-underscore) The name "interactiveCalendarGridTemplate" should be prefixed with an underscore because the declaration is marked as @internal
//
Expand Down Expand Up @@ -2296,9 +2366,6 @@ export class MatchMediaStyleSheetBehavior extends MatchMediaBehavior {
// @public
export type MediaQueryListListener = (this: MediaQueryList, ev?: MediaQueryListEvent) => void;

// @beta
export type menuConfigs = "bottom" | "bottom-fill" | "tallest" | "tallest-fill" | "top" | "top-fill";

// @public
export type MenuItemColumnCount = 0 | 1 | 2;

Expand All @@ -2323,6 +2390,19 @@ export type MenuItemRole = typeof MenuItemRole[keyof typeof MenuItemRole];
// @public
export function menuItemTemplate(options: MenuItemOptions): ElementViewTemplate<FASTMenuItem>;

// @beta
export const MenuPlacement: {
readonly bottom: "bottom";
readonly bottomFill: "bottom-fill";
readonly tallest: "tallest";
readonly tallestFill: "tallest-fill";
readonly top: "top";
readonly topFill: "top-fill";
};

// @beta
export type MenuPlacement = typeof MenuPlacement[keyof typeof MenuPlacement];

// @public
export function menuTemplate(): ElementViewTemplate<FASTMenu>;

Expand Down Expand Up @@ -2457,7 +2537,15 @@ export const roleForMenuItem: {
};

// @public
export type ScrollEasing = "linear" | "ease-in" | "ease-out" | "ease-in-out" | string;
export const ScrollEasing: {
readonly linear: "linear";
readonly easeIn: "ease-in";
readonly easeOut: "ease-out";
readonly easeInOut: "ease-in-out";
};

// @public
export type ScrollEasing = typeof ScrollEasing[keyof typeof ScrollEasing];

// @public
export type SearchOptions = StartEndOptions;
Expand Down Expand Up @@ -2639,11 +2727,14 @@ export const TooltipPosition: {
readonly right: "right";
readonly bottom: "bottom";
readonly left: "left";
readonly center: "center";
readonly start: "start";
readonly end: "end";
readonly topLeft: "top-left";
readonly topCenter: "top-center";
readonly topRight: "top-right";
readonly bottomLeft: "bottom-left";
readonly bottomCenter: "bottom-center";
readonly bottomRight: "bottom-right";
readonly topStart: "top-start";
readonly topEnd: "top-end";
Expand All @@ -2669,7 +2760,15 @@ export function treeItemTemplate(options?: TreeItemOptions): ElementViewTemplate
export function treeViewTemplate(): ElementViewTemplate<FASTTreeView>;

// @public
export type VerticalPosition = "top" | "bottom" | "center" | "unset";
export const VerticalPosition: {
readonly top: "top";
readonly bottom: "bottom";
readonly center: "center";
readonly unset: "unset";
};

// @public
export type VerticalPosition = typeof VerticalPosition[keyof typeof VerticalPosition];

// @public
export const WeekdayFormat: {
Expand Down
Loading