@anker-in/headless-ui 1.0.19 → 1.0.20

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";"use client";var x=Object.create;var r=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var E=(e,t)=>{for(var a in t)r(e,a,{get:t[a],enumerable:!0})},R=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of T(t))!w.call(e,s)&&s!==a&&r(e,s,{get:()=>t[s],enumerable:!(n=C(t,s))||n.enumerable});return e};var v=(e,t,a)=>(a=e!=null?x(h(e)):{},R(t||!e||!e.__esModule?r(a,"default",{value:e,enumerable:!0}):a,e)),H=e=>R(r({},"__esModule",{value:!0}),e);var z={};E(z,{Dialog:()=>f,DialogClose:()=>b,DialogContent:()=>p,DialogDescription:()=>u,DialogFooter:()=>D,DialogHeader:()=>g,DialogOverlay:()=>c,DialogPortal:()=>m,DialogTitle:()=>y,DialogTrigger:()=>P});module.exports=H(z);var i=require("react/jsx-runtime"),d=v(require("react")),o=v(require("@radix-ui/react-dialog")),N=require("@radix-ui/react-icons"),l=require("../helpers/index.js");const f=o.Root;f.displayName="Dialog";const P=o.Trigger,m=o.Portal,b=o.Close,c=d.forwardRef(({className:e,...t},a)=>(0,i.jsx)(o.Overlay,{ref:a,className:(0,l.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[100] bg-black/80",e),...t}));c.displayName=o.Overlay.displayName;const p=d.forwardRef(({className:e,children:t,...a},n)=>(0,i.jsxs)(m,{children:[(0,i.jsx)(c,{}),(0,i.jsxs)(o.Content,{ref:n,className:(0,l.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] tablet:rounded-lg fixed left-1/2 top-1/2 z-[100] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200",e),...a,children:[t,(0,i.jsxs)(o.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[(0,i.jsx)(N.Cross2Icon,{className:"size-4"}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));p.displayName=o.Content.displayName;const g=({className:e,...t})=>(0,i.jsx)("div",{className:(0,l.cn)("tablet:text-left flex flex-col space-y-1.5 text-center",e),...t});g.displayName="DialogHeader";const D=({className:e,...t})=>(0,i.jsx)("div",{className:(0,l.cn)("tablet:flex-row tablet:justify-end tablet:space-x-2 flex flex-col-reverse",e),...t});D.displayName="DialogFooter";const y=d.forwardRef(({className:e,...t},a)=>(0,i.jsx)(o.Title,{ref:a,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",e),...t}));y.displayName=o.Title.displayName;const u=d.forwardRef(({className:e,...t},a)=>(0,i.jsx)(o.Description,{ref:a,className:(0,l.cn)("text-muted-foreground text-sm",e),...t}));u.displayName=o.Description.displayName;
1
+ "use strict";"use client";var x=Object.create;var r=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var E=(e,t)=>{for(var a in t)r(e,a,{get:t[a],enumerable:!0})},R=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of T(t))!w.call(e,s)&&s!==a&&r(e,s,{get:()=>t[s],enumerable:!(n=C(t,s))||n.enumerable});return e};var v=(e,t,a)=>(a=e!=null?x(h(e)):{},R(t||!e||!e.__esModule?r(a,"default",{value:e,enumerable:!0}):a,e)),H=e=>R(r({},"__esModule",{value:!0}),e);var z={};E(z,{Dialog:()=>f,DialogClose:()=>b,DialogContent:()=>p,DialogDescription:()=>u,DialogFooter:()=>D,DialogHeader:()=>g,DialogOverlay:()=>c,DialogPortal:()=>m,DialogTitle:()=>y,DialogTrigger:()=>P});module.exports=H(z);var i=require("react/jsx-runtime"),d=v(require("react")),o=v(require("@radix-ui/react-dialog")),N=require("@radix-ui/react-icons"),l=require("../helpers/index.js");const f=o.Root;f.displayName="Dialog";const P=o.Trigger,m=o.Portal,b=o.Close,c=d.forwardRef(({className:e,...t},a)=>(0,i.jsx)(o.Overlay,{ref:a,className:(0,l.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1000] bg-black/80",e),...t}));c.displayName=o.Overlay.displayName;const p=d.forwardRef(({className:e,children:t,...a},n)=>(0,i.jsxs)(m,{children:[(0,i.jsx)(c,{}),(0,i.jsxs)(o.Content,{ref:n,className:(0,l.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] tablet:rounded-lg fixed left-1/2 top-1/2 z-[100] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200",e),...a,children:[t,(0,i.jsxs)(o.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[(0,i.jsx)(N.Cross2Icon,{className:"size-4"}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));p.displayName=o.Content.displayName;const g=({className:e,...t})=>(0,i.jsx)("div",{className:(0,l.cn)("tablet:text-left flex flex-col space-y-1.5 text-center",e),...t});g.displayName="DialogHeader";const D=({className:e,...t})=>(0,i.jsx)("div",{className:(0,l.cn)("tablet:flex-row tablet:justify-end tablet:space-x-2 flex flex-col-reverse",e),...t});D.displayName="DialogFooter";const y=d.forwardRef(({className:e,...t},a)=>(0,i.jsx)(o.Title,{ref:a,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",e),...t}));y.displayName=o.Title.displayName;const u=d.forwardRef(({className:e,...t},a)=>(0,i.jsx)(o.Description,{ref:a,className:(0,l.cn)("text-muted-foreground text-sm",e),...t}));u.displayName=o.Description.displayName;
2
2
  //# sourceMappingURL=dialog.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/dialog.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { Cross2Icon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst Dialog = DialogPrimitive.Root\nDialog.displayName = 'Dialog'\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[100] bg-black/80',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] tablet:rounded-lg fixed left-1/2 top-1/2 z-[100] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('tablet:text-left flex flex-col space-y-1.5 text-center', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('tablet:flex-row tablet:justify-end tablet:space-x-2 flex flex-col-reverse', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,gBAAAC,EAAA,kBAAAC,EAAA,sBAAAC,EAAA,iBAAAC,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,gBAAAC,EAAA,kBAAAC,IAAA,eAAAC,EAAAZ,GAqBE,IAAAa,EAAA,6BAnBFC,EAAuB,oBACvBC,EAAiC,qCACjCC,EAA2B,iCAE3BC,EAAmB,+BAEnB,MAAMf,EAASa,EAAgB,KAC/Bb,EAAO,YAAc,SAErB,MAAMS,EAAgBI,EAAgB,QAEhCN,EAAeM,EAAgB,OAE/BZ,EAAcY,EAAgB,MAE9BP,EAAgBM,EAAM,WAG1B,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,QAAhB,CACC,IAAKK,EACL,aAAW,MACT,6JACAF,CACF,EACC,GAAGC,EACN,CACD,EACDX,EAAc,YAAcO,EAAgB,QAAQ,YAEpD,MAAMX,EAAgBU,EAAM,WAG1B,CAAC,CAAE,UAAAI,EAAW,SAAAG,EAAU,GAAGF,CAAM,EAAGC,OACpC,QAACX,EAAA,CACC,oBAACD,EAAA,EAAc,KACf,QAACO,EAAgB,QAAhB,CACC,IAAKK,EACL,aAAW,MACT,6fACAF,CACF,EACC,GAAGC,EAEH,UAAAE,KACD,QAACN,EAAgB,MAAhB,CAAsB,UAAU,gRAC/B,oBAAC,cAAW,UAAU,SAAS,KAC/B,OAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,GACF,CACD,EACDX,EAAc,YAAcW,EAAgB,QAAQ,YAEpD,MAAMR,EAAe,CAAC,CAAE,UAAAW,EAAW,GAAGC,CAAM,OAC1C,OAAC,OAAI,aAAW,MAAG,yDAA0DD,CAAS,EAAI,GAAGC,EAAO,EAEtGZ,EAAa,YAAc,eAE3B,MAAMD,EAAe,CAAC,CAAE,UAAAY,EAAW,GAAGC,CAAM,OAC1C,OAAC,OACC,aAAW,MAAG,4EAA6ED,CAAS,EACnG,GAAGC,EACN,EAEFb,EAAa,YAAc,eAE3B,MAAMI,EAAcI,EAAM,WAGxB,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,MAAhB,CACC,IAAKK,EACL,aAAW,MAAG,oDAAqDF,CAAS,EAC3E,GAAGC,EACN,CACD,EACDT,EAAY,YAAcK,EAAgB,MAAM,YAEhD,MAAMV,EAAoBS,EAAM,WAG9B,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,YAAhB,CAA4B,IAAKK,EAAK,aAAW,MAAG,gCAAiCF,CAAS,EAAI,GAAGC,EAAO,CAC9G,EACDd,EAAkB,YAAcU,EAAgB,YAAY",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { Cross2Icon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst Dialog = DialogPrimitive.Root\nDialog.displayName = 'Dialog'\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1000] bg-black/80',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] tablet:rounded-lg fixed left-1/2 top-1/2 z-[100] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('tablet:text-left flex flex-col space-y-1.5 text-center', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('tablet:flex-row tablet:justify-end tablet:space-x-2 flex flex-col-reverse', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,gBAAAC,EAAA,kBAAAC,EAAA,sBAAAC,EAAA,iBAAAC,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,gBAAAC,EAAA,kBAAAC,IAAA,eAAAC,EAAAZ,GAqBE,IAAAa,EAAA,6BAnBFC,EAAuB,oBACvBC,EAAiC,qCACjCC,EAA2B,iCAE3BC,EAAmB,+BAEnB,MAAMf,EAASa,EAAgB,KAC/Bb,EAAO,YAAc,SAErB,MAAMS,EAAgBI,EAAgB,QAEhCN,EAAeM,EAAgB,OAE/BZ,EAAcY,EAAgB,MAE9BP,EAAgBM,EAAM,WAG1B,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,QAAhB,CACC,IAAKK,EACL,aAAW,MACT,8JACAF,CACF,EACC,GAAGC,EACN,CACD,EACDX,EAAc,YAAcO,EAAgB,QAAQ,YAEpD,MAAMX,EAAgBU,EAAM,WAG1B,CAAC,CAAE,UAAAI,EAAW,SAAAG,EAAU,GAAGF,CAAM,EAAGC,OACpC,QAACX,EAAA,CACC,oBAACD,EAAA,EAAc,KACf,QAACO,EAAgB,QAAhB,CACC,IAAKK,EACL,aAAW,MACT,6fACAF,CACF,EACC,GAAGC,EAEH,UAAAE,KACD,QAACN,EAAgB,MAAhB,CAAsB,UAAU,gRAC/B,oBAAC,cAAW,UAAU,SAAS,KAC/B,OAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,GACF,CACD,EACDX,EAAc,YAAcW,EAAgB,QAAQ,YAEpD,MAAMR,EAAe,CAAC,CAAE,UAAAW,EAAW,GAAGC,CAAM,OAC1C,OAAC,OAAI,aAAW,MAAG,yDAA0DD,CAAS,EAAI,GAAGC,EAAO,EAEtGZ,EAAa,YAAc,eAE3B,MAAMD,EAAe,CAAC,CAAE,UAAAY,EAAW,GAAGC,CAAM,OAC1C,OAAC,OACC,aAAW,MAAG,4EAA6ED,CAAS,EACnG,GAAGC,EACN,EAEFb,EAAa,YAAc,eAE3B,MAAMI,EAAcI,EAAM,WAGxB,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,MAAhB,CACC,IAAKK,EACL,aAAW,MAAG,oDAAqDF,CAAS,EAC3E,GAAGC,EACN,CACD,EACDT,EAAY,YAAcK,EAAgB,MAAM,YAEhD,MAAMV,EAAoBS,EAAM,WAG9B,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,YAAhB,CAA4B,IAAKK,EAAK,aAAW,MAAG,gCAAiCF,CAAS,EAAI,GAAGC,EAAO,CAC9G,EACDd,EAAkB,YAAcU,EAAgB,YAAY",
6
6
  "names": ["dialog_exports", "__export", "Dialog", "DialogClose", "DialogContent", "DialogDescription", "DialogFooter", "DialogHeader", "DialogOverlay", "DialogPortal", "DialogTitle", "DialogTrigger", "__toCommonJS", "import_jsx_runtime", "React", "DialogPrimitive", "import_react_icons", "import_helpers", "className", "props", "ref", "children"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as o,jsxs as r}from"react/jsx-runtime";import*as s from"react";import*as e from"@radix-ui/react-dialog";import{Cross2Icon as u}from"@radix-ui/react-icons";import{cn as l}from"../helpers/index.js";const d=e.Root;d.displayName="Dialog";const R=e.Trigger,c=e.Portal,v=e.Close,n=s.forwardRef(({className:t,...a},i)=>o(e.Overlay,{ref:i,className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[100] bg-black/80",t),...a}));n.displayName=e.Overlay.displayName;const f=s.forwardRef(({className:t,children:a,...i},y)=>r(c,{children:[o(n,{}),r(e.Content,{ref:y,className:l("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] tablet:rounded-lg fixed left-1/2 top-1/2 z-[100] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200",t),...i,children:[a,r(e.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[o(u,{className:"size-4"}),o("span",{className:"sr-only",children:"Close"})]})]})]}));f.displayName=e.Content.displayName;const m=({className:t,...a})=>o("div",{className:l("tablet:text-left flex flex-col space-y-1.5 text-center",t),...a});m.displayName="DialogHeader";const p=({className:t,...a})=>o("div",{className:l("tablet:flex-row tablet:justify-end tablet:space-x-2 flex flex-col-reverse",t),...a});p.displayName="DialogFooter";const g=s.forwardRef(({className:t,...a},i)=>o(e.Title,{ref:i,className:l("text-lg font-semibold leading-none tracking-tight",t),...a}));g.displayName=e.Title.displayName;const D=s.forwardRef(({className:t,...a},i)=>o(e.Description,{ref:i,className:l("text-muted-foreground text-sm",t),...a}));D.displayName=e.Description.displayName;export{d as Dialog,v as DialogClose,f as DialogContent,D as DialogDescription,p as DialogFooter,m as DialogHeader,n as DialogOverlay,c as DialogPortal,g as DialogTitle,R as DialogTrigger};
1
+ "use client";import{jsx as o,jsxs as r}from"react/jsx-runtime";import*as s from"react";import*as e from"@radix-ui/react-dialog";import{Cross2Icon as u}from"@radix-ui/react-icons";import{cn as l}from"../helpers/index.js";const d=e.Root;d.displayName="Dialog";const R=e.Trigger,c=e.Portal,v=e.Close,n=s.forwardRef(({className:t,...a},i)=>o(e.Overlay,{ref:i,className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1000] bg-black/80",t),...a}));n.displayName=e.Overlay.displayName;const f=s.forwardRef(({className:t,children:a,...i},y)=>r(c,{children:[o(n,{}),r(e.Content,{ref:y,className:l("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] tablet:rounded-lg fixed left-1/2 top-1/2 z-[100] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200",t),...i,children:[a,r(e.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[o(u,{className:"size-4"}),o("span",{className:"sr-only",children:"Close"})]})]})]}));f.displayName=e.Content.displayName;const m=({className:t,...a})=>o("div",{className:l("tablet:text-left flex flex-col space-y-1.5 text-center",t),...a});m.displayName="DialogHeader";const p=({className:t,...a})=>o("div",{className:l("tablet:flex-row tablet:justify-end tablet:space-x-2 flex flex-col-reverse",t),...a});p.displayName="DialogFooter";const g=s.forwardRef(({className:t,...a},i)=>o(e.Title,{ref:i,className:l("text-lg font-semibold leading-none tracking-tight",t),...a}));g.displayName=e.Title.displayName;const D=s.forwardRef(({className:t,...a},i)=>o(e.Description,{ref:i,className:l("text-muted-foreground text-sm",t),...a}));D.displayName=e.Description.displayName;export{d as Dialog,v as DialogClose,f as DialogContent,D as DialogDescription,p as DialogFooter,m as DialogHeader,n as DialogOverlay,c as DialogPortal,g as DialogTitle,R as DialogTrigger};
2
2
  //# sourceMappingURL=dialog.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/dialog.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { Cross2Icon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst Dialog = DialogPrimitive.Root\nDialog.displayName = 'Dialog'\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[100] bg-black/80',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] tablet:rounded-lg fixed left-1/2 top-1/2 z-[100] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('tablet:text-left flex flex-col space-y-1.5 text-center', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('tablet:flex-row tablet:justify-end tablet:space-x-2 flex flex-col-reverse', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],
5
- "mappings": "aAqBE,cAAAA,EA0BI,QAAAC,MA1BJ,oBAnBF,UAAYC,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,cAAAC,MAAkB,wBAE3B,OAAS,MAAAC,MAAU,sBAEnB,MAAMC,EAASH,EAAgB,KAC/BG,EAAO,YAAc,SAErB,MAAMC,EAAgBJ,EAAgB,QAEhCK,EAAeL,EAAgB,OAE/BM,EAAcN,EAAgB,MAE9BO,EAAgBR,EAAM,WAG1B,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,QAAhB,CACC,IAAKU,EACL,UAAWR,EACT,6JACAM,CACF,EACC,GAAGC,EACN,CACD,EACDF,EAAc,YAAcP,EAAgB,QAAQ,YAEpD,MAAMW,EAAgBZ,EAAM,WAG1B,CAAC,CAAE,UAAAS,EAAW,SAAAI,EAAU,GAAGH,CAAM,EAAGC,IACpCZ,EAACO,EAAA,CACC,UAAAR,EAACU,EAAA,EAAc,EACfT,EAACE,EAAgB,QAAhB,CACC,IAAKU,EACL,UAAWR,EACT,6fACAM,CACF,EACC,GAAGC,EAEH,UAAAG,EACDd,EAACE,EAAgB,MAAhB,CAAsB,UAAU,gRAC/B,UAAAH,EAACI,EAAA,CAAW,UAAU,SAAS,EAC/BJ,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,GACF,CACD,EACDc,EAAc,YAAcX,EAAgB,QAAQ,YAEpD,MAAMa,EAAe,CAAC,CAAE,UAAAL,EAAW,GAAGC,CAAM,IAC1CZ,EAAC,OAAI,UAAWK,EAAG,yDAA0DM,CAAS,EAAI,GAAGC,EAAO,EAEtGI,EAAa,YAAc,eAE3B,MAAMC,EAAe,CAAC,CAAE,UAAAN,EAAW,GAAGC,CAAM,IAC1CZ,EAAC,OACC,UAAWK,EAAG,4EAA6EM,CAAS,EACnG,GAAGC,EACN,EAEFK,EAAa,YAAc,eAE3B,MAAMC,EAAchB,EAAM,WAGxB,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,MAAhB,CACC,IAAKU,EACL,UAAWR,EAAG,oDAAqDM,CAAS,EAC3E,GAAGC,EACN,CACD,EACDM,EAAY,YAAcf,EAAgB,MAAM,YAEhD,MAAMgB,EAAoBjB,EAAM,WAG9B,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,YAAhB,CAA4B,IAAKU,EAAK,UAAWR,EAAG,gCAAiCM,CAAS,EAAI,GAAGC,EAAO,CAC9G,EACDO,EAAkB,YAAchB,EAAgB,YAAY",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { Cross2Icon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst Dialog = DialogPrimitive.Root\nDialog.displayName = 'Dialog'\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1000] bg-black/80',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] tablet:rounded-lg fixed left-1/2 top-1/2 z-[100] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('tablet:text-left flex flex-col space-y-1.5 text-center', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('tablet:flex-row tablet:justify-end tablet:space-x-2 flex flex-col-reverse', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],
5
+ "mappings": "aAqBE,cAAAA,EA0BI,QAAAC,MA1BJ,oBAnBF,UAAYC,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,cAAAC,MAAkB,wBAE3B,OAAS,MAAAC,MAAU,sBAEnB,MAAMC,EAASH,EAAgB,KAC/BG,EAAO,YAAc,SAErB,MAAMC,EAAgBJ,EAAgB,QAEhCK,EAAeL,EAAgB,OAE/BM,EAAcN,EAAgB,MAE9BO,EAAgBR,EAAM,WAG1B,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,QAAhB,CACC,IAAKU,EACL,UAAWR,EACT,8JACAM,CACF,EACC,GAAGC,EACN,CACD,EACDF,EAAc,YAAcP,EAAgB,QAAQ,YAEpD,MAAMW,EAAgBZ,EAAM,WAG1B,CAAC,CAAE,UAAAS,EAAW,SAAAI,EAAU,GAAGH,CAAM,EAAGC,IACpCZ,EAACO,EAAA,CACC,UAAAR,EAACU,EAAA,EAAc,EACfT,EAACE,EAAgB,QAAhB,CACC,IAAKU,EACL,UAAWR,EACT,6fACAM,CACF,EACC,GAAGC,EAEH,UAAAG,EACDd,EAACE,EAAgB,MAAhB,CAAsB,UAAU,gRAC/B,UAAAH,EAACI,EAAA,CAAW,UAAU,SAAS,EAC/BJ,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,GACF,CACD,EACDc,EAAc,YAAcX,EAAgB,QAAQ,YAEpD,MAAMa,EAAe,CAAC,CAAE,UAAAL,EAAW,GAAGC,CAAM,IAC1CZ,EAAC,OAAI,UAAWK,EAAG,yDAA0DM,CAAS,EAAI,GAAGC,EAAO,EAEtGI,EAAa,YAAc,eAE3B,MAAMC,EAAe,CAAC,CAAE,UAAAN,EAAW,GAAGC,CAAM,IAC1CZ,EAAC,OACC,UAAWK,EAAG,4EAA6EM,CAAS,EACnG,GAAGC,EACN,EAEFK,EAAa,YAAc,eAE3B,MAAMC,EAAchB,EAAM,WAGxB,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,MAAhB,CACC,IAAKU,EACL,UAAWR,EAAG,oDAAqDM,CAAS,EAC3E,GAAGC,EACN,CACD,EACDM,EAAY,YAAcf,EAAgB,MAAM,YAEhD,MAAMgB,EAAoBjB,EAAM,WAG9B,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,YAAhB,CAA4B,IAAKU,EAAK,UAAWR,EAAG,gCAAiCM,CAAS,EAAI,GAAGC,EAAO,CAC9G,EACDO,EAAkB,YAAchB,EAAgB,YAAY",
6
6
  "names": ["jsx", "jsxs", "React", "DialogPrimitive", "Cross2Icon", "cn", "Dialog", "DialogTrigger", "DialogPortal", "DialogClose", "DialogOverlay", "className", "props", "ref", "DialogContent", "children", "DialogHeader", "DialogFooter", "DialogTitle", "DialogDescription"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anker-in/headless-ui",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "type": "commonjs",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",
package/style.css CHANGED
@@ -517,6 +517,9 @@ video {
517
517
  .z-50 {
518
518
  z-index: 50;
519
519
  }
520
+ .z-\[1000\] {
521
+ z-index: 1000;
522
+ }
520
523
  .z-\[100\] {
521
524
  z-index: 100;
522
525
  }