@r2digisolutions/ui 0.31.0 → 0.31.1
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.
|
@@ -230,68 +230,77 @@
|
|
|
230
230
|
</script>
|
|
231
231
|
|
|
232
232
|
{#if props.open}
|
|
233
|
-
<div class="fixed inset-0 z-99
|
|
234
|
-
<!--
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
233
|
+
<div class="fixed inset-0 z-99 overflow-hidden md:hidden">
|
|
234
|
+
<!-- Underlay global con blur (cubre TODO, también debajo del sheet) -->
|
|
235
|
+
<div class="pointer-events-none absolute inset-0 bg-neutral-950/55 backdrop-blur-sm"></div>
|
|
236
|
+
|
|
237
|
+
<!-- Contenedor real del overlay clicable + sheet -->
|
|
238
|
+
<div class="relative flex h-full flex-col">
|
|
239
|
+
<!-- Overlay superior clicable -->
|
|
240
|
+
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
241
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
242
|
+
<div
|
|
243
|
+
in:fade={{ duration: 150 }}
|
|
244
|
+
out:fade={{ duration: 120 }}
|
|
245
|
+
class={['flex-1', props.overlayClass ?? '']}
|
|
246
|
+
onclick={handleOverlayClick}
|
|
247
|
+
></div>
|
|
248
|
+
|
|
249
|
+
<!-- Panel -->
|
|
250
|
+
<div
|
|
251
|
+
role="dialog"
|
|
252
|
+
aria-modal="true"
|
|
253
|
+
in:slide={{ duration: 220, easing: cubicOut }}
|
|
254
|
+
out:slide={{ duration: 190, easing: cubicIn }}
|
|
255
|
+
class={[
|
|
256
|
+
'relative z-10 w-full overflow-hidden rounded-t-3xl border-t border-neutral-800/70',
|
|
257
|
+
// fondo ligeramente menos transparente y con un blur suave propio
|
|
258
|
+
'bg-neutral-950/90 backdrop-blur-[2px]',
|
|
259
|
+
'shadow-[0_-18px_45px_rgba(0,0,0,0.7)]',
|
|
260
|
+
props.panelClass ?? ''
|
|
261
|
+
]}
|
|
262
|
+
style={`max-height:${props.maxHeight ?? '80vh'};height:${currentHeight * 100}vh;`}
|
|
263
|
+
>
|
|
264
|
+
<div class={['flex h-full flex-col', isOpening ? 'sheet-inner-opening' : '']}>
|
|
265
|
+
<!-- Handle drag -->
|
|
263
266
|
<div
|
|
264
|
-
class="
|
|
265
|
-
style=
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
{@render props.header(sheetContext)}
|
|
267
|
+
class="flex items-center justify-center pt-2 pb-1 select-none"
|
|
268
|
+
style="touch-action:none;"
|
|
269
|
+
onpointerdown={onHandlePointerDown}
|
|
270
|
+
>
|
|
271
|
+
<div
|
|
272
|
+
class="h-1.5 w-10 rounded-full bg-neutral-700/80 transition-transform duration-150"
|
|
273
|
+
style={`transform: translateY(${handleOffset}px) scaleX(${
|
|
274
|
+
1 + handleStretch
|
|
275
|
+
}); opacity:${0.9 - handleStretch * 0.3};`}
|
|
276
|
+
></div>
|
|
275
277
|
</div>
|
|
276
|
-
{/if}
|
|
277
278
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
{@render props.content(sheetContext)}
|
|
279
|
+
<!-- Header opcional -->
|
|
280
|
+
{#if props.header}
|
|
281
|
+
<div class="px-4 pb-2">
|
|
282
|
+
{@render props.header(sheetContext)}
|
|
283
283
|
</div>
|
|
284
284
|
{/if}
|
|
285
|
-
</div>
|
|
286
285
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
286
|
+
<!-- Body -->
|
|
287
|
+
<div class="flex min-h-0 flex-1 flex-col overflow-hidden px-3 pb-3">
|
|
288
|
+
{#if props.content}
|
|
289
|
+
<div class="min-h-0 flex-1 overflow-y-auto">
|
|
290
|
+
{@render props.content(sheetContext)}
|
|
291
|
+
</div>
|
|
292
|
+
{/if}
|
|
293
293
|
</div>
|
|
294
|
-
|
|
294
|
+
|
|
295
|
+
<!-- Footer -->
|
|
296
|
+
{#if props.footer}
|
|
297
|
+
<div
|
|
298
|
+
class="border-t border-neutral-800/70 px-3 py-3 pb-[max(0.75rem,env(safe-area-inset-bottom,0px))]"
|
|
299
|
+
>
|
|
300
|
+
{@render props.footer(sheetContext)}
|
|
301
|
+
</div>
|
|
302
|
+
{/if}
|
|
303
|
+
</div>
|
|
295
304
|
</div>
|
|
296
305
|
</div>
|
|
297
306
|
</div>
|