@tetrascience-npm/tetrascience-react-ui 1.0.0-beta.143.1 → 1.0.0-beta.145.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.
- package/dist/ai/context.cjs +1 -1
- package/dist/ai/context.cjs.map +1 -1
- package/dist/ai/context.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +381 -373
- package/dist/index.js.map +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/ui/dialog.cjs +1 -1
- package/dist/ui/dialog.cjs.map +1 -1
- package/dist/ui/dialog.js +12 -0
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/progress.cjs +2 -0
- package/dist/ui/progress.cjs.map +1 -0
- package/dist/{components/ui → ui}/progress.js +14 -13
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/snippet.cjs +2 -0
- package/dist/ui/snippet.cjs.map +1 -0
- package/dist/ui/snippet.js +81 -0
- package/dist/ui/snippet.js.map +1 -0
- package/package.json +1 -1
- package/dist/components/ui/progress.cjs +0 -2
- package/dist/components/ui/progress.cjs.map +0 -1
- package/dist/components/ui/progress.js.map +0 -1
package/dist/ui/dialog.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),g=require("lucide-react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),g=require("lucide-react"),e=require("radix-ui"),s=require("./button.cjs"),l=require("../lib/utils.cjs");function c({...o}){return a.jsx(e.Dialog.Root,{"data-slot":"dialog",...o})}function u({...o}){return a.jsx(e.Dialog.Trigger,{"data-slot":"dialog-trigger",...o})}function r({...o}){return a.jsx(e.Dialog.Portal,{"data-slot":"dialog-portal",...o})}function x({...o}){return a.jsx(e.Dialog.Close,{"data-slot":"dialog-close",...o})}function d({className:o,...t}){return a.jsx(e.Dialog.Overlay,{"data-slot":"dialog-overlay",className:l.cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",o),...t})}function f({className:o,children:t,showCloseButton:i=!0,...n}){return a.jsxs(r,{children:[a.jsx(d,{}),a.jsxs(e.Dialog.Content,{"data-slot":"dialog-content",className:l.cn("fixed top-1/2 left-1/2 z-50 flex flex-col w-[calc(100%-2rem)] max-w-lg max-h-[90svh] -translate-x-1/2 -translate-y-1/2 rounded-xl bg-card/90 dark:bg-background text-sm shadow-elevation-5 ring-1 ring-foreground/10 duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","[&>*:not([data-slot])]:mx-4 [&>*:not([data-slot])]:my-2 [&>*:not([data-slot])]:w-auto",o),...n,children:[t,i&&a.jsx(e.Dialog.Close,{"data-slot":"dialog-close",asChild:!0,children:a.jsxs(s.Button,{"data-slot":"dialog-close",variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[a.jsx(g.XIcon,{}),a.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function D({className:o,...t}){return a.jsx("div",{"data-slot":"dialog-header",className:l.cn("flex shrink-0 flex-col gap-2 px-4 pt-4 pb-2",o),...t})}function m({className:o,...t}){return a.jsx("div",{"data-slot":"dialog-body",className:l.cn("flex-1 overflow-y-auto px-4 py-2",o),...t})}function p({className:o,showCloseButton:t=!1,children:i,...n}){return a.jsxs("div",{"data-slot":"dialog-footer",className:l.cn("flex shrink-0 flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 px-4 py-3 sm:flex-row sm:justify-end",o),...n,children:[i,t&&a.jsx(e.Dialog.Close,{asChild:!0,children:a.jsx(s.Button,{variant:"outline",children:"Close"})})]})}function j({className:o,...t}){return a.jsx(e.Dialog.Title,{"data-slot":"dialog-title",className:l.cn("text-base leading-none font-medium",o),...t})}function h({className:o,...t}){return a.jsx(e.Dialog.Description,{"data-slot":"dialog-description",className:l.cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",o),...t})}exports.Dialog=c;exports.DialogBody=m;exports.DialogClose=x;exports.DialogContent=f;exports.DialogDescription=h;exports.DialogFooter=p;exports.DialogHeader=D;exports.DialogOverlay=d;exports.DialogPortal=r;exports.DialogTitle=j;exports.DialogTrigger=u;
|
|
2
2
|
//# sourceMappingURL=dialog.cjs.map
|
package/dist/ui/dialog.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.cjs","sources":["../../src/components/ui/dialog.tsx"],"sourcesContent":["import { XIcon } from \"lucide-react\"\nimport { Dialog as DialogPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { cn } from \"@/lib/utils\"\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-1/2 left-1/2 z-50 flex flex-col w-[calc(100%-2rem)] max-w-lg max-h-[90svh] -translate-x-1/2 -translate-y-1/2 rounded-xl bg-card/90 dark:bg-background text-sm shadow-elevation-5 ring-1 ring-foreground/10 duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" asChild>\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex shrink-0 flex-col gap-2 px-4 pt-4 pb-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogBody({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn(\"flex-1 overflow-y-auto px-4 py-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex shrink-0 flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 px-4 py-3 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-base leading-none font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"],"names":["Dialog","props","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","jsx","cn","DialogContent","children","showCloseButton","jsxs","Button","XIcon","DialogHeader","DialogBody","DialogFooter","DialogTitle","DialogDescription"],"mappings":"6NAOA,SAASA,EAAO,CACd,GAAGC,CACL,EAAsD,CACpD,aAAQC,EAAAA,OAAgB,KAAhB,CAAqB,YAAU,SAAU,GAAGD,EAAO,CAC7D,CAEA,SAASE,EAAc,CACrB,GAAGF,CACL,EAAyD,CACvD,aAAQC,EAAAA,OAAgB,QAAhB,CAAwB,YAAU,iBAAkB,GAAGD,EAAO,CACxE,CAEA,SAASG,EAAa,CACpB,GAAGH,CACL,EAAwD,CACtD,aAAQC,EAAAA,OAAgB,OAAhB,CAAuB,YAAU,gBAAiB,GAAGD,EAAO,CACtE,CAEA,SAASI,EAAY,CACnB,GAAGJ,CACL,EAAuD,CACrD,aAAQC,EAAAA,OAAgB,MAAhB,CAAsB,YAAU,eAAgB,GAAGD,EAAO,CACpE,CAEA,SAASK,EAAc,CACrB,UAAAC,EACA,GAAGN,CACL,EAAyD,CACvD,OACEO,EAAAA,IAACN,EAAAA,OAAgB,QAAhB,CACC,YAAU,iBACV,UAAWO,EAAAA,GACT,wLACAF,CAAA,EAED,GAAGN,CAAA,CAAA,CAGV,CAEA,SAASS,EAAc,CACrB,UAAAH,EACA,SAAAI,EACA,gBAAAC,EAAkB,GAClB,GAAGX,CACL,EAEG,CACD,cACGG,EAAA,CACC,SAAA,CAAAI,EAAAA,IAACF,EAAA,EAAc,EACfO,EAAAA,KAACX,EAAAA,OAAgB,QAAhB,CACC,YAAU,iBACV,UAAWO,EAAAA,GACT,
|
|
1
|
+
{"version":3,"file":"dialog.cjs","sources":["../../src/components/ui/dialog.tsx"],"sourcesContent":["import { XIcon } from \"lucide-react\"\nimport { Dialog as DialogPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { cn } from \"@/lib/utils\"\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-1/2 left-1/2 z-50 flex flex-col w-[calc(100%-2rem)] max-w-lg max-h-[90svh] -translate-x-1/2 -translate-y-1/2 rounded-xl bg-card/90 dark:bg-background text-sm shadow-elevation-5 ring-1 ring-foreground/10 duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n // Safeguard: DialogContent itself has no padding (so the footer can\n // bleed full-width). Any *unslotted* child dropped straight in — raw\n // text/elements with no data-slot — is inset with mx-4 / my-2 so it's\n // never flush to the edges or butted onto the footer (SW-2528). A\n // present data-slot marks a known component (the dialog-* parts, but\n // also full-bleed children like Command in CommandDialog /\n // ModelSelector that intentionally pass p-0 + size-full), which we\n // must leave untouched. Margin (not padding) insets an element that\n // has its own background as a whole; w-auto overrides a child's w-full\n // so the margins actually shrink it instead of overflowing.\n \"[&>*:not([data-slot])]:mx-4 [&>*:not([data-slot])]:my-2 [&>*:not([data-slot])]:w-auto\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" asChild>\n <Button\n // explicit dialog-close slot (overrides Button's own data-slot) so\n // the DialogContent padding safeguard above skips this button\n data-slot=\"dialog-close\"\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex shrink-0 flex-col gap-2 px-4 pt-4 pb-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogBody({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn(\"flex-1 overflow-y-auto px-4 py-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex shrink-0 flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 px-4 py-3 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-base leading-none font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"],"names":["Dialog","props","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","jsx","cn","DialogContent","children","showCloseButton","jsxs","Button","XIcon","DialogHeader","DialogBody","DialogFooter","DialogTitle","DialogDescription"],"mappings":"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"}
|
package/dist/ui/dialog.js
CHANGED
|
@@ -53,6 +53,17 @@ function v({
|
|
|
53
53
|
"data-slot": "dialog-content",
|
|
54
54
|
className: l(
|
|
55
55
|
"fixed top-1/2 left-1/2 z-50 flex flex-col w-[calc(100%-2rem)] max-w-lg max-h-[90svh] -translate-x-1/2 -translate-y-1/2 rounded-xl bg-card/90 dark:bg-background text-sm shadow-elevation-5 ring-1 ring-foreground/10 duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
56
|
+
// Safeguard: DialogContent itself has no padding (so the footer can
|
|
57
|
+
// bleed full-width). Any *unslotted* child dropped straight in — raw
|
|
58
|
+
// text/elements with no data-slot — is inset with mx-4 / my-2 so it's
|
|
59
|
+
// never flush to the edges or butted onto the footer (SW-2528). A
|
|
60
|
+
// present data-slot marks a known component (the dialog-* parts, but
|
|
61
|
+
// also full-bleed children like Command in CommandDialog /
|
|
62
|
+
// ModelSelector that intentionally pass p-0 + size-full), which we
|
|
63
|
+
// must leave untouched. Margin (not padding) insets an element that
|
|
64
|
+
// has its own background as a whole; w-auto overrides a child's w-full
|
|
65
|
+
// so the margins actually shrink it instead of overflowing.
|
|
66
|
+
"[&>*:not([data-slot])]:mx-4 [&>*:not([data-slot])]:my-2 [&>*:not([data-slot])]:w-auto",
|
|
56
67
|
o
|
|
57
68
|
),
|
|
58
69
|
...i,
|
|
@@ -61,6 +72,7 @@ function v({
|
|
|
61
72
|
r && /* @__PURE__ */ a(e.Close, { "data-slot": "dialog-close", asChild: !0, children: /* @__PURE__ */ n(
|
|
62
73
|
d,
|
|
63
74
|
{
|
|
75
|
+
"data-slot": "dialog-close",
|
|
64
76
|
variant: "ghost",
|
|
65
77
|
className: "absolute top-2 right-2",
|
|
66
78
|
size: "icon-sm",
|
package/dist/ui/dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sources":["../../src/components/ui/dialog.tsx"],"sourcesContent":["import { XIcon } from \"lucide-react\"\nimport { Dialog as DialogPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { cn } from \"@/lib/utils\"\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-1/2 left-1/2 z-50 flex flex-col w-[calc(100%-2rem)] max-w-lg max-h-[90svh] -translate-x-1/2 -translate-y-1/2 rounded-xl bg-card/90 dark:bg-background text-sm shadow-elevation-5 ring-1 ring-foreground/10 duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" asChild>\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex shrink-0 flex-col gap-2 px-4 pt-4 pb-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogBody({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn(\"flex-1 overflow-y-auto px-4 py-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex shrink-0 flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 px-4 py-3 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-base leading-none font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"],"names":["Dialog","props","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","jsx","cn","DialogContent","children","showCloseButton","jsxs","Button","XIcon","DialogHeader","DialogBody","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;AAOA,SAASA,EAAO;AAAA,EACd,GAAGC;AACL,GAAsD;AACpD,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAc;AAAA,EACrB,GAAGF;AACL,GAAyD;AACvD,2BAAQC,EAAgB,SAAhB,EAAwB,aAAU,kBAAkB,GAAGD,GAAO;AACxE;AAEA,SAASG,EAAa;AAAA,EACpB,GAAGH;AACL,GAAwD;AACtD,2BAAQC,EAAgB,QAAhB,EAAuB,aAAU,iBAAiB,GAAGD,GAAO;AACtE;AAEA,SAASI,EAAY;AAAA,EACnB,GAAGJ;AACL,GAAuD;AACrD,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASK,EAAc;AAAA,EACrB,WAAAC;AAAA,EACA,GAAGN;AACL,GAAyD;AACvD,SACE,gBAAAO;AAAA,IAACN,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASS,EAAc;AAAA,EACrB,WAAAH;AAAA,EACA,UAAAI;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,GAAGX;AACL,GAEG;AACD,2BACGG,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAI,EAACF,GAAA,EAAc;AAAA,IACf,gBAAAO;AAAA,MAACX,EAAgB;AAAA,MAAhB;AAAA,QACC,aAAU;AAAA,QACV,WAAWO;AAAA,UACT;AAAA,UACAF;AAAA,QAAA;AAAA,QAED,GAAGN;AAAA,QAEH,UAAA;AAAA,UAAAU;AAAA,UACAC,uBACEV,EAAgB,OAAhB,EAAsB,aAAU,gBAAe,SAAO,IACrD,UAAA,gBAAAW;AAAA,YAACC;AAAA,YAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"dialog.js","sources":["../../src/components/ui/dialog.tsx"],"sourcesContent":["import { XIcon } from \"lucide-react\"\nimport { Dialog as DialogPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { cn } from \"@/lib/utils\"\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-1/2 left-1/2 z-50 flex flex-col w-[calc(100%-2rem)] max-w-lg max-h-[90svh] -translate-x-1/2 -translate-y-1/2 rounded-xl bg-card/90 dark:bg-background text-sm shadow-elevation-5 ring-1 ring-foreground/10 duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n // Safeguard: DialogContent itself has no padding (so the footer can\n // bleed full-width). Any *unslotted* child dropped straight in — raw\n // text/elements with no data-slot — is inset with mx-4 / my-2 so it's\n // never flush to the edges or butted onto the footer (SW-2528). A\n // present data-slot marks a known component (the dialog-* parts, but\n // also full-bleed children like Command in CommandDialog /\n // ModelSelector that intentionally pass p-0 + size-full), which we\n // must leave untouched. Margin (not padding) insets an element that\n // has its own background as a whole; w-auto overrides a child's w-full\n // so the margins actually shrink it instead of overflowing.\n \"[&>*:not([data-slot])]:mx-4 [&>*:not([data-slot])]:my-2 [&>*:not([data-slot])]:w-auto\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" asChild>\n <Button\n // explicit dialog-close slot (overrides Button's own data-slot) so\n // the DialogContent padding safeguard above skips this button\n data-slot=\"dialog-close\"\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex shrink-0 flex-col gap-2 px-4 pt-4 pb-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogBody({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn(\"flex-1 overflow-y-auto px-4 py-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex shrink-0 flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 px-4 py-3 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-base leading-none font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"],"names":["Dialog","props","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","jsx","cn","DialogContent","children","showCloseButton","jsxs","Button","XIcon","DialogHeader","DialogBody","DialogFooter","DialogTitle","DialogDescription"],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("radix-ui"),l=require("../lib/utils.cjs");function i({className:t,value:r,...o}){return e.jsx(s.Progress.Root,{"data-slot":"progress",value:r,className:l.cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",t),...o,children:e.jsx(s.Progress.Indicator,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(r||0)}%)`}})})}exports.Progress=i;
|
|
2
|
+
//# sourceMappingURL=progress.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.cjs","sources":["../../src/components/ui/progress.tsx"],"sourcesContent":["import { Progress as ProgressPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Progress({\n className,\n value,\n ...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n value={value}\n className={cn(\n \"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"bg-primary h-full w-full flex-1 transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n}\n\nexport { Progress }\n"],"names":["Progress","className","value","props","jsx","ProgressPrimitive","cn"],"mappings":"yKAKA,SAASA,EAAS,CAChB,UAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EAAwD,CACtD,OACEC,EAAAA,IAACC,EAAAA,SAAkB,KAAlB,CACC,YAAU,WACV,MAAAH,EACA,UAAWI,EAAAA,GACT,iEACAL,CAAA,EAED,GAAGE,EAEJ,SAAAC,EAAAA,IAACC,EAAAA,SAAkB,UAAlB,CACC,YAAU,qBACV,UAAU,iDACV,MAAO,CAAE,UAAW,eAAe,KAAOH,GAAS,EAAE,IAAA,CAAK,CAAA,CAC5D,CAAA,CAGN"}
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Progress as
|
|
3
|
-
import { cn as a } from "
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Progress as s } from "radix-ui";
|
|
3
|
+
import { cn as a } from "../lib/utils.js";
|
|
4
4
|
function f({
|
|
5
|
-
className:
|
|
6
|
-
value:
|
|
7
|
-
...
|
|
5
|
+
className: t,
|
|
6
|
+
value: r,
|
|
7
|
+
...l
|
|
8
8
|
}) {
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
|
|
9
|
+
return /* @__PURE__ */ o(
|
|
10
|
+
s.Root,
|
|
11
11
|
{
|
|
12
12
|
"data-slot": "progress",
|
|
13
|
+
value: r,
|
|
13
14
|
className: a(
|
|
14
15
|
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
15
|
-
|
|
16
|
+
t
|
|
16
17
|
),
|
|
17
|
-
...
|
|
18
|
-
children: /* @__PURE__ */
|
|
19
|
-
|
|
18
|
+
...l,
|
|
19
|
+
children: /* @__PURE__ */ o(
|
|
20
|
+
s.Indicator,
|
|
20
21
|
{
|
|
21
22
|
"data-slot": "progress-indicator",
|
|
22
23
|
className: "bg-primary h-full w-full flex-1 transition-all",
|
|
23
|
-
style: { transform: `translateX(-${100 - (
|
|
24
|
+
style: { transform: `translateX(-${100 - (r || 0)}%)` }
|
|
24
25
|
}
|
|
25
26
|
)
|
|
26
27
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sources":["../../src/components/ui/progress.tsx"],"sourcesContent":["import { Progress as ProgressPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Progress({\n className,\n value,\n ...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n value={value}\n className={cn(\n \"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"bg-primary h-full w-full flex-1 transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n}\n\nexport { Progress }\n"],"names":["Progress","className","value","props","jsx","ProgressPrimitive","cn"],"mappings":";;;AAKA,SAASA,EAAS;AAAA,EAChB,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,GAAwD;AACtD,SACE,gBAAAC;AAAA,IAACC,EAAkB;AAAA,IAAlB;AAAA,MACC,aAAU;AAAA,MACV,OAAAH;AAAA,MACA,WAAWI;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MAEJ,UAAA,gBAAAC;AAAA,QAACC,EAAkB;AAAA,QAAlB;AAAA,UACC,aAAU;AAAA,UACV,WAAU;AAAA,UACV,OAAO,EAAE,WAAW,eAAe,OAAOH,KAAS,EAAE,KAAA;AAAA,QAAK;AAAA,MAAA;AAAA,IAC5D;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),C=require("lucide-react"),n=require("react"),r=require("./input-group.cjs"),p=require("../lib/utils.cjs"),a=n.createContext({code:""}),y=({code:e,className:t,children:i,...s})=>{const u=n.useMemo(()=>({code:e}),[e]);return o.jsx(a.Provider,{value:u,children:o.jsx(r.InputGroup,{className:p.cn("font-mono",t),...s,children:i})})},b=e=>o.jsx(r.InputGroupAddon,{...e}),w=({className:e,...t})=>o.jsx(r.InputGroupText,{className:p.cn("pl-2 font-normal text-muted-foreground",e),...t}),j=({className:e,...t})=>{const{code:i}=n.useContext(a);return o.jsx(r.InputGroupInput,{"aria-label":"Code snippet",className:p.cn("text-foreground",e),readOnly:!0,value:i,...t})},T=({onCopy:e,onError:t,timeout:i=2e3,children:s,className:u,...f})=>{const[c,l]=n.useState(!1),d=n.useRef(0),{code:x}=n.useContext(a),S=n.useCallback(async()=>{if(typeof window>"u"||!navigator?.clipboard?.writeText){t?.(new Error("Clipboard API not available"));return}try{c||(await navigator.clipboard.writeText(x),l(!0),e?.(),d.current=window.setTimeout(()=>l(!1),i))}catch(I){t?.(I)}},[x,e,t,i,c]);n.useEffect(()=>()=>{window.clearTimeout(d.current)},[]);const m=c?C.CheckIcon:C.CopyIcon;return o.jsx(r.InputGroupButton,{"aria-label":"Copy",className:u,onClick:S,size:"icon-sm",title:"Copy",...f,children:s??o.jsx(m,{className:"size-3.5",size:14})})};exports.Snippet=y;exports.SnippetAddon=b;exports.SnippetCopyButton=T;exports.SnippetInput=j;exports.SnippetText=w;
|
|
2
|
+
//# sourceMappingURL=snippet.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snippet.cjs","sources":["../../src/components/ui/snippet.tsx"],"sourcesContent":["\"use client\";\n\nimport { CheckIcon, CopyIcon } from \"lucide-react\";\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport type { ComponentProps } from \"react\";\n\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n InputGroupText,\n} from \"@/components/ui/input-group\";\nimport { cn } from \"@/lib/utils\";\n\n\ninterface SnippetContextType {\n code: string;\n}\n\nconst SnippetContext = createContext<SnippetContextType>({\n code: \"\",\n});\n\nexport type SnippetProps = ComponentProps<typeof InputGroup> & {\n code: string;\n};\n\nexport const Snippet = ({\n code,\n className,\n children,\n ...props\n}: SnippetProps) => {\n const contextValue = useMemo(() => ({ code }), [code]);\n\n return (\n <SnippetContext.Provider value={contextValue}>\n <InputGroup className={cn(\"font-mono\", className)} {...props}>\n {children}\n </InputGroup>\n </SnippetContext.Provider>\n );\n};\n\nexport type SnippetAddonProps = ComponentProps<typeof InputGroupAddon>;\n\nexport const SnippetAddon = (props: SnippetAddonProps) => (\n <InputGroupAddon {...props} />\n);\n\nexport type SnippetTextProps = ComponentProps<typeof InputGroupText>;\n\nexport const SnippetText = ({ className, ...props }: SnippetTextProps) => (\n <InputGroupText\n className={cn(\"pl-2 font-normal text-muted-foreground\", className)}\n {...props}\n />\n);\n\nexport type SnippetInputProps = Omit<\n ComponentProps<typeof InputGroupInput>,\n \"readOnly\" | \"value\"\n>;\n\nexport const SnippetInput = ({ className, ...props }: SnippetInputProps) => {\n const { code } = useContext(SnippetContext);\n\n return (\n <InputGroupInput\n aria-label=\"Code snippet\"\n className={cn(\"text-foreground\", className)}\n readOnly\n value={code}\n {...props}\n />\n );\n};\n\nexport type SnippetCopyButtonProps = ComponentProps<typeof InputGroupButton> & {\n onCopy?: () => void;\n onError?: (error: Error) => void;\n timeout?: number;\n};\n\nexport const SnippetCopyButton = ({\n onCopy,\n onError,\n timeout = 2000,\n children,\n className,\n ...props\n}: SnippetCopyButtonProps) => {\n const [isCopied, setIsCopied] = useState(false);\n const timeoutRef = useRef<number>(0);\n const { code } = useContext(SnippetContext);\n\n const copyToClipboard = useCallback(async () => {\n if (typeof window === \"undefined\" || !navigator?.clipboard?.writeText) {\n onError?.(new Error(\"Clipboard API not available\"));\n return;\n }\n\n try {\n if (!isCopied) {\n await navigator.clipboard.writeText(code);\n setIsCopied(true);\n onCopy?.();\n timeoutRef.current = window.setTimeout(\n () => setIsCopied(false),\n timeout\n );\n }\n } catch (error) {\n onError?.(error as Error);\n }\n }, [code, onCopy, onError, timeout, isCopied]);\n\n useEffect(\n () => () => {\n window.clearTimeout(timeoutRef.current);\n },\n []\n );\n\n const Icon = isCopied ? CheckIcon : CopyIcon;\n\n return (\n <InputGroupButton\n aria-label=\"Copy\"\n className={className}\n onClick={copyToClipboard}\n size=\"icon-sm\"\n title=\"Copy\"\n {...props}\n >\n {children ?? <Icon className=\"size-3.5\" size={14} />}\n </InputGroupButton>\n );\n};\n"],"names":["SnippetContext","createContext","Snippet","code","className","children","props","contextValue","useMemo","jsx","InputGroup","cn","SnippetAddon","InputGroupAddon","SnippetText","InputGroupText","SnippetInput","useContext","InputGroupInput","SnippetCopyButton","onCopy","onError","timeout","isCopied","setIsCopied","useState","timeoutRef","useRef","copyToClipboard","useCallback","error","useEffect","Icon","CheckIcon","CopyIcon","InputGroupButton"],"mappings":"+NA6BMA,EAAiBC,EAAAA,cAAkC,CACvD,KAAM,EACR,CAAC,EAMYC,EAAU,CAAC,CACtB,KAAAC,EACA,UAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAAoB,CAClB,MAAMC,EAAeC,EAAAA,QAAQ,KAAO,CAAE,KAAAL,IAAS,CAACA,CAAI,CAAC,EAErD,aACGH,EAAe,SAAf,CAAwB,MAAOO,EAC9B,SAAAE,MAACC,EAAAA,WAAA,CAAW,UAAWC,EAAAA,GAAG,YAAaP,CAAS,EAAI,GAAGE,EACpD,SAAAD,EACH,EACF,CAEJ,EAIaO,EAAgBN,GAC3BG,EAAAA,IAACI,EAAAA,gBAAA,CAAiB,GAAGP,CAAA,CAAO,EAKjBQ,EAAc,CAAC,CAAE,UAAAV,EAAW,GAAGE,KAC1CG,EAAAA,IAACM,EAAAA,eAAA,CACC,UAAWJ,EAAAA,GAAG,yCAA0CP,CAAS,EAChE,GAAGE,CAAA,CACN,EAQWU,EAAe,CAAC,CAAE,UAAAZ,EAAW,GAAGE,KAA+B,CAC1E,KAAM,CAAE,KAAAH,CAAA,EAASc,EAAAA,WAAWjB,CAAc,EAE1C,OACES,EAAAA,IAACS,EAAAA,gBAAA,CACC,aAAW,eACX,UAAWP,EAAAA,GAAG,kBAAmBP,CAAS,EAC1C,SAAQ,GACR,MAAOD,EACN,GAAGG,CAAA,CAAA,CAGV,EAQaa,EAAoB,CAAC,CAChC,OAAAC,EACA,QAAAC,EACA,QAAAC,EAAU,IACV,SAAAjB,EACA,UAAAD,EACA,GAAGE,CACL,IAA8B,CAC5B,KAAM,CAACiB,EAAUC,CAAW,EAAIC,EAAAA,SAAS,EAAK,EACxCC,EAAaC,EAAAA,OAAe,CAAC,EAC7B,CAAE,KAAAxB,CAAA,EAASc,EAAAA,WAAWjB,CAAc,EAEpC4B,EAAkBC,EAAAA,YAAY,SAAY,CAC9C,GAAI,OAAO,OAAW,KAAe,CAAC,WAAW,WAAW,UAAW,CACrER,IAAU,IAAI,MAAM,6BAA6B,CAAC,EAClD,MACF,CAEA,GAAI,CACGE,IACH,MAAM,UAAU,UAAU,UAAUpB,CAAI,EACxCqB,EAAY,EAAI,EAChBJ,IAAA,EACAM,EAAW,QAAU,OAAO,WAC1B,IAAMF,EAAY,EAAK,EACvBF,CAAA,EAGN,OAASQ,EAAO,CACdT,IAAUS,CAAc,CAC1B,CACF,EAAG,CAAC3B,EAAMiB,EAAQC,EAASC,EAASC,CAAQ,CAAC,EAE7CQ,EAAAA,UACE,IAAM,IAAM,CACV,OAAO,aAAaL,EAAW,OAAO,CACxC,EACA,CAAA,CAAC,EAGH,MAAMM,EAAOT,EAAWU,EAAAA,UAAYC,EAAAA,SAEpC,OACEzB,EAAAA,IAAC0B,EAAAA,iBAAA,CACC,aAAW,OACX,UAAA/B,EACA,QAASwB,EACT,KAAK,UACL,MAAM,OACL,GAAGtB,EAEH,YAAYG,EAAAA,IAACuB,EAAA,CAAK,UAAU,WAAW,KAAM,EAAA,CAAI,CAAA,CAAA,CAGxD"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { CheckIcon as I, CopyIcon as x } from "lucide-react";
|
|
3
|
+
import { createContext as w, useMemo as b, useState as y, useRef as S, useContext as d, useCallback as T, useEffect as v } from "react";
|
|
4
|
+
import { InputGroup as G, InputGroupAddon as g, InputGroupButton as h, InputGroupInput as N, InputGroupText as k } from "./input-group.js";
|
|
5
|
+
import { cn as c } from "../lib/utils.js";
|
|
6
|
+
const a = w({
|
|
7
|
+
code: ""
|
|
8
|
+
}), M = ({
|
|
9
|
+
code: t,
|
|
10
|
+
className: e,
|
|
11
|
+
children: n,
|
|
12
|
+
...r
|
|
13
|
+
}) => {
|
|
14
|
+
const i = b(() => ({ code: t }), [t]);
|
|
15
|
+
return /* @__PURE__ */ o(a.Provider, { value: i, children: /* @__PURE__ */ o(G, { className: c("font-mono", e), ...r, children: n }) });
|
|
16
|
+
}, O = (t) => /* @__PURE__ */ o(g, { ...t }), V = ({ className: t, ...e }) => /* @__PURE__ */ o(
|
|
17
|
+
k,
|
|
18
|
+
{
|
|
19
|
+
className: c("pl-2 font-normal text-muted-foreground", t),
|
|
20
|
+
...e
|
|
21
|
+
}
|
|
22
|
+
), q = ({ className: t, ...e }) => {
|
|
23
|
+
const { code: n } = d(a);
|
|
24
|
+
return /* @__PURE__ */ o(
|
|
25
|
+
N,
|
|
26
|
+
{
|
|
27
|
+
"aria-label": "Code snippet",
|
|
28
|
+
className: c("text-foreground", t),
|
|
29
|
+
readOnly: !0,
|
|
30
|
+
value: n,
|
|
31
|
+
...e
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}, D = ({
|
|
35
|
+
onCopy: t,
|
|
36
|
+
onError: e,
|
|
37
|
+
timeout: n = 2e3,
|
|
38
|
+
children: r,
|
|
39
|
+
className: i,
|
|
40
|
+
...m
|
|
41
|
+
}) => {
|
|
42
|
+
const [p, s] = y(!1), u = S(0), { code: l } = d(a), f = T(async () => {
|
|
43
|
+
if (typeof window > "u" || !navigator?.clipboard?.writeText) {
|
|
44
|
+
e?.(new Error("Clipboard API not available"));
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
p || (await navigator.clipboard.writeText(l), s(!0), t?.(), u.current = window.setTimeout(
|
|
49
|
+
() => s(!1),
|
|
50
|
+
n
|
|
51
|
+
));
|
|
52
|
+
} catch (C) {
|
|
53
|
+
e?.(C);
|
|
54
|
+
}
|
|
55
|
+
}, [l, t, e, n, p]);
|
|
56
|
+
return v(
|
|
57
|
+
() => () => {
|
|
58
|
+
window.clearTimeout(u.current);
|
|
59
|
+
},
|
|
60
|
+
[]
|
|
61
|
+
), /* @__PURE__ */ o(
|
|
62
|
+
h,
|
|
63
|
+
{
|
|
64
|
+
"aria-label": "Copy",
|
|
65
|
+
className: i,
|
|
66
|
+
onClick: f,
|
|
67
|
+
size: "icon-sm",
|
|
68
|
+
title: "Copy",
|
|
69
|
+
...m,
|
|
70
|
+
children: r ?? /* @__PURE__ */ o(p ? I : x, { className: "size-3.5", size: 14 })
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
M as Snippet,
|
|
76
|
+
O as SnippetAddon,
|
|
77
|
+
D as SnippetCopyButton,
|
|
78
|
+
q as SnippetInput,
|
|
79
|
+
V as SnippetText
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=snippet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snippet.js","sources":["../../src/components/ui/snippet.tsx"],"sourcesContent":["\"use client\";\n\nimport { CheckIcon, CopyIcon } from \"lucide-react\";\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport type { ComponentProps } from \"react\";\n\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n InputGroupText,\n} from \"@/components/ui/input-group\";\nimport { cn } from \"@/lib/utils\";\n\n\ninterface SnippetContextType {\n code: string;\n}\n\nconst SnippetContext = createContext<SnippetContextType>({\n code: \"\",\n});\n\nexport type SnippetProps = ComponentProps<typeof InputGroup> & {\n code: string;\n};\n\nexport const Snippet = ({\n code,\n className,\n children,\n ...props\n}: SnippetProps) => {\n const contextValue = useMemo(() => ({ code }), [code]);\n\n return (\n <SnippetContext.Provider value={contextValue}>\n <InputGroup className={cn(\"font-mono\", className)} {...props}>\n {children}\n </InputGroup>\n </SnippetContext.Provider>\n );\n};\n\nexport type SnippetAddonProps = ComponentProps<typeof InputGroupAddon>;\n\nexport const SnippetAddon = (props: SnippetAddonProps) => (\n <InputGroupAddon {...props} />\n);\n\nexport type SnippetTextProps = ComponentProps<typeof InputGroupText>;\n\nexport const SnippetText = ({ className, ...props }: SnippetTextProps) => (\n <InputGroupText\n className={cn(\"pl-2 font-normal text-muted-foreground\", className)}\n {...props}\n />\n);\n\nexport type SnippetInputProps = Omit<\n ComponentProps<typeof InputGroupInput>,\n \"readOnly\" | \"value\"\n>;\n\nexport const SnippetInput = ({ className, ...props }: SnippetInputProps) => {\n const { code } = useContext(SnippetContext);\n\n return (\n <InputGroupInput\n aria-label=\"Code snippet\"\n className={cn(\"text-foreground\", className)}\n readOnly\n value={code}\n {...props}\n />\n );\n};\n\nexport type SnippetCopyButtonProps = ComponentProps<typeof InputGroupButton> & {\n onCopy?: () => void;\n onError?: (error: Error) => void;\n timeout?: number;\n};\n\nexport const SnippetCopyButton = ({\n onCopy,\n onError,\n timeout = 2000,\n children,\n className,\n ...props\n}: SnippetCopyButtonProps) => {\n const [isCopied, setIsCopied] = useState(false);\n const timeoutRef = useRef<number>(0);\n const { code } = useContext(SnippetContext);\n\n const copyToClipboard = useCallback(async () => {\n if (typeof window === \"undefined\" || !navigator?.clipboard?.writeText) {\n onError?.(new Error(\"Clipboard API not available\"));\n return;\n }\n\n try {\n if (!isCopied) {\n await navigator.clipboard.writeText(code);\n setIsCopied(true);\n onCopy?.();\n timeoutRef.current = window.setTimeout(\n () => setIsCopied(false),\n timeout\n );\n }\n } catch (error) {\n onError?.(error as Error);\n }\n }, [code, onCopy, onError, timeout, isCopied]);\n\n useEffect(\n () => () => {\n window.clearTimeout(timeoutRef.current);\n },\n []\n );\n\n const Icon = isCopied ? CheckIcon : CopyIcon;\n\n return (\n <InputGroupButton\n aria-label=\"Copy\"\n className={className}\n onClick={copyToClipboard}\n size=\"icon-sm\"\n title=\"Copy\"\n {...props}\n >\n {children ?? <Icon className=\"size-3.5\" size={14} />}\n </InputGroupButton>\n );\n};\n"],"names":["SnippetContext","createContext","Snippet","code","className","children","props","contextValue","useMemo","jsx","InputGroup","cn","SnippetAddon","InputGroupAddon","SnippetText","InputGroupText","SnippetInput","useContext","InputGroupInput","SnippetCopyButton","onCopy","onError","timeout","isCopied","setIsCopied","useState","timeoutRef","useRef","copyToClipboard","useCallback","error","useEffect","InputGroupButton","CheckIcon","CopyIcon"],"mappings":";;;;;AA6BA,MAAMA,IAAiBC,EAAkC;AAAA,EACvD,MAAM;AACR,CAAC,GAMYC,IAAU,CAAC;AAAA,EACtB,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAoB;AAClB,QAAMC,IAAeC,EAAQ,OAAO,EAAE,MAAAL,MAAS,CAACA,CAAI,CAAC;AAErD,2BACGH,EAAe,UAAf,EAAwB,OAAOO,GAC9B,UAAA,gBAAAE,EAACC,GAAA,EAAW,WAAWC,EAAG,aAAaP,CAAS,GAAI,GAAGE,GACpD,UAAAD,GACH,GACF;AAEJ,GAIaO,IAAe,CAACN,MAC3B,gBAAAG,EAACI,GAAA,EAAiB,GAAGP,EAAA,CAAO,GAKjBQ,IAAc,CAAC,EAAE,WAAAV,GAAW,GAAGE,QAC1C,gBAAAG;AAAA,EAACM;AAAA,EAAA;AAAA,IACC,WAAWJ,EAAG,0CAA0CP,CAAS;AAAA,IAChE,GAAGE;AAAA,EAAA;AACN,GAQWU,IAAe,CAAC,EAAE,WAAAZ,GAAW,GAAGE,QAA+B;AAC1E,QAAM,EAAE,MAAAH,EAAA,IAASc,EAAWjB,CAAc;AAE1C,SACE,gBAAAS;AAAA,IAACS;AAAA,IAAA;AAAA,MACC,cAAW;AAAA,MACX,WAAWP,EAAG,mBAAmBP,CAAS;AAAA,MAC1C,UAAQ;AAAA,MACR,OAAOD;AAAA,MACN,GAAGG;AAAA,IAAA;AAAA,EAAA;AAGV,GAQaa,IAAoB,CAAC;AAAA,EAChC,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,UAAAjB;AAAA,EACA,WAAAD;AAAA,EACA,GAAGE;AACL,MAA8B;AAC5B,QAAM,CAACiB,GAAUC,CAAW,IAAIC,EAAS,EAAK,GACxCC,IAAaC,EAAe,CAAC,GAC7B,EAAE,MAAAxB,EAAA,IAASc,EAAWjB,CAAc,GAEpC4B,IAAkBC,EAAY,YAAY;AAC9C,QAAI,OAAO,SAAW,OAAe,CAAC,WAAW,WAAW,WAAW;AACrE,MAAAR,IAAU,IAAI,MAAM,6BAA6B,CAAC;AAClD;AAAA,IACF;AAEA,QAAI;AACF,MAAKE,MACH,MAAM,UAAU,UAAU,UAAUpB,CAAI,GACxCqB,EAAY,EAAI,GAChBJ,IAAA,GACAM,EAAW,UAAU,OAAO;AAAA,QAC1B,MAAMF,EAAY,EAAK;AAAA,QACvBF;AAAA,MAAA;AAAA,IAGN,SAASQ,GAAO;AACd,MAAAT,IAAUS,CAAc;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC3B,GAAMiB,GAAQC,GAASC,GAASC,CAAQ,CAAC;AAE7C,SAAAQ;AAAA,IACE,MAAM,MAAM;AACV,aAAO,aAAaL,EAAW,OAAO;AAAA,IACxC;AAAA,IACA,CAAA;AAAA,EAAC,GAMD,gBAAAjB;AAAA,IAACuB;AAAA,IAAA;AAAA,MACC,cAAW;AAAA,MACX,WAAA5B;AAAA,MACA,SAASwB;AAAA,MACT,MAAK;AAAA,MACL,OAAM;AAAA,MACL,GAAGtB;AAAA,MAEH,eAAY,gBAAAG,EAXJc,IAAWU,IAAYC,GAWlB,EAAK,WAAU,YAAW,MAAM,GAAA,CAAI;AAAA,IAAA;AAAA,EAAA;AAGxD;"}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),e=require("radix-ui"),l=require("../../lib/utils.cjs");function a({className:s,value:t,...o}){return r.jsx(e.Progress.Root,{"data-slot":"progress",className:l.cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",s),...o,children:r.jsx(e.Progress.Indicator,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}exports.Progress=a;
|
|
2
|
-
//# sourceMappingURL=progress.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress.cjs","sources":["../../../src/components/ui/progress.tsx"],"sourcesContent":["import { Progress as ProgressPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Progress({\n className,\n value,\n ...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n className={cn(\n \"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"bg-primary h-full w-full flex-1 transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n}\n\nexport { Progress }\n"],"names":["Progress","className","value","props","jsx","ProgressPrimitive","cn"],"mappings":"4KAKA,SAASA,EAAS,CAChB,UAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EAAwD,CACtD,OACEC,EAAAA,IAACC,EAAAA,SAAkB,KAAlB,CACC,YAAU,WACV,UAAWC,EAAAA,GACT,iEACAL,CAAA,EAED,GAAGE,EAEJ,SAAAC,EAAAA,IAACC,EAAAA,SAAkB,UAAlB,CACC,YAAU,qBACV,UAAU,iDACV,MAAO,CAAE,UAAW,eAAe,KAAOH,GAAS,EAAE,IAAA,CAAK,CAAA,CAC5D,CAAA,CAGN"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","sources":["../../../src/components/ui/progress.tsx"],"sourcesContent":["import { Progress as ProgressPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Progress({\n className,\n value,\n ...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n className={cn(\n \"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"bg-primary h-full w-full flex-1 transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n}\n\nexport { Progress }\n"],"names":["Progress","className","value","props","jsx","ProgressPrimitive","cn"],"mappings":";;;AAKA,SAASA,EAAS;AAAA,EAChB,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,GAAwD;AACtD,SACE,gBAAAC;AAAA,IAACC,EAAkB;AAAA,IAAlB;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MAEJ,UAAA,gBAAAC;AAAA,QAACC,EAAkB;AAAA,QAAlB;AAAA,UACC,aAAU;AAAA,UACV,WAAU;AAAA,UACV,OAAO,EAAE,WAAW,eAAe,OAAOH,KAAS,EAAE,KAAA;AAAA,QAAK;AAAA,MAAA;AAAA,IAC5D;AAAA,EAAA;AAGN;"}
|