@khanacademy/wonder-blocks-toolbar 5.1.50 → 5.1.52

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-toolbar
2
2
 
3
+ ## 5.1.52
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [245229a]
8
+ - @khanacademy/wonder-blocks-tokens@16.4.1
9
+ - @khanacademy/wonder-blocks-typography@4.3.3
10
+
11
+ ## 5.1.51
12
+
13
+ ### Patch Changes
14
+
15
+ - 0fadf9f: Migrate internal usage of the deprecated `spacing` primitive token to the
16
+ `sizing` token. No public API or visual changes — each `spacing.<name>`
17
+ value maps 1:1 to a `sizing.size_<n>` token with the same rendered value.
18
+ A handful of internal `Strut` usages are replaced with CSS `gap` /
19
+ `margin` (since `sizing.X` is a CSS variable string at runtime, not a
20
+ number). Layout-spec and SVG sites that genuinely need JS numbers use
21
+ hardcoded values that mirror the matching `sizing.size_*` tokens (with
22
+ comments). Prep for removal of the `spacing` export in a future major
23
+ release of `@khanacademy/wonder-blocks-tokens`.
24
+ - Updated dependencies [c1c74df]
25
+ - Updated dependencies [72c5272]
26
+ - @khanacademy/wonder-blocks-tokens@16.4.0
27
+ - @khanacademy/wonder-blocks-typography@4.3.2
28
+
3
29
  ## 5.1.50
4
30
 
5
31
  ### Patch Changes
package/dist/es/index.js CHANGED
@@ -2,9 +2,9 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import 'react';
3
3
  import { StyleSheet } from 'aphrodite';
4
4
  import { View } from '@khanacademy/wonder-blocks-core';
5
- import { semanticColor, spacing, color } from '@khanacademy/wonder-blocks-tokens';
5
+ import { semanticColor, sizing, color } from '@khanacademy/wonder-blocks-tokens';
6
6
  import { BodyText, Heading } from '@khanacademy/wonder-blocks-typography';
7
7
 
8
- function Toolbar({color="light",leftContent,rightContent,size="medium",subtitle,title}){return jsxs(View,{style:[sharedStyles.container,!title?sharedStyles.containerWithNoTitle:typeof title==="string"?sharedStyles.containerWithTextTitle:sharedStyles.containerWithNodeTitle,color==="dark"&&sharedStyles.dark,size==="small"&&sharedStyles.small],children:[jsx(View,{style:sharedStyles.leftColumn,children:leftContent}),title&&typeof title==="string"&&jsxs(View,{style:sharedStyles.titles,children:[subtitle?jsx(BodyText,{weight:"bold",tag:"span",id:"wb-toolbar-title",children:title}):jsx(Heading,{size:"medium",id:"wb-toolbar-title",children:title}),subtitle&&jsx(BodyText,{size:"small",tag:"span",style:color==="light"&&sharedStyles.subtitle,children:subtitle})]}),title&&typeof title!=="string"&&jsx(View,{style:sharedStyles.titles,children:title}),!title&&jsx(View,{style:leftContent?sharedStyles.spacer:undefined}),jsx(View,{style:sharedStyles.rightColumn,children:rightContent})]})}const sharedStyles=StyleSheet.create({container:{background:semanticColor.core.background.base.default,border:`1px solid ${semanticColor.core.border.neutral.subtle}`,flex:1,display:"grid",alignItems:"center",minHeight:66,paddingInline:spacing.medium_16,width:"100%"},containerWithTextTitle:{gridTemplateColumns:"1fr minmax(auto, 67%) 1fr"},containerWithNodeTitle:{gridTemplateColumns:"minmax(max-content, 1fr) auto minmax(max-content, 1fr)"},containerWithNoTitle:{gridTemplateColumns:"auto auto 1fr"},small:{minHeight:50},dark:{background:color.darkBlue,boxShadow:`0 1px 0 0 ${color.white64}`,color:semanticColor.core.foreground.knockout.default},leftColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},rightColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-end",flexGrow:1},subtitle:{color:semanticColor.core.foreground.neutral.default},titles:{padding:spacing.small_12,textAlign:"center",justifySelf:"center",maxWidth:"100%"},spacer:{minWidth:spacing.small_12}});
8
+ function Toolbar({color="light",leftContent,rightContent,size="medium",subtitle,title}){return jsxs(View,{style:[sharedStyles.container,!title?sharedStyles.containerWithNoTitle:typeof title==="string"?sharedStyles.containerWithTextTitle:sharedStyles.containerWithNodeTitle,color==="dark"&&sharedStyles.dark,size==="small"&&sharedStyles.small],children:[jsx(View,{style:sharedStyles.leftColumn,children:leftContent}),title&&typeof title==="string"&&jsxs(View,{style:sharedStyles.titles,children:[subtitle?jsx(BodyText,{weight:"bold",tag:"span",id:"wb-toolbar-title",children:title}):jsx(Heading,{size:"medium",id:"wb-toolbar-title",children:title}),subtitle&&jsx(BodyText,{size:"small",tag:"span",style:color==="light"&&sharedStyles.subtitle,children:subtitle})]}),title&&typeof title!=="string"&&jsx(View,{style:sharedStyles.titles,children:title}),!title&&jsx(View,{style:leftContent?sharedStyles.spacer:undefined}),jsx(View,{style:sharedStyles.rightColumn,children:rightContent})]})}const sharedStyles=StyleSheet.create({container:{background:semanticColor.core.background.base.default,border:`1px solid ${semanticColor.core.border.neutral.subtle}`,flex:1,display:"grid",alignItems:"center",minHeight:66,paddingInline:sizing.size_160,width:"100%"},containerWithTextTitle:{gridTemplateColumns:"1fr minmax(auto, 67%) 1fr"},containerWithNodeTitle:{gridTemplateColumns:"minmax(max-content, 1fr) auto minmax(max-content, 1fr)"},containerWithNoTitle:{gridTemplateColumns:"auto auto 1fr"},small:{minHeight:50},dark:{background:color.darkBlue,boxShadow:`0 1px 0 0 ${color.white64}`,color:semanticColor.core.foreground.knockout.default},leftColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},rightColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-end",flexGrow:1},subtitle:{color:semanticColor.core.foreground.neutral.default},titles:{padding:sizing.size_120,textAlign:"center",justifySelf:"center",maxWidth:"100%"},spacer:{minInlineSize:sizing.size_120}});
9
9
 
10
10
  export { Toolbar as default };
package/dist/index.js CHANGED
@@ -7,6 +7,6 @@ var wonderBlocksCore = require('@khanacademy/wonder-blocks-core');
7
7
  var wonderBlocksTokens = require('@khanacademy/wonder-blocks-tokens');
8
8
  var wonderBlocksTypography = require('@khanacademy/wonder-blocks-typography');
9
9
 
10
- function Toolbar({color="light",leftContent,rightContent,size="medium",subtitle,title}){return jsxRuntime.jsxs(wonderBlocksCore.View,{style:[sharedStyles.container,!title?sharedStyles.containerWithNoTitle:typeof title==="string"?sharedStyles.containerWithTextTitle:sharedStyles.containerWithNodeTitle,color==="dark"&&sharedStyles.dark,size==="small"&&sharedStyles.small],children:[jsxRuntime.jsx(wonderBlocksCore.View,{style:sharedStyles.leftColumn,children:leftContent}),title&&typeof title==="string"&&jsxRuntime.jsxs(wonderBlocksCore.View,{style:sharedStyles.titles,children:[subtitle?jsxRuntime.jsx(wonderBlocksTypography.BodyText,{weight:"bold",tag:"span",id:"wb-toolbar-title",children:title}):jsxRuntime.jsx(wonderBlocksTypography.Heading,{size:"medium",id:"wb-toolbar-title",children:title}),subtitle&&jsxRuntime.jsx(wonderBlocksTypography.BodyText,{size:"small",tag:"span",style:color==="light"&&sharedStyles.subtitle,children:subtitle})]}),title&&typeof title!=="string"&&jsxRuntime.jsx(wonderBlocksCore.View,{style:sharedStyles.titles,children:title}),!title&&jsxRuntime.jsx(wonderBlocksCore.View,{style:leftContent?sharedStyles.spacer:undefined}),jsxRuntime.jsx(wonderBlocksCore.View,{style:sharedStyles.rightColumn,children:rightContent})]})}const sharedStyles=aphrodite.StyleSheet.create({container:{background:wonderBlocksTokens.semanticColor.core.background.base.default,border:`1px solid ${wonderBlocksTokens.semanticColor.core.border.neutral.subtle}`,flex:1,display:"grid",alignItems:"center",minHeight:66,paddingInline:wonderBlocksTokens.spacing.medium_16,width:"100%"},containerWithTextTitle:{gridTemplateColumns:"1fr minmax(auto, 67%) 1fr"},containerWithNodeTitle:{gridTemplateColumns:"minmax(max-content, 1fr) auto minmax(max-content, 1fr)"},containerWithNoTitle:{gridTemplateColumns:"auto auto 1fr"},small:{minHeight:50},dark:{background:wonderBlocksTokens.color.darkBlue,boxShadow:`0 1px 0 0 ${wonderBlocksTokens.color.white64}`,color:wonderBlocksTokens.semanticColor.core.foreground.knockout.default},leftColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},rightColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-end",flexGrow:1},subtitle:{color:wonderBlocksTokens.semanticColor.core.foreground.neutral.default},titles:{padding:wonderBlocksTokens.spacing.small_12,textAlign:"center",justifySelf:"center",maxWidth:"100%"},spacer:{minWidth:wonderBlocksTokens.spacing.small_12}});
10
+ function Toolbar({color="light",leftContent,rightContent,size="medium",subtitle,title}){return jsxRuntime.jsxs(wonderBlocksCore.View,{style:[sharedStyles.container,!title?sharedStyles.containerWithNoTitle:typeof title==="string"?sharedStyles.containerWithTextTitle:sharedStyles.containerWithNodeTitle,color==="dark"&&sharedStyles.dark,size==="small"&&sharedStyles.small],children:[jsxRuntime.jsx(wonderBlocksCore.View,{style:sharedStyles.leftColumn,children:leftContent}),title&&typeof title==="string"&&jsxRuntime.jsxs(wonderBlocksCore.View,{style:sharedStyles.titles,children:[subtitle?jsxRuntime.jsx(wonderBlocksTypography.BodyText,{weight:"bold",tag:"span",id:"wb-toolbar-title",children:title}):jsxRuntime.jsx(wonderBlocksTypography.Heading,{size:"medium",id:"wb-toolbar-title",children:title}),subtitle&&jsxRuntime.jsx(wonderBlocksTypography.BodyText,{size:"small",tag:"span",style:color==="light"&&sharedStyles.subtitle,children:subtitle})]}),title&&typeof title!=="string"&&jsxRuntime.jsx(wonderBlocksCore.View,{style:sharedStyles.titles,children:title}),!title&&jsxRuntime.jsx(wonderBlocksCore.View,{style:leftContent?sharedStyles.spacer:undefined}),jsxRuntime.jsx(wonderBlocksCore.View,{style:sharedStyles.rightColumn,children:rightContent})]})}const sharedStyles=aphrodite.StyleSheet.create({container:{background:wonderBlocksTokens.semanticColor.core.background.base.default,border:`1px solid ${wonderBlocksTokens.semanticColor.core.border.neutral.subtle}`,flex:1,display:"grid",alignItems:"center",minHeight:66,paddingInline:wonderBlocksTokens.sizing.size_160,width:"100%"},containerWithTextTitle:{gridTemplateColumns:"1fr minmax(auto, 67%) 1fr"},containerWithNodeTitle:{gridTemplateColumns:"minmax(max-content, 1fr) auto minmax(max-content, 1fr)"},containerWithNoTitle:{gridTemplateColumns:"auto auto 1fr"},small:{minHeight:50},dark:{background:wonderBlocksTokens.color.darkBlue,boxShadow:`0 1px 0 0 ${wonderBlocksTokens.color.white64}`,color:wonderBlocksTokens.semanticColor.core.foreground.knockout.default},leftColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},rightColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-end",flexGrow:1},subtitle:{color:wonderBlocksTokens.semanticColor.core.foreground.neutral.default},titles:{padding:wonderBlocksTokens.sizing.size_120,textAlign:"center",justifySelf:"center",maxWidth:"100%"},spacer:{minInlineSize:wonderBlocksTokens.sizing.size_120}});
11
11
 
12
12
  module.exports = Toolbar;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "5.1.50",
6
+ "version": "5.1.52",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -20,9 +20,9 @@
20
20
  "module": "dist/es/index.js",
21
21
  "types": "dist/index.d.ts",
22
22
  "dependencies": {
23
- "@khanacademy/wonder-blocks-tokens": "16.3.0",
24
- "@khanacademy/wonder-blocks-typography": "4.3.1",
25
- "@khanacademy/wonder-blocks-core": "12.4.3"
23
+ "@khanacademy/wonder-blocks-core": "12.4.3",
24
+ "@khanacademy/wonder-blocks-tokens": "16.4.1",
25
+ "@khanacademy/wonder-blocks-typography": "4.3.3"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "aphrodite": "^1.2.5",