@atlaskit/button 23.4.9 → 23.4.11
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/dist/cjs/new-button/containers/split-button/split-button.compiled.css +9 -5
- package/dist/cjs/new-button/containers/split-button/split-button.js +1 -1
- package/dist/cjs/new-button/variants/default/link.js +1 -1
- package/dist/cjs/new-button/variants/icon/link.js +1 -1
- package/dist/cjs/new-button/variants/shared/button-base.js +5 -2
- package/dist/cjs/new-button/variants/shared/content.js +1 -1
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/es2019/new-button/containers/split-button/split-button.compiled.css +9 -5
- package/dist/es2019/new-button/containers/split-button/split-button.js +1 -1
- package/dist/es2019/new-button/variants/default/link.js +1 -1
- package/dist/es2019/new-button/variants/icon/link.js +1 -1
- package/dist/es2019/new-button/variants/shared/button-base.js +5 -2
- package/dist/es2019/new-button/variants/shared/content.js +1 -1
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/esm/new-button/containers/split-button/split-button.compiled.css +9 -5
- package/dist/esm/new-button/containers/split-button/split-button.js +1 -1
- package/dist/esm/new-button/variants/default/link.js +1 -1
- package/dist/esm/new-button/variants/icon/link.js +1 -1
- package/dist/esm/new-button/variants/shared/button-base.js +5 -2
- package/dist/esm/new-button/variants/shared/content.js +1 -1
- package/dist/esm/old-button/shared/button-base.js +1 -1
- package/dist/types/new-button/variants/default/button.d.ts +1 -7
- package/dist/types/new-button/variants/icon/button.d.ts +1 -7
- package/dist/types/new-button/variants/shared/button-base.d.ts +1 -1
- package/dist/types/old-button/custom-theme-button/theme.d.ts +2 -10
- package/dist/types/old-button/loading-button.d.ts +1 -1
- package/dist/types/old-button/shared/button-base.d.ts +4 -5
- package/dist/types/utils/variants.d.ts +12 -12
- package/dist/types-ts4.5/new-button/variants/default/button.d.ts +1 -7
- package/dist/types-ts4.5/new-button/variants/icon/button.d.ts +1 -7
- package/dist/types-ts4.5/new-button/variants/shared/button-base.d.ts +1 -1
- package/dist/types-ts4.5/old-button/custom-theme-button/theme.d.ts +2 -10
- package/dist/types-ts4.5/old-button/loading-button.d.ts +1 -1
- package/dist/types-ts4.5/old-button/shared/button-base.d.ts +4 -5
- package/dist/types-ts4.5/utils/variants.d.ts +12 -12
- package/offerings.json +1 -5
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 23.4.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`437668dfbdec9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/437668dfbdec9) -
|
|
8
|
+
Add explicit types to a number of DST components
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 23.4.10
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`39e543109ec09`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/39e543109ec09) -
|
|
16
|
+
add type info to forwardRef components
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 23.4.9
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
._1mouu2gc{margin-block:var(--ds-space-100,8px)}._12ji13gt{outline-color:var(--ds-border-disabled,#091e420f)}
|
|
6
6
|
._12jimuej{outline-color:var(--ds-border,#091e4224)}
|
|
7
7
|
._12y3t94y{outline-width:1px}
|
|
8
|
+
._1553idpf button{border-end-start-radius:0}
|
|
8
9
|
._1bsbe4h9{width:var(--ds-border-width,1px)}
|
|
9
10
|
._1cwg1n1a{outline-offset:-1px}
|
|
10
11
|
._1e0c116y{display:inline-flex}
|
|
11
|
-
._1j4hidpf a
|
|
12
|
+
._1j4hidpf a{border-end-start-radius:0}
|
|
12
13
|
._1pbykb7n{z-index:1}
|
|
13
|
-
._1qgbidpf a
|
|
14
|
+
._1qgbidpf a{border-start-start-radius:0}
|
|
14
15
|
._1qu2nqa1{outline-style:solid}
|
|
15
16
|
._4cvr1h6o{align-items:center}
|
|
16
17
|
._4t3i1hvu{height:calc(1.5rem - var(--ds-border-width, 1px) - var(--ds-border-width, 1px))}
|
|
@@ -19,6 +20,8 @@
|
|
|
19
20
|
._4t3im1ee{height:calc(2rem - var(--ds-border-width, 1px) - var(--ds-border-width, 1px))}
|
|
20
21
|
._4t3iviql{height:2rem}
|
|
21
22
|
._80om13gf{cursor:not-allowed}
|
|
23
|
+
._anlpidpf button{border-end-end-radius:0}
|
|
24
|
+
._bepvidpf button{border-start-end-radius:0}
|
|
22
25
|
._bfhk15cr{background-color:var(--ds-text-inverse,#fff)}
|
|
23
26
|
._bfhk1fxt{background-color:var(--ds-text,#172b4d)}
|
|
24
27
|
._bfhk9xzm{background-color:var(--ds-border-disabled,#091e4224)}
|
|
@@ -28,8 +31,9 @@
|
|
|
28
31
|
._bfhkveue{background-color:var(--ds-border-inverse,#fff)}
|
|
29
32
|
._kqswh2mm{position:relative}
|
|
30
33
|
._o5721q9c{white-space:nowrap}
|
|
31
|
-
._p9ykidpf a
|
|
32
|
-
._traeidpf a
|
|
34
|
+
._p9ykidpf a{border-start-end-radius:0}
|
|
35
|
+
._traeidpf a{border-end-end-radius:0}
|
|
33
36
|
._tzy419lr{opacity:.62}
|
|
34
37
|
._tzy41uwv{opacity:.51}
|
|
35
|
-
._tzy41wzo{opacity:.64}
|
|
38
|
+
._tzy41wzo{opacity:.64}
|
|
39
|
+
._y1n3idpf button{border-start-start-radius:0}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* button-base.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* button-base.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -91,7 +91,10 @@ var selectedStyles = {
|
|
|
91
91
|
*
|
|
92
92
|
* @private
|
|
93
93
|
*/
|
|
94
|
-
var ButtonBase = /*#__PURE__*/_react.default.forwardRef(
|
|
94
|
+
var ButtonBase = /*#__PURE__*/_react.default.forwardRef(
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
96
|
+
// @ts-ignore: to unblock React 18.2.0 -> 18.3.1 version bump in Jira
|
|
97
|
+
function (_ref, ref) {
|
|
95
98
|
var propAppearance = _ref.appearance,
|
|
96
99
|
_ref$autoFocus = _ref.autoFocus,
|
|
97
100
|
autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus,
|
|
@@ -132,7 +132,7 @@ var ButtonBase = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(prop
|
|
|
132
132
|
action: 'clicked',
|
|
133
133
|
componentName: 'button',
|
|
134
134
|
packageName: "@atlaskit/button",
|
|
135
|
-
packageVersion: "
|
|
135
|
+
packageVersion: "0.0.0-development",
|
|
136
136
|
analyticsData: analyticsContext
|
|
137
137
|
});
|
|
138
138
|
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
._1mouu2gc{margin-block:var(--ds-space-100,8px)}._12ji13gt{outline-color:var(--ds-border-disabled,#091e420f)}
|
|
6
6
|
._12jimuej{outline-color:var(--ds-border,#091e4224)}
|
|
7
7
|
._12y3t94y{outline-width:1px}
|
|
8
|
+
._1553idpf button{border-end-start-radius:0}
|
|
8
9
|
._1bsbe4h9{width:var(--ds-border-width,1px)}
|
|
9
10
|
._1cwg1n1a{outline-offset:-1px}
|
|
10
11
|
._1e0c116y{display:inline-flex}
|
|
11
|
-
._1j4hidpf a
|
|
12
|
+
._1j4hidpf a{border-end-start-radius:0}
|
|
12
13
|
._1pbykb7n{z-index:1}
|
|
13
|
-
._1qgbidpf a
|
|
14
|
+
._1qgbidpf a{border-start-start-radius:0}
|
|
14
15
|
._1qu2nqa1{outline-style:solid}
|
|
15
16
|
._4cvr1h6o{align-items:center}
|
|
16
17
|
._4t3i1hvu{height:calc(1.5rem - var(--ds-border-width, 1px) - var(--ds-border-width, 1px))}
|
|
@@ -19,6 +20,8 @@
|
|
|
19
20
|
._4t3im1ee{height:calc(2rem - var(--ds-border-width, 1px) - var(--ds-border-width, 1px))}
|
|
20
21
|
._4t3iviql{height:2rem}
|
|
21
22
|
._80om13gf{cursor:not-allowed}
|
|
23
|
+
._anlpidpf button{border-end-end-radius:0}
|
|
24
|
+
._bepvidpf button{border-start-end-radius:0}
|
|
22
25
|
._bfhk15cr{background-color:var(--ds-text-inverse,#fff)}
|
|
23
26
|
._bfhk1fxt{background-color:var(--ds-text,#172b4d)}
|
|
24
27
|
._bfhk9xzm{background-color:var(--ds-border-disabled,#091e4224)}
|
|
@@ -28,8 +31,9 @@
|
|
|
28
31
|
._bfhkveue{background-color:var(--ds-border-inverse,#fff)}
|
|
29
32
|
._kqswh2mm{position:relative}
|
|
30
33
|
._o5721q9c{white-space:nowrap}
|
|
31
|
-
._p9ykidpf a
|
|
32
|
-
._traeidpf a
|
|
34
|
+
._p9ykidpf a{border-start-end-radius:0}
|
|
35
|
+
._traeidpf a{border-end-end-radius:0}
|
|
33
36
|
._tzy419lr{opacity:.62}
|
|
34
37
|
._tzy41uwv{opacity:.51}
|
|
35
|
-
._tzy41wzo{opacity:.64}
|
|
38
|
+
._tzy41wzo{opacity:.64}
|
|
39
|
+
._y1n3idpf button{border-start-start-radius:0}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* button-base.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* button-base.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./button-base.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -79,7 +79,10 @@ const selectedStyles = {
|
|
|
79
79
|
*
|
|
80
80
|
* @private
|
|
81
81
|
*/
|
|
82
|
-
const ButtonBase = /*#__PURE__*/React.forwardRef(
|
|
82
|
+
const ButtonBase = /*#__PURE__*/React.forwardRef(
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
84
|
+
// @ts-ignore: to unblock React 18.2.0 -> 18.3.1 version bump in Jira
|
|
85
|
+
({
|
|
83
86
|
appearance: propAppearance,
|
|
84
87
|
autoFocus = false,
|
|
85
88
|
isDisabled: propIsDisabled = false,
|
|
@@ -119,7 +119,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref)
|
|
|
119
119
|
action: 'clicked',
|
|
120
120
|
componentName: 'button',
|
|
121
121
|
packageName: "@atlaskit/button",
|
|
122
|
-
packageVersion: "
|
|
122
|
+
packageVersion: "0.0.0-development",
|
|
123
123
|
analyticsData: analyticsContext
|
|
124
124
|
});
|
|
125
125
|
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
._1mouu2gc{margin-block:var(--ds-space-100,8px)}._12ji13gt{outline-color:var(--ds-border-disabled,#091e420f)}
|
|
6
6
|
._12jimuej{outline-color:var(--ds-border,#091e4224)}
|
|
7
7
|
._12y3t94y{outline-width:1px}
|
|
8
|
+
._1553idpf button{border-end-start-radius:0}
|
|
8
9
|
._1bsbe4h9{width:var(--ds-border-width,1px)}
|
|
9
10
|
._1cwg1n1a{outline-offset:-1px}
|
|
10
11
|
._1e0c116y{display:inline-flex}
|
|
11
|
-
._1j4hidpf a
|
|
12
|
+
._1j4hidpf a{border-end-start-radius:0}
|
|
12
13
|
._1pbykb7n{z-index:1}
|
|
13
|
-
._1qgbidpf a
|
|
14
|
+
._1qgbidpf a{border-start-start-radius:0}
|
|
14
15
|
._1qu2nqa1{outline-style:solid}
|
|
15
16
|
._4cvr1h6o{align-items:center}
|
|
16
17
|
._4t3i1hvu{height:calc(1.5rem - var(--ds-border-width, 1px) - var(--ds-border-width, 1px))}
|
|
@@ -19,6 +20,8 @@
|
|
|
19
20
|
._4t3im1ee{height:calc(2rem - var(--ds-border-width, 1px) - var(--ds-border-width, 1px))}
|
|
20
21
|
._4t3iviql{height:2rem}
|
|
21
22
|
._80om13gf{cursor:not-allowed}
|
|
23
|
+
._anlpidpf button{border-end-end-radius:0}
|
|
24
|
+
._bepvidpf button{border-start-end-radius:0}
|
|
22
25
|
._bfhk15cr{background-color:var(--ds-text-inverse,#fff)}
|
|
23
26
|
._bfhk1fxt{background-color:var(--ds-text,#172b4d)}
|
|
24
27
|
._bfhk9xzm{background-color:var(--ds-border-disabled,#091e4224)}
|
|
@@ -28,8 +31,9 @@
|
|
|
28
31
|
._bfhkveue{background-color:var(--ds-border-inverse,#fff)}
|
|
29
32
|
._kqswh2mm{position:relative}
|
|
30
33
|
._o5721q9c{white-space:nowrap}
|
|
31
|
-
._p9ykidpf a
|
|
32
|
-
._traeidpf a
|
|
34
|
+
._p9ykidpf a{border-start-end-radius:0}
|
|
35
|
+
._traeidpf a{border-end-end-radius:0}
|
|
33
36
|
._tzy419lr{opacity:.62}
|
|
34
37
|
._tzy41uwv{opacity:.51}
|
|
35
|
-
._tzy41wzo{opacity:.64}
|
|
38
|
+
._tzy41wzo{opacity:.64}
|
|
39
|
+
._y1n3idpf button{border-start-start-radius:0}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* link.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* link.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["analyticsContext", "appearance", "aria-label", "aria-labelledby", "autoFocus", "children", "href", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shouldFitContainer", "spacing", "testId"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* link.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* link.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["aria-label", "aria-labelledby", "analyticsContext", "appearance", "autoFocus", "href", "icon", "interactionName", "isDisabled", "isSelected", "isTooltipDisabled", "label", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shape", "spacing", "testId", "tooltip"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* button-base.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* button-base.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["appearance", "autoFocus", "isDisabled", "isLoading", "isSelected", "isIconButton", "isCircle", "hasIconBefore", "hasIconAfter", "shouldFitContainer", "spacing", "ariaLabel", "ariaLabelledBy", "children", "interactionName", "onClick", "onMouseDown", "onMouseDownCapture", "onMouseUp", "onMouseUpCapture", "onKeyDown", "onKeyDownCapture", "onKeyUp", "onKeyUpCapture", "onTouchStart", "onTouchStartCapture", "onTouchEnd", "onTouchEndCapture", "onPointerDown", "onPointerDownCapture", "onPointerUp", "onPointerUpCapture", "onClickCapture", "testId", "analyticsContext", "componentName", "role", "onMouseOver", "onMouseOut", "onFocus", "onBlur", "onMouseMove", "type"],
|
|
@@ -82,7 +82,10 @@ var selectedStyles = {
|
|
|
82
82
|
*
|
|
83
83
|
* @private
|
|
84
84
|
*/
|
|
85
|
-
var ButtonBase = /*#__PURE__*/React.forwardRef(
|
|
85
|
+
var ButtonBase = /*#__PURE__*/React.forwardRef(
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
87
|
+
// @ts-ignore: to unblock React 18.2.0 -> 18.3.1 version bump in Jira
|
|
88
|
+
function (_ref, ref) {
|
|
86
89
|
var propAppearance = _ref.appearance,
|
|
87
90
|
_ref$autoFocus = _ref.autoFocus,
|
|
88
91
|
autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus,
|
|
@@ -125,7 +125,7 @@ var ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
125
125
|
action: 'clicked',
|
|
126
126
|
componentName: 'button',
|
|
127
127
|
packageName: "@atlaskit/button",
|
|
128
|
-
packageVersion: "
|
|
128
|
+
packageVersion: "0.0.0-development",
|
|
129
129
|
analyticsData: analyticsContext
|
|
130
130
|
});
|
|
131
131
|
|
|
@@ -11,11 +11,5 @@ export type ButtonProps = CommonDefaultButtonProps & CommonButtonVariantProps;
|
|
|
11
11
|
* - [Code](https://atlassian.design/components/button/code)
|
|
12
12
|
* - [Usage](https://atlassian.design/components/button/usage)
|
|
13
13
|
*/
|
|
14
|
-
declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<
|
|
15
|
-
'data-testid'?: never;
|
|
16
|
-
}, "onFocus" | "onBlur" | "onClick" | keyof import("../types").CommonBaseProps> & import("../types").CommonBaseProps & {
|
|
17
|
-
onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
18
|
-
onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
19
|
-
onClick?: ((e: React.MouseEvent<HTMLButtonElement, MouseEvent>, analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => void) | undefined;
|
|
20
|
-
} & React.RefAttributes<HTMLButtonElement>>>;
|
|
14
|
+
declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonProps> & React.RefAttributes<HTMLButtonElement>>>;
|
|
21
15
|
export default Button;
|
|
@@ -11,11 +11,5 @@ export type IconButtonProps = CommonIconButtonProps & CommonButtonVariantProps;
|
|
|
11
11
|
* - [Code](https://atlassian.design/components/button/icon-button/code)
|
|
12
12
|
* - [Usage](https://atlassian.design/components/button/icon-button/usage)
|
|
13
13
|
*/
|
|
14
|
-
declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<
|
|
15
|
-
'data-testid'?: never;
|
|
16
|
-
}, "onFocus" | "onBlur" | "onClick" | keyof import("../types").CommonBaseProps> & import("../types").CommonBaseProps & {
|
|
17
|
-
onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
18
|
-
onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
19
|
-
onClick?: ((e: React.MouseEvent<HTMLButtonElement, MouseEvent>, analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => void) | undefined;
|
|
20
|
-
} & React.RefAttributes<HTMLButtonElement>>>;
|
|
14
|
+
declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.PropsWithoutRef<IconButtonProps> & React.RefAttributes<HTMLButtonElement>>>;
|
|
21
15
|
export default IconButton;
|
|
@@ -41,5 +41,5 @@ type ButtonBaseProps<TagName extends HTMLElement> = CommonBaseProps & Pick<Commo
|
|
|
41
41
|
*
|
|
42
42
|
* @private
|
|
43
43
|
*/
|
|
44
|
-
declare const ButtonBase: React.ForwardRefExoticComponent<
|
|
44
|
+
declare const ButtonBase: React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonBaseProps<HTMLButtonElement>> & React.RefAttributes<HTMLButtonElement>>;
|
|
45
45
|
export default ButtonBase;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { type CSSObject } from '@emotion/react';
|
|
2
|
+
import { createTheme } from '@atlaskit/theme/components';
|
|
2
3
|
import { type ThemeProps, type ThemeTokens } from './custom-theme-button-types';
|
|
3
4
|
export declare function getCustomCss({ appearance, spacing, mode, isSelected, shouldFitContainer, iconIsOnlyChild, isLoading, state, }: ThemeProps): CSSObject;
|
|
4
5
|
export declare function getSpecifiers(styles: CSSObject): CSSObject;
|
|
5
6
|
export declare function defaultThemeFn(current: (values: ThemeProps) => ThemeTokens, values: ThemeProps): ThemeTokens;
|
|
6
|
-
declare const Theme:
|
|
7
|
-
Consumer: import("react").ComponentType<{
|
|
8
|
-
children: (tokens: ThemeTokens) => import("react").ReactNode;
|
|
9
|
-
} & Omit<ThemeProps, "children">>;
|
|
10
|
-
Provider: import("react").ComponentType<{
|
|
11
|
-
children?: import("react").ReactNode;
|
|
12
|
-
value?: import("@atlaskit/theme/components").ThemeProp<ThemeTokens, ThemeProps> | undefined;
|
|
13
|
-
}>;
|
|
14
|
-
useTheme: (props: ThemeProps) => ThemeTokens;
|
|
15
|
-
};
|
|
7
|
+
declare const Theme: ReturnType<typeof createTheme<ThemeTokens, ThemeProps>>;
|
|
16
8
|
export default Theme;
|
|
@@ -15,5 +15,5 @@ export type LoadingButtonProps = Omit<BaseProps, 'overlay'> & LoadingButtonOwnPr
|
|
|
15
15
|
*
|
|
16
16
|
* - [Examples](https://atlassian.design/components/button/examples#loading-button)
|
|
17
17
|
*/
|
|
18
|
-
declare const LoadingButton: React.ForwardRefExoticComponent<
|
|
18
|
+
declare const LoadingButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<LoadingButtonProps> & React.RefAttributes<HTMLElement>>;
|
|
19
19
|
export default LoadingButton;
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { type CSSObject } from '@emotion/react';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'data-has-overlay'?: never;
|
|
10
|
-
}, keyof import("../types").BaseOwnProps> & import("../types").BaseOwnProps & {
|
|
7
|
+
import { type BaseProps } from '../types';
|
|
8
|
+
type ButtonBaseProps = BaseProps & {
|
|
11
9
|
buttonCss: CSSObject;
|
|
12
|
-
}
|
|
10
|
+
};
|
|
11
|
+
declare const ButtonBase: React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonBaseProps> & React.RefAttributes<HTMLElement>>;
|
|
13
12
|
export default ButtonBase;
|
|
@@ -41,18 +41,18 @@ type DefaultButtonVariants = DefaultButtonVariant | LinkButtonVariant;
|
|
|
41
41
|
type LinkButtonVariants = LinkButtonVariant | LinkIconButtonVariant;
|
|
42
42
|
type IconButtonVariants = IconButtonVariant | LinkIconButtonVariant;
|
|
43
43
|
export type Variant = DefaultButtonVariant | LinkButtonVariant | IconButtonVariant | LinkIconButtonVariant;
|
|
44
|
-
declare const LinkButtonRender: React.ForwardRefExoticComponent<Omit<LinkButtonProps,
|
|
45
|
-
href?: LinkButtonProps[
|
|
46
|
-
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
47
|
-
declare const IconButtonRender: React.ForwardRefExoticComponent<Omit<IconButtonProps,
|
|
48
|
-
icon?: IconButtonProps[
|
|
49
|
-
label?: IconButtonProps[
|
|
50
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
51
|
-
declare const LinkIconButtonRender: React.ForwardRefExoticComponent<Omit<LinkIconButtonProps,
|
|
52
|
-
href?: LinkIconButtonProps[
|
|
53
|
-
icon?: LinkIconButtonProps[
|
|
54
|
-
label?: LinkIconButtonProps[
|
|
55
|
-
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
44
|
+
declare const LinkButtonRender: React.ForwardRefExoticComponent<React.PropsWithoutRef<Omit<LinkButtonProps, 'href'> & {
|
|
45
|
+
href?: LinkButtonProps['href'];
|
|
46
|
+
}> & React.RefAttributes<HTMLAnchorElement>>;
|
|
47
|
+
declare const IconButtonRender: React.ForwardRefExoticComponent<React.PropsWithoutRef<Omit<IconButtonProps, 'icon' | 'label'> & {
|
|
48
|
+
icon?: IconButtonProps['icon'];
|
|
49
|
+
label?: IconButtonProps['label'];
|
|
50
|
+
}> & React.RefAttributes<HTMLButtonElement>>;
|
|
51
|
+
declare const LinkIconButtonRender: React.ForwardRefExoticComponent<React.PropsWithoutRef<Omit<LinkIconButtonProps, 'href' | 'icon' | 'label'> & {
|
|
52
|
+
href?: LinkIconButtonProps['href'];
|
|
53
|
+
icon?: LinkIconButtonProps['icon'];
|
|
54
|
+
label?: LinkIconButtonProps['label'];
|
|
55
|
+
}> & React.RefAttributes<HTMLAnchorElement>>;
|
|
56
56
|
declare const variants: Variant[];
|
|
57
57
|
export declare const defaultButtonVariants: DefaultButtonVariants[];
|
|
58
58
|
export declare const linkButtonVariants: LinkButtonVariants[];
|
|
@@ -11,11 +11,5 @@ export type ButtonProps = CommonDefaultButtonProps & CommonButtonVariantProps;
|
|
|
11
11
|
* - [Code](https://atlassian.design/components/button/code)
|
|
12
12
|
* - [Usage](https://atlassian.design/components/button/usage)
|
|
13
13
|
*/
|
|
14
|
-
declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<
|
|
15
|
-
'data-testid'?: never;
|
|
16
|
-
}, "onFocus" | "onBlur" | "onClick" | keyof import("../types").CommonBaseProps> & import("../types").CommonBaseProps & {
|
|
17
|
-
onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
18
|
-
onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
19
|
-
onClick?: ((e: React.MouseEvent<HTMLButtonElement, MouseEvent>, analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => void) | undefined;
|
|
20
|
-
} & React.RefAttributes<HTMLButtonElement>>>;
|
|
14
|
+
declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonProps> & React.RefAttributes<HTMLButtonElement>>>;
|
|
21
15
|
export default Button;
|
|
@@ -11,11 +11,5 @@ export type IconButtonProps = CommonIconButtonProps & CommonButtonVariantProps;
|
|
|
11
11
|
* - [Code](https://atlassian.design/components/button/icon-button/code)
|
|
12
12
|
* - [Usage](https://atlassian.design/components/button/icon-button/usage)
|
|
13
13
|
*/
|
|
14
|
-
declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<
|
|
15
|
-
'data-testid'?: never;
|
|
16
|
-
}, "onFocus" | "onBlur" | "onClick" | keyof import("../types").CommonBaseProps> & import("../types").CommonBaseProps & {
|
|
17
|
-
onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
18
|
-
onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
19
|
-
onClick?: ((e: React.MouseEvent<HTMLButtonElement, MouseEvent>, analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => void) | undefined;
|
|
20
|
-
} & React.RefAttributes<HTMLButtonElement>>>;
|
|
14
|
+
declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.PropsWithoutRef<IconButtonProps> & React.RefAttributes<HTMLButtonElement>>>;
|
|
21
15
|
export default IconButton;
|
|
@@ -41,5 +41,5 @@ type ButtonBaseProps<TagName extends HTMLElement> = CommonBaseProps & Pick<Commo
|
|
|
41
41
|
*
|
|
42
42
|
* @private
|
|
43
43
|
*/
|
|
44
|
-
declare const ButtonBase: React.ForwardRefExoticComponent<
|
|
44
|
+
declare const ButtonBase: React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonBaseProps<HTMLButtonElement>> & React.RefAttributes<HTMLButtonElement>>;
|
|
45
45
|
export default ButtonBase;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { type CSSObject } from '@emotion/react';
|
|
2
|
+
import { createTheme } from '@atlaskit/theme/components';
|
|
2
3
|
import { type ThemeProps, type ThemeTokens } from './custom-theme-button-types';
|
|
3
4
|
export declare function getCustomCss({ appearance, spacing, mode, isSelected, shouldFitContainer, iconIsOnlyChild, isLoading, state, }: ThemeProps): CSSObject;
|
|
4
5
|
export declare function getSpecifiers(styles: CSSObject): CSSObject;
|
|
5
6
|
export declare function defaultThemeFn(current: (values: ThemeProps) => ThemeTokens, values: ThemeProps): ThemeTokens;
|
|
6
|
-
declare const Theme:
|
|
7
|
-
Consumer: import("react").ComponentType<{
|
|
8
|
-
children: (tokens: ThemeTokens) => import("react").ReactNode;
|
|
9
|
-
} & Omit<ThemeProps, "children">>;
|
|
10
|
-
Provider: import("react").ComponentType<{
|
|
11
|
-
children?: import("react").ReactNode;
|
|
12
|
-
value?: import("@atlaskit/theme/components").ThemeProp<ThemeTokens, ThemeProps> | undefined;
|
|
13
|
-
}>;
|
|
14
|
-
useTheme: (props: ThemeProps) => ThemeTokens;
|
|
15
|
-
};
|
|
7
|
+
declare const Theme: ReturnType<typeof createTheme<ThemeTokens, ThemeProps>>;
|
|
16
8
|
export default Theme;
|
|
@@ -15,5 +15,5 @@ export type LoadingButtonProps = Omit<BaseProps, 'overlay'> & LoadingButtonOwnPr
|
|
|
15
15
|
*
|
|
16
16
|
* - [Examples](https://atlassian.design/components/button/examples#loading-button)
|
|
17
17
|
*/
|
|
18
|
-
declare const LoadingButton: React.ForwardRefExoticComponent<
|
|
18
|
+
declare const LoadingButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<LoadingButtonProps> & React.RefAttributes<HTMLElement>>;
|
|
19
19
|
export default LoadingButton;
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { type CSSObject } from '@emotion/react';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'data-has-overlay'?: never;
|
|
10
|
-
}, keyof import("../types").BaseOwnProps> & import("../types").BaseOwnProps & {
|
|
7
|
+
import { type BaseProps } from '../types';
|
|
8
|
+
type ButtonBaseProps = BaseProps & {
|
|
11
9
|
buttonCss: CSSObject;
|
|
12
|
-
}
|
|
10
|
+
};
|
|
11
|
+
declare const ButtonBase: React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonBaseProps> & React.RefAttributes<HTMLElement>>;
|
|
13
12
|
export default ButtonBase;
|
|
@@ -41,18 +41,18 @@ type DefaultButtonVariants = DefaultButtonVariant | LinkButtonVariant;
|
|
|
41
41
|
type LinkButtonVariants = LinkButtonVariant | LinkIconButtonVariant;
|
|
42
42
|
type IconButtonVariants = IconButtonVariant | LinkIconButtonVariant;
|
|
43
43
|
export type Variant = DefaultButtonVariant | LinkButtonVariant | IconButtonVariant | LinkIconButtonVariant;
|
|
44
|
-
declare const LinkButtonRender: React.ForwardRefExoticComponent<Omit<LinkButtonProps,
|
|
45
|
-
href?: LinkButtonProps[
|
|
46
|
-
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
47
|
-
declare const IconButtonRender: React.ForwardRefExoticComponent<Omit<IconButtonProps,
|
|
48
|
-
icon?: IconButtonProps[
|
|
49
|
-
label?: IconButtonProps[
|
|
50
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
51
|
-
declare const LinkIconButtonRender: React.ForwardRefExoticComponent<Omit<LinkIconButtonProps,
|
|
52
|
-
href?: LinkIconButtonProps[
|
|
53
|
-
icon?: LinkIconButtonProps[
|
|
54
|
-
label?: LinkIconButtonProps[
|
|
55
|
-
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
44
|
+
declare const LinkButtonRender: React.ForwardRefExoticComponent<React.PropsWithoutRef<Omit<LinkButtonProps, 'href'> & {
|
|
45
|
+
href?: LinkButtonProps['href'];
|
|
46
|
+
}> & React.RefAttributes<HTMLAnchorElement>>;
|
|
47
|
+
declare const IconButtonRender: React.ForwardRefExoticComponent<React.PropsWithoutRef<Omit<IconButtonProps, 'icon' | 'label'> & {
|
|
48
|
+
icon?: IconButtonProps['icon'];
|
|
49
|
+
label?: IconButtonProps['label'];
|
|
50
|
+
}> & React.RefAttributes<HTMLButtonElement>>;
|
|
51
|
+
declare const LinkIconButtonRender: React.ForwardRefExoticComponent<React.PropsWithoutRef<Omit<LinkIconButtonProps, 'href' | 'icon' | 'label'> & {
|
|
52
|
+
href?: LinkIconButtonProps['href'];
|
|
53
|
+
icon?: LinkIconButtonProps['icon'];
|
|
54
|
+
label?: LinkIconButtonProps['label'];
|
|
55
|
+
}> & React.RefAttributes<HTMLAnchorElement>>;
|
|
56
56
|
declare const variants: Variant[];
|
|
57
57
|
export declare const defaultButtonVariants: DefaultButtonVariants[];
|
|
58
58
|
export declare const linkButtonVariants: LinkButtonVariants[];
|
package/offerings.json
CHANGED
|
@@ -20,11 +20,7 @@
|
|
|
20
20
|
"Limit to one primary button per section",
|
|
21
21
|
"Use subtle buttons for secondary actions",
|
|
22
22
|
"Use danger buttons sparingly for destructive actions",
|
|
23
|
-
"Group related buttons together with ButtonGroup"
|
|
24
|
-
"Use action verbs that describe the interaction",
|
|
25
|
-
"Keep text concise (1-3 words ideal)",
|
|
26
|
-
"Use buttons for actions, links for navigation",
|
|
27
|
-
"Only include one primary call to action (CTA) per area"
|
|
23
|
+
"Group related buttons together with ButtonGroup"
|
|
28
24
|
],
|
|
29
25
|
"contentGuidelines": [
|
|
30
26
|
"Use action verbs that describe the interaction",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "23.4.
|
|
3
|
+
"version": "23.4.11",
|
|
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/"
|
|
@@ -76,16 +76,16 @@
|
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
78
78
|
"@atlaskit/css": "^0.14.0",
|
|
79
|
-
"@atlaskit/ds-lib": "^5.
|
|
79
|
+
"@atlaskit/ds-lib": "^5.1.0",
|
|
80
80
|
"@atlaskit/focus-ring": "^3.0.0",
|
|
81
|
-
"@atlaskit/icon": "^28.
|
|
82
|
-
"@atlaskit/interaction-context": "^3.
|
|
81
|
+
"@atlaskit/icon": "^28.3.0",
|
|
82
|
+
"@atlaskit/interaction-context": "^3.1.0",
|
|
83
83
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
84
|
-
"@atlaskit/primitives": "^14.
|
|
84
|
+
"@atlaskit/primitives": "^14.15.0",
|
|
85
85
|
"@atlaskit/spinner": "^19.0.0",
|
|
86
86
|
"@atlaskit/theme": "^21.0.0",
|
|
87
|
-
"@atlaskit/tokens": "^6.
|
|
88
|
-
"@atlaskit/tooltip": "^20.
|
|
87
|
+
"@atlaskit/tokens": "^6.4.0",
|
|
88
|
+
"@atlaskit/tooltip": "^20.5.0",
|
|
89
89
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
90
90
|
"@babel/runtime": "^7.0.0",
|
|
91
91
|
"@compiled/react": "^0.18.3",
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
"@atlaskit/checkbox": "^17.1.0",
|
|
103
103
|
"@atlaskit/docs": "^11.1.0",
|
|
104
104
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
105
|
-
"@atlaskit/form": "^
|
|
105
|
+
"@atlaskit/form": "^14.2.0",
|
|
106
106
|
"@atlaskit/heading": "^5.2.0",
|
|
107
107
|
"@atlaskit/link": "^3.2.0",
|
|
108
|
-
"@atlaskit/logo": "^19.
|
|
109
|
-
"@atlaskit/modal-dialog": "^14.
|
|
108
|
+
"@atlaskit/logo": "^19.8.0",
|
|
109
|
+
"@atlaskit/modal-dialog": "^14.4.0",
|
|
110
110
|
"@atlaskit/section-message": "^8.7.0",
|
|
111
111
|
"@atlaskit/select": "^21.3.0",
|
|
112
112
|
"@atlaskit/ssr": "workspace:^",
|