@apipass/design-system 1.18.0 → 1.18.1

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../../../vendor/clsx/dist/clsx.cjs"),d=require("react");;/* empty css */const l=require("../../primitives/Tooltip/Tooltip.cjs"),g=require("../../icons/IconInfo.cjs"),u=require("../../primitives/IconButton/IconButton.cjs"),m=d.forwardRef(function({title:s,description:t,headerActions:i,children:r,className:a,...n},c){return e.jsxs("div",{ref:c,className:o.clsx("widget",a),...n,children:[e.jsxs("div",{className:"widget-header widget-drag-handle",children:[e.jsxs("span",{className:"widget-header-title-group",children:[e.jsx("span",{className:"widget-header-title",children:s}),t&&e.jsx(l.Tooltip,{content:t,placement:"bottom",offset:4,children:e.jsx(u.IconButton,{"aria-label":`Mais informações sobre ${s}`,variant:"neutral",size:"small",className:"widget-header-description-trigger",children:e.jsx(g.IconInfo,{size:"14"})})})]}),i&&e.jsx("div",{className:"widget-header-actions",children:i})]}),e.jsx("div",{className:"widget-body",children:r})]})});exports.Widget=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../../../vendor/clsx/dist/clsx.cjs"),d=require("react");;/* empty css */const l=require("../../primitives/Tooltip/Tooltip.cjs"),g=require("../../icons/IconInfo.cjs"),u=require("../../primitives/IconButton/IconButton.cjs"),m=d.forwardRef(function({title:s,description:t,headerActions:i,children:r,className:a,...n},c){return e.jsxs("div",{ref:c,className:o.clsx("widget",a),...n,children:[e.jsxs("div",{className:"widget-header widget-drag-handle",children:[e.jsxs("span",{className:"widget-header-title-group",children:[e.jsx("span",{className:"widget-header-title",children:s}),t&&e.jsx(l.Tooltip,{content:t,placement:"bottom",offset:4,children:e.jsx(u.IconButton,{"aria-label":`Mais informações sobre ${s}`,variant:"subtle",size:"small",className:"widget-header-description-trigger",children:e.jsx(g.IconInfo,{size:"14"})})})]}),i&&e.jsx("div",{className:"widget-header-actions",children:i})]}),e.jsx("div",{className:"widget-body",children:r})]})});exports.Widget=m;
2
2
  //# sourceMappingURL=Widget.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Widget.cjs","sources":["../../../../../src/ui/components/Widget/Widget.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef, type ReactNode, forwardRef } from \"react\";\nimport { IconInfo } from \"icons\";\nimport { IconButton, Tooltip } from \"primitives\";\nimport \"./widget.css\";\n\nexport type WidgetProps = ComponentPropsWithoutRef<\"div\"> & {\n title: string;\n description?: ReactNode;\n headerActions?: ReactNode;\n};\n\nexport const Widget = forwardRef<HTMLDivElement, WidgetProps>(function Widget(\n { title, description, headerActions, children, className, ...props },\n ref,\n) {\n return (\n <div ref={ref} className={clsx(\"widget\", className)} {...props}>\n <div className=\"widget-header widget-drag-handle\">\n <span className=\"widget-header-title-group\">\n <span className=\"widget-header-title\">{title}</span>\n {description && (\n <Tooltip content={description} placement=\"bottom\" offset={4}>\n <IconButton\n aria-label={`Mais informações sobre ${title}`}\n variant=\"neutral\"\n size=\"small\"\n className=\"widget-header-description-trigger\"\n >\n <IconInfo size=\"14\" />\n </IconButton>\n </Tooltip>\n )}\n </span>\n {headerActions && <div className=\"widget-header-actions\">{headerActions}</div>}\n </div>\n <div className=\"widget-body\">{children}</div>\n </div>\n );\n});\n"],"names":["Widget","forwardRef","title","description","headerActions","children","className","props","ref","jsxs","clsx","jsx","Tooltip","IconButton","IconInfo"],"mappings":"0WAYaA,EAASC,EAAAA,WAAwC,SAC5D,CAAE,MAAAC,EAAO,YAAAC,EAAa,cAAAC,EAAe,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAA,EAC7DC,EACA,CACA,OACEC,OAAC,OAAI,IAAAD,EAAU,UAAWE,OAAK,SAAUJ,CAAS,EAAI,GAAGC,EACvD,SAAA,CAAAE,EAAAA,KAAC,MAAA,CAAI,UAAU,mCACb,SAAA,CAAAA,EAAAA,KAAC,OAAA,CAAK,UAAU,4BACd,SAAA,CAAAE,EAAAA,IAAC,OAAA,CAAK,UAAU,sBAAuB,SAAAT,EAAM,EAC5CC,SACES,UAAA,CAAQ,QAAST,EAAa,UAAU,SAAS,OAAQ,EACxD,SAAAQ,EAAAA,IAACE,EAAAA,WAAA,CACC,aAAY,0BAA0BX,CAAK,GAC3C,QAAQ,UACR,KAAK,QACL,UAAU,oCAEV,SAAAS,EAAAA,IAACG,EAAAA,SAAA,CAAS,KAAK,IAAA,CAAK,CAAA,CAAA,CACtB,CACF,CAAA,EAEJ,EACCV,GAAiBO,EAAAA,IAAC,MAAA,CAAI,UAAU,wBAAyB,SAAAP,CAAA,CAAc,CAAA,EAC1E,EACAO,EAAAA,IAAC,MAAA,CAAI,UAAU,cAAe,SAAAN,CAAA,CAAS,CAAA,EACzC,CAEJ,CAAC"}
1
+ {"version":3,"file":"Widget.cjs","sources":["../../../../../src/ui/components/Widget/Widget.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef, type ReactNode, forwardRef } from \"react\";\nimport { IconInfo } from \"icons\";\nimport { IconButton, Tooltip } from \"primitives\";\nimport \"./widget.css\";\n\nexport type WidgetProps = ComponentPropsWithoutRef<\"div\"> & {\n title: string;\n description?: ReactNode;\n headerActions?: ReactNode;\n};\n\nexport const Widget = forwardRef<HTMLDivElement, WidgetProps>(function Widget(\n { title, description, headerActions, children, className, ...props },\n ref,\n) {\n return (\n <div ref={ref} className={clsx(\"widget\", className)} {...props}>\n <div className=\"widget-header widget-drag-handle\">\n <span className=\"widget-header-title-group\">\n <span className=\"widget-header-title\">{title}</span>\n {description && (\n <Tooltip content={description} placement=\"bottom\" offset={4}>\n <IconButton\n aria-label={`Mais informações sobre ${title}`}\n variant=\"subtle\"\n size=\"small\"\n className=\"widget-header-description-trigger\"\n >\n <IconInfo size=\"14\" />\n </IconButton>\n </Tooltip>\n )}\n </span>\n {headerActions && <div className=\"widget-header-actions\">{headerActions}</div>}\n </div>\n <div className=\"widget-body\">{children}</div>\n </div>\n );\n});\n"],"names":["Widget","forwardRef","title","description","headerActions","children","className","props","ref","jsxs","clsx","jsx","Tooltip","IconButton","IconInfo"],"mappings":"0WAYaA,EAASC,EAAAA,WAAwC,SAC5D,CAAE,MAAAC,EAAO,YAAAC,EAAa,cAAAC,EAAe,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAA,EAC7DC,EACA,CACA,OACEC,OAAC,OAAI,IAAAD,EAAU,UAAWE,OAAK,SAAUJ,CAAS,EAAI,GAAGC,EACvD,SAAA,CAAAE,EAAAA,KAAC,MAAA,CAAI,UAAU,mCACb,SAAA,CAAAA,EAAAA,KAAC,OAAA,CAAK,UAAU,4BACd,SAAA,CAAAE,EAAAA,IAAC,OAAA,CAAK,UAAU,sBAAuB,SAAAT,EAAM,EAC5CC,SACES,UAAA,CAAQ,QAAST,EAAa,UAAU,SAAS,OAAQ,EACxD,SAAAQ,EAAAA,IAACE,EAAAA,WAAA,CACC,aAAY,0BAA0BX,CAAK,GAC3C,QAAQ,SACR,KAAK,QACL,UAAU,oCAEV,SAAAS,EAAAA,IAACG,EAAAA,SAAA,CAAS,KAAK,IAAA,CAAK,CAAA,CAAA,CACtB,CACF,CAAA,EAEJ,EACCV,GAAiBO,EAAAA,IAAC,MAAA,CAAI,UAAU,wBAAyB,SAAAP,CAAA,CAAc,CAAA,EAC1E,EACAO,EAAAA,IAAC,MAAA,CAAI,UAAU,cAAe,SAAAN,CAAA,CAAS,CAAA,EACzC,CAEJ,CAAC"}
@@ -14,7 +14,7 @@ const I = n(function({ title: r, description: t, headerActions: a, children: o,
14
14
  f,
15
15
  {
16
16
  "aria-label": `Mais informações sobre ${r}`,
17
- variant: "neutral",
17
+ variant: "subtle",
18
18
  size: "small",
19
19
  className: "widget-header-description-trigger",
20
20
  children: /* @__PURE__ */ e(g, { size: "14" })
@@ -1 +1 @@
1
- {"version":3,"file":"Widget.js","sources":["../../../../../src/ui/components/Widget/Widget.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef, type ReactNode, forwardRef } from \"react\";\nimport { IconInfo } from \"icons\";\nimport { IconButton, Tooltip } from \"primitives\";\nimport \"./widget.css\";\n\nexport type WidgetProps = ComponentPropsWithoutRef<\"div\"> & {\n title: string;\n description?: ReactNode;\n headerActions?: ReactNode;\n};\n\nexport const Widget = forwardRef<HTMLDivElement, WidgetProps>(function Widget(\n { title, description, headerActions, children, className, ...props },\n ref,\n) {\n return (\n <div ref={ref} className={clsx(\"widget\", className)} {...props}>\n <div className=\"widget-header widget-drag-handle\">\n <span className=\"widget-header-title-group\">\n <span className=\"widget-header-title\">{title}</span>\n {description && (\n <Tooltip content={description} placement=\"bottom\" offset={4}>\n <IconButton\n aria-label={`Mais informações sobre ${title}`}\n variant=\"neutral\"\n size=\"small\"\n className=\"widget-header-description-trigger\"\n >\n <IconInfo size=\"14\" />\n </IconButton>\n </Tooltip>\n )}\n </span>\n {headerActions && <div className=\"widget-header-actions\">{headerActions}</div>}\n </div>\n <div className=\"widget-body\">{children}</div>\n </div>\n );\n});\n"],"names":["Widget","forwardRef","title","description","headerActions","children","className","props","ref","jsxs","clsx","jsx","Tooltip","IconButton","IconInfo"],"mappings":";;;;;;;AAYO,MAAMA,IAASC,EAAwC,SAC5D,EAAE,OAAAC,GAAO,aAAAC,GAAa,eAAAC,GAAe,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAC7DC,GACA;AACA,SACE,gBAAAC,EAAC,SAAI,KAAAD,GAAU,WAAWE,EAAK,UAAUJ,CAAS,GAAI,GAAGC,GACvD,UAAA;AAAA,IAAA,gBAAAE,EAAC,OAAA,EAAI,WAAU,oCACb,UAAA;AAAA,MAAA,gBAAAA,EAAC,QAAA,EAAK,WAAU,6BACd,UAAA;AAAA,QAAA,gBAAAE,EAAC,QAAA,EAAK,WAAU,uBAAuB,UAAAT,GAAM;AAAA,QAC5CC,uBACES,GAAA,EAAQ,SAAST,GAAa,WAAU,UAAS,QAAQ,GACxD,UAAA,gBAAAQ;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,cAAY,0BAA0BX,CAAK;AAAA,YAC3C,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,WAAU;AAAA,YAEV,UAAA,gBAAAS,EAACG,GAAA,EAAS,MAAK,KAAA,CAAK;AAAA,UAAA;AAAA,QAAA,EACtB,CACF;AAAA,MAAA,GAEJ;AAAA,MACCV,KAAiB,gBAAAO,EAAC,OAAA,EAAI,WAAU,yBAAyB,UAAAP,EAAA,CAAc;AAAA,IAAA,GAC1E;AAAA,IACA,gBAAAO,EAAC,OAAA,EAAI,WAAU,eAAe,UAAAN,EAAA,CAAS;AAAA,EAAA,GACzC;AAEJ,CAAC;"}
1
+ {"version":3,"file":"Widget.js","sources":["../../../../../src/ui/components/Widget/Widget.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef, type ReactNode, forwardRef } from \"react\";\nimport { IconInfo } from \"icons\";\nimport { IconButton, Tooltip } from \"primitives\";\nimport \"./widget.css\";\n\nexport type WidgetProps = ComponentPropsWithoutRef<\"div\"> & {\n title: string;\n description?: ReactNode;\n headerActions?: ReactNode;\n};\n\nexport const Widget = forwardRef<HTMLDivElement, WidgetProps>(function Widget(\n { title, description, headerActions, children, className, ...props },\n ref,\n) {\n return (\n <div ref={ref} className={clsx(\"widget\", className)} {...props}>\n <div className=\"widget-header widget-drag-handle\">\n <span className=\"widget-header-title-group\">\n <span className=\"widget-header-title\">{title}</span>\n {description && (\n <Tooltip content={description} placement=\"bottom\" offset={4}>\n <IconButton\n aria-label={`Mais informações sobre ${title}`}\n variant=\"subtle\"\n size=\"small\"\n className=\"widget-header-description-trigger\"\n >\n <IconInfo size=\"14\" />\n </IconButton>\n </Tooltip>\n )}\n </span>\n {headerActions && <div className=\"widget-header-actions\">{headerActions}</div>}\n </div>\n <div className=\"widget-body\">{children}</div>\n </div>\n );\n});\n"],"names":["Widget","forwardRef","title","description","headerActions","children","className","props","ref","jsxs","clsx","jsx","Tooltip","IconButton","IconInfo"],"mappings":";;;;;;;AAYO,MAAMA,IAASC,EAAwC,SAC5D,EAAE,OAAAC,GAAO,aAAAC,GAAa,eAAAC,GAAe,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAC7DC,GACA;AACA,SACE,gBAAAC,EAAC,SAAI,KAAAD,GAAU,WAAWE,EAAK,UAAUJ,CAAS,GAAI,GAAGC,GACvD,UAAA;AAAA,IAAA,gBAAAE,EAAC,OAAA,EAAI,WAAU,oCACb,UAAA;AAAA,MAAA,gBAAAA,EAAC,QAAA,EAAK,WAAU,6BACd,UAAA;AAAA,QAAA,gBAAAE,EAAC,QAAA,EAAK,WAAU,uBAAuB,UAAAT,GAAM;AAAA,QAC5CC,uBACES,GAAA,EAAQ,SAAST,GAAa,WAAU,UAAS,QAAQ,GACxD,UAAA,gBAAAQ;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,cAAY,0BAA0BX,CAAK;AAAA,YAC3C,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,WAAU;AAAA,YAEV,UAAA,gBAAAS,EAACG,GAAA,EAAS,MAAK,KAAA,CAAK;AAAA,UAAA;AAAA,QAAA,EACtB,CACF;AAAA,MAAA,GAEJ;AAAA,MACCV,KAAiB,gBAAAO,EAAC,OAAA,EAAI,WAAU,yBAAyB,UAAAP,EAAA,CAAc;AAAA,IAAA,GAC1E;AAAA,IACA,gBAAAO,EAAC,OAAA,EAAI,WAAU,eAAe,UAAAN,EAAA,CAAS;AAAA,EAAA,GACzC;AAEJ,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("../../../vendor/clsx/dist/clsx.cjs"),t=require("react-aria-components");;/* empty css */const x=require("../../icons/IconX.cjs"),c=require("../Text/Text.cjs"),r=require("../IconButton/IconButton.cjs"),D=require("../Button/Button.cjs");function g({className:s,type:i="card",...e}){const l=a.clsx(s,"dialog",`dialog-type-${i}`);return o.jsx(t.Dialog,{className:l,...e})}const m=({onPress:s})=>o.jsx(r.IconButton,{className:"dialog-close","aria-label":"Dismiss dialog",onPress:s,variant:"subtle",size:"small",children:o.jsx(x.IconX,{})});function u({...s}){return o.jsx(t.DialogTrigger,{...s})}function j({label:s,icon:i,variant:e,children:l,...n}){return o.jsxs(u,{children:[i?o.jsx(r.IconButton,{variant:e,"aria-label":s,children:i}):o.jsx(D.Button,{variant:e,children:s}),o.jsx(d,{isDismissable:!0,children:o.jsx(g,{...n,children:l})})]})}function N({className:s,...i}){const e=a.clsx(s,"dialog-title");return o.jsx(c.TextHeading,{...i,slot:"title",className:e})}function b({className:s,...i}){const e=a.clsx(s,"dialog-description");return o.jsx(c.Text,{...i,className:e})}function B({bleed:s,className:i,...e}){const l=a.clsx(i,"dialog-body",s&&"dialog-body-bleed");return o.jsx("div",{...e,className:l})}function d({children:s,className:i,isDismissable:e,...l}){const n=a.clsx(i,"dialog-backdrop");return o.jsx(t.ModalOverlay,{className:n,...l,children:o.jsx(t.Modal,{className:"dialog-container",children:s})})}exports.Dialog=g;exports.DialogBody=B;exports.DialogButton=j;exports.DialogClose=m;exports.DialogDescription=b;exports.DialogModal=d;exports.DialogTitle=N;exports.DialogTrigger=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("../../../vendor/clsx/dist/clsx.cjs"),t=require("react-aria-components");;/* empty css */const x=require("../../icons/IconX.cjs"),c=require("../Text/Text.cjs"),r=require("../IconButton/IconButton.cjs"),D=require("../Button/Button.cjs");function g({className:s,type:e="card",...i}){const l=a.clsx(s,"dialog",`dialog-type-${e}`);return o.jsx(t.Dialog,{className:l,...i})}const m=({onPress:s})=>o.jsx(r.IconButton,{className:"dialog-close","aria-label":"Dismiss dialog",onPress:s,variant:"subtle",size:"small",children:o.jsx(x.IconX,{})});function u({...s}){return o.jsx(t.DialogTrigger,{...s})}function j({label:s,icon:e,variant:i,children:l,...n}){return o.jsxs(u,{children:[e?o.jsx(r.IconButton,{variant:i,"aria-label":s,children:e}):o.jsx(D.Button,{variant:i,children:s}),o.jsx(d,{isDismissable:!0,children:o.jsx(g,{...n,children:l})})]})}function N({className:s,...e}){const i=a.clsx(s,"dialog-title");return o.jsx(c.TextHeading,{...e,slot:"title",className:i})}function b({className:s,...e}){const i=a.clsx(s,"dialog-description");return o.jsx(c.Text,{...e,className:i})}function B({bleed:s,className:e,...i}){const l=a.clsx(e,"dialog-body",s&&"dialog-body-bleed");return o.jsx("div",{...i,className:l})}function d({children:s,className:e,isDismissable:i,...l}){const n=a.clsx(e,"dialog-backdrop");return o.jsx(t.ModalOverlay,{className:n,isDismissable:i,...l,children:o.jsx(t.Modal,{className:"dialog-container",children:s})})}exports.Dialog=g;exports.DialogBody=B;exports.DialogButton=j;exports.DialogClose=m;exports.DialogDescription=b;exports.DialogModal=d;exports.DialogTitle=N;exports.DialogTrigger=u;
2
2
  //# sourceMappingURL=Dialog.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.cjs","sources":["../../../../../src/ui/primitives/Dialog/Dialog.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { IconX } from \"icons\";\nimport {\n Button,\n ButtonProps,\n IconButton,\n IconButtonProps,\n Text,\n TextHeading,\n type TextHeadingProps,\n type TextProps,\n} from \"primitives\";\nimport {\n Dialog as RACDialog,\n DialogTrigger as RACDialogTrigger,\n Modal as RACModal,\n ModalOverlay as RACModalOverlay,\n type DialogProps as RACDialogProps,\n type DialogTriggerProps as RACDialogTriggerProps,\n type ModalOverlayProps as RACModalOverlayProps,\n} from \"react-aria-components\";\nimport \"./dialog.css\";\n\nexport type DialogProps = RACDialogProps & {\n type?: \"sheet\" | \"card\";\n};\nexport function Dialog({ className, type = \"card\", ...props }: DialogProps) {\n const classNames = clsx(className, \"dialog\", `dialog-type-${type}`);\n return <RACDialog className={classNames} {...props} />;\n}\n\nexport type DialogCloseProps = Pick<IconButtonProps, \"onPress\">;\nexport const DialogClose = ({ onPress }: DialogCloseProps) => (\n <IconButton\n className=\"dialog-close\"\n aria-label=\"Dismiss dialog\"\n onPress={onPress}\n variant=\"subtle\"\n size=\"small\"\n >\n <IconX />\n </IconButton>\n);\n\nexport type DialogTriggerProps = RACDialogTriggerProps;\nexport function DialogTrigger({ ...props }: DialogTriggerProps) {\n return <RACDialogTrigger {...props} />;\n}\n\nexport interface DialogButtonProps\n extends DialogProps,\n Omit<DialogTriggerProps, \"children\"> {\n label: string;\n variant?: ButtonProps[\"variant\"];\n icon?: React.ReactNode;\n}\nexport function DialogButton({\n label,\n icon,\n variant,\n children,\n ...props\n}: DialogButtonProps) {\n return (\n <DialogTrigger>\n {icon ? (\n <IconButton variant={variant} aria-label={label}>\n {icon}\n </IconButton>\n ) : (\n <Button variant={variant}>{label}</Button>\n )}\n <DialogModal isDismissable>\n <Dialog {...props}>{children}</Dialog>\n </DialogModal>\n </DialogTrigger>\n );\n}\n\nexport type DialogTitleProps = TextHeadingProps;\nexport function DialogTitle({ className, ...props }: DialogTitleProps) {\n const classNames = clsx(className, \"dialog-title\");\n return <TextHeading {...props} slot=\"title\" className={classNames} />;\n}\n\nexport type DialogDescriptionProps = TextProps;\nexport function DialogDescription({\n className,\n ...props\n}: DialogDescriptionProps) {\n const classNames = clsx(className, \"dialog-description\");\n return <Text {...props} className={classNames} />;\n}\n\nexport type DialogBodyProps = {\n bleed?: boolean;\n} & React.ComponentPropsWithoutRef<\"div\">;\nexport function DialogBody({ bleed, className, ...props }: DialogBodyProps) {\n const classNames = clsx(\n className,\n \"dialog-body\",\n bleed && \"dialog-body-bleed\",\n );\n return <div {...props} className={classNames} />;\n}\n\nexport type DialogModalProps = RACModalOverlayProps;\nexport function DialogModal({\n children,\n className,\n isDismissable,\n ...props\n}: DialogModalProps) {\n const classNames = clsx(className, \"dialog-backdrop\");\n return (\n <RACModalOverlay className={classNames} {...props}>\n <RACModal className={\"dialog-container\"}>{children}</RACModal>\n </RACModalOverlay>\n );\n}\n"],"names":["Dialog","className","type","props","classNames","clsx","jsx","RACDialog","DialogClose","onPress","IconButton","IconX","DialogTrigger","RACDialogTrigger","DialogButton","label","icon","variant","children","Button","DialogModal","DialogTitle","TextHeading","DialogDescription","Text","DialogBody","bleed","isDismissable","RACModalOverlay","RACModal"],"mappings":"uXA0BO,SAASA,EAAO,CAAE,UAAAC,EAAW,KAAAC,EAAO,OAAQ,GAAGC,GAAsB,CAC1E,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,SAAU,eAAeC,CAAI,EAAE,EAClE,OAAOI,EAAAA,IAACC,EAAAA,OAAA,CAAU,UAAWH,EAAa,GAAGD,EAAO,CACtD,CAGO,MAAMK,EAAc,CAAC,CAAE,QAAAC,CAAA,IAC5BH,EAAAA,IAACI,EAAAA,WAAA,CACC,UAAU,eACV,aAAW,iBACX,QAAAD,EACA,QAAQ,SACR,KAAK,QAEL,eAACE,EAAAA,MAAA,CAAA,CAAM,CAAA,CACT,EAIK,SAASC,EAAc,CAAE,GAAGT,GAA6B,CAC9D,OAAOG,MAACO,EAAAA,cAAA,CAAkB,GAAGV,CAAA,CAAO,CACtC,CASO,SAASW,EAAa,CAC3B,MAAAC,EACA,KAAAC,EACA,QAAAC,EACA,SAAAC,EACA,GAAGf,CACL,EAAsB,CACpB,cACGS,EAAA,CACE,SAAA,CAAAI,EACCV,EAAAA,IAACI,EAAAA,WAAA,CAAW,QAAAO,EAAkB,aAAYF,EACvC,WACH,EAEAT,EAAAA,IAACa,EAAAA,OAAA,CAAO,QAAAF,EAAmB,SAAAF,EAAM,EAEnCT,EAAAA,IAACc,GAAY,cAAa,GACxB,eAACpB,EAAA,CAAQ,GAAGG,EAAQ,SAAAe,CAAA,CAAS,CAAA,CAC/B,CAAA,EACF,CAEJ,CAGO,SAASG,EAAY,CAAE,UAAApB,EAAW,GAAGE,GAA2B,CACrE,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,cAAc,EACjD,aAAQqB,EAAAA,YAAA,CAAa,GAAGnB,EAAO,KAAK,QAAQ,UAAWC,EAAY,CACrE,CAGO,SAASmB,EAAkB,CAChC,UAAAtB,EACA,GAAGE,CACL,EAA2B,CACzB,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,oBAAoB,EACvD,OAAOK,EAAAA,IAACkB,EAAAA,KAAA,CAAM,GAAGrB,EAAO,UAAWC,EAAY,CACjD,CAKO,SAASqB,EAAW,CAAE,MAAAC,EAAO,UAAAzB,EAAW,GAAGE,GAA0B,CAC1E,MAAMC,EAAaC,EAAAA,KACjBJ,EACA,cACAyB,GAAS,mBAAA,EAEX,OAAOpB,EAAAA,IAAC,MAAA,CAAK,GAAGH,EAAO,UAAWC,EAAY,CAChD,CAGO,SAASgB,EAAY,CAC1B,SAAAF,EACA,UAAAjB,EACA,cAAA0B,EACA,GAAGxB,CACL,EAAqB,CACnB,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,iBAAiB,EACpD,OACEK,EAAAA,IAACsB,EAAAA,aAAA,CAAgB,UAAWxB,EAAa,GAAGD,EAC1C,SAAAG,EAAAA,IAACuB,EAAAA,MAAA,CAAS,UAAW,mBAAqB,SAAAX,CAAA,CAAS,CAAA,CACrD,CAEJ"}
1
+ {"version":3,"file":"Dialog.cjs","sources":["../../../../../src/ui/primitives/Dialog/Dialog.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { IconX } from \"icons\";\nimport {\n Button,\n ButtonProps,\n IconButton,\n IconButtonProps,\n Text,\n TextHeading,\n type TextHeadingProps,\n type TextProps,\n} from \"primitives\";\nimport {\n Dialog as RACDialog,\n DialogTrigger as RACDialogTrigger,\n Modal as RACModal,\n ModalOverlay as RACModalOverlay,\n type DialogProps as RACDialogProps,\n type DialogTriggerProps as RACDialogTriggerProps,\n type ModalOverlayProps as RACModalOverlayProps,\n} from \"react-aria-components\";\nimport \"./dialog.css\";\n\nexport type DialogProps = RACDialogProps & {\n type?: \"sheet\" | \"card\";\n};\nexport function Dialog({ className, type = \"card\", ...props }: DialogProps) {\n const classNames = clsx(className, \"dialog\", `dialog-type-${type}`);\n return <RACDialog className={classNames} {...props} />;\n}\n\nexport type DialogCloseProps = Pick<IconButtonProps, \"onPress\">;\nexport const DialogClose = ({ onPress }: DialogCloseProps) => (\n <IconButton\n className=\"dialog-close\"\n aria-label=\"Dismiss dialog\"\n onPress={onPress}\n variant=\"subtle\"\n size=\"small\"\n >\n <IconX />\n </IconButton>\n);\n\nexport type DialogTriggerProps = RACDialogTriggerProps;\nexport function DialogTrigger({ ...props }: DialogTriggerProps) {\n return <RACDialogTrigger {...props} />;\n}\n\nexport interface DialogButtonProps\n extends DialogProps,\n Omit<DialogTriggerProps, \"children\"> {\n label: string;\n variant?: ButtonProps[\"variant\"];\n icon?: React.ReactNode;\n}\nexport function DialogButton({\n label,\n icon,\n variant,\n children,\n ...props\n}: DialogButtonProps) {\n return (\n <DialogTrigger>\n {icon ? (\n <IconButton variant={variant} aria-label={label}>\n {icon}\n </IconButton>\n ) : (\n <Button variant={variant}>{label}</Button>\n )}\n <DialogModal isDismissable>\n <Dialog {...props}>{children}</Dialog>\n </DialogModal>\n </DialogTrigger>\n );\n}\n\nexport type DialogTitleProps = TextHeadingProps;\nexport function DialogTitle({ className, ...props }: DialogTitleProps) {\n const classNames = clsx(className, \"dialog-title\");\n return <TextHeading {...props} slot=\"title\" className={classNames} />;\n}\n\nexport type DialogDescriptionProps = TextProps;\nexport function DialogDescription({\n className,\n ...props\n}: DialogDescriptionProps) {\n const classNames = clsx(className, \"dialog-description\");\n return <Text {...props} className={classNames} />;\n}\n\nexport type DialogBodyProps = {\n bleed?: boolean;\n} & React.ComponentPropsWithoutRef<\"div\">;\nexport function DialogBody({ bleed, className, ...props }: DialogBodyProps) {\n const classNames = clsx(\n className,\n \"dialog-body\",\n bleed && \"dialog-body-bleed\",\n );\n return <div {...props} className={classNames} />;\n}\n\nexport type DialogModalProps = RACModalOverlayProps;\nexport function DialogModal({\n children,\n className,\n isDismissable,\n ...props\n}: DialogModalProps) {\n const classNames = clsx(className, \"dialog-backdrop\");\n return (\n <RACModalOverlay className={classNames} isDismissable={isDismissable} {...props}>\n <RACModal className={\"dialog-container\"}>{children}</RACModal>\n </RACModalOverlay>\n );\n}\n"],"names":["Dialog","className","type","props","classNames","clsx","jsx","RACDialog","DialogClose","onPress","IconButton","IconX","DialogTrigger","RACDialogTrigger","DialogButton","label","icon","variant","children","Button","DialogModal","DialogTitle","TextHeading","DialogDescription","Text","DialogBody","bleed","isDismissable","RACModalOverlay","RACModal"],"mappings":"uXA0BO,SAASA,EAAO,CAAE,UAAAC,EAAW,KAAAC,EAAO,OAAQ,GAAGC,GAAsB,CAC1E,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,SAAU,eAAeC,CAAI,EAAE,EAClE,OAAOI,EAAAA,IAACC,EAAAA,OAAA,CAAU,UAAWH,EAAa,GAAGD,EAAO,CACtD,CAGO,MAAMK,EAAc,CAAC,CAAE,QAAAC,CAAA,IAC5BH,EAAAA,IAACI,EAAAA,WAAA,CACC,UAAU,eACV,aAAW,iBACX,QAAAD,EACA,QAAQ,SACR,KAAK,QAEL,eAACE,EAAAA,MAAA,CAAA,CAAM,CAAA,CACT,EAIK,SAASC,EAAc,CAAE,GAAGT,GAA6B,CAC9D,OAAOG,MAACO,EAAAA,cAAA,CAAkB,GAAGV,CAAA,CAAO,CACtC,CASO,SAASW,EAAa,CAC3B,MAAAC,EACA,KAAAC,EACA,QAAAC,EACA,SAAAC,EACA,GAAGf,CACL,EAAsB,CACpB,cACGS,EAAA,CACE,SAAA,CAAAI,EACCV,EAAAA,IAACI,EAAAA,WAAA,CAAW,QAAAO,EAAkB,aAAYF,EACvC,WACH,EAEAT,EAAAA,IAACa,EAAAA,OAAA,CAAO,QAAAF,EAAmB,SAAAF,EAAM,EAEnCT,EAAAA,IAACc,GAAY,cAAa,GACxB,eAACpB,EAAA,CAAQ,GAAGG,EAAQ,SAAAe,CAAA,CAAS,CAAA,CAC/B,CAAA,EACF,CAEJ,CAGO,SAASG,EAAY,CAAE,UAAApB,EAAW,GAAGE,GAA2B,CACrE,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,cAAc,EACjD,aAAQqB,EAAAA,YAAA,CAAa,GAAGnB,EAAO,KAAK,QAAQ,UAAWC,EAAY,CACrE,CAGO,SAASmB,EAAkB,CAChC,UAAAtB,EACA,GAAGE,CACL,EAA2B,CACzB,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,oBAAoB,EACvD,OAAOK,EAAAA,IAACkB,EAAAA,KAAA,CAAM,GAAGrB,EAAO,UAAWC,EAAY,CACjD,CAKO,SAASqB,EAAW,CAAE,MAAAC,EAAO,UAAAzB,EAAW,GAAGE,GAA0B,CAC1E,MAAMC,EAAaC,EAAAA,KACjBJ,EACA,cACAyB,GAAS,mBAAA,EAEX,OAAOpB,EAAAA,IAAC,MAAA,CAAK,GAAGH,EAAO,UAAWC,EAAY,CAChD,CAGO,SAASgB,EAAY,CAC1B,SAAAF,EACA,UAAAjB,EACA,cAAA0B,EACA,GAAGxB,CACL,EAAqB,CACnB,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,iBAAiB,EACpD,OACEK,EAAAA,IAACsB,EAAAA,aAAA,CAAgB,UAAWxB,EAAY,cAAAuB,EAA+B,GAAGxB,EACxE,SAAAG,EAAAA,IAACuB,EAAAA,MAAA,CAAS,UAAW,mBAAqB,SAAAX,CAAA,CAAS,EACrD,CAEJ"}
@@ -1,4 +1,4 @@
1
- import { jsx as i, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as n } from "react/jsx-runtime";
2
2
  import { clsx as r } from "../../../vendor/clsx/dist/clsx.js";
3
3
  import { Dialog as c, DialogTrigger as m, ModalOverlay as g, Modal as d } from "react-aria-components";
4
4
  /* empty css */
@@ -6,11 +6,11 @@ import { IconX as u } from "../../icons/IconX.js";
6
6
  import { TextHeading as D, Text as f } from "../Text/Text.js";
7
7
  import { IconButton as t } from "../IconButton/IconButton.js";
8
8
  import { Button as p } from "../Button/Button.js";
9
- function N({ className: o, type: a = "card", ...s }) {
10
- const l = r(o, "dialog", `dialog-type-${a}`);
11
- return /* @__PURE__ */ i(c, { className: l, ...s });
9
+ function N({ className: o, type: i = "card", ...l }) {
10
+ const s = r(o, "dialog", `dialog-type-${i}`);
11
+ return /* @__PURE__ */ a(c, { className: s, ...l });
12
12
  }
13
- const I = ({ onPress: o }) => /* @__PURE__ */ i(
13
+ const I = ({ onPress: o }) => /* @__PURE__ */ a(
14
14
  t,
15
15
  {
16
16
  className: "dialog-close",
@@ -18,51 +18,51 @@ const I = ({ onPress: o }) => /* @__PURE__ */ i(
18
18
  onPress: o,
19
19
  variant: "subtle",
20
20
  size: "small",
21
- children: /* @__PURE__ */ i(u, {})
21
+ children: /* @__PURE__ */ a(u, {})
22
22
  }
23
23
  );
24
24
  function b({ ...o }) {
25
- return /* @__PURE__ */ i(m, { ...o });
25
+ return /* @__PURE__ */ a(m, { ...o });
26
26
  }
27
27
  function k({
28
28
  label: o,
29
- icon: a,
30
- variant: s,
31
- children: l,
29
+ icon: i,
30
+ variant: l,
31
+ children: s,
32
32
  ...e
33
33
  }) {
34
34
  return /* @__PURE__ */ n(b, { children: [
35
- a ? /* @__PURE__ */ i(t, { variant: s, "aria-label": o, children: a }) : /* @__PURE__ */ i(p, { variant: s, children: o }),
36
- /* @__PURE__ */ i(h, { isDismissable: !0, children: /* @__PURE__ */ i(N, { ...e, children: l }) })
35
+ i ? /* @__PURE__ */ a(t, { variant: l, "aria-label": o, children: i }) : /* @__PURE__ */ a(p, { variant: l, children: o }),
36
+ /* @__PURE__ */ a(h, { isDismissable: !0, children: /* @__PURE__ */ a(N, { ...e, children: s }) })
37
37
  ] });
38
38
  }
39
- function z({ className: o, ...a }) {
40
- const s = r(o, "dialog-title");
41
- return /* @__PURE__ */ i(D, { ...a, slot: "title", className: s });
39
+ function z({ className: o, ...i }) {
40
+ const l = r(o, "dialog-title");
41
+ return /* @__PURE__ */ a(D, { ...i, slot: "title", className: l });
42
42
  }
43
43
  function C({
44
44
  className: o,
45
- ...a
45
+ ...i
46
46
  }) {
47
- const s = r(o, "dialog-description");
48
- return /* @__PURE__ */ i(f, { ...a, className: s });
47
+ const l = r(o, "dialog-description");
48
+ return /* @__PURE__ */ a(f, { ...i, className: l });
49
49
  }
50
- function H({ bleed: o, className: a, ...s }) {
51
- const l = r(
52
- a,
50
+ function H({ bleed: o, className: i, ...l }) {
51
+ const s = r(
52
+ i,
53
53
  "dialog-body",
54
54
  o && "dialog-body-bleed"
55
55
  );
56
- return /* @__PURE__ */ i("div", { ...s, className: l });
56
+ return /* @__PURE__ */ a("div", { ...l, className: s });
57
57
  }
58
58
  function h({
59
59
  children: o,
60
- className: a,
61
- isDismissable: s,
62
- ...l
60
+ className: i,
61
+ isDismissable: l,
62
+ ...s
63
63
  }) {
64
- const e = r(a, "dialog-backdrop");
65
- return /* @__PURE__ */ i(g, { className: e, ...l, children: /* @__PURE__ */ i(d, { className: "dialog-container", children: o }) });
64
+ const e = r(i, "dialog-backdrop");
65
+ return /* @__PURE__ */ a(g, { className: e, isDismissable: l, ...s, children: /* @__PURE__ */ a(d, { className: "dialog-container", children: o }) });
66
66
  }
67
67
  export {
68
68
  N as Dialog,
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sources":["../../../../../src/ui/primitives/Dialog/Dialog.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { IconX } from \"icons\";\nimport {\n Button,\n ButtonProps,\n IconButton,\n IconButtonProps,\n Text,\n TextHeading,\n type TextHeadingProps,\n type TextProps,\n} from \"primitives\";\nimport {\n Dialog as RACDialog,\n DialogTrigger as RACDialogTrigger,\n Modal as RACModal,\n ModalOverlay as RACModalOverlay,\n type DialogProps as RACDialogProps,\n type DialogTriggerProps as RACDialogTriggerProps,\n type ModalOverlayProps as RACModalOverlayProps,\n} from \"react-aria-components\";\nimport \"./dialog.css\";\n\nexport type DialogProps = RACDialogProps & {\n type?: \"sheet\" | \"card\";\n};\nexport function Dialog({ className, type = \"card\", ...props }: DialogProps) {\n const classNames = clsx(className, \"dialog\", `dialog-type-${type}`);\n return <RACDialog className={classNames} {...props} />;\n}\n\nexport type DialogCloseProps = Pick<IconButtonProps, \"onPress\">;\nexport const DialogClose = ({ onPress }: DialogCloseProps) => (\n <IconButton\n className=\"dialog-close\"\n aria-label=\"Dismiss dialog\"\n onPress={onPress}\n variant=\"subtle\"\n size=\"small\"\n >\n <IconX />\n </IconButton>\n);\n\nexport type DialogTriggerProps = RACDialogTriggerProps;\nexport function DialogTrigger({ ...props }: DialogTriggerProps) {\n return <RACDialogTrigger {...props} />;\n}\n\nexport interface DialogButtonProps\n extends DialogProps,\n Omit<DialogTriggerProps, \"children\"> {\n label: string;\n variant?: ButtonProps[\"variant\"];\n icon?: React.ReactNode;\n}\nexport function DialogButton({\n label,\n icon,\n variant,\n children,\n ...props\n}: DialogButtonProps) {\n return (\n <DialogTrigger>\n {icon ? (\n <IconButton variant={variant} aria-label={label}>\n {icon}\n </IconButton>\n ) : (\n <Button variant={variant}>{label}</Button>\n )}\n <DialogModal isDismissable>\n <Dialog {...props}>{children}</Dialog>\n </DialogModal>\n </DialogTrigger>\n );\n}\n\nexport type DialogTitleProps = TextHeadingProps;\nexport function DialogTitle({ className, ...props }: DialogTitleProps) {\n const classNames = clsx(className, \"dialog-title\");\n return <TextHeading {...props} slot=\"title\" className={classNames} />;\n}\n\nexport type DialogDescriptionProps = TextProps;\nexport function DialogDescription({\n className,\n ...props\n}: DialogDescriptionProps) {\n const classNames = clsx(className, \"dialog-description\");\n return <Text {...props} className={classNames} />;\n}\n\nexport type DialogBodyProps = {\n bleed?: boolean;\n} & React.ComponentPropsWithoutRef<\"div\">;\nexport function DialogBody({ bleed, className, ...props }: DialogBodyProps) {\n const classNames = clsx(\n className,\n \"dialog-body\",\n bleed && \"dialog-body-bleed\",\n );\n return <div {...props} className={classNames} />;\n}\n\nexport type DialogModalProps = RACModalOverlayProps;\nexport function DialogModal({\n children,\n className,\n isDismissable,\n ...props\n}: DialogModalProps) {\n const classNames = clsx(className, \"dialog-backdrop\");\n return (\n <RACModalOverlay className={classNames} {...props}>\n <RACModal className={\"dialog-container\"}>{children}</RACModal>\n </RACModalOverlay>\n );\n}\n"],"names":["Dialog","className","type","props","classNames","clsx","jsx","RACDialog","DialogClose","onPress","IconButton","IconX","DialogTrigger","RACDialogTrigger","DialogButton","label","icon","variant","children","Button","DialogModal","DialogTitle","TextHeading","DialogDescription","Text","DialogBody","bleed","isDismissable","RACModalOverlay","RACModal"],"mappings":";;;;;;;;AA0BO,SAASA,EAAO,EAAE,WAAAC,GAAW,MAAAC,IAAO,QAAQ,GAAGC,KAAsB;AAC1E,QAAMC,IAAaC,EAAKJ,GAAW,UAAU,eAAeC,CAAI,EAAE;AAClE,SAAO,gBAAAI,EAACC,GAAA,EAAU,WAAWH,GAAa,GAAGD,GAAO;AACtD;AAGO,MAAMK,IAAc,CAAC,EAAE,SAAAC,EAAA,MAC5B,gBAAAH;AAAA,EAACI;AAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV,cAAW;AAAA,IACX,SAAAD;AAAA,IACA,SAAQ;AAAA,IACR,MAAK;AAAA,IAEL,4BAACE,GAAA,CAAA,CAAM;AAAA,EAAA;AACT;AAIK,SAASC,EAAc,EAAE,GAAGT,KAA6B;AAC9D,SAAO,gBAAAG,EAACO,GAAA,EAAkB,GAAGV,EAAA,CAAO;AACtC;AASO,SAASW,EAAa;AAAA,EAC3B,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGf;AACL,GAAsB;AACpB,2BACGS,GAAA,EACE,UAAA;AAAA,IAAAI,IACC,gBAAAV,EAACI,GAAA,EAAW,SAAAO,GAAkB,cAAYF,GACvC,aACH,IAEA,gBAAAT,EAACa,GAAA,EAAO,SAAAF,GAAmB,UAAAF,GAAM;AAAA,IAEnC,gBAAAT,EAACc,KAAY,eAAa,IACxB,4BAACpB,GAAA,EAAQ,GAAGG,GAAQ,UAAAe,EAAA,CAAS,EAAA,CAC/B;AAAA,EAAA,GACF;AAEJ;AAGO,SAASG,EAAY,EAAE,WAAApB,GAAW,GAAGE,KAA2B;AACrE,QAAMC,IAAaC,EAAKJ,GAAW,cAAc;AACjD,2BAAQqB,GAAA,EAAa,GAAGnB,GAAO,MAAK,SAAQ,WAAWC,GAAY;AACrE;AAGO,SAASmB,EAAkB;AAAA,EAChC,WAAAtB;AAAA,EACA,GAAGE;AACL,GAA2B;AACzB,QAAMC,IAAaC,EAAKJ,GAAW,oBAAoB;AACvD,SAAO,gBAAAK,EAACkB,GAAA,EAAM,GAAGrB,GAAO,WAAWC,GAAY;AACjD;AAKO,SAASqB,EAAW,EAAE,OAAAC,GAAO,WAAAzB,GAAW,GAAGE,KAA0B;AAC1E,QAAMC,IAAaC;AAAA,IACjBJ;AAAA,IACA;AAAA,IACAyB,KAAS;AAAA,EAAA;AAEX,SAAO,gBAAApB,EAAC,OAAA,EAAK,GAAGH,GAAO,WAAWC,GAAY;AAChD;AAGO,SAASgB,EAAY;AAAA,EAC1B,UAAAF;AAAA,EACA,WAAAjB;AAAA,EACA,eAAA0B;AAAA,EACA,GAAGxB;AACL,GAAqB;AACnB,QAAMC,IAAaC,EAAKJ,GAAW,iBAAiB;AACpD,SACE,gBAAAK,EAACsB,GAAA,EAAgB,WAAWxB,GAAa,GAAGD,GAC1C,UAAA,gBAAAG,EAACuB,GAAA,EAAS,WAAW,oBAAqB,UAAAX,EAAA,CAAS,EAAA,CACrD;AAEJ;"}
1
+ {"version":3,"file":"Dialog.js","sources":["../../../../../src/ui/primitives/Dialog/Dialog.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { IconX } from \"icons\";\nimport {\n Button,\n ButtonProps,\n IconButton,\n IconButtonProps,\n Text,\n TextHeading,\n type TextHeadingProps,\n type TextProps,\n} from \"primitives\";\nimport {\n Dialog as RACDialog,\n DialogTrigger as RACDialogTrigger,\n Modal as RACModal,\n ModalOverlay as RACModalOverlay,\n type DialogProps as RACDialogProps,\n type DialogTriggerProps as RACDialogTriggerProps,\n type ModalOverlayProps as RACModalOverlayProps,\n} from \"react-aria-components\";\nimport \"./dialog.css\";\n\nexport type DialogProps = RACDialogProps & {\n type?: \"sheet\" | \"card\";\n};\nexport function Dialog({ className, type = \"card\", ...props }: DialogProps) {\n const classNames = clsx(className, \"dialog\", `dialog-type-${type}`);\n return <RACDialog className={classNames} {...props} />;\n}\n\nexport type DialogCloseProps = Pick<IconButtonProps, \"onPress\">;\nexport const DialogClose = ({ onPress }: DialogCloseProps) => (\n <IconButton\n className=\"dialog-close\"\n aria-label=\"Dismiss dialog\"\n onPress={onPress}\n variant=\"subtle\"\n size=\"small\"\n >\n <IconX />\n </IconButton>\n);\n\nexport type DialogTriggerProps = RACDialogTriggerProps;\nexport function DialogTrigger({ ...props }: DialogTriggerProps) {\n return <RACDialogTrigger {...props} />;\n}\n\nexport interface DialogButtonProps\n extends DialogProps,\n Omit<DialogTriggerProps, \"children\"> {\n label: string;\n variant?: ButtonProps[\"variant\"];\n icon?: React.ReactNode;\n}\nexport function DialogButton({\n label,\n icon,\n variant,\n children,\n ...props\n}: DialogButtonProps) {\n return (\n <DialogTrigger>\n {icon ? (\n <IconButton variant={variant} aria-label={label}>\n {icon}\n </IconButton>\n ) : (\n <Button variant={variant}>{label}</Button>\n )}\n <DialogModal isDismissable>\n <Dialog {...props}>{children}</Dialog>\n </DialogModal>\n </DialogTrigger>\n );\n}\n\nexport type DialogTitleProps = TextHeadingProps;\nexport function DialogTitle({ className, ...props }: DialogTitleProps) {\n const classNames = clsx(className, \"dialog-title\");\n return <TextHeading {...props} slot=\"title\" className={classNames} />;\n}\n\nexport type DialogDescriptionProps = TextProps;\nexport function DialogDescription({\n className,\n ...props\n}: DialogDescriptionProps) {\n const classNames = clsx(className, \"dialog-description\");\n return <Text {...props} className={classNames} />;\n}\n\nexport type DialogBodyProps = {\n bleed?: boolean;\n} & React.ComponentPropsWithoutRef<\"div\">;\nexport function DialogBody({ bleed, className, ...props }: DialogBodyProps) {\n const classNames = clsx(\n className,\n \"dialog-body\",\n bleed && \"dialog-body-bleed\",\n );\n return <div {...props} className={classNames} />;\n}\n\nexport type DialogModalProps = RACModalOverlayProps;\nexport function DialogModal({\n children,\n className,\n isDismissable,\n ...props\n}: DialogModalProps) {\n const classNames = clsx(className, \"dialog-backdrop\");\n return (\n <RACModalOverlay className={classNames} isDismissable={isDismissable} {...props}>\n <RACModal className={\"dialog-container\"}>{children}</RACModal>\n </RACModalOverlay>\n );\n}\n"],"names":["Dialog","className","type","props","classNames","clsx","jsx","RACDialog","DialogClose","onPress","IconButton","IconX","DialogTrigger","RACDialogTrigger","DialogButton","label","icon","variant","children","Button","DialogModal","DialogTitle","TextHeading","DialogDescription","Text","DialogBody","bleed","isDismissable","RACModalOverlay","RACModal"],"mappings":";;;;;;;;AA0BO,SAASA,EAAO,EAAE,WAAAC,GAAW,MAAAC,IAAO,QAAQ,GAAGC,KAAsB;AAC1E,QAAMC,IAAaC,EAAKJ,GAAW,UAAU,eAAeC,CAAI,EAAE;AAClE,SAAO,gBAAAI,EAACC,GAAA,EAAU,WAAWH,GAAa,GAAGD,GAAO;AACtD;AAGO,MAAMK,IAAc,CAAC,EAAE,SAAAC,EAAA,MAC5B,gBAAAH;AAAA,EAACI;AAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV,cAAW;AAAA,IACX,SAAAD;AAAA,IACA,SAAQ;AAAA,IACR,MAAK;AAAA,IAEL,4BAACE,GAAA,CAAA,CAAM;AAAA,EAAA;AACT;AAIK,SAASC,EAAc,EAAE,GAAGT,KAA6B;AAC9D,SAAO,gBAAAG,EAACO,GAAA,EAAkB,GAAGV,EAAA,CAAO;AACtC;AASO,SAASW,EAAa;AAAA,EAC3B,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGf;AACL,GAAsB;AACpB,2BACGS,GAAA,EACE,UAAA;AAAA,IAAAI,IACC,gBAAAV,EAACI,GAAA,EAAW,SAAAO,GAAkB,cAAYF,GACvC,aACH,IAEA,gBAAAT,EAACa,GAAA,EAAO,SAAAF,GAAmB,UAAAF,GAAM;AAAA,IAEnC,gBAAAT,EAACc,KAAY,eAAa,IACxB,4BAACpB,GAAA,EAAQ,GAAGG,GAAQ,UAAAe,EAAA,CAAS,EAAA,CAC/B;AAAA,EAAA,GACF;AAEJ;AAGO,SAASG,EAAY,EAAE,WAAApB,GAAW,GAAGE,KAA2B;AACrE,QAAMC,IAAaC,EAAKJ,GAAW,cAAc;AACjD,2BAAQqB,GAAA,EAAa,GAAGnB,GAAO,MAAK,SAAQ,WAAWC,GAAY;AACrE;AAGO,SAASmB,EAAkB;AAAA,EAChC,WAAAtB;AAAA,EACA,GAAGE;AACL,GAA2B;AACzB,QAAMC,IAAaC,EAAKJ,GAAW,oBAAoB;AACvD,SAAO,gBAAAK,EAACkB,GAAA,EAAM,GAAGrB,GAAO,WAAWC,GAAY;AACjD;AAKO,SAASqB,EAAW,EAAE,OAAAC,GAAO,WAAAzB,GAAW,GAAGE,KAA0B;AAC1E,QAAMC,IAAaC;AAAA,IACjBJ;AAAA,IACA;AAAA,IACAyB,KAAS;AAAA,EAAA;AAEX,SAAO,gBAAApB,EAAC,OAAA,EAAK,GAAGH,GAAO,WAAWC,GAAY;AAChD;AAGO,SAASgB,EAAY;AAAA,EAC1B,UAAAF;AAAA,EACA,WAAAjB;AAAA,EACA,eAAA0B;AAAA,EACA,GAAGxB;AACL,GAAqB;AACnB,QAAMC,IAAaC,EAAKJ,GAAW,iBAAiB;AACpD,SACE,gBAAAK,EAACsB,GAAA,EAAgB,WAAWxB,GAAY,eAAAuB,GAA+B,GAAGxB,GACxE,UAAA,gBAAAG,EAACuB,GAAA,EAAS,WAAW,oBAAqB,UAAAX,EAAA,CAAS,GACrD;AAEJ;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apipass/design-system",
3
- "version": "1.18.0",
3
+ "version": "1.18.1",
4
4
  "type": "module",
5
5
  "description": "APIPass React Design System",
6
6
  "sideEffects": [