@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.
- package/CHANGELOG.md +4 -2
- package/dist/browser.esm.js +1 -4
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +1 -4
- package/dist/browser.umd.js.map +1 -1
- package/lib/Breadcrumbs.d.ts +8 -7
- package/lib/Breadcrumbs.js +7 -12
- package/lib-esm/Breadcrumbs.d.ts +8 -7
- package/lib-esm/Breadcrumbs.js +8 -13
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
# @primer/components
|
2
2
|
|
3
|
-
## 0.0.0-
|
3
|
+
## 0.0.0-2021828175320
|
4
4
|
|
5
5
|
### Major Changes
|
6
6
|
|
7
|
-
- [#
|
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
|
+
|
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.
|
8
10
|
|
9
11
|
### Patch Changes
|
10
12
|
|
package/dist/browser.esm.js
CHANGED
@@ -748,10 +748,8 @@ Za=en,function(){var e={}.hasOwnProperty;function r(){for(var t=[],o=0;o<argumen
|
|
748
748
|
`,ln=s.nav`
|
749
749
|
display: flex;
|
750
750
|
justify-content: space-between;
|
751
|
-
${Nr};
|
752
|
-
${Hr};
|
753
751
|
${rt};
|
754
|
-
`;function cn({className:r,children:t,
|
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})))`
|
755
753
|
color: ${Cr("colors.accent.fg")};
|
756
754
|
display: inline-block;
|
757
755
|
font-size: ${Cr("fontSizes.1")};
|
@@ -763,7 +761,6 @@ Za=en,function(){var e={}.hasOwnProperty;function r(){for(var t=[],o=0;o<argumen
|
|
763
761
|
color: ${Cr("colors.fg.default")};
|
764
762
|
pointer-events: none;
|
765
763
|
}
|
766
|
-
${Nr}
|
767
764
|
${rt};
|
768
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`
|
769
766
|
display: ${e=>e.inline?"inline-flex":"flex"};
|