@atlaskit/button 23.9.1 → 23.9.3

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/button
2
2
 
3
+ ## 23.9.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`036c3ee917e3c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/036c3ee917e3c) -
8
+ Icon migration entry point update
9
+ - Updated dependencies
10
+
11
+ ## 23.9.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [`ed8a227ecf6f5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ed8a227ecf6f5) -
16
+ Fixed loading buttons not being focusable
17
+
3
18
  ## 23.9.1
4
19
 
5
20
  ### Patch Changes
@@ -179,7 +179,12 @@ function (_ref, ref) {
179
179
  isSelected && appearance === 'warning' && selectedStyles.warning,
180
180
  // TODO: remove me once we kill color fallbacks
181
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, hasIconBefore && styles.buttonIconBefore, shouldFitContainer && styles.fullWidth, hasIconAfter && styles.buttonIconAfter, isIconButton && styles.iconButton, isIconButton && spacing === 'compact' && styles.iconButtonCompact, isLoading && styles.loading, isSplitButton && styles.splitButton, isNavigationSplitButton && styles.navigationSplitButton),
182
- isDisabled: isEffectivelyDisabled,
182
+ isDisabled: (0, _platformFeatureFlags.fg)('platform-dst_fix_not_focusable_loading_button') ? isDisabled : isEffectivelyDisabled
183
+ }, (0, _platformFeatureFlags.fg)('platform-dst_fix_not_focusable_loading_button') && {
184
+ 'aria-live': 'polite'
185
+ }, isLoading && (0, _platformFeatureFlags.fg)('platform-dst_fix_not_focusable_loading_button') && {
186
+ 'aria-disabled': true
187
+ }, {
183
188
  "aria-label": isLoading && ariaLabel && !ariaLabelledBy ? "".concat(ariaLabel, " ").concat(LOADING_LABEL) : ariaLabel,
184
189
  "aria-labelledby": isLoading && ariaLabelledBy ? "".concat(ariaLabelledBy, " ").concat(loadingLabelId) : ariaLabelledBy,
185
190
  onClick: onClick
@@ -160,7 +160,12 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(
160
160
  isSelected && appearance === 'warning' && selectedStyles.warning,
161
161
  // TODO: remove me once we kill color fallbacks
162
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, hasIconBefore && styles.buttonIconBefore, shouldFitContainer && styles.fullWidth, hasIconAfter && styles.buttonIconAfter, isIconButton && styles.iconButton, isIconButton && spacing === 'compact' && styles.iconButtonCompact, isLoading && styles.loading, isSplitButton && styles.splitButton, isNavigationSplitButton && styles.navigationSplitButton),
163
- isDisabled: isEffectivelyDisabled,
163
+ isDisabled: fg('platform-dst_fix_not_focusable_loading_button') ? isDisabled : isEffectivelyDisabled
164
+ }, fg('platform-dst_fix_not_focusable_loading_button') && {
165
+ 'aria-live': 'polite'
166
+ }, isLoading && fg('platform-dst_fix_not_focusable_loading_button') && {
167
+ 'aria-disabled': true
168
+ }, {
164
169
  "aria-label": isLoading && ariaLabel && !ariaLabelledBy ? `${ariaLabel} ${LOADING_LABEL}` : ariaLabel,
165
170
  "aria-labelledby": isLoading && ariaLabelledBy ? `${ariaLabelledBy} ${loadingLabelId}` : ariaLabelledBy,
166
171
  onClick: onClick
@@ -170,7 +170,12 @@ function (_ref, ref) {
170
170
  isSelected && appearance === 'warning' && selectedStyles.warning,
171
171
  // TODO: remove me once we kill color fallbacks
172
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, hasIconBefore && styles.buttonIconBefore, shouldFitContainer && styles.fullWidth, hasIconAfter && styles.buttonIconAfter, isIconButton && styles.iconButton, isIconButton && spacing === 'compact' && styles.iconButtonCompact, isLoading && styles.loading, isSplitButton && styles.splitButton, isNavigationSplitButton && styles.navigationSplitButton),
173
- isDisabled: isEffectivelyDisabled,
173
+ isDisabled: fg('platform-dst_fix_not_focusable_loading_button') ? isDisabled : isEffectivelyDisabled
174
+ }, fg('platform-dst_fix_not_focusable_loading_button') && {
175
+ 'aria-live': 'polite'
176
+ }, isLoading && fg('platform-dst_fix_not_focusable_loading_button') && {
177
+ 'aria-disabled': true
178
+ }, {
174
179
  "aria-label": isLoading && ariaLabel && !ariaLabelledBy ? "".concat(ariaLabel, " ").concat(LOADING_LABEL) : ariaLabel,
175
180
  "aria-labelledby": isLoading && ariaLabelledBy ? "".concat(ariaLabelledBy, " ").concat(loadingLabelId) : ariaLabelledBy,
176
181
  onClick: onClick
@@ -3,7 +3,6 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import { jsx } from '@emotion/react';
7
6
  export type ButtonGroupProps = {
8
7
  /**
9
8
  * The buttons to render inside the button group.
@@ -24,4 +23,4 @@ export type ButtonGroupProps = {
24
23
  */
25
24
  titleId?: string;
26
25
  };
27
- export default function ButtonGroup({ children, testId, label, titleId }: ButtonGroupProps): jsx.JSX.Element;
26
+ export default function ButtonGroup({ children, testId, label, titleId }: ButtonGroupProps): React.JSX.Element;
@@ -3,7 +3,6 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import { jsx } from '@emotion/react';
7
6
  export type ButtonGroupProps = {
8
7
  /**
9
8
  * The buttons to render inside the button group.
@@ -24,4 +23,4 @@ export type ButtonGroupProps = {
24
23
  */
25
24
  titleId?: string;
26
25
  };
27
- export default function ButtonGroup({ children, testId, label, titleId }: ButtonGroupProps): jsx.JSX.Element;
26
+ export default function ButtonGroup({ children, testId, label, titleId }: ButtonGroupProps): React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "23.9.1",
3
+ "version": "23.9.3",
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/"
@@ -84,7 +84,7 @@
84
84
  "@atlaskit/primitives": "^17.0.0",
85
85
  "@atlaskit/spinner": "^19.0.0",
86
86
  "@atlaskit/theme": "^21.0.0",
87
- "@atlaskit/tokens": "^9.0.0",
87
+ "@atlaskit/tokens": "^9.1.0",
88
88
  "@atlaskit/tooltip": "^20.11.0",
89
89
  "@atlaskit/visually-hidden": "^3.0.0",
90
90
  "@babel/runtime": "^7.0.0",
@@ -99,17 +99,18 @@
99
99
  "@af/integration-testing": "workspace:^",
100
100
  "@af/visual-regression": "workspace:^",
101
101
  "@atlaskit/app-provider": "^3.2.0",
102
- "@atlaskit/checkbox": "^17.2.0",
102
+ "@atlaskit/checkbox": "^17.3.0",
103
103
  "@atlaskit/docs": "^11.2.0",
104
- "@atlaskit/dropdown-menu": "^16.3.0",
105
- "@atlaskit/form": "^15.1.0",
104
+ "@atlaskit/dropdown-menu": "^16.4.0",
105
+ "@atlaskit/form": "^15.2.0",
106
106
  "@atlaskit/heading": "^5.2.0",
107
- "@atlaskit/link": "^3.2.0",
107
+ "@atlaskit/link": "^3.3.0",
108
108
  "@atlaskit/logo": "^19.9.0",
109
109
  "@atlaskit/modal-dialog": "^14.9.0",
110
110
  "@atlaskit/section-message": "^8.11.0",
111
111
  "@atlaskit/select": "^21.6.0",
112
112
  "@atlaskit/toggle": "^15.2.0",
113
+ "@atlassian/feature-flags-test-utils": "^1.0.0",
113
114
  "@atlassian/ssr-tests": "workspace:^",
114
115
  "@testing-library/react": "^13.4.0",
115
116
  "@testing-library/user-event": "^14.4.3",
@@ -125,6 +126,9 @@
125
126
  },
126
127
  "platform-dst-shape-theme-default": {
127
128
  "type": "boolean"
129
+ },
130
+ "platform-dst_fix_not_focusable_loading_button": {
131
+ "type": "boolean"
128
132
  }
129
133
  }
130
134
  }