@khanacademy/wonder-blocks-icon-button 5.5.0 → 5.6.0

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,11 @@
1
1
  # @khanacademy/wonder-blocks-icon-button
2
2
 
3
+ ## 5.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 75da0046: Adds `id` prop and fixes `type` prop to set 'button' as default value.
8
+
3
9
  ## 5.5.0
4
10
 
5
11
  ### Minor Changes
@@ -4,6 +4,10 @@ import type { AriaProps, StyleType } from "@khanacademy/wonder-blocks-core";
4
4
  import { Link } from "react-router-dom";
5
5
  export type IconButtonSize = "xsmall" | "small" | "medium" | "large";
6
6
  export type SharedProps = Partial<Omit<AriaProps, "aria-disabled">> & {
7
+ /**
8
+ * A unique identifier for the IconButton.
9
+ */
10
+ id?: string;
7
11
  /**
8
12
  * A Phosphor icon asset (imported as a static SVG file).
9
13
  */
package/dist/es/index.js CHANGED
@@ -177,7 +177,7 @@ function ThemedIconButton(props) {
177
177
  }, props.children);
178
178
  }
179
179
 
180
- const _excluded$1 = ["color", "disabled", "href", "icon", "kind", "light", "size", "skipClientNav", "style", "testId"];
180
+ const _excluded$1 = ["color", "disabled", "href", "icon", "kind", "light", "size", "skipClientNav", "style", "testId", "type"];
181
181
  function IconChooser({
182
182
  icon,
183
183
  size
@@ -213,7 +213,8 @@ const IconButtonCore = React.forwardRef(function IconButtonCore(props, ref) {
213
213
  size = "medium",
214
214
  skipClientNav,
215
215
  style,
216
- testId
216
+ testId,
217
+ type = "button"
217
218
  } = props,
218
219
  restProps = _objectWithoutPropertiesLoose(props, _excluded$1);
219
220
  const {
@@ -241,7 +242,7 @@ const IconButtonCore = React.forwardRef(function IconButtonCore(props, ref) {
241
242
  }), child);
242
243
  } else {
243
244
  return React.createElement(StyledButton, _extends({
244
- type: "button"
245
+ type: type
245
246
  }, commonProps, {
246
247
  onClick: disabled ? undefined : restProps.onClick,
247
248
  "aria-disabled": disabled,
package/dist/index.js CHANGED
@@ -204,7 +204,7 @@ function ThemedIconButton(props) {
204
204
  }, props.children);
205
205
  }
206
206
 
207
- const _excluded$1 = ["color", "disabled", "href", "icon", "kind", "light", "size", "skipClientNav", "style", "testId"];
207
+ const _excluded$1 = ["color", "disabled", "href", "icon", "kind", "light", "size", "skipClientNav", "style", "testId", "type"];
208
208
  function IconChooser({
209
209
  icon,
210
210
  size
@@ -240,7 +240,8 @@ const IconButtonCore = React__namespace.forwardRef(function IconButtonCore(props
240
240
  size = "medium",
241
241
  skipClientNav,
242
242
  style,
243
- testId
243
+ testId,
244
+ type = "button"
244
245
  } = props,
245
246
  restProps = _objectWithoutPropertiesLoose__default["default"](props, _excluded$1);
246
247
  const {
@@ -268,7 +269,7 @@ const IconButtonCore = React__namespace.forwardRef(function IconButtonCore(props
268
269
  }), child);
269
270
  } else {
270
271
  return React__namespace.createElement(StyledButton, _extends__default["default"]({
271
- type: "button"
272
+ type: type
272
273
  }, commonProps, {
273
274
  onClick: disabled ? undefined : restProps.onClick,
274
275
  "aria-disabled": disabled,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-icon-button",
3
- "version": "5.5.0",
3
+ "version": "5.6.0",
4
4
  "design": "v1",
5
5
  "publishConfig": {
6
6
  "access": "public"