diff --git a/apps/vr-tests-react-components/package.json b/apps/vr-tests-react-components/package.json
index 66c3ac40876f0..e1795180b916b 100644
--- a/apps/vr-tests-react-components/package.json
+++ b/apps/vr-tests-react-components/package.json
@@ -4,6 +4,7 @@
"private": true,
"description": "Visual regression tests for @fluentui/react-components",
"scripts": {
+ "test:component": "storywright --browsers chromium --url dist/storybook --destpath dist/screenshots --concurrency 4 --headless true",
"build": "build-storybook -o dist/storybook",
"clean": "just-scripts clean",
"format": "prettier . -w --ignore-path ../../.prettierignore",
@@ -14,7 +15,8 @@
"type-check": "tsc"
},
"devDependencies": {
- "@fluentui/eslint-plugin": "*"
+ "@fluentui/eslint-plugin": "*",
+ "storywright": "0.0.22"
},
"dependencies": {
"@fluentui/react-accordion": "^9.0.7",
diff --git a/apps/vr-tests-react-components/src/stories/Accordion.stories.tsx b/apps/vr-tests-react-components/src/stories/Accordion.stories.tsx
index 4fee9cf87f3a8..556181a075a27 100644
--- a/apps/vr-tests-react-components/src/stories/Accordion.stories.tsx
+++ b/apps/vr-tests-react-components/src/stories/Accordion.stories.tsx
@@ -1,13 +1,13 @@
import { storiesOf } from '@storybook/react';
import * as React from 'react';
-import Screener from 'screener-storybook/src/screener';
+import { StoryWright, Steps } from 'storywright';
import { Accordion, AccordionItem, AccordionHeader, AccordionPanel } from '@fluentui/react-accordion';
import { CircleRegular } from '@fluentui/react-icons';
storiesOf('Accordion Converged', module)
.addDecorator(story => (
-
{story()}
-
+
))
.addStory(
@@ -40,11 +40,11 @@ storiesOf('Accordion Converged', module)
storiesOf('Accordion Converged', module)
.addDecorator(story => (
-
+
{story()}
-
+
))
.addStory(
diff --git a/apps/vr-tests-react-components/src/stories/Avatar.stories.tsx b/apps/vr-tests-react-components/src/stories/Avatar.stories.tsx
deleted file mode 100644
index f19cc9bb55fae..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Avatar.stories.tsx
+++ /dev/null
@@ -1,238 +0,0 @@
-import { storiesOf } from '@storybook/react';
-import * as React from 'react';
-import Screener from 'screener-storybook/src/screener';
-import { Avatar, AvatarProps } from '@fluentui/react-avatar';
-import { PeopleRegular, PersonCallRegular } from '@fluentui/react-icons';
-
-const imageRoot = 'http://fabricweb.azureedge.net/fabric-website/assets/images/avatar';
-
-/** Sample names and images for use in Avatar examples */
-const nameAndImage = [
- { name: 'Katri Athokas', image: `${imageRoot}/KatriAthokas.jpg` },
- { name: 'Elvia Atkins', image: `${imageRoot}/ElviaAtkins.jpg` },
- { name: 'Mauricio August', image: `${imageRoot}/MauricioAugust.jpg` },
- { name: 'Colin Ballinger', image: `${imageRoot}/ColinBallinger.jpg` },
- { name: 'Lydia Bauer', image: `${imageRoot}/LydiaBauer.jpg` },
- { name: 'Amanda Brady', image: `${imageRoot}/AmandaBrady.jpg` },
- { name: 'Henry Brill', image: `${imageRoot}/HenryBrill.jpg` },
- { name: 'Celeste Burton', image: `${imageRoot}/CelesteBurton.jpg` },
- { name: 'Robin Counts', image: `${imageRoot}/RobinCounts.jpg` },
- { name: 'Tim Deboer', image: `${imageRoot}/TimDeboer.jpg` },
- { name: 'Cameron Evans', image: `${imageRoot}/CameronEvans.jpg` },
- { name: 'Isaac Fielder', image: `${imageRoot}/IsaacFielder.jpg` },
- { name: 'Cecil Folk', image: `${imageRoot}/CecilFolk.jpg` },
- { name: 'Miguel Garcia', image: `${imageRoot}/MiguelGarcia.jpg` },
- { name: 'Wanda Howard', image: `${imageRoot}/WandaHoward.jpg` },
- { name: 'Mona Kane', image: `${imageRoot}/MonaKane.jpg` },
- { name: 'Kat Larsson', image: `${imageRoot}/KatLarsson.jpg` },
- { name: 'Ashley McCarthy', image: `${imageRoot}/AshleyMcCarthy.jpg` },
- { name: 'Johnie McConnell', image: `${imageRoot}/JohnieMcConnell.jpg` },
- { name: 'Allan Munger', image: `${imageRoot}/AllanMunger.jpg` },
- { name: 'Erik Nason', image: `${imageRoot}/ErikNason.jpg` },
- { name: 'Kristin Patterson', image: `${imageRoot}/KristinPatterson.jpg` },
- { name: 'Daisy Phillips', image: `${imageRoot}/DaisyPhillips.jpg` },
- { name: 'Carole Poland', image: `${imageRoot}/CarolePoland.jpg` },
- { name: 'Carlos Slattery', image: `${imageRoot}/CarlosSlattery.jpg` },
- { name: 'Robert Tolbert', image: `${imageRoot}/RobertTolbert.jpg` },
- { name: 'Kevin Sturgis', image: `${imageRoot}/KevinSturgis.jpg` },
- { name: 'Charlotte Waltson', image: `${imageRoot}/CharlotteWaltson.jpg` },
- { name: 'Elliot Woodward', image: `${imageRoot}/ElliotWoodward.jpg` },
-];
-
-/** Arrays of example values for each Avatar prop */
-const examples = {
- size: [16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, 96, 120, 128],
- nameAndImage: nameAndImage,
- name: nameAndImage.map(p => p.name),
- image: nameAndImage.map(p => p.image),
- badge: [
- { status: 'available' },
- { status: 'away' },
- { status: 'busy' },
- { status: 'do-not-disturb' },
- { status: 'offline' },
- { status: 'out-of-office' },
- { status: 'available', outOfOffice: true },
- { status: 'away', outOfOffice: true },
- { status: 'busy', outOfOffice: true },
- { status: 'do-not-disturb', outOfOffice: true },
- { status: 'offline', outOfOffice: true },
- { status: 'out-of-office', outOfOffice: true },
- ],
- activeDisplay: ['ring', 'ring-shadow', 'shadow'],
- color: ['neutral', 'brand', 'colorful'],
- namedColors: [
- 'dark-red',
- 'cranberry',
- 'red',
- 'pumpkin',
- 'peach',
- 'marigold',
- 'gold',
- 'brass',
- 'brown',
- 'forest',
- 'seafoam',
- 'dark-green',
- 'light-teal',
- 'teal',
- 'steel',
- 'blue',
- 'royal-blue',
- 'cornflower',
- 'navy',
- 'lavender',
- 'purple',
- 'grape',
- 'lilac',
- 'pink',
- 'magenta',
- 'plum',
- 'beige',
- 'mink',
- 'platinum',
- 'anchor',
- ],
- /** A SVG hexagon data URL used by the CustomShape example */
- hexagon:
- 'data:image/svg+xml;utf8,' +
- '' +
- ' ' +
- ' ',
-} as const;
-
-/** Renders an Avatar at every standard size */
-const AvatarList: React.FC<
- AvatarProps & {
- names?: readonly string[];
- images?: readonly string[];
- }
-> = props => {
- const { names, images, ...restOfProps } = props;
- return (
-
- {examples.size.map((size, i) => (
-
- ))}
-
- );
-};
-
-const customSizes: { baseSize: AvatarProps['size']; customSize: string }[] = [
- { baseSize: 20, customSize: '13px' },
- { baseSize: 20, customSize: '21px' },
- { baseSize: 32, customSize: '34px' },
- { baseSize: 48, customSize: '55px' },
- { baseSize: 72, customSize: '89px' },
- { baseSize: 128, customSize: '144px' },
-];
-
-/** Renders an Avatar at a few custom sizes */
-const AvatarCustomSizeList: React.FC<
- AvatarProps & {
- names?: readonly string[];
- images?: readonly string[];
- }
-> = props => {
- const { names, images, ...restOfProps } = props;
-
- return (
-
- {customSizes.map(({ baseSize, customSize }, i) => (
-
- ))}
-
- );
-};
-
-storiesOf('Avatar Converged', module)
- .addDecorator(story => (
-
- ))
- .addDecorator(story => (
- {story()}
- ))
- .addStory(
- 'basic',
- () => (
-
-
-
-
-
-
} />
-
} shape="square" />
-
} shape="square" />
-
-
-
- ),
- { includeRtl: true, includeHighContrast: true, includeDarkMode: true },
- )
- .addStory('size+name', () => )
- .addStory('size+icon+badge+square', () => )
- .addStory('size+image+badge', () => )
- .addStory('size+inactive+badge', () => (
-
- ))
- .addStory('size+active+badge', () => (
-
- ))
- .addStory('size+active+shadow', () => (
-
- ))
- .addStory('size+active+ring-shadow', () => (
-
- ))
- .addStory('customSize+image', () => )
- .addStory('customSize+name+badge', () => (
-
- ))
- .addStory('customSize+icon+active', () => )
- .addStory(
- 'color',
- () => {
- const rowStyles: React.CSSProperties = { display: 'flex', flexWrap: 'wrap', gap: '8px' };
-
- return (
-
-
-
- {examples.name.map(name => (
-
- ))}
-
-
- {examples.namedColors.map(color => (
-
- ))}
-
-
- );
- },
- { includeHighContrast: true, includeDarkMode: true },
- )
- .addStory('image-bad-url', () => );
diff --git a/apps/vr-tests-react-components/src/stories/AvatarGroup.stories.tsx b/apps/vr-tests-react-components/src/stories/AvatarGroup.stories.tsx
deleted file mode 100644
index 2689c7457168e..0000000000000
--- a/apps/vr-tests-react-components/src/stories/AvatarGroup.stories.tsx
+++ /dev/null
@@ -1,161 +0,0 @@
-import * as React from 'react';
-import { storiesOf } from '@storybook/react';
-import Screener from 'screener-storybook/src/screener';
-import {
- AvatarGroup,
- AvatarGroupItem,
- AvatarGroupPopover,
- AvatarGroupPopoverProps,
- AvatarGroupProps,
- partitionAvatarGroupItems,
-} from '@fluentui/react-avatar';
-import { TestWrapperDecorator } from '../utilities/TestWrapperDecorator';
-
-const names = [
- 'Katri Athokas',
- 'Elvia Atkins',
- 'Mauricio August',
- 'Colin Ballinger',
- 'Lydia Bauer',
- 'Amanda Brady',
- 'Henry Brill',
- 'Celeste Burton',
- 'Robin Counts',
- 'Tim Deboer',
- 'Cameron Evans',
- 'Isaac Fielder',
- 'Cecil Folk',
- 'Miguel Garcia',
- 'Wanda Howard',
- 'Mona Kane',
- 'Kat Larsson',
- 'Ashley McCarthy',
- 'Johnie McConnell',
- 'Allan Munger',
- 'Erik Nason',
- 'Kristin Patterson',
- 'Daisy Phillips',
- 'Carole Poland',
- 'Carlos Slattery',
- 'Robert Tolbert',
- 'Kevin Sturgis',
- 'Charlotte Waltson',
- 'Elliot Woodward',
-];
-
-const sizes = [16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, 96, 120, 128];
-
-const AvatarGroupList: React.FC<
- AvatarGroupProps & { overflowIndicator?: AvatarGroupPopoverProps['indicator'] }
-> = props => {
- const { inlineItems, overflowItems } = partitionAvatarGroupItems({ items: names, layout: props.layout });
-
- return (
-
- {sizes.map(size => (
-
- {inlineItems.map(name => (
-
- ))}
-
- {overflowItems.map(name => (
-
- ))}
-
-
- ))}
-
- );
-};
-
-// Non-interactive stories
-storiesOf('AvatarGroup Converged', module)
- .addDecorator(TestWrapperDecorator)
- .addDecorator(story => (
- {story()}
- ))
- .addStory('basic', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('layoutStack', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory(
- 'layoutPie-1',
- () => (
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'layoutPie-2',
- () => (
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory('layoutPie', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('overflowIndicator', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- });
-
-// Interactive stories
-storiesOf('AvatarGroup Converged', module)
- .addDecorator(TestWrapperDecorator)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory(
- 'overflowContent',
- () => {
- const { inlineItems, overflowItems } = partitionAvatarGroupItems({ items: names });
- return (
-
-
- {inlineItems.map(name => (
-
- ))}
-
- {overflowItems.map(name => (
-
- ))}
-
-
-
- );
- },
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- );
diff --git a/apps/vr-tests-react-components/src/stories/Badge.stories.tsx b/apps/vr-tests-react-components/src/stories/Badge.stories.tsx
deleted file mode 100644
index ead15d05920ad..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Badge.stories.tsx
+++ /dev/null
@@ -1,196 +0,0 @@
-import { storiesOf } from '@storybook/react';
-import * as React from 'react';
-import { Badge, BadgeProps } from '@fluentui/react-badge';
-import { CircleRegular } from '@fluentui/react-icons';
-import { mergeClasses, makeStyles, shorthands } from '@griffel/react';
-import { tokens, typographyStyles } from '@fluentui/react-theme';
-
-type ValueArrays = {
- [K in keyof T]: T[K][];
-};
-
-const propValues: ValueArrays, 'size' | 'color' | 'appearance' | 'shape'>> = {
- size: ['tiny', 'extra-small', 'small', 'medium', 'large', 'extra-large'],
- color: ['brand', 'danger', 'severe', 'warning', 'success', 'important', 'informative', 'subtle'],
- appearance: ['filled', 'outline', 'tint', 'ghost'],
- shape: ['circular', 'rounded', 'square'],
-};
-
-const useStyles = makeStyles({
- container: {
- display: 'flex',
- alignItems: 'center',
- },
-
- badgeContainer: {
- display: 'flex',
- alignItems: 'center',
- ...shorthands.gap('5px'),
- ...shorthands.padding('5px'),
- },
-
- label: {
- marginLeft: '10px',
- },
-
- brandContainer: {
- backgroundColor: tokens.colorBrandBackgroundStatic,
- },
-
- groupSet: {
- display: 'inline-flex',
- flexDirection: 'column',
- ...shorthands.padding(0, tokens.spacingHorizontalL),
- rowGap: tokens.spacingVerticalL,
- },
-
- group: {
- display: 'inline-flex',
- flexDirection: 'column',
- alignItems: 'start',
- rowGap: tokens.spacingVerticalS,
- },
-
- groupLabel: {
- ...typographyStyles.subtitle2Stronger,
- },
-
- row: {
- display: 'inline-flex',
- alignItems: 'center',
- columnGap: tokens.spacingHorizontalS,
- },
-});
-
-const BadgeAppearanceTemplate: React.FC<{ appearance: Required['appearance'] }> = ({ appearance }) => {
- const styles = useStyles();
-
- const badges = new Map();
- badges.set('brand', []);
- badges.set('danger', []);
- badges.set('severe', []);
- badges.set('warning', []);
- badges.set('success', []);
- badges.set('important', []);
- badges.set('informative', []);
- badges.set('subtle', []);
-
- propValues.color.forEach(color => {
- const circularWithText = (
-
- 1
-
- );
- const circularWithIcon = } />;
- const roundedWithIcon = } />;
- const roundedWithText = (
-
- {appearance.toUpperCase()}
-
- );
- const roundedWithTextAndIconBefore = (
- } iconPosition="before">
- {appearance.toUpperCase()}
-
- );
- const roundedWithTextAndIconAfter = (
- } iconPosition="after">
- {appearance.toUpperCase()}
-
- );
-
- badges
- .get(color)!
- .push(
- circularWithText,
- circularWithIcon,
- roundedWithIcon,
- roundedWithText,
- roundedWithTextAndIconAfter,
- roundedWithTextAndIconBefore,
- );
- });
-
- return (
-
- {Array.from(badges.keys()).map((color: BadgeProps['color'], i) => (
-
-
- {badges.get(color)}
-
-
{color}
-
- ))}
-
- );
-};
-
-const BadgeSampleRow: React.FC = props => {
- const styles = useStyles();
-
- // Text content is not supported for tiny and extra-small
- if (props.size === 'tiny' || props.size === 'extra-small') {
- return (
-
- } />
-
- );
- }
-
- return (
-
- 1
- } />
- BADGE
- }>
- BADGE
-
- } iconPosition="after">
- BADGE
-
- {props.children}
-
- );
-};
-
-const badgeStories = storiesOf('Badge Converged', module);
-
-// appearance stories
-propValues.appearance.forEach(appearance => {
- badgeStories.addStory(appearance, () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- });
-});
-
-// size stories
-propValues.size.forEach(size =>
- badgeStories.addStory(
- `size: ${size}`,
- () => {
- const styles = useStyles();
- return (
-
- {propValues.appearance.map(appearance =>
- // tiny + ghost is not supported
- size === 'tiny' && appearance === 'ghost' ? null : (
-
- appearance: {appearance}
- {propValues.shape.map(shape => (
-
- ))}
-
- ),
- )}
-
- );
- },
- { includeRtl: true },
- ),
-);
diff --git a/apps/vr-tests-react-components/src/stories/Button.stories.tsx b/apps/vr-tests-react-components/src/stories/Button.stories.tsx
deleted file mode 100644
index 23c3f2e7077f1..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Button.stories.tsx
+++ /dev/null
@@ -1,569 +0,0 @@
-import { storiesOf } from '@storybook/react';
-import * as React from 'react';
-import Screener from 'screener-storybook/src/screener';
-import { Button, CompoundButton, ToggleButton, MenuButton } from '@fluentui/react-button';
-import { bundleIcon, CalendarMonthFilled, CalendarMonthRegular } from '@fluentui/react-icons';
-import { makeStyles } from '@griffel/react';
-
-const CalendarMonth = bundleIcon(CalendarMonthFilled, CalendarMonthRegular);
-
-const steps = new Screener.Steps()
- .snapshot('default', { cropTo: '.testWrapper' })
- .hover('#button-id')
- .snapshot('hover', { cropTo: '.testWrapper' })
- .mouseDown('#button-id')
- .snapshot('pressed', { cropTo: '.testWrapper' })
- .end();
-
-const buttonId = 'button-id';
-
-const useStyles = makeStyles({
- longText: {
- width: '280px',
- },
-});
-
-storiesOf('Button Converged', module)
- .addDecorator(story => {story()} )
- .addStory('Default', () => Hello, world , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Circular', () => (
-
- Hello, world
-
- ))
- .addStory('Outline', () => (
-
- Hello, world
-
- ))
- .addStory(
- 'Primary',
- () => (
-
- Hello, world
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Subtle',
- () => (
-
- Hello, world
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Transparent',
- () => (
-
- Hello, world
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Disabled',
- () => (
-
- Hello, world
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Outline Disabled',
- () => (
-
- Hello, world
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Primary Disabled',
- () => (
-
- Hello, world
-
- ),
- { includeHighContrast: true, includeDarkMode: true },
- )
- .addStory(
- 'Subtle Disabled',
- () => (
-
- Hello, world
-
- ),
- { includeHighContrast: true, includeDarkMode: true },
- )
- .addStory(
- 'Transparent Disabled',
- () => (
-
- Hello, world
-
- ),
- { includeHighContrast: true, includeDarkMode: true },
- )
- .addStory('Size small', () => (
- } size="small">
- Hello, world
-
- ))
- .addStory('Size large', () => (
- } size="large">
- Hello, world
-
- ))
- .addStory('Size small - with long text wrapping', () => {
- const styles = useStyles();
- return (
- } size="small">
- Long text wraps after it hits the max width of the component
-
- );
- })
- .addStory('Size medium - with long text wrapping', () => {
- const styles = useStyles();
- return (
- } size="medium">
- Long text wraps after it hits the max width of the component
-
- );
- })
- .addStory('Size large - with long text wrapping', () => {
- const styles = useStyles();
- return (
- } size="large">
- Long text wraps after it hits the max width of the component
-
- );
- })
- .addStory(
- 'With icon before content',
- () => (
- }>
- Hello, world
-
- ),
- {
- includeRtl: true,
- },
- )
- .addStory(
- 'With icon after content',
- () => (
- } iconPosition="after">
- Hello, world
-
- ),
- { includeRtl: true },
- )
- .addStory('Icon only', () => } />)
- .addStory('Circular and icon only', () => } />, {
- includeRtl: true,
- });
-
-storiesOf('CompoundButton Converged', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory(
- 'Default',
- () => (
-
- Hello, world
-
- ),
- { includeRtl: true },
- )
- .addStory(
- 'With icon before content',
- () => (
- }>
- Hello, world
-
- ),
- { includeRtl: true },
- )
- .addStory(
- 'With icon after content',
- () => (
- }
- iconPosition="after"
- >
- Hello, world
-
- ),
- { includeRtl: true },
- );
-
-storiesOf('CompoundButton Converged', module)
- .addDecorator(story => {story()} )
- .addStory('Outline', () => (
-
- Hello, world
-
- ))
- .addStory('Primary', () => (
-
- Hello, world
-
- ))
- .addStory('Subtle', () => (
-
- Hello, world
-
- ))
- .addStory('Transparent', () => (
-
- Hello, world
-
- ))
- .addStory('Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Outline Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Primary Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Subtle Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Transparent Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Circular', () => (
-
- Hello, world
-
- ))
- .addStory('Size small', () => (
- } size="small">
- Hello, world
-
- ))
- .addStory('Size large', () => (
- } size="large">
- Hello, world
-
- ))
- .addStory('Size small - with long text wrapping', () => {
- const styles = useStyles();
- return (
- }
- size="small"
- >
- Long text wraps after it hits the max width of the component
-
- );
- })
- .addStory('Size medium - with long text wrapping', () => {
- const styles = useStyles();
- return (
- }
- size="medium"
- >
- Long text wraps after it hits the max width of the component
-
- );
- })
- .addStory('Size large - with long text wrapping', () => {
- const styles = useStyles();
- return (
- }
- size="large"
- >
- Long text wraps after it hits the max width of the component
-
- );
- })
- .addStory('Icon only', () => } />)
- .addStory(
- 'Circular and icon only',
- () => } />,
- {
- includeRtl: true,
- },
- );
-
-storiesOf('ToggleButton Converged', module)
- .addDecorator(story => {story()} )
- .addStory('Default', () => Hello, world , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Circular', () => (
-
- Hello, world
-
- ))
- .addStory('Outline', () => (
-
- Hello, world
-
- ))
- .addStory(
- 'Primary',
- () => (
-
- Hello, world
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory('Subtle', () => (
-
- Hello, world
-
- ))
- .addStory('Transparent', () => (
-
- Hello, world
-
- ))
- .addStory('Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Primary Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Subtle Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Transparent Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Size small', () => (
- } size="small">
- Hello, world
-
- ))
- .addStory('Size large', () => (
- } size="large">
- Hello, world
-
- ))
- .addStory('Size small - with long text wrapping', () => {
- const styles = useStyles();
- return (
- } size="small">
- Long text wraps after it hits the max width of the component
-
- );
- })
- .addStory('Size medium - with long text wrapping', () => {
- const styles = useStyles();
- return (
- } size="medium">
- Long text wraps after it hits the max width of the component
-
- );
- })
- .addStory('Size large - with long text wrapping', () => {
- const styles = useStyles();
- return (
- } size="large">
- Long text wraps after it hits the max width of the component
-
- );
- })
- .addStory('With icon before content', () => (
- }>
- Hello, world
-
- ))
- .addStory('With icon after content', () => (
- } iconPosition="after">
- Hello, world
-
- ))
- .addStory('Icon only', () => } />)
- .addStory('Circular and icon only', () => } />)
- .addStory('Checked', () => (
-
- Hello, world
-
- ))
- .addStory('Primary Checked', () => (
-
- Hello, world
-
- ))
- .addStory('Subtle Checked', () => (
-
- Hello, world
-
- ))
- .addStory('Transparent Checked', () => (
-
- Hello, world
-
- ));
-
-storiesOf('MenuButton Converged', module)
- .addDecorator(story => {story()} )
- .addStory('Default', () => Hello, world , { includeRtl: true })
- .addStory('Circular', () => (
-
- Hello, world
-
- ))
- .addStory('Outline', () => (
-
- Hello, world
-
- ))
- .addStory('Primary', () => (
-
- Hello, world
-
- ))
- .addStory('Subtle', () => (
-
- Hello, world
-
- ))
- .addStory('Transparent', () => (
-
- Hello, world
-
- ))
- .addStory('Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Outline Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Primary Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Subtle Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Transparent Disabled', () => (
-
- Hello, world
-
- ))
- .addStory('Size small', () => (
- } size="small">
- Hello, world
-
- ))
- .addStory('Size large', () => (
- } size="large">
- Hello, world
-
- ))
- .addStory('Size small - with long text wrapping', () => {
- const styles = useStyles();
- return (
- } size="small">
- Long text wraps after it hits the max width of the component
-
- );
- })
- .addStory('Size medium - with long text wrapping', () => {
- const styles = useStyles();
- return (
- } size="medium">
- Long text wraps after it hits the max width of the component
-
- );
- })
- .addStory('Size large - with long text wrapping', () => {
- const styles = useStyles();
- return (
- } size="large">
- Long text wraps after it hits the max width of the component
-
- );
- })
- .addStory('With icon', () => (
- }>
- Hello, world
-
- ))
- .addStory('Icon only', () => } />)
- .addStory('Circular and icon only', () => } />);
diff --git a/apps/vr-tests-react-components/src/stories/Card.stories.tsx b/apps/vr-tests-react-components/src/stories/Card.stories.tsx
deleted file mode 100644
index 5d521cbba06c8..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Card.stories.tsx
+++ /dev/null
@@ -1,261 +0,0 @@
-import { storiesOf } from '@storybook/react';
-import * as React from 'react';
-import Screener from 'screener-storybook/src/screener';
-import { Card, CardHeader, CardFooter, CardPreview } from '@fluentui/react-card';
-import { MoreHorizontal24Filled, Open16Regular, Share16Regular } from '@fluentui/react-icons';
-import { Body1, Caption1 } from '@fluentui/react-text';
-import { Button } from '@fluentui/react-button';
-import { action } from '@storybook/addon-actions';
-
-const ASSET_URL = 'https://raw.githubusercontent.com/microsoft/fluentui/master/packages/react-components/react-card';
-
-const powerpointLogoURL = ASSET_URL + '/assets/powerpoint_logo.svg';
-const salesPresentationTemplateURL = ASSET_URL + '/assets/sales_template.png';
-
-const SampleCardContent = () => (
- <>
-
- App Name
-
- }
- description={Developer }
- />
-
- Donut chocolate bar oat cake. Dragée tiramisu lollipop bear claw. Marshmallow pastry jujubes toffee sugar plum.
-
-
- }>
- Open
-
- }>Share
-
- >
-);
-
-storiesOf('Card Converged', module)
- .addDecorator(story => (
-
-
- {story()}
-
-
- ))
- .addStory('card templates', () => (
-
-
-
-
-
-
- Sales analysis 2019 presentation
-
- }
- description={Folder > Presentations }
- />
-
-
- ))
- .addStory(
- 'appearance',
- () => (
-
-
-
Filled
-
-
-
-
-
-
Filled alternative
-
-
-
-
-
-
Outline
-
-
-
-
-
-
Subtle
-
-
-
-
-
- ),
- {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory('size', () => (
-
-
-
-
-
-
-
-
-
-
-
- ))
- .addStory('orientation', () => (
-
-
-
Vertical
-
-
-
-
-
-
Horizontal
-
-
-
-
-
- ))
- .addStory('CardHeader', () => (
-
-
- App Name
-
- }
- description={Developer }
- action={ } />}
- />
-
- App Name
-
- }
- description={Developer }
- action={ } />}
- />
-
- App Name
-
- }
- action={ } />}
- />
-
- App Name
-
- }
- description={Developer }
- />
-
- App Name
-
- }
- action={ } />}
- />
-
- App Name
-
- }
- />
-
- App Name
-
- }
- />
-
- ));
-
-storiesOf('Card Converged', module)
- .addDecorator(story => (
-
-
- {story()}
-
-
- ))
- .addStory(
- 'appearance interactive - Filled',
- () => (
-
-
-
- ),
- {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'appearance interactive - Filled Alternative',
- () => (
-
-
-
- ),
- {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'appearance interactive - Outline',
- () => (
-
-
-
- ),
- {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'appearance interactive - Subtle',
- () => (
-
-
-
- ),
- {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- },
- );
diff --git a/apps/vr-tests-react-components/src/stories/Checkbox.stories.tsx b/apps/vr-tests-react-components/src/stories/Checkbox.stories.tsx
deleted file mode 100644
index ec456a60d55a0..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Checkbox.stories.tsx
+++ /dev/null
@@ -1,84 +0,0 @@
-import * as React from 'react';
-import Screener, { Steps } from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { Checkbox } from '@fluentui/react-checkbox';
-import { TestWrapperDecoratorFixedWidth } from '../utilities/TestWrapperDecorator';
-
-storiesOf('Checkbox Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('unchecked', () => , { includeRtl: true })
- .addStory('checked', () => )
- .addStory('mixed', () => )
- .addStory('disabled', () => );
-
-storiesOf('Checkbox Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => (
- {story()}
- ))
- .addStory('disabled+checked', () => )
- .addStory('disabled+mixed', () => )
- .addStory('no-label', () => )
- .addStory('label-before', () => , { includeRtl: true })
- .addStory(
- 'label-wrapping',
- () => (
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua
- >
- }
- />
- ),
- { includeRtl: true },
- )
- .addStory('required', () => )
- .addStory('required+label-before', () => (
-
- ))
- .addStory('circular', () => )
- .addStory('circular+checked', () => )
- .addStory('circular+mixed', () => )
- //
- // large variants
- //
- .addStory('large', () => , { includeRtl: true })
- .addStory('large+checked', () => )
- .addStory('large+mixed', () => )
- .addStory('large+circular', () => )
- .addStory('large+circular+checked', () => (
-
- ))
- .addStory('large+circular+mixed', () => (
-
- ))
- .addStory(
- 'large+label-wrapping',
- () => (
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua
- >
- }
- />
- ),
- { includeRtl: true },
- );
diff --git a/apps/vr-tests-react-components/src/stories/CounterBadge.stories.tsx b/apps/vr-tests-react-components/src/stories/CounterBadge.stories.tsx
deleted file mode 100644
index c9d1360f34a21..0000000000000
--- a/apps/vr-tests-react-components/src/stories/CounterBadge.stories.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import { storiesOf } from '@storybook/react';
-import * as React from 'react';
-import { CounterBadge } from '@fluentui/react-badge';
-
-storiesOf('CounterBadge Converged - colors', module).addStory(
- 'default',
- () => (
-
- {(['brand', 'danger', 'important', 'informative'] as const).map(color => (
-
- ))}
-
- ),
- { includeRtl: true },
-);
diff --git a/apps/vr-tests-react-components/src/stories/Dialog.stories.tsx b/apps/vr-tests-react-components/src/stories/Dialog.stories.tsx
deleted file mode 100644
index 98ccf2836eb63..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Dialog.stories.tsx
+++ /dev/null
@@ -1,411 +0,0 @@
-import * as React from 'react';
-import { storiesOf } from '@storybook/react';
-import {
- Dialog,
- DialogActions,
- DialogBody,
- DialogContent,
- DialogSurface,
- DialogTitle,
- DialogTrigger,
-} from '@fluentui/react-dialog';
-import { Button } from '@fluentui/react-button';
-import { Rocket24Regular } from '@fluentui/react-icons';
-
-storiesOf('Dialog', module)
- .addStory(
- 'default',
- () => (
-
-
- Open dialog
-
-
-
- Dialog title
-
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam exercitationem cumque repellendus eaque
- est dolor eius expedita nulla ullam? Tenetur reprehenderit aut voluptatum impedit voluptates in natus iure
- cumque eaque?
-
-
-
- Close
-
- Do Something
-
-
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true, includeRtl: true },
- )
- .addStory(
- 'non-modal',
- () => (
-
-
- Open dialog
-
-
-
- Dialog title
-
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam exercitationem cumque repellendus eaque
- est dolor eius expedita nulla ullam? Tenetur reprehenderit aut voluptatum impedit voluptates in natus iure
- cumque eaque?
-
-
-
- Close
-
- Do Something
-
-
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true, includeRtl: true },
- )
- .addStory(
- 'alert',
- () => (
-
-
- Open dialog
-
-
-
- Dialog title
-
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam exercitationem cumque repellendus eaque
- est dolor eius expedita nulla ullam? Tenetur reprehenderit aut voluptatum impedit voluptates in natus iure
- cumque eaque?
-
-
-
- Close
-
- Do Something
-
-
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true, includeRtl: true },
- )
- .addStory(
- 'actions position start',
- () => (
-
-
- Open dialog
-
-
-
- Dialog title
-
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam exercitationem cumque repellendus eaque
- est dolor eius expedita nulla ullam? Tenetur reprehenderit aut voluptatum impedit voluptates in natus iure
- cumque eaque?
-
-
-
- Close
-
- Do Something
-
-
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true, includeRtl: true },
- )
- .addStory(
- 'actions position start & position end',
- () => (
-
-
- Open dialog
-
-
-
- Dialog title
-
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam exercitationem cumque repellendus eaque
- est dolor eius expedita nulla ullam? Tenetur reprehenderit aut voluptatum impedit voluptates in natus iure
- cumque eaque?
-
-
-
- Some action
-
-
-
-
- Close
-
- Do Something
-
-
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true, includeRtl: true },
- )
- .addStory(
- 'no actions',
- () => (
-
-
- Open dialog
-
-
-
- Dialog title
-
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam exercitationem cumque repellendus eaque
- est dolor eius expedita nulla ullam? Tenetur reprehenderit aut voluptatum impedit voluptates in natus iure
- cumque eaque?
-
-
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true, includeRtl: true },
- )
- .addStory(
- 'no title',
- () => (
-
-
- Open dialog
-
-
-
-
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam exercitationem cumque repellendus eaque
- est dolor eius expedita nulla ullam? Tenetur reprehenderit aut voluptatum impedit voluptates in natus iure
- cumque eaque?
-
-
-
- Close
-
- Do Something
-
-
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true, includeRtl: true },
- )
- .addStory(
- 'no title & no actions',
- () => (
-
-
- Open dialog
-
-
-
-
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam exercitationem cumque repellendus eaque
- est dolor eius expedita nulla ullam? Tenetur reprehenderit aut voluptatum impedit voluptates in natus iure
- cumque eaque?
-
-
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true, includeRtl: true },
- )
- .addStory(
- 'title custom action',
- () => (
-
-
- Open dialog
-
-
-
- } />}>
- Dialog title
-
-
- Lorem, ipsum dolor sit amet consectetur adipisicing elit. Aliquid, explicabo repudiandae impedit doloribus
- laborum quidem maxime dolores perspiciatis non ipsam, nostrum commodi quis autem sequi, incidunt cum?
- Consequuntur, repellendus nostrum?
-
-
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true, includeRtl: true },
- )
- .addStory(
- 'nested',
- () => (
-
-
- Open nested dialog
-
-
-
- Dialog title
-
-
-
- Open inner dialog
-
-
-
- Inner dialog title
-
- ⛔️ just because you can doesn't mean you should have nested dialogs ⛔️
-
-
-
- Close
-
-
-
-
-
-
-
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true, includeRtl: true },
- )
- .addStory(
- 'scroll long content',
- () => (
-
-
- Open dialog
-
-
-
- Dialog title
-
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Nisl pretium fusce id velit ut tortor. Leo vel fringilla est ullamcorper. Eget est
- lorem ipsum dolor sit amet consectetur adipiscing elit. In mollis nunc sed id semper risus in hendrerit
- gravida. Ullamcorper sit amet risus nullam eget felis eget. Dolor sed viverra ipsum nunc aliquet
- bibendum. Facilisi morbi tempus iaculis urna id volutpat. Porta non pulvinar neque laoreet suspendisse.
- Nunc id cursus metus aliquam eleifend mi in. A iaculis at erat pellentesque adipiscing commodo. Proin
- nibh nisl condimentum id. In hac habitasse platea dictumst vestibulum rhoncus est. Non tellus orci ac
- auctor augue mauris augue neque. Enim nulla aliquet porttitor lacus luctus accumsan tortor. Nascetur
- ridiculus mus mauris vitae ultricies leo integer. Ullamcorper eget nulla facilisi etiam dignissim. Leo
- in vitae turpis massa sed elementum tempus egestas sed.
-
-
- Ut enim blandit volutpat maecenas volutpat. Venenatis urna cursus eget nunc scelerisque viverra mauris.
- Neque aliquam vestibulum morbi blandit. Porttitor eget dolor morbi non. Nisi quis eleifend quam
- adipiscing vitae. Aliquam ultrices sagittis orci a scelerisque purus semper. Interdum varius sit amet
- mattis vulputate enim nulla aliquet. Ut sem viverra aliquet eget sit amet tellus cras. Sit amet tellus
- cras adipiscing enim eu turpis egestas. Amet cursus sit amet dictum sit amet justo donec enim. Neque
- gravida in fermentum et sollicitudin ac. Arcu cursus euismod quis viverra nibh cras pulvinar mattis
- nunc. Ultrices eros in cursus turpis massa tincidunt dui. Nisl rhoncus mattis rhoncus urna neque viverra
- justo. Odio pellentesque diam volutpat commodo sed egestas. Nunc mi ipsum faucibus vitae aliquet nec
- ullamcorper. Ipsum nunc aliquet bibendum enim. Faucibus ornare suspendisse sed nisi lacus sed. Sapien
- nec sagittis aliquam malesuada bibendum arcu vitae elementum. Metus vulputate eu scelerisque felis
- imperdiet.
-
-
- Consequat interdum varius sit amet mattis vulputate enim. Amet cursus sit amet dictum sit amet justo.
- Eget aliquet nibh praesent tristique magna sit. Ut consequat semper viverra nam libero justo. Pharetra
- massa massa ultricies mi. Sem viverra aliquet eget sit amet. Pulvinar mattis nunc sed blandit libero
- volutpat sed. Pharetra diam sit amet nisl suscipit adipiscing bibendum. Consectetur adipiscing elit ut
- aliquam. Volutpat diam ut venenatis tellus in metus vulputate. Scelerisque in dictum non consectetur a
- erat. Venenatis lectus magna fringilla urna porttitor rhoncus. Vitae congue mauris rhoncus aenean vel
- elit. Neque laoreet suspendisse interdum consectetur. Ultrices gravida dictum fusce ut placerat orci.
- Bibendum ut tristique et egestas quis ipsum suspendisse. Mattis rhoncus urna neque viverra justo nec
- ultrices dui. Elit duis tristique sollicitudin nibh sit amet.
-
-
- At risus viverra adipiscing at. Interdum posuere lorem ipsum dolor sit amet consectetur adipiscing elit.
- Nunc vel risus commodo viverra maecenas. Sit amet est placerat in egestas erat imperdiet sed euismod.
- Turpis egestas maecenas pharetra convallis posuere. Egestas tellus rutrum tellus pellentesque eu
- tincidunt tortor aliquam. Dolor sit amet consectetur adipiscing elit. Aliquam purus sit amet luctus
- venenatis lectus magna fringilla. Scelerisque fermentum dui faucibus in ornare quam viverra. Egestas
- maecenas pharetra convallis posuere morbi leo urna. A diam sollicitudin tempor id eu nisl nunc. Lectus
- sit amet est placerat.
-
-
- Mattis ullamcorper velit sed ullamcorper morbi tincidunt ornare massa eget. At tellus at urna
- condimentum mattis pellentesque id nibh. Dui faucibus in ornare quam. Tincidunt id aliquet risus feugiat
- in ante metus dictum. Adipiscing commodo elit at imperdiet dui. Dolor sed viverra ipsum nunc. Sodales
- neque sodales ut etiam sit amet nisl. Hendrerit dolor magna eget est lorem ipsum dolor sit amet. Mattis
- molestie a iaculis at erat pellentesque adipiscing. Adipiscing elit duis tristique sollicitudin nibh sit
- amet commodo nulla. Fringilla urna porttitor rhoncus dolor purus.
-
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua. Nisl pretium fusce id velit ut tortor. Leo vel fringilla est ullamcorper. Eget est
- lorem ipsum dolor sit amet consectetur adipiscing elit. In mollis nunc sed id semper risus in hendrerit
- gravida. Ullamcorper sit amet risus nullam eget felis eget. Dolor sed viverra ipsum nunc aliquet
- bibendum. Facilisi morbi tempus iaculis urna id volutpat. Porta non pulvinar neque laoreet suspendisse.
- Nunc id cursus metus aliquam eleifend mi in. A iaculis at erat pellentesque adipiscing commodo. Proin
- nibh nisl condimentum id. In hac habitasse platea dictumst vestibulum rhoncus est. Non tellus orci ac
- auctor augue mauris augue neque. Enim nulla aliquet porttitor lacus luctus accumsan tortor. Nascetur
- ridiculus mus mauris vitae ultricies leo integer. Ullamcorper eget nulla facilisi etiam dignissim. Leo
- in vitae turpis massa sed elementum tempus egestas sed.
-
-
- Ut enim blandit volutpat maecenas volutpat. Venenatis urna cursus eget nunc scelerisque viverra mauris.
- Neque aliquam vestibulum morbi blandit. Porttitor eget dolor morbi non. Nisi quis eleifend quam
- adipiscing vitae. Aliquam ultrices sagittis orci a scelerisque purus semper. Interdum varius sit amet
- mattis vulputate enim nulla aliquet. Ut sem viverra aliquet eget sit amet tellus cras. Sit amet tellus
- cras adipiscing enim eu turpis egestas. Amet cursus sit amet dictum sit amet justo donec enim. Neque
- gravida in fermentum et sollicitudin ac. Arcu cursus euismod quis viverra nibh cras pulvinar mattis
- nunc. Ultrices eros in cursus turpis massa tincidunt dui. Nisl rhoncus mattis rhoncus urna neque viverra
- justo. Odio pellentesque diam volutpat commodo sed egestas. Nunc mi ipsum faucibus vitae aliquet nec
- ullamcorper. Ipsum nunc aliquet bibendum enim. Faucibus ornare suspendisse sed nisi lacus sed. Sapien
- nec sagittis aliquam malesuada bibendum arcu vitae elementum. Metus vulputate eu scelerisque felis
- imperdiet.
-
-
- Consequat interdum varius sit amet mattis vulputate enim. Amet cursus sit amet dictum sit amet justo.
- Eget aliquet nibh praesent tristique magna sit. Ut consequat semper viverra nam libero justo. Pharetra
- massa massa ultricies mi. Sem viverra aliquet eget sit amet. Pulvinar mattis nunc sed blandit libero
- volutpat sed. Pharetra diam sit amet nisl suscipit adipiscing bibendum. Consectetur adipiscing elit ut
- aliquam. Volutpat diam ut venenatis tellus in metus vulputate. Scelerisque in dictum non consectetur a
- erat. Venenatis lectus magna fringilla urna porttitor rhoncus. Vitae congue mauris rhoncus aenean vel
- elit. Neque laoreet suspendisse interdum consectetur. Ultrices gravida dictum fusce ut placerat orci.
- Bibendum ut tristique et egestas quis ipsum suspendisse. Mattis rhoncus urna neque viverra justo nec
- ultrices dui. Elit duis tristique sollicitudin nibh sit amet.
-
-
- At risus viverra adipiscing at. Interdum posuere lorem ipsum dolor sit amet consectetur adipiscing elit.
- Nunc vel risus commodo viverra maecenas. Sit amet est placerat in egestas erat imperdiet sed euismod.
- Turpis egestas maecenas pharetra convallis posuere. Egestas tellus rutrum tellus pellentesque eu
- tincidunt tortor aliquam. Dolor sit amet consectetur adipiscing elit. Aliquam purus sit amet luctus
- venenatis lectus magna fringilla. Scelerisque fermentum dui faucibus in ornare quam viverra. Egestas
- maecenas pharetra convallis posuere morbi leo urna. A diam sollicitudin tempor id eu nisl nunc. Lectus
- sit amet est placerat.
-
-
- Mattis ullamcorper velit sed ullamcorper morbi tincidunt ornare massa eget. At tellus at urna
- condimentum mattis pellentesque id nibh. Dui faucibus in ornare quam. Tincidunt id aliquet risus feugiat
- in ante metus dictum. Adipiscing commodo elit at imperdiet dui. Dolor sed viverra ipsum nunc. Sodales
- neque sodales ut etiam sit amet nisl. Hendrerit dolor magna eget est lorem ipsum dolor sit amet. Mattis
- molestie a iaculis at erat pellentesque adipiscing. Adipiscing elit duis tristique sollicitudin nibh sit
- amet commodo nulla. Fringilla urna porttitor rhoncus dolor purus.
-
-
-
-
- Close
-
- Do Something
-
-
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true, includeRtl: true },
- );
diff --git a/apps/vr-tests-react-components/src/stories/Divider.stories.tsx b/apps/vr-tests-react-components/src/stories/Divider.stories.tsx
deleted file mode 100644
index 3c07d6fd9b943..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Divider.stories.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import * as React from 'react';
-import Screener, { Steps } from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { Divider } from '@fluentui/react-divider';
-import { TestWrapperDecorator, TestWrapperDecoratorFixedWidth } from '../utilities/index';
-
-storiesOf('Divider Converged - Horizontal', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => (
- {story()}
- ))
- .addStory('without content', () => , { includeRtl: true })
- .addStory('with content', () => Today , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Start Aligned', () => Today , {
- includeRtl: true,
- })
- .addStory('End Aligned', () => Today , { includeRtl: true })
- .addStory('Appearance subtle', () => Today , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Appearance strong', () => Today , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Appearance brand', () => Today , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Inset', () => Today );
-
-storiesOf('Divider Converged - Vertical', module)
- .addDecorator(TestWrapperDecorator)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('Center Aligned', () => Today )
- .addStory('Start Aligned', () => (
-
- Today
-
- ))
- .addStory('End Aligned', () => (
-
- Today
-
- ))
- .addStory('inset', () => (
-
- Today
-
- ));
diff --git a/apps/vr-tests-react-components/src/stories/Field.stories.tsx b/apps/vr-tests-react-components/src/stories/Field.stories.tsx
deleted file mode 100644
index 827ba779dda75..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Field.stories.tsx
+++ /dev/null
@@ -1,98 +0,0 @@
-import * as React from 'react';
-import Screener, { Steps } from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { Radio } from '@fluentui/react-radio';
-import {
- CheckboxField,
- ComboboxField,
- InputField,
- InputFieldProps,
- RadioGroupField,
- SelectField,
- SliderField,
- SpinButtonField,
- SwitchField,
- TextareaField,
-} from '@fluentui/react-field';
-import { SparkleFilled } from '@fluentui/react-icons';
-
-const AllFields = (
- props: Pick<
- InputFieldProps,
- 'orientation' | 'required' | 'label' | 'validationState' | 'validationMessage' | 'validationMessageIcon' | 'hint'
- >,
-) => {
- return (
-
-
-
-
-
-
-
-
-
-
- Option
-
-
-
-
-
-
- );
-};
-
-storiesOf('Field Converged', module)
- .addDecorator(story => (
-
- ))
- .addStory('base', () => )
- .addStory('required', () => )
- .addStory('validation:error', () => )
- .addStory('validation:warning', () => )
- .addStory('validation:success', () => )
- .addStory('validation:custom', () => (
- } validationMessage="Custom message" />
- ))
- .addStory('hint', () => )
- .addStory('horizontal', () => )
- .addStory('horizontal+label:multiline', () => (
-
- ))
- .addStory('horizontal+validation:error+hint', () => (
-
- ))
- .addStory('size:small', () => (
-
-
-
-
- Option
-
-
-
-
-
- ))
- .addStory('size:large', () => (
-
-
-
-
-
- Option
-
-
-
- ))
- .addStory('CheckboxField+fieldLabel', () => (
-
- ));
diff --git a/apps/vr-tests-react-components/src/stories/Image.stories.tsx b/apps/vr-tests-react-components/src/stories/Image.stories.tsx
deleted file mode 100644
index cf06075f882bf..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Image.stories.tsx
+++ /dev/null
@@ -1,102 +0,0 @@
-import * as React from 'react';
-import { storiesOf } from '@storybook/react';
-import Screener from 'screener-storybook/src/screener';
-import { Image } from '@fluentui/react-image';
-
-const imageUrl = 'https://fabricweb.azureedge.net/fabric-website/assets/images/avatar/AmandaBrady.jpg';
-
-storiesOf('Image Converged', module)
- .addDecorator((story: () => React.ReactNode) => (
- {story()}
- ))
- .addStory('Default', () => (
-
- ))
- .addStory('Image Shape', () => (
- <>
-
-
-
-
-
-
-
-
-
- >
- ))
- .addStory('Image Variations Border', () => (
- <>
-
-
-
-
-
-
-
-
-
- >
- ))
- .addStory('Image Variations Fallback', () => (
-
- ))
- .addStory('Image Layout Fit', () => (
- <>
-
-
-
-
-
-
-
-
-
-
-
-
- >
- ))
- .addStory('Image Fluid', () => (
- <>
-
-
-
-
-
-
- >
- ))
- .addStory('Image Shadow', () => (
-
- ));
diff --git a/apps/vr-tests-react-components/src/stories/Input.stories.tsx b/apps/vr-tests-react-components/src/stories/Input.stories.tsx
deleted file mode 100644
index 0ec55bb53aaee..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Input.stories.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-import * as React from 'react';
-import Screener, { Steps } from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { Input } from '@fluentui/react-input';
-import { SearchRegular, DismissRegular } from '@fluentui/react-icons';
-import { TestWrapperDecoratorFixedWidth } from '../utilities/TestWrapperDecorator';
-
-storiesOf('Input Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('Appearance: outline (default)', () => )
- .addStory('Appearance: underline', () => )
- .addStory('Appearance: filled-darker', () => )
- .addStory('Appearance: filled-lighter', () => (
- // filledLighter requires a background to show up (this is colorNeutralBackground3 in web light theme)
-
-
-
- ))
- .addStory('Disabled', () => )
- .addStory('With value', () => );
-
-// Non-interactive stories
-storiesOf('Input Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- // note: due to reused "Input Converged" story ID, TestWrapperDecoratorFixedWidth is also reused
- .addDecorator(story => (
- {story()}
- ))
- .addStory('Size: small', () => )
- .addStory('Size: large', () => )
- .addStory('Inline', () => (
-
- Some text with inline input
-
- ))
- .addStory(
- 'contentBefore',
- () => } placeholder="Placeholder" />,
- { includeRtl: true },
- )
- .addStory(
- 'contentAfter',
- () => } placeholder="Placeholder" />,
- { includeRtl: true },
- );
diff --git a/apps/vr-tests-react-components/src/stories/Label.stories.tsx b/apps/vr-tests-react-components/src/stories/Label.stories.tsx
deleted file mode 100644
index 7129463cf183e..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Label.stories.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import * as React from 'react';
-import Screener from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { Label } from '@fluentui/react-label';
-
-storiesOf('Label Converged', module)
- .addDecorator(story =>
- // prettier-ignore
-
- {story()}
- ,
- )
- .addStory('Root', () => I'm a label , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Disabled', () => I'm a disabled label , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Required', () => I'm a required label , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Semibold', () => I'm a semibold label )
- .addStory('Small', () => I'm a small label )
- .addStory('Large', () => I'm a large label )
- .addStory('CustomRequired', () => I'm a label with custom required text , {
- includeRtl: true,
- })
- .addStory(
- 'Multiline',
- () => (
-
- Super long label to show overflow into multiple lines
-
- ),
- { includeRtl: true },
- );
diff --git a/apps/vr-tests-react-components/src/stories/Link.stories.tsx b/apps/vr-tests-react-components/src/stories/Link.stories.tsx
deleted file mode 100644
index 9627393c11d62..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Link.stories.tsx
+++ /dev/null
@@ -1,159 +0,0 @@
-import * as React from 'react';
-import Screener, { Steps } from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { Link, LinkProps } from '@fluentui/react-link';
-
-const AnchorLink = (props: LinkProps & { as?: 'a' }) => ;
-const ButtonLink = (props: LinkProps) => ;
-
-storiesOf('Link Converged - Rendered as anchor', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('Stand-alone', () => Stand-alone link , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory(
- 'Stand-alone Disabled Focusable',
- () => (
-
- Stand-alone disabled focusable link
-
- ),
- { includeHighContrast: true, includeDarkMode: true },
- )
- .addStory(
- 'Inline',
- () => (
-
- This is
a link used alongside other text content.
-
- ),
- { includeRtl: true },
- )
- .addStory('Inline Disabled Focusable', () => (
-
- This is{' '}
-
- a disabled focusable link
- {' '}
- used alongside other text content.
-
- ));
-
-// We put the disabled stories separately so they do not error on the focused step.
-storiesOf('Link Converged - Rendered as anchor', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('Stand-alone Disabled', () => Stand-alone disabled link )
- .addStory('Inline Disabled', () => (
-
- This is{' '}
-
- a disabled link
- {' '}
- used alongside other text content.
-
- ));
-
-storiesOf('Link Converged - Rendered as button', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('Stand-alone', () => Stand-alone link , { includeRtl: true })
- .addStory('Stand-alone Disabled Focusable', () => (
-
- Stand-alone disabled focusable link
-
- ))
- .addStory(
- 'Inline',
- () => (
-
- This is a link used alongside other text content.
-
- ),
- { includeRtl: true },
- )
- .addStory('Inline Disabled Focusable', () => (
-
- This is{' '}
-
- a disabled focusable link
- {' '}
- used alongside other text content.
-
- ));
-
-// We put the disabled stories separately so they do not error on the focused step.
-storiesOf('Link Converged - Rendered as button', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('Stand-alone Disabled', () => Stand-alone disabled link )
- .addStory('Inline Disabled', () => (
-
- This is{' '}
-
- a disabled link
- {' '}
- used alongside other text content.
-
- ));
diff --git a/apps/vr-tests-react-components/src/stories/MakeStyles.stories.tsx b/apps/vr-tests-react-components/src/stories/MakeStyles.stories.tsx
deleted file mode 100644
index 04f5d24878ccf..0000000000000
--- a/apps/vr-tests-react-components/src/stories/MakeStyles.stories.tsx
+++ /dev/null
@@ -1,214 +0,0 @@
-import { shorthands, mergeClasses, makeStyles } from '@griffel/react';
-import { FluentProvider } from '@fluentui/react-provider';
-import { tokens, webLightTheme } from '@fluentui/react-theme';
-import { storiesOf } from '@storybook/react';
-import * as React from 'react';
-import Screener, { Steps } from 'screener-storybook/src/screener';
-
-const useStyles = makeStyles({
- box: {
- ...shorthands.border('5px', 'solid', tokens.colorNeutralStroke1),
- ...shorthands.borderLeft('20px', 'solid', tokens.colorPaletteBerryBorder2),
-
- backgroundColor: tokens.colorNeutralBackground1,
- color: tokens.colorNeutralForeground1,
-
- ...shorthands.margin('5px'),
- ...shorthands.padding('5px'),
- paddingLeft: '50px',
- },
-
- container: {
- ...shorthands.border('5px', 'solid', tokens.colorNeutralStroke1),
- ...shorthands.borderLeft('20px', 'solid', tokens.colorPaletteBerryBorder2),
-
- ...shorthands.margin('5px'),
- ...shorthands.padding('5px'),
- },
- containerPrimary: {
- borderLeftColor: tokens.colorPaletteDarkOrangeBorder2,
- },
-
- provider: {
- marginLeft: '20px',
- },
-});
-
-const useFocusStylesA = makeStyles({
- root: {
- ...shorthands.border('3px', 'solid', 'blue'),
- ...shorthands.padding('10px'),
-
- ':focus': {
- color: 'red',
- },
- ':hover': {
- color: 'blue',
- },
- },
-});
-const useFocusStylesB = makeStyles({
- root: {
- ...shorthands.border('3px', 'solid', 'orange'),
- ...shorthands.padding('10px'),
-
- ':hover': {
- color: 'orange',
- },
- ':focus': {
- color: 'green',
- },
- },
-});
-
-const Box: React.FC = props => {
- const classes = useStyles();
-
- return {props.children}
;
-};
-
-const BoxWithPseudo: React.FC = () => {
- const classesA = useFocusStylesA();
- const classesB = useFocusStylesB();
-
- return (
-
-
When element is focused & hovered - border color & text color should match
-
-
- A focusable element
-
-
- A focusable element
-
-
- );
-};
-
-const Container: React.FC<{ className?: string; primary?: boolean }> = props => {
- const classes = useStyles();
-
- return (
-
- {props.children}
-
- );
-};
-
-const ClassNameProvider: React.FC<{
- children: (className: string) => React.ReactElement;
-}> = props => {
- const classes = useStyles();
-
- return props.children(classes.provider);
-};
-
-export const Nested = () => (
- <>
- This scenario shows that it's possible to have nested components (LTR inside RTL).
-
-
- مرحبا بالعالم!
-
-
- Hello world!
-
-
- >
-);
-
-export const Propagation = () => (
- <>
-
- This scenario shows classes propagation between boundaries with "mergeClasses()" function: classes generated in
- LTR context will be applied properly in RTL.
-
-
-
-
- {className => (
-
-
- مرحبا بالعالم!
-
-
- )}
-
-
-
-
- {className => (
-
-
- Hello world!
-
-
- )}
-
-
-
- >
-);
-
-// RTL stories
-// Check for details: packages/react-examples/src/react-make-styles/RTL/RTL.stories.tsx
-
-storiesOf('MakeStyles', module)
- .addDecorator(story => (
-
-
- {story()}
-
-
- ))
- .addStory('RTL: two components in a single Provider', () => (
-
- مرحبا بالعالم!
- مرحبا بالعالم!
-
- ))
- .addStory('RTL: two providers with different directions as siblings', () => (
- <>
-
- Hello world!
- Hello world!
-
-
-
- مرحبا بالعالم!
- مرحبا بالعالم!
-
- >
- ))
- .addStory('RTL: two providers with different directions as children', () => (
-
- مرحبا بالعالم!
-
-
- Hello world!
-
-
- ));
-
-// Pseudo selectors stories
-
-storiesOf('MakeStyles (pseudo)', module)
- .addDecorator(story => (
-
-
- {story()}
-
-
- ))
- .addStory('insertion is ordered', () => );
diff --git a/apps/vr-tests-react-components/src/stories/Menu.stories.tsx b/apps/vr-tests-react-components/src/stories/Menu.stories.tsx
deleted file mode 100644
index 3042f445b1620..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Menu.stories.tsx
+++ /dev/null
@@ -1,419 +0,0 @@
-import { storiesOf } from '@storybook/react';
-import * as React from 'react';
-import Screener from 'screener-storybook/src/screener';
-import {
- Menu,
- MenuTrigger,
- MenuPopover,
- MenuList,
- MenuItem,
- MenuItemCheckbox,
- MenuItemRadio,
- MenuGroup,
- MenuGroupHeader,
- MenuDivider,
- MenuSplitGroup,
-} from '@fluentui/react-menu';
-import { CutRegular, EditRegular, ClipboardPasteRegular } from '@fluentui/react-icons';
-
-storiesOf('Menu Converged - basic', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory(
- 'default',
- () => (
-
-
- Toggle menu
-
-
-
-
- }>Cut
- }>Edit
- }>Paste
-
-
-
- ),
- { includeRtl: true },
- );
-
-storiesOf('Menu Converged - secondary content', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory(
- 'default',
- () => (
-
-
- Toggle menu
-
-
-
-
- } secondaryContent="Ctrl+X">
- Cut
-
- }>Edit
- } secondaryContent="Ctrl+P">
- Paste
-
-
-
-
- ),
- { includeRtl: true },
- );
-
-storiesOf('Menu Converged - groups', module)
- .addDecorator(story => {story()} )
- .addStory(
- 'default',
- () => (
-
-
- Toggle menu
-
-
-
-
-
- Section header
- }>Cut
- }>Paste
- }>Edit
-
-
-
- Section header
- }>Cut
- }>Paste
- }>Edit
-
-
-
-
- ),
- { includeRtl: true, includeHighContrast: true, includeDarkMode: true },
- );
-
-storiesOf('Menu Converged - selection', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory(
- 'checkbox',
- () => (
-
-
- Toggle menu
-
-
-
-
- } name="edit" value="cut">
- Cut
-
- } name="edit" value="paste">
- Paste
-
- } name="edit" value="edit">
- Edit
-
-
-
-
- ),
- { includeRtl: true, includeHighContrast: true, includeDarkMode: true },
- );
-
-storiesOf('Menu Converged - selection groups', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory(
- 'default',
- () => (
-
-
- Toggle menu
-
-
-
-
-
- Checkbox group
- } name="edit" value="cut">
- Cut
-
- } name="edit" value="paste">
- Paste
-
- } name="edit" value="edit">
- Edit
-
-
-
-
- Radio group
- } name="font" value="segoe">
- Segoe
-
- } name="font" value="calibri">
- Caliri
-
- } name="font" value="arial">
- Arial
-
-
-
-
-
- ),
- { includeRtl: true },
- );
-
-storiesOf('Menu Converged - nested submenus', module)
- .addDecorator(story => (
- // https://github.com/microsoft/fluentui/issues/19782
- {story()}
- ))
- .addStory(
- 'default',
- () => (
-
-
- Toggle menu
-
-
-
-
- New
- New Window
- Open Folder
-
-
- Preferences
-
-
-
-
- New
- New Window
- Open Folder
-
-
-
-
-
-
- ),
- { includeRtl: true },
- );
-
-storiesOf('Menu Converged - split item', module)
- .addDecorator(story => (
- // https://github.com/microsoft/fluentui/issues/19782
- {story()}
- ))
- .addStory(
- 'default',
- () => (
-
-
- Toggle menu
-
-
-
-
- New
- New Window
- Open Folder
-
-
- Open
-
-
-
-
-
-
-
- In browser
- In desktop app
- In mobile
-
-
-
-
-
-
- ),
- { includeRtl: true },
- );
-
-const ContextMenuArea = React.forwardRef((props, ref) => {
- return (
-
-
-
- Toggle menu
-
-
-
-
- New
- New Window
- Open File
-
-
- Open Folder
-
-
-
-
- New
- New Window
- Open File
- Open Folder
-
-
-
-
-
-
-
- );
-});
-
-storiesOf('Menu nested within a MenuTrigger', module)
- .addDecorator(story => (
- // https://github.com/microsoft/fluentui/issues/19782
- {story()}
- ))
- .addStory('default', () => (
-
-
-
-
-
-
-
- New
- New Window
- Open File
- Open Folder
-
-
-
- ));
-
-// this places text in the icon slot to verify alignment when not using v9 icons
-storiesOf('Menu Converged - icon slotted content', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory(
- 'default',
- () => (
-
-
- Toggle menu
-
-
-
-
- X} secondaryContent="Ctrl+X">
- Cut
-
- C} secondaryContent="Ctrl+C">
- Copy
-
- V} secondaryContent="Ctrl+V">
- Paste
-
-
-
-
- ),
- { includeRtl: true },
- );
-
-// this places text in the submenuIndicator slot to verify alignment when not using v9 icons
-storiesOf('Menu Converged - submenuIndicator slotted content', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory(
- 'default',
- () => (
-
-
- Toggle menu
-
-
-
-
-
-
- N}>
- New
-
-
-
-
-
- File
- Folder
-
-
- P}>
- Project
-
-
-
-
-
- Financial
- Planning
- Status
-
-
-
-
-
-
-
-
-
- ),
- { includeRtl: true },
- );
diff --git a/apps/vr-tests-react-components/src/stories/Persona.stories.tsx b/apps/vr-tests-react-components/src/stories/Persona.stories.tsx
deleted file mode 100644
index 301444b78b22e..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Persona.stories.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-import * as React from 'react';
-import Screener from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { Persona } from '@fluentui/react-persona';
-import { AvatarSizes } from '@fluentui/react-avatar';
-import { BadgeProps } from '@fluentui/react-badge/src/Badge';
-
-const avatarSizes: AvatarSizes[] = [16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, 96, 120, 128];
-const badgeSizes: BadgeProps['size'][] = ['tiny', 'extra-small', 'small', 'medium', 'large', 'extra-large'];
-
-storiesOf('Persona Converged', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addDecorator(story => (
- {story()}
- ))
- .addStory(
- 'basic',
- () => (
-
- ),
- { includeRtl: true, includeHighContrast: true, includeDarkMode: true },
- )
- .addStory('single-double-lines', () => (
-
- ))
- .addStory('size-avatar', () => (
-
- {avatarSizes.map(size => (
-
- ))}
-
- ))
- .addStory('size-presence', () => (
-
- {badgeSizes.map(size => (
-
- ))}
-
- ))
- .addStory('scaling', () => (
-
- ));
diff --git a/apps/vr-tests-react-components/src/stories/Popover.stories.tsx b/apps/vr-tests-react-components/src/stories/Popover.stories.tsx
deleted file mode 100644
index 3b3c92092a1b0..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Popover.stories.tsx
+++ /dev/null
@@ -1,106 +0,0 @@
-import { storiesOf } from '@storybook/react';
-import * as React from 'react';
-import Screener from 'screener-storybook/src/screener';
-import { Popover, PopoverSurface, PopoverTrigger } from '@fluentui/react-popover';
-import { tokens } from '@fluentui/react-theme';
-import { TestWrapperDecorator } from '../utilities/index';
-
-const PopoverPositioning: React.FC = () => {
- const positions = [
- ['above', 'start'],
- ['above', 'center'],
- ['above', 'end'],
- ['below', 'start'],
- ['below', 'center'],
- ['below', 'end'],
- ['before', 'top'],
- ['before', 'center'],
- ['before', 'bottom'],
- ['after', 'top'],
- ['after', 'center'],
- ['after', 'bottom'],
- ] as const;
-
- const [target, setTarget] = React.useState(null);
- const [open, setOpen] = React.useState(false);
-
- return (
-
-
- {positions.map(([position, align]) => (
-
-
- {position + ' ' + align}
-
-
- ))}
-
-
setOpen(true)}>
- Show popovers
-
-
-
- );
-};
-
-storiesOf('Popover Converged', module)
- .addDecorator(TestWrapperDecorator)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('positioning', () => , { includeRtl: true, includeHighContrast: true });
-
-storiesOf('Popover Converged', module)
- .addDecorator(TestWrapperDecorator)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('avoid scrolling', () => {
- return (
-
-
- Show Popover
-
-
- {sampleText}
-
- close
- accept
-
-
-
- );
- });
-
-const sampleText = `Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
- et dolore magna aliqua. Felis donec et odio pellentesque diam volutpat commodo sed. In pellentesque massa placerat duis
- ultricies lacus sed turpis. Eros donec ac odio tempor. Mattis molestie a iaculis at erat. Aenean euismod elementum nisi
- quis eleifend quam. Penatibus et magnis dis parturient montes nascetur ridiculus mus mauris. Sed euismod nisi porta
- lorem mollis aliquam ut porttitor leo. Lorem ipsum dolor sit amet. Id faucibus nisl tincidunt eget nullam. Fermentum
- posuere urna nec tincidunt praesent semper. Dolor sit amet consectetur adipiscing. Ut enim blandit volutpat maecenas
- volutpat blandit aliquam etiam erat. Aliquam malesuada bibendum arcu vitae elementum curabitur vitae nunc sed.
- Dignissim convallis aenean et tortor at risus. Tristique senectus et netus et malesuada. Sed blandit libero volutpat
- sed cras ornare arcu dui. Arcu dictum varius duis at consectetur lorem. Montes nascetur ridiculus mus mauris vitae. Ut
- ornare lectus sit amet est placerat in egestas.`;
diff --git a/apps/vr-tests-react-components/src/stories/Positioning.stories.tsx b/apps/vr-tests-react-components/src/stories/Positioning.stories.tsx
deleted file mode 100644
index b2c26bc47ce66..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Positioning.stories.tsx
+++ /dev/null
@@ -1,580 +0,0 @@
-import * as React from 'react';
-import {
- usePositioning,
- createArrowStyles,
- PositioningProps,
- PositioningVirtualElement,
- PositioningImperativeRef,
-} from '@fluentui/react-positioning';
-import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
-import { useMergedRefs } from '@fluentui/react-utilities';
-import { tokens } from '@fluentui/react-theme';
-import { storiesOf } from '@storybook/react';
-import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
-import Screener from 'screener-storybook/src/screener';
-
-const useStyles = makeStyles({
- wrapper: {
- display: 'flex',
- ...shorthands.gap('5px'),
- backgroundColor: tokens.colorNeutralBackground1,
-
- '& .target': {
- color: tokens.colorNeutralForeground1,
- backgroundColor: tokens.colorNeutralBackground1,
- ...shorthands.border('2px', 'dashed', 'green'),
- width: '400px',
- height: '200px',
- },
- },
-
- gridWrapper: {
- width: '400px',
- height: '400px',
- display: 'grid',
- gridTemplateColumns: 'auto auto auto',
- columnGap: '20px',
- rowGap: '50px',
- },
-
- boundary: {
- ...shorthands.border('2px', 'dashed', 'red'),
- },
-
- box: {
- ...shorthands.padding('15px'),
- ...shorthands.border('1px', 'solid', 'blue'),
- backgroundColor: 'white',
- },
-
- arrow: {
- ...createArrowStyles({ arrowHeight: 8 }),
- backgroundColor: 'red',
- },
-
- seeThrough: {
- opacity: 0.6,
- },
-
- visibilityModifiers: {
- backgroundColor: '#ccc',
- minHeight: '60px',
- width: '200px',
-
- '[data-popper-reference-hidden]': {
- outlineWidth: '5px',
- outlineStyle: 'solid',
- outlineColor: 'red',
- },
- '[data-popper-escaped]': {
- backgroundColor: 'yellow',
- },
- '[data-popper-is-intersecting]': {
- outlineWidth: '5px',
- outlineStyle: 'solid',
- outlineColor: 'green',
- },
- },
-});
-
-const positions = [
- ['above', 'start'],
- ['above', 'center'],
- ['above', 'end'],
- ['below', 'start'],
- ['below', 'center'],
- ['below', 'end'],
- ['before', 'top'],
- ['before', 'center'],
- ['before', 'bottom'],
- ['after', 'top'],
- ['after', 'center'],
- ['after', 'bottom'],
-] as const;
-
-const Box = React.forwardRef>((props, ref) => {
- const styles = useStyles();
- return (
-
- {props.children}
-
- );
-});
-
-const PositionAndAlignProps: React.FC<{ positionFixed?: boolean }> = ({ positionFixed }) => {
- const styles = useStyles();
- const positionedRefs = positions.reduce[]>((acc, cur) => {
- const positioningOptions: PositioningProps = { position: cur[0], align: cur[1] };
- // positionFixed is not public yet
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
- positioningOptions.positionFixed = positionFixed;
-
- // this loop is deterministic
- // eslint-disable-next-line react-hooks/rules-of-hooks
- const positioningRefs = usePositioning(positioningOptions);
- acc.push(positioningRefs);
- return acc;
- }, []);
-
- const targetRef = useMergedRefs(...positionedRefs.map(x => x.targetRef));
-
- return (
-
- {positions.map(([position, align], i) => (
-
{`${position}-${align}`}
- ))}
-
-
- );
-};
-
-const Offset = () => {
- const styles = useStyles();
- const positionedRefs = positions.reduce[]>((acc, cur) => {
- // this loop is deterministic
- // eslint-disable-next-line react-hooks/rules-of-hooks
- const positioningRefs = usePositioning({
- position: cur[0],
- align: cur[1],
- offset: { crossAxis: 10, mainAxis: 10 },
- });
- acc.push(positioningRefs);
- return acc;
- }, []);
-
- const targetRef = useMergedRefs(...positionedRefs.map(x => x.targetRef));
-
- return (
-
- {positions.map(([position, align], i) => (
-
{`${position}-${align}`}
- ))}
-
-
- );
-};
-
-const OffsetFunction = () => {
- const styles = useStyles();
- const positionedRefs = positions.reduce[]>((acc, cur) => {
- // this loop is deterministic
- // eslint-disable-next-line react-hooks/rules-of-hooks
- const positioningRefs = usePositioning({
- position: cur[0],
- align: cur[1],
- offset: () => ({ crossAxis: 10, mainAxis: 10 }),
- });
- acc.push(positioningRefs);
- return acc;
- }, []);
-
- const targetRef = useMergedRefs(...positionedRefs.map(x => x.targetRef));
-
- return (
-
- {positions.map(([position, align], i) => (
-
{`${position}-${align}`}
- ))}
-
-
- );
-};
-
-const CoverTarget = () => {
- const styles = useStyles();
- const positionedRefs = positions.reduce[]>((acc, cur) => {
- // this loop is deterministic
- // eslint-disable-next-line react-hooks/rules-of-hooks
- const positioningRefs = usePositioning({ position: cur[0], align: cur[1], coverTarget: true });
- acc.push(positioningRefs);
- return acc;
- }, []);
-
- return (
-
- {positions.map(([position, align], i) => (
-
- Target
- {`${position}-${align}`}
-
- ))}
-
- );
-};
-
-const VerticalFlip = () => {
- const styles = useStyles();
- const [boundary, setBoundary] = React.useState(null);
- const topPopper = usePositioning({ position: 'above', flipBoundary: boundary ?? undefined });
- const bottomPopper = usePositioning({ position: 'below', flipBoundary: boundary ?? undefined });
-
- return (
-
- Target
- Flip
-
-
- Target
-
- Flip
-
- );
-};
-
-const HorizontalFlip = () => {
- const styles = useStyles();
- const [boundary, setBoundary] = React.useState(null);
- const startPopper = usePositioning({ position: 'before', flipBoundary: boundary ?? undefined });
- const endPopper = usePositioning({ position: 'after', flipBoundary: boundary ?? undefined });
- const { dir } = useFluent();
- const marginDir = dir === 'ltr' ? 'marginLeft' : 'marginRight';
-
- return (
-
- Target
- Flip
-
-
- Target
-
- Flip
-
- );
-};
-
-const VerticalOverflow = () => {
- const styles = useStyles();
- const [boundary, setBoundary] = React.useState(null);
- const topPopper = usePositioning({ position: 'after', overflowBoundary: boundary ?? undefined });
- const bottomPopper = usePositioning({ position: 'after', overflowBoundary: boundary ?? undefined });
-
- return (
-
- Target
- Shift
-
-
- Target
-
- Shift
-
- );
-};
-
-const HorizontalOverflow = () => {
- const styles = useStyles();
- const [boundary, setBoundary] = React.useState(null);
- const startPopper = usePositioning({ position: 'below', overflowBoundary: boundary ?? undefined });
- const endPopper = usePositioning({ position: 'below', overflowBoundary: boundary ?? undefined });
- const { dir } = useFluent();
- const marginDir = dir === 'ltr' ? 'marginLeft' : 'marginRight';
-
- return (
-
- Target
-
- Shift
-
-
-
- Target
-
-
- Shift
-
-
- );
-};
-
-const Pinned = () => {
- const styles = useStyles();
- const [boundary, setBoundary] = React.useState(null);
- const { containerRef, targetRef } = usePositioning({
- position: 'above',
- flipBoundary: boundary ?? undefined,
- pinned: true,
- });
-
- return (
-
- Target
- Does not flip
-
- );
-};
-
-const Arrow: React.FC = () => {
- const styles = useStyles();
- const positionedRefs = positions.reduce[]>((acc, cur) => {
- // this loop is deterministic
- // eslint-disable-next-line react-hooks/rules-of-hooks
- const positioningRefs = usePositioning({ position: cur[0], align: cur[1] });
- acc.push(positioningRefs);
- return acc;
- }, []);
-
- const targetRef = useMergedRefs(...positionedRefs.map(x => x.targetRef));
-
- return (
-
- {positions.map(([position, align], i) => (
-
-
- {`${position}-${align}`}
-
- ))}
-
-
- );
-};
-
-const AutoSize = () => {
- const styles = useStyles();
- const { containerRef, targetRef } = usePositioning({
- position: 'below',
- autoSize: true,
- });
-
- return (
-
- Target
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
- magna aliqua. In fermentum et sollicitudin ac orci phasellus egestas. Facilisi cras fermentum odio eu feugiat
- pretium nibh ipsum consequat. Praesent semper feugiat nibh sed pulvinar proin gravida hendrerit lectus. Porta
- nibh venenatis cras sed felis eget. Enim sed faucibus turpis in. Non blandit massa enim nec dui nunc mattis. Ut
- eu sem integer vitae justo. Lacus vestibulum sed arcu non. Vivamus arcu felis bibendum ut. Sagittis vitae et leo
- duis ut diam quam nulla porttitor. Amet est placerat in egestas erat imperdiet. Dapibus ultrices in iaculis nunc
- sed augue. Risus sed vulputate odio ut enim blandit volutpat maecenas. Orci dapibus ultrices in iaculis nunc sed
- augue lacus. Quam elementum pulvinar etiam non quam. Tempor commodo ullamcorper a lacus vestibulum sed arcu.
- Nunc non blandit massa enim nec. Venenatis a condimentum vitae sapien. Sodales ut eu sem integer vitae justo
- eget magna. In aliquam sem fringilla ut morbi tincidunt augue. Diam volutpat commodo sed egestas egestas
- fringilla phasellus faucibus scelerisque. Semper eget duis at tellus. Diam donec adipiscing tristique risus nec
- feugiat in fermentum posuere. Amet volutpat consequat mauris nunc congue nisi vitae. Hendrerit gravida rutrum
- quisque non tellus. Aliquet eget sit amet tellus. Libero id faucibus nisl tincidunt. Amet nulla facilisi morbi
- tempus iaculis urna id.
-
-
- );
-};
-
-const DisableTether = () => {
- const styles = useStyles();
- const { containerRef, targetRef } = usePositioning({
- position: 'above',
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
- // eslint-disable-next-line @typescript-eslint/naming-convention
- unstable_disableTether: 'all',
- });
-
- return (
- <>
-
-
- Target
-
- Untethered
-
- The target is outside of the boundary.
-
- The positioned element is still fully visible.
- >
- );
-};
-
-const VirtualElement = () => {
- const [target, setTarget] = React.useState(null);
-
- const { containerRef, targetRef } = usePositioning({
- position: 'below',
- align: 'end',
- });
-
- React.useEffect(() => {
- if (target) {
- const virtualElement: PositioningVirtualElement = {
- getBoundingClientRect: () => target.getBoundingClientRect(),
- };
-
- targetRef.current = virtualElement;
- }
- }, [target, targetRef]);
-
- return (
- <>
- Target
- Anchored using virtual element
- >
- );
-};
-
-const TargetProp = () => {
- const [target, setTarget] = React.useState(null);
-
- const { containerRef } = usePositioning({
- target,
- position: 'below',
- align: 'end',
- });
-
- return (
- <>
- Target
- Anchored using target property
- >
- );
-};
-
-const ImperativeTarget = () => {
- const positioningRef = React.useRef({ updatePosition: () => null, setTarget: () => null });
- const ref = React.useRef(null);
-
- const { containerRef } = usePositioning({
- positioningRef,
- position: 'below',
- align: 'end',
- });
-
- React.useEffect(() => {
- if (ref.current) {
- positioningRef.current.setTarget(ref.current);
- }
- }, []);
-
- return (
- <>
- Target
- Anchored using setTarget
- >
- );
-};
-
-const VisibilityModifiers = () => {
- const styles = useStyles();
- const popper = usePositioning({ align: 'center', position: 'above' });
-
- return (
- <>
-
- This visual test asserts that visual styles are applied based on popper element's state:
-
-
-
- green when the popper element intersects boundaries
-
-
- red when the reference is hidden
-
-
- yellow when the popper escapes the reference element's boundary
-
-
-
-
-
- Box with visibility modifiers
-
- >
- );
-};
-
-storiesOf('Positioning', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('position and align props', () => , { includeRtl: true })
- .addStory('offset', () => , { includeRtl: true })
- .addStory('offset function', () => , { includeRtl: true })
- .addStory('coverTarget', () => , { includeRtl: true })
- .addStory('vertical flip', () => )
- .addStory('horizontal flip', () => , { includeRtl: true })
- .addStory('vertical overflow', () => )
- .addStory('horizontal overflow', () => , { includeRtl: true })
- .addStory('pinned', () => )
- .addStory('auto size', () => )
- .addStory('disable tether', () => )
- .addStory('position fixed', () => , { includeRtl: true })
- .addStory('virtual element', () => )
- .addStory('target property', () => )
- .addStory('imperative target', () => )
- .addStory('visibility modifiers', () => (
-
-
-
- ))
- .addStory('arrow', () => , { includeRtl: true });
diff --git a/apps/vr-tests-react-components/src/stories/PresenceBadge.stories.tsx b/apps/vr-tests-react-components/src/stories/PresenceBadge.stories.tsx
deleted file mode 100644
index 537d44061f264..0000000000000
--- a/apps/vr-tests-react-components/src/stories/PresenceBadge.stories.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import { storiesOf } from '@storybook/react';
-import * as React from 'react';
-import { PresenceBadge, PresenceBadgeProps } from '@fluentui/react-badge';
-
-const statuses: PresenceBadgeProps['status'][] = [
- 'available',
- 'away',
- 'busy',
- 'do-not-disturb',
- 'offline',
- 'out-of-office',
- 'unknown',
-];
-
-storiesOf('PresenceBadge Converged - status', module).addStory(
- 'default',
- () => (
-
- {statuses.map(status => (
-
- ))}
-
- ),
- { includeRtl: true },
-);
-
-storiesOf('PresenceBadge Converged - OOF status', module).addStory(
- 'default',
- () => (
-
- {statuses.map(status => (
-
- ))}
-
- ),
- { includeRtl: true },
-);
-
-storiesOf('PresenceBadge Converged - sizes', module).addStory(
- 'default',
- () => (
-
- {(['tiny', 'extra-small', 'small', 'medium', 'large', 'extra-large'] as PresenceBadgeProps['size'][]).map(
- size => (
-
- ),
- )}
-
- ),
- { includeRtl: true },
-);
diff --git a/apps/vr-tests-react-components/src/stories/Radio.stories.tsx b/apps/vr-tests-react-components/src/stories/Radio.stories.tsx
deleted file mode 100644
index c64c4054c4444..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Radio.stories.tsx
+++ /dev/null
@@ -1,108 +0,0 @@
-import * as React from 'react';
-import Screener, { Steps } from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { Radio, RadioGroup } from '@fluentui/react-radio';
-import { TestWrapperDecoratorFixedWidth } from '../utilities/TestWrapperDecorator';
-
-storiesOf('Radio Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('unchecked', () => , {
- includeDarkMode: true,
- includeHighContrast: true,
- })
- .addStory('checked', () => , {
- includeDarkMode: true,
- includeHighContrast: true,
- })
- .addStory('disabled', () => , {
- includeDarkMode: true,
- includeHighContrast: true,
- });
-
-storiesOf('Radio Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => (
- {story()}
- ))
- .addStory('disabled+checked', () => , {
- includeDarkMode: true,
- includeHighContrast: true,
- })
- .addStory('no-label', () => , { includeRtl: true })
- .addStory('label-after', () => , { includeRtl: true })
- .addStory('label-below', () => , { includeRtl: true })
- .addStory(
- 'label-wrapping',
- () => (
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
- dolore magna aliqua
- >
- }
- />
- ),
- { includeRtl: true },
- )
- .addStory('required', () => , { includeRtl: true })
- //
- // RadioGroup
- //
- .addStory(
- 'group-vertical',
- () => (
-
-
-
-
-
- ),
- { includeRtl: true },
- )
- .addStory(
- 'group-horizontal',
- () => (
-
-
-
-
-
- ),
- { includeRtl: true },
- )
- .addStory(
- 'group-horizontal-stacked',
- () => (
-
-
-
-
-
- ),
- { includeRtl: true },
- )
- .addStory(
- 'group-disabled',
- () => (
-
-
-
-
-
- ),
- { includeRtl: true },
- );
diff --git a/apps/vr-tests-react-components/src/stories/Select.stories.tsx b/apps/vr-tests-react-components/src/stories/Select.stories.tsx
deleted file mode 100644
index 981fe8337690d..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Select.stories.tsx
+++ /dev/null
@@ -1,81 +0,0 @@
-import * as React from 'react';
-import Screener, { Steps } from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { Select } from '@fluentui/react-select';
-import { TestWrapperDecoratorFixedWidth } from '../utilities/TestWrapperDecorator';
-
-storiesOf('Select Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('Appearance: outline (default)', () => (
-
- text
-
- ))
- .addStory('Appearance: underline', () => (
-
- text
-
- ))
- .addStory('Appearance: filled-darker', () => (
-
-
- text
-
-
- ))
- .addStory('Appearance: filled-lighter', () => (
-
-
- text
-
-
- ));
-
-// Non-interactive stories
-storiesOf('Select Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- // note: due to reused "Select Converged" story ID, TestWrapperDecoratorFixedWidth is also reused
- .addDecorator(story => (
- {story()}
- ))
- .addStory('With value', () => (
-
- Red
- Green
- Blue
-
- ))
- .addStory('Disabled', () => (
-
- text
-
- ))
- .addStory('Size: small', () => (
-
- text
-
- ))
- .addStory('Size: large', () => (
-
- text
-
- ))
- .addStory('Custom Icon', () => (
-
- text
-
- ));
diff --git a/apps/vr-tests-react-components/src/stories/Slider.stories.tsx b/apps/vr-tests-react-components/src/stories/Slider.stories.tsx
deleted file mode 100644
index e0e4782a007af..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Slider.stories.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import * as React from 'react';
-import Screener, { Steps } from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { Slider } from '@fluentui/react-slider';
-
-storiesOf('Slider Converged', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('Root', () => , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Vertical', () => , {
- includeRtl: true,
- })
- .addStory('Disabled', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Disabled Vertical', () => );
diff --git a/apps/vr-tests-react-components/src/stories/SpinButton.stories.tsx b/apps/vr-tests-react-components/src/stories/SpinButton.stories.tsx
deleted file mode 100644
index 71d8244ee8776..0000000000000
--- a/apps/vr-tests-react-components/src/stories/SpinButton.stories.tsx
+++ /dev/null
@@ -1,166 +0,0 @@
-import * as React from 'react';
-import Screener, { Steps } from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { SpinButton, spinButtonClassNames } from '@fluentui/react-spinbutton';
-import { TestWrapperDecoratorFixedWidth } from '../utilities/TestWrapperDecorator';
-
-const cropTo = '.testWrapper';
-
-storiesOf('SpinButton Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('Appearance: outline (default)', () => , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Appearance: underline', () => , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Appearance: filled-darker', () => , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory(
- 'Appearance: filled-lighter',
- () => (
- // filledLighter requires a background to show up (this is colorNeutralBackground3 in web light theme)
-
-
-
- ),
- { includeRtl: true, includeHighContrast: true, includeDarkMode: true },
- )
- .addStory('Display Value', () => , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Disabled', () => , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- });
-
-// The order of increment/decrement mouse down matters for max bound
-storiesOf('SpinButton Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('At Max Bound', () => , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- });
-
-// The order of increment/decrement mouse down matters for min bound
-storiesOf('SpinButton Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('At Min Bound', () => , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- });
-
-storiesOf('SpinButton Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => {story()} )
- .addStory('Size: small', () => , {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Size: medium (default)', () => , { includeRtl: true });
diff --git a/apps/vr-tests-react-components/src/stories/Spinner.stories.tsx b/apps/vr-tests-react-components/src/stories/Spinner.stories.tsx
deleted file mode 100644
index 7f7b414ca3553..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Spinner.stories.tsx
+++ /dev/null
@@ -1,241 +0,0 @@
-import * as React from 'react';
-import { storiesOf } from '@storybook/react';
-import { Spinner } from '@fluentui/react-spinner';
-import { tokens } from '@fluentui/react-theme';
-import { TestWrapperDecoratorNoAnimation } from '../utilities/TestWrapperDecorator';
-
-// Inverted Spinners are meant to be used over a dark background
-// or photo. This wrapper ensures a dark background so the Spinners
-// are consistently visible.
-const InvertedWrapper: React.FC = ({ children }) => {
- return {children}
;
-};
-
-storiesOf('Spinner converged', module)
- .addDecorator(TestWrapperDecoratorNoAnimation)
- .addStory('Primary', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Primary with Label', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory(
- 'Primary with Label Before',
- () => ,
- {
- includeHighContrast: true,
- includeDarkMode: true,
- includeRtl: true,
- },
- )
- .addStory(
- 'Primary with Label After',
- () => ,
- {
- includeHighContrast: true,
- includeDarkMode: true,
- includeRtl: true,
- },
- )
- .addStory(
- 'Primary with Label Above',
- () => ,
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Primary with Label Below',
- () => ,
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory('Primary with Size Tiny', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Primary with Size Extra Small', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Primary with Size Small', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Primary with Size Medium', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Primary with Size Large', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Primary with Size Extra Large', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory('Primary with Huge', () => , {
- includeHighContrast: true,
- includeDarkMode: true,
- })
- .addStory(
- 'Inverted',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Inverted with Label',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Inverted with Label Before',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Inverted with Label After',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Inverted with Label Above',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Inverted with Label Below',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Primary with Size Tiny',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Inverted with Size Extra Small',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Inverted with Size Small',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Inverted with Size Medium',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Inverted with Size Large',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Inverted with Size Extra Large',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Inverted with Huge',
- () => (
-
-
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- );
diff --git a/apps/vr-tests-react-components/src/stories/Switch.stories.tsx b/apps/vr-tests-react-components/src/stories/Switch.stories.tsx
deleted file mode 100644
index 2e2226dbe6e02..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Switch.stories.tsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import * as React from 'react';
-import Screener, { Steps } from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { Switch } from '@fluentui/react-switch';
-import { TestWrapperDecorator } from '../utilities/TestWrapperDecorator';
-
-storiesOf('Switch Converged', module)
- .addDecorator(TestWrapperDecorator)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory(
- 'Enabled and unchecked',
- () => ,
- {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Enabled and checked',
- () => ,
- {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Disabled and unchecked',
- () => ,
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Disabled and checked',
- () => ,
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory('With label above', () => , {
- includeRtl: true,
- })
- .addStory('With label after', () => , {
- includeRtl: true,
- })
- .addStory('With label before', () => , {
- includeRtl: true,
- })
- .addStory('With label wrapping', () => (
-
- ))
- .addStory('Required', () => );
diff --git a/apps/vr-tests-react-components/src/stories/Table.stories.tsx b/apps/vr-tests-react-components/src/stories/Table.stories.tsx
deleted file mode 100644
index 7cc6d55f519e7..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Table.stories.tsx
+++ /dev/null
@@ -1,559 +0,0 @@
-import * as React from 'react';
-import {
- FolderRegular,
- EditRegular,
- OpenRegular,
- DocumentRegular,
- PeopleRegular,
- DocumentPdfRegular,
- VideoRegular,
- MoreHorizontalRegular,
-} from '@fluentui/react-icons';
-import { Avatar } from '@fluentui/react-avatar';
-import { PresenceBadgeStatus } from '@fluentui/react-badge';
-import {
- Table,
- TableHeader,
- TableBody,
- TableHeaderCell,
- TableCell,
- TableRow,
- TableCellLayout,
- TableSelectionCell,
- TableCellActions,
- TableProps,
-} from '@fluentui/react-table';
-import { Button } from '@fluentui/react-button';
-import { storiesOf } from '@storybook/react';
-import Screener from 'screener-storybook/src/screener';
-
-const items = [
- {
- file: { label: 'Meeting notes', icon: },
- author: { label: 'Max Mustermann', status: 'available' },
- lastUpdated: { label: '7h ago', timestamp: 1 },
- lastUpdate: {
- label: 'You edited this',
- icon: ,
- },
- },
- {
- file: { label: 'Thursday presentation', icon: },
- author: { label: 'Erika Mustermann', status: 'busy' },
- lastUpdated: { label: 'Yesterday at 1:45 PM', timestamp: 2 },
- lastUpdate: {
- label: 'You recently opened this',
- icon: ,
- },
- },
- {
- file: { label: 'Training recording', icon: },
- author: { label: 'John Doe', status: 'away' },
- lastUpdated: { label: 'Yesterday at 1:45 PM', timestamp: 2 },
- lastUpdate: {
- label: 'You recently opened this',
- icon: ,
- },
- },
- {
- file: { label: 'Purchase order', icon: },
- author: { label: 'Jane Doe', status: 'offline' },
- lastUpdated: { label: 'Tue at 9:30 AM', timestamp: 3 },
- lastUpdate: {
- label: 'You shared this in a Teams chat',
- icon: ,
- },
- },
-];
-
-const columns = [
- { columnKey: 'file', label: 'File' },
- { columnKey: 'author', label: 'Author' },
- { columnKey: 'lastUpdated', label: 'Last updated' },
- { columnKey: 'lastUpdate', label: 'Last update' },
-];
-
-interface SharedVrTestArgs {
- noNativeElements: TableProps['noNativeElements'];
-}
-
-const CellActionsDefault: React.FC = ({ noNativeElements }) => (
-
-
-
- {columns.map(column => (
- {column.label}
- ))}
-
-
-
- {items.map(item => (
-
-
-
- {item.file.label}
-
- } appearance="subtle" />
- } appearance="subtle" />
-
-
-
-
- }
- >
- {item.author.label}
-
-
- {item.lastUpdated.label}
-
- {item.lastUpdate.label}
-
-
- ))}
-
-
-);
-
-const CellActionsAlwaysVisible: React.FC = ({ noNativeElements }) => (
-
-
-
- {columns.map(column => (
- {column.label}
- ))}
-
-
-
- {items.map(item => (
-
-
-
- {item.file.label}
-
- } appearance="subtle" />
- } appearance="subtle" />
-
-
-
-
- }
- >
- {item.author.label}
-
-
- {item.lastUpdated.label}
-
- {item.lastUpdate.label}
-
-
- ))}
-
-
-);
-
-const CellActionsInHeaderCell: React.FC = ({ noNativeElements }) => (
-
-
-
- {columns.map(column => (
- {column.label}
- ))}
-
-
-
- {items.map(item => (
-
-
-
- {item.file.label}
-
- } appearance="subtle" />
- } appearance="subtle" />
-
-
-
-
- }
- >
- {item.author.label}
-
-
- {item.lastUpdated.label}
-
- {item.lastUpdate.label}
-
-
- ))}
-
-
-);
-
-const SizeMedium: React.FC = ({ noNativeElements }) => (
-
-
-
- {columns.map(column => (
- {column.label}
- ))}
-
-
-
- {items.map(item => (
-
-
- {item.file.label}
-
-
- }
- >
- {item.author.label}
-
-
-
- {item.lastUpdated.label}
-
-
- {item.lastUpdate.label}
-
-
- ))}
-
-
-);
-
-const SizeSmall: React.FC = ({ noNativeElements }) => (
-
-
-
- {columns.map(column => (
- {column.label}
- ))}
-
-
-
- {items.map(item => (
-
-
- {item.file.label}
-
-
-
- }
- >
- {item.author.label}
-
-
- {item.lastUpdated.label}
-
- {item.lastUpdate.label}
-
-
- ))}
-
-
-);
-
-const SizeSmaller: React.FC = ({ noNativeElements }) => (
-
-
-
- {columns.map(column => (
- {column.label}
- ))}
-
-
-
- {items.map(item => (
-
-
- {item.file.label}
-
-
-
- }
- >
- {item.author.label}
-
-
- {item.lastUpdated.label}
-
- {item.lastUpdate.label}
-
-
- ))}
-
-
-);
-
-const PrimaryCell: React.FC = ({ noNativeElements }) => (
-
-
-
- {columns.map(column => (
- {column.label}
- ))}
-
-
-
- {items.map(item => (
-
-
-
- {item.file.label}
-
-
- }
- >
- {item.author.label}
-
- {item.lastUpdated.label}
-
- {item.lastUpdate.label}
-
-
- ))}
-
-
-);
-
-const Multiselect: React.FC = ({ noNativeElements }) => (
-
-
-
-
- {columns.map(column => (
- {column.label}
- ))}
-
-
-
- {items.map(item => (
-
-
-
- {item.file.label}
-
-
- }
- >
- {item.author.label}
-
-
- {item.lastUpdated.label}
-
- {item.lastUpdate.label}
-
-
- ))}
-
-
-);
-
-const MultiselectChecked: React.FC = ({ noNativeElements }) => (
-
-
-
-
- {columns.map(column => (
- {column.label}
- ))}
-
-
-
- {items.map(item => (
-
-
-
- {item.file.label}
-
-
- }
- >
- {item.author.label}
-
-
- {item.lastUpdated.label}
-
- {item.lastUpdate.label}
-
-
- ))}
-
-
-);
-
-const MultiselectMixed: React.FC = ({ noNativeElements }) => (
-
-
-
-
- {columns.map(column => (
- {column.label}
- ))}
-
-
-
- {items.map((item, i) => (
-
-
-
- {item.file.label}
-
-
- }
- >
- {item.author.label}
-
-
- {item.lastUpdated.label}
-
- {item.lastUpdate.label}
-
-
- ))}
-
-
-);
-
-const Singleselect: React.FC = ({ noNativeElements }) => (
-
-
-
-
- {columns.map(column => (
- {column.label}
- ))}
-
-
-
- {items.map(item => (
-
-
-
- {item.file.label}
-
-
- }
- >
- {item.author.label}
-
-
- {item.lastUpdated.label}
-
- {item.lastUpdate.label}
-
-
- ))}
-
-
-);
-
-const SingleselectChecked: React.FC = ({ noNativeElements }) => (
-
-
-
-
- {columns.map(column => (
- {column.label}
- ))}
-
-
-
- {items.map((item, i) => (
-
-
-
- {item.file.label}
-
-
-
- }
- >
- {item.author.label}
-
-
- {item.lastUpdated.label}
-
- {item.lastUpdate.label}
-
-
- ))}
-
-
-);
-
-([true, false] as const).forEach(noNativeElements => {
- const layoutName = noNativeElements ? 'flex' : 'table';
- storiesOf(`Table layout ${layoutName} - cell actions`, module)
- .addDecorator(story => (
- {story()}
- ))
- .addStory('default', () => , {
- includeDarkMode: true,
- includeHighContrast: true,
- includeRtl: true,
- })
- .addStory('always visible', () => , {
- includeDarkMode: true,
- includeHighContrast: true,
- includeRtl: true,
- })
- .addStory('in header cell', () => );
-
- storiesOf(`Table layout ${layoutName}`, module)
- .addStory('size - medium', () => , {
- includeDarkMode: true,
- includeHighContrast: true,
- includeRtl: true,
- })
- .addStory('size - small', () => )
- .addStory('size - smaller', () => )
- .addStory('primary cell', () => )
- .addStory('multiselect', () => , {
- includeDarkMode: true,
- includeHighContrast: true,
- includeRtl: true,
- })
- .addStory('multiselect (checked)', () => , {
- includeDarkMode: true,
- includeHighContrast: true,
- includeRtl: true,
- })
- .addStory('multiselect (mixed)', () => , {
- includeDarkMode: true,
- includeHighContrast: true,
- includeRtl: true,
- })
- .addStory('single select', () => , {
- includeDarkMode: true,
- includeHighContrast: true,
- includeRtl: true,
- })
- .addStory('single select (checked)', () => , {
- includeDarkMode: true,
- includeHighContrast: true,
- includeRtl: true,
- });
-});
diff --git a/apps/vr-tests-react-components/src/stories/Tabs.stories.tsx b/apps/vr-tests-react-components/src/stories/Tabs.stories.tsx
deleted file mode 100644
index 1c397958bfa53..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Tabs.stories.tsx
+++ /dev/null
@@ -1,190 +0,0 @@
-import { storiesOf } from '@storybook/react';
-import * as React from 'react';
-import Screener from 'screener-storybook/src/screener';
-import { TabList, Tab } from '@fluentui/react-tabs';
-
-storiesOf('TabList and Tab Converged', module)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory(
- 'Default',
- () => (
-
- First
-
- Second
-
- Third
-
- ),
- {
- includeRtl: true,
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory('Vertical', () => (
-
- First
-
- Second
-
- Third
-
- ))
- .addStory(
- 'Subtle appearance',
- () => (
-
- First
-
- Second
-
- Third
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Small size',
- () => (
-
- First
-
- Second
-
- Third
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Vertical and small size',
- () => (
-
- First
-
- Second
-
- Third
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Tab Selected (default)',
- () => (
-
- First
-
- Second
-
- Third
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'Tab Selected',
- () => (
-
- First
-
- Second
-
- Third
-
- ),
- {
- includeHighContrast: true,
- includeDarkMode: true,
- },
- )
- .addStory(
- 'With icon',
- () => (
-
-
- First
-
-
- Second
-
-
- Third
-
-
- ),
- {
- includeRtl: true,
- },
- )
- .addStory(
- 'With icon and vertical',
- () => (
-
-
- First
-
-
- Second
-
-
- Third
-
-
- ),
- {
- includeRtl: true,
- },
- )
- .addStory(
- 'With icon only',
- () => (
-
-
-
-
-
- ),
- {
- includeRtl: false,
- },
- )
- .addStory(
- 'With icon only and vertical',
- () => (
-
-
-
-
-
- ),
- {
- includeRtl: false,
- },
- );
diff --git a/apps/vr-tests-react-components/src/stories/Text.stories.tsx b/apps/vr-tests-react-components/src/stories/Text.stories.tsx
deleted file mode 100644
index 52edf3df66c81..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Text.stories.tsx
+++ /dev/null
@@ -1,157 +0,0 @@
-import * as React from 'react';
-import { storiesOf } from '@storybook/react';
-import Screener from 'screener-storybook/src/screener';
-import {
- Body1,
- Caption1,
- Display,
- Subtitle1,
- LargeTitle,
- Subtitle2,
- Text,
- Title1,
- Title2,
- Title3,
- Caption2,
-} from '@fluentui/react-text';
-
-storiesOf('Text Converged', module)
- .addDecorator((story: () => React.ReactNode) => (
-
-
- {story()}
-
-
- ))
- .addStory(
- 'Default',
- () => (
- <>
-
- Default
- Lorem ipsum dolor sit amet, nullam rhoncus tristique tellus in Portucale.
-
-
- No wrapping
-
- Lorem ipsum dolor sit amet, nullam rhoncus tristique tellus in Portucale.
-
-
-
- Truncate
-
- Lorem ipsum dolor sit amet, nullam rhoncus tristique tellus in Portucale.
-
-
-
- Italic
-
- Hello, world
-
-
-
- Underline
-
- Hello, world
-
-
-
- Strikethrough
-
- Hello, world
-
-
-
- Sizes
-
- 100
-
-
- 200
-
-
- 300
-
-
- 400
-
-
- 500
-
-
- 600
-
-
- 700
-
-
- 800
-
-
- 900
-
-
- 1000
-
-
-
- Fonts
-
- Base
-
-
- Monospace
-
-
- Numeric
-
-
-
- Weights
-
- Regular
-
-
- Medium
-
-
- Semibold
-
-
-
- Alignments
-
- Start
-
-
- Center
-
-
- End
-
-
- Justified lorem ipsum dolor sit amet, nullam rhoncus tristique tellus in Portucale.
-
-
- >
- ),
- { includeRtl: true, includeHighContrast: true, includeDarkMode: true },
- )
- .addStory(
- 'Typography wrappers',
- () => (
- <>
- Display
- LargeTitle
- Title1
- Title2
- Title3
- Subtitle1
- Subtitle2
- Body1
- Caption1
- Caption2
- >
- ),
- { includeRtl: true },
- );
diff --git a/apps/vr-tests-react-components/src/stories/Textarea.stories.tsx b/apps/vr-tests-react-components/src/stories/Textarea.stories.tsx
deleted file mode 100644
index e0d46bd934085..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Textarea.stories.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import * as React from 'react';
-import Screener, { Steps } from 'screener-storybook/src/screener';
-import { storiesOf } from '@storybook/react';
-import { Textarea } from '@fluentui/react-textarea';
-import { TestWrapperDecoratorFixedWidth } from '../utilities/TestWrapperDecorator';
-
-storiesOf('Textarea Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('Appearance: outline (default)', () => )
- .addStory('Appearance: filled-darker', () => )
- .addStory('Appearance: filled-lighter', () => (
-
-
-
- ))
- .addStory('Disabled', () => )
- .addStory('With value', () => );
-
-// Non interactive
-storiesOf('Textarea Converged', module)
- .addDecorator(TestWrapperDecoratorFixedWidth)
- .addDecorator(story => (
- {story()}
- ))
- .addStory('Size: small', () => )
- .addStory('Size: medium', () => )
- .addStory('Size: large', () => );
diff --git a/apps/vr-tests-react-components/src/stories/Tooltip.stories.tsx b/apps/vr-tests-react-components/src/stories/Tooltip.stories.tsx
deleted file mode 100644
index a23266f49cfba..0000000000000
--- a/apps/vr-tests-react-components/src/stories/Tooltip.stories.tsx
+++ /dev/null
@@ -1,137 +0,0 @@
-import * as React from 'react';
-import { storiesOf } from '@storybook/react';
-import { Tooltip } from '@fluentui/react-tooltip';
-import { TestWrapperDecorator } from '../utilities/index';
-import { makeStyles, shorthands } from '@griffel/react';
-import { tokens } from '@fluentui/react-theme';
-import Screener from 'screener-storybook/src/screener';
-
-const useStyles = makeStyles({
- wrapper: {
- display: 'flex',
- ...shorthands.gap('5px'),
- ...shorthands.padding('50px', '120px'),
- backgroundColor: tokens.colorNeutralBackground1,
-
- '& button, & .target': {
- color: tokens.colorNeutralForeground1,
- backgroundColor: tokens.colorNeutralBackground1,
- ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1),
- },
- },
-});
-
-storiesOf('Tooltip Converged', module)
- .addDecorator(TestWrapperDecorator)
- .addStory(
- 'basic',
- () => (
-
-
- Target
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true },
- )
- .addStory(
- 'inverted',
- () => (
-
-
- Target
-
-
- ),
- { includeDarkMode: true },
- )
- .addStory(
- 'withArrow',
- () => (
-
-
- Target
-
-
- ),
- { includeDarkMode: true, includeHighContrast: true },
- )
- .addStory(
- 'inverted withArrow',
- () => (
-
-
- Target
-
-
- ),
- { includeDarkMode: true },
- )
- .addStory('text-wrapping', () => (
-
-
- Target
-
-
- ));
-
-const TooltipPositioning: React.FC = () => {
- const positions = [
- ['above', 'start'],
- ['above', 'center'],
- ['above', 'end'],
- ['below', 'start'],
- ['below', 'center'],
- ['below', 'end'],
- ['before', 'top'],
- ['before', 'center'],
- ['before', 'bottom'],
- ['after', 'top'],
- ['after', 'center'],
- ['after', 'bottom'],
- ] as const;
-
- const [target, setTarget] = React.useState(null);
- const [visible, setVisible] = React.useState(false);
-
- return (
-
-
- {positions.map(([position, align]) => (
-
- ))}
-
- setVisible(true)}>
- Show tooltips
-
-
-
- );
-};
-
-storiesOf('Tooltip Converged', module)
- .addDecorator(TestWrapperDecorator)
- .addDecorator(story => (
-
- {story()}
-
- ))
- .addStory('positioning', () => , { includeRtl: true, includeHighContrast: true });
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index a68b0f019512d..959710727c3bf 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -10,14 +10,12 @@ variables:
- name: sinceArg
value: --since $(targetBranch)
- - group: fabric-variables
-
- template: .devops/templates/variables.yml
pool: '1ES-Host-Ubuntu'
jobs:
- - job: BuildTestLint
+ - job: TestVRTool
workspace:
clean: all
steps:
@@ -29,83 +27,37 @@ jobs:
displayName: yarn (install packages)
- script: |
- yarn nx workspace-lint
- yarn nx run @fluentui/nx-workspace-tools:check-graph
- displayName: NX workspace lint
-
- - script: |
- yarn check:installed-dependencies-versions
- displayName: 'check packages: installed dependencies versions'
-
- - script: |
- if [[ -n "$(targetBranch)" ]]; then
- yarn format --since $(targetBranch) --check
- else
- yarn format --all --check
- fi
- displayName: check formatting
-
- ## Danger.js checks for Fluent UI N*
- - script: |
- yarn danger ci
- displayName: danger
- condition: eq(variables.isPR, true)
- env:
- DANGER_GITHUB_API_TOKEN: $(DANGER_GITHUB_API_TOKEN)
-
- - script: |
- yarn buildci $(sinceArg)
- displayName: build, test, lint
-
- - template: .devops/templates/cleanup.yml
-
- - job: DeployE2E
- displayName: Deploy and E2E
- workspace:
- clean: all
- steps:
- - template: .devops/templates/tools.yml
-
- - task: Bash@3
- inputs:
- filePath: yarn-ci.sh
- displayName: yarn
+ yarn workspace @fluentui/vr-tests-react-components screener:build
+ displayName: Build vr tests components package
- # this also builds FUI N* docs if appropriate
- script: |
- yarn bundle $(sinceArg)
- displayName: bundle
-
+ yarn lage test:component --verbose
+ displayName: 'Run VR tests'
+
- script: |
- yarn lage build-storybook --verbose $(sinceArg)
- displayName: build Storybooks
+ mkdir -p screenshots
+ cp -rf apps/vr-tests-react-components/dist/screenshots/*.png screenshots/
+ cd screenshots
+ for file in *"\""*; do
+ echo $file
+ mv -- "$file" "${file//\"/}"
+ done
- ## This runs regardless of scope, the app will adapt to the scope as well
- - script: |
- yarn workspace @fluentui/pr-deploy-site generate:site
- displayName: generate PR Deploy Site
+ for file in *"<"*; do
+ echo $file
+ mv -- "$file" "${file// }"
+ done
- - task: AzureUpload@2
- displayName: Upload PR deploy site
- inputs:
- azureSubscription: $(azureSubscription)
- BlobPrefix: $(deployBasePath)
- ContainerName: '$web'
- SourcePath: 'apps/pr-deploy-site/dist'
- storage: $(azureStorage)
+ for file in *">"*; do
+ echo $file
+ mv -- "$file" "${file//>/ }"
+ done
+ displayName: Collate Artifacts
- - task: GithubPRStatus@0
- displayName: 'Update PR deploy site github status'
+ - task: PublishBuildArtifacts@1
inputs:
- githubOwner: microsoft
- githubRepo: fluentui
- githubContext: 'Pull request demo site'
- githubDescription: 'Click "Details" to go to the deployed demo site for this pull request'
- # This MUST have a trailing slash, or the links to PR deploy site assets won't work
- githubTargetLink: $(deployUrl)/
-
- - script: |
- yarn e2e $(sinceArg)
- displayName: Cypress E2E tests
-
+ PathtoPublish: 'screenshots'
+ ArtifactName: 'vrscreenshot'
+ publishLocation: 'Container'
+
- template: .devops/templates/cleanup.yml
diff --git a/yarn.lock b/yarn.lock
index 0ffd9c3a0d8e1..56e5ed39c6733 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6251,6 +6251,15 @@
"@types/scheduler" "*"
csstype "^3.0.2"
+"@types/react@^17.0.8":
+ version "17.0.50"
+ resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.50.tgz#39abb4f7098f546cfcd6b51207c90c4295ee81fc"
+ integrity sha512-ZCBHzpDb5skMnc1zFXAXnL3l1FAdi+xZvwxK+PkglMmBrwjpp9nKaWuEvrGnSifCJmBFGxZOOFuwC6KH/s0NuA==
+ dependencies:
+ "@types/prop-types" "*"
+ "@types/scheduler" "*"
+ csstype "^3.0.2"
+
"@types/read-pkg-up@^6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@types/read-pkg-up/-/read-pkg-up-6.0.0.tgz#7926c93cf14d906e9829a859e790323d0f338684"
@@ -22248,6 +22257,18 @@ pkg-up@^4.0.0:
dependencies:
find-up "^6.2.0"
+playwright-core@1.26.1:
+ version "1.26.1"
+ resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.26.1.tgz#a162f476488312dcf12638d97685144de6ada512"
+ integrity sha512-hzFchhhxnEiPc4qVPs9q2ZR+5eKNifY2hQDHtg1HnTTUuphYCBP8ZRb2si+B1TR7BHirgXaPi48LIye5SgrLAA==
+
+playwright@^1.11.1:
+ version "1.26.1"
+ resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.26.1.tgz#0082c1d6a1c9cefe3f7a593396ad8568746184d0"
+ integrity sha512-WQmEdCgYYe8jOEkhkW9QLcK0PB+w1RZztBLYIT10MEEsENYg251cU0IzebDINreQsUt+HCwwRhtdz4weH9ICcQ==
+ dependencies:
+ playwright-core "1.26.1"
+
please-upgrade-node@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942"
@@ -23461,7 +23482,7 @@ react@16.14.0, react@^16.0.0:
object-assign "^4.1.1"
prop-types "^15.6.2"
-react@17.0.2:
+react@17.0.2, react@^17.0.2:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
@@ -25575,6 +25596,16 @@ storybook-addon-performance@0.16.1:
tiny-invariant "^1.1.0"
xstate "^4.22.0"
+storywright@0.0.22:
+ version "0.0.22"
+ resolved "https://registry.yarnpkg.com/storywright/-/storywright-0.0.22.tgz#a3f472cbeedaf89c36ad26ae162a1b1109da1826"
+ integrity sha512-iKlyRbFOwlcwpyNqeRKTbAGkDECt5DnBnvgjcJD0xrwU3kdKOoUHNnsN4wkFfGPYUMsuFXCuxJxopYUvgIxNgg==
+ dependencies:
+ "@types/react" "^17.0.8"
+ playwright "^1.11.1"
+ react "^17.0.2"
+ yargs "^16.2.0"
+
stream-browserify@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b"
@@ -26355,7 +26386,7 @@ terser@5.14.2, terser@^5.3.4, terser@^5.5.1, terser@^5.7.2:
source-map-support "~0.5.20"
terser@^4.1.2, terser@^4.3.9, terser@^4.6.12, terser@^4.6.2, terser@^4.6.3:
- version "4.8.1"
+ version "4.8.0"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17"
integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==
dependencies: