diff --git a/resources/views/rd/planning-design/index.blade.php b/resources/views/rd/planning-design/index.blade.php index 79450106..e40b6187 100644 --- a/resources/views/rd/planning-design/index.blade.php +++ b/resources/views/rd/planning-design/index.blade.php @@ -634,39 +634,49 @@ } .sb-block-toolbar-btn:hover { border-color: var(--pc-indigo); color: var(--pc-indigo); background: #eef2ff; } .sb-block-toolbar-sep { width: 1px; height: 18px; background: #e2e8f0; margin: 0 2px; } -.sb-blocks-area { flex: 1; padding: 16px; overflow-y: auto; min-height: 300px; } +.sb-blocks-area { + flex: 1; position: relative; overflow: auto; min-height: 400px; + background: #fff url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='1' cy='1' r='.5' fill='%23e2e8f0'/%3E%3C/svg%3E") repeat; +} .sb-block { - position: relative; border: 1.5px solid transparent; border-radius: 6px; - margin-bottom: 2px; padding: 0; transition: border-color .12s; - group: true; + position: absolute; border: 1.5px solid transparent; border-radius: 6px; + padding: 0; transition: border-color .1s, box-shadow .1s; + background: #fff; cursor: move; user-select: none; + overflow: hidden; } -.sb-block:hover { border-color: #c7d2fe; } -.sb-block.selected { border-color: var(--pc-indigo); background: #fafafe; } -.sb-block-handle { - position: absolute; left: -22px; top: 50%; transform: translateY(-50%); - width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; - color: #cbd5e1; cursor: grab; font-size: 12px; opacity: 0; transition: opacity .12s; - user-select: none; -} -.sb-block:hover .sb-block-handle { opacity: 1; } -.sb-block-handle:active { cursor: grabbing; color: #6366f1; } +.sb-block:hover { border-color: #c7d2fe; box-shadow: 0 2px 8px rgba(99,102,241,0.08); } +.sb-block.selected { border-color: var(--pc-indigo); box-shadow: 0 0 0 2px rgba(99,102,241,0.15); } +.sb-block.sb-block-editing { cursor: default; user-select: text; overflow: visible; } .sb-block-actions { - position: absolute; right: 4px; top: 4px; display: flex; gap: 2px; - opacity: 0; transition: opacity .12s; + position: absolute; right: 4px; top: -26px; display: flex; gap: 2px; + opacity: 0; transition: opacity .12s; z-index: 10; + background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 2px 4px; + box-shadow: 0 2px 6px rgba(0,0,0,0.08); } -.sb-block:hover .sb-block-actions { opacity: 1; } +.sb-block:hover .sb-block-actions, .sb-block.selected .sb-block-actions { opacity: 1; } .sb-block-action-btn { - width: 20px; height: 20px; border: none; background: #f1f5f9; color: #94a3b8; + width: 20px; height: 20px; border: none; background: transparent; color: #94a3b8; border-radius: 4px; cursor: pointer; font-size: 11px; display: flex; align-items: center; justify-content: center; } -.sb-block-action-btn:hover { background: #e2e8f0; color: #475569; } +.sb-block-action-btn:hover { background: #f1f5f9; color: #475569; } .sb-block-action-btn.danger:hover { background: #fef2f2; color: #ef4444; } -.sb-block-drop-indicator { - height: 3px; background: var(--pc-indigo); border-radius: 2px; margin: -2px 0; - transition: opacity .12s; opacity: 0; +/* Resize handles */ +.sb-resize-handle { + position: absolute; background: #fff; border: 1.5px solid var(--pc-indigo); + border-radius: 2px; z-index: 5; opacity: 0; transition: opacity .1s; } -.sb-block-drop-indicator.active { opacity: 1; } +.sb-block.selected .sb-resize-handle { opacity: 1; } +.sb-resize-handle.sb-rh-r { width: 6px; height: 20px; right: -4px; top: 50%; transform: translateY(-50%); cursor: e-resize; } +.sb-resize-handle.sb-rh-b { width: 20px; height: 6px; bottom: -4px; left: 50%; transform: translateX(-50%); cursor: s-resize; } +.sb-resize-handle.sb-rh-br { width: 10px; height: 10px; right: -5px; bottom: -5px; cursor: se-resize; border-radius: 3px; } +/* Size label */ +.sb-block-size { + position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); + font-size: 9px; color: #94a3b8; white-space: nowrap; pointer-events: none; + opacity: 0; transition: opacity .1s; +} +.sb-block.selected .sb-block-size { opacity: 1; } /* Block type styles */ .sb-blk-text { padding: 6px 8px; font-size: 13px; line-height: 1.7; min-height: 24px; outline: none; color: #334155; } @@ -1484,29 +1494,35 @@ - {{-- Block Editor Area --}} -
+ {{-- Block Editor Area (Free Canvas) --}} +