diff --git a/src/components/controls/image.tsx b/src/components/controls/image.tsx index 9096f13..7e7b0bc 100644 --- a/src/components/controls/image.tsx +++ b/src/components/controls/image.tsx @@ -51,7 +51,7 @@ const ImageControls = ({ options: { maxImageSize = 1024000 } = {} }: IImageContr return (
{file ? ( diff --git a/src/components/controls/index.tsx b/src/components/controls/index.tsx index 39840a9..8ef8dae 100644 --- a/src/components/controls/index.tsx +++ b/src/components/controls/index.tsx @@ -59,13 +59,13 @@ const Controls = ({ options, styles }: IControlProps) => {
-
+
Settings
{ const firstElement = document.getElementById(selectedElementIds[0]); return ( -
+
-
+
{ d3Extended.selectById(id).style("stroke", e.target.value); }); }} + className="p-0 px-[.125rem]" /> +
+
{ d3Extended.selectById(id).style("color", e.target.value); }); }} + className="p-0 px-[.125rem]" />
diff --git a/src/components/controls/select/polyline/section-selector.tsx b/src/components/controls/select/polyline/section-selector.tsx index e6c1337..bfb4390 100644 --- a/src/components/controls/select/polyline/section-selector.tsx +++ b/src/components/controls/select/polyline/section-selector.tsx @@ -1,4 +1,4 @@ -import { DollarSign, Plus, X } from "lucide-react"; +import { DollarSign, Plus, Settings2, X } from "lucide-react"; import { useSelector } from "react-redux"; import { default as debounce } from "lodash/debounce"; import { twMerge } from "tailwind-merge"; @@ -7,7 +7,7 @@ import { dataAttributes } from "@/constants"; import { store } from "@/store"; import { addSection, deleteSection, updatePolylines, updateSection } from "@/store/reducers/editor"; import { ISTKProps } from "@/types"; -import { Callout, Caption, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../core"; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../core"; const onAddSection = () => store.dispatch(addSection(undefined)); @@ -20,8 +20,8 @@ type IControlProps = Pick; export const SectionManager = ({ options }: IControlProps) => { const sections = useSelector((state: any) => state.editor.sections); return ( -
-
+
+
Sections
state.editor.sections); return ( <> -
- Sections - - - - Manage - - - - - - +
+
+
Sections
+ + + } + /> + + + + + +
span]:line-clamp-1", + "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-gray-200 bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className )} {...props} @@ -76,7 +76,7 @@ const SelectContent = React.forwardRef< = (props) => { <>
= ({
= (props) => { return (
-
+
{Object.entries(tools).map(([key, value]) => { diff --git a/src/components/workspace/actions.tsx b/src/components/workspace/actions.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/workspace/dock/index.tsx b/src/components/workspace/dock/index.tsx index 326c938..10ab2cc 100644 --- a/src/components/workspace/dock/index.tsx +++ b/src/components/workspace/dock/index.tsx @@ -97,9 +97,11 @@ const Dock = (props: Pick) const zoomStyles = props.styles?.zoomControls; const panStyles = props.styles?.panControls; + const dockStyles = props.styles?.dock; + const isDesigner = props.mode === "designer"; const showZoomControls = props.options?.showZoomControls ?? true; - const showVisibilityControls = props.mode === "designer" && (props.options?.showVisibilityControls ?? true); + const showVisibilityControls = isDesigner && (props.options?.showVisibilityControls ?? true); const showReloadButton = props.options?.showReloadButton ?? false; const isUser = props.mode === "user"; @@ -110,21 +112,24 @@ const Dock = (props: Pick) {showReloadButton && ( )} - + {(showZoomControls || showVisibilityControls) && }
)} {(showZoomControls || showVisibilityControls) && (
div]:shrink-0 gap-2 transition-all duration-500 ease-in-out opacity-100", - panStyles?.root?.className, + "border border-gray-200 w-fit bg-white p-2 overflow-x-auto rounded-lg flex justify-center [&>div]:shrink-0 gap-2 transition-all duration-500 ease-in-out opacity-100 pointer-events-auto", + dockStyles?.container?.className, !dock && "translate-y-20 opacity-0" )} - style={panStyles?.root?.properties} + style={dockStyles?.container?.properties} > {showVisibilityControls && } {showZoomControls && ( diff --git a/src/types/styles.ts b/src/types/styles.ts index f23bac7..d850521 100644 --- a/src/types/styles.ts +++ b/src/types/styles.ts @@ -90,4 +90,8 @@ export interface IStyles { container?: IStyle; button?: IStyle; }; + dock?: { + container?: IStyle; + root?: IStyle; + }; }