UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Microsoft 365.

77 lines 3.44 kB
define(["require", "exports", "@uifabric/foundation/lib/next/composed", "../../../Styling", "../Button.state", "../Button.styles", "../Button.view"], function (require, exports, composed_1, Styling_1, Button_state_1, Button_styles_1, Button_view_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /* eslint-disable deprecation/deprecation */ var baseTokens = function (props, theme) { var palette = theme.palette, semanticColors = theme.semanticColors; return { backgroundColor: 'transparent', backgroundColorHovered: palette.neutralLighter, backgroundColorPressed: semanticColors.buttonBackgroundPressed, borderColor: 'transparent', borderColorHovered: 'transparent', borderColorPressed: 'transparent', borderRadius: '50%', borderStyle: 'solid', borderWidth: 1, contentPadding: 0, cursor: 'pointer', highContrastBackgroundColor: 'WindowText', highContrastBackgroundColorHovered: 'Highlight', highContrastBackgroundColorPressed: 'Highlight', highContrastBorderColor: 'transparent', highContrastBorderColorHovered: 'transparent', highContrastBorderColorPressed: 'transparent', highContrastIconColor: 'Window', highContrastIconColorHovered: 'Window', highContrastIconColorPressed: 'Window', iconColor: palette.themePrimary, iconColorHovered: palette.themeDarkAlt, iconColorPressed: palette.themeDark, iconSize: 16, lineHeight: 1, minHeight: 32, minWidth: 32, msHighContrastAdjust: 'none', outlineColor: 'transparent', textFamily: 'inherit', textSize: 14, textWeight: Styling_1.FontWeights.semibold, }; }; var disabledTokens = function (props, theme) { var semanticColors = theme.semanticColors; return { backgroundColor: semanticColors.inputBackground, backgroundColorHovered: semanticColors.inputBackground, backgroundColorPressed: semanticColors.inputBackground, cursor: 'default', highContrastBackgroundColor: 'Window', highContrastBackgroundColorHovered: 'Window', highContrastBackgroundColorPressed: 'Window', highContrastIconColor: 'GrayText', highContrastIconColorHovered: 'GrayText', highContrastIconColorPressed: 'GrayText', iconColor: semanticColors.disabledText, iconColorHovered: semanticColors.disabledText, iconColorPressed: semanticColors.disabledText, }; }; var IconButtonTokens = function (props, theme) { return [ baseTokens, props.disabled && disabledTokens, ]; }; /** * @deprecated This component was experimental and is not longer being developed on, nor will it be supported in the * future. */ exports.IconButton = composed_1.composed({ displayName: 'IconButton', slots: Button_view_1.ButtonSlots, state: Button_state_1.useButtonState, styles: Button_styles_1.ButtonStyles, tokens: IconButtonTokens, view: Button_view_1.ButtonView, }); }); //# sourceMappingURL=IconButton.js.map