@telegraph/modal 0.0.12 → 0.0.14
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 +15 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/css/default.css +1 -1
- package/dist/esm/index.mjs +59 -53
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/Modal/Modal.d.ts.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @telegraph/modal
|
|
2
2
|
|
|
3
|
+
## 0.0.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#140](https://github.com/knocklabs/telegraph/pull/140) [`d159e89`](https://github.com/knocklabs/telegraph/commit/d159e899e898e97552f8c7efadf0f78b7ed5f5a6) Thanks [@kylemcd](https://github.com/kylemcd)! - Allow for full width modal without bleeding to the edges
|
|
8
|
+
|
|
9
|
+
## 0.0.13
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`b7d93db`](https://github.com/knocklabs/telegraph/commit/b7d93dbb58de35c0be3b78c067d93f695955a5bf)]:
|
|
14
|
+
- @telegraph/layout@0.0.14
|
|
15
|
+
- @telegraph/icon@0.0.14
|
|
16
|
+
- @telegraph/button@0.0.23
|
|
17
|
+
|
|
3
18
|
## 0.0.12
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("@radix-ui/react-dialog"),j=require("@radix-ui/react-visually-hidden"),b=require("@telegraph/button"),f=require("@telegraph/icon"),o=require("@telegraph/layout"),u=require("clsx"),s=require("framer-motion"),g=require("react");function d(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:()=>t[i]})}}return r.default=t,Object.freeze(r)}const c=d(y),h=d(j),k=({defaultOpen:t,open:r,onOpenChange:i,a11yTitle:n,a11yDescription:l,className:p,children:m,...a})=>e.jsxs(c.Root,{open:r,onOpenChange:i,defaultOpen:t,children:[e.jsxs(h.Root,{children:[e.jsx(c.Title,{children:n}),l&&e.jsx(c.Description,{children:l})]}),e.jsx(s.AnimatePresence,{children:r&&e.jsx(e.Fragment,{children:e.jsxs(c.Overlay,{children:[e.jsx(o.Box,{as:s.motion.div,onClick:()=>i==null?void 0:i(!1),initial:{backdropFilter:"blur(0px)",opacity:0},animate:{backdropFilter:"blur(4px)",opacity:1},exit:{backdropFilter:"blur(0px)",opacity:0},transition:{duration:.3,bounce:0,type:"spring"},className:"fixed inset-0 bg-alpha-black-4 z-overlay"}),e.jsx(o.Stack,{className:u("fixed z-modal top-0 left-1/2 -translate-x-1/2","w-full","max-h-[calc(100vh-var(--tgph-spacing-32))] max-w-[calc(100vw-var(--tgph-spacing-8))]"),children:e.jsx(o.Stack,{className:u("shadow-1",p),direction:"column",as:s.motion.div,my:"16",initial:{scale:.8,opacity:0,y:-20,x:"-50%"},animate:{scale:1,opacity:1,y:0,x:"-50%"},exit:{scale:.8,opacity:0,y:-20,x:"-50%"},transition:{duration:.2,bounce:0,type:"spring"},maxW:a.maxW??"140",w:a.w??"full",bg:"surface-1",border:!0,rounded:"4",...a,children:m})})]})})})]}),w=g.forwardRef(({children:t,...r},i)=>e.jsx(c.Content,{ref:i,...r,asChild:!0,children:e.jsx(o.Stack,{direction:"column",children:t})})),v=({size:t="1",variant:r="ghost",...i})=>e.jsx(c.Close,{asChild:!0,children:e.jsx(b.Button,{icon:{icon:f.Lucide.X,alt:"Close Modal"},variant:r,size:t,...i})}),S=({children:t,...r})=>e.jsx(o.Stack,{direction:"column",px:"6",py:"4",...r,children:t}),q=({children:t,...r})=>e.jsx(o.Stack,{direction:"row",justify:"space-between",align:"center",px:"6",py:"4",borderBottom:!0,...r,children:t}),M=({children:t,...r})=>e.jsx(o.Stack,{direction:"row",align:"center",justify:"end",gap:"2",px:"6",py:"4",borderTop:!0,...r,children:t}),x={};Object.assign(x,{Root:k,Content:w,Close:v,Body:S,Header:q,Footer:M});exports.Modal=x;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import * as Dialog from \"@radix-ui/react-dialog\";\nimport * as VisuallyHidden from \"@radix-ui/react-visually-hidden\";\nimport { Button } from \"@telegraph/button\";\nimport type {\n PolymorphicProps,\n TgphComponentProps,\n TgphElement,\n} from \"@telegraph/helpers\";\nimport { Lucide } from \"@telegraph/icon\";\nimport { Box, Stack } from \"@telegraph/layout\";\nimport clsx from \"clsx\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport React from \"react\";\n\ntype RootProps = Omit<\n React.ComponentPropsWithoutRef<typeof Dialog.Root>,\n \"modal\"\n> &\n TgphComponentProps<typeof Stack> & {\n a11yTitle: string;\n a11yDescription?: string;\n };\n\nconst Root = ({\n defaultOpen,\n open,\n onOpenChange,\n a11yTitle,\n a11yDescription,\n className,\n children,\n ...props\n}: RootProps) => {\n return (\n <Dialog.Root\n open={open}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n <VisuallyHidden.Root>\n <Dialog.Title>{a11yTitle}</Dialog.Title>\n {a11yDescription && (\n <Dialog.Description>{a11yDescription}</Dialog.Description>\n )}\n </VisuallyHidden.Root>\n <AnimatePresence>\n {open && (\n <>\n <Dialog.Overlay>\n <Box\n as={motion.div}\n onClick={() => onOpenChange?.(false)}\n initial={{ backdropFilter: \"blur(0px)\", opacity: 0 }}\n animate={{ backdropFilter: \"blur(4px)\", opacity: 1 }}\n exit={{ backdropFilter: \"blur(0px)\", opacity: 0 }}\n transition={{ duration: 0.3, bounce: 0, type: \"spring\" }}\n className=\"fixed inset-0 bg-alpha-black-4 z-overlay\"\n />\n <Stack\n className={clsx(\n \"fixed z-modal top-0 left-1/2 -translate-x-1/2\",\n \"max-h-[calc(100vh-var(--tgph-spacing-32))]
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import * as Dialog from \"@radix-ui/react-dialog\";\nimport * as VisuallyHidden from \"@radix-ui/react-visually-hidden\";\nimport { Button } from \"@telegraph/button\";\nimport type {\n PolymorphicProps,\n TgphComponentProps,\n TgphElement,\n} from \"@telegraph/helpers\";\nimport { Lucide } from \"@telegraph/icon\";\nimport { Box, Stack } from \"@telegraph/layout\";\nimport clsx from \"clsx\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport React from \"react\";\n\ntype RootProps = Omit<\n React.ComponentPropsWithoutRef<typeof Dialog.Root>,\n \"modal\"\n> &\n TgphComponentProps<typeof Stack> & {\n a11yTitle: string;\n a11yDescription?: string;\n };\n\nconst Root = ({\n defaultOpen,\n open,\n onOpenChange,\n a11yTitle,\n a11yDescription,\n className,\n children,\n ...props\n}: RootProps) => {\n return (\n <Dialog.Root\n open={open}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n <VisuallyHidden.Root>\n <Dialog.Title>{a11yTitle}</Dialog.Title>\n {a11yDescription && (\n <Dialog.Description>{a11yDescription}</Dialog.Description>\n )}\n </VisuallyHidden.Root>\n <AnimatePresence>\n {open && (\n <>\n <Dialog.Overlay>\n <Box\n as={motion.div}\n onClick={() => onOpenChange?.(false)}\n initial={{ backdropFilter: \"blur(0px)\", opacity: 0 }}\n animate={{ backdropFilter: \"blur(4px)\", opacity: 1 }}\n exit={{ backdropFilter: \"blur(0px)\", opacity: 0 }}\n transition={{ duration: 0.3, bounce: 0, type: \"spring\" }}\n className=\"fixed inset-0 bg-alpha-black-4 z-overlay\"\n />\n <Stack\n className={clsx(\n \"fixed z-modal top-0 left-1/2 -translate-x-1/2\",\n \"w-full\",\n \"max-h-[calc(100vh-var(--tgph-spacing-32))] max-w-[calc(100vw-var(--tgph-spacing-8))]\",\n )}\n >\n <Stack\n className={clsx(\"shadow-1\", className)}\n direction=\"column\"\n as={motion.div}\n my=\"16\"\n initial={{ scale: 0.8, opacity: 0, y: -20, x: \"-50%\" }}\n animate={{ scale: 1, opacity: 1, y: 0, x: \"-50%\" }}\n exit={{ scale: 0.8, opacity: 0, y: -20, x: \"-50%\" }}\n transition={{ duration: 0.2, bounce: 0, type: \"spring\" }}\n maxW={props.maxW ?? \"140\"}\n w={props.w ?? \"full\"}\n bg=\"surface-1\"\n border\n rounded=\"4\"\n {...props}\n >\n {children}\n </Stack>\n </Stack>\n </Dialog.Overlay>\n </>\n )}\n </AnimatePresence>\n </Dialog.Root>\n );\n};\n\ntype ContentProps = React.ComponentPropsWithoutRef<typeof Dialog.Content>;\ntype ContentRef = React.ElementRef<typeof Dialog.Content>;\n\nconst Content = React.forwardRef<ContentRef, ContentProps>(\n ({ children, ...props }, forwardedRef) => {\n return (\n <Dialog.Content ref={forwardedRef} {...props} asChild>\n <Stack direction=\"column\">{children}</Stack>\n </Dialog.Content>\n );\n },\n);\n\ntype CloseProps<T extends TgphElement> = TgphComponentProps<typeof Button<T>> &\n Omit<React.ComponentPropsWithoutRef<typeof Dialog.Close>, \"color\">;\nconst Close = <T extends TgphElement>({\n size = \"1\",\n variant = \"ghost\",\n ...props\n}: CloseProps<T>) => {\n return (\n <Dialog.Close asChild>\n <Button\n icon={{ icon: Lucide.X, alt: \"Close Modal\" }}\n variant={variant}\n size={size}\n {...props}\n />\n </Dialog.Close>\n );\n};\n\ntype BodyProps<T extends TgphElement> = PolymorphicProps<T> &\n TgphComponentProps<typeof Stack<T>>;\n\nconst Body = <T extends TgphElement>({ children, ...props }: BodyProps<T>) => {\n return (\n <Stack direction=\"column\" px=\"6\" py=\"4\" {...props}>\n {children}\n </Stack>\n );\n};\n\ntype HeaderProps<T extends TgphElement> = PolymorphicProps<T> &\n TgphComponentProps<typeof Stack<T>>;\n\nconst Header = <T extends TgphElement>({\n children,\n ...props\n}: HeaderProps<T>) => {\n return (\n <Stack\n direction=\"row\"\n justify=\"space-between\"\n align=\"center\"\n px=\"6\"\n py=\"4\"\n borderBottom\n {...props}\n >\n {children}\n </Stack>\n );\n};\n\ntype FooterProps<T extends TgphElement> = PolymorphicProps<T> &\n TgphComponentProps<typeof Stack<T>>;\n\nconst Footer = <T extends TgphElement>({\n children,\n ...props\n}: FooterProps<T>) => {\n return (\n <Stack\n direction=\"row\"\n align=\"center\"\n justify=\"end\"\n gap=\"2\"\n px=\"6\"\n py=\"4\"\n borderTop\n {...props}\n >\n {children}\n </Stack>\n );\n};\n\nconst Modal = {} as {\n Root: typeof Root;\n Content: typeof Content;\n Close: typeof Close;\n Body: typeof Body;\n Header: typeof Header;\n Footer: typeof Footer;\n};\n\nObject.assign(Modal, {\n Root,\n Content,\n Close,\n Body,\n Header,\n Footer,\n});\n\nexport { Modal };\n"],"names":["Root","defaultOpen","open","onOpenChange","a11yTitle","a11yDescription","className","children","props","jsxs","Dialog","VisuallyHidden","jsx","AnimatePresence","Box","motion","Stack","clsx","Content","React","forwardedRef","Close","size","variant","Button","Lucide","Body","Header","Footer","Modal"],"mappings":"koBAuBMA,EAAO,CAAC,CACZ,YAAAC,EACA,KAAAC,EACA,aAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,UAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAEIC,EAAA,KAACC,EAAO,KAAP,CACC,KAAAR,EACA,aAAAC,EACA,YAAAF,EAEA,SAAA,CAACQ,EAAAA,KAAAE,EAAe,KAAf,CACC,SAAA,CAACC,EAAAA,IAAAF,EAAO,MAAP,CAAc,SAAUN,CAAA,CAAA,EACxBC,GACCO,EAA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AI,EAAAA,MAAA,CAAM,UAAU,SAAU,SAAAT,EAAS,CACtC,CAAA,CAGN,EAIMc,EAAQ,CAAwB,CACpC,KAAAC,EAAO,IACP,QAAAC,EAAU,QACV,GAAGf,CACL,IAEKI,EAAAA,IAAAF,EAAO,MAAP,CAAa,QAAO,GACnB,SAAAE,EAAA,IAACY,EAAA,OAAA,CACC,KAAM,CAAE,KAAMC,EAAAA,OAAO,EAAG,IAAK,aAAc,EAC3C,QAAAF,EACA,KAAAD,EACC,GAAGd,CAAA,CAER,CAAA,CAAA,EAOEkB,EAAO,CAAwB,CAAE,SAAAnB,EAAU,GAAGC,KAEhDI,EAAA,IAACI,EAAM,MAAA,CAAA,UAAU,SAAS,GAAG,IAAI,GAAG,IAAK,GAAGR,EACzC,SAAAD,CACH,CAAA,EAOEoB,EAAS,CAAwB,CACrC,SAAApB,EACA,GAAGC,CACL,IAEII,EAAA,IAACI,EAAA,MAAA,CACC,UAAU,MACV,QAAQ,gBACR,MAAM,SACN,GAAG,IACH,GAAG,IACH,aAAY,GACX,GAAGR,EAEH,SAAAD,CAAA,CAAA,EAQDqB,EAAS,CAAwB,CACrC,SAAArB,EACA,GAAGC,CACL,IAEII,EAAA,IAACI,EAAA,MAAA,CACC,UAAU,MACV,MAAM,SACN,QAAQ,MACR,IAAI,IACJ,GAAG,IACH,GAAG,IACH,UAAS,GACR,GAAGR,EAEH,SAAAD,CAAA,CAAA,EAKDsB,EAAQ,CAAC,EASf,OAAO,OAAOA,EAAO,CACnB,KAAA7B,EACA,QAAAkB,EACA,MAAAG,EACA,KAAAK,EACA,OAAAC,EACA,OAAAC,CACF,CAAC"}
|
package/dist/css/default.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.tgph :is(.fixed){position:fixed}.tgph :is(.inset-0){inset:var(--tgph-spacing-0)}.tgph :is(.left-1\/2){left:50%}.tgph :is(.top-0){top:var(--tgph-spacing-0)}.tgph :is(.z-modal){z-index:var(--tgph-zIndex-modal)}.tgph :is(.z-overlay){z-index:var(--tgph-zIndex-overlay)}.tgph :is(.max-h-\[calc\(100vh-var\(--tgph-spacing-32\)\)\]){max-height:calc(100vh - var(--tgph-spacing-32))}.tgph :is(.-translate-x-1\/2){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.tgph :is(.border){border-width:1px}.tgph :is(.bg-alpha-black-4){background-color:var(--tgph-alpha-black-4)}.tgph :is(.shadow-1){--tw-shadow: var(--tgph-shadow-1);--tw-shadow-colored: var(--tgph-shadow-1);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.tgph :is(.outline){outline-style:solid}.tgph :is(.blur){--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.tgph :is(.transition){transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}
|
|
1
|
+
.tgph :is(.fixed){position:fixed}.tgph :is(.inset-0){inset:var(--tgph-spacing-0)}.tgph :is(.left-1\/2){left:50%}.tgph :is(.top-0){top:var(--tgph-spacing-0)}.tgph :is(.z-modal){z-index:var(--tgph-zIndex-modal)}.tgph :is(.z-overlay){z-index:var(--tgph-zIndex-overlay)}.tgph :is(.max-h-\[calc\(100vh-var\(--tgph-spacing-32\)\)\]){max-height:calc(100vh - var(--tgph-spacing-32))}.tgph :is(.w-full){width:var(--tgph-spacing-full)}.tgph :is(.max-w-\[calc\(100vw-var\(--tgph-spacing-8\)\)\]){max-width:calc(100vw - var(--tgph-spacing-8))}.tgph :is(.-translate-x-1\/2){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.tgph :is(.border){border-width:1px}.tgph :is(.bg-alpha-black-4){background-color:var(--tgph-alpha-black-4)}.tgph :is(.shadow-1){--tw-shadow: var(--tgph-shadow-1);--tw-shadow-colored: var(--tgph-shadow-1);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.tgph :is(.outline){outline-style:solid}.tgph :is(.blur){--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.tgph :is(.transition){transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { jsx as t, jsxs as l, Fragment as
|
|
1
|
+
import { jsx as t, jsxs as l, Fragment as x } from "react/jsx-runtime";
|
|
2
2
|
import * as e from "@radix-ui/react-dialog";
|
|
3
|
-
import * as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Lucide as
|
|
6
|
-
import { Stack as a, Box as
|
|
7
|
-
import
|
|
8
|
-
import { AnimatePresence as g, motion as
|
|
3
|
+
import * as f from "@radix-ui/react-visually-hidden";
|
|
4
|
+
import { Button as y } from "@telegraph/button";
|
|
5
|
+
import { Lucide as b } from "@telegraph/icon";
|
|
6
|
+
import { Stack as a, Box as h } from "@telegraph/layout";
|
|
7
|
+
import s from "clsx";
|
|
8
|
+
import { AnimatePresence as g, motion as d } from "framer-motion";
|
|
9
9
|
import w from "react";
|
|
10
|
-
const
|
|
11
|
-
defaultOpen:
|
|
10
|
+
const v = ({
|
|
11
|
+
defaultOpen: i,
|
|
12
12
|
open: r,
|
|
13
|
-
onOpenChange:
|
|
14
|
-
a11yTitle:
|
|
13
|
+
onOpenChange: o,
|
|
14
|
+
a11yTitle: m,
|
|
15
15
|
a11yDescription: n,
|
|
16
|
-
className:
|
|
17
|
-
children:
|
|
16
|
+
className: p,
|
|
17
|
+
children: u,
|
|
18
18
|
...c
|
|
19
19
|
}) => /* @__PURE__ */ l(
|
|
20
20
|
e.Root,
|
|
21
21
|
{
|
|
22
22
|
open: r,
|
|
23
|
-
onOpenChange:
|
|
24
|
-
defaultOpen:
|
|
23
|
+
onOpenChange: o,
|
|
24
|
+
defaultOpen: i,
|
|
25
25
|
children: [
|
|
26
|
-
/* @__PURE__ */ l(
|
|
27
|
-
/* @__PURE__ */ t(e.Title, { children:
|
|
26
|
+
/* @__PURE__ */ l(f.Root, { children: [
|
|
27
|
+
/* @__PURE__ */ t(e.Title, { children: m }),
|
|
28
28
|
n && /* @__PURE__ */ t(e.Description, { children: n })
|
|
29
29
|
] }),
|
|
30
|
-
/* @__PURE__ */ t(g, { children: r && /* @__PURE__ */ t(
|
|
30
|
+
/* @__PURE__ */ t(g, { children: r && /* @__PURE__ */ t(x, { children: /* @__PURE__ */ l(e.Overlay, { children: [
|
|
31
31
|
/* @__PURE__ */ t(
|
|
32
|
-
|
|
32
|
+
h,
|
|
33
33
|
{
|
|
34
|
-
as:
|
|
35
|
-
onClick: () =>
|
|
34
|
+
as: d.div,
|
|
35
|
+
onClick: () => o == null ? void 0 : o(!1),
|
|
36
36
|
initial: { backdropFilter: "blur(0px)", opacity: 0 },
|
|
37
37
|
animate: { backdropFilter: "blur(4px)", opacity: 1 },
|
|
38
38
|
exit: { backdropFilter: "blur(0px)", opacity: 0 },
|
|
@@ -43,46 +43,52 @@ const k = ({
|
|
|
43
43
|
/* @__PURE__ */ t(
|
|
44
44
|
a,
|
|
45
45
|
{
|
|
46
|
-
className:
|
|
46
|
+
className: s(
|
|
47
47
|
"fixed z-modal top-0 left-1/2 -translate-x-1/2",
|
|
48
|
-
"
|
|
49
|
-
|
|
48
|
+
"w-full",
|
|
49
|
+
"max-h-[calc(100vh-var(--tgph-spacing-32))] max-w-[calc(100vw-var(--tgph-spacing-8))]"
|
|
50
50
|
),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
51
|
+
children: /* @__PURE__ */ t(
|
|
52
|
+
a,
|
|
53
|
+
{
|
|
54
|
+
className: s("shadow-1", p),
|
|
55
|
+
direction: "column",
|
|
56
|
+
as: d.div,
|
|
57
|
+
my: "16",
|
|
58
|
+
initial: { scale: 0.8, opacity: 0, y: -20, x: "-50%" },
|
|
59
|
+
animate: { scale: 1, opacity: 1, y: 0, x: "-50%" },
|
|
60
|
+
exit: { scale: 0.8, opacity: 0, y: -20, x: "-50%" },
|
|
61
|
+
transition: { duration: 0.2, bounce: 0, type: "spring" },
|
|
62
|
+
maxW: c.maxW ?? "140",
|
|
63
|
+
w: c.w ?? "full",
|
|
64
|
+
bg: "surface-1",
|
|
65
|
+
border: !0,
|
|
66
|
+
rounded: "4",
|
|
67
|
+
...c,
|
|
68
|
+
children: u
|
|
69
|
+
}
|
|
70
|
+
)
|
|
65
71
|
}
|
|
66
72
|
)
|
|
67
73
|
] }) }) })
|
|
68
74
|
]
|
|
69
75
|
}
|
|
70
|
-
),
|
|
71
|
-
({ children:
|
|
76
|
+
), k = w.forwardRef(
|
|
77
|
+
({ children: i, ...r }, o) => /* @__PURE__ */ t(e.Content, { ref: o, ...r, asChild: !0, children: /* @__PURE__ */ t(a, { direction: "column", children: i }) })
|
|
72
78
|
), j = ({
|
|
73
|
-
size:
|
|
79
|
+
size: i = "1",
|
|
74
80
|
variant: r = "ghost",
|
|
75
|
-
...
|
|
81
|
+
...o
|
|
76
82
|
}) => /* @__PURE__ */ t(e.Close, { asChild: !0, children: /* @__PURE__ */ t(
|
|
77
|
-
|
|
83
|
+
y,
|
|
78
84
|
{
|
|
79
|
-
icon: { icon:
|
|
85
|
+
icon: { icon: b.X, alt: "Close Modal" },
|
|
80
86
|
variant: r,
|
|
81
|
-
size:
|
|
82
|
-
...
|
|
87
|
+
size: i,
|
|
88
|
+
...o
|
|
83
89
|
}
|
|
84
|
-
) }), F = ({ children:
|
|
85
|
-
children:
|
|
90
|
+
) }), F = ({ children: i, ...r }) => /* @__PURE__ */ t(a, { direction: "column", px: "6", py: "4", ...r, children: i }), R = ({
|
|
91
|
+
children: i,
|
|
86
92
|
...r
|
|
87
93
|
}) => /* @__PURE__ */ t(
|
|
88
94
|
a,
|
|
@@ -94,10 +100,10 @@ const k = ({
|
|
|
94
100
|
py: "4",
|
|
95
101
|
borderBottom: !0,
|
|
96
102
|
...r,
|
|
97
|
-
children:
|
|
103
|
+
children: i
|
|
98
104
|
}
|
|
99
105
|
), B = ({
|
|
100
|
-
children:
|
|
106
|
+
children: i,
|
|
101
107
|
...r
|
|
102
108
|
}) => /* @__PURE__ */ t(
|
|
103
109
|
a,
|
|
@@ -110,12 +116,12 @@ const k = ({
|
|
|
110
116
|
py: "4",
|
|
111
117
|
borderTop: !0,
|
|
112
118
|
...r,
|
|
113
|
-
children:
|
|
119
|
+
children: i
|
|
114
120
|
}
|
|
115
121
|
), C = {};
|
|
116
122
|
Object.assign(C, {
|
|
117
|
-
Root:
|
|
118
|
-
Content:
|
|
123
|
+
Root: v,
|
|
124
|
+
Content: k,
|
|
119
125
|
Close: j,
|
|
120
126
|
Body: F,
|
|
121
127
|
Header: R,
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import * as Dialog from \"@radix-ui/react-dialog\";\nimport * as VisuallyHidden from \"@radix-ui/react-visually-hidden\";\nimport { Button } from \"@telegraph/button\";\nimport type {\n PolymorphicProps,\n TgphComponentProps,\n TgphElement,\n} from \"@telegraph/helpers\";\nimport { Lucide } from \"@telegraph/icon\";\nimport { Box, Stack } from \"@telegraph/layout\";\nimport clsx from \"clsx\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport React from \"react\";\n\ntype RootProps = Omit<\n React.ComponentPropsWithoutRef<typeof Dialog.Root>,\n \"modal\"\n> &\n TgphComponentProps<typeof Stack> & {\n a11yTitle: string;\n a11yDescription?: string;\n };\n\nconst Root = ({\n defaultOpen,\n open,\n onOpenChange,\n a11yTitle,\n a11yDescription,\n className,\n children,\n ...props\n}: RootProps) => {\n return (\n <Dialog.Root\n open={open}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n <VisuallyHidden.Root>\n <Dialog.Title>{a11yTitle}</Dialog.Title>\n {a11yDescription && (\n <Dialog.Description>{a11yDescription}</Dialog.Description>\n )}\n </VisuallyHidden.Root>\n <AnimatePresence>\n {open && (\n <>\n <Dialog.Overlay>\n <Box\n as={motion.div}\n onClick={() => onOpenChange?.(false)}\n initial={{ backdropFilter: \"blur(0px)\", opacity: 0 }}\n animate={{ backdropFilter: \"blur(4px)\", opacity: 1 }}\n exit={{ backdropFilter: \"blur(0px)\", opacity: 0 }}\n transition={{ duration: 0.3, bounce: 0, type: \"spring\" }}\n className=\"fixed inset-0 bg-alpha-black-4 z-overlay\"\n />\n <Stack\n className={clsx(\n \"fixed z-modal top-0 left-1/2 -translate-x-1/2\",\n \"max-h-[calc(100vh-var(--tgph-spacing-32))]
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import * as Dialog from \"@radix-ui/react-dialog\";\nimport * as VisuallyHidden from \"@radix-ui/react-visually-hidden\";\nimport { Button } from \"@telegraph/button\";\nimport type {\n PolymorphicProps,\n TgphComponentProps,\n TgphElement,\n} from \"@telegraph/helpers\";\nimport { Lucide } from \"@telegraph/icon\";\nimport { Box, Stack } from \"@telegraph/layout\";\nimport clsx from \"clsx\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport React from \"react\";\n\ntype RootProps = Omit<\n React.ComponentPropsWithoutRef<typeof Dialog.Root>,\n \"modal\"\n> &\n TgphComponentProps<typeof Stack> & {\n a11yTitle: string;\n a11yDescription?: string;\n };\n\nconst Root = ({\n defaultOpen,\n open,\n onOpenChange,\n a11yTitle,\n a11yDescription,\n className,\n children,\n ...props\n}: RootProps) => {\n return (\n <Dialog.Root\n open={open}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n <VisuallyHidden.Root>\n <Dialog.Title>{a11yTitle}</Dialog.Title>\n {a11yDescription && (\n <Dialog.Description>{a11yDescription}</Dialog.Description>\n )}\n </VisuallyHidden.Root>\n <AnimatePresence>\n {open && (\n <>\n <Dialog.Overlay>\n <Box\n as={motion.div}\n onClick={() => onOpenChange?.(false)}\n initial={{ backdropFilter: \"blur(0px)\", opacity: 0 }}\n animate={{ backdropFilter: \"blur(4px)\", opacity: 1 }}\n exit={{ backdropFilter: \"blur(0px)\", opacity: 0 }}\n transition={{ duration: 0.3, bounce: 0, type: \"spring\" }}\n className=\"fixed inset-0 bg-alpha-black-4 z-overlay\"\n />\n <Stack\n className={clsx(\n \"fixed z-modal top-0 left-1/2 -translate-x-1/2\",\n \"w-full\",\n \"max-h-[calc(100vh-var(--tgph-spacing-32))] max-w-[calc(100vw-var(--tgph-spacing-8))]\",\n )}\n >\n <Stack\n className={clsx(\"shadow-1\", className)}\n direction=\"column\"\n as={motion.div}\n my=\"16\"\n initial={{ scale: 0.8, opacity: 0, y: -20, x: \"-50%\" }}\n animate={{ scale: 1, opacity: 1, y: 0, x: \"-50%\" }}\n exit={{ scale: 0.8, opacity: 0, y: -20, x: \"-50%\" }}\n transition={{ duration: 0.2, bounce: 0, type: \"spring\" }}\n maxW={props.maxW ?? \"140\"}\n w={props.w ?? \"full\"}\n bg=\"surface-1\"\n border\n rounded=\"4\"\n {...props}\n >\n {children}\n </Stack>\n </Stack>\n </Dialog.Overlay>\n </>\n )}\n </AnimatePresence>\n </Dialog.Root>\n );\n};\n\ntype ContentProps = React.ComponentPropsWithoutRef<typeof Dialog.Content>;\ntype ContentRef = React.ElementRef<typeof Dialog.Content>;\n\nconst Content = React.forwardRef<ContentRef, ContentProps>(\n ({ children, ...props }, forwardedRef) => {\n return (\n <Dialog.Content ref={forwardedRef} {...props} asChild>\n <Stack direction=\"column\">{children}</Stack>\n </Dialog.Content>\n );\n },\n);\n\ntype CloseProps<T extends TgphElement> = TgphComponentProps<typeof Button<T>> &\n Omit<React.ComponentPropsWithoutRef<typeof Dialog.Close>, \"color\">;\nconst Close = <T extends TgphElement>({\n size = \"1\",\n variant = \"ghost\",\n ...props\n}: CloseProps<T>) => {\n return (\n <Dialog.Close asChild>\n <Button\n icon={{ icon: Lucide.X, alt: \"Close Modal\" }}\n variant={variant}\n size={size}\n {...props}\n />\n </Dialog.Close>\n );\n};\n\ntype BodyProps<T extends TgphElement> = PolymorphicProps<T> &\n TgphComponentProps<typeof Stack<T>>;\n\nconst Body = <T extends TgphElement>({ children, ...props }: BodyProps<T>) => {\n return (\n <Stack direction=\"column\" px=\"6\" py=\"4\" {...props}>\n {children}\n </Stack>\n );\n};\n\ntype HeaderProps<T extends TgphElement> = PolymorphicProps<T> &\n TgphComponentProps<typeof Stack<T>>;\n\nconst Header = <T extends TgphElement>({\n children,\n ...props\n}: HeaderProps<T>) => {\n return (\n <Stack\n direction=\"row\"\n justify=\"space-between\"\n align=\"center\"\n px=\"6\"\n py=\"4\"\n borderBottom\n {...props}\n >\n {children}\n </Stack>\n );\n};\n\ntype FooterProps<T extends TgphElement> = PolymorphicProps<T> &\n TgphComponentProps<typeof Stack<T>>;\n\nconst Footer = <T extends TgphElement>({\n children,\n ...props\n}: FooterProps<T>) => {\n return (\n <Stack\n direction=\"row\"\n align=\"center\"\n justify=\"end\"\n gap=\"2\"\n px=\"6\"\n py=\"4\"\n borderTop\n {...props}\n >\n {children}\n </Stack>\n );\n};\n\nconst Modal = {} as {\n Root: typeof Root;\n Content: typeof Content;\n Close: typeof Close;\n Body: typeof Body;\n Header: typeof Header;\n Footer: typeof Footer;\n};\n\nObject.assign(Modal, {\n Root,\n Content,\n Close,\n Body,\n Header,\n Footer,\n});\n\nexport { Modal };\n"],"names":["Root","defaultOpen","open","onOpenChange","a11yTitle","a11yDescription","className","children","props","jsxs","Dialog","VisuallyHidden","jsx","AnimatePresence","Box","motion","Stack","clsx","Content","React","forwardedRef","Close","size","variant","Button","Lucide","Body","Header","Footer","Modal"],"mappings":";;;;;;;;;AAuBA,MAAMA,IAAO,CAAC;AAAA,EACZ,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAACC,EAAO;AAAA,EAAP;AAAA,IACC,MAAAR;AAAA,IACA,cAAAC;AAAA,IACA,aAAAF;AAAA,IAEA,UAAA;AAAA,MAAC,gBAAAQ,EAAAE,EAAe,MAAf,EACC,UAAA;AAAA,QAAC,gBAAAC,EAAAF,EAAO,OAAP,EAAc,UAAUN,EAAA,CAAA;AAAA,QACxBC,KACC,gBAAAO,EAACF,EAAO,aAAP,EAAoB,UAAgBL,GAAA;AAAA,MAAA,GAEzC;AAAA,wBACCQ,GACE,EAAA,U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H,UAAAD;AAAA,EAAA;AAAA,GAKDsB,IAAQ,CAAC;AASf,OAAO,OAAOA,GAAO;AAAA,EACnB,MAAA7B;AAAA,EACA,SAAAkB;AAAA,EACA,OAAAG;AAAA,EACA,MAAAK;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AACF,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAO,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,SAAS,GAAG,IAAI,CACnB,KAAK,CAAC,wBAAwB,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,EAClD,OAAO,CACR,GACC,kBAAkB,CAAC,OAAO,KAAK,CAAC,GAAG;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEJ,QAAA,MAAM,IAAI,mGASP,SAAS,
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAO,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,SAAS,GAAG,I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W;YACT,aAAa;YACb,aAAa;CACtB,CAAC;AAWF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telegraph/modal",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"repository": "https://github.com/knocklabs/telegraph/tree/main/packages/modal",
|
|
5
5
|
"author": "@knocklabs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@radix-ui/react-dialog": "^1.0.5",
|
|
38
38
|
"@radix-ui/react-visually-hidden": "^1.0.3",
|
|
39
|
-
"@telegraph/button": "^0.0.
|
|
40
|
-
"@telegraph/icon": "^0.0.
|
|
41
|
-
"@telegraph/layout": "^0.0.
|
|
39
|
+
"@telegraph/button": "^0.0.23",
|
|
40
|
+
"@telegraph/icon": "^0.0.14",
|
|
41
|
+
"@telegraph/layout": "^0.0.14",
|
|
42
42
|
"clsx": "^2.1.0",
|
|
43
43
|
"framer-motion": "^11.1.9"
|
|
44
44
|
},
|