@edu-tosel/design 1.0.296 → 1.0.297
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.
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { OnClick } from "../../../interface";
|
|
2
3
|
interface Content {
|
|
3
4
|
image: string;
|
|
4
5
|
onClick: OnClick;
|
|
5
6
|
background?: string;
|
|
7
|
+
hoverContent?: React.ReactNode;
|
|
6
8
|
}
|
|
7
9
|
export default function Float({ contents }: {
|
|
8
10
|
contents: Content[];
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../../util";
|
|
3
3
|
export default function Float({ contents }) {
|
|
4
|
-
const container =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
const buttonBox = (background) => ({
|
|
9
|
-
displays: "flex flex-col justify-center items-center",
|
|
10
|
-
spacings: "p-1.5 md:p-3",
|
|
11
|
-
sizes: "w-12 h-12 md:w-16 md:h-16",
|
|
12
|
-
styles: "rounded-full bg-black overflow-hidden",
|
|
13
|
-
backgrounds: background ?? "bg-white",
|
|
14
|
-
shadows: "shadow-main",
|
|
15
|
-
animation: "hover:scale-110 duration-300 hover:shadow-icon-hover",
|
|
16
|
-
});
|
|
17
|
-
return (_jsx("div", { className: cn(container), children: contents.map(({ image, onClick, background }) => (_jsx("button", { onClick: onClick, className: cn(buttonBox(background)), children: _jsx("img", { src: image, alt: "image", className: "object-contain" }) }, image))) }));
|
|
4
|
+
const container = cn("fixed flex flex-col bottom-20 md:bottom-16 right-5 md:right-16 z-40 overflow-visible", "gap-5");
|
|
5
|
+
const buttonBox = (background) => cn("flex justify-center items-center", "p-1.5 md:p-3", "w-12 h-12 md:w-16 md:h-16", "rounded-full overflow-hidden shadow-main hover:scale-110 duration-300 hover:shadow-icon-hover", background ?? "bg-white");
|
|
6
|
+
return (_jsx("div", { className: container, children: contents.map(({ image, onClick, background, hoverContent }) => (_jsxs("div", { className: "relative group flex items-center", children: [hoverContent && (_jsx("div", { className: cn("absolute right-full mr-3", "bg-gray-dark text-white text-sm px-5 py-2 rounded shadow-md whitespace-nowrap", "opacity-0 group-hover:opacity-100 transition-opacity duration-200"), children: hoverContent })), _jsx("button", { onClick: onClick, className: buttonBox(background), children: _jsx("img", { src: image, alt: "image", className: "object-contain" }) })] }, image))) }));
|
|
18
7
|
}
|
|
@@ -63,8 +63,8 @@ export default function Navigation({ browser, calendar, notice, event, }) {
|
|
|
63
63
|
const handleMouseMove = (event) => {
|
|
64
64
|
const viewportScale = window.visualViewport?.scale || 1; // 뷰포트 확대 비율
|
|
65
65
|
// 마우스 좌표를 확대 비율을 고려하여 보정
|
|
66
|
-
const correctedX = event.clientX / viewportScale +
|
|
67
|
-
const correctedY = (event.clientY -
|
|
66
|
+
const correctedX = event.clientX / viewportScale + 30; // 커서 기준 10px 우측
|
|
67
|
+
const correctedY = (event.clientY - 260) / viewportScale + 5; // 커서 기준 10px 아래
|
|
68
68
|
// 툴팁이 화면을 벗어나지 않도록 조정
|
|
69
69
|
const tooltipWidth = 120; // 예상 툴팁 너비
|
|
70
70
|
const tooltipHeight = 40; // 예상 툴팁 높이
|
package/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.297
|