@khanacademy/wonder-blocks-breadcrumbs 3.2.15 → 3.2.17

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,29 @@
1
1
  # @khanacademy/wonder-blocks-breadcrumbs
2
2
 
3
+ ## 3.2.17
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [245229a]
8
+ - @khanacademy/wonder-blocks-tokens@16.4.1
9
+
10
+ ## 3.2.16
11
+
12
+ ### Patch Changes
13
+
14
+ - 0fadf9f: Migrate internal usage of the deprecated `spacing` primitive token to the
15
+ `sizing` token. No public API or visual changes — each `spacing.<name>`
16
+ value maps 1:1 to a `sizing.size_<n>` token with the same rendered value.
17
+ A handful of internal `Strut` usages are replaced with CSS `gap` /
18
+ `margin` (since `sizing.X` is a CSS variable string at runtime, not a
19
+ number). Layout-spec and SVG sites that genuinely need JS numbers use
20
+ hardcoded values that mirror the matching `sizing.size_*` tokens (with
21
+ comments). Prep for removal of the `spacing` export in a future major
22
+ release of `@khanacademy/wonder-blocks-tokens`.
23
+ - Updated dependencies [c1c74df]
24
+ - Updated dependencies [72c5272]
25
+ - @khanacademy/wonder-blocks-tokens@16.4.0
26
+
3
27
  ## 3.2.15
4
28
 
5
29
  ### Patch Changes
package/dist/es/index.js CHANGED
@@ -2,10 +2,10 @@ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import { StyleSheet } from 'aphrodite';
4
4
  import { addStyle } from '@khanacademy/wonder-blocks-core';
5
- import { spacing, font } from '@khanacademy/wonder-blocks-tokens';
5
+ import { sizing, font } from '@khanacademy/wonder-blocks-tokens';
6
6
 
7
7
  const StyledOl=addStyle("ol");const Breadcrumbs=React.forwardRef(function Breadcrumbs(props,ref){const{"aria-label":ariaLabel="Breadcrumbs",children,testId,...otherProps}=props;const lastChildIndex=React.Children.count(children)-1;return jsx("nav",{...otherProps,"aria-label":ariaLabel,"data-testid":testId,ref:ref,children:jsx(StyledOl,{style:styles$1.container,children:React.Children.map(children,(item,index)=>{const isLastChild=index===lastChildIndex;return React.cloneElement(item,{...item.props,showSeparator:!isLastChild,["aria-current"]:isLastChild?"page":undefined})})})})});const styles$1=StyleSheet.create({container:{display:"flex",listStyle:"none",margin:0,padding:0,overflow:"hidden"}});
8
8
 
9
- const StyledLi=addStyle("li");const StyledSvg=addStyle("svg");const BreadcrumbsItem=React.forwardRef(function BreadcrumbsItem(props,ref){const{children,showSeparator,testId,...otherProps}=props;const _renderSeparator=()=>{return jsx(StyledSvg,{style:styles.separator,width:16,height:16,viewBox:"0 0 16 16","aria-hidden":true,children:jsx("circle",{cx:"8",cy:"9",r:"1.5"})})};return jsxs(StyledLi,{...otherProps,style:styles.item,"data-testid":testId,ref:ref,children:[children,showSeparator&&_renderSeparator()]})});const styles=StyleSheet.create({item:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:spacing.xxxSmall_4,lineHeight:"inherit",fontFamily:font.family.sans},separator:{marginLeft:spacing.xxxSmall_4}});
9
+ const StyledLi=addStyle("li");const StyledSvg=addStyle("svg");const BreadcrumbsItem=React.forwardRef(function BreadcrumbsItem(props,ref){const{children,showSeparator,testId,...otherProps}=props;const _renderSeparator=()=>{return jsx(StyledSvg,{style:styles.separator,width:16,height:16,viewBox:"0 0 16 16","aria-hidden":true,children:jsx("circle",{cx:"8",cy:"9",r:"1.5"})})};return jsxs(StyledLi,{...otherProps,style:styles.item,"data-testid":testId,ref:ref,children:[children,showSeparator&&_renderSeparator()]})});const styles=StyleSheet.create({item:{display:"flex",alignItems:"center",justifyContent:"center",marginInlineEnd:sizing.size_040,lineHeight:"inherit",fontFamily:font.family.sans},separator:{marginInlineStart:sizing.size_040}});
10
10
 
11
11
  export { Breadcrumbs, BreadcrumbsItem };
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
30
30
 
31
31
  const StyledOl=wonderBlocksCore.addStyle("ol");const Breadcrumbs=React__namespace.forwardRef(function Breadcrumbs(props,ref){const{"aria-label":ariaLabel="Breadcrumbs",children,testId,...otherProps}=props;const lastChildIndex=React__namespace.Children.count(children)-1;return jsxRuntime.jsx("nav",{...otherProps,"aria-label":ariaLabel,"data-testid":testId,ref:ref,children:jsxRuntime.jsx(StyledOl,{style:styles$1.container,children:React__namespace.Children.map(children,(item,index)=>{const isLastChild=index===lastChildIndex;return React__namespace.cloneElement(item,{...item.props,showSeparator:!isLastChild,["aria-current"]:isLastChild?"page":undefined})})})})});const styles$1=aphrodite.StyleSheet.create({container:{display:"flex",listStyle:"none",margin:0,padding:0,overflow:"hidden"}});
32
32
 
33
- const StyledLi=wonderBlocksCore.addStyle("li");const StyledSvg=wonderBlocksCore.addStyle("svg");const BreadcrumbsItem=React__namespace.forwardRef(function BreadcrumbsItem(props,ref){const{children,showSeparator,testId,...otherProps}=props;const _renderSeparator=()=>{return jsxRuntime.jsx(StyledSvg,{style:styles.separator,width:16,height:16,viewBox:"0 0 16 16","aria-hidden":true,children:jsxRuntime.jsx("circle",{cx:"8",cy:"9",r:"1.5"})})};return jsxRuntime.jsxs(StyledLi,{...otherProps,style:styles.item,"data-testid":testId,ref:ref,children:[children,showSeparator&&_renderSeparator()]})});const styles=aphrodite.StyleSheet.create({item:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:wonderBlocksTokens.spacing.xxxSmall_4,lineHeight:"inherit",fontFamily:wonderBlocksTokens.font.family.sans},separator:{marginLeft:wonderBlocksTokens.spacing.xxxSmall_4}});
33
+ const StyledLi=wonderBlocksCore.addStyle("li");const StyledSvg=wonderBlocksCore.addStyle("svg");const BreadcrumbsItem=React__namespace.forwardRef(function BreadcrumbsItem(props,ref){const{children,showSeparator,testId,...otherProps}=props;const _renderSeparator=()=>{return jsxRuntime.jsx(StyledSvg,{style:styles.separator,width:16,height:16,viewBox:"0 0 16 16","aria-hidden":true,children:jsxRuntime.jsx("circle",{cx:"8",cy:"9",r:"1.5"})})};return jsxRuntime.jsxs(StyledLi,{...otherProps,style:styles.item,"data-testid":testId,ref:ref,children:[children,showSeparator&&_renderSeparator()]})});const styles=aphrodite.StyleSheet.create({item:{display:"flex",alignItems:"center",justifyContent:"center",marginInlineEnd:wonderBlocksTokens.sizing.size_040,lineHeight:"inherit",fontFamily:wonderBlocksTokens.font.family.sans},separator:{marginInlineStart:wonderBlocksTokens.sizing.size_040}});
34
34
 
35
35
  exports.Breadcrumbs = Breadcrumbs;
36
36
  exports.BreadcrumbsItem = BreadcrumbsItem;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "3.2.15",
6
+ "version": "3.2.17",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -21,7 +21,7 @@
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.3.0"
24
+ "@khanacademy/wonder-blocks-tokens": "16.4.1"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "aphrodite": "^1.2.5",