codevdesign 0.0.30 → 0.0.32

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,59 +1,70 @@
1
-
2
- <script setup lang="ts">
3
- import { computed } from 'vue';
4
-
5
- const anneeEnCours = computed<number>(() => {
6
- return new Date().getFullYear();
7
- });
8
- </script>
9
-
10
-
11
- <template>
12
- <footer>
13
- <div class="footer-content">
14
- <a href="https://quebec.ca">
15
- <img
16
- id="logoFooter"
17
- alt="Gouvernement du Québec."
18
- src="/images/QUEBEC_couleur.svg"
19
- width="117"
20
- height="35"
21
- />
22
- </a>
23
- <div>
24
- <small>
25
- <a
26
- href="http://www.droitauteur.gouv.qc.ca/copyright.php"
27
- target="_blank"
28
- >© Gouvernement du Québec, {{anneeEnCours}} </a>
29
- </small>
30
- </div>
31
- </div>
32
- </footer>
33
- </template>
34
-
35
- <style scoped>
36
-
37
- footer {
38
- display: flex;
39
- justify-content: center; /* Centrer horizontalement */
40
- align-items: center; /* Centrer verticalement */
41
- text-align: center; /* Centrer le texte à l'intérieur des éléments */
42
- height: 100px; /* Ajuster la hauteur du footer */
43
- }
44
-
45
- .footer-content {
46
- display: flex;
47
- flex-direction: column; /* Disposer les éléments les uns sous les autres */
48
- justify-content: center; /* Centrer verticalement à l'intérieur de .footer-content */
49
- align-items: center; /* Centrer horizontalement à l'intérieur de .footer-content */
50
- }
51
-
52
- footer a {
53
- text-decoration: none; /* Supprimer le soulignement des liens */
54
- }
55
-
56
- footer small {
57
- margin-top: 10px; /* Ajouter de l'espace entre l'image et le texte */
58
- }
59
- </style>
1
+ <template>
2
+ <footer>
3
+ <div class="footer-content">
4
+ <a href="https://quebec.ca">
5
+ <img
6
+ id="logoFooter"
7
+ alt="Gouvernement du Québec."
8
+ src="/images/QUEBEC_couleur.svg"
9
+ width="117"
10
+ height="35"
11
+ />
12
+ </a>
13
+ <div>
14
+ <small>
15
+ <a
16
+ href="http://www.droitauteur.gouv.qc.ca/copyright.php"
17
+ target="_blank"
18
+ >© Gouvernement du Québec {{ anneeEnCours }}
19
+ </a>
20
+
21
+ <a
22
+ v-if="props.version"
23
+ :href="props.lien"
24
+ target="_blank"
25
+ ><br />
26
+ version <span v-html="props.version"
27
+ /></a>
28
+ </small>
29
+ </div>
30
+ </div>
31
+ </footer>
32
+ </template>
33
+
34
+ <script setup lang="ts">
35
+ import { computed } from 'vue'
36
+
37
+ const props = defineProps<{
38
+ version?: string
39
+ lien?: string
40
+ }>()
41
+
42
+ const anneeEnCours = computed<number>(() => {
43
+ return new Date().getFullYear()
44
+ })
45
+ </script>
46
+
47
+ <style scoped>
48
+ footer {
49
+ display: flex;
50
+ justify-content: center; /* Centrer horizontalement */
51
+ align-items: center; /* Centrer verticalement */
52
+ text-align: center; /* Centrer le texte à l'intérieur des éléments */
53
+ height: 100px; /* Ajuster la hauteur du footer */
54
+ }
55
+
56
+ .footer-content {
57
+ display: flex;
58
+ flex-direction: column; /* Disposer les éléments les uns sous les autres */
59
+ justify-content: center; /* Centrer verticalement à l'intérieur de .footer-content */
60
+ align-items: center; /* Centrer horizontalement à l'intérieur de .footer-content */
61
+ }
62
+
63
+ footer a {
64
+ text-decoration: none; /* Supprimer le soulignement des liens */
65
+ }
66
+
67
+ footer small {
68
+ margin-top: 10px; /* Ajouter de l'espace entre l'image et le texte */
69
+ }
70
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codevdesign",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "description": "Composants Vuetify 3 pour les projets Codev",
5
5
  "files": [
6
6
  "./**/*.vue",