@khanacademy/wonder-blocks-switch 3.2.7 → 3.2.9

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,31 @@
1
1
  # @khanacademy/wonder-blocks-switch
2
2
 
3
+ ## 3.2.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 7abcccf: Replace call sites to use `core.background` instead of `action`.
8
+ - Updated dependencies [b1ee2b4]
9
+ - Updated dependencies [7abcccf]
10
+ - Updated dependencies [9bacc1a]
11
+ - Updated dependencies [9bacc1a]
12
+ - Updated dependencies [7abcccf]
13
+ - Updated dependencies [1c3c335]
14
+ - Updated dependencies [689f5d3]
15
+ - @khanacademy/wonder-blocks-tokens@10.4.0
16
+ - @khanacademy/wonder-blocks-styles@0.2.12
17
+
18
+ ## 3.2.8
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [dd76e7c]
23
+ - @khanacademy/wonder-blocks-tokens@10.3.0
24
+ - @khanacademy/wonder-blocks-core@12.3.0
25
+ - @khanacademy/wonder-blocks-icon@5.1.4
26
+ - @khanacademy/wonder-blocks-styles@0.2.11
27
+ - @khanacademy/wonder-blocks-theming@3.4.0
28
+
3
29
  ## 3.2.7
4
30
 
5
31
  ### Patch Changes
package/dist/es/index.js CHANGED
@@ -7,7 +7,7 @@ import { createThemeContext, ThemeSwitcherContext, useScopedTheme, useStyles } f
7
7
  import { focusStyles } from '@khanacademy/wonder-blocks-styles';
8
8
  import { semanticColor, color, border, spacing } from '@khanacademy/wonder-blocks-tokens';
9
9
 
10
- const action=semanticColor.action.secondary.progressive;const theme={color:{bg:{switch:{off:action.default.border,disabledOff:semanticColor.action.primary.disabled.background,activeOff:color.fadedOffBlack64,on:action.default.foreground,disabledOn:action.press.background,activeOn:action.press.foreground},slider:{on:semanticColor.icon.inverse,off:semanticColor.icon.inverse},icon:{on:action.default.foreground,disabledOn:action.press.background,off:action.default.border,disabledOff:semanticColor.icon.disabled}}},border:{radius:{small:border.radius.radius_120,full:border.radius.radius_full}},size:{height:{none:0,medium:20,large:spacing.large_24},width:{none:0,small:spacing.xxxxSmall_2,medium:20,large:40}},spacing:{slider:{position:spacing.xxxxSmall_2},icon:{position:spacing.xxxSmall_4},transform:{default:`translateX(${spacing.medium_16}px)`,transition:"transform 0.15s ease-in-out"}}};
10
+ const theme={color:{bg:{switch:{off:semanticColor.core.border.neutral.default,disabledOff:semanticColor.core.border.disabled.strong,activeOff:color.fadedOffBlack64,on:semanticColor.core.background.instructive.default,disabledOn:semanticColor.core.border.instructive.subtle,activeOn:semanticColor.core.background.instructive.strong},slider:{on:semanticColor.icon.inverse,off:semanticColor.icon.inverse},icon:{on:semanticColor.icon.action,disabledOn:semanticColor.core.border.instructive.subtle,off:semanticColor.core.border.neutral.default,disabledOff:semanticColor.icon.disabled}}},border:{radius:{small:border.radius.radius_120,full:border.radius.radius_full}},size:{height:{none:0,medium:20,large:spacing.large_24},width:{none:0,small:spacing.xxxxSmall_2,medium:20,large:40}},spacing:{slider:{position:spacing.xxxxSmall_2},icon:{position:spacing.xxxSmall_4},transform:{default:`translateX(${spacing.medium_16}px)`,transition:"transform 0.15s ease-in-out"}}};
11
11
 
12
12
  const themes={default:theme};const SwitchThemeContext=createThemeContext(theme);function ThemedSwitch(props){const currentTheme=React.useContext(ThemeSwitcherContext);const theme$1=themes[currentTheme]||theme;return jsx(SwitchThemeContext.Provider,{value:theme$1,children:props.children})}
13
13
 
package/dist/index.js CHANGED
@@ -28,7 +28,7 @@ function _interopNamespace(e) {
28
28
 
29
29
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
30
30
 
31
- const action=wonderBlocksTokens.semanticColor.action.secondary.progressive;const theme={color:{bg:{switch:{off:action.default.border,disabledOff:wonderBlocksTokens.semanticColor.action.primary.disabled.background,activeOff:wonderBlocksTokens.color.fadedOffBlack64,on:action.default.foreground,disabledOn:action.press.background,activeOn:action.press.foreground},slider:{on:wonderBlocksTokens.semanticColor.icon.inverse,off:wonderBlocksTokens.semanticColor.icon.inverse},icon:{on:action.default.foreground,disabledOn:action.press.background,off:action.default.border,disabledOff:wonderBlocksTokens.semanticColor.icon.disabled}}},border:{radius:{small:wonderBlocksTokens.border.radius.radius_120,full:wonderBlocksTokens.border.radius.radius_full}},size:{height:{none:0,medium:20,large:wonderBlocksTokens.spacing.large_24},width:{none:0,small:wonderBlocksTokens.spacing.xxxxSmall_2,medium:20,large:40}},spacing:{slider:{position:wonderBlocksTokens.spacing.xxxxSmall_2},icon:{position:wonderBlocksTokens.spacing.xxxSmall_4},transform:{default:`translateX(${wonderBlocksTokens.spacing.medium_16}px)`,transition:"transform 0.15s ease-in-out"}}};
31
+ const theme={color:{bg:{switch:{off:wonderBlocksTokens.semanticColor.core.border.neutral.default,disabledOff:wonderBlocksTokens.semanticColor.core.border.disabled.strong,activeOff:wonderBlocksTokens.color.fadedOffBlack64,on:wonderBlocksTokens.semanticColor.core.background.instructive.default,disabledOn:wonderBlocksTokens.semanticColor.core.border.instructive.subtle,activeOn:wonderBlocksTokens.semanticColor.core.background.instructive.strong},slider:{on:wonderBlocksTokens.semanticColor.icon.inverse,off:wonderBlocksTokens.semanticColor.icon.inverse},icon:{on:wonderBlocksTokens.semanticColor.icon.action,disabledOn:wonderBlocksTokens.semanticColor.core.border.instructive.subtle,off:wonderBlocksTokens.semanticColor.core.border.neutral.default,disabledOff:wonderBlocksTokens.semanticColor.icon.disabled}}},border:{radius:{small:wonderBlocksTokens.border.radius.radius_120,full:wonderBlocksTokens.border.radius.radius_full}},size:{height:{none:0,medium:20,large:wonderBlocksTokens.spacing.large_24},width:{none:0,small:wonderBlocksTokens.spacing.xxxxSmall_2,medium:20,large:40}},spacing:{slider:{position:wonderBlocksTokens.spacing.xxxxSmall_2},icon:{position:wonderBlocksTokens.spacing.xxxSmall_4},transform:{default:`translateX(${wonderBlocksTokens.spacing.medium_16}px)`,transition:"transform 0.15s ease-in-out"}}};
32
32
 
33
33
  const themes={default:theme};const SwitchThemeContext=wonderBlocksTheming.createThemeContext(theme);function ThemedSwitch(props){const currentTheme=React__namespace.useContext(wonderBlocksTheming.ThemeSwitcherContext);const theme$1=themes[currentTheme]||theme;return jsxRuntime.jsx(SwitchThemeContext.Provider,{value:theme$1,children:props.children})}
34
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-switch",
3
- "version": "3.2.7",
3
+ "version": "3.2.9",
4
4
  "design": "v1",
5
5
  "description": "Switch components for Wonder Blocks.",
6
6
  "main": "dist/index.js",
@@ -12,18 +12,18 @@
12
12
  "access": "public"
13
13
  },
14
14
  "dependencies": {
15
- "@khanacademy/wonder-blocks-icon": "5.1.4",
16
15
  "@khanacademy/wonder-blocks-core": "12.3.0",
17
- "@khanacademy/wonder-blocks-styles": "0.2.10",
16
+ "@khanacademy/wonder-blocks-icon": "5.1.4",
17
+ "@khanacademy/wonder-blocks-styles": "0.2.12",
18
18
  "@khanacademy/wonder-blocks-theming": "3.4.0",
19
- "@khanacademy/wonder-blocks-tokens": "10.2.1"
19
+ "@khanacademy/wonder-blocks-tokens": "10.4.0"
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": "3.1.0"
26
+ "@khanacademy/wb-dev-build-settings": "3.2.0"
27
27
  },
28
28
  "scripts": {
29
29
  "test": "echo \"Error: no test specified\" && exit 1"