@primer/components 0.0.0-2021101701833 → 0.0.0-2021101703832
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 +2 -2
- package/dist/browser.esm.js +7 -7
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +7 -7
- package/dist/browser.umd.js.map +1 -1
- package/lib/Dialog/Dialog.d.ts +6 -5
- package/lib/Dialog/Dialog.js +7 -13
- package/lib/Dialog.d.ts +3 -4
- package/lib/Dialog.js +1 -1
- package/lib-esm/Dialog/Dialog.d.ts +6 -5
- package/lib-esm/Dialog/Dialog.js +8 -8
- package/lib-esm/Dialog.d.ts +3 -4
- package/lib-esm/Dialog.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @primer/components
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-2021101703832
|
|
4
4
|
|
|
5
5
|
### Major Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
7
|
+
- [#1615](https://github.com/primer/react/pull/1615) [`087ddd45`](https://github.com/primer/react/commit/087ddd456546eb4ef1c9d21a410a25701a839519) Thanks [@jfuchs](https://github.com/jfuchs)! - Dialog 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
|
|
package/dist/browser.esm.js
CHANGED
|
@@ -318,24 +318,26 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
+
${Nt};
|
|
322
|
+
${Ot};
|
|
321
323
|
${rr};
|
|
322
|
-
`,Jo=({dialogLabelId:t,title:r,subtitle:a,dialogDescriptionId:n,onClose:i})=>{const l=o((()=>{i("close-button")}),[i]);return e.createElement(sa.Header,null,e.createElement(or,{display:"flex"},e.createElement(or,{display:"flex",px:2,py:"6px",flexDirection:"column",flexGrow:1},e.createElement(sa.Title,{id:t},null!=r?r:"Dialog"),a&&e.createElement(sa.Subtitle,{id:n},a)),e.createElement(sa.CloseButton,{onClose:l})))};Jo.displayName="DefaultHeader";const Zo=({children:t})=>e.createElement(sa.Body,null,t);Zo.displayName="DefaultBody";const Qo=({footerButtons:t})=>{const{containerRef:r}=Po({bindKeys:Mr.ArrowHorizontal|Mr.Tab,focusInStrategy:"closest"});return t?e.createElement(sa.Footer,{ref:r},e.createElement(sa.Buttons,{buttons:t})):null},ea=e.forwardRef(((t,o)=>{const{title:a="Dialog",subtitle:n="",renderHeader:i,renderBody:l,renderFooter:d,onClose:s,role:c="dialog",width:f="xlarge",height:g="auto",footerButtons:u=[]}=t,p=Vo(),b=Vo(),m=r(null);for(const e of u)e.autoFocus&&(e.ref=m);const h={...t,title:a,subtitle:n,role:c,dialogLabelId:p,dialogDescriptionId:b},v=r(null),x=Fo(v,o),y=r(null);Ro({containerRef:v,restoreFocusOnCleanUp:!0,initialFocusRef:m}),Cr((e=>{s("escape"),e.preventDefault()}),[s]);const w=(null!=i?i:Jo)(h),B=(null!=l?l:Zo)(h),$=(null!=d?d:Qo)(h);return e.createElement(e.Fragment,null,e.createElement(Wo,null,e.createElement(Ko,{ref:y},e.createElement(Yo,{width:f,height:g,ref:x,role:c,"aria-labelledby":p,"aria-describedby":b},w,B,$))))}));ea.displayName="Dialog";const ta=f.
|
|
324
|
+
`,Jo=({dialogLabelId:t,title:r,subtitle:a,dialogDescriptionId:n,onClose:i})=>{const l=o((()=>{i("close-button")}),[i]);return e.createElement(sa.Header,null,e.createElement(or,{display:"flex"},e.createElement(or,{display:"flex",px:2,py:"6px",flexDirection:"column",flexGrow:1},e.createElement(sa.Title,{id:t},null!=r?r:"Dialog"),a&&e.createElement(sa.Subtitle,{id:n},a)),e.createElement(sa.CloseButton,{onClose:l})))};Jo.displayName="DefaultHeader";const Zo=({children:t})=>e.createElement(sa.Body,null,t);Zo.displayName="DefaultBody";const Qo=({footerButtons:t})=>{const{containerRef:r}=Po({bindKeys:Mr.ArrowHorizontal|Mr.Tab,focusInStrategy:"closest"});return t?e.createElement(sa.Footer,{ref:r},e.createElement(sa.Buttons,{buttons:t})):null},ea=e.forwardRef(((t,o)=>{const{title:a="Dialog",subtitle:n="",renderHeader:i,renderBody:l,renderFooter:d,onClose:s,role:c="dialog",width:f="xlarge",height:g="auto",footerButtons:u=[]}=t,p=Vo(),b=Vo(),m=r(null);for(const e of u)e.autoFocus&&(e.ref=m);const h={...t,title:a,subtitle:n,role:c,dialogLabelId:p,dialogDescriptionId:b},v=r(null),x=Fo(v,o),y=r(null);Ro({containerRef:v,restoreFocusOnCleanUp:!0,initialFocusRef:m}),Cr((e=>{s("escape"),e.preventDefault()}),[s]);const w=(null!=i?i:Jo)(h),B=(null!=l?l:Zo)(h),$=(null!=d?d:Qo)(h);return e.createElement(e.Fragment,null,e.createElement(Wo,null,e.createElement(Ko,{ref:y},e.createElement(Yo,{width:f,height:g,ref:x,role:c,"aria-labelledby":p,"aria-describedby":b},w,B,$))))}));ea.displayName="Dialog";const ta=f(or).attrs({as:"header"})`
|
|
323
325
|
box-shadow: 0 1px 0 ${It("colors.border.default")};
|
|
324
326
|
padding: ${It("space.2")};
|
|
325
327
|
z-index: 1;
|
|
326
328
|
flex-shrink: 0;
|
|
327
|
-
`,ra=f
|
|
329
|
+
`,ra=f(or)`
|
|
328
330
|
font-size: ${It("fontSizes.1")};
|
|
329
331
|
font-weight: ${It("fontWeights.bold")};
|
|
330
|
-
`,oa=f
|
|
332
|
+
`,oa=f(or)`
|
|
331
333
|
font-size: ${It("fontSizes.0")};
|
|
332
334
|
margin-top: ${It("space.1")};
|
|
333
335
|
color: ${It("colors.fg.muted")};
|
|
334
|
-
`,aa=f
|
|
336
|
+
`,aa=f(or)`
|
|
335
337
|
flex-grow: 1;
|
|
336
338
|
overflow: auto;
|
|
337
339
|
padding: ${It("space.3")};
|
|
338
|
-
`,na=f.
|
|
340
|
+
`,na=f(or).attrs({as:"footer"})`
|
|
339
341
|
box-shadow: 0 -1px 0 ${It("colors.border.default")};
|
|
340
342
|
padding: ${It("space.3")};
|
|
341
343
|
display: flex;
|
|
@@ -892,8 +894,6 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
|
892
894
|
height: 100vh;
|
|
893
895
|
}
|
|
894
896
|
|
|
895
|
-
${Lt};
|
|
896
|
-
${Nt};
|
|
897
897
|
${rr};
|
|
898
898
|
`,Qn=f(or)`
|
|
899
899
|
border-radius: ${It("radii.2")} ${It("radii.2")} 0px 0px;
|