@goweekdays/layer-common 1.0.6 → 1.0.8

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.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 54da80d: Fix useUtil function
8
+
9
+ ## 1.0.7
10
+
11
+ ### Patch Changes
12
+
13
+ - 341cbeb: Add confirmation dialog component
14
+
3
15
  ## 1.0.6
4
16
 
5
17
  ### Patch Changes
@@ -0,0 +1,67 @@
1
+ <template>
2
+ <v-card width="100%">
3
+ <v-toolbar density="compact" class="pl-4">
4
+ <span class="font-weight-medium text-h5 text-capitalize"
5
+ >Delete {{ localProps.title }}</span
6
+ >
7
+ </v-toolbar>
8
+
9
+ <v-card-text>
10
+ <p class="text-subtitle-2 text-center">
11
+ Are you sure you want to delete this
12
+ {{ localProps.title.toLowerCase() }}? This action cannot be undone.
13
+ </p>
14
+
15
+ <v-row v-if="message" no-gutters justify="center" class="mt-4">
16
+ <span class="text-caption text-error text-center">
17
+ {{ message }}
18
+ </span>
19
+ </v-row>
20
+ </v-card-text>
21
+
22
+ <v-toolbar density="compact">
23
+ <v-row no-gutters>
24
+ <v-col cols="6">
25
+ <v-btn
26
+ tile
27
+ block
28
+ size="48"
29
+ variant="text"
30
+ class="text-none"
31
+ @click="emits('cancel')"
32
+ >
33
+ Cancel
34
+ </v-btn>
35
+ </v-col>
36
+ <v-col cols="6">
37
+ <v-btn
38
+ tile
39
+ block
40
+ size="48"
41
+ color="black"
42
+ variant="flat"
43
+ class="text-none"
44
+ @click="emits('confirm')"
45
+ >
46
+ Delete {{ localProps.title }}
47
+ </v-btn>
48
+ </v-col>
49
+ </v-row>
50
+ </v-toolbar>
51
+ </v-card>
52
+ </template>
53
+
54
+ <script setup lang="ts">
55
+ const localProps = defineProps({
56
+ title: {
57
+ type: String,
58
+ default: "Title",
59
+ },
60
+ message: {
61
+ type: String,
62
+ default: "",
63
+ },
64
+ });
65
+
66
+ const emits = defineEmits(["cancel", "confirm"]);
67
+ </script>
@@ -3,6 +3,7 @@ export default function useUtils() {
3
3
 
4
4
  const emailRule = (v: string): true | string => {
5
5
  const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
6
+ if(!v) return true;
6
7
  return regex.test(v) || "Please enter a valid email address";
7
8
  };
8
9
 
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.6",
5
+ "version": "1.0.8",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"