@r2digisolutions/components 0.19.10 → 0.19.12
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.
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
cancelLabel?: string;
|
|
11
11
|
confirmLoading?: boolean;
|
|
12
12
|
confirmDisabled?: boolean;
|
|
13
|
+
/** Keep open while an async confirm runs (e.g. remote form). Default true. */
|
|
14
|
+
closeOnConfirm?: boolean;
|
|
13
15
|
children?: Snippet;
|
|
14
16
|
onconfirm?: () => void;
|
|
15
17
|
oncancel?: () => void;
|
|
@@ -24,6 +26,7 @@
|
|
|
24
26
|
cancelLabel = 'Cancel',
|
|
25
27
|
confirmLoading = false,
|
|
26
28
|
confirmDisabled = false,
|
|
29
|
+
closeOnConfirm = true,
|
|
27
30
|
children,
|
|
28
31
|
onconfirm,
|
|
29
32
|
oncancel,
|
|
@@ -39,6 +42,7 @@
|
|
|
39
42
|
{cancelLabel}
|
|
40
43
|
{confirmLoading}
|
|
41
44
|
{confirmDisabled}
|
|
45
|
+
{closeOnConfirm}
|
|
42
46
|
tone="danger"
|
|
43
47
|
confirmVariant="destructive"
|
|
44
48
|
size="sm"
|
|
@@ -7,6 +7,8 @@ interface ConfirmDialogProps {
|
|
|
7
7
|
cancelLabel?: string;
|
|
8
8
|
confirmLoading?: boolean;
|
|
9
9
|
confirmDisabled?: boolean;
|
|
10
|
+
/** Keep open while an async confirm runs (e.g. remote form). Default true. */
|
|
11
|
+
closeOnConfirm?: boolean;
|
|
10
12
|
children?: Snippet;
|
|
11
13
|
onconfirm?: () => void;
|
|
12
14
|
oncancel?: () => void;
|
|
@@ -297,6 +297,9 @@
|
|
|
297
297
|
}
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
|
+
// Width 0 is common during SSR / before layout — do not treat it as "narrow"
|
|
301
|
+
// or the grid stacks on the server and snaps back to the saved layout on hydrate.
|
|
302
|
+
if (width <= 0) return;
|
|
300
303
|
const next = width < stackBelow;
|
|
301
304
|
if (next === stacked) return;
|
|
302
305
|
if (next) resetInteraction();
|