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 @@
import { __assign, __decorate, __extends } from "tslib";
import * as React from 'react';
import { BaseButton } from '../BaseButton';
import { customizable, nullRender } from '../../../Utilities';
import { getStyles } from './ActionButton.styles';
/**
* {@docCategory Button}
*/
var ActionButton = /** @class */ (function (_super) {
__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, __assign({}, this.props, { variantClassName: "ms-Button--action ms-Button--command", styles: getStyles(theme, styles), onRenderDescription: nullRender })));
};
ActionButton = __decorate([
customizable('ActionButton', ['theme', 'styles'], true)
], ActionButton);
return ActionButton;
}(React.Component));
export { ActionButton };
//# sourceMappingURL=ActionButton.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ActionButton.js","sourceRoot":"../src/","sources":["components/Button/ActionButton/ActionButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAKlD;;GAEG;AAEH;IAAkC,gCAAiC;IAAnE;;IAaA,CAAC;IAZQ,6BAAM,GAAb;QACQ,IAAA,KAAoB,IAAI,CAAC,KAAK,EAA5B,MAAM,YAAA,EAAE,KAAK,WAAe,CAAC;QAErC,OAAO,CACL,oBAAC,UAAU,eACL,IAAI,CAAC,KAAK,IACd,gBAAgB,EAAC,sCAAsC,EACvD,MAAM,EAAE,SAAS,CAAC,KAAM,EAAE,MAAM,CAAC,EACjC,mBAAmB,EAAE,UAAU,IAC/B,CACH,CAAC;IACJ,CAAC;IAZU,YAAY;QADxB,YAAY,CAAC,cAAc,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC;OAC3C,YAAY,CAaxB;IAAD,mBAAC;CAAA,AAbD,CAAkC,KAAK,CAAC,SAAS,GAahD;SAbY,YAAY","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,73 @@
import { concatStyleSets, HighContrastSelector } from '../../../Styling';
import { memoizeFunction } from '../../../Utilities';
import { getStyles as getBaseButtonStyles } from '../BaseButton.styles';
var DEFAULT_BUTTON_HEIGHT = '40px';
var DEFAULT_PADDING = '0 4px';
export var getStyles = memoizeFunction(function (theme, customStyles) {
var _a, _b, _c;
var baseButtonStyles = getBaseButtonStyles(theme);
var actionButtonStyles = {
root: (_a = {
padding: DEFAULT_PADDING,
height: DEFAULT_BUTTON_HEIGHT,
color: theme.palette.neutralPrimary,
backgroundColor: 'transparent',
border: '1px solid transparent'
},
_a[HighContrastSelector] = {
borderColor: 'Window',
},
_a),
rootHovered: (_b = {
color: theme.palette.themePrimary
},
_b[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[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 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":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAIxE,IAAM,qBAAqB,GAAG,MAAM,CAAC;AACrC,IAAM,eAAe,GAAG,OAAO,CAAC;AAEhC,MAAM,CAAC,IAAM,SAAS,GAAG,eAAe,CAAC,UAAC,KAAa,EAAE,YAA4B;;IACnF,IAAM,gBAAgB,GAAkB,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACnE,IAAM,kBAAkB,GAAkB;QACxC,IAAI;gBACF,OAAO,EAAE,eAAe;gBACxB,MAAM,EAAE,qBAAqB;gBAC7B,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;gBACnC,eAAe,EAAE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leSets, 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"]}