@aiaiai-pt/design-system 0.2.1 → 0.2.2
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.
- package/components/Panel.svelte +9 -1
- package/package.json +1 -1
package/components/Panel.svelte
CHANGED
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
side = 'right',
|
|
41
41
|
/** @type {boolean} When true, removes backdrop and focus trap. Panel becomes an inline layout element. */
|
|
42
42
|
persistent = false,
|
|
43
|
+
/** @type {boolean} When false, body doesn't scroll — children manage their own overflow. */
|
|
44
|
+
scrollBody = true,
|
|
43
45
|
/** @type {(() => void) | undefined} */
|
|
44
46
|
onclose,
|
|
45
47
|
/** @type {string} */
|
|
@@ -144,7 +146,7 @@
|
|
|
144
146
|
{/if}
|
|
145
147
|
</div>
|
|
146
148
|
|
|
147
|
-
<div class="panel-body">
|
|
149
|
+
<div class="panel-body" class:panel-body-no-scroll={!scrollBody}>
|
|
148
150
|
{#if children}{@render children()}{/if}
|
|
149
151
|
</div>
|
|
150
152
|
</aside>
|
|
@@ -261,6 +263,12 @@
|
|
|
261
263
|
padding: var(--panel-padding);
|
|
262
264
|
}
|
|
263
265
|
|
|
266
|
+
.panel-body-no-scroll {
|
|
267
|
+
overflow: hidden;
|
|
268
|
+
display: flex;
|
|
269
|
+
flex-direction: column;
|
|
270
|
+
}
|
|
271
|
+
|
|
264
272
|
@keyframes slide-in-right {
|
|
265
273
|
from {
|
|
266
274
|
transform: translateX(100%);
|