codevdesign 0.0.81 → 0.0.83

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,55 +1,55 @@
1
- <template>
2
- <v-menu
3
- v-if="!isXs"
4
- :open-on-hover="hover"
5
- location="top start"
6
- >
7
- <template #activator="{ props: activatorProps }">
8
- <slot name="icone">
9
- <v-icon
10
- v-bind="activatorProps"
11
- :style="styleCSS"
12
- :size="grosseurEffective"
13
- color="grisMoyen"
14
- icon="mdi-help-circle"
15
- @click.stop.prevent
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
+ <template>
2
+ <v-menu
3
+ v-if="!isXs"
4
+ :open-on-hover="hover"
5
+ location="top start"
6
+ >
7
+ <template #activator="{ props: activatorProps }">
8
+ <slot name="icone">
9
+ <v-icon
10
+ v-bind="activatorProps"
11
+ :style="styleCss"
12
+ :size="grosseurEffective"
13
+ color="grisMoyen"
14
+ icon="mdi-help-circle"
15
+ @click.stop.prevent
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>
@@ -18,40 +18,44 @@
18
18
  style="top: 5px; right: 5px"
19
19
  @click="annuler"
20
20
  ></v-btn>
21
- <slot name="titre">
22
- <v-card-title
23
- class="pa-0 ma-0"
24
- style="font-size: 24px; white-space: normal; word-break: break-word"
21
+
22
+ <v-card-title
23
+ class="pa-0 ma-0 pb-6"
24
+ style="font-size: 24px; white-space: normal; word-break: break-word"
25
+ >
26
+ <slot name="titre"></slot>
27
+ <div text-h5><span v-html="titre"></span></div>
28
+ </v-card-title>
29
+
30
+ <v-card-text class="pa-0 ma-0 pb-6 pr-6">
31
+ <v-container>
32
+ <slot name="content"></slot>
33
+ </v-container>
34
+ </v-card-text>
35
+ <v-card-actions class="my-2 d-flex justify-end pr-6 pb-5">
36
+ <slot name="actions"></slot>
37
+ <v-btn
38
+ v-if="btnAnnuler"
39
+ color="primary"
40
+ :loading="operationEnCours"
41
+ variant="text"
42
+ @click="annuler"
25
43
  >
26
- <div text-h5><span v-html="titre"></span></div>
27
- </v-card-title>
28
- </slot>
29
- <slot name="contenu"> </slot>
30
- <slot name="actions">
31
- <v-card-actions class="my-2 d-flex justify-end pr-6 pb-5">
32
- <v-btn
33
- v-if="btnAnnuler"
34
- color="primary"
35
- :loading="operationEnCours"
36
- variant="text"
37
- @click="annuler"
38
- >
39
- {{ btnAnnulerTexte ? btnAnnulerTexte : $t('csqc.bouton.annuler') }}
40
- </v-btn>
44
+ {{ btnAnnulerTexte ? btnAnnulerTexte : $t('csqc.bouton.annuler') }}
45
+ </v-btn>
41
46
 
42
- <v-btn
43
- v-if="btnOk"
44
- class="Gouttiere"
45
- color="primary"
46
- :loading="operationEnCours"
47
- :disabled="btnOkDesactiver"
48
- variant="flat"
49
- @click="okBouton"
50
- >
51
- {{ btnOkTexte ? btnOkTexte : $t('csqc.bouton.ok') }}
52
- </v-btn>
53
- </v-card-actions>
54
- </slot>
47
+ <v-btn
48
+ v-if="btnOk"
49
+ class="Gouttiere"
50
+ color="primary"
51
+ :loading="operationEnCours"
52
+ :disabled="btnOkDesactiver"
53
+ variant="flat"
54
+ @click="okBouton"
55
+ >
56
+ {{ btnOkTexte ? btnOkTexte : $t('csqc.bouton.ok') }}
57
+ </v-btn>
58
+ </v-card-actions>
55
59
  </v-card>
56
60
  </v-dialog>
57
61
  </template>
@@ -84,12 +84,14 @@
84
84
  </v-toolbar-title>
85
85
  </v-toolbar>
86
86
 
87
+ <!-- mobile -->
87
88
  <v-navigation-drawer
88
89
  v-model="menu"
89
90
  nav
90
91
  >
91
92
  <v-list>
92
- <div
93
+ <!-- Menu principal -->
94
+ <template
93
95
  v-for="item in filtrerMenuItems"
94
96
  :key="item.nom"
95
97
  >
@@ -98,8 +100,10 @@
98
100
  :active="item.path === route"
99
101
  :title="item.nom"
100
102
  />
101
- </div>
102
- <div
103
+ </template>
104
+
105
+ <!-- Sous-listes -->
106
+ <template
103
107
  v-for="item in filtrerSousListe"
104
108
  :key="item.id"
105
109
  >
@@ -110,7 +114,8 @@
110
114
  :title="item.nom"
111
115
  />
112
116
  </template>
113
- <div
117
+
118
+ <template
114
119
  v-for="(sousitem, index) in obtenirItemsSousListeSelonDroits(item.id)"
115
120
  :key="index"
116
121
  >
@@ -119,14 +124,16 @@
119
124
  :value="sousitem.nom"
120
125
  :to="sousitem.path"
121
126
  />
122
- </div>
127
+ </template>
123
128
  </v-list-group>
124
- <v-list-item
125
- v-if="btnDeconnexion"
126
- :title="$t('csqc.csqcMenu.deconnexion')"
127
- @click="deconnexion"
128
- />
129
- </div>
129
+ </template>
130
+
131
+ <!-- ✅ Déconnexion : UNE seule fois -->
132
+ <v-list-item
133
+ v-if="btnDeconnexion"
134
+ :title="$t('csqc.csqcMenu.deconnexion')"
135
+ @click="deconnexion"
136
+ />
130
137
  </v-list>
131
138
  </v-navigation-drawer>
132
139
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codevdesign",
3
- "version": "0.0.81",
3
+ "version": "0.0.83",
4
4
  "description": "Composants Vuetify 3 pour les projets Codev",
5
5
  "files": [
6
6
  "./**/*.vue",