* Element shown as a timestamp on this activity. If not included, no timestamp is shown.
*/
timeStamp?: string | React.ReactNode[] | React.ReactNode;
+
+ /**
+ * Beacon color one
+ */
+ beaconColorOne?: string;
+
+ /**
+ * Beacon color two
+ */
+ beaconColorTwo?: string;
+
+ /**
+ * Enables/Disables the beacon that radiates
+ * from the center of the center of the activity icon. Signals an activity has started.
+ * @default false
+ */
+ animateBeaconSignal?: boolean;
}
export interface IActivityItemStyles {
@@ -84,6 +101,11 @@ export interface IActivityItemStyles {
*/
root?: IStyle;
+ /**
+ * Styles applied to the root activity item container.
+ */
+ pulsingBeacon?: IStyle;
+
/**
* Styles applied to the main container of the activity's description.
*/
diff --git a/packages/office-ui-fabric-react/src/components/ActivityItem/__snapshots__/ActivityItem.test.tsx.snap b/packages/office-ui-fabric-react/src/components/ActivityItem/__snapshots__/ActivityItem.test.tsx.snap
index 080d69cf5cce9..164b56b09f407 100644
--- a/packages/office-ui-fabric-react/src/components/ActivityItem/__snapshots__/ActivityItem.test.tsx.snap
+++ b/packages/office-ui-fabric-react/src/components/ActivityItem/__snapshots__/ActivityItem.test.tsx.snap
@@ -23,19 +23,30 @@ exports[`ActivityItem renders compact with a single persona correctly 1`] = `
className=
ms-ActivityItem-activityTypeIcon
{
+ align-items: center;
color: #0078d4;
+ display: flex;
font-size: 13px;
height: 16px;
+ justify-content: center;
line-height: 13px;
margin-top: 1px;
+ min-width: 16px;
+ position: relative;
}
& .ms-Persona-imageArea {
border-radius: 50%;
border: 2px solid#ffffff;
+ margin-bottom: 0;
+ margin-left: -2px;
+ margin-right: 0;
margin-top: -2px;
}
@media screen and (-ms-high-contrast: active){& .ms-Persona-imageArea {
border: none;
+ margin-bottom: 0;
+ margin-left: 0;
+ margin-right: 0;
margin-top: 0;
}
>
@@ -214,19 +225,30 @@ exports[`ActivityItem renders compact with an icon correctly 1`] = `
className=
ms-ActivityItem-activityTypeIcon
{
+ align-items: center;
color: #0078d4;
+ display: flex;
font-size: 13px;
height: 16px;
+ justify-content: center;
line-height: 13px;
margin-top: 1px;
+ min-width: 16px;
+ position: relative;
}
& .ms-Persona-imageArea {
border-radius: 50%;
border: 2px solid#ffffff;
+ margin-bottom: 0;
+ margin-left: -2px;
+ margin-right: 0;
margin-top: -2px;
}
@media screen and (-ms-high-contrast: active){& .ms-Persona-imageArea {
border: none;
+ margin-bottom: 0;
+ margin-left: 0;
+ margin-right: 0;
margin-top: 0;
}
>
@@ -270,6 +292,233 @@ exports[`ActivityItem renders compact with an icon correctly 1`] = `
`;
+exports[`ActivityItem renders compact with animation correctly 1`] = `
+
+
+
+
+
+
+
+
+ TN
+
+
+
+

+
+
+
+
+
+
+
+
+ description text
+
+
+
+
+`;
+
exports[`ActivityItem renders compact with multiple personas correctly 1`] = `
diff --git a/packages/office-ui-fabric-react/src/components/Coachmark/Coachmark.styles.ts b/packages/office-ui-fabric-react/src/components/Coachmark/Coachmark.styles.ts
index 08374d695f52e..fbca8bb40fa53 100644
--- a/packages/office-ui-fabric-react/src/components/Coachmark/Coachmark.styles.ts
+++ b/packages/office-ui-fabric-react/src/components/Coachmark/Coachmark.styles.ts
@@ -2,7 +2,9 @@ import {
IStyle,
IRawStyle,
keyframes,
- PulsingBeaconAnimationStyles
+ PulsingBeaconAnimationStyles,
+ ITheme,
+ getTheme
} from '../../Styling';
export interface ICoachmarkStyleProps {
@@ -217,14 +219,15 @@ export const rotateOne: string = keyframes({
}
});
-export function getStyles(props: ICoachmarkStyleProps): ICoachmarkStyles {
+export function getStyles(props: ICoachmarkStyleProps, theme: ITheme = getTheme(),
+): ICoachmarkStyles {
const animationInnerDimension = '35px';
const animationOuterDimension = '150px';
const animationBorderWidth = '10px';
- const ContinuousPulse: string = PulsingBeaconAnimationStyles.continuousPulseAnimation(
- props.beaconColorOne!,
- props.beaconColorTwo!,
+ const ContinuousPulse: string = PulsingBeaconAnimationStyles.continuousPulseAnimationDouble(
+ props.beaconColorOne ? props.beaconColorOne : theme.palette.themePrimary,
+ props.beaconColorTwo ? props.beaconColorTwo : theme.palette.themeTertiary,
animationInnerDimension,
animationOuterDimension,
animationBorderWidth
diff --git a/packages/office-ui-fabric-react/src/components/Coachmark/Coachmark.tsx b/packages/office-ui-fabric-react/src/components/Coachmark/Coachmark.tsx
index 0500dd656c5f7..456be317cb78d 100644
--- a/packages/office-ui-fabric-react/src/components/Coachmark/Coachmark.tsx
+++ b/packages/office-ui-fabric-react/src/components/Coachmark/Coachmark.tsx
@@ -71,8 +71,6 @@ export class Coachmark extends BaseComponent {
delayBeforeMouseOpen: 3600, // The approximate time the coachmark shows up
width: 36,
height: 36,
- beaconColorOne: '#00FFEC',
- beaconColorTwo: '#005EDD',
color: DefaultPalette.themePrimary
};
@@ -108,9 +106,7 @@ export class Coachmark extends BaseComponent {
target,
width,
height,
- color,
- beaconColorOne,
- beaconColorTwo
+ color
} = this.props;
const classNames = getClassNames(getStyles, {
@@ -121,9 +117,7 @@ export class Coachmark extends BaseComponent {
entityHostWidth: this.state.entityInnerHostRect.width + 'px',
width: width + 'px',
height: height + 'px',
- color: color,
- beaconColorOne: beaconColorOne,
- beaconColorTwo: beaconColorTwo
+ color: color
});
return (
diff --git a/packages/styling/src/styles/PulsingBeaconAnimationStyles.ts b/packages/styling/src/styles/PulsingBeaconAnimationStyles.ts
index eac7e609045cf..bc15dbadd6a60 100644
--- a/packages/styling/src/styles/PulsingBeaconAnimationStyles.ts
+++ b/packages/styling/src/styles/PulsingBeaconAnimationStyles.ts
@@ -45,7 +45,7 @@ function _continuousPulseStepFive(beaconColorOne: string, innerDimension: string
};
}
-function _continuousPulseAnimation(
+function _continuousPulseAnimationDouble(
beaconColorOne: string,
beaconColorTwo: string,
innerDimension: string,
@@ -73,8 +73,24 @@ function _continuousPulseAnimation(
});
}
+function _continuousPulseAnimationSingle(
+ beaconColorOne: string,
+ beaconColorTwo: string,
+ innerDimension: string,
+ outerDimension: string,
+ borderWidth: string
+): string {
+ return keyframes({
+ '0%': _continuousPulseStepOne(beaconColorOne, innerDimension),
+ '14.2%': _continuousPulseStepTwo(borderWidth),
+ '35.7%': _continuousPulseStepThree(),
+ '71.4%': _continuousPulseStepFour(beaconColorTwo, outerDimension),
+ '100%': {}
+ });
+}
+
function _createDefaultAnimation(
- animationName: string,
+ animationName: string
): IRawStyle {
return {
animationName,
@@ -85,6 +101,7 @@ function _createDefaultAnimation(
}
export const PulsingBeaconAnimationStyles = {
- continuousPulseAnimation: _continuousPulseAnimation,
- createDefaultAnimation: _createDefaultAnimation
+ continuousPulseAnimationDouble: _continuousPulseAnimationDouble,
+ continuousPulseAnimationSingle: _continuousPulseAnimationSingle,
+ createDefaultAnimation: _createDefaultAnimation,
};
\ No newline at end of file