@alquimia-ai/ui 1.0.6 → 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/atoms/index.d.mts +12 -1
- package/dist/components/atoms/index.d.ts +12 -1
- package/dist/components/atoms/index.js +92 -0
- package/dist/components/atoms/index.js.map +1 -1
- package/dist/components/atoms/index.mjs +92 -0
- package/dist/components/atoms/index.mjs.map +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +92 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +92 -0
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/molecules/documents/index.js +169 -69
- package/dist/components/molecules/documents/index.js.map +1 -1
- package/dist/components/molecules/documents/index.mjs +163 -63
- package/dist/components/molecules/documents/index.mjs.map +1 -1
- package/dist/components/molecules/index.js +157 -67
- package/dist/components/molecules/index.js.map +1 -1
- package/dist/components/molecules/index.mjs +157 -67
- package/dist/components/molecules/index.mjs.map +1 -1
- package/dist/components/molecules/viewers/index.js +95 -5
- package/dist/components/molecules/viewers/index.js.map +1 -1
- package/dist/components/molecules/viewers/index.mjs +95 -5
- package/dist/components/molecules/viewers/index.mjs.map +1 -1
- package/dist/components/organisms/index.d.mts +2 -0
- package/dist/components/organisms/index.d.ts +2 -0
- package/dist/components/organisms/index.js +240 -148
- package/dist/components/organisms/index.js.map +1 -1
- package/dist/components/organisms/index.mjs +241 -149
- package/dist/components/organisms/index.mjs.map +1 -1
- package/dist/components/templates/cards/index.js +118 -28
- package/dist/components/templates/cards/index.js.map +1 -1
- package/dist/components/templates/cards/index.mjs +118 -28
- package/dist/components/templates/cards/index.mjs.map +1 -1
- package/dist/components/templates/index.js +118 -28
- package/dist/components/templates/index.js.map +1 -1
- package/dist/components/templates/index.mjs +118 -28
- package/dist/components/templates/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +311 -217
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +312 -218
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -264,4 +264,15 @@ declare const Loader: React$1.ForwardRefExoticComponent<LoaderProps & React$1.Re
|
|
|
264
264
|
|
|
265
265
|
declare function Toaster(): react_jsx_runtime.JSX.Element;
|
|
266
266
|
|
|
267
|
-
|
|
267
|
+
declare const thinkIndicatorVariants: (props?: ({
|
|
268
|
+
variant?: "default" | "secondary" | "primary" | null | undefined;
|
|
269
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
270
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
271
|
+
interface ThinkIndicatorProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof thinkIndicatorVariants> {
|
|
272
|
+
thoughts?: string[];
|
|
273
|
+
interval?: number;
|
|
274
|
+
loader?: React$1.ReactNode;
|
|
275
|
+
}
|
|
276
|
+
declare const ThinkIndicator: React$1.ForwardRefExoticComponent<ThinkIndicatorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
277
|
+
|
|
278
|
+
export { Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Input, type InputProps, Label, Loader, Popover, PopoverContent, PopoverTrigger, RichText, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThinkIndicator, type ThinkIndicatorProps, Toaster, Toggle, Typography, type TypographyProps, badgeVariants, thinkIndicatorVariants, toggleVariants };
|
|
@@ -264,4 +264,15 @@ declare const Loader: React$1.ForwardRefExoticComponent<LoaderProps & React$1.Re
|
|
|
264
264
|
|
|
265
265
|
declare function Toaster(): react_jsx_runtime.JSX.Element;
|
|
266
266
|
|
|
267
|
-
|
|
267
|
+
declare const thinkIndicatorVariants: (props?: ({
|
|
268
|
+
variant?: "default" | "secondary" | "primary" | null | undefined;
|
|
269
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
270
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
271
|
+
interface ThinkIndicatorProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof thinkIndicatorVariants> {
|
|
272
|
+
thoughts?: string[];
|
|
273
|
+
interval?: number;
|
|
274
|
+
loader?: React$1.ReactNode;
|
|
275
|
+
}
|
|
276
|
+
declare const ThinkIndicator: React$1.ForwardRefExoticComponent<ThinkIndicatorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
277
|
+
|
|
278
|
+
export { Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Input, type InputProps, Label, Loader, Popover, PopoverContent, PopoverTrigger, RichText, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThinkIndicator, type ThinkIndicatorProps, Toaster, Toggle, Typography, type TypographyProps, badgeVariants, thinkIndicatorVariants, toggleVariants };
|
|
@@ -128,6 +128,7 @@ __export(atoms_exports, {
|
|
|
128
128
|
TabsList: () => TabsList,
|
|
129
129
|
TabsTrigger: () => TabsTrigger,
|
|
130
130
|
Textarea: () => Textarea,
|
|
131
|
+
ThinkIndicator: () => ThinkIndicator,
|
|
131
132
|
Toast: () => Toast,
|
|
132
133
|
ToastAction: () => ToastAction,
|
|
133
134
|
ToastClose: () => ToastClose,
|
|
@@ -140,6 +141,7 @@ __export(atoms_exports, {
|
|
|
140
141
|
Typography: () => Typography,
|
|
141
142
|
badgeVariants: () => badgeVariants,
|
|
142
143
|
buttonVariants: () => buttonVariants,
|
|
144
|
+
thinkIndicatorVariants: () => thinkIndicatorVariants,
|
|
143
145
|
toggleVariants: () => toggleVariants
|
|
144
146
|
});
|
|
145
147
|
module.exports = __toCommonJS(atoms_exports);
|
|
@@ -1612,4 +1614,94 @@ function Toaster() {
|
|
|
1612
1614
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ToastViewport, {})
|
|
1613
1615
|
] });
|
|
1614
1616
|
}
|
|
1617
|
+
|
|
1618
|
+
// src/components/atoms/ui/think-indicator.tsx
|
|
1619
|
+
var React24 = __toESM(require("react"));
|
|
1620
|
+
var import_react3 = require("react");
|
|
1621
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
1622
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1623
|
+
var thinkIndicatorVariants = (0, import_class_variance_authority8.cva)(
|
|
1624
|
+
"flex items-center gap-3",
|
|
1625
|
+
{
|
|
1626
|
+
variants: {
|
|
1627
|
+
variant: {
|
|
1628
|
+
default: "text-muted-foreground",
|
|
1629
|
+
primary: "text-primary",
|
|
1630
|
+
secondary: "text-secondary"
|
|
1631
|
+
},
|
|
1632
|
+
size: {
|
|
1633
|
+
default: "gap-3",
|
|
1634
|
+
sm: "gap-2",
|
|
1635
|
+
lg: "gap-4"
|
|
1636
|
+
}
|
|
1637
|
+
},
|
|
1638
|
+
defaultVariants: {
|
|
1639
|
+
variant: "default",
|
|
1640
|
+
size: "default"
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
);
|
|
1644
|
+
var ThinkIndicator = React24.forwardRef(
|
|
1645
|
+
({
|
|
1646
|
+
className,
|
|
1647
|
+
variant,
|
|
1648
|
+
size,
|
|
1649
|
+
thoughts = [
|
|
1650
|
+
"Analyzing your request...",
|
|
1651
|
+
"Processing information...",
|
|
1652
|
+
"Formulating response..."
|
|
1653
|
+
],
|
|
1654
|
+
interval = 5e3,
|
|
1655
|
+
loader,
|
|
1656
|
+
...props
|
|
1657
|
+
}, ref) => {
|
|
1658
|
+
const [currentThoughtIndex, setCurrentThoughtIndex] = (0, import_react3.useState)(0);
|
|
1659
|
+
const [isAnimating, setIsAnimating] = (0, import_react3.useState)(false);
|
|
1660
|
+
(0, import_react3.useEffect)(() => {
|
|
1661
|
+
const timer = setInterval(() => {
|
|
1662
|
+
setIsAnimating(true);
|
|
1663
|
+
setTimeout(() => {
|
|
1664
|
+
setCurrentThoughtIndex((prev) => {
|
|
1665
|
+
return prev < thoughts.length - 1 ? prev + 1 : prev;
|
|
1666
|
+
});
|
|
1667
|
+
setIsAnimating(false);
|
|
1668
|
+
}, 300);
|
|
1669
|
+
}, interval);
|
|
1670
|
+
if (currentThoughtIndex === thoughts.length - 1) {
|
|
1671
|
+
clearInterval(timer);
|
|
1672
|
+
}
|
|
1673
|
+
return () => clearInterval(timer);
|
|
1674
|
+
}, [thoughts, interval, currentThoughtIndex]);
|
|
1675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1676
|
+
"div",
|
|
1677
|
+
{
|
|
1678
|
+
ref,
|
|
1679
|
+
className: cn(thinkIndicatorVariants({ variant, size }), className, "alq--think-indicator"),
|
|
1680
|
+
...props,
|
|
1681
|
+
children: [
|
|
1682
|
+
loader || /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1683
|
+
Loader,
|
|
1684
|
+
{
|
|
1685
|
+
className: cn(
|
|
1686
|
+
size === "sm" ? "h-3 w-3" : size === "lg" ? "h-5 w-5" : "h-4 w-4"
|
|
1687
|
+
)
|
|
1688
|
+
}
|
|
1689
|
+
),
|
|
1690
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1691
|
+
"div",
|
|
1692
|
+
{
|
|
1693
|
+
className: cn(
|
|
1694
|
+
"alq--think-indicator-text",
|
|
1695
|
+
"transition-all duration-300",
|
|
1696
|
+
isAnimating ? "opacity-0 -translate-y-2" : "opacity-100 translate-y-0"
|
|
1697
|
+
),
|
|
1698
|
+
children: thoughts[currentThoughtIndex]
|
|
1699
|
+
}
|
|
1700
|
+
)
|
|
1701
|
+
]
|
|
1702
|
+
}
|
|
1703
|
+
);
|
|
1704
|
+
}
|
|
1705
|
+
);
|
|
1706
|
+
ThinkIndicator.displayName = "ThinkIndicator";
|
|
1615
1707
|
//# sourceMappingURL=index.js.map
|