@coyalabs/bts-style 1.1.2 → 1.1.4
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.
|
@@ -22,16 +22,19 @@
|
|
|
22
22
|
export let topFoldersExpanded = false;
|
|
23
23
|
|
|
24
24
|
let expanded = new Set();
|
|
25
|
+
let mounted = false;
|
|
26
|
+
|
|
27
|
+
// Initialize expanded state before mount (no animation)
|
|
28
|
+
if (topFoldersExpanded && level === 0) {
|
|
29
|
+
items.forEach((item, i) => {
|
|
30
|
+
if (item.type === 'folder') {
|
|
31
|
+
expanded.add(`${level}-${i}`);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
25
35
|
|
|
26
36
|
onMount(() => {
|
|
27
|
-
|
|
28
|
-
items.forEach((item, i) => {
|
|
29
|
-
if (item.type === 'folder') {
|
|
30
|
-
expanded.add(`${level}-${i}`);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
expanded = expanded;
|
|
34
|
-
}
|
|
37
|
+
mounted = true;
|
|
35
38
|
});
|
|
36
39
|
|
|
37
40
|
/**
|
|
@@ -139,7 +142,7 @@
|
|
|
139
142
|
</Button>
|
|
140
143
|
</div>
|
|
141
144
|
{#if open && item.children}
|
|
142
|
-
<div transition:slide={{ duration: 150 }}>
|
|
145
|
+
<div transition:slide={{ duration: mounted ? 150 : 0 }}>
|
|
143
146
|
<svelte:self items={item.children} {showCount} {itemIcon} level={level + 1} on:itemClick />
|
|
144
147
|
</div>
|
|
145
148
|
{/if}
|
|
@@ -148,6 +151,7 @@
|
|
|
148
151
|
<Button
|
|
149
152
|
theme="secondary"
|
|
150
153
|
icon={itemIcon}
|
|
154
|
+
actionIconSize="16px"
|
|
151
155
|
borderRadiusTopLeft={isNested ? '15px' : '25px'}
|
|
152
156
|
borderRadiusTopRight={isNested ? '15px' : '25px'}
|
|
153
157
|
borderRadiusBottomLeft={isNested && !isLast ? '15px' : '25px'}
|