@widgetic/design-system 0.5.14 → 0.5.15
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.
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
export let height: string = '168px';
|
|
29
29
|
export let target: string = 'action-confirmation-modal'; // target for Portal
|
|
30
30
|
export let isConfirmDisabled: boolean = false;
|
|
31
|
+
/** When false, a failed confirm can leave the dialog open. Callers close it themselves. */
|
|
32
|
+
export let closeOnConfirm: boolean = true;
|
|
31
33
|
export let confirmVariant: 'primary' | 'attention' = 'primary';
|
|
32
34
|
export let actionType: string = 'confirm';
|
|
33
35
|
|
|
@@ -75,8 +77,8 @@
|
|
|
75
77
|
// Dispatch a confirmation event with all items
|
|
76
78
|
dispatch('confirm', { items });
|
|
77
79
|
|
|
78
|
-
//
|
|
79
|
-
isOpen = false;
|
|
80
|
+
// Callers that show an error inside the dialog set closeOnConfirm to false.
|
|
81
|
+
if (closeOnConfirm) isOpen = false;
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
// Support for restoring modal state
|
|
@@ -31,6 +31,7 @@ declare const ActionModal: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_Pro
|
|
|
31
31
|
height?: string;
|
|
32
32
|
target?: string;
|
|
33
33
|
isConfirmDisabled?: boolean;
|
|
34
|
+
/** When false, a failed confirm can leave the dialog open. Callers close it themselves. */ closeOnConfirm?: boolean;
|
|
34
35
|
confirmVariant?: "primary" | "attention";
|
|
35
36
|
actionType?: string;
|
|
36
37
|
modalType?: string;
|
|
@@ -188,24 +188,20 @@
|
|
|
188
188
|
<Tooltip.Provider delayDuration={300}>
|
|
189
189
|
<div class="nav-buttons flex items-center shrink-0">
|
|
190
190
|
<Tooltip.Root open={showBackTooltip}>
|
|
191
|
-
<
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
style="min-width: 24px; min-height: 24px;"
|
|
206
|
-
/>
|
|
207
|
-
</div>
|
|
208
|
-
</Tooltip.Trigger>
|
|
191
|
+
<button
|
|
192
|
+
type="button"
|
|
193
|
+
class="breadcrumbs-nav-button inline-flex items-center justify-center w-6 h-6 border-0 bg-transparent p-0 focus:outline-none"
|
|
194
|
+
style="cursor: {canGoBack && !isLoading ? 'pointer' : 'default'}; opacity: {canGoBack && !isLoading ? 1 : 0.35};"
|
|
195
|
+
aria-disabled={!canGoBack || isLoading}
|
|
196
|
+
on:mouseenter={() => { showBackTooltip = true; }}
|
|
197
|
+
on:mouseleave={() => { showBackTooltip = false; }}
|
|
198
|
+
on:click={() => { if (!isLoading) onBack(); }}
|
|
199
|
+
>
|
|
200
|
+
<IconArrowLeft
|
|
201
|
+
class="w-6 h-6 text-[hsl(var(--grey6))]"
|
|
202
|
+
style="min-width: 24px; min-height: 24px;"
|
|
203
|
+
/>
|
|
204
|
+
</button>
|
|
209
205
|
{#if showBackTooltip}
|
|
210
206
|
<!-- Portaled to <body>: the header row around this nav is overflow-hidden, which
|
|
211
207
|
otherwise clips the tooltip at the header's bottom edge. -->
|
|
@@ -218,24 +214,20 @@
|
|
|
218
214
|
</Tooltip.Root>
|
|
219
215
|
|
|
220
216
|
<Tooltip.Root open={showForwardTooltip}>
|
|
221
|
-
<
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
style="min-width: 24px; min-height: 24px;"
|
|
236
|
-
/>
|
|
237
|
-
</div>
|
|
238
|
-
</Tooltip.Trigger>
|
|
217
|
+
<button
|
|
218
|
+
type="button"
|
|
219
|
+
class="breadcrumbs-nav-button ml-4 inline-flex items-center justify-center w-6 h-6 border-0 bg-transparent p-0 focus:outline-none"
|
|
220
|
+
style="cursor: {canGoForward && !isLoading ? 'pointer' : 'default'}; opacity: {canGoForward && !isLoading ? 1 : 0.35};"
|
|
221
|
+
aria-disabled={!canGoForward || isLoading}
|
|
222
|
+
on:mouseenter={() => { showForwardTooltip = true; }}
|
|
223
|
+
on:mouseleave={() => { showForwardTooltip = false; }}
|
|
224
|
+
on:click={() => { if (!isLoading) onForward(); }}
|
|
225
|
+
>
|
|
226
|
+
<IconArrowRight
|
|
227
|
+
class="w-6 h-6 text-[hsl(var(--grey6))]"
|
|
228
|
+
style="min-width: 24px; min-height: 24px;"
|
|
229
|
+
/>
|
|
230
|
+
</button>
|
|
239
231
|
{#if showForwardTooltip}
|
|
240
232
|
<Tooltip.Portal>
|
|
241
233
|
<Tooltip.Content side="bottom" sideOffset={6} class="bg-[hsl(var(--dark))] text-white caption px-2 py-1 rounded-md z-[200000]">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@widgetic/design-system",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"svelte": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"@tiptap/pm": "^2.9.1",
|
|
142
142
|
"@tiptap/starter-kit": "^2.9.1",
|
|
143
143
|
"@types/node": "^22.10.1",
|
|
144
|
-
"@widgetic/dev-tools": "^0.
|
|
144
|
+
"@widgetic/dev-tools": "^0.2.0",
|
|
145
145
|
"chokidar-cli": "^3.0.0",
|
|
146
146
|
"concurrently": "^9.1.0",
|
|
147
147
|
"eslint": "^9.7.0",
|