@stokelp/ui 2.120.0 → 2.122.0
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/dist/components/app/navigation/AppNavigation.cjs +1 -1
- package/dist/components/app/navigation/AppNavigation.cjs.map +1 -1
- package/dist/components/app/navigation/AppNavigation.js +27 -15
- package/dist/components/app/navigation/AppNavigation.js.map +1 -1
- package/dist/components/combobox/Combobox.cjs +1 -1
- package/dist/components/combobox/Combobox.cjs.map +1 -1
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/dialog/styled.cjs +1 -1
- package/dist/components/dialog/styled.cjs.map +1 -1
- package/dist/components/dialog/styled.d.ts +1 -1
- package/dist/components/dialog/styled.js +39 -40
- package/dist/components/dialog/styled.js.map +1 -1
- package/dist/components/drawer/Drawer.cjs +1 -1
- package/dist/components/drawer/Drawer.cjs.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +1 -1
- package/dist/components/drawer/Drawer.js +28 -29
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/menu/Menu.d.ts +1 -1
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/theme/recipes/dialog.cjs +1 -1
- package/dist/theme/recipes/dialog.cjs.map +1 -1
- package/dist/theme/recipes/dialog.js +1 -0
- package/dist/theme/recipes/dialog.js.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +2 -2
- package/dist/utils/overlay-lock-cleanup.cjs +0 -2
- package/dist/utils/overlay-lock-cleanup.cjs.map +0 -1
- package/dist/utils/overlay-lock-cleanup.d.ts +0 -2
- package/dist/utils/overlay-lock-cleanup.js +0 -38
- package/dist/utils/overlay-lock-cleanup.js.map +0 -1
|
@@ -1,66 +1,65 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __exportAll as e } from "../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { createStyleContext as t } from "../../utils/slots.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { token as g } from "@stokelp/styled-system/tokens";
|
|
4
|
+
import { IconButton as n } from "../icon-button/IconButton.js";
|
|
5
|
+
import { DrawerCloseTrigger as r } from "../drawer/Drawer.js";
|
|
6
|
+
import { Dialog as i, Portal as a, ark as o, useDialogContext as s } from "@ark-ui/react";
|
|
7
|
+
import { styled as c } from "@stokelp/styled-system/jsx";
|
|
8
|
+
import { dialog as l } from "@stokelp/styled-system/recipes";
|
|
9
|
+
import { forwardRef as u, useLayoutEffect as d } from "react";
|
|
10
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
|
+
import { useMediaQuery as m } from "usehooks-ts";
|
|
12
|
+
import { token as h } from "@stokelp/styled-system/tokens";
|
|
14
13
|
//#region src/components/dialog/styled.tsx
|
|
15
|
-
var
|
|
16
|
-
Backdrop: () =>
|
|
17
|
-
Body: () =>
|
|
18
|
-
CloseTrigger: () =>
|
|
19
|
-
Content: () =>
|
|
20
|
-
Footer: () =>
|
|
21
|
-
Header: () =>
|
|
22
|
-
Positioner: () =>
|
|
23
|
-
Root: () =>
|
|
24
|
-
Title: () =>
|
|
25
|
-
Trigger: () =>
|
|
26
|
-
}), { withProvider:
|
|
14
|
+
var g = /* @__PURE__ */ e({
|
|
15
|
+
Backdrop: () => b,
|
|
16
|
+
Body: () => E,
|
|
17
|
+
CloseTrigger: () => x,
|
|
18
|
+
Content: () => C,
|
|
19
|
+
Footer: () => D,
|
|
20
|
+
Header: () => T,
|
|
21
|
+
Positioner: () => O,
|
|
22
|
+
Root: () => y,
|
|
23
|
+
Title: () => k,
|
|
24
|
+
Trigger: () => A
|
|
25
|
+
}), { withProvider: _, withContext: v } = t(l, { dataAttr: !0 }), y = _(i.Root, void 0, { defaultProps: {
|
|
27
26
|
lazyMount: !0,
|
|
28
27
|
unmountOnExit: !0
|
|
29
|
-
} }),
|
|
30
|
-
let
|
|
31
|
-
return
|
|
32
|
-
if (!
|
|
33
|
-
let { id: e } =
|
|
28
|
+
} }), b = v(c(i.Backdrop), "backdrop"), x = v(c(i.CloseTrigger), "closeTrigger"), S = u(({ children: e, ...t }, n) => {
|
|
29
|
+
let r = m(`(max-width: ${h("breakpoints.md")})`, { defaultValue: !1 }), { open: o, getContentProps: c } = s();
|
|
30
|
+
return d(() => {
|
|
31
|
+
if (!o) return;
|
|
32
|
+
let { id: e } = c();
|
|
34
33
|
e && setTimeout(() => {
|
|
35
34
|
let t = document.getElementById(e);
|
|
36
35
|
if (t) {
|
|
37
36
|
let e = t.querySelector("footer");
|
|
38
|
-
e && (
|
|
37
|
+
e && (r ? t.style.setProperty("--footer-height", `${Math.ceil(e.clientHeight)}px`) : t.style.setProperty("--footer-height", "70px"));
|
|
39
38
|
}
|
|
40
39
|
}, 0);
|
|
41
|
-
}, [
|
|
42
|
-
ref:
|
|
40
|
+
}, [o, r]), /* @__PURE__ */ p(a, { children: [/* @__PURE__ */ f(b, {}), /* @__PURE__ */ f(O, { children: /* @__PURE__ */ f(i.Content, {
|
|
41
|
+
ref: n,
|
|
43
42
|
...t,
|
|
44
43
|
children: e
|
|
45
44
|
}) })] });
|
|
46
45
|
});
|
|
47
|
-
|
|
48
|
-
var
|
|
49
|
-
...
|
|
46
|
+
S.displayName = i.Content.displayName;
|
|
47
|
+
var C = v(c(S), "content"), w = u(({ children: e, showCloseTrigger: t = !0, ...i }, a) => /* @__PURE__ */ p(o.header, {
|
|
48
|
+
...i,
|
|
50
49
|
ref: a,
|
|
51
|
-
children: [e, t && /* @__PURE__ */
|
|
50
|
+
children: [e, t && /* @__PURE__ */ f(r, {
|
|
52
51
|
asChild: !0,
|
|
53
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ f(n, {
|
|
54
53
|
ml: "auto",
|
|
55
54
|
"aria-label": "close",
|
|
56
55
|
variant: "tertiary",
|
|
57
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ f("svg", {
|
|
58
57
|
width: "16",
|
|
59
58
|
height: "16",
|
|
60
59
|
viewBox: "0 0 16 16",
|
|
61
60
|
fill: "none",
|
|
62
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
63
|
-
children: /* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ f("path", {
|
|
64
63
|
fillRule: "evenodd",
|
|
65
64
|
clipRule: "evenodd",
|
|
66
65
|
d: "M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z",
|
|
@@ -70,9 +69,9 @@ var w = y(l(C), "content"), T = d(({ children: e, showCloseTrigger: t = !0, ...n
|
|
|
70
69
|
})
|
|
71
70
|
})]
|
|
72
71
|
}));
|
|
73
|
-
|
|
74
|
-
var
|
|
72
|
+
w.displayName = "DialogHeader";
|
|
73
|
+
var T = v(c(w), "header"), E = v(c(o.main), "body"), D = v(c(o.footer), "footer"), O = v(c(i.Positioner), "positioner"), k = v(c(i.Title), "title"), A = v(c(i.Trigger), "trigger");
|
|
75
74
|
//#endregion
|
|
76
|
-
export {
|
|
75
|
+
export { g as styled_exports };
|
|
77
76
|
|
|
78
77
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","names":[],"sources":["../../../src/components/dialog/styled.tsx"],"sourcesContent":["import { ark, Dialog as ArkDialog, Portal, useDialogContext } from '@ark-ui/react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { dialog } from '@stokelp/styled-system/recipes'\nimport { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef, useLayoutEffect } from 'react'\nimport { createStyleContext } from '~/utils/slots'\nimport {
|
|
1
|
+
{"version":3,"file":"styled.js","names":[],"sources":["../../../src/components/dialog/styled.tsx"],"sourcesContent":["import { ark, Dialog as ArkDialog, Portal, useDialogContext } from '@ark-ui/react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { dialog } from '@stokelp/styled-system/recipes'\nimport { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef, useLayoutEffect } from 'react'\nimport { createStyleContext } from '~/utils/slots'\nimport { IconButton } from '~/components/icon-button'\nimport { DrawerCloseTrigger } from '~/components'\nimport { useMediaQuery } from 'usehooks-ts'\nimport { token } from '@stokelp/styled-system/tokens'\n\nconst { withProvider, withContext } = createStyleContext(dialog, {\n dataAttr: true,\n})\n\nexport const Root = withProvider(ArkDialog.Root, undefined, {\n defaultProps: {\n lazyMount: true,\n unmountOnExit: true,\n },\n})\nexport const Backdrop = withContext(styled(ArkDialog.Backdrop), 'backdrop')\nexport const CloseTrigger = withContext(styled(ArkDialog.CloseTrigger), 'closeTrigger')\n\nconst InternalContent = forwardRef<\n ElementRef<typeof ArkDialog.Content>,\n ComponentPropsWithoutRef<typeof ArkDialog.Content>\n>(({ children, ...props }, ref) => {\n const isMobile = useMediaQuery(`(max-width: ${token('breakpoints.md')})`, {\n defaultValue: false,\n })\n const { open, getContentProps } = useDialogContext()\n\n useLayoutEffect(() => {\n if (!open) return\n const { id } = getContentProps()\n if (!id) return\n setTimeout(() => {\n const $content = document.getElementById(id)\n\n if ($content) {\n const $footer = $content.querySelector('footer')\n if ($footer) {\n if (isMobile) {\n $content.style.setProperty('--footer-height', `${Math.ceil($footer.clientHeight)}px`)\n } else {\n $content.style.setProperty('--footer-height', `70px`)\n }\n }\n }\n }, 0)\n }, [open, isMobile])\n\n return (\n <Portal>\n <Backdrop />\n <Positioner>\n <ArkDialog.Content ref={ref} {...props}>\n {children}\n </ArkDialog.Content>\n </Positioner>\n </Portal>\n )\n})\nInternalContent.displayName = ArkDialog.Content.displayName\n\nexport const Content = withContext(styled(InternalContent), 'content')\n\ntype HeaderProps = ComponentPropsWithoutRef<typeof ark.header> & {\n showCloseTrigger?: boolean\n}\nconst InternalHeader = forwardRef<ElementRef<typeof ark.header>, HeaderProps>(\n ({ children, showCloseTrigger = true, ...props }, ref) => (\n <ark.header {...props} ref={ref}>\n {children}\n {showCloseTrigger && (\n <DrawerCloseTrigger asChild>\n <IconButton ml=\"auto\" aria-label=\"close\" variant=\"tertiary\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n </DrawerCloseTrigger>\n )}\n </ark.header>\n ),\n)\nInternalHeader.displayName = 'DialogHeader'\n\nexport const Header = withContext(styled(InternalHeader), 'header')\nexport const Body = withContext(styled(ark.main), 'body')\nexport const Footer = withContext(styled(ark.footer), 'footer')\nexport const Positioner = withContext(styled(ArkDialog.Positioner), 'positioner')\nexport const Title = withContext(styled(ArkDialog.Title), 'title')\nexport const Trigger = withContext(styled(ArkDialog.Trigger), 'trigger')\n\nexport interface DialogProps extends ComponentProps<typeof Root> {}\nexport interface DialogBackdropProps extends ComponentProps<typeof Backdrop> {}\nexport interface DialogCloseTriggerProps extends ComponentProps<typeof CloseTrigger> {}\nexport interface DialogContentProps extends ComponentProps<typeof Content> {}\nexport interface DialogHeaderProps extends ComponentProps<typeof Header> {}\nexport interface DialogBodyProps extends ComponentProps<typeof Body> {}\nexport interface DialogFooterProps extends ComponentProps<typeof Footer> {}\nexport interface DialogPositionerProps extends ComponentProps<typeof Positioner> {}\nexport interface DialogTitleProps extends ComponentProps<typeof Title> {}\nexport interface DialogTriggerProps extends ComponentProps<typeof Trigger> {}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;IAUM,EAAE,iBAAc,mBAAgB,EAAmB,GAAQ,EAC/D,UAAU,GACZ,CAAC,GAEY,IAAO,EAAa,EAAU,MAAM,KAAA,GAAW,EAC1D,cAAc;CACZ,WAAW;CACX,eAAe;AACjB,EACF,CAAC,GACY,IAAW,EAAY,EAAO,EAAU,QAAQ,GAAG,UAAU,GAC7D,IAAe,EAAY,EAAO,EAAU,YAAY,GAAG,cAAc,GAEhF,IAAkB,GAGrB,EAAE,aAAU,GAAG,KAAS,MAAQ;CACjC,IAAM,IAAW,EAAc,eAAe,EAAM,gBAAgB,EAAE,IAAI,EACxE,cAAc,GAChB,CAAC,GACK,EAAE,SAAM,uBAAoB,EAAiB;CAsBnD,OApBA,QAAsB;EACpB,IAAI,CAAC,GAAM;EACX,IAAM,EAAE,UAAO,EAAgB;EAC1B,KACL,iBAAiB;GACf,IAAM,IAAW,SAAS,eAAe,CAAE;GAE3C,IAAI,GAAU;IACZ,IAAM,IAAU,EAAS,cAAc,QAAQ;IAC/C,AAAI,MACE,IACF,EAAS,MAAM,YAAY,mBAAmB,GAAG,KAAK,KAAK,EAAQ,YAAY,EAAE,GAAG,IAEpF,EAAS,MAAM,YAAY,mBAAmB,MAAM;GAG1D;EACF,GAAG,CAAC;CACN,GAAG,CAAC,GAAM,CAAQ,CAAC,GAGjB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,CAAW,CAAA,GACX,kBAAC,GAAD,EAAA,UACE,kBAAC,EAAU,SAAX;EAAwB;EAAK,GAAI;EAC9B;CACgB,CAAA,EACT,CAAA,CACN,EAAA,CAAA;AAEZ,CAAC;AACD,EAAgB,cAAc,EAAU,QAAQ;AAEhD,IAAa,IAAU,EAAY,EAAO,CAAe,GAAG,SAAS,GAK/D,IAAiB,GACpB,EAAE,aAAU,sBAAmB,IAAM,GAAG,KAAS,MAChD,kBAAC,EAAI,QAAL;CAAY,GAAI;CAAY;WAA5B,CACG,GACA,KACC,kBAAC,GAAD;EAAoB,SAAA;YAClB,kBAAC,GAAD;GAAY,IAAG;GAAO,cAAW;GAAQ,SAAQ;aAC/C,kBAAC,OAAD;IAAK,OAAM;IAAK,QAAO;IAAK,SAAQ;IAAY,MAAK;IAAO,OAAM;cAChE,kBAAC,QAAD;KACE,UAAS;KACT,UAAS;KACT,GAAE;KACF,MAAK;IACN,CAAA;GACE,CAAA;EACK,CAAA;CACM,CAAA,CAEZ;EAEhB;AACA,EAAe,cAAc;AAE7B,IAAa,IAAS,EAAY,EAAO,CAAc,GAAG,QAAQ,GACrD,IAAO,EAAY,EAAO,EAAI,IAAI,GAAG,MAAM,GAC3C,IAAS,EAAY,EAAO,EAAI,MAAM,GAAG,QAAQ,GACjD,IAAa,EAAY,EAAO,EAAU,UAAU,GAAG,YAAY,GACnE,IAAQ,EAAY,EAAO,EAAU,KAAK,GAAG,OAAO,GACpD,IAAU,EAAY,EAAO,EAAU,OAAO,GAAG,SAAS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require("../../utils/slots.cjs"),t=require("
|
|
1
|
+
"use client";const e=require("../../utils/slots.cjs"),t=require("../icon-button/IconButton.cjs");let n=require("@ark-ui/react"),r=require("@stokelp/styled-system/jsx"),i=require("@stokelp/styled-system/recipes"),a=require("react"),o=require("react/jsx-runtime"),s=require("usehooks-ts"),c=require("@stokelp/styled-system/tokens");var{withProvider:l,withContext:u}=e.createStyleContext(i.drawer),d=l(n.Dialog.Root,void 0,{defaultProps:{unmountOnExit:!0,lazyMount:!0}}),f=u((0,r.styled)(n.ark.main),`body`),p=u((0,r.styled)(n.Dialog.CloseTrigger),`closeTrigger`),m=u((0,r.styled)(n.ark.footer),`footer`),h=(0,a.forwardRef)(({children:e,showCloseTrigger:r=!0,...i},a)=>(0,o.jsxs)(n.ark.header,{...i,ref:a,children:[e,r&&(0,o.jsx)(p,{asChild:!0,children:(0,o.jsx)(t.IconButton,{ml:`auto`,"aria-label":`close`,variant:`tertiary`,children:(0,o.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,o.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z`,fill:`currentColor`})})})})]}));h.displayName=`DrawerHeader`;var g=u(h,`header`),_=u((0,r.styled)(n.Dialog.Title),`title`),v=u((0,r.styled)(n.Dialog.Trigger),`trigger`),y=u((0,r.styled)(n.Dialog.Positioner),`positioner`),b=u((0,r.styled)(n.Dialog.Backdrop),`backdrop`),x=(0,a.forwardRef)(({children:e,...t},r)=>{let i=(0,s.useMediaQuery)(`(max-width: ${(0,c.token)(`breakpoints.md`)})`,{defaultValue:!1}),{open:l,getContentProps:u}=(0,n.useDialogContext)();return(0,a.useLayoutEffect)(()=>{if(!l)return;let{id:e}=u();if(!e)return;let t=document.getElementById(e);if(t){let e=t.querySelector(`footer`);e&&(i?t.style.setProperty(`--footer-height`,`${Math.ceil(e.clientHeight)}px`):t.style.setProperty(`--footer-height`,`70px`))}},[l,i]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{}),(0,o.jsx)(y,{children:(0,o.jsx)(n.Dialog.Content,{ref:r,...t,children:e})})]})});x.displayName=n.Dialog.Content.displayName;var S=u((0,r.styled)(x),`content`),C=n.Dialog.Context;exports.Drawer=d,exports.DrawerBody=f,exports.DrawerCloseTrigger=p,exports.DrawerContent=S,exports.DrawerContext=C,exports.DrawerFooter=m,exports.DrawerHeader=g,exports.DrawerTitle=_,exports.DrawerTrigger=v;
|
|
2
2
|
//# sourceMappingURL=Drawer.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.cjs","names":[],"sources":["../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import { ark, Dialog as ArkDrawer, useDialogContext } from '@ark-ui/react'\nimport { useMediaQuery } from 'usehooks-ts'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { drawer } from '@stokelp/styled-system/recipes'\nimport { token } from '@stokelp/styled-system/tokens'\nimport { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef, useLayoutEffect } from 'react'\n\nimport { createStyleContext } from '~/utils/slots'\nimport {
|
|
1
|
+
{"version":3,"file":"Drawer.cjs","names":[],"sources":["../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import { ark, Dialog as ArkDrawer, useDialogContext } from '@ark-ui/react'\nimport { useMediaQuery } from 'usehooks-ts'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { drawer } from '@stokelp/styled-system/recipes'\nimport { token } from '@stokelp/styled-system/tokens'\nimport { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef, useLayoutEffect } from 'react'\n\nimport { createStyleContext } from '~/utils/slots'\nimport { IconButton } from '~/components/icon-button'\n\nconst { withProvider, withContext } = createStyleContext(drawer)\n\nexport const Drawer = withProvider(ArkDrawer.Root, undefined, {\n defaultProps: {\n unmountOnExit: true,\n lazyMount: true,\n },\n})\nexport const DrawerBody = withContext(styled(ark.main), 'body')\nexport const DrawerCloseTrigger = withContext(styled(ArkDrawer.CloseTrigger), 'closeTrigger')\nexport const DrawerFooter = withContext(styled(ark.footer), 'footer')\n\ntype HeaderProps = ComponentPropsWithoutRef<typeof ark.header> & {\n showCloseTrigger?: boolean\n}\n\nconst Header = forwardRef<ElementRef<typeof ark.header>, HeaderProps>(\n ({ children, showCloseTrigger = true, ...props }, ref) => (\n <ark.header {...props} ref={ref}>\n {children}\n {showCloseTrigger && (\n <DrawerCloseTrigger asChild>\n <IconButton ml=\"auto\" aria-label=\"close\" variant=\"tertiary\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n </DrawerCloseTrigger>\n )}\n </ark.header>\n ),\n)\nHeader.displayName = 'DrawerHeader'\n\nexport const DrawerHeader = withContext(Header, 'header')\nexport const DrawerTitle = withContext(styled(ArkDrawer.Title), 'title')\nexport const DrawerTrigger = withContext(styled(ArkDrawer.Trigger), 'trigger')\n\nconst DrawerPositioner = withContext(styled(ArkDrawer.Positioner), 'positioner')\nconst DrawerBackdrop = withContext(styled(ArkDrawer.Backdrop), 'backdrop')\n\nconst Content = forwardRef<ElementRef<typeof ArkDrawer.Content>, ComponentPropsWithoutRef<typeof ArkDrawer.Content>>(\n ({ children, ...props }, ref) => {\n const isMobile = useMediaQuery(`(max-width: ${token('breakpoints.md')})`, {\n defaultValue: false,\n })\n const { open, getContentProps } = useDialogContext()\n\n useLayoutEffect(() => {\n if (!open) return\n const { id } = getContentProps()\n if (!id) return\n const $content = document.getElementById(id)\n if ($content) {\n const $footer = $content.querySelector('footer')\n if ($footer) {\n if (isMobile) {\n $content.style.setProperty('--footer-height', `${Math.ceil($footer.clientHeight)}px`)\n } else {\n $content.style.setProperty('--footer-height', `70px`)\n }\n }\n }\n }, [open, isMobile])\n\n return (\n <>\n <DrawerBackdrop />\n <DrawerPositioner>\n <ArkDrawer.Content ref={ref} {...props}>\n {children}\n </ArkDrawer.Content>\n </DrawerPositioner>\n </>\n )\n },\n)\nContent.displayName = ArkDrawer.Content.displayName\n\nexport const DrawerContent = withContext(styled(Content), 'content')\nexport const DrawerContext = ArkDrawer.Context\n\nexport interface DrawerProps extends ComponentProps<typeof Drawer> {}\nexport interface DrawerBackdropProps extends ComponentProps<typeof DrawerBackdrop> {}\nexport interface DrawerBodyProps extends ComponentProps<typeof DrawerBody> {}\nexport interface DrawerCloseTriggerProps extends ComponentProps<typeof DrawerCloseTrigger> {}\nexport interface DrawerContentProps extends ComponentProps<typeof DrawerContent> {}\nexport interface DrawerFooterProps extends ComponentProps<typeof DrawerFooter> {}\nexport interface DrawerHeaderProps extends ComponentProps<typeof DrawerHeader> {}\nexport interface DrawerPositionerProps extends ComponentProps<typeof DrawerPositioner> {}\nexport interface DrawerTitleProps extends ComponentProps<typeof DrawerTitle> {}\nexport interface DrawerTriggerProps extends ComponentProps<typeof DrawerTrigger> {}\nexport interface DrawerContextProps extends ComponentProps<typeof DrawerContext> {}\n"],"mappings":"0UAUA,GAAM,CAAE,eAAc,eAAgB,EAAA,mBAAmB,EAAA,MAAM,EAElD,EAAS,EAAa,EAAA,OAAU,KAAM,IAAA,GAAW,CAC5D,aAAc,CACZ,cAAe,GACf,UAAW,EACb,CACF,CAAC,EACY,EAAa,GAAA,EAAA,EAAA,QAAmB,EAAA,IAAI,IAAI,EAAG,MAAM,EACjD,EAAqB,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,YAAY,EAAG,cAAc,EAC/E,EAAe,GAAA,EAAA,EAAA,QAAmB,EAAA,IAAI,MAAM,EAAG,QAAQ,EAM9D,GAAA,EAAA,EAAA,aACH,CAAE,WAAU,mBAAmB,GAAM,GAAG,GAAS,KAChD,EAAA,EAAA,MAAC,EAAA,IAAI,OAAL,CAAY,GAAI,EAAY,eAA5B,CACG,EACA,IACC,EAAA,EAAA,KAAC,EAAD,CAAoB,QAAA,aAClB,EAAA,EAAA,KAAC,EAAA,WAAD,CAAY,GAAG,OAAO,aAAW,QAAQ,QAAQ,qBAC/C,EAAA,EAAA,KAAC,MAAD,CAAK,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,uCAChE,EAAA,EAAA,KAAC,OAAD,CACE,SAAS,UACT,SAAS,UACT,EAAE,4fACF,KAAK,cACN,CAAA,CACE,CAAA,CACK,CAAA,CACM,CAAA,CAEZ,GAEhB,EACA,EAAO,YAAc,eAErB,IAAa,EAAe,EAAY,EAAQ,QAAQ,EAC3C,EAAc,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,KAAK,EAAG,OAAO,EAC1D,EAAgB,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,OAAO,EAAG,SAAS,EAEvE,EAAmB,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,UAAU,EAAG,YAAY,EACzE,EAAiB,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,QAAQ,EAAG,UAAU,EAEnE,GAAA,EAAA,EAAA,aACH,CAAE,WAAU,GAAG,GAAS,IAAQ,CAC/B,IAAM,GAAA,EAAA,EAAA,eAAyB,gBAAA,EAAA,EAAA,OAAqB,gBAAgB,EAAE,GAAI,CACxE,aAAc,EAChB,CAAC,EACK,CAAE,OAAM,oBAAA,EAAA,EAAA,kBAAqC,EAmBnD,OAjBA,EAAA,EAAA,qBAAsB,CACpB,GAAI,CAAC,EAAM,OACX,GAAM,CAAE,MAAO,EAAgB,EAC/B,GAAI,CAAC,EAAI,OACT,IAAM,EAAW,SAAS,eAAe,CAAE,EAC3C,GAAI,EAAU,CACZ,IAAM,EAAU,EAAS,cAAc,QAAQ,EAC3C,IACE,EACF,EAAS,MAAM,YAAY,kBAAmB,GAAG,KAAK,KAAK,EAAQ,YAAY,EAAE,GAAG,EAEpF,EAAS,MAAM,YAAY,kBAAmB,MAAM,EAG1D,CACF,EAAG,CAAC,EAAM,CAAQ,CAAC,GAGjB,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,EAAD,CAAiB,CAAA,GACjB,EAAA,EAAA,KAAC,EAAD,CAAA,UACE,EAAA,EAAA,KAAC,EAAA,OAAU,QAAX,CAAwB,MAAK,GAAI,EAC9B,UACgB,CAAA,CACH,CAAA,CAClB,CAAA,CAAA,CAEN,CACF,EACA,EAAQ,YAAc,EAAA,OAAU,QAAQ,YAExC,IAAa,EAAgB,GAAA,EAAA,EAAA,QAAmB,CAAO,EAAG,SAAS,EACtD,EAAgB,EAAA,OAAU"}
|
|
@@ -3,7 +3,7 @@ import { ComponentProps, ForwardRefExoticComponent, ClassAttributes, HTMLAttribu
|
|
|
3
3
|
import { ComponentVariants } from '../../utils/slots';
|
|
4
4
|
import { DrawerRecipe } from '@stokelp/styled-system/recipes';
|
|
5
5
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
6
|
-
export declare const Drawer: ComponentVariants<(props: ArkDrawer.RootProps) => import("react
|
|
6
|
+
export declare const Drawer: ComponentVariants<(props: ArkDrawer.RootProps) => import("react").JSX.Element, DrawerRecipe>;
|
|
7
7
|
export declare const DrawerBody: StyledComponent<ForwardRefExoticComponent< ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & PolymorphicProps>, {}>;
|
|
8
8
|
export declare const DrawerCloseTrigger: StyledComponent<ForwardRefExoticComponent<ArkDrawer.CloseTriggerProps & RefAttributes<HTMLButtonElement>>, {}>;
|
|
9
9
|
export declare const DrawerFooter: StyledComponent<ForwardRefExoticComponent< ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & PolymorphicProps>, {}>;
|
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createStyleContext as e } from "../../utils/slots.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { token as m } from "@stokelp/styled-system/tokens";
|
|
3
|
+
import { IconButton as t } from "../icon-button/IconButton.js";
|
|
4
|
+
import { Dialog as n, ark as r, useDialogContext as i } from "@ark-ui/react";
|
|
5
|
+
import { styled as a } from "@stokelp/styled-system/jsx";
|
|
6
|
+
import { drawer as o } from "@stokelp/styled-system/recipes";
|
|
7
|
+
import { forwardRef as s, useLayoutEffect as c } from "react";
|
|
8
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
import { useMediaQuery as f } from "usehooks-ts";
|
|
10
|
+
import { token as p } from "@stokelp/styled-system/tokens";
|
|
12
11
|
//#region src/components/drawer/Drawer.tsx
|
|
13
|
-
var { withProvider:
|
|
12
|
+
var { withProvider: m, withContext: h } = e(o), g = m(n.Root, void 0, { defaultProps: {
|
|
14
13
|
unmountOnExit: !0,
|
|
15
14
|
lazyMount: !0
|
|
16
|
-
} }),
|
|
17
|
-
...
|
|
15
|
+
} }), _ = h(a(r.main), "body"), v = h(a(n.CloseTrigger), "closeTrigger"), y = h(a(r.footer), "footer"), b = s(({ children: e, showCloseTrigger: n = !0, ...i }, a) => /* @__PURE__ */ d(r.header, {
|
|
16
|
+
...i,
|
|
18
17
|
ref: a,
|
|
19
|
-
children: [e,
|
|
18
|
+
children: [e, n && /* @__PURE__ */ u(v, {
|
|
20
19
|
asChild: !0,
|
|
21
|
-
children: /* @__PURE__ */
|
|
20
|
+
children: /* @__PURE__ */ u(t, {
|
|
22
21
|
ml: "auto",
|
|
23
22
|
"aria-label": "close",
|
|
24
23
|
variant: "tertiary",
|
|
25
|
-
children: /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ u("svg", {
|
|
26
25
|
width: "16",
|
|
27
26
|
height: "16",
|
|
28
27
|
viewBox: "0 0 16 16",
|
|
29
28
|
fill: "none",
|
|
30
29
|
xmlns: "http://www.w3.org/2000/svg",
|
|
31
|
-
children: /* @__PURE__ */
|
|
30
|
+
children: /* @__PURE__ */ u("path", {
|
|
32
31
|
fillRule: "evenodd",
|
|
33
32
|
clipRule: "evenodd",
|
|
34
33
|
d: "M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z",
|
|
@@ -38,27 +37,27 @@ var { withProvider: h, withContext: g } = e(s), _ = h(r.Root, void 0, { defaultP
|
|
|
38
37
|
})
|
|
39
38
|
})]
|
|
40
39
|
}));
|
|
41
|
-
|
|
42
|
-
var
|
|
43
|
-
let
|
|
44
|
-
return
|
|
45
|
-
if (!
|
|
46
|
-
let { id: e } =
|
|
40
|
+
b.displayName = "DrawerHeader";
|
|
41
|
+
var x = h(b, "header"), S = h(a(n.Title), "title"), C = h(a(n.Trigger), "trigger"), w = h(a(n.Positioner), "positioner"), T = h(a(n.Backdrop), "backdrop"), E = s(({ children: e, ...t }, r) => {
|
|
42
|
+
let a = f(`(max-width: ${p("breakpoints.md")})`, { defaultValue: !1 }), { open: o, getContentProps: s } = i();
|
|
43
|
+
return c(() => {
|
|
44
|
+
if (!o) return;
|
|
45
|
+
let { id: e } = s();
|
|
47
46
|
if (!e) return;
|
|
48
47
|
let t = document.getElementById(e);
|
|
49
48
|
if (t) {
|
|
50
49
|
let e = t.querySelector("footer");
|
|
51
|
-
e && (
|
|
50
|
+
e && (a ? t.style.setProperty("--footer-height", `${Math.ceil(e.clientHeight)}px`) : t.style.setProperty("--footer-height", "70px"));
|
|
52
51
|
}
|
|
53
|
-
}, [
|
|
54
|
-
ref:
|
|
55
|
-
...
|
|
52
|
+
}, [o, a]), /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(T, {}), /* @__PURE__ */ u(w, { children: /* @__PURE__ */ u(n.Content, {
|
|
53
|
+
ref: r,
|
|
54
|
+
...t,
|
|
56
55
|
children: e
|
|
57
56
|
}) })] });
|
|
58
57
|
});
|
|
59
|
-
|
|
60
|
-
var
|
|
58
|
+
E.displayName = n.Content.displayName;
|
|
59
|
+
var D = h(a(E), "content"), O = n.Context;
|
|
61
60
|
//#endregion
|
|
62
|
-
export {
|
|
61
|
+
export { g as Drawer, _ as DrawerBody, v as DrawerCloseTrigger, D as DrawerContent, O as DrawerContext, y as DrawerFooter, x as DrawerHeader, S as DrawerTitle, C as DrawerTrigger };
|
|
63
62
|
|
|
64
63
|
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","names":[],"sources":["../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import { ark, Dialog as ArkDrawer, useDialogContext } from '@ark-ui/react'\nimport { useMediaQuery } from 'usehooks-ts'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { drawer } from '@stokelp/styled-system/recipes'\nimport { token } from '@stokelp/styled-system/tokens'\nimport { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef, useLayoutEffect } from 'react'\n\nimport { createStyleContext } from '~/utils/slots'\nimport {
|
|
1
|
+
{"version":3,"file":"Drawer.js","names":[],"sources":["../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import { ark, Dialog as ArkDrawer, useDialogContext } from '@ark-ui/react'\nimport { useMediaQuery } from 'usehooks-ts'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { drawer } from '@stokelp/styled-system/recipes'\nimport { token } from '@stokelp/styled-system/tokens'\nimport { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef, useLayoutEffect } from 'react'\n\nimport { createStyleContext } from '~/utils/slots'\nimport { IconButton } from '~/components/icon-button'\n\nconst { withProvider, withContext } = createStyleContext(drawer)\n\nexport const Drawer = withProvider(ArkDrawer.Root, undefined, {\n defaultProps: {\n unmountOnExit: true,\n lazyMount: true,\n },\n})\nexport const DrawerBody = withContext(styled(ark.main), 'body')\nexport const DrawerCloseTrigger = withContext(styled(ArkDrawer.CloseTrigger), 'closeTrigger')\nexport const DrawerFooter = withContext(styled(ark.footer), 'footer')\n\ntype HeaderProps = ComponentPropsWithoutRef<typeof ark.header> & {\n showCloseTrigger?: boolean\n}\n\nconst Header = forwardRef<ElementRef<typeof ark.header>, HeaderProps>(\n ({ children, showCloseTrigger = true, ...props }, ref) => (\n <ark.header {...props} ref={ref}>\n {children}\n {showCloseTrigger && (\n <DrawerCloseTrigger asChild>\n <IconButton ml=\"auto\" aria-label=\"close\" variant=\"tertiary\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n </DrawerCloseTrigger>\n )}\n </ark.header>\n ),\n)\nHeader.displayName = 'DrawerHeader'\n\nexport const DrawerHeader = withContext(Header, 'header')\nexport const DrawerTitle = withContext(styled(ArkDrawer.Title), 'title')\nexport const DrawerTrigger = withContext(styled(ArkDrawer.Trigger), 'trigger')\n\nconst DrawerPositioner = withContext(styled(ArkDrawer.Positioner), 'positioner')\nconst DrawerBackdrop = withContext(styled(ArkDrawer.Backdrop), 'backdrop')\n\nconst Content = forwardRef<ElementRef<typeof ArkDrawer.Content>, ComponentPropsWithoutRef<typeof ArkDrawer.Content>>(\n ({ children, ...props }, ref) => {\n const isMobile = useMediaQuery(`(max-width: ${token('breakpoints.md')})`, {\n defaultValue: false,\n })\n const { open, getContentProps } = useDialogContext()\n\n useLayoutEffect(() => {\n if (!open) return\n const { id } = getContentProps()\n if (!id) return\n const $content = document.getElementById(id)\n if ($content) {\n const $footer = $content.querySelector('footer')\n if ($footer) {\n if (isMobile) {\n $content.style.setProperty('--footer-height', `${Math.ceil($footer.clientHeight)}px`)\n } else {\n $content.style.setProperty('--footer-height', `70px`)\n }\n }\n }\n }, [open, isMobile])\n\n return (\n <>\n <DrawerBackdrop />\n <DrawerPositioner>\n <ArkDrawer.Content ref={ref} {...props}>\n {children}\n </ArkDrawer.Content>\n </DrawerPositioner>\n </>\n )\n },\n)\nContent.displayName = ArkDrawer.Content.displayName\n\nexport const DrawerContent = withContext(styled(Content), 'content')\nexport const DrawerContext = ArkDrawer.Context\n\nexport interface DrawerProps extends ComponentProps<typeof Drawer> {}\nexport interface DrawerBackdropProps extends ComponentProps<typeof DrawerBackdrop> {}\nexport interface DrawerBodyProps extends ComponentProps<typeof DrawerBody> {}\nexport interface DrawerCloseTriggerProps extends ComponentProps<typeof DrawerCloseTrigger> {}\nexport interface DrawerContentProps extends ComponentProps<typeof DrawerContent> {}\nexport interface DrawerFooterProps extends ComponentProps<typeof DrawerFooter> {}\nexport interface DrawerHeaderProps extends ComponentProps<typeof DrawerHeader> {}\nexport interface DrawerPositionerProps extends ComponentProps<typeof DrawerPositioner> {}\nexport interface DrawerTitleProps extends ComponentProps<typeof DrawerTitle> {}\nexport interface DrawerTriggerProps extends ComponentProps<typeof DrawerTrigger> {}\nexport interface DrawerContextProps extends ComponentProps<typeof DrawerContext> {}\n"],"mappings":";;;;;;;;;;;AAUA,IAAM,EAAE,iBAAc,mBAAgB,EAAmB,CAAM,GAElD,IAAS,EAAa,EAAU,MAAM,KAAA,GAAW,EAC5D,cAAc;CACZ,eAAe;CACf,WAAW;AACb,EACF,CAAC,GACY,IAAa,EAAY,EAAO,EAAI,IAAI,GAAG,MAAM,GACjD,IAAqB,EAAY,EAAO,EAAU,YAAY,GAAG,cAAc,GAC/E,IAAe,EAAY,EAAO,EAAI,MAAM,GAAG,QAAQ,GAM9D,IAAS,GACZ,EAAE,aAAU,sBAAmB,IAAM,GAAG,KAAS,MAChD,kBAAC,EAAI,QAAL;CAAY,GAAI;CAAY;WAA5B,CACG,GACA,KACC,kBAAC,GAAD;EAAoB,SAAA;YAClB,kBAAC,GAAD;GAAY,IAAG;GAAO,cAAW;GAAQ,SAAQ;aAC/C,kBAAC,OAAD;IAAK,OAAM;IAAK,QAAO;IAAK,SAAQ;IAAY,MAAK;IAAO,OAAM;cAChE,kBAAC,QAAD;KACE,UAAS;KACT,UAAS;KACT,GAAE;KACF,MAAK;IACN,CAAA;GACE,CAAA;EACK,CAAA;CACM,CAAA,CAEZ;EAEhB;AACA,EAAO,cAAc;AAErB,IAAa,IAAe,EAAY,GAAQ,QAAQ,GAC3C,IAAc,EAAY,EAAO,EAAU,KAAK,GAAG,OAAO,GAC1D,IAAgB,EAAY,EAAO,EAAU,OAAO,GAAG,SAAS,GAEvE,IAAmB,EAAY,EAAO,EAAU,UAAU,GAAG,YAAY,GACzE,IAAiB,EAAY,EAAO,EAAU,QAAQ,GAAG,UAAU,GAEnE,IAAU,GACb,EAAE,aAAU,GAAG,KAAS,MAAQ;CAC/B,IAAM,IAAW,EAAc,eAAe,EAAM,gBAAgB,EAAE,IAAI,EACxE,cAAc,GAChB,CAAC,GACK,EAAE,SAAM,uBAAoB,EAAiB;CAmBnD,OAjBA,QAAsB;EACpB,IAAI,CAAC,GAAM;EACX,IAAM,EAAE,UAAO,EAAgB;EAC/B,IAAI,CAAC,GAAI;EACT,IAAM,IAAW,SAAS,eAAe,CAAE;EAC3C,IAAI,GAAU;GACZ,IAAM,IAAU,EAAS,cAAc,QAAQ;GAC/C,AAAI,MACE,IACF,EAAS,MAAM,YAAY,mBAAmB,GAAG,KAAK,KAAK,EAAQ,YAAY,EAAE,GAAG,IAEpF,EAAS,MAAM,YAAY,mBAAmB,MAAM;EAG1D;CACF,GAAG,CAAC,GAAM,CAAQ,CAAC,GAGjB,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD,CAAiB,CAAA,GACjB,kBAAC,GAAD,EAAA,UACE,kBAAC,EAAU,SAAX;EAAwB;EAAK,GAAI;EAC9B;CACgB,CAAA,EACH,CAAA,CAClB,EAAA,CAAA;AAEN,CACF;AACA,EAAQ,cAAc,EAAU,QAAQ;AAExC,IAAa,IAAgB,EAAY,EAAO,CAAO,GAAG,SAAS,GACtD,IAAgB,EAAU"}
|
|
@@ -3,7 +3,7 @@ import { ComponentProps, ForwardRefExoticComponent, RefAttributes } from 'react'
|
|
|
3
3
|
import { ComponentVariants } from '../../utils/slots';
|
|
4
4
|
import { MenuRecipe } from '@stokelp/styled-system/recipes';
|
|
5
5
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
6
|
-
export declare const Root: ComponentVariants<(props: ArkMenu.RootProps) => import("react
|
|
6
|
+
export declare const Root: ComponentVariants<(props: ArkMenu.RootProps) => import("react").JSX.Element, MenuRecipe>;
|
|
7
7
|
export declare const Content: StyledComponent<ForwardRefExoticComponent<Omit<ArkMenu.ContentProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>, {}>;
|
|
8
8
|
export declare const Item: StyledComponent<ForwardRefExoticComponent<ArkMenu.ItemProps & RefAttributes<HTMLDivElement>>, {}>;
|
|
9
9
|
export declare const ItemGroup: StyledComponent<ForwardRefExoticComponent<ArkMenu.ItemGroupProps & RefAttributes<HTMLDivElement>>, {}>;
|
|
@@ -3,7 +3,7 @@ import { ComponentProps, ForwardRefExoticComponent, RefAttributes, ReactNode } f
|
|
|
3
3
|
import { ComponentVariants } from '../../utils/slots';
|
|
4
4
|
import { PopoverRecipe } from '@stokelp/styled-system/recipes';
|
|
5
5
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
6
|
-
export declare const Popover: ComponentVariants<(props: ArkPopover.RootProps) => import("react
|
|
6
|
+
export declare const Popover: ComponentVariants<(props: ArkPopover.RootProps) => import("react").JSX.Element, PopoverRecipe>;
|
|
7
7
|
export declare const PopoverCloseTrigger: StyledComponent<ForwardRefExoticComponent<ArkPopover.CloseTriggerProps & RefAttributes<HTMLButtonElement>>, {}>;
|
|
8
8
|
export declare const PopoverTrigger: StyledComponent<ForwardRefExoticComponent<ArkPopover.TriggerProps & RefAttributes<HTMLButtonElement>>, {}>;
|
|
9
9
|
export declare const PopoverAnchor: StyledComponent<ForwardRefExoticComponent<ArkPopover.AnchorProps & RefAttributes<HTMLDivElement>>, {}>;
|
|
@@ -3,7 +3,7 @@ import { ComponentProps, FC, ReactNode } from 'react';
|
|
|
3
3
|
import { ComponentVariants } from '../../utils/slots';
|
|
4
4
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
5
5
|
import { TooltipRecipe } from '@stokelp/styled-system/recipes';
|
|
6
|
-
declare const TooltipRoot: ComponentVariants<StyledComponent<(props: ArkTooltip.RootProps) => import("react
|
|
6
|
+
declare const TooltipRoot: ComponentVariants<StyledComponent<(props: ArkTooltip.RootProps) => import("react").JSX.Element, {}>, TooltipRecipe>;
|
|
7
7
|
interface TooltipRootProps extends ComponentProps<typeof TooltipRoot> {
|
|
8
8
|
}
|
|
9
9
|
export interface TooltipProps extends TooltipRootProps {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";let e=require("@ark-ui/react");var t=(0,require("@pandacss/dev").defineSlotRecipe)({base:{backdrop:{backdropFilter:`blur(4px)`,background:`primary.300/20`,position:`fixed`,zIndex:`modal`,inset:0,_open:{animation:`backdrop-in`},_closed:{animation:`backdrop-out`}},content:{"--footer-height":`70px`,position:`relative`,'& [data-recipe-slot="header"] + [data-recipe-slot="footer"]':{pt:`space-40`},'&:has([data-recipe-slot="header"] + [data-recipe-slot="footer"]) [data-recipe-slot="header"]':{pb:`calc(var(--footer-height) + {sizes.size-24})`,borderBottomLeftRadius:`radius-16`,borderBottomRightRadius:`radius-16`},_closed:{animation:`dialog-out`},_open:{animation:`dialog-in`},alignSelf:{base:`flex-end`,md:`center`},fontFamily:`satoshi`,display:`flex`,flexDirection:`column`,maxHeight:`100%`,minW:{base:`100%`,md:`800px`},maxW:`922px`,"& > form":{display:`contents`},"& > :first-child, & > form > :first-child":{borderTopLeftRadius:`radius-16`,borderTopRightRadius:`radius-16`},'&:has([data-recipe-slot="header"] + [data-recipe-slot="footer"])':{'& [data-recipe-slot="footer"]':{borderBottomLeftRadius:`radius-16`,borderBottomRightRadius:`radius-16`}},'&:has([data-recipe-slot="header"] + [data-recipe-slot="body"])':{'& [data-recipe-slot="body"]':{borderBottomLeftRadius:`radius-16`,borderBottomRightRadius:`radius-16`}},'&:has([data-recipe-slot="body"] + [data-recipe-slot="footer"])':{'& [data-recipe-slot="footer"]':{borderBottomLeftRadius:`radius-16`,borderBottomRightRadius:`radius-16`}},'&:has([data-recipe-slot="header"] + [data-recipe-slot="body"] + [data-recipe-slot="footer"])':{'& [data-recipe-slot="body"], [data-recipe-slot="footer"]':{borderBottomLeftRadius:`radius-16`,borderBottomRightRadius:`radius-16`}}},header:{'& [data-part="close-trigger"]':{alignSelf:`flex-start`,ml:`auto`},background:`background`,alignItems:`center`,display:`flex`,flexDirection:`row`,gap:`space-16`,px:`space-24`,py:`space-16`},body:{background:`background`,display:`flex`,flex:1,flexDirection:`column`,overflowY:`auto`,px:`space-24`,pt:`space-24`,pb:`calc(var(--footer-height) + {sizes.size-24})`},footer:{background:`background`,position:`absolute`,bottom:0,left:0,right:0,bg:`white/50`,backdropFilter:`auto`,backdropBlur:`4px`,display:`flex`,flexDirection:{base:`column-reverse`,md:`row`},gap:`space-16`,justifyContent:{base:`stretch`,md:`flex-end`},px:`space-24`,pt:`space-16`,pb:`space-16`,borderBottomLeftRadius:`radius-16`,borderBottomRightRadius:`radius-16`},positioner:{alignItems:`center`,display:`flex`,inset:0,justifyContent:`center`,overflow:`auto`,p:{base:`space-8`,md:`space-16`},position:`fixed`,zIndex:`modal`},title:{textStyle:`heading.h4`,color:`primary.900`,fontFamily:`cabinet`}},className:`dialog`,slots:[...e.dialogAnatomy.keys(),`header`,`body`,`footer`]});exports.dialogRecipe=t;
|
|
1
|
+
"use client";let e=require("@ark-ui/react");var t=(0,require("@pandacss/dev").defineSlotRecipe)({base:{backdrop:{backdropFilter:`blur(4px)`,background:`primary.300/20`,position:`fixed`,zIndex:`modal`,inset:0,_open:{animation:`backdrop-in`},_closed:{animation:`backdrop-out`}},content:{"--footer-height":`70px`,position:`relative`,'& [data-recipe-slot="header"] + [data-recipe-slot="footer"]':{pt:`space-40`},'&:has([data-recipe-slot="header"] + [data-recipe-slot="footer"]) [data-recipe-slot="header"]':{pb:`calc(var(--footer-height) + {sizes.size-24})`,borderBottomLeftRadius:`radius-16`,borderBottomRightRadius:`radius-16`},_closed:{animation:`dialog-out`},_open:{animation:`dialog-in`},alignSelf:{base:`flex-end`,md:`center`},fontFamily:`satoshi`,display:`flex`,flexDirection:`column`,maxHeight:`100%`,overflow:`clip`,minW:{base:`100%`,md:`800px`},maxW:`922px`,"& > form":{display:`contents`},"& > :first-child, & > form > :first-child":{borderTopLeftRadius:`radius-16`,borderTopRightRadius:`radius-16`},'&:has([data-recipe-slot="header"] + [data-recipe-slot="footer"])':{'& [data-recipe-slot="footer"]':{borderBottomLeftRadius:`radius-16`,borderBottomRightRadius:`radius-16`}},'&:has([data-recipe-slot="header"] + [data-recipe-slot="body"])':{'& [data-recipe-slot="body"]':{borderBottomLeftRadius:`radius-16`,borderBottomRightRadius:`radius-16`}},'&:has([data-recipe-slot="body"] + [data-recipe-slot="footer"])':{'& [data-recipe-slot="footer"]':{borderBottomLeftRadius:`radius-16`,borderBottomRightRadius:`radius-16`}},'&:has([data-recipe-slot="header"] + [data-recipe-slot="body"] + [data-recipe-slot="footer"])':{'& [data-recipe-slot="body"], [data-recipe-slot="footer"]':{borderBottomLeftRadius:`radius-16`,borderBottomRightRadius:`radius-16`}}},header:{'& [data-part="close-trigger"]':{alignSelf:`flex-start`,ml:`auto`},background:`background`,alignItems:`center`,display:`flex`,flexDirection:`row`,gap:`space-16`,px:`space-24`,py:`space-16`},body:{background:`background`,display:`flex`,flex:1,flexDirection:`column`,overflowY:`auto`,px:`space-24`,pt:`space-24`,pb:`calc(var(--footer-height) + {sizes.size-24})`},footer:{background:`background`,position:`absolute`,bottom:0,left:0,right:0,bg:`white/50`,backdropFilter:`auto`,backdropBlur:`4px`,display:`flex`,flexDirection:{base:`column-reverse`,md:`row`},gap:`space-16`,justifyContent:{base:`stretch`,md:`flex-end`},px:`space-24`,pt:`space-16`,pb:`space-16`,borderBottomLeftRadius:`radius-16`,borderBottomRightRadius:`radius-16`},positioner:{alignItems:`center`,display:`flex`,inset:0,justifyContent:`center`,overflow:`auto`,p:{base:`space-8`,md:`space-16`},position:`fixed`,zIndex:`modal`},title:{textStyle:`heading.h4`,color:`primary.900`,fontFamily:`cabinet`}},className:`dialog`,slots:[...e.dialogAnatomy.keys(),`header`,`body`,`footer`]});exports.dialogRecipe=t;
|
|
2
2
|
//# sourceMappingURL=dialog.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.cjs","names":[],"sources":["../../../src/theme/recipes/dialog.ts"],"sourcesContent":["import { dialogAnatomy } from '@ark-ui/react'\nimport { defineSlotRecipe } from '@pandacss/dev'\n\nexport const dialogRecipe = defineSlotRecipe({\n base: {\n backdrop: {\n backdropFilter: 'blur(4px)',\n background: 'primary.300/20',\n position: 'fixed',\n zIndex: 'modal',\n inset: 0,\n _open: {\n animation: 'backdrop-in',\n },\n _closed: {\n animation: 'backdrop-out',\n },\n },\n content: {\n '--footer-height': '70px',\n position: 'relative',\n '& [data-recipe-slot=\"header\"] + [data-recipe-slot=\"footer\"]': {\n pt: 'space-40',\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"footer\"]) [data-recipe-slot=\"header\"]': {\n pb: 'calc(var(--footer-height) + {sizes.size-24})',\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n _closed: {\n animation: 'dialog-out',\n },\n _open: {\n animation: 'dialog-in',\n },\n alignSelf: {\n base: 'flex-end',\n md: 'center',\n },\n fontFamily: 'satoshi',\n display: 'flex',\n flexDirection: 'column',\n maxHeight: '100%',\n minW: {\n base: '100%',\n md: '800px',\n },\n maxW: '922px',\n '& > form': {\n display: 'contents',\n },\n '& > :first-child, & > form > :first-child': {\n borderTopLeftRadius: 'radius-16',\n borderTopRightRadius: 'radius-16',\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"footer\"])': {\n '& [data-recipe-slot=\"footer\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"body\"])': {\n '& [data-recipe-slot=\"body\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n '&:has([data-recipe-slot=\"body\"] + [data-recipe-slot=\"footer\"])': {\n '& [data-recipe-slot=\"footer\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"body\"] + [data-recipe-slot=\"footer\"])': {\n '& [data-recipe-slot=\"body\"], [data-recipe-slot=\"footer\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n },\n header: {\n '& [data-part=\"close-trigger\"]': {\n alignSelf: 'flex-start',\n ml: 'auto',\n },\n background: 'background',\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'row',\n gap: 'space-16',\n px: 'space-24',\n py: 'space-16',\n },\n body: {\n background: 'background',\n display: 'flex',\n flex: 1,\n flexDirection: 'column',\n overflowY: 'auto',\n px: 'space-24',\n pt: 'space-24',\n pb: 'calc(var(--footer-height) + {sizes.size-24})',\n },\n footer: {\n background: 'background',\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n bg: 'white/50',\n backdropFilter: 'auto',\n backdropBlur: '4px',\n display: 'flex',\n flexDirection: {\n base: 'column-reverse',\n md: 'row',\n },\n gap: 'space-16',\n justifyContent: {\n base: 'stretch',\n md: 'flex-end',\n },\n px: 'space-24',\n pt: 'space-16',\n pb: 'space-16',\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n positioner: {\n alignItems: 'center',\n display: 'flex',\n inset: 0,\n justifyContent: 'center',\n overflow: 'auto',\n p: {\n base: 'space-8',\n md: 'space-16',\n },\n position: 'fixed',\n zIndex: 'modal',\n },\n title: {\n textStyle: 'heading.h4',\n color: 'primary.900',\n fontFamily: 'cabinet',\n },\n },\n className: 'dialog',\n slots: [...dialogAnatomy.keys(), 'header', 'body', 'footer'],\n})\n"],"mappings":"4CAGA,IAAa,GAAA,yBAAA,EAAA,kBAAgC,CAC3C,KAAM,CACJ,SAAU,CACR,eAAgB,YAChB,WAAY,iBACZ,SAAU,QACV,OAAQ,QACR,MAAO,EACP,MAAO,CACL,UAAW,aACb,EACA,QAAS,CACP,UAAW,cACb,CACF,EACA,QAAS,CACP,kBAAmB,OACnB,SAAU,WACV,8DAA+D,CAC7D,GAAI,UACN,EACA,+FAAgG,CAC9F,GAAI,+CACJ,uBAAwB,YACxB,wBAAyB,WAC3B,EACA,QAAS,CACP,UAAW,YACb,EACA,MAAO,CACL,UAAW,WACb,EACA,UAAW,CACT,KAAM,WACN,GAAI,QACN,EACA,WAAY,UACZ,QAAS,OACT,cAAe,SACf,UAAW,
|
|
1
|
+
{"version":3,"file":"dialog.cjs","names":[],"sources":["../../../src/theme/recipes/dialog.ts"],"sourcesContent":["import { dialogAnatomy } from '@ark-ui/react'\nimport { defineSlotRecipe } from '@pandacss/dev'\n\nexport const dialogRecipe = defineSlotRecipe({\n base: {\n backdrop: {\n backdropFilter: 'blur(4px)',\n background: 'primary.300/20',\n position: 'fixed',\n zIndex: 'modal',\n inset: 0,\n _open: {\n animation: 'backdrop-in',\n },\n _closed: {\n animation: 'backdrop-out',\n },\n },\n content: {\n '--footer-height': '70px',\n position: 'relative',\n '& [data-recipe-slot=\"header\"] + [data-recipe-slot=\"footer\"]': {\n pt: 'space-40',\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"footer\"]) [data-recipe-slot=\"header\"]': {\n pb: 'calc(var(--footer-height) + {sizes.size-24})',\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n _closed: {\n animation: 'dialog-out',\n },\n _open: {\n animation: 'dialog-in',\n },\n alignSelf: {\n base: 'flex-end',\n md: 'center',\n },\n fontFamily: 'satoshi',\n display: 'flex',\n flexDirection: 'column',\n maxHeight: '100%',\n // `clip`, not the default `visible`: a body that overflows the card (a long table, a\n // tall form) otherwise leaks its overflow past content and makes both content and the\n // fixed positioner scrollable. Focusing any control inside — a checkbox's hidden\n // input, say — then lets the browser satisfy its scroll-into-view against those bogus\n // scroll ranges by scrolling the dialog itself out of the viewport, while it stays\n // open with the backdrop up and the body inert, so the page reads as frozen. `clip`\n // creates no scroll container at all, leaving body the only thing that scrolls.\n // Popovers/selects/tooltips inside a dialog are portaled, so nothing needs to paint\n // outside the card.\n overflow: 'clip',\n minW: {\n base: '100%',\n md: '800px',\n },\n maxW: '922px',\n '& > form': {\n display: 'contents',\n },\n '& > :first-child, & > form > :first-child': {\n borderTopLeftRadius: 'radius-16',\n borderTopRightRadius: 'radius-16',\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"footer\"])': {\n '& [data-recipe-slot=\"footer\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"body\"])': {\n '& [data-recipe-slot=\"body\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n '&:has([data-recipe-slot=\"body\"] + [data-recipe-slot=\"footer\"])': {\n '& [data-recipe-slot=\"footer\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"body\"] + [data-recipe-slot=\"footer\"])': {\n '& [data-recipe-slot=\"body\"], [data-recipe-slot=\"footer\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n },\n header: {\n '& [data-part=\"close-trigger\"]': {\n alignSelf: 'flex-start',\n ml: 'auto',\n },\n background: 'background',\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'row',\n gap: 'space-16',\n px: 'space-24',\n py: 'space-16',\n },\n body: {\n background: 'background',\n display: 'flex',\n flex: 1,\n flexDirection: 'column',\n overflowY: 'auto',\n px: 'space-24',\n pt: 'space-24',\n pb: 'calc(var(--footer-height) + {sizes.size-24})',\n },\n footer: {\n background: 'background',\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n bg: 'white/50',\n backdropFilter: 'auto',\n backdropBlur: '4px',\n display: 'flex',\n flexDirection: {\n base: 'column-reverse',\n md: 'row',\n },\n gap: 'space-16',\n justifyContent: {\n base: 'stretch',\n md: 'flex-end',\n },\n px: 'space-24',\n pt: 'space-16',\n pb: 'space-16',\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n positioner: {\n alignItems: 'center',\n display: 'flex',\n inset: 0,\n justifyContent: 'center',\n overflow: 'auto',\n p: {\n base: 'space-8',\n md: 'space-16',\n },\n position: 'fixed',\n zIndex: 'modal',\n },\n title: {\n textStyle: 'heading.h4',\n color: 'primary.900',\n fontFamily: 'cabinet',\n },\n },\n className: 'dialog',\n slots: [...dialogAnatomy.keys(), 'header', 'body', 'footer'],\n})\n"],"mappings":"4CAGA,IAAa,GAAA,yBAAA,EAAA,kBAAgC,CAC3C,KAAM,CACJ,SAAU,CACR,eAAgB,YAChB,WAAY,iBACZ,SAAU,QACV,OAAQ,QACR,MAAO,EACP,MAAO,CACL,UAAW,aACb,EACA,QAAS,CACP,UAAW,cACb,CACF,EACA,QAAS,CACP,kBAAmB,OACnB,SAAU,WACV,8DAA+D,CAC7D,GAAI,UACN,EACA,+FAAgG,CAC9F,GAAI,+CACJ,uBAAwB,YACxB,wBAAyB,WAC3B,EACA,QAAS,CACP,UAAW,YACb,EACA,MAAO,CACL,UAAW,WACb,EACA,UAAW,CACT,KAAM,WACN,GAAI,QACN,EACA,WAAY,UACZ,QAAS,OACT,cAAe,SACf,UAAW,OAUX,SAAU,OACV,KAAM,CACJ,KAAM,OACN,GAAI,OACN,EACA,KAAM,QACN,WAAY,CACV,QAAS,UACX,EACA,4CAA6C,CAC3C,oBAAqB,YACrB,qBAAsB,WACxB,EACA,mEAAoE,CAClE,gCAAiC,CAC/B,uBAAwB,YACxB,wBAAyB,WAC3B,CACF,EACA,iEAAkE,CAChE,8BAA+B,CAC7B,uBAAwB,YACxB,wBAAyB,WAC3B,CACF,EACA,iEAAkE,CAChE,gCAAiC,CAC/B,uBAAwB,YACxB,wBAAyB,WAC3B,CACF,EACA,+FAAgG,CAC9F,2DAA4D,CAC1D,uBAAwB,YACxB,wBAAyB,WAC3B,CACF,CACF,EACA,OAAQ,CACN,gCAAiC,CAC/B,UAAW,aACX,GAAI,MACN,EACA,WAAY,aACZ,WAAY,SACZ,QAAS,OACT,cAAe,MACf,IAAK,WACL,GAAI,WACJ,GAAI,UACN,EACA,KAAM,CACJ,WAAY,aACZ,QAAS,OACT,KAAM,EACN,cAAe,SACf,UAAW,OACX,GAAI,WACJ,GAAI,WACJ,GAAI,8CACN,EACA,OAAQ,CACN,WAAY,aACZ,SAAU,WACV,OAAQ,EACR,KAAM,EACN,MAAO,EACP,GAAI,WACJ,eAAgB,OAChB,aAAc,MACd,QAAS,OACT,cAAe,CACb,KAAM,iBACN,GAAI,KACN,EACA,IAAK,WACL,eAAgB,CACd,KAAM,UACN,GAAI,UACN,EACA,GAAI,WACJ,GAAI,WACJ,GAAI,WACJ,uBAAwB,YACxB,wBAAyB,WAC3B,EACA,WAAY,CACV,WAAY,SACZ,QAAS,OACT,MAAO,EACP,eAAgB,SAChB,SAAU,OACV,EAAG,CACD,KAAM,UACN,GAAI,UACN,EACA,SAAU,QACV,OAAQ,OACV,EACA,MAAO,CACL,UAAW,aACX,MAAO,cACP,WAAY,SACd,CACF,EACA,UAAW,SACX,MAAO,CAAC,GAAG,EAAA,cAAc,KAAK,EAAG,SAAU,OAAQ,QAAQ,CAC7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","names":[],"sources":["../../../src/theme/recipes/dialog.ts"],"sourcesContent":["import { dialogAnatomy } from '@ark-ui/react'\nimport { defineSlotRecipe } from '@pandacss/dev'\n\nexport const dialogRecipe = defineSlotRecipe({\n base: {\n backdrop: {\n backdropFilter: 'blur(4px)',\n background: 'primary.300/20',\n position: 'fixed',\n zIndex: 'modal',\n inset: 0,\n _open: {\n animation: 'backdrop-in',\n },\n _closed: {\n animation: 'backdrop-out',\n },\n },\n content: {\n '--footer-height': '70px',\n position: 'relative',\n '& [data-recipe-slot=\"header\"] + [data-recipe-slot=\"footer\"]': {\n pt: 'space-40',\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"footer\"]) [data-recipe-slot=\"header\"]': {\n pb: 'calc(var(--footer-height) + {sizes.size-24})',\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n _closed: {\n animation: 'dialog-out',\n },\n _open: {\n animation: 'dialog-in',\n },\n alignSelf: {\n base: 'flex-end',\n md: 'center',\n },\n fontFamily: 'satoshi',\n display: 'flex',\n flexDirection: 'column',\n maxHeight: '100%',\n minW: {\n base: '100%',\n md: '800px',\n },\n maxW: '922px',\n '& > form': {\n display: 'contents',\n },\n '& > :first-child, & > form > :first-child': {\n borderTopLeftRadius: 'radius-16',\n borderTopRightRadius: 'radius-16',\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"footer\"])': {\n '& [data-recipe-slot=\"footer\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"body\"])': {\n '& [data-recipe-slot=\"body\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n '&:has([data-recipe-slot=\"body\"] + [data-recipe-slot=\"footer\"])': {\n '& [data-recipe-slot=\"footer\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"body\"] + [data-recipe-slot=\"footer\"])': {\n '& [data-recipe-slot=\"body\"], [data-recipe-slot=\"footer\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n },\n header: {\n '& [data-part=\"close-trigger\"]': {\n alignSelf: 'flex-start',\n ml: 'auto',\n },\n background: 'background',\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'row',\n gap: 'space-16',\n px: 'space-24',\n py: 'space-16',\n },\n body: {\n background: 'background',\n display: 'flex',\n flex: 1,\n flexDirection: 'column',\n overflowY: 'auto',\n px: 'space-24',\n pt: 'space-24',\n pb: 'calc(var(--footer-height) + {sizes.size-24})',\n },\n footer: {\n background: 'background',\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n bg: 'white/50',\n backdropFilter: 'auto',\n backdropBlur: '4px',\n display: 'flex',\n flexDirection: {\n base: 'column-reverse',\n md: 'row',\n },\n gap: 'space-16',\n justifyContent: {\n base: 'stretch',\n md: 'flex-end',\n },\n px: 'space-24',\n pt: 'space-16',\n pb: 'space-16',\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n positioner: {\n alignItems: 'center',\n display: 'flex',\n inset: 0,\n justifyContent: 'center',\n overflow: 'auto',\n p: {\n base: 'space-8',\n md: 'space-16',\n },\n position: 'fixed',\n zIndex: 'modal',\n },\n title: {\n textStyle: 'heading.h4',\n color: 'primary.900',\n fontFamily: 'cabinet',\n },\n },\n className: 'dialog',\n slots: [...dialogAnatomy.keys(), 'header', 'body', 'footer'],\n})\n"],"mappings":";;;;AAGA,IAAa,IAAe,EAAiB;CAC3C,MAAM;EACJ,UAAU;GACR,gBAAgB;GAChB,YAAY;GACZ,UAAU;GACV,QAAQ;GACR,OAAO;GACP,OAAO,EACL,WAAW,cACb;GACA,SAAS,EACP,WAAW,eACb;EACF;EACA,SAAS;GACP,mBAAmB;GACnB,UAAU;GACV,mEAA+D,EAC7D,IAAI,WACN;GACA,sGAAgG;IAC9F,IAAI;IACJ,wBAAwB;IACxB,yBAAyB;GAC3B;GACA,SAAS,EACP,WAAW,aACb;GACA,OAAO,EACL,WAAW,YACb;GACA,WAAW;IACT,MAAM;IACN,IAAI;GACN;GACA,YAAY;GACZ,SAAS;GACT,eAAe;GACf,WAAW;
|
|
1
|
+
{"version":3,"file":"dialog.js","names":[],"sources":["../../../src/theme/recipes/dialog.ts"],"sourcesContent":["import { dialogAnatomy } from '@ark-ui/react'\nimport { defineSlotRecipe } from '@pandacss/dev'\n\nexport const dialogRecipe = defineSlotRecipe({\n base: {\n backdrop: {\n backdropFilter: 'blur(4px)',\n background: 'primary.300/20',\n position: 'fixed',\n zIndex: 'modal',\n inset: 0,\n _open: {\n animation: 'backdrop-in',\n },\n _closed: {\n animation: 'backdrop-out',\n },\n },\n content: {\n '--footer-height': '70px',\n position: 'relative',\n '& [data-recipe-slot=\"header\"] + [data-recipe-slot=\"footer\"]': {\n pt: 'space-40',\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"footer\"]) [data-recipe-slot=\"header\"]': {\n pb: 'calc(var(--footer-height) + {sizes.size-24})',\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n _closed: {\n animation: 'dialog-out',\n },\n _open: {\n animation: 'dialog-in',\n },\n alignSelf: {\n base: 'flex-end',\n md: 'center',\n },\n fontFamily: 'satoshi',\n display: 'flex',\n flexDirection: 'column',\n maxHeight: '100%',\n // `clip`, not the default `visible`: a body that overflows the card (a long table, a\n // tall form) otherwise leaks its overflow past content and makes both content and the\n // fixed positioner scrollable. Focusing any control inside — a checkbox's hidden\n // input, say — then lets the browser satisfy its scroll-into-view against those bogus\n // scroll ranges by scrolling the dialog itself out of the viewport, while it stays\n // open with the backdrop up and the body inert, so the page reads as frozen. `clip`\n // creates no scroll container at all, leaving body the only thing that scrolls.\n // Popovers/selects/tooltips inside a dialog are portaled, so nothing needs to paint\n // outside the card.\n overflow: 'clip',\n minW: {\n base: '100%',\n md: '800px',\n },\n maxW: '922px',\n '& > form': {\n display: 'contents',\n },\n '& > :first-child, & > form > :first-child': {\n borderTopLeftRadius: 'radius-16',\n borderTopRightRadius: 'radius-16',\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"footer\"])': {\n '& [data-recipe-slot=\"footer\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"body\"])': {\n '& [data-recipe-slot=\"body\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n '&:has([data-recipe-slot=\"body\"] + [data-recipe-slot=\"footer\"])': {\n '& [data-recipe-slot=\"footer\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n '&:has([data-recipe-slot=\"header\"] + [data-recipe-slot=\"body\"] + [data-recipe-slot=\"footer\"])': {\n '& [data-recipe-slot=\"body\"], [data-recipe-slot=\"footer\"]': {\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n },\n },\n header: {\n '& [data-part=\"close-trigger\"]': {\n alignSelf: 'flex-start',\n ml: 'auto',\n },\n background: 'background',\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'row',\n gap: 'space-16',\n px: 'space-24',\n py: 'space-16',\n },\n body: {\n background: 'background',\n display: 'flex',\n flex: 1,\n flexDirection: 'column',\n overflowY: 'auto',\n px: 'space-24',\n pt: 'space-24',\n pb: 'calc(var(--footer-height) + {sizes.size-24})',\n },\n footer: {\n background: 'background',\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n bg: 'white/50',\n backdropFilter: 'auto',\n backdropBlur: '4px',\n display: 'flex',\n flexDirection: {\n base: 'column-reverse',\n md: 'row',\n },\n gap: 'space-16',\n justifyContent: {\n base: 'stretch',\n md: 'flex-end',\n },\n px: 'space-24',\n pt: 'space-16',\n pb: 'space-16',\n borderBottomLeftRadius: 'radius-16',\n borderBottomRightRadius: 'radius-16',\n },\n positioner: {\n alignItems: 'center',\n display: 'flex',\n inset: 0,\n justifyContent: 'center',\n overflow: 'auto',\n p: {\n base: 'space-8',\n md: 'space-16',\n },\n position: 'fixed',\n zIndex: 'modal',\n },\n title: {\n textStyle: 'heading.h4',\n color: 'primary.900',\n fontFamily: 'cabinet',\n },\n },\n className: 'dialog',\n slots: [...dialogAnatomy.keys(), 'header', 'body', 'footer'],\n})\n"],"mappings":";;;;AAGA,IAAa,IAAe,EAAiB;CAC3C,MAAM;EACJ,UAAU;GACR,gBAAgB;GAChB,YAAY;GACZ,UAAU;GACV,QAAQ;GACR,OAAO;GACP,OAAO,EACL,WAAW,cACb;GACA,SAAS,EACP,WAAW,eACb;EACF;EACA,SAAS;GACP,mBAAmB;GACnB,UAAU;GACV,mEAA+D,EAC7D,IAAI,WACN;GACA,sGAAgG;IAC9F,IAAI;IACJ,wBAAwB;IACxB,yBAAyB;GAC3B;GACA,SAAS,EACP,WAAW,aACb;GACA,OAAO,EACL,WAAW,YACb;GACA,WAAW;IACT,MAAM;IACN,IAAI;GACN;GACA,YAAY;GACZ,SAAS;GACT,eAAe;GACf,WAAW;GAUX,UAAU;GACV,MAAM;IACJ,MAAM;IACN,IAAI;GACN;GACA,MAAM;GACN,YAAY,EACV,SAAS,WACX;GACA,6CAA6C;IAC3C,qBAAqB;IACrB,sBAAsB;GACxB;GACA,wEAAoE,EAClE,mCAAiC;IAC/B,wBAAwB;IACxB,yBAAyB;GAC3B,EACF;GACA,sEAAkE,EAChE,iCAA+B;IAC7B,wBAAwB;IACxB,yBAAyB;GAC3B,EACF;GACA,sEAAkE,EAChE,mCAAiC;IAC/B,wBAAwB;IACxB,yBAAyB;GAC3B,EACF;GACA,sGAAgG,EAC9F,gEAA4D;IAC1D,wBAAwB;IACxB,yBAAyB;GAC3B,EACF;EACF;EACA,QAAQ;GACN,mCAAiC;IAC/B,WAAW;IACX,IAAI;GACN;GACA,YAAY;GACZ,YAAY;GACZ,SAAS;GACT,eAAe;GACf,KAAK;GACL,IAAI;GACJ,IAAI;EACN;EACA,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,MAAM;GACN,eAAe;GACf,WAAW;GACX,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,QAAQ;GACN,YAAY;GACZ,UAAU;GACV,QAAQ;GACR,MAAM;GACN,OAAO;GACP,IAAI;GACJ,gBAAgB;GAChB,cAAc;GACd,SAAS;GACT,eAAe;IACb,MAAM;IACN,IAAI;GACN;GACA,KAAK;GACL,gBAAgB;IACd,MAAM;IACN,IAAI;GACN;GACA,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,wBAAwB;GACxB,yBAAyB;EAC3B;EACA,YAAY;GACV,YAAY;GACZ,SAAS;GACT,OAAO;GACP,gBAAgB;GAChB,UAAU;GACV,GAAG;IACD,MAAM;IACN,IAAI;GACN;GACA,UAAU;GACV,QAAQ;EACV;EACA,OAAO;GACL,WAAW;GACX,OAAO;GACP,YAAY;EACd;CACF;CACA,WAAW;CACX,OAAO;EAAC,GAAG,EAAc,KAAK;EAAG;EAAU;EAAQ;CAAQ;AAC7D,CAAC"}
|