@atlaskit/button 17.16.0 → 17.17.0
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 +9 -0
- package/__perf__/utils/interaction-tasks.tsx +2 -2
- package/codemods/15.0.0-lite-mode.tsx +3 -3
- package/codemods/15.1.1-data-testid.tsx +3 -3
- package/codemods/__tests__/_framework.tsx +1 -1
- package/codemods/helpers/15.0.0-runner.tsx +3 -3
- package/codemods/helpers/helpers-generic.tsx +4 -3
- package/codemods/optimistic-15.0.0-lite-mode.tsx +11 -4
- package/dist/cjs/new-button/variants/shared/use-button-base.js +25 -9
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/es2019/new-button/variants/shared/use-button-base.js +25 -9
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/esm/new-button/variants/shared/use-button-base.js +25 -9
- package/dist/esm/old-button/shared/button-base.js +1 -1
- package/dist/types/containers/button-group.d.ts +1 -1
- package/dist/types/new-button/containers/split-button/split-button-context.d.ts +1 -1
- package/dist/types/new-button/variants/shared/loading-overlay.d.ts +1 -1
- package/dist/types/old-button/button.d.ts +1 -1
- package/dist/types/old-button/custom-theme-button/custom-theme-button-types.d.ts +3 -3
- package/dist/types/old-button/custom-theme-button/theme.d.ts +2 -2
- package/dist/types/old-button/loading-button.d.ts +1 -1
- package/dist/types/old-button/shared/colors.d.ts +2 -2
- package/dist/types/old-button/shared/css.d.ts +3 -3
- package/dist/types/old-button/shared/get-is-only-single-icon.d.ts +1 -1
- package/dist/types/old-button/shared/loading-spinner.d.ts +1 -1
- package/dist/types/utils/variants.d.ts +1 -1
- package/dist/types-ts4.5/containers/button-group.d.ts +1 -1
- package/dist/types-ts4.5/new-button/containers/split-button/split-button-context.d.ts +1 -1
- package/dist/types-ts4.5/new-button/variants/shared/loading-overlay.d.ts +1 -1
- package/dist/types-ts4.5/old-button/button.d.ts +1 -1
- package/dist/types-ts4.5/old-button/custom-theme-button/custom-theme-button-types.d.ts +3 -3
- package/dist/types-ts4.5/old-button/custom-theme-button/theme.d.ts +2 -2
- package/dist/types-ts4.5/old-button/loading-button.d.ts +1 -1
- package/dist/types-ts4.5/old-button/shared/colors.d.ts +2 -2
- package/dist/types-ts4.5/old-button/shared/css.d.ts +3 -3
- package/dist/types-ts4.5/old-button/shared/get-is-only-single-icon.d.ts +1 -1
- package/dist/types-ts4.5/old-button/shared/loading-spinner.d.ts +1 -1
- package/dist/types-ts4.5/utils/variants.d.ts +1 -1
- package/extract-react-types/custom-theme-button-props.tsx +1 -1
- package/extract-react-types/legacy-button/custom-theme-button-props.tsx +1 -1
- package/extract-react-types/legacy-button/loading-button-props.tsx +1 -1
- package/extract-react-types/legacy-button/shared-props.tsx +1 -1
- package/extract-react-types/loading-button-props.tsx +1 -1
- package/extract-react-types/new-button/variants/default/button-props.tsx +1 -1
- package/extract-react-types/new-button/variants/icon-button/icon-button-props.tsx +1 -1
- package/extract-react-types/shared-props.tsx +1 -1
- package/package.json +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 17.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#102849](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102849)
|
|
8
|
+
[`36d7498311be`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/36d7498311be) -
|
|
9
|
+
We are testing an internal change to typography behind a feature flag. If this change is
|
|
10
|
+
successful it will be available in a later release.
|
|
11
|
+
|
|
3
12
|
## 17.16.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fireEvent } from '@testing-library/react';
|
|
2
2
|
import {
|
|
3
|
-
InteractionTaskArgs,
|
|
4
|
-
PublicInteractionTask,
|
|
3
|
+
type InteractionTaskArgs,
|
|
4
|
+
type PublicInteractionTask,
|
|
5
5
|
} from 'storybook-addon-performance';
|
|
6
6
|
|
|
7
7
|
export const interactionTasks: PublicInteractionTask[] = [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { API, FileInfo, Options } from 'jscodeshift';
|
|
2
|
-
import { Collection } from 'jscodeshift/src/Collection';
|
|
1
|
+
import { type API, type FileInfo, type Options } from 'jscodeshift';
|
|
2
|
+
import { type Collection } from 'jscodeshift/src/Collection';
|
|
3
3
|
|
|
4
4
|
import { changeType, transformButton } from './helpers/15.0.0-runner';
|
|
5
5
|
import {
|
|
6
6
|
getDefaultSpecifierName,
|
|
7
|
-
Nullable,
|
|
7
|
+
type Nullable,
|
|
8
8
|
shiftDefaultImport,
|
|
9
9
|
} from './helpers/helpers-generic';
|
|
10
10
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Collection } from 'jscodeshift/src/Collection';
|
|
1
|
+
import type { API, default as core, FileInfo, Options } from 'jscodeshift';
|
|
2
|
+
import { type Collection } from 'jscodeshift/src/Collection';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
addCommentToStartOfFile,
|
|
6
6
|
getDefaultSpecifierName,
|
|
7
7
|
getJSXAttributesByName,
|
|
8
8
|
hasImportDeclaration,
|
|
9
|
-
Nullable,
|
|
9
|
+
type Nullable,
|
|
10
10
|
} from './helpers/helpers-generic';
|
|
11
11
|
const relevantEntryPoints = [
|
|
12
12
|
'@atlaskit/button',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NodePath } from 'ast-types/lib/node-path';
|
|
2
|
-
import core,
|
|
3
|
-
import { Collection } from 'jscodeshift/src/Collection';
|
|
1
|
+
import { type NodePath } from 'ast-types/lib/node-path';
|
|
2
|
+
import type { default as core, FileInfo, JSXElement } from 'jscodeshift';
|
|
3
|
+
import { type Collection } from 'jscodeshift/src/Collection';
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
addToImport,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { NodePath } from 'ast-types/lib/node-path';
|
|
2
|
-
import
|
|
1
|
+
import { type NodePath } from 'ast-types/lib/node-path';
|
|
2
|
+
import type {
|
|
3
3
|
ASTPath,
|
|
4
|
+
default as core,
|
|
4
5
|
ImportDeclaration,
|
|
5
6
|
ImportDefaultSpecifier,
|
|
6
7
|
ImportSpecifier,
|
|
@@ -9,7 +10,7 @@ import core, {
|
|
|
9
10
|
Node,
|
|
10
11
|
Program,
|
|
11
12
|
} from 'jscodeshift';
|
|
12
|
-
import { Collection } from 'jscodeshift/src/Collection';
|
|
13
|
+
import { type Collection } from 'jscodeshift/src/Collection';
|
|
13
14
|
|
|
14
15
|
export type Nullable<T> = T | null;
|
|
15
16
|
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { NodePath } from 'ast-types/lib/node-path';
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { type NodePath } from 'ast-types/lib/node-path';
|
|
2
|
+
import type {
|
|
3
|
+
API,
|
|
4
|
+
default as core,
|
|
5
|
+
FileInfo,
|
|
6
|
+
JSXElement,
|
|
7
|
+
Node,
|
|
8
|
+
Options,
|
|
9
|
+
} from 'jscodeshift';
|
|
10
|
+
import { type Collection } from 'jscodeshift/src/Collection';
|
|
4
11
|
|
|
5
12
|
import { convertButtonType, transformButton } from './helpers/15.0.0-runner';
|
|
6
13
|
import {
|
|
@@ -13,7 +20,7 @@ import {
|
|
|
13
20
|
isOnlyUsingNameForJSX,
|
|
14
21
|
isUsingProp,
|
|
15
22
|
isUsingSupportedSpread,
|
|
16
|
-
Nullable,
|
|
23
|
+
type Nullable,
|
|
17
24
|
tryCreateImport,
|
|
18
25
|
} from './helpers/helpers-generic';
|
|
19
26
|
|
|
@@ -10,6 +10,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _mergeRefs = _interopRequireDefault(require("@atlaskit/ds-lib/merge-refs"));
|
|
12
12
|
var _useAutoFocus = _interopRequireDefault(require("@atlaskit/ds-lib/use-auto-focus"));
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
14
|
var _primitives = require("@atlaskit/primitives");
|
|
14
15
|
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
15
16
|
var _constants = require("@atlaskit/theme/constants");
|
|
@@ -35,13 +36,7 @@ var buttonStyles = (0, _primitives.xcss)({
|
|
|
35
36
|
// @ts-expect-error
|
|
36
37
|
color: "var(--ds-text, ".concat(colors.N500, ")"),
|
|
37
38
|
flexShrink: 0,
|
|
38
|
-
fontFamily: 'inherit',
|
|
39
|
-
fontSize: 'inherit',
|
|
40
|
-
fontStyle: 'normal',
|
|
41
|
-
fontWeight: 500,
|
|
42
39
|
height: "".concat(32 / fontSize, "em"),
|
|
43
|
-
lineHeight: "".concat(32 / fontSize, "em"),
|
|
44
|
-
paddingBlock: 'space.0',
|
|
45
40
|
paddingInlineEnd: 'space.150',
|
|
46
41
|
paddingInlineStart: 'space.150',
|
|
47
42
|
textAlign: 'center',
|
|
@@ -52,6 +47,19 @@ var buttonStyles = (0, _primitives.xcss)({
|
|
|
52
47
|
color: "var(--ds-text, ".concat(colors.N500, ")")
|
|
53
48
|
}
|
|
54
49
|
});
|
|
50
|
+
var baseButtonStyles = (0, _primitives.xcss)({
|
|
51
|
+
fontFamily: 'inherit',
|
|
52
|
+
fontSize: 'inherit',
|
|
53
|
+
fontStyle: 'normal',
|
|
54
|
+
fontWeight: 500,
|
|
55
|
+
lineHeight: "".concat(32 / fontSize, "em"),
|
|
56
|
+
paddingBlock: 'space.0'
|
|
57
|
+
});
|
|
58
|
+
var tokenizedButtonStyles = (0, _primitives.xcss)({
|
|
59
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
60
|
+
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
61
|
+
paddingBlock: 'space.075'
|
|
62
|
+
});
|
|
55
63
|
var defaultInteractiveStyles = (0, _primitives.xcss)({
|
|
56
64
|
':hover': {
|
|
57
65
|
background: "var(--ds-background-neutral-hovered, #091e4214)",
|
|
@@ -315,11 +323,16 @@ var selectedDiscoveryStyles = (0, _primitives.xcss)({
|
|
|
315
323
|
var spacingCompactStyles = (0, _primitives.xcss)({
|
|
316
324
|
columnGap: 'space.050',
|
|
317
325
|
height: "".concat(24 / fontSize, "em"),
|
|
318
|
-
lineHeight: "".concat(24 / fontSize, "em"),
|
|
319
326
|
paddingInlineEnd: 'space.150',
|
|
320
327
|
paddingInlineStart: 'space.150',
|
|
321
328
|
verticalAlign: 'middle'
|
|
322
329
|
});
|
|
330
|
+
var baseSpacingCompactStyles = (0, _primitives.xcss)({
|
|
331
|
+
lineHeight: "".concat(24 / fontSize, "em")
|
|
332
|
+
});
|
|
333
|
+
var tokenizedSpacingCompactStyles = (0, _primitives.xcss)({
|
|
334
|
+
paddingBlock: 'space.025'
|
|
335
|
+
});
|
|
323
336
|
var spacingNoneStyles = (0, _primitives.xcss)({
|
|
324
337
|
columnGap: 'space.0',
|
|
325
338
|
height: 'auto',
|
|
@@ -328,6 +341,9 @@ var spacingNoneStyles = (0, _primitives.xcss)({
|
|
|
328
341
|
paddingInlineStart: 'space.0',
|
|
329
342
|
verticalAlign: 'baseline'
|
|
330
343
|
});
|
|
344
|
+
var tokenizedSpacingNoneStyles = (0, _primitives.xcss)({
|
|
345
|
+
paddingBlock: 'space.0'
|
|
346
|
+
});
|
|
331
347
|
var circleStyles = (0, _primitives.xcss)({
|
|
332
348
|
borderRadius: 'border.radius.circle'
|
|
333
349
|
});
|
|
@@ -440,13 +456,13 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
440
456
|
(0, _useAutoFocus.default)(localRef, autoFocus);
|
|
441
457
|
return _objectSpread({
|
|
442
458
|
ref: (0, _mergeRefs.default)([localRef, ref]),
|
|
443
|
-
xcss: [buttonStyles, appearance === 'default' && isInteractive && defaultInteractiveStyles, appearance === 'primary' && primaryStyles, appearance === 'primary' && isInteractive && primaryInteractiveStyles, appearance === 'warning' && warningStyles, appearance === 'warning' && isInteractive && warningInteractiveStyles, appearance === 'danger' && dangerStyles, appearance === 'danger' && isInteractive && dangerInteractiveStyles, appearance === 'discovery' && discoveryStyles, appearance === 'discovery' && isInteractive && discoveryInteractiveStyles, appearance === 'subtle' && subtleStyles, appearance === 'subtle' && isInteractive && subtleInteractiveStyles, appearance === 'link' && linkStyles, appearance === 'subtle-link' && subtleLinkStyles, !isSelected && (appearance === 'link' || appearance === 'subtle-link') ? linkDecorationStyles : linkDecorationUnsetStyles, isSelected && selectedStyles, isSelected && isInteractive && selectedInteractiveStyles,
|
|
459
|
+
xcss: [(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.button-tokenised-typography-styles') ? tokenizedButtonStyles : baseButtonStyles, buttonStyles, appearance === 'default' && isInteractive && defaultInteractiveStyles, appearance === 'primary' && primaryStyles, appearance === 'primary' && isInteractive && primaryInteractiveStyles, appearance === 'warning' && warningStyles, appearance === 'warning' && isInteractive && warningInteractiveStyles, appearance === 'danger' && dangerStyles, appearance === 'danger' && isInteractive && dangerInteractiveStyles, appearance === 'discovery' && discoveryStyles, appearance === 'discovery' && isInteractive && discoveryInteractiveStyles, appearance === 'subtle' && subtleStyles, appearance === 'subtle' && isInteractive && subtleInteractiveStyles, appearance === 'link' && linkStyles, appearance === 'subtle-link' && subtleLinkStyles, !isSelected && (appearance === 'link' || appearance === 'subtle-link') ? linkDecorationStyles : linkDecorationUnsetStyles, isSelected && selectedStyles, isSelected && isInteractive && selectedInteractiveStyles,
|
|
444
460
|
// TODO: remove me once we kill color fallbacks
|
|
445
461
|
isSelected && appearance === 'danger' && selectedDangerStyles,
|
|
446
462
|
// TODO: remove me once we kill color fallbacks
|
|
447
463
|
isSelected && appearance === 'warning' && selectedWarningStyles,
|
|
448
464
|
// TODO: remove me once we kill color fallbacks
|
|
449
|
-
isSelected && appearance === 'discovery' && selectedDiscoveryStyles, isDisabled && disabledStyles, isCircle && !isSplitButton && circleStyles, spacing === 'compact' && spacingCompactStyles, spacing === 'none' && spacingNoneStyles, spacing !== 'none' && hasIconBefore && buttonIconBeforeStyles, spacing !== 'none' && hasIconAfter && buttonIconAfterStyles, isIconButton && iconButtonStyles, isIconButton && spacing === 'compact' && iconButtonCompactStyles, shouldFitContainer && fullWidthStyles, isLoading && loadingOverlayStyles, (isDisabled || hasOverlay && !isLoading) && nonInteractiveStyles, isSplitButton && splitButtonStyles, isNavigationSplitButton && navigationSplitButtonStyles],
|
|
465
|
+
isSelected && appearance === 'discovery' && selectedDiscoveryStyles, isDisabled && disabledStyles, isCircle && !isSplitButton && circleStyles, spacing === 'compact' && spacingCompactStyles, spacing === 'compact' && ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.button-tokenised-typography-styles') ? tokenizedSpacingCompactStyles : baseSpacingCompactStyles), spacing === 'none' && spacingNoneStyles, spacing === 'none' && (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.button-tokenised-typography-styles') && tokenizedSpacingNoneStyles, spacing !== 'none' && hasIconBefore && buttonIconBeforeStyles, spacing !== 'none' && hasIconAfter && buttonIconAfterStyles, isIconButton && iconButtonStyles, isIconButton && spacing === 'compact' && iconButtonCompactStyles, shouldFitContainer && fullWidthStyles, isLoading && loadingOverlayStyles, (isDisabled || hasOverlay && !isLoading) && nonInteractiveStyles, isSplitButton && splitButtonStyles, isNavigationSplitButton && navigationSplitButtonStyles],
|
|
450
466
|
// Consider overlay buttons to be effectively disabled
|
|
451
467
|
isDisabled: isEffectivelyDisabled,
|
|
452
468
|
children: /*#__PURE__*/_react.default.createElement(_react.Fragment, null, children, overlay ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
@@ -129,7 +129,7 @@ var _default = exports.default = /*#__PURE__*/_react.default.forwardRef(function
|
|
|
129
129
|
action: 'clicked',
|
|
130
130
|
componentName: 'button',
|
|
131
131
|
packageName: "@atlaskit/button",
|
|
132
|
-
packageVersion: "17.
|
|
132
|
+
packageVersion: "17.17.0",
|
|
133
133
|
analyticsData: analyticsContext
|
|
134
134
|
});
|
|
135
135
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { Fragment, useRef } from 'react';
|
|
2
2
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
3
3
|
import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
|
|
4
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
6
|
import * as colors from '@atlaskit/theme/colors';
|
|
6
7
|
import { fontSize as getFontSize } from '@atlaskit/theme/constants';
|
|
@@ -22,13 +23,7 @@ const buttonStyles = xcss({
|
|
|
22
23
|
// @ts-expect-error
|
|
23
24
|
color: `var(--ds-text, ${colors.N500})`,
|
|
24
25
|
flexShrink: 0,
|
|
25
|
-
fontFamily: 'inherit',
|
|
26
|
-
fontSize: 'inherit',
|
|
27
|
-
fontStyle: 'normal',
|
|
28
|
-
fontWeight: 500,
|
|
29
26
|
height: `${32 / fontSize}em`,
|
|
30
|
-
lineHeight: `${32 / fontSize}em`,
|
|
31
|
-
paddingBlock: 'space.0',
|
|
32
27
|
paddingInlineEnd: 'space.150',
|
|
33
28
|
paddingInlineStart: 'space.150',
|
|
34
29
|
textAlign: 'center',
|
|
@@ -39,6 +34,19 @@ const buttonStyles = xcss({
|
|
|
39
34
|
color: `var(--ds-text, ${colors.N500})`
|
|
40
35
|
}
|
|
41
36
|
});
|
|
37
|
+
const baseButtonStyles = xcss({
|
|
38
|
+
fontFamily: 'inherit',
|
|
39
|
+
fontSize: 'inherit',
|
|
40
|
+
fontStyle: 'normal',
|
|
41
|
+
fontWeight: 500,
|
|
42
|
+
lineHeight: `${32 / fontSize}em`,
|
|
43
|
+
paddingBlock: 'space.0'
|
|
44
|
+
});
|
|
45
|
+
const tokenizedButtonStyles = xcss({
|
|
46
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
47
|
+
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
48
|
+
paddingBlock: 'space.075'
|
|
49
|
+
});
|
|
42
50
|
const defaultInteractiveStyles = xcss({
|
|
43
51
|
':hover': {
|
|
44
52
|
background: "var(--ds-background-neutral-hovered, #091e4214)",
|
|
@@ -302,11 +310,16 @@ const selectedDiscoveryStyles = xcss({
|
|
|
302
310
|
const spacingCompactStyles = xcss({
|
|
303
311
|
columnGap: 'space.050',
|
|
304
312
|
height: `${24 / fontSize}em`,
|
|
305
|
-
lineHeight: `${24 / fontSize}em`,
|
|
306
313
|
paddingInlineEnd: 'space.150',
|
|
307
314
|
paddingInlineStart: 'space.150',
|
|
308
315
|
verticalAlign: 'middle'
|
|
309
316
|
});
|
|
317
|
+
const baseSpacingCompactStyles = xcss({
|
|
318
|
+
lineHeight: `${24 / fontSize}em`
|
|
319
|
+
});
|
|
320
|
+
const tokenizedSpacingCompactStyles = xcss({
|
|
321
|
+
paddingBlock: 'space.025'
|
|
322
|
+
});
|
|
310
323
|
const spacingNoneStyles = xcss({
|
|
311
324
|
columnGap: 'space.0',
|
|
312
325
|
height: 'auto',
|
|
@@ -315,6 +328,9 @@ const spacingNoneStyles = xcss({
|
|
|
315
328
|
paddingInlineStart: 'space.0',
|
|
316
329
|
verticalAlign: 'baseline'
|
|
317
330
|
});
|
|
331
|
+
const tokenizedSpacingNoneStyles = xcss({
|
|
332
|
+
paddingBlock: 'space.0'
|
|
333
|
+
});
|
|
318
334
|
const circleStyles = xcss({
|
|
319
335
|
borderRadius: 'border.radius.circle'
|
|
320
336
|
});
|
|
@@ -419,13 +435,13 @@ const useButtonBase = ({
|
|
|
419
435
|
useAutoFocus(localRef, autoFocus);
|
|
420
436
|
return {
|
|
421
437
|
ref: mergeRefs([localRef, ref]),
|
|
422
|
-
xcss: [buttonStyles, appearance === 'default' && isInteractive && defaultInteractiveStyles, appearance === 'primary' && primaryStyles, appearance === 'primary' && isInteractive && primaryInteractiveStyles, appearance === 'warning' && warningStyles, appearance === 'warning' && isInteractive && warningInteractiveStyles, appearance === 'danger' && dangerStyles, appearance === 'danger' && isInteractive && dangerInteractiveStyles, appearance === 'discovery' && discoveryStyles, appearance === 'discovery' && isInteractive && discoveryInteractiveStyles, appearance === 'subtle' && subtleStyles, appearance === 'subtle' && isInteractive && subtleInteractiveStyles, appearance === 'link' && linkStyles, appearance === 'subtle-link' && subtleLinkStyles, !isSelected && (appearance === 'link' || appearance === 'subtle-link') ? linkDecorationStyles : linkDecorationUnsetStyles, isSelected && selectedStyles, isSelected && isInteractive && selectedInteractiveStyles,
|
|
438
|
+
xcss: [getBooleanFF('platform.design-system-team.button-tokenised-typography-styles') ? tokenizedButtonStyles : baseButtonStyles, buttonStyles, appearance === 'default' && isInteractive && defaultInteractiveStyles, appearance === 'primary' && primaryStyles, appearance === 'primary' && isInteractive && primaryInteractiveStyles, appearance === 'warning' && warningStyles, appearance === 'warning' && isInteractive && warningInteractiveStyles, appearance === 'danger' && dangerStyles, appearance === 'danger' && isInteractive && dangerInteractiveStyles, appearance === 'discovery' && discoveryStyles, appearance === 'discovery' && isInteractive && discoveryInteractiveStyles, appearance === 'subtle' && subtleStyles, appearance === 'subtle' && isInteractive && subtleInteractiveStyles, appearance === 'link' && linkStyles, appearance === 'subtle-link' && subtleLinkStyles, !isSelected && (appearance === 'link' || appearance === 'subtle-link') ? linkDecorationStyles : linkDecorationUnsetStyles, isSelected && selectedStyles, isSelected && isInteractive && selectedInteractiveStyles,
|
|
423
439
|
// TODO: remove me once we kill color fallbacks
|
|
424
440
|
isSelected && appearance === 'danger' && selectedDangerStyles,
|
|
425
441
|
// TODO: remove me once we kill color fallbacks
|
|
426
442
|
isSelected && appearance === 'warning' && selectedWarningStyles,
|
|
427
443
|
// TODO: remove me once we kill color fallbacks
|
|
428
|
-
isSelected && appearance === 'discovery' && selectedDiscoveryStyles, isDisabled && disabledStyles, isCircle && !isSplitButton && circleStyles, spacing === 'compact' && spacingCompactStyles, spacing === 'none' && spacingNoneStyles, spacing !== 'none' && hasIconBefore && buttonIconBeforeStyles, spacing !== 'none' && hasIconAfter && buttonIconAfterStyles, isIconButton && iconButtonStyles, isIconButton && spacing === 'compact' && iconButtonCompactStyles, shouldFitContainer && fullWidthStyles, isLoading && loadingOverlayStyles, (isDisabled || hasOverlay && !isLoading) && nonInteractiveStyles, isSplitButton && splitButtonStyles, isNavigationSplitButton && navigationSplitButtonStyles],
|
|
444
|
+
isSelected && appearance === 'discovery' && selectedDiscoveryStyles, isDisabled && disabledStyles, isCircle && !isSplitButton && circleStyles, spacing === 'compact' && spacingCompactStyles, spacing === 'compact' && (getBooleanFF('platform.design-system-team.button-tokenised-typography-styles') ? tokenizedSpacingCompactStyles : baseSpacingCompactStyles), spacing === 'none' && spacingNoneStyles, spacing === 'none' && getBooleanFF('platform.design-system-team.button-tokenised-typography-styles') && tokenizedSpacingNoneStyles, spacing !== 'none' && hasIconBefore && buttonIconBeforeStyles, spacing !== 'none' && hasIconAfter && buttonIconAfterStyles, isIconButton && iconButtonStyles, isIconButton && spacing === 'compact' && iconButtonCompactStyles, shouldFitContainer && fullWidthStyles, isLoading && loadingOverlayStyles, (isDisabled || hasOverlay && !isLoading) && nonInteractiveStyles, isSplitButton && splitButtonStyles, isNavigationSplitButton && navigationSplitButtonStyles],
|
|
429
445
|
// Consider overlay buttons to be effectively disabled
|
|
430
446
|
isDisabled: isEffectivelyDisabled,
|
|
431
447
|
children: /*#__PURE__*/React.createElement(Fragment, null, children, overlay ? /*#__PURE__*/React.createElement(Box, {
|
|
@@ -114,7 +114,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
114
114
|
action: 'clicked',
|
|
115
115
|
componentName: 'button',
|
|
116
116
|
packageName: "@atlaskit/button",
|
|
117
|
-
packageVersion: "17.
|
|
117
|
+
packageVersion: "17.17.0",
|
|
118
118
|
analyticsData: analyticsContext
|
|
119
119
|
});
|
|
120
120
|
|
|
@@ -4,6 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import React, { Fragment, useRef } from 'react';
|
|
5
5
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
6
6
|
import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
|
|
7
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
8
9
|
import * as colors from '@atlaskit/theme/colors';
|
|
9
10
|
import { fontSize as getFontSize } from '@atlaskit/theme/constants';
|
|
@@ -25,13 +26,7 @@ var buttonStyles = xcss({
|
|
|
25
26
|
// @ts-expect-error
|
|
26
27
|
color: "var(--ds-text, ".concat(colors.N500, ")"),
|
|
27
28
|
flexShrink: 0,
|
|
28
|
-
fontFamily: 'inherit',
|
|
29
|
-
fontSize: 'inherit',
|
|
30
|
-
fontStyle: 'normal',
|
|
31
|
-
fontWeight: 500,
|
|
32
29
|
height: "".concat(32 / fontSize, "em"),
|
|
33
|
-
lineHeight: "".concat(32 / fontSize, "em"),
|
|
34
|
-
paddingBlock: 'space.0',
|
|
35
30
|
paddingInlineEnd: 'space.150',
|
|
36
31
|
paddingInlineStart: 'space.150',
|
|
37
32
|
textAlign: 'center',
|
|
@@ -42,6 +37,19 @@ var buttonStyles = xcss({
|
|
|
42
37
|
color: "var(--ds-text, ".concat(colors.N500, ")")
|
|
43
38
|
}
|
|
44
39
|
});
|
|
40
|
+
var baseButtonStyles = xcss({
|
|
41
|
+
fontFamily: 'inherit',
|
|
42
|
+
fontSize: 'inherit',
|
|
43
|
+
fontStyle: 'normal',
|
|
44
|
+
fontWeight: 500,
|
|
45
|
+
lineHeight: "".concat(32 / fontSize, "em"),
|
|
46
|
+
paddingBlock: 'space.0'
|
|
47
|
+
});
|
|
48
|
+
var tokenizedButtonStyles = xcss({
|
|
49
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
50
|
+
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
51
|
+
paddingBlock: 'space.075'
|
|
52
|
+
});
|
|
45
53
|
var defaultInteractiveStyles = xcss({
|
|
46
54
|
':hover': {
|
|
47
55
|
background: "var(--ds-background-neutral-hovered, #091e4214)",
|
|
@@ -305,11 +313,16 @@ var selectedDiscoveryStyles = xcss({
|
|
|
305
313
|
var spacingCompactStyles = xcss({
|
|
306
314
|
columnGap: 'space.050',
|
|
307
315
|
height: "".concat(24 / fontSize, "em"),
|
|
308
|
-
lineHeight: "".concat(24 / fontSize, "em"),
|
|
309
316
|
paddingInlineEnd: 'space.150',
|
|
310
317
|
paddingInlineStart: 'space.150',
|
|
311
318
|
verticalAlign: 'middle'
|
|
312
319
|
});
|
|
320
|
+
var baseSpacingCompactStyles = xcss({
|
|
321
|
+
lineHeight: "".concat(24 / fontSize, "em")
|
|
322
|
+
});
|
|
323
|
+
var tokenizedSpacingCompactStyles = xcss({
|
|
324
|
+
paddingBlock: 'space.025'
|
|
325
|
+
});
|
|
313
326
|
var spacingNoneStyles = xcss({
|
|
314
327
|
columnGap: 'space.0',
|
|
315
328
|
height: 'auto',
|
|
@@ -318,6 +331,9 @@ var spacingNoneStyles = xcss({
|
|
|
318
331
|
paddingInlineStart: 'space.0',
|
|
319
332
|
verticalAlign: 'baseline'
|
|
320
333
|
});
|
|
334
|
+
var tokenizedSpacingNoneStyles = xcss({
|
|
335
|
+
paddingBlock: 'space.0'
|
|
336
|
+
});
|
|
321
337
|
var circleStyles = xcss({
|
|
322
338
|
borderRadius: 'border.radius.circle'
|
|
323
339
|
});
|
|
@@ -430,13 +446,13 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
430
446
|
useAutoFocus(localRef, autoFocus);
|
|
431
447
|
return _objectSpread({
|
|
432
448
|
ref: mergeRefs([localRef, ref]),
|
|
433
|
-
xcss: [buttonStyles, appearance === 'default' && isInteractive && defaultInteractiveStyles, appearance === 'primary' && primaryStyles, appearance === 'primary' && isInteractive && primaryInteractiveStyles, appearance === 'warning' && warningStyles, appearance === 'warning' && isInteractive && warningInteractiveStyles, appearance === 'danger' && dangerStyles, appearance === 'danger' && isInteractive && dangerInteractiveStyles, appearance === 'discovery' && discoveryStyles, appearance === 'discovery' && isInteractive && discoveryInteractiveStyles, appearance === 'subtle' && subtleStyles, appearance === 'subtle' && isInteractive && subtleInteractiveStyles, appearance === 'link' && linkStyles, appearance === 'subtle-link' && subtleLinkStyles, !isSelected && (appearance === 'link' || appearance === 'subtle-link') ? linkDecorationStyles : linkDecorationUnsetStyles, isSelected && selectedStyles, isSelected && isInteractive && selectedInteractiveStyles,
|
|
449
|
+
xcss: [getBooleanFF('platform.design-system-team.button-tokenised-typography-styles') ? tokenizedButtonStyles : baseButtonStyles, buttonStyles, appearance === 'default' && isInteractive && defaultInteractiveStyles, appearance === 'primary' && primaryStyles, appearance === 'primary' && isInteractive && primaryInteractiveStyles, appearance === 'warning' && warningStyles, appearance === 'warning' && isInteractive && warningInteractiveStyles, appearance === 'danger' && dangerStyles, appearance === 'danger' && isInteractive && dangerInteractiveStyles, appearance === 'discovery' && discoveryStyles, appearance === 'discovery' && isInteractive && discoveryInteractiveStyles, appearance === 'subtle' && subtleStyles, appearance === 'subtle' && isInteractive && subtleInteractiveStyles, appearance === 'link' && linkStyles, appearance === 'subtle-link' && subtleLinkStyles, !isSelected && (appearance === 'link' || appearance === 'subtle-link') ? linkDecorationStyles : linkDecorationUnsetStyles, isSelected && selectedStyles, isSelected && isInteractive && selectedInteractiveStyles,
|
|
434
450
|
// TODO: remove me once we kill color fallbacks
|
|
435
451
|
isSelected && appearance === 'danger' && selectedDangerStyles,
|
|
436
452
|
// TODO: remove me once we kill color fallbacks
|
|
437
453
|
isSelected && appearance === 'warning' && selectedWarningStyles,
|
|
438
454
|
// TODO: remove me once we kill color fallbacks
|
|
439
|
-
isSelected && appearance === 'discovery' && selectedDiscoveryStyles, isDisabled && disabledStyles, isCircle && !isSplitButton && circleStyles, spacing === 'compact' && spacingCompactStyles, spacing === 'none' && spacingNoneStyles, spacing !== 'none' && hasIconBefore && buttonIconBeforeStyles, spacing !== 'none' && hasIconAfter && buttonIconAfterStyles, isIconButton && iconButtonStyles, isIconButton && spacing === 'compact' && iconButtonCompactStyles, shouldFitContainer && fullWidthStyles, isLoading && loadingOverlayStyles, (isDisabled || hasOverlay && !isLoading) && nonInteractiveStyles, isSplitButton && splitButtonStyles, isNavigationSplitButton && navigationSplitButtonStyles],
|
|
455
|
+
isSelected && appearance === 'discovery' && selectedDiscoveryStyles, isDisabled && disabledStyles, isCircle && !isSplitButton && circleStyles, spacing === 'compact' && spacingCompactStyles, spacing === 'compact' && (getBooleanFF('platform.design-system-team.button-tokenised-typography-styles') ? tokenizedSpacingCompactStyles : baseSpacingCompactStyles), spacing === 'none' && spacingNoneStyles, spacing === 'none' && getBooleanFF('platform.design-system-team.button-tokenised-typography-styles') && tokenizedSpacingNoneStyles, spacing !== 'none' && hasIconBefore && buttonIconBeforeStyles, spacing !== 'none' && hasIconAfter && buttonIconAfterStyles, isIconButton && iconButtonStyles, isIconButton && spacing === 'compact' && iconButtonCompactStyles, shouldFitContainer && fullWidthStyles, isLoading && loadingOverlayStyles, (isDisabled || hasOverlay && !isLoading) && nonInteractiveStyles, isSplitButton && splitButtonStyles, isNavigationSplitButton && navigationSplitButtonStyles],
|
|
440
456
|
// Consider overlay buttons to be effectively disabled
|
|
441
457
|
isDisabled: isEffectivelyDisabled,
|
|
442
458
|
children: /*#__PURE__*/React.createElement(Fragment, null, children, overlay ? /*#__PURE__*/React.createElement(Box, {
|
|
@@ -120,7 +120,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
120
120
|
action: 'clicked',
|
|
121
121
|
componentName: 'button',
|
|
122
122
|
packageName: "@atlaskit/button",
|
|
123
|
-
packageVersion: "17.
|
|
123
|
+
packageVersion: "17.17.0",
|
|
124
124
|
analyticsData: analyticsContext
|
|
125
125
|
});
|
|
126
126
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import { Appearance } from '../old-button/types';
|
|
4
|
+
import { type Appearance } from '../old-button/types';
|
|
5
5
|
export type ButtonGroupProps = {
|
|
6
6
|
/**
|
|
7
7
|
* The appearance to apply to all buttons.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SplitButtonAppearance, SplitButtonSpacing } from './types';
|
|
2
|
+
import { type SplitButtonAppearance, type SplitButtonSpacing } from './types';
|
|
3
3
|
type NavigationSplitButtonContextProps = {
|
|
4
4
|
appearance: 'navigation';
|
|
5
5
|
isHighlighted: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Appearance, type ButtonSpacing } from '../types';
|
|
2
|
+
import { type Appearance, type ButtonSpacing } from '../types';
|
|
3
3
|
export default function renderLoadingOverlay({ appearance, spacing, isDisabled, isSelected, }: {
|
|
4
4
|
spacing?: ButtonSpacing;
|
|
5
5
|
appearance?: Appearance;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/react';
|
|
2
|
-
import { ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
-
import { BaseProps } from '../types';
|
|
1
|
+
import { type CSSObject } from '@emotion/react';
|
|
2
|
+
import { type ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
+
import { type BaseProps } from '../types';
|
|
4
4
|
export type ThemeTokens = {
|
|
5
5
|
buttonStyles: CSSObject;
|
|
6
6
|
spinnerStyles: CSSObject;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CSSObject } from '@emotion/react';
|
|
3
|
-
import { ThemeProps, ThemeTokens } from './custom-theme-button-types';
|
|
2
|
+
import { type CSSObject } from '@emotion/react';
|
|
3
|
+
import { type ThemeProps, type ThemeTokens } from './custom-theme-button-types';
|
|
4
4
|
export declare function getCustomCss({ appearance, spacing, mode, isSelected, shouldFitContainer, iconIsOnlyChild, isLoading, state, }: ThemeProps): CSSObject;
|
|
5
5
|
export declare function getSpecifiers(styles: CSSObject): CSSObject;
|
|
6
6
|
export declare function defaultThemeFn(current: (values: ThemeProps) => ThemeTokens, values: ThemeProps): ThemeTokens;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/react';
|
|
2
|
-
import { ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
-
import { Appearance, Spacing } from '../types';
|
|
1
|
+
import { type CSSObject } from '@emotion/react';
|
|
2
|
+
import { type ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
+
import { type Appearance, type Spacing } from '../types';
|
|
4
4
|
export type GetCssArgs = {
|
|
5
5
|
appearance: Appearance;
|
|
6
6
|
spacing: Spacing;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BaseProps } from '../types';
|
|
1
|
+
import { type BaseProps } from '../types';
|
|
2
2
|
export default function getIsOnlySingleIcon({ children, iconBefore, iconAfter, }: Pick<BaseProps, 'children' | 'iconBefore' | 'iconAfter'>): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BaseProps } from '../types';
|
|
2
|
+
import { type BaseProps } from '../types';
|
|
3
3
|
type LoadingSpinnerProps = Pick<BaseProps, 'appearance' | 'isDisabled' | 'isSelected' | 'spacing'>;
|
|
4
4
|
export default function LoadingSpinner({ appearance, isDisabled, isSelected, spacing, }: LoadingSpinnerProps): JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Button from '../new-button/variants/default/button';
|
|
3
|
-
import { LinkButtonProps } from '../new-button/variants/default/link';
|
|
3
|
+
import { type LinkButtonProps } from '../new-button/variants/default/link';
|
|
4
4
|
import { type IconButtonProps } from '../new-button/variants/icon/button';
|
|
5
5
|
import { type LinkIconButtonProps } from '../new-button/variants/icon/link';
|
|
6
6
|
import { buttonAppearances, iconButtonAppearances, linkButtonAppearances } from './appearances';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import { Appearance } from '../old-button/types';
|
|
4
|
+
import { type Appearance } from '../old-button/types';
|
|
5
5
|
export type ButtonGroupProps = {
|
|
6
6
|
/**
|
|
7
7
|
* The appearance to apply to all buttons.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SplitButtonAppearance, SplitButtonSpacing } from './types';
|
|
2
|
+
import { type SplitButtonAppearance, type SplitButtonSpacing } from './types';
|
|
3
3
|
type NavigationSplitButtonContextProps = {
|
|
4
4
|
appearance: 'navigation';
|
|
5
5
|
isHighlighted: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Appearance, type ButtonSpacing } from '../types';
|
|
2
|
+
import { type Appearance, type ButtonSpacing } from '../types';
|
|
3
3
|
export default function renderLoadingOverlay({ appearance, spacing, isDisabled, isSelected, }: {
|
|
4
4
|
spacing?: ButtonSpacing;
|
|
5
5
|
appearance?: Appearance;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/react';
|
|
2
|
-
import { ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
-
import { BaseProps } from '../types';
|
|
1
|
+
import { type CSSObject } from '@emotion/react';
|
|
2
|
+
import { type ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
+
import { type BaseProps } from '../types';
|
|
4
4
|
export type ThemeTokens = {
|
|
5
5
|
buttonStyles: CSSObject;
|
|
6
6
|
spinnerStyles: CSSObject;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CSSObject } from '@emotion/react';
|
|
3
|
-
import { ThemeProps, ThemeTokens } from './custom-theme-button-types';
|
|
2
|
+
import { type CSSObject } from '@emotion/react';
|
|
3
|
+
import { type ThemeProps, type ThemeTokens } from './custom-theme-button-types';
|
|
4
4
|
export declare function getCustomCss({ appearance, spacing, mode, isSelected, shouldFitContainer, iconIsOnlyChild, isLoading, state, }: ThemeProps): CSSObject;
|
|
5
5
|
export declare function getSpecifiers(styles: CSSObject): CSSObject;
|
|
6
6
|
export declare function defaultThemeFn(current: (values: ThemeProps) => ThemeTokens, values: ThemeProps): ThemeTokens;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/react';
|
|
2
|
-
import { ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
-
import { Appearance, Spacing } from '../types';
|
|
1
|
+
import { type CSSObject } from '@emotion/react';
|
|
2
|
+
import { type ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
+
import { type Appearance, type Spacing } from '../types';
|
|
4
4
|
export type GetCssArgs = {
|
|
5
5
|
appearance: Appearance;
|
|
6
6
|
spacing: Spacing;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BaseProps } from '../types';
|
|
1
|
+
import { type BaseProps } from '../types';
|
|
2
2
|
export default function getIsOnlySingleIcon({ children, iconBefore, iconAfter, }: Pick<BaseProps, 'children' | 'iconBefore' | 'iconAfter'>): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BaseProps } from '../types';
|
|
2
|
+
import { type BaseProps } from '../types';
|
|
3
3
|
type LoadingSpinnerProps = Pick<BaseProps, 'appearance' | 'isDisabled' | 'isSelected' | 'spacing'>;
|
|
4
4
|
export default function LoadingSpinner({ appearance, isDisabled, isSelected, spacing, }: LoadingSpinnerProps): JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Button from '../new-button/variants/default/button';
|
|
3
|
-
import { LinkButtonProps } from '../new-button/variants/default/link';
|
|
3
|
+
import { type LinkButtonProps } from '../new-button/variants/default/link';
|
|
4
4
|
import { type IconButtonProps } from '../new-button/variants/icon/button';
|
|
5
5
|
import { type LinkIconButtonProps } from '../new-button/variants/icon/link';
|
|
6
6
|
import { buttonAppearances, iconButtonAppearances, linkButtonAppearances } from './appearances';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomThemeButtonOwnProps } from '../src/old-button/custom-theme-button/custom-theme-button-types';
|
|
1
|
+
import { type CustomThemeButtonOwnProps } from '../src/old-button/custom-theme-button/custom-theme-button-types';
|
|
2
2
|
|
|
3
3
|
export default function CustomThemeButtonProps(
|
|
4
4
|
props: CustomThemeButtonOwnProps,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomThemeButtonOwnProps } from '../../src/old-button/custom-theme-button/custom-theme-button-types';
|
|
1
|
+
import { type CustomThemeButtonOwnProps } from '../../src/old-button/custom-theme-button/custom-theme-button-types';
|
|
2
2
|
|
|
3
3
|
export default function CustomThemeButtonProps(
|
|
4
4
|
props: CustomThemeButtonOwnProps,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdditionalButtonVariantProps } from '../../../../src/new-button/variants/types';
|
|
1
|
+
import { type AdditionalButtonVariantProps } from '../../../../src/new-button/variants/types';
|
|
2
2
|
|
|
3
3
|
export default function ButtonProps(props: AdditionalButtonVariantProps) {
|
|
4
4
|
return null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdditionalButtonVariantProps } from '../../../../src/new-button/variants/types';
|
|
1
|
+
import { type AdditionalButtonVariantProps } from '../../../../src/new-button/variants/types';
|
|
2
2
|
|
|
3
3
|
export default function IconButtonProps(props: AdditionalButtonVariantProps) {
|
|
4
4
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.17.0",
|
|
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/"
|
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
"@atlaskit/focus-ring": "^1.4.0",
|
|
97
97
|
"@atlaskit/icon": "^22.3.0",
|
|
98
98
|
"@atlaskit/interaction-context": "^2.1.0",
|
|
99
|
+
"@atlaskit/platform-feature-flags": "^0.2.5",
|
|
99
100
|
"@atlaskit/primitives": "^6.3.0",
|
|
100
101
|
"@atlaskit/spinner": "^16.1.0",
|
|
101
102
|
"@atlaskit/theme": "^12.8.0",
|
|
@@ -156,5 +157,10 @@
|
|
|
156
157
|
}
|
|
157
158
|
},
|
|
158
159
|
"homepage": "https://atlassian.design/components/button/",
|
|
159
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
160
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
161
|
+
"platform-feature-flags": {
|
|
162
|
+
"platform.design-system-team.button-tokenised-typography-styles": {
|
|
163
|
+
"type": "boolean"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
160
166
|
}
|