first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
import * as React from 'react';
import type { IKeytipProps } from './Keytip.types';
import type { JSXElement } from '@fluentui/utilities';
/**
* A callout corresponding to another Fabric component to describe a key sequence that will activate that component
*/
export declare class Keytip extends React.Component<IKeytipProps, {}> {
render(): JSXElement;
}
+48
View File
@@ -0,0 +1,48 @@
import { __assign, __extends } from "tslib";
import * as React from 'react';
import { getFirstVisibleElementFromSelector } from '../../Utilities';
import { mergeOverflows, ktpTargetFromSequences } from '../../utilities/keytips/KeytipUtils';
import { Callout } from '../../Callout';
import { DirectionalHint } from '../../ContextualMenu';
import { KeytipContent } from './KeytipContent';
import { getCalloutStyles, getCalloutOffsetStyles } from './Keytip.styles';
/**
* A callout corresponding to another Fabric component to describe a key sequence that will activate that component
*/
var Keytip = /** @class */ (function (_super) {
__extends(Keytip, _super);
function Keytip() {
return _super !== null && _super.apply(this, arguments) || this;
}
Keytip.prototype.render = function () {
var _a = this.props, keySequences = _a.keySequences, offset = _a.offset, overflowSetSequence = _a.overflowSetSequence;
var calloutProps = this.props.calloutProps;
var keytipTarget;
// Take into consideration the overflow sequence
if (overflowSetSequence) {
keytipTarget = ktpTargetFromSequences(mergeOverflows(keySequences, overflowSetSequence));
}
else {
keytipTarget = ktpTargetFromSequences(keySequences);
}
var element = getFirstVisibleElementFromSelector(keytipTarget);
if (!element) {
return React.createElement(React.Fragment, null);
}
keytipTarget = element;
if (offset) {
// Set callout to top-left corner, will be further positioned in
// getCalloutOffsetStyles
calloutProps = __assign({ coverTarget: true, directionalHint: DirectionalHint.topLeftEdge }, calloutProps);
}
if (!calloutProps || calloutProps.directionalHint === undefined) {
// Default callout directional hint to BottomCenter
calloutProps = __assign(__assign({}, calloutProps), { directionalHint: DirectionalHint.bottomCenter });
}
return (React.createElement(Callout, __assign({}, calloutProps, { isBeakVisible: false, doNotLayer: true, minPagePadding: 0, styles: offset ? getCalloutOffsetStyles(offset) : getCalloutStyles, preventDismissOnScroll: true, target: keytipTarget }),
React.createElement(KeytipContent, __assign({}, this.props))));
};
return Keytip;
}(React.Component));
export { Keytip };
//# sourceMappingURL=Keytip.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"Keytip.js","sourceRoot":"../src/","sources":["components/Keytip/Keytip.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kCAAkC,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7F,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAM3E;;GAEG;AACH;IAA4B,0BAAiC;IAA7D;;IAqDA,CAAC;IApDQ,uBAAM,GAAb;QACQ,IAAA,KAAgD,IAAI,CAAC,KAAK,EAAxD,YAAY,kBAAA,EAAE,MAAM,YAAA,EAAE,mBAAmB,yBAAe,CAAC;QAC3D,IAAA,YAAY,GAAK,IAAI,CAAC,KAAK,aAAf,CAAgB;QAElC,IAAI,YAAoB,CAAC;QACzB,gDAAgD;QAChD,IAAI,mBAAmB,EAAE,CAAC;YACxB,YAAY,GAAG,sBAAsB,CAAC,cAAc,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC,CAAC;QAC3F,CAAC;aAAM,CAAC;YACN,YAAY,GAAG,sBAAsB,CAAC,YAAY,CAAC,CAAC;QACtD,CAAC;QAED,IAAM,OAAO,GAAG,kCAAkC,CAAC,YAAY,CAAC,CAAC;QAEjE,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,yCAAK,CAAC;QACf,CAAC;QAED,YAAY,GAAG,OAAO,CAAC;QAEvB,IAAI,MAAM,EAAE,CAAC;YACX,gEAAgE;YAChE,yBAAyB;YACzB,YAAY,cACV,WAAW,EAAE,IAAI,EACjB,eAAe,EAAE,eAAe,CAAC,WAAW,IACzC,YAAY,CAChB,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;YAChE,mDAAmD;YACnD,YAAY,yBACP,YAAY,KACf,eAAe,EAAE,eAAe,CAAC,YAAY,GAC9C,CAAC;QACJ,CAAC;QAED,OAAO,CACL,oBAAC,OAAO,eACF,YAAY,IAChB,aAAa,EAAE,KAAK,EACpB,UAAU,EAAE,IAAI,EAChB,cAAc,EAAE,CAAC,EACjB,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,gBAAgB,EAClE,sBAAsB,EAAE,IAAI,EAC5B,MAAM,EAAE,YAAY;YAEpB,oBAAC,aAAa,eAAK,IAAI,CAAC,KAAK,EAAI,CACzB,CACX,CAAC;IACJ,CAAC;IACH,aAAC;AAAD,CAAC,AArDD,CAA4B,KAAK,CAAC,SAAS,GAqD1C","sourcesContent":["import * as React from 'react';\nimport { getFirstVisibleElementFromSelector } from '../../Utilities';\nimport { mergeOverflows, ktpTargetFromSequences } from '../../utilities/keytips/KeytipUtils';\nimport { Callout } from '../../Callout';\nimport { DirectionalHint } from '../../ContextualMenu';\nimport { KeytipContent } from './KeytipContent';\nimport { getCalloutStyles, getCalloutOffsetStyles } from './Keytip.styles';\nimport type { IKeytipProps } from './Keytip.types';\nimport type { Target } from '@fluentui/react-hooks';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\n/**\n * A callout corresponding to another Fabric component to describe a key sequence that will activate that component\n */\nexport class Keytip extends React.Component<IKeytipProps, {}> {\n public render(): JSXElement {\n const { keySequences, offset, overflowSetSequence } = this.props;\n let { calloutProps } = this.props;\n\n let keytipTarget: Target;\n // Take into consideration the overflow sequence\n if (overflowSetSequence) {\n keytipTarget = ktpTargetFromSequences(mergeOverflows(keySequences, overflowSetSequence));\n } else {\n keytipTarget = ktpTargetFromSequences(keySequences);\n }\n\n const element = getFirstVisibleElementFromSelector(keytipTarget);\n\n if (!element) {\n return <></>;\n }\n\n keytipTarget = element;\n\n if (offset) {\n // Set callout to top-left corner, will be further positioned in\n // getCalloutOffsetStyles\n calloutProps = {\n coverTarget: true,\n directionalHint: DirectionalHint.topLeftEdge,\n ...calloutProps,\n };\n }\n\n if (!calloutProps || calloutProps.directionalHint === undefined) {\n // Default callout directional hint to BottomCenter\n calloutProps = {\n ...calloutProps,\n directionalHint: DirectionalHint.bottomCenter,\n };\n }\n\n return (\n <Callout\n {...calloutProps}\n isBeakVisible={false}\n doNotLayer={true}\n minPagePadding={0}\n styles={offset ? getCalloutOffsetStyles(offset) : getCalloutStyles}\n preventDismissOnScroll={true}\n target={keytipTarget}\n >\n <KeytipContent {...this.props} />\n </Callout>\n );\n }\n}\n"]}
@@ -0,0 +1,6 @@
import type { IKeytipStyleProps, IKeytipStyles } from './Keytip.types';
import type { ICalloutContentStyleProps, ICalloutContentStyles } from '../../Callout';
import type { IStyleFunction, Point } from '../../Utilities';
export declare const getStyles: (props: IKeytipStyleProps) => IKeytipStyles;
export declare const getCalloutStyles: (props: ICalloutContentStyleProps) => ICalloutContentStyles;
export declare const getCalloutOffsetStyles: (offset: Point) => IStyleFunction<ICalloutContentStyleProps, ICalloutContentStyles>;
+74
View File
@@ -0,0 +1,74 @@
import { mergeStyleSets, HighContrastSelector } from '../../Styling';
export var getStyles = function (props) {
var _a;
var theme = props.theme, disabled = props.disabled, visible = props.visible;
return {
container: [
{
backgroundColor: theme.palette.neutralDark,
},
disabled && {
opacity: 0.5,
selectors: (_a = {},
_a[HighContrastSelector] = {
color: 'GrayText',
opacity: 1,
},
_a),
},
!visible && {
visibility: 'hidden',
},
],
root: [
theme.fonts.medium,
{
textAlign: 'center',
paddingLeft: '3px',
paddingRight: '3px',
backgroundColor: theme.palette.neutralDark,
color: theme.palette.neutralLight,
minWidth: '11px',
lineHeight: '17px',
height: '17px',
display: 'inline-block',
},
disabled && {
color: theme.palette.neutralTertiaryAlt,
},
],
};
};
export var getCalloutStyles = function (props) {
return {
container: [],
root: [
{
border: 'none',
boxShadow: 'none',
},
],
beak: [],
beakCurtain: [],
calloutMain: [
{
backgroundColor: 'transparent',
},
],
};
};
export var getCalloutOffsetStyles = function (offset) {
return function (props) {
return mergeStyleSets(getCalloutStyles(props), {
root: [
{
// eslint-disable-next-line @typescript-eslint/no-deprecated
marginLeft: offset.left || offset.x,
// eslint-disable-next-line @typescript-eslint/no-deprecated
marginTop: offset.top || offset.y,
},
],
});
};
};
//# sourceMappingURL=Keytip.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Keytip.styles.js","sourceRoot":"../src/","sources":["components/Keytip/Keytip.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAKrE,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,KAAwB;;IACxC,IAAA,KAAK,GAAwB,KAAK,MAA7B,EAAE,QAAQ,GAAc,KAAK,SAAnB,EAAE,OAAO,GAAK,KAAK,QAAV,CAAW;IAC3C,OAAO;QACL,SAAS,EAAE;YACT;gBACE,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;aAC3C;YACD,QAAQ,IAAI;gBACV,OAAO,EAAE,GAAG;gBACZ,SAAS;oBACP,GAAC,oBAAoB,IAAG;wBACtB,KAAK,EAAE,UAAU;wBACjB,OAAO,EAAE,CAAC;qBACX;uBACF;aACF;YACD,CAAC,OAAO,IAAI;gBACV,UAAU,EAAE,QAAQ;aACrB;SACF;QACD,IAAI,EAAE;YACJ,KAAK,CAAC,KAAK,CAAC,MAAM;YAClB;gBACE,SAAS,EAAE,QAAQ;gBACnB,WAAW,EAAE,KAAK;gBAClB,YAAY,EAAE,KAAK;gBACnB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;gBAC1C,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;gBACjC,QAAQ,EAAE,MAAM;gBAChB,UAAU,EAAE,MAAM;gBAClB,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,cAAc;aACxB;YACD,QAAQ,IAAI;gBACV,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,kBAAkB;aACxC;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,KAAgC;IAC/D,OAAO;QACL,SAAS,EAAE,EAAE;QACb,IAAI,EAAE;YACJ;gBACE,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,MAAM;aAClB;SACF;QACD,IAAI,EAAE,EAAE;QACR,WAAW,EAAE,EAAE;QACf,WAAW,EAAE;YACX;gBACE,eAAe,EAAE,aAAa;aAC/B;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,sBAAsB,GAAG,UACpC,MAAa;IAEb,OAAO,UAAC,KAAgC;QACtC,OAAO,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC7C,IAAI,EAAE;gBACJ;oBACE,4DAA4D;oBAC5D,UAAU,EAAE,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC;oBACnC,4DAA4D;oBAC5D,SAAS,EAAE,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC;iBAClC;aACF;SACF,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { mergeStyleSets, HighContrastSelector } from '../../Styling';\nimport type { IKeytipStyleProps, IKeytipStyles } from './Keytip.types';\nimport type { ICalloutContentStyleProps, ICalloutContentStyles } from '../../Callout';\nimport type { IStyleFunction, Point } from '../../Utilities';\n\nexport const getStyles = (props: IKeytipStyleProps): IKeytipStyles => {\n const { theme, disabled, visible } = props;\n return {\n container: [\n {\n backgroundColor: theme.palette.neutralDark,\n },\n disabled && {\n opacity: 0.5,\n selectors: {\n [HighContrastSelector]: {\n color: 'GrayText',\n opacity: 1,\n },\n },\n },\n !visible && {\n visibility: 'hidden',\n },\n ],\n root: [\n theme.fonts.medium,\n {\n textAlign: 'center',\n paddingLeft: '3px',\n paddingRight: '3px',\n backgroundColor: theme.palette.neutralDark,\n color: theme.palette.neutralLight,\n minWidth: '11px',\n lineHeight: '17px',\n height: '17px',\n display: 'inline-block',\n },\n disabled && {\n color: theme.palette.neutralTertiaryAlt,\n },\n ],\n };\n};\n\nexport const getCalloutStyles = (props: ICalloutContentStyleProps): ICalloutContentStyles => {\n return {\n container: [],\n root: [\n {\n border: 'none',\n boxShadow: 'none',\n },\n ],\n beak: [],\n beakCurtain: [],\n calloutMain: [\n {\n backgroundColor: 'transparent',\n },\n ],\n };\n};\n\nexport const getCalloutOffsetStyles = (\n offset: Point,\n): IStyleFunction<ICalloutContentStyleProps, ICalloutContentStyles> => {\n return (props: ICalloutContentStyleProps): ICalloutContentStyles => {\n return mergeStyleSets(getCalloutStyles(props), {\n root: [\n {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n marginLeft: offset.left || offset.x,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n marginTop: offset.top || offset.y,\n },\n ],\n });\n };\n};\n"]}
+104
View File
@@ -0,0 +1,104 @@
import type { ICalloutProps } from '../../Callout';
import type { IStyle, ITheme } from '../../Styling';
import type { IStyleFunctionOrObject, Point } from '../../Utilities';
/**
* {@docCategory Keytips}
*/
export interface IKeytipProps {
/**
* Content to put inside the keytip
*/
content: string;
/**
* Theme for the component
*/
theme?: ITheme;
/**
* T/F if the corresponding control for this keytip is disabled
*/
disabled?: boolean;
/**
* T/F if the keytip is visible
*/
visible?: boolean;
/**
* Function to call when this keytip is activated.
* 'executeTarget' is the DOM element marked with 'data-ktp-execute-target'.
* 'target' is the DOM element marked with 'data-ktp-target'.
*/
onExecute?: (executeTarget: HTMLElement | null, target: HTMLElement | null) => void;
/**
* Function to call when the keytip is the currentKeytip and a return sequence is pressed.
* 'executeTarget' is the DOM element marked with 'data-ktp-execute-target'.
* 'target' is the DOM element marked with 'data-ktp-target'.
*/
onReturn?: (executeTarget: HTMLElement | null, target: HTMLElement | null) => void;
/**
* Array of KeySequences which is the full key sequence to trigger this keytip
* Should not include initial 'start' key sequence
*/
keySequences: string[];
/**
* Full KeySequence of the overflow set button, will be set automatically if this keytip is inside an overflow
*/
overflowSetSequence?: string[];
/**
* ICalloutProps to pass to the callout element
*/
calloutProps?: ICalloutProps;
/**
* Optional styles for the component.
*/
styles?: IStyleFunctionOrObject<IKeytipStyleProps, IKeytipStyles>;
/**
* Offset x and y for the keytip, added from the top-left corner
* By default the keytip will be anchored to the bottom-center of the element
*/
offset?: Point;
/**
* Whether or not this keytip will have children keytips that are dynamically created (DOM is generated on
* keytip activation). Common cases are a Pivot or Modal.
*/
hasDynamicChildren?: boolean;
/**
* Whether or not this keytip belongs to a component that has a menu
* Keytip mode will stay on when a menu is opened, even if the items in that menu have no keytips
*/
hasMenu?: boolean;
/**
* Whether or not this keytip belongs to a component that is in an overflow menu
* and also has a menu
*/
hasOverflowSubMenu?: boolean;
}
/**
* Props to style Keytip component
* {@docCategory Keytips}
*/
export interface IKeytipStyleProps {
/**
* The theme for the keytip.
*/
theme: ITheme;
/**
* Whether the keytip is disabled or not.
*/
disabled?: boolean;
/**
* T/F if the keytip is visible
*/
visible?: boolean;
}
/**
* {@docCategory Keytips}
*/
export interface IKeytipStyles {
/**
* Style for the div container surrounding the keytip content.
*/
container: IStyle;
/**
* Style for the keytip content element.
*/
root: IStyle;
}
+2
View File
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=Keytip.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Keytip.types.js","sourceRoot":"../src/","sources":["components/Keytip/Keytip.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ICalloutProps } from '../../Callout';\nimport type { IStyle, ITheme } from '../../Styling';\nimport type { IStyleFunctionOrObject, Point } from '../../Utilities';\n\n/**\n * {@docCategory Keytips}\n */\nexport interface IKeytipProps {\n /**\n * Content to put inside the keytip\n */\n content: string;\n\n /**\n * Theme for the component\n */\n theme?: ITheme;\n\n /**\n * T/F if the corresponding control for this keytip is disabled\n */\n disabled?: boolean;\n\n /**\n * T/F if the keytip is visible\n */\n visible?: boolean;\n\n /**\n * Function to call when this keytip is activated.\n * 'executeTarget' is the DOM element marked with 'data-ktp-execute-target'.\n * 'target' is the DOM element marked with 'data-ktp-target'.\n */\n onExecute?: (executeTarget: HTMLElement | null, target: HTMLElement | null) => void;\n\n /**\n * Function to call when the keytip is the currentKeytip and a return sequence is pressed.\n * 'executeTarget' is the DOM element marked with 'data-ktp-execute-target'.\n * 'target' is the DOM element marked with 'data-ktp-target'.\n */\n onReturn?: (executeTarget: HTMLElement | null, target: HTMLElement | null) => void;\n\n /**\n * Array of KeySequences which is the full key sequence to trigger this keytip\n * Should not include initial 'start' key sequence\n */\n keySequences: string[];\n\n /**\n * Full KeySequence of the overflow set button, will be set automatically if this keytip is inside an overflow\n */\n overflowSetSequence?: string[];\n\n /**\n * ICalloutProps to pass to the callout element\n */\n calloutProps?: ICalloutProps;\n\n /**\n * Optional styles for the component.\n */\n styles?: IStyleFunctionOrObject<IKeytipStyleProps, IKeytipStyles>;\n\n /**\n * Offset x and y for the keytip, added from the top-left corner\n * By default the keytip will be anchored to the bottom-center of the element\n */\n offset?: Point;\n\n /**\n * Whether or not this keytip will have children keytips that are dynamically created (DOM is generated on\n * keytip activation). Common cases are a Pivot or Modal.\n */\n hasDynamicChildren?: boolean;\n\n /**\n * Whether or not this keytip belongs to a component that has a menu\n * Keytip mode will stay on when a menu is opened, even if the items in that menu have no keytips\n */\n hasMenu?: boolean;\n\n /**\n * Whether or not this keytip belongs to a component that is in an overflow menu\n * and also has a menu\n */\n hasOverflowSubMenu?: boolean;\n}\n\n/**\n * Props to style Keytip component\n * {@docCategory Keytips}\n */\nexport interface IKeytipStyleProps {\n /**\n * The theme for the keytip.\n */\n theme: ITheme;\n\n /**\n * Whether the keytip is disabled or not.\n */\n disabled?: boolean;\n\n /**\n * T/F if the keytip is visible\n */\n visible?: boolean;\n}\n\n/**\n * {@docCategory Keytips}\n */\nexport interface IKeytipStyles {\n /**\n * Style for the div container surrounding the keytip content.\n */\n container: IStyle;\n\n /**\n * Style for the keytip content element.\n */\n root: IStyle;\n}\n"]}
@@ -0,0 +1,10 @@
import * as React from 'react';
import type { IKeytipProps } from './Keytip.types';
import type { JSXElement } from '@fluentui/utilities';
/**
* A component corresponding the content rendered inside the callout of the keytip component.
* {@docCategory Keytips}
*/
export declare class KeytipContentBase extends React.Component<IKeytipProps, {}> {
render(): JSXElement;
}
@@ -0,0 +1,27 @@
import { __extends } from "tslib";
import * as React from 'react';
import { classNamesFunction } from '../../Utilities';
/**
* A component corresponding the content rendered inside the callout of the keytip component.
* {@docCategory Keytips}
*/
var KeytipContentBase = /** @class */ (function (_super) {
__extends(KeytipContentBase, _super);
function KeytipContentBase() {
return _super !== null && _super.apply(this, arguments) || this;
}
KeytipContentBase.prototype.render = function () {
var _a = this.props, content = _a.content, styles = _a.styles, theme = _a.theme, disabled = _a.disabled, visible = _a.visible;
var getClassNames = classNamesFunction();
var classNames = getClassNames(styles, {
theme: theme,
disabled: disabled,
visible: visible,
});
return (React.createElement("div", { className: classNames.container },
React.createElement("span", { className: classNames.root }, content)));
};
return KeytipContentBase;
}(React.Component));
export { KeytipContentBase };
//# sourceMappingURL=KeytipContent.base.js.map
@@ -0,0 +1 @@
{"version":3,"file":"KeytipContent.base.js","sourceRoot":"../src/","sources":["components/Keytip/KeytipContent.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAKrD;;;GAGG;AACH;IAAuC,qCAAiC;IAAxE;;IAiBA,CAAC;IAhBQ,kCAAM,GAAb;QACQ,IAAA,KAAgD,IAAI,CAAC,KAAK,EAAxD,OAAO,aAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,OAAO,aAAe,CAAC;QAEjE,IAAM,aAAa,GAAG,kBAAkB,EAAoC,CAAC;QAC7E,IAAM,UAAU,GAAG,aAAa,CAAC,MAAO,EAAE;YACxC,KAAK,EAAE,KAAM;YACb,QAAQ,UAAA;YACR,OAAO,SAAA;SACR,CAAC,CAAC;QAEH,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU,CAAC,SAAS;YAClC,8BAAM,SAAS,EAAE,UAAU,CAAC,IAAI,IAAG,OAAO,CAAQ,CAC9C,CACP,CAAC;IACJ,CAAC;IACH,wBAAC;AAAD,CAAC,AAjBD,CAAuC,KAAK,CAAC,SAAS,GAiBrD","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction } from '../../Utilities';\nimport type { IKeytipProps, IKeytipStyleProps, IKeytipStyles } from './Keytip.types';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\n/**\n * A component corresponding the content rendered inside the callout of the keytip component.\n * {@docCategory Keytips}\n */\nexport class KeytipContentBase extends React.Component<IKeytipProps, {}> {\n public render(): JSXElement {\n const { content, styles, theme, disabled, visible } = this.props;\n\n const getClassNames = classNamesFunction<IKeytipStyleProps, IKeytipStyles>();\n const classNames = getClassNames(styles!, {\n theme: theme!,\n disabled,\n visible,\n });\n\n return (\n <div className={classNames.container}>\n <span className={classNames.root}>{content}</span>\n </div>\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IKeytipProps } from './Keytip.types';
export declare const KeytipContent: React.FunctionComponent<IKeytipProps>;
+7
View File
@@ -0,0 +1,7 @@
import { styled } from '../../Utilities';
import { KeytipContentBase } from './KeytipContent.base';
import { getStyles } from './Keytip.styles';
export var KeytipContent = styled(KeytipContentBase, getStyles, undefined, {
scope: 'KeytipContent',
});
//# sourceMappingURL=KeytipContent.js.map
@@ -0,0 +1 @@
{"version":3,"file":"KeytipContent.js","sourceRoot":"../src/","sources":["components/Keytip/KeytipContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,CAAC,IAAM,aAAa,GAA0C,MAAM,CAIxE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE;IACzC,KAAK,EAAE,eAAe;CACvB,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { KeytipContentBase } from './KeytipContent.base';\nimport { getStyles } from './Keytip.styles';\nimport type { IKeytipProps, IKeytipStyleProps, IKeytipStyles } from './Keytip.types';\n\nexport const KeytipContent: React.FunctionComponent<IKeytipProps> = styled<\n IKeytipProps,\n IKeytipStyleProps,\n IKeytipStyles\n>(KeytipContentBase, getStyles, undefined, {\n scope: 'KeytipContent',\n});\n"]}
+2
View File
@@ -0,0 +1,2 @@
export * from './Keytip';
export * from './Keytip.types';
+3
View File
@@ -0,0 +1,3 @@
export * from './Keytip';
export * from './Keytip.types';
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Keytip/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './Keytip';\nexport * from './Keytip.types';\n"]}