@khanacademy/wonder-blocks-link 3.8.12 → 3.8.13
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 +8 -0
- package/dist/es/index.js +5 -13
- package/dist/index.js +6 -16
- package/package.json +2 -2
- package/src/components/link.js +4 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-link
|
|
2
2
|
|
|
3
|
+
## 3.8.13
|
|
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
|
+
|
|
3
11
|
## 3.8.12
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/es/index.js
CHANGED
|
@@ -112,9 +112,7 @@ const _generateStyles = (kind, light, visitable) => {
|
|
|
112
112
|
return styles[buttonType];
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
const _excluded = ["onClick", "beforeNav", "safeWithNav", "href", "skipClientNav", "children", "tabIndex", "onKeyDown", "onKeyUp", "target"]
|
|
116
|
-
_excluded2 = ["tabIndex"],
|
|
117
|
-
_excluded3 = ["tabIndex"];
|
|
115
|
+
const _excluded = ["onClick", "beforeNav", "safeWithNav", "href", "skipClientNav", "children", "tabIndex", "onKeyDown", "onKeyUp", "target"];
|
|
118
116
|
class Link extends React.Component {
|
|
119
117
|
renderClickableBehavior(router) {
|
|
120
118
|
const _this$props = this.props,
|
|
@@ -145,16 +143,13 @@ class Link extends React.Component {
|
|
|
145
143
|
onKeyDown: onKeyDown,
|
|
146
144
|
onKeyUp: onKeyUp
|
|
147
145
|
}, (state, _ref) => {
|
|
148
|
-
let {
|
|
149
|
-
tabIndex: clickableTabIndex
|
|
150
|
-
} = _ref,
|
|
151
|
-
childrenProps = _objectWithoutPropertiesLoose(_ref, _excluded2);
|
|
146
|
+
let childrenProps = _extends({}, _ref);
|
|
152
147
|
|
|
153
148
|
return React.createElement(LinkCore, _extends({}, sharedProps, state, childrenProps, {
|
|
154
149
|
skipClientNav: skipClientNav,
|
|
155
150
|
href: href,
|
|
156
151
|
target: target,
|
|
157
|
-
tabIndex: tabIndex
|
|
152
|
+
tabIndex: tabIndex
|
|
158
153
|
}), children);
|
|
159
154
|
});
|
|
160
155
|
} else {
|
|
@@ -168,16 +163,13 @@ class Link extends React.Component {
|
|
|
168
163
|
onKeyDown: onKeyDown,
|
|
169
164
|
onKeyUp: onKeyUp
|
|
170
165
|
}, (state, _ref2) => {
|
|
171
|
-
let {
|
|
172
|
-
tabIndex: clickableTabIndex
|
|
173
|
-
} = _ref2,
|
|
174
|
-
childrenProps = _objectWithoutPropertiesLoose(_ref2, _excluded3);
|
|
166
|
+
let childrenProps = _extends({}, _ref2);
|
|
175
167
|
|
|
176
168
|
return React.createElement(LinkCore, _extends({}, sharedProps, state, childrenProps, {
|
|
177
169
|
skipClientNav: skipClientNav,
|
|
178
170
|
href: href,
|
|
179
171
|
target: target,
|
|
180
|
-
tabIndex: tabIndex
|
|
172
|
+
tabIndex: tabIndex
|
|
181
173
|
}), children);
|
|
182
174
|
});
|
|
183
175
|
}
|
package/dist/index.js
CHANGED
|
@@ -345,18 +345,13 @@ class Link extends react__WEBPACK_IMPORTED_MODULE_1__["Component"] {
|
|
|
345
345
|
safeWithNav: safeWithNav,
|
|
346
346
|
onKeyDown: onKeyDown,
|
|
347
347
|
onKeyUp: onKeyUp
|
|
348
|
-
}, (state, {
|
|
349
|
-
tabIndex: clickableTabIndex,
|
|
350
|
-
...childrenProps
|
|
348
|
+
}, (state, { ...childrenProps
|
|
351
349
|
}) => {
|
|
352
350
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_link_core_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, sharedProps, state, childrenProps, {
|
|
353
351
|
skipClientNav: skipClientNav,
|
|
354
352
|
href: href,
|
|
355
|
-
target: target
|
|
356
|
-
|
|
357
|
-
// ClickableBehavior.
|
|
358
|
-
,
|
|
359
|
-
tabIndex: tabIndex || clickableTabIndex
|
|
353
|
+
target: target,
|
|
354
|
+
tabIndex: tabIndex
|
|
360
355
|
}), children);
|
|
361
356
|
});
|
|
362
357
|
} else {
|
|
@@ -369,18 +364,13 @@ class Link extends react__WEBPACK_IMPORTED_MODULE_1__["Component"] {
|
|
|
369
364
|
target: target,
|
|
370
365
|
onKeyDown: onKeyDown,
|
|
371
366
|
onKeyUp: onKeyUp
|
|
372
|
-
}, (state, {
|
|
373
|
-
tabIndex: clickableTabIndex,
|
|
374
|
-
...childrenProps
|
|
367
|
+
}, (state, { ...childrenProps
|
|
375
368
|
}) => {
|
|
376
369
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_link_core_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, sharedProps, state, childrenProps, {
|
|
377
370
|
skipClientNav: skipClientNav,
|
|
378
371
|
href: href,
|
|
379
|
-
target: target
|
|
380
|
-
|
|
381
|
-
// ClickableBehavior.
|
|
382
|
-
,
|
|
383
|
-
tabIndex: tabIndex || clickableTabIndex
|
|
372
|
+
target: target,
|
|
373
|
+
tabIndex: tabIndex
|
|
384
374
|
}), children);
|
|
385
375
|
});
|
|
386
376
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-link",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.13",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -16,7 +16,7 @@
|
|
|
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
21
|
"@khanacademy/wonder-blocks-core": "^4.5.0"
|
|
22
22
|
},
|
package/src/components/link.js
CHANGED
|
@@ -222,10 +222,7 @@ export default class Link extends React.Component<SharedProps> {
|
|
|
222
222
|
onKeyDown={onKeyDown}
|
|
223
223
|
onKeyUp={onKeyUp}
|
|
224
224
|
>
|
|
225
|
-
{(
|
|
226
|
-
state,
|
|
227
|
-
{tabIndex: clickableTabIndex, ...childrenProps},
|
|
228
|
-
) => {
|
|
225
|
+
{(state, {...childrenProps}) => {
|
|
229
226
|
return (
|
|
230
227
|
<LinkCore
|
|
231
228
|
{...sharedProps}
|
|
@@ -234,10 +231,7 @@ export default class Link extends React.Component<SharedProps> {
|
|
|
234
231
|
skipClientNav={skipClientNav}
|
|
235
232
|
href={href}
|
|
236
233
|
target={target}
|
|
237
|
-
|
|
238
|
-
// it to override the tabIndex provide to use by
|
|
239
|
-
// ClickableBehavior.
|
|
240
|
-
tabIndex={tabIndex || clickableTabIndex}
|
|
234
|
+
tabIndex={tabIndex}
|
|
241
235
|
>
|
|
242
236
|
{children}
|
|
243
237
|
</LinkCore>
|
|
@@ -257,10 +251,7 @@ export default class Link extends React.Component<SharedProps> {
|
|
|
257
251
|
onKeyDown={onKeyDown}
|
|
258
252
|
onKeyUp={onKeyUp}
|
|
259
253
|
>
|
|
260
|
-
{(
|
|
261
|
-
state,
|
|
262
|
-
{tabIndex: clickableTabIndex, ...childrenProps},
|
|
263
|
-
) => {
|
|
254
|
+
{(state, {...childrenProps}) => {
|
|
264
255
|
return (
|
|
265
256
|
<LinkCore
|
|
266
257
|
{...sharedProps}
|
|
@@ -269,10 +260,7 @@ export default class Link extends React.Component<SharedProps> {
|
|
|
269
260
|
skipClientNav={skipClientNav}
|
|
270
261
|
href={href}
|
|
271
262
|
target={target}
|
|
272
|
-
|
|
273
|
-
// it to override the tabIndex provide to use by
|
|
274
|
-
// ClickableBehavior.
|
|
275
|
-
tabIndex={tabIndex || clickableTabIndex}
|
|
263
|
+
tabIndex={tabIndex}
|
|
276
264
|
>
|
|
277
265
|
{children}
|
|
278
266
|
</LinkCore>
|