tfy-web-components 0.0.19 → 0.0.20
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/README.md +65 -4
- package/dist/..d.ts +46 -0
- package/dist/Accordion.d.ts +8 -9
- package/dist/Alert.d.ts +73 -0
- package/dist/AudioPlayer.d.ts +10 -0
- package/dist/Avatar.d.ts +19 -0
- package/dist/Badge.d.ts +2 -1
- package/dist/CopyField.d.ts +1 -0
- package/dist/CustomDrawer.d.ts +8 -1
- package/dist/DropdownMenu.d.ts +25 -0
- package/dist/IconButton.d.ts +4 -2
- package/dist/ImagesPreview.d.ts +12 -0
- package/dist/Input-CnGhA18d.js +74283 -0
- package/dist/Input-CnGhA18d.js.map +1 -0
- package/dist/Markdown.d.ts +103 -0
- package/dist/Modal.d.ts +12 -0
- package/dist/MonacoEditorCore-xfpJ6z-E.js +113 -0
- package/dist/MonacoEditorCore-xfpJ6z-E.js.map +1 -0
- package/dist/OpenUiFenceBlock-CsVY6kwA.js +20 -0
- package/dist/OpenUiFenceBlock-CsVY6kwA.js.map +1 -0
- package/dist/OutlinedRadio.d.ts +9 -0
- package/dist/RootFontSizeContext-7vgn7Y_k.js +22 -0
- package/dist/RootFontSizeContext-7vgn7Y_k.js.map +1 -0
- package/dist/SimpleCodeEditor.d.ts +63 -0
- package/dist/Skeleton.d.ts +7 -0
- package/dist/ThumbsFeedback.d.ts +18 -0
- package/dist/ToggleButton.d.ts +42 -0
- package/dist/UserMessage.d.ts +15 -0
- package/dist/UserMessageEdit.d.ts +16 -0
- package/dist/_commonjsHelpers-DWwsNxpa.js +9 -0
- package/dist/_commonjsHelpers-DWwsNxpa.js.map +1 -0
- package/dist/agent-chat.d.ts +222 -0
- package/dist/classNames-Dy-RXSjS.js +9 -0
- package/dist/{classNames-CC5emYUV.js.map → classNames-Dy-RXSjS.js.map} +1 -1
- package/dist/components/atoms/Accordion.d.ts +5 -6
- package/dist/components/atoms/Accordion.es.js +9 -7
- package/dist/components/atoms/Accordion.es.js.map +1 -1
- package/dist/components/atoms/AudioPlayer.d.ts +6 -0
- package/dist/components/atoms/AudioPlayer.es.js +1424 -0
- package/dist/components/atoms/AudioPlayer.es.js.map +1 -0
- package/dist/components/atoms/Avatar.d.ts +10 -0
- package/dist/components/atoms/Avatar.es.js +62 -0
- package/dist/components/atoms/Avatar.es.js.map +1 -0
- package/dist/components/atoms/Badge.d.ts +2 -1
- package/dist/components/atoms/Badge.es.js +9 -1
- package/dist/components/atoms/Badge.es.js.map +1 -1
- package/dist/components/atoms/Button.es.js +2 -2
- package/dist/components/atoms/IconButton.d.ts +4 -2
- package/dist/components/atoms/IconButton.es.js +23 -7
- package/dist/components/atoms/IconButton.es.js.map +1 -1
- package/dist/components/atoms/IconProvider.es.js +28 -2
- package/dist/components/atoms/IconProvider.es.js.map +1 -1
- package/dist/components/atoms/Modal.d.ts +8 -0
- package/dist/components/atoms/Modal.es.js +19 -0
- package/dist/components/atoms/Modal.es.js.map +1 -0
- package/dist/components/atoms/OutlinedRadio.d.ts +5 -0
- package/dist/components/atoms/OutlinedRadio.es.js +29 -0
- package/dist/components/atoms/OutlinedRadio.es.js.map +1 -0
- package/dist/components/atoms/Skeleton.d.ts +4 -0
- package/dist/components/atoms/Skeleton.es.js +9 -0
- package/dist/components/atoms/Skeleton.es.js.map +1 -0
- package/dist/components/atoms/Spinner.es.js +1 -1
- package/dist/components/atoms/Switch.es.js +1 -18
- package/dist/components/atoms/Switch.es.js.map +1 -1
- package/dist/components/atoms/TabButton.es.js +1 -1
- package/dist/components/atoms/TabPanel.es.js +1 -1
- package/dist/components/atoms/Tooltip.es.js +1 -1
- package/dist/components/molecules/Alert.d.ts +26 -0
- package/dist/components/molecules/Alert.es.js +135 -0
- package/dist/components/molecules/Alert.es.js.map +1 -0
- package/dist/components/molecules/CopyField.d.ts +1 -0
- package/dist/components/molecules/CopyField.es.js +12 -74192
- package/dist/components/molecules/CopyField.es.js.map +1 -1
- package/dist/components/molecules/CustomDrawer.d.ts +8 -1
- package/dist/components/molecules/CustomDrawer.es.js +118 -48
- package/dist/components/molecules/CustomDrawer.es.js.map +1 -1
- package/dist/components/molecules/Dialog.es.js +2570 -1519
- package/dist/components/molecules/Dialog.es.js.map +1 -1
- package/dist/components/molecules/DropdownMenu.d.ts +18 -0
- package/dist/components/molecules/DropdownMenu.es.js +104 -0
- package/dist/components/molecules/DropdownMenu.es.js.map +1 -0
- package/dist/components/molecules/ImagesPreview.d.ts +8 -0
- package/dist/components/molecules/ImagesPreview.es.js +186 -0
- package/dist/components/molecules/ImagesPreview.es.js.map +1 -0
- package/dist/components/molecules/Input.es.js +2 -2
- package/dist/components/molecules/Markdown.d.ts +1 -0
- package/dist/components/molecules/Markdown.es.js +345 -0
- package/dist/components/molecules/Markdown.es.js.map +1 -0
- package/dist/components/molecules/Notify.es.js +6 -1023
- package/dist/components/molecules/Notify.es.js.map +1 -1
- package/dist/components/molecules/SimpleCodeEditor.d.ts +56 -0
- package/dist/components/molecules/SimpleCodeEditor.es.js +784 -0
- package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -0
- package/dist/components/molecules/ThumbsFeedback.d.ts +13 -0
- package/dist/components/molecules/ThumbsFeedback.es.js +98 -0
- package/dist/components/molecules/ThumbsFeedback.es.js.map +1 -0
- package/dist/components/molecules/ToggleButton.d.ts +37 -0
- package/dist/components/molecules/ToggleButton.es.js +72 -0
- package/dist/components/molecules/ToggleButton.es.js.map +1 -0
- package/dist/components/molecules/agent-chat/UserMessage.d.ts +11 -0
- package/dist/components/molecules/agent-chat/UserMessage.es.js +40 -0
- package/dist/components/molecules/agent-chat/UserMessage.es.js.map +1 -0
- package/dist/components/molecules/agent-chat/UserMessageEdit.d.ts +12 -0
- package/dist/components/molecules/agent-chat/UserMessageEdit.es.js +33 -0
- package/dist/components/molecules/agent-chat/UserMessageEdit.es.js.map +1 -0
- package/dist/components/molecules/agent-chat.d.ts +1 -0
- package/dist/components/molecules/agent-chat.es.js +935 -0
- package/dist/components/molecules/agent-chat.es.js.map +1 -0
- package/dist/components/theme/theme.d.ts +1 -0
- package/dist/components/theme/theme.es.js +12 -1
- package/dist/components/theme/theme.es.js.map +1 -1
- package/dist/components/theme/useTheme.d.ts +7 -0
- package/dist/components/theme/useTheme.es.js +35 -20
- package/dist/components/theme/useTheme.es.js.map +1 -1
- package/dist/components/theme/utils.es.js +1 -1
- package/dist/index.es.js +12 -4
- package/dist/index.es.js.map +1 -1
- package/dist/{isTypedArray-CoDTnA8U.js → isTypedArray-CLAk7Q1f.js} +30 -30
- package/dist/isTypedArray-CLAk7Q1f.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tailwindPreset.d.ts +140 -0
- package/dist/tailwindPreset.es.js +100 -0
- package/dist/tailwindPreset.es.js.map +1 -0
- package/dist/theme.css +163 -0
- package/dist/theme.d.ts +2 -0
- package/dist/useTheme.d.ts +7 -0
- package/package.json +49 -3
- package/dist/_commonjsHelpers-CcAunmGO.js +0 -34
- package/dist/_commonjsHelpers-CcAunmGO.js.map +0 -1
- package/dist/classNames-CC5emYUV.js +0 -9
- package/dist/isTypedArray-CoDTnA8U.js.map +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MenuItemProps } from '@mui/material/MenuItem';
|
|
3
|
+
export interface DropdownMenuProps {
|
|
4
|
+
trigger: React.ReactNode;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
align?: 'start' | 'center' | 'end';
|
|
7
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
8
|
+
className?: string;
|
|
9
|
+
contentClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DropdownMenuItemProps extends MenuItemProps {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const DropdownMenu: React.FC<DropdownMenuProps> & {
|
|
15
|
+
Item: typeof DropdownMenuItem;
|
|
16
|
+
};
|
|
17
|
+
export declare const DropdownMenuItem: React.FC<DropdownMenuItemProps>;
|
|
18
|
+
export default DropdownMenu;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default, { useState } from "react";
|
|
3
|
+
import Menu from "@mui/material/Menu";
|
|
4
|
+
import MenuItem from "@mui/material/MenuItem";
|
|
5
|
+
import { c as classNames } from "../../classNames-Dy-RXSjS.js";
|
|
6
|
+
const anchorOriginMap = {
|
|
7
|
+
"bottom-start": { vertical: "bottom", horizontal: "left" },
|
|
8
|
+
"bottom-center": { vertical: "bottom", horizontal: "center" },
|
|
9
|
+
"bottom-end": { vertical: "bottom", horizontal: "right" },
|
|
10
|
+
"top-start": { vertical: "top", horizontal: "left" },
|
|
11
|
+
"top-center": { vertical: "top", horizontal: "center" },
|
|
12
|
+
"top-end": { vertical: "top", horizontal: "right" },
|
|
13
|
+
"left-start": { vertical: "top", horizontal: "left" },
|
|
14
|
+
"left-center": { vertical: "center", horizontal: "left" },
|
|
15
|
+
"left-end": { vertical: "bottom", horizontal: "left" },
|
|
16
|
+
"right-start": { vertical: "top", horizontal: "right" },
|
|
17
|
+
"right-center": { vertical: "center", horizontal: "right" },
|
|
18
|
+
"right-end": { vertical: "bottom", horizontal: "right" }
|
|
19
|
+
};
|
|
20
|
+
const transformOriginMap = {
|
|
21
|
+
"bottom-start": { vertical: "top", horizontal: "left" },
|
|
22
|
+
"bottom-center": { vertical: "top", horizontal: "center" },
|
|
23
|
+
"bottom-end": { vertical: "top", horizontal: "right" },
|
|
24
|
+
"top-start": { vertical: "bottom", horizontal: "left" },
|
|
25
|
+
"top-center": { vertical: "bottom", horizontal: "center" },
|
|
26
|
+
"top-end": { vertical: "bottom", horizontal: "right" },
|
|
27
|
+
"left-start": { vertical: "top", horizontal: "right" },
|
|
28
|
+
"left-center": { vertical: "center", horizontal: "right" },
|
|
29
|
+
"left-end": { vertical: "bottom", horizontal: "right" },
|
|
30
|
+
"right-start": { vertical: "top", horizontal: "left" },
|
|
31
|
+
"right-center": { vertical: "center", horizontal: "left" },
|
|
32
|
+
"right-end": { vertical: "bottom", horizontal: "left" }
|
|
33
|
+
};
|
|
34
|
+
const PAPER_SLOT_PROPS = {
|
|
35
|
+
paper: {
|
|
36
|
+
className: classNames(
|
|
37
|
+
"bg-white dark:bg-gray-250 text-gray-800 dark:text-gray-700",
|
|
38
|
+
"min-w-[8rem] overflow-hidden rounded-xl border border-gray-250 dark:border-gray-275",
|
|
39
|
+
"p-1.5 shadow-lg"
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const DropdownMenu = ({ trigger, children, align = "start", side = "bottom", className, contentClassName }) => {
|
|
44
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
45
|
+
const open = Boolean(anchorEl);
|
|
46
|
+
const handleClick = (event) => {
|
|
47
|
+
setAnchorEl(event.currentTarget);
|
|
48
|
+
};
|
|
49
|
+
const handleClose = () => {
|
|
50
|
+
setAnchorEl(null);
|
|
51
|
+
};
|
|
52
|
+
const anchorKey = `${side}-${align}`;
|
|
53
|
+
const anchorOrigin = anchorOriginMap[anchorKey] || anchorOriginMap["bottom-start"];
|
|
54
|
+
const transformOrigin = transformOriginMap[anchorKey] || transformOriginMap["bottom-start"];
|
|
55
|
+
return /* @__PURE__ */ jsxs("div", { className, children: [
|
|
56
|
+
/* @__PURE__ */ jsx("div", { onClick: handleClick, className: "inline-flex", children: trigger }),
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
Menu,
|
|
59
|
+
{
|
|
60
|
+
anchorEl,
|
|
61
|
+
open,
|
|
62
|
+
onClose: handleClose,
|
|
63
|
+
anchorOrigin,
|
|
64
|
+
transformOrigin,
|
|
65
|
+
className: contentClassName,
|
|
66
|
+
slotProps: PAPER_SLOT_PROPS,
|
|
67
|
+
children: React__default.Children.map(children, (child) => {
|
|
68
|
+
if (React__default.isValidElement(child)) {
|
|
69
|
+
return React__default.cloneElement(child, {
|
|
70
|
+
onClick: (e) => {
|
|
71
|
+
var _a, _b;
|
|
72
|
+
(_b = (_a = child.props).onClick) == null ? void 0 : _b.call(_a, e);
|
|
73
|
+
handleClose();
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return child;
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] });
|
|
82
|
+
};
|
|
83
|
+
const DropdownMenuItem = ({ children, className, ...props }) => {
|
|
84
|
+
return /* @__PURE__ */ jsx(
|
|
85
|
+
MenuItem,
|
|
86
|
+
{
|
|
87
|
+
className: classNames(
|
|
88
|
+
"hover:bg-gray-150 dark:hover:bg-gray-300",
|
|
89
|
+
"focus:bg-gray-150 dark:focus:bg-gray-300",
|
|
90
|
+
"flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm outline-none select-none",
|
|
91
|
+
className
|
|
92
|
+
),
|
|
93
|
+
...props,
|
|
94
|
+
children
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
DropdownMenu.Item = DropdownMenuItem;
|
|
99
|
+
export {
|
|
100
|
+
DropdownMenu,
|
|
101
|
+
DropdownMenuItem,
|
|
102
|
+
DropdownMenu as default
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=DropdownMenu.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.es.js","sources":["../../../src/components/molecules/DropdownMenu.tsx"],"sourcesContent":["import React, { useState } from 'react'\nimport Menu, { MenuProps } from '@mui/material/Menu'\nimport MenuItem, { MenuItemProps } from '@mui/material/MenuItem'\n\nimport classNames from '@/utils/classNames'\n\nexport interface DropdownMenuProps {\n trigger: React.ReactNode\n children: React.ReactNode\n align?: 'start' | 'center' | 'end'\n side?: 'top' | 'bottom' | 'left' | 'right'\n className?: string\n contentClassName?: string\n}\n\nexport interface DropdownMenuItemProps extends MenuItemProps {\n children: React.ReactNode\n}\n\ntype MenuOrigin = {\n vertical: 'top' | 'bottom' | 'center'\n horizontal: 'left' | 'right' | 'center'\n}\n\nconst anchorOriginMap: Record<string, MenuOrigin> = {\n 'bottom-start': { vertical: 'bottom', horizontal: 'left' },\n 'bottom-center': { vertical: 'bottom', horizontal: 'center' },\n 'bottom-end': { vertical: 'bottom', horizontal: 'right' },\n 'top-start': { vertical: 'top', horizontal: 'left' },\n 'top-center': { vertical: 'top', horizontal: 'center' },\n 'top-end': { vertical: 'top', horizontal: 'right' },\n 'left-start': { vertical: 'top', horizontal: 'left' },\n 'left-center': { vertical: 'center', horizontal: 'left' },\n 'left-end': { vertical: 'bottom', horizontal: 'left' },\n 'right-start': { vertical: 'top', horizontal: 'right' },\n 'right-center': { vertical: 'center', horizontal: 'right' },\n 'right-end': { vertical: 'bottom', horizontal: 'right' },\n}\n\nconst transformOriginMap: Record<string, MenuOrigin> = {\n 'bottom-start': { vertical: 'top', horizontal: 'left' },\n 'bottom-center': { vertical: 'top', horizontal: 'center' },\n 'bottom-end': { vertical: 'top', horizontal: 'right' },\n 'top-start': { vertical: 'bottom', horizontal: 'left' },\n 'top-center': { vertical: 'bottom', horizontal: 'center' },\n 'top-end': { vertical: 'bottom', horizontal: 'right' },\n 'left-start': { vertical: 'top', horizontal: 'right' },\n 'left-center': { vertical: 'center', horizontal: 'right' },\n 'left-end': { vertical: 'bottom', horizontal: 'right' },\n 'right-start': { vertical: 'top', horizontal: 'left' },\n 'right-center': { vertical: 'center', horizontal: 'left' },\n 'right-end': { vertical: 'bottom', horizontal: 'left' },\n}\n\nconst PAPER_SLOT_PROPS = {\n paper: {\n className: classNames(\n 'bg-white dark:bg-gray-250 text-gray-800 dark:text-gray-700',\n 'min-w-[8rem] overflow-hidden rounded-xl border border-gray-250 dark:border-gray-275',\n 'p-1.5 shadow-lg',\n ),\n },\n}\n\nexport const DropdownMenu: React.FC<DropdownMenuProps> & {\n Item: typeof DropdownMenuItem\n} = ({ trigger, children, align = 'start', side = 'bottom', className, contentClassName }) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = Boolean(anchorEl)\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorEl(event.currentTarget)\n }\n\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n const anchorKey = `${side}-${align}`\n const anchorOrigin = anchorOriginMap[anchorKey] || anchorOriginMap['bottom-start']\n const transformOrigin = transformOriginMap[anchorKey] || transformOriginMap['bottom-start']\n\n return (\n <div className={className}>\n <div onClick={handleClick} className=\"inline-flex\">\n {trigger}\n </div>\n <Menu\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n anchorOrigin={anchorOrigin}\n transformOrigin={transformOrigin}\n className={contentClassName}\n slotProps={PAPER_SLOT_PROPS}\n >\n {React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child as React.ReactElement<any>, {\n onClick: (e: React.MouseEvent) => {\n child.props.onClick?.(e)\n handleClose()\n },\n })\n }\n return child\n })}\n </Menu>\n </div>\n )\n}\n\nexport const DropdownMenuItem: React.FC<DropdownMenuItemProps> = ({ children, className, ...props }) => {\n return (\n <MenuItem\n className={classNames(\n 'hover:bg-gray-150 dark:hover:bg-gray-300',\n 'focus:bg-gray-150 dark:focus:bg-gray-300',\n 'flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm outline-none select-none',\n className,\n )}\n {...props}\n >\n {children}\n </MenuItem>\n )\n}\n\nDropdownMenu.Item = DropdownMenuItem\n\nexport default DropdownMenu\n"],"names":["React"],"mappings":";;;;;AAwBA,MAAM,kBAA8C;AAAA,EAClD,gBAAgB,EAAE,UAAU,UAAU,YAAY,OAAA;AAAA,EAClD,iBAAiB,EAAE,UAAU,UAAU,YAAY,SAAA;AAAA,EACnD,cAAc,EAAE,UAAU,UAAU,YAAY,QAAA;AAAA,EAChD,aAAa,EAAE,UAAU,OAAO,YAAY,OAAA;AAAA,EAC5C,cAAc,EAAE,UAAU,OAAO,YAAY,SAAA;AAAA,EAC7C,WA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AQ;AAE7B,QAAM,cAAc,CAAC,UAAyC;AAC5D,gBAAY,MAAM,aAAa;AAAA,EACjC;AAEA,QAAM,cAAc,MAAM;AACxB,gBAAY,IAAI;AAAA,EAClB;AAEA,QAAM,YAAY,GAAG,IAAI,IAAI,KAAK;AAClC,QAAM,eAAe,gBAAgB,SAAS,KAAK,gBAAgB,cAAc;AACjF,QAAM,kBAAkB,mBAAmB,SAAS,KAAK,mBAAmB,cAAc;AAE1F,SACE,qBAAC,SAAI,WACH,UAAA;AAAA,IAAA,oBAAC,OAAA,EAAI,SAAS,aAAa,WAAU,eAClC,UAAA,SACH;AAAA,IACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA,WAAW;AAAA,QACX,WAAW;AAAA,QAEV,UAAAA,eAAM,SAAS,IAAI,UAAU,CAAC,UAAU;AACvC,cAAIA,eAAM,eAAe,KAAK,GAAG;AAC/B,mBAAOA,eAAM,aAAa,OAAkC;AAAA,cAC1D,SAAS,CAAC,MAAwB;;AAChC,kCAAM,OAAM,YAAZ,4BAAsB;AACtB,4BAAA;AAAA,cACF;AAAA,YAAA,CACD;AAAA,UACH;AACA,iBAAO;AAAA,QACT,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ;AAEO,MAAM,mBAAoD,CAAC,EAAE,UAAU,WAAW,GAAG,YAAY;AACtG,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MAEH;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,aAAa,OAAO;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ImagesPreviewProps {
|
|
3
|
+
images: string[];
|
|
4
|
+
/** Override the default image download behavior. */
|
|
5
|
+
onDownloadImage?: (url: string, filename: string) => Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
declare const ImagesPreview: React.FC<ImagesPreviewProps>;
|
|
8
|
+
export default ImagesPreview;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useCallback } from "react";
|
|
3
|
+
import { Button } from "../atoms/Button.es.js";
|
|
4
|
+
import IconButton from "../atoms/IconButton.es.js";
|
|
5
|
+
import Modal from "../atoms/Modal.es.js";
|
|
6
|
+
import Skeleton from "../atoms/Skeleton.es.js";
|
|
7
|
+
import { c as classNames } from "../../classNames-Dy-RXSjS.js";
|
|
8
|
+
function baseToString(value) {
|
|
9
|
+
{
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function toString(value) {
|
|
14
|
+
return baseToString(value);
|
|
15
|
+
}
|
|
16
|
+
var idCounter = 0;
|
|
17
|
+
function uniqueId(prefix) {
|
|
18
|
+
var id = ++idCounter;
|
|
19
|
+
return toString(prefix) + id;
|
|
20
|
+
}
|
|
21
|
+
const defaultDownloadImage = async (url, filename) => {
|
|
22
|
+
try {
|
|
23
|
+
const response = await fetch(url);
|
|
24
|
+
const blob = await response.blob();
|
|
25
|
+
const blobUrl = window.URL.createObjectURL(blob);
|
|
26
|
+
const link = document.createElement("a");
|
|
27
|
+
link.href = blobUrl;
|
|
28
|
+
link.download = filename;
|
|
29
|
+
document.body.appendChild(link);
|
|
30
|
+
link.click();
|
|
31
|
+
document.body.removeChild(link);
|
|
32
|
+
window.URL.revokeObjectURL(blobUrl);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.error("Error downloading image:", error);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const ImagePreviewModal = ({ open, onClose, imageUrl, onDownload }) => {
|
|
38
|
+
const [imageLoaded, setImageLoaded] = useState(false);
|
|
39
|
+
const imageRefCallback = useCallback((img) => {
|
|
40
|
+
if (img == null ? void 0 : img.complete) {
|
|
41
|
+
setImageLoaded(true);
|
|
42
|
+
}
|
|
43
|
+
}, []);
|
|
44
|
+
return /* @__PURE__ */ jsx(Modal, { open, onClose, children: /* @__PURE__ */ jsxs("div", { className: "modal-box relative overflow-visible bg-white rounded-2xl max-w-5xl w-fit p-0", children: [
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
IconButton,
|
|
47
|
+
{
|
|
48
|
+
icon: "close",
|
|
49
|
+
onClick: onClose,
|
|
50
|
+
iconSize: 1.25,
|
|
51
|
+
className: "absolute top-4 -right-5 z-10 text-light-white hover:text-light-white"
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 p-6 pb-3.5", children: [
|
|
55
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-shrink-0 relative flex items-center justify-center rounded", children: [
|
|
56
|
+
!imageLoaded && /* @__PURE__ */ jsx(
|
|
57
|
+
Skeleton,
|
|
58
|
+
{
|
|
59
|
+
variant: "rectangular",
|
|
60
|
+
animation: "wave",
|
|
61
|
+
width: "25rem",
|
|
62
|
+
height: "25rem",
|
|
63
|
+
className: "!bg-gradient-to-br from-gray-200 to-gray-100 rounded"
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
67
|
+
"img",
|
|
68
|
+
{
|
|
69
|
+
ref: imageRefCallback,
|
|
70
|
+
src: imageUrl,
|
|
71
|
+
alt: "Generated image preview",
|
|
72
|
+
className: classNames(
|
|
73
|
+
"max-w-[25rem] max-h-[calc(70vh-3rem)] h-auto object-contain rounded transition-opacity duration-300",
|
|
74
|
+
{
|
|
75
|
+
"opacity-0 absolute": !imageLoaded,
|
|
76
|
+
"opacity-100": imageLoaded
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
onLoad: () => setImageLoaded(true)
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col gap-5", children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between gap-2", children: /* @__PURE__ */ jsx(
|
|
84
|
+
Button.Ghost,
|
|
85
|
+
{
|
|
86
|
+
type: "button",
|
|
87
|
+
icon: "download-material",
|
|
88
|
+
iconClasses: "text-gray-15",
|
|
89
|
+
text: "Download",
|
|
90
|
+
onClick: onDownload,
|
|
91
|
+
size: "small",
|
|
92
|
+
className: "text-gray-15"
|
|
93
|
+
}
|
|
94
|
+
) }) })
|
|
95
|
+
] })
|
|
96
|
+
] }) });
|
|
97
|
+
};
|
|
98
|
+
const ImageCard = ({ imageUrl, imageIndex, onClick, onDownload }) => {
|
|
99
|
+
const [loaded, setLoaded] = useState(false);
|
|
100
|
+
const handleLoad = useCallback(() => {
|
|
101
|
+
setLoaded(true);
|
|
102
|
+
}, []);
|
|
103
|
+
const imageRefCallback = useCallback((img) => {
|
|
104
|
+
if (img == null ? void 0 : img.complete) {
|
|
105
|
+
setLoaded(true);
|
|
106
|
+
}
|
|
107
|
+
}, []);
|
|
108
|
+
return /* @__PURE__ */ jsxs(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
className: "relative w-[12.5rem] aspect-square rounded-lg overflow-hidden group/image cursor-pointer",
|
|
112
|
+
onClick,
|
|
113
|
+
children: [
|
|
114
|
+
!loaded && /* @__PURE__ */ jsx(
|
|
115
|
+
Skeleton,
|
|
116
|
+
{
|
|
117
|
+
variant: "rectangular",
|
|
118
|
+
animation: "wave",
|
|
119
|
+
width: "100%",
|
|
120
|
+
height: "100%",
|
|
121
|
+
className: "!absolute inset-0 !bg-gradient-to-br w-[12.5rem] h-[12.5rem] from-gray-200 to-gray-100"
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
/* @__PURE__ */ jsx(
|
|
125
|
+
"img",
|
|
126
|
+
{
|
|
127
|
+
ref: imageRefCallback,
|
|
128
|
+
src: imageUrl,
|
|
129
|
+
alt: `Generated image ${imageIndex}`,
|
|
130
|
+
className: classNames(
|
|
131
|
+
"w-full h-full object-cover transition-opacity duration-300",
|
|
132
|
+
loaded ? "opacity-100" : "opacity-0"
|
|
133
|
+
),
|
|
134
|
+
onLoad: handleLoad
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-1 right-1 bg-black/40 opacity-0 group-hover/image:opacity-100 transition-opacity flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
138
|
+
IconButton,
|
|
139
|
+
{
|
|
140
|
+
icon: "download-material",
|
|
141
|
+
onClick: (e) => {
|
|
142
|
+
e.stopPropagation();
|
|
143
|
+
onDownload(imageUrl, `generated_image_${imageIndex}.png`);
|
|
144
|
+
},
|
|
145
|
+
iconSize: 1.5,
|
|
146
|
+
className: "p-1.5 rounded-sm bg-white transition-colors text-gray-15"
|
|
147
|
+
}
|
|
148
|
+
) })
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
const ImagesPreview = ({ images, onDownloadImage }) => {
|
|
154
|
+
const [selectedImageForPreview, setSelectedImageForPreview] = useState(null);
|
|
155
|
+
const downloadFn = onDownloadImage ?? defaultDownloadImage;
|
|
156
|
+
const handleDownload = async () => {
|
|
157
|
+
if (selectedImageForPreview) {
|
|
158
|
+
await downloadFn(selectedImageForPreview, `${uniqueId("generated_image_")}.png`);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
|
|
162
|
+
images.map((image, idx) => /* @__PURE__ */ jsx(
|
|
163
|
+
ImageCard,
|
|
164
|
+
{
|
|
165
|
+
imageUrl: image,
|
|
166
|
+
imageIndex: idx + 1,
|
|
167
|
+
onClick: () => setSelectedImageForPreview(image),
|
|
168
|
+
onDownload: downloadFn
|
|
169
|
+
},
|
|
170
|
+
idx
|
|
171
|
+
)),
|
|
172
|
+
!!selectedImageForPreview && /* @__PURE__ */ jsx(
|
|
173
|
+
ImagePreviewModal,
|
|
174
|
+
{
|
|
175
|
+
open: !!selectedImageForPreview,
|
|
176
|
+
imageUrl: selectedImageForPreview,
|
|
177
|
+
onDownload: handleDownload,
|
|
178
|
+
onClose: () => setSelectedImageForPreview(null)
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
] });
|
|
182
|
+
};
|
|
183
|
+
export {
|
|
184
|
+
ImagesPreview as default
|
|
185
|
+
};
|
|
186
|
+
//# sourceMappingURL=ImagesPreview.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImagesPreview.es.js","sources":["../../../node_modules/lodash-es/_baseToString.js","../../../node_modules/lodash-es/toString.js","../../../node_modules/lodash-es/uniqueId.js","../../../src/components/molecules/ImagesPreview.tsx"],"sourcesContent":["import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default baseToString;\n","import baseToString from './_baseToString.js';\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nexport default toString;\n","import toString from './toString.js';\n\n/** Used to generate unique IDs. */\nvar idCounter = 0;\n\n/**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\nfunction uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n}\n\nexport default uniqueId;\n","import React, { useCallback, useState } from 'react'\nimport _uniqueId from 'lodash-es/uniqueId'\n\nimport { Button } from '@/components/atoms/Button'\nimport IconButton from '@/components/atoms/IconButton'\nimport Modal from '@/components/atoms/Modal'\nimport Skeleton from '@/components/atoms/Skeleton'\n\nimport classNames from '@/utils/classNames'\n\nconst defaultDownloadImage = async (url: string, filename: string) => {\n try {\n const response = await fetch(url)\n const blob = await response.blob()\n const blobUrl = window.URL.createObjectURL(blob)\n const link = document.createElement('a')\n link.href = blobUrl\n link.download = filename\n document.body.appendChild(link)\n link.click()\n document.body.removeChild(link)\n window.URL.revokeObjectURL(blobUrl)\n } catch (error: unknown) {\n // eslint-disable-next-line no-console\n console.error('Error downloading image:', error)\n }\n}\n\ninterface ImagePreviewModalProps {\n open: boolean\n onClose: () => void\n imageUrl: string\n onDownload: () => void\n}\n\nconst ImagePreviewModal: React.FC<ImagePreviewModalProps> = ({ open, onClose, imageUrl, onDownload }) => {\n const [imageLoaded, setImageLoaded] = useState(false)\n const imageRefCallback = useCallback((img: HTMLImageElement | null) => {\n if (img?.complete) {\n setImageLoaded(true)\n }\n }, [])\n\n return (\n <Modal open={open} onClose={onClose}>\n <div className=\"modal-box relative overflow-visible bg-white rounded-2xl max-w-5xl w-fit p-0\">\n <IconButton\n icon=\"close\"\n onClick={onClose}\n iconSize={1.25}\n className=\"absolute top-4 -right-5 z-10 text-light-white hover:text-light-white\"\n />\n\n <div className=\"flex flex-col items-center gap-3 p-6 pb-3.5\">\n <div className=\"flex-shrink-0 relative flex items-center justify-center rounded\">\n {!imageLoaded && (\n <Skeleton\n variant=\"rectangular\"\n animation=\"wave\"\n width=\"25rem\"\n height=\"25rem\"\n className=\"!bg-gradient-to-br from-gray-200 to-gray-100 rounded\"\n />\n )}\n <img\n ref={imageRefCallback}\n src={imageUrl}\n alt=\"Generated image preview\"\n className={classNames(\n 'max-w-[25rem] max-h-[calc(70vh-3rem)] h-auto object-contain rounded transition-opacity duration-300',\n {\n 'opacity-0 absolute': !imageLoaded,\n 'opacity-100': imageLoaded,\n },\n )}\n onLoad={() => setImageLoaded(true)}\n />\n </div>\n\n <div className=\"flex-1 flex flex-col gap-5\">\n <div className=\"flex items-center justify-between gap-2\">\n <Button.Ghost\n type=\"button\"\n icon=\"download-material\"\n iconClasses=\"text-gray-15\"\n text=\"Download\"\n onClick={onDownload}\n size=\"small\"\n className=\"text-gray-15\"\n />\n </div>\n </div>\n </div>\n </div>\n </Modal>\n )\n}\n\ninterface ImageCardProps {\n imageUrl: string\n imageIndex: number\n onClick: () => void\n onDownload: (url: string, filename: string) => void\n}\n\nconst ImageCard: React.FC<ImageCardProps> = ({ imageUrl, imageIndex, onClick, onDownload }) => {\n const [loaded, setLoaded] = useState(false)\n\n const handleLoad = useCallback(() => {\n setLoaded(true)\n }, [])\n\n const imageRefCallback = useCallback((img: HTMLImageElement | null) => {\n if (img?.complete) {\n setLoaded(true)\n }\n }, [])\n\n return (\n <div\n className=\"relative w-[12.5rem] aspect-square rounded-lg overflow-hidden group/image cursor-pointer\"\n onClick={onClick}\n >\n {!loaded && (\n <Skeleton\n variant=\"rectangular\"\n animation=\"wave\"\n width=\"100%\"\n height=\"100%\"\n className=\"!absolute inset-0 !bg-gradient-to-br w-[12.5rem] h-[12.5rem] from-gray-200 to-gray-100\"\n />\n )}\n <img\n ref={imageRefCallback}\n src={imageUrl}\n alt={`Generated image ${imageIndex}`}\n className={classNames(\n 'w-full h-full object-cover transition-opacity duration-300',\n loaded ? 'opacity-100' : 'opacity-0',\n )}\n onLoad={handleLoad}\n />\n <div className=\"absolute top-1 right-1 bg-black/40 opacity-0 group-hover/image:opacity-100 transition-opacity flex items-center justify-center\">\n <IconButton\n icon=\"download-material\"\n onClick={(e: React.MouseEvent) => {\n e.stopPropagation()\n onDownload(imageUrl, `generated_image_${imageIndex}.png`)\n }}\n iconSize={1.5}\n className=\"p-1.5 rounded-sm bg-white transition-colors text-gray-15\"\n />\n </div>\n </div>\n )\n}\n\nexport interface ImagesPreviewProps {\n images: string[]\n /** Override the default image download behavior. */\n onDownloadImage?: (url: string, filename: string) => Promise<void>\n}\n\nconst ImagesPreview: React.FC<ImagesPreviewProps> = ({ images, onDownloadImage }) => {\n const [selectedImageForPreview, setSelectedImageForPreview] = useState<string | null>(null)\n const downloadFn = onDownloadImage ?? defaultDownloadImage\n\n const handleDownload = async () => {\n if (selectedImageForPreview) {\n await downloadFn(selectedImageForPreview, `${_uniqueId('generated_image_')}.png`)\n }\n }\n\n return (\n <div className=\"flex flex-wrap gap-3\">\n {images.map((image, idx) => (\n <ImageCard\n key={idx}\n imageUrl={image}\n imageIndex={idx + 1}\n onClick={() => setSelectedImageForPreview(image)}\n onDownload={downloadFn}\n />\n ))}\n {!!selectedImageForPreview && (\n <ImagePreviewModal\n open={!!selectedImageForPreview}\n imageUrl={selectedImageForPreview}\n onDownload={handleDownload}\n onClose={() => setSelectedImageForPreview(null)}\n />\n )}\n </div>\n )\n}\n\nexport default ImagesPreview\n"],"names":["_uniqueId"],"mappings":";;;;;;;AAoBA,SAAS,aAAa,OAAO;AAEG;AAC5B,WAAO;AAAA,EACT;AAUF;ACXA,SAAS,SAAS,OA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-1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@mui/material/utils/useId";
|
|
4
|
-
import { I } from "
|
|
5
|
-
import "../../classNames-
|
|
4
|
+
import { I } from "../../Input-CnGhA18d.js";
|
|
5
|
+
import "../../classNames-Dy-RXSjS.js";
|
|
6
6
|
import "../atoms/IconProvider.es.js";
|
|
7
7
|
import "../atoms/Tooltip.es.js";
|
|
8
8
|
import "../theme/theme.es.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Markdown/index'
|