@alquimia-ai/ui 2.0.0 → 2.2.1
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/{alert-dialog-CP71C4vl.d.mts → alert-dialog-HrXEPlTh.d.mts} +1 -1
- package/dist/{alert-dialog-CP71C4vl.d.ts → alert-dialog-HrXEPlTh.d.ts} +1 -1
- package/dist/components/atoms/index.d.mts +48 -3
- package/dist/components/atoms/index.d.ts +48 -3
- package/dist/components/atoms/index.js +239 -0
- package/dist/components/atoms/index.js.map +1 -1
- package/dist/components/atoms/index.mjs +207 -1
- package/dist/components/atoms/index.mjs.map +1 -1
- package/dist/components/genui/index.d.mts +79 -0
- package/dist/components/genui/index.d.ts +79 -0
- package/dist/components/genui/index.js +4693 -0
- package/dist/components/genui/index.js.map +1 -0
- package/dist/components/genui/index.mjs +4622 -0
- package/dist/components/genui/index.mjs.map +1 -0
- package/dist/components/hooks/index.d.mts +1 -1
- package/dist/components/hooks/index.d.ts +1 -1
- package/dist/components/molecules/documents/index.js +283 -58
- package/dist/components/molecules/documents/index.js.map +1 -1
- package/dist/components/molecules/documents/index.mjs +281 -58
- package/dist/components/molecules/documents/index.mjs.map +1 -1
- package/dist/components/molecules/index.d.mts +2 -2
- package/dist/components/molecules/index.d.ts +2 -2
- package/dist/components/molecules/index.js +335 -156
- package/dist/components/molecules/index.js.map +1 -1
- package/dist/components/molecules/index.mjs +331 -152
- package/dist/components/molecules/index.mjs.map +1 -1
- package/dist/components/molecules/viewers/index.js +182 -3
- package/dist/components/molecules/viewers/index.js.map +1 -1
- package/dist/components/molecules/viewers/index.mjs +182 -3
- package/dist/components/molecules/viewers/index.mjs.map +1 -1
- package/dist/components/organisms/index.d.mts +15 -2
- package/dist/components/organisms/index.d.ts +15 -2
- package/dist/components/organisms/index.js +434 -247
- package/dist/components/organisms/index.js.map +1 -1
- package/dist/components/organisms/index.mjs +431 -244
- package/dist/components/organisms/index.mjs.map +1 -1
- package/dist/components/templates/index.js +210 -31
- package/dist/components/templates/index.js.map +1 -1
- package/dist/components/templates/index.mjs +210 -31
- package/dist/components/templates/index.mjs.map +1 -1
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +554 -307
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +524 -310
- package/dist/index.mjs.map +1 -1
- package/dist/{toast-2xT7L1tJ.d.mts → toast-DEc6eGUE.d.mts} +1 -1
- package/dist/{toast-2xT7L1tJ.d.ts → toast-DEc6eGUE.d.ts} +1 -1
- package/package.json +22 -3
|
@@ -305,7 +305,7 @@ var AlertDialogCancel = React2.forwardRef(function(_param, ref) {
|
|
|
305
305
|
});
|
|
306
306
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
307
307
|
// src/components/molecules/assistant-button.tsx
|
|
308
|
-
import * as
|
|
308
|
+
import * as React29 from "react";
|
|
309
309
|
import { useState as useState3 } from "react";
|
|
310
310
|
// src/components/atoms/ui/textarea.tsx
|
|
311
311
|
import * as React3 from "react";
|
|
@@ -1540,17 +1540,196 @@ var ThinkIndicator = React25.forwardRef(function(_param, ref) {
|
|
|
1540
1540
|
}));
|
|
1541
1541
|
});
|
|
1542
1542
|
ThinkIndicator.displayName = "ThinkIndicator";
|
|
1543
|
-
// src/components/
|
|
1543
|
+
// src/components/atoms/ui/accordion.tsx
|
|
1544
|
+
import * as React26 from "react";
|
|
1545
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
1546
|
+
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
1544
1547
|
import { jsx as jsx32, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1545
|
-
var
|
|
1548
|
+
var AccordionItem = React26.forwardRef(function(_param, ref) {
|
|
1549
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1550
|
+
"className"
|
|
1551
|
+
]);
|
|
1552
|
+
return /* @__PURE__ */ jsx32(AccordionPrimitive.Item, _object_spread({
|
|
1553
|
+
ref: ref,
|
|
1554
|
+
className: cn("border-b", className)
|
|
1555
|
+
}, props));
|
|
1556
|
+
});
|
|
1557
|
+
AccordionItem.displayName = "AccordionItem";
|
|
1558
|
+
var AccordionTrigger = React26.forwardRef(function(_param, ref) {
|
|
1559
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1560
|
+
"className",
|
|
1561
|
+
"children"
|
|
1562
|
+
]);
|
|
1563
|
+
return /* @__PURE__ */ jsx32(AccordionPrimitive.Header, {
|
|
1564
|
+
className: "flex",
|
|
1565
|
+
children: /* @__PURE__ */ jsxs11(AccordionPrimitive.Trigger, _object_spread_props(_object_spread({
|
|
1566
|
+
ref: ref,
|
|
1567
|
+
className: cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className)
|
|
1568
|
+
}, props), {
|
|
1569
|
+
children: [
|
|
1570
|
+
children,
|
|
1571
|
+
/* @__PURE__ */ jsx32(ChevronDown2, {
|
|
1572
|
+
className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"
|
|
1573
|
+
})
|
|
1574
|
+
]
|
|
1575
|
+
}))
|
|
1576
|
+
});
|
|
1577
|
+
});
|
|
1578
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
1579
|
+
var AccordionContent = React26.forwardRef(function(_param, ref) {
|
|
1580
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1581
|
+
"className",
|
|
1582
|
+
"children"
|
|
1583
|
+
]);
|
|
1584
|
+
return /* @__PURE__ */ jsx32(AccordionPrimitive.Content, _object_spread_props(_object_spread({
|
|
1585
|
+
ref: ref,
|
|
1586
|
+
className: "overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
1587
|
+
}, props), {
|
|
1588
|
+
children: /* @__PURE__ */ jsx32("div", {
|
|
1589
|
+
className: cn("pb-4 pt-0", className),
|
|
1590
|
+
children: children
|
|
1591
|
+
})
|
|
1592
|
+
}));
|
|
1593
|
+
});
|
|
1594
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
1595
|
+
// src/components/atoms/ui/radio-group.tsx
|
|
1596
|
+
import * as React27 from "react";
|
|
1597
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
1598
|
+
import { Circle } from "lucide-react";
|
|
1599
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1600
|
+
var RadioGroup = React27.forwardRef(function(_param, ref) {
|
|
1601
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1602
|
+
"className"
|
|
1603
|
+
]);
|
|
1604
|
+
return /* @__PURE__ */ jsx33(RadioGroupPrimitive.Root, _object_spread({
|
|
1605
|
+
ref: ref,
|
|
1606
|
+
className: cn("grid gap-2", className)
|
|
1607
|
+
}, props));
|
|
1608
|
+
});
|
|
1609
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
1610
|
+
var RadioGroupItem = React27.forwardRef(function(_param, ref) {
|
|
1611
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1612
|
+
"className"
|
|
1613
|
+
]);
|
|
1614
|
+
return /* @__PURE__ */ jsx33(RadioGroupPrimitive.Item, _object_spread_props(_object_spread({
|
|
1615
|
+
ref: ref,
|
|
1616
|
+
className: cn("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className)
|
|
1617
|
+
}, props), {
|
|
1618
|
+
children: /* @__PURE__ */ jsx33(RadioGroupPrimitive.Indicator, {
|
|
1619
|
+
className: "flex items-center justify-center",
|
|
1620
|
+
children: /* @__PURE__ */ jsx33(Circle, {
|
|
1621
|
+
className: "h-2.5 w-2.5 fill-current text-current"
|
|
1622
|
+
})
|
|
1623
|
+
})
|
|
1624
|
+
}));
|
|
1625
|
+
});
|
|
1626
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
1627
|
+
// src/components/atoms/ui/progress.tsx
|
|
1628
|
+
import * as React28 from "react";
|
|
1629
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
1630
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1631
|
+
var Progress = React28.forwardRef(function(_param, ref) {
|
|
1632
|
+
var className = _param.className, value = _param.value, props = _object_without_properties(_param, [
|
|
1633
|
+
"className",
|
|
1634
|
+
"value"
|
|
1635
|
+
]);
|
|
1636
|
+
return /* @__PURE__ */ jsx34(ProgressPrimitive.Root, _object_spread_props(_object_spread({
|
|
1637
|
+
ref: ref,
|
|
1638
|
+
className: cn("relative h-2 w-full overflow-hidden rounded-full bg-muted", className)
|
|
1639
|
+
}, props), {
|
|
1640
|
+
children: /* @__PURE__ */ jsx34(ProgressPrimitive.Indicator, {
|
|
1641
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
1642
|
+
style: {
|
|
1643
|
+
transform: "translateX(-".concat(100 - (value || 0), "%)")
|
|
1644
|
+
}
|
|
1645
|
+
})
|
|
1646
|
+
}));
|
|
1647
|
+
});
|
|
1648
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
1649
|
+
// src/components/atoms/ui/calendar.tsx
|
|
1650
|
+
import { ChevronLeft, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
1651
|
+
import { DayPicker } from "react-day-picker";
|
|
1652
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1653
|
+
function Calendar(_param) {
|
|
1654
|
+
var className = _param.className, classNames = _param.classNames, _param_showOutsideDays = _param.showOutsideDays, showOutsideDays = _param_showOutsideDays === void 0 ? true : _param_showOutsideDays, props = _object_without_properties(_param, [
|
|
1655
|
+
"className",
|
|
1656
|
+
"classNames",
|
|
1657
|
+
"showOutsideDays"
|
|
1658
|
+
]);
|
|
1659
|
+
return /* @__PURE__ */ jsx35(DayPicker, _object_spread({
|
|
1660
|
+
showOutsideDays: showOutsideDays,
|
|
1661
|
+
className: cn("p-3", className),
|
|
1662
|
+
classNames: _object_spread({
|
|
1663
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
1664
|
+
month: "space-y-4",
|
|
1665
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
1666
|
+
caption_label: "text-sm font-medium",
|
|
1667
|
+
nav: "space-x-1 flex items-center",
|
|
1668
|
+
nav_button: cn(buttonVariants({
|
|
1669
|
+
variant: "outline"
|
|
1670
|
+
}), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
|
|
1671
|
+
nav_button_previous: "absolute left-1",
|
|
1672
|
+
nav_button_next: "absolute right-1",
|
|
1673
|
+
table: "w-full border-collapse space-y-1",
|
|
1674
|
+
head_row: "flex",
|
|
1675
|
+
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
1676
|
+
row: "flex w-full mt-2",
|
|
1677
|
+
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
1678
|
+
day: cn(buttonVariants({
|
|
1679
|
+
variant: "ghost"
|
|
1680
|
+
}), "h-9 w-9 p-0 font-normal aria-selected:opacity-100"),
|
|
1681
|
+
day_range_end: "day-range-end",
|
|
1682
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
1683
|
+
day_today: "bg-accent text-accent-foreground",
|
|
1684
|
+
day_outside: "day-outside text-muted-foreground opacity-50",
|
|
1685
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
1686
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
1687
|
+
day_hidden: "invisible"
|
|
1688
|
+
}, classNames),
|
|
1689
|
+
components: {
|
|
1690
|
+
IconLeft: function() {
|
|
1691
|
+
return /* @__PURE__ */ jsx35(ChevronLeft, {
|
|
1692
|
+
className: "h-4 w-4"
|
|
1693
|
+
});
|
|
1694
|
+
},
|
|
1695
|
+
IconRight: function() {
|
|
1696
|
+
return /* @__PURE__ */ jsx35(ChevronRight2, {
|
|
1697
|
+
className: "h-4 w-4"
|
|
1698
|
+
});
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
}, props));
|
|
1702
|
+
}
|
|
1703
|
+
Calendar.displayName = "Calendar";
|
|
1704
|
+
// src/components/atoms/ui/chart.tsx
|
|
1705
|
+
import { ResponsiveContainer, CartesianGrid, XAxis, YAxis, Tooltip, Legend } from "recharts";
|
|
1706
|
+
import { Fragment, jsx as jsx36, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1707
|
+
function Chart(param) {
|
|
1708
|
+
var className = param.className, _param_height = param.height, height = _param_height === void 0 ? 300 : _param_height, children = param.children;
|
|
1709
|
+
return /* @__PURE__ */ jsx36("div", {
|
|
1710
|
+
className: cn("w-full", className),
|
|
1711
|
+
style: {
|
|
1712
|
+
height: height
|
|
1713
|
+
},
|
|
1714
|
+
children: /* @__PURE__ */ jsx36(ResponsiveContainer, {
|
|
1715
|
+
width: "100%",
|
|
1716
|
+
height: "100%",
|
|
1717
|
+
children: children
|
|
1718
|
+
})
|
|
1719
|
+
});
|
|
1720
|
+
}
|
|
1721
|
+
Chart.displayName = "Chart";
|
|
1722
|
+
// src/components/molecules/assistant-button.tsx
|
|
1723
|
+
import { jsx as jsx37, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1724
|
+
var AssistantSuggestions = React29.forwardRef(function(param, ref) {
|
|
1546
1725
|
var suggestions = param.suggestions, showSuggestions = param.showSuggestions, className = param.className;
|
|
1547
|
-
return /* @__PURE__ */
|
|
1726
|
+
return /* @__PURE__ */ jsx37("div", {
|
|
1548
1727
|
ref: ref,
|
|
1549
1728
|
className: cn("absolute bottom-[calc(100%+0.5rem)] right-0 pb-2 mb-4 alq--assistant-suggestions-container", "transition-all duration-300", showSuggestions ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4", className),
|
|
1550
|
-
children: /* @__PURE__ */
|
|
1729
|
+
children: /* @__PURE__ */ jsx37("div", {
|
|
1551
1730
|
className: "rounded-lg p-2 pr-0 w-64",
|
|
1552
1731
|
children: suggestions.map(function(suggestion, index) {
|
|
1553
|
-
return /* @__PURE__ */
|
|
1732
|
+
return /* @__PURE__ */ jsxs13("button", {
|
|
1554
1733
|
onClick: function() {
|
|
1555
1734
|
var _suggestion_action;
|
|
1556
1735
|
return (_suggestion_action = suggestion.action) === null || _suggestion_action === void 0 ? void 0 : _suggestion_action.call(suggestion);
|
|
@@ -1560,10 +1739,10 @@ var AssistantSuggestions = React26.forwardRef(function(param, ref) {
|
|
|
1560
1739
|
},
|
|
1561
1740
|
className: cn("bg-background flex items-center gap-2 border p-2 pr-4 my-2 rounded-full ml-auto", "text-primary hover:bg-secondary", "transition-all duration-100", "origin-bottom w-fit", "alq--assistant-suggestion", showSuggestions ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4"),
|
|
1562
1741
|
children: [
|
|
1563
|
-
/* @__PURE__ */
|
|
1742
|
+
/* @__PURE__ */ jsx37(suggestion.icon, {
|
|
1564
1743
|
className: "w-5 h-5 text-primary"
|
|
1565
1744
|
}),
|
|
1566
|
-
/* @__PURE__ */
|
|
1745
|
+
/* @__PURE__ */ jsx37("span", {
|
|
1567
1746
|
className: "text-xs whitespace-nowrap font-normal",
|
|
1568
1747
|
children: suggestion.label
|
|
1569
1748
|
})
|
|
@@ -1574,7 +1753,7 @@ var AssistantSuggestions = React26.forwardRef(function(param, ref) {
|
|
|
1574
1753
|
});
|
|
1575
1754
|
});
|
|
1576
1755
|
AssistantSuggestions.displayName = "Suggestions";
|
|
1577
|
-
var AssistantButton =
|
|
1756
|
+
var AssistantButton = React29.forwardRef(function(param, ref) {
|
|
1578
1757
|
var Icon2 = param.icon, clickAction = param.clickAction, className = param.className, _param_suggestions = param.suggestions, suggestions = _param_suggestions === void 0 ? [] : _param_suggestions;
|
|
1579
1758
|
var _useState3 = _sliced_to_array(useState3(false), 2), isVisible = _useState3[0], setIsVisible = _useState3[1];
|
|
1580
1759
|
var _useState31 = _sliced_to_array(useState3(false), 2), showSuggestions = _useState31[0], setShowSuggestions = _useState31[1];
|
|
@@ -1592,24 +1771,24 @@ var AssistantButton = React26.forwardRef(function(param, ref) {
|
|
|
1592
1771
|
return setIsVisible(false);
|
|
1593
1772
|
}, 300);
|
|
1594
1773
|
};
|
|
1595
|
-
return /* @__PURE__ */
|
|
1774
|
+
return /* @__PURE__ */ jsx37("div", {
|
|
1596
1775
|
ref: ref,
|
|
1597
1776
|
className: cn("fixed bottom-8 right-4 z-50", "alq--assistant-button-container", className),
|
|
1598
1777
|
onMouseEnter: handleMouseEnter,
|
|
1599
1778
|
onMouseLeave: handleMouseLeave,
|
|
1600
|
-
children: /* @__PURE__ */
|
|
1779
|
+
children: /* @__PURE__ */ jsxs13("div", {
|
|
1601
1780
|
className: "relative group",
|
|
1602
1781
|
children: [
|
|
1603
|
-
isVisible && suggestions.length > 0 && /* @__PURE__ */
|
|
1782
|
+
isVisible && suggestions.length > 0 && /* @__PURE__ */ jsx37(AssistantSuggestions, {
|
|
1604
1783
|
suggestions: suggestions,
|
|
1605
1784
|
showSuggestions: showSuggestions
|
|
1606
1785
|
}),
|
|
1607
|
-
/* @__PURE__ */
|
|
1786
|
+
/* @__PURE__ */ jsx37(Button, {
|
|
1608
1787
|
variant: "outline",
|
|
1609
1788
|
size: "sm",
|
|
1610
1789
|
className: cn("fixed hover:bg-opacity-70 transition-all duration-300", "bottom-4 h-12 w-12 right-4 z-50 rounded-full p-2", "shadow-md", "hover:shadow-lg", showSuggestions ? "scale-110" : "hover:scale-105", "alq--assistant-button"),
|
|
1611
1790
|
onClick: clickAction,
|
|
1612
|
-
children: /* @__PURE__ */
|
|
1791
|
+
children: /* @__PURE__ */ jsx37(Icon2, {
|
|
1613
1792
|
style: {
|
|
1614
1793
|
width: "22px",
|
|
1615
1794
|
height: "22px"
|
|
@@ -1623,19 +1802,19 @@ var AssistantButton = React26.forwardRef(function(param, ref) {
|
|
|
1623
1802
|
});
|
|
1624
1803
|
AssistantButton.displayName = "AssistantButton";
|
|
1625
1804
|
// src/components/molecules/carousel.tsx
|
|
1626
|
-
import * as
|
|
1805
|
+
import * as React30 from "react";
|
|
1627
1806
|
import useEmblaCarousel from "embla-carousel-react";
|
|
1628
1807
|
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
1629
|
-
import { jsx as
|
|
1630
|
-
var CarouselContext =
|
|
1808
|
+
import { jsx as jsx38, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1809
|
+
var CarouselContext = React30.createContext(null);
|
|
1631
1810
|
function useCarousel() {
|
|
1632
|
-
var context =
|
|
1811
|
+
var context = React30.useContext(CarouselContext);
|
|
1633
1812
|
if (!context) {
|
|
1634
1813
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
1635
1814
|
}
|
|
1636
1815
|
return context;
|
|
1637
1816
|
}
|
|
1638
|
-
var Carousel =
|
|
1817
|
+
var Carousel = React30.forwardRef(function(_param, ref) {
|
|
1639
1818
|
var _param_orientation = _param.orientation, orientation = _param_orientation === void 0 ? "horizontal" : _param_orientation, opts = _param.opts, setApi = _param.setApi, plugins = _param.plugins, className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1640
1819
|
"orientation",
|
|
1641
1820
|
"opts",
|
|
@@ -1647,26 +1826,26 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
1647
1826
|
var _useEmblaCarousel = _sliced_to_array(useEmblaCarousel(_object_spread_props(_object_spread({}, opts), {
|
|
1648
1827
|
axis: orientation === "horizontal" ? "x" : "y"
|
|
1649
1828
|
}), plugins), 2), carouselRef = _useEmblaCarousel[0], api = _useEmblaCarousel[1];
|
|
1650
|
-
var
|
|
1651
|
-
var
|
|
1652
|
-
var onSelect =
|
|
1829
|
+
var _React30_useState = _sliced_to_array(React30.useState(false), 2), canScrollPrev = _React30_useState[0], setCanScrollPrev = _React30_useState[1];
|
|
1830
|
+
var _React30_useState1 = _sliced_to_array(React30.useState(false), 2), canScrollNext = _React30_useState1[0], setCanScrollNext = _React30_useState1[1];
|
|
1831
|
+
var onSelect = React30.useCallback(function(api2) {
|
|
1653
1832
|
if (!api2) {
|
|
1654
1833
|
return;
|
|
1655
1834
|
}
|
|
1656
1835
|
setCanScrollPrev(api2.canScrollPrev());
|
|
1657
1836
|
setCanScrollNext(api2.canScrollNext());
|
|
1658
1837
|
}, []);
|
|
1659
|
-
var scrollPrev =
|
|
1838
|
+
var scrollPrev = React30.useCallback(function() {
|
|
1660
1839
|
api === null || api === void 0 ? void 0 : api.scrollPrev();
|
|
1661
1840
|
}, [
|
|
1662
1841
|
api
|
|
1663
1842
|
]);
|
|
1664
|
-
var scrollNext =
|
|
1843
|
+
var scrollNext = React30.useCallback(function() {
|
|
1665
1844
|
api === null || api === void 0 ? void 0 : api.scrollNext();
|
|
1666
1845
|
}, [
|
|
1667
1846
|
api
|
|
1668
1847
|
]);
|
|
1669
|
-
var handleKeyDown =
|
|
1848
|
+
var handleKeyDown = React30.useCallback(function(event) {
|
|
1670
1849
|
if (event.key === "ArrowLeft") {
|
|
1671
1850
|
event.preventDefault();
|
|
1672
1851
|
scrollPrev();
|
|
@@ -1678,7 +1857,7 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
1678
1857
|
scrollPrev,
|
|
1679
1858
|
scrollNext
|
|
1680
1859
|
]);
|
|
1681
|
-
|
|
1860
|
+
React30.useEffect(function() {
|
|
1682
1861
|
if (!api || !setApi) {
|
|
1683
1862
|
return;
|
|
1684
1863
|
}
|
|
@@ -1687,7 +1866,7 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
1687
1866
|
api,
|
|
1688
1867
|
setApi
|
|
1689
1868
|
]);
|
|
1690
|
-
|
|
1869
|
+
React30.useEffect(function() {
|
|
1691
1870
|
if (!api) {
|
|
1692
1871
|
return;
|
|
1693
1872
|
}
|
|
@@ -1701,7 +1880,7 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
1701
1880
|
api,
|
|
1702
1881
|
onSelect
|
|
1703
1882
|
]);
|
|
1704
|
-
return /* @__PURE__ */
|
|
1883
|
+
return /* @__PURE__ */ jsx38(CarouselContext.Provider, {
|
|
1705
1884
|
value: {
|
|
1706
1885
|
carouselRef: carouselRef,
|
|
1707
1886
|
api: api,
|
|
@@ -1712,7 +1891,7 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
1712
1891
|
canScrollPrev: canScrollPrev,
|
|
1713
1892
|
canScrollNext: canScrollNext
|
|
1714
1893
|
},
|
|
1715
|
-
children: /* @__PURE__ */
|
|
1894
|
+
children: /* @__PURE__ */ jsx38("div", _object_spread_props(_object_spread({
|
|
1716
1895
|
ref: ref,
|
|
1717
1896
|
onKeyDownCapture: handleKeyDown,
|
|
1718
1897
|
className: cn("relative", className),
|
|
@@ -1724,27 +1903,27 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
1724
1903
|
});
|
|
1725
1904
|
});
|
|
1726
1905
|
Carousel.displayName = "Carousel";
|
|
1727
|
-
var CarouselContent =
|
|
1906
|
+
var CarouselContent = React30.forwardRef(function(_param, ref) {
|
|
1728
1907
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1729
1908
|
"className"
|
|
1730
1909
|
]);
|
|
1731
1910
|
var _useCarousel = useCarousel(), carouselRef = _useCarousel.carouselRef, orientation = _useCarousel.orientation;
|
|
1732
|
-
return /* @__PURE__ */
|
|
1911
|
+
return /* @__PURE__ */ jsx38("div", {
|
|
1733
1912
|
ref: carouselRef,
|
|
1734
1913
|
className: "overflow-hidden",
|
|
1735
|
-
children: /* @__PURE__ */
|
|
1914
|
+
children: /* @__PURE__ */ jsx38("div", _object_spread({
|
|
1736
1915
|
ref: ref,
|
|
1737
1916
|
className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className)
|
|
1738
1917
|
}, props))
|
|
1739
1918
|
});
|
|
1740
1919
|
});
|
|
1741
1920
|
CarouselContent.displayName = "CarouselContent";
|
|
1742
|
-
var CarouselItem =
|
|
1921
|
+
var CarouselItem = React30.forwardRef(function(_param, ref) {
|
|
1743
1922
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1744
1923
|
"className"
|
|
1745
1924
|
]);
|
|
1746
1925
|
var orientation = useCarousel().orientation;
|
|
1747
|
-
return /* @__PURE__ */
|
|
1926
|
+
return /* @__PURE__ */ jsx38("div", _object_spread({
|
|
1748
1927
|
ref: ref,
|
|
1749
1928
|
role: "group",
|
|
1750
1929
|
"aria-roledescription": "slide",
|
|
@@ -1752,14 +1931,14 @@ var CarouselItem = React27.forwardRef(function(_param, ref) {
|
|
|
1752
1931
|
}, props));
|
|
1753
1932
|
});
|
|
1754
1933
|
CarouselItem.displayName = "CarouselItem";
|
|
1755
|
-
var CarouselPrevious =
|
|
1934
|
+
var CarouselPrevious = React30.forwardRef(function(_param, ref) {
|
|
1756
1935
|
var className = _param.className, _param_variant = _param.variant, variant = _param_variant === void 0 ? "outline" : _param_variant, _param_size = _param.size, size = _param_size === void 0 ? "icon" : _param_size, props = _object_without_properties(_param, [
|
|
1757
1936
|
"className",
|
|
1758
1937
|
"variant",
|
|
1759
1938
|
"size"
|
|
1760
1939
|
]);
|
|
1761
1940
|
var _useCarousel = useCarousel(), orientation = _useCarousel.orientation, scrollPrev = _useCarousel.scrollPrev, canScrollPrev = _useCarousel.canScrollPrev;
|
|
1762
|
-
return /* @__PURE__ */
|
|
1941
|
+
return /* @__PURE__ */ jsxs14(Button, _object_spread_props(_object_spread({
|
|
1763
1942
|
ref: ref,
|
|
1764
1943
|
variant: variant,
|
|
1765
1944
|
size: size,
|
|
@@ -1768,10 +1947,10 @@ var CarouselPrevious = React27.forwardRef(function(_param, ref) {
|
|
|
1768
1947
|
onClick: scrollPrev
|
|
1769
1948
|
}, props), {
|
|
1770
1949
|
children: [
|
|
1771
|
-
/* @__PURE__ */
|
|
1950
|
+
/* @__PURE__ */ jsx38(ArrowLeft, {
|
|
1772
1951
|
className: "h-4 w-4"
|
|
1773
1952
|
}),
|
|
1774
|
-
/* @__PURE__ */
|
|
1953
|
+
/* @__PURE__ */ jsx38("span", {
|
|
1775
1954
|
className: "sr-only",
|
|
1776
1955
|
children: "Previous slide"
|
|
1777
1956
|
})
|
|
@@ -1779,14 +1958,14 @@ var CarouselPrevious = React27.forwardRef(function(_param, ref) {
|
|
|
1779
1958
|
}));
|
|
1780
1959
|
});
|
|
1781
1960
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
1782
|
-
var CarouselNext =
|
|
1961
|
+
var CarouselNext = React30.forwardRef(function(_param, ref) {
|
|
1783
1962
|
var className = _param.className, _param_variant = _param.variant, variant = _param_variant === void 0 ? "outline" : _param_variant, _param_size = _param.size, size = _param_size === void 0 ? "icon" : _param_size, props = _object_without_properties(_param, [
|
|
1784
1963
|
"className",
|
|
1785
1964
|
"variant",
|
|
1786
1965
|
"size"
|
|
1787
1966
|
]);
|
|
1788
1967
|
var _useCarousel = useCarousel(), orientation = _useCarousel.orientation, scrollNext = _useCarousel.scrollNext, canScrollNext = _useCarousel.canScrollNext;
|
|
1789
|
-
return /* @__PURE__ */
|
|
1968
|
+
return /* @__PURE__ */ jsxs14(Button, _object_spread_props(_object_spread({
|
|
1790
1969
|
ref: ref,
|
|
1791
1970
|
variant: variant,
|
|
1792
1971
|
size: size,
|
|
@@ -1795,10 +1974,10 @@ var CarouselNext = React27.forwardRef(function(_param, ref) {
|
|
|
1795
1974
|
onClick: scrollNext
|
|
1796
1975
|
}, props), {
|
|
1797
1976
|
children: [
|
|
1798
|
-
/* @__PURE__ */
|
|
1977
|
+
/* @__PURE__ */ jsx38(ArrowRight, {
|
|
1799
1978
|
className: "h-4 w-4"
|
|
1800
1979
|
}),
|
|
1801
|
-
/* @__PURE__ */
|
|
1980
|
+
/* @__PURE__ */ jsx38("span", {
|
|
1802
1981
|
className: "sr-only",
|
|
1803
1982
|
children: "Next slide"
|
|
1804
1983
|
})
|
|
@@ -1807,32 +1986,32 @@ var CarouselNext = React27.forwardRef(function(_param, ref) {
|
|
|
1807
1986
|
});
|
|
1808
1987
|
CarouselNext.displayName = "CarouselNext";
|
|
1809
1988
|
// src/components/molecules/navigation-menu.tsx
|
|
1810
|
-
import * as
|
|
1989
|
+
import * as React31 from "react";
|
|
1811
1990
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
1812
1991
|
import { cva as cva9 } from "class-variance-authority";
|
|
1813
|
-
import { ChevronDown as
|
|
1814
|
-
import { jsx as
|
|
1815
|
-
var NavigationMenu =
|
|
1992
|
+
import { ChevronDown as ChevronDown3 } from "lucide-react";
|
|
1993
|
+
import { jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1994
|
+
var NavigationMenu = React31.forwardRef(function(_param, ref) {
|
|
1816
1995
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1817
1996
|
"className",
|
|
1818
1997
|
"children"
|
|
1819
1998
|
]);
|
|
1820
|
-
return /* @__PURE__ */
|
|
1999
|
+
return /* @__PURE__ */ jsxs15(NavigationMenuPrimitive.Root, _object_spread_props(_object_spread({
|
|
1821
2000
|
ref: ref,
|
|
1822
2001
|
className: cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className)
|
|
1823
2002
|
}, props), {
|
|
1824
2003
|
children: [
|
|
1825
2004
|
children,
|
|
1826
|
-
/* @__PURE__ */
|
|
2005
|
+
/* @__PURE__ */ jsx39(NavigationMenuViewport, {})
|
|
1827
2006
|
]
|
|
1828
2007
|
}));
|
|
1829
2008
|
});
|
|
1830
2009
|
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
1831
|
-
var NavigationMenuList =
|
|
2010
|
+
var NavigationMenuList = React31.forwardRef(function(_param, ref) {
|
|
1832
2011
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1833
2012
|
"className"
|
|
1834
2013
|
]);
|
|
1835
|
-
return /* @__PURE__ */
|
|
2014
|
+
return /* @__PURE__ */ jsx39(NavigationMenuPrimitive.List, _object_spread({
|
|
1836
2015
|
ref: ref,
|
|
1837
2016
|
className: cn("group flex flex-1 list-none items-center justify-center space-x-1", className)
|
|
1838
2017
|
}, props));
|
|
@@ -1840,19 +2019,19 @@ var NavigationMenuList = React28.forwardRef(function(_param, ref) {
|
|
|
1840
2019
|
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
1841
2020
|
var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
1842
2021
|
var navigationMenuTriggerStyle = cva9("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50");
|
|
1843
|
-
var NavigationMenuTrigger =
|
|
2022
|
+
var NavigationMenuTrigger = React31.forwardRef(function(_param, ref) {
|
|
1844
2023
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1845
2024
|
"className",
|
|
1846
2025
|
"children"
|
|
1847
2026
|
]);
|
|
1848
|
-
return /* @__PURE__ */
|
|
2027
|
+
return /* @__PURE__ */ jsxs15(NavigationMenuPrimitive.Trigger, _object_spread_props(_object_spread({
|
|
1849
2028
|
ref: ref,
|
|
1850
2029
|
className: cn(navigationMenuTriggerStyle(), "group", className)
|
|
1851
2030
|
}, props), {
|
|
1852
2031
|
children: [
|
|
1853
2032
|
children,
|
|
1854
2033
|
" ",
|
|
1855
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ jsx39(ChevronDown3, {
|
|
1856
2035
|
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
|
|
1857
2036
|
"aria-hidden": "true"
|
|
1858
2037
|
})
|
|
@@ -1860,48 +2039,48 @@ var NavigationMenuTrigger = React28.forwardRef(function(_param, ref) {
|
|
|
1860
2039
|
}));
|
|
1861
2040
|
});
|
|
1862
2041
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
1863
|
-
var NavigationMenuContent =
|
|
2042
|
+
var NavigationMenuContent = React31.forwardRef(function(_param, ref) {
|
|
1864
2043
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1865
2044
|
"className"
|
|
1866
2045
|
]);
|
|
1867
|
-
return /* @__PURE__ */
|
|
2046
|
+
return /* @__PURE__ */ jsx39(NavigationMenuPrimitive.Content, _object_spread({
|
|
1868
2047
|
ref: ref,
|
|
1869
2048
|
className: cn("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ", className)
|
|
1870
2049
|
}, props));
|
|
1871
2050
|
});
|
|
1872
2051
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
1873
2052
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
1874
|
-
var NavigationMenuViewport =
|
|
2053
|
+
var NavigationMenuViewport = React31.forwardRef(function(_param, ref) {
|
|
1875
2054
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1876
2055
|
"className"
|
|
1877
2056
|
]);
|
|
1878
|
-
return /* @__PURE__ */
|
|
2057
|
+
return /* @__PURE__ */ jsx39("div", {
|
|
1879
2058
|
className: cn("absolute left-0 top-full flex justify-center"),
|
|
1880
|
-
children: /* @__PURE__ */
|
|
2059
|
+
children: /* @__PURE__ */ jsx39(NavigationMenuPrimitive.Viewport, _object_spread({
|
|
1881
2060
|
className: cn("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]", className),
|
|
1882
2061
|
ref: ref
|
|
1883
2062
|
}, props))
|
|
1884
2063
|
});
|
|
1885
2064
|
});
|
|
1886
2065
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
1887
|
-
var NavigationMenuIndicator =
|
|
2066
|
+
var NavigationMenuIndicator = React31.forwardRef(function(_param, ref) {
|
|
1888
2067
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1889
2068
|
"className"
|
|
1890
2069
|
]);
|
|
1891
|
-
return /* @__PURE__ */
|
|
2070
|
+
return /* @__PURE__ */ jsx39(NavigationMenuPrimitive.Indicator, _object_spread_props(_object_spread({
|
|
1892
2071
|
ref: ref,
|
|
1893
2072
|
className: cn("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", className)
|
|
1894
2073
|
}, props), {
|
|
1895
|
-
children: /* @__PURE__ */
|
|
2074
|
+
children: /* @__PURE__ */ jsx39("div", {
|
|
1896
2075
|
className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"
|
|
1897
2076
|
})
|
|
1898
2077
|
}));
|
|
1899
2078
|
});
|
|
1900
2079
|
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
1901
2080
|
// src/components/molecules/sidebar.tsx
|
|
1902
|
-
import * as
|
|
2081
|
+
import * as React32 from "react";
|
|
1903
2082
|
import { cva as cva10 } from "class-variance-authority";
|
|
1904
|
-
import { jsx as
|
|
2083
|
+
import { jsx as jsx40, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1905
2084
|
var sidebarVariants = cva10("flex flex-col border-r", {
|
|
1906
2085
|
variants: {
|
|
1907
2086
|
size: {
|
|
@@ -1914,12 +2093,12 @@ var sidebarVariants = cva10("flex flex-col border-r", {
|
|
|
1914
2093
|
size: "default"
|
|
1915
2094
|
}
|
|
1916
2095
|
});
|
|
1917
|
-
var SidebarFooter =
|
|
2096
|
+
var SidebarFooter = React32.forwardRef(function(_param, ref) {
|
|
1918
2097
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1919
2098
|
"className",
|
|
1920
2099
|
"children"
|
|
1921
2100
|
]);
|
|
1922
|
-
return /* @__PURE__ */
|
|
2101
|
+
return /* @__PURE__ */ jsx40("div", _object_spread_props(_object_spread({
|
|
1923
2102
|
ref: ref,
|
|
1924
2103
|
className: cn("p-4", className)
|
|
1925
2104
|
}, props), {
|
|
@@ -1927,7 +2106,7 @@ var SidebarFooter = React29.forwardRef(function(_param, ref) {
|
|
|
1927
2106
|
}));
|
|
1928
2107
|
});
|
|
1929
2108
|
SidebarFooter.displayName = "SidebarFooter";
|
|
1930
|
-
var Sidebar =
|
|
2109
|
+
var Sidebar = React32.forwardRef(function(_param, ref) {
|
|
1931
2110
|
var className = _param.className, items = _param.items, selectedSection = _param.selectedSection, onSelect = _param.onSelect, footerContent = _param.footerContent, _param_size = _param.size, size = _param_size === void 0 ? "default" : _param_size, _param_selectedVariant = _param.selectedVariant, selectedVariant = _param_selectedVariant === void 0 ? "secondary" : _param_selectedVariant, _param_defaultVariant = _param.defaultVariant, defaultVariant = _param_defaultVariant === void 0 ? "ghost" : _param_defaultVariant, buttonClassName = _param.buttonClassName, props = _object_without_properties(_param, [
|
|
1932
2111
|
"className",
|
|
1933
2112
|
"items",
|
|
@@ -1939,21 +2118,21 @@ var Sidebar = React29.forwardRef(function(_param, ref) {
|
|
|
1939
2118
|
"defaultVariant",
|
|
1940
2119
|
"buttonClassName"
|
|
1941
2120
|
]);
|
|
1942
|
-
return /* @__PURE__ */
|
|
2121
|
+
return /* @__PURE__ */ jsx40("div", _object_spread_props(_object_spread({
|
|
1943
2122
|
className: cn(className, "alq--navigation-sidebar h-full"),
|
|
1944
2123
|
ref: ref
|
|
1945
2124
|
}, props), {
|
|
1946
|
-
children: /* @__PURE__ */
|
|
2125
|
+
children: /* @__PURE__ */ jsxs16("aside", {
|
|
1947
2126
|
className: cn(sidebarVariants({
|
|
1948
2127
|
size: size
|
|
1949
2128
|
}), "h-full"),
|
|
1950
2129
|
children: [
|
|
1951
|
-
/* @__PURE__ */
|
|
2130
|
+
/* @__PURE__ */ jsx40(ScrollArea, {
|
|
1952
2131
|
className: "flex-grow justify-between",
|
|
1953
|
-
children: /* @__PURE__ */
|
|
2132
|
+
children: /* @__PURE__ */ jsx40("div", {
|
|
1954
2133
|
className: "flex flex-col gap-2 p-4",
|
|
1955
2134
|
children: items.map(function(item) {
|
|
1956
|
-
return /* @__PURE__ */
|
|
2135
|
+
return /* @__PURE__ */ jsxs16(Button, {
|
|
1957
2136
|
variant: (selectedSection === null || selectedSection === void 0 ? void 0 : selectedSection.name) === item.name ? selectedVariant : defaultVariant,
|
|
1958
2137
|
className: cn("justify-start", buttonClassName),
|
|
1959
2138
|
disabled: item.disabled,
|
|
@@ -1963,7 +2142,7 @@ var Sidebar = React29.forwardRef(function(_param, ref) {
|
|
|
1963
2142
|
}
|
|
1964
2143
|
},
|
|
1965
2144
|
children: [
|
|
1966
|
-
item.icon && /* @__PURE__ */
|
|
2145
|
+
item.icon && /* @__PURE__ */ jsx40(item.icon, {
|
|
1967
2146
|
className: "mr-2 h-4 w-4"
|
|
1968
2147
|
}),
|
|
1969
2148
|
item.name
|
|
@@ -1972,7 +2151,7 @@ var Sidebar = React29.forwardRef(function(_param, ref) {
|
|
|
1972
2151
|
})
|
|
1973
2152
|
})
|
|
1974
2153
|
}),
|
|
1975
|
-
footerContent && /* @__PURE__ */
|
|
2154
|
+
footerContent && /* @__PURE__ */ jsx40(SidebarFooter, {
|
|
1976
2155
|
children: footerContent
|
|
1977
2156
|
})
|
|
1978
2157
|
]
|
|
@@ -1991,11 +2170,11 @@ function useAlquimiaTheme() {
|
|
|
1991
2170
|
return useContext2(ThemeContext);
|
|
1992
2171
|
}
|
|
1993
2172
|
// src/components/molecules/sonner.tsx
|
|
1994
|
-
import { jsx as
|
|
2173
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1995
2174
|
var Toaster = function(_param) {
|
|
1996
2175
|
var props = _extends({}, _object_destructuring_empty(_param));
|
|
1997
2176
|
var _useAlquimiaTheme = useAlquimiaTheme(), _useAlquimiaTheme_theme = _useAlquimiaTheme.theme, theme = _useAlquimiaTheme_theme === void 0 ? "system" : _useAlquimiaTheme_theme;
|
|
1998
|
-
return /* @__PURE__ */
|
|
2177
|
+
return /* @__PURE__ */ jsx41(Sonner, _object_spread({
|
|
1999
2178
|
theme: theme,
|
|
2000
2179
|
className: "toaster group",
|
|
2001
2180
|
toastOptions: {
|
|
@@ -2009,28 +2188,28 @@ var Toaster = function(_param) {
|
|
|
2009
2188
|
}, props));
|
|
2010
2189
|
};
|
|
2011
2190
|
// src/components/molecules/rating-stars.tsx
|
|
2012
|
-
import * as
|
|
2191
|
+
import * as React33 from "react";
|
|
2013
2192
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2014
2193
|
import { Star } from "lucide-react";
|
|
2015
|
-
import { jsx as
|
|
2194
|
+
import { jsx as jsx42, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2016
2195
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
2017
|
-
var
|
|
2196
|
+
var Tooltip2 = TooltipPrimitive.Root;
|
|
2018
2197
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
2019
|
-
var TooltipContent =
|
|
2198
|
+
var TooltipContent = React33.forwardRef(function(_param, ref) {
|
|
2020
2199
|
var className = _param.className, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
|
|
2021
2200
|
"className",
|
|
2022
2201
|
"sideOffset"
|
|
2023
2202
|
]);
|
|
2024
|
-
return /* @__PURE__ */
|
|
2203
|
+
return /* @__PURE__ */ jsx42(TooltipPrimitive.Content, _object_spread({
|
|
2025
2204
|
ref: ref,
|
|
2026
2205
|
sideOffset: sideOffset,
|
|
2027
2206
|
className: cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground shadow-lg animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)
|
|
2028
2207
|
}, props));
|
|
2029
2208
|
});
|
|
2030
2209
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
2031
|
-
var StarRating =
|
|
2210
|
+
var StarRating = React33.forwardRef(function(param, ref) {
|
|
2032
2211
|
var rating = param.rating, onRate = param.onRate;
|
|
2033
|
-
return /* @__PURE__ */
|
|
2212
|
+
return /* @__PURE__ */ jsx42("div", {
|
|
2034
2213
|
ref: ref,
|
|
2035
2214
|
className: "flex",
|
|
2036
2215
|
children: [
|
|
@@ -2040,14 +2219,14 @@ var StarRating = React30.forwardRef(function(param, ref) {
|
|
|
2040
2219
|
4,
|
|
2041
2220
|
5
|
|
2042
2221
|
].map(function(star) {
|
|
2043
|
-
return /* @__PURE__ */
|
|
2222
|
+
return /* @__PURE__ */ jsx42(Button, {
|
|
2044
2223
|
onClick: function() {
|
|
2045
2224
|
return onRate(star);
|
|
2046
2225
|
},
|
|
2047
2226
|
variant: "link",
|
|
2048
2227
|
className: "p-1 transition-colors [&_svg]:size-5 h-5",
|
|
2049
2228
|
"aria-label": "Rate ".concat(star, " star").concat(star !== 1 ? "s" : ""),
|
|
2050
|
-
children: /* @__PURE__ */
|
|
2229
|
+
children: /* @__PURE__ */ jsx42(Star, {
|
|
2051
2230
|
className: cn("w-5 h-5", star <= rating ? "alq-rating-star-active fill-current stroke-current" : "alq-rating-star-inactive")
|
|
2052
2231
|
})
|
|
2053
2232
|
}, star);
|
|
@@ -2055,15 +2234,15 @@ var StarRating = React30.forwardRef(function(param, ref) {
|
|
|
2055
2234
|
});
|
|
2056
2235
|
});
|
|
2057
2236
|
StarRating.displayName = "StarRating";
|
|
2058
|
-
var RatingStars =
|
|
2237
|
+
var RatingStars = React33.forwardRef(function(param, ref) {
|
|
2059
2238
|
var _param_currentRating = param.currentRating, currentRating = _param_currentRating === void 0 ? 0 : _param_currentRating, onRate = param.onRate, className = param.className, isLoading = param.isLoading;
|
|
2060
|
-
var
|
|
2061
|
-
var
|
|
2239
|
+
var _React33_useState = _sliced_to_array(React33.useState(false), 2), open = _React33_useState[0], setOpen = _React33_useState[1];
|
|
2240
|
+
var _React33_useState1 = _sliced_to_array(React33.useState(false), 2), animate = _React33_useState1[0], setAnimate = _React33_useState1[1];
|
|
2062
2241
|
var handleRate = function(rating) {
|
|
2063
2242
|
onRate(rating);
|
|
2064
2243
|
setOpen(false);
|
|
2065
2244
|
};
|
|
2066
|
-
|
|
2245
|
+
React33.useEffect(function() {
|
|
2067
2246
|
if (currentRating > 0) {
|
|
2068
2247
|
setAnimate(true);
|
|
2069
2248
|
var timer = setTimeout(function() {
|
|
@@ -2077,14 +2256,14 @@ var RatingStars = React30.forwardRef(function(param, ref) {
|
|
|
2077
2256
|
currentRating
|
|
2078
2257
|
]);
|
|
2079
2258
|
var hasRated = currentRating > 0;
|
|
2080
|
-
return /* @__PURE__ */
|
|
2081
|
-
children: /* @__PURE__ */
|
|
2259
|
+
return /* @__PURE__ */ jsx42(TooltipProvider, {
|
|
2260
|
+
children: /* @__PURE__ */ jsxs17(Tooltip2, {
|
|
2082
2261
|
open: open,
|
|
2083
2262
|
onOpenChange: setOpen,
|
|
2084
2263
|
children: [
|
|
2085
|
-
/* @__PURE__ */
|
|
2264
|
+
/* @__PURE__ */ jsx42(TooltipTrigger, {
|
|
2086
2265
|
asChild: true,
|
|
2087
|
-
children: /* @__PURE__ */
|
|
2266
|
+
children: /* @__PURE__ */ jsx42(Button, {
|
|
2088
2267
|
ref: ref,
|
|
2089
2268
|
variant: "link",
|
|
2090
2269
|
className: cn("inline-flex items-center justify-center rounded-md text-sm font-medium [&_svg]:size-5 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", className),
|
|
@@ -2092,18 +2271,18 @@ var RatingStars = React30.forwardRef(function(param, ref) {
|
|
|
2092
2271
|
onClick: function() {
|
|
2093
2272
|
return setOpen(!open);
|
|
2094
2273
|
},
|
|
2095
|
-
children: /* @__PURE__ */
|
|
2274
|
+
children: /* @__PURE__ */ jsx42(Star, {
|
|
2096
2275
|
className: cn("w-5 h-5 transition-all duration-500", animate && "animate-ping", isLoading && "animate-pulse", hasRated ? "alq-rating-star-active fill-current stroke-current" : "alq-rating-star-inactive")
|
|
2097
2276
|
})
|
|
2098
2277
|
})
|
|
2099
2278
|
}),
|
|
2100
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ jsx42(TooltipContent, {
|
|
2101
2280
|
side: "top",
|
|
2102
2281
|
align: "center",
|
|
2103
2282
|
className: "p-0",
|
|
2104
|
-
children: /* @__PURE__ */
|
|
2283
|
+
children: /* @__PURE__ */ jsx42("div", {
|
|
2105
2284
|
className: "p-2 bg-background",
|
|
2106
|
-
children: /* @__PURE__ */
|
|
2285
|
+
children: /* @__PURE__ */ jsx42(StarRating, {
|
|
2107
2286
|
rating: currentRating,
|
|
2108
2287
|
onRate: handleRate
|
|
2109
2288
|
})
|
|
@@ -2115,13 +2294,13 @@ var RatingStars = React30.forwardRef(function(param, ref) {
|
|
|
2115
2294
|
});
|
|
2116
2295
|
RatingStars.displayName = "RatingStars";
|
|
2117
2296
|
// src/components/molecules/rating-thumbs.tsx
|
|
2118
|
-
import * as
|
|
2297
|
+
import * as React34 from "react";
|
|
2119
2298
|
import { ThumbsUp, ThumbsDown } from "lucide-react";
|
|
2120
|
-
import { jsx as
|
|
2121
|
-
var RatingThumbs =
|
|
2299
|
+
import { jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2300
|
+
var RatingThumbs = React34.forwardRef(function(param, ref) {
|
|
2122
2301
|
var currentRating = param.currentRating, onRate = param.onRate, _param_direction = param.direction, direction = _param_direction === void 0 ? "row" : _param_direction, className = param.className, isLoading = param.isLoading;
|
|
2123
|
-
var
|
|
2124
|
-
|
|
2302
|
+
var _React34_useState = _sliced_to_array(React34.useState(false), 2), animate = _React34_useState[0], setAnimate = _React34_useState[1];
|
|
2303
|
+
React34.useEffect(function() {
|
|
2125
2304
|
if (currentRating) {
|
|
2126
2305
|
setAnimate(true);
|
|
2127
2306
|
var timer = setTimeout(function() {
|
|
@@ -2134,11 +2313,11 @@ var RatingThumbs = React31.forwardRef(function(param, ref) {
|
|
|
2134
2313
|
}, [
|
|
2135
2314
|
currentRating
|
|
2136
2315
|
]);
|
|
2137
|
-
return /* @__PURE__ */
|
|
2316
|
+
return /* @__PURE__ */ jsxs18("div", {
|
|
2138
2317
|
ref: ref,
|
|
2139
2318
|
className: cn("inline-flex", direction === "column" ? "flex-col" : "flex-row", "space-x-1 gap-4", className),
|
|
2140
2319
|
children: [
|
|
2141
|
-
/* @__PURE__ */
|
|
2320
|
+
/* @__PURE__ */ jsx43(Button, {
|
|
2142
2321
|
variant: "link",
|
|
2143
2322
|
onClick: function() {
|
|
2144
2323
|
return onRate(currentRating === "thumbsUp" ? "" : "thumbsUp");
|
|
@@ -2146,11 +2325,11 @@ var RatingThumbs = React31.forwardRef(function(param, ref) {
|
|
|
2146
2325
|
className: cn("p-1 transition-colors disabled:opacity-50 [&_svg]:size-5", "hover:alq-rating-thumbsup/10"),
|
|
2147
2326
|
"aria-label": "Thumbs up",
|
|
2148
2327
|
disabled: isLoading,
|
|
2149
|
-
children: /* @__PURE__ */
|
|
2328
|
+
children: /* @__PURE__ */ jsx43(ThumbsUp, {
|
|
2150
2329
|
className: cn("w-5 h-5 transition-all duration-500", animate && currentRating === "thumbsUp" && "animate-ping", isLoading && "animate-pulse", currentRating === "thumbsUp" ? "alq-rating-thumbsup fill-current stroke-current" : "alq-rating-thumbs-inactive fill-transparent")
|
|
2151
2330
|
})
|
|
2152
2331
|
}),
|
|
2153
|
-
/* @__PURE__ */
|
|
2332
|
+
/* @__PURE__ */ jsx43(Button, {
|
|
2154
2333
|
variant: "link",
|
|
2155
2334
|
onClick: function() {
|
|
2156
2335
|
return onRate(currentRating === "thumbsDown" ? "" : "thumbsDown");
|
|
@@ -2158,7 +2337,7 @@ var RatingThumbs = React31.forwardRef(function(param, ref) {
|
|
|
2158
2337
|
className: cn("p-1 transition-colors disabled:opacity-50 mt-0.5 [&_svg]:size-5", "hover:bg-alq-rating-thumbsdown/10"),
|
|
2159
2338
|
"aria-label": "Thumbs down",
|
|
2160
2339
|
disabled: isLoading,
|
|
2161
|
-
children: /* @__PURE__ */
|
|
2340
|
+
children: /* @__PURE__ */ jsx43(ThumbsDown, {
|
|
2162
2341
|
className: cn("w-5 h-5 transition-all duration-500", animate && currentRating === "thumbsDown" && "animate-ping", isLoading && "animate-pulse", currentRating === "thumbsDown" ? "alq-rating-thumbsdown fill-current stroke-current" : "alq-rating-thumbs-inactive fill-transparent")
|
|
2163
2342
|
})
|
|
2164
2343
|
})
|
|
@@ -2167,19 +2346,19 @@ var RatingThumbs = React31.forwardRef(function(param, ref) {
|
|
|
2167
2346
|
});
|
|
2168
2347
|
RatingThumbs.displayName = "RatingThumbs";
|
|
2169
2348
|
// src/components/molecules/rating-comment.tsx
|
|
2170
|
-
import * as
|
|
2349
|
+
import * as React35 from "react";
|
|
2171
2350
|
import { Book } from "lucide-react";
|
|
2172
|
-
import { jsx as
|
|
2173
|
-
var RatingComment =
|
|
2351
|
+
import { jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2352
|
+
var RatingComment = React35.forwardRef(function(param, ref) {
|
|
2174
2353
|
var currentRating = param.currentRating, onRate = param.onRate, className = param.className, isLoading = param.isLoading;
|
|
2175
|
-
var
|
|
2176
|
-
var
|
|
2177
|
-
var
|
|
2354
|
+
var _React35_useState = _sliced_to_array(React35.useState(false), 2), open = _React35_useState[0], setOpen = _React35_useState[1];
|
|
2355
|
+
var _React35_useState1 = _sliced_to_array(React35.useState(""), 2), comment = _React35_useState1[0], setComment = _React35_useState1[1];
|
|
2356
|
+
var _React35_useState2 = _sliced_to_array(React35.useState(false), 2), animate = _React35_useState2[0], setAnimate = _React35_useState2[1];
|
|
2178
2357
|
var handleRate = function() {
|
|
2179
2358
|
onRate(comment);
|
|
2180
2359
|
setOpen(false);
|
|
2181
2360
|
};
|
|
2182
|
-
|
|
2361
|
+
React35.useEffect(function() {
|
|
2183
2362
|
if (currentRating) {
|
|
2184
2363
|
setAnimate(true);
|
|
2185
2364
|
var timer = setTimeout(function() {
|
|
@@ -2192,39 +2371,39 @@ var RatingComment = React32.forwardRef(function(param, ref) {
|
|
|
2192
2371
|
}, [
|
|
2193
2372
|
currentRating
|
|
2194
2373
|
]);
|
|
2195
|
-
|
|
2374
|
+
React35.useEffect(function() {
|
|
2196
2375
|
setComment("");
|
|
2197
2376
|
}, [
|
|
2198
2377
|
open
|
|
2199
2378
|
]);
|
|
2200
|
-
return /* @__PURE__ */
|
|
2379
|
+
return /* @__PURE__ */ jsxs19(Dialog, {
|
|
2201
2380
|
open: open,
|
|
2202
2381
|
onOpenChange: setOpen,
|
|
2203
2382
|
children: [
|
|
2204
|
-
/* @__PURE__ */
|
|
2383
|
+
/* @__PURE__ */ jsx44(DialogTrigger, {
|
|
2205
2384
|
asChild: true,
|
|
2206
|
-
children: /* @__PURE__ */
|
|
2385
|
+
children: /* @__PURE__ */ jsx44(Button, {
|
|
2207
2386
|
ref: ref,
|
|
2208
2387
|
variant: "link",
|
|
2209
2388
|
size: "lg",
|
|
2210
2389
|
className: cn("inline-flex p-2 items-center justify-center rounded-md text-sm font-medium transition-colors [&_svg]:size-5 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring bg-transparent hover:none disabled:pointer-events-none disabled:opacity-50", className),
|
|
2211
2390
|
disabled: isLoading,
|
|
2212
|
-
children: /* @__PURE__ */
|
|
2391
|
+
children: /* @__PURE__ */ jsx44(Book, {
|
|
2213
2392
|
className: cn("w-5 h-5 transition-all duration-500", animate && "animate-ping", isLoading && "animate-pulse", "".concat(comment ? "alq-rating-comment" : "stroke-gray-400"))
|
|
2214
2393
|
})
|
|
2215
2394
|
})
|
|
2216
2395
|
}),
|
|
2217
|
-
/* @__PURE__ */
|
|
2396
|
+
/* @__PURE__ */ jsx44(DialogOverlay, {
|
|
2218
2397
|
className: "fixed inset-0 bg-black bg-opacity-50"
|
|
2219
2398
|
}),
|
|
2220
|
-
/* @__PURE__ */
|
|
2399
|
+
/* @__PURE__ */ jsxs19(DialogContent, {
|
|
2221
2400
|
"aria-describedby": void 0,
|
|
2222
2401
|
children: [
|
|
2223
|
-
/* @__PURE__ */
|
|
2402
|
+
/* @__PURE__ */ jsx44(DialogTitle, {
|
|
2224
2403
|
className: "text-lg font-medium",
|
|
2225
2404
|
children: "Deja un comentario"
|
|
2226
2405
|
}),
|
|
2227
|
-
/* @__PURE__ */
|
|
2406
|
+
/* @__PURE__ */ jsx44("textarea", {
|
|
2228
2407
|
className: "mt-4 w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary",
|
|
2229
2408
|
rows: 4,
|
|
2230
2409
|
value: comment,
|
|
@@ -2232,9 +2411,9 @@ var RatingComment = React32.forwardRef(function(param, ref) {
|
|
|
2232
2411
|
return setComment(e.target.value);
|
|
2233
2412
|
}
|
|
2234
2413
|
}),
|
|
2235
|
-
/* @__PURE__ */
|
|
2414
|
+
/* @__PURE__ */ jsx44("div", {
|
|
2236
2415
|
className: "mt-4 flex justify-end",
|
|
2237
|
-
children: /* @__PURE__ */
|
|
2416
|
+
children: /* @__PURE__ */ jsx44(Button, {
|
|
2238
2417
|
onClick: handleRate,
|
|
2239
2418
|
disabled: !comment,
|
|
2240
2419
|
children: "Enviar"
|
|
@@ -2247,8 +2426,8 @@ var RatingComment = React32.forwardRef(function(param, ref) {
|
|
|
2247
2426
|
});
|
|
2248
2427
|
RatingComment.displayName = "RatingComment";
|
|
2249
2428
|
// src/components/molecules/call-out.tsx
|
|
2250
|
-
import * as
|
|
2251
|
-
import { ChevronDown as
|
|
2429
|
+
import * as React36 from "react";
|
|
2430
|
+
import { ChevronDown as ChevronDown4, ChevronUp as ChevronUp2 } from "lucide-react";
|
|
2252
2431
|
// src/components/hooks/use-text-streaming.ts
|
|
2253
2432
|
import { useState as useState8, useEffect as useEffect8, useRef, useCallback as useCallback2 } from "react";
|
|
2254
2433
|
var CHAR_DELAY = 15;
|
|
@@ -2312,14 +2491,14 @@ function useTextStreaming(content, shouldStream, handleIsTextStreaming) {
|
|
|
2312
2491
|
return displayedText;
|
|
2313
2492
|
}
|
|
2314
2493
|
// src/components/molecules/call-out.tsx
|
|
2315
|
-
import { jsx as
|
|
2316
|
-
var CallOut =
|
|
2494
|
+
import { jsx as jsx45, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2495
|
+
var CallOut = React36.forwardRef(function(_param, ref) {
|
|
2317
2496
|
var className = _param.className, children = _param.children, role = _param.role, props = _object_without_properties(_param, [
|
|
2318
2497
|
"className",
|
|
2319
2498
|
"children",
|
|
2320
2499
|
"role"
|
|
2321
2500
|
]);
|
|
2322
|
-
return /* @__PURE__ */
|
|
2501
|
+
return /* @__PURE__ */ jsx45("div", _object_spread_props(_object_spread({
|
|
2323
2502
|
ref: ref,
|
|
2324
2503
|
className: cn("alq--callout-box", className),
|
|
2325
2504
|
"data-role": role
|
|
@@ -2327,41 +2506,41 @@ var CallOut = React33.forwardRef(function(_param, ref) {
|
|
|
2327
2506
|
children: children
|
|
2328
2507
|
}));
|
|
2329
2508
|
});
|
|
2330
|
-
var CallOutDate =
|
|
2509
|
+
var CallOutDate = React36.forwardRef(function(_param, ref) {
|
|
2331
2510
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
2332
2511
|
"className",
|
|
2333
2512
|
"children"
|
|
2334
2513
|
]);
|
|
2335
|
-
return /* @__PURE__ */
|
|
2514
|
+
return /* @__PURE__ */ jsx45("div", _object_spread_props(_object_spread({
|
|
2336
2515
|
ref: ref,
|
|
2337
2516
|
className: cn("alq--callout-date", "text-sm text-muted-foreground", className)
|
|
2338
2517
|
}, props), {
|
|
2339
2518
|
children: children
|
|
2340
2519
|
}));
|
|
2341
2520
|
});
|
|
2342
|
-
var CallOutActions =
|
|
2521
|
+
var CallOutActions = React36.forwardRef(function(_param, ref) {
|
|
2343
2522
|
var className = _param.className, actions = _param.actions, role = _param.role, message = _param.message, props = _object_without_properties(_param, [
|
|
2344
2523
|
"className",
|
|
2345
2524
|
"actions",
|
|
2346
2525
|
"role",
|
|
2347
2526
|
"message"
|
|
2348
2527
|
]);
|
|
2349
|
-
var
|
|
2350
|
-
var
|
|
2528
|
+
var _React36_useState = _sliced_to_array(React36.useState(false), 2), isLoading = _React36_useState[0], setIsLoading = _React36_useState[1];
|
|
2529
|
+
var _React36_useState1 = _sliced_to_array(React36.useState(false), 2), isClicked = _React36_useState1[0], setIsClicked = _React36_useState1[1];
|
|
2351
2530
|
if (role === "user") {
|
|
2352
2531
|
return null;
|
|
2353
2532
|
}
|
|
2354
|
-
return /* @__PURE__ */
|
|
2533
|
+
return /* @__PURE__ */ jsx45("div", _object_spread_props(_object_spread({
|
|
2355
2534
|
ref: ref,
|
|
2356
2535
|
className: cn("alq--callout-actions", className)
|
|
2357
2536
|
}, props), {
|
|
2358
2537
|
children: actions.map(function(action) {
|
|
2359
2538
|
var _action_component;
|
|
2360
|
-
return action.custom ? /* @__PURE__ */
|
|
2539
|
+
return action.custom ? /* @__PURE__ */ jsx45(React36.Fragment, {
|
|
2361
2540
|
children: (_action_component = action.component) === null || _action_component === void 0 ? void 0 : _action_component.call(action, {
|
|
2362
2541
|
message: message
|
|
2363
2542
|
})
|
|
2364
|
-
}, action.label) : /* @__PURE__ */
|
|
2543
|
+
}, action.label) : /* @__PURE__ */ jsxs20("button", {
|
|
2365
2544
|
className: cn("alq--callout-action", {
|
|
2366
2545
|
"alq--callout-animate-action": isLoading
|
|
2367
2546
|
}, {
|
|
@@ -2377,13 +2556,13 @@ var CallOutActions = React33.forwardRef(function(_param, ref) {
|
|
|
2377
2556
|
});
|
|
2378
2557
|
},
|
|
2379
2558
|
children: [
|
|
2380
|
-
/* @__PURE__ */
|
|
2559
|
+
/* @__PURE__ */ jsx45("span", {
|
|
2381
2560
|
className: cn("alq-action-icon-wrapper", {
|
|
2382
2561
|
"alq--callout-animate-action": isLoading
|
|
2383
2562
|
}),
|
|
2384
2563
|
children: action.icon
|
|
2385
2564
|
}),
|
|
2386
|
-
/* @__PURE__ */
|
|
2565
|
+
/* @__PURE__ */ jsx45("label", {
|
|
2387
2566
|
children: action.label
|
|
2388
2567
|
})
|
|
2389
2568
|
]
|
|
@@ -2391,7 +2570,7 @@ var CallOutActions = React33.forwardRef(function(_param, ref) {
|
|
|
2391
2570
|
})
|
|
2392
2571
|
}));
|
|
2393
2572
|
});
|
|
2394
|
-
var CallOutResponse =
|
|
2573
|
+
var CallOutResponse = React36.forwardRef(function(_param, ref) {
|
|
2395
2574
|
var className = _param.className, children = _param.children, role = _param.role, additionalInfo = _param.additionalInfo, toggleAdditionalInfo = _param.toggleAdditionalInfo, isStreaming = _param.isStreaming, handleIsTextStreaming = _param.handleIsTextStreaming, props = _object_without_properties(_param, [
|
|
2396
2575
|
"className",
|
|
2397
2576
|
"children",
|
|
@@ -2401,29 +2580,29 @@ var CallOutResponse = React33.forwardRef(function(_param, ref) {
|
|
|
2401
2580
|
"isStreaming",
|
|
2402
2581
|
"handleIsTextStreaming"
|
|
2403
2582
|
]);
|
|
2404
|
-
var
|
|
2583
|
+
var _React36_useState = _sliced_to_array(React36.useState(false), 2), isAdditionalInfoOpen = _React36_useState[0], setIsAdditionalInfoOpen = _React36_useState[1];
|
|
2405
2584
|
var content = String(children || "");
|
|
2406
2585
|
var shouldStream = role === "assistant" && isStreaming;
|
|
2407
2586
|
var displayedContent = useTextStreaming(content, shouldStream !== null && shouldStream !== void 0 ? shouldStream : false, handleIsTextStreaming);
|
|
2408
2587
|
var showAsToggle = additionalInfo && toggleAdditionalInfo;
|
|
2409
2588
|
var showInline = additionalInfo && !toggleAdditionalInfo;
|
|
2410
|
-
return /* @__PURE__ */
|
|
2589
|
+
return /* @__PURE__ */ jsxs20("div", _object_spread_props(_object_spread({
|
|
2411
2590
|
ref: ref,
|
|
2412
2591
|
"data-role": role,
|
|
2413
2592
|
className: cn("alq--callout-response", "max-w-none", "text-foreground", className)
|
|
2414
2593
|
}, props), {
|
|
2415
2594
|
children: [
|
|
2416
|
-
/* @__PURE__ */
|
|
2595
|
+
/* @__PURE__ */ jsx45(RichText, {
|
|
2417
2596
|
content: displayedContent
|
|
2418
2597
|
}),
|
|
2419
|
-
showInline && /* @__PURE__ */
|
|
2598
|
+
showInline && /* @__PURE__ */ jsx45("div", {
|
|
2420
2599
|
className: cn("alq--callout-response-additional-info", "mt-2 text-sm text-muted-foreground whitespace-pre-line", "border-t border-border pt-2"),
|
|
2421
2600
|
children: additionalInfo
|
|
2422
2601
|
}),
|
|
2423
|
-
showAsToggle && /* @__PURE__ */
|
|
2602
|
+
showAsToggle && /* @__PURE__ */ jsxs20("div", {
|
|
2424
2603
|
className: cn("alq--callout-response-additional-info", "mt-2 border-t border-border pt-2"),
|
|
2425
2604
|
children: [
|
|
2426
|
-
/* @__PURE__ */
|
|
2605
|
+
/* @__PURE__ */ jsxs20(Button, {
|
|
2427
2606
|
type: "button",
|
|
2428
2607
|
variant: "ghost",
|
|
2429
2608
|
size: "sm",
|
|
@@ -2435,19 +2614,19 @@ var CallOutResponse = React33.forwardRef(function(_param, ref) {
|
|
|
2435
2614
|
},
|
|
2436
2615
|
"aria-expanded": isAdditionalInfoOpen,
|
|
2437
2616
|
children: [
|
|
2438
|
-
isAdditionalInfoOpen ? /* @__PURE__ */
|
|
2617
|
+
isAdditionalInfoOpen ? /* @__PURE__ */ jsx45(ChevronUp2, {
|
|
2439
2618
|
className: "h-4 w-4 mr-1.5 shrink-0 transition-transform"
|
|
2440
|
-
}) : /* @__PURE__ */
|
|
2619
|
+
}) : /* @__PURE__ */ jsx45(ChevronDown4, {
|
|
2441
2620
|
className: "h-4 w-4 mr-1.5 shrink-0 transition-transform"
|
|
2442
2621
|
}),
|
|
2443
2622
|
isAdditionalInfoOpen ? "Hide details" : "Show details"
|
|
2444
2623
|
]
|
|
2445
2624
|
}),
|
|
2446
|
-
/* @__PURE__ */
|
|
2625
|
+
/* @__PURE__ */ jsx45("div", {
|
|
2447
2626
|
className: cn("grid transition-[grid-template-rows] duration-200 ease-out", isAdditionalInfoOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
|
|
2448
|
-
children: /* @__PURE__ */
|
|
2627
|
+
children: /* @__PURE__ */ jsx45("div", {
|
|
2449
2628
|
className: "overflow-hidden",
|
|
2450
|
-
children: /* @__PURE__ */
|
|
2629
|
+
children: /* @__PURE__ */ jsx45("div", {
|
|
2451
2630
|
className: "text-sm text-muted-foreground pt-1 whitespace-pre-line",
|
|
2452
2631
|
children: additionalInfo
|
|
2453
2632
|
})
|
|
@@ -2462,5 +2641,5 @@ CallOut.displayName = "CallOut";
|
|
|
2462
2641
|
CallOutDate.displayName = "CallOutDate";
|
|
2463
2642
|
CallOutActions.displayName = "CallOutActions";
|
|
2464
2643
|
CallOutResponse.displayName = "CallOutResponse";
|
|
2465
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AssistantButton, CallOut, CallOutActions, CallOutDate, CallOutResponse, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageContainer, RatingComment, RatingStars, RatingThumbs, Sidebar, SidebarFooter, Toaster as SonnerToaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, navigationMenuTriggerStyle };
|
|
2644
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AssistantButton, CallOut, CallOutActions, CallOutDate, CallOutResponse, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageContainer, RatingComment, RatingStars, RatingThumbs, Sidebar, SidebarFooter, Toaster as SonnerToaster, Tooltip2 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, navigationMenuTriggerStyle };
|
|
2466
2645
|
//# sourceMappingURL=index.mjs.map
|