@goweekdays/layer-common 1.0.3 → 1.0.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @goweekdays/layer-common
2
2
 
3
+ ## 1.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 34c8471: Update custom navigation
8
+
9
+ ## 1.0.4
10
+
11
+ ### Patch Changes
12
+
13
+ - e2ffd16: Add dark theme
14
+
3
15
  ## 1.0.3
4
16
 
5
17
  ### Patch Changes
@@ -1,7 +1,13 @@
1
1
  <template>
2
- <v-navigation-drawer v-model="drawer" permanent floating class="pr-2">
3
- <v-list class="py-1">
4
- <slot name="action"></slot>
2
+ <v-navigation-drawer
3
+ v-model="drawer"
4
+ permanent
5
+ floating
6
+ :class="props.class"
7
+ :location="props.location"
8
+ >
9
+ <slot name="action"></slot>
10
+ <v-list>
5
11
  <template
6
12
  v-for="(navigationItem, navigationIndex) in props.navigationItems"
7
13
  :key="`${navigationItem.title}-${navigationIndex}`"
@@ -12,15 +18,34 @@
12
18
  :route="navigationItem.route"
13
19
  :children="navigationItem.children"
14
20
  :disabled="navigationItem.disabled"
21
+ :rounded="props.rounded"
15
22
  />
16
23
  </template>
17
24
  </v-list>
25
+
26
+ <template #append>
27
+ <slot name="append"></slot>
28
+ </template>
18
29
  </v-navigation-drawer>
19
30
  </template>
20
31
 
21
32
  <script setup lang="ts">
33
+ import type { PropType } from "vue";
34
+
22
35
  const props = defineProps({
23
36
  navigationItems: { type: Array<TNavigationItem>, required: true },
37
+ rounded: {
38
+ type: String,
39
+ default: "e-pill",
40
+ },
41
+ class: {
42
+ type: String,
43
+ default: "pr-2",
44
+ },
45
+ location: {
46
+ type: String as PropType<"left" | "right">,
47
+ default: "left",
48
+ },
24
49
  });
25
50
 
26
51
  const { drawer } = useLocal();
@@ -4,8 +4,8 @@
4
4
  <v-list-item
5
5
  v-bind="props"
6
6
  :prepend-icon="icon"
7
- rounded="e-pill"
8
- class="text-subtitle-2"
7
+ class="text-subtitle-2 font-weight-medium px-3"
8
+ :rounded="prop.rounded"
9
9
  >
10
10
  {{ title }}
11
11
  </v-list-item>
@@ -19,23 +19,24 @@
19
19
  :route="child.route"
20
20
  :children="child.children"
21
21
  :disabled="child.disabled"
22
+ :rounded="prop.rounded"
22
23
  />
23
24
  </v-list-group>
24
25
 
25
26
  <v-list-item
26
27
  v-else
27
28
  :prepend-icon="icon"
28
- :to="props.route"
29
- rounded="e-pill"
30
- class="text-subtitle-2"
31
- :disabled="props.disabled"
29
+ :to="prop.route"
30
+ :rounded="prop.rounded"
31
+ class="text-subtitle-2 font-weight-medium px-3"
32
+ :disabled="prop.disabled"
32
33
  >
33
34
  {{ title }}
34
35
  </v-list-item>
35
36
  </template>
36
37
 
37
38
  <script setup lang="ts">
38
- const props = defineProps({
39
+ const prop = defineProps({
39
40
  title: {
40
41
  type: String,
41
42
  required: true,
@@ -62,5 +63,11 @@ const props = defineProps({
62
63
  required: false,
63
64
  default: false,
64
65
  },
66
+
67
+ rounded: {
68
+ type: String,
69
+ required: false,
70
+ default: "e-pill",
71
+ },
65
72
  });
66
73
  </script>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@goweekdays/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "1.0.3",
5
+ "version": "1.0.5",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -10,6 +10,10 @@ const defaultTheme = {
10
10
  dark: false,
11
11
  };
12
12
 
13
+ const darkTheme = {
14
+ dark: true,
15
+ };
16
+
13
17
  export default defineNuxtPlugin((app) => {
14
18
  const vuetify = createVuetify({
15
19
  defaults: {
@@ -34,6 +38,7 @@ export default defineNuxtPlugin((app) => {
34
38
  defaultTheme: "defaultTheme",
35
39
  themes: {
36
40
  defaultTheme,
41
+ darkTheme,
37
42
  },
38
43
  },
39
44
  icons: {