codevdesign 0.0.29 → 0.0.31

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.
@@ -1,40 +1,55 @@
1
- <template>
2
- <v-menu
3
- v-if="!isXs"
4
- location="top start"
5
- >
6
- <template #activator="{ props: activatorProps }">
7
- <v-icon
8
- v-bind="activatorProps"
9
- :size="small ? 'small' : 'default'"
10
- start
11
- color="grisMoyen"
12
- :style="monstyle"
13
- >
14
- mdi-help-circle
15
- </v-icon>
16
- </template>
17
-
18
- <v-card style="max-width: 1000px">
19
- <v-card-text class="pa-6">
20
- <span v-html="props.aide"></span>
21
- </v-card-text>
22
- </v-card>
23
- </v-menu>
24
- </template>
25
-
26
- <script setup lang="ts">
27
- import { computed } from 'vue'
28
- import { useDisplay } from 'vuetify'
29
-
30
- const props = defineProps<{
31
- aide: string
32
- monstyle?: string
33
- small?: boolean
34
- }>()
35
-
36
- const { name } = useDisplay()
37
-
38
- // on évite d'afficher sur les écrans extra-smalls
39
- const isXs = computed(() => name.value === 'xs')
40
- </script>
1
+ <template>
2
+ <v-menu
3
+ :open-on-hover="hover"
4
+ v-if="!isXs"
5
+ location="top start"
6
+ >
7
+ <template #activator="{ props: activatorProps }">
8
+ <slot name="icone">
9
+ <v-icon
10
+ v-bind="activatorProps"
11
+ @click.stop.prevent
12
+ :style="styleCSS"
13
+ :size="grosseurEffective"
14
+ color="grisMoyen"
15
+ icon="mdi-help-circle"
16
+ />
17
+ </slot>
18
+ </template>
19
+
20
+ <slot name="carte">
21
+ <v-expand-transition>
22
+ <v-card style="max-width: 1000px">
23
+ <v-card-text class="pa-6">
24
+ <span v-html="props.aide"></span>
25
+ </v-card-text> </v-card
26
+ ></v-expand-transition>
27
+ </slot>
28
+ </v-menu>
29
+ </template>
30
+
31
+ <script setup lang="ts">
32
+ import { computed } from 'vue'
33
+ import { useDisplay } from 'vuetify'
34
+
35
+ const props = withDefaults(
36
+ defineProps<{
37
+ aide: string
38
+ grosseur?: 'default' | 'small' | 'large' | 'x-large' | 'x-small'
39
+ hover?: boolean
40
+ styleCSS?: string
41
+ }>(),
42
+ {
43
+ grosseur: 'default',
44
+ hover: false,
45
+ styleCSS: '',
46
+ },
47
+ )
48
+ const grosseurEffective = computed(() => {
49
+ const val = props.grosseur
50
+ return val && val.trim() !== '' ? val : 'default'
51
+ })
52
+
53
+ const { name } = useDisplay()
54
+ const isXs = computed(() => name.value === 'xs')
55
+ </script>
@@ -1,14 +1,11 @@
1
1
  <template>
2
- <v-app-bar
2
+ <v-toolbar
3
3
  flat
4
- fixed
5
4
  color="white"
6
- class="px-0 mx-0"
7
- :height="82"
8
- style="margin-top: 146px"
5
+ height="82px"
9
6
  >
10
7
  <v-row
11
- class="pt-2"
8
+ class="pt-4"
12
9
  @resize="controlAffichage"
13
10
  >
14
11
  <v-col
@@ -52,7 +49,7 @@
52
49
  </v-row>
53
50
  <!-- Barre en bas -->
54
51
  <div style="position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background-color: #808a9d" />
55
- </v-app-bar>
52
+ </v-toolbar>
56
53
  </template>
57
54
 
58
55
  <script setup lang="ts">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codevdesign",
3
- "version": "0.0.29",
3
+ "version": "0.0.31",
4
4
  "description": "Composants Vuetify 3 pour les projets Codev",
5
5
  "files": [
6
6
  "./**/*.vue",