@atlaskit/button 23.9.6 → 23.9.8
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 +13 -0
- package/dist/cjs/new-button/variants/default/button.js +3 -5
- package/dist/cjs/new-button/variants/default/link.compiled.css +1 -0
- package/dist/cjs/new-button/variants/default/link.js +13 -3
- package/dist/cjs/new-button/variants/shared/button-base.compiled.css +1 -0
- package/dist/cjs/new-button/variants/shared/button-base.js +13 -3
- package/dist/cjs/new-button/variants/shared/content.js +5 -4
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/es2019/new-button/variants/default/button.js +3 -3
- package/dist/es2019/new-button/variants/default/link.compiled.css +1 -0
- package/dist/es2019/new-button/variants/default/link.js +13 -3
- package/dist/es2019/new-button/variants/shared/button-base.compiled.css +1 -0
- package/dist/es2019/new-button/variants/shared/button-base.js +13 -3
- package/dist/es2019/new-button/variants/shared/content.js +5 -4
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/esm/new-button/variants/default/button.js +3 -3
- package/dist/esm/new-button/variants/default/link.compiled.css +1 -0
- package/dist/esm/new-button/variants/default/link.js +13 -3
- package/dist/esm/new-button/variants/shared/button-base.compiled.css +1 -0
- package/dist/esm/new-button/variants/shared/button-base.js +13 -3
- package/dist/esm/new-button/variants/shared/content.js +5 -4
- 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/containers/split-button/utils.d.ts +2 -2
- package/dist/types/old-button/custom-theme-button/custom-theme-button.d.ts +3 -1
- package/dist/types/old-button/shared/css.d.ts +6 -6
- package/dist/types/old-button/shared/get-if-visually-hidden-children.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/containers/split-button/utils.d.ts +2 -2
- package/dist/types-ts4.5/old-button/custom-theme-button/custom-theme-button.d.ts +3 -1
- package/dist/types-ts4.5/old-button/shared/css.d.ts +6 -6
- package/dist/types-ts4.5/old-button/shared/get-if-visually-hidden-children.d.ts +1 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 23.9.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c085330e0dde8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c085330e0dde8) -
|
|
8
|
+
Remove new icon button styling hack
|
|
9
|
+
|
|
10
|
+
## 23.9.7
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 23.9.6
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
11
|
var _buttonBase = _interopRequireDefault(require("../shared/button-base"));
|
|
13
12
|
var _content = _interopRequireDefault(require("../shared/content"));
|
|
14
13
|
var _iconRenderer = _interopRequireDefault(require("../shared/icon-renderer"));
|
|
15
14
|
var _excluded = ["analyticsContext", "appearance", "aria-label", "aria-labelledby", "autoFocus", "children", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isLoading", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shouldFitContainer", "spacing", "testId", "type"],
|
|
16
15
|
_excluded2 = ["className", "css", "as", "style"];
|
|
17
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
16
|
/**
|
|
19
17
|
* __Button__
|
|
20
18
|
*
|
|
@@ -88,7 +86,7 @@ var Button = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
88
86
|
componentName: "Button",
|
|
89
87
|
type: type,
|
|
90
88
|
interactionName: interactionName
|
|
91
|
-
}, saferRest),
|
|
89
|
+
}, saferRest), iconBefore && /*#__PURE__*/_react.default.createElement(_content.default, {
|
|
92
90
|
type: "icon",
|
|
93
91
|
position: "before",
|
|
94
92
|
isLoading: isLoading
|
|
@@ -102,7 +100,7 @@ var Button = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
102
100
|
isLoading: isLoading
|
|
103
101
|
}, /*#__PURE__*/_react.default.createElement(_iconRenderer.default, {
|
|
104
102
|
icon: iconAfter
|
|
105
|
-
})))
|
|
103
|
+
})));
|
|
106
104
|
}));
|
|
107
105
|
Button.displayName = 'Button';
|
|
108
106
|
var _default = exports.default = Button;
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
._bfhkybec{background-color:var(--ds-background-danger-bold,#c9372c)}
|
|
38
38
|
._bozgu2gc{padding-inline-start:var(--ds-space-100,8px)}
|
|
39
39
|
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
40
|
+
._gy1p12x7{column-gap:var(--ds-space-075,6px)}
|
|
40
41
|
._gy1p1b66{column-gap:var(--ds-space-050,4px)}
|
|
41
42
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
42
43
|
._kqswh2mm{position:relative}
|
|
@@ -29,8 +29,10 @@ var styles = {
|
|
|
29
29
|
linkDecorationUnset: "_4bfu1snc _1hmsagmp _ajmmvv82 _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _1nrm1r31 _c2waglyw _1iohnqa1",
|
|
30
30
|
disabled: "_80om13gf _bfhkby5v _syaz1gmx _aetrglyw _irr3by5v _30l31gmx _1di6by5v _9h8h1gmx",
|
|
31
31
|
spacingCompact: "_1rjcv77o _gy1p1b66 _4t3i1k8s _y4tiutpp _bozgutpp _s7n4nkob",
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
buttonIconBeforeWithHack: "_bozgu2gc",
|
|
33
|
+
buttonIconAfterWithHack: "_y4tiu2gc",
|
|
34
|
+
buttonIconBefore: "_bozgutpp _gy1p12x7",
|
|
35
|
+
buttonIconAfter: "_y4tiutpp _gy1p12x7",
|
|
34
36
|
fullWidth: "_1bsb1osq"
|
|
35
37
|
};
|
|
36
38
|
var defaultStyles = {
|
|
@@ -136,7 +138,15 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
|
|
|
136
138
|
interactionName: interactionName
|
|
137
139
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
138
140
|
}, saferRest, {
|
|
139
|
-
xcss: (0, _css2.cx)(styles.base, (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && styles.baseT26Shape, appearance === 'default' && defaultStyles.root, appearance === 'primary' && primaryStyles.root, appearance === 'warning' && warningStyles.root, appearance === 'danger' && dangerStyles.root, appearance === 'discovery' && discoveryStyles.root, appearance === 'subtle' && subtleStyles.root, styles.linkDecorationUnset, isSelected && selectedStyles.root, isSelected && appearance === 'danger' && selectedStyles.danger, isSelected && appearance === 'warning' && selectedStyles.warning, isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, spacing === 'compact' && styles.spacingCompact, hasIconBefore &&
|
|
141
|
+
xcss: (0, _css2.cx)(styles.base, (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && styles.baseT26Shape, appearance === 'default' && defaultStyles.root, appearance === 'primary' && primaryStyles.root, appearance === 'warning' && warningStyles.root, appearance === 'danger' && dangerStyles.root, appearance === 'discovery' && discoveryStyles.root, appearance === 'subtle' && subtleStyles.root, styles.linkDecorationUnset, isSelected && selectedStyles.root, isSelected && appearance === 'danger' && selectedStyles.danger, isSelected && appearance === 'warning' && selectedStyles.warning, isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, spacing === 'compact' && styles.spacingCompact, hasIconBefore && !(0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') && styles.buttonIconBeforeWithHack,
|
|
142
|
+
//to remove when platform-button-icon-spacing-cleanup is removed
|
|
143
|
+
hasIconAfter && !(0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') && styles.buttonIconAfterWithHack,
|
|
144
|
+
//to remove when platform-button-icon-spacing-cleanup is removed
|
|
145
|
+
hasIconBefore && (0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') && styles.buttonIconBefore,
|
|
146
|
+
//to keep when platform-button-icon-spacing-cleanup is removed
|
|
147
|
+
hasIconAfter && (0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') && styles.buttonIconAfter,
|
|
148
|
+
//to keep when platform-button-icon-spacing-cleanup is removed
|
|
149
|
+
shouldFitContainer && styles.fullWidth)
|
|
140
150
|
}), iconBefore && /*#__PURE__*/React.createElement(_content.default, {
|
|
141
151
|
type: "icon",
|
|
142
152
|
position: "before",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
._bozgu2gc{padding-inline-start:var(--ds-space-100,8px)}
|
|
58
58
|
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
59
59
|
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
60
|
+
._gy1p12x7{column-gap:var(--ds-space-075,6px)}
|
|
60
61
|
._gy1p1b66{column-gap:var(--ds-space-050,4px)}
|
|
61
62
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
62
63
|
._kqswh2mm{position:relative}
|
|
@@ -39,8 +39,10 @@ var styles = {
|
|
|
39
39
|
loading: "_80om15jw",
|
|
40
40
|
iconButton: "_4t3iviql _1bsbviql _y4tize3t _bozgze3t",
|
|
41
41
|
iconButtonCompact: "_4t3i1k8s _1bsb1k8s",
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
buttonIconBeforeWithHack: "_bozgu2gc",
|
|
43
|
+
buttonIconAfterWithHack: "_y4tiu2gc",
|
|
44
|
+
buttonIconBefore: "_bozgutpp _gy1p12x7",
|
|
45
|
+
buttonIconAfter: "_y4tiutpp _gy1p12x7",
|
|
44
46
|
splitButton: "_g0pbb4wl",
|
|
45
47
|
loadingOverlay: "_1reo15vq _18m915vq _1e0c1txw _kqswstnw _4cvr1h6o _1bah1h6o _u7coze3t _152tze3t _rjxpze3t _1e02ze3t",
|
|
46
48
|
navigationSplitButton: "_1bsb1tcg _bfhksm61 _y4ti12x7 _bozg12x7"
|
|
@@ -178,7 +180,15 @@ function (_ref, ref) {
|
|
|
178
180
|
// TODO: remove me once we kill color fallbacks
|
|
179
181
|
isSelected && appearance === 'warning' && selectedStyles.warning,
|
|
180
182
|
// TODO: remove me once we kill color fallbacks
|
|
181
|
-
isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, isDisabled && appearance !== 'default' && appearance !== 'subtle' && styles.sharedDisabled, isDisabled && appearance === 'default' && defaultStyles.disabled, isCircle && !isSplitButton && styles.circle, spacing === 'compact' && styles.spacingCompact, spacing === 'compact' && (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && styles.spacingCompactT26Shape,
|
|
183
|
+
isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, isDisabled && appearance !== 'default' && appearance !== 'subtle' && styles.sharedDisabled, isDisabled && appearance === 'default' && defaultStyles.disabled, isCircle && !isSplitButton && styles.circle, spacing === 'compact' && styles.spacingCompact, spacing === 'compact' && (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && styles.spacingCompactT26Shape, shouldFitContainer && styles.fullWidth, hasIconBefore && !(0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') && styles.buttonIconBeforeWithHack,
|
|
184
|
+
//TODO Remove when platform-button-icon-spacing-cleanup is removed
|
|
185
|
+
hasIconAfter && !(0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') && styles.buttonIconAfterWithHack,
|
|
186
|
+
//TODO Remove when platform-button-icon-spacing-cleanup is removed
|
|
187
|
+
hasIconBefore && (0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') && styles.buttonIconBefore,
|
|
188
|
+
//to keep when platform-button-icon-spacing-cleanup is removed
|
|
189
|
+
hasIconAfter && (0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') && styles.buttonIconAfter,
|
|
190
|
+
//to keep when platform-button-icon-spacing-cleanup is removed
|
|
191
|
+
isIconButton && styles.iconButton, isIconButton && spacing === 'compact' && styles.iconButtonCompact, isLoading && styles.loading, isSplitButton && styles.splitButton, isNavigationSplitButton && styles.navigationSplitButton),
|
|
182
192
|
isDisabled: (0, _platformFeatureFlags.fg)('platform-dst_fix_not_focusable_loading_button') ? isDisabled : isEffectivelyDisabled
|
|
183
193
|
}, (0, _platformFeatureFlags.fg)('platform-dst_fix_not_focusable_loading_button') && {
|
|
184
194
|
'aria-live': 'polite'
|
|
@@ -9,13 +9,14 @@ exports.default = void 0;
|
|
|
9
9
|
require("./content.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
var styles = {
|
|
13
14
|
text: "_1reo15vq _18m915vq _16jlkb7n _1o9zkb7n _1bto1l2s _o5721q9c",
|
|
14
15
|
icon: "_1e0c1txw _16jlidpf _1o9zidpf _1wpz1h6o _1wybidpf _vwz4idpf _uiztglyw",
|
|
15
|
-
beforeIcon: "_1he91b66 _w795v77o",
|
|
16
|
-
afterIcon: "_1he9v77o _w7951b66",
|
|
17
16
|
common: "_v564g17y",
|
|
18
|
-
fade: "_tzy4idpf"
|
|
17
|
+
fade: "_tzy4idpf",
|
|
18
|
+
beforeIcon: "_1he91b66 _w795v77o",
|
|
19
|
+
afterIcon: "_1he9v77o _w7951b66"
|
|
19
20
|
};
|
|
20
21
|
/**
|
|
21
22
|
* __Content__
|
|
@@ -29,7 +30,7 @@ var Content = function Content(_ref) {
|
|
|
29
30
|
isLoading = _ref.isLoading,
|
|
30
31
|
position = _ref.position;
|
|
31
32
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
32
|
-
className: (0, _runtime.ax)([styles.common, type === 'text' && styles.text, type === 'icon' && styles.icon, isLoading && styles.fade, position === 'before' && styles.beforeIcon, position === 'after' && styles.afterIcon])
|
|
33
|
+
className: (0, _runtime.ax)([styles.common, type === 'text' && styles.text, type === 'icon' && styles.icon, isLoading && styles.fade, !(0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') && position === 'before' && styles.beforeIcon, !(0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') && position === 'after' && styles.afterIcon])
|
|
33
34
|
}, children);
|
|
34
35
|
};
|
|
35
36
|
var _default = exports.default = Content;
|
|
@@ -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: "23.9.7",
|
|
136
136
|
analyticsData: analyticsContext
|
|
137
137
|
});
|
|
138
138
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import ButtonBase from '../shared/button-base';
|
|
4
4
|
import Content from '../shared/content';
|
|
5
5
|
import IconRenderer from '../shared/icon-renderer';
|
|
@@ -77,7 +77,7 @@ const Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function B
|
|
|
77
77
|
componentName: "Button",
|
|
78
78
|
type: type,
|
|
79
79
|
interactionName: interactionName
|
|
80
|
-
}, saferRest),
|
|
80
|
+
}, saferRest), iconBefore && /*#__PURE__*/React.createElement(Content, {
|
|
81
81
|
type: "icon",
|
|
82
82
|
position: "before",
|
|
83
83
|
isLoading: isLoading
|
|
@@ -91,7 +91,7 @@ const Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function B
|
|
|
91
91
|
isLoading: isLoading
|
|
92
92
|
}, /*#__PURE__*/React.createElement(IconRenderer, {
|
|
93
93
|
icon: iconAfter
|
|
94
|
-
})))
|
|
94
|
+
})));
|
|
95
95
|
}));
|
|
96
96
|
Button.displayName = 'Button';
|
|
97
97
|
export default Button;
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
._bfhkybec{background-color:var(--ds-background-danger-bold,#c9372c)}
|
|
38
38
|
._bozgu2gc{padding-inline-start:var(--ds-space-100,8px)}
|
|
39
39
|
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
40
|
+
._gy1p12x7{column-gap:var(--ds-space-075,6px)}
|
|
40
41
|
._gy1p1b66{column-gap:var(--ds-space-050,4px)}
|
|
41
42
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
42
43
|
._kqswh2mm{position:relative}
|
|
@@ -17,8 +17,10 @@ const styles = {
|
|
|
17
17
|
linkDecorationUnset: "_4bfu1snc _1hmsagmp _ajmmvv82 _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _1nrm1r31 _c2waglyw _1iohnqa1",
|
|
18
18
|
disabled: "_80om13gf _bfhkby5v _syaz1gmx _aetrglyw _irr3by5v _30l31gmx _1di6by5v _9h8h1gmx",
|
|
19
19
|
spacingCompact: "_1rjcv77o _gy1p1b66 _4t3i1k8s _y4tiutpp _bozgutpp _s7n4nkob",
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
buttonIconBeforeWithHack: "_bozgu2gc",
|
|
21
|
+
buttonIconAfterWithHack: "_y4tiu2gc",
|
|
22
|
+
buttonIconBefore: "_bozgutpp _gy1p12x7",
|
|
23
|
+
buttonIconAfter: "_y4tiutpp _gy1p12x7",
|
|
22
24
|
fullWidth: "_1bsb1osq"
|
|
23
25
|
};
|
|
24
26
|
const defaultStyles = {
|
|
@@ -125,7 +127,15 @@ const LinkButtonBase = ({
|
|
|
125
127
|
interactionName: interactionName
|
|
126
128
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
127
129
|
}, saferRest, {
|
|
128
|
-
xcss: cx(styles.base, fg('platform-dst-shape-theme-default') && styles.baseT26Shape, appearance === 'default' && defaultStyles.root, appearance === 'primary' && primaryStyles.root, appearance === 'warning' && warningStyles.root, appearance === 'danger' && dangerStyles.root, appearance === 'discovery' && discoveryStyles.root, appearance === 'subtle' && subtleStyles.root, styles.linkDecorationUnset, isSelected && selectedStyles.root, isSelected && appearance === 'danger' && selectedStyles.danger, isSelected && appearance === 'warning' && selectedStyles.warning, isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, spacing === 'compact' && styles.spacingCompact, hasIconBefore &&
|
|
130
|
+
xcss: cx(styles.base, fg('platform-dst-shape-theme-default') && styles.baseT26Shape, appearance === 'default' && defaultStyles.root, appearance === 'primary' && primaryStyles.root, appearance === 'warning' && warningStyles.root, appearance === 'danger' && dangerStyles.root, appearance === 'discovery' && discoveryStyles.root, appearance === 'subtle' && subtleStyles.root, styles.linkDecorationUnset, isSelected && selectedStyles.root, isSelected && appearance === 'danger' && selectedStyles.danger, isSelected && appearance === 'warning' && selectedStyles.warning, isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, spacing === 'compact' && styles.spacingCompact, hasIconBefore && !fg('platform-button-icon-spacing-cleanup') && styles.buttonIconBeforeWithHack,
|
|
131
|
+
//to remove when platform-button-icon-spacing-cleanup is removed
|
|
132
|
+
hasIconAfter && !fg('platform-button-icon-spacing-cleanup') && styles.buttonIconAfterWithHack,
|
|
133
|
+
//to remove when platform-button-icon-spacing-cleanup is removed
|
|
134
|
+
hasIconBefore && fg('platform-button-icon-spacing-cleanup') && styles.buttonIconBefore,
|
|
135
|
+
//to keep when platform-button-icon-spacing-cleanup is removed
|
|
136
|
+
hasIconAfter && fg('platform-button-icon-spacing-cleanup') && styles.buttonIconAfter,
|
|
137
|
+
//to keep when platform-button-icon-spacing-cleanup is removed
|
|
138
|
+
shouldFitContainer && styles.fullWidth)
|
|
129
139
|
}), iconBefore && /*#__PURE__*/React.createElement(Content, {
|
|
130
140
|
type: "icon",
|
|
131
141
|
position: "before",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
._bozgu2gc{padding-inline-start:var(--ds-space-100,8px)}
|
|
58
58
|
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
59
59
|
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
60
|
+
._gy1p12x7{column-gap:var(--ds-space-075,6px)}
|
|
60
61
|
._gy1p1b66{column-gap:var(--ds-space-050,4px)}
|
|
61
62
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
62
63
|
._kqswh2mm{position:relative}
|
|
@@ -27,8 +27,10 @@ const styles = {
|
|
|
27
27
|
loading: "_80om15jw",
|
|
28
28
|
iconButton: "_4t3iviql _1bsbviql _y4tize3t _bozgze3t",
|
|
29
29
|
iconButtonCompact: "_4t3i1k8s _1bsb1k8s",
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
buttonIconBeforeWithHack: "_bozgu2gc",
|
|
31
|
+
buttonIconAfterWithHack: "_y4tiu2gc",
|
|
32
|
+
buttonIconBefore: "_bozgutpp _gy1p12x7",
|
|
33
|
+
buttonIconAfter: "_y4tiutpp _gy1p12x7",
|
|
32
34
|
splitButton: "_g0pbb4wl",
|
|
33
35
|
loadingOverlay: "_1reo15vq _18m915vq _1e0c1txw _kqswstnw _4cvr1h6o _1bah1h6o _u7coze3t _152tze3t _rjxpze3t _1e02ze3t",
|
|
34
36
|
navigationSplitButton: "_1bsb1tcg _bfhksm61 _y4ti12x7 _bozg12x7"
|
|
@@ -159,7 +161,15 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(
|
|
|
159
161
|
// TODO: remove me once we kill color fallbacks
|
|
160
162
|
isSelected && appearance === 'warning' && selectedStyles.warning,
|
|
161
163
|
// TODO: remove me once we kill color fallbacks
|
|
162
|
-
isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, isDisabled && appearance !== 'default' && appearance !== 'subtle' && styles.sharedDisabled, isDisabled && appearance === 'default' && defaultStyles.disabled, isCircle && !isSplitButton && styles.circle, spacing === 'compact' && styles.spacingCompact, spacing === 'compact' && fg('platform-dst-shape-theme-default') && styles.spacingCompactT26Shape,
|
|
164
|
+
isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, isDisabled && appearance !== 'default' && appearance !== 'subtle' && styles.sharedDisabled, isDisabled && appearance === 'default' && defaultStyles.disabled, isCircle && !isSplitButton && styles.circle, spacing === 'compact' && styles.spacingCompact, spacing === 'compact' && fg('platform-dst-shape-theme-default') && styles.spacingCompactT26Shape, shouldFitContainer && styles.fullWidth, hasIconBefore && !fg('platform-button-icon-spacing-cleanup') && styles.buttonIconBeforeWithHack,
|
|
165
|
+
//TODO Remove when platform-button-icon-spacing-cleanup is removed
|
|
166
|
+
hasIconAfter && !fg('platform-button-icon-spacing-cleanup') && styles.buttonIconAfterWithHack,
|
|
167
|
+
//TODO Remove when platform-button-icon-spacing-cleanup is removed
|
|
168
|
+
hasIconBefore && fg('platform-button-icon-spacing-cleanup') && styles.buttonIconBefore,
|
|
169
|
+
//to keep when platform-button-icon-spacing-cleanup is removed
|
|
170
|
+
hasIconAfter && fg('platform-button-icon-spacing-cleanup') && styles.buttonIconAfter,
|
|
171
|
+
//to keep when platform-button-icon-spacing-cleanup is removed
|
|
172
|
+
isIconButton && styles.iconButton, isIconButton && spacing === 'compact' && styles.iconButtonCompact, isLoading && styles.loading, isSplitButton && styles.splitButton, isNavigationSplitButton && styles.navigationSplitButton),
|
|
163
173
|
isDisabled: fg('platform-dst_fix_not_focusable_loading_button') ? isDisabled : isEffectivelyDisabled
|
|
164
174
|
}, fg('platform-dst_fix_not_focusable_loading_button') && {
|
|
165
175
|
'aria-live': 'polite'
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
import "./content.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
const styles = {
|
|
6
7
|
text: "_1reo15vq _18m915vq _16jlkb7n _1o9zkb7n _1bto1l2s _o5721q9c",
|
|
7
8
|
icon: "_1e0c1txw _16jlidpf _1o9zidpf _1wpz1h6o _1wybidpf _vwz4idpf _uiztglyw",
|
|
8
|
-
beforeIcon: "_1he91b66 _w795v77o",
|
|
9
|
-
afterIcon: "_1he9v77o _w7951b66",
|
|
10
9
|
common: "_v564g17y",
|
|
11
|
-
fade: "_tzy4idpf"
|
|
10
|
+
fade: "_tzy4idpf",
|
|
11
|
+
beforeIcon: "_1he91b66 _w795v77o",
|
|
12
|
+
afterIcon: "_1he9v77o _w7951b66"
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
14
15
|
* __Content__
|
|
@@ -22,7 +23,7 @@ const Content = ({
|
|
|
22
23
|
position
|
|
23
24
|
}) => {
|
|
24
25
|
return /*#__PURE__*/React.createElement("span", {
|
|
25
|
-
className: ax([styles.common, type === 'text' && styles.text, type === 'icon' && styles.icon, isLoading && styles.fade, position === 'before' && styles.beforeIcon, position === 'after' && styles.afterIcon])
|
|
26
|
+
className: ax([styles.common, type === 'text' && styles.text, type === 'icon' && styles.icon, isLoading && styles.fade, !fg('platform-button-icon-spacing-cleanup') && position === 'before' && styles.beforeIcon, !fg('platform-button-icon-spacing-cleanup') && position === 'after' && styles.afterIcon])
|
|
26
27
|
}, children);
|
|
27
28
|
};
|
|
28
29
|
export default Content;
|
|
@@ -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: "23.9.7",
|
|
123
123
|
analyticsData: analyticsContext
|
|
124
124
|
});
|
|
125
125
|
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["analyticsContext", "appearance", "aria-label", "aria-labelledby", "autoFocus", "children", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isLoading", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shouldFitContainer", "spacing", "testId", "type"],
|
|
4
4
|
_excluded2 = ["className", "css", "as", "style"];
|
|
5
|
-
import React
|
|
5
|
+
import React from 'react';
|
|
6
6
|
import ButtonBase from '../shared/button-base';
|
|
7
7
|
import Content from '../shared/content';
|
|
8
8
|
import IconRenderer from '../shared/icon-renderer';
|
|
@@ -79,7 +79,7 @@ var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function But
|
|
|
79
79
|
componentName: "Button",
|
|
80
80
|
type: type,
|
|
81
81
|
interactionName: interactionName
|
|
82
|
-
}, saferRest),
|
|
82
|
+
}, saferRest), iconBefore && /*#__PURE__*/React.createElement(Content, {
|
|
83
83
|
type: "icon",
|
|
84
84
|
position: "before",
|
|
85
85
|
isLoading: isLoading
|
|
@@ -93,7 +93,7 @@ var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function But
|
|
|
93
93
|
isLoading: isLoading
|
|
94
94
|
}, /*#__PURE__*/React.createElement(IconRenderer, {
|
|
95
95
|
icon: iconAfter
|
|
96
|
-
})))
|
|
96
|
+
})));
|
|
97
97
|
}));
|
|
98
98
|
Button.displayName = 'Button';
|
|
99
99
|
export default Button;
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
._bfhkybec{background-color:var(--ds-background-danger-bold,#c9372c)}
|
|
38
38
|
._bozgu2gc{padding-inline-start:var(--ds-space-100,8px)}
|
|
39
39
|
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
40
|
+
._gy1p12x7{column-gap:var(--ds-space-075,6px)}
|
|
40
41
|
._gy1p1b66{column-gap:var(--ds-space-050,4px)}
|
|
41
42
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
42
43
|
._kqswh2mm{position:relative}
|
|
@@ -20,8 +20,10 @@ var styles = {
|
|
|
20
20
|
linkDecorationUnset: "_4bfu1snc _1hmsagmp _ajmmvv82 _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _1nrm1r31 _c2waglyw _1iohnqa1",
|
|
21
21
|
disabled: "_80om13gf _bfhkby5v _syaz1gmx _aetrglyw _irr3by5v _30l31gmx _1di6by5v _9h8h1gmx",
|
|
22
22
|
spacingCompact: "_1rjcv77o _gy1p1b66 _4t3i1k8s _y4tiutpp _bozgutpp _s7n4nkob",
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
buttonIconBeforeWithHack: "_bozgu2gc",
|
|
24
|
+
buttonIconAfterWithHack: "_y4tiu2gc",
|
|
25
|
+
buttonIconBefore: "_bozgutpp _gy1p12x7",
|
|
26
|
+
buttonIconAfter: "_y4tiutpp _gy1p12x7",
|
|
25
27
|
fullWidth: "_1bsb1osq"
|
|
26
28
|
};
|
|
27
29
|
var defaultStyles = {
|
|
@@ -127,7 +129,15 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
|
|
|
127
129
|
interactionName: interactionName
|
|
128
130
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
129
131
|
}, saferRest, {
|
|
130
|
-
xcss: cx(styles.base, fg('platform-dst-shape-theme-default') && styles.baseT26Shape, appearance === 'default' && defaultStyles.root, appearance === 'primary' && primaryStyles.root, appearance === 'warning' && warningStyles.root, appearance === 'danger' && dangerStyles.root, appearance === 'discovery' && discoveryStyles.root, appearance === 'subtle' && subtleStyles.root, styles.linkDecorationUnset, isSelected && selectedStyles.root, isSelected && appearance === 'danger' && selectedStyles.danger, isSelected && appearance === 'warning' && selectedStyles.warning, isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, spacing === 'compact' && styles.spacingCompact, hasIconBefore &&
|
|
132
|
+
xcss: cx(styles.base, fg('platform-dst-shape-theme-default') && styles.baseT26Shape, appearance === 'default' && defaultStyles.root, appearance === 'primary' && primaryStyles.root, appearance === 'warning' && warningStyles.root, appearance === 'danger' && dangerStyles.root, appearance === 'discovery' && discoveryStyles.root, appearance === 'subtle' && subtleStyles.root, styles.linkDecorationUnset, isSelected && selectedStyles.root, isSelected && appearance === 'danger' && selectedStyles.danger, isSelected && appearance === 'warning' && selectedStyles.warning, isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, spacing === 'compact' && styles.spacingCompact, hasIconBefore && !fg('platform-button-icon-spacing-cleanup') && styles.buttonIconBeforeWithHack,
|
|
133
|
+
//to remove when platform-button-icon-spacing-cleanup is removed
|
|
134
|
+
hasIconAfter && !fg('platform-button-icon-spacing-cleanup') && styles.buttonIconAfterWithHack,
|
|
135
|
+
//to remove when platform-button-icon-spacing-cleanup is removed
|
|
136
|
+
hasIconBefore && fg('platform-button-icon-spacing-cleanup') && styles.buttonIconBefore,
|
|
137
|
+
//to keep when platform-button-icon-spacing-cleanup is removed
|
|
138
|
+
hasIconAfter && fg('platform-button-icon-spacing-cleanup') && styles.buttonIconAfter,
|
|
139
|
+
//to keep when platform-button-icon-spacing-cleanup is removed
|
|
140
|
+
shouldFitContainer && styles.fullWidth)
|
|
131
141
|
}), iconBefore && /*#__PURE__*/React.createElement(Content, {
|
|
132
142
|
type: "icon",
|
|
133
143
|
position: "before",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
._bozgu2gc{padding-inline-start:var(--ds-space-100,8px)}
|
|
58
58
|
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
59
59
|
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
60
|
+
._gy1p12x7{column-gap:var(--ds-space-075,6px)}
|
|
60
61
|
._gy1p1b66{column-gap:var(--ds-space-050,4px)}
|
|
61
62
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
62
63
|
._kqswh2mm{position:relative}
|
|
@@ -30,8 +30,10 @@ var styles = {
|
|
|
30
30
|
loading: "_80om15jw",
|
|
31
31
|
iconButton: "_4t3iviql _1bsbviql _y4tize3t _bozgze3t",
|
|
32
32
|
iconButtonCompact: "_4t3i1k8s _1bsb1k8s",
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
buttonIconBeforeWithHack: "_bozgu2gc",
|
|
34
|
+
buttonIconAfterWithHack: "_y4tiu2gc",
|
|
35
|
+
buttonIconBefore: "_bozgutpp _gy1p12x7",
|
|
36
|
+
buttonIconAfter: "_y4tiutpp _gy1p12x7",
|
|
35
37
|
splitButton: "_g0pbb4wl",
|
|
36
38
|
loadingOverlay: "_1reo15vq _18m915vq _1e0c1txw _kqswstnw _4cvr1h6o _1bah1h6o _u7coze3t _152tze3t _rjxpze3t _1e02ze3t",
|
|
37
39
|
navigationSplitButton: "_1bsb1tcg _bfhksm61 _y4ti12x7 _bozg12x7"
|
|
@@ -169,7 +171,15 @@ function (_ref, ref) {
|
|
|
169
171
|
// TODO: remove me once we kill color fallbacks
|
|
170
172
|
isSelected && appearance === 'warning' && selectedStyles.warning,
|
|
171
173
|
// TODO: remove me once we kill color fallbacks
|
|
172
|
-
isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, isDisabled && appearance !== 'default' && appearance !== 'subtle' && styles.sharedDisabled, isDisabled && appearance === 'default' && defaultStyles.disabled, isCircle && !isSplitButton && styles.circle, spacing === 'compact' && styles.spacingCompact, spacing === 'compact' && fg('platform-dst-shape-theme-default') && styles.spacingCompactT26Shape,
|
|
174
|
+
isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, isDisabled && appearance !== 'default' && appearance !== 'subtle' && styles.sharedDisabled, isDisabled && appearance === 'default' && defaultStyles.disabled, isCircle && !isSplitButton && styles.circle, spacing === 'compact' && styles.spacingCompact, spacing === 'compact' && fg('platform-dst-shape-theme-default') && styles.spacingCompactT26Shape, shouldFitContainer && styles.fullWidth, hasIconBefore && !fg('platform-button-icon-spacing-cleanup') && styles.buttonIconBeforeWithHack,
|
|
175
|
+
//TODO Remove when platform-button-icon-spacing-cleanup is removed
|
|
176
|
+
hasIconAfter && !fg('platform-button-icon-spacing-cleanup') && styles.buttonIconAfterWithHack,
|
|
177
|
+
//TODO Remove when platform-button-icon-spacing-cleanup is removed
|
|
178
|
+
hasIconBefore && fg('platform-button-icon-spacing-cleanup') && styles.buttonIconBefore,
|
|
179
|
+
//to keep when platform-button-icon-spacing-cleanup is removed
|
|
180
|
+
hasIconAfter && fg('platform-button-icon-spacing-cleanup') && styles.buttonIconAfter,
|
|
181
|
+
//to keep when platform-button-icon-spacing-cleanup is removed
|
|
182
|
+
isIconButton && styles.iconButton, isIconButton && spacing === 'compact' && styles.iconButtonCompact, isLoading && styles.loading, isSplitButton && styles.splitButton, isNavigationSplitButton && styles.navigationSplitButton),
|
|
173
183
|
isDisabled: fg('platform-dst_fix_not_focusable_loading_button') ? isDisabled : isEffectivelyDisabled
|
|
174
184
|
}, fg('platform-dst_fix_not_focusable_loading_button') && {
|
|
175
185
|
'aria-live': 'polite'
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
import "./content.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
var styles = {
|
|
6
7
|
text: "_1reo15vq _18m915vq _16jlkb7n _1o9zkb7n _1bto1l2s _o5721q9c",
|
|
7
8
|
icon: "_1e0c1txw _16jlidpf _1o9zidpf _1wpz1h6o _1wybidpf _vwz4idpf _uiztglyw",
|
|
8
|
-
beforeIcon: "_1he91b66 _w795v77o",
|
|
9
|
-
afterIcon: "_1he9v77o _w7951b66",
|
|
10
9
|
common: "_v564g17y",
|
|
11
|
-
fade: "_tzy4idpf"
|
|
10
|
+
fade: "_tzy4idpf",
|
|
11
|
+
beforeIcon: "_1he91b66 _w795v77o",
|
|
12
|
+
afterIcon: "_1he9v77o _w7951b66"
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
14
15
|
* __Content__
|
|
@@ -22,7 +23,7 @@ var Content = function Content(_ref) {
|
|
|
22
23
|
isLoading = _ref.isLoading,
|
|
23
24
|
position = _ref.position;
|
|
24
25
|
return /*#__PURE__*/React.createElement("span", {
|
|
25
|
-
className: ax([styles.common, type === 'text' && styles.text, type === 'icon' && styles.icon, isLoading && styles.fade, position === 'before' && styles.beforeIcon, position === 'after' && styles.afterIcon])
|
|
26
|
+
className: ax([styles.common, type === 'text' && styles.text, type === 'icon' && styles.icon, isLoading && styles.fade, !fg('platform-button-icon-spacing-cleanup') && position === 'before' && styles.beforeIcon, !fg('platform-button-icon-spacing-cleanup') && position === 'after' && styles.afterIcon])
|
|
26
27
|
}, children);
|
|
27
28
|
};
|
|
28
29
|
export default Content;
|
|
@@ -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: "23.9.7",
|
|
129
129
|
analyticsData: analyticsContext
|
|
130
130
|
});
|
|
131
131
|
|
|
@@ -23,4 +23,4 @@ export type ButtonGroupProps = {
|
|
|
23
23
|
*/
|
|
24
24
|
titleId?: string;
|
|
25
25
|
};
|
|
26
|
-
export default function ButtonGroup({ children, testId, label, titleId }: ButtonGroupProps): React.JSX.Element;
|
|
26
|
+
export default function ButtonGroup({ children, testId, label, titleId, }: ButtonGroupProps): React.JSX.Element;
|
|
@@ -12,7 +12,7 @@ type SplitButtonContextProps = NavigationSplitButtonContextProps | MainSplitButt
|
|
|
12
12
|
/**
|
|
13
13
|
* TODO: Add jsdoc
|
|
14
14
|
*/
|
|
15
|
-
export declare const SplitButtonContext: import(
|
|
15
|
+
export declare const SplitButtonContext: import('react').Context<SplitButtonContextProps | undefined>;
|
|
16
16
|
type UseSplitButtonContext = {
|
|
17
17
|
appearance: SplitButtonAppearance | 'subtle';
|
|
18
18
|
spacing: SplitButtonSpacing;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
export declare const getActions: (children: ReactNode) => {
|
|
3
|
-
PrimaryAction: string | number | import(
|
|
4
|
-
SecondaryAction: string | number | import(
|
|
3
|
+
PrimaryAction: string | number | import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | import('react').ReactPortal;
|
|
4
|
+
SecondaryAction: string | number | import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | import('react').ReactPortal;
|
|
5
5
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { BaseProps } from '../types';
|
|
3
|
+
import { type CustomThemeButtonOwnProps } from './custom-theme-button-types';
|
|
2
4
|
/**
|
|
3
5
|
* __Custom theme button__
|
|
4
6
|
*
|
|
@@ -10,5 +12,5 @@ import React from 'react';
|
|
|
10
12
|
*
|
|
11
13
|
* - [Examples](https://atlassian.design/components/button/examples#custom-theme-button)
|
|
12
14
|
*/
|
|
13
|
-
declare const CustomThemeButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<
|
|
15
|
+
declare const CustomThemeButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<BaseProps, 'overlay'> & CustomThemeButtonOwnProps & React.RefAttributes<HTMLElement>>>;
|
|
14
16
|
export default CustomThemeButton;
|
|
@@ -10,14 +10,14 @@ type GetCssArgs = {
|
|
|
10
10
|
isOnlySingleIcon: boolean;
|
|
11
11
|
};
|
|
12
12
|
export declare function getCss({ appearance, spacing, isSelected, shouldFitContainer, isOnlySingleIcon, }: GetCssArgs): CSSObject;
|
|
13
|
-
export declare function getIconStyle({ spacing }: {
|
|
13
|
+
export declare function getIconStyle({ spacing, }: {
|
|
14
14
|
spacing: Spacing;
|
|
15
|
-
}): import(
|
|
16
|
-
export declare function getContentStyle({ spacing }: {
|
|
15
|
+
}): import('@emotion/react').SerializedStyles;
|
|
16
|
+
export declare function getContentStyle({ spacing, }: {
|
|
17
17
|
spacing: Spacing;
|
|
18
|
-
}): import(
|
|
19
|
-
export declare function getFadingCss({ hasOverlay }: {
|
|
18
|
+
}): import('@emotion/react').SerializedStyles;
|
|
19
|
+
export declare function getFadingCss({ hasOverlay, }: {
|
|
20
20
|
hasOverlay: boolean;
|
|
21
|
-
}): import(
|
|
21
|
+
}): import('@emotion/react').SerializedStyles;
|
|
22
22
|
export declare const overlayCss: CSSObject;
|
|
23
23
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
export declare const getIfVisuallyHiddenChildren: (children: ReactNode) => boolean |
|
|
2
|
+
export declare const getIfVisuallyHiddenChildren: (children: ReactNode) => boolean | '' | 0 | null | undefined;
|
|
@@ -23,4 +23,4 @@ export type ButtonGroupProps = {
|
|
|
23
23
|
*/
|
|
24
24
|
titleId?: string;
|
|
25
25
|
};
|
|
26
|
-
export default function ButtonGroup({ children, testId, label, titleId }: ButtonGroupProps): React.JSX.Element;
|
|
26
|
+
export default function ButtonGroup({ children, testId, label, titleId, }: ButtonGroupProps): React.JSX.Element;
|
|
@@ -12,7 +12,7 @@ type SplitButtonContextProps = NavigationSplitButtonContextProps | MainSplitButt
|
|
|
12
12
|
/**
|
|
13
13
|
* TODO: Add jsdoc
|
|
14
14
|
*/
|
|
15
|
-
export declare const SplitButtonContext: import(
|
|
15
|
+
export declare const SplitButtonContext: import('react').Context<SplitButtonContextProps | undefined>;
|
|
16
16
|
type UseSplitButtonContext = {
|
|
17
17
|
appearance: SplitButtonAppearance | 'subtle';
|
|
18
18
|
spacing: SplitButtonSpacing;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
export declare const getActions: (children: ReactNode) => {
|
|
3
|
-
PrimaryAction: string | number | import(
|
|
4
|
-
SecondaryAction: string | number | import(
|
|
3
|
+
PrimaryAction: string | number | import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | import('react').ReactPortal;
|
|
4
|
+
SecondaryAction: string | number | import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | import('react').ReactPortal;
|
|
5
5
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { BaseProps } from '../types';
|
|
3
|
+
import { type CustomThemeButtonOwnProps } from './custom-theme-button-types';
|
|
2
4
|
/**
|
|
3
5
|
* __Custom theme button__
|
|
4
6
|
*
|
|
@@ -10,5 +12,5 @@ import React from 'react';
|
|
|
10
12
|
*
|
|
11
13
|
* - [Examples](https://atlassian.design/components/button/examples#custom-theme-button)
|
|
12
14
|
*/
|
|
13
|
-
declare const CustomThemeButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<
|
|
15
|
+
declare const CustomThemeButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<BaseProps, 'overlay'> & CustomThemeButtonOwnProps & React.RefAttributes<HTMLElement>>>;
|
|
14
16
|
export default CustomThemeButton;
|
|
@@ -10,14 +10,14 @@ type GetCssArgs = {
|
|
|
10
10
|
isOnlySingleIcon: boolean;
|
|
11
11
|
};
|
|
12
12
|
export declare function getCss({ appearance, spacing, isSelected, shouldFitContainer, isOnlySingleIcon, }: GetCssArgs): CSSObject;
|
|
13
|
-
export declare function getIconStyle({ spacing }: {
|
|
13
|
+
export declare function getIconStyle({ spacing, }: {
|
|
14
14
|
spacing: Spacing;
|
|
15
|
-
}): import(
|
|
16
|
-
export declare function getContentStyle({ spacing }: {
|
|
15
|
+
}): import('@emotion/react').SerializedStyles;
|
|
16
|
+
export declare function getContentStyle({ spacing, }: {
|
|
17
17
|
spacing: Spacing;
|
|
18
|
-
}): import(
|
|
19
|
-
export declare function getFadingCss({ hasOverlay }: {
|
|
18
|
+
}): import('@emotion/react').SerializedStyles;
|
|
19
|
+
export declare function getFadingCss({ hasOverlay, }: {
|
|
20
20
|
hasOverlay: boolean;
|
|
21
|
-
}): import(
|
|
21
|
+
}): import('@emotion/react').SerializedStyles;
|
|
22
22
|
export declare const overlayCss: CSSObject;
|
|
23
23
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
export declare const getIfVisuallyHiddenChildren: (children: ReactNode) => boolean |
|
|
2
|
+
export declare const getIfVisuallyHiddenChildren: (children: ReactNode) => boolean | '' | 0 | null | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "23.9.
|
|
3
|
+
"version": "23.9.8",
|
|
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/"
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@atlaskit/css": "^0.19.0",
|
|
79
79
|
"@atlaskit/ds-lib": "^5.3.0",
|
|
80
80
|
"@atlaskit/focus-ring": "^3.0.0",
|
|
81
|
-
"@atlaskit/icon": "^
|
|
81
|
+
"@atlaskit/icon": "^31.0.0",
|
|
82
82
|
"@atlaskit/interaction-context": "^3.1.0",
|
|
83
83
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
84
84
|
"@atlaskit/primitives": "^18.0.0",
|
|
@@ -98,12 +98,12 @@
|
|
|
98
98
|
"@af/accessibility-testing": "workspace:^",
|
|
99
99
|
"@af/integration-testing": "workspace:^",
|
|
100
100
|
"@af/visual-regression": "workspace:^",
|
|
101
|
-
"@atlaskit/app-provider": "^4.
|
|
101
|
+
"@atlaskit/app-provider": "^4.1.0",
|
|
102
102
|
"@atlaskit/checkbox": "^17.3.0",
|
|
103
103
|
"@atlaskit/docs": "^11.3.0",
|
|
104
104
|
"@atlaskit/dropdown-menu": "^16.4.0",
|
|
105
105
|
"@atlaskit/form": "^15.3.0",
|
|
106
|
-
"@atlaskit/heading": "^5.
|
|
106
|
+
"@atlaskit/heading": "^5.3.0",
|
|
107
107
|
"@atlaskit/link": "^3.3.0",
|
|
108
108
|
"@atlaskit/logo": "^19.10.0",
|
|
109
109
|
"@atlaskit/modal-dialog": "^14.10.0",
|
|
@@ -129,6 +129,9 @@
|
|
|
129
129
|
},
|
|
130
130
|
"platform-dst_fix_not_focusable_loading_button": {
|
|
131
131
|
"type": "boolean"
|
|
132
|
+
},
|
|
133
|
+
"platform-button-icon-spacing-cleanup": {
|
|
134
|
+
"type": "boolean"
|
|
132
135
|
}
|
|
133
136
|
}
|
|
134
137
|
}
|