@khanacademy/wonder-blocks-icon-button 3.4.14 → 3.4.15

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,13 @@
1
1
  # @khanacademy/wonder-blocks-icon-button
2
2
 
3
+ ## 3.4.15
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.4.14
4
12
 
5
13
  ### Patch Changes
package/dist/es/index.js CHANGED
@@ -154,8 +154,7 @@ const _generateStyles = (color, kind, light) => {
154
154
  return styles[buttonType];
155
155
  };
156
156
 
157
- const _excluded = ["onClick", "href", "skipClientNav", "tabIndex", "target"],
158
- _excluded2 = ["tabIndex"];
157
+ const _excluded = ["onClick", "href", "skipClientNav", "tabIndex", "target"];
159
158
  class IconButton extends React.Component {
160
159
  renderClickableBehavior(router) {
161
160
  const _this$props = this.props,
@@ -176,16 +175,13 @@ class IconButton extends React.Component {
176
175
  role: "button",
177
176
  target: target
178
177
  }, (state, _ref) => {
179
- let {
180
- tabIndex: clickableTabIndex
181
- } = _ref,
182
- childrenProps = _objectWithoutPropertiesLoose(_ref, _excluded2);
178
+ let childrenProps = _extends({}, _ref);
183
179
 
184
180
  return React.createElement(IconButtonCore, _extends({}, sharedProps, state, childrenProps, {
185
181
  skipClientNav: skipClientNav,
186
182
  href: href,
187
183
  target: target,
188
- tabIndex: tabIndex || clickableTabIndex
184
+ tabIndex: tabIndex
189
185
  }));
190
186
  });
191
187
  }
package/dist/index.js CHANGED
@@ -219,18 +219,13 @@ class IconButton extends react__WEBPACK_IMPORTED_MODULE_1__["Component"] {
219
219
  onClick: onClick,
220
220
  role: "button",
221
221
  target: target
222
- }, (state, {
223
- tabIndex: clickableTabIndex,
224
- ...childrenProps
222
+ }, (state, { ...childrenProps
225
223
  }) => {
226
224
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_icon_button_core_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, sharedProps, state, childrenProps, {
227
225
  skipClientNav: skipClientNav,
228
226
  href: href,
229
- target: target // If tabIndex is provide to the component we allow
230
- // it to override the tabIndex provide to use by
231
- // ClickableBehavior.
232
- ,
233
- tabIndex: tabIndex || clickableTabIndex
227
+ target: target,
228
+ tabIndex: tabIndex
234
229
  }));
235
230
  });
236
231
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-icon-button",
3
- "version": "3.4.14",
3
+ "version": "3.4.15",
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.3.3",
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
  "@khanacademy/wonder-blocks-icon": "^1.2.32"
@@ -197,7 +197,7 @@ export default class IconButton extends React.Component<SharedProps> {
197
197
  role="button"
198
198
  target={target}
199
199
  >
200
- {(state, {tabIndex: clickableTabIndex, ...childrenProps}) => {
200
+ {(state, {...childrenProps}) => {
201
201
  return (
202
202
  <IconButtonCore
203
203
  {...sharedProps}
@@ -206,10 +206,7 @@ export default class IconButton extends React.Component<SharedProps> {
206
206
  skipClientNav={skipClientNav}
207
207
  href={href}
208
208
  target={target}
209
- // If tabIndex is provide to the component we allow
210
- // it to override the tabIndex provide to use by
211
- // ClickableBehavior.
212
- tabIndex={tabIndex || clickableTabIndex}
209
+ tabIndex={tabIndex}
213
210
  />
214
211
  );
215
212
  }}