@lfrprazeres/ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +160 -0
- package/dist/components/chip.d.ts +16 -0
- package/dist/components/chip.d.ts.map +1 -0
- package/dist/components/chip.js +49 -0
- package/dist/components/chip.js.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.js +8 -0
- package/dist/components/language-switcher.d.ts +22 -0
- package/dist/components/language-switcher.d.ts.map +1 -0
- package/dist/components/language-switcher.js +42 -0
- package/dist/components/language-switcher.js.map +1 -0
- package/dist/components/marquee.d.ts +23 -0
- package/dist/components/marquee.d.ts.map +1 -0
- package/dist/components/marquee.js +49 -0
- package/dist/components/marquee.js.map +1 -0
- package/dist/components/message-bubble.d.ts +28 -0
- package/dist/components/message-bubble.d.ts.map +1 -0
- package/dist/components/message-bubble.js +81 -0
- package/dist/components/message-bubble.js.map +1 -0
- package/dist/components/stat-tile.d.ts +18 -0
- package/dist/components/stat-tile.d.ts.map +1 -0
- package/dist/components/stat-tile.js +54 -0
- package/dist/components/stat-tile.js.map +1 -0
- package/dist/components/streaming-dots.d.ts +19 -0
- package/dist/components/streaming-dots.d.ts.map +1 -0
- package/dist/components/streaming-dots.js +29 -0
- package/dist/components/streaming-dots.js.map +1 -0
- package/dist/components/theme-toggle.d.ts +13 -0
- package/dist/components/theme-toggle.d.ts.map +1 -0
- package/dist/components/theme-toggle.js +54 -0
- package/dist/components/theme-toggle.js.map +1 -0
- package/dist/elements/avatar.d.ts +14 -0
- package/dist/elements/avatar.d.ts.map +1 -0
- package/dist/elements/avatar.js +52 -0
- package/dist/elements/avatar.js.map +1 -0
- package/dist/elements/badge.d.ts +12 -0
- package/dist/elements/badge.d.ts.map +1 -0
- package/dist/elements/badge.js +29 -0
- package/dist/elements/badge.js.map +1 -0
- package/dist/elements/button.d.ts +13 -0
- package/dist/elements/button.d.ts.map +1 -0
- package/dist/elements/button.js +49 -0
- package/dist/elements/button.js.map +1 -0
- package/dist/elements/card.d.ts +12 -0
- package/dist/elements/card.d.ts.map +1 -0
- package/dist/elements/card.js +56 -0
- package/dist/elements/card.js.map +1 -0
- package/dist/elements/checkbox.d.ts +7 -0
- package/dist/elements/checkbox.d.ts.map +1 -0
- package/dist/elements/checkbox.js +22 -0
- package/dist/elements/checkbox.js.map +1 -0
- package/dist/elements/dialog.d.ts +20 -0
- package/dist/elements/dialog.d.ts.map +1 -0
- package/dist/elements/dialog.js +95 -0
- package/dist/elements/dialog.js.map +1 -0
- package/dist/elements/dropdown-menu.d.ts +28 -0
- package/dist/elements/dropdown-menu.d.ts.map +1 -0
- package/dist/elements/dropdown-menu.js +124 -0
- package/dist/elements/dropdown-menu.js.map +1 -0
- package/dist/elements/index.d.ts +17 -0
- package/dist/elements/index.js +17 -0
- package/dist/elements/input.d.ts +6 -0
- package/dist/elements/input.d.ts.map +1 -0
- package/dist/elements/input.js +15 -0
- package/dist/elements/input.js.map +1 -0
- package/dist/elements/label.d.ts +7 -0
- package/dist/elements/label.d.ts.map +1 -0
- package/dist/elements/label.js +16 -0
- package/dist/elements/label.js.map +1 -0
- package/dist/elements/popover.d.ts +13 -0
- package/dist/elements/popover.d.ts.map +1 -0
- package/dist/elements/popover.js +57 -0
- package/dist/elements/popover.js.map +1 -0
- package/dist/elements/select.d.ts +18 -0
- package/dist/elements/select.d.ts.map +1 -0
- package/dist/elements/select.js +99 -0
- package/dist/elements/select.js.map +1 -0
- package/dist/elements/separator.d.ts +7 -0
- package/dist/elements/separator.d.ts.map +1 -0
- package/dist/elements/separator.js +18 -0
- package/dist/elements/separator.js.map +1 -0
- package/dist/elements/skeleton.d.ts +5 -0
- package/dist/elements/skeleton.d.ts.map +1 -0
- package/dist/elements/skeleton.js +14 -0
- package/dist/elements/skeleton.js.map +1 -0
- package/dist/elements/sonner.d.ts +17 -0
- package/dist/elements/sonner.d.ts.map +1 -0
- package/dist/elements/sonner.js +40 -0
- package/dist/elements/sonner.js.map +1 -0
- package/dist/elements/switch.d.ts +9 -0
- package/dist/elements/switch.d.ts.map +1 -0
- package/dist/elements/switch.js +21 -0
- package/dist/elements/switch.js.map +1 -0
- package/dist/elements/textarea.d.ts +6 -0
- package/dist/elements/textarea.d.ts.map +1 -0
- package/dist/elements/textarea.js +14 -0
- package/dist/elements/textarea.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +25 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +10 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/styles.css +18 -0
- package/dist/tokens/01-ramps.css +142 -0
- package/dist/tokens/02-scales.css +28 -0
- package/dist/tokens/03-bridge.css +75 -0
- package/dist/tokens/index.css +7 -0
- package/dist/tokens/palettes/base.css +96 -0
- package/dist/tokens/palettes/cyberpunk.css +83 -0
- package/dist/tokens/palettes/gold.css +77 -0
- package/dist/tokens/palettes/minimal.css +82 -0
- package/package.json +100 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/components/streaming-dots.d.ts
|
|
2
|
+
interface StreamingDotsProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
/** Announced to assistive tech. */
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Three dots for a pending response.
|
|
9
|
+
*
|
|
10
|
+
* Under reduced motion the bounce is swapped for an opacity pulse rather than
|
|
11
|
+
* removed. This is a loop, so there is no final state to collapse toward, but
|
|
12
|
+
* killing it outright would drop the only "something is happening" cue a
|
|
13
|
+
* sighted user has. Reduced motion targets vestibular triggers, which means
|
|
14
|
+
* movement, so fading in place stays within it.
|
|
15
|
+
*/
|
|
16
|
+
declare function StreamingDots({ label, className }: StreamingDotsProps): import("react").JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { StreamingDots, StreamingDotsProps };
|
|
19
|
+
//# sourceMappingURL=streaming-dots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-dots.d.ts","names":[],"sources":["../../src/components/streaming-dots.tsx"],"mappings":";UAQiB;EACf;;EAEA;;;;;;;;;;;iBAYc,gBACd,OACA,aACC,qCAAkB,IAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/streaming-dots.tsx
|
|
4
|
+
const DOTS = [
|
|
5
|
+
"[animation-delay:-320ms]",
|
|
6
|
+
"[animation-delay:-160ms]",
|
|
7
|
+
"[animation-delay:0ms]"
|
|
8
|
+
];
|
|
9
|
+
/**
|
|
10
|
+
* Three dots for a pending response.
|
|
11
|
+
*
|
|
12
|
+
* Under reduced motion the bounce is swapped for an opacity pulse rather than
|
|
13
|
+
* removed. This is a loop, so there is no final state to collapse toward, but
|
|
14
|
+
* killing it outright would drop the only "something is happening" cue a
|
|
15
|
+
* sighted user has. Reduced motion targets vestibular triggers, which means
|
|
16
|
+
* movement, so fading in place stays within it.
|
|
17
|
+
*/
|
|
18
|
+
function StreamingDots({ label = "Loading", className }) {
|
|
19
|
+
return /* @__PURE__ */ jsx("span", {
|
|
20
|
+
"aria-label": label,
|
|
21
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
22
|
+
role: "status",
|
|
23
|
+
children: DOTS.map((delay) => /* @__PURE__ */ jsx("span", { className: cn("size-1.5 animate-bounce rounded-full bg-current opacity-60", "motion-reduce:animate-pulse motion-reduce:[animation-delay:0ms]", delay) }, delay))
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { StreamingDots };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=streaming-dots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-dots.js","names":[],"sources":["../../src/components/streaming-dots.tsx"],"sourcesContent":["import { cn } from \"@/lib/cn\";\n\nconst DOTS = [\n \"[animation-delay:-320ms]\",\n \"[animation-delay:-160ms]\",\n \"[animation-delay:0ms]\",\n];\n\nexport interface StreamingDotsProps {\n className?: string;\n /** Announced to assistive tech. */\n label?: string;\n}\n\n/**\n * Three dots for a pending response.\n *\n * Under reduced motion the bounce is swapped for an opacity pulse rather than\n * removed. This is a loop, so there is no final state to collapse toward, but\n * killing it outright would drop the only \"something is happening\" cue a\n * sighted user has. Reduced motion targets vestibular triggers, which means\n * movement, so fading in place stays within it.\n */\nexport function StreamingDots({\n label = \"Loading\",\n className,\n}: StreamingDotsProps) {\n return (\n <span\n aria-label={label}\n className={cn(\"inline-flex items-center gap-1\", className)}\n role=\"status\"\n >\n {DOTS.map((delay) => (\n <span\n className={cn(\n \"size-1.5 animate-bounce rounded-full bg-current opacity-60\",\n \"motion-reduce:animate-pulse motion-reduce:[animation-delay:0ms]\",\n delay\n )}\n key={delay}\n />\n ))}\n </span>\n );\n}\n"],"mappings":";;;AAEA,MAAM,OAAO;CACX;CACA;CACA;AACF;;;;;;;;;;AAiBA,SAAgB,cAAc,EAC5B,QAAQ,WACR,aACqB;CACrB,OACE,oBAAC,QAAD;EACE,cAAY;EACZ,WAAW,GAAG,kCAAkC,SAAS;EACzD,MAAK;EAEJ,UAAA,KAAK,KAAK,UACT,oBAAC,QAAD,EACE,WAAW,GACT,8DACA,mEACA,KACF,EAED,GADM,KACN,CACF;CACG,CAAA;AAEV"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/components/theme-toggle.d.ts
|
|
2
|
+
type ThemeMode = "light" | "dark" | "system";
|
|
3
|
+
interface ThemeToggleProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
onValueChange: (value: ThemeMode) => void;
|
|
6
|
+
/** The active mode. This component is controlled and holds no state. */
|
|
7
|
+
value: ThemeMode;
|
|
8
|
+
}
|
|
9
|
+
/** Controlled. Holds no state and reads no theme provider. */
|
|
10
|
+
declare function ThemeToggle({ value, onValueChange, className }: ThemeToggleProps): import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ThemeMode, ThemeToggle, ThemeToggleProps };
|
|
13
|
+
//# sourceMappingURL=theme-toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-toggle.d.ts","names":[],"sources":["../../src/components/theme-toggle.tsx"],"mappings":";KAOY;UA4CK;EACf;EACA,gBAAgB,OAAO;;EAEvB,OAAO;;;iBAIO,cACd,OACA,eACA,aACC,mCAAgB,IAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { Button } from "../elements/button.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { MonitorIcon, MoonIcon, SunIcon } from "lucide-react";
|
|
6
|
+
import { useCallback } from "react";
|
|
7
|
+
//#region src/components/theme-toggle.tsx
|
|
8
|
+
const MODES = [
|
|
9
|
+
{
|
|
10
|
+
icon: SunIcon,
|
|
11
|
+
label: "Light",
|
|
12
|
+
value: "light"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
icon: MoonIcon,
|
|
16
|
+
label: "Dark",
|
|
17
|
+
value: "dark"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
icon: MonitorIcon,
|
|
21
|
+
label: "System",
|
|
22
|
+
value: "system"
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
function ThemeToggleOption({ mode, active, onSelect }) {
|
|
26
|
+
const handleClick = useCallback(() => onSelect(mode.value), [mode.value, onSelect]);
|
|
27
|
+
const Icon = mode.icon;
|
|
28
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
29
|
+
"aria-label": mode.label,
|
|
30
|
+
"aria-pressed": active,
|
|
31
|
+
className: cn("size-8", active && "bg-accent text-accent-foreground"),
|
|
32
|
+
onClick: handleClick,
|
|
33
|
+
size: "icon-sm",
|
|
34
|
+
title: mode.label,
|
|
35
|
+
variant: "ghost",
|
|
36
|
+
children: /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true" })
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/** Controlled. Holds no state and reads no theme provider. */
|
|
40
|
+
function ThemeToggle({ value, onValueChange, className }) {
|
|
41
|
+
return /* @__PURE__ */ jsx("fieldset", {
|
|
42
|
+
"aria-label": "Colour theme",
|
|
43
|
+
className: cn("inline-flex items-center gap-1 rounded-md border border-border bg-card p-1", className),
|
|
44
|
+
children: MODES.map((mode) => /* @__PURE__ */ jsx(ThemeToggleOption, {
|
|
45
|
+
active: mode.value === value,
|
|
46
|
+
mode,
|
|
47
|
+
onSelect: onValueChange
|
|
48
|
+
}, mode.value))
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { ThemeToggle };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=theme-toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-toggle.js","names":[],"sources":["../../src/components/theme-toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport { type LucideIcon, MonitorIcon, MoonIcon, SunIcon } from \"lucide-react\";\nimport { useCallback } from \"react\";\nimport { Button } from \"@/elements/button\";\nimport { cn } from \"@/lib/cn\";\n\nexport type ThemeMode = \"light\" | \"dark\" | \"system\";\n\ninterface Mode {\n icon: LucideIcon;\n label: string;\n value: ThemeMode;\n}\n\nconst MODES = [\n { icon: SunIcon, label: \"Light\", value: \"light\" },\n { icon: MoonIcon, label: \"Dark\", value: \"dark\" },\n { icon: MonitorIcon, label: \"System\", value: \"system\" },\n] satisfies Mode[];\n\nfunction ThemeToggleOption({\n mode,\n active,\n onSelect,\n}: {\n mode: Mode;\n active: boolean;\n onSelect: (value: ThemeMode) => void;\n}) {\n const handleClick = useCallback(\n () => onSelect(mode.value),\n [mode.value, onSelect]\n );\n const Icon = mode.icon;\n\n return (\n <Button\n aria-label={mode.label}\n aria-pressed={active}\n className={cn(\"size-8\", active && \"bg-accent text-accent-foreground\")}\n onClick={handleClick}\n size=\"icon-sm\"\n title={mode.label}\n variant=\"ghost\"\n >\n <Icon aria-hidden=\"true\" />\n </Button>\n );\n}\n\nexport interface ThemeToggleProps {\n className?: string;\n onValueChange: (value: ThemeMode) => void;\n /** The active mode. This component is controlled and holds no state. */\n value: ThemeMode;\n}\n\n/** Controlled. Holds no state and reads no theme provider. */\nexport function ThemeToggle({\n value,\n onValueChange,\n className,\n}: ThemeToggleProps) {\n return (\n <fieldset\n aria-label=\"Colour theme\"\n className={cn(\n \"inline-flex items-center gap-1 rounded-md border border-border bg-card p-1\",\n className\n )}\n >\n {MODES.map((mode) => (\n <ThemeToggleOption\n active={mode.value === value}\n key={mode.value}\n mode={mode}\n onSelect={onValueChange}\n />\n ))}\n </fieldset>\n );\n}\n"],"mappings":";;;;;;;AAeA,MAAM,QAAQ;CACZ;EAAE,MAAM;EAAS,OAAO;EAAS,OAAO;CAAQ;CAChD;EAAE,MAAM;EAAU,OAAO;EAAQ,OAAO;CAAO;CAC/C;EAAE,MAAM;EAAa,OAAO;EAAU,OAAO;CAAS;AACxD;AAEA,SAAS,kBAAkB,EACzB,MACA,QACA,YAKC;CACD,MAAM,cAAc,kBACZ,SAAS,KAAK,KAAK,GACzB,CAAC,KAAK,OAAO,QAAQ,CACvB;CACA,MAAM,OAAO,KAAK;CAElB,OACE,oBAAC,QAAD;EACE,cAAY,KAAK;EACjB,gBAAc;EACd,WAAW,GAAG,UAAU,UAAU,kCAAkC;EACpE,SAAS;EACT,MAAK;EACL,OAAO,KAAK;EACZ,SAAQ;EAER,UAAA,oBAAC,MAAD,EAAM,eAAY,OAAQ,CAAA;CACpB,CAAA;AAEZ;;AAUA,SAAgB,YAAY,EAC1B,OACA,eACA,aACmB;CACnB,OACE,oBAAC,YAAD;EACE,cAAW;EACX,WAAW,GACT,8EACA,SACF;EAEC,UAAA,MAAM,KAAK,SACV,oBAAC,mBAAD;GACE,QAAQ,KAAK,UAAU;GAEjB;GACN,UAAU;EACX,GAHM,KAAK,KAGX,CACF;CACO,CAAA;AAEd"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Avatar } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/elements/avatar.d.ts
|
|
4
|
+
declare function Avatar$1({ className, size, ...props }: React.ComponentProps<typeof Avatar.Root> & {
|
|
5
|
+
size?: "default" | "sm" | "lg";
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof Avatar.Image>): React.JSX.Element;
|
|
8
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof Avatar.Fallback>): React.JSX.Element;
|
|
9
|
+
declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
10
|
+
declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Avatar$1 as Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
14
|
+
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","names":[],"sources":["../../src/elements/avatar.tsx"],"mappings":";;;iBAOS,WACP,WACA,SACG,SACF,MAAM,sBAAsB,OAAgB;EAC7C;IACD,MAAA,IAAA;iBAcQ,cACP,cACG,SACF,MAAM,sBAAsB,OAAgB,SAAM,MAAA,IAAA;iBAU5C,iBACP,cACG,SACF,MAAM,sBAAsB,OAAgB,YAAS,MAAA,IAAA;iBAa/C,cAAc,cAAc,SAAS,MAAM,yBAAsB,MAAA,IAAA;iBAgBjE,cAAc,cAAc,SAAS,MAAM,wBAAqB,MAAA,IAAA;iBAahE,mBACP,cACG,SACF,MAAM,wBAAqB,MAAA,IAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Avatar } from "radix-ui";
|
|
5
|
+
//#region src/elements/avatar.tsx
|
|
6
|
+
function Avatar$1({ className, size = "default", ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Avatar.Root, {
|
|
8
|
+
className: cn("group/avatar relative flex size-8 shrink-0 select-none overflow-hidden rounded-full data-[size=lg]:size-10 data-[size=sm]:size-6", className),
|
|
9
|
+
"data-size": size,
|
|
10
|
+
"data-slot": "avatar",
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function AvatarImage({ className, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Avatar.Image, {
|
|
16
|
+
className: cn("aspect-square size-full", className),
|
|
17
|
+
"data-slot": "avatar-image",
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function AvatarFallback({ className, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Avatar.Fallback, {
|
|
23
|
+
className: cn("flex size-full items-center justify-center rounded-full bg-muted text-muted-foreground text-sm group-data-[size=sm]/avatar:text-xs", className),
|
|
24
|
+
"data-slot": "avatar-fallback",
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function AvatarBadge({ className, ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: cn("absolute right-0 bottom-0 z-10 inline-flex select-none items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className),
|
|
31
|
+
"data-slot": "avatar-badge",
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function AvatarGroup({ className, ...props }) {
|
|
36
|
+
return /* @__PURE__ */ jsx("div", {
|
|
37
|
+
className: cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className),
|
|
38
|
+
"data-slot": "avatar-group",
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function AvatarGroupCount({ className, ...props }) {
|
|
43
|
+
return /* @__PURE__ */ jsx("div", {
|
|
44
|
+
className: cn("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground text-sm ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", className),
|
|
45
|
+
"data-slot": "avatar-group-count",
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { Avatar$1 as Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.js","names":["Avatar","AvatarPrimitive"],"sources":["../../src/elements/avatar.tsx"],"sourcesContent":["\"use client\";\n\nimport { Avatar as AvatarPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/cn\";\n\nfunction Avatar({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root> & {\n size?: \"default\" | \"sm\" | \"lg\";\n}) {\n return (\n <AvatarPrimitive.Root\n className={cn(\n \"group/avatar relative flex size-8 shrink-0 select-none overflow-hidden rounded-full data-[size=lg]:size-10 data-[size=sm]:size-6\",\n className\n )}\n data-size={size}\n data-slot=\"avatar\"\n {...props}\n />\n );\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n className={cn(\"aspect-square size-full\", className)}\n data-slot=\"avatar-image\"\n {...props}\n />\n );\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n className={cn(\n \"flex size-full items-center justify-center rounded-full bg-muted text-muted-foreground text-sm group-data-[size=sm]/avatar:text-xs\",\n className\n )}\n data-slot=\"avatar-fallback\"\n {...props}\n />\n );\n}\n\nfunction AvatarBadge({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"absolute right-0 bottom-0 z-10 inline-flex select-none items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background\",\n \"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden\",\n \"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2\",\n \"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2\",\n className\n )}\n data-slot=\"avatar-badge\"\n {...props}\n />\n );\n}\n\nfunction AvatarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\n \"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background\",\n className\n )}\n data-slot=\"avatar-group\"\n {...props}\n />\n );\n}\n\nfunction AvatarGroupCount({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\n \"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground text-sm ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3\",\n className\n )}\n data-slot=\"avatar-group-count\"\n {...props}\n />\n );\n}\n\nexport {\n Avatar,\n AvatarBadge,\n AvatarFallback,\n AvatarGroup,\n AvatarGroupCount,\n AvatarImage,\n};\n"],"mappings":";;;;;AAOA,SAASA,SAAO,EACd,WACA,OAAO,WACP,GAAG,SAGF;CACD,OACE,oBAACC,OAAgB,MAAjB;EACE,WAAW,GACT,oIACA,SACF;EACA,aAAW;EACX,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;CACrD,OACE,oBAACA,OAAgB,OAAjB;EACE,WAAW,GAAG,2BAA2B,SAAS;EAClD,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,eAAe,EACtB,WACA,GAAG,SACqD;CACxD,OACE,oBAACA,OAAgB,UAAjB;EACE,WAAW,GACT,sIACA,SACF;EACA,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAuC;CAC1E,OACE,oBAAC,QAAD;EACE,WAAW,GACT,6JACA,iFACA,6FACA,iFACA,SACF;EACA,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EACE,WAAW,GACT,uGACA,SACF;EACA,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,iBAAiB,EACxB,WACA,GAAG,SAC2B;CAC9B,OACE,oBAAC,OAAD;EACE,WAAW,GACT,4VACA,SACF;EACA,aAAU;EACV,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/elements/badge.d.ts
|
|
4
|
+
declare const badgeVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "outline" | "destructive" | "ghost" | "link" | "secondary" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Badge, badgeVariants };
|
|
12
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","names":[],"sources":["../../src/elements/badge.tsx"],"mappings":";;;cAMM,gBAAa;;6CAoBlB;iBAEQ,QACP,WACA,SACA,YACG,SACF,MAAM,yBACP,oBAAoB;EAAmB;IAAmB,MAAA,IAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Slot } from "radix-ui";
|
|
5
|
+
//#region src/elements/badge.tsx
|
|
6
|
+
const badgeVariants = cva("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-xs transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
|
|
7
|
+
defaultVariants: { variant: "default" },
|
|
8
|
+
variants: { variant: {
|
|
9
|
+
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
10
|
+
destructive: "bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
|
|
11
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
12
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline",
|
|
13
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
14
|
+
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90"
|
|
15
|
+
} }
|
|
16
|
+
});
|
|
17
|
+
function Badge({ className, variant = "default", asChild = false, ...props }) {
|
|
18
|
+
const Comp = asChild ? Slot.Root : "span";
|
|
19
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
20
|
+
className: cn(badgeVariants({ variant }), className),
|
|
21
|
+
"data-slot": "badge",
|
|
22
|
+
"data-variant": variant,
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { Badge, badgeVariants };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","names":[],"sources":["../../src/elements/badge.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/cn\";\n\nconst badgeVariants = cva(\n \"inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-xs transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3\",\n {\n defaultVariants: {\n variant: \"default\",\n },\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a&]:hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90\",\n ghost: \"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 [a&]:hover:underline\",\n outline:\n \"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n },\n },\n }\n);\n\nfunction Badge({\n className,\n variant = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"span\"> &\n VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"span\";\n\n return (\n <Comp\n className={cn(badgeVariants({ variant }), className)}\n data-slot=\"badge\"\n data-variant={variant}\n {...props}\n />\n );\n}\n\nexport { Badge, badgeVariants };\n"],"mappings":";;;;;AAMA,MAAM,gBAAgB,IACpB,uaACA;CACE,iBAAiB,EACf,SAAS,UACX;CACA,UAAU,EACR,SAAS;EACP,SAAS;EACT,aACE;EACF,OAAO;EACP,MAAM;EACN,SACE;EACF,WACE;CACJ,EACF;AACF,CACF;AAEA,SAAS,MAAM,EACb,WACA,UAAU,WACV,UAAU,OACV,GAAG,SAEyD;CAC5D,MAAM,OAAO,UAAU,KAAK,OAAO;CAEnC,OACE,oBAAC,MAAD;EACE,WAAW,GAAG,cAAc,EAAE,QAAQ,CAAC,GAAG,SAAS;EACnD,aAAU;EACV,gBAAc;EACd,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/elements/button.d.ts
|
|
4
|
+
declare const buttonVariants: (props?: ({
|
|
5
|
+
size?: "default" | "sm" | "icon" | "icon-lg" | "icon-sm" | "icon-xs" | "lg" | "xs" | null | undefined;
|
|
6
|
+
variant?: "default" | "outline" | "destructive" | "ghost" | "link" | "secondary" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Button, buttonVariants };
|
|
13
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","names":[],"sources":["../../src/elements/button.tsx"],"mappings":";;;cAMM,iBAAc;;;6CAgCnB;iBAEQ,SACP,WACA,SACA,MACA,YACG,SACF,MAAM,2BACP,oBAAoB;EAClB;IACD,MAAA,IAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Slot } from "radix-ui";
|
|
5
|
+
//#region src/elements/button.tsx
|
|
6
|
+
const buttonVariants = cva("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
7
|
+
defaultVariants: {
|
|
8
|
+
size: "default",
|
|
9
|
+
variant: "default"
|
|
10
|
+
},
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
14
|
+
icon: "size-9",
|
|
15
|
+
"icon-lg": "size-10",
|
|
16
|
+
"icon-sm": "size-8",
|
|
17
|
+
"icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
18
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
19
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
20
|
+
xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3"
|
|
21
|
+
},
|
|
22
|
+
variant: {
|
|
23
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
24
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
25
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
26
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
27
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
28
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
|
|
33
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
34
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
35
|
+
className: cn(buttonVariants({
|
|
36
|
+
className,
|
|
37
|
+
size,
|
|
38
|
+
variant
|
|
39
|
+
})),
|
|
40
|
+
"data-size": size,
|
|
41
|
+
"data-slot": "button",
|
|
42
|
+
"data-variant": variant,
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { Button, buttonVariants };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","names":[],"sources":["../../src/elements/button.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/cn\";\n\nconst buttonVariants = cva(\n \"inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n defaultVariants: {\n size: \"default\",\n variant: \"default\",\n },\n variants: {\n size: {\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n icon: \"size-9\",\n \"icon-lg\": \"size-10\",\n \"icon-sm\": \"size-8\",\n \"icon-xs\": \"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3\",\n lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n sm: \"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5\",\n xs: \"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3\",\n },\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n outline:\n \"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n },\n },\n }\n);\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot.Root : \"button\";\n\n return (\n <Comp\n className={cn(buttonVariants({ className, size, variant }))}\n data-size={size}\n data-slot=\"button\"\n data-variant={variant}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n"],"mappings":";;;;;AAMA,MAAM,iBAAiB,IACrB,+bACA;CACE,iBAAiB;EACf,MAAM;EACN,SAAS;CACX;CACA,UAAU;EACR,MAAM;GACJ,SAAS;GACT,MAAM;GACN,WAAW;GACX,WAAW;GACX,WAAW;GACX,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,SAAS;GACP,SAAS;GACT,aACE;GACF,OACE;GACF,MAAM;GACN,SACE;GACF,WACE;EACJ;CACF;AACF,CACF;AAEA,SAAS,OAAO,EACd,WACA,UAAU,WACV,OAAO,WACP,UAAU,OACV,GAAG,SAIA;CACH,MAAM,OAAO,UAAU,KAAK,OAAO;CAEnC,OACE,oBAAC,MAAD;EACE,WAAW,GAAG,eAAe;GAAE;GAAW;GAAM;EAAQ,CAAC,CAAC;EAC1D,aAAW;EACX,aAAU;EACV,gBAAc;EACd,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/elements/card.d.ts
|
|
3
|
+
declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
4
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
5
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
6
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
12
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","names":[],"sources":["../../src/elements/card.tsx"],"mappings":";;iBAIS,OAAO,cAAc,SAAS,MAAM,wBAAqB,MAAA,IAAA;iBAazD,aAAa,cAAc,SAAS,MAAM,wBAAqB,MAAA,IAAA;iBAa/D,YAAY,cAAc,SAAS,MAAM,wBAAqB,MAAA,IAAA;iBAU9D,kBAAkB,cAAc,SAAS,MAAM,wBAAqB,MAAA,IAAA;iBAUpE,aAAa,cAAc,SAAS,MAAM,wBAAqB,MAAA,IAAA;iBAa/D,cAAc,cAAc,SAAS,MAAM,wBAAqB,MAAA,IAAA;iBAUhE,aAAa,cAAc,SAAS,MAAM,wBAAqB,MAAA,IAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/elements/card.tsx
|
|
4
|
+
function Card({ className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6
|
+
className: cn("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm", className),
|
|
7
|
+
"data-slot": "card",
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function CardHeader({ className, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx("div", {
|
|
13
|
+
className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
|
|
14
|
+
"data-slot": "card-header",
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function CardTitle({ className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: cn("font-semibold leading-none", className),
|
|
21
|
+
"data-slot": "card-title",
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function CardDescription({ className, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx("div", {
|
|
27
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
28
|
+
"data-slot": "card-description",
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function CardAction({ className, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx("div", {
|
|
34
|
+
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
35
|
+
"data-slot": "card-action",
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function CardContent({ className, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsx("div", {
|
|
41
|
+
className: cn("px-6", className),
|
|
42
|
+
"data-slot": "card-content",
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function CardFooter({ className, ...props }) {
|
|
47
|
+
return /* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
49
|
+
"data-slot": "card-footer",
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","names":[],"sources":["../../src/elements/card.tsx"],"sourcesContent":["import type * as React from \"react\";\n\nimport { cn } from \"@/lib/cn\";\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\n \"flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm\",\n className\n )}\n data-slot=\"card\"\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n className\n )}\n data-slot=\"card-header\"\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\"font-semibold leading-none\", className)}\n data-slot=\"card-title\"\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\"text-muted-foreground text-sm\", className)}\n data-slot=\"card-description\"\n {...props}\n />\n );\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\n \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n className\n )}\n data-slot=\"card-action\"\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\"px-6\", className)}\n data-slot=\"card-content\"\n {...props}\n />\n );\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\"flex items-center px-6 [.border-t]:pt-6\", className)}\n data-slot=\"card-footer\"\n {...props}\n />\n );\n}\n\nexport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n};\n"],"mappings":";;;AAIA,SAAS,KAAK,EAAE,WAAW,GAAG,SAAsC;CAClE,OACE,oBAAC,OAAD;EACE,WAAW,GACT,qFACA,SACF;EACA,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,WAAW,GACT,4JACA,SACF;EACA,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAsC;CACvE,OACE,oBAAC,OAAD;EACE,WAAW,GAAG,8BAA8B,SAAS;EACrD,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAsC;CAC7E,OACE,oBAAC,OAAD;EACE,WAAW,GAAG,iCAAiC,SAAS;EACxD,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,WAAW,GACT,kEACA,SACF;EACA,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EACE,WAAW,GAAG,QAAQ,SAAS;EAC/B,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,WAAW,GAAG,2CAA2C,SAAS;EAClE,aAAU;EACV,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Checkbox } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/elements/checkbox.d.ts
|
|
4
|
+
declare function Checkbox$1({ className, ...props }: React.ComponentProps<typeof Checkbox.Root>): React.JSX.Element;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { Checkbox$1 as Checkbox };
|
|
7
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","names":[],"sources":["../../src/elements/checkbox.tsx"],"mappings":";;;iBAQS,aACP,cACG,SACF,MAAM,sBAAsB,SAAkB,QAAK,MAAA,IAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { CheckIcon } from "lucide-react";
|
|
5
|
+
import { Checkbox } from "radix-ui";
|
|
6
|
+
//#region src/elements/checkbox.tsx
|
|
7
|
+
function Checkbox$1({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Checkbox.Root, {
|
|
9
|
+
className: cn("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs outline-none transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:data-[state=checked]:bg-primary dark:aria-invalid:ring-destructive/40", className),
|
|
10
|
+
"data-slot": "checkbox",
|
|
11
|
+
...props,
|
|
12
|
+
children: /* @__PURE__ */ jsx(Checkbox.Indicator, {
|
|
13
|
+
className: "grid place-content-center text-current transition-none",
|
|
14
|
+
"data-slot": "checkbox-indicator",
|
|
15
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Checkbox$1 as Checkbox };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","names":["Checkbox","CheckboxPrimitive"],"sources":["../../src/elements/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport { CheckIcon } from \"lucide-react\";\nimport { Checkbox as CheckboxPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/cn\";\n\nfunction Checkbox({\n className,\n ...props\n}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n className={cn(\n \"peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs outline-none transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:data-[state=checked]:bg-primary dark:aria-invalid:ring-destructive/40\",\n className\n )}\n data-slot=\"checkbox\"\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className=\"grid place-content-center text-current transition-none\"\n data-slot=\"checkbox-indicator\"\n >\n <CheckIcon className=\"size-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n"],"mappings":";;;;;;AAQA,SAASA,WAAS,EAChB,WACA,GAAG,SACmD;CACtD,OACE,oBAACC,SAAkB,MAAnB;EACE,WAAW,GACT,+eACA,SACF;EACA,aAAU;EACV,GAAI;EAEJ,UAAA,oBAACA,SAAkB,WAAnB;GACE,WAAU;GACV,aAAU;GAEV,UAAA,oBAAC,WAAD,EAAW,WAAU,WAAY,CAAA;EACN,CAAA;CACP,CAAA;AAE5B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Dialog } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/elements/dialog.d.ts
|
|
4
|
+
declare function Dialog$1({ ...props }: React.ComponentProps<typeof Dialog.Root>): React.JSX.Element;
|
|
5
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof Dialog.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof Dialog.Portal>): React.JSX.Element;
|
|
7
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof Dialog.Close>): React.JSX.Element;
|
|
8
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof Dialog.Overlay>): React.JSX.Element;
|
|
9
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof Dialog.Content> & {
|
|
10
|
+
showCloseButton?: boolean;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
|
+
declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
|
|
14
|
+
showCloseButton?: boolean;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof Dialog.Title>): React.JSX.Element;
|
|
17
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof Dialog.Description>): React.JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Dialog$1 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
20
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","names":[],"sources":["../../src/elements/dialog.tsx"],"mappings":";;;iBAQS,cACJ,SACF,MAAM,sBAAsB,OAAgB,QAAK,MAAA,IAAA;iBAI3C,mBACJ,SACF,MAAM,sBAAsB,OAAgB,WAAQ,MAAA,IAAA;iBAI9C,kBACJ,SACF,MAAM,sBAAsB,OAAgB,UAAO,MAAA,IAAA;iBAI7C,iBACJ,SACF,MAAM,sBAAsB,OAAgB,SAAM,MAAA,IAAA;iBAI5C,gBACP,cACG,SACF,MAAM,sBAAsB,OAAgB,WAAQ,MAAA,IAAA;iBAa9C,gBACP,WACA,UACA,oBACG,SACF,MAAM,sBAAsB,OAAgB;EAC7C;IACD,MAAA,IAAA;iBA2BQ,eAAe,cAAc,SAAS,MAAM,wBAAqB,MAAA,IAAA;iBAUjE,eACP,WACA,iBACA,aACG,SACF,MAAM;EACP;IACD,MAAA,IAAA;iBAoBQ,cACP,cACG,SACF,MAAM,sBAAsB,OAAgB,SAAM,MAAA,IAAA;iBAU5C,oBACP,cACG,SACF,MAAM,sBAAsB,OAAgB,eAAY,MAAA,IAAA"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { Button } from "./button.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { XIcon } from "lucide-react";
|
|
6
|
+
import { Dialog } from "radix-ui";
|
|
7
|
+
//#region src/elements/dialog.tsx
|
|
8
|
+
function Dialog$1({ ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Dialog.Root, {
|
|
10
|
+
"data-slot": "dialog",
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function DialogTrigger({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
16
|
+
"data-slot": "dialog-trigger",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function DialogPortal({ ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(Dialog.Portal, {
|
|
22
|
+
"data-slot": "dialog-portal",
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function DialogClose({ ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
28
|
+
"data-slot": "dialog-close",
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function DialogOverlay({ className, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx(Dialog.Overlay, {
|
|
34
|
+
className: cn("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", className),
|
|
35
|
+
"data-slot": "dialog-overlay",
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsxs(DialogPortal, {
|
|
41
|
+
"data-slot": "dialog-portal",
|
|
42
|
+
children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog.Content, {
|
|
43
|
+
className: cn("data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg", className),
|
|
44
|
+
"data-slot": "dialog-content",
|
|
45
|
+
...props,
|
|
46
|
+
children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog.Close, {
|
|
47
|
+
className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
48
|
+
"data-slot": "dialog-close",
|
|
49
|
+
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
50
|
+
className: "sr-only",
|
|
51
|
+
children: "Close"
|
|
52
|
+
})]
|
|
53
|
+
})]
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function DialogHeader({ className, ...props }) {
|
|
58
|
+
return /* @__PURE__ */ jsx("div", {
|
|
59
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
60
|
+
"data-slot": "dialog-header",
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
|
|
65
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
66
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
67
|
+
"data-slot": "dialog-footer",
|
|
68
|
+
...props,
|
|
69
|
+
children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog.Close, {
|
|
70
|
+
asChild: true,
|
|
71
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
72
|
+
variant: "outline",
|
|
73
|
+
children: "Close"
|
|
74
|
+
})
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function DialogTitle({ className, ...props }) {
|
|
79
|
+
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
80
|
+
className: cn("font-semibold text-lg leading-none", className),
|
|
81
|
+
"data-slot": "dialog-title",
|
|
82
|
+
...props
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function DialogDescription({ className, ...props }) {
|
|
86
|
+
return /* @__PURE__ */ jsx(Dialog.Description, {
|
|
87
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
88
|
+
"data-slot": "dialog-description",
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { Dialog$1 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=dialog.js.map
|