@khanacademy/wonder-blocks-toolbar 5.1.49 → 5.1.51
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 +26 -0
- package/dist/es/index.js +2 -2
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-toolbar
|
|
2
2
|
|
|
3
|
+
## 5.1.51
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0fadf9f: Migrate internal usage of the deprecated `spacing` primitive token to the
|
|
8
|
+
`sizing` token. No public API or visual changes — each `spacing.<name>`
|
|
9
|
+
value maps 1:1 to a `sizing.size_<n>` token with the same rendered value.
|
|
10
|
+
A handful of internal `Strut` usages are replaced with CSS `gap` /
|
|
11
|
+
`margin` (since `sizing.X` is a CSS variable string at runtime, not a
|
|
12
|
+
number). Layout-spec and SVG sites that genuinely need JS numbers use
|
|
13
|
+
hardcoded values that mirror the matching `sizing.size_*` tokens (with
|
|
14
|
+
comments). Prep for removal of the `spacing` export in a future major
|
|
15
|
+
release of `@khanacademy/wonder-blocks-tokens`.
|
|
16
|
+
- Updated dependencies [c1c74df]
|
|
17
|
+
- Updated dependencies [72c5272]
|
|
18
|
+
- @khanacademy/wonder-blocks-tokens@16.4.0
|
|
19
|
+
- @khanacademy/wonder-blocks-typography@4.3.2
|
|
20
|
+
|
|
21
|
+
## 5.1.50
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [40f217b]
|
|
26
|
+
- @khanacademy/wonder-blocks-tokens@16.3.0
|
|
27
|
+
- @khanacademy/wonder-blocks-typography@4.3.1
|
|
28
|
+
|
|
3
29
|
## 5.1.49
|
|
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,
|
|
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:
|
|
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.
|
|
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.
|
|
6
|
+
"version": "5.1.51",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"types": "dist/index.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@khanacademy/wonder-blocks-core": "12.4.3",
|
|
24
|
-
"@khanacademy/wonder-blocks-tokens": "16.
|
|
25
|
-
"@khanacademy/wonder-blocks-typography": "4.3.
|
|
24
|
+
"@khanacademy/wonder-blocks-tokens": "16.4.0",
|
|
25
|
+
"@khanacademy/wonder-blocks-typography": "4.3.2"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"aphrodite": "^1.2.5",
|