@atlaskit/button 23.9.0 → 23.9.2

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,18 @@
1
1
  # @atlaskit/button
2
2
 
3
+ ## 23.9.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ed8a227ecf6f5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ed8a227ecf6f5) -
8
+ Fixed loading buttons not being focusable
9
+
10
+ ## 23.9.1
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 23.9.0
4
17
 
5
18
  ### Minor 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "23.9.0",
3
+ "version": "23.9.2",
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/"
@@ -75,16 +75,16 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@atlaskit/analytics-next": "^11.1.0",
78
- "@atlaskit/css": "^0.18.0",
78
+ "@atlaskit/css": "^0.19.0",
79
79
  "@atlaskit/ds-lib": "^5.3.0",
80
80
  "@atlaskit/focus-ring": "^3.0.0",
81
81
  "@atlaskit/icon": "^29.3.0",
82
82
  "@atlaskit/interaction-context": "^3.1.0",
83
83
  "@atlaskit/platform-feature-flags": "^1.1.0",
84
- "@atlaskit/primitives": "^16.4.0",
84
+ "@atlaskit/primitives": "^17.0.0",
85
85
  "@atlaskit/spinner": "^19.0.0",
86
86
  "@atlaskit/theme": "^21.0.0",
87
- "@atlaskit/tokens": "^8.6.0",
87
+ "@atlaskit/tokens": "^9.0.0",
88
88
  "@atlaskit/tooltip": "^20.11.0",
89
89
  "@atlaskit/visually-hidden": "^3.0.0",
90
90
  "@babel/runtime": "^7.0.0",
@@ -102,7 +102,7 @@
102
102
  "@atlaskit/checkbox": "^17.2.0",
103
103
  "@atlaskit/docs": "^11.2.0",
104
104
  "@atlaskit/dropdown-menu": "^16.3.0",
105
- "@atlaskit/form": "^15.1.0",
105
+ "@atlaskit/form": "^15.2.0",
106
106
  "@atlaskit/heading": "^5.2.0",
107
107
  "@atlaskit/link": "^3.2.0",
108
108
  "@atlaskit/logo": "^19.9.0",
@@ -110,6 +110,7 @@
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
  }