@khanacademy/wonder-blocks-switch 3.0.3 → 3.0.5

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,20 @@
1
1
  # @khanacademy/wonder-blocks-switch
2
2
 
3
+ ## 3.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8cfaeab0]
8
+ - Updated dependencies [c162abb4]
9
+ - @khanacademy/wonder-blocks-tokens@4.1.0
10
+
11
+ ## 3.0.4
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [0de25cd8]
16
+ - @khanacademy/wonder-blocks-tokens@4.0.0
17
+
3
18
  ## 3.0.3
4
19
 
5
20
  ### Patch Changes
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { AriaProps } from "@khanacademy/wonder-blocks-core";
3
+ import { PhosphorIcon } from "@khanacademy/wonder-blocks-icon";
3
4
  declare const Switch: React.ForwardRefExoticComponent<Pick<AriaProps, "aria-labelledby" | "aria-label" | "aria-describedby"> & {
4
5
  /**
5
6
  * Whether this component is checked.
@@ -8,32 +9,24 @@ declare const Switch: React.ForwardRefExoticComponent<Pick<AriaProps, "aria-labe
8
9
  /**
9
10
  * Whether the switch is disabled. Defaults to `false`.
10
11
  */
11
- disabled?: boolean | undefined;
12
+ disabled?: boolean;
12
13
  /**
13
14
  * Optional icon to display on the slider.
14
15
  */
15
- icon?: React.ReactElement<Pick<AriaProps, "aria-label" | "aria-hidden" | "role"> & {
16
- color?: string | undefined;
17
- style?: import("@khanacademy/wonder-blocks-core").StyleType;
18
- className?: string | undefined;
19
- role?: "img" | undefined;
20
- size?: import("@khanacademy/wonder-blocks-icon").IconSize | undefined;
21
- testId?: string | undefined;
22
- icon: string | import("@khanacademy/wonder-blocks-icon").PhosphorIconAsset;
23
- } & React.RefAttributes<HTMLSpanElement>, string | React.JSXElementConstructor<any>> | undefined;
16
+ icon?: React.ReactElement<React.ComponentProps<typeof PhosphorIcon>>;
24
17
  /**
25
18
  * The unique identifier for the switch.
26
19
  */
27
- id?: string | undefined;
20
+ id?: string;
28
21
  /**
29
22
  * Function to call when the switch is clicked.
30
23
  * @param newCheckedValue
31
24
  * @returns {unknown}
32
25
  */
33
- onChange?: ((newCheckedState: boolean) => unknown) | undefined;
26
+ onChange?: (newCheckedState: boolean) => unknown;
34
27
  /**
35
28
  * Test ID used for e2e testing.
36
29
  */
37
- testId?: string | undefined;
30
+ testId?: string;
38
31
  } & React.RefAttributes<HTMLInputElement>>;
39
32
  export default Switch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-switch",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "design": "v1",
5
5
  "description": "Switch components for Wonder Blocks.",
6
6
  "main": "dist/index.js",
@@ -20,7 +20,7 @@
20
20
  "@khanacademy/wonder-blocks-core": "^11.1.0",
21
21
  "@khanacademy/wonder-blocks-icon": "^5.0.5",
22
22
  "@khanacademy/wonder-blocks-theming": "^3.0.1",
23
- "@khanacademy/wonder-blocks-tokens": "^3.0.1"
23
+ "@khanacademy/wonder-blocks-tokens": "^4.1.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "aphrodite": "^1.2.5",