@r2digisolutions/components 0.8.1 → 0.8.2
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.
|
@@ -471,6 +471,17 @@
|
|
|
471
471
|
const canvaBorder = $derived(
|
|
472
472
|
isCanva && (handlesVisible === true || mode === 'resize' || mode === 'move')
|
|
473
473
|
);
|
|
474
|
+
|
|
475
|
+
/** `h-full` from parents must not win when collapsed — otherwise the card shell fills the grid cell empty. */
|
|
476
|
+
const frameClassName = $derived.by(() => {
|
|
477
|
+
if (!collapsed) return className;
|
|
478
|
+
const base = className
|
|
479
|
+
? String(className)
|
|
480
|
+
.split(/\s+/)
|
|
481
|
+
.filter((token) => token && token !== 'h-full' && token !== 'min-h-0')
|
|
482
|
+
: [];
|
|
483
|
+
return [...base, 'h-auto', 'max-h-fit', 'self-start', 'shrink-0'].join(' ');
|
|
484
|
+
});
|
|
474
485
|
</script>
|
|
475
486
|
|
|
476
487
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
@@ -484,11 +495,10 @@
|
|
|
484
495
|
canvaBorder && 'outline outline-2 outline-[#3b82f6]',
|
|
485
496
|
freeform ? 'shadow-md absolute' : 'relative',
|
|
486
497
|
isCanva && 'shadow-none',
|
|
487
|
-
collapsed && 'h-auto self-start',
|
|
488
498
|
mode === 'move' && 'cursor-grabbing opacity-95',
|
|
489
499
|
mode === 'resize' && !isCanva && 'ring-brand-500/40 ring-1',
|
|
490
500
|
!showChrome && freeform && draggable && 'cursor-move',
|
|
491
|
-
|
|
501
|
+
frameClassName
|
|
492
502
|
]}
|
|
493
503
|
style={rootStyle}
|
|
494
504
|
onpointerdown={(e) => {
|
|
@@ -546,7 +546,7 @@
|
|
|
546
546
|
<div
|
|
547
547
|
data-grid-id={item.id}
|
|
548
548
|
class={[
|
|
549
|
-
'min-h-0 min-w-0 relative z-[1]',
|
|
549
|
+
'min-h-0 min-w-0 relative z-[1] flex flex-col',
|
|
550
550
|
editable && draggable && !item.static && 'cursor-grab',
|
|
551
551
|
(draggingId === item.id || resizingId === item.id) && 'z-20',
|
|
552
552
|
draggingId === item.id && dragMoved && 'pointer-events-none opacity-30',
|