@khanacademy/wonder-blocks-switch 2.0.0 → 3.0.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,28 @@
1
1
  # @khanacademy/wonder-blocks-switch
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 56d961f1: - Migrate Wonder Blocks components off old id providers and onto new `Id` component
8
+
9
+ ### Patch Changes
10
+
11
+ - b6009b77: Deprecate the ID provider and unique ID utilities
12
+ - Updated dependencies [b6009b77]
13
+ - Updated dependencies [897686bc]
14
+ - Updated dependencies [56d961f1]
15
+ - @khanacademy/wonder-blocks-core@10.0.0
16
+ - @khanacademy/wonder-blocks-icon@5.0.2
17
+
18
+ ## 2.0.1
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [f4abd572]
23
+ - @khanacademy/wonder-blocks-core@9.0.0
24
+ - @khanacademy/wonder-blocks-icon@5.0.1
25
+
3
26
  ## 2.0.0
4
27
 
5
28
  ### Major Changes
package/dist/es/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import _extends from '@babel/runtime/helpers/extends';
2
2
  import * as React from 'react';
3
+ import { useId } from 'react';
3
4
  import { StyleSheet } from 'aphrodite';
4
- import { addStyle, useUniqueIdWithMock, View } from '@khanacademy/wonder-blocks-core';
5
+ import { addStyle, View } from '@khanacademy/wonder-blocks-core';
5
6
  import { mergeTheme, createThemeContext, ThemeSwitcherContext, useScopedTheme, useStyles } from '@khanacademy/wonder-blocks-theming';
6
7
  import * as tokens from '@khanacademy/wonder-blocks-tokens';
7
8
 
@@ -122,8 +123,8 @@ const SwitchCore = React.forwardRef(function SwitchCore(props, ref) {
122
123
  onChange,
123
124
  testId
124
125
  } = props;
125
- const ids = useUniqueIdWithMock("labeled-field");
126
- const uniqueId = id != null ? id : ids.get("labeled-field-id");
126
+ const generatedUniqueId = useId();
127
+ const uniqueId = id != null ? id : generatedUniqueId;
127
128
  const {
128
129
  theme,
129
130
  themeName
package/dist/index.js CHANGED
@@ -148,8 +148,8 @@ const SwitchCore = React__namespace.forwardRef(function SwitchCore(props, ref) {
148
148
  onChange,
149
149
  testId
150
150
  } = props;
151
- const ids = wonderBlocksCore.useUniqueIdWithMock("labeled-field");
152
- const uniqueId = id != null ? id : ids.get("labeled-field-id");
151
+ const generatedUniqueId = React.useId();
152
+ const uniqueId = id != null ? id : generatedUniqueId;
153
153
  const {
154
154
  theme,
155
155
  themeName
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-switch",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "design": "v1",
5
5
  "description": "Switch components for Wonder Blocks.",
6
6
  "main": "dist/index.js",
@@ -16,8 +16,8 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@babel/runtime": "^7.18.6",
19
- "@khanacademy/wonder-blocks-core": "^8.0.0",
20
- "@khanacademy/wonder-blocks-icon": "^5.0.0",
19
+ "@khanacademy/wonder-blocks-core": "^10.0.0",
20
+ "@khanacademy/wonder-blocks-icon": "^5.0.2",
21
21
  "@khanacademy/wonder-blocks-theming": "^3.0.0",
22
22
  "@khanacademy/wonder-blocks-tokens": "^3.0.0"
23
23
  },