@primer/components 0.0.0-20218276039 → 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.
@@ -748,10 +748,8 @@
748
748
  `,on=d.default.nav`
749
749
  display: flex;
750
750
  justify-content: space-between;
751
- ${yt};
752
- ${St};
753
751
  ${Xt};
754
- `;function an({className:e,children:t,theme:r,...o}){const a=n.default.Children.map(t,(e=>n.default.createElement(rn,{theme:r},e)));return n.default.createElement(on,Tt({className:e,"aria-label":"Breadcrumbs",theme:r},o),n.default.createElement(Vt,{as:"ol",my:0,pl:0},a))}an.displayName="Breadcrumbs";const nn=d.default.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:Ja(e.selected&&"selected",e.className),"aria-current":e.selected?"page":null})))`
752
+ `;function an({className:e,children:t,sx:r}){const o=n.default.Children.map(t,(e=>n.default.createElement(rn,null,e)));return n.default.createElement(on,{className:e,"aria-label":"Breadcrumbs",sx:r},n.default.createElement(Vt,{as:"ol",my:0,pl:0},o))}an.displayName="Breadcrumbs";const nn=d.default.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:Ja(e.selected&&"selected",e.className),"aria-current":e.selected?"page":null})))`
755
753
  color: ${vt("colors.accent.fg")};
756
754
  display: inline-block;
757
755
  font-size: ${vt("fontSizes.1")};
@@ -763,7 +761,6 @@
763
761
  color: ${vt("colors.fg.default")};
764
762
  pointer-events: none;
765
763
  }
766
- ${yt}
767
764
  ${Xt};
768
765
  `;an.displayName="Breadcrumbs",nn.displayName="Breadcrumbs.Item";var dn=Object.assign(an,{Item:nn});const ln=Object.assign(an,{Item:nn}),cn={top:"Bottom",right:"Left",bottom:"Top",left:"Right"},sn={top:"Left",right:"Top",bottom:"Left",left:"Top"};function fn(e,t,r){const o=cn[e].toLowerCase(),a=sn[e].toLowerCase();return{[o]:"100%",[t||a]:t?r:"50%"}}const bn=ut({prop:"bg",key:"colors"}),gn=ut({prop:"borderColor",key:"colors"}),un=ut({prop:"borderWidth",key:"borderWidths",scale:[0,1]});function pn(e){var t;const o=n.default.useContext(r.ThemeContext),a={...e,theme:null!==(t=e.theme)&&void 0!==t?t:o},{bg:d}=bn(a),{borderColor:i}=gn(a),{borderWidth:l}=un(a),{size:c=8,location:s="bottom"}=e,[f,b]=function(e){const[t,r]=e.split("-");return[t,r]}(s),g=sn[f],u=[-c,0],p=[0,c],m=[c,0],h=`M${u}L${p}L${m}L${u}Z`,x=`M${u}L${p}L${m}`,v={top:`translate(${[c,2*c]}) rotate(180)`,right:`translate(${[0,c]}) rotate(-90)`,bottom:`translate(${[c,0]})`,left:`translate(${[2*c,c]}) rotate(90)`}[f];return n.default.createElement("svg",{width:2*c,height:2*c,style:{pointerEvents:"none",position:"absolute",...fn(f,b,c),[`margin${g}`]:b?null:-c}},n.default.createElement("g",{transform:v},n.default.createElement("path",{d:h,fill:d}),n.default.createElement("path",{d:x,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:"bg.canvas",borderColor:"border.primary",borderWidth:1};const mn={small:56,medium:96,large:128},hn=d.default.div`
769
766
  display: ${e=>e.inline?"inline-flex":"flex"};