@primer/components 0.0.0-202110322537 → 0.0.0-2021103231920

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,10 +1,10 @@
1
1
  # @primer/components
2
2
 
3
- ## 0.0.0-202110322537
3
+ ## 0.0.0-2021103231920
4
4
 
5
5
  ### Major Changes
6
6
 
7
- - [#1469](https://github.com/primer/react/pull/1469) [`e1e1e7f7`](https://github.com/primer/react/commit/e1e1e7f7536d6ccd761d9a74f50116cf6c14ad3e) Thanks [@jfuchs](https://github.com/jfuchs)! - Breadcrumbs no longer accepts styled-system props. Please use the `sx` prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information about `sx` and https://primer.style/react/system-props for context on the removal.
7
+ - [#1566](https://github.com/primer/react/pull/1566) [`11526537`](https://github.com/primer/react/commit/11526537ad579dcd4317bf8ced739defec6b066e) Thanks [@jfuchs](https://github.com/jfuchs)! - Link no longer accepts styled-system props. Please use the `sx` prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information about `sx` and https://primer.style/react/system-props for context on the removal.
8
8
 
9
9
  ### Minor Changes
10
10
 
@@ -810,8 +810,10 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
810
810
  `,Sn=f.nav`
811
811
  display: flex;
812
812
  justify-content: space-between;
813
+ ${It};
814
+ ${Mt};
813
815
  ${rr};
814
- `;function En({className:t,children:r,sx:o}){const a=e.Children.map(r,(t=>e.createElement(Tn,null,t)));return e.createElement(Sn,{className:t,"aria-label":"Breadcrumbs",sx:o},e.createElement(or,{as:"ol",my:0,pl:0},a))}En.displayName="Breadcrumbs";const Cn=f.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:en(e.selected&&"selected",e.className),"aria-current":e.selected?"page":null})))`
816
+ `;function En({className:t,children:r,theme:o,...a}){const n=e.Children.map(r,(t=>e.createElement(Tn,{theme:o},t)));return e.createElement(Sn,Pt({className:t,"aria-label":"Breadcrumbs",theme:o},a),e.createElement(or,{as:"ol",my:0,pl:0},n))}En.displayName="Breadcrumbs";const Cn=f.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:en(e.selected&&"selected",e.className),"aria-current":e.selected?"page":null})))`
815
817
  color: ${Nt("colors.accent.fg")};
816
818
  display: inline-block;
817
819
  font-size: ${Nt("fontSizes.1")};
@@ -823,6 +825,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
823
825
  color: ${Nt("colors.fg.default")};
824
826
  pointer-events: none;
825
827
  }
828
+ ${It}
826
829
  ${rr};
827
830
  `;En.displayName="Breadcrumbs",Cn.displayName="Breadcrumbs.Item";var zn=Object.assign(En,{Item:Cn});const Nn=Object.assign(En,{Item:Cn}),In={top:"Bottom",right:"Left",bottom:"Top",left:"Right"},An={top:"Left",right:"Top",bottom:"Left",left:"Top"};function Rn(e,t,r){const o=In[e].toLowerCase(),a=An[e].toLowerCase();return{[o]:"100%",[t||a]:t?r:"50%"}}const Ln=Tt({prop:"bg",key:"colors"}),On=Tt({prop:"borderColor",key:"colors"}),Mn=Tt({prop:"borderWidth",key:"borderWidths",scale:[0,1]});function Pn(t){var r;const o=e.useContext(b),a={...t,theme:null!==(r=t.theme)&&void 0!==r?r:o},{bg:n}=Ln(a),{borderColor:i}=On(a),{borderWidth:l}=Mn(a),{size:d=8,location:s="bottom"}=t,[c,f]=function(e){const[t,r]=e.split("-");return[t,r]}(s),g=An[c],u=[-d,0],p=[0,d],m=[d,0],h=`M${u}L${p}L${m}L${u}Z`,v=`M${u}L${p}L${m}`,x={top:`translate(${[d,2*d]}) rotate(180)`,right:`translate(${[0,d]}) rotate(-90)`,bottom:`translate(${[d,0]})`,left:`translate(${[2*d,d]}) rotate(90)`}[c];return e.createElement("svg",{width:2*d,height:2*d,style:{pointerEvents:"none",position:"absolute",...Rn(c,f,d),[`margin${g}`]:f?null:-d}},e.createElement("g",{transform:x},e.createElement("path",{d:h,fill:n}),e.createElement("path",{d:v,fill:"none",stroke:i,strokeWidth:l})))}Pn.displayName="Caret",Pn.locations=["top","top-left","top-right","right","right-top","right-bottom","bottom","bottom-left","bottom-right","left","left-top","left-bottom"],Pn.defaultProps={bg:"canvas.default",borderColor:"border.default",borderWidth:1};const Hn={small:56,medium:96,large:128},Dn=f.div`
828
831
  display: ${e=>e.inline?"inline-flex":"flex"};
@@ -1185,8 +1188,6 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
1185
1188
  border: 0;
1186
1189
  appearance: none;
1187
1190
  }
1188
- ${At};
1189
- ${It};
1190
1191
  ${rr};
1191
1192
  `;var Pi=f.div`
1192
1193
  position: relative;