diff --git a/apps/vr-tests-react-components/src/stories/Tag/InteractionTag.stories.tsx b/apps/vr-tests-react-components/src/stories/Tag/InteractionTag.stories.tsx index ee7e412f044cf..56fec05e8223b 100644 --- a/apps/vr-tests-react-components/src/stories/Tag/InteractionTag.stories.tsx +++ b/apps/vr-tests-react-components/src/stories/Tag/InteractionTag.stories.tsx @@ -8,19 +8,7 @@ import { Steps } from 'storywright'; const CalendarMonth = bundleIcon(CalendarMonthFilled, CalendarMonthRegular); -const contentId = 'content-id'; -const dismissButtonId = 'dismiss-button-id'; -const steps = new Steps() - .snapshot('default', { cropTo: '.testWrapper' }) - .hover(`#${contentId}`) - .snapshot('hover content', { cropTo: '.testWrapper' }) - .mouseDown(`#${contentId}`) - .snapshot('pressed content', { cropTo: '.testWrapper' }) - .hover(`#${dismissButtonId}`) - .snapshot('hover dismiss', { cropTo: '.testWrapper' }) - .mouseDown(`#${dismissButtonId}`) - .snapshot('pressed dismiss', { cropTo: '.testWrapper' }) - .end(); +const steps = new Steps().snapshot('default', { cropTo: '.testWrapper' }).end(); export default { title: 'InteractionTag Converged', @@ -28,99 +16,15 @@ export default { decorators: [story => withStoryWrightSteps({ story, steps })], } as ComponentMeta; -export const Default = () => Primary Text; +export const Default = () => Primary Text; export const DefaultRTL = getStoryVariant(Default, RTL); export const DefaultDarkMode = getStoryVariant(Default, DARK_MODE); export const DefaultHighContrast = getStoryVariant(Default, HIGH_CONTRAST); -// slots -export const Icon = () => ( - }> - Primary Text - -); -export const IconRTL = getStoryVariant(Icon, RTL); - -export const Media = () => ( - }> - Primary Text - -); -export const MediaRTL = getStoryVariant(Media, RTL); - -export const Dismissible = () => ( - - Primary Text - -); -export const DismissibleRTL = getStoryVariant(Dismissible, RTL); - -export const SecondaryText = () => ( - - Primary Text - -); - -// shape -export const Circular = () => ( - - Primary Text - -); -export const CircularWithMedia = () => ( - } - > - Primary Text - -); -export const CircularDismissible = () => ( - - Primary Text - -); - -// appearance -export const Outline = () => ( - } - > - Primary Text - -); -export const OutlineHighContrast = getStoryVariant(Outline, HIGH_CONTRAST); -export const OutlineDarkMode = getStoryVariant(Outline, DARK_MODE); - -export const Brand = () => ( - } - > - Primary Text - -); -export const BrandHighContrast = getStoryVariant(Brand, HIGH_CONTRAST); -export const BrandDarkMode = getStoryVariant(Brand, DARK_MODE); - // disabled export const Disabled = () => ( - } - > + }> Primary Text ); @@ -128,14 +32,7 @@ export const DisabledHighContrast = getStoryVariant(Disabled, HIGH_CONTRAST); export const DisabledDarkMode = getStoryVariant(Disabled, DARK_MODE); export const OutlineDisabled = () => ( - } - > + }> Primary Text ); @@ -143,14 +40,7 @@ export const OutlineDisabledHighContrast = getStoryVariant(OutlineDisabled, HIGH export const OutlineDisabledDarkMode = getStoryVariant(OutlineDisabled, DARK_MODE); export const BrandDisabled = () => ( - } - > + }> Primary Text ); @@ -158,52 +48,36 @@ export const BrandDisabledHighContrast = getStoryVariant(BrandDisabled, HIGH_CON export const BrandDisabledDarkMode = getStoryVariant(BrandDisabled, DARK_MODE); // size -export const SizeSmall = () => ( - - Primary Text - -); +export const SizeSmall = () => Primary Text; export const SizeSmallDismissible = () => ( - + Primary Text ); export const SizeSmallWithIcon = () => ( - }> + }> Primary Text ); export const SizeSmallWithMedia = () => ( - } - > + }> Primary Text ); -export const SizeExtraSmall = () => ( - - Primary Text - -); +export const SizeExtraSmall = () => Primary Text; export const SizeExtraSmallDismissible = () => ( - + Primary Text ); export const SizeExtraSmallWithIcon = () => ( - }> + }> Primary Text ); export const SizeExtraSmallWithMedia = () => ( - } - > + }> Primary Text ); diff --git a/apps/vr-tests-react-components/src/stories/Tag/InteractionTagAppearances.stories.tsx b/apps/vr-tests-react-components/src/stories/Tag/InteractionTagAppearances.stories.tsx new file mode 100644 index 0000000000000..a3966eba20a4c --- /dev/null +++ b/apps/vr-tests-react-components/src/stories/Tag/InteractionTagAppearances.stories.tsx @@ -0,0 +1,70 @@ +import * as React from 'react'; +import { InteractionTag } from '@fluentui/react-tags-preview'; +import { bundleIcon, CalendarMonthFilled, CalendarMonthRegular } from '@fluentui/react-icons'; +import { ComponentMeta } from '@storybook/react'; +import { getStoryVariant, withStoryWrightSteps, DARK_MODE, HIGH_CONTRAST } from '../../utilities'; +import { Steps } from 'storywright'; + +const CalendarMonth = bundleIcon(CalendarMonthFilled, CalendarMonthRegular); + +const contentId = 'content-id'; +const dismissButtonId = 'dismiss-button-id'; +const steps = new Steps() + .snapshot('default', { cropTo: '.testWrapper' }) + .hover(`#${contentId}`) + .snapshot('hover content', { cropTo: '.testWrapper' }) + .mouseDown(`#${contentId}`) + .snapshot('pressed content', { cropTo: '.testWrapper' }) + .hover(`#${dismissButtonId}`) + .snapshot('hover dismiss', { cropTo: '.testWrapper' }) + .mouseDown(`#${dismissButtonId}`) + .snapshot('pressed dismiss', { cropTo: '.testWrapper' }) + .end(); + +export default { + title: 'InteractionTag Converged', + Component: InteractionTag, + decorators: [story => withStoryWrightSteps({ story, steps })], +} as ComponentMeta; + +export const Filled = () => ( + } + > + Primary Text + +); +export const FilledHighContrast = getStoryVariant(Filled, HIGH_CONTRAST); +export const FilledDarkMode = getStoryVariant(Filled, DARK_MODE); + +export const Outline = () => ( + } + > + Primary Text + +); +export const OutlineHighContrast = getStoryVariant(Outline, HIGH_CONTRAST); +export const OutlineDarkMode = getStoryVariant(Outline, DARK_MODE); + +export const Brand = () => ( + } + > + Primary Text + +); +export const BrandHighContrast = getStoryVariant(Brand, HIGH_CONTRAST); +export const BrandDarkMode = getStoryVariant(Brand, DARK_MODE); diff --git a/apps/vr-tests-react-components/src/stories/Tag/InteractionTagShape.stories.tsx b/apps/vr-tests-react-components/src/stories/Tag/InteractionTagShape.stories.tsx new file mode 100644 index 0000000000000..4c5a96145b4c2 --- /dev/null +++ b/apps/vr-tests-react-components/src/stories/Tag/InteractionTagShape.stories.tsx @@ -0,0 +1,74 @@ +import * as React from 'react'; +import { InteractionTag } from '@fluentui/react-tags-preview'; +import { ComponentMeta } from '@storybook/react'; +import { getStoryVariant, withStoryWrightSteps, RTL } from '../../utilities'; +import { Avatar } from '@fluentui/react-avatar'; +import { Steps } from 'storywright'; + +const contentId = 'content-id'; +const dismissButtonId = 'dismiss-button-id'; +const steps = new Steps() + .snapshot('default', { cropTo: '.testWrapper' }) + .focus(`#${contentId}`) + .snapshot('focus content', { cropTo: '.testWrapper' }) + .focus(`#${dismissButtonId}`) + .snapshot('focus dismiss', { cropTo: '.testWrapper' }) + .end(); + +export default { + title: 'InteractionTag Converged', + Component: InteractionTag, + decorators: [story => withStoryWrightSteps({ story, steps })], +} as ComponentMeta; + +export const Rounded = () => Primary Text; + +export const RoundedWithSecondaryText = () => ( + + Primary Text + +); + +export const RoundedWithMedia = () => ( + }> + Primary Text + +); +export const RoundedWithMediaRTL = getStoryVariant(RoundedWithMedia, RTL); + +export const RoundedDismissible = () => ( + + Primary Text + +); +export const RoundedDismissibleRTL = getStoryVariant(RoundedDismissible, RTL); + +export const Circular = () => ( + + Primary Text + +); + +export const CircularWithSecondaryText = () => ( + + Primary Text + +); + +export const CircularWithMedia = () => ( + } + > + Primary Text + +); +export const CircularWithMediaRTL = getStoryVariant(CircularWithMedia, RTL); + +export const CircularDismissible = () => ( + + Primary Text + +); +export const CircularDismissibleRTL = getStoryVariant(CircularDismissible, RTL); diff --git a/apps/vr-tests-react-components/src/stories/Tag/Tag.stories.tsx b/apps/vr-tests-react-components/src/stories/Tag/Tag.stories.tsx index 8be370c901dd5..6e08f6a630475 100644 --- a/apps/vr-tests-react-components/src/stories/Tag/Tag.stories.tsx +++ b/apps/vr-tests-react-components/src/stories/Tag/Tag.stories.tsx @@ -8,14 +8,7 @@ import { Steps } from 'storywright'; const CalendarMonth = bundleIcon(CalendarMonthFilled, CalendarMonthRegular); -const tagId = 'tag-id'; -const steps = new Steps() - .snapshot('default', { cropTo: '.testWrapper' }) - .hover(`#${tagId}}`) - .snapshot('hover', { cropTo: '.testWrapper' }) - .mouseDown(`#${tagId}}`) - .snapshot('pressed', { cropTo: '.testWrapper' }) - .end(); +const steps = new Steps().snapshot('default', { cropTo: '.testWrapper' }).end(); export default { title: 'Tag Converged', @@ -23,77 +16,15 @@ export default { decorators: [story => withStoryWrightSteps({ story, steps })], } as ComponentMeta; -export const Default = () => Primary Text; +export const Default = () => Primary Text; export const DefaultRTL = getStoryVariant(Default, RTL); export const DefaultDarkMode = getStoryVariant(Default, DARK_MODE); export const DefaultHighContrast = getStoryVariant(Default, HIGH_CONTRAST); -// slots -export const Icon = () => ( - }> - Primary Text - -); -export const IconRTL = getStoryVariant(Icon, RTL); - -export const Media = () => ( - }> - Primary Text - -); -export const MediaRTL = getStoryVariant(Media, RTL); - -export const Dismissible = () => ( - - Primary Text - -); -export const DismissibleRTL = getStoryVariant(Dismissible, RTL); - -export const SecondaryText = () => ( - - Primary Text - -); - -// shape -export const Circular = () => ( - - Primary Text - -); -export const CircularWithMedia = () => ( - }> - Primary Text - -); -export const CircularDismissible = () => ( - - Primary Text - -); - -// appearance -export const Outline = () => ( - }> - Primary Text - -); -export const OutlineHighContrast = getStoryVariant(Outline, HIGH_CONTRAST); -export const OutlineDarkMode = getStoryVariant(Outline, DARK_MODE); - -export const Brand = () => ( - }> - Primary Text - -); -export const BrandHighContrast = getStoryVariant(Brand, HIGH_CONTRAST); -export const BrandDarkMode = getStoryVariant(Brand, DARK_MODE); - // disabled export const Disabled = () => ( - }> + }> Primary Text ); @@ -101,7 +32,7 @@ export const DisabledHighContrast = getStoryVariant(Disabled, HIGH_CONTRAST); export const DisabledDarkMode = getStoryVariant(Disabled, DARK_MODE); export const OutlineDisabled = () => ( - }> + }> Primary Text ); @@ -109,7 +40,7 @@ export const OutlineDisabledHighContrast = getStoryVariant(OutlineDisabled, HIGH export const OutlineDisabledDarkMode = getStoryVariant(OutlineDisabled, DARK_MODE); export const BrandDisabled = () => ( - }> + }> Primary Text ); @@ -117,44 +48,36 @@ export const BrandDisabledHighContrast = getStoryVariant(BrandDisabled, HIGH_CON export const BrandDisabledDarkMode = getStoryVariant(BrandDisabled, DARK_MODE); // size -export const SizeSmall = () => ( - - Primary Text - -); +export const SizeSmall = () => Primary Text; export const SizeSmallDismissible = () => ( - + Primary Text ); export const SizeSmallWithIcon = () => ( - }> + }> Primary Text ); export const SizeSmallWithMedia = () => ( - }> + }> Primary Text ); -export const SizeExtraSmall = () => ( - - Primary Text - -); +export const SizeExtraSmall = () => Primary Text; export const SizeExtraSmallDismissible = () => ( - + Primary Text ); export const SizeExtraSmallWithIcon = () => ( - }> + }> Primary Text ); export const SizeExtraSmallWithMedia = () => ( - }> + }> Primary Text ); diff --git a/apps/vr-tests-react-components/src/stories/Tag/TagAppearances.stories.tsx b/apps/vr-tests-react-components/src/stories/Tag/TagAppearances.stories.tsx new file mode 100644 index 0000000000000..66c2b110c1b63 --- /dev/null +++ b/apps/vr-tests-react-components/src/stories/Tag/TagAppearances.stories.tsx @@ -0,0 +1,49 @@ +import * as React from 'react'; +import { Tag } from '@fluentui/react-tags-preview'; +import { bundleIcon, CalendarMonthFilled, CalendarMonthRegular } from '@fluentui/react-icons'; +import { ComponentMeta } from '@storybook/react'; +import { getStoryVariant, withStoryWrightSteps, DARK_MODE, HIGH_CONTRAST } from '../../utilities'; +import { Steps } from 'storywright'; + +const CalendarMonth = bundleIcon(CalendarMonthFilled, CalendarMonthRegular); + +const tagId = 'tag-id'; +const steps = new Steps() + .snapshot('default', { cropTo: '.testWrapper' }) + .hover(`#${tagId}}`) + .snapshot('hover', { cropTo: '.testWrapper' }) + .mouseDown(`#${tagId}}`) + .snapshot('pressed', { cropTo: '.testWrapper' }) + .end(); + +export default { + title: 'Tag Converged', + Component: Tag, + decorators: [story => withStoryWrightSteps({ story, steps })], +} as ComponentMeta; + +export const Filled = () => ( + }> + Primary Text + +); + +export const FilledHighContrast = getStoryVariant(Filled, HIGH_CONTRAST); +export const FilledDarkMode = getStoryVariant(Filled, DARK_MODE); + +export const Outline = () => ( + }> + Primary Text + +); + +export const OutlineHighContrast = getStoryVariant(Outline, HIGH_CONTRAST); +export const OutlineDarkMode = getStoryVariant(Outline, DARK_MODE); + +export const Brand = () => ( + }> + Primary Text + +); +export const BrandHighContrast = getStoryVariant(Brand, HIGH_CONTRAST); +export const BrandDarkMode = getStoryVariant(Brand, DARK_MODE); diff --git a/apps/vr-tests-react-components/src/stories/Tag/TagShape.stories.tsx b/apps/vr-tests-react-components/src/stories/Tag/TagShape.stories.tsx new file mode 100644 index 0000000000000..28ba174f5fff4 --- /dev/null +++ b/apps/vr-tests-react-components/src/stories/Tag/TagShape.stories.tsx @@ -0,0 +1,67 @@ +import * as React from 'react'; +import { Tag } from '@fluentui/react-tags-preview'; +import { ComponentMeta } from '@storybook/react'; +import { getStoryVariant, withStoryWrightSteps, RTL } from '../../utilities'; +import { Avatar } from '@fluentui/react-avatar'; +import { Steps } from 'storywright'; + +const tagId = 'tag-id'; +const steps = new Steps() + .snapshot('default', { cropTo: '.testWrapper' }) + .focus(`#${tagId}}`) + .snapshot('focused', { cropTo: '.testWrapper' }) + .end(); + +export default { + title: 'Tag Converged', + Component: Tag, + decorators: [story => withStoryWrightSteps({ story, steps })], +} as ComponentMeta; + +export const Rounded = () => Primary Text; + +export const RoundedWithSecondaryText = () => ( + + Primary Text + +); + +export const RoundedWithMedia = () => ( + }> + Primary Text + +); +export const RoundedWithMediaRTL = getStoryVariant(RoundedWithMedia, RTL); + +export const RoundedDismissible = () => ( + + Primary Text + +); +export const RoundedDismissibleRTL = getStoryVariant(RoundedDismissible, RTL); + +export const Circular = () => ( + + Primary Text + +); + +export const CircularWithSecondaryText = () => ( + + Primary Text + +); + +export const CircularWithMedia = () => ( + }> + Primary Text + +); +export const CircularWithMediaRTL = getStoryVariant(CircularWithMedia, RTL); + +export const CircularDismissible = () => ( + + Primary Text + +); +export const CircularDismissibleRTL = getStoryVariant(CircularDismissible, RTL);