@r2digisolutions/components 0.8.1 → 0.8.3
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,20 @@
|
|
|
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(
|
|
482
|
+
(token) =>
|
|
483
|
+
token && token !== 'h-full' && token !== 'min-h-0' && token !== 'flex-1'
|
|
484
|
+
)
|
|
485
|
+
: [];
|
|
486
|
+
return [...base, 'h-auto', 'max-h-fit', 'w-full', 'shrink-0'].join(' ');
|
|
487
|
+
});
|
|
474
488
|
</script>
|
|
475
489
|
|
|
476
490
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
@@ -484,11 +498,10 @@
|
|
|
484
498
|
canvaBorder && 'outline outline-2 outline-[#3b82f6]',
|
|
485
499
|
freeform ? 'shadow-md absolute' : 'relative',
|
|
486
500
|
isCanva && 'shadow-none',
|
|
487
|
-
collapsed && 'h-auto self-start',
|
|
488
501
|
mode === 'move' && 'cursor-grabbing opacity-95',
|
|
489
502
|
mode === 'resize' && !isCanva && 'ring-brand-500/40 ring-1',
|
|
490
503
|
!showChrome && freeform && draggable && 'cursor-move',
|
|
491
|
-
|
|
504
|
+
frameClassName
|
|
492
505
|
]}
|
|
493
506
|
style={rootStyle}
|
|
494
507
|
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',
|
|
@@ -602,7 +602,7 @@
|
|
|
602
602
|
loading={meta.loading}
|
|
603
603
|
empty={meta.empty}
|
|
604
604
|
onreload={meta.onReload}
|
|
605
|
-
class="h-full"
|
|
605
|
+
class="h-full w-full"
|
|
606
606
|
ondragstart={(e) => onDragStart(item.id, e)}
|
|
607
607
|
onresizestart={(e, edge) => onResizeStart(item.id, e, edge)}
|
|
608
608
|
>
|