@primer/components 0.0.0-202110322927 → 0.0.0-2021103231153

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-202110322927
3
+ ## 0.0.0-2021103231153
4
4
 
5
5
  ### Major Changes
6
6
 
7
- - [#1572](https://github.com/primer/react/pull/1572) [`7c63d566`](https://github.com/primer/react/commit/7c63d5666ee472c9eb8669a1f2138f788f8ea95e) Thanks [@jfuchs](https://github.com/jfuchs)! - SideNav 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
+ - [#1564](https://github.com/primer/react/pull/1564) [`5f29f57e`](https://github.com/primer/react/commit/5f29f57ee036be3ad71b26bc689193cec75acb17) Thanks [@jfuchs](https://github.com/jfuchs)! - Label 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
 
@@ -1155,22 +1155,22 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
1155
1155
  margin-right: 0;
1156
1156
  }
1157
1157
  ${rr};
1158
- `;const Ii=p(["margin-top:-1px;margin-bottom:-1px;color:",";border:"," solid ",";box-shadow:none;",";",";background-color:transparent;"],Nt("colors.fg.muted"),Nt("borderWidths.1"),Nt("colors.border.default"),ct,It),Ai=ue({variants:{small:{fontSize:0,lineHeight:"16px",padding:"0px 8px"},medium:{fontSize:0,lineHeight:"20px",padding:"0 8px"},large:{fontSize:0,lineHeight:"24px",padding:"0 12px"},xl:{fontSize:1,lineHeight:"16px",padding:"8px 12px"}}}),Ri=f.span`
1158
+ `;const Ii=p(["margin-top:-1px;margin-bottom:-1px;color:",";border:"," solid ",";box-shadow:none;",";background-color:transparent;"],Nt("colors.fg.muted"),Nt("borderWidths.1"),Nt("colors.border.default"),ct),Ai=ue({variants:{small:{fontSize:0,lineHeight:"16px",padding:"0px 8px"},medium:{fontSize:0,lineHeight:"20px",padding:"0 8px"},large:{fontSize:0,lineHeight:"24px",padding:"0 12px"},xl:{fontSize:1,lineHeight:"16px",padding:"8px 12px"}}}),Ri=f.span`
1159
1159
  display: inline-block;
1160
1160
  font-weight: ${Nt("fontWeights.semibold")};
1161
1161
  color: ${Nt("colors.fg.onEmphasis")};
1162
1162
  border-radius: ${Nt("radii.3")};
1163
+ background-color: ${Nt("colors.neutral.emphasis")};
1163
1164
 
1164
1165
  &:hover {
1165
1166
  text-decoration: none;
1166
1167
  }
1167
1168
 
1168
1169
  ${Ai}
1169
- ${It}
1170
1170
  ${e=>e.dropshadow?"box-shadow: inset 0 -1px 0 rgba(27, 31, 35, 0.12)":""}
1171
1171
  ${e=>e.outline?Ii:""} // must be last to override other values
1172
1172
  ${rr}
1173
- `;Ri.defaultProps={bg:"neutral.emphasis",variant:"medium"};var Li=Ri;const Oi=L({hoverColor:{property:"color",scale:"colors"}});var Mi=f.a`
1173
+ `;Ri.defaultProps={variant:"medium"};var Li=Ri;const Oi=L({hoverColor:{property:"color",scale:"colors"}});var Mi=f.a`
1174
1174
  color: ${e=>e.muted?Nt("colors.fg.muted")(e):Nt("colors.accent.fg")(e)};
1175
1175
  text-decoration: ${e=>e.underline?"underline":"none"};
1176
1176
  &:hover {
@@ -1596,11 +1596,12 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
1596
1596
  ${"\n // Remove marker added by the display: list-item browser default\n > summary {\n list-style: none;\n }\n // Remove marker added by details polyfill\n > summary::before {\n display: none;\n }\n // Remove marker added by Chrome\n > summary::-webkit-details-marker {\n display: none;\n }\n"}
1597
1597
  ${It}
1598
1598
  ${rr};
1599
- `,Vl=e.forwardRef((({children:n,initialTab:i="",as:l,...d},s)=>{const c=r(null),f=null!=s?s:c,[g,u]=t(i),[p,b]=t(!1),m={selectedTab:g,setSelectedTab:u,setOpen:b,open:p,initialTab:i},h=o((e=>{"current"in f&&f.current&&!f.current.contains(e.target)&&(e.defaultPrevented||b(!1))}),[f,b]);return a((()=>{if(p)return document.addEventListener("click",h),()=>{document.removeEventListener("click",h)}}),[p,h]),Zi(f,p,b),e.createElement(Qi.Provider,{value:m},e.createElement(Gl,Pt({ref:f},d,{open:p,onToggle:function(e){b(e.target.open)}}),n))}));Vl.displayName="SelectMenu";var Kl=Object.assign(Vl,{MenuContext:Qi,List:xl,Divider:rl,Filter:nl,Footer:dl,Item:ml,Modal:Rl,Tabs:Ul,Tab:Pl,TabPanel:Wl,Header:gl,LoadingAnimation:Sl});function ql({variant:t,className:r,bordered:o,children:a}){const n=en(r,`variant-${"lightweight"===t?"lightweight":"normal"}`);return e.createElement(or,{borderWidth:o?"1px":0,borderStyle:"solid",borderColor:"border.default",borderRadius:2,as:"nav",className:n},a)}ql.displayName="SideNavBase";const Xl=f(ql)`
1599
+ `,Vl=e.forwardRef((({children:n,initialTab:i="",as:l,...d},s)=>{const c=r(null),f=null!=s?s:c,[g,u]=t(i),[p,b]=t(!1),m={selectedTab:g,setSelectedTab:u,setOpen:b,open:p,initialTab:i},h=o((e=>{"current"in f&&f.current&&!f.current.contains(e.target)&&(e.defaultPrevented||b(!1))}),[f,b]);return a((()=>{if(p)return document.addEventListener("click",h),()=>{document.removeEventListener("click",h)}}),[p,h]),Zi(f,p,b),e.createElement(Qi.Provider,{value:m},e.createElement(Gl,Pt({ref:f},d,{open:p,onToggle:function(e){b(e.target.open)}}),n))}));Vl.displayName="SelectMenu";var Kl=Object.assign(Vl,{MenuContext:Qi,List:xl,Divider:rl,Filter:nl,Footer:dl,Item:ml,Modal:Rl,Tabs:Ul,Tab:Pl,TabPanel:Wl,Header:gl,LoadingAnimation:Sl});function ql({variant:t,className:r,bordered:o,children:a,...n}){const i=en(r,`variant-${"lightweight"===t?"lightweight":"normal"}`);return o||(n={...n,borderWidth:0}),e.createElement(or,Pt({borderWidth:"1px",borderStyle:"solid",borderColor:"border.default",borderRadius:2,as:"nav",className:i},n),a)}ql.displayName="SideNavBase";const Xl=f(ql)`
1600
1600
  background-color: ${Nt("colors.canvas.subtle")};
1601
1601
 
1602
1602
  ${e=>e.bordered&&p(["& > &{border-left:0;border-right:0;border-bottom:0;}"])}
1603
1603
 
1604
+ ${It};
1604
1605
  ${rr};
1605
1606
  `,Yl=p(["background-color:",";outline:none;text-decoration:none;"],Nt("colors.neutral.subtle")),Jl=p(["color:",";text-decoration:none;outline:none;"],Nt("colors.fg.default")),Zl=f(Mi).attrs((e=>"string"==typeof e.to||e.selected?{"aria-current":"page"}:{}))`
1606
1607
  position: relative;