@vuepress/theme-default 2.0.0-beta.31 → 2.0.0-beta.32

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.
@@ -87,7 +87,6 @@ const isActive = computed(() => {
87
87
  <template>
88
88
  <RouterLink
89
89
  v-if="isRouterLink"
90
- class="nav-link"
91
90
  :class="{ 'router-link-active': isActive }"
92
91
  :to="item.link"
93
92
  :aria-label="linkAriaLabel"
@@ -99,7 +98,7 @@ const isActive = computed(() => {
99
98
  </RouterLink>
100
99
  <a
101
100
  v-else
102
- class="nav-link external"
101
+ class="external-link"
103
102
  :href="item.link"
104
103
  :rel="linkRel"
105
104
  :target="linkTarget"
@@ -10,7 +10,7 @@ import type { FunctionalComponent } from 'vue'
10
10
  import { computed, h } from 'vue'
11
11
  import type { DefaultThemeHomePageFrontmatter } from '../../shared'
12
12
  import { useDarkMode } from '../composables'
13
- import NavLink from './NavLink.vue'
13
+ import AutoLink from './AutoLink.vue'
14
14
 
15
15
  const frontmatter = usePageFrontmatter<DefaultThemeHomePageFrontmatter>()
16
16
  const siteLocale = useSiteLocaleData()
@@ -85,7 +85,7 @@ const HomeHeroImage: FunctionalComponent = () => {
85
85
  </p>
86
86
 
87
87
  <p v-if="actions.length" class="actions">
88
- <NavLink
88
+ <AutoLink
89
89
  v-for="action in actions"
90
90
  :key="action.text"
91
91
  class="action-button"
@@ -2,7 +2,7 @@
2
2
  import { computed, onMounted, ref } from 'vue'
3
3
  import { useThemeLocaleData } from '../composables'
4
4
  import NavbarBrand from './NavbarBrand.vue'
5
- import NavbarLinks from './NavbarLinks.vue'
5
+ import NavbarItems from './NavbarItems.vue'
6
6
  import ToggleDarkModeButton from './ToggleDarkModeButton.vue'
7
7
  import ToggleSidebarButton from './ToggleSidebarButton.vue'
8
8
 
@@ -65,9 +65,9 @@ function getCssValue(el: HTMLElement | null, property: string): number {
65
65
  <NavbarBrand />
66
66
  </span>
67
67
 
68
- <div class="navbar-links-wrapper" :style="linksWrapperStyle">
68
+ <div class="navbar-items-wrapper" :style="linksWrapperStyle">
69
69
  <slot name="before" />
70
- <NavbarLinks class="can-hide" />
70
+ <NavbarItems class="can-hide" />
71
71
  <slot name="after" />
72
72
  <ToggleDarkModeButton v-if="enableDarkMode" />
73
73
  <NavbarSearch />
@@ -2,13 +2,13 @@
2
2
  import { computed, ref, toRefs, watch } from 'vue'
3
3
  import type { PropType } from 'vue'
4
4
  import { useRoute } from 'vue-router'
5
- import type { NavGroup, NavItem } from '../../shared'
5
+ import type { NavbarItem, ResolvedNavbarItem } from '../../shared'
6
+ import AutoLink from './AutoLink.vue'
6
7
  import DropdownTransition from './DropdownTransition.vue'
7
- import NavLink from './NavLink.vue'
8
8
 
9
9
  const props = defineProps({
10
10
  item: {
11
- type: Object as PropType<NavGroup<NavItem>>,
11
+ type: Object as PropType<Exclude<ResolvedNavbarItem, NavbarItem>>,
12
12
  required: true,
13
13
  },
14
14
  })
@@ -50,9 +50,9 @@ const isLastItemOfArray = (item: unknown, arr: unknown[]): boolean =>
50
50
  </script>
51
51
 
52
52
  <template>
53
- <div class="dropdown-wrapper" :class="{ open }">
53
+ <div class="navbar-dropdown-wrapper" :class="{ open }">
54
54
  <button
55
- class="dropdown-title"
55
+ class="navbar-dropdown-title"
56
56
  type="button"
57
57
  :aria-label="dropdownAriaLabel"
58
58
  @click="handleDropdown"
@@ -62,7 +62,7 @@ const isLastItemOfArray = (item: unknown, arr: unknown[]): boolean =>
62
62
  </button>
63
63
 
64
64
  <button
65
- class="mobile-dropdown-title"
65
+ class="navbar-dropdown-title-mobile"
66
66
  type="button"
67
67
  :aria-label="dropdownAriaLabel"
68
68
  @click="open = !open"
@@ -72,15 +72,15 @@ const isLastItemOfArray = (item: unknown, arr: unknown[]): boolean =>
72
72
  </button>
73
73
 
74
74
  <DropdownTransition>
75
- <ul v-show="open" class="nav-dropdown">
75
+ <ul v-show="open" class="navbar-dropdown">
76
76
  <li
77
- v-for="(child, index) in item.children"
78
- :key="child.link || index"
79
- class="dropdown-item"
77
+ v-for="child in item.children"
78
+ :key="child.text"
79
+ class="navbar-dropdown-item"
80
80
  >
81
81
  <template v-if="child.children">
82
- <h4 class="dropdown-subtitle">
83
- <NavLink
82
+ <h4 class="navbar-dropdown-subtitle">
83
+ <AutoLink
84
84
  v-if="child.link"
85
85
  :item="child"
86
86
  @focusout="
@@ -93,13 +93,13 @@ const isLastItemOfArray = (item: unknown, arr: unknown[]): boolean =>
93
93
  <span v-else>{{ child.text }}</span>
94
94
  </h4>
95
95
 
96
- <ul class="dropdown-subitem-wrapper">
96
+ <ul class="navbar-dropdown-subitem-wrapper">
97
97
  <li
98
98
  v-for="grandchild in child.children"
99
99
  :key="grandchild.link"
100
- class="dropdown-subitem"
100
+ class="navbar-dropdown-subitem"
101
101
  >
102
- <NavLink
102
+ <AutoLink
103
103
  :item="grandchild"
104
104
  @focusout="
105
105
  isLastItemOfArray(grandchild, child.children) &&
@@ -112,7 +112,7 @@ const isLastItemOfArray = (item: unknown, arr: unknown[]): boolean =>
112
112
  </template>
113
113
 
114
114
  <template v-else>
115
- <NavLink
115
+ <AutoLink
116
116
  :item="child"
117
117
  @focusout="
118
118
  isLastItemOfArray(child, item.children) && (open = false)
@@ -4,17 +4,11 @@ import { isLinkHttp, isString } from '@vuepress/shared'
4
4
  import { computed } from 'vue'
5
5
  import type { ComputedRef } from 'vue'
6
6
  import { useRouter } from 'vue-router'
7
- import type {
8
- NavbarGroup,
9
- NavbarItem,
10
- NavGroup,
11
- NavLink as NavLinkType,
12
- ResolvedNavbarItem,
13
- } from '../../shared'
7
+ import type { NavbarGroup, NavbarItem, ResolvedNavbarItem } from '../../shared'
14
8
  import { useNavLink, useThemeLocaleData } from '../composables'
15
9
  import { resolveRepoType } from '../utils'
16
- import DropdownLink from './DropdownLink.vue'
17
- import NavLink from './NavLink.vue'
10
+ import AutoLink from './AutoLink.vue'
11
+ import NavbarDropdown from './NavbarDropdown.vue'
18
12
 
19
13
  /**
20
14
  * Get navbar config of select language dropdown
@@ -35,7 +29,7 @@ const useNavbarSelectLanguage = (): ComputedRef<ResolvedNavbarItem[]> => {
35
29
  const currentFullPath = router.currentRoute.value.fullPath
36
30
 
37
31
  const languageDropdown: ResolvedNavbarItem = {
38
- text: themeLocale.value.selectLanguageText ?? 'unkown language',
32
+ text: themeLocale.value.selectLanguageText ?? 'unknown language',
39
33
  ariaLabel: themeLocale.value.selectLanguageAriaLabel ?? 'unkown language',
40
34
  children: localePaths.map((targetLocalePath) => {
41
35
  // target locale config of this langauge link
@@ -151,10 +145,10 @@ const navbarLinks = computed(() => [
151
145
  </script>
152
146
 
153
147
  <template>
154
- <nav v-if="navbarLinks.length" class="navbar-links">
155
- <div v-for="item in navbarLinks" :key="item.text" class="navbar-links-item">
156
- <DropdownLink v-if="item.children" :item="item" />
157
- <NavLink v-else :item="item" />
148
+ <nav v-if="navbarLinks.length" class="navbar-items">
149
+ <div v-for="item in navbarLinks" :key="item.text" class="navbar-item">
150
+ <NavbarDropdown v-if="item.children" :item="item" />
151
+ <AutoLink v-else :item="item" />
158
152
  </div>
159
153
  </nav>
160
154
  </template>
@@ -9,13 +9,13 @@ import type { ComputedRef } from 'vue'
9
9
  import type {
10
10
  DefaultThemeNormalPageFrontmatter,
11
11
  DefaultThemePageData,
12
- NavLink as NavLinkType,
12
+ NavLink,
13
13
  } from '../../shared'
14
14
  import { useThemeLocaleData } from '../composables'
15
15
  import { resolveEditLink } from '../utils'
16
- import NavLink from './NavLink.vue'
16
+ import AutoLink from './AutoLink.vue'
17
17
 
18
- const useEditNavLink = (): ComputedRef<null | NavLinkType> => {
18
+ const useEditNavLink = (): ComputedRef<null | NavLink> => {
19
19
  const themeLocale = useThemeLocaleData()
20
20
  const page = usePageData<DefaultThemePageData>()
21
21
  const frontmatter = usePageFrontmatter<DefaultThemeNormalPageFrontmatter>()
@@ -101,7 +101,7 @@ const contributors = useContributors()
101
101
  <template>
102
102
  <footer class="page-meta">
103
103
  <div v-if="editNavLink" class="meta-item edit-link">
104
- <NavLink class="meta-item-label" :item="editNavLink" />
104
+ <AutoLink class="meta-item-label" :item="editNavLink" />
105
105
  </div>
106
106
 
107
107
  <div v-if="lastUpdated" class="meta-item last-updated">
@@ -5,18 +5,18 @@ import { computed } from 'vue'
5
5
  import { useRoute } from 'vue-router'
6
6
  import type {
7
7
  DefaultThemeNormalPageFrontmatter,
8
- NavLink as NavLinkType,
8
+ NavLink,
9
9
  ResolvedSidebarItem,
10
10
  } from '../../shared'
11
11
  import { useNavLink, useSidebarItems } from '../composables'
12
- import NavLink from './NavLink.vue'
12
+ import AutoLink from './AutoLink.vue'
13
13
 
14
14
  /**
15
15
  * Resolve `prev` or `next` config from frontmatter
16
16
  */
17
17
  const resolveFromFrontmatterConfig = (
18
18
  conf: unknown
19
- ): null | false | NavLinkType => {
19
+ ): null | false | NavLink => {
20
20
  if (conf === false) {
21
21
  return null
22
22
  }
@@ -25,7 +25,7 @@ const resolveFromFrontmatterConfig = (
25
25
  return useNavLink(conf)
26
26
  }
27
27
 
28
- if (isPlainObject<NavLinkType>(conf)) {
28
+ if (isPlainObject<NavLink>(conf)) {
29
29
  return conf
30
30
  }
31
31
 
@@ -39,14 +39,14 @@ const resolveFromSidebarItems = (
39
39
  sidebarItems: ResolvedSidebarItem[],
40
40
  currentPath: string,
41
41
  offset: number
42
- ): null | NavLinkType => {
42
+ ): null | NavLink => {
43
43
  const index = sidebarItems.findIndex((item) => item.link === currentPath)
44
44
  if (index !== -1) {
45
45
  const targetItem = sidebarItems[index + offset]
46
46
  if (!targetItem?.link) {
47
47
  return null
48
48
  }
49
- return targetItem as NavLinkType
49
+ return targetItem as NavLink
50
50
  }
51
51
 
52
52
  for (const item of sidebarItems) {
@@ -92,11 +92,11 @@ const nextNavLink = computed(() => {
92
92
  <nav v-if="prevNavLink || nextNavLink" class="page-nav">
93
93
  <p class="inner">
94
94
  <span v-if="prevNavLink" class="prev">
95
- <NavLink :item="prevNavLink" />
95
+ <AutoLink :item="prevNavLink" />
96
96
  </span>
97
97
 
98
98
  <span v-if="nextNavLink" class="next">
99
- <NavLink :item="nextNavLink" />
99
+ <AutoLink :item="nextNavLink" />
100
100
  </span>
101
101
  </p>
102
102
  </nav>
@@ -1,11 +1,11 @@
1
1
  <script setup lang="ts">
2
- import NavbarLinks from './NavbarLinks.vue'
2
+ import NavbarItems from './NavbarItems.vue'
3
3
  import SidebarItems from './SidebarItems.vue'
4
4
  </script>
5
5
 
6
6
  <template>
7
7
  <aside class="sidebar">
8
- <NavbarLinks />
8
+ <NavbarItems />
9
9
  <slot name="top" />
10
10
  <SidebarItems />
11
11
  <slot name="bottom" />
@@ -4,8 +4,8 @@ import type { PropType } from 'vue'
4
4
  import { useRoute, useRouter } from 'vue-router'
5
5
  import type { ResolvedSidebarItem } from '../../shared'
6
6
  import { isActiveSidebarItem } from '../utils'
7
+ import AutoLink from './AutoLink.vue'
7
8
  import DropdownTransition from './DropdownTransition.vue'
8
- import NavLink from './NavLink.vue'
9
9
 
10
10
  const props = defineProps({
11
11
  item: {
@@ -49,21 +49,26 @@ if (item.value.collapsible) {
49
49
  </script>
50
50
 
51
51
  <template>
52
- <NavLink v-if="item.link" :class="itemClass" :item="item" />
53
- <p v-else :class="itemClass" @click="onClick">
54
- {{ item.text }}
55
- <span
56
- v-if="item.collapsible"
57
- class="arrow"
58
- :class="isOpen ? 'down' : 'right'"
59
- />
60
- </p>
52
+ <li>
53
+ <AutoLink v-if="item.link" :class="itemClass" :item="item" />
54
+ <p v-else :class="itemClass" @click="onClick">
55
+ {{ item.text }}
56
+ <span
57
+ v-if="item.collapsible"
58
+ class="arrow"
59
+ :class="isOpen ? 'down' : 'right'"
60
+ />
61
+ </p>
61
62
 
62
- <DropdownTransition v-if="item.children?.length">
63
- <ul v-show="isOpen" class="sidebar-item-children">
64
- <li v-for="child in item.children" :key="child.text">
65
- <SidebarItem :item="child" :depth="depth + 1" />
66
- </li>
67
- </ul>
68
- </DropdownTransition>
63
+ <DropdownTransition v-if="item.children?.length">
64
+ <ul v-show="isOpen" class="sidebar-item-children">
65
+ <SidebarItem
66
+ v-for="child in item.children"
67
+ :key="`${depth}${child.text}${child.link}`"
68
+ :item="child"
69
+ :depth="depth + 1"
70
+ />
71
+ </ul>
72
+ </DropdownTransition>
73
+ </li>
69
74
  </template>
@@ -1,4 +1,4 @@
1
- import type { DefaultThemeData, DefaultThemeHomePageFrontmatter, DefaultThemeLocaleData, DefaultThemeLocaleOptions, DefaultThemeNormalPageFrontmatter, DefaultThemePageData, DefaultThemePageFrontmatter, DefaultThemePluginsOptions, NavbarConfig, NavbarGroup, NavbarItem, NavGroup, NavItem, NavLink, ResolvedNavbarItem, ResolvedSidebarItem, SidebarConfig, SidebarConfigArray, SidebarConfigObject, SidebarItem } from '../shared';
2
- export type { NavItem, NavGroup, NavLink, NavbarItem, NavbarGroup, NavbarConfig, ResolvedNavbarItem, SidebarItem, SidebarConfigArray, SidebarConfigObject, SidebarConfig, ResolvedSidebarItem, DefaultThemePluginsOptions, DefaultThemeLocaleOptions, DefaultThemeData, DefaultThemeLocaleData, DefaultThemePageData, DefaultThemePageFrontmatter, DefaultThemeHomePageFrontmatter, DefaultThemeNormalPageFrontmatter, };
1
+ import type { DefaultThemeData, DefaultThemeHomePageFrontmatter, DefaultThemeLocaleData, DefaultThemeLocaleOptions, DefaultThemeNormalPageFrontmatter, DefaultThemePageData, DefaultThemePageFrontmatter, DefaultThemePluginsOptions, NavbarConfig, NavbarGroup, NavbarItem, NavGroup, NavItem, NavLink, ResolvedNavbarItem, ResolvedSidebarItem, SidebarConfig, SidebarConfigArray, SidebarConfigObject, SidebarGroup, SidebarGroupCollapsible, SidebarItem } from '../shared';
2
+ export type { DefaultThemeData, DefaultThemeHomePageFrontmatter, DefaultThemeLocaleData, DefaultThemeLocaleOptions, DefaultThemeNormalPageFrontmatter, DefaultThemePageData, DefaultThemePageFrontmatter, DefaultThemePluginsOptions, NavbarConfig, NavbarGroup, NavbarItem, NavGroup, NavItem, NavLink, ResolvedNavbarItem, ResolvedSidebarItem, SidebarConfig, SidebarConfigArray, SidebarConfigObject, SidebarGroup, SidebarGroupCollapsible, SidebarItem, };
3
3
  export * from './composables';
4
4
  export * from './utils';
@@ -7,10 +7,10 @@
7
7
  @use 'code';
8
8
  @use 'code-group';
9
9
  @use 'custom-container';
10
- @use 'dropdown';
11
10
  @use 'home';
12
11
  @use 'layout';
13
12
  @use 'navbar';
13
+ @use 'navbar-dropdown';
14
14
  @use 'page';
15
15
  @use 'sidebar';
16
16
  @use 'sr-only';
@@ -1,10 +1,10 @@
1
1
  @import '_mixins';
2
2
  @import '_variables';
3
3
 
4
- .dropdown-wrapper {
4
+ .navbar-dropdown-wrapper {
5
5
  cursor: pointer;
6
6
 
7
- .dropdown-title {
7
+ .navbar-dropdown-title {
8
8
  display: block;
9
9
  font-size: 0.9rem;
10
10
  font-family: inherit;
@@ -27,8 +27,8 @@
27
27
  }
28
28
  }
29
29
 
30
- .mobile-dropdown-title {
31
- @extend .dropdown-title;
30
+ .navbar-dropdown-title-mobile {
31
+ @extend .navbar-dropdown-title;
32
32
  display: none;
33
33
  font-weight: 600;
34
34
  font-size: inherit;
@@ -37,12 +37,12 @@
37
37
  }
38
38
  }
39
39
 
40
- .nav-dropdown {
41
- .dropdown-item {
40
+ .navbar-dropdown {
41
+ .navbar-dropdown-item {
42
42
  color: inherit;
43
43
  line-height: 1.7rem;
44
44
 
45
- .dropdown-subtitle {
45
+ .navbar-dropdown-subtitle {
46
46
  margin: 0.45rem 0 0;
47
47
  border-top: 1px solid var(--c-border);
48
48
  padding: 1rem 0 0.45rem 0;
@@ -62,11 +62,11 @@
62
62
  }
63
63
  }
64
64
 
65
- .dropdown-subitem-wrapper {
65
+ .navbar-dropdown-subitem-wrapper {
66
66
  padding: 0;
67
67
  list-style: none;
68
68
 
69
- .dropdown-subitem {
69
+ .navbar-dropdown-subitem {
70
70
  font-size: 0.9em;
71
71
  }
72
72
  }
@@ -101,7 +101,7 @@
101
101
  }
102
102
  }
103
103
 
104
- &:first-child .dropdown-subtitle {
104
+ &:first-child .navbar-dropdown-subtitle {
105
105
  margin-top: 0;
106
106
  padding-top: 0;
107
107
  border-top: 0;
@@ -111,37 +111,37 @@
111
111
  }
112
112
 
113
113
  @media (max-width: $MQMobile) {
114
- .dropdown-wrapper {
115
- &.open .dropdown-title {
114
+ .navbar-dropdown-wrapper {
115
+ &.open .navbar-dropdown-title {
116
116
  margin-bottom: 0.5rem;
117
117
  }
118
118
 
119
- .dropdown-title {
119
+ .navbar-dropdown-title {
120
120
  display: none;
121
121
  }
122
122
 
123
- .mobile-dropdown-title {
123
+ .navbar-dropdown-title-mobile {
124
124
  display: block;
125
125
  }
126
126
 
127
- .nav-dropdown {
127
+ .navbar-dropdown {
128
128
  @include dropdown_wrapper;
129
129
 
130
- .dropdown-item {
131
- .dropdown-subtitle {
130
+ .navbar-dropdown-item {
131
+ .navbar-dropdown-subtitle {
132
132
  border-top: 0;
133
133
  margin-top: 0;
134
134
  padding-top: 0;
135
135
  padding-bottom: 0;
136
136
  }
137
137
 
138
- .dropdown-subtitle,
138
+ .navbar-dropdown-subtitle,
139
139
  & > a {
140
140
  font-size: 15px;
141
141
  line-height: 2rem;
142
142
  }
143
143
 
144
- .dropdown-subitem {
144
+ .navbar-dropdown-subitem {
145
145
  font-size: 14px;
146
146
  padding-left: 1rem;
147
147
  }
@@ -151,11 +151,11 @@
151
151
  }
152
152
 
153
153
  @media (min-width: ($MQMobile + 1)) {
154
- .dropdown-wrapper {
154
+ .navbar-dropdown-wrapper {
155
155
  height: 1.8rem;
156
156
 
157
- &:hover .nav-dropdown,
158
- &.open .nav-dropdown {
157
+ &:hover .navbar-dropdown,
158
+ &.open .navbar-dropdown {
159
159
  // override the inline style.
160
160
  display: block !important;
161
161
  }
@@ -164,7 +164,7 @@
164
164
  display: none;
165
165
  }
166
166
 
167
- .nav-dropdown {
167
+ .navbar-dropdown {
168
168
  display: none;
169
169
  // Avoid height shaked by clicking
170
170
  height: auto !important;
@@ -185,11 +185,3 @@
185
185
  }
186
186
  }
187
187
  }
188
-
189
- /**
190
- * transition
191
- */
192
- .dropdown-enter-from,
193
- .dropdown-leave-to {
194
- height: 0 !important;
195
- }
@@ -21,7 +21,7 @@
21
21
  position: relative;
22
22
  }
23
23
 
24
- .navbar-links-wrapper {
24
+ .navbar-items-wrapper {
25
25
  display: flex;
26
26
  position: absolute;
27
27
  box-sizing: border-box;
@@ -57,9 +57,9 @@
57
57
  }
58
58
 
59
59
  /**
60
- * navbar-links
60
+ * navbar-items
61
61
  */
62
- .navbar-links {
62
+ .navbar-items {
63
63
  display: inline-block;
64
64
 
65
65
  a {
@@ -73,7 +73,7 @@
73
73
  }
74
74
  }
75
75
 
76
- .navbar-links-item {
76
+ .navbar-item {
77
77
  position: relative;
78
78
  display: inline-block;
79
79
  margin-left: 1.5rem;
@@ -86,22 +86,22 @@
86
86
  }
87
87
 
88
88
  @media (max-width: $MQMobile) {
89
- .navbar-links {
90
- .navbar-links-item {
89
+ .navbar-items {
90
+ .navbar-item {
91
91
  margin-left: 0;
92
92
  }
93
93
  }
94
94
  }
95
95
 
96
96
  @media (min-width: $MQMobile) {
97
- .navbar-links a {
97
+ .navbar-items a {
98
98
  &:hover,
99
99
  &.router-link-active {
100
100
  color: var(--c-text);
101
101
  }
102
102
  }
103
103
 
104
- .navbar-links-item > a:not(.external) {
104
+ .navbar-item > a {
105
105
  &:hover,
106
106
  &.router-link-active {
107
107
  margin-bottom: -2px;
@@ -12,7 +12,7 @@
12
12
  display: inline-block;
13
13
  }
14
14
 
15
- .navbar-links {
15
+ .navbar-items {
16
16
  display: none;
17
17
  border-bottom: 1px solid var(--c-border);
18
18
  transition: border-color var(--t-color);
@@ -22,7 +22,7 @@
22
22
  font-weight: 600;
23
23
  }
24
24
 
25
- .navbar-links-item {
25
+ .navbar-item {
26
26
  display: block;
27
27
  line-height: 1.25rem;
28
28
  font-size: 1.1em;
@@ -37,12 +37,12 @@
37
37
 
38
38
  @media (max-width: $MQMobile) {
39
39
  .sidebar {
40
- .navbar-links {
40
+ .navbar-items {
41
41
  display: block;
42
42
 
43
- .dropdown-wrapper
44
- .nav-dropdown
45
- .dropdown-item
43
+ .navbar-dropdown-wrapper
44
+ .navbar-dropdown
45
+ .navbar-dropdown-item
46
46
  a.router-link-active::after {
47
47
  top: calc(1rem - 2px);
48
48
  }
@@ -1,11 +1,20 @@
1
+ /**
2
+ * dropdown
3
+ */
4
+ .dropdown-enter-from,
5
+ .dropdown-leave-to {
6
+ height: 0 !important;
7
+ }
8
+
9
+ /**
10
+ * fade-slide-y
11
+ */
1
12
  .fade-slide-y-enter-active {
2
13
  transition: all 0.3s ease;
3
14
  }
4
-
5
15
  .fade-slide-y-leave-active {
6
16
  transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);
7
17
  }
8
-
9
18
  .fade-slide-y-enter-from,
10
19
  .fade-slide-y-leave-to {
11
20
  transform: translateY(10px);
@@ -12,7 +12,7 @@ export interface NavGroup<T> extends NavItem {
12
12
  children: T[];
13
13
  }
14
14
  /**
15
- * Props for `<NavLink>`
15
+ * Props for `<AutoLink>`
16
16
  */
17
17
  export interface NavLink extends NavItem {
18
18
  link: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/theme-default",
3
- "version": "2.0.0-beta.31",
3
+ "version": "2.0.0-beta.32",
4
4
  "description": "Default theme of VuePress",
5
5
  "keywords": [
6
6
  "vuepress-theme",
@@ -29,20 +29,20 @@
29
29
  "copy": "cpx \"src/**/*.{d.ts,vue,scss}\" lib"
30
30
  },
31
31
  "dependencies": {
32
- "@vuepress/client": "2.0.0-beta.29",
33
- "@vuepress/core": "2.0.0-beta.29",
34
- "@vuepress/plugin-active-header-links": "2.0.0-beta.29",
35
- "@vuepress/plugin-back-to-top": "2.0.0-beta.30",
36
- "@vuepress/plugin-container": "2.0.0-beta.29",
37
- "@vuepress/plugin-external-link-icon": "2.0.0-beta.29",
38
- "@vuepress/plugin-git": "2.0.0-beta.29",
39
- "@vuepress/plugin-medium-zoom": "2.0.0-beta.29",
40
- "@vuepress/plugin-nprogress": "2.0.0-beta.29",
41
- "@vuepress/plugin-palette": "2.0.0-beta.29",
42
- "@vuepress/plugin-prismjs": "2.0.0-beta.29",
43
- "@vuepress/plugin-theme-data": "2.0.0-beta.29",
44
- "@vuepress/shared": "2.0.0-beta.28",
45
- "@vuepress/utils": "2.0.0-beta.28",
32
+ "@vuepress/client": "2.0.0-beta.32",
33
+ "@vuepress/core": "2.0.0-beta.32",
34
+ "@vuepress/plugin-active-header-links": "2.0.0-beta.32",
35
+ "@vuepress/plugin-back-to-top": "2.0.0-beta.32",
36
+ "@vuepress/plugin-container": "2.0.0-beta.32",
37
+ "@vuepress/plugin-external-link-icon": "2.0.0-beta.32",
38
+ "@vuepress/plugin-git": "2.0.0-beta.32",
39
+ "@vuepress/plugin-medium-zoom": "2.0.0-beta.32",
40
+ "@vuepress/plugin-nprogress": "2.0.0-beta.32",
41
+ "@vuepress/plugin-palette": "2.0.0-beta.32",
42
+ "@vuepress/plugin-prismjs": "2.0.0-beta.32",
43
+ "@vuepress/plugin-theme-data": "2.0.0-beta.32",
44
+ "@vuepress/shared": "2.0.0-beta.32",
45
+ "@vuepress/utils": "2.0.0-beta.32",
46
46
  "@vueuse/core": "^7.1.2",
47
47
  "sass": "^1.44.0",
48
48
  "sass-loader": "^12.4.0",
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "e7c89264b0f0acb20e477ad1eda89e0f70057014"
55
+ "gitHead": "8ffa71313607fe78f3956e3ccb886fcae0ddf5e9"
56
56
  }