@almach/ui 0.1.0 → 0.1.2
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/.tsbuildinfo +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/button.js +2 -2
- package/dist/components/button.js.map +1 -1
- package/dist/components/card.d.ts +25 -1
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +10 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/chart.d.ts +131 -0
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +80 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/collapsible.js +1 -1
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/label.js.map +1 -1
- package/dist/components/popover.d.ts +9 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +23 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/select.js +1 -1
- package/dist/components/select.js.map +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/toast.d.ts +2 -18
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/toast.js +1 -50
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toaster.d.ts.map +1 -1
- package/dist/components/toaster.js +16 -7
- package/dist/components/toaster.js.map +1 -1
- package/dist/hooks/use-toast.d.ts +3 -42
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/use-toast.js +4 -99
- package/dist/hooks/use-toast.js.map +1 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/package.json +10 -2
- package/src/styles/globals.css +16 -2
- package/dist/components/group.d.ts +0 -26
- package/dist/components/group.d.ts.map +0 -1
- package/dist/components/group.js +0 -13
- package/dist/components/group.js.map +0 -1
package/dist/components/toast.js
CHANGED
|
@@ -1,51 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
|
-
import { CircleCheck, CircleX, Info, X } from "lucide-react";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import { cn } from "@almach/utils";
|
|
7
|
-
/* ── Provider & Viewport ──────────────────────────────────────────────────── */
|
|
8
|
-
const ToastProvider = ToastPrimitives.Provider;
|
|
9
|
-
const ToastViewport = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Viewport, { ref: ref, className: cn("fixed bottom-4 right-4 z-[100] flex max-h-screen w-full max-w-sm flex-col gap-2 p-1", className), ...props })));
|
|
10
|
-
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
11
|
-
const toastVariants = cva([
|
|
12
|
-
"group pointer-events-auto relative flex w-full items-start gap-3",
|
|
13
|
-
"overflow-hidden rounded-2xl border bg-background p-4 shadow-lg",
|
|
14
|
-
"transition-all",
|
|
15
|
-
// enter
|
|
16
|
-
"data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom-4 data-[state=open]:fade-in-0",
|
|
17
|
-
// exit
|
|
18
|
-
"data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right-full data-[state=closed]:fade-out-80",
|
|
19
|
-
// swipe
|
|
20
|
-
"data-[swipe=cancel]:translate-x-0 data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]",
|
|
21
|
-
"data-[swipe=move]:transition-none data-[swipe=end]:animate-out data-[swipe=end]:slide-out-to-right-full",
|
|
22
|
-
], {
|
|
23
|
-
variants: {
|
|
24
|
-
variant: {
|
|
25
|
-
default: "border-border",
|
|
26
|
-
destructive: "border-destructive/20 bg-destructive/[0.03]",
|
|
27
|
-
success: "border-success/20 bg-success/[0.03]",
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
defaultVariants: { variant: "default" },
|
|
31
|
-
});
|
|
32
|
-
const iconMap = {
|
|
33
|
-
default: _jsx(Info, { className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
34
|
-
destructive: _jsx(CircleX, { className: "mt-0.5 h-4 w-4 shrink-0 text-destructive" }),
|
|
35
|
-
success: _jsx(CircleCheck, { className: "mt-0.5 h-4 w-4 shrink-0 text-success" }),
|
|
36
|
-
};
|
|
37
|
-
const Toast = React.forwardRef(({ className, variant = "default", children, ...props }, ref) => (_jsxs(ToastPrimitives.Root, { ref: ref, className: cn(toastVariants({ variant }), className), ...props, children: [iconMap[variant ?? "default"], _jsx("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: children })] })));
|
|
38
|
-
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
39
|
-
/* ── Action ───────────────────────────────────────────────────────────────── */
|
|
40
|
-
const ToastAction = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Action, { ref: ref, className: cn("mt-1 inline-flex h-7 shrink-0 items-center justify-center rounded-md border px-3 text-xs font-medium", "transition-colors hover:bg-secondary", "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50", className), ...props })));
|
|
41
|
-
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
42
|
-
/* ── Close ────────────────────────────────────────────────────────────────── */
|
|
43
|
-
const ToastClose = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Close, { ref: ref, className: cn("absolute right-2.5 top-2.5 flex h-6 w-6 items-center justify-center rounded-lg", "text-muted-foreground/40 transition-colors", "hover:text-foreground hover:bg-muted", "focus:outline-none focus:ring-2 focus:ring-ring", "opacity-0 group-hover:opacity-100", className), "toast-close": "", "aria-label": "Dismiss", ...props, children: _jsx(X, { className: "h-3 w-3" }) })));
|
|
44
|
-
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
45
|
-
/* ── Title & Description ──────────────────────────────────────────────────── */
|
|
46
|
-
const ToastTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Title, { ref: ref, className: cn("text-sm font-semibold leading-tight", className), ...props })));
|
|
47
|
-
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
48
|
-
const ToastDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Description, { ref: ref, className: cn("text-sm text-muted-foreground leading-snug", className), ...props })));
|
|
49
|
-
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
50
|
-
export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, };
|
|
1
|
+
export { toast } from "sonner";
|
|
51
2
|
//# sourceMappingURL=toast.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","sourceRoot":"","sources":["../../src/components/toast.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toast.js","sourceRoot":"","sources":["../../src/components/toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../src/components/toaster.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../src/components/toaster.tsx"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,4CAwBtB"}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx
|
|
3
|
-
import {
|
|
4
|
-
import { useToast } from "../hooks/use-toast";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Toaster as SonnerToaster } from "sonner";
|
|
5
4
|
export function Toaster() {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
return (_jsx(SonnerToaster, { position: "bottom-right", toastOptions: {
|
|
6
|
+
classNames: {
|
|
7
|
+
toast: "!bg-background !border !border-border !text-foreground !rounded-2xl !shadow-lg font-sans",
|
|
8
|
+
title: "!text-sm !font-semibold",
|
|
9
|
+
description: "!text-sm !text-muted-foreground",
|
|
10
|
+
actionButton: "!text-xs !font-medium !bg-primary !text-primary-foreground",
|
|
11
|
+
cancelButton: "!text-xs !font-medium !bg-muted !text-muted-foreground",
|
|
12
|
+
closeButton: "!text-muted-foreground hover:!text-foreground !border-border !bg-background",
|
|
13
|
+
error: "!border-destructive/20 !bg-destructive/[0.03]",
|
|
14
|
+
success: "!border-success/20 !bg-success/[0.03]",
|
|
15
|
+
warning: "!border-warning/20 !bg-warning/[0.03]",
|
|
16
|
+
info: "!border-border",
|
|
17
|
+
},
|
|
18
|
+
} }));
|
|
10
19
|
}
|
|
11
20
|
//# sourceMappingURL=toaster.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toaster.js","sourceRoot":"","sources":["../../src/components/toaster.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,
|
|
1
|
+
{"version":3,"file":"toaster.js","sourceRoot":"","sources":["../../src/components/toaster.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AAElD,MAAM,UAAU,OAAO;IACtB,OAAO,CACN,KAAC,aAAa,IACb,QAAQ,EAAC,cAAc,EACvB,YAAY,EAAE;YACb,UAAU,EAAE;gBACX,KAAK,EACJ,0FAA0F;gBAC3F,KAAK,EAAE,yBAAyB;gBAChC,WAAW,EAAE,iCAAiC;gBAC9C,YAAY,EACX,4DAA4D;gBAC7D,YAAY,EACX,wDAAwD;gBACzD,WAAW,EACV,6EAA6E;gBAC9E,KAAK,EAAE,+CAA+C;gBACtD,OAAO,EAAE,uCAAuC;gBAChD,OAAO,EAAE,uCAAuC;gBAChD,IAAI,EAAE,gBAAgB;aACtB;SACD,GACA,CACF,CAAC;AACH,CAAC"}
|
|
@@ -1,45 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
id: string;
|
|
5
|
-
title?: React.ReactNode;
|
|
6
|
-
description?: React.ReactNode;
|
|
7
|
-
action?: React.ReactElement;
|
|
8
|
-
};
|
|
9
|
-
declare const actionTypes: {
|
|
10
|
-
readonly ADD_TOAST: "ADD_TOAST";
|
|
11
|
-
readonly UPDATE_TOAST: "UPDATE_TOAST";
|
|
12
|
-
readonly DISMISS_TOAST: "DISMISS_TOAST";
|
|
13
|
-
readonly REMOVE_TOAST: "REMOVE_TOAST";
|
|
14
|
-
};
|
|
15
|
-
type ActionType = typeof actionTypes;
|
|
16
|
-
type Action = {
|
|
17
|
-
type: ActionType["ADD_TOAST"];
|
|
18
|
-
toast: ToasterToast;
|
|
19
|
-
} | {
|
|
20
|
-
type: ActionType["UPDATE_TOAST"];
|
|
21
|
-
toast: Partial<ToasterToast>;
|
|
22
|
-
} | {
|
|
23
|
-
type: ActionType["DISMISS_TOAST"];
|
|
24
|
-
toastId?: ToasterToast["id"];
|
|
25
|
-
} | {
|
|
26
|
-
type: ActionType["REMOVE_TOAST"];
|
|
27
|
-
toastId?: ToasterToast["id"];
|
|
28
|
-
};
|
|
29
|
-
interface State {
|
|
30
|
-
toasts: ToasterToast[];
|
|
31
|
-
}
|
|
32
|
-
export declare const reducer: (state: State, action: Action) => State;
|
|
33
|
-
type Toast = Omit<ToasterToast, "id">;
|
|
34
|
-
declare function toast({ ...props }: Toast): {
|
|
35
|
-
id: string;
|
|
36
|
-
dismiss: () => void;
|
|
37
|
-
update: (props: ToasterToast) => void;
|
|
38
|
-
};
|
|
39
|
-
declare function useToast(): {
|
|
1
|
+
import { toast } from "sonner";
|
|
2
|
+
/** @deprecated Import `toast` from `@almach/ui` directly instead. */
|
|
3
|
+
export declare function useToast(): {
|
|
40
4
|
toast: typeof toast;
|
|
41
|
-
dismiss: (toastId?: string) => void;
|
|
42
|
-
toasts: ToasterToast[];
|
|
43
5
|
};
|
|
44
|
-
export { toast, useToast };
|
|
45
6
|
//# sourceMappingURL=use-toast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-toast.d.ts","sourceRoot":"","sources":["../../src/hooks/use-toast.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-toast.d.ts","sourceRoot":"","sources":["../../src/hooks/use-toast.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,qEAAqE;AACrE,wBAAgB,QAAQ,IAAI;IAAE,KAAK,EAAE,OAAO,KAAK,CAAA;CAAE,CAElD"}
|
package/dist/hooks/use-toast.js
CHANGED
|
@@ -1,102 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const actionTypes = {
|
|
7
|
-
ADD_TOAST: "ADD_TOAST",
|
|
8
|
-
UPDATE_TOAST: "UPDATE_TOAST",
|
|
9
|
-
DISMISS_TOAST: "DISMISS_TOAST",
|
|
10
|
-
REMOVE_TOAST: "REMOVE_TOAST",
|
|
11
|
-
};
|
|
12
|
-
let count = 0;
|
|
13
|
-
function genId() {
|
|
14
|
-
count = (count + 1) % Number.MAX_SAFE_INTEGER;
|
|
15
|
-
return count.toString();
|
|
2
|
+
import { toast } from "sonner";
|
|
3
|
+
/** @deprecated Import `toast` from `@almach/ui` directly instead. */
|
|
4
|
+
export function useToast() {
|
|
5
|
+
return { toast };
|
|
16
6
|
}
|
|
17
|
-
const toastTimeouts = new Map();
|
|
18
|
-
const addToRemoveQueue = (toastId) => {
|
|
19
|
-
if (toastTimeouts.has(toastId))
|
|
20
|
-
return;
|
|
21
|
-
const timeout = setTimeout(() => {
|
|
22
|
-
toastTimeouts.delete(toastId);
|
|
23
|
-
dispatch({ type: "REMOVE_TOAST", toastId });
|
|
24
|
-
}, TOAST_REMOVE_DELAY);
|
|
25
|
-
toastTimeouts.set(toastId, timeout);
|
|
26
|
-
};
|
|
27
|
-
export const reducer = (state, action) => {
|
|
28
|
-
switch (action.type) {
|
|
29
|
-
case "ADD_TOAST":
|
|
30
|
-
return {
|
|
31
|
-
...state,
|
|
32
|
-
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
|
|
33
|
-
};
|
|
34
|
-
case "UPDATE_TOAST":
|
|
35
|
-
return {
|
|
36
|
-
...state,
|
|
37
|
-
toasts: state.toasts.map((t) => t.id === action.toast.id ? { ...t, ...action.toast } : t),
|
|
38
|
-
};
|
|
39
|
-
case "DISMISS_TOAST": {
|
|
40
|
-
const { toastId } = action;
|
|
41
|
-
if (toastId) {
|
|
42
|
-
addToRemoveQueue(toastId);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
state.toasts.forEach((toast) => addToRemoveQueue(toast.id));
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
...state,
|
|
49
|
-
toasts: state.toasts.map((t) => t.id === toastId || toastId === undefined ? { ...t, open: false } : t),
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
case "REMOVE_TOAST":
|
|
53
|
-
if (action.toastId === undefined)
|
|
54
|
-
return { ...state, toasts: [] };
|
|
55
|
-
return {
|
|
56
|
-
...state,
|
|
57
|
-
toasts: state.toasts.filter((t) => t.id !== action.toastId),
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
const listeners = [];
|
|
62
|
-
let memoryState = { toasts: [] };
|
|
63
|
-
function dispatch(action) {
|
|
64
|
-
memoryState = reducer(memoryState, action);
|
|
65
|
-
listeners.forEach((listener) => listener(memoryState));
|
|
66
|
-
}
|
|
67
|
-
function toast({ ...props }) {
|
|
68
|
-
const id = genId();
|
|
69
|
-
const update = (props) => dispatch({ type: "UPDATE_TOAST", toast: { ...props, id } });
|
|
70
|
-
const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
|
|
71
|
-
dispatch({
|
|
72
|
-
type: "ADD_TOAST",
|
|
73
|
-
toast: {
|
|
74
|
-
...props,
|
|
75
|
-
id,
|
|
76
|
-
open: true,
|
|
77
|
-
onOpenChange: (open) => {
|
|
78
|
-
if (!open)
|
|
79
|
-
dismiss();
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
return { id, dismiss, update };
|
|
84
|
-
}
|
|
85
|
-
function useToast() {
|
|
86
|
-
const [state, setState] = React.useState(memoryState);
|
|
87
|
-
React.useEffect(() => {
|
|
88
|
-
listeners.push(setState);
|
|
89
|
-
return () => {
|
|
90
|
-
const index = listeners.indexOf(setState);
|
|
91
|
-
if (index > -1)
|
|
92
|
-
listeners.splice(index, 1);
|
|
93
|
-
};
|
|
94
|
-
}, []);
|
|
95
|
-
return {
|
|
96
|
-
...state,
|
|
97
|
-
toast,
|
|
98
|
-
dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", ...(toastId !== undefined && { toastId }) }),
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
export { toast, useToast };
|
|
102
7
|
//# sourceMappingURL=use-toast.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-toast.js","sourceRoot":"","sources":["../../src/hooks/use-toast.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb
|
|
1
|
+
{"version":3,"file":"use-toast.js","sourceRoot":"","sources":["../../src/hooks/use-toast.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,qEAAqE;AACrE,MAAM,UAAU,QAAQ;IACvB,OAAO,EAAE,KAAK,EAAE,CAAC;AAClB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ export { Button, buttonVariants } from "./components/button";
|
|
|
8
8
|
export type { ButtonProps } from "./components/button";
|
|
9
9
|
export { Calendar } from "./components/calendar";
|
|
10
10
|
export type { CalendarProps } from "./components/calendar";
|
|
11
|
-
export { Card } from "./components/card";
|
|
11
|
+
export { Card, Group } from "./components/card";
|
|
12
|
+
export { Chart, ChartContainer, ChartTooltip, ChartTooltipContent, ChartGrid, ChartXAxis, ChartYAxis, ChartLegend, ChartPolarGrid, ChartPolarAxis, CHART_COLORS, LineChart, BarChart, AreaChart, PieChart, RadarChart, ScatterChart, Line, Bar, Area, Pie, Radar, Scatter, Cell, ResponsiveContainer, PolarGrid, PolarAngleAxis, PolarRadiusAxis, } from "./components/chart";
|
|
12
13
|
export { Carousel } from "./components/carousel";
|
|
13
14
|
export { Checkbox } from "./components/checkbox";
|
|
14
15
|
export { Collapsible } from "./components/collapsible";
|
|
@@ -16,11 +17,11 @@ export { Command } from "./components/command";
|
|
|
16
17
|
export { Dialog } from "./components/dialog";
|
|
17
18
|
export { Drawer } from "./components/drawer";
|
|
18
19
|
export { DropdownMenu } from "./components/dropdown-menu";
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export type { InputProps, DateInputProps } from "./components/input";
|
|
20
|
+
export { Input } from "./components/input";
|
|
21
|
+
export type { InputProps } from "./components/input";
|
|
22
22
|
export { Label } from "./components/label";
|
|
23
23
|
export { Modal } from "./components/modal";
|
|
24
|
+
export { Popover } from "./components/popover";
|
|
24
25
|
export { Progress } from "./components/progress";
|
|
25
26
|
export { Radio } from "./components/radio";
|
|
26
27
|
export { Select } from "./components/select";
|
|
@@ -34,13 +35,13 @@ export type { ColumnDef } from "./components/table";
|
|
|
34
35
|
export { Tabs, tabsListVariants, tabsTriggerVariants } from "./components/tabs";
|
|
35
36
|
export { TagInput } from "./components/tag-input";
|
|
36
37
|
export type { TagInputProps } from "./components/tag-input";
|
|
37
|
-
export {
|
|
38
|
-
export type {
|
|
38
|
+
export { toast } from "./components/toast";
|
|
39
|
+
export type { ToastOptions } from "./components/toast";
|
|
39
40
|
export { Toaster } from "./components/toaster";
|
|
40
41
|
export { Textarea } from "./components/textarea";
|
|
41
42
|
export type { TextareaProps } from "./components/textarea";
|
|
42
43
|
export { Tooltip } from "./components/tooltip";
|
|
43
|
-
export {
|
|
44
|
+
export { useToast } from "./hooks/use-toast";
|
|
44
45
|
export { useMediaQuery, useIsMobile } from "./hooks/use-media-query";
|
|
45
46
|
export { useCopyToClipboard } from "./hooks/use-copy-to-clipboard";
|
|
46
47
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC1D,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,WAAW,EAAE,MAAM,q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mBAAmB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,14 @@ export { Avatar, avatarVariants } from "./components/avatar";
|
|
|
4
4
|
export { Badge, badgeVariants } from "./components/badge";
|
|
5
5
|
export { Button, buttonVariants } from "./components/button";
|
|
6
6
|
export { Calendar } from "./components/calendar";
|
|
7
|
-
export { Card } from "./components/card";
|
|
7
|
+
export { Card, Group } from "./components/card";
|
|
8
|
+
export { Chart, ChartContainer, ChartTooltip, ChartTooltipContent, ChartGrid, ChartXAxis, ChartYAxis, ChartLegend, ChartPolarGrid, ChartPolarAxis, CHART_COLORS,
|
|
9
|
+
// Chart roots
|
|
10
|
+
LineChart, BarChart, AreaChart, PieChart, RadarChart, ScatterChart,
|
|
11
|
+
// Series
|
|
12
|
+
Line, Bar, Area, Pie, Radar, Scatter,
|
|
13
|
+
// Helpers
|
|
14
|
+
Cell, ResponsiveContainer, PolarGrid, PolarAngleAxis, PolarRadiusAxis, } from "./components/chart";
|
|
8
15
|
export { Carousel } from "./components/carousel";
|
|
9
16
|
export { Checkbox } from "./components/checkbox";
|
|
10
17
|
export { Collapsible } from "./components/collapsible";
|
|
@@ -12,10 +19,10 @@ export { Command } from "./components/command";
|
|
|
12
19
|
export { Dialog } from "./components/dialog";
|
|
13
20
|
export { Drawer } from "./components/drawer";
|
|
14
21
|
export { DropdownMenu } from "./components/dropdown-menu";
|
|
15
|
-
export {
|
|
16
|
-
export { Input, DateInput } from "./components/input";
|
|
22
|
+
export { Input } from "./components/input";
|
|
17
23
|
export { Label } from "./components/label";
|
|
18
24
|
export { Modal } from "./components/modal";
|
|
25
|
+
export { Popover } from "./components/popover";
|
|
19
26
|
export { Progress } from "./components/progress";
|
|
20
27
|
export { Radio } from "./components/radio";
|
|
21
28
|
export { Select } from "./components/select";
|
|
@@ -25,12 +32,12 @@ export { Switch } from "./components/switch";
|
|
|
25
32
|
export { Table } from "./components/table";
|
|
26
33
|
export { Tabs, tabsListVariants, tabsTriggerVariants } from "./components/tabs";
|
|
27
34
|
export { TagInput } from "./components/tag-input";
|
|
28
|
-
export {
|
|
35
|
+
export { toast } from "./components/toast";
|
|
29
36
|
export { Toaster } from "./components/toaster";
|
|
30
37
|
export { Textarea } from "./components/textarea";
|
|
31
38
|
export { Tooltip } from "./components/tooltip";
|
|
32
39
|
/* ─── Hooks ───────────────────────────────────────────────────────────────── */
|
|
33
|
-
export {
|
|
40
|
+
export { useToast } from "./hooks/use-toast";
|
|
34
41
|
export { useMediaQuery, useIsMobile } from "./hooks/use-media-query";
|
|
35
42
|
export { useCopyToClipboard } from "./hooks/use-copy-to-clipboard";
|
|
36
43
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAEjF,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG7D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG7D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAEjF,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG7D,OAAO,EAAE,KAAK,EAAE,a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D,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,iFAAiF;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almach/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Modern, accessible UI components built on Radix UI and Tailwind CSS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
"embla-carousel-react": "^8.6.0",
|
|
57
57
|
"lucide-react": "^0.479.0",
|
|
58
58
|
"react-day-picker": "^9.14.0",
|
|
59
|
+
"recharts": "^3.8.0",
|
|
60
|
+
"sonner": "^2.0.7",
|
|
59
61
|
"vaul": "^1.1.2"
|
|
60
62
|
},
|
|
61
63
|
"devDependencies": {
|
|
@@ -70,5 +72,11 @@
|
|
|
70
72
|
"type": "git",
|
|
71
73
|
"url": "https://github.com/almach-lab/base",
|
|
72
74
|
"directory": "packages/ui"
|
|
73
|
-
}
|
|
75
|
+
},
|
|
76
|
+
"contributors": [
|
|
77
|
+
{
|
|
78
|
+
"name": "rafaalrazzak",
|
|
79
|
+
"url": "https://github.com/rafaalrazzak"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
74
82
|
}
|
package/src/styles/globals.css
CHANGED
|
@@ -126,8 +126,15 @@
|
|
|
126
126
|
--radius: 0.625rem;
|
|
127
127
|
|
|
128
128
|
/* Switch — override to change switch colors */
|
|
129
|
-
--switch-on: hsl(
|
|
129
|
+
--switch-on: hsl(var(--primary));
|
|
130
130
|
--switch-off: hsl(240 3.8% 46.1% / 0.35);
|
|
131
|
+
|
|
132
|
+
/* Chart palette */
|
|
133
|
+
--chart-1: 221 83% 53%;
|
|
134
|
+
--chart-2: 142 76% 36%;
|
|
135
|
+
--chart-3: 38 92% 50%;
|
|
136
|
+
--chart-4: 0 84% 60%;
|
|
137
|
+
--chart-5: 271 91% 65%;
|
|
131
138
|
}
|
|
132
139
|
|
|
133
140
|
|
|
@@ -161,8 +168,15 @@
|
|
|
161
168
|
--input: 240 3.7% 15.9%;
|
|
162
169
|
--ring: 240 4.9% 83.9%;
|
|
163
170
|
|
|
164
|
-
--switch-on: hsl(
|
|
171
|
+
--switch-on: hsl(var(--primary));
|
|
165
172
|
--switch-off: hsl(240 5% 64.9% / 0.3);
|
|
173
|
+
|
|
174
|
+
/* Chart palette */
|
|
175
|
+
--chart-1: 217 91% 60%;
|
|
176
|
+
--chart-2: 142 69% 58%;
|
|
177
|
+
--chart-3: 38 92% 55%;
|
|
178
|
+
--chart-4: 0 72% 51%;
|
|
179
|
+
--chart-5: 271 91% 72%;
|
|
166
180
|
}
|
|
167
181
|
|
|
168
182
|
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
interface GroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/** Small label shown above the group */
|
|
4
|
-
label?: string;
|
|
5
|
-
/** Helper text shown below the group */
|
|
6
|
-
hint?: string;
|
|
7
|
-
}
|
|
8
|
-
declare function GroupRoot({ label, hint, className, children, ...props }: GroupProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
interface GroupRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
-
/** Left-side primary label */
|
|
11
|
-
label?: string;
|
|
12
|
-
/** Left-side secondary text under label */
|
|
13
|
-
description?: string;
|
|
14
|
-
/** Associates label with a form control */
|
|
15
|
-
htmlFor?: string;
|
|
16
|
-
/** Marks the field as required (adds red asterisk) */
|
|
17
|
-
required?: boolean;
|
|
18
|
-
/** Right-side element: form control, toggle, arrow, badge, etc. */
|
|
19
|
-
action?: React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
declare function GroupRow({ label, description, htmlFor, required, action, children, className, onClick, ...props }: GroupRowProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export declare const Group: typeof GroupRoot & {
|
|
23
|
-
Row: typeof GroupRow;
|
|
24
|
-
};
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=group.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../src/components/group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAChE,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,iBAAS,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAgB5E;AAGD,UAAU,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACnE,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAED,iBAAS,QAAQ,CAAC,EACjB,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACR,EAAE,aAAa,2CAiDf;AAGD,eAAO,MAAM,KAAK;;CAEhB,CAAC"}
|
package/dist/components/group.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "@almach/utils";
|
|
3
|
-
function GroupRoot({ label, hint, className, children, ...props }) {
|
|
4
|
-
return (_jsxs("div", { className: cn("space-y-1.5", className), ...props, children: [label && (_jsx("p", { className: "px-1 text-xs font-medium uppercase tracking-wider text-muted-foreground", children: label })), _jsx("div", { className: "overflow-hidden rounded-xl border bg-card divide-y", children: children }), hint && (_jsx("p", { className: "px-1 text-xs text-muted-foreground", children: hint }))] }));
|
|
5
|
-
}
|
|
6
|
-
function GroupRow({ label, description, htmlFor, required, action, children, className, onClick, ...props }) {
|
|
7
|
-
return (_jsxs("div", { className: cn("flex items-center gap-3 px-4 py-3 bg-card transition-colors", onClick && "cursor-pointer hover:bg-accent/50", className), onClick: onClick, ...props, children: [label ? (_jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("label", { htmlFor: htmlFor, className: cn("text-sm font-medium leading-none", htmlFor && "cursor-pointer"), children: [label, required && (_jsx("span", { className: "ml-1 text-destructive", "aria-hidden": true, children: "*" }))] }), description && (_jsx("p", { className: "mt-0.5 text-xs leading-relaxed text-muted-foreground", children: description }))] })) : (_jsx("div", { className: "min-w-0 flex-1 text-sm", children: children })), label && children && (_jsx("div", { className: "shrink-0", children: children })), action && (_jsx("div", { className: "shrink-0 text-muted-foreground", children: action }))] }));
|
|
8
|
-
}
|
|
9
|
-
/* ── Compound export ──────────────────────────────────────────────────────── */
|
|
10
|
-
export const Group = Object.assign(GroupRoot, {
|
|
11
|
-
Row: GroupRow,
|
|
12
|
-
});
|
|
13
|
-
//# sourceMappingURL=group.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"group.js","sourceRoot":"","sources":["../../src/components/group.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAUnC,SAAS,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAc;IAC5E,OAAO,CACN,eAAK,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,SAAS,CAAC,KAAM,KAAK,aACrD,KAAK,IAAI,CACT,YAAG,SAAS,EAAC,yEAAyE,YACpF,KAAK,GACH,CACJ,EACD,cAAK,SAAS,EAAC,oDAAoD,YACjE,QAAQ,GACJ,EACL,IAAI,IAAI,CACR,YAAG,SAAS,EAAC,oCAAoC,YAAE,IAAI,GAAK,CAC5D,IACI,CACN,CAAC;AACH,CAAC;AAgBD,SAAS,QAAQ,CAAC,EACjB,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACO;IACf,OAAO,CACN,eACC,SAAS,EAAE,EAAE,CACZ,6DAA6D,EAC7D,OAAO,IAAI,mCAAmC,EAC9C,SAAS,CACT,EACD,OAAO,EAAE,OAAO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