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,9 @@
import * as React from 'react';
import type { IButtonProps } from '../Button.types';
import type { JSXElement } from '@fluentui/utilities';
/**
* {@docCategory Button}
*/
export declare class ActionButton extends React.Component<IButtonProps, {}> {
render(): JSXElement;
}
@@ -0,0 +1,24 @@
define(["require", "exports", "tslib", "react", "../BaseButton", "../../../Utilities", "./ActionButton.styles"], function (require, exports, tslib_1, React, BaseButton_1, Utilities_1, ActionButton_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActionButton = void 0;
/**
* {@docCategory Button}
*/
var ActionButton = /** @class */ (function (_super) {
tslib_1.__extends(ActionButton, _super);
function ActionButton() {
return _super !== null && _super.apply(this, arguments) || this;
}
ActionButton.prototype.render = function () {
var _a = this.props, styles = _a.styles, theme = _a.theme;
return (React.createElement(BaseButton_1.BaseButton, tslib_1.__assign({}, this.props, { variantClassName: "ms-Button--action ms-Button--command", styles: (0, ActionButton_styles_1.getStyles)(theme, styles), onRenderDescription: Utilities_1.nullRender })));
};
ActionButton = tslib_1.__decorate([
(0, Utilities_1.customizable)('ActionButton', ['theme', 'styles'], true)
], ActionButton);
return ActionButton;
}(React.Component));
exports.ActionButton = ActionButton;
});
//# sourceMappingURL=ActionButton.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ActionButton.js","sourceRoot":"../src/","sources":["components/Button/ActionButton/ActionButton.tsx"],"names":[],"mappings":";;;;IAQA;;OAEG;IAEH;QAAkC,wCAAiC;QAAnE;;QAaA,CAAC;QAZQ,6BAAM,GAAb;YACQ,IAAA,KAAoB,IAAI,CAAC,KAAK,EAA5B,MAAM,YAAA,EAAE,KAAK,WAAe,CAAC;YAErC,OAAO,CACL,oBAAC,uBAAU,uBACL,IAAI,CAAC,KAAK,IACd,gBAAgB,EAAC,sCAAsC,EACvD,MAAM,EAAE,IAAA,+BAAS,EAAC,KAAM,EAAE,MAAM,CAAC,EACjC,mBAAmB,EAAE,sBAAU,IAC/B,CACH,CAAC;QACJ,CAAC;QAZU,YAAY;YADxB,IAAA,wBAAY,EAAC,cAAc,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC;WAC3C,YAAY,CAaxB;QAAD,mBAAC;KAAA,AAbD,CAAkC,KAAK,CAAC,SAAS,GAahD;IAbY,oCAAY","sourcesContent":["import * as React from 'react';\nimport { BaseButton } from '../BaseButton';\nimport { customizable, nullRender } from '../../../Utilities';\nimport { getStyles } from './ActionButton.styles';\nimport type { IButtonProps } from '../Button.types';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\n/**\n * {@docCategory Button}\n */\n@customizable('ActionButton', ['theme', 'styles'], true)\nexport class ActionButton extends React.Component<IButtonProps, {}> {\n public render(): JSXElement {\n const { styles, theme } = this.props;\n\n return (\n <BaseButton\n {...this.props}\n variantClassName=\"ms-Button--action ms-Button--command\"\n styles={getStyles(theme!, styles)}\n onRenderDescription={nullRender}\n />\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
import type { IButtonStyles } from '../Button.types';
import type { ITheme } from '../../../Styling';
export declare const getStyles: (theme: ITheme, customStyles?: IButtonStyles) => IButtonStyles;
@@ -0,0 +1,75 @@
define(["require", "exports", "../../../Styling", "../../../Utilities", "../BaseButton.styles"], function (require, exports, Styling_1, Utilities_1, BaseButton_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = void 0;
var DEFAULT_BUTTON_HEIGHT = '40px';
var DEFAULT_PADDING = '0 4px';
exports.getStyles = (0, Utilities_1.memoizeFunction)(function (theme, customStyles) {
var _a, _b, _c;
var baseButtonStyles = (0, BaseButton_styles_1.getStyles)(theme);
var actionButtonStyles = {
root: (_a = {
padding: DEFAULT_PADDING,
height: DEFAULT_BUTTON_HEIGHT,
color: theme.palette.neutralPrimary,
backgroundColor: 'transparent',
border: '1px solid transparent'
},
_a[Styling_1.HighContrastSelector] = {
borderColor: 'Window',
},
_a),
rootHovered: (_b = {
color: theme.palette.themePrimary
},
_b[Styling_1.HighContrastSelector] = {
color: 'Highlight',
},
_b),
iconHovered: {
color: theme.palette.themePrimary,
},
rootPressed: {
color: theme.palette.black,
},
rootExpanded: {
color: theme.palette.themePrimary,
},
iconPressed: {
color: theme.palette.themeDarker,
},
rootDisabled: (_c = {
color: theme.palette.neutralTertiary,
backgroundColor: 'transparent',
borderColor: 'transparent'
},
_c[Styling_1.HighContrastSelector] = {
color: 'GrayText',
},
_c),
rootChecked: {
color: theme.palette.black,
},
iconChecked: {
color: theme.palette.themeDarker,
},
flexContainer: {
justifyContent: 'flex-start',
},
icon: {
color: theme.palette.themeDarkAlt,
},
iconDisabled: {
color: 'inherit',
},
menuIcon: {
color: theme.palette.neutralSecondary,
},
textContainer: {
flexGrow: 0,
},
};
return (0, Styling_1.concatStyleSets)(baseButtonStyles, actionButtonStyles, customStyles);
});
});
//# sourceMappingURL=ActionButton.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ActionButton.styles.js","sourceRoot":"../src/","sources":["components/Button/ActionButton/ActionButton.styles.ts"],"names":[],"mappings":";;;;IAMA,IAAM,qBAAqB,GAAG,MAAM,CAAC;IACrC,IAAM,eAAe,GAAG,OAAO,CAAC;IAEnB,QAAA,SAAS,GAAG,IAAA,2BAAe,EAAC,UAAC,KAAa,EAAE,YAA4B;;QACnF,IAAM,gBAAgB,GAAkB,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAAC;QACnE,IAAM,kBAAkB,GAAkB;YACxC,IAAI;oBACF,OAAO,EAAE,eAAe;oBACxB,MAAM,EAAE,qBAAqB;oBAC7B,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;oBACnC,eAAe,EAAE,aAAa;oBAC9B,MAAM,EAAE,uBAAuB;;gBAC/B,GAAC,8BAAoB,IAAG;oBACtB,WAAW,EAAE,QAAQ;iBACtB;mBACF;YAED,WAAW;oBACT,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;;gBACjC,GAAC,8BAAoB,IAAG;oBACtB,KAAK,EAAE,WAAW;iBACnB;mBACF;YAED,WAAW,EAAE;gBACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;aAClC;YAED,WAAW,EAAE;gBACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;aAC3B;YAED,YAAY,EAAE;gBACZ,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;aAClC;YAED,WAAW,EAAE;gBACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;aACjC;YAED,YAAY;oBACV,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,eAAe;oBACpC,eAAe,EAAE,aAAa;oBAC9B,WAAW,EAAE,aAAa;;gBAC1B,GAAC,8BAAoB,IAAG;oBACtB,KAAK,EAAE,UAAU;iBAClB;mBACF;YAED,WAAW,EAAE;gBACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;aAC3B;YAED,WAAW,EAAE;gBACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;aACjC;YAED,aAAa,EAAE;gBACb,cAAc,EAAE,YAAY;aAC7B;YAED,IAAI,EAAE;gBACJ,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;aAClC;YAED,YAAY,EAAE;gBACZ,KAAK,EAAE,SAAS;aACjB;YAED,QAAQ,EAAE;gBACR,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,gBAAgB;aACtC;YAED,aAAa,EAAE;gBACb,QAAQ,EAAE,CAAC;aACZ;SACF,CAAC;QAEF,OAAO,IAAA,yBAAe,EAAC,gBAAgB,EAAE,kBAAkB,EAAE,YAAY,CAAE,CAAC;IAC9E,CAAC,CAAC,CAAC","sourcesContent":["import { concatStyleSets, HighContrastSelector } from '../../../Styling';\nimport { memoizeFunction } from '../../../Utilities';\nimport { getStyles as getBaseButtonStyles } from '../BaseButton.styles';\nimport type { IButtonStyles } from '../Button.types';\nimport type { ITheme } from '../../../Styling';\n\nconst DEFAULT_BUTTON_HEIGHT = '40px';\nconst DEFAULT_PADDING = '0 4px';\n\nexport const getStyles = memoizeFunction((theme: ITheme, customStyles?: IButtonStyles): IButtonStyles => {\n const baseButtonStyles: IButtonStyles = getBaseButtonStyles(theme);\n const actionButtonStyles: IButtonStyles = {\n root: {\n padding: DEFAULT_PADDING,\n height: DEFAULT_BUTTON_HEIGHT,\n color: theme.palette.neutralPrimary,\n backgroundColor: 'transparent',\n border: '1px solid transparent',\n [HighContrastSelector]: {\n borderColor: 'Window',\n },\n },\n\n rootHovered: {\n color: theme.palette.themePrimary,\n [HighContrastSelector]: {\n color: 'Highlight',\n },\n },\n\n iconHovered: {\n color: theme.palette.themePrimary,\n },\n\n rootPressed: {\n color: theme.palette.black,\n },\n\n rootExpanded: {\n color: theme.palette.themePrimary,\n },\n\n iconPressed: {\n color: theme.palette.themeDarker,\n },\n\n rootDisabled: {\n color: theme.palette.neutralTertiary,\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n [HighContrastSelector]: {\n color: 'GrayText',\n },\n },\n\n rootChecked: {\n color: theme.palette.black,\n },\n\n iconChecked: {\n color: theme.palette.themeDarker,\n },\n\n flexContainer: {\n justifyContent: 'flex-start',\n },\n\n icon: {\n color: theme.palette.themeDarkAlt,\n },\n\n iconDisabled: {\n color: 'inherit',\n },\n\n menuIcon: {\n color: theme.palette.neutralSecondary,\n },\n\n textContainer: {\n flexGrow: 0,\n },\n };\n\n return concatStyleSets(baseButtonStyles, actionButtonStyles, customStyles)!;\n});\n"]}