@atlaskit/button 16.7.6 → 16.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/button
2
2
 
3
+ ## 16.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ba43427b3e8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ba43427b3e8) - Internal changes to account for introduction of shape/radius tokens.
8
+
9
+ ## 16.8.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`5104149700b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5104149700b) - Button no longer unnecessarily sets `tabindex` as `0` for focus when using default `<button>` or `<a>` elements, as they are already focusable. This is still set when using the `component` prop so other elements can still be be focused. (This change is feature flagged)
14
+
3
15
  ## 16.7.6
4
16
 
5
17
  ### Patch Changes
@@ -185,6 +185,7 @@ var CustomThemeButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.de
185
185
  return /*#__PURE__*/_react.default.createElement(_buttonBase.default, (0, _extends2.default)({}, restProps, {
186
186
  ref: ref,
187
187
  overlay: isLoading ? /*#__PURE__*/_react.default.createElement(_loadingSpinner.default, restProps) : null,
188
+ "aria-busy": isLoading,
188
189
  onMouseEnter: onMouseEnter,
189
190
  onMouseLeave: onMouseLeave,
190
191
  onMouseDown: onMouseDown,
@@ -25,6 +25,7 @@ var LoadingButton = /*#__PURE__*/_react.default.forwardRef(function LoadingButto
25
25
  // Button already has React.memo, so just leaning on that
26
26
  return /*#__PURE__*/_react.default.createElement(_button.default, (0, _extends2.default)({}, rest, {
27
27
  ref: ref,
28
+ "aria-busy": isLoading,
28
29
  overlay: isLoading ? /*#__PURE__*/_react.default.createElement(_loadingSpinner.default, rest) : null
29
30
  }));
30
31
  });
@@ -15,6 +15,7 @@ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
15
15
  var _useAutoFocus = _interopRequireDefault(require("@atlaskit/ds-lib/use-auto-focus"));
16
16
  var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring"));
17
17
  var _interactionContext = _interopRequireDefault(require("@atlaskit/interaction-context"));
18
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
19
  var _colors = require("@atlaskit/theme/colors");
19
20
  var _blockEvents = _interopRequireDefault(require("./block-events"));
20
21
  var _css = require("./css");
@@ -53,7 +54,7 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(props,
53
54
  href = props.href,
54
55
  overlay = props.overlay,
55
56
  _props$tabIndex = props.tabIndex,
56
- tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
57
+ tabIndex = _props$tabIndex === void 0 ? !props.component && (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.clove-sprint-a11y-button_5rz5j') ? undefined : 0 : _props$tabIndex,
57
58
  _props$type = props.type,
58
59
  type = _props$type === void 0 ? !href ? 'button' : undefined : _props$type,
59
60
  _props$onMouseDown = props.onMouseDown,
@@ -93,7 +94,7 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(props,
93
94
  action: 'clicked',
94
95
  componentName: 'button',
95
96
  packageName: "@atlaskit/button",
96
- packageVersion: "16.7.6",
97
+ packageVersion: "16.8.1",
97
98
  analyticsData: analyticsContext
98
99
  });
99
100
 
@@ -15,7 +15,6 @@ var _constants = require("@atlaskit/theme/constants");
15
15
  var _colors = _interopRequireDefault(require("./colors"));
16
16
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
17
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18
- var borderRadius = (0, _constants.borderRadius)();
19
18
  var gridSize = (0, _constants.gridSize)();
20
19
  var fontSize = (0, _constants.fontSize)();
21
20
 
@@ -104,7 +103,7 @@ function getCss(_ref3) {
104
103
  // 0px margin added to css-reset
105
104
  alignItems: 'baseline',
106
105
  borderWidth: 0,
107
- borderRadius: borderRadius,
106
+ borderRadius: "var(--ds-border-radius, 3px)",
108
107
  boxSizing: 'border-box',
109
108
  display: 'inline-flex',
110
109
  fontSize: 'inherit',
@@ -197,7 +196,7 @@ function getIconStyle(_ref4) {
197
196
  return (0, _react.css)({
198
197
  display: 'flex',
199
198
  // icon size cannot grow and shrink
200
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
199
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
201
200
  margin: spacing === 'none' ? 0 : innerMargin.icon,
202
201
  flexGrow: 0,
203
202
  flexShrink: 0,
@@ -212,7 +211,7 @@ function getIconStyle(_ref4) {
212
211
  function getContentStyle(_ref5) {
213
212
  var spacing = _ref5.spacing;
214
213
  return (0, _react.css)({
215
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
214
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
216
215
  margin: spacing === 'none' ? 0 : innerMargin.content,
217
216
  // content can grow and shrink
218
217
  flexGrow: 1,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "16.7.6",
3
+ "version": "16.8.1",
4
4
  "sideEffects": false
5
5
  }
@@ -151,6 +151,7 @@ const CustomThemeButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef
151
151
  }) => /*#__PURE__*/React.createElement(ButtonBase, _extends({}, restProps, {
152
152
  ref: ref,
153
153
  overlay: isLoading ? /*#__PURE__*/React.createElement(LoadingSpinner, restProps) : null,
154
+ "aria-busy": isLoading,
154
155
  onMouseEnter: onMouseEnter,
155
156
  onMouseLeave: onMouseLeave,
156
157
  onMouseDown: onMouseDown,
@@ -16,6 +16,7 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton({
16
16
  // Button already has React.memo, so just leaning on that
17
17
  return /*#__PURE__*/React.createElement(Button, _extends({}, rest, {
18
18
  ref: ref,
19
+ "aria-busy": isLoading,
19
20
  overlay: isLoading ? /*#__PURE__*/React.createElement(LoadingSpinner, rest) : null
20
21
  }));
21
22
  });
@@ -8,6 +8,7 @@ import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
8
8
  import FocusRing from '@atlaskit/focus-ring';
9
9
  // eslint-disable-next-line no-duplicate-imports
10
10
  import InteractionContext from '@atlaskit/interaction-context';
11
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
11
12
  import { N500 } from '@atlaskit/theme/colors';
12
13
  import blockEvents from './block-events';
13
14
  import { getContentStyle, getFadingCss, getIconStyle, overlayCss } from './css';
@@ -36,7 +37,10 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
36
37
  className,
37
38
  href,
38
39
  overlay,
39
- tabIndex = 0,
40
+ // Don't set unnecessary tabIndex for focus if using standard <button> or <a>
41
+ // html elements. Set to `0` for custom components to ensure other elements can
42
+ // be focused (although the custom component could be a <button> or <a>...)
43
+ tabIndex = !props.component && getBooleanFF('platform.design-system-team.clove-sprint-a11y-button_5rz5j') ? undefined : 0,
40
44
  type = !href ? 'button' : undefined,
41
45
  onMouseDown: providedOnMouseDown = noop,
42
46
  onClick: providedOnClick = noop,
@@ -76,7 +80,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
76
80
  action: 'clicked',
77
81
  componentName: 'button',
78
82
  packageName: "@atlaskit/button",
79
- packageVersion: "16.7.6",
83
+ packageVersion: "16.8.1",
80
84
  analyticsData: analyticsContext
81
85
  });
82
86
 
@@ -1,9 +1,8 @@
1
1
  import { css } from '@emotion/react';
2
- import { borderRadius as getBorderRadius, fontSize as getFontSize,
2
+ import { fontSize as getFontSize,
3
3
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
4
4
  gridSize as getGridSize } from '@atlaskit/theme/constants';
5
5
  import colors from './colors';
6
- const borderRadius = getBorderRadius();
7
6
  const gridSize = getGridSize();
8
7
  const fontSize = getFontSize();
9
8
 
@@ -95,7 +94,7 @@ export function getCss({
95
94
  // 0px margin added to css-reset
96
95
  alignItems: 'baseline',
97
96
  borderWidth: 0,
98
- borderRadius,
97
+ borderRadius: "var(--ds-border-radius, 3px)",
99
98
  boxSizing: 'border-box',
100
99
  display: 'inline-flex',
101
100
  fontSize: 'inherit',
@@ -199,7 +198,7 @@ export function getIconStyle({
199
198
  return css({
200
199
  display: 'flex',
201
200
  // icon size cannot grow and shrink
202
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
201
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
203
202
  margin: spacing === 'none' ? 0 : innerMargin.icon,
204
203
  flexGrow: 0,
205
204
  flexShrink: 0,
@@ -215,7 +214,7 @@ export function getContentStyle({
215
214
  spacing
216
215
  }) {
217
216
  return css({
218
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
217
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
219
218
  margin: spacing === 'none' ? 0 : innerMargin.content,
220
219
  // content can grow and shrink
221
220
  flexGrow: 1,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "16.7.6",
3
+ "version": "16.8.1",
4
4
  "sideEffects": false
5
5
  }
@@ -175,6 +175,7 @@ var CustomThemeButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(f
175
175
  return /*#__PURE__*/React.createElement(ButtonBase, _extends({}, restProps, {
176
176
  ref: ref,
177
177
  overlay: isLoading ? /*#__PURE__*/React.createElement(LoadingSpinner, restProps) : null,
178
+ "aria-busy": isLoading,
178
179
  onMouseEnter: onMouseEnter,
179
180
  onMouseLeave: onMouseLeave,
180
181
  onMouseDown: onMouseDown,
@@ -18,6 +18,7 @@ var LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(_ref, r
18
18
  // Button already has React.memo, so just leaning on that
19
19
  return /*#__PURE__*/React.createElement(Button, _extends({}, rest, {
20
20
  ref: ref,
21
+ "aria-busy": isLoading,
21
22
  overlay: isLoading ? /*#__PURE__*/React.createElement(LoadingSpinner, rest) : null
22
23
  }));
23
24
  });
@@ -10,6 +10,7 @@ import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
10
10
  import FocusRing from '@atlaskit/focus-ring';
11
11
  // eslint-disable-next-line no-duplicate-imports
12
12
  import InteractionContext from '@atlaskit/interaction-context';
13
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
13
14
  import { N500 } from '@atlaskit/theme/colors';
14
15
  import blockEvents from './block-events';
15
16
  import { getContentStyle, getFadingCss, getIconStyle, overlayCss } from './css';
@@ -44,7 +45,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
44
45
  href = props.href,
45
46
  overlay = props.overlay,
46
47
  _props$tabIndex = props.tabIndex,
47
- tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
48
+ tabIndex = _props$tabIndex === void 0 ? !props.component && getBooleanFF('platform.design-system-team.clove-sprint-a11y-button_5rz5j') ? undefined : 0 : _props$tabIndex,
48
49
  _props$type = props.type,
49
50
  type = _props$type === void 0 ? !href ? 'button' : undefined : _props$type,
50
51
  _props$onMouseDown = props.onMouseDown,
@@ -84,7 +85,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
84
85
  action: 'clicked',
85
86
  componentName: 'button',
86
87
  packageName: "@atlaskit/button",
87
- packageVersion: "16.7.6",
88
+ packageVersion: "16.8.1",
88
89
  analyticsData: analyticsContext
89
90
  });
90
91
 
@@ -2,11 +2,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
4
  import { css } from '@emotion/react';
5
- import { borderRadius as getBorderRadius, fontSize as getFontSize,
5
+ import { fontSize as getFontSize,
6
6
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
7
7
  gridSize as getGridSize } from '@atlaskit/theme/constants';
8
8
  import colors from './colors';
9
- var borderRadius = getBorderRadius();
10
9
  var gridSize = getGridSize();
11
10
  var fontSize = getFontSize();
12
11
 
@@ -95,7 +94,7 @@ export function getCss(_ref3) {
95
94
  // 0px margin added to css-reset
96
95
  alignItems: 'baseline',
97
96
  borderWidth: 0,
98
- borderRadius: borderRadius,
97
+ borderRadius: "var(--ds-border-radius, 3px)",
99
98
  boxSizing: 'border-box',
100
99
  display: 'inline-flex',
101
100
  fontSize: 'inherit',
@@ -188,7 +187,7 @@ export function getIconStyle(_ref4) {
188
187
  return css({
189
188
  display: 'flex',
190
189
  // icon size cannot grow and shrink
191
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
190
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
192
191
  margin: spacing === 'none' ? 0 : innerMargin.icon,
193
192
  flexGrow: 0,
194
193
  flexShrink: 0,
@@ -203,7 +202,7 @@ export function getIconStyle(_ref4) {
203
202
  export function getContentStyle(_ref5) {
204
203
  var spacing = _ref5.spacing;
205
204
  return css({
206
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
205
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
207
206
  margin: spacing === 'none' ? 0 : innerMargin.content,
208
207
  // content can grow and shrink
209
208
  flexGrow: 1,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "16.7.6",
3
+ "version": "16.8.1",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "16.7.6",
3
+ "version": "16.8.1",
4
4
  "description": "A button triggers an event or action. They let users know what will happen next.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,7 +24,7 @@
24
24
  "atlaskit:src": "src/index.tsx",
25
25
  "atlassian": {
26
26
  "team": "Design System Team",
27
- "releaseModel": "scheduled",
27
+ "releaseModel": "continuous",
28
28
  "website": {
29
29
  "name": "Button",
30
30
  "category": "Components"
@@ -38,14 +38,20 @@
38
38
  "./types": "./src/entry-points/types.tsx",
39
39
  ".": "./src/index.tsx"
40
40
  },
41
+ "platform-feature-flags": {
42
+ "platform.design-system-team.clove-sprint-a11y-button_5rz5j": {
43
+ "type": "boolean"
44
+ }
45
+ },
41
46
  "dependencies": {
42
47
  "@atlaskit/analytics-next": "^9.1.0",
43
48
  "@atlaskit/ds-lib": "^2.2.0",
44
49
  "@atlaskit/focus-ring": "^1.3.0",
45
50
  "@atlaskit/interaction-context": "^2.1.0",
51
+ "@atlaskit/platform-feature-flags": "^0.2.0",
46
52
  "@atlaskit/spinner": "^15.5.0",
47
53
  "@atlaskit/theme": "^12.5.0",
48
- "@atlaskit/tokens": "^1.5.0",
54
+ "@atlaskit/tokens": "^1.11.0",
49
55
  "@babel/runtime": "^7.0.0",
50
56
  "@emotion/react": "^11.7.1"
51
57
  },
@@ -67,6 +73,7 @@
67
73
  "@types/react-router-dom": "^4.3.1",
68
74
  "ast-types": "^0.13.3",
69
75
  "bind-event-listener": "^2.1.1",
76
+ "jest-axe": "^4.0.0",
70
77
  "jest-emotion": "^10.0.32",
71
78
  "jest-in-case": "^1.0.2",
72
79
  "jscodeshift": "^0.13.0",
@@ -0,0 +1,133 @@
1
+ ## API Report File for "@atlaskit/button"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="react" />
8
+
9
+ import { ComponentType } from 'react';
10
+ import { CSSObject } from '@emotion/react';
11
+ import { jsx } from '@emotion/react';
12
+ import { default as React_2 } from 'react';
13
+ import { ReactNode } from 'react';
14
+ import { ThemeModes } from '@atlaskit/theme/types';
15
+ import { ThemeModes as ThemeModes_2 } from '@atlaskit/theme';
16
+ import { ThemeProp } from '@atlaskit/theme/components';
17
+ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
18
+
19
+ // @public (undocumented)
20
+ export type Appearance = 'danger' | 'default' | 'link' | 'primary' | 'subtle' | 'subtle-link' | 'warning';
21
+
22
+ // @public (undocumented)
23
+ export type BaseOwnProps = {
24
+ appearance?: Appearance;
25
+ autoFocus?: boolean;
26
+ className?: string;
27
+ overlay?: React_2.ReactNode;
28
+ href?: string;
29
+ iconAfter?: React_2.ReactChild;
30
+ iconBefore?: React_2.ReactChild;
31
+ isDisabled?: boolean;
32
+ isSelected?: boolean;
33
+ onBlur?: React_2.FocusEventHandler<HTMLElement>;
34
+ onClick?: (e: React_2.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
35
+ onFocus?: React_2.FocusEventHandler<HTMLElement>;
36
+ spacing?: Spacing;
37
+ target?: React_2.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
38
+ type?: React_2.ButtonHTMLAttributes<HTMLButtonElement>['type'];
39
+ shouldFitContainer?: boolean;
40
+ children?: React_2.ReactNode;
41
+ testId?: string;
42
+ component?: React_2.ComponentType<React_2.AllHTMLAttributes<HTMLElement>> | React_2.ElementType;
43
+ interactionName?: string;
44
+ analyticsContext?: Record<string, any>;
45
+ };
46
+
47
+ // @public (undocumented)
48
+ export type BaseProps = Combine<Combine<Omit<React_2.AllHTMLAttributes<HTMLElement>, 'disabled'>, {
49
+ 'data-testid'?: never;
50
+ 'data-has-overlay'?: never;
51
+ }>, BaseOwnProps>;
52
+
53
+ // @public
54
+ const Button: React_2.MemoExoticComponent<React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLElement>>>;
55
+ export default Button;
56
+
57
+ // @public (undocumented)
58
+ export function ButtonGroup({ appearance, children, }: ButtonGroupProps): jsx.JSX.Element;
59
+
60
+ // @public (undocumented)
61
+ type ButtonGroupProps = {
62
+ appearance?: Appearance;
63
+ children?: React_2.ReactNode;
64
+ };
65
+
66
+ // @public (undocumented)
67
+ export interface ButtonProps extends BaseProps {
68
+ }
69
+
70
+ // @public (undocumented)
71
+ type Combine<First, Second> = Omit<First, keyof Second> & Second;
72
+
73
+ // @public
74
+ export const CustomThemeButton: React_2.MemoExoticComponent<React_2.ForwardRefExoticComponent<Omit<BaseProps, "overlay"> & CustomThemeButtonOwnProps & React_2.RefAttributes<HTMLElement>>>;
75
+
76
+ // @public (undocumented)
77
+ export type CustomThemeButtonOwnProps = {
78
+ isLoading?: boolean;
79
+ theme?: (current: (props: ThemeProps) => ThemeTokens, props: ThemeProps) => ThemeTokens;
80
+ };
81
+
82
+ // @public (undocumented)
83
+ export type CustomThemeButtonProps = Omit<BaseProps, 'overlay'> & CustomThemeButtonOwnProps;
84
+
85
+ // @public (undocumented)
86
+ export type InteractionState = 'active' | 'default' | 'disabled' | 'focus' | 'focusSelected' | 'hover' | 'selected';
87
+
88
+ // @public
89
+ export const LoadingButton: React_2.ForwardRefExoticComponent<Omit<BaseProps, "overlay"> & LoadingButtonOwnProps & React_2.RefAttributes<HTMLElement>>;
90
+
91
+ // @public (undocumented)
92
+ export type LoadingButtonOwnProps = {
93
+ isLoading?: boolean;
94
+ };
95
+
96
+ // @public (undocumented)
97
+ export type LoadingButtonProps = Omit<BaseProps, 'overlay'> & LoadingButtonOwnProps;
98
+
99
+ // @public (undocumented)
100
+ export type Spacing = 'compact' | 'default' | 'none';
101
+
102
+ // @public (undocumented)
103
+ export const Theme: {
104
+ Consumer: ComponentType< {
105
+ children: (tokens: ThemeTokens) => ReactNode;
106
+ } & Partial<CustomThemeButtonProps> & {
107
+ state: InteractionState;
108
+ iconIsOnlyChild?: boolean | undefined;
109
+ mode?: ThemeModes_2 | undefined;
110
+ }>;
111
+ Provider: ComponentType< {
112
+ children?: ReactNode;
113
+ value?: ThemeProp<ThemeTokens, ThemeProps> | undefined;
114
+ }>;
115
+ useTheme: (props: ThemeProps) => ThemeTokens;
116
+ };
117
+
118
+ // @public (undocumented)
119
+ export type ThemeProps = Partial<CustomThemeButtonProps> & {
120
+ state: InteractionState;
121
+ iconIsOnlyChild?: boolean;
122
+ mode?: ThemeModes;
123
+ };
124
+
125
+ // @public (undocumented)
126
+ export type ThemeTokens = {
127
+ buttonStyles: CSSObject;
128
+ spinnerStyles: CSSObject;
129
+ };
130
+
131
+ // (No @packageDocumentation comment for this package)
132
+
133
+ ```