@primer/components 0.0.0-2021103211630 → 0.0.0-2021103213523

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-2021103211630
3
+ ## 0.0.0-2021103213523
4
4
 
5
5
  ### Major Changes
6
6
 
7
- - [#1569](https://github.com/primer/react/pull/1569) [`dc113234`](https://github.com/primer/react/commit/dc113234038b94ba635f0055b19b1cac4d29e17b) Thanks [@jfuchs](https://github.com/jfuchs)! - Pagination 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
+ - [#1570](https://github.com/primer/react/pull/1570) [`a4467d30`](https://github.com/primer/react/commit/a4467d30d700c8a0a113aa4987b054f7c29bd7eb) Thanks [@jfuchs](https://github.com/jfuchs)! - Popover 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
 
@@ -1297,6 +1297,8 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
1297
1297
  );
1298
1298
  }
1299
1299
  }
1300
+
1301
+ ${It};
1300
1302
  `;function Di({theme:t,pageCount:r,currentPage:o,onPageChange:a,hrefBuilder:n,marginPageCount:i,showPages:l,surroundingPageCount:d}){const s=e.useCallback((e=>t=>a(t,e)),[a]),c=e.useMemo((()=>function(e,t,r,o,a){const n=[];if(r){const r=[],i=t=>{t>=1&&t<=e&&r.push(t)};let l=t-a,d=t+a;if(l<1&&d>e)l=1,d=e;else if(l<1)for(;l<1;)l++,d++;else if(d>e)for(;d>e;)l--,d--;for(let t=1;t<=o;t++){const r=t,o=e-(t-1);r>=l?d++:i(r),o<=d?l--:i(o)}for(let e=l;e<=d;e++)i(e);const s=r.slice().sort(((e,t)=>e-t)).filter(((e,t,r)=>!t||e!==r[t-1]));for(let e=0;e<s.length;e++){const r=s[e],o=r===t;0===e?(1!==r&&n.push({type:"BREAK",num:1}),n.push({type:"NUM",num:r,selected:o})):(1==r-s[e-1]||n.push({type:"BREAK",num:r-1}),n.push({type:"NUM",num:r,selected:o}))}const c=n[n.length-1];"NUM"===c.type&&c.num!==e&&n.push({type:"BREAK",num:e})}const i={type:"NEXT",num:t+1,disabled:t===e};return[{type:"PREV",num:t-1,disabled:1===t},...n,i]}(r,o,!!l,i,d)),[r,o,l,i,d]);return e.useMemo((()=>c.map((r=>{const{props:o,key:a,content:i}=function(e,t,r){const o={};let a="",n="";switch(e.type){case"PREV":n="page-prev",a="Previous",e.disabled?Object.assign(o,{as:"span","aria-disabled":"true"}):Object.assign(o,{rel:"prev",href:t(e.num),"aria-label":"Previous Page",onClick:r});break;case"NEXT":n="page-next",a="Next",e.disabled?Object.assign(o,{as:"span","aria-disabled":"true"}):Object.assign(o,{rel:"next",href:t(e.num),"aria-label":"Next Page",onClick:r});break;case"NUM":n=`page-${e.num}`,a=String(e.num),e.selected?Object.assign(o,{as:"em","aria-current":"page"}):Object.assign(o,{href:t(e.num),"aria-label":`Page ${e.num}`,onClick:r});break;case"BREAK":n=`page-${e.num}-break`,a="…",Object.assign(o,{as:"span","aria-disabled":!0})}return{props:o,key:n,content:a}}(r,n,s(r.num));return e.createElement(Hi,Pt({},o,{key:a,theme:t}),i)}))),[c,n,s,t])}const Wi=f.nav`
1301
1303
  margin-top: 20px;
1302
1304
  margin-bottom: 15px;
@@ -1306,12 +1308,8 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
1306
1308
  position: ${e=>e.relative?"relative":"absolute"};
1307
1309
  z-index: 100;
1308
1310
  display: ${e=>e.open?"block":"none"};
1309
-
1310
- ${It};
1311
- ${Lt};
1312
- ${Ot};
1313
1311
  ${rr};
1314
- `,Vi=f(or)`
1312
+ `,Vi=f.div`
1315
1313
  border: 1px solid ${Nt("colors.border.default")};
1316
1314
  border-radius: ${Nt("radii.2")};
1317
1315
  position: relative;
@@ -1321,9 +1319,6 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
1321
1319
  padding: ${Nt("space.4")};
1322
1320
  background-color: ${Nt("colors.canvas.overlay")};
1323
1321
 
1324
- ${It};
1325
- ${Lt};
1326
-
1327
1322
  // Carets
1328
1323
  &::before,
1329
1324
  &::after {