@goopti/ui 1.0.2 → 1.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/alert-dialog.d.ts +14 -0
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +25 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/avatar.d.ts +8 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +10 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +10 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +22 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.d.ts +11 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +30 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +8 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +50 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/card.d.ts +21 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +17 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/carousel.d.ts +10 -0
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +12 -0
- package/dist/components/carousel.js.map +1 -0
- package/dist/components/checkbox.d.ts +8 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +8 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.d.ts +9 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +11 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/date-picker.d.ts +9 -0
- package/dist/components/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker.js +29 -0
- package/dist/components/date-picker.js.map +1 -0
- package/dist/components/dialog.d.ts +20 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +29 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +15 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +26 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/hover-card.d.ts +8 -0
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +10 -0
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/icon.d.ts +8 -0
- package/dist/components/icon.d.ts.map +1 -0
- package/dist/components/icon.js +11 -0
- package/dist/components/icon.js.map +1 -0
- package/dist/components/input-otp.d.ts +9 -0
- package/dist/components/input-otp.d.ts.map +1 -0
- package/dist/components/input-otp.js +22 -0
- package/dist/components/input-otp.js.map +1 -0
- package/dist/components/input.d.ts +6 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +7 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +7 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/popover.d.ts +9 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +21 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +7 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +7 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-group.d.ts +12 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +7 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +7 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +13 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +26 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +7 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +7 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sheet.d.ts +10 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +20 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/skeleton.d.ts +6 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +7 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +11 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +31 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/switch.d.ts +8 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +7 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +7 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/toast.d.ts +19 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +25 -0
- package/dist/components/toast.js.map +1 -0
- package/dist/components/tooltip.d.ts +9 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +16 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/hooks/use-toast.d.ts +4 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +9 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/theme.css +140 -0
- package/package.json +1 -1
- package/dist/assets/index-gWZidFXq.js +0 -203
- package/dist/assets/index-p3H2VfDS.css +0 -1
- package/dist/assets/logo-opti-D621QI7V.png +0 -0
- package/dist/index.html +0 -15
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/components/hover-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IAC3E,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,SAAS,wFAwBd,CAAC;AAGF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const HoverCard = React.forwardRef(({ trigger, children, className, ...props }, ref) => {
|
|
5
|
+
const [show, setShow] = React.useState(false);
|
|
6
|
+
return (_jsxs("span", { ref: ref, className: "relative inline-flex", onMouseEnter: () => setShow(true), onMouseLeave: () => setShow(false), ...props, children: [trigger, show && (_jsx("div", { className: cn("animate-pop absolute left-0 top-full z-50 mt-2 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md", className), children: children }))] }));
|
|
7
|
+
});
|
|
8
|
+
HoverCard.displayName = "HoverCard";
|
|
9
|
+
export { HoverCard };
|
|
10
|
+
//# sourceMappingURL=hover-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-card.js","sourceRoot":"","sources":["../../src/components/hover-card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAOlC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAClD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,OAAO,CACL,gBACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAC,sBAAsB,EAChC,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EACjC,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAC9B,KAAK,aAER,OAAO,EACP,IAAI,IAAI,CACP,cAAK,SAAS,EAAE,EAAE,CAChB,wHAAwH,EACxH,SAAS,CACV,YACE,QAAQ,GACL,CACP,IACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface IconProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
name: string;
|
|
4
|
+
size?: number;
|
|
5
|
+
}
|
|
6
|
+
declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<HTMLElement>>;
|
|
7
|
+
export { Icon };
|
|
8
|
+
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/components/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,IAAI,+EAeT,CAAC;AAGF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
const Icon = React.forwardRef(({ name, size = 16, className = "", ...props }, ref) => (_jsx("i", { ref: ref, "data-lucide": name, className: className, style: {
|
|
4
|
+
width: size,
|
|
5
|
+
height: size,
|
|
6
|
+
display: "inline-flex",
|
|
7
|
+
flex: "none",
|
|
8
|
+
}, ...props })));
|
|
9
|
+
Icon.displayName = "Icon";
|
|
10
|
+
export { Icon };
|
|
11
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/components/icon.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAC3B,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACtD,YACE,GAAG,EAAE,GAAU,iBACF,IAAI,EACjB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,aAAa;QACtB,IAAI,EAAE,MAAM;KACb,KACG,KAAK,GACT,CACH,CACF,CAAC;AACF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface InputOTPProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
3
|
+
length?: number;
|
|
4
|
+
value?: string;
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const InputOTP: React.ForwardRefExoticComponent<InputOTPProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { InputOTP };
|
|
9
|
+
//# sourceMappingURL=input-otp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../src/components/input-otp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC3F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,QAAA,MAAM,QAAQ,sFA2Cb,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const InputOTP = React.forwardRef(({ length = 6, value = "", onChange, className, ...props }, ref) => {
|
|
5
|
+
const refs = React.useRef([]);
|
|
6
|
+
const chars = value.padEnd(length, " ").slice(0, length).split("");
|
|
7
|
+
const setChar = (i, ch) => {
|
|
8
|
+
const arr = value.padEnd(length, " ").split("");
|
|
9
|
+
arr[i] = ch || " ";
|
|
10
|
+
onChange?.(arr.join("").trimEnd());
|
|
11
|
+
if (ch && i < length - 1)
|
|
12
|
+
refs.current[i + 1]?.focus();
|
|
13
|
+
};
|
|
14
|
+
return (_jsx("div", { ref: ref, className: cn("flex items-center gap-2", className), ...props, children: chars.map((c, i) => (_jsxs(React.Fragment, { children: [_jsx("input", { ref: (el) => (refs.current[i] = el), inputMode: "numeric", maxLength: 1, value: c.trim(), onChange: (e) => setChar(i, e.target.value.replace(/[^0-9]/g, "")), onKeyDown: (e) => {
|
|
15
|
+
if (e.key === "Backspace" && !c.trim() && i > 0) {
|
|
16
|
+
refs.current[i - 1]?.focus();
|
|
17
|
+
}
|
|
18
|
+
}, className: "h-12 w-11 rounded-md border border-input bg-background text-center text-lg font-semibold text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-ring" }), i === Math.floor(length / 2) - 1 && length % 2 === 0 && (_jsx("span", { className: "text-muted-foreground", children: "-" }))] }, i))) }));
|
|
19
|
+
});
|
|
20
|
+
InputOTP.displayName = "InputOTP";
|
|
21
|
+
export { InputOTP };
|
|
22
|
+
//# sourceMappingURL=input-otp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-otp.js","sourceRoot":"","sources":["../../src/components/input-otp.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAQlC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACjE,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAA8B,EAAE,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAEnE,MAAM,OAAO,GAAG,CAAC,CAAS,EAAE,EAAU,EAAE,EAAE;QACxC,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAChD,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,GAAG,CAAC;QACnB,QAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;QACnC,IAA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AC;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
}
|
|
4
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
+
export { Input };
|
|
6
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;CAAG;AAExD,QAAA,MAAM,KAAK,qFAYV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const Input = React.forwardRef(({ className, type, ...props }, ref) => (_jsx("input", { type: type, className: cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50", className), ref: ref, ...props })));
|
|
5
|
+
Input.displayName = "Input";
|
|
6
|
+
export { Input };
|
|
7
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAKlC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACtC,gBACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CACX,uSAAuS,EACvS,SAAS,CACV,EACD,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CACF,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
3
|
+
}
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export { Label };
|
|
6
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;CAAG;AAElF,QAAA,MAAM,KAAK,qFAWV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx("label", { ref: ref, className: cn("text-sm font-medium leading-none text-foreground peer-disabled:opacity-70", className), ...props })));
|
|
5
|
+
Label.displayName = "Label";
|
|
6
|
+
export { Label };
|
|
7
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAIlC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,gBACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,2EAA2E,EAC3E,SAAS,CACV,KACG,KAAK,GACT,CACH,CACF,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface PopoverProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
trigger: React.ReactNode;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
align?: "start" | "end";
|
|
6
|
+
}
|
|
7
|
+
declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { Popover };
|
|
9
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACxE,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;CACzB;AAED,QAAA,MAAM,OAAO,qFAqCZ,CAAC;AAGF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const Popover = React.forwardRef(({ trigger, children, align = "start", className, ...props }, ref) => {
|
|
5
|
+
const [open, setOpen] = React.useState(false);
|
|
6
|
+
const containerRef = React.useRef(null);
|
|
7
|
+
React.useEffect(() => {
|
|
8
|
+
const fn = (e) => {
|
|
9
|
+
if (containerRef.current &&
|
|
10
|
+
!containerRef.current.contains(e.target)) {
|
|
11
|
+
setOpen(false);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
document.addEventListener("mousedown", fn);
|
|
15
|
+
return () => document.removeEventListener("mousedown", fn);
|
|
16
|
+
}, []);
|
|
17
|
+
return (_jsxs("div", { ref: containerRef, className: "relative inline-block", children: [_jsx("span", { onClick: () => setOpen(!open), children: trigger }), open && (_jsx("div", { ref: ref, className: cn("animate-pop absolute z-50 mt-2 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md", align === "end" ? "right-0" : "left-0", className), ...props, children: children }))] }));
|
|
18
|
+
});
|
|
19
|
+
Popover.displayName = "Popover";
|
|
20
|
+
export { Popover };
|
|
21
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AASlC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAC9B,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,GAAG,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACnE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAExD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,EAAE,GAAG,CAAC,CAAa,EAAE,EAAE;YAC3B,IACE,YAAY,CAAC,OAAO;gBACpB,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAc,CAAC,EAChD,CAAC;gBACD,OAAO,CAAC,KAAK,CAAC,CAAC;YACjB,CAAC;QACH,CAAC,CAAC;QACF,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAC3C,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC7D,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,eAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAC,uBAAuB,aACvD,eAAM,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,YAAG,OAAO,GAAQ,EACpD,IAAI,IAAI,CACP,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,wGAAwG,EACxG,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EACtC,SAAS,CACV,KACG,KAAK,YAER,QAAQ,GACL,CACP,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
value?: number;
|
|
4
|
+
}
|
|
5
|
+
declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { Progress };
|
|
7
|
+
//# 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,CAAC;AAG/B,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,QAAQ,sFAgBb,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const Progress = React.forwardRef(({ className, value = 0, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("relative h-2.5 w-full overflow-hidden rounded-full bg-secondary", className), ...props, children: _jsx("div", { className: "h-full rounded-full bg-primary transition-all duration-500", style: { width: `${value}%` } }) })));
|
|
5
|
+
Progress.displayName = "Progress";
|
|
6
|
+
export { Progress };
|
|
7
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/components/progress.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAMlC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3C,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,iEAAiE,EACjE,SAAS,CACV,KACG,KAAK,YAET,cACE,SAAS,EAAC,4DAA4D,EACtE,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,EAAE,GACxB,GACH,CACP,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
options: Array<{
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { RadioGroup };
|
|
12
|
+
//# 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,CAAC;AAI/B,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClD;AAED,QAAA,MAAM,UAAU,wFA+Bf,CAAC;AAGF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const RadioGroup = React.forwardRef(({ className, value, onChange, options, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("grid gap-3", className), role: "radiogroup", ...props, children: options.map((o) => (_jsxs("label", { className: "flex items-center gap-3 cursor-pointer text-sm text-foreground", children: [_jsx("button", { role: "radio", "aria-checked": value === o.value, onClick: () => onChange?.(o.value), className: cn("h-5 w-5 rounded-full border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring flex items-center justify-center transition-colors", value === o.value ? "border-primary" : "border-input"), children: value === o.value && (_jsx("span", { className: "h-2.5 w-2.5 rounded-full bg-primary" })) }), o.label] }, o.value))) })));
|
|
5
|
+
RadioGroup.displayName = "RadioGroup";
|
|
6
|
+
export { RadioGroup };
|
|
7
|
+
//# sourceMappingURL=radio-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AASlC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC1D,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,EACtC,IAAI,EAAC,YAAY,KACb,KAAK,YAER,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAClB,iBAEE,SAAS,EAAC,gEAAgE,aAE1E,iBACE,IAAI,EAAC,OAAO,kBACE,KAAK,KAAK,CAAC,CAAC,KAAK,EAC/B,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAClC,SAAS,EAAE,EAAE,CACX,+KAA+K,EAC/K,KAAK,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,cAAc,CACtD,YAEA,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CACpB,eAAM,SAAS,EAAC,qCAAqC,GAAQ,CAC9D,GACM,EACR,CAAC,CAAC,KAAK,KAhBH,CAAC,CAAC,KAAK,CAiBN,CACT,CAAC,GACE,CACP,CACF,CAAC;AACF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ScrollAreaProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { ScrollArea };
|
|
7
|
+
//# sourceMappingURL=scroll-area.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../src/components/scroll-area.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,UAAU,wFAaf,CAAC;AAGF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("opti-scroll overflow-y-auto rounded-md border", className), ...props, children: children })));
|
|
5
|
+
ScrollArea.displayName = "ScrollArea";
|
|
6
|
+
export { ScrollArea };
|
|
7
|
+
//# sourceMappingURL=scroll-area.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area.js","sourceRoot":"","sources":["../../src/components/scroll-area.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAOlC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC1C,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,+CAA+C,EAC/C,SAAS,CACV,KACG,KAAK,YAER,QAAQ,GACL,CACP,CACF,CAAC;AACF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
options: Array<{
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}>;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export { Select };
|
|
13
|
+
//# 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,CAAC;AAI/B,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,MAAM,oFA6DX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
import { Icon } from "./icon";
|
|
5
|
+
const Select = React.forwardRef(({ className, value, onChange, options, placeholder = "Selecione…", ...props }, ref) => {
|
|
6
|
+
const [open, setOpen] = React.useState(false);
|
|
7
|
+
const containerRef = React.useRef(null);
|
|
8
|
+
React.useEffect(() => {
|
|
9
|
+
const fn = (e) => {
|
|
10
|
+
if (containerRef.current &&
|
|
11
|
+
!containerRef.current.contains(e.target)) {
|
|
12
|
+
setOpen(false);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
document.addEventListener("mousedown", fn);
|
|
16
|
+
return () => document.removeEventListener("mousedown", fn);
|
|
17
|
+
}, []);
|
|
18
|
+
const sel = options.find((o) => o.value === value);
|
|
19
|
+
return (_jsxs("div", { ref: containerRef, className: cn("relative", className), ...props, children: [_jsxs("button", { onClick: () => setOpen(!open), className: "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [_jsx("span", { className: sel ? "text-foreground" : "text-muted-foreground", children: sel ? sel.label : placeholder }), _jsx(Icon, { name: "chevron-down", size: 16, className: "opacity-60" })] }), open && (_jsx("div", { className: "animate-pop absolute z-50 mt-1.5 w-full overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", children: options.map((o) => (_jsxs("button", { onClick: () => {
|
|
20
|
+
onChange?.(o.value);
|
|
21
|
+
setOpen(false);
|
|
22
|
+
}, className: cn("flex w-full items-center justify-between rounded-[6px] px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground", value === o.value && "bg-accent/60"), children: [o.label, value === o.value && _jsx(Icon, { name: "check", size: 15 })] }, o.value))) }))] }));
|
|
23
|
+
});
|
|
24
|
+
Select.displayName = "Select";
|
|
25
|
+
export { Select };
|
|
26
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAS9B,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,CACE,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,GAAG,YAAY,EAAE,GAAG,KAAK,EAAE,EAC7E,GAAG,EACH,EAAE;IACF,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAExD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,EAAE,GAAG,CAAC,CAAa,EAAE,EAAE;YAC3B,IACE,YAAY,CAAC,OAAO;gBACpB,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,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AC,KAAK,EACP,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,EAAE,GAAI,KAXhD,CAAC,CAAC,KAAK,CAYL,CACV,CAAC,GACE,CACP,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
orientation?: "horizontal" | "vertical";
|
|
4
|
+
}
|
|
5
|
+
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { Separator };
|
|
7
|
+
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC;AAED,QAAA,MAAM,SAAS,uFAYd,CAAC;AAGF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const Separator = React.forwardRef(({ className, orientation = "horizontal", ...props }, ref) => (_jsx("div", { ref: ref, className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-px w-full" : "h-full w-px", className), ...props })));
|
|
5
|
+
Separator.displayName = "Separator";
|
|
6
|
+
export { Separator };
|
|
7
|
+
//# sourceMappingURL=separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.js","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAMlC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CAAC,EAAE,SAAS,EAAE,WAAW,GAAG,YAAY,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5D,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,oBAAoB,EACpB,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,EAC5D,SAAS,CACV,KACG,KAAK,GACT,CACH,CACF,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const Sheet: React.ForwardRefExoticComponent<SheetProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export { Sheet };
|
|
10
|
+
//# sourceMappingURL=sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/components/sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,KAAK,mFA8CV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Icon } from "./icon";
|
|
4
|
+
const Sheet = React.forwardRef(({ open = false, onClose, title, description, children, ...props }, ref) => {
|
|
5
|
+
React.useEffect(() => {
|
|
6
|
+
const onKey = (e) => {
|
|
7
|
+
if (e.key === "Escape")
|
|
8
|
+
onClose?.();
|
|
9
|
+
};
|
|
10
|
+
if (open)
|
|
11
|
+
document.addEventListener("keydown", onKey);
|
|
12
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
13
|
+
}, [open, onClose]);
|
|
14
|
+
if (!open)
|
|
15
|
+
return null;
|
|
16
|
+
return (_jsxs("div", { className: "fixed inset-0 z-50", children: [_jsx("div", { className: "animate-overlay absolute inset-0 bg-black/50 backdrop-blur-[2px]", onClick: onClose }), _jsxs("div", { ref: ref, className: "animate-sheet absolute right-0 top-0 h-full w-full max-w-sm border-l bg-card p-6 shadow-lg flex flex-col", ...props, children: [_jsxs("div", { className: "mb-4", children: [title && (_jsx("h2", { className: "font-display text-lg font-semibold text-foreground", children: title })), description && (_jsx("p", { className: "text-sm text-muted-foreground mt-1", children: description }))] }), _jsx("div", { className: "flex-1 overflow-y-auto opti-scroll -mr-2 pr-2", children: children }), _jsx("button", { onClick: onClose, className: "absolute right-4 top-4 rounded-md p-1 text-muted-foreground opacity-70 hover:opacity-100", children: _jsx(Icon, { name: "x", size: 18 }) })] })] }));
|
|
17
|
+
});
|
|
18
|
+
Sheet.displayName = "Sheet";
|
|
19
|
+
export { Sheet };
|
|
20
|
+
//# sourceMappingURL=sheet.js.map
|
|
@@ -0,0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,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,0FAA0F,YAEpG,KAAC,IAAI,IAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAE,EAAE,GAAI,GACpB,IACL,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
}
|
|
4
|
+
declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { Skeleton };
|
|
6
|
+
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/components/skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE9E,QAAA,MAAM,QAAQ,sFAQb,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const Skeleton = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("animate-skeleton rounded-md bg-muted", className), ...props })));
|
|
5
|
+
Skeleton.displayName = "Skeleton";
|
|
6
|
+
export { Skeleton };
|
|
7
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../src/components/skeleton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAIlC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,sCAAsC,EAAE,SAAS,CAAC,KAC5D,KAAK,GACT,CACH,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SliderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
3
|
+
value?: number;
|
|
4
|
+
onChange?: (value: number) => void;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export { Slider };
|
|
11
|
+
//# sourceMappingURL=slider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,MAAM,oFAoDX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const Slider = React.forwardRef(({ className, value = 50, onChange, min = 0, max = 100, step = 1, ...props }, ref) => {
|
|
5
|
+
const containerRef = React.useRef(null);
|
|
6
|
+
const pct = ((value - min) / (max - min)) * 100;
|
|
7
|
+
const set = (clientX) => {
|
|
8
|
+
if (!containerRef.current)
|
|
9
|
+
return;
|
|
10
|
+
const r = containerRef.current.getBoundingClientRect();
|
|
11
|
+
let p = (clientX - r.left) / r.width;
|
|
12
|
+
p = Math.max(0, Math.min(1, p));
|
|
13
|
+
let v = min + p * (max - min);
|
|
14
|
+
v = Math.round(v / step) * step;
|
|
15
|
+
onChange?.(Math.max(min, Math.min(max, v)));
|
|
16
|
+
};
|
|
17
|
+
const down = (e) => {
|
|
18
|
+
set(e.clientX);
|
|
19
|
+
const move = (ev) => set(ev.clientX);
|
|
20
|
+
const up = () => {
|
|
21
|
+
window.removeEventListener("pointermove", move);
|
|
22
|
+
window.removeEventListener("pointerup", up);
|
|
23
|
+
};
|
|
24
|
+
window.addEventListener("pointermove", move);
|
|
25
|
+
window.addEventListener("pointerup", up);
|
|
26
|
+
};
|
|
27
|
+
return (_jsxs("div", { ref: containerRef, onPointerDown: down, className: cn("relative flex h-5 w-full cursor-pointer touch-none items-center select-none", className), ...props, children: [_jsx("div", { className: "relative h-2 w-full rounded-full bg-secondary", children: _jsx("div", { className: "absolute h-full rounded-full bg-primary", style: { width: `${pct}%` } }) }), _jsx("span", { className: "absolute h-5 w-5 rounded-full border-2 border-primary bg-background shadow ring-offset-background", style: { left: `calc(${pct}% - 10px)` } })] }));
|
|
28
|
+
});
|
|
29
|
+
Slider.displayName = "Slider";
|
|
30
|
+
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
|
+
checked?: boolean;
|
|
4
|
+
onChange?: (checked: boolean) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export { Switch };
|
|
8
|
+
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC5F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC;AAED,QAAA,MAAM,MAAM,uFAsBX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const Switch = React.forwardRef(({ className, checked = false, onChange, ...props }, ref) => (_jsx("button", { ref: ref, role: "switch", "aria-checked": checked, onClick: () => onChange?.(!checked), className: cn("inline-flex h-6 w-11 shrink-0 items-center rounded-full border-2 border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background", checked ? "bg-primary" : "bg-input", className), ...props, children: _jsx("span", { className: cn("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg transition-transform", checked ? "translate-x-5" : "translate-x-0") }) })));
|
|
5
|
+
Switch.displayName = "Switch";
|
|
6
|
+
export { Switch };
|
|
7
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAOlC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3D,iBACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,kBACC,OAAO,EACrB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,EACnC,SAAS,EAAE,EAAE,CACX,gNAAgN,EAChN,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,EACnC,SAAS,CACV,KACG,KAAK,YAET,eACE,SAAS,EAAE,EAAE,CACX,6FAA6F,EAC7F,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAC5C,GACK,GACD,CACV,CACF,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
}
|
|
4
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
5
|
+
export { Textarea };
|
|
6
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/components/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC;CAAG;AAE9D,QAAA,MAAM,QAAQ,2FAWb,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const Textarea = React.forwardRef(({ className, ...props }, ref) => (_jsx("textarea", { className: cn("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-ring disabled:opacity-50", className), ref: ref, ...props })));
|
|
5
|
+
Textarea.displayName = "Textarea";
|
|
6
|
+
export { Textarea };
|
|
7
|
+
//# sourceMappingURL=textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../src/components/textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAKlC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,mBACE,SAAS,EAAE,EAAE,CACX,iQAAiQ,EACjQ,SAAS,CACV,EACD,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface Toast {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
variant?: "success" | "destructive" | "info";
|
|
7
|
+
duration?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ToastContextType {
|
|
10
|
+
push: (toast: Omit<Toast, "id">) => void;
|
|
11
|
+
toasts: Toast[];
|
|
12
|
+
}
|
|
13
|
+
export interface ToastProviderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const ToastProvider: React.ForwardRefExoticComponent<ToastProviderProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export declare const useToast: () => ToastContextType;
|
|
18
|
+
export { ToastProvider };
|
|
19
|
+
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../src/components/toast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,MAAM,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC;IACzC,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB;AAID,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC9E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,aAAa,2FAsElB,CAAC;AAGF,eAAO,MAAM,QAAQ,wBAMpB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
import { Icon } from "./icon";
|
|
5
|
+
const ToastContext = createContext(null);
|
|
6
|
+
const ToastProvider = React.forwardRef(({ children, ...props }, ref) => {
|
|
7
|
+
const [toasts, setToasts] = React.useState([]);
|
|
8
|
+
const push = (t) => {
|
|
9
|
+
const id = Math.random().toString(36).slice(2);
|
|
10
|
+
const toast = { id, ...t };
|
|
11
|
+
setToasts((ts) => [...ts, toast]);
|
|
12
|
+
setTimeout(() => setToasts((ts) => ts.filter((x) => x.id !== id)), t.duration || 4000);
|
|
13
|
+
};
|
|
14
|
+
return (_jsxs(ToastContext.Provider, { value: { push, toasts }, children: [_jsx("div", { ref: ref, ...props, children: children }), _jsx("div", { className: "fixed bottom-0 right-0 z-[100] flex w-full max-w-sm flex-col gap-2 p-4", children: toasts.map((t) => (_jsxs("div", { className: "animate-toast flex items-start gap-3 rounded-lg border bg-card p-4 shadow-lg", children: [t.variant === "success" && (_jsx(Icon, { name: "check-circle-2", size: 18, className: "mt-0.5 text-success" })), t.variant === "destructive" && (_jsx(Icon, { name: "alert-circle", size: 18, className: "mt-0.5 text-destructive" })), t.variant === "info" && (_jsx(Icon, { name: "info", size: 18, className: "mt-0.5 text-info" })), _jsxs("div", { className: "flex-1", children: [_jsx("div", { className: "text-sm font-semibold text-foreground", children: t.title }), t.description && (_jsx("div", { className: "text-sm text-muted-foreground mt-0.5", children: t.description }))] }), _jsx("button", { onClick: () => setToasts((ts) => ts.filter((x) => x.id !== t.id)), className: "text-muted-foreground hover:text-foreground", children: _jsx(Icon, { name: "x", size: 15 }) })] }, t.id))) })] }));
|
|
15
|
+
});
|
|
16
|
+
ToastProvider.displayName = "ToastProvider";
|
|
17
|
+
export const useToast = () => {
|
|
18
|
+
const ctx = useContext(ToastContext);
|
|
19
|
+
if (!ctx) {
|
|
20
|
+
throw new Error("useToast must be used within ToastProvider");
|
|
21
|
+
}
|
|
22
|
+
return ctx;
|
|
23
|
+
};
|
|
24
|
+
export { ToastProvider };
|
|
25
|
+
//# sourceMappingURL=toast.js.map
|