@khanacademy/wonder-blocks-switch 3.1.0 → 3.1.1

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,16 @@
1
1
  # @khanacademy/wonder-blocks-switch
2
2
 
3
+ ## 3.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - ee8d95a: Rollback rollup version from v4 to v2 to prevent an issue with CJS builds in unit tests
8
+ - Updated dependencies [ee8d95a]
9
+ - @khanacademy/wonder-blocks-core@12.1.1
10
+ - @khanacademy/wonder-blocks-icon@5.1.1
11
+ - @khanacademy/wonder-blocks-theming@3.1.1
12
+ - @khanacademy/wonder-blocks-tokens@4.2.1
13
+
3
14
  ## 3.1.0
4
15
 
5
16
  ### Minor Changes
package/dist/index.js CHANGED
@@ -7,7 +7,10 @@ var wonderBlocksCore = require('@khanacademy/wonder-blocks-core');
7
7
  var wonderBlocksTheming = require('@khanacademy/wonder-blocks-theming');
8
8
  var tokens = require('@khanacademy/wonder-blocks-tokens');
9
9
 
10
- function _interopNamespaceDefault(e) {
10
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
+
12
+ function _interopNamespace(e) {
13
+ if (e && e.__esModule) return e;
11
14
  var n = Object.create(null);
12
15
  if (e) {
13
16
  Object.keys(e).forEach(function (k) {
@@ -20,12 +23,13 @@ function _interopNamespaceDefault(e) {
20
23
  }
21
24
  });
22
25
  }
23
- n.default = e;
26
+ n["default"] = e;
24
27
  return Object.freeze(n);
25
28
  }
26
29
 
27
- var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
28
- var tokens__namespace = /*#__PURE__*/_interopNamespaceDefault(tokens);
30
+ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
31
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
32
+ var tokens__namespace = /*#__PURE__*/_interopNamespace(tokens);
29
33
 
30
34
  const action = tokens.semanticColor.action.outlined.progressive;
31
35
  const theme$1 = {
@@ -250,7 +254,7 @@ const _generateStyles = (checked, clickable, disabled, theme, themeName) => {
250
254
  };
251
255
  if (checked) {
252
256
  newStyles = {
253
- switch: _extends({
257
+ switch: _extends__default["default"]({
254
258
  backgroundColor: disabled ? theme.color.bg.switch.disabledOn : theme.color.bg.switch.on,
255
259
  ":active": {
256
260
  backgroundColor: !disabled && clickable ? theme.color.bg.switch.activeOn : undefined
@@ -266,7 +270,7 @@ const _generateStyles = (checked, clickable, disabled, theme, themeName) => {
266
270
  };
267
271
  } else {
268
272
  newStyles = {
269
- switch: _extends({
273
+ switch: _extends__default["default"]({
270
274
  backgroundColor: disabled ? theme.color.bg.switch.disabledOff : theme.color.bg.switch.off,
271
275
  ":active": {
272
276
  backgroundColor: !disabled && clickable ? theme.color.bg.switch.activeOff : undefined
@@ -284,7 +288,7 @@ const _generateStyles = (checked, clickable, disabled, theme, themeName) => {
284
288
  return styles[checkedStyle];
285
289
  };
286
290
  const Switch = React__namespace.forwardRef(function Switch(props, ref) {
287
- return React__namespace.createElement(ThemedSwitch, null, React__namespace.createElement(SwitchCore, _extends({}, props, {
291
+ return React__namespace.createElement(ThemedSwitch, null, React__namespace.createElement(SwitchCore, _extends__default["default"]({}, props, {
288
292
  ref: ref
289
293
  })));
290
294
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-switch",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "design": "v1",
5
5
  "description": "Switch components for Wonder Blocks.",
6
6
  "main": "dist/index.js",
@@ -13,17 +13,17 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@babel/runtime": "^7.24.5",
16
- "@khanacademy/wonder-blocks-core": "12.1.0",
17
- "@khanacademy/wonder-blocks-icon": "5.1.0",
18
- "@khanacademy/wonder-blocks-theming": "3.1.0",
19
- "@khanacademy/wonder-blocks-tokens": "4.2.0"
16
+ "@khanacademy/wonder-blocks-core": "12.1.1",
17
+ "@khanacademy/wonder-blocks-icon": "5.1.1",
18
+ "@khanacademy/wonder-blocks-theming": "3.1.1",
19
+ "@khanacademy/wonder-blocks-tokens": "4.2.1"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "aphrodite": "^1.2.5",
23
23
  "react": "18.2.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@khanacademy/wb-dev-build-settings": "2.1.0"
26
+ "@khanacademy/wb-dev-build-settings": "2.1.1"
27
27
  },
28
28
  "scripts": {
29
29
  "test": "echo \"Error: no test specified\" && exit 1"