@khanacademy/wonder-blocks-button 3.0.5 → 3.0.7
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 +19 -0
- package/dist/es/index.js +3 -7
- package/dist/index.js +3 -8
- package/package.json +6 -6
- package/src/components/button.js +2 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-button
|
|
2
2
|
|
|
3
|
+
## 3.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ceb111df: ClickableBehavior no longer has tabIndex 0 by default. It must be passed in.
|
|
8
|
+
- Updated dependencies [ceb111df]
|
|
9
|
+
- @khanacademy/wonder-blocks-clickable@2.4.0
|
|
10
|
+
|
|
11
|
+
## 3.0.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [175a2dd2]
|
|
16
|
+
- @khanacademy/wonder-blocks-core@4.5.0
|
|
17
|
+
- @khanacademy/wonder-blocks-clickable@2.3.3
|
|
18
|
+
- @khanacademy/wonder-blocks-icon@1.2.32
|
|
19
|
+
- @khanacademy/wonder-blocks-progress-spinner@1.1.36
|
|
20
|
+
- @khanacademy/wonder-blocks-typography@1.1.34
|
|
21
|
+
|
|
3
22
|
## 3.0.5
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/es/index.js
CHANGED
|
@@ -292,8 +292,7 @@ const _generateStyles = (color, kind, light, iconWidth, size) => {
|
|
|
292
292
|
return styles[buttonType];
|
|
293
293
|
};
|
|
294
294
|
|
|
295
|
-
const _excluded = ["href", "type", "children", "skipClientNav", "spinner", "disabled", "onClick", "beforeNav", "safeWithNav", "tabIndex", "target", "rel"]
|
|
296
|
-
_excluded2 = ["tabIndex"];
|
|
295
|
+
const _excluded = ["href", "type", "children", "skipClientNav", "spinner", "disabled", "onClick", "beforeNav", "safeWithNav", "tabIndex", "target", "rel"];
|
|
297
296
|
class Button extends React.Component {
|
|
298
297
|
renderClickableBehavior(router) {
|
|
299
298
|
const _this$props = this.props,
|
|
@@ -316,10 +315,7 @@ class Button extends React.Component {
|
|
|
316
315
|
const ClickableBehavior = getClickableBehavior(href, skipClientNav, router);
|
|
317
316
|
|
|
318
317
|
const renderProp = (state, _ref) => {
|
|
319
|
-
let {
|
|
320
|
-
tabIndex: clickableTabIndex
|
|
321
|
-
} = _ref,
|
|
322
|
-
restChildProps = _objectWithoutPropertiesLoose(_ref, _excluded2);
|
|
318
|
+
let restChildProps = _extends({}, _ref);
|
|
323
319
|
|
|
324
320
|
return React.createElement(ButtonCore, _extends({}, sharedButtonCoreProps, state, restChildProps, {
|
|
325
321
|
disabled: disabled,
|
|
@@ -328,7 +324,7 @@ class Button extends React.Component {
|
|
|
328
324
|
href: href,
|
|
329
325
|
target: target,
|
|
330
326
|
type: type,
|
|
331
|
-
tabIndex: tabIndex
|
|
327
|
+
tabIndex: tabIndex
|
|
332
328
|
}), children);
|
|
333
329
|
};
|
|
334
330
|
|
package/dist/index.js
CHANGED
|
@@ -216,9 +216,7 @@ class Button extends react__WEBPACK_IMPORTED_MODULE_1__["Component"] {
|
|
|
216
216
|
} = this.props;
|
|
217
217
|
const ClickableBehavior = Object(_khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_3__["getClickableBehavior"])(href, skipClientNav, router);
|
|
218
218
|
|
|
219
|
-
const renderProp = (state, {
|
|
220
|
-
tabIndex: clickableTabIndex,
|
|
221
|
-
...restChildProps
|
|
219
|
+
const renderProp = (state, { ...restChildProps
|
|
222
220
|
}) => {
|
|
223
221
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_button_core_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, sharedButtonCoreProps, state, restChildProps, {
|
|
224
222
|
disabled: disabled,
|
|
@@ -226,11 +224,8 @@ class Button extends react__WEBPACK_IMPORTED_MODULE_1__["Component"] {
|
|
|
226
224
|
skipClientNav: skipClientNav,
|
|
227
225
|
href: href,
|
|
228
226
|
target: target,
|
|
229
|
-
type: type
|
|
230
|
-
|
|
231
|
-
// ClickableBehavior.
|
|
232
|
-
,
|
|
233
|
-
tabIndex: tabIndex || clickableTabIndex
|
|
227
|
+
type: type,
|
|
228
|
+
tabIndex: tabIndex
|
|
234
229
|
}), children);
|
|
235
230
|
};
|
|
236
231
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-button",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime": "^7.18.6",
|
|
19
|
-
"@khanacademy/wonder-blocks-clickable": "^2.
|
|
19
|
+
"@khanacademy/wonder-blocks-clickable": "^2.4.0",
|
|
20
20
|
"@khanacademy/wonder-blocks-color": "^1.2.0",
|
|
21
|
-
"@khanacademy/wonder-blocks-core": "^4.
|
|
22
|
-
"@khanacademy/wonder-blocks-icon": "^1.2.
|
|
23
|
-
"@khanacademy/wonder-blocks-progress-spinner": "^1.1.
|
|
21
|
+
"@khanacademy/wonder-blocks-core": "^4.5.0",
|
|
22
|
+
"@khanacademy/wonder-blocks-icon": "^1.2.32",
|
|
23
|
+
"@khanacademy/wonder-blocks-progress-spinner": "^1.1.36",
|
|
24
24
|
"@khanacademy/wonder-blocks-spacing": "^3.0.5",
|
|
25
|
-
"@khanacademy/wonder-blocks-typography": "^1.1.
|
|
25
|
+
"@khanacademy/wonder-blocks-typography": "^1.1.34"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"aphrodite": "^1.2.5",
|
package/src/components/button.js
CHANGED
|
@@ -285,10 +285,7 @@ export default class Button extends React.Component<Props> {
|
|
|
285
285
|
router,
|
|
286
286
|
);
|
|
287
287
|
|
|
288
|
-
const renderProp = (
|
|
289
|
-
state,
|
|
290
|
-
{tabIndex: clickableTabIndex, ...restChildProps},
|
|
291
|
-
) => {
|
|
288
|
+
const renderProp = (state, {...restChildProps}) => {
|
|
292
289
|
return (
|
|
293
290
|
<ButtonCore
|
|
294
291
|
{...sharedButtonCoreProps}
|
|
@@ -300,10 +297,7 @@ export default class Button extends React.Component<Props> {
|
|
|
300
297
|
href={href}
|
|
301
298
|
target={target}
|
|
302
299
|
type={type}
|
|
303
|
-
|
|
304
|
-
// it to override the tabIndex provide to use by
|
|
305
|
-
// ClickableBehavior.
|
|
306
|
-
tabIndex={tabIndex || clickableTabIndex}
|
|
300
|
+
tabIndex={tabIndex}
|
|
307
301
|
>
|
|
308
302
|
{children}
|
|
309
303
|
</ButtonCore>
|