@khanacademy/wonder-blocks-switch 3.0.2 → 3.0.4
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 +15 -0
- package/dist/components/switch.d.ts +6 -13
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-switch
|
|
2
2
|
|
|
3
|
+
## 3.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0de25cd8]
|
|
8
|
+
- @khanacademy/wonder-blocks-tokens@4.0.0
|
|
9
|
+
|
|
10
|
+
## 3.0.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [7516b239]
|
|
15
|
+
- @khanacademy/wonder-blocks-core@11.1.0
|
|
16
|
+
- @khanacademy/wonder-blocks-icon@5.0.5
|
|
17
|
+
|
|
3
18
|
## 3.0.2
|
|
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
|
|
12
|
+
disabled?: boolean;
|
|
12
13
|
/**
|
|
13
14
|
* Optional icon to display on the slider.
|
|
14
15
|
*/
|
|
15
|
-
icon?: React.ReactElement<
|
|
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
|
|
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?: (
|
|
26
|
+
onChange?: (newCheckedState: boolean) => unknown;
|
|
34
27
|
/**
|
|
35
28
|
* Test ID used for e2e testing.
|
|
36
29
|
*/
|
|
37
|
-
testId?: string
|
|
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
|
+
"version": "3.0.4",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"description": "Switch components for Wonder Blocks.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@babel/runtime": "^7.18.6",
|
|
20
|
-
"@khanacademy/wonder-blocks-core": "^11.0
|
|
21
|
-
"@khanacademy/wonder-blocks-icon": "^5.0.
|
|
20
|
+
"@khanacademy/wonder-blocks-core": "^11.1.0",
|
|
21
|
+
"@khanacademy/wonder-blocks-icon": "^5.0.5",
|
|
22
22
|
"@khanacademy/wonder-blocks-theming": "^3.0.1",
|
|
23
|
-
"@khanacademy/wonder-blocks-tokens": "^
|
|
23
|
+
"@khanacademy/wonder-blocks-tokens": "^4.0.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"aphrodite": "^1.2.5",
|