@primer/components 0.0.0-202182817223 → 0.0.0-2021828175320

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,12 +1,12 @@
1
1
  # @primer/components
2
2
 
3
- ## 0.0.0-202182817223
3
+ ## 0.0.0-2021828175320
4
4
 
5
5
  ### Major Changes
6
6
 
7
- - [#1448](https://github.com/primer/react/pull/1448) [`1a39fb02`](https://github.com/primer/react/commit/1a39fb0284c5e19324d378629d09a343be4cde05) Thanks [@SferaDev](https://github.com/SferaDev)! - Remove `.Breadcrumb` classname from the root element of the `Breadcrumbs` component. This change shouldn't break anything unless you have styles, scripts, or tests that reference the `.Breadcrumb` classname.
7
+ - [#1469](https://github.com/primer/react/pull/1469) [`ec1a8479`](https://github.com/primer/react/commit/ec1a8479272dcd78341b39e7a1fe8731388827a4) Thanks [@jfuchs](https://github.com/jfuchs)! - Breadcrumbs no longer accept styled props
8
8
 
9
- * [#1468](https://github.com/primer/react/pull/1468) [`b24296a0`](https://github.com/primer/react/commit/b24296a04159459e0873ed64c046fb0dae3b7c35) Thanks [@jfuchs](https://github.com/jfuchs)! - AvatarStack no longer accepts styled props
9
+ * [#1448](https://github.com/primer/react/pull/1448) [`1a39fb02`](https://github.com/primer/react/commit/1a39fb0284c5e19324d378629d09a343be4cde05) Thanks [@SferaDev](https://github.com/SferaDev)! - Remove `.Breadcrumb` classname from the root element of the `Breadcrumbs` component. This change shouldn't break anything unless you have styles, scripts, or tests that reference the `.Breadcrumb` classname.
10
10
 
11
11
  ### Patch Changes
12
12
 
@@ -714,8 +714,9 @@ Za=en,function(){var e={}.hasOwnProperty;function r(){for(var t=[],o=0;o<argumen
714
714
  }
715
715
  }
716
716
 
717
+ ${Nr}
717
718
  ${rt};
718
- `,on=({children:r,alignRight:t,sx:o})=>{const a=e.Children.count(r),n=rn({"pc-AvatarStack--two":2===a,"pc-AvatarStack--three-plus":a>2,"pc-AvatarStack--right":t});return e.createElement(tn,{count:a,className:n,sx:o},e.createElement(tt,{position:"absolute",display:"flex",width:"38px",className:"pc-AvatarStackBody"},(r=>e.Children.map(r,((r,t)=>e.isValidElement(r)?e.cloneElement(r,{className:rn(r.props.className,"pc-AvatarItem"),sx:{zIndex:10-t,...r.props.sx}}):r)))(r)))};on.displayName="AvatarStack";var an=on;var nn=s.a`
719
+ `,on=({children:r,alignRight:t,...o})=>{const a=e.Children.count(r),n=rn({"pc-AvatarStack--two":2===a,"pc-AvatarStack--three-plus":a>2,"pc-AvatarStack--right":t});return e.createElement(tn,Or({count:a,className:n},o),e.createElement(tt,{position:"absolute",display:"flex",width:"38px",className:"pc-AvatarStackBody"},(r=>e.Children.map(r,((r,t)=>e.isValidElement(r)?e.cloneElement(r,{className:rn(r.props.className,"pc-AvatarItem"),sx:{zIndex:10-t,...r.props.sx}}):r)))(r)))};on.displayName="AvatarStack";var an=on;var nn=s.a`
719
720
  display: inline-block;
720
721
  padding: 2px 6px;
721
722
  font-size: ${Cr("fontSizes.0")};
@@ -747,10 +748,8 @@ Za=en,function(){var e={}.hasOwnProperty;function r(){for(var t=[],o=0;o<argumen
747
748
  `,ln=s.nav`
748
749
  display: flex;
749
750
  justify-content: space-between;
750
- ${Nr};
751
- ${Hr};
752
751
  ${rt};
753
- `;function cn({className:r,children:t,theme:o,...a}){const n=e.Children.map(t,(r=>e.createElement(dn,{theme:o},r)));return e.createElement(ln,Or({className:r,"aria-label":"Breadcrumbs",theme:o},a),e.createElement(tt,{as:"ol",my:0,pl:0},n))}cn.displayName="Breadcrumbs";const sn=s.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:rn(e.selected&&"selected",e.className),"aria-current":e.selected?"page":null})))`
752
+ `;function cn({className:r,children:t,sx:o}){const a=e.Children.map(t,(r=>e.createElement(dn,null,r)));return e.createElement(ln,{className:r,"aria-label":"Breadcrumbs",sx:o},e.createElement(tt,{as:"ol",my:0,pl:0},a))}cn.displayName="Breadcrumbs";const sn=s.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:rn(e.selected&&"selected",e.className),"aria-current":e.selected?"page":null})))`
754
753
  color: ${Cr("colors.accent.fg")};
755
754
  display: inline-block;
756
755
  font-size: ${Cr("fontSizes.1")};
@@ -762,7 +761,6 @@ Za=en,function(){var e={}.hasOwnProperty;function r(){for(var t=[],o=0;o<argumen
762
761
  color: ${Cr("colors.fg.default")};
763
762
  pointer-events: none;
764
763
  }
765
- ${Nr}
766
764
  ${rt};
767
765
  `;cn.displayName="Breadcrumbs",sn.displayName="Breadcrumbs.Item";var fn=Object.assign(cn,{Item:sn});const gn=Object.assign(cn,{Item:sn}),bn={top:"Bottom",right:"Left",bottom:"Top",left:"Right"},pn={top:"Left",right:"Top",bottom:"Left",left:"Top"};function un(e,r,t){const o=bn[e].toLowerCase(),a=pn[e].toLowerCase();return{[o]:"100%",[r||a]:r?t:"50%"}}const mn=kr({prop:"bg",key:"colors"}),hn=kr({prop:"borderColor",key:"colors"}),xn=kr({prop:"borderWidth",key:"borderWidths",scale:[0,1]});function vn(r){var t;const o=e.useContext(p),a={...r,theme:null!==(t=r.theme)&&void 0!==t?t:o},{bg:n}=mn(a),{borderColor:i}=hn(a),{borderWidth:d}=xn(a),{size:l=8,location:c="bottom"}=r,[s,f]=function(e){const[r,t]=e.split("-");return[r,t]}(c),g=pn[s],b=[-l,0],u=[0,l],m=[l,0],h=`M${b}L${u}L${m}L${b}Z`,x=`M${b}L${u}L${m}`,v={top:`translate(${[l,2*l]}) rotate(180)`,right:`translate(${[0,l]}) rotate(-90)`,bottom:`translate(${[l,0]})`,left:`translate(${[2*l,l]}) rotate(90)`}[s];return e.createElement("svg",{width:2*l,height:2*l,style:{pointerEvents:"none",position:"absolute",...un(s,f,l),[`margin${g}`]:f?null:-l}},e.createElement("g",{transform:v},e.createElement("path",{d:h,fill:n}),e.createElement("path",{d:x,fill:"none",stroke:i,strokeWidth:d})))}vn.displayName="Caret",vn.locations=["top","top-left","top-right","right","right-top","right-bottom","bottom","bottom-left","bottom-right","left","left-top","left-bottom"],vn.defaultProps={bg:"bg.canvas",borderColor:"border.primary",borderWidth:1};const yn={small:56,medium:96,large:128},wn=s.div`
768
766
  display: ${e=>e.inline?"inline-flex":"flex"};