@atlaskit/button 16.13.0 → 16.14.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 +6 -0
- package/dist/cjs/index.js +55 -0
- package/dist/cjs/new-button/variants/shared/use-button-base.js +1 -1
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/es2019/index.js +9 -1
- package/dist/es2019/new-button/variants/shared/use-button-base.js +1 -1
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/esm/index.js +9 -1
- package/dist/esm/new-button/variants/shared/use-button-base.js +1 -1
- package/dist/esm/old-button/shared/button-base.js +1 -1
- package/dist/types/index.d.ts +6 -0
- package/dist/types-ts4.5/index.d.ts +6 -0
- package/package.json +2 -2
- package/tmp/api-report-tmp.d.ts +0 -133
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 16.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#42928](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42928) [`f858870ae90`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f858870ae90) - Added new Button variants (in Alpha) unsafe exports to root entrypoint for documentation purposes
|
|
8
|
+
|
|
3
9
|
## 16.13.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,6 +29,60 @@ Object.defineProperty(exports, "Theme", {
|
|
|
29
29
|
return _customThemeButton.Theme;
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
+
Object.defineProperty(exports, "UNSAFE_BUTTON", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _unsafe.UNSAFE_BUTTON;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "UNSAFE_DIVIDER", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _unsafe.UNSAFE_DIVIDER;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "UNSAFE_GET_ACTIONS", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function get() {
|
|
47
|
+
return _unsafe.UNSAFE_GET_ACTIONS;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "UNSAFE_ICON_BUTTON", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function get() {
|
|
53
|
+
return _unsafe.UNSAFE_ICON_BUTTON;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "UNSAFE_LINK_BUTTON", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function get() {
|
|
59
|
+
return _unsafe.UNSAFE_LINK_BUTTON;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "UNSAFE_LINK_ICON_BUTTON", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function get() {
|
|
65
|
+
return _unsafe.UNSAFE_LINK_ICON_BUTTON;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "UNSAFE_SPLIT_BUTTON", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function get() {
|
|
71
|
+
return _unsafe.UNSAFE_SPLIT_BUTTON;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "UNSAFE_SPLIT_BUTTON_CONTAINER", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function get() {
|
|
77
|
+
return _unsafe.UNSAFE_SPLIT_BUTTON_CONTAINER;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "UNSAFE_SPLIT_BUTTON_CONTEXT", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function get() {
|
|
83
|
+
return _unsafe.UNSAFE_SPLIT_BUTTON_CONTEXT;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
32
86
|
Object.defineProperty(exports, "default", {
|
|
33
87
|
enumerable: true,
|
|
34
88
|
get: function get() {
|
|
@@ -39,5 +93,6 @@ var _standardButton = _interopRequireDefault(require("./entry-points/standard-bu
|
|
|
39
93
|
var _loadingButton = _interopRequireDefault(require("./entry-points/loading-button"));
|
|
40
94
|
var _customThemeButton = _interopRequireWildcard(require("./entry-points/custom-theme-button"));
|
|
41
95
|
var _buttonGroup = _interopRequireDefault(require("./entry-points/button-group"));
|
|
96
|
+
var _unsafe = require("./entry-points/unsafe");
|
|
42
97
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
98
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -115,7 +115,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
115
115
|
action: 'clicked',
|
|
116
116
|
componentName: 'button',
|
|
117
117
|
packageName: "@atlaskit/button",
|
|
118
|
-
packageVersion: "16.
|
|
118
|
+
packageVersion: "16.14.0",
|
|
119
119
|
analyticsData: analyticsContext,
|
|
120
120
|
actionSubject: buttonType
|
|
121
121
|
});
|
|
@@ -118,7 +118,7 @@ var _default = exports.default = /*#__PURE__*/_react.default.forwardRef(function
|
|
|
118
118
|
action: 'clicked',
|
|
119
119
|
componentName: 'button',
|
|
120
120
|
packageName: "@atlaskit/button",
|
|
121
|
-
packageVersion: "16.
|
|
121
|
+
packageVersion: "16.14.0",
|
|
122
122
|
analyticsData: analyticsContext
|
|
123
123
|
});
|
|
124
124
|
|
package/dist/es2019/index.js
CHANGED
|
@@ -5,4 +5,12 @@ export {
|
|
|
5
5
|
default } from './entry-points/standard-button';
|
|
6
6
|
export { default as LoadingButton } from './entry-points/loading-button';
|
|
7
7
|
export { default as CustomThemeButton, Theme } from './entry-points/custom-theme-button';
|
|
8
|
-
export { default as ButtonGroup } from './entry-points/button-group';
|
|
8
|
+
export { default as ButtonGroup } from './entry-points/button-group';
|
|
9
|
+
|
|
10
|
+
// New Button
|
|
11
|
+
export { UNSAFE_BUTTON } from './entry-points/unsafe';
|
|
12
|
+
export { UNSAFE_LINK_BUTTON } from './entry-points/unsafe';
|
|
13
|
+
export { UNSAFE_ICON_BUTTON } from './entry-points/unsafe';
|
|
14
|
+
export { UNSAFE_LINK_ICON_BUTTON } from './entry-points/unsafe';
|
|
15
|
+
export { UNSAFE_SPLIT_BUTTON, UNSAFE_SPLIT_BUTTON_CONTAINER, UNSAFE_DIVIDER, UNSAFE_GET_ACTIONS } from './entry-points/unsafe';
|
|
16
|
+
export { UNSAFE_SPLIT_BUTTON_CONTEXT } from './entry-points/unsafe';
|
|
@@ -103,7 +103,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
103
103
|
action: 'clicked',
|
|
104
104
|
componentName: 'button',
|
|
105
105
|
packageName: "@atlaskit/button",
|
|
106
|
-
packageVersion: "16.
|
|
106
|
+
packageVersion: "16.14.0",
|
|
107
107
|
analyticsData: analyticsContext
|
|
108
108
|
});
|
|
109
109
|
|
package/dist/esm/index.js
CHANGED
|
@@ -5,4 +5,12 @@ export {
|
|
|
5
5
|
default } from './entry-points/standard-button';
|
|
6
6
|
export { default as LoadingButton } from './entry-points/loading-button';
|
|
7
7
|
export { default as CustomThemeButton, Theme } from './entry-points/custom-theme-button';
|
|
8
|
-
export { default as ButtonGroup } from './entry-points/button-group';
|
|
8
|
+
export { default as ButtonGroup } from './entry-points/button-group';
|
|
9
|
+
|
|
10
|
+
// New Button
|
|
11
|
+
export { UNSAFE_BUTTON } from './entry-points/unsafe';
|
|
12
|
+
export { UNSAFE_LINK_BUTTON } from './entry-points/unsafe';
|
|
13
|
+
export { UNSAFE_ICON_BUTTON } from './entry-points/unsafe';
|
|
14
|
+
export { UNSAFE_LINK_ICON_BUTTON } from './entry-points/unsafe';
|
|
15
|
+
export { UNSAFE_SPLIT_BUTTON, UNSAFE_SPLIT_BUTTON_CONTAINER, UNSAFE_DIVIDER, UNSAFE_GET_ACTIONS } from './entry-points/unsafe';
|
|
16
|
+
export { UNSAFE_SPLIT_BUTTON_CONTEXT } from './entry-points/unsafe';
|
|
@@ -107,7 +107,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
107
107
|
action: 'clicked',
|
|
108
108
|
componentName: 'button',
|
|
109
109
|
packageName: "@atlaskit/button",
|
|
110
|
-
packageVersion: "16.
|
|
110
|
+
packageVersion: "16.14.0",
|
|
111
111
|
analyticsData: analyticsContext,
|
|
112
112
|
actionSubject: buttonType
|
|
113
113
|
});
|
|
@@ -109,7 +109,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
109
109
|
action: 'clicked',
|
|
110
110
|
componentName: 'button',
|
|
111
111
|
packageName: "@atlaskit/button",
|
|
112
|
-
packageVersion: "16.
|
|
112
|
+
packageVersion: "16.14.0",
|
|
113
113
|
analyticsData: analyticsContext
|
|
114
114
|
});
|
|
115
115
|
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,3 +6,9 @@ export type { LoadingButtonProps, LoadingButtonOwnProps, } from './entry-points/
|
|
|
6
6
|
export { default as CustomThemeButton, Theme, } from './entry-points/custom-theme-button';
|
|
7
7
|
export type { ThemeTokens, ThemeProps, InteractionState, CustomThemeButtonProps, CustomThemeButtonOwnProps, } from './entry-points/custom-theme-button';
|
|
8
8
|
export { default as ButtonGroup } from './entry-points/button-group';
|
|
9
|
+
export { UNSAFE_BUTTON } from './entry-points/unsafe';
|
|
10
|
+
export { UNSAFE_LINK_BUTTON } from './entry-points/unsafe';
|
|
11
|
+
export { UNSAFE_ICON_BUTTON } from './entry-points/unsafe';
|
|
12
|
+
export { UNSAFE_LINK_ICON_BUTTON } from './entry-points/unsafe';
|
|
13
|
+
export { UNSAFE_SPLIT_BUTTON, UNSAFE_SPLIT_BUTTON_CONTAINER, UNSAFE_DIVIDER, UNSAFE_GET_ACTIONS, } from './entry-points/unsafe';
|
|
14
|
+
export { UNSAFE_SPLIT_BUTTON_CONTEXT } from './entry-points/unsafe';
|
|
@@ -6,3 +6,9 @@ export type { LoadingButtonProps, LoadingButtonOwnProps, } from './entry-points/
|
|
|
6
6
|
export { default as CustomThemeButton, Theme, } from './entry-points/custom-theme-button';
|
|
7
7
|
export type { ThemeTokens, ThemeProps, InteractionState, CustomThemeButtonProps, CustomThemeButtonOwnProps, } from './entry-points/custom-theme-button';
|
|
8
8
|
export { default as ButtonGroup } from './entry-points/button-group';
|
|
9
|
+
export { UNSAFE_BUTTON } from './entry-points/unsafe';
|
|
10
|
+
export { UNSAFE_LINK_BUTTON } from './entry-points/unsafe';
|
|
11
|
+
export { UNSAFE_ICON_BUTTON } from './entry-points/unsafe';
|
|
12
|
+
export { UNSAFE_LINK_ICON_BUTTON } from './entry-points/unsafe';
|
|
13
|
+
export { UNSAFE_SPLIT_BUTTON, UNSAFE_SPLIT_BUTTON_CONTAINER, UNSAFE_DIVIDER, UNSAFE_GET_ACTIONS, } from './entry-points/unsafe';
|
|
14
|
+
export { UNSAFE_SPLIT_BUTTON_CONTEXT } from './entry-points/unsafe';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.14.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/"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@atlaskit/focus-ring": "^1.3.0",
|
|
82
82
|
"@atlaskit/interaction-context": "^2.1.0",
|
|
83
83
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
84
|
-
"@atlaskit/primitives": "^1.
|
|
84
|
+
"@atlaskit/primitives": "^1.10.0",
|
|
85
85
|
"@atlaskit/spinner": "^15.6.0",
|
|
86
86
|
"@atlaskit/theme": "^12.6.0",
|
|
87
87
|
"@atlaskit/tokens": "^1.28.0",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
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
|
-
```
|