@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
- isLight && !item.active && 'bg-background hover:bg-accent',
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-sidebar hover:bg-sidebar-accent',
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: animate -->
149
- <ul
150
- class="space-y-1 px-2 overflow-hidden"
151
- id={`sidebar-section-${section.id}`}
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
- {#each section.items as item}
155
- <li>
156
- <SidebarNavItem
157
- {item}
158
- {isLight}
159
- {collapsed}
160
- {isMobile}
161
- {icon}
162
- {searchQuery}
163
- {enablePinning}
164
- {pinIcon}
165
- {isPinnedSection}
166
- {onNavigate}
167
- onMouseEnter={onItemMouseEnter}
168
- onMouseLeave={onItemMouseLeave}
169
- {autoCollapse}
170
- siblingIds={expandableItemIds}
171
- />
172
- </li>
173
- {/each}
174
- </ul>
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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classic-homes/theme-svelte",
3
- "version": "1.22.3",
3
+ "version": "1.22.4",
4
4
  "description": "Svelte components for the Classic theme system",
5
5
  "type": "module",
6
6
  "svelte": "./dist/lib/index.js",