@khanacademy/wonder-blocks-icon-button 3.4.13 → 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 +17 -0
- package/dist/es/index.js +3 -7
- package/dist/index.js +3 -8
- package/package.json +4 -4
- package/src/components/icon-button.js +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
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
|
+
|
|
11
|
+
## 3.4.14
|
|
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
|
+
|
|
3
20
|
## 3.4.13
|
|
4
21
|
|
|
5
22
|
### 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
|
|
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
|
|
230
|
-
|
|
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.
|
|
3
|
+
"version": "3.4.15",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -16,10 +16,10 @@
|
|
|
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.
|
|
21
|
+
"@khanacademy/wonder-blocks-core": "^4.5.0",
|
|
22
|
+
"@khanacademy/wonder-blocks-icon": "^1.2.32"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"aphrodite": "^1.2.5",
|
|
@@ -197,7 +197,7 @@ export default class IconButton extends React.Component<SharedProps> {
|
|
|
197
197
|
role="button"
|
|
198
198
|
target={target}
|
|
199
199
|
>
|
|
200
|
-
{(state, {
|
|
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
|
-
|
|
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
|
}}
|