@glinui/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/dist/components/accordion.d.ts +42 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +85 -0
- package/dist/components/alert-dialog.d.ts +30 -0
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +53 -0
- package/dist/components/alert.d.ts +15 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +39 -0
- package/dist/components/animated-gradient.d.ts +11 -0
- package/dist/components/animated-gradient.d.ts.map +1 -0
- package/dist/components/animated-gradient.js +23 -0
- package/dist/components/aurora-background.d.ts +15 -0
- package/dist/components/aurora-background.d.ts.map +1 -0
- package/dist/components/aurora-background.js +26 -0
- package/dist/components/avatar.d.ts +54 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +92 -0
- package/dist/components/badge.d.ts +13 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +32 -0
- package/dist/components/blur-fade.d.ts +17 -0
- package/dist/components/blur-fade.d.ts.map +1 -0
- package/dist/components/blur-fade.js +48 -0
- package/dist/components/blur-spotlight.d.ts +13 -0
- package/dist/components/blur-spotlight.d.ts.map +1 -0
- package/dist/components/blur-spotlight.js +58 -0
- package/dist/components/border-beam.d.ts +11 -0
- package/dist/components/border-beam.d.ts.map +1 -0
- package/dist/components/border-beam.js +14 -0
- package/dist/components/button.d.ts +17 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +33 -0
- package/dist/components/card.d.ts +39 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +81 -0
- package/dist/components/checkbox.d.ts +14 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +58 -0
- package/dist/components/chip.d.ts +15 -0
- package/dist/components/chip.d.ts.map +1 -0
- package/dist/components/chip.js +35 -0
- package/dist/components/chromatic-text.d.ts +11 -0
- package/dist/components/chromatic-text.d.ts.map +1 -0
- package/dist/components/chromatic-text.js +22 -0
- package/dist/components/code.d.ts +13 -0
- package/dist/components/code.d.ts.map +1 -0
- package/dist/components/code.js +27 -0
- package/dist/components/command.d.ts +89 -0
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +123 -0
- package/dist/components/counter.d.ts +19 -0
- package/dist/components/counter.d.ts.map +1 -0
- package/dist/components/counter.js +28 -0
- package/dist/components/data-table.d.ts +38 -0
- package/dist/components/data-table.d.ts.map +1 -0
- package/dist/components/data-table.js +183 -0
- package/dist/components/depth-card.d.ts +15 -0
- package/dist/components/depth-card.d.ts.map +1 -0
- package/dist/components/depth-card.js +52 -0
- package/dist/components/dot-pattern.d.ts +10 -0
- package/dist/components/dot-pattern.d.ts.map +1 -0
- package/dist/components/dot-pattern.js +10 -0
- package/dist/components/dropdown-menu.d.ts +74 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +90 -0
- package/dist/components/floating-panel.d.ts +17 -0
- package/dist/components/floating-panel.d.ts.map +1 -0
- package/dist/components/floating-panel.js +57 -0
- package/dist/components/glass-breadcrumb.d.ts +17 -0
- package/dist/components/glass-breadcrumb.d.ts.map +1 -0
- package/dist/components/glass-breadcrumb.js +14 -0
- package/dist/components/glass-card.d.ts +20 -0
- package/dist/components/glass-card.d.ts.map +1 -0
- package/dist/components/glass-card.js +36 -0
- package/dist/components/glass-dock.d.ts +21 -0
- package/dist/components/glass-dock.d.ts.map +1 -0
- package/dist/components/glass-dock.js +54 -0
- package/dist/components/glass-navbar.d.ts +21 -0
- package/dist/components/glass-navbar.d.ts.map +1 -0
- package/dist/components/glass-navbar.js +43 -0
- package/dist/components/glass-toggle.d.ts +15 -0
- package/dist/components/glass-toggle.d.ts.map +1 -0
- package/dist/components/glass-toggle.js +32 -0
- package/dist/components/glow-border.d.ts +13 -0
- package/dist/components/glow-border.d.ts.map +1 -0
- package/dist/components/glow-border.js +10 -0
- package/dist/components/gradient-mesh.d.ts +13 -0
- package/dist/components/gradient-mesh.d.ts.map +1 -0
- package/dist/components/gradient-mesh.js +25 -0
- package/dist/components/heading.d.ts +18 -0
- package/dist/components/heading.d.ts.map +1 -0
- package/dist/components/heading.js +28 -0
- package/dist/components/hover-card.d.ts +32 -0
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +28 -0
- package/dist/components/icon-frame.d.ts +13 -0
- package/dist/components/icon-frame.d.ts.map +1 -0
- package/dist/components/icon-frame.js +27 -0
- package/dist/components/input.d.ts +13 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +38 -0
- package/dist/components/kbd.d.ts +13 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +27 -0
- package/dist/components/label.d.ts +13 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +27 -0
- package/dist/components/light-leak.d.ts +15 -0
- package/dist/components/light-leak.d.ts.map +1 -0
- package/dist/components/light-leak.js +29 -0
- package/dist/components/link.d.ts +15 -0
- package/dist/components/link.d.ts.map +1 -0
- package/dist/components/link.js +32 -0
- package/dist/components/liquid-button.d.ts +17 -0
- package/dist/components/liquid-button.d.ts.map +1 -0
- package/dist/components/liquid-button.js +18 -0
- package/dist/components/magnetic-cta.d.ts +18 -0
- package/dist/components/magnetic-cta.d.ts.map +1 -0
- package/dist/components/magnetic-cta.js +46 -0
- package/dist/components/marquee.d.ts +10 -0
- package/dist/components/marquee.d.ts.map +1 -0
- package/dist/components/marquee.js +16 -0
- package/dist/components/meteor-shower.d.ts +11 -0
- package/dist/components/meteor-shower.d.ts.map +1 -0
- package/dist/components/meteor-shower.js +39 -0
- package/dist/components/modal.d.ts +30 -0
- package/dist/components/modal.d.ts.map +1 -0
- package/dist/components/modal.js +39 -0
- package/dist/components/morphing-tabs.d.ts +22 -0
- package/dist/components/morphing-tabs.d.ts.map +1 -0
- package/dist/components/morphing-tabs.js +72 -0
- package/dist/components/number-ticker.d.ts +11 -0
- package/dist/components/number-ticker.d.ts.map +1 -0
- package/dist/components/number-ticker.js +66 -0
- package/dist/components/orbiting-circles.d.ts +21 -0
- package/dist/components/orbiting-circles.d.ts.map +1 -0
- package/dist/components/orbiting-circles.js +24 -0
- package/dist/components/particle-field.d.ts +19 -0
- package/dist/components/particle-field.d.ts.map +1 -0
- package/dist/components/particle-field.js +41 -0
- package/dist/components/popover.d.ts +27 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +52 -0
- package/dist/components/prism-border.d.ts +13 -0
- package/dist/components/prism-border.d.ts.map +1 -0
- package/dist/components/prism-border.js +16 -0
- package/dist/components/progress.d.ts +58 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +108 -0
- package/dist/components/pulsating-button.d.ts +13 -0
- package/dist/components/pulsating-button.d.ts.map +1 -0
- package/dist/components/pulsating-button.js +40 -0
- package/dist/components/radio-group.d.ts +27 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +58 -0
- package/dist/components/retro-grid.d.ts +13 -0
- package/dist/components/retro-grid.d.ts.map +1 -0
- package/dist/components/retro-grid.js +17 -0
- package/dist/components/reveal-text.d.ts +17 -0
- package/dist/components/reveal-text.d.ts.map +1 -0
- package/dist/components/reveal-text.js +61 -0
- package/dist/components/ripple-button.d.ts +11 -0
- package/dist/components/ripple-button.d.ts.map +1 -0
- package/dist/components/ripple-button.js +47 -0
- package/dist/components/ripple.d.ts +13 -0
- package/dist/components/ripple.d.ts.map +1 -0
- package/dist/components/ripple.js +24 -0
- package/dist/components/select.d.ts +24 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +30 -0
- package/dist/components/separator.d.ts +29 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +84 -0
- package/dist/components/sheet.d.ts +41 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +85 -0
- package/dist/components/shimmer-button.d.ts +13 -0
- package/dist/components/shimmer-button.d.ts.map +1 -0
- package/dist/components/shimmer-button.js +32 -0
- package/dist/components/skeleton.d.ts +17 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +42 -0
- package/dist/components/slider.d.ts +14 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +89 -0
- package/dist/components/sonner.d.ts +14 -0
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +70 -0
- package/dist/components/spotlight-card.d.ts +11 -0
- package/dist/components/spotlight-card.d.ts.map +1 -0
- package/dist/components/spotlight-card.js +39 -0
- package/dist/components/spotlight.d.ts +19 -0
- package/dist/components/spotlight.d.ts.map +1 -0
- package/dist/components/spotlight.js +23 -0
- package/dist/components/status-dot.d.ts +24 -0
- package/dist/components/status-dot.d.ts.map +1 -0
- package/dist/components/status-dot.js +46 -0
- package/dist/components/switch.d.ts +42 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +77 -0
- package/dist/components/table.d.ts +69 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +176 -0
- package/dist/components/tabs.d.ts +34 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +75 -0
- package/dist/components/text-reveal.d.ts +6 -0
- package/dist/components/text-reveal.d.ts.map +1 -0
- package/dist/components/text-reveal.js +56 -0
- package/dist/components/text.d.ts +13 -0
- package/dist/components/text.d.ts.map +1 -0
- package/dist/components/text.js +27 -0
- package/dist/components/textarea.d.ts +13 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +37 -0
- package/dist/components/toast.d.ts +23 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +36 -0
- package/dist/components/tooltip.d.ts +35 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +34 -0
- package/dist/components/tree.d.ts +50 -0
- package/dist/components/tree.d.ts.map +1 -0
- package/dist/components/tree.js +77 -0
- package/dist/components/typewriter.d.ts +25 -0
- package/dist/components/typewriter.d.ts.map +1 -0
- package/dist/components/typewriter.js +109 -0
- package/dist/components/word-rotate.d.ts +11 -0
- package/dist/components/word-rotate.d.ts.map +1 -0
- package/dist/components/word-rotate.js +29 -0
- package/dist/index.d.ts +80 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +79 -0
- package/dist/lib/cn.d.ts +3 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +5 -0
- package/dist/lib/use-liquid-glass.d.ts +46 -0
- package/dist/lib/use-liquid-glass.d.ts.map +1 -0
- package/dist/lib/use-liquid-glass.js +144 -0
- package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
- package/dist/lib/use-prefers-reduced-motion.d.ts.map +1 -0
- package/dist/lib/use-prefers-reduced-motion.js +23 -0
- package/package.json +72 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const progressVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "glass" | "matte" | "liquid" | null | undefined;
|
|
6
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare const progressCircleVariants: (props?: ({
|
|
9
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
export type ProgressProps = React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> & VariantProps<typeof progressVariants> & {
|
|
12
|
+
/** Current progress value from 0 to 100. */
|
|
13
|
+
value?: number;
|
|
14
|
+
/** Render loading state without aria-valuenow and fixed width indicator. */
|
|
15
|
+
indeterminate?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
18
|
+
variant?: "default" | "glass" | "matte" | "liquid" | null | undefined;
|
|
19
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
20
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
21
|
+
/** Current progress value from 0 to 100. */
|
|
22
|
+
value?: number;
|
|
23
|
+
/** Render loading state without aria-valuenow and fixed width indicator. */
|
|
24
|
+
indeterminate?: boolean;
|
|
25
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export type ProgressCircleProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & VariantProps<typeof progressCircleVariants> & {
|
|
27
|
+
value?: number;
|
|
28
|
+
variant?: NonNullable<VariantProps<typeof progressVariants>["variant"]>;
|
|
29
|
+
strokeWidth?: number;
|
|
30
|
+
cap?: "round" | "square" | "butt";
|
|
31
|
+
indeterminate?: boolean;
|
|
32
|
+
showValue?: boolean;
|
|
33
|
+
formatValue?: (value: number) => React.ReactNode;
|
|
34
|
+
};
|
|
35
|
+
export declare const ProgressCircle: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & VariantProps<(props?: ({
|
|
36
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
37
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
38
|
+
value?: number;
|
|
39
|
+
variant?: NonNullable<VariantProps<typeof progressVariants>["variant"]>;
|
|
40
|
+
strokeWidth?: number;
|
|
41
|
+
cap?: "round" | "square" | "butt";
|
|
42
|
+
indeterminate?: boolean;
|
|
43
|
+
showValue?: boolean;
|
|
44
|
+
formatValue?: (value: number) => React.ReactNode;
|
|
45
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
export declare const CircularProgress: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & VariantProps<(props?: ({
|
|
47
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
48
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
49
|
+
value?: number;
|
|
50
|
+
variant?: NonNullable<VariantProps<typeof progressVariants>["variant"]>;
|
|
51
|
+
strokeWidth?: number;
|
|
52
|
+
cap?: "round" | "square" | "butt";
|
|
53
|
+
indeterminate?: boolean;
|
|
54
|
+
showValue?: boolean;
|
|
55
|
+
formatValue?: (value: number) => React.ReactNode;
|
|
56
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,gBAAgB;;;8EAqBpB,CAAA;AAsCF,QAAA,MAAM,sBAAsB;;8EAW1B,CAAA;AAmCF,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,GACvF,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG;IACtC,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4EAA4E;IAC5E,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAEH,eAAO,MAAM,QAAQ;;;;IANjB,4CAA4C;YACpC,MAAM;IACd,4EAA4E;oBAC5D,OAAO;wCAyBzB,CAAA;AAIF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GACtF,YAAY,CAAC,OAAO,sBAAsB,CAAC,GAAG;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;IACvE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,GAAG,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA;CACjD,CAAA;AAEH,eAAO,MAAM,cAAc;;;YATf,MAAM;cACJ,WAAW,CAAC,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC;kBACzD,MAAM;UACd,OAAO,GAAG,QAAQ,GAAG,MAAM;oBACjB,OAAO;gBACX,OAAO;kBACL,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS;wCAuEnD,CAAA;AAID,eAAO,MAAM,gBAAgB;;;YAjFjB,MAAM;cACJ,WAAW,CAAC,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC;kBACzD,MAAM;UACd,OAAO,GAAG,QAAQ,GAAG,MAAM;oBACjB,OAAO;gBACX,OAAO;kBACL,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS;wCA2EN,CAAA"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../lib/cn";
|
|
6
|
+
const progressVariants = cva("relative w-full overflow-hidden rounded-full", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "bg-neutral-200 dark:bg-neutral-800",
|
|
10
|
+
glass: "border border-white/25 [border-top-color:var(--glass-refraction-top)] bg-[var(--glass-2-surface)] backdrop-blur-md backdrop-saturate-[180%] shadow-[0_0_0_1px_rgb(255_255_255_/_0.06)_inset] dark:border-white/[0.14]",
|
|
11
|
+
liquid: "border border-white/25 [border-top-color:var(--glass-refraction-top)] bg-[radial-gradient(circle_at_16%_12%,rgb(255_255_255_/_0.8),transparent_44%),linear-gradient(168deg,rgb(255_255_255_/_0.6),rgb(236_236_236_/_0.34))] dark:border-white/[0.14] dark:[border-top-color:rgb(255_255_255_/_0.3)] dark:bg-[linear-gradient(168deg,rgb(255_255_255_/_0.12),rgb(255_255_255_/_0.05))]",
|
|
12
|
+
matte: "border border-black/10 bg-[linear-gradient(180deg,rgb(250_250_251),rgb(236_236_238))] dark:border-white/[0.14] dark:bg-[linear-gradient(180deg,rgb(50_55_64_/_0.9),rgb(35_39_47_/_0.9))]"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
sm: "h-2",
|
|
16
|
+
md: "h-3",
|
|
17
|
+
lg: "h-4"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
size: "md"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const indicatorVariants = cva("h-full rounded-full transition-[width] duration-normal ease-standard motion-reduce:transition-none", {
|
|
26
|
+
variants: {
|
|
27
|
+
variant: {
|
|
28
|
+
default: "bg-neutral-900 dark:bg-neutral-100",
|
|
29
|
+
glass: "bg-neutral-900/85 shadow-[0_0_10px_rgb(15_23_42_/_0.2)] dark:bg-white/85 dark:shadow-[0_0_10px_rgb(255_255_255_/_0.15)]",
|
|
30
|
+
liquid: "bg-[linear-gradient(90deg,rgb(15_23_42_/_0.92),rgb(30_41_59_/_0.9))] shadow-[0_0_14px_rgb(15_23_42_/_0.26)] dark:bg-[linear-gradient(90deg,rgb(248_250_252_/_0.92),rgb(226_232_240_/_0.82))] dark:shadow-[0_0_16px_rgb(226_232_240_/_0.24)]",
|
|
31
|
+
matte: "bg-neutral-900 dark:bg-neutral-100"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
variant: "default"
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const indeterminateIndicatorVariants = cva("w-1/2 motion-safe:animate-pulse motion-reduce:animate-none", {
|
|
39
|
+
variants: {
|
|
40
|
+
variant: {
|
|
41
|
+
default: "opacity-85",
|
|
42
|
+
glass: "opacity-90",
|
|
43
|
+
liquid: "opacity-90",
|
|
44
|
+
matte: "opacity-90"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
variant: "default"
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const progressCircleVariants = cva("relative inline-flex shrink-0 items-center justify-center", {
|
|
52
|
+
variants: {
|
|
53
|
+
size: {
|
|
54
|
+
sm: "h-12 w-12 text-[11px]",
|
|
55
|
+
md: "h-16 w-16 text-xs",
|
|
56
|
+
lg: "h-24 w-24 text-sm"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: {
|
|
60
|
+
size: "md"
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
const progressCircleTrackVariants = cva("fill-none", {
|
|
64
|
+
variants: {
|
|
65
|
+
variant: {
|
|
66
|
+
default: "stroke-neutral-300 dark:stroke-neutral-700",
|
|
67
|
+
glass: "stroke-neutral-300/70 dark:stroke-white/[0.22]",
|
|
68
|
+
liquid: "stroke-neutral-300/85 dark:stroke-white/[0.2]",
|
|
69
|
+
matte: "stroke-neutral-300 dark:stroke-white/[0.16]"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
defaultVariants: {
|
|
73
|
+
variant: "default"
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
const progressCircleIndicatorVariants = cva("fill-none transition-[stroke-dashoffset,stroke] duration-normal ease-standard motion-reduce:transition-none", {
|
|
77
|
+
variants: {
|
|
78
|
+
variant: {
|
|
79
|
+
default: "stroke-neutral-900 dark:stroke-neutral-100",
|
|
80
|
+
glass: "stroke-neutral-900/85 drop-shadow-[0_0_6px_rgb(15_23_42_/_0.2)] dark:stroke-white/85 dark:drop-shadow-[0_0_6px_rgb(255_255_255_/_0.15)]",
|
|
81
|
+
liquid: "stroke-neutral-900 drop-shadow-[0_0_6px_rgb(15_23_42_/_0.25)] dark:stroke-neutral-100 dark:drop-shadow-[0_0_6px_rgb(255_255_255_/_0.18)]",
|
|
82
|
+
matte: "stroke-neutral-900 dark:stroke-neutral-100"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
defaultVariants: {
|
|
86
|
+
variant: "default"
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
export const Progress = React.forwardRef(({ className, value, variant, size, indeterminate = false, ...props }, ref) => {
|
|
90
|
+
const clampedValue = Math.max(0, Math.min(100, value ?? 0));
|
|
91
|
+
return (_jsx(ProgressPrimitive.Root, { ref: ref, className: cn(progressVariants({ variant, size }), className), value: indeterminate ? undefined : clampedValue, ...props, children: _jsx(ProgressPrimitive.Indicator, { className: cn(indicatorVariants({ variant }), indeterminate && indeterminateIndicatorVariants({ variant })), style: indeterminate ? undefined : { width: `${clampedValue}%` } }) }));
|
|
92
|
+
});
|
|
93
|
+
Progress.displayName = "Progress";
|
|
94
|
+
export const ProgressCircle = React.forwardRef(({ className, value, variant = "default", size, strokeWidth = 4, cap = "round", indeterminate = false, showValue = true, formatValue, ...props }, ref) => {
|
|
95
|
+
const clampedValue = Math.max(0, Math.min(100, value ?? 0));
|
|
96
|
+
const normalizedStrokeWidth = Math.max(2, Math.min(10, strokeWidth));
|
|
97
|
+
const viewBoxSize = 44;
|
|
98
|
+
const center = viewBoxSize / 2;
|
|
99
|
+
const radius = center - normalizedStrokeWidth / 2;
|
|
100
|
+
const circumference = 2 * Math.PI * radius;
|
|
101
|
+
const dashOffset = indeterminate
|
|
102
|
+
? circumference * 0.25
|
|
103
|
+
: circumference - (clampedValue / 100) * circumference;
|
|
104
|
+
const dashArray = indeterminate ? circumference * 0.7 : circumference;
|
|
105
|
+
return (_jsxs("div", { ref: ref, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": indeterminate ? undefined : clampedValue, className: cn(progressCircleVariants({ size }), className), ...props, children: [_jsxs("svg", { viewBox: `0 0 ${viewBoxSize} ${viewBoxSize}`, className: cn("size-full -rotate-90", indeterminate && "motion-safe:animate-spin"), "aria-hidden": "true", children: [_jsx("circle", { cx: center, cy: center, r: radius, strokeWidth: normalizedStrokeWidth, className: cn(progressCircleTrackVariants({ variant })) }), _jsx("circle", { cx: center, cy: center, r: radius, strokeWidth: normalizedStrokeWidth, strokeLinecap: cap, strokeDasharray: dashArray, strokeDashoffset: dashOffset, className: cn(progressCircleIndicatorVariants({ variant })) })] }), showValue && !indeterminate ? (_jsx("span", { className: "pointer-events-none absolute inset-0 flex items-center justify-center font-medium text-[var(--color-foreground)]", children: formatValue ? formatValue(clampedValue) : `${Math.round(clampedValue)}%` })) : null] }));
|
|
106
|
+
});
|
|
107
|
+
ProgressCircle.displayName = "ProgressCircle";
|
|
108
|
+
export const CircularProgress = ProgressCircle;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const pulsatingButtonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "glass" | "accent" | null | undefined;
|
|
5
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface PulsatingButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof pulsatingButtonVariants> {
|
|
8
|
+
pulseColor?: string;
|
|
9
|
+
pulseDuration?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const PulsatingButton: React.ForwardRefExoticComponent<PulsatingButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=pulsating-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pulsating-button.d.ts","sourceRoot":"","sources":["../../src/components/pulsating-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,uBAAuB;;;8EA4B5B,CAAA;AAED,MAAM,WAAW,oBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,uBAAuB,CAAC;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,eAAO,MAAM,eAAe,gGA8C3B,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../lib/cn";
|
|
5
|
+
const pulsatingButtonVariants = cva([
|
|
6
|
+
"relative inline-flex items-center justify-center rounded-xl",
|
|
7
|
+
"px-6 py-2.5 text-sm font-medium transition-all",
|
|
8
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)] focus-visible:ring-offset-2",
|
|
9
|
+
"disabled:pointer-events-none disabled:opacity-50"
|
|
10
|
+
], {
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "bg-neutral-900 text-white hover:bg-neutral-800 dark:bg-white dark:text-neutral-900 dark:hover:bg-neutral-100",
|
|
14
|
+
accent: "bg-[var(--color-accent)] text-[var(--color-accent-foreground)] hover:opacity-90",
|
|
15
|
+
glass: "border border-white/20 [border-top-color:var(--glass-refraction-top)] bg-white/10 text-[var(--color-foreground)] backdrop-blur-md hover:bg-white/20 dark:border-white/10 dark:bg-white/[0.06]"
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
sm: "h-8 px-4 text-xs",
|
|
19
|
+
md: "h-10 px-6 text-sm",
|
|
20
|
+
lg: "h-12 px-8 text-base"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
variant: "default",
|
|
25
|
+
size: "md"
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export const PulsatingButton = React.forwardRef(({ className, children, variant, size, pulseColor, pulseDuration = 2, style, ...props }, ref) => {
|
|
29
|
+
const defaultPulseColor = variant === "accent"
|
|
30
|
+
? "var(--color-accent)"
|
|
31
|
+
: variant === "glass"
|
|
32
|
+
? "rgba(255,255,255,0.3)"
|
|
33
|
+
: "rgba(0,0,0,0.3)";
|
|
34
|
+
return (_jsxs("button", { ref: ref, className: cn(pulsatingButtonVariants({ variant, size }), className), style: style, ...props, children: [_jsx("span", { className: cn("pointer-events-none absolute inset-0 rounded-[inherit]", "motion-safe:animate-[pulsate-ring_var(--pulsate-duration,2s)_ease-out_infinite]", "motion-reduce:hidden"), style: {
|
|
35
|
+
"--pulsate-duration": `${pulseDuration}s`,
|
|
36
|
+
boxShadow: `0 0 0 0 ${pulseColor ?? defaultPulseColor}`,
|
|
37
|
+
border: `2px solid ${pulseColor ?? defaultPulseColor}`,
|
|
38
|
+
} }), _jsx("span", { className: "relative z-10", children: children })] }));
|
|
39
|
+
});
|
|
40
|
+
PulsatingButton.displayName = "PulsatingButton";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
+
export interface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {
|
|
4
|
+
/** Controlled selected value. */
|
|
5
|
+
value?: string;
|
|
6
|
+
/** Initial selected value for uncontrolled usage. */
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
/** Called when the selected value changes. */
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
10
|
+
/** Layout direction for radio items. */
|
|
11
|
+
orientation?: "horizontal" | "vertical";
|
|
12
|
+
/** Disables all radio items in the group. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export interface RadioGroupItemProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item> {
|
|
17
|
+
/** Surface treatment for the radio item shell. */
|
|
18
|
+
variant?: "default" | "glass" | "liquid" | "matte" | "outline";
|
|
19
|
+
/** Size of the radio control. */
|
|
20
|
+
size?: "sm" | "md" | "lg";
|
|
21
|
+
/** Value submitted by this radio item when selected. */
|
|
22
|
+
value: string;
|
|
23
|
+
/** Disables this radio item. */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAKlE,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IACtG,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,wCAAwC;IACxC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,UAAU,wFAKrB,CAAA;AA8DF,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAC1G,kDAAkD;IAClD,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;IAC9D,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,cAAc,+FAazB,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../lib/cn";
|
|
6
|
+
export const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
|
|
7
|
+
return _jsx(RadioGroupPrimitive.Root, { ref: ref, className: cn("grid gap-2", className), ...props });
|
|
8
|
+
});
|
|
9
|
+
RadioGroup.displayName = "RadioGroup";
|
|
10
|
+
const radioItemVariants = cva("outline-none transition-[background-color,border-color,box-shadow,transform] duration-fast ease-standard focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 motion-reduce:transition-none data-[state=checked]:scale-[0.99]", {
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "border border-[var(--color-border)] bg-[var(--color-surface)] shadow-sm focus-visible:ring-[var(--color-accent)]/35 dark:border-white/15 dark:bg-white/[0.04] dark:focus-visible:ring-[var(--color-accent)]/25",
|
|
14
|
+
glass: "border border-white/24 [border-top-color:var(--glass-refraction-top)] bg-[radial-gradient(circle_at_20%_16%,rgb(255_255_255_/_0.88),transparent_44%),linear-gradient(160deg,rgb(255_255_255_/_0.72),rgb(242_246_250_/_0.48))] shadow-[0_0_0_1px_rgb(255_255_255_/_0.2)_inset,0_8px_16px_-12px_rgb(15_23_42_/_0.25)] focus-visible:ring-[var(--color-accent)]/24 dark:border-white/[0.14] dark:bg-white/[0.06] dark:focus-visible:ring-white/15",
|
|
15
|
+
liquid: "border border-white/24 [border-top-color:var(--glass-refraction-top)] bg-[radial-gradient(circle_at_18%_12%,rgb(255_255_255_/_0.94),transparent_42%),radial-gradient(circle_at_84%_88%,rgb(226_232_240_/_0.58),transparent_58%),linear-gradient(145deg,rgb(255_255_255_/_0.82),rgb(235_241_246_/_0.55))] shadow-[0_0_0_1px_rgb(255_255_255_/_0.24)_inset,0_10px_18px_-12px_rgb(15_23_42_/_0.26)] focus-visible:ring-[var(--color-accent)]/24 dark:border-white/[0.15] dark:bg-[linear-gradient(145deg,rgb(255_255_255_/_0.13),rgb(255_255_255_/_0.05))] dark:focus-visible:ring-white/16",
|
|
16
|
+
matte: "border border-black/12 bg-[linear-gradient(180deg,rgb(249_250_251),rgb(237_239_242))] shadow-[0_1px_0_rgb(255_255_255_/_0.88)_inset,0_6px_14px_-12px_rgb(15_23_42_/_0.24)] focus-visible:ring-black/14 dark:border-white/[0.14] dark:bg-[linear-gradient(180deg,rgb(49_54_63_/_0.92),rgb(34_38_46_/_0.92))] dark:focus-visible:ring-white/14",
|
|
17
|
+
outline: "border border-[var(--color-border)] bg-transparent focus-visible:ring-[var(--color-accent)]/25 dark:border-white/20"
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
sm: "h-4 w-4",
|
|
21
|
+
md: "h-5 w-5",
|
|
22
|
+
lg: "h-6 w-6"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
compoundVariants: [
|
|
26
|
+
{ size: "sm", class: "rounded-full" },
|
|
27
|
+
{ size: "md", class: "rounded-full" },
|
|
28
|
+
{ size: "lg", class: "rounded-full" }
|
|
29
|
+
],
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
variant: "default",
|
|
32
|
+
size: "md"
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const radioIndicatorVariants = cva("relative flex h-full w-full items-center justify-center after:block after:rounded-full", {
|
|
36
|
+
variants: {
|
|
37
|
+
variant: {
|
|
38
|
+
default: "after:bg-[var(--color-accent)]",
|
|
39
|
+
glass: "after:bg-neutral-900 dark:after:bg-white",
|
|
40
|
+
liquid: "after:bg-neutral-900 dark:after:bg-white",
|
|
41
|
+
matte: "after:bg-neutral-900 dark:after:bg-white",
|
|
42
|
+
outline: "after:bg-[var(--color-accent)]"
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
sm: "after:h-2 after:w-2",
|
|
46
|
+
md: "after:h-2.5 after:w-2.5",
|
|
47
|
+
lg: "after:h-3 after:w-3"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
variant: "default",
|
|
52
|
+
size: "md"
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
export const RadioGroupItem = React.forwardRef(({ className, variant = "default", size = "md", ...props }, ref) => {
|
|
56
|
+
return (_jsx(RadioGroupPrimitive.Item, { ref: ref, className: cn(radioItemVariants({ variant, size }), className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: cn(radioIndicatorVariants({ variant, size })) }) }));
|
|
57
|
+
});
|
|
58
|
+
RadioGroupItem.displayName = "RadioGroupItem";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface RetroGridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Perspective angle in degrees */
|
|
4
|
+
angle?: number;
|
|
5
|
+
/** Grid line color */
|
|
6
|
+
lineColor?: string;
|
|
7
|
+
/** Grid line opacity (0-1) */
|
|
8
|
+
lineOpacity?: number;
|
|
9
|
+
/** Grid cell size in px */
|
|
10
|
+
cellSize?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const RetroGrid: React.ForwardRefExoticComponent<RetroGridProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
//# sourceMappingURL=retro-grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retro-grid.d.ts","sourceRoot":"","sources":["../../src/components/retro-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,SAAS,uFA0CrB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/cn";
|
|
4
|
+
export const RetroGrid = React.forwardRef(({ className, angle = 65, lineColor, lineOpacity = 0.3, cellSize = 60, style, ...props }, ref) => {
|
|
5
|
+
const gridColor = lineColor ?? "currentColor";
|
|
6
|
+
return (_jsx("div", { ref: ref, "aria-hidden": true, className: cn("pointer-events-none absolute inset-0 overflow-hidden [perspective:200px]", className), style: {
|
|
7
|
+
"--retro-grid-cell": `${cellSize}px`,
|
|
8
|
+
"--retro-grid-duration": "10s",
|
|
9
|
+
...style,
|
|
10
|
+
}, ...props, children: _jsx("div", { className: "absolute inset-0 animate-retro-grid-scroll motion-reduce:[animation:none]", style: {
|
|
11
|
+
transform: `rotateX(${angle}deg)`,
|
|
12
|
+
backgroundImage: `linear-gradient(to right, ${gridColor} 1px, transparent 0), linear-gradient(to bottom, ${gridColor} 1px, transparent 0)`,
|
|
13
|
+
backgroundSize: `${cellSize}px ${cellSize}px`,
|
|
14
|
+
opacity: lineOpacity,
|
|
15
|
+
} }) }));
|
|
16
|
+
});
|
|
17
|
+
RetroGrid.displayName = "RetroGrid";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface RevealTextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
/** Text to reveal */
|
|
4
|
+
text: string;
|
|
5
|
+
/** Animation duration in seconds */
|
|
6
|
+
duration?: number;
|
|
7
|
+
/** Delay before animation starts, in ms */
|
|
8
|
+
delay?: number;
|
|
9
|
+
/** Reveal direction */
|
|
10
|
+
direction?: "left" | "right" | "top" | "bottom";
|
|
11
|
+
/** Trigger on intersection */
|
|
12
|
+
triggerOnView?: boolean;
|
|
13
|
+
/** Intersection threshold */
|
|
14
|
+
threshold?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const RevealText: React.ForwardRefExoticComponent<RevealTextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
17
|
+
//# sourceMappingURL=reveal-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reveal-text.d.ts","sourceRoot":"","sources":["../../src/components/reveal-text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IAC5E,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;IAC/C,8BAA8B;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,UAAU,yFAuFtB,CAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/cn";
|
|
5
|
+
import { usePrefersReducedMotion } from "../lib/use-prefers-reduced-motion";
|
|
6
|
+
export const RevealText = React.forwardRef(({ className, text, duration = 0.8, delay = 0, direction = "left", triggerOnView = true, threshold = 0.5, style, ...props }, ref) => {
|
|
7
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
8
|
+
const localRef = React.useRef(null);
|
|
9
|
+
const [isRevealed, setIsRevealed] = React.useState(false);
|
|
10
|
+
const setRefs = React.useCallback((node) => {
|
|
11
|
+
localRef.current = node;
|
|
12
|
+
if (typeof ref === "function") {
|
|
13
|
+
ref(node);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (ref)
|
|
17
|
+
ref.current = node;
|
|
18
|
+
}, [ref]);
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
if (prefersReducedMotion) {
|
|
21
|
+
setIsRevealed(true);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (!triggerOnView) {
|
|
25
|
+
setIsRevealed(false);
|
|
26
|
+
const frame = window.requestAnimationFrame(() => setIsRevealed(true));
|
|
27
|
+
return () => window.cancelAnimationFrame(frame);
|
|
28
|
+
}
|
|
29
|
+
const el = localRef.current;
|
|
30
|
+
if (!el)
|
|
31
|
+
return;
|
|
32
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
33
|
+
setIsRevealed(true);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
setIsRevealed(false);
|
|
37
|
+
const observer = new IntersectionObserver(([entry]) => {
|
|
38
|
+
if (entry.isIntersecting) {
|
|
39
|
+
setIsRevealed(true);
|
|
40
|
+
observer.disconnect();
|
|
41
|
+
}
|
|
42
|
+
}, { threshold });
|
|
43
|
+
observer.observe(el);
|
|
44
|
+
return () => observer.disconnect();
|
|
45
|
+
}, [triggerOnView, threshold, prefersReducedMotion]);
|
|
46
|
+
const clipPaths = {
|
|
47
|
+
left: { hidden: "inset(0 100% 0 0)", visible: "inset(0 0 0 0)" },
|
|
48
|
+
right: { hidden: "inset(0 0 0 100%)", visible: "inset(0 0 0 0)" },
|
|
49
|
+
top: { hidden: "inset(0 0 100% 0)", visible: "inset(0 0 0 0)" },
|
|
50
|
+
bottom: { hidden: "inset(100% 0 0 0)", visible: "inset(0 0 0 0)" },
|
|
51
|
+
};
|
|
52
|
+
const clip = clipPaths[direction];
|
|
53
|
+
return (_jsx("span", { ref: setRefs, className: cn("inline-block", className), style: {
|
|
54
|
+
clipPath: isRevealed ? clip.visible : clip.hidden,
|
|
55
|
+
transition: prefersReducedMotion
|
|
56
|
+
? "none"
|
|
57
|
+
: `clip-path ${duration}s ease-out ${delay}ms`,
|
|
58
|
+
...style,
|
|
59
|
+
}, ...props, children: text }));
|
|
60
|
+
});
|
|
61
|
+
RevealText.displayName = "RevealText";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface RippleButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
/** Ripple color */
|
|
4
|
+
rippleColor?: string;
|
|
5
|
+
/** Button variant */
|
|
6
|
+
variant?: "default" | "glass" | "frosted" | "outline";
|
|
7
|
+
/** Button size */
|
|
8
|
+
size?: "sm" | "md" | "lg";
|
|
9
|
+
}
|
|
10
|
+
export declare const RippleButton: React.ForwardRefExoticComponent<RippleButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
//# sourceMappingURL=ripple-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ripple-button.d.ts","sourceRoot":"","sources":["../../src/components/ripple-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACtF,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qBAAqB;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;IACrD,kBAAkB;IAClB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC1B;AAQD,eAAO,MAAM,YAAY,6FAqFxB,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/cn";
|
|
5
|
+
import { usePrefersReducedMotion } from "../lib/use-prefers-reduced-motion";
|
|
6
|
+
export const RippleButton = React.forwardRef(({ className, children, rippleColor: rippleColorProp, variant = "default", size = "md", onClick, ...props }, ref) => {
|
|
7
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
8
|
+
const [ripples, setRipples] = React.useState([]);
|
|
9
|
+
const idRef = React.useRef(0);
|
|
10
|
+
const handleClick = React.useCallback((event) => {
|
|
11
|
+
if (!prefersReducedMotion) {
|
|
12
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
13
|
+
const x = event.clientX - rect.left;
|
|
14
|
+
const y = event.clientY - rect.top;
|
|
15
|
+
const id = ++idRef.current;
|
|
16
|
+
setRipples((prev) => [...prev, { id, x, y }]);
|
|
17
|
+
setTimeout(() => {
|
|
18
|
+
setRipples((prev) => prev.filter((r) => r.id !== id));
|
|
19
|
+
}, 600);
|
|
20
|
+
}
|
|
21
|
+
onClick?.(event);
|
|
22
|
+
}, [onClick, prefersReducedMotion]);
|
|
23
|
+
const defaultRippleColors = {
|
|
24
|
+
default: "rgba(255, 255, 255, 0.4)",
|
|
25
|
+
glass: "rgba(0, 0, 0, 0.12)",
|
|
26
|
+
frosted: "rgba(0, 0, 0, 0.1)",
|
|
27
|
+
outline: "rgba(0, 0, 0, 0.1)",
|
|
28
|
+
};
|
|
29
|
+
const rippleColor = rippleColorProp ?? defaultRippleColors[variant] ?? "rgba(255, 255, 255, 0.4)";
|
|
30
|
+
const variantClasses = {
|
|
31
|
+
default: "border border-black/10 bg-neutral-900 text-white shadow-[0_12px_26px_-16px_rgb(2_6_23_/_0.65)] hover:bg-neutral-800 dark:border-white/15 dark:bg-neutral-100 dark:text-neutral-950 dark:shadow-[0_10px_24px_-14px_rgb(255_255_255_/_0.28)] dark:hover:bg-white",
|
|
32
|
+
glass: "border border-white/20 [border-top-color:var(--glass-refraction-top)] bg-white/50 text-[var(--color-foreground)] backdrop-blur-xl backdrop-saturate-[180%] shadow-[0_0_0_1px_rgb(255_255_255_/_0.4)_inset,0_10px_22px_-14px_rgb(15_23_42_/_0.18)] hover:bg-white/60 dark:border-white/[0.12] dark:bg-[linear-gradient(155deg,rgb(255_255_255_/_0.1),rgb(255_255_255_/_0.04))] dark:shadow-[0_0_0_1px_rgb(255_255_255_/_0.08)_inset,0_8px_20px_-12px_rgb(0_0_0_/_0.5)] dark:hover:bg-[linear-gradient(155deg,rgb(255_255_255_/_0.14),rgb(255_255_255_/_0.06))]",
|
|
33
|
+
frosted: "border border-white/30 [border-top-color:var(--glass-refraction-top)] bg-white/70 text-[var(--color-foreground)] backdrop-blur-[40px] backdrop-saturate-[200%] shadow-[0_0_0_1px_rgb(255_255_255_/_0.5)_inset,0_0_16px_rgb(255_255_255_/_0.15)_inset,0_10px_22px_-14px_rgb(15_23_42_/_0.22)] hover:bg-white/80 dark:border-white/[0.16] dark:bg-[linear-gradient(155deg,rgb(255_255_255_/_0.16),rgb(255_255_255_/_0.06))] dark:shadow-[0_0_0_1px_rgb(255_255_255_/_0.1)_inset,0_0_16px_rgb(255_255_255_/_0.04)_inset,0_8px_20px_-12px_rgb(0_0_0_/_0.5)] dark:hover:bg-[linear-gradient(155deg,rgb(255_255_255_/_0.2),rgb(255_255_255_/_0.08))]",
|
|
34
|
+
outline: "border border-[var(--color-border)] bg-transparent text-[var(--color-foreground)] shadow-sm hover:bg-[var(--glass-1-surface)] dark:border-white/15 dark:hover:bg-white/[0.06]",
|
|
35
|
+
};
|
|
36
|
+
const sizeClasses = {
|
|
37
|
+
sm: "h-8 px-3 text-xs",
|
|
38
|
+
md: "h-10 px-4 text-sm",
|
|
39
|
+
lg: "h-12 px-6 text-base",
|
|
40
|
+
};
|
|
41
|
+
return (_jsxs("button", { ref: ref, type: "button", className: cn("relative inline-flex items-center justify-center overflow-hidden rounded-lg font-medium transition-colors duration-200", variantClasses[variant], sizeClasses[size], className), onClick: handleClick, ...props, children: [_jsx("span", { className: "relative z-[1]", children: children }), ripples.map((ripple) => (_jsx("span", { "aria-hidden": "true", className: "pointer-events-none absolute h-full w-full animate-ripple-press motion-reduce:hidden", style: {
|
|
42
|
+
left: ripple.x,
|
|
43
|
+
top: ripple.y,
|
|
44
|
+
background: `radial-gradient(circle, ${rippleColor} 10%, transparent 70%)`,
|
|
45
|
+
} }, ripple.id)))] }));
|
|
46
|
+
});
|
|
47
|
+
RippleButton.displayName = "RippleButton";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const rippleVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "glass" | "accent" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface RippleProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof rippleVariants> {
|
|
7
|
+
count?: number;
|
|
8
|
+
duration?: number;
|
|
9
|
+
delay?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const Ripple: React.ForwardRefExoticComponent<RippleProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=ripple.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ripple.d.ts","sourceRoot":"","sources":["../../src/components/ripple.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,cAAc;;8EAYlB,CAAA;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,MAAM,oFAkClB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../lib/cn";
|
|
5
|
+
const rippleVariants = cva("absolute rounded-full", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "border border-neutral-300/50 dark:border-neutral-600/50",
|
|
9
|
+
glass: "border border-white/20 [border-top-color:var(--glass-refraction-top)] dark:border-white/10",
|
|
10
|
+
accent: "border border-[var(--color-accent)]/30 dark:border-[var(--color-accent)]/20"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: "default"
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export const Ripple = React.forwardRef(({ className, variant, count = 3, duration = 2, delay = 0.4, style, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("pointer-events-none absolute inset-0 flex items-center justify-center overflow-hidden", className), ...props, children: Array.from({ length: count }).map((_, i) => (_jsx("div", { className: cn(rippleVariants({ variant }), "motion-safe:animate-[ripple-expand_var(--ripple-duration,2s)_ease-out_infinite]", "motion-reduce:hidden"), style: {
|
|
18
|
+
"--ripple-duration": `${duration}s`,
|
|
19
|
+
width: `${60 + i * 40}%`,
|
|
20
|
+
height: `${60 + i * 40}%`,
|
|
21
|
+
animationDelay: `${i * delay}s`,
|
|
22
|
+
...style,
|
|
23
|
+
} }, i))) })));
|
|
24
|
+
Ripple.displayName = "Ripple";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
export type SelectOption = {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const selectVariants: (props?: ({
|
|
9
|
+
variant?: "default" | "glass" | "frosted" | "outline" | "ghost" | "matte" | "liquid" | null | undefined;
|
|
10
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export type SelectProps = Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "size"> & VariantProps<typeof selectVariants> & {
|
|
13
|
+
options: SelectOption[];
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const Select: React.ForwardRefExoticComponent<Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "size"> & VariantProps<(props?: ({
|
|
17
|
+
variant?: "default" | "glass" | "frosted" | "outline" | "ghost" | "matte" | "liquid" | null | undefined;
|
|
18
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
19
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
20
|
+
options: SelectOption[];
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
} & React.RefAttributes<HTMLSelectElement>>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,QAAA,MAAM,cAAc;;;8EA+BnB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,GACnF,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAEH,eAAO,MAAM,MAAM;;;;aAJN,YAAY,EAAE;kBACT,MAAM;2CA2BvB,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../lib/cn";
|
|
5
|
+
const selectVariants = cva("w-full border font-medium text-[var(--color-foreground)] transition-[background-color,border-color,box-shadow,color] duration-normal ease-standard focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-60 motion-reduce:transition-none dark:[color-scheme:dark]", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "rounded-xl border-[var(--color-border)] bg-[var(--color-surface)] shadow-sm focus-visible:border-[var(--color-accent)]/60 focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]/28 focus-visible:ring-offset-1 hover:border-[var(--color-border)]/80 dark:border-white/10 dark:bg-white/[0.04] dark:focus-visible:ring-[var(--color-accent)]/20",
|
|
9
|
+
glass: "rounded-xl border-white/24 [border-top-color:var(--glass-refraction-top)] bg-[radial-gradient(circle_at_18%_14%,rgb(255_255_255_/_0.86),transparent_44%),linear-gradient(158deg,rgb(255_255_255_/_0.7),rgb(243_247_250_/_0.46))] backdrop-blur-md backdrop-saturate-[180%] shadow-[0_0_0_1px_rgb(255_255_255_/_0.2)_inset,0_8px_18px_-14px_rgb(15_23_42_/_0.24)] focus-visible:border-white/34 focus-visible:[border-top-color:rgb(255_255_255_/_0.82)] focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]/22 focus-visible:ring-offset-0 hover:border-white/32 dark:border-white/[0.1] dark:bg-white/[0.05] dark:focus-visible:border-white/20 dark:focus-visible:ring-white/15",
|
|
10
|
+
frosted: "rounded-xl border-white/30 [border-top-color:var(--glass-refraction-top)] bg-[radial-gradient(circle_at_18%_14%,rgb(255_255_255_/_0.92),transparent_44%),linear-gradient(158deg,rgb(255_255_255_/_0.85),rgb(243_247_250_/_0.65))] backdrop-blur-[40px] backdrop-saturate-[200%] shadow-[0_0_0_1px_rgb(255_255_255_/_0.25)_inset,0_0_16px_rgb(255_255_255_/_0.1)_inset,0_8px_18px_-14px_rgb(15_23_42_/_0.28)] focus-visible:border-white/40 focus-visible:[border-top-color:rgb(255_255_255_/_0.88)] focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]/24 focus-visible:ring-offset-0 hover:border-white/36 dark:border-white/[0.14] dark:bg-white/[0.08] dark:focus-visible:border-white/24 dark:focus-visible:ring-white/18",
|
|
11
|
+
liquid: "rounded-xl border-white/24 [border-top-color:var(--glass-refraction-top)] bg-[radial-gradient(circle_at_18%_12%,rgb(255_255_255_/_0.92),transparent_42%),radial-gradient(circle_at_84%_88%,rgb(226_232_240_/_0.58),transparent_58%),linear-gradient(145deg,rgb(255_255_255_/_0.82),rgb(235_241_246_/_0.55))] backdrop-blur-xl backdrop-saturate-[180%] shadow-[0_0_0_1px_rgb(255_255_255_/_0.24)_inset,0_10px_20px_-14px_rgb(15_23_42_/_0.26)] focus-visible:border-white/36 focus-visible:[border-top-color:rgb(255_255_255_/_0.88)] focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]/24 focus-visible:ring-offset-0 hover:border-white/34 dark:border-white/[0.12] dark:bg-[linear-gradient(145deg,rgb(255_255_255_/_0.13),rgb(255_255_255_/_0.05))] dark:focus-visible:border-white/[0.24] dark:focus-visible:ring-white/16",
|
|
12
|
+
matte: "rounded-xl border-black/12 bg-[linear-gradient(180deg,rgb(249_250_251),rgb(237_239_242))] shadow-[0_1px_0_rgb(255_255_255_/_0.88)_inset,0_6px_14px_-12px_rgb(15_23_42_/_0.24)] focus-visible:border-black/25 focus-visible:ring-2 focus-visible:ring-black/12 focus-visible:ring-offset-0 hover:border-black/16 dark:border-white/[0.14] dark:bg-[linear-gradient(180deg,rgb(49_54_63_/_0.92),rgb(34_38_46_/_0.92))] dark:focus-visible:border-white/[0.28] dark:focus-visible:ring-white/14",
|
|
13
|
+
outline: "rounded-xl border-[var(--color-border)] bg-transparent shadow-sm focus-visible:border-[var(--color-accent)]/70 focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]/25 focus-visible:ring-offset-1 hover:border-[var(--color-foreground)]/20 dark:border-white/15 dark:focus-visible:border-[var(--color-accent)]/50",
|
|
14
|
+
ghost: "rounded-xl border-transparent bg-transparent focus-visible:border-white/10 focus-visible:bg-[var(--glass-1-surface)] focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]/20 focus-visible:ring-offset-0 hover:border-white/10 hover:bg-[var(--glass-1-surface)] dark:hover:bg-white/[0.06] dark:focus-visible:bg-white/[0.06]"
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
sm: "h-8 px-3 text-xs",
|
|
18
|
+
md: "h-10 px-3.5 text-sm",
|
|
19
|
+
lg: "h-12 px-4 text-base"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default",
|
|
24
|
+
size: "md"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export const Select = React.forwardRef(({ className, options, placeholder, variant, size, ...props }, ref) => {
|
|
28
|
+
return (_jsxs("select", { ref: ref, className: cn(selectVariants({ variant, size }), className), ...props, children: [placeholder ? (_jsx("option", { value: "", disabled: true, children: placeholder })) : null, options.map((option) => (_jsx("option", { value: option.value, disabled: option.disabled, children: option.label }, option.value)))] }));
|
|
29
|
+
});
|
|
30
|
+
Select.displayName = "Select";
|