@functionalcms/svelte-components 5.20.0 → 5.22.0

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.
@@ -56,7 +56,7 @@
56
56
  footer:
57
57
  'absolute start-0 bottom-0 z-20 w-full border-t border-gray-200 bg-white p-4 shadow-sm md:flex md:items-center md:justify-between md:p-6 dark:border-gray-600 dark:bg-gray-800',
58
58
  footerLinks: '',
59
- main: 'min-h-screen'
59
+ main: 'flex-1'
60
60
  };
61
61
  const mergedClasses = $derived(() => ({ ...defaultClasses, ...classes }));
62
62
 
@@ -75,7 +75,7 @@
75
75
  <link rel="canonical" href="{canonicalUrl}{page.url.pathname}" />
76
76
  </svelte:head>
77
77
 
78
- <div class="w-full relative" id="defaultLayout">
78
+ <div class="relative flex min-h-screen w-full flex-col" id="defaultLayout">
79
79
  <Navbar class={mergedClasses().navigation}>
80
80
  <NavBrand href="/" class="logo">
81
81
  <img src={logoUrl} class={mergedClasses().logo} alt={companyName} />
@@ -45,7 +45,7 @@
45
45
  });
46
46
  </script>
47
47
 
48
- <main class="" bind:this={container}>
48
+ <main class="menu-layout relative flex h-full" bind:this={container}>
49
49
  <SidebarButton onclick={helpers.toggle} class="mb-2" />
50
50
 
51
51
  <Sidebar
@@ -57,9 +57,6 @@
57
57
  >
58
58
  <SidebarGroup>
59
59
  <div class="mb-4 flex items-center justify-between px-2">
60
- {#if logo && !isCollapsed}
61
- <SidebarBrand site={logo} classes={{ img: 'h-6 w-6' }} />
62
- {/if}
63
60
  <button
64
61
  onclick={() => (isCollapsed = !isCollapsed)}
65
62
  class="rounded-lg p-2 hover:bg-gray-100 dark:hover:bg-gray-700"
@@ -67,6 +64,9 @@
67
64
  >
68
65
  <Icon {icon} />
69
66
  </button>
67
+ {#if logo && !isCollapsed}
68
+ <SidebarBrand site={logo} classes={{ img: 'h-6 w-6' }} />
69
+ {/if}
70
70
  </div>
71
71
  {#each menuItems as item}
72
72
  {#if !isCollapsed}
@@ -107,9 +107,12 @@
107
107
  </SidebarGroup>
108
108
  </Sidebar>
109
109
  <div
110
- class="content h-full overflow-auto px-4 transition-all duration-300 {isCollapsed
111
- ? 'md:ml-16'
112
- : 'md:ml-64'}"
110
+ class="content h-full overflow-auto px-4 transition-all duration-300 {sidebarPosition ===
111
+ 'static'
112
+ ? ''
113
+ : isCollapsed
114
+ ? 'md:ml-16'
115
+ : 'md:ml-64'}"
113
116
  style:flex="1"
114
117
  >
115
118
  {@render children?.()}
@@ -82,16 +82,15 @@
82
82
  .collapse-toggle {
83
83
  position: absolute;
84
84
  left: 0;
85
- top: 50%;
86
- transform: translateY(-50%);
85
+ top: 0;
87
86
  z-index: 10;
88
87
  background-color: #fff;
89
88
  border: 1px solid #ddd;
90
- border-radius: 0 4px 4px 0;
89
+ border-radius: 0 0 4px 0;
91
90
  padding: 0.5rem 0.25rem;
92
91
  cursor: pointer;
93
92
  transition: all 0.3s ease;
94
- box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
93
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
95
94
  }
96
95
 
97
96
  .collapse-toggle.collapsed {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "5.20.0",
3
+ "version": "5.22.0",
4
4
  "license": "MIT",
5
5
  "watch": {
6
6
  "build": {