@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
|
@@ -316,7 +316,7 @@ __export(molecules_exports, {
|
|
|
316
316
|
return Toaster;
|
|
317
317
|
},
|
|
318
318
|
Tooltip: function() {
|
|
319
|
-
return
|
|
319
|
+
return Tooltip2;
|
|
320
320
|
},
|
|
321
321
|
TooltipContent: function() {
|
|
322
322
|
return TooltipContent;
|
|
@@ -495,7 +495,7 @@ var AlertDialogCancel = React2.forwardRef(function(_param, ref) {
|
|
|
495
495
|
});
|
|
496
496
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
497
497
|
// src/components/molecules/assistant-button.tsx
|
|
498
|
-
var
|
|
498
|
+
var React29 = __toESM(require("react"));
|
|
499
499
|
var import_react5 = require("react");
|
|
500
500
|
// src/components/atoms/ui/textarea.tsx
|
|
501
501
|
var React3 = __toESM(require("react"));
|
|
@@ -1730,17 +1730,196 @@ var ThinkIndicator = React25.forwardRef(function(_param, ref) {
|
|
|
1730
1730
|
}));
|
|
1731
1731
|
});
|
|
1732
1732
|
ThinkIndicator.displayName = "ThinkIndicator";
|
|
1733
|
-
// src/components/
|
|
1733
|
+
// src/components/atoms/ui/accordion.tsx
|
|
1734
|
+
var React26 = __toESM(require("react"));
|
|
1735
|
+
var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"));
|
|
1736
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1734
1737
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1735
|
-
var
|
|
1738
|
+
var AccordionItem = React26.forwardRef(function(_param, ref) {
|
|
1739
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1740
|
+
"className"
|
|
1741
|
+
]);
|
|
1742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(AccordionPrimitive.Item, _object_spread({
|
|
1743
|
+
ref: ref,
|
|
1744
|
+
className: cn("border-b", className)
|
|
1745
|
+
}, props));
|
|
1746
|
+
});
|
|
1747
|
+
AccordionItem.displayName = "AccordionItem";
|
|
1748
|
+
var AccordionTrigger = React26.forwardRef(function(_param, ref) {
|
|
1749
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1750
|
+
"className",
|
|
1751
|
+
"children"
|
|
1752
|
+
]);
|
|
1753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(AccordionPrimitive.Header, {
|
|
1754
|
+
className: "flex",
|
|
1755
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(AccordionPrimitive.Trigger, _object_spread_props(_object_spread({
|
|
1756
|
+
ref: ref,
|
|
1757
|
+
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)
|
|
1758
|
+
}, props), {
|
|
1759
|
+
children: [
|
|
1760
|
+
children,
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react8.ChevronDown, {
|
|
1762
|
+
className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"
|
|
1763
|
+
})
|
|
1764
|
+
]
|
|
1765
|
+
}))
|
|
1766
|
+
});
|
|
1767
|
+
});
|
|
1768
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
1769
|
+
var AccordionContent = React26.forwardRef(function(_param, ref) {
|
|
1770
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1771
|
+
"className",
|
|
1772
|
+
"children"
|
|
1773
|
+
]);
|
|
1774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(AccordionPrimitive.Content, _object_spread_props(_object_spread({
|
|
1775
|
+
ref: ref,
|
|
1776
|
+
className: "overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
1777
|
+
}, props), {
|
|
1778
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", {
|
|
1779
|
+
className: cn("pb-4 pt-0", className),
|
|
1780
|
+
children: children
|
|
1781
|
+
})
|
|
1782
|
+
}));
|
|
1783
|
+
});
|
|
1784
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
1785
|
+
// src/components/atoms/ui/radio-group.tsx
|
|
1786
|
+
var React27 = __toESM(require("react"));
|
|
1787
|
+
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
1788
|
+
var import_lucide_react9 = require("lucide-react");
|
|
1789
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1790
|
+
var RadioGroup = React27.forwardRef(function(_param, ref) {
|
|
1791
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1792
|
+
"className"
|
|
1793
|
+
]);
|
|
1794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadioGroupPrimitive.Root, _object_spread({
|
|
1795
|
+
ref: ref,
|
|
1796
|
+
className: cn("grid gap-2", className)
|
|
1797
|
+
}, props));
|
|
1798
|
+
});
|
|
1799
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
1800
|
+
var RadioGroupItem = React27.forwardRef(function(_param, ref) {
|
|
1801
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1802
|
+
"className"
|
|
1803
|
+
]);
|
|
1804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadioGroupPrimitive.Item, _object_spread_props(_object_spread({
|
|
1805
|
+
ref: ref,
|
|
1806
|
+
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)
|
|
1807
|
+
}, props), {
|
|
1808
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadioGroupPrimitive.Indicator, {
|
|
1809
|
+
className: "flex items-center justify-center",
|
|
1810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react9.Circle, {
|
|
1811
|
+
className: "h-2.5 w-2.5 fill-current text-current"
|
|
1812
|
+
})
|
|
1813
|
+
})
|
|
1814
|
+
}));
|
|
1815
|
+
});
|
|
1816
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
1817
|
+
// src/components/atoms/ui/progress.tsx
|
|
1818
|
+
var React28 = __toESM(require("react"));
|
|
1819
|
+
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
|
|
1820
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1821
|
+
var Progress = React28.forwardRef(function(_param, ref) {
|
|
1822
|
+
var className = _param.className, value = _param.value, props = _object_without_properties(_param, [
|
|
1823
|
+
"className",
|
|
1824
|
+
"value"
|
|
1825
|
+
]);
|
|
1826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ProgressPrimitive.Root, _object_spread_props(_object_spread({
|
|
1827
|
+
ref: ref,
|
|
1828
|
+
className: cn("relative h-2 w-full overflow-hidden rounded-full bg-muted", className)
|
|
1829
|
+
}, props), {
|
|
1830
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ProgressPrimitive.Indicator, {
|
|
1831
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
1832
|
+
style: {
|
|
1833
|
+
transform: "translateX(-".concat(100 - (value || 0), "%)")
|
|
1834
|
+
}
|
|
1835
|
+
})
|
|
1836
|
+
}));
|
|
1837
|
+
});
|
|
1838
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
1839
|
+
// src/components/atoms/ui/calendar.tsx
|
|
1840
|
+
var import_lucide_react10 = require("lucide-react");
|
|
1841
|
+
var import_react_day_picker = require("react-day-picker");
|
|
1842
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1843
|
+
function Calendar(_param) {
|
|
1844
|
+
var className = _param.className, classNames = _param.classNames, _param_showOutsideDays = _param.showOutsideDays, showOutsideDays = _param_showOutsideDays === void 0 ? true : _param_showOutsideDays, props = _object_without_properties(_param, [
|
|
1845
|
+
"className",
|
|
1846
|
+
"classNames",
|
|
1847
|
+
"showOutsideDays"
|
|
1848
|
+
]);
|
|
1849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_day_picker.DayPicker, _object_spread({
|
|
1850
|
+
showOutsideDays: showOutsideDays,
|
|
1851
|
+
className: cn("p-3", className),
|
|
1852
|
+
classNames: _object_spread({
|
|
1853
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
1854
|
+
month: "space-y-4",
|
|
1855
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
1856
|
+
caption_label: "text-sm font-medium",
|
|
1857
|
+
nav: "space-x-1 flex items-center",
|
|
1858
|
+
nav_button: cn(buttonVariants({
|
|
1859
|
+
variant: "outline"
|
|
1860
|
+
}), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
|
|
1861
|
+
nav_button_previous: "absolute left-1",
|
|
1862
|
+
nav_button_next: "absolute right-1",
|
|
1863
|
+
table: "w-full border-collapse space-y-1",
|
|
1864
|
+
head_row: "flex",
|
|
1865
|
+
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
1866
|
+
row: "flex w-full mt-2",
|
|
1867
|
+
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",
|
|
1868
|
+
day: cn(buttonVariants({
|
|
1869
|
+
variant: "ghost"
|
|
1870
|
+
}), "h-9 w-9 p-0 font-normal aria-selected:opacity-100"),
|
|
1871
|
+
day_range_end: "day-range-end",
|
|
1872
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
1873
|
+
day_today: "bg-accent text-accent-foreground",
|
|
1874
|
+
day_outside: "day-outside text-muted-foreground opacity-50",
|
|
1875
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
1876
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
1877
|
+
day_hidden: "invisible"
|
|
1878
|
+
}, classNames),
|
|
1879
|
+
components: {
|
|
1880
|
+
IconLeft: function() {
|
|
1881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react10.ChevronLeft, {
|
|
1882
|
+
className: "h-4 w-4"
|
|
1883
|
+
});
|
|
1884
|
+
},
|
|
1885
|
+
IconRight: function() {
|
|
1886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react10.ChevronRight, {
|
|
1887
|
+
className: "h-4 w-4"
|
|
1888
|
+
});
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
}, props));
|
|
1892
|
+
}
|
|
1893
|
+
Calendar.displayName = "Calendar";
|
|
1894
|
+
// src/components/atoms/ui/chart.tsx
|
|
1895
|
+
var import_recharts = require("recharts");
|
|
1896
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1897
|
+
function Chart(param) {
|
|
1898
|
+
var className = param.className, _param_height = param.height, height = _param_height === void 0 ? 300 : _param_height, children = param.children;
|
|
1899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", {
|
|
1900
|
+
className: cn("w-full", className),
|
|
1901
|
+
style: {
|
|
1902
|
+
height: height
|
|
1903
|
+
},
|
|
1904
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_recharts.ResponsiveContainer, {
|
|
1905
|
+
width: "100%",
|
|
1906
|
+
height: "100%",
|
|
1907
|
+
children: children
|
|
1908
|
+
})
|
|
1909
|
+
});
|
|
1910
|
+
}
|
|
1911
|
+
Chart.displayName = "Chart";
|
|
1912
|
+
// src/components/molecules/assistant-button.tsx
|
|
1913
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1914
|
+
var AssistantSuggestions = React29.forwardRef(function(param, ref) {
|
|
1736
1915
|
var suggestions = param.suggestions, showSuggestions = param.showSuggestions, className = param.className;
|
|
1737
|
-
return /* @__PURE__ */ (0,
|
|
1916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", {
|
|
1738
1917
|
ref: ref,
|
|
1739
1918
|
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),
|
|
1740
|
-
children: /* @__PURE__ */ (0,
|
|
1919
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", {
|
|
1741
1920
|
className: "rounded-lg p-2 pr-0 w-64",
|
|
1742
1921
|
children: suggestions.map(function(suggestion, index) {
|
|
1743
|
-
return /* @__PURE__ */ (0,
|
|
1922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("button", {
|
|
1744
1923
|
onClick: function() {
|
|
1745
1924
|
var _suggestion_action;
|
|
1746
1925
|
return (_suggestion_action = suggestion.action) === null || _suggestion_action === void 0 ? void 0 : _suggestion_action.call(suggestion);
|
|
@@ -1750,10 +1929,10 @@ var AssistantSuggestions = React26.forwardRef(function(param, ref) {
|
|
|
1750
1929
|
},
|
|
1751
1930
|
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"),
|
|
1752
1931
|
children: [
|
|
1753
|
-
/* @__PURE__ */ (0,
|
|
1932
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(suggestion.icon, {
|
|
1754
1933
|
className: "w-5 h-5 text-primary"
|
|
1755
1934
|
}),
|
|
1756
|
-
/* @__PURE__ */ (0,
|
|
1935
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", {
|
|
1757
1936
|
className: "text-xs whitespace-nowrap font-normal",
|
|
1758
1937
|
children: suggestion.label
|
|
1759
1938
|
})
|
|
@@ -1764,7 +1943,7 @@ var AssistantSuggestions = React26.forwardRef(function(param, ref) {
|
|
|
1764
1943
|
});
|
|
1765
1944
|
});
|
|
1766
1945
|
AssistantSuggestions.displayName = "Suggestions";
|
|
1767
|
-
var AssistantButton =
|
|
1946
|
+
var AssistantButton = React29.forwardRef(function(param, ref) {
|
|
1768
1947
|
var Icon2 = param.icon, clickAction = param.clickAction, className = param.className, _param_suggestions = param.suggestions, suggestions = _param_suggestions === void 0 ? [] : _param_suggestions;
|
|
1769
1948
|
var _ref = _sliced_to_array((0, import_react5.useState)(false), 2), isVisible = _ref[0], setIsVisible = _ref[1];
|
|
1770
1949
|
var _ref1 = _sliced_to_array((0, import_react5.useState)(false), 2), showSuggestions = _ref1[0], setShowSuggestions = _ref1[1];
|
|
@@ -1782,24 +1961,24 @@ var AssistantButton = React26.forwardRef(function(param, ref) {
|
|
|
1782
1961
|
return setIsVisible(false);
|
|
1783
1962
|
}, 300);
|
|
1784
1963
|
};
|
|
1785
|
-
return /* @__PURE__ */ (0,
|
|
1964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", {
|
|
1786
1965
|
ref: ref,
|
|
1787
1966
|
className: cn("fixed bottom-8 right-4 z-50", "alq--assistant-button-container", className),
|
|
1788
1967
|
onMouseEnter: handleMouseEnter,
|
|
1789
1968
|
onMouseLeave: handleMouseLeave,
|
|
1790
|
-
children: /* @__PURE__ */ (0,
|
|
1969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", {
|
|
1791
1970
|
className: "relative group",
|
|
1792
1971
|
children: [
|
|
1793
|
-
isVisible && suggestions.length > 0 && /* @__PURE__ */ (0,
|
|
1972
|
+
isVisible && suggestions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AssistantSuggestions, {
|
|
1794
1973
|
suggestions: suggestions,
|
|
1795
1974
|
showSuggestions: showSuggestions
|
|
1796
1975
|
}),
|
|
1797
|
-
/* @__PURE__ */ (0,
|
|
1976
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Button, {
|
|
1798
1977
|
variant: "outline",
|
|
1799
1978
|
size: "sm",
|
|
1800
1979
|
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"),
|
|
1801
1980
|
onClick: clickAction,
|
|
1802
|
-
children: /* @__PURE__ */ (0,
|
|
1981
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon2, {
|
|
1803
1982
|
style: {
|
|
1804
1983
|
width: "22px",
|
|
1805
1984
|
height: "22px"
|
|
@@ -1813,19 +1992,19 @@ var AssistantButton = React26.forwardRef(function(param, ref) {
|
|
|
1813
1992
|
});
|
|
1814
1993
|
AssistantButton.displayName = "AssistantButton";
|
|
1815
1994
|
// src/components/molecules/carousel.tsx
|
|
1816
|
-
var
|
|
1995
|
+
var React30 = __toESM(require("react"));
|
|
1817
1996
|
var import_embla_carousel_react = __toESM(require("embla-carousel-react"));
|
|
1818
|
-
var
|
|
1819
|
-
var
|
|
1820
|
-
var CarouselContext =
|
|
1997
|
+
var import_lucide_react11 = require("lucide-react");
|
|
1998
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1999
|
+
var CarouselContext = React30.createContext(null);
|
|
1821
2000
|
function useCarousel() {
|
|
1822
|
-
var context =
|
|
2001
|
+
var context = React30.useContext(CarouselContext);
|
|
1823
2002
|
if (!context) {
|
|
1824
2003
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
1825
2004
|
}
|
|
1826
2005
|
return context;
|
|
1827
2006
|
}
|
|
1828
|
-
var Carousel =
|
|
2007
|
+
var Carousel = React30.forwardRef(function(_param, ref) {
|
|
1829
2008
|
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, [
|
|
1830
2009
|
"orientation",
|
|
1831
2010
|
"opts",
|
|
@@ -1837,26 +2016,26 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
1837
2016
|
var _ref = _sliced_to_array((0, import_embla_carousel_react.default)(_object_spread_props(_object_spread({}, opts), {
|
|
1838
2017
|
axis: orientation === "horizontal" ? "x" : "y"
|
|
1839
2018
|
}), plugins), 2), carouselRef = _ref[0], api = _ref[1];
|
|
1840
|
-
var
|
|
1841
|
-
var
|
|
1842
|
-
var onSelect =
|
|
2019
|
+
var _React30_useState = _sliced_to_array(React30.useState(false), 2), canScrollPrev = _React30_useState[0], setCanScrollPrev = _React30_useState[1];
|
|
2020
|
+
var _React30_useState1 = _sliced_to_array(React30.useState(false), 2), canScrollNext = _React30_useState1[0], setCanScrollNext = _React30_useState1[1];
|
|
2021
|
+
var onSelect = React30.useCallback(function(api2) {
|
|
1843
2022
|
if (!api2) {
|
|
1844
2023
|
return;
|
|
1845
2024
|
}
|
|
1846
2025
|
setCanScrollPrev(api2.canScrollPrev());
|
|
1847
2026
|
setCanScrollNext(api2.canScrollNext());
|
|
1848
2027
|
}, []);
|
|
1849
|
-
var scrollPrev =
|
|
2028
|
+
var scrollPrev = React30.useCallback(function() {
|
|
1850
2029
|
api === null || api === void 0 ? void 0 : api.scrollPrev();
|
|
1851
2030
|
}, [
|
|
1852
2031
|
api
|
|
1853
2032
|
]);
|
|
1854
|
-
var scrollNext =
|
|
2033
|
+
var scrollNext = React30.useCallback(function() {
|
|
1855
2034
|
api === null || api === void 0 ? void 0 : api.scrollNext();
|
|
1856
2035
|
}, [
|
|
1857
2036
|
api
|
|
1858
2037
|
]);
|
|
1859
|
-
var handleKeyDown =
|
|
2038
|
+
var handleKeyDown = React30.useCallback(function(event) {
|
|
1860
2039
|
if (event.key === "ArrowLeft") {
|
|
1861
2040
|
event.preventDefault();
|
|
1862
2041
|
scrollPrev();
|
|
@@ -1868,7 +2047,7 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
1868
2047
|
scrollPrev,
|
|
1869
2048
|
scrollNext
|
|
1870
2049
|
]);
|
|
1871
|
-
|
|
2050
|
+
React30.useEffect(function() {
|
|
1872
2051
|
if (!api || !setApi) {
|
|
1873
2052
|
return;
|
|
1874
2053
|
}
|
|
@@ -1877,7 +2056,7 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
1877
2056
|
api,
|
|
1878
2057
|
setApi
|
|
1879
2058
|
]);
|
|
1880
|
-
|
|
2059
|
+
React30.useEffect(function() {
|
|
1881
2060
|
if (!api) {
|
|
1882
2061
|
return;
|
|
1883
2062
|
}
|
|
@@ -1891,7 +2070,7 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
1891
2070
|
api,
|
|
1892
2071
|
onSelect
|
|
1893
2072
|
]);
|
|
1894
|
-
return /* @__PURE__ */ (0,
|
|
2073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CarouselContext.Provider, {
|
|
1895
2074
|
value: {
|
|
1896
2075
|
carouselRef: carouselRef,
|
|
1897
2076
|
api: api,
|
|
@@ -1902,7 +2081,7 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
1902
2081
|
canScrollPrev: canScrollPrev,
|
|
1903
2082
|
canScrollNext: canScrollNext
|
|
1904
2083
|
},
|
|
1905
|
-
children: /* @__PURE__ */ (0,
|
|
2084
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", _object_spread_props(_object_spread({
|
|
1906
2085
|
ref: ref,
|
|
1907
2086
|
onKeyDownCapture: handleKeyDown,
|
|
1908
2087
|
className: cn("relative", className),
|
|
@@ -1914,27 +2093,27 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
1914
2093
|
});
|
|
1915
2094
|
});
|
|
1916
2095
|
Carousel.displayName = "Carousel";
|
|
1917
|
-
var CarouselContent =
|
|
2096
|
+
var CarouselContent = React30.forwardRef(function(_param, ref) {
|
|
1918
2097
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1919
2098
|
"className"
|
|
1920
2099
|
]);
|
|
1921
2100
|
var _useCarousel = useCarousel(), carouselRef = _useCarousel.carouselRef, orientation = _useCarousel.orientation;
|
|
1922
|
-
return /* @__PURE__ */ (0,
|
|
2101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", {
|
|
1923
2102
|
ref: carouselRef,
|
|
1924
2103
|
className: "overflow-hidden",
|
|
1925
|
-
children: /* @__PURE__ */ (0,
|
|
2104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", _object_spread({
|
|
1926
2105
|
ref: ref,
|
|
1927
2106
|
className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className)
|
|
1928
2107
|
}, props))
|
|
1929
2108
|
});
|
|
1930
2109
|
});
|
|
1931
2110
|
CarouselContent.displayName = "CarouselContent";
|
|
1932
|
-
var CarouselItem =
|
|
2111
|
+
var CarouselItem = React30.forwardRef(function(_param, ref) {
|
|
1933
2112
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1934
2113
|
"className"
|
|
1935
2114
|
]);
|
|
1936
2115
|
var orientation = useCarousel().orientation;
|
|
1937
|
-
return /* @__PURE__ */ (0,
|
|
2116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", _object_spread({
|
|
1938
2117
|
ref: ref,
|
|
1939
2118
|
role: "group",
|
|
1940
2119
|
"aria-roledescription": "slide",
|
|
@@ -1942,14 +2121,14 @@ var CarouselItem = React27.forwardRef(function(_param, ref) {
|
|
|
1942
2121
|
}, props));
|
|
1943
2122
|
});
|
|
1944
2123
|
CarouselItem.displayName = "CarouselItem";
|
|
1945
|
-
var CarouselPrevious =
|
|
2124
|
+
var CarouselPrevious = React30.forwardRef(function(_param, ref) {
|
|
1946
2125
|
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, [
|
|
1947
2126
|
"className",
|
|
1948
2127
|
"variant",
|
|
1949
2128
|
"size"
|
|
1950
2129
|
]);
|
|
1951
2130
|
var _useCarousel = useCarousel(), orientation = _useCarousel.orientation, scrollPrev = _useCarousel.scrollPrev, canScrollPrev = _useCarousel.canScrollPrev;
|
|
1952
|
-
return /* @__PURE__ */ (0,
|
|
2131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Button, _object_spread_props(_object_spread({
|
|
1953
2132
|
ref: ref,
|
|
1954
2133
|
variant: variant,
|
|
1955
2134
|
size: size,
|
|
@@ -1958,10 +2137,10 @@ var CarouselPrevious = React27.forwardRef(function(_param, ref) {
|
|
|
1958
2137
|
onClick: scrollPrev
|
|
1959
2138
|
}, props), {
|
|
1960
2139
|
children: [
|
|
1961
|
-
/* @__PURE__ */ (0,
|
|
2140
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react11.ArrowLeft, {
|
|
1962
2141
|
className: "h-4 w-4"
|
|
1963
2142
|
}),
|
|
1964
|
-
/* @__PURE__ */ (0,
|
|
2143
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", {
|
|
1965
2144
|
className: "sr-only",
|
|
1966
2145
|
children: "Previous slide"
|
|
1967
2146
|
})
|
|
@@ -1969,14 +2148,14 @@ var CarouselPrevious = React27.forwardRef(function(_param, ref) {
|
|
|
1969
2148
|
}));
|
|
1970
2149
|
});
|
|
1971
2150
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
1972
|
-
var CarouselNext =
|
|
2151
|
+
var CarouselNext = React30.forwardRef(function(_param, ref) {
|
|
1973
2152
|
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, [
|
|
1974
2153
|
"className",
|
|
1975
2154
|
"variant",
|
|
1976
2155
|
"size"
|
|
1977
2156
|
]);
|
|
1978
2157
|
var _useCarousel = useCarousel(), orientation = _useCarousel.orientation, scrollNext = _useCarousel.scrollNext, canScrollNext = _useCarousel.canScrollNext;
|
|
1979
|
-
return /* @__PURE__ */ (0,
|
|
2158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Button, _object_spread_props(_object_spread({
|
|
1980
2159
|
ref: ref,
|
|
1981
2160
|
variant: variant,
|
|
1982
2161
|
size: size,
|
|
@@ -1985,10 +2164,10 @@ var CarouselNext = React27.forwardRef(function(_param, ref) {
|
|
|
1985
2164
|
onClick: scrollNext
|
|
1986
2165
|
}, props), {
|
|
1987
2166
|
children: [
|
|
1988
|
-
/* @__PURE__ */ (0,
|
|
2167
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react11.ArrowRight, {
|
|
1989
2168
|
className: "h-4 w-4"
|
|
1990
2169
|
}),
|
|
1991
|
-
/* @__PURE__ */ (0,
|
|
2170
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", {
|
|
1992
2171
|
className: "sr-only",
|
|
1993
2172
|
children: "Next slide"
|
|
1994
2173
|
})
|
|
@@ -1997,32 +2176,32 @@ var CarouselNext = React27.forwardRef(function(_param, ref) {
|
|
|
1997
2176
|
});
|
|
1998
2177
|
CarouselNext.displayName = "CarouselNext";
|
|
1999
2178
|
// src/components/molecules/navigation-menu.tsx
|
|
2000
|
-
var
|
|
2179
|
+
var React31 = __toESM(require("react"));
|
|
2001
2180
|
var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"));
|
|
2002
2181
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
2003
|
-
var
|
|
2004
|
-
var
|
|
2005
|
-
var NavigationMenu =
|
|
2182
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2183
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2184
|
+
var NavigationMenu = React31.forwardRef(function(_param, ref) {
|
|
2006
2185
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
2007
2186
|
"className",
|
|
2008
2187
|
"children"
|
|
2009
2188
|
]);
|
|
2010
|
-
return /* @__PURE__ */ (0,
|
|
2189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(NavigationMenuPrimitive.Root, _object_spread_props(_object_spread({
|
|
2011
2190
|
ref: ref,
|
|
2012
2191
|
className: cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className)
|
|
2013
2192
|
}, props), {
|
|
2014
2193
|
children: [
|
|
2015
2194
|
children,
|
|
2016
|
-
/* @__PURE__ */ (0,
|
|
2195
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(NavigationMenuViewport, {})
|
|
2017
2196
|
]
|
|
2018
2197
|
}));
|
|
2019
2198
|
});
|
|
2020
2199
|
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
2021
|
-
var NavigationMenuList =
|
|
2200
|
+
var NavigationMenuList = React31.forwardRef(function(_param, ref) {
|
|
2022
2201
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2023
2202
|
"className"
|
|
2024
2203
|
]);
|
|
2025
|
-
return /* @__PURE__ */ (0,
|
|
2204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(NavigationMenuPrimitive.List, _object_spread({
|
|
2026
2205
|
ref: ref,
|
|
2027
2206
|
className: cn("group flex flex-1 list-none items-center justify-center space-x-1", className)
|
|
2028
2207
|
}, props));
|
|
@@ -2030,19 +2209,19 @@ var NavigationMenuList = React28.forwardRef(function(_param, ref) {
|
|
|
2030
2209
|
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
2031
2210
|
var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
2032
2211
|
var navigationMenuTriggerStyle = (0, import_class_variance_authority9.cva)("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");
|
|
2033
|
-
var NavigationMenuTrigger =
|
|
2212
|
+
var NavigationMenuTrigger = React31.forwardRef(function(_param, ref) {
|
|
2034
2213
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
2035
2214
|
"className",
|
|
2036
2215
|
"children"
|
|
2037
2216
|
]);
|
|
2038
|
-
return /* @__PURE__ */ (0,
|
|
2217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(NavigationMenuPrimitive.Trigger, _object_spread_props(_object_spread({
|
|
2039
2218
|
ref: ref,
|
|
2040
2219
|
className: cn(navigationMenuTriggerStyle(), "group", className)
|
|
2041
2220
|
}, props), {
|
|
2042
2221
|
children: [
|
|
2043
2222
|
children,
|
|
2044
2223
|
" ",
|
|
2045
|
-
/* @__PURE__ */ (0,
|
|
2224
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react12.ChevronDown, {
|
|
2046
2225
|
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
|
|
2047
2226
|
"aria-hidden": "true"
|
|
2048
2227
|
})
|
|
@@ -2050,48 +2229,48 @@ var NavigationMenuTrigger = React28.forwardRef(function(_param, ref) {
|
|
|
2050
2229
|
}));
|
|
2051
2230
|
});
|
|
2052
2231
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
2053
|
-
var NavigationMenuContent =
|
|
2232
|
+
var NavigationMenuContent = React31.forwardRef(function(_param, ref) {
|
|
2054
2233
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2055
2234
|
"className"
|
|
2056
2235
|
]);
|
|
2057
|
-
return /* @__PURE__ */ (0,
|
|
2236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(NavigationMenuPrimitive.Content, _object_spread({
|
|
2058
2237
|
ref: ref,
|
|
2059
2238
|
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)
|
|
2060
2239
|
}, props));
|
|
2061
2240
|
});
|
|
2062
2241
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
2063
2242
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
2064
|
-
var NavigationMenuViewport =
|
|
2243
|
+
var NavigationMenuViewport = React31.forwardRef(function(_param, ref) {
|
|
2065
2244
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2066
2245
|
"className"
|
|
2067
2246
|
]);
|
|
2068
|
-
return /* @__PURE__ */ (0,
|
|
2247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", {
|
|
2069
2248
|
className: cn("absolute left-0 top-full flex justify-center"),
|
|
2070
|
-
children: /* @__PURE__ */ (0,
|
|
2249
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(NavigationMenuPrimitive.Viewport, _object_spread({
|
|
2071
2250
|
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),
|
|
2072
2251
|
ref: ref
|
|
2073
2252
|
}, props))
|
|
2074
2253
|
});
|
|
2075
2254
|
});
|
|
2076
2255
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
2077
|
-
var NavigationMenuIndicator =
|
|
2256
|
+
var NavigationMenuIndicator = React31.forwardRef(function(_param, ref) {
|
|
2078
2257
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2079
2258
|
"className"
|
|
2080
2259
|
]);
|
|
2081
|
-
return /* @__PURE__ */ (0,
|
|
2260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(NavigationMenuPrimitive.Indicator, _object_spread_props(_object_spread({
|
|
2082
2261
|
ref: ref,
|
|
2083
2262
|
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)
|
|
2084
2263
|
}, props), {
|
|
2085
|
-
children: /* @__PURE__ */ (0,
|
|
2264
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", {
|
|
2086
2265
|
className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"
|
|
2087
2266
|
})
|
|
2088
2267
|
}));
|
|
2089
2268
|
});
|
|
2090
2269
|
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
2091
2270
|
// src/components/molecules/sidebar.tsx
|
|
2092
|
-
var
|
|
2271
|
+
var React32 = __toESM(require("react"));
|
|
2093
2272
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
2094
|
-
var
|
|
2273
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2095
2274
|
var sidebarVariants = (0, import_class_variance_authority10.cva)("flex flex-col border-r", {
|
|
2096
2275
|
variants: {
|
|
2097
2276
|
size: {
|
|
@@ -2104,12 +2283,12 @@ var sidebarVariants = (0, import_class_variance_authority10.cva)("flex flex-col
|
|
|
2104
2283
|
size: "default"
|
|
2105
2284
|
}
|
|
2106
2285
|
});
|
|
2107
|
-
var SidebarFooter =
|
|
2286
|
+
var SidebarFooter = React32.forwardRef(function(_param, ref) {
|
|
2108
2287
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
2109
2288
|
"className",
|
|
2110
2289
|
"children"
|
|
2111
2290
|
]);
|
|
2112
|
-
return /* @__PURE__ */ (0,
|
|
2291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", _object_spread_props(_object_spread({
|
|
2113
2292
|
ref: ref,
|
|
2114
2293
|
className: cn("p-4", className)
|
|
2115
2294
|
}, props), {
|
|
@@ -2117,7 +2296,7 @@ var SidebarFooter = React29.forwardRef(function(_param, ref) {
|
|
|
2117
2296
|
}));
|
|
2118
2297
|
});
|
|
2119
2298
|
SidebarFooter.displayName = "SidebarFooter";
|
|
2120
|
-
var Sidebar =
|
|
2299
|
+
var Sidebar = React32.forwardRef(function(_param, ref) {
|
|
2121
2300
|
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, [
|
|
2122
2301
|
"className",
|
|
2123
2302
|
"items",
|
|
@@ -2129,21 +2308,21 @@ var Sidebar = React29.forwardRef(function(_param, ref) {
|
|
|
2129
2308
|
"defaultVariant",
|
|
2130
2309
|
"buttonClassName"
|
|
2131
2310
|
]);
|
|
2132
|
-
return /* @__PURE__ */ (0,
|
|
2311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", _object_spread_props(_object_spread({
|
|
2133
2312
|
className: cn(className, "alq--navigation-sidebar h-full"),
|
|
2134
2313
|
ref: ref
|
|
2135
2314
|
}, props), {
|
|
2136
|
-
children: /* @__PURE__ */ (0,
|
|
2315
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("aside", {
|
|
2137
2316
|
className: cn(sidebarVariants({
|
|
2138
2317
|
size: size
|
|
2139
2318
|
}), "h-full"),
|
|
2140
2319
|
children: [
|
|
2141
|
-
/* @__PURE__ */ (0,
|
|
2320
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ScrollArea, {
|
|
2142
2321
|
className: "flex-grow justify-between",
|
|
2143
|
-
children: /* @__PURE__ */ (0,
|
|
2322
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", {
|
|
2144
2323
|
className: "flex flex-col gap-2 p-4",
|
|
2145
2324
|
children: items.map(function(item) {
|
|
2146
|
-
return /* @__PURE__ */ (0,
|
|
2325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Button, {
|
|
2147
2326
|
variant: (selectedSection === null || selectedSection === void 0 ? void 0 : selectedSection.name) === item.name ? selectedVariant : defaultVariant,
|
|
2148
2327
|
className: cn("justify-start", buttonClassName),
|
|
2149
2328
|
disabled: item.disabled,
|
|
@@ -2153,7 +2332,7 @@ var Sidebar = React29.forwardRef(function(_param, ref) {
|
|
|
2153
2332
|
}
|
|
2154
2333
|
},
|
|
2155
2334
|
children: [
|
|
2156
|
-
item.icon && /* @__PURE__ */ (0,
|
|
2335
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(item.icon, {
|
|
2157
2336
|
className: "mr-2 h-4 w-4"
|
|
2158
2337
|
}),
|
|
2159
2338
|
item.name
|
|
@@ -2162,7 +2341,7 @@ var Sidebar = React29.forwardRef(function(_param, ref) {
|
|
|
2162
2341
|
})
|
|
2163
2342
|
})
|
|
2164
2343
|
}),
|
|
2165
|
-
footerContent && /* @__PURE__ */ (0,
|
|
2344
|
+
footerContent && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SidebarFooter, {
|
|
2166
2345
|
children: footerContent
|
|
2167
2346
|
})
|
|
2168
2347
|
]
|
|
@@ -2181,11 +2360,11 @@ function useAlquimiaTheme() {
|
|
|
2181
2360
|
return (0, import_react6.useContext)(ThemeContext);
|
|
2182
2361
|
}
|
|
2183
2362
|
// src/components/molecules/sonner.tsx
|
|
2184
|
-
var
|
|
2363
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2185
2364
|
var Toaster = function(_param) {
|
|
2186
2365
|
var props = _extends({}, _object_destructuring_empty(_param));
|
|
2187
2366
|
var _useAlquimiaTheme = useAlquimiaTheme(), _useAlquimiaTheme_theme = _useAlquimiaTheme.theme, theme = _useAlquimiaTheme_theme === void 0 ? "system" : _useAlquimiaTheme_theme;
|
|
2188
|
-
return /* @__PURE__ */ (0,
|
|
2367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_sonner.Toaster, _object_spread({
|
|
2189
2368
|
theme: theme,
|
|
2190
2369
|
className: "toaster group",
|
|
2191
2370
|
toastOptions: {
|
|
@@ -2199,28 +2378,28 @@ var Toaster = function(_param) {
|
|
|
2199
2378
|
}, props));
|
|
2200
2379
|
};
|
|
2201
2380
|
// src/components/molecules/rating-stars.tsx
|
|
2202
|
-
var
|
|
2381
|
+
var React33 = __toESM(require("react"));
|
|
2203
2382
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
2204
|
-
var
|
|
2205
|
-
var
|
|
2383
|
+
var import_lucide_react13 = require("lucide-react");
|
|
2384
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2206
2385
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
2207
|
-
var
|
|
2386
|
+
var Tooltip2 = TooltipPrimitive.Root;
|
|
2208
2387
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
2209
|
-
var TooltipContent =
|
|
2388
|
+
var TooltipContent = React33.forwardRef(function(_param, ref) {
|
|
2210
2389
|
var className = _param.className, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
|
|
2211
2390
|
"className",
|
|
2212
2391
|
"sideOffset"
|
|
2213
2392
|
]);
|
|
2214
|
-
return /* @__PURE__ */ (0,
|
|
2393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipPrimitive.Content, _object_spread({
|
|
2215
2394
|
ref: ref,
|
|
2216
2395
|
sideOffset: sideOffset,
|
|
2217
2396
|
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)
|
|
2218
2397
|
}, props));
|
|
2219
2398
|
});
|
|
2220
2399
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
2221
|
-
var StarRating =
|
|
2400
|
+
var StarRating = React33.forwardRef(function(param, ref) {
|
|
2222
2401
|
var rating = param.rating, onRate = param.onRate;
|
|
2223
|
-
return /* @__PURE__ */ (0,
|
|
2402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", {
|
|
2224
2403
|
ref: ref,
|
|
2225
2404
|
className: "flex",
|
|
2226
2405
|
children: [
|
|
@@ -2230,14 +2409,14 @@ var StarRating = React30.forwardRef(function(param, ref) {
|
|
|
2230
2409
|
4,
|
|
2231
2410
|
5
|
|
2232
2411
|
].map(function(star) {
|
|
2233
|
-
return /* @__PURE__ */ (0,
|
|
2412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, {
|
|
2234
2413
|
onClick: function() {
|
|
2235
2414
|
return onRate(star);
|
|
2236
2415
|
},
|
|
2237
2416
|
variant: "link",
|
|
2238
2417
|
className: "p-1 transition-colors [&_svg]:size-5 h-5",
|
|
2239
2418
|
"aria-label": "Rate ".concat(star, " star").concat(star !== 1 ? "s" : ""),
|
|
2240
|
-
children: /* @__PURE__ */ (0,
|
|
2419
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react13.Star, {
|
|
2241
2420
|
className: cn("w-5 h-5", star <= rating ? "alq-rating-star-active fill-current stroke-current" : "alq-rating-star-inactive")
|
|
2242
2421
|
})
|
|
2243
2422
|
}, star);
|
|
@@ -2245,15 +2424,15 @@ var StarRating = React30.forwardRef(function(param, ref) {
|
|
|
2245
2424
|
});
|
|
2246
2425
|
});
|
|
2247
2426
|
StarRating.displayName = "StarRating";
|
|
2248
|
-
var RatingStars =
|
|
2427
|
+
var RatingStars = React33.forwardRef(function(param, ref) {
|
|
2249
2428
|
var _param_currentRating = param.currentRating, currentRating = _param_currentRating === void 0 ? 0 : _param_currentRating, onRate = param.onRate, className = param.className, isLoading = param.isLoading;
|
|
2250
|
-
var
|
|
2251
|
-
var
|
|
2429
|
+
var _React33_useState = _sliced_to_array(React33.useState(false), 2), open = _React33_useState[0], setOpen = _React33_useState[1];
|
|
2430
|
+
var _React33_useState1 = _sliced_to_array(React33.useState(false), 2), animate = _React33_useState1[0], setAnimate = _React33_useState1[1];
|
|
2252
2431
|
var handleRate = function(rating) {
|
|
2253
2432
|
onRate(rating);
|
|
2254
2433
|
setOpen(false);
|
|
2255
2434
|
};
|
|
2256
|
-
|
|
2435
|
+
React33.useEffect(function() {
|
|
2257
2436
|
if (currentRating > 0) {
|
|
2258
2437
|
setAnimate(true);
|
|
2259
2438
|
var timer = setTimeout(function() {
|
|
@@ -2267,14 +2446,14 @@ var RatingStars = React30.forwardRef(function(param, ref) {
|
|
|
2267
2446
|
currentRating
|
|
2268
2447
|
]);
|
|
2269
2448
|
var hasRated = currentRating > 0;
|
|
2270
|
-
return /* @__PURE__ */ (0,
|
|
2271
|
-
children: /* @__PURE__ */ (0,
|
|
2449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipProvider, {
|
|
2450
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Tooltip2, {
|
|
2272
2451
|
open: open,
|
|
2273
2452
|
onOpenChange: setOpen,
|
|
2274
2453
|
children: [
|
|
2275
|
-
/* @__PURE__ */ (0,
|
|
2454
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipTrigger, {
|
|
2276
2455
|
asChild: true,
|
|
2277
|
-
children: /* @__PURE__ */ (0,
|
|
2456
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, {
|
|
2278
2457
|
ref: ref,
|
|
2279
2458
|
variant: "link",
|
|
2280
2459
|
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),
|
|
@@ -2282,18 +2461,18 @@ var RatingStars = React30.forwardRef(function(param, ref) {
|
|
|
2282
2461
|
onClick: function() {
|
|
2283
2462
|
return setOpen(!open);
|
|
2284
2463
|
},
|
|
2285
|
-
children: /* @__PURE__ */ (0,
|
|
2464
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react13.Star, {
|
|
2286
2465
|
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")
|
|
2287
2466
|
})
|
|
2288
2467
|
})
|
|
2289
2468
|
}),
|
|
2290
|
-
/* @__PURE__ */ (0,
|
|
2469
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipContent, {
|
|
2291
2470
|
side: "top",
|
|
2292
2471
|
align: "center",
|
|
2293
2472
|
className: "p-0",
|
|
2294
|
-
children: /* @__PURE__ */ (0,
|
|
2473
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", {
|
|
2295
2474
|
className: "p-2 bg-background",
|
|
2296
|
-
children: /* @__PURE__ */ (0,
|
|
2475
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(StarRating, {
|
|
2297
2476
|
rating: currentRating,
|
|
2298
2477
|
onRate: handleRate
|
|
2299
2478
|
})
|
|
@@ -2305,13 +2484,13 @@ var RatingStars = React30.forwardRef(function(param, ref) {
|
|
|
2305
2484
|
});
|
|
2306
2485
|
RatingStars.displayName = "RatingStars";
|
|
2307
2486
|
// src/components/molecules/rating-thumbs.tsx
|
|
2308
|
-
var
|
|
2309
|
-
var
|
|
2310
|
-
var
|
|
2311
|
-
var RatingThumbs =
|
|
2487
|
+
var React34 = __toESM(require("react"));
|
|
2488
|
+
var import_lucide_react14 = require("lucide-react");
|
|
2489
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2490
|
+
var RatingThumbs = React34.forwardRef(function(param, ref) {
|
|
2312
2491
|
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;
|
|
2313
|
-
var
|
|
2314
|
-
|
|
2492
|
+
var _React34_useState = _sliced_to_array(React34.useState(false), 2), animate = _React34_useState[0], setAnimate = _React34_useState[1];
|
|
2493
|
+
React34.useEffect(function() {
|
|
2315
2494
|
if (currentRating) {
|
|
2316
2495
|
setAnimate(true);
|
|
2317
2496
|
var timer = setTimeout(function() {
|
|
@@ -2324,11 +2503,11 @@ var RatingThumbs = React31.forwardRef(function(param, ref) {
|
|
|
2324
2503
|
}, [
|
|
2325
2504
|
currentRating
|
|
2326
2505
|
]);
|
|
2327
|
-
return /* @__PURE__ */ (0,
|
|
2506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
|
|
2328
2507
|
ref: ref,
|
|
2329
2508
|
className: cn("inline-flex", direction === "column" ? "flex-col" : "flex-row", "space-x-1 gap-4", className),
|
|
2330
2509
|
children: [
|
|
2331
|
-
/* @__PURE__ */ (0,
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Button, {
|
|
2332
2511
|
variant: "link",
|
|
2333
2512
|
onClick: function() {
|
|
2334
2513
|
return onRate(currentRating === "thumbsUp" ? "" : "thumbsUp");
|
|
@@ -2336,11 +2515,11 @@ var RatingThumbs = React31.forwardRef(function(param, ref) {
|
|
|
2336
2515
|
className: cn("p-1 transition-colors disabled:opacity-50 [&_svg]:size-5", "hover:alq-rating-thumbsup/10"),
|
|
2337
2516
|
"aria-label": "Thumbs up",
|
|
2338
2517
|
disabled: isLoading,
|
|
2339
|
-
children: /* @__PURE__ */ (0,
|
|
2518
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react14.ThumbsUp, {
|
|
2340
2519
|
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")
|
|
2341
2520
|
})
|
|
2342
2521
|
}),
|
|
2343
|
-
/* @__PURE__ */ (0,
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Button, {
|
|
2344
2523
|
variant: "link",
|
|
2345
2524
|
onClick: function() {
|
|
2346
2525
|
return onRate(currentRating === "thumbsDown" ? "" : "thumbsDown");
|
|
@@ -2348,7 +2527,7 @@ var RatingThumbs = React31.forwardRef(function(param, ref) {
|
|
|
2348
2527
|
className: cn("p-1 transition-colors disabled:opacity-50 mt-0.5 [&_svg]:size-5", "hover:bg-alq-rating-thumbsdown/10"),
|
|
2349
2528
|
"aria-label": "Thumbs down",
|
|
2350
2529
|
disabled: isLoading,
|
|
2351
|
-
children: /* @__PURE__ */ (0,
|
|
2530
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react14.ThumbsDown, {
|
|
2352
2531
|
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")
|
|
2353
2532
|
})
|
|
2354
2533
|
})
|
|
@@ -2357,19 +2536,19 @@ var RatingThumbs = React31.forwardRef(function(param, ref) {
|
|
|
2357
2536
|
});
|
|
2358
2537
|
RatingThumbs.displayName = "RatingThumbs";
|
|
2359
2538
|
// src/components/molecules/rating-comment.tsx
|
|
2360
|
-
var
|
|
2361
|
-
var
|
|
2362
|
-
var
|
|
2363
|
-
var RatingComment =
|
|
2539
|
+
var React35 = __toESM(require("react"));
|
|
2540
|
+
var import_lucide_react15 = require("lucide-react");
|
|
2541
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2542
|
+
var RatingComment = React35.forwardRef(function(param, ref) {
|
|
2364
2543
|
var currentRating = param.currentRating, onRate = param.onRate, className = param.className, isLoading = param.isLoading;
|
|
2365
|
-
var
|
|
2366
|
-
var
|
|
2367
|
-
var
|
|
2544
|
+
var _React35_useState = _sliced_to_array(React35.useState(false), 2), open = _React35_useState[0], setOpen = _React35_useState[1];
|
|
2545
|
+
var _React35_useState1 = _sliced_to_array(React35.useState(""), 2), comment = _React35_useState1[0], setComment = _React35_useState1[1];
|
|
2546
|
+
var _React35_useState2 = _sliced_to_array(React35.useState(false), 2), animate = _React35_useState2[0], setAnimate = _React35_useState2[1];
|
|
2368
2547
|
var handleRate = function() {
|
|
2369
2548
|
onRate(comment);
|
|
2370
2549
|
setOpen(false);
|
|
2371
2550
|
};
|
|
2372
|
-
|
|
2551
|
+
React35.useEffect(function() {
|
|
2373
2552
|
if (currentRating) {
|
|
2374
2553
|
setAnimate(true);
|
|
2375
2554
|
var timer = setTimeout(function() {
|
|
@@ -2382,39 +2561,39 @@ var RatingComment = React32.forwardRef(function(param, ref) {
|
|
|
2382
2561
|
}, [
|
|
2383
2562
|
currentRating
|
|
2384
2563
|
]);
|
|
2385
|
-
|
|
2564
|
+
React35.useEffect(function() {
|
|
2386
2565
|
setComment("");
|
|
2387
2566
|
}, [
|
|
2388
2567
|
open
|
|
2389
2568
|
]);
|
|
2390
|
-
return /* @__PURE__ */ (0,
|
|
2569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Dialog, {
|
|
2391
2570
|
open: open,
|
|
2392
2571
|
onOpenChange: setOpen,
|
|
2393
2572
|
children: [
|
|
2394
|
-
/* @__PURE__ */ (0,
|
|
2573
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DialogTrigger, {
|
|
2395
2574
|
asChild: true,
|
|
2396
|
-
children: /* @__PURE__ */ (0,
|
|
2575
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Button, {
|
|
2397
2576
|
ref: ref,
|
|
2398
2577
|
variant: "link",
|
|
2399
2578
|
size: "lg",
|
|
2400
2579
|
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),
|
|
2401
2580
|
disabled: isLoading,
|
|
2402
|
-
children: /* @__PURE__ */ (0,
|
|
2581
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react15.Book, {
|
|
2403
2582
|
className: cn("w-5 h-5 transition-all duration-500", animate && "animate-ping", isLoading && "animate-pulse", "".concat(comment ? "alq-rating-comment" : "stroke-gray-400"))
|
|
2404
2583
|
})
|
|
2405
2584
|
})
|
|
2406
2585
|
}),
|
|
2407
|
-
/* @__PURE__ */ (0,
|
|
2586
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DialogOverlay, {
|
|
2408
2587
|
className: "fixed inset-0 bg-black bg-opacity-50"
|
|
2409
2588
|
}),
|
|
2410
|
-
/* @__PURE__ */ (0,
|
|
2589
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(DialogContent, {
|
|
2411
2590
|
"aria-describedby": void 0,
|
|
2412
2591
|
children: [
|
|
2413
|
-
/* @__PURE__ */ (0,
|
|
2592
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DialogTitle, {
|
|
2414
2593
|
className: "text-lg font-medium",
|
|
2415
2594
|
children: "Deja un comentario"
|
|
2416
2595
|
}),
|
|
2417
|
-
/* @__PURE__ */ (0,
|
|
2596
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("textarea", {
|
|
2418
2597
|
className: "mt-4 w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary",
|
|
2419
2598
|
rows: 4,
|
|
2420
2599
|
value: comment,
|
|
@@ -2422,9 +2601,9 @@ var RatingComment = React32.forwardRef(function(param, ref) {
|
|
|
2422
2601
|
return setComment(e.target.value);
|
|
2423
2602
|
}
|
|
2424
2603
|
}),
|
|
2425
|
-
/* @__PURE__ */ (0,
|
|
2604
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", {
|
|
2426
2605
|
className: "mt-4 flex justify-end",
|
|
2427
|
-
children: /* @__PURE__ */ (0,
|
|
2606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Button, {
|
|
2428
2607
|
onClick: handleRate,
|
|
2429
2608
|
disabled: !comment,
|
|
2430
2609
|
children: "Enviar"
|
|
@@ -2437,8 +2616,8 @@ var RatingComment = React32.forwardRef(function(param, ref) {
|
|
|
2437
2616
|
});
|
|
2438
2617
|
RatingComment.displayName = "RatingComment";
|
|
2439
2618
|
// src/components/molecules/call-out.tsx
|
|
2440
|
-
var
|
|
2441
|
-
var
|
|
2619
|
+
var React36 = __toESM(require("react"));
|
|
2620
|
+
var import_lucide_react16 = require("lucide-react");
|
|
2442
2621
|
// src/components/hooks/use-text-streaming.ts
|
|
2443
2622
|
var import_react7 = require("react");
|
|
2444
2623
|
var CHAR_DELAY = 15;
|
|
@@ -2502,14 +2681,14 @@ function useTextStreaming(content, shouldStream, handleIsTextStreaming) {
|
|
|
2502
2681
|
return displayedText;
|
|
2503
2682
|
}
|
|
2504
2683
|
// src/components/molecules/call-out.tsx
|
|
2505
|
-
var
|
|
2506
|
-
var CallOut =
|
|
2684
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2685
|
+
var CallOut = React36.forwardRef(function(_param, ref) {
|
|
2507
2686
|
var className = _param.className, children = _param.children, role = _param.role, props = _object_without_properties(_param, [
|
|
2508
2687
|
"className",
|
|
2509
2688
|
"children",
|
|
2510
2689
|
"role"
|
|
2511
2690
|
]);
|
|
2512
|
-
return /* @__PURE__ */ (0,
|
|
2691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", _object_spread_props(_object_spread({
|
|
2513
2692
|
ref: ref,
|
|
2514
2693
|
className: cn("alq--callout-box", className),
|
|
2515
2694
|
"data-role": role
|
|
@@ -2517,41 +2696,41 @@ var CallOut = React33.forwardRef(function(_param, ref) {
|
|
|
2517
2696
|
children: children
|
|
2518
2697
|
}));
|
|
2519
2698
|
});
|
|
2520
|
-
var CallOutDate =
|
|
2699
|
+
var CallOutDate = React36.forwardRef(function(_param, ref) {
|
|
2521
2700
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
2522
2701
|
"className",
|
|
2523
2702
|
"children"
|
|
2524
2703
|
]);
|
|
2525
|
-
return /* @__PURE__ */ (0,
|
|
2704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", _object_spread_props(_object_spread({
|
|
2526
2705
|
ref: ref,
|
|
2527
2706
|
className: cn("alq--callout-date", "text-sm text-muted-foreground", className)
|
|
2528
2707
|
}, props), {
|
|
2529
2708
|
children: children
|
|
2530
2709
|
}));
|
|
2531
2710
|
});
|
|
2532
|
-
var CallOutActions =
|
|
2711
|
+
var CallOutActions = React36.forwardRef(function(_param, ref) {
|
|
2533
2712
|
var className = _param.className, actions = _param.actions, role = _param.role, message = _param.message, props = _object_without_properties(_param, [
|
|
2534
2713
|
"className",
|
|
2535
2714
|
"actions",
|
|
2536
2715
|
"role",
|
|
2537
2716
|
"message"
|
|
2538
2717
|
]);
|
|
2539
|
-
var
|
|
2540
|
-
var
|
|
2718
|
+
var _React36_useState = _sliced_to_array(React36.useState(false), 2), isLoading = _React36_useState[0], setIsLoading = _React36_useState[1];
|
|
2719
|
+
var _React36_useState1 = _sliced_to_array(React36.useState(false), 2), isClicked = _React36_useState1[0], setIsClicked = _React36_useState1[1];
|
|
2541
2720
|
if (role === "user") {
|
|
2542
2721
|
return null;
|
|
2543
2722
|
}
|
|
2544
|
-
return /* @__PURE__ */ (0,
|
|
2723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", _object_spread_props(_object_spread({
|
|
2545
2724
|
ref: ref,
|
|
2546
2725
|
className: cn("alq--callout-actions", className)
|
|
2547
2726
|
}, props), {
|
|
2548
2727
|
children: actions.map(function(action) {
|
|
2549
2728
|
var _action_component;
|
|
2550
|
-
return action.custom ? /* @__PURE__ */ (0,
|
|
2729
|
+
return action.custom ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(React36.Fragment, {
|
|
2551
2730
|
children: (_action_component = action.component) === null || _action_component === void 0 ? void 0 : _action_component.call(action, {
|
|
2552
2731
|
message: message
|
|
2553
2732
|
})
|
|
2554
|
-
}, action.label) : /* @__PURE__ */ (0,
|
|
2733
|
+
}, action.label) : /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("button", {
|
|
2555
2734
|
className: cn("alq--callout-action", {
|
|
2556
2735
|
"alq--callout-animate-action": isLoading
|
|
2557
2736
|
}, {
|
|
@@ -2567,13 +2746,13 @@ var CallOutActions = React33.forwardRef(function(_param, ref) {
|
|
|
2567
2746
|
});
|
|
2568
2747
|
},
|
|
2569
2748
|
children: [
|
|
2570
|
-
/* @__PURE__ */ (0,
|
|
2749
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", {
|
|
2571
2750
|
className: cn("alq-action-icon-wrapper", {
|
|
2572
2751
|
"alq--callout-animate-action": isLoading
|
|
2573
2752
|
}),
|
|
2574
2753
|
children: action.icon
|
|
2575
2754
|
}),
|
|
2576
|
-
/* @__PURE__ */ (0,
|
|
2755
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("label", {
|
|
2577
2756
|
children: action.label
|
|
2578
2757
|
})
|
|
2579
2758
|
]
|
|
@@ -2581,7 +2760,7 @@ var CallOutActions = React33.forwardRef(function(_param, ref) {
|
|
|
2581
2760
|
})
|
|
2582
2761
|
}));
|
|
2583
2762
|
});
|
|
2584
|
-
var CallOutResponse =
|
|
2763
|
+
var CallOutResponse = React36.forwardRef(function(_param, ref) {
|
|
2585
2764
|
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, [
|
|
2586
2765
|
"className",
|
|
2587
2766
|
"children",
|
|
@@ -2591,29 +2770,29 @@ var CallOutResponse = React33.forwardRef(function(_param, ref) {
|
|
|
2591
2770
|
"isStreaming",
|
|
2592
2771
|
"handleIsTextStreaming"
|
|
2593
2772
|
]);
|
|
2594
|
-
var
|
|
2773
|
+
var _React36_useState = _sliced_to_array(React36.useState(false), 2), isAdditionalInfoOpen = _React36_useState[0], setIsAdditionalInfoOpen = _React36_useState[1];
|
|
2595
2774
|
var content = String(children || "");
|
|
2596
2775
|
var shouldStream = role === "assistant" && isStreaming;
|
|
2597
2776
|
var displayedContent = useTextStreaming(content, shouldStream !== null && shouldStream !== void 0 ? shouldStream : false, handleIsTextStreaming);
|
|
2598
2777
|
var showAsToggle = additionalInfo && toggleAdditionalInfo;
|
|
2599
2778
|
var showInline = additionalInfo && !toggleAdditionalInfo;
|
|
2600
|
-
return /* @__PURE__ */ (0,
|
|
2779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", _object_spread_props(_object_spread({
|
|
2601
2780
|
ref: ref,
|
|
2602
2781
|
"data-role": role,
|
|
2603
2782
|
className: cn("alq--callout-response", "max-w-none", "text-foreground", className)
|
|
2604
2783
|
}, props), {
|
|
2605
2784
|
children: [
|
|
2606
|
-
/* @__PURE__ */ (0,
|
|
2785
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(RichText, {
|
|
2607
2786
|
content: displayedContent
|
|
2608
2787
|
}),
|
|
2609
|
-
showInline && /* @__PURE__ */ (0,
|
|
2788
|
+
showInline && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", {
|
|
2610
2789
|
className: cn("alq--callout-response-additional-info", "mt-2 text-sm text-muted-foreground whitespace-pre-line", "border-t border-border pt-2"),
|
|
2611
2790
|
children: additionalInfo
|
|
2612
2791
|
}),
|
|
2613
|
-
showAsToggle && /* @__PURE__ */ (0,
|
|
2792
|
+
showAsToggle && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", {
|
|
2614
2793
|
className: cn("alq--callout-response-additional-info", "mt-2 border-t border-border pt-2"),
|
|
2615
2794
|
children: [
|
|
2616
|
-
/* @__PURE__ */ (0,
|
|
2795
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Button, {
|
|
2617
2796
|
type: "button",
|
|
2618
2797
|
variant: "ghost",
|
|
2619
2798
|
size: "sm",
|
|
@@ -2625,19 +2804,19 @@ var CallOutResponse = React33.forwardRef(function(_param, ref) {
|
|
|
2625
2804
|
},
|
|
2626
2805
|
"aria-expanded": isAdditionalInfoOpen,
|
|
2627
2806
|
children: [
|
|
2628
|
-
isAdditionalInfoOpen ? /* @__PURE__ */ (0,
|
|
2807
|
+
isAdditionalInfoOpen ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react16.ChevronUp, {
|
|
2629
2808
|
className: "h-4 w-4 mr-1.5 shrink-0 transition-transform"
|
|
2630
|
-
}) : /* @__PURE__ */ (0,
|
|
2809
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react16.ChevronDown, {
|
|
2631
2810
|
className: "h-4 w-4 mr-1.5 shrink-0 transition-transform"
|
|
2632
2811
|
}),
|
|
2633
2812
|
isAdditionalInfoOpen ? "Hide details" : "Show details"
|
|
2634
2813
|
]
|
|
2635
2814
|
}),
|
|
2636
|
-
/* @__PURE__ */ (0,
|
|
2815
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", {
|
|
2637
2816
|
className: cn("grid transition-[grid-template-rows] duration-200 ease-out", isAdditionalInfoOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
|
|
2638
|
-
children: /* @__PURE__ */ (0,
|
|
2817
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", {
|
|
2639
2818
|
className: "overflow-hidden",
|
|
2640
|
-
children: /* @__PURE__ */ (0,
|
|
2819
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", {
|
|
2641
2820
|
className: "text-sm text-muted-foreground pt-1 whitespace-pre-line",
|
|
2642
2821
|
children: additionalInfo
|
|
2643
2822
|
})
|