@classic-homes/theme-svelte 1.22.3 → 1.22.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.
|
@@ -444,9 +444,12 @@
|
|
|
444
444
|
<div
|
|
445
445
|
class={cn(
|
|
446
446
|
'group flex w-full items-center rounded-md',
|
|
447
|
-
|
|
447
|
+
// Inside a section panel rows sit on the panel's grey, so no rest fill
|
|
448
|
+
isLight && !item.active && (nested ? 'bg-transparent' : 'bg-background'),
|
|
449
|
+
isLight && !item.active && 'hover:bg-accent',
|
|
448
450
|
isLight && item.active && 'bg-primary/10',
|
|
449
|
-
!isLight && !item.active && 'bg-
|
|
451
|
+
!isLight && !item.active && (nested ? 'bg-transparent' : 'bg-sidebar'),
|
|
452
|
+
!isLight && !item.active && 'hover:bg-sidebar-accent',
|
|
450
453
|
!isLight && item.active && 'bg-sidebar-primary'
|
|
451
454
|
)}
|
|
452
455
|
>
|
|
@@ -145,32 +145,39 @@
|
|
|
145
145
|
{/each}
|
|
146
146
|
</ul>
|
|
147
147
|
{:else if isExpanded}
|
|
148
|
-
<!-- Collapsible and expanded:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
<!-- Collapsible and expanded: the same inset grey panel as an open submenu
|
|
149
|
+
(SidebarNavItem), so a section's pages read as inside it. Its items are
|
|
150
|
+
`nested`: no rest fill over the grey, and their own submenus get the rail -->
|
|
151
|
+
<div
|
|
152
|
+
class={cn(
|
|
153
|
+
'mx-2 overflow-hidden rounded-md p-1',
|
|
154
|
+
isLight ? 'bg-muted/50' : 'bg-sidebar-accent/30'
|
|
155
|
+
)}
|
|
152
156
|
transition:slide={{ duration: sidebarStore.animate ? 200 : 0 }}
|
|
153
157
|
>
|
|
154
|
-
{
|
|
155
|
-
|
|
156
|
-
<
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
158
|
+
<ul class="space-y-1" id={`sidebar-section-${section.id}`}>
|
|
159
|
+
{#each section.items as item}
|
|
160
|
+
<li>
|
|
161
|
+
<SidebarNavItem
|
|
162
|
+
{item}
|
|
163
|
+
{isLight}
|
|
164
|
+
{collapsed}
|
|
165
|
+
{isMobile}
|
|
166
|
+
{icon}
|
|
167
|
+
{searchQuery}
|
|
168
|
+
{enablePinning}
|
|
169
|
+
{pinIcon}
|
|
170
|
+
{isPinnedSection}
|
|
171
|
+
{onNavigate}
|
|
172
|
+
onMouseEnter={onItemMouseEnter}
|
|
173
|
+
onMouseLeave={onItemMouseLeave}
|
|
174
|
+
{autoCollapse}
|
|
175
|
+
siblingIds={expandableItemIds}
|
|
176
|
+
nested
|
|
177
|
+
/>
|
|
178
|
+
</li>
|
|
179
|
+
{/each}
|
|
180
|
+
</ul>
|
|
181
|
+
</div>
|
|
175
182
|
{/if}
|
|
176
183
|
</div>
|