@abumble/design-system 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{components/Button/Button.js → Button.js} +3 -3
- package/dist/Button.js.map +1 -0
- package/dist/{components/Empty/Empty.js → Empty.js} +24 -24
- package/dist/Empty.js.map +1 -0
- package/dist/{components/Input/Input.js → Input.js} +3 -3
- package/dist/Input.js.map +1 -0
- package/dist/{components/Separator/Separator.js → Separator.js} +8 -8
- package/dist/Separator.js.map +1 -0
- package/dist/{components/Sheet/Sheet.js → Sheet.js} +33 -33
- package/dist/Sheet.js.map +1 -0
- package/dist/{components/Skeleton/Skeleton.js → Skeleton.js} +5 -5
- package/dist/Skeleton.js.map +1 -0
- package/dist/{components/Tooltip/Tooltip.js → Tooltip.js} +9 -9
- package/dist/Tooltip.js.map +1 -0
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.d.ts.map +1 -1
- package/dist/components/Banner.js +73 -4
- package/dist/components/Banner.js.map +1 -1
- package/dist/components/Breadcrumb.js +100 -7
- package/dist/components/Breadcrumb.js.map +1 -1
- package/dist/components/Button.js +3 -3
- package/dist/components/Card.js +85 -7
- package/dist/components/Card.js.map +1 -1
- package/dist/components/Carousel.js +175 -6
- package/dist/components/Carousel.js.map +1 -1
- package/dist/components/CodeDisplay.js +19 -2
- package/dist/components/CodeDisplay.js.map +1 -1
- package/dist/components/Collapsible.js +32 -4
- package/dist/components/Collapsible.js.map +1 -1
- package/dist/components/ContextMenu.js +221 -15
- package/dist/components/ContextMenu.js.map +1 -1
- package/dist/components/Empty.js +6 -6
- package/dist/components/Input.js +1 -1
- package/dist/components/List.js +61 -4
- package/dist/components/List.js.map +1 -1
- package/dist/components/NotFound.js +14 -2
- package/dist/components/NotFound.js.map +1 -1
- package/dist/components/Popover.js +43 -5
- package/dist/components/Popover.js.map +1 -1
- package/dist/components/Separator.js +2 -2
- package/dist/components/Sheet.js +9 -9
- package/dist/components/Sidebar.js +592 -25
- package/dist/components/Sidebar.js.map +1 -1
- package/dist/components/Skeleton.js +1 -1
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/UnderConstruction.js +29 -2
- package/dist/components/UnderConstruction.js.map +1 -1
- package/dist/constants/constants.d.ts.map +1 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants.js.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks.js +5 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/{hooks/use-mobile.js → use-mobile.js} +1 -1
- package/dist/use-mobile.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/{lib → utils}/utils.d.ts +2 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils.js +8 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils2.js +21 -0
- package/dist/utils2.js.map +1 -0
- package/package.json +31 -35
- package/dist/assets/crane.svg.js +0 -5
- package/dist/assets/crane.svg.js.map +0 -1
- package/dist/components/Banner/Banner.js +0 -76
- package/dist/components/Banner/Banner.js.map +0 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +0 -104
- package/dist/components/Breadcrumb/Breadcrumb.js.map +0 -1
- package/dist/components/Button/Button.js.map +0 -1
- package/dist/components/Card/Card.js +0 -89
- package/dist/components/Card/Card.js.map +0 -1
- package/dist/components/Carousel/Carousel.js +0 -178
- package/dist/components/Carousel/Carousel.js.map +0 -1
- package/dist/components/CodeDisplay/CodeDisplay.js +0 -22
- package/dist/components/CodeDisplay/CodeDisplay.js.map +0 -1
- package/dist/components/Collapsible/Collapsible.js +0 -35
- package/dist/components/Collapsible/Collapsible.js.map +0 -1
- package/dist/components/ContextMenu/ContextMenu.js +0 -225
- package/dist/components/ContextMenu/ContextMenu.js.map +0 -1
- package/dist/components/Empty/Empty.js.map +0 -1
- package/dist/components/Input/Input.js.map +0 -1
- package/dist/components/List/List.js +0 -64
- package/dist/components/List/List.js.map +0 -1
- package/dist/components/NotFound/NotFound.js +0 -17
- package/dist/components/NotFound/NotFound.js.map +0 -1
- package/dist/components/Popover/Popover.js +0 -46
- package/dist/components/Popover/Popover.js.map +0 -1
- package/dist/components/Separator/Separator.js.map +0 -1
- package/dist/components/Sheet/Sheet.js.map +0 -1
- package/dist/components/Sidebar/Sidebar.js +0 -595
- package/dist/components/Sidebar/Sidebar.js.map +0 -1
- package/dist/components/Skeleton/Skeleton.js.map +0 -1
- package/dist/components/Tooltip/Tooltip.js.map +0 -1
- package/dist/components/UnderConstruction/UnderConstruction.js +0 -33
- package/dist/components/UnderConstruction/UnderConstruction.js.map +0 -1
- package/dist/hooks/use-mobile.js.map +0 -1
- package/dist/lib/constants.d.ts.map +0 -1
- package/dist/lib/constants.js.map +0 -1
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -9
- package/dist/lib/utils.js.map +0 -1
- /package/dist/{lib → constants}/constants.d.ts +0 -0
- /package/dist/{lib/constants.js → constants.js} +0 -0
- /package/dist/{lib → types}/types.d.ts +0 -0
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import { Slot as s } from "@radix-ui/react-slot";
|
|
3
|
-
import { MoreHorizontal as i, ChevronRight as l } from "lucide-react";
|
|
4
|
-
import "react";
|
|
5
|
-
import { cn as t } from "../../lib/utils.js";
|
|
6
|
-
function f({ ...r }) {
|
|
7
|
-
return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...r });
|
|
8
|
-
}
|
|
9
|
-
function g({ className: r, ...e }) {
|
|
10
|
-
return /* @__PURE__ */ a(
|
|
11
|
-
"ol",
|
|
12
|
-
{
|
|
13
|
-
"data-slot": "breadcrumb-list",
|
|
14
|
-
className: t(
|
|
15
|
-
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
|
|
16
|
-
r
|
|
17
|
-
),
|
|
18
|
-
...e
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
function x({ className: r, ...e }) {
|
|
23
|
-
return /* @__PURE__ */ a(
|
|
24
|
-
"li",
|
|
25
|
-
{
|
|
26
|
-
"data-slot": "breadcrumb-item",
|
|
27
|
-
className: t("inline-flex items-center gap-1.5", r),
|
|
28
|
-
...e
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
function h({
|
|
33
|
-
asChild: r,
|
|
34
|
-
className: e,
|
|
35
|
-
...n
|
|
36
|
-
}) {
|
|
37
|
-
return /* @__PURE__ */ a(
|
|
38
|
-
r ? s : "a",
|
|
39
|
-
{
|
|
40
|
-
"data-slot": "breadcrumb-link",
|
|
41
|
-
className: t("hover:text-foreground transition-colors", e),
|
|
42
|
-
...n
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
function N({ className: r, ...e }) {
|
|
47
|
-
return /* @__PURE__ */ a(
|
|
48
|
-
"span",
|
|
49
|
-
{
|
|
50
|
-
"data-slot": "breadcrumb-page",
|
|
51
|
-
role: "link",
|
|
52
|
-
"aria-disabled": "true",
|
|
53
|
-
"aria-current": "page",
|
|
54
|
-
className: t("text-foreground font-normal", r),
|
|
55
|
-
...e
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
function B({
|
|
60
|
-
children: r,
|
|
61
|
-
className: e,
|
|
62
|
-
...n
|
|
63
|
-
}) {
|
|
64
|
-
return /* @__PURE__ */ a(
|
|
65
|
-
"li",
|
|
66
|
-
{
|
|
67
|
-
"data-slot": "breadcrumb-separator",
|
|
68
|
-
role: "presentation",
|
|
69
|
-
"aria-hidden": "true",
|
|
70
|
-
className: t("[&>svg]:size-3.5", e),
|
|
71
|
-
...n,
|
|
72
|
-
children: r ?? /* @__PURE__ */ a(l, {})
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
function k({
|
|
77
|
-
className: r,
|
|
78
|
-
...e
|
|
79
|
-
}) {
|
|
80
|
-
return /* @__PURE__ */ o(
|
|
81
|
-
"span",
|
|
82
|
-
{
|
|
83
|
-
"data-slot": "breadcrumb-ellipsis",
|
|
84
|
-
role: "presentation",
|
|
85
|
-
"aria-hidden": "true",
|
|
86
|
-
className: t("flex size-9 items-center justify-center", r),
|
|
87
|
-
...e,
|
|
88
|
-
children: [
|
|
89
|
-
/* @__PURE__ */ a(i, { className: "size-4" }),
|
|
90
|
-
/* @__PURE__ */ a("span", { className: "sr-only", children: "More" })
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
export {
|
|
96
|
-
f as Breadcrumb,
|
|
97
|
-
k as BreadcrumbEllipsis,
|
|
98
|
-
x as BreadcrumbItem,
|
|
99
|
-
h as BreadcrumbLink,
|
|
100
|
-
g as BreadcrumbList,
|
|
101
|
-
N as BreadcrumbPage,
|
|
102
|
-
B as BreadcrumbSeparator
|
|
103
|
-
};
|
|
104
|
-
//# sourceMappingURL=Breadcrumb.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.js","sources":["../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\"\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Breadcrumb({ ...props }: React.ComponentProps<\"nav\">) {\n\treturn <nav aria-label=\"breadcrumb\" data-slot=\"breadcrumb\" {...props} />\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<\"ol\">) {\n\treturn (\n\t\t<ol\n\t\t\tdata-slot=\"breadcrumb-list\"\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5\",\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<\"li\">) {\n\treturn (\n\t\t<li\n\t\t\tdata-slot=\"breadcrumb-item\"\n\t\t\tclassName={cn(\"inline-flex items-center gap-1.5\", className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction BreadcrumbLink({\n\tasChild,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"a\"> & {\n\tasChild?: boolean\n}) {\n\tconst Comp = asChild ? Slot : \"a\"\n\n\treturn (\n\t\t<Comp\n\t\t\tdata-slot=\"breadcrumb-link\"\n\t\t\tclassName={cn(\"hover:text-foreground transition-colors\", className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"breadcrumb-page\"\n\t\t\trole=\"link\"\n\t\t\taria-disabled=\"true\"\n\t\t\taria-current=\"page\"\n\t\t\tclassName={cn(\"text-foreground font-normal\", className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction BreadcrumbSeparator({\n\tchildren,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"li\">) {\n\treturn (\n\t\t<li\n\t\t\tdata-slot=\"breadcrumb-separator\"\n\t\t\trole=\"presentation\"\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName={cn(\"[&>svg]:size-3.5\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children ?? <ChevronRight />}\n\t\t</li>\n\t)\n}\n\nfunction BreadcrumbEllipsis({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"breadcrumb-ellipsis\"\n\t\t\trole=\"presentation\"\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName={cn(\"flex size-9 items-center justify-center\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<MoreHorizontal className=\"size-4\" />\n\t\t\t<span className=\"sr-only\">More</span>\n\t\t</span>\n\t)\n}\n\nexport {\n\tBreadcrumb, BreadcrumbEllipsis, BreadcrumbItem,\n\tBreadcrumbLink, BreadcrumbList, BreadcrumbPage,\n\tBreadcrumbSeparator\n}\n\n"],"names":["Breadcrumb","props","BreadcrumbList","className","jsx","cn","BreadcrumbItem","BreadcrumbLink","asChild","Slot","BreadcrumbPage","BreadcrumbSeparator","children","ChevronRight","BreadcrumbEllipsis","jsxs","MoreHorizontal"],"mappings":";;;;;AAMA,SAASA,EAAW,EAAE,GAAGC,KAAsC;AAC9D,2BAAQ,OAAA,EAAI,cAAW,cAAa,aAAU,cAAc,GAAGA,GAAO;AACvE;AAEA,SAASC,EAAe,EAAE,WAAAC,GAAW,GAAGF,KAAqC;AAC5E,SACC,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAF;AAAA,MAAA;AAAA,MAEA,GAAGF;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASK,EAAe,EAAE,WAAAH,GAAW,GAAGF,KAAqC;AAC5E,SACC,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAG,oCAAoCF,CAAS;AAAA,MAC1D,GAAGF;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASM,EAAe;AAAA,EACvB,SAAAC;AAAA,EACA,WAAAL;AAAA,EACA,GAAGF;AACJ,GAEG;AAGF,SACC,gBAAAG;AAAA,IAHYI,IAAUC,IAAO;AAAA,IAG5B;AAAA,MACA,aAAU;AAAA,MACV,WAAWJ,EAAG,2CAA2CF,CAAS;AAAA,MACjE,GAAGF;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASS,EAAe,EAAE,WAAAP,GAAW,GAAGF,KAAuC;AAC9E,SACC,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,MAAK;AAAA,MACL,iBAAc;AAAA,MACd,gBAAa;AAAA,MACb,WAAWC,EAAG,+BAA+BF,CAAS;AAAA,MACrD,GAAGF;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASU,EAAoB;AAAA,EAC5B,UAAAC;AAAA,EACA,WAAAT;AAAA,EACA,GAAGF;AACJ,GAA+B;AAC9B,SACC,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAWC,EAAG,oBAAoBF,CAAS;AAAA,MAC1C,GAAGF;AAAA,MAEH,UAAAW,uBAAaC,GAAA,CAAA,CAAa;AAAA,IAAA;AAAA,EAAA;AAG9B;AAEA,SAASC,EAAmB;AAAA,EAC3B,WAAAX;AAAA,EACA,GAAGF;AACJ,GAAiC;AAChC,SACC,gBAAAc;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAWV,EAAG,2CAA2CF,CAAS;AAAA,MACjE,GAAGF;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAG,EAACY,GAAA,EAAe,WAAU,SAAA,CAAS;AAAA,QACnC,gBAAAZ,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,OAAA,CAAI;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGjC;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n\t\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n\t\t\t\tghost:\n\t\t\t\t\t\"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n\t\t\t\tlink: \"text-primary underline-offset-4 hover:underline\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n\t\t\t\tsm: \"h-8 rounded gap-1.5 px-3 has-[>svg]:px-2.5\",\n\t\t\t\tlg: \"h-10 rounded px-6 has-[>svg]:px-4\",\n\t\t\t\ticon: \"size-9\",\n\t\t\t\t\"icon-sm\": \"size-8\",\n\t\t\t\t\"icon-lg\": \"size-10\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"outline\",\n\t\t\tsize: \"default\",\n\t\t},\n\t}\n)\n\nfunction Button({\n\tclassName,\n\tvariant,\n\tsize,\n\tasChild = false,\n\t...props\n}: React.ComponentProps<\"button\"> &\n\tVariantProps<typeof buttonVariants> & {\n\t\tasChild?: boolean\n\t}) {\n\tconst Comp = asChild ? Slot : \"button\"\n\n\treturn (\n\t\t<Comp\n\t\t\tdata-slot=\"button\"\n\t\t\tclassName={cn(buttonVariants({ variant, size, className }))}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport { Button, buttonVariants }\n"],"names":["buttonVariants","cva","Button","className","variant","size","asChild","props","jsx","Slot","cn"],"mappings":";;;;;AAMA,MAAMA,IAAiBC;AAAA,EACtB;AAAA,EACA;AAAA,IACC,UAAU;AAAA,MACT,SAAS;AAAA,QACR,SAAS;AAAA,QACT,aACC;AAAA,QACD,SACC;AAAA,QACD,WACC;AAAA,QACD,OACC;AAAA,QACD,MAAM;AAAA,MAAA;AAAA,MAEP,MAAM;AAAA,QACL,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,WAAW;AAAA,QACX,WAAW;AAAA,MAAA;AAAA,IACZ;AAAA,IAED,iBAAiB;AAAA,MAChB,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACP;AAEF;AAEA,SAASC,EAAO;AAAA,EACf,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,GAAGC;AACJ,GAGI;AAGH,SACC,gBAAAC;AAAA,IAHYF,IAAUG,IAAO;AAAA,IAG5B;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAGV,EAAe,EAAE,SAAAI,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,MACzD,GAAGI;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import { cn as o } from "../../lib/utils.js";
|
|
4
|
-
function s({ className: t, ...r }) {
|
|
5
|
-
return /* @__PURE__ */ a(
|
|
6
|
-
"div",
|
|
7
|
-
{
|
|
8
|
-
"data-slot": "card",
|
|
9
|
-
className: o("card", t),
|
|
10
|
-
...r
|
|
11
|
-
}
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
function i({ className: t, ...r }) {
|
|
15
|
-
return /* @__PURE__ */ a(
|
|
16
|
-
"div",
|
|
17
|
-
{
|
|
18
|
-
"data-slot": "card-header",
|
|
19
|
-
className: o(
|
|
20
|
-
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
21
|
-
t
|
|
22
|
-
),
|
|
23
|
-
...r
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
function c({ className: t, ...r }) {
|
|
28
|
-
return /* @__PURE__ */ a(
|
|
29
|
-
"div",
|
|
30
|
-
{
|
|
31
|
-
"data-slot": "card-title",
|
|
32
|
-
className: o("leading-none font-semibold", t),
|
|
33
|
-
...r
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
function l({ className: t, ...r }) {
|
|
38
|
-
return /* @__PURE__ */ a(
|
|
39
|
-
"div",
|
|
40
|
-
{
|
|
41
|
-
"data-slot": "card-description",
|
|
42
|
-
className: o("text-muted-foreground text-sm", t),
|
|
43
|
-
...r
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
function u({ className: t, ...r }) {
|
|
48
|
-
return /* @__PURE__ */ a(
|
|
49
|
-
"div",
|
|
50
|
-
{
|
|
51
|
-
"data-slot": "card-action",
|
|
52
|
-
className: o(
|
|
53
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
54
|
-
t
|
|
55
|
-
),
|
|
56
|
-
...r
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
function f({ className: t, ...r }) {
|
|
61
|
-
return /* @__PURE__ */ a(
|
|
62
|
-
"div",
|
|
63
|
-
{
|
|
64
|
-
"data-slot": "card-content",
|
|
65
|
-
className: t,
|
|
66
|
-
...r
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
function m({ className: t, ...r }) {
|
|
71
|
-
return /* @__PURE__ */ a(
|
|
72
|
-
"div",
|
|
73
|
-
{
|
|
74
|
-
"data-slot": "card-footer",
|
|
75
|
-
className: o("flex items-center [.border-t]:pt-6", t),
|
|
76
|
-
...r
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
export {
|
|
81
|
-
s as Card,
|
|
82
|
-
u as CardAction,
|
|
83
|
-
f as CardContent,
|
|
84
|
-
l as CardDescription,
|
|
85
|
-
m as CardFooter,
|
|
86
|
-
i as CardHeader,
|
|
87
|
-
c as CardTitle
|
|
88
|
-
};
|
|
89
|
-
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"card\"\n\t\t\tclassName={cn(\"card\", className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"card-header\"\n\t\t\tclassName={cn(\n\t\t\t\t\"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"card-title\"\n\t\t\tclassName={cn(\"leading-none font-semibold\", className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"card-description\"\n\t\t\tclassName={cn(\"text-muted-foreground text-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"card-action\"\n\t\t\tclassName={cn(\n\t\t\t\t\"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"card-content\"\n\t\t\tclassName={className}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"card-footer\"\n\t\t\tclassName={cn(\"flex items-center [.border-t]:pt-6\", className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport {\n\tCard, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle\n};\n\n"],"names":["Card","className","props","jsx","cn","CardHeader","CardTitle","CardDescription","CardAction","CardContent","CardFooter"],"mappings":";;;AAIA,SAASA,EAAK,EAAE,WAAAC,GAAW,GAAGC,KAAsC;AACnE,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAG,QAAQH,CAAS;AAAA,MAC9B,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASG,EAAW,EAAE,WAAAJ,GAAW,GAAGC,KAAsC;AACzE,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAH;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASI,EAAU,EAAE,WAAAL,GAAW,GAAGC,KAAsC;AACxE,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAG,8BAA8BH,CAAS;AAAA,MACpD,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASK,EAAgB,EAAE,WAAAN,GAAW,GAAGC,KAAsC;AAC9E,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAG,iCAAiCH,CAAS;AAAA,MACvD,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASM,EAAW,EAAE,WAAAP,GAAW,GAAGC,KAAsC;AACzE,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAH;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASO,EAAY,EAAE,WAAAR,GAAW,GAAGC,KAAsC;AAC1E,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAAF;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASQ,EAAW,EAAE,WAAAT,GAAW,GAAGC,KAAsC;AACzE,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAG,sCAAsCH,CAAS;AAAA,MAC5D,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as h } from "react/jsx-runtime";
|
|
2
|
-
import * as l from "react";
|
|
3
|
-
import k from "embla-carousel-react";
|
|
4
|
-
import { ArrowLeft as z, ArrowRight as g } from "lucide-react";
|
|
5
|
-
import { cn as d } from "../../lib/utils.js";
|
|
6
|
-
import { Button as v } from "../Button/Button.js";
|
|
7
|
-
const N = l.createContext(null);
|
|
8
|
-
function m() {
|
|
9
|
-
const o = l.useContext(N);
|
|
10
|
-
if (!o)
|
|
11
|
-
throw new Error("useCarousel must be used within a <Carousel />");
|
|
12
|
-
return o;
|
|
13
|
-
}
|
|
14
|
-
function I({
|
|
15
|
-
orientation: o = "horizontal",
|
|
16
|
-
opts: r,
|
|
17
|
-
setApi: t,
|
|
18
|
-
plugins: s,
|
|
19
|
-
className: c,
|
|
20
|
-
children: i,
|
|
21
|
-
...u
|
|
22
|
-
}) {
|
|
23
|
-
const [p, e] = k(
|
|
24
|
-
{
|
|
25
|
-
...r,
|
|
26
|
-
axis: o === "horizontal" ? "x" : "y"
|
|
27
|
-
},
|
|
28
|
-
s
|
|
29
|
-
), [b, w] = l.useState(!1), [S, y] = l.useState(!1), f = l.useCallback((n) => {
|
|
30
|
-
n && (w(n.canScrollPrev()), y(n.canScrollNext()));
|
|
31
|
-
}, []), x = l.useCallback(() => {
|
|
32
|
-
e?.scrollPrev();
|
|
33
|
-
}, [e]), C = l.useCallback(() => {
|
|
34
|
-
e?.scrollNext();
|
|
35
|
-
}, [e]), P = l.useCallback(
|
|
36
|
-
(n) => {
|
|
37
|
-
n.key === "ArrowLeft" ? (n.preventDefault(), x()) : n.key === "ArrowRight" && (n.preventDefault(), C());
|
|
38
|
-
},
|
|
39
|
-
[x, C]
|
|
40
|
-
);
|
|
41
|
-
return l.useEffect(() => {
|
|
42
|
-
!e || !t || t(e);
|
|
43
|
-
}, [e, t]), l.useEffect(() => {
|
|
44
|
-
if (e)
|
|
45
|
-
return f(e), e.on("reInit", f), e.on("select", f), () => {
|
|
46
|
-
e?.off("select", f);
|
|
47
|
-
};
|
|
48
|
-
}, [e, f]), /* @__PURE__ */ a(
|
|
49
|
-
N.Provider,
|
|
50
|
-
{
|
|
51
|
-
value: {
|
|
52
|
-
carouselRef: p,
|
|
53
|
-
api: e,
|
|
54
|
-
opts: r,
|
|
55
|
-
orientation: o || (r?.axis === "y" ? "vertical" : "horizontal"),
|
|
56
|
-
scrollPrev: x,
|
|
57
|
-
scrollNext: C,
|
|
58
|
-
canScrollPrev: b,
|
|
59
|
-
canScrollNext: S
|
|
60
|
-
},
|
|
61
|
-
children: /* @__PURE__ */ a(
|
|
62
|
-
"div",
|
|
63
|
-
{
|
|
64
|
-
onKeyDownCapture: P,
|
|
65
|
-
className: d("relative", c),
|
|
66
|
-
role: "region",
|
|
67
|
-
"aria-roledescription": "carousel",
|
|
68
|
-
"data-slot": "carousel",
|
|
69
|
-
...u,
|
|
70
|
-
children: i
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
function K({ className: o, ...r }) {
|
|
77
|
-
const { carouselRef: t, orientation: s } = m();
|
|
78
|
-
return /* @__PURE__ */ a(
|
|
79
|
-
"div",
|
|
80
|
-
{
|
|
81
|
-
ref: t,
|
|
82
|
-
className: "overflow-hidden",
|
|
83
|
-
"data-slot": "carousel-content",
|
|
84
|
-
children: /* @__PURE__ */ a(
|
|
85
|
-
"div",
|
|
86
|
-
{
|
|
87
|
-
className: d(
|
|
88
|
-
"flex",
|
|
89
|
-
s === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
90
|
-
o
|
|
91
|
-
),
|
|
92
|
-
...r
|
|
93
|
-
}
|
|
94
|
-
)
|
|
95
|
-
}
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
function L({ className: o, ...r }) {
|
|
99
|
-
const { orientation: t } = m();
|
|
100
|
-
return /* @__PURE__ */ a(
|
|
101
|
-
"div",
|
|
102
|
-
{
|
|
103
|
-
role: "group",
|
|
104
|
-
"aria-roledescription": "slide",
|
|
105
|
-
"data-slot": "carousel-item",
|
|
106
|
-
className: d(
|
|
107
|
-
"min-w-0 shrink-0 grow-0 basis-full",
|
|
108
|
-
t === "horizontal" ? "pl-4" : "pt-4",
|
|
109
|
-
o
|
|
110
|
-
),
|
|
111
|
-
...r
|
|
112
|
-
}
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
function B({
|
|
116
|
-
className: o,
|
|
117
|
-
variant: r = "outline",
|
|
118
|
-
size: t = "icon",
|
|
119
|
-
...s
|
|
120
|
-
}) {
|
|
121
|
-
const { orientation: c, scrollPrev: i, canScrollPrev: u } = m();
|
|
122
|
-
return /* @__PURE__ */ h(
|
|
123
|
-
v,
|
|
124
|
-
{
|
|
125
|
-
"data-slot": "carousel-previous",
|
|
126
|
-
variant: r,
|
|
127
|
-
size: t,
|
|
128
|
-
className: d(
|
|
129
|
-
"absolute size-8 rounded-full",
|
|
130
|
-
c === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
131
|
-
o
|
|
132
|
-
),
|
|
133
|
-
disabled: !u,
|
|
134
|
-
onClick: i,
|
|
135
|
-
...s,
|
|
136
|
-
children: [
|
|
137
|
-
/* @__PURE__ */ a(z, {}),
|
|
138
|
-
/* @__PURE__ */ a("span", { className: "sr-only", children: "Previous slide" })
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
function q({
|
|
144
|
-
className: o,
|
|
145
|
-
variant: r = "outline",
|
|
146
|
-
size: t = "icon",
|
|
147
|
-
...s
|
|
148
|
-
}) {
|
|
149
|
-
const { orientation: c, scrollNext: i, canScrollNext: u } = m();
|
|
150
|
-
return /* @__PURE__ */ h(
|
|
151
|
-
v,
|
|
152
|
-
{
|
|
153
|
-
"data-slot": "carousel-next",
|
|
154
|
-
variant: r,
|
|
155
|
-
size: t,
|
|
156
|
-
className: d(
|
|
157
|
-
"absolute size-8 rounded-full",
|
|
158
|
-
c === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
159
|
-
o
|
|
160
|
-
),
|
|
161
|
-
disabled: !u,
|
|
162
|
-
onClick: i,
|
|
163
|
-
...s,
|
|
164
|
-
children: [
|
|
165
|
-
/* @__PURE__ */ a(g, {}),
|
|
166
|
-
/* @__PURE__ */ a("span", { className: "sr-only", children: "Next slide" })
|
|
167
|
-
]
|
|
168
|
-
}
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
export {
|
|
172
|
-
I as Carousel,
|
|
173
|
-
K as CarouselContent,
|
|
174
|
-
L as CarouselItem,
|
|
175
|
-
q as CarouselNext,
|
|
176
|
-
B as CarouselPrevious
|
|
177
|
-
};
|
|
178
|
-
//# sourceMappingURL=Carousel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.js","sources":["../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["import * as React from \"react\"\nimport useEmblaCarousel, {\n\ttype UseEmblaCarouselType,\n} from \"embla-carousel-react\"\nimport { ArrowLeft, ArrowRight } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"../Button\"\n\ntype CarouselApi = UseEmblaCarouselType[1]\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\ntype CarouselProps = {\n\topts?: CarouselOptions\n\tplugins?: CarouselPlugin\n\torientation?: \"horizontal\" | \"vertical\"\n\tsetApi?: (api: CarouselApi) => void\n}\n\ntype CarouselContextProps = {\n\tcarouselRef: ReturnType<typeof useEmblaCarousel>[0]\n\tapi: ReturnType<typeof useEmblaCarousel>[1]\n\tscrollPrev: () => void\n\tscrollNext: () => void\n\tcanScrollPrev: boolean\n\tcanScrollNext: boolean\n} & CarouselProps\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null)\n\nfunction useCarousel() {\n\tconst context = React.useContext(CarouselContext)\n\n\tif (!context) {\n\t\tthrow new Error(\"useCarousel must be used within a <Carousel />\")\n\t}\n\n\treturn context\n}\n\nfunction Carousel({\n\torientation = \"horizontal\",\n\topts,\n\tsetApi,\n\tplugins,\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<\"div\"> & CarouselProps) {\n\tconst [carouselRef, api] = useEmblaCarousel(\n\t\t{\n\t\t\t...opts,\n\t\t\taxis: orientation === \"horizontal\" ? \"x\" : \"y\",\n\t\t},\n\t\tplugins\n\t)\n\tconst [canScrollPrev, setCanScrollPrev] = React.useState(false)\n\tconst [canScrollNext, setCanScrollNext] = React.useState(false)\n\n\tconst onSelect = React.useCallback((api: CarouselApi) => {\n\t\tif (!api) return\n\t\tsetCanScrollPrev(api.canScrollPrev())\n\t\tsetCanScrollNext(api.canScrollNext())\n\t}, [])\n\n\tconst scrollPrev = React.useCallback(() => {\n\t\tapi?.scrollPrev()\n\t}, [api])\n\n\tconst scrollNext = React.useCallback(() => {\n\t\tapi?.scrollNext()\n\t}, [api])\n\n\tconst handleKeyDown = React.useCallback(\n\t\t(event: React.KeyboardEvent<HTMLDivElement>) => {\n\t\t\tif (event.key === \"ArrowLeft\") {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tscrollPrev()\n\t\t\t} else if (event.key === \"ArrowRight\") {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tscrollNext()\n\t\t\t}\n\t\t},\n\t\t[scrollPrev, scrollNext]\n\t)\n\n\tReact.useEffect(() => {\n\t\tif (!api || !setApi) return\n\t\tsetApi(api)\n\t}, [api, setApi])\n\n\tReact.useEffect(() => {\n\t\tif (!api) return\n\t\tonSelect(api)\n\t\tapi.on(\"reInit\", onSelect)\n\t\tapi.on(\"select\", onSelect)\n\n\t\treturn () => {\n\t\t\tapi?.off(\"select\", onSelect)\n\t\t}\n\t}, [api, onSelect])\n\n\treturn (\n\t\t<CarouselContext.Provider\n\t\t\tvalue={{\n\t\t\t\tcarouselRef,\n\t\t\t\tapi: api,\n\t\t\t\topts,\n\t\t\t\torientation:\n\t\t\t\t\torientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n\t\t\t\tscrollPrev,\n\t\t\t\tscrollNext,\n\t\t\t\tcanScrollPrev,\n\t\t\t\tcanScrollNext,\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\tonKeyDownCapture={handleKeyDown}\n\t\t\t\tclassName={cn(\"relative\", className)}\n\t\t\t\trole=\"region\"\n\t\t\t\taria-roledescription=\"carousel\"\n\t\t\t\tdata-slot=\"carousel\"\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</CarouselContext.Provider>\n\t)\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<\"div\">) {\n\tconst { carouselRef, orientation } = useCarousel()\n\n\treturn (\n\t\t<div\n\t\t\tref={carouselRef}\n\t\t\tclassName=\"overflow-hidden\"\n\t\t\tdata-slot=\"carousel-content\"\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex\",\n\t\t\t\t\torientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</div>\n\t)\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<\"div\">) {\n\tconst { orientation } = useCarousel()\n\n\treturn (\n\t\t<div\n\t\t\trole=\"group\"\n\t\t\taria-roledescription=\"slide\"\n\t\t\tdata-slot=\"carousel-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"min-w-0 shrink-0 grow-0 basis-full\",\n\t\t\t\torientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CarouselPrevious({\n\tclassName,\n\tvariant = \"outline\",\n\tsize = \"icon\",\n\t...props\n}: React.ComponentProps<typeof Button>) {\n\tconst { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n\treturn (\n\t\t<Button\n\t\t\tdata-slot=\"carousel-previous\"\n\t\t\tvariant={variant}\n\t\t\tsize={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute size-8 rounded-full\",\n\t\t\t\torientation === \"horizontal\"\n\t\t\t\t\t? \"top-1/2 -left-12 -translate-y-1/2\"\n\t\t\t\t\t: \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tdisabled={!canScrollPrev}\n\t\t\tonClick={scrollPrev}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ArrowLeft />\n\t\t\t<span className=\"sr-only\">Previous slide</span>\n\t\t</Button>\n\t)\n}\n\nfunction CarouselNext({\n\tclassName,\n\tvariant = \"outline\",\n\tsize = \"icon\",\n\t...props\n}: React.ComponentProps<typeof Button>) {\n\tconst { orientation, scrollNext, canScrollNext } = useCarousel()\n\n\treturn (\n\t\t<Button\n\t\t\tdata-slot=\"carousel-next\"\n\t\t\tvariant={variant}\n\t\t\tsize={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute size-8 rounded-full\",\n\t\t\t\torientation === \"horizontal\"\n\t\t\t\t\t? \"top-1/2 -right-12 -translate-y-1/2\"\n\t\t\t\t\t: \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tdisabled={!canScrollNext}\n\t\t\tonClick={scrollNext}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ArrowRight />\n\t\t\t<span className=\"sr-only\">Next slide</span>\n\t\t</Button>\n\t)\n}\n\nexport {\n\ttype CarouselApi,\n\tCarousel,\n\tCarouselContent,\n\tCarouselItem,\n\tCarouselPrevious,\n\tCarouselNext,\n}\n"],"names":["CarouselContext","React","useCarousel","context","Carousel","orientation","opts","setApi","plugins","className","children","props","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","onSelect","scrollPrev","scrollNext","handleKeyDown","event","jsx","cn","CarouselContent","CarouselItem","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MACV,SAAAH;AAAA,MACA,MAAAC;AAAA,MACA,WAAWL;AAAA,QACV;AAAA,QACApB,MAAgB,eACb,uCACA;AAAA,QACHI;AAAA,MAAA;AAAA,MAED,UAAU,CAACQ;AAAA,MACX,SAASI;AAAA,MACR,GAAGV;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAa,EAACW,GAAA,EAAW;AAAA,QACZ,gBAAAX,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,aAAA,CAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGvC;"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { cn as i } from "../../lib/utils.js";
|
|
3
|
-
function l({ code: n, language: r, title: s, className: o, children: c, ...a }) {
|
|
4
|
-
return /* @__PURE__ */ d(
|
|
5
|
-
"div",
|
|
6
|
-
{
|
|
7
|
-
className: i("bg-background rounded border-container text-sm overflow-hidden my-4", o),
|
|
8
|
-
...a,
|
|
9
|
-
children: [
|
|
10
|
-
(s || r) && /* @__PURE__ */ d("div", { className: "flex justify-between items-center border-b border-stone-300/80 px-4 py-2", children: [
|
|
11
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children: s }),
|
|
12
|
-
/* @__PURE__ */ e("span", { className: "text-sm", children: r })
|
|
13
|
-
] }),
|
|
14
|
-
/* @__PURE__ */ e("div", { className: "p-4 overflow-auto max-h-256", children: /* @__PURE__ */ e("pre", { className: "m-0 p-0 whitespace-pre-wrap", children: /* @__PURE__ */ e("code", { children: n || c }) }) })
|
|
15
|
-
]
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
l as CodeDisplay
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=CodeDisplay.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CodeDisplay.js","sources":["../../../src/components/CodeDisplay/CodeDisplay.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\n\n/**\n * A basic code display component styled with Tailwind CSS.\n * It uses the native <pre> and <code> tags for formatting.\n * @param {string} code The actual code string to display.\n * @param {string} language The language of the code (e.g., 'javascript', 'css').\n * @param {string} title A descriptive title for the code block.\n */\ninterface Props {\n code?: string;\n language?: string;\n title?: string;\n}\n\nfunction CodeDisplay({ code, language, title, className, children, ...props }: Props & React.ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\"bg-background rounded border-container text-sm overflow-hidden my-4\", className)}\n {...props}\n >\n\n {/* Header Bar */}\n {(title || language) &&\n <div className=\"flex justify-between items-center border-b border-stone-300/80 px-4 py-2\">\n <span className=\"text-sm font-medium\">{title}</span>\n <span className=\"text-sm\">\n {language}\n </span>\n </div>\n }\n\n {/* Code Content Area */}\n <div className=\"p-4 overflow-auto max-h-256\">\n <pre className=\"m-0 p-0 whitespace-pre-wrap\">\n <code>\n {code || children}\n </code>\n </pre>\n </div>\n </div>\n );\n};\n\nexport { CodeDisplay };\n\n"],"names":["CodeDisplay","code","language","title","className","children","props","jsxs","cn","jsx"],"mappings":";;AAeA,SAASA,EAAY,EAAE,MAAAC,GAAM,UAAAC,GAAU,OAAAC,GAAO,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAA8C;AAChH,SACI,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAWC,EAAG,uEAAuEJ,CAAS;AAAA,MAC7F,GAAGE;AAAA,MAIF,UAAA;AAAA,SAAAH,KAASD,MACP,gBAAAK,EAAC,OAAA,EAAI,WAAU,4EACX,UAAA;AAAA,UAAA,gBAAAE,EAAC,QAAA,EAAK,WAAU,uBAAuB,UAAAN,GAAM;AAAA,UAC7C,gBAAAM,EAAC,QAAA,EAAK,WAAU,WACX,UAAAP,EAAA,CACL;AAAA,QAAA,GACJ;AAAA,QAIJ,gBAAAO,EAAC,OAAA,EAAI,WAAU,+BACX,UAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,+BACX,UAAA,gBAAAA,EAAC,QAAA,EACI,UAAAR,KAAQI,EAAA,CACb,GACJ,EAAA,CACJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGZ;"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import * as t from "@radix-ui/react-collapsible";
|
|
3
|
-
function i({
|
|
4
|
-
...l
|
|
5
|
-
}) {
|
|
6
|
-
return /* @__PURE__ */ o(t.Root, { "data-slot": "collapsible", ...l });
|
|
7
|
-
}
|
|
8
|
-
function r({
|
|
9
|
-
...l
|
|
10
|
-
}) {
|
|
11
|
-
return /* @__PURE__ */ o(
|
|
12
|
-
t.CollapsibleTrigger,
|
|
13
|
-
{
|
|
14
|
-
"data-slot": "collapsible-trigger",
|
|
15
|
-
...l
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
function a({
|
|
20
|
-
...l
|
|
21
|
-
}) {
|
|
22
|
-
return /* @__PURE__ */ o(
|
|
23
|
-
t.CollapsibleContent,
|
|
24
|
-
{
|
|
25
|
-
"data-slot": "collapsible-content",
|
|
26
|
-
...l
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
i as Collapsible,
|
|
32
|
-
a as CollapsibleContent,
|
|
33
|
-
r as CollapsibleTrigger
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=Collapsible.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Collapsible.js","sources":["../../../src/components/Collapsible/Collapsible.tsx"],"sourcesContent":["import * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\"\n\nfunction Collapsible({\n\t...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n\treturn <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />\n}\n\nfunction CollapsibleTrigger({\n\t...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n\treturn (\n\t\t<CollapsiblePrimitive.CollapsibleTrigger\n\t\t\tdata-slot=\"collapsible-trigger\"\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CollapsibleContent({\n\t...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n\treturn (\n\t\t<CollapsiblePrimitive.CollapsibleContent\n\t\t\tdata-slot=\"collapsible-content\"\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger }\n\n"],"names":["Collapsible","props","CollapsiblePrimitive","CollapsibleTrigger","jsx","CollapsibleContent"],"mappings":";;AAEA,SAASA,EAAY;AAAA,EACpB,GAAGC;AACJ,GAA2D;AAC1D,2BAAQC,EAAqB,MAArB,EAA0B,aAAU,eAAe,GAAGD,GAAO;AACtE;AAEA,SAASE,EAAmB;AAAA,EAC3B,GAAGF;AACJ,GAAyE;AACxE,SACC,gBAAAG;AAAA,IAACF,EAAqB;AAAA,IAArB;AAAA,MACA,aAAU;AAAA,MACT,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASI,EAAmB;AAAA,EAC3B,GAAGJ;AACJ,GAAyE;AACxE,SACC,gBAAAG;AAAA,IAACF,EAAqB;AAAA,IAArB;AAAA,MACA,aAAU;AAAA,MACT,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|