@primer/components 0.0.0-202183011441 → 0.0.0-202183053931

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,12 +1,12 @@
1
1
  # @primer/components
2
2
 
3
- ## 0.0.0-202183011441
3
+ ## 0.0.0-202183053931
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Fake entry to force publishing
8
8
 
9
- * [#1471](https://github.com/primer/react/pull/1471) [`4d3c1f1e`](https://github.com/primer/react/commit/4d3c1f1e1bfd8ab989396ba678b03c0a25ea1249) Thanks [@smockle](https://github.com/smockle)! - Change the button which receives focus when a 'ConfirmationDialog' opens from the secondary (e.g. 'Cancel') to the primary (e.g. 'OK'). Fixes github/primer#313.
9
+ * [#1471](https://github.com/primer/react/pull/1471) [`f1cebb7e`](https://github.com/primer/react/commit/f1cebb7e9af297a7c466701454aac6dc1eb7b3a4) Thanks [@smockle](https://github.com/smockle)! - Change the button which receives focus when a 'ConfirmationDialog' opens from the secondary (e.g. 'Cancel') to the primary (e.g. 'OK'). Fixes github/primer#313.
10
10
 
11
11
  ## 30.0.0
12
12
 
@@ -413,7 +413,7 @@ import e,{useState as r,useRef as t,useCallback as a,useEffect as o,useMemo as n
413
413
  background: ${Cr("colors.border.muted")};
414
414
  margin-top: calc(${Cr("space.2")} - 1px);
415
415
  margin-bottom: ${Cr("space.2")};
416
- `;function yo(){return e.createElement(Bo,null)}yo.displayName="Divider",yo.renderItem=yo;const wo={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)"}}},ko=(e="default",r)=>{if(r)return{color:Cr("colors.fg.muted"),iconColor:Cr("colors.fg.muted"),annotationColor:Cr("colors.fg.muted"),hoverCursor:"default"};switch(e){case"danger":return{color:Cr("colors.danger.fg"),iconColor:Cr("colors.danger.fg"),annotationColor:Cr("colors.fg.muted"),hoverCursor:"pointer"};default:return{color:Cr("colors.fg.default"),iconColor:Cr("colors.fg.muted"),annotationColor:Cr("colors.fg.muted"),hoverCursor:"pointer"}}},$o=s.div`
416
+ `;function yo(){return e.createElement(Bo,null)}yo.displayName="Divider",yo.renderItem=yo;const wo={default:{hover:Cr("colors.neutral.subtle"),focus:Cr("colors.neutral.muted")},danger:{hover:Cr("colors.danger.subtle"),focus:Cr("colors.danger.muted")}},ko=(e="default",r)=>{if(r)return{color:Cr("colors.fg.muted"),iconColor:Cr("colors.fg.muted"),annotationColor:Cr("colors.fg.muted"),hoverCursor:"default"};switch(e){case"danger":return{color:Cr("colors.danger.fg"),iconColor:Cr("colors.danger.fg"),annotationColor:Cr("colors.fg.muted"),hoverCursor:"pointer"};default:return{color:Cr("colors.fg.default"),iconColor:Cr("colors.fg.muted"),annotationColor:Cr("colors.fg.muted"),hoverCursor:"pointer"}}},$o=s.div`
417
417
  display: flex;
418
418
  min-width: 0;
419
419
 
@@ -541,7 +541,7 @@ import e,{useState as r,useRef as t,useCallback as a,useEffect as o,useMemo as n
541
541
  flex-basis: var(--description-container-flex-basis);
542
542
  `,Lo=s.input`
543
543
  pointer-events: none;
544
- `;function zo(r){const{text:t,description:o,descriptionVariant:n="inline",selected:d,selectionVariant:i,leadingVisual:c,trailingIcon:l,trailingText:s,variant:f="default",showDivider:g,disabled:b,onAction:p,onKeyPress:u,children:h,onClick:m,id:x,...v}=r,B=Da(),y=Da(),w=a((e=>{if(b)return;null==u||u(e);e.target instanceof HTMLInputElement&&"checkbox"===e.target.type&&" "===e.key||!e.defaultPrevented&&[" ","Enter"].includes(e.key)&&(null==p||p(r,e))}),[p,b,r,u]),k=a((e=>{b||(null==m||m(e),e.defaultPrevented||null==p||p(r,e))}),[p,b,r,m]),$=wo[f],T=Zr($.hover,"inherit"),S=Zr($.focus,"inherit"),{theme:I}=Jr();return e.createElement(So,Or({tabIndex:b?void 0:-1,variant:f,showDivider:g,"aria-selected":d,"aria-labelledby":t?B:void 0,"aria-describedby":o?y:void 0},v,{"data-id":x,onKeyPress:w,onClick:k,hoverBackground:b?"inherit":T,focusBackground:b?"inherit":S}),!!d===d&&e.createElement(Eo,null,"multiple"===i?e.createElement(e.Fragment,null,e.createElement(Lo,{disabled:b,tabIndex:-1,type:"checkbox",checked:d,"aria-label":t,readOnly:!0,"aria-readonly":"false"})):d&&e.createElement(aa,{fill:null==I?void 0:I.colors.text.primary})),c&&e.createElement(Ao,{variant:f,disabled:b},e.createElement(c,null)),e.createElement($o,null,e.createElement(To,{style:{"--main-content-flex-direction":"inline"===n?"row":"column"}},h,t?e.createElement(Io,{id:B},t):null,o?e.createElement(Ho,{id:y,style:{"--description-container-margin-left":"inline"===n?Cr("space.2")(I):0,"--description-container-flex-basis":"inline"===n?0:"auto"}},"block"===n?o:e.createElement(vo,{title:o,inline:!0,maxWidth:"100%"},o)):null),l||s?e.createElement(No,{variant:f,disabled:b},s,l&&e.createElement(l,null)):null))}zo.displayName="Item";const Ro=s.div`
544
+ `;function zo(r){const{text:t,description:o,descriptionVariant:n="inline",selected:d,selectionVariant:i,leadingVisual:c,trailingIcon:l,trailingText:s,variant:f="default",showDivider:g,disabled:b,onAction:p,onKeyPress:u,children:h,onClick:m,id:x,...v}=r,B=Da(),y=Da(),w=a((e=>{if(b)return;null==u||u(e);e.target instanceof HTMLInputElement&&"checkbox"===e.target.type&&" "===e.key||!e.defaultPrevented&&[" ","Enter"].includes(e.key)&&(null==p||p(r,e))}),[p,b,r,u]),k=a((e=>{b||(null==m||m(e),e.defaultPrevented||null==p||p(r,e))}),[p,b,r,m]),$=wo[f],T=$.hover,S=$.focus,{theme:I}=Jr();return e.createElement(So,Or({tabIndex:b?void 0:-1,variant:f,showDivider:g,"aria-selected":d,"aria-labelledby":t?B:void 0,"aria-describedby":o?y:void 0},v,{"data-id":x,onKeyPress:w,onClick:k,hoverBackground:b?"inherit":T,focusBackground:b?"inherit":S}),!!d===d&&e.createElement(Eo,null,"multiple"===i?e.createElement(e.Fragment,null,e.createElement(Lo,{disabled:b,tabIndex:-1,type:"checkbox",checked:d,"aria-label":t,readOnly:!0,"aria-readonly":"false"})):d&&e.createElement(aa,{fill:null==I?void 0:I.colors.text.primary})),c&&e.createElement(Ao,{variant:f,disabled:b},e.createElement(c,null)),e.createElement($o,null,e.createElement(To,{style:{"--main-content-flex-direction":"inline"===n?"row":"column"}},h,t?e.createElement(Io,{id:B},t):null,o?e.createElement(Ho,{id:y,style:{"--description-container-margin-left":"inline"===n?Cr("space.2")(I):0,"--description-container-flex-basis":"inline"===n?0:"auto"}},"block"===n?o:e.createElement(vo,{title:o,inline:!0,maxWidth:"100%"},o)):null),l||s?e.createElement(No,{variant:f,disabled:b},s,l&&e.createElement(l,null)):null))}zo.displayName="Item";const Ro=s.div`
545
545
  font-size: ${Cr("fontSizes.1")};
546
546
  /* 14px font-size * 1.428571429 = 20px line height
547
547
  *