@primer/components 0.0.0-2021927203131 → 0.0.0-2021927232856

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,6 +1,6 @@
1
1
  # @primer/components
2
2
 
3
- ## 0.0.0-2021927203131
3
+ ## 0.0.0-2021927232856
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -418,7 +418,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
418
418
  background: ${Nt("colors.border.muted")};
419
419
  margin-top: calc(${Nt("space.2")} - 1px);
420
420
  margin-bottom: ${Nt("space.2")};
421
- `;function ka(){return e.createElement($a,null)}ka.displayName="Divider",ka.renderItem=ka;const Ta={default:{hover:Nt("colors.neutral.subtle"),focus:Nt("colors.neutral.muted")},danger:{hover:Nt("colors.danger.subtle"),focus:Nt("colors.danger.muted")}},Sa=(e="default",t)=>{if(t)return{color:Nt("colors.primer.fg.disabled"),iconColor:Nt("colors.primer.fg.disabled"),annotationColor:Nt("colors.primer.fg.disabled"),hoverCursor:"default"};switch(e){case"danger":return{color:Nt("colors.danger.fg"),iconColor:Nt("colors.danger.fg"),annotationColor:Nt("colors.fg.muted"),hoverCursor:"pointer"};default:return{color:Nt("colors.fg.default"),iconColor:Nt("colors.fg.muted"),annotationColor:Nt("colors.fg.muted"),hoverCursor:"pointer"}}},Ea=f.div`
421
+ `;function ka(){return e.createElement($a,null)}ka.displayName="Divider",ka.renderItem=ka;const Ta={default:{hover:{light:"rgba(46, 77, 108, 0.06)",dark:"rgba(201, 206, 212, 0.12)",dark_dimmed:"rgba(201, 206, 212, 0.12)"},focus:{light:"rgba(54, 77, 100, 0.16)",dark:"rgba(201, 206, 212, 0.24)",dark_dimmed:"rgba(201, 206, 212, 0.24)"}},danger:{hover:{light:"rgba(234, 74, 90, 0.08)",dark:"rgba(248, 81, 73, 0.16)",dark_dimmed:"rgba(248, 81, 73, 0.16)"},focus:{light:"rgba(234, 74, 90, 0.14)",dark:"rgba(248, 81, 73, 0.24)",dark_dimmed:"rgba(248, 81, 73, 0.24)"}}},Sa=(e="default",t)=>{if(t)return{color:Nt("colors.primer.fg.disabled"),iconColor:Nt("colors.primer.fg.disabled"),annotationColor:Nt("colors.primer.fg.disabled"),hoverCursor:"default"};switch(e){case"danger":return{color:Nt("colors.danger.fg"),iconColor:Nt("colors.danger.fg"),annotationColor:Nt("colors.fg.muted"),hoverCursor:"pointer"};default:return{color:Nt("colors.fg.default"),iconColor:Nt("colors.fg.muted"),annotationColor:Nt("colors.fg.muted"),hoverCursor:"pointer"}}},Ea=f.div`
422
422
  display: flex;
423
423
  min-width: 0;
424
424
 
@@ -547,7 +547,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
547
547
  flex-basis: var(--description-container-flex-basis);
548
548
  `,Ma=f.input`
549
549
  pointer-events: none;
550
- `,Pa=e.forwardRef(((t,r)=>{const{as:a,text:n,description:i,descriptionVariant:l="inline",selected:d,selectionVariant:s,leadingVisual:c,trailingIcon:f,trailingVisual:g,trailingText:u,variant:p="default",showDivider:b,disabled:m,onAction:h,onKeyPress:v,children:x,onClick:y,id:w,...B}=t,$=Uo(),k=Uo(),T=o((e=>{if(m)return;null==v||v(e);e.target instanceof HTMLInputElement&&"checkbox"===e.target.type&&" "===e.key||!e.defaultPrevented&&[" ","Enter"].includes(e.key)&&(null==h||h(t,e))}),[h,m,t,v]),S=o((e=>{m||(null==y||y(e),e.defaultPrevented||null==h||h(t,e))}),[h,m,t,y]),E=Ta[p],C=E.hover,z=E.focus,{theme:N}=Zt();return e.createElement(za,Pt({ref:r,as:a,tabIndex:m?void 0:-1,variant:p,showDivider:b,"aria-selected":d,"aria-labelledby":n?$:void 0,"aria-describedby":i?k:void 0},B,{"data-id":w,onKeyPress:T,onClick:S,hoverBackground:m?"inherit":C,focusBackground:m?"inherit":z}),!!d===d&&e.createElement(Ia,null,"multiple"===s?e.createElement(e.Fragment,null,e.createElement(Ma,{disabled:m,tabIndex:-1,type:"checkbox",checked:d,"aria-label":n,readOnly:!0,"aria-readonly":"false"})):d&&e.createElement(no,{fill:null==N?void 0:N.colors.fg.default})),c&&e.createElement(Ra,{variant:p,disabled:m},e.createElement(c,null)),e.createElement(Ea,null,e.createElement(Ca,{style:{"--main-content-flex-direction":"inline"===l?"row":"column"}},x,n?e.createElement(Na,{id:$},n):null,i?e.createElement(Oa,{id:k,style:{"--description-container-margin-left":"inline"===l?Nt("space.2")(N):0,"--description-container-flex-basis":"inline"===l?0:"auto"}},"block"===l?i:e.createElement(Ba,{title:i,inline:!0,maxWidth:"100%"},i)):null),g?e.createElement(La,{variant:p,disabled:m},"function"==typeof g?e.createElement(g,null):g):f||u?e.createElement(La,{variant:p,disabled:m},u,f&&e.createElement(f,null)):null))}));Pa.displayName="ActionList.Item";const Ha=f.div`
550
+ `,Pa=e.forwardRef(((t,r)=>{const{as:a,text:n,description:i,descriptionVariant:l="inline",selected:d,selectionVariant:s,leadingVisual:c,trailingIcon:f,trailingVisual:g,trailingText:u,variant:p="default",showDivider:b,disabled:m,onAction:h,onKeyPress:v,children:x,onClick:y,id:w,...B}=t,$=Uo(),k=Uo(),T=o((e=>{if(m)return;null==v||v(e);e.target instanceof HTMLInputElement&&"checkbox"===e.target.type&&" "===e.key||!e.defaultPrevented&&[" ","Enter"].includes(e.key)&&(null==h||h(t,e))}),[h,m,t,v]),S=o((e=>{m||(null==y||y(e),e.defaultPrevented||null==h||h(t,e))}),[h,m,t,y]),E=Ta[p],C=Qt(E.hover,"inherit"),z=Qt(E.focus,"inherit"),{theme:N}=Zt();return e.createElement(za,Pt({ref:r,as:a,tabIndex:m?void 0:-1,variant:p,showDivider:b,"aria-selected":d,"aria-labelledby":n?$:void 0,"aria-describedby":i?k:void 0},B,{"data-id":w,onKeyPress:T,onClick:S,hoverBackground:m?"inherit":C,focusBackground:m?"inherit":z}),!!d===d&&e.createElement(Ia,null,"multiple"===s?e.createElement(e.Fragment,null,e.createElement(Ma,{disabled:m,tabIndex:-1,type:"checkbox",checked:d,"aria-label":n,readOnly:!0,"aria-readonly":"false"})):d&&e.createElement(no,{fill:null==N?void 0:N.colors.fg.default})),c&&e.createElement(Ra,{variant:p,disabled:m},e.createElement(c,null)),e.createElement(Ea,null,e.createElement(Ca,{style:{"--main-content-flex-direction":"inline"===l?"row":"column"}},x,n?e.createElement(Na,{id:$},n):null,i?e.createElement(Oa,{id:k,style:{"--description-container-margin-left":"inline"===l?Nt("space.2")(N):0,"--description-container-flex-basis":"inline"===l?0:"auto"}},"block"===l?i:e.createElement(Ba,{title:i,inline:!0,maxWidth:"100%"},i)):null),g?e.createElement(La,{variant:p,disabled:m},"function"==typeof g?e.createElement(g,null):g):f||u?e.createElement(La,{variant:p,disabled:m},u,f&&e.createElement(f,null)):null))}));Pa.displayName="ActionList.Item";const Ha=f.div`
551
551
  font-size: ${Nt("fontSizes.1")};
552
552
  /* 14px font-size * 1.428571429 = 20px line height
553
553
  *