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
@@ -0,0 +1,6 @@
import * as React from 'react';
import type { IShimmerLineProps } from './ShimmerLine.types';
/**
* {@docCategory Shimmer}
*/
export declare const ShimmerLineBase: React.FunctionComponent<IShimmerLineProps>;
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShimmerLineBase = void 0;
var React = require("react");
var Utilities_1 = require("../../../Utilities");
var getClassNames = (0, Utilities_1.classNamesFunction)();
/**
* {@docCategory Shimmer}
*/
var ShimmerLineBase = function (props) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var height = props.height, styles = props.styles, _a = props.width, width = _a === void 0 ? '100%' : _a, borderStyle = props.borderStyle, theme = props.theme;
var classNames = getClassNames(styles, {
theme: theme,
height: height,
borderStyle: borderStyle,
});
return (React.createElement("div", { style: { width: width, minWidth: typeof width === 'number' ? "".concat(width, "px") : 'auto' }, className: classNames.root },
React.createElement("svg", { width: "2", height: "2", className: classNames.topLeftCorner },
React.createElement("path", { d: "M0 2 A 2 2, 0, 0, 1, 2 0 L 0 0 Z" })),
React.createElement("svg", { width: "2", height: "2", className: classNames.topRightCorner },
React.createElement("path", { d: "M0 0 A 2 2, 0, 0, 1, 2 2 L 2 0 Z" })),
React.createElement("svg", { width: "2", height: "2", className: classNames.bottomRightCorner },
React.createElement("path", { d: "M2 0 A 2 2, 0, 0, 1, 0 2 L 2 2 Z" })),
React.createElement("svg", { width: "2", height: "2", className: classNames.bottomLeftCorner },
React.createElement("path", { d: "M2 2 A 2 2, 0, 0, 1, 0 0 L 0 2 Z" }))));
};
exports.ShimmerLineBase = ShimmerLineBase;
//# sourceMappingURL=ShimmerLine.base.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ShimmerLine.base.js","sourceRoot":"../src/","sources":["components/Shimmer/ShimmerLine/ShimmerLine.base.tsx"],"names":[],"mappings":";;;AAAA,6BA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AACJ,CAAC,CAAC;AA1BW,QAAA,eAAe,mBA0B1B","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction } from '../../../Utilities';\nimport type { IShimmerLineProps, IShimmerLineStyleProps, IShimmerLineStyles } from './ShimmerLine.types';\n\nconst getClassNames = classNamesFunction<IShimmerLineStyleProps, IShimmerLineStyles>();\n\n/**\n * {@docCategory Shimmer}\n */\nexport const ShimmerLineBase: React.FunctionComponent<IShimmerLineProps> = props => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const { height, styles, width = '100%', borderStyle, theme } = props;\n\n const classNames = getClassNames(styles!, {\n theme: theme!,\n height,\n borderStyle,\n });\n\n return (\n <div style={{ width, minWidth: typeof width === 'number' ? `${width}px` : 'auto' }} className={classNames.root}>\n <svg width=\"2\" height=\"2\" className={classNames.topLeftCorner}>\n <path d=\"M0 2 A 2 2, 0, 0, 1, 2 0 L 0 0 Z\" />\n </svg>\n <svg width=\"2\" height=\"2\" className={classNames.topRightCorner}>\n <path d=\"M0 0 A 2 2, 0, 0, 1, 2 2 L 2 0 Z\" />\n </svg>\n <svg width=\"2\" height=\"2\" className={classNames.bottomRightCorner}>\n <path d=\"M2 0 A 2 2, 0, 0, 1, 0 2 L 2 2 Z\" />\n </svg>\n <svg width=\"2\" height=\"2\" className={classNames.bottomLeftCorner}>\n <path d=\"M2 2 A 2 2, 0, 0, 1, 0 0 L 0 2 Z\" />\n </svg>\n </div>\n );\n};\n"]}
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IShimmerLineProps } from './ShimmerLine.types';
export declare const ShimmerLine: React.FunctionComponent<IShimmerLineProps>;
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShimmerLine = void 0;
var Utilities_1 = require("../../../Utilities");
var ShimmerLine_base_1 = require("./ShimmerLine.base");
var ShimmerLine_styles_1 = require("./ShimmerLine.styles");
exports.ShimmerLine = (0, Utilities_1.styled)(ShimmerLine_base_1.ShimmerLineBase, ShimmerLine_styles_1.getStyles, undefined, {
scope: 'ShimmerLine',
});
//# sourceMappingURL=ShimmerLine.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ShimmerLine.js","sourceRoot":"../src/","sources":["components/Shimmer/ShimmerLine/ShimmerLine.tsx"],"names":[],"mappings":";;;AACA,gDAA4C;AAC5C,uDAAqD;AACrD,2DAAiD;AAGpC,QAAA,WAAW,GAA+C,IAAA,kBAAM,EAI3E,kCAAe,EAAE,8BAAS,EAAE,SAAS,EAAE;IACvC,KAAK,EAAE,aAAa;CACrB,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../../Utilities';\nimport { ShimmerLineBase } from './ShimmerLine.base';\nimport { getStyles } from './ShimmerLine.styles';\nimport type { IShimmerLineProps, IShimmerLineStyleProps, IShimmerLineStyles } from './ShimmerLine.types';\n\nexport const ShimmerLine: React.FunctionComponent<IShimmerLineProps> = styled<\n IShimmerLineProps,\n IShimmerLineStyleProps,\n IShimmerLineStyles\n>(ShimmerLineBase, getStyles, undefined, {\n scope: 'ShimmerLine',\n});\n"]}
@@ -0,0 +1,2 @@
import type { IShimmerLineStyleProps, IShimmerLineStyles } from './ShimmerLine.types';
export declare function getStyles(props: IShimmerLineStyleProps): IShimmerLineStyles;
@@ -0,0 +1,82 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = getStyles;
var Styling_1 = require("../../../Styling");
var GlobalClassNames = {
root: 'ms-ShimmerLine-root',
topLeftCorner: 'ms-ShimmerLine-topLeftCorner',
topRightCorner: 'ms-ShimmerLine-topRightCorner',
bottomLeftCorner: 'ms-ShimmerLine-bottomLeftCorner',
bottomRightCorner: 'ms-ShimmerLine-bottomRightCorner',
};
function getStyles(props) {
var _a;
// eslint-disable-next-line @typescript-eslint/no-deprecated
var height = props.height, borderStyle = props.borderStyle, theme = props.theme;
var semanticColors = theme.semanticColors;
var globalClassNames = (0, Styling_1.getGlobalClassNames)(GlobalClassNames, theme);
var borderStyles = borderStyle || {};
var sharedCornerStyles = {
position: 'absolute',
fill: semanticColors.bodyBackground,
};
return {
root: [
globalClassNames.root,
theme.fonts.medium,
{
height: "".concat(height, "px"),
boxSizing: 'content-box',
position: 'relative',
borderTopStyle: 'solid',
borderBottomStyle: 'solid',
borderColor: semanticColors.bodyBackground,
borderWidth: 0,
selectors: (_a = {},
_a[Styling_1.HighContrastSelector] = {
borderColor: 'Window',
selectors: {
'> *': {
fill: 'Window',
},
},
},
_a),
},
borderStyles,
],
topLeftCorner: [
globalClassNames.topLeftCorner,
{
top: '0',
left: '0',
},
sharedCornerStyles,
],
topRightCorner: [
globalClassNames.topRightCorner,
{
top: '0',
right: '0',
},
sharedCornerStyles,
],
bottomRightCorner: [
globalClassNames.bottomRightCorner,
{
bottom: '0',
right: '0',
},
sharedCornerStyles,
],
bottomLeftCorner: [
globalClassNames.bottomLeftCorner,
{
bottom: '0',
left: '0',
},
sharedCornerStyles,
],
};
}
//# sourceMappingURL=ShimmerLine.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ShimmerLine.styles.js","sourceRoot":"../src/","sources":["components/Shimmer/ShimmerLine/ShimmerLine.styles.ts"],"names":[],"mappings":";;AAYA,8BAwEC;AApFD,4CAA6E;AAI7E,IAAM,gBAAgB,GAAG;IACvB,IAAI,EAAE,qBAAqB;IAC3B,aAAa,EAAE,8BAA8B;IAC7C,cAAc,EAAE,+BAA+B;IAC/C,gBAAgB,EAAE,iCAAiC;IACnD,iBAAiB,EAAE,kCAAkC;CACtD,CAAC;AAEF,SAAgB,SAAS,CAAC,KAA6B;;IACrD,4DAA4D;IACpD,IAAA,MAAM,GAAyB,KAAK,OAA9B,EAAE,WAAW,GAAY,KAAK,YAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;IAErC,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,IAAM,gBAAgB,GAAG,IAAA,6BAAmB,EAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IAEtE,IAAM,YAAY,GAAc,WAAW,IAAI,EAAE,CAAC;IAElD,IAAM,kBAAkB,GAAc;QACpC,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,cAAc,CAAC,cAAc;KACpC,CAAC;IAEF,OAAO;QACL,IAAI,EAAE;YACJ,gBAAgB,CAAC,IAAI;YACrB,KAAK,CAAC,KAAK,CAAC,MAAM;YAClB;gBACE,MAAM,EAAE,UAAG,MAAM,OAAI;gBACrB,SAAS,EAAE,aAAa;gBACxB,QAAQ,EAAE,UAAU;gBACpB,cAAc,EAAE,OAAO;gBACvB,iBAAiB,EAAE,OAAO;gBAC1B,WAAW,EAAE,cAAc,CAAC,cAAc;gBAC1C,WAAW,EAAE,CAAC;gBACd,SAAS;oBACP,GAAC,8BAAoB,IAAG;wBACtB,WAAW,EAAE,QAAQ;wBACrB,SAAS,EAAE;4BACT,KAAK,EAAE;gCACL,IAAI,EAAE,QAAQ;6BACf;yBACF;qBACF;uBACF;aACF;YACD,YAAY;SACb;QACD,aAAa,EAAE;YACb,gBAAgB,CAAC,aAAa;YAC9B;gBACE,GAAG,EAAE,GAAG;gBACR,IAAI,EAAE,GAAG;aACV;YACD,kBAAkB;SACnB;QACD,cAAc,EAAE;YACd,gBAAgB,CAAC,cAAc;YAC/B;gBACE,GAAG,EAAE,GAAG;gBACR,KAAK,EAAE,GAAG;aACX;YACD,kBAAkB;SACnB;QACD,iBAAiB,EAAE;YACjB,gBAAgB,CAAC,iBAAiB;YAClC;gBACE,MAAM,EAAE,GAAG;gBACX,KAAK,EAAE,GAAG;aACX;YACD,kBAAkB;SACnB;QACD,gBAAgB,EAAE;YAChB,gBAAgB,CAAC,gBAAgB;YACjC;gBACE,MAAM,EAAE,GAAG;gBACX,IAAI,EAAE,GAAG;aACV;YACD,kBAAkB;SACnB;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { getGlobalClassNames, HighContrastSelector } from '../../../Styling';\nimport type { IShimmerLineStyleProps, IShimmerLineStyles } from './ShimmerLine.types';\nimport type { IRawStyle } from '../../../Styling';\n\nconst GlobalClassNames = {\n root: 'ms-ShimmerLine-root',\n topLeftCorner: 'ms-ShimmerLine-topLeftCorner',\n topRightCorner: 'ms-ShimmerLine-topRightCorner',\n bottomLeftCorner: 'ms-ShimmerLine-bottomLeftCorner',\n bottomRightCorner: 'ms-ShimmerLine-bottomRightCorner',\n};\n\nexport function getStyles(props: IShimmerLineStyleProps): IShimmerLineStyles {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const { height, borderStyle, theme } = props;\n\n const { semanticColors } = theme;\n const globalClassNames = getGlobalClassNames(GlobalClassNames, theme);\n\n const borderStyles: IRawStyle = borderStyle || {};\n\n const sharedCornerStyles: IRawStyle = {\n position: 'absolute',\n fill: semanticColors.bodyBackground,\n };\n\n return {\n root: [\n globalClassNames.root,\n theme.fonts.medium,\n {\n height: `${height}px`,\n boxSizing: 'content-box',\n position: 'relative',\n borderTopStyle: 'solid',\n borderBottomStyle: 'solid',\n borderColor: semanticColors.bodyBackground,\n borderWidth: 0,\n selectors: {\n [HighContrastSelector]: {\n borderColor: 'Window',\n selectors: {\n '> *': {\n fill: 'Window',\n },\n },\n },\n },\n },\n borderStyles,\n ],\n topLeftCorner: [\n globalClassNames.topLeftCorner,\n {\n top: '0',\n left: '0',\n },\n sharedCornerStyles,\n ],\n topRightCorner: [\n globalClassNames.topRightCorner,\n {\n top: '0',\n right: '0',\n },\n sharedCornerStyles,\n ],\n bottomRightCorner: [\n globalClassNames.bottomRightCorner,\n {\n bottom: '0',\n right: '0',\n },\n sharedCornerStyles,\n ],\n bottomLeftCorner: [\n globalClassNames.bottomLeftCorner,\n {\n bottom: '0',\n left: '0',\n },\n sharedCornerStyles,\n ],\n };\n}\n"]}
@@ -0,0 +1,87 @@
import * as React from 'react';
import type { IStyle, IRawStyle, ITheme } from '../../../Styling';
import type { IStyleFunctionOrObject, IRefObject } from '../../../Utilities';
/**
* {@docCategory Shimmer}
*/
export interface IShimmerLine {
}
/**
* ShimmerLine component props.
* {@docCategory Shimmer}
*/
export interface IShimmerLineProps extends React.AllHTMLAttributes<HTMLElement> {
/**
* Optional callback to access the IShimmerLine interface. Use this instead of ref for accessing
* the public methods and properties of the component.
*/
componentRef?: IRefObject<IShimmerLine>;
/**
* Sets the height of the rectangle.
* @defaultvalue 16px
*/
height?: number;
/**
* Sets width value of the line.
* @defaultvalue 100%
*/
width?: number | string;
/**
* Theme provided by High-Order Component.
*/
theme?: ITheme;
/**
* Call to provide customized styling that will layer on top of the variant rules.
*/
styles?: IStyleFunctionOrObject<IShimmerLineStyleProps, IShimmerLineStyles>;
/**
* Use to set custom styling of the shimmerLine borders.
* @deprecated Use `styles.root` instead.
*/
borderStyle?: IRawStyle;
}
/**
* Props needed to construct styles.
* {@docCategory Shimmer}
*/
export type IShimmerLineStyleProps = {
/**
* Theme values passed to the component.
*/
theme: ITheme;
/**
* Needed to provide a height to the root of the control.
*/
height?: number;
/**
* Styles to override borderStyles with custom ones.
* @deprecated Use `styles.root` instead.
*/
borderStyle?: IRawStyle;
};
/**
* Represents the stylable areas of the control.
* {@docCategory Shimmer}
*/
export interface IShimmerLineStyles {
/**
* Root of the ShimmerLine component.
*/
root?: IStyle;
/**
* Top-left corner SVG of the ShimmerLine component.
*/
topLeftCorner?: IStyle;
/**
* Top-right corner SVG of the ShimmerLine component.
*/
topRightCorner?: IStyle;
/**
* Bottom-right corner SVG of the ShimmerLine component.
*/
bottomRightCorner?: IStyle;
/**
* Bottom-left corner SVG of the ShimmerLine component.
*/
bottomLeftCorner?: IStyle;
}
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=ShimmerLine.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ShimmerLine.types.js","sourceRoot":"../src/","sources":["components/Shimmer/ShimmerLine/ShimmerLine.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { IStyle, IRawStyle, ITheme } from '../../../Styling';\nimport type { IStyleFunctionOrObject, IRefObject } from '../../../Utilities';\n\n/**\n * {@docCategory Shimmer}\n */\nexport interface IShimmerLine {}\n\n/**\n * ShimmerLine component props.\n * {@docCategory Shimmer}\n */\nexport interface IShimmerLineProps extends React.AllHTMLAttributes<HTMLElement> {\n /**\n * Optional callback to access the IShimmerLine interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: IRefObject<IShimmerLine>;\n\n /**\n * Sets the height of the rectangle.\n * @defaultvalue 16px\n */\n height?: number;\n\n /**\n * Sets width value of the line.\n * @defaultvalue 100%\n */\n width?: number | string;\n\n /**\n * Theme provided by High-Order Component.\n */\n theme?: ITheme;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<IShimmerLineStyleProps, IShimmerLineStyles>;\n\n /**\n * Use to set custom styling of the shimmerLine borders.\n * @deprecated Use `styles.root` instead.\n */\n borderStyle?: IRawStyle;\n}\n\n/**\n * Props needed to construct styles.\n * {@docCategory Shimmer}\n */\nexport type IShimmerLineStyleProps = {\n /**\n * Theme values passed to the component.\n */\n theme: ITheme;\n\n /**\n * Needed to provide a height to the root of the control.\n */\n height?: number;\n\n /**\n * Styles to override borderStyles with custom ones.\n * @deprecated Use `styles.root` instead.\n */\n borderStyle?: IRawStyle;\n};\n\n/**\n * Represents the stylable areas of the control.\n * {@docCategory Shimmer}\n */\nexport interface IShimmerLineStyles {\n /**\n * Root of the ShimmerLine component.\n */\n root?: IStyle;\n\n /**\n * Top-left corner SVG of the ShimmerLine component.\n */\n topLeftCorner?: IStyle;\n\n /**\n * Top-right corner SVG of the ShimmerLine component.\n */\n topRightCorner?: IStyle;\n\n /**\n * Bottom-right corner SVG of the ShimmerLine component.\n */\n bottomRightCorner?: IStyle;\n\n /**\n * Bottom-left corner SVG of the ShimmerLine component.\n */\n bottomLeftCorner?: IStyle;\n}\n"]}