@apptegy/nuxt-navigation 0.1.15 → 0.1.16

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apptegy/nuxt-navigation",
3
3
  "configKey": "@apptegy/nuxt-navigation",
4
- "version": "0.1.15",
4
+ "version": "0.1.16",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.3",
7
7
  "unbuild": "unknown"
@@ -1,32 +1,36 @@
1
1
  <script setup lang="ts">
2
- import { useSidebar } from "#imports";
2
+ import { useSidebar, computed, resolveComponent } from "#imports";
3
3
 
4
- defineProps<{
4
+ const props = defineProps<{
5
5
  icon?: string;
6
6
  active?: boolean;
7
- }>();
7
+ as?: string;
8
+ }>()
8
9
  const { state: expanded } = useSidebar();
10
+ const component = computed(()=> props.as || resolveComponent("NuxtLink"));
9
11
  </script>
10
12
 
11
13
  <template>
12
- <NuxtLink class="a-navbar-item" :class="{expanded, active}">
14
+ <component :is="component" class="a-navbar-item" :class="{expanded, active}">
13
15
  <slot name="icon">
14
16
  <a-icon :icon="icon" font-size="32px"/>
15
17
  </slot>
16
18
  <slot v-if="expanded" />
17
- </NuxtLink>
19
+ </component>
18
20
  </template>
19
21
 
20
22
  <style scoped>
21
23
  .a-navbar-item {
24
+ background-color: transparent;
22
25
  color: var(--dscl-nav-font-color, var(--dscl-light-font, var(--primary-white)));
23
- margin: 4px 12px;
26
+ margin: 2px 12px;
24
27
  display: flex;
25
28
  align-items: center;
26
29
  gap: 4px;
27
30
  text-decoration: none;
28
31
  text-transform: capitalize;
29
32
  padding: 4px;
33
+ border: none;
30
34
  border-radius: 8px;
31
35
  }
32
36
  .a-navbar-item:focus-visible {
@@ -164,7 +164,7 @@ hr {
164
164
  position: absolute;
165
165
  max-width: 512px;
166
166
  right: 65px;
167
- top: 80px;
167
+ top: 72px;
168
168
  background-color: var(--primary-white);
169
169
  border-radius: 4px;
170
170
  box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.06);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apptegy/nuxt-navigation",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {