@ramathibodi/nuxt-commons 0.0.4 → 0.0.6

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
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.0.4"
7
+ "version": "0.0.6"
8
8
  }
package/dist/module.mjs CHANGED
@@ -17,7 +17,7 @@ const module = defineNuxtModule({
17
17
  pathPrefix: true,
18
18
  global: true
19
19
  });
20
- addImportsDir(resolver.resolve("runtime/composables"));
20
+ addImportsDir(resolver.resolve("runtime/composables/**"));
21
21
  addTypeTemplate({
22
22
  filename: "types/modules.d.ts",
23
23
  getContents: () => `
@@ -32,7 +32,7 @@ watch(() => alert?.hasAlert(), (hasAlert) => {
32
32
  v-if="currentItem"
33
33
  v-model="isAlertOpen"
34
34
  :timeout="timeout"
35
- location="center"
35
+ location="top"
36
36
  multi-line
37
37
  variant="text"
38
38
  @update:model-value="renewAlert()"
@@ -0,0 +1,32 @@
1
+ <script lang="ts" setup>
2
+
3
+
4
+ interface Props {
5
+ label: string;
6
+ value?: string | String | null | undefined;
7
+ }
8
+
9
+ const props = withDefaults(defineProps<Props>(), {
10
+ label: '', value: ''
11
+ });
12
+
13
+ </script>
14
+ <template>
15
+ <v-card variant="flat">
16
+ <VCardSubtitle class="ma-0 pa-0">
17
+ <slot name="label">
18
+ {{ label }}
19
+ </slot>
20
+ </VCardSubtitle>
21
+ <VCardText class="text-h6 pa-0 mb-2">
22
+ <slot name="value">
23
+ {{ value }}
24
+ </slot>
25
+
26
+ </VCardText>
27
+ </v-card>
28
+ </template>
29
+
30
+ <style lang="">
31
+
32
+ </style>
@@ -68,7 +68,7 @@ export const Datetime = () => ({
68
68
  setDateTime: function(inputDate, locale = "EN") {
69
69
  if (inputDate.isValid) {
70
70
  if (inputDate.year - DateTime.now().year > 300)
71
- inputDate.set({ year: inputDate.year - 543 });
71
+ inputDate = inputDate.set({ year: inputDate.year - 543 });
72
72
  }
73
73
  this.luxonDateTime = inputDate;
74
74
  if (locale == "TH")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramathibodi/nuxt-commons",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Ramathibodi Nuxt modules for common components",
5
5
  "repository": {
6
6
  "type": "git",