@classic-homes/theme-svelte 1.11.0 → 1.12.0
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.
|
@@ -479,7 +479,7 @@
|
|
|
479
479
|
|
|
480
480
|
{#if enablePagination && !loading && table.rows.length > 0}
|
|
481
481
|
<!-- Pagination controls -->
|
|
482
|
-
<div class="flex items-center justify-between border-t px-4 py-3">
|
|
482
|
+
<div class="flex flex-wrap items-center justify-between gap-2 border-t px-4 py-3">
|
|
483
483
|
<div class="text-sm text-muted-foreground">
|
|
484
484
|
{#if enableRowSelection && table.selectedCount > 0}
|
|
485
485
|
{table.selectedCount} of {table.totalRows} row(s) selected
|
|
@@ -490,7 +490,7 @@
|
|
|
490
490
|
<div class="flex items-center gap-2">
|
|
491
491
|
<button
|
|
492
492
|
type="button"
|
|
493
|
-
class="rounded-md border px-3 py-1 text-sm disabled:opacity-50"
|
|
493
|
+
class="min-h-11 rounded-md border px-3 py-1 text-sm disabled:opacity-50 sm:min-h-0"
|
|
494
494
|
disabled={!table.canPreviousPage}
|
|
495
495
|
onclick={() => table.previousPage()}
|
|
496
496
|
>
|
|
@@ -501,7 +501,7 @@
|
|
|
501
501
|
</span>
|
|
502
502
|
<button
|
|
503
503
|
type="button"
|
|
504
|
-
class="rounded-md border px-3 py-1 text-sm disabled:opacity-50"
|
|
504
|
+
class="min-h-11 rounded-md border px-3 py-1 text-sm disabled:opacity-50 sm:min-h-0"
|
|
505
505
|
disabled={!table.canNextPage}
|
|
506
506
|
onclick={() => table.nextPage()}
|
|
507
507
|
>
|
|
@@ -91,7 +91,10 @@
|
|
|
91
91
|
onValueChange={handleValueChange}
|
|
92
92
|
class={cn(
|
|
93
93
|
'grid gap-2',
|
|
94
|
-
|
|
94
|
+
// Horizontal stacks below sm: a non-wrapping column flow overflows phones.
|
|
95
|
+
orientation === 'horizontal'
|
|
96
|
+
? 'grid-flow-row sm:grid-flow-col sm:auto-cols-max'
|
|
97
|
+
: 'grid-flow-row',
|
|
95
98
|
className
|
|
96
99
|
)}
|
|
97
100
|
aria-labelledby={label ? labelId : undefined}
|
|
@@ -82,6 +82,9 @@
|
|
|
82
82
|
onClose?.();
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
|
|
86
|
+
// Full-width 44px touch targets on phones; stock size from sm up.
|
|
87
|
+
const footerButtonClass = 'h-11 w-full sm:h-10 sm:w-auto';
|
|
85
88
|
</script>
|
|
86
89
|
|
|
87
90
|
<Dialog {open} onOpenChange={handleOpenChange} size="lg">
|
|
@@ -172,27 +175,27 @@
|
|
|
172
175
|
|
|
173
176
|
{#snippet footer()}
|
|
174
177
|
{#if notification}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
<div class="flex
|
|
178
|
+
<!-- Phone: full-width stacked buttons, primary on top, Delete at the bottom.
|
|
179
|
+
sm+: one row, Delete left, the rest pushed right. -->
|
|
180
|
+
<div class="flex w-full flex-col-reverse gap-2 sm:flex-row sm:items-center">
|
|
181
|
+
{#if onDelete}
|
|
182
|
+
<Button variant="destructive" class={footerButtonClass} onclick={handleDelete}>
|
|
183
|
+
{#snippet children()}
|
|
184
|
+
<Icon name="trash" size={16} />
|
|
185
|
+
Delete
|
|
186
|
+
{/snippet}
|
|
187
|
+
</Button>
|
|
188
|
+
{/if}
|
|
189
|
+
<div class="flex flex-col-reverse gap-2 sm:ml-auto sm:flex-row sm:items-center">
|
|
187
190
|
{#if notification.read && onMarkUnread}
|
|
188
|
-
<Button variant="outline" onclick={handleMarkUnread}>
|
|
191
|
+
<Button class={footerButtonClass} variant="outline" onclick={handleMarkUnread}>
|
|
189
192
|
{#snippet children()}
|
|
190
193
|
<Icon name="mail" size={16} />
|
|
191
194
|
Mark Unread
|
|
192
195
|
{/snippet}
|
|
193
196
|
</Button>
|
|
194
197
|
{:else if !notification.read && onMarkRead}
|
|
195
|
-
<Button variant="outline" onclick={handleMarkRead}>
|
|
198
|
+
<Button class={footerButtonClass} variant="outline" onclick={handleMarkRead}>
|
|
196
199
|
{#snippet children()}
|
|
197
200
|
<Icon name="check" size={16} />
|
|
198
201
|
Mark Read
|
|
@@ -200,7 +203,7 @@
|
|
|
200
203
|
</Button>
|
|
201
204
|
{/if}
|
|
202
205
|
{#if notification.actionUrl}
|
|
203
|
-
<Button href={notification.actionUrl}>
|
|
206
|
+
<Button class={footerButtonClass} href={notification.actionUrl}>
|
|
204
207
|
{#snippet children()}
|
|
205
208
|
{notification.actionLabel || 'View Details'}
|
|
206
209
|
{/snippet}
|