diff --git a/package.json b/package.json index d649435..427aa31 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mezh-hq/react-seat-toolkit", - "version": "3.0.0", + "version": "3.0.1-blizzard.0", "description": "React UI library to design and render seat layouts", "main": "dist/index.cjs", "module": "dist/index.mjs", diff --git a/src/components/workspace/cursor.tsx b/src/components/workspace/cursor.tsx index 304c7a9..f5ef958 100644 --- a/src/components/workspace/cursor.tsx +++ b/src/components/workspace/cursor.tsx @@ -13,27 +13,26 @@ export const Cursor = () => { const Cursor = useSelector((state: any) => state.editor.cursor); + const workspace = document.getElementById(ids.workspace)?.getBoundingClientRect(); + const zoomControls = document.getElementById(ids.zoomControls)?.getBoundingClientRect(); + const mainControls = document.getElementById(ids.controls)?.getBoundingClientRect(); + const move = (e) => { const ptr = pointer(e); const x = ptr[0]; const y = ptr[1]; - const workspace = document.getElementById(ids.workspace)?.getBoundingClientRect(); - const zoomControls = document.getElementById(ids.zoomControls)?.getBoundingClientRect(); - const mainControls = document.getElementById(ids.controls)?.getBoundingClientRect(); - if (workspace) { - const customCursor = document.getElementById(ids.cursor); - if ( - isWithinBounds(x, y, workspace) && - !isWithinBounds(x, y, zoomControls) && - !isWithinBounds(x, y, mainControls) && - !resizeCursors.includes(e.target?.style?.cursor) && - !e.target.id.includes("radix:") && - e.target.getAttribute("role") !== "dialog" - ) { - customCursor.style.display = "block"; - } else { - customCursor.style.display = "none"; - } + const customCursor = document.getElementById(ids.cursor); + if ( + isWithinBounds(x, y, workspace) && + !isWithinBounds(x, y, zoomControls) && + !isWithinBounds(x, y, mainControls) && + !resizeCursors.includes(e.target?.style?.cursor) && + !e.target.id.includes("radix:") && + e.target.getAttribute("role") !== "dialog" + ) { + customCursor.classList.remove("hidden"); + } else { + customCursor.classList.add("hidden"); } setCursorX(x); setCursorY(y); diff --git a/src/components/workspace/elements/seat.tsx b/src/components/workspace/elements/seat.tsx index 2548b16..7a3e8bc 100644 --- a/src/components/workspace/elements/seat.tsx +++ b/src/components/workspace/elements/seat.tsx @@ -152,7 +152,7 @@ const Seat: React.FC = forwardRef( width={seatSize * 0.75} height={seatSize * 0.75} size={seatSize * 0.75} - className={consumer.styles?.elements?.seat?.icon?.className} + className={twMerge(consumer.styles?.elements?.seat?.icon?.className, "stk-seat-icon")} style={consumer.styles?.elements?.seat?.icon?.properties} /> )} diff --git a/src/stories/designer/basic.stories.tsx b/src/stories/designer/basic.stories.tsx index 6a2fce9..21d27c3 100644 --- a/src/stories/designer/basic.stories.tsx +++ b/src/stories/designer/basic.stories.tsx @@ -13,19 +13,6 @@ export const Story = { render: (props) => }; -export const WithoutFooter = { - render: (props) => ( - - ) -}; - export const WithReloadButton = { render: (props) => (