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,10 @@
import * as React from 'react';
import type { IAnnouncedProps } from './Announced.types';
import type { JSXElement } from '@fluentui/utilities';
/**
* {@docCategory Announced}
*/
export declare class AnnouncedBase extends React.Component<IAnnouncedProps> {
static defaultProps: Partial<IAnnouncedProps>;
render(): JSXElement;
}
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AnnouncedBase = void 0;
var tslib_1 = require("tslib");
var React = require("react");
var Utilities_1 = require("../../Utilities");
var getClassNames = (0, Utilities_1.classNamesFunction)();
/**
* {@docCategory Announced}
*/
var AnnouncedBase = /** @class */ (function (_super) {
tslib_1.__extends(AnnouncedBase, _super);
function AnnouncedBase() {
return _super !== null && _super.apply(this, arguments) || this;
}
AnnouncedBase.prototype.render = function () {
var _a = this.props, message = _a.message, styles = _a.styles, _b = _a.as, Root = _b === void 0 ? 'div' : _b, className = _a.className;
var classNames = getClassNames(styles, { className: className });
return (React.createElement(Root, tslib_1.__assign({ role: "status", className: classNames.root }, (0, Utilities_1.getNativeProps)(this.props, Utilities_1.divProperties, ['className'])),
React.createElement(Utilities_1.DelayedRender, null,
React.createElement("div", { className: classNames.screenReaderText }, message))));
};
AnnouncedBase.defaultProps = {
'aria-live': 'polite',
};
return AnnouncedBase;
}(React.Component));
exports.AnnouncedBase = AnnouncedBase;
//# sourceMappingURL=Announced.base.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Announced.base.js","sourceRoot":"../src/","sources":["components/Announced/Announced.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,6CAAmG;AAKnG,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAwB,CAAC;AAEjE;;GAEG;AACH;IAAmC,yCAAgC;IAAnE;;IAkBA,CAAC;IAbQ,8BAAM,GAAb;QACQ,IAAA,KAAmD,IAAI,CAAC,KAAK,EAA3D,OAAO,aAAA,EAAE,MAAM,YAAA,EAAE,UAAgB,EAAZ,IAAI,mBAAG,KAAK,KAAA,EAAE,SAAS,eAAe,CAAC;QAEpE,IAAM,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,EAAE,SAAS,WAAA,EAAE,CAAC,CAAC;QAExD,OAAO,CACL,oBAAC,IAAI,qBAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,UAAU,CAAC,IAAI,IAAM,IAAA,0BAAc,EAAC,IAAI,CAAC,KAAK,EAAE,yBAAa,EAAE,CAAC,WAAW,CAAC,CAAC;YAC1G,oBAAC,yBAAa;gBACZ,6BAAK,SAAS,EAAE,UAAU,CAAC,gBAAgB,IAAG,OAAO,CAAO,CAC9C,CACX,CACR,CAAC;IACJ,CAAC;IAhBa,0BAAY,GAA6B;QACrD,WAAW,EAAE,QAAQ;KACtB,CAAC;IAeJ,oBAAC;CAAA,AAlBD,CAAmC,KAAK,CAAC,SAAS,GAkBjD;AAlBY,sCAAa","sourcesContent":["import * as React from 'react';\nimport { DelayedRender, classNamesFunction, getNativeProps, divProperties } from '../../Utilities';\nimport type { IAnnouncedProps, IAnnouncedStyles } from './Announced.types';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\nconst getClassNames = classNamesFunction<{}, IAnnouncedStyles>();\n\n/**\n * {@docCategory Announced}\n */\nexport class AnnouncedBase extends React.Component<IAnnouncedProps> {\n public static defaultProps: Partial<IAnnouncedProps> = {\n 'aria-live': 'polite',\n };\n\n public render(): JSXElement {\n const { message, styles, as: Root = 'div', className } = this.props;\n\n const classNames = getClassNames(styles, { className });\n\n return (\n <Root role=\"status\" className={classNames.root} {...getNativeProps(this.props, divProperties, ['className'])}>\n <DelayedRender>\n <div className={classNames.screenReaderText}>{message}</div>\n </DelayedRender>\n </Root>\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IAnnouncedProps } from './Announced.types';
export declare const Announced: React.FunctionComponent<IAnnouncedProps>;
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Announced = void 0;
var Utilities_1 = require("../../Utilities");
var Announced_base_1 = require("./Announced.base");
var Announced_styles_1 = require("./Announced.styles");
exports.Announced = (0, Utilities_1.styled)(Announced_base_1.AnnouncedBase, Announced_styles_1.getStyles, undefined, { scope: 'Announced' });
//# sourceMappingURL=Announced.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Announced.js","sourceRoot":"../src/","sources":["components/Announced/Announced.ts"],"names":[],"mappings":";;;AACA,6CAAyC;AACzC,mDAAiD;AACjD,uDAA+C;AAGlC,QAAA,SAAS,GAA6C,IAAA,kBAAM,EACvE,8BAAa,EACb,4BAAS,EACT,SAAS,EACT,EAAE,KAAK,EAAE,WAAW,EAAE,CACvB,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { AnnouncedBase } from './Announced.base';\nimport { getStyles } from './Announced.styles';\nimport type { IAnnouncedProps, IAnnouncedStyles } from './Announced.types';\n\nexport const Announced: React.FunctionComponent<IAnnouncedProps> = styled<IAnnouncedProps, {}, IAnnouncedStyles>(\n AnnouncedBase,\n getStyles,\n undefined,\n { scope: 'Announced' },\n);\n"]}
@@ -0,0 +1,3 @@
import type { IStyleFunction } from '../../Utilities';
import type { IAnnouncedStyles, IAnnouncedStyleProps } from './Announced.types';
export declare const getStyles: IStyleFunction<IAnnouncedStyleProps, IAnnouncedStyles>;
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = void 0;
var Styling_1 = require("../../Styling");
var getStyles = function (props) {
return {
root: props.className,
screenReaderText: Styling_1.hiddenContentStyle,
};
};
exports.getStyles = getStyles;
//# sourceMappingURL=Announced.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Announced.styles.js","sourceRoot":"../src/","sources":["components/Announced/Announced.styles.ts"],"names":[],"mappings":";;;AAAA,yCAAmD;AAI5C,IAAM,SAAS,GAA2D,UAAA,KAAK;IACpF,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,SAAS;QACrB,gBAAgB,EAAE,4BAAkB;KACrC,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,SAAS,aAKpB","sourcesContent":["import { hiddenContentStyle } from '../../Styling';\nimport type { IStyleFunction } from '../../Utilities';\nimport type { IAnnouncedStyles, IAnnouncedStyleProps } from './Announced.types';\n\nexport const getStyles: IStyleFunction<IAnnouncedStyleProps, IAnnouncedStyles> = props => {\n return {\n root: props.className,\n screenReaderText: hiddenContentStyle,\n };\n};\n"]}
@@ -0,0 +1,43 @@
import * as React from 'react';
import { AnnouncedBase } from './Announced.base';
import type { IStyle } from '../../Styling';
import type { IReactProps, IStyleFunctionOrObject } from '../../Utilities';
/**
* {@docCategory Announced}
*/
export interface IAnnouncedProps extends IReactProps<AnnouncedBase>, React.HTMLAttributes<HTMLDivElement> {
/**
* The status message the screen reader should announce.
*/
message?: string;
/**
* Priority with which the screen reader should treat updates to this region.
* @default 'polite'
*/
'aria-live'?: 'off' | 'polite' | 'assertive';
/**
* Optionally render the root of this component as another component type or primitive.
* The custom type **must** preserve any children or native props passed in.
* @default 'div'
*/
as?: React.ElementType;
/** Call to provide customized styling that will layer on top of the variant rules. */
styles?: IStyleFunctionOrObject<{}, IAnnouncedStyles>;
}
/**
* {@docCategory Announced}
*/
export type IAnnouncedStyleProps = Pick<IAnnouncedProps, 'className'>;
/**
* {@docCategory Announced}
*/
export interface IAnnouncedStyles {
/**
* Style override for the root element.
*/
root: IStyle;
/**
* Style override for the screen reader text.
*/
screenReaderText: IStyle;
}
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Announced.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Announced.types.js","sourceRoot":"../src/","sources":["components/Announced/Announced.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { AnnouncedBase } from './Announced.base';\nimport type { IStyle } from '../../Styling';\nimport type { IReactProps, IStyleFunctionOrObject } from '../../Utilities';\n\n/**\n * {@docCategory Announced}\n */\nexport interface IAnnouncedProps extends IReactProps<AnnouncedBase>, React.HTMLAttributes<HTMLDivElement> {\n /**\n * The status message the screen reader should announce.\n */\n message?: string;\n\n /**\n * Priority with which the screen reader should treat updates to this region.\n * @default 'polite'\n */\n 'aria-live'?: 'off' | 'polite' | 'assertive';\n\n /**\n * Optionally render the root of this component as another component type or primitive.\n * The custom type **must** preserve any children or native props passed in.\n * @default 'div'\n */\n as?: React.ElementType;\n\n /** Call to provide customized styling that will layer on top of the variant rules. */\n styles?: IStyleFunctionOrObject<{}, IAnnouncedStyles>;\n}\n\n/**\n * {@docCategory Announced}\n */\nexport type IAnnouncedStyleProps = Pick<IAnnouncedProps, 'className'>;\n\n/**\n * {@docCategory Announced}\n */\nexport interface IAnnouncedStyles {\n /**\n * Style override for the root element.\n */\n root: IStyle;\n\n /**\n * Style override for the screen reader text.\n */\n screenReaderText: IStyle;\n}\n"]}
@@ -0,0 +1,3 @@
export * from './Announced';
export * from './Announced.base';
export * from './Announced.types';
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./Announced"), exports);
tslib_1.__exportStar(require("./Announced.base"), exports);
tslib_1.__exportStar(require("./Announced.types"), exports);
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Announced/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,2DAAiC;AACjC,4DAAkC","sourcesContent":["export * from './Announced';\nexport * from './Announced.base';\nexport * from './Announced.types';\n"]}