@atlaskit/button 23.9.1 → 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
|
@@ -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.
|
|
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/"
|
|
@@ -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.
|
|
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
|
}
|