@primer/components 0.0.0-2021927193941 → 0.0.0-2021927203131
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 +8 -4
- package/dist/browser.esm.js +2 -2
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +275 -275
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList/Item.js +6 -25
- package/lib-esm/ActionList/Item.js +7 -27
- package/package.json +1 -2
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# @primer/components
|
2
2
|
|
3
|
-
## 0.0.0-
|
3
|
+
## 0.0.0-2021927203131
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- Fake entry to force publishing
|
8
|
+
|
9
|
+
## 31.1.0
|
4
10
|
|
5
11
|
### Minor Changes
|
6
12
|
|
@@ -10,9 +16,7 @@
|
|
10
16
|
|
11
17
|
- [#1529](https://github.com/primer/react/pull/1529) [`da566044`](https://github.com/primer/react/commit/da566044649a114e23789e3ac90c022cdbf5eaeb) Thanks [@mperrotti](https://github.com/mperrotti)! - Fixes a bug in `TextInputWithTokens` where the next token would not receive focus after the user deleted the first token using the keyboard
|
12
18
|
|
13
|
-
*
|
14
|
-
|
15
|
-
- [#1526](https://github.com/primer/react/pull/1526) [`1378e771`](https://github.com/primer/react/commit/1378e771323a48e6084c5ffac7d93b54960f4a0e) Thanks [@mperrotti](https://github.com/mperrotti)! - replaces flexbox gap usage with margins
|
19
|
+
* [#1526](https://github.com/primer/react/pull/1526) [`1378e771`](https://github.com/primer/react/commit/1378e771323a48e6084c5ffac7d93b54960f4a0e) Thanks [@mperrotti](https://github.com/mperrotti)! - replaces flexbox gap usage with margins
|
16
20
|
|
17
21
|
## 31.0.1
|
18
22
|
|
package/dist/browser.esm.js
CHANGED
@@ -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:
|
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`
|
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=
|
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`
|
551
551
|
font-size: ${Nt("fontSizes.1")};
|
552
552
|
/* 14px font-size * 1.428571429 = 20px line height
|
553
553
|
*
|