@khanacademy/wonder-blocks-icon-button 5.2.2 → 5.3.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.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 16e1635a: IconButton: Add option for `large` value for `size` prop (24x24 icon size with target area of 48x48)
8
+
3
9
  ## 5.2.2
4
10
 
5
11
  ### Patch Changes
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import type { PhosphorIconAsset } from "@khanacademy/wonder-blocks-icon";
3
3
  import type { AriaProps, StyleType } from "@khanacademy/wonder-blocks-core";
4
4
  import { Link } from "react-router-dom";
5
- export type IconButtonSize = "xsmall" | "small" | "medium";
5
+ export type IconButtonSize = "xsmall" | "small" | "medium" | "large";
6
6
  export type SharedProps = Partial<Omit<AriaProps, "aria-disabled">> & {
7
7
  /**
8
8
  * A Phosphor icon asset (imported as a static SVG file).
@@ -37,7 +37,8 @@ export type SharedProps = Partial<Omit<AriaProps, "aria-disabled">> & {
37
37
  testId?: string;
38
38
  /**
39
39
  * Size of the icon button.
40
- * One of `xsmall` (16 icon, 20 target), `small` (24, 32), or `medium (24, 40).
40
+ * One of `xsmall` (16 icon, 20 target), `small` (24, 32), `medium` (24, 40),
41
+ * or `large` (24, 48).
41
42
  * Defaults to `medium`.
42
43
  */
43
44
  size?: IconButtonSize;
package/dist/es/index.js CHANGED
@@ -44,12 +44,15 @@ const iconSizeForButtonSize = size => {
44
44
  return "medium";
45
45
  case "medium":
46
46
  return "medium";
47
+ case "large":
48
+ return "medium";
47
49
  }
48
50
  };
49
51
  const targetPixelsForSize = size => ({
50
52
  xsmall: 24,
51
53
  small: 32,
52
- medium: 40
54
+ medium: 40,
55
+ large: 48
53
56
  })[size];
54
57
 
55
58
  const theme$1 = {
package/dist/index.js CHANGED
@@ -67,12 +67,15 @@ const iconSizeForButtonSize = size => {
67
67
  return "medium";
68
68
  case "medium":
69
69
  return "medium";
70
+ case "large":
71
+ return "medium";
70
72
  }
71
73
  };
72
74
  const targetPixelsForSize = size => ({
73
75
  xsmall: 24,
74
76
  small: 32,
75
- medium: 40
77
+ medium: 40,
78
+ large: 48
76
79
  })[size];
77
80
 
78
81
  const theme$1 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-icon-button",
3
- "version": "5.2.2",
3
+ "version": "5.3.0",
4
4
  "design": "v1",
5
5
  "publishConfig": {
6
6
  "access": "public"