@primer/components 0.0.0-202110118812 → 0.0.0-2021101224154

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,6 @@
1
1
  # @primer/components
2
2
 
3
- ## 0.0.0-202110118812
4
-
5
- ### Major Changes
6
-
7
- - [#1469](https://github.com/primer/react/pull/1469) [`76aa0739`](https://github.com/primer/react/commit/76aa07395e3ad06665dd374c1fc8c78525bfb88a) Thanks [@jfuchs](https://github.com/jfuchs)! - Breadcrumbs no longer accept styled props
3
+ ## 0.0.0-2021101224154
8
4
 
9
5
  ### Minor Changes
10
6
 
@@ -14,6 +10,8 @@
14
10
 
15
11
  - Fake entry to force publishing
16
12
 
13
+ * [#1549](https://github.com/primer/react/pull/1549) [`f565840f`](https://github.com/primer/react/commit/f565840f2d879b987ef9df7cd046e146214ed5f5) Thanks [@michael-lefebvre](https://github.com/michael-lefebvre)! - Fix `auxiliaryText` in ActionList Group header
14
+
17
15
  ## 31.1.0
18
16
 
19
17
  ### Minor Changes
@@ -400,7 +400,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
400
400
  ${({variant:e})=>"filled"===e&&p(["background:",";margin:"," 0;border-top:1px solid ",";border-bottom:1px solid ",";&:first-child{margin-top:0;}"],Nt("colors.canvas.subtle"),Nt("space.2"),Nt("colors.neutral.muted"),Nt("colors.neutral.muted"))}
401
401
 
402
402
  ${rr}
403
- `;function va({variant:t="subtle",title:r,auxiliaryText:o,children:a,...n}){return e.createElement(ha,Pt({role:"heading",variant:t},n),r,o&&e.createElement("span",null,"auxiliaryText"))}va.displayName="Header";const xa=f.div`
403
+ `;function va({variant:t="subtle",title:r,auxiliaryText:o,children:a,...n}){return e.createElement(ha,Pt({role:"heading",variant:t},n),r,o&&e.createElement("span",null,o))}va.displayName="Header";const xa=f.div`
404
404
  ${rr}
405
405
  `;function ya({header:t,items:r,...o}){return e.createElement(xa,o,t&&e.createElement(va,t),r)}ya.displayName="Group";const wa=f.div`
406
406
  ${At}
@@ -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"};