codevdesign 1.0.48 → 1.0.50

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,163 +1,187 @@
1
- <template>
2
- <v-app-bar
3
- :color="barreCouleur"
4
- class="px-0 mx-0"
5
- :style="{
6
- position: 'sticky',
7
- // variables CSS pour les couleurs dynamiques
8
- '--entete-texte': texteCouleur,
9
- '--entete-icone': iconeCouleur,
10
- }"
11
- height="82px"
12
- >
13
- <v-row
14
- class="pt-2"
15
- @resize="controlAffichage"
16
- >
17
- <v-col
18
- :cols="titreCol"
19
- class="pr-0 mr-0 pl-5"
20
- >
21
- <v-toolbar-title class="titre">
22
- <!-- Barre de retour -->
23
- <slot name="retour">
24
- <v-icon
25
- v-if="retour"
26
- size="large"
27
- start
28
- :color="iconeCouleur"
29
- icon="mdi-arrow-left-thin"
30
- @click="retournerMenu"
31
- />
32
- </slot>
33
-
34
- <div class="titre-bloc">
35
- <!-- Titre -->
36
- <slot name="titre">
37
- <span class="pl-3 titre-texte">{{ props.titre }}</span>
38
- </slot>
39
-
40
- <!-- État -->
41
- <slot name="etat">
42
- <span
43
- v-if="monEtat?.afficher"
44
- class="pl-10"
45
- >
46
- <v-btn
47
- size="small"
48
- :color="monEtat.couleur"
49
- variant="tonal"
50
- >
51
- {{ monEtat.texte }}
52
- </v-btn>
53
- </span>
54
- </slot>
55
-
56
- <!-- État secondaire -->
57
- <slot name="etatSecondaire">
58
- <span
59
- v-if="monEtatSecondaire?.afficher"
60
- class="pl-3"
61
- >
62
- <v-btn
63
- size="small"
64
- :color="monEtatSecondaire.couleur"
65
- variant="tonal"
66
- >
67
- {{ monEtatSecondaire.texte }}
68
- </v-btn>
69
- </span>
70
- </slot>
71
-
72
- <!-- Sous-titre -->
73
- <slot name="soustitre">
74
- <span class="pl-3 soustitre-texte">{{ props.soustitre }}</span>
75
- </slot>
76
- </div>
77
- </v-toolbar-title>
78
- </v-col>
79
- </v-row>
80
-
81
- <!-- Barre en bas -->
82
- <div style="position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background-color: #808a9d" />
83
- </v-app-bar>
84
- </template>
85
-
86
- <script setup lang="ts">
87
- import { useRouter } from 'vue-router'
88
- import { ref, computed } from 'vue'
89
-
90
- interface EnteteEtat {
91
- afficher: boolean
92
- couleur: string
93
- texte: string
94
- }
95
-
96
- interface EnteteEtatSecondaire {
97
- afficher: boolean
98
- couleur: string
99
- texte: string
100
- }
101
-
102
- const router = useRouter()
103
-
104
- const props = defineProps<{
105
- titre: string
106
- soustitre?: string
107
- retour?: string
108
- etat?: EnteteEtat
109
- couleur?: string // couleur de la barre (Vuetify color/hex)
110
- couleurTexte?: string
111
- couleurIcone?: string
112
- etatSecondaire?: EnteteEtatSecondaire
113
- }>()
114
-
115
- const titreCol = ref(12)
116
-
117
- // Fallbacks (tes valeurs actuelles)
118
- const barreCouleur = computed(() => props.couleur ?? 'white')
119
- const texteCouleur = computed(() => props.couleurTexte ?? '#223654')
120
- const iconeCouleur = computed(() => props.couleurIcone ?? 'grisMoyen') // peut être un nom de couleur Vuetify ou un hex
121
-
122
- const monEtat = computed<EnteteEtat>(() => props.etat ?? { afficher: false, couleur: 'primary', texte: 'test' })
123
- const monEtatSecondaire = computed<EnteteEtatSecondaire>(
124
- () => props.etatSecondaire ?? { afficher: false, couleur: 'primary', texte: 'test' },
125
- )
126
-
127
- function retournerMenu() {
128
- if (props.retour) router.push({ name: props.retour })
129
- }
130
- function controlAffichage() {
131
- /* logique resize */
132
- }
133
- </script>
134
-
135
- <style scoped>
136
- .titre {
137
- font-size: 1.85rem;
138
- font-weight: bold;
139
- margin-bottom: 15px;
140
- }
141
- .titre-texte {
142
- color: var(--entete-texte, #223654);
143
- }
144
- .soustitre-texte {
145
- display: block;
146
- font-size: 1rem;
147
- font-weight: normal;
148
- color: var(--entete-texte, #223654);
149
- }
150
- .titre-bloc {
151
- display: inline-block;
152
- vertical-align: middle;
153
- padding-left: 12px;
154
- }
155
- /* Couleur de l’icône (retour) + hover */
156
- .v-icon {
157
- color: var(--entete-icone, #6b7280); /* grisMoyen approx si hex */
158
- }
159
- .v-icon:hover {
160
- /* tu peux garder une couleur fixe ou calculer une teinte plus foncée si besoin */
161
- filter: brightness(0.85);
162
- }
163
- </style>
1
+ <template>
2
+ <v-app-bar
3
+ :color="barreCouleur"
4
+ class="px-0 mx-0"
5
+ :style="{
6
+ position: 'sticky',
7
+ // variables CSS pour les couleurs dynamiques
8
+ '--entete-texte': texteCouleur,
9
+ '--entete-icone': iconeCouleur,
10
+ }"
11
+ height="82px"
12
+ >
13
+ <v-row
14
+ class="pt-2"
15
+ @resize="controlAffichage"
16
+ >
17
+ <v-col
18
+ :cols="titreCol"
19
+ class="pr-0 mr-0 pl-5"
20
+ >
21
+ <v-toolbar-title class="titre">
22
+ <div class="entete-ligne">
23
+ <!-- GAUCHE -->
24
+ <div class="entete-gauche">
25
+ <!-- Barre de retour -->
26
+ <slot name="retour">
27
+ <v-icon
28
+ v-if="retour"
29
+ size="large"
30
+ start
31
+ :color="iconeCouleur"
32
+ icon="mdi-arrow-left-thin"
33
+ @click="retournerMenu"
34
+ />
35
+ </slot>
36
+
37
+ <div class="titre-bloc">
38
+ <slot name="titre">
39
+ <span class="pl-3 titre-texte">{{ props.titre }}</span>
40
+ </slot>
41
+
42
+ <slot name="etat">
43
+ <span
44
+ v-if="monEtat?.afficher"
45
+ class="pl-10"
46
+ >
47
+ <v-btn
48
+ size="small"
49
+ :color="monEtat.couleur"
50
+ variant="tonal"
51
+ >
52
+ {{ monEtat.texte }}
53
+ </v-btn>
54
+ </span>
55
+ </slot>
56
+
57
+ <slot name="etatSecondaire">
58
+ <span
59
+ v-if="monEtatSecondaire?.afficher"
60
+ class="pl-3"
61
+ >
62
+ <v-btn
63
+ size="small"
64
+ :color="monEtatSecondaire.couleur"
65
+ variant="tonal"
66
+ >
67
+ {{ monEtatSecondaire.texte }}
68
+ </v-btn>
69
+ </span>
70
+ </slot>
71
+
72
+ <slot name="soustitre">
73
+ <span class="pl-3 soustitre-texte">{{ props.soustitre }}</span>
74
+ </slot>
75
+ </div>
76
+ </div>
77
+
78
+ <!-- DROITE -->
79
+ <div class="entete-droite">
80
+ <slot name="droite" />
81
+ </div>
82
+ </div>
83
+ </v-toolbar-title>
84
+ </v-col>
85
+ </v-row>
86
+
87
+ <!-- Barre en bas -->
88
+ <div style="position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background-color: #808a9d" />
89
+ </v-app-bar>
90
+ </template>
91
+
92
+ <script setup lang="ts">
93
+ import { useRouter } from 'vue-router'
94
+ import { ref, computed } from 'vue'
95
+
96
+ interface EnteteEtat {
97
+ afficher: boolean
98
+ couleur: string
99
+ texte: string
100
+ }
101
+
102
+ interface EnteteEtatSecondaire {
103
+ afficher: boolean
104
+ couleur: string
105
+ texte: string
106
+ }
107
+
108
+ const router = useRouter()
109
+
110
+ const props = defineProps<{
111
+ titre: string
112
+ soustitre?: string
113
+ retour?: string
114
+ etat?: EnteteEtat
115
+ couleur?: string // couleur de la barre (Vuetify color/hex)
116
+ couleurTexte?: string
117
+ couleurIcone?: string
118
+ etatSecondaire?: EnteteEtatSecondaire
119
+ }>()
120
+
121
+ const titreCol = ref(12)
122
+
123
+ // Fallbacks (tes valeurs actuelles)
124
+ const barreCouleur = computed(() => props.couleur ?? 'white')
125
+ const texteCouleur = computed(() => props.couleurTexte ?? '#223654')
126
+ const iconeCouleur = computed(() => props.couleurIcone ?? 'grisMoyen') // peut être un nom de couleur Vuetify ou un hex
127
+
128
+ const monEtat = computed<EnteteEtat>(() => props.etat ?? { afficher: false, couleur: 'primary', texte: 'test' })
129
+ const monEtatSecondaire = computed<EnteteEtatSecondaire>(
130
+ () => props.etatSecondaire ?? { afficher: false, couleur: 'primary', texte: 'test' },
131
+ )
132
+
133
+ function retournerMenu() {
134
+ if (props.retour) router.push({ name: props.retour })
135
+ }
136
+ function controlAffichage() {
137
+ /* logique resize */
138
+ }
139
+ </script>
140
+
141
+ <style scoped>
142
+ .titre {
143
+ font-size: 1.85rem;
144
+ font-weight: bold;
145
+ margin-bottom: 15px;
146
+ }
147
+ .titre-texte {
148
+ color: var(--entete-texte, #223654);
149
+ }
150
+ .soustitre-texte {
151
+ display: block;
152
+ font-size: 1rem;
153
+ font-weight: normal;
154
+ color: var(--entete-texte, #223654);
155
+ }
156
+ .titre-bloc {
157
+ display: inline-block;
158
+ vertical-align: middle;
159
+ padding-left: 12px;
160
+ }
161
+ /* Couleur de l’icône (retour) + hover */
162
+ .v-icon {
163
+ color: var(--entete-icone, #6b7280); /* grisMoyen approx si hex */
164
+ }
165
+ .v-icon:hover {
166
+ filter: brightness(0.85);
167
+ }
168
+ .entete-ligne {
169
+ display: flex;
170
+ align-items: center;
171
+ width: 100%;
172
+ }
173
+
174
+ .entete-gauche {
175
+ display: flex;
176
+ align-items: center;
177
+ min-width: 0; /* important pour éviter overflow */
178
+ flex: 1;
179
+ }
180
+
181
+ .entete-droite {
182
+ display: flex;
183
+ align-items: center;
184
+ gap: 12px;
185
+ padding-right: 16px;
186
+ }
187
+ </style>
package/index.ts CHANGED
@@ -1,75 +1,78 @@
1
- import csqcAlerteErreur from './composants/csqcAlerteErreur.vue'
2
- import csqcDialogue from './composants/csqcDialogue.vue'
3
- import csqcOptionSwitch from './composants/csqcOptionSwitch.vue'
4
- import csqcRecherche from './composants/csqcRecherche.vue'
5
- import csqcSnackbar from './composants/csqcSnackbar.vue'
6
- import csqcTiroir from './composants/csqcTiroir.vue'
7
- import pivEntete from './composants/gabarit/pivEntete.vue'
8
- import pivFooter from './composants/gabarit/pivPiedPage.vue'
9
- import csqcMenu from './composants/gabarit/csqcMenu.vue'
10
- import csqcConfirmation from './composants/csqcConfirmation.vue'
11
- import csqcSaisie from './composants/csqcModaleSaisie.vue'
12
- import csqcDate from './composants/csqcDate.vue'
13
- import csqcTable from './composants/csqcTable/csqcTable.vue'
14
- import csqcCodeBudgetaire from './composants/csqcCodeBudgetaireGenerique.vue'
15
- import csqcChaise from './composants/csqcChaise/chaiseConteneur.vue'
16
- import csqcAide from './composants/csqcAide.vue'
17
- import csqcEntete from './composants/csqcEntete.vue'
18
- import csqcTexteBilingue from './composants/csqcTexteBilingue.vue'
19
-
20
- import csqcEditeurTexteRiche from './composants/csqcEditeurTexteRiche.vue'
21
- import csqcImportCSV from './composants/csqcImportCSV.vue'
22
- import csqcRechercheUtilisateur from './composants/csqcRechercheUtilisateur.vue'
23
- import validateurs from './composants/validateurs'
24
-
25
- // modèles
26
- import NotificationGabaritDefaut from './modeles/notificationGabaritDefaut'
27
- import modeleSnackbar from './modeles/composants/snackbar'
28
- import modeleDatatableColonne from './modeles/composants/datatableColonne'
29
- import apiReponse from './modeles/apiReponse'
30
- import data from './modeles/data'
31
- import response from './modeles/response'
32
-
33
- // outils
34
- import csqcRafraichisseurToken from './outils/rafraichisseurToken'
35
- import csqcOutils from './outils/csqcOutils'
36
-
37
- // i18n
38
- import csqcEn from './locales/en.json'
39
- import csqcFr from './locales/fr.json'
40
-
41
-
42
- export {
43
- csqcFr,
44
- csqcEn,
45
- csqcAlerteErreur,
46
- csqcDialogue,
47
- csqcConfirmation,
48
- csqcSaisie,
49
- csqcDate,
50
- csqcOptionSwitch,
51
- csqcRecherche,
52
- csqcSnackbar,
53
- csqcTable,
54
- csqcTiroir,
55
- csqcMenu,
56
- csqcCodeBudgetaire,
57
- csqcChaise,
58
- pivFooter,
59
- pivEntete,
60
- csqcAide,
61
- csqcEntete,
62
- csqcTexteBilingue,
63
- csqcEditeurTexteRiche,
64
- validateurs,
65
- csqcImportCSV,
66
- csqcRechercheUtilisateur,
67
- csqcRafraichisseurToken,
68
- csqcOutils,
69
- modeleSnackbar,
70
- modeleDatatableColonne as colonne,
71
- apiReponse,
72
- data,
73
- response,
74
- NotificationGabaritDefaut,
75
- }
1
+ import csqcAlerteErreur from './composants/csqcAlerteErreur.vue'
2
+ import csqcDialogue from './composants/csqcDialogue.vue'
3
+
4
+ // à enlever éventuellement. Remplacé par csqcSwitch
5
+ import csqcOptionSwitch from './composants/csqcSwitch.vue'
6
+ import csqcRecherche from './composants/csqcRecherche.vue'
7
+ import csqcSnackbar from './composants/csqcSnackbar.vue'
8
+ import csqcTiroir from './composants/csqcTiroir.vue'
9
+ import pivEntete from './composants/gabarit/pivEntete.vue'
10
+ import pivFooter from './composants/gabarit/pivPiedPage.vue'
11
+ import csqcMenu from './composants/gabarit/csqcMenu.vue'
12
+ import csqcConfirmation from './composants/csqcConfirmation.vue'
13
+ import csqcSaisie from './composants/csqcModaleSaisie.vue'
14
+ import csqcDate from './composants/csqcDate.vue'
15
+ import csqcTable from './composants/csqcTable/csqcTable.vue'
16
+ import csqcCodeBudgetaire from './composants/csqcCodeBudgetaireGenerique.vue'
17
+ import csqcChaise from './composants/csqcChaise/chaiseConteneur.vue'
18
+ import csqcAide from './composants/csqcAide.vue'
19
+ import csqcEntete from './composants/csqcEntete.vue'
20
+ import csqcTexteBilingue from './composants/csqcTexteBilingue.vue'
21
+ import csqcSwitch from './composants/csqcSwitch.vue'
22
+
23
+ import csqcEditeurTexteRiche from './composants/csqcEditeurTexteRiche.vue'
24
+ import csqcImportCSV from './composants/csqcImportCSV.vue'
25
+ import csqcRechercheUtilisateur from './composants/csqcRechercheUtilisateur.vue'
26
+ import validateurs from './composants/validateurs'
27
+
28
+ // modèles
29
+ import NotificationGabaritDefaut from './modeles/notificationGabaritDefaut'
30
+ import modeleSnackbar from './modeles/composants/snackbar'
31
+ import modeleDatatableColonne from './modeles/composants/datatableColonne'
32
+ import apiReponse from './modeles/apiReponse'
33
+ import data from './modeles/data'
34
+ import response from './modeles/response'
35
+
36
+ // outils
37
+ import csqcRafraichisseurToken from './outils/rafraichisseurToken'
38
+ import csqcOutils from './outils/csqcOutils'
39
+
40
+ // i18n
41
+ import csqcEn from './locales/en.json'
42
+ import csqcFr from './locales/fr.json'
43
+
44
+ export {
45
+ csqcFr,
46
+ csqcEn,
47
+ csqcAlerteErreur,
48
+ csqcDialogue,
49
+ csqcConfirmation,
50
+ csqcSaisie,
51
+ csqcDate,
52
+ csqcOptionSwitch, // a enlever eventuellement
53
+ csqcSwitch,
54
+ csqcRecherche,
55
+ csqcSnackbar,
56
+ csqcTable,
57
+ csqcTiroir,
58
+ csqcMenu,
59
+ csqcCodeBudgetaire,
60
+ csqcChaise,
61
+ pivFooter,
62
+ pivEntete,
63
+ csqcAide,
64
+ csqcEntete,
65
+ csqcTexteBilingue,
66
+ csqcEditeurTexteRiche,
67
+ validateurs,
68
+ csqcImportCSV,
69
+ csqcRechercheUtilisateur,
70
+ csqcRafraichisseurToken,
71
+ csqcOutils,
72
+ modeleSnackbar,
73
+ modeleDatatableColonne as colonne,
74
+ apiReponse,
75
+ data,
76
+ response,
77
+ NotificationGabaritDefaut,
78
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codevdesign",
3
- "version": "1.0.48",
3
+ "version": "1.0.50",
4
4
  "description": "Composants Vuetify 3 pour les projets Codev",
5
5
  "files": [
6
6
  "./**/*.vue",