Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/public-docsite-v9/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import * as rootPreview from '../../../.storybook/preview';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Avatar Converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Avatar Converged.badgeMask - RTL.normal.chromium.png 3 Changed
vr-tests-react-components/Charts-DonutChart 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic - Dark Mode.default.chromium.png 7530 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic.default.chromium.png 5581 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 413 Changed
vr-tests-react-components/Portal 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Portal.Apply Class Names.should have green border.chromium.png 15 Changed
vr-tests-react-components/Positioning 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 975 Changed
vr-tests-react-components/TagPicker 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - Dark Mode.disabled input hover.chromium.png 658 Changed
vr-tests-react-components/TagPicker.disabled - RTL.disabled input hover.chromium.png 635 Changed
vr-tests-react-components/TagPicker.disabled.disabled input hover.chromium.png 677 Changed

There were 3 duplicate changes discarded. Check the build logs for more information.

import { withCAPTheme } from '../../../packages/react-components/react-button/stories/src/CAPTheme';

import './docs-root-v9.css';

/** @type {NonNullable<import('@storybook/react').Decorator[]>} */
export const decorators = rootPreview.decorators;
export const decorators = [...rootPreview.decorators, withCAPTheme];

/** @type {import("@fluentui/react-storybook-addon").FluentParameters & typeof rootPreview.parameters} */
export const parameters = {
Expand Down
2 changes: 2 additions & 0 deletions packages/react-components/react-button/library/docs/SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ The `Button` component has several apparance variants depending on where it's be
- appearance="primary": The `Button` is styled to emphasize that it represents the primary action.
- appearance="subtle": The `Button` is styled to blend into its background to become less emphasized.
- appearance="transparent": The `Button` is styled such that it has no background or border styling and is just emphasized through its content styling.
- appearance="tint": The `Button` is styled with a tinted background using brand colors.
- appearance="outlineColor": The `Button` is styled with a colored outline using brand colors.

### Icon

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface ButtonContextValue {

// @public (undocumented)
export type ButtonProps = ComponentProps<ButtonSlots> & {
appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent';
appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent' | 'tint' | 'outlineColor';
disabledFocusable?: boolean;
disabled?: boolean;
iconPosition?: 'before' | 'after';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ export type ButtonProps = ComponentProps<ButtonSlots> & {
* - 'outline': Removes background styling.
* - 'subtle': Minimizes emphasis to blend into the background until hovered or focused.
* - 'transparent': Removes background and border styling.
* - 'tint': Applies a tinted background with brand colors.
* - 'outlineColor': Applies a colored outline with brand colors.
*
* @default 'secondary'
*/
appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent';
appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent' | 'tint' | 'outlineColor';

/**
* When set, allows the button to be focusable even when it has been disabled. This is used in scenarios where it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@ const useRootStyles = makeStyles({
},
},
},
tint: {
/* Styles provided by consumer via custom hooks */
},
outlineColor: {
/* Styles provided by consumer via custom hooks */
},

// Shape variations
circular: { borderRadius: tokens.borderRadiusCircular },
Expand Down Expand Up @@ -459,6 +465,12 @@ const useRootDisabledStyles = makeStyles({
...shorthands.borderColor('transparent'),
},
},
tint: {
/* Styles provided by consumer via custom hooks */
},
outlineColor: {
/* Styles provided by consumer via custom hooks */
},
});

const useRootFocusStyles = makeStyles({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ const useRootStyles = makeStyles({
},
},
},
tint: {
/* Styles provided by custom hooks */
},
outlineColor: {
/* Styles provided by custom hooks */
},

// Size variations
small: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ const useRootExpandedStyles = makeStyles({
backgroundColor: tokens.colorTransparentBackgroundSelected,
color: tokens.colorNeutralForeground2BrandSelected,
},
tint: {
/* Styles provided by consumer via custom hooks */
},
outlineColor: {
/* Styles provided by consumer via custom hooks */
},
});

const useIconExpandedStyles = makeStyles({
Expand All @@ -64,6 +70,12 @@ const useIconExpandedStyles = makeStyles({
transparent: {
color: tokens.colorNeutralForeground2BrandSelected,
},
tint: {
/* Styles provided by consumer via custom hooks */
},
outlineColor: {
/* Styles provided by consumer via custom hooks */
},
highContrast: {
// High contrast styles
'@media (forced-colors: active)': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ const useRootStyles = makeStyles({
},
},
},
tint: {
/* Styles provided by consumer via custom hooks */
},
outlineColor: {
/* Styles provided by consumer via custom hooks */
},

// Shape variations
circular: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ const useRootCheckedStyles = makeStyles({
color: tokens.colorNeutralForeground2BrandPressed,
},
},
tint: {
/* Styles provided by custom hooks */
},
outlineColor: {
/* Styles provided by custom hooks */
},
});

const useRootDisabledStyles = makeStyles({
Expand Down Expand Up @@ -210,6 +216,12 @@ const useRootDisabledStyles = makeStyles({
...shorthands.borderColor('transparent'),
},
},
tint: {
/* Styles provided by custom hooks */
},
outlineColor: {
/* Styles provided by custom hooks */
},
});

const useIconCheckedStyles = makeStyles({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as rootPreview from '../../../../../.storybook/preview';
import { withCAPTheme } from '../src/CAPTheme';

/** @type {typeof rootPreview.decorators} */
export const decorators = [...rootPreview.decorators];
export const decorators = [...rootPreview.decorators, withCAPTheme];

/** @type {typeof rootPreview.parameters} */
export const parameters = { ...rootPreview.parameters };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const useStyles = makeStyles({
wrapper: {
columnGap: '15px',
display: 'flex',
flexWrap: 'wrap',
rowGap: '15px',
},
});

Expand All @@ -30,6 +32,12 @@ export const Appearance = (): JSXElement => {
<Button appearance="transparent" icon={<CalendarMonth />}>
Transparent
</Button>
<Button appearance="tint" icon={<CalendarMonth />}>
Tint
</Button>
<Button appearance="outlineColor" icon={<CalendarMonth />}>
Outline Color
</Button>
</div>
);
};
Expand All @@ -42,7 +50,9 @@ Appearance.parameters = {
'- `primary`: emphasizes the button as a primary action.\n' +
'- `outline`: removes background styling.\n' +
'- `subtle`: minimizes emphasis to blend into the background until hovered or focused\n' +
'- `transparent`: removes background and border styling.\n',
'- `transparent`: removes background and border styling.\n' +
'- `tint`: applies a tinted background with brand colors.\n' +
'- `outlineColor`: applies a colored outline with brand colors.\n',
},
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// This styles mock the actualy CAP theme styles, that once ready will be exported from "@fluentui-contrib/react-cap-theme" package.
export { withCAPTheme } from './withCAPTheme';
export { useCapButtonStyles } from './useCapButtonStyles';
export { useCapMenuButtonStyles } from './useCapMenuButtonStyles';
export { useCapSplitButtonStyles } from './useCapSplitButtonStyles';
export { useCapToggleButtonStyles } from './useCapToggleButtonStyles';
Loading
Loading