@atlaskit/button 16.3.10 → 16.4.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 +16 -0
- package/codemods/15.1.1-data-testid.tsx +10 -12
- package/codemods/__tests__/15.0.0-lite-mode/optimistic.tsx +6 -12
- package/codemods/__tests__/15.0.0-lite-mode/shared.tsx +1 -2
- package/codemods/__tests__/15.1.1-data-testid/rename-data-testid.tsx +1 -2
- package/codemods/helpers/helpers-generic.tsx +10 -12
- package/dist/cjs/button-group.js +5 -5
- package/dist/cjs/entry-points/standard-button.js +1 -1
- package/dist/cjs/shared/button-base.js +9 -9
- package/dist/cjs/shared/css.js +14 -12
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/button-group.js +2 -2
- package/dist/es2019/entry-points/standard-button.js +1 -1
- package/dist/es2019/shared/button-base.js +4 -4
- package/dist/es2019/shared/css.js +13 -12
- package/dist/es2019/version.json +1 -1
- package/dist/esm/button-group.js +2 -2
- package/dist/esm/entry-points/standard-button.js +1 -1
- package/dist/esm/shared/button-base.js +4 -4
- package/dist/esm/shared/css.js +13 -12
- package/dist/esm/version.json +1 -1
- package/dist/types/button-group.d.ts +2 -1
- package/dist/types/custom-theme-button/custom-theme-button-types.d.ts +1 -1
- package/dist/types/custom-theme-button/theme.d.ts +1 -1
- package/dist/types/entry-points/standard-button.d.ts +1 -1
- package/dist/types/shared/block-events.d.ts +1 -0
- package/dist/types/shared/button-base.d.ts +1 -1
- package/dist/types/shared/css.d.ts +5 -5
- package/package.json +5 -13
- package/report.api.md +58 -117
- package/dist/types-ts4.0/button-group.d.ts +0 -11
- package/dist/types-ts4.0/button.d.ts +0 -15
- package/dist/types-ts4.0/custom-theme-button/custom-theme-button-types.d.ts +0 -22
- package/dist/types-ts4.0/custom-theme-button/custom-theme-button.d.ts +0 -10
- package/dist/types-ts4.0/custom-theme-button/index.d.ts +0 -2
- package/dist/types-ts4.0/custom-theme-button/theme.d.ts +0 -21
- package/dist/types-ts4.0/entry-points/button-group.d.ts +0 -1
- package/dist/types-ts4.0/entry-points/custom-theme-button.d.ts +0 -2
- package/dist/types-ts4.0/entry-points/loading-button.d.ts +0 -2
- package/dist/types-ts4.0/entry-points/standard-button.d.ts +0 -7
- package/dist/types-ts4.0/entry-points/types.d.ts +0 -4
- package/dist/types-ts4.0/index.d.ts +0 -8
- package/dist/types-ts4.0/loading-button.d.ts +0 -15
- package/dist/types-ts4.0/shared/block-events.d.ts +0 -3
- package/dist/types-ts4.0/shared/button-base.d.ts +0 -10
- package/dist/types-ts4.0/shared/colors.d.ts +0 -31
- package/dist/types-ts4.0/shared/css.d.ts +0 -22
- package/dist/types-ts4.0/shared/get-is-only-single-icon.d.ts +0 -2
- package/dist/types-ts4.0/shared/loading-spinner.d.ts +0 -5
- package/dist/types-ts4.0/types.d.ts +0 -89
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/
|
|
1
|
+
import { CSSObject } from '@emotion/react';
|
|
2
2
|
import { ThemeModes } from '@atlaskit/theme/types';
|
|
3
3
|
import { Appearance, Spacing } from '../types';
|
|
4
4
|
export declare type GetCssArgs = {
|
|
@@ -12,11 +12,11 @@ export declare type GetCssArgs = {
|
|
|
12
12
|
export declare function getCss({ appearance, spacing, mode, isSelected, shouldFitContainer, isOnlySingleIcon, }: GetCssArgs): CSSObject;
|
|
13
13
|
export declare function getIconStyle({ spacing }: {
|
|
14
14
|
spacing: Spacing;
|
|
15
|
-
}):
|
|
15
|
+
}): import("@emotion/react").SerializedStyles;
|
|
16
16
|
export declare function getContentStyle({ spacing }: {
|
|
17
17
|
spacing: Spacing;
|
|
18
|
-
}):
|
|
19
|
-
export declare function getFadingCss({ hasOverlay
|
|
18
|
+
}): import("@emotion/react").SerializedStyles;
|
|
19
|
+
export declare function getFadingCss({ hasOverlay }: {
|
|
20
20
|
hasOverlay: boolean;
|
|
21
|
-
}):
|
|
21
|
+
}): import("@emotion/react").SerializedStyles;
|
|
22
22
|
export declare const overlayCss: CSSObject;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.4.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/"
|
|
@@ -12,14 +12,6 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.0 <4.5": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.0/*",
|
|
19
|
-
"dist/types-ts4.0/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"sideEffects": false,
|
|
24
16
|
"atlaskit:src": "src/index.tsx",
|
|
25
17
|
"atlassian": {
|
|
@@ -42,11 +34,11 @@
|
|
|
42
34
|
"dependencies": {
|
|
43
35
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
44
36
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
45
|
-
"@atlaskit/spinner": "^15.
|
|
37
|
+
"@atlaskit/spinner": "^15.2.0",
|
|
46
38
|
"@atlaskit/theme": "^12.2.0",
|
|
47
|
-
"@atlaskit/tokens": "^0.
|
|
39
|
+
"@atlaskit/tokens": "^0.11.0",
|
|
48
40
|
"@babel/runtime": "^7.0.0",
|
|
49
|
-
"@emotion/
|
|
41
|
+
"@emotion/react": "^11.7.1"
|
|
50
42
|
},
|
|
51
43
|
"peerDependencies": {
|
|
52
44
|
"react": "^16.8.0"
|
|
@@ -95,4 +87,4 @@
|
|
|
95
87
|
},
|
|
96
88
|
"homepage": "https://atlassian.design/components/button/",
|
|
97
89
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
98
|
-
}
|
|
90
|
+
}
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/button"
|
|
1
|
+
## API Report File for "@atlaskit/button"
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
4
8
|
|
|
5
9
|
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
10
|
|
|
@@ -8,7 +12,8 @@
|
|
|
8
12
|
/// <reference types="react" />
|
|
9
13
|
|
|
10
14
|
import { ComponentType } from 'react';
|
|
11
|
-
import { CSSObject } from '@emotion/
|
|
15
|
+
import { CSSObject } from '@emotion/react';
|
|
16
|
+
import { jsx } from '@emotion/react';
|
|
12
17
|
import { default as React_2 } from 'react';
|
|
13
18
|
import { ReactNode } from 'react';
|
|
14
19
|
import { ThemeModes } from '@atlaskit/theme/types';
|
|
@@ -16,7 +21,8 @@ import { ThemeModes as ThemeModes_2 } from '@atlaskit/theme';
|
|
|
16
21
|
import { ThemeProp } from '@atlaskit/theme/components';
|
|
17
22
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
// @public (undocumented)
|
|
25
|
+
export type Appearance =
|
|
20
26
|
| 'default'
|
|
21
27
|
| 'danger'
|
|
22
28
|
| 'link'
|
|
@@ -25,92 +31,37 @@ export declare type Appearance =
|
|
|
25
31
|
| 'subtle-link'
|
|
26
32
|
| 'warning';
|
|
27
33
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
* The base styling to apply to the button
|
|
31
|
-
*/
|
|
34
|
+
// @public (undocumented)
|
|
35
|
+
export type BaseOwnProps = {
|
|
32
36
|
appearance?: Appearance;
|
|
33
|
-
/**
|
|
34
|
-
* Set the button to autofocus on mount
|
|
35
|
-
*/
|
|
36
37
|
autoFocus?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Add a classname to the button
|
|
39
|
-
*/
|
|
40
38
|
className?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Used to 'overlay' something over a button. This is commonly used to display a loading spinner
|
|
43
|
-
*/
|
|
44
39
|
overlay?: React_2.ReactNode;
|
|
45
|
-
/**
|
|
46
|
-
* Provides a url for buttons being used as a link
|
|
47
|
-
*/
|
|
48
40
|
href?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Places an icon within the button, after the button's text
|
|
51
|
-
*/
|
|
52
41
|
iconAfter?: React_2.ReactChild;
|
|
53
|
-
/**
|
|
54
|
-
* Places an icon within the button, before the button's text
|
|
55
|
-
*/
|
|
56
42
|
iconBefore?: React_2.ReactChild;
|
|
57
|
-
/**
|
|
58
|
-
* Set if the button is disabled
|
|
59
|
-
*/
|
|
60
43
|
isDisabled?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Change the style to indicate the button is selected
|
|
63
|
-
*/
|
|
64
44
|
isSelected?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Handler to be called on blur
|
|
67
|
-
*/
|
|
68
45
|
onBlur?: React_2.FocusEventHandler<HTMLElement>;
|
|
69
|
-
/**
|
|
70
|
-
* Handler to be called on click. The second argument can be used to track analytics data. See the tutorial in the analytics-next package for details
|
|
71
|
-
*/
|
|
72
46
|
onClick?: (
|
|
73
47
|
e: React_2.MouseEvent<HTMLElement>,
|
|
74
48
|
analyticsEvent: UIAnalyticsEvent,
|
|
75
49
|
) => void;
|
|
76
|
-
/**
|
|
77
|
-
* Handler to be called on focus
|
|
78
|
-
*/
|
|
79
50
|
onFocus?: React_2.FocusEventHandler<HTMLElement>;
|
|
80
|
-
/**
|
|
81
|
-
* Set the amount of padding in the button
|
|
82
|
-
*/
|
|
83
51
|
spacing?: Spacing;
|
|
84
|
-
/**
|
|
85
|
-
* Pass target down to a link within the button component, if a href is provided
|
|
86
|
-
*/
|
|
87
52
|
target?: React_2.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
88
|
-
/**
|
|
89
|
-
* Pass type down to a button
|
|
90
|
-
*/
|
|
91
53
|
type?: React_2.ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
92
|
-
/**
|
|
93
|
-
* Option to fit button width to its parent width
|
|
94
|
-
*/
|
|
95
54
|
shouldFitContainer?: boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Text content to be rendered in the button
|
|
98
|
-
*/
|
|
99
55
|
children?: React_2.ReactNode;
|
|
100
|
-
/**
|
|
101
|
-
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
102
|
-
*/
|
|
103
56
|
testId?: string;
|
|
104
57
|
component?:
|
|
105
58
|
| React_2.ComponentType<React_2.AllHTMLAttributes<HTMLElement>>
|
|
106
59
|
| React_2.ElementType;
|
|
107
|
-
/**
|
|
108
|
-
* Additional information to be included in the `context` of analytics events that come from button
|
|
109
|
-
*/
|
|
110
60
|
analyticsContext?: Record<string, any>;
|
|
111
61
|
};
|
|
112
62
|
|
|
113
|
-
|
|
63
|
+
// @public (undocumented)
|
|
64
|
+
export type BaseProps = Combine<
|
|
114
65
|
Combine<
|
|
115
66
|
Omit<React_2.AllHTMLAttributes<HTMLElement>, 'disabled'>,
|
|
116
67
|
{
|
|
@@ -121,66 +72,56 @@ export declare type BaseProps = Combine<
|
|
|
121
72
|
BaseOwnProps
|
|
122
73
|
>;
|
|
123
74
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
131
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
132
|
-
*/
|
|
133
|
-
declare const Button: React_2.MemoExoticComponent<React_2.ForwardRefExoticComponent<
|
|
134
|
-
ButtonProps & React_2.RefAttributes<HTMLElement>
|
|
135
|
-
>>;
|
|
75
|
+
// @public
|
|
76
|
+
const Button: React_2.MemoExoticComponent<
|
|
77
|
+
React_2.ForwardRefExoticComponent<
|
|
78
|
+
ButtonProps & React_2.RefAttributes<HTMLElement>
|
|
79
|
+
>
|
|
80
|
+
>;
|
|
136
81
|
export default Button;
|
|
137
82
|
|
|
138
|
-
|
|
83
|
+
// @public (undocumented)
|
|
84
|
+
export function ButtonGroup({
|
|
139
85
|
appearance,
|
|
140
86
|
children,
|
|
141
|
-
}: ButtonGroupProps): JSX.Element;
|
|
87
|
+
}: ButtonGroupProps): jsx.JSX.Element;
|
|
142
88
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
* The appearance to apply to all buttons.
|
|
146
|
-
*/
|
|
89
|
+
// @public (undocumented)
|
|
90
|
+
type ButtonGroupProps = {
|
|
147
91
|
appearance?: Appearance;
|
|
148
92
|
children?: React_2.ReactNode;
|
|
149
93
|
};
|
|
150
94
|
|
|
151
|
-
|
|
95
|
+
// @public (undocumented)
|
|
96
|
+
export interface ButtonProps extends BaseProps {}
|
|
152
97
|
|
|
153
|
-
|
|
98
|
+
// @public (undocumented)
|
|
99
|
+
type Combine<First, Second> = Omit<First, keyof Second> & Second;
|
|
154
100
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
Omit<BaseProps, 'overlay'> &
|
|
164
|
-
CustomThemeButtonOwnProps &
|
|
165
|
-
React_2.RefAttributes<HTMLElement>
|
|
166
|
-
>>;
|
|
101
|
+
// @public
|
|
102
|
+
export const CustomThemeButton: React_2.MemoExoticComponent<
|
|
103
|
+
React_2.ForwardRefExoticComponent<
|
|
104
|
+
Omit<BaseProps, 'overlay'> &
|
|
105
|
+
CustomThemeButtonOwnProps &
|
|
106
|
+
React_2.RefAttributes<HTMLElement>
|
|
107
|
+
>
|
|
108
|
+
>;
|
|
167
109
|
|
|
168
|
-
|
|
110
|
+
// @public (undocumented)
|
|
111
|
+
export type CustomThemeButtonOwnProps = {
|
|
169
112
|
isLoading?: boolean;
|
|
170
|
-
/**
|
|
171
|
-
* Slow + discouraged custom theme API
|
|
172
|
-
* See custom theme guide for usage details
|
|
173
|
-
*/
|
|
174
113
|
theme?: (
|
|
175
114
|
current: (props: ThemeProps) => ThemeTokens,
|
|
176
115
|
props: ThemeProps,
|
|
177
116
|
) => ThemeTokens;
|
|
178
117
|
};
|
|
179
118
|
|
|
180
|
-
|
|
119
|
+
// @public (undocumented)
|
|
120
|
+
export type CustomThemeButtonProps = Omit<BaseProps, 'overlay'> &
|
|
181
121
|
CustomThemeButtonOwnProps;
|
|
182
122
|
|
|
183
|
-
|
|
123
|
+
// @public (undocumented)
|
|
124
|
+
export type InteractionState =
|
|
184
125
|
| 'disabled'
|
|
185
126
|
| 'focusSelected'
|
|
186
127
|
| 'selected'
|
|
@@ -189,29 +130,27 @@ export declare type InteractionState =
|
|
|
189
130
|
| 'focus'
|
|
190
131
|
| 'default';
|
|
191
132
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
*
|
|
195
|
-
* A small wrapper around Button that allows you to show an @atlaskit/spinner as an overlay on the button when you set an isLoading prop to true.
|
|
196
|
-
*
|
|
197
|
-
* - [Examples](https://atlassian.design/components/button/examples#loading-button)
|
|
198
|
-
*/
|
|
199
|
-
export declare const LoadingButton: React_2.ForwardRefExoticComponent<
|
|
133
|
+
// @public
|
|
134
|
+
export const LoadingButton: React_2.ForwardRefExoticComponent<
|
|
200
135
|
Omit<BaseProps, 'overlay'> &
|
|
201
136
|
LoadingButtonOwnProps &
|
|
202
137
|
React_2.RefAttributes<HTMLElement>
|
|
203
138
|
>;
|
|
204
139
|
|
|
205
|
-
|
|
140
|
+
// @public (undocumented)
|
|
141
|
+
export type LoadingButtonOwnProps = {
|
|
206
142
|
isLoading?: boolean;
|
|
207
143
|
};
|
|
208
144
|
|
|
209
|
-
|
|
145
|
+
// @public (undocumented)
|
|
146
|
+
export type LoadingButtonProps = Omit<BaseProps, 'overlay'> &
|
|
210
147
|
LoadingButtonOwnProps;
|
|
211
148
|
|
|
212
|
-
|
|
149
|
+
// @public (undocumented)
|
|
150
|
+
export type Spacing = 'compact' | 'default' | 'none';
|
|
213
151
|
|
|
214
|
-
|
|
152
|
+
// @public (undocumented)
|
|
153
|
+
export const Theme: {
|
|
215
154
|
Consumer: ComponentType<
|
|
216
155
|
{
|
|
217
156
|
children: (tokens: ThemeTokens) => ReactNode;
|
|
@@ -228,16 +167,18 @@ export declare const Theme: {
|
|
|
228
167
|
useTheme: (props: ThemeProps) => ThemeTokens;
|
|
229
168
|
};
|
|
230
169
|
|
|
231
|
-
|
|
170
|
+
// @public (undocumented)
|
|
171
|
+
export type ThemeProps = Partial<CustomThemeButtonProps> & {
|
|
232
172
|
state: InteractionState;
|
|
233
173
|
iconIsOnlyChild?: boolean;
|
|
234
174
|
mode?: ThemeModes;
|
|
235
175
|
};
|
|
236
176
|
|
|
237
|
-
|
|
177
|
+
// @public (undocumented)
|
|
178
|
+
export type ThemeTokens = {
|
|
238
179
|
buttonStyles: CSSObject;
|
|
239
180
|
spinnerStyles: CSSObject;
|
|
240
181
|
};
|
|
241
182
|
|
|
242
|
-
|
|
183
|
+
// (No @packageDocumentation comment for this package)
|
|
243
184
|
```
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Appearance } from './types';
|
|
4
|
-
export declare type ButtonGroupProps = {
|
|
5
|
-
/**
|
|
6
|
-
* The appearance to apply to all buttons.
|
|
7
|
-
*/
|
|
8
|
-
appearance?: Appearance;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
};
|
|
11
|
-
export default function ButtonGroup({ appearance, children, }: ButtonGroupProps): JSX.Element;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from './types';
|
|
3
|
-
export interface ButtonProps extends BaseProps {
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* __Button__
|
|
7
|
-
*
|
|
8
|
-
* A button triggers an event or action. They let users know what will happen next.
|
|
9
|
-
*
|
|
10
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
11
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
12
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
13
|
-
*/
|
|
14
|
-
declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>>;
|
|
15
|
-
export default Button;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/core';
|
|
2
|
-
import { ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
-
import { BaseProps } from '../types';
|
|
4
|
-
export declare type ThemeTokens = {
|
|
5
|
-
buttonStyles: CSSObject;
|
|
6
|
-
spinnerStyles: CSSObject;
|
|
7
|
-
};
|
|
8
|
-
export declare type InteractionState = 'disabled' | 'focusSelected' | 'selected' | 'active' | 'hover' | 'focus' | 'default';
|
|
9
|
-
export declare type CustomThemeButtonOwnProps = {
|
|
10
|
-
isLoading?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Slow + discouraged custom theme API
|
|
13
|
-
* See custom theme guide for usage details
|
|
14
|
-
*/
|
|
15
|
-
theme?: (current: (props: ThemeProps) => ThemeTokens, props: ThemeProps) => ThemeTokens;
|
|
16
|
-
};
|
|
17
|
-
export declare type CustomThemeButtonProps = Omit<BaseProps, 'overlay'> & CustomThemeButtonOwnProps;
|
|
18
|
-
export declare type ThemeProps = Partial<CustomThemeButtonProps> & {
|
|
19
|
-
state: InteractionState;
|
|
20
|
-
iconIsOnlyChild?: boolean;
|
|
21
|
-
mode?: ThemeModes;
|
|
22
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* __Custom theme button__
|
|
4
|
-
*
|
|
5
|
-
* A custom theme button. Avoid using this component. It exists for those already using custom theming, which is hard to use and has performance issues.
|
|
6
|
-
*
|
|
7
|
-
* - [Examples](https://atlassian.design/components/button/examples#custom-theme-button)
|
|
8
|
-
*/
|
|
9
|
-
declare const CustomThemeButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<import("..").BaseProps, "overlay"> & import("./custom-theme-button-types").CustomThemeButtonOwnProps & React.RefAttributes<HTMLElement>>>;
|
|
10
|
-
export default CustomThemeButton;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CSSObject } from '@emotion/core';
|
|
3
|
-
import { InteractionState, ThemeProps, ThemeTokens } from './custom-theme-button-types';
|
|
4
|
-
export declare function getCustomCss({ appearance, spacing, mode, isSelected, shouldFitContainer, iconIsOnlyChild, isLoading, state, }: ThemeProps): CSSObject;
|
|
5
|
-
export declare function getSpecifiers(styles: CSSObject): CSSObject;
|
|
6
|
-
export declare function defaultThemeFn(current: (values: ThemeProps) => ThemeTokens, values: ThemeProps): ThemeTokens;
|
|
7
|
-
declare const Theme: {
|
|
8
|
-
Consumer: import("react").ComponentType<{
|
|
9
|
-
children: (tokens: ThemeTokens) => import("react").ReactNode;
|
|
10
|
-
} & Partial<import("./custom-theme-button-types").CustomThemeButtonProps> & {
|
|
11
|
-
state: InteractionState;
|
|
12
|
-
iconIsOnlyChild?: boolean | undefined;
|
|
13
|
-
mode?: import("@atlaskit/theme").ThemeModes | undefined;
|
|
14
|
-
}>;
|
|
15
|
-
Provider: import("react").ComponentType<{
|
|
16
|
-
children?: import("react").ReactNode;
|
|
17
|
-
value?: import("@atlaskit/theme/components").ThemeProp<ThemeTokens, ThemeProps> | undefined;
|
|
18
|
-
}>;
|
|
19
|
-
useTheme: (props: ThemeProps) => ThemeTokens;
|
|
20
|
-
};
|
|
21
|
-
export default Theme;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../button-group';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export type { Appearance, Spacing, BaseOwnProps, BaseProps } from '../types';
|
|
2
|
-
export type { ButtonProps } from './standard-button';
|
|
3
|
-
export type { LoadingButtonProps, LoadingButtonOwnProps, } from './loading-button';
|
|
4
|
-
export type { ThemeTokens, ThemeProps, InteractionState, CustomThemeButtonProps, CustomThemeButtonOwnProps, } from './custom-theme-button';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type { Appearance, Spacing, BaseOwnProps, BaseProps, } from './entry-points/types';
|
|
2
|
-
export { default, } from './entry-points/standard-button';
|
|
3
|
-
export type { ButtonProps } from './entry-points/standard-button';
|
|
4
|
-
export { default as LoadingButton } from './entry-points/loading-button';
|
|
5
|
-
export type { LoadingButtonProps, LoadingButtonOwnProps, } from './entry-points/loading-button';
|
|
6
|
-
export { default as CustomThemeButton, Theme, } from './entry-points/custom-theme-button';
|
|
7
|
-
export type { ThemeTokens, ThemeProps, InteractionState, CustomThemeButtonProps, CustomThemeButtonOwnProps, } from './entry-points/custom-theme-button';
|
|
8
|
-
export { default as ButtonGroup } from './entry-points/button-group';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from './types';
|
|
3
|
-
export declare type LoadingButtonOwnProps = {
|
|
4
|
-
isLoading?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare type LoadingButtonProps = Omit<BaseProps, 'overlay'> & LoadingButtonOwnProps;
|
|
7
|
-
/**
|
|
8
|
-
* __Loading button__
|
|
9
|
-
*
|
|
10
|
-
* A small wrapper around Button that allows you to show an @atlaskit/spinner as an overlay on the button when you set an isLoading prop to true.
|
|
11
|
-
*
|
|
12
|
-
* - [Examples](https://atlassian.design/components/button/examples#loading-button)
|
|
13
|
-
*/
|
|
14
|
-
declare const LoadingButton: React.ForwardRefExoticComponent<Omit<BaseProps, "overlay"> & LoadingButtonOwnProps & React.RefAttributes<HTMLElement>>;
|
|
15
|
-
export default LoadingButton;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { CSSObject } from '@emotion/core';
|
|
4
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.AllHTMLAttributes<HTMLElement>, "disabled">, "data-testid" | "data-has-overlay"> & {
|
|
5
|
-
'data-testid'?: undefined;
|
|
6
|
-
'data-has-overlay'?: undefined;
|
|
7
|
-
}, keyof import("../types").BaseOwnProps> & import("../types").BaseOwnProps & {
|
|
8
|
-
buttonCss: CSSObject;
|
|
9
|
-
} & React.RefAttributes<HTMLElement>>;
|
|
10
|
-
export default _default;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ThemeModes } from '@atlaskit/theme/types';
|
|
2
|
-
import { Appearance } from '../types';
|
|
3
|
-
export declare type ColorRule = {
|
|
4
|
-
[key in ThemeModes]: string;
|
|
5
|
-
};
|
|
6
|
-
export declare type ColorGroup = {
|
|
7
|
-
default: ColorRule;
|
|
8
|
-
hover?: ColorRule;
|
|
9
|
-
active?: ColorRule;
|
|
10
|
-
disabled?: ColorRule;
|
|
11
|
-
selected?: ColorRule;
|
|
12
|
-
focus?: ColorRule;
|
|
13
|
-
focusSelected?: ColorRule;
|
|
14
|
-
};
|
|
15
|
-
export declare type ColorPreset = {
|
|
16
|
-
[key in Appearance]: ColorGroup;
|
|
17
|
-
};
|
|
18
|
-
export declare type BoxShadowColorGroup = {
|
|
19
|
-
focus: ColorRule;
|
|
20
|
-
focusSelected: ColorRule;
|
|
21
|
-
};
|
|
22
|
-
declare type BoxShadowColorPreset = {
|
|
23
|
-
[key in Appearance]: BoxShadowColorGroup;
|
|
24
|
-
};
|
|
25
|
-
declare type Values = {
|
|
26
|
-
background: ColorPreset;
|
|
27
|
-
boxShadowColor: BoxShadowColorPreset;
|
|
28
|
-
color: ColorPreset;
|
|
29
|
-
};
|
|
30
|
-
declare const values: Values;
|
|
31
|
-
export default values;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/core';
|
|
2
|
-
import { ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
-
import { Appearance, Spacing } from '../types';
|
|
4
|
-
export declare type GetCssArgs = {
|
|
5
|
-
appearance: Appearance;
|
|
6
|
-
spacing: Spacing;
|
|
7
|
-
mode: ThemeModes;
|
|
8
|
-
isSelected: boolean;
|
|
9
|
-
shouldFitContainer: boolean;
|
|
10
|
-
isOnlySingleIcon: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare function getCss({ appearance, spacing, mode, isSelected, shouldFitContainer, isOnlySingleIcon, }: GetCssArgs): CSSObject;
|
|
13
|
-
export declare function getIconStyle({ spacing }: {
|
|
14
|
-
spacing: Spacing;
|
|
15
|
-
}): CSSObject;
|
|
16
|
-
export declare function getContentStyle({ spacing }: {
|
|
17
|
-
spacing: Spacing;
|
|
18
|
-
}): CSSObject;
|
|
19
|
-
export declare function getFadingCss({ hasOverlay, }: {
|
|
20
|
-
hasOverlay: boolean;
|
|
21
|
-
}): CSSObject;
|
|
22
|
-
export declare const overlayCss: CSSObject;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BaseProps } from '../types';
|
|
3
|
-
declare type LoadingSpinnerProps = Pick<BaseProps, 'appearance' | 'isDisabled' | 'isSelected' | 'spacing'>;
|
|
4
|
-
export default function LoadingSpinner({ spacing, ...rest }: LoadingSpinnerProps): JSX.Element;
|
|
5
|
-
export {};
|