Skip to content

Commit

Permalink
fix: stories tabs to toggle button (#32938)
Browse files Browse the repository at this point in the history
  • Loading branch information
eljefe223 authored Sep 28, 2024
1 parent f3887ef commit 257fefa
Show file tree
Hide file tree
Showing 35 changed files with 1,042 additions and 888 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { AccordionItem as FluentAccordionItem } from './accordion-item.js';
import { AccordionItemMarkerPosition, AccordionItemSize } from './accordion-item.options.js';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { AnchorButton as FluentAnchorButton } from './anchor-button.js';
import { AnchorButtonAppearance, AnchorButtonShape, AnchorButtonSize, AnchorTarget } from './anchor-button.options.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/avatar/avatar.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { Avatar as FluentAvatar } from './avatar.js';
import { AvatarActive, AvatarAppearance, AvatarColor, AvatarShape, AvatarSize } from './avatar.options.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/badge/badge.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html, when } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { Badge as FluentBadge } from './badge.js';
import { BadgeAppearance, BadgeColor, BadgeShape, BadgeSize } from './badge.options.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/button/button.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { Button as FluentButton } from './button.js';
import { ButtonAppearance, ButtonShape, ButtonSize, ButtonType } from './button.options.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/checkbox/checkbox.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { html, repeat } from '@microsoft/fast-element';
import { uniqueId } from '@microsoft/fast-web-utilities';
import { LabelPosition, ValidationFlags } from '../field/field.options.js';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { Checkbox as FluentCheckbox } from './checkbox.js';
import { CheckboxShape, CheckboxSize } from './checkbox.options.js';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { CompoundButton as FluentCompoundButton } from './compound-button.js';
import { CompoundButtonAppearance, CompoundButtonShape, CompoundButtonSize } from './compound-button.options.js';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { CounterBadge as FluentCounterBadge } from './counter-badge.js';
import {
CounterBadgeAppearance,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { DialogBody as FluentDialogBody } from './dialog-body.js';

type Story = StoryObj<FluentDialogBody>;
Expand Down
8 changes: 1 addition & 7 deletions packages/web-components/src/dialog/dialog.stories.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import { css, html, ref } from '@microsoft/fast-element';
import type { DialogBody as FluentDialogBody } from '../dialog-body/dialog-body.js';
import {
generateImage,
type NewMeta as Meta,
renderComponent,
type StoryArgs,
type StoryObj,
} from '../helpers.stories.js';
import { generateImage, Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { definition } from './dialog.definition.js';
import type { Dialog as FluentDialog } from './dialog.js';
import { DialogType } from './dialog.options.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/divider/divider.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { Divider as FluentDivider } from './divider.js';
import { DividerAlignContent, DividerAppearance, DividerOrientation, DividerRole } from './divider.options.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/drawer/drawer.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { Drawer as FluentDrawer } from './drawer.js';
import { DrawerPosition, DrawerSize, DrawerType } from './drawer.options.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/field/field.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { html, repeat } from '@microsoft/fast-element';
import { uniqueId } from '@microsoft/fast-web-utilities';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { colorStatusDangerForeground1, colorStatusSuccessBackground3 } from '../theme/design-tokens.js';
import type { TextInput as FluentTextInput } from '../text-input/text-input.js';
import type { Field as FluentField } from './field.js';
Expand Down
7 changes: 1 addition & 6 deletions packages/web-components/src/helpers.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ export declare interface FASTComponentsRenderer extends Renderer {
storyResult: string | Node | DocumentFragment | ElementViewTemplate;
}

/**
* Metadata to configure the stories for a component.
*/
export declare type NewMeta<TArgs = Args> = ComponentAnnotations<FASTComponentsRenderer, StoryArgs<TArgs>>;

/**
* A helper that returns a function to bind a Storybook story to a ViewTemplate.
*/
Expand All @@ -40,7 +35,7 @@ export type FASTFramework = Renderer & {
/**
* Metadata to configure the stories for a component.
*/
export type Meta<TArgs = Args> = ComponentAnnotations<FASTFramework, Omit<TArgs, keyof FASTElement>>;
export declare type Meta<TArgs = Args> = ComponentAnnotations<FASTComponentsRenderer, StoryArgs<TArgs>>;

/**
* Story object that represents a CSFv3 component example.
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/image/image.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { Image as FluentImage } from './image.js';
import { ImageFit, ImageShape } from './image.options.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/label/label.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { Label as FluentLabel } from './label.js';
import { LabelSize, LabelWeight } from './label.options.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/link/link.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { AnchorTarget } from '../anchor-button/anchor-button.options.js';
import type { Link as FluentLink } from './link.js';
import { LinkAppearance } from './link.options.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { MenuButton as FluentMenuButton } from './menu-button.js';
import { MenuButtonAppearance, MenuButtonShape, MenuButtonSize } from './menu-button.options.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/menu-list/menu-list.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html, repeat } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type MenuItem as FluentMenuItem, MenuItemRole } from '../menu-item/menu-item.js';
import type { MenuList as FluentMenuList } from './menu-list.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/menu/menu.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { Menu as FluentMenu } from './menu.js';

type Story = StoryObj<FluentMenu>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html, repeat } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { MessageBar as FluentMessageBar } from './message-bar.js';
import { MessageBarIntent, MessageBarLayout, MessageBarShape } from './message-bar.options.js';
import './define';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { ProgressBar as FluentProgressBar } from './progress-bar.js';
import { ProgressBarShape, ProgressBarThickness, ProgressBarValidationState } from './progress-bar.options.js';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { html, ref, repeat } from '@microsoft/fast-element';
import type { Field as FluentField } from '../field/field.js';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { ValidationFlags } from '../field/field.options.js';
import type { RadioGroup as FluentRadioGroup } from './radio-group.js';
import { RadioGroupOrientation } from './radio-group.options.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/radio/radio.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { Radio as FluentRadio } from './radio.js';

type Story = StoryObj<FluentRadio>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { RatingDisplay as FluentRatingDisplay } from './rating-display.js';
import { RatingDisplayColor, RatingDisplaySize } from './rating-display.options.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/slider/slider.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { SliderOrientation as SliderSetOrientation, SliderSize as SliderSetSize } from './slider.options.js';
import type { Slider as FluentSlider } from './slider.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/spinner/spinner.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html, repeat } from '@microsoft/fast-element';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { SpinnerAppearance, SpinnerSize } from './spinner.options.js';
import { Spinner as FluentSpinner } from './spinner.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/switch/switch.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { html, repeat } from '@microsoft/fast-element';
import { LabelPosition, ValidationFlags } from '../field/field.options.js';
import { type NewMeta as Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import type { Switch as FluentSwitch } from './switch.js';

type Story = StoryObj<FluentSwitch>;
Expand Down
Loading

0 comments on commit 257fefa

Please sign in to comment.