Skip to content

Commit 0508e7e

Browse files
authored
Merge pull request #272 from dnum-mi/fix/header
Fix/header
2 parents cbb62fc + d510d66 commit 0508e7e

File tree

5 files changed

+19
-12
lines changed

5 files changed

+19
-12
lines changed

src/components/DsfrCheckbox/DsfrCheckboxSet.stories.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ CheckboxSet.args = {
7373
inline: false,
7474
errorMessage: '',
7575
validMessage: '',
76-
modelValue: [],
76+
modelValue: ['name1'],
7777
options: [
7878
{
7979
label: 'Valeur 1',
@@ -122,7 +122,7 @@ CheckboxSetAvecErreur.args = {
122122
disabled: false,
123123
inline: false,
124124
errorMessage: 'Message d\'erreur',
125-
modelValue: [],
125+
modelValue: ['name1'],
126126
options: [
127127
{
128128
label: 'Valeur 1',
@@ -172,7 +172,7 @@ export const CheckboxSetAvecSucces = (args) => ({
172172
CheckboxSetAvecSucces.args = {
173173
dark: false,
174174
legend: 'Légende des champs',
175-
modelValue: [],
175+
modelValue: ['name1'],
176176
inline: false,
177177
validMessage: 'Message de succès',
178178
options: [
@@ -224,7 +224,7 @@ export const CheckboxSetInline = (args) => ({
224224
CheckboxSetInline.args = {
225225
dark: false,
226226
legend: 'Légende des champs en ligne',
227-
modelValue: [],
227+
modelValue: ['name1'],
228228
inline: true,
229229
errorMessage: '',
230230
validMessage: '',
@@ -277,7 +277,7 @@ export const CheckboxSetInlineAvecErreur = (args) => ({
277277
CheckboxSetInlineAvecErreur.args = {
278278
dark: false,
279279
legend: 'Légende des champs en ligne',
280-
modelValue: [],
280+
modelValue: ['name1'],
281281
inline: true,
282282
errorMessage: 'Message d\'erreur',
283283
validMessage: '',
@@ -330,7 +330,7 @@ export const CheckboxSetInlineAvecSucces = (args) => ({
330330
CheckboxSetInlineAvecSucces.args = {
331331
dark: false,
332332
legend: 'Légende des champs en ligne',
333-
modelValue: [],
333+
modelValue: ['name1'],
334334
inline: true,
335335
errorMessage: '',
336336
validMessage: 'Message de succès',

src/components/DsfrCheckbox/DsfrCheckboxSet.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default defineComponent({
9494
:name="option.name"
9595
:label="option.label"
9696
:disabled="option.disabled"
97-
:model-value="modelValue.includes(option.value)"
97+
:model-value="modelValue.includes(option.name)"
9898
:hint="option.hint"
9999
@update:model-value="onChange({ name: option.name, checked: $event })"
100100
/>

src/components/DsfrHeader/DsfrHeader.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,11 @@ export default defineComponent({
112112
<slot name="operator" />
113113
</div>
114114
<div
115-
v-if="showSearch || (quickLinks && quickLinks.length)"
115+
v-if="showSearch || quickLinks?.length"
116116
class="fr-header__navbar"
117117
>
118118
<button
119+
v-if="showSearch"
119120
class="fr-btn"
120121
aria-controls="header-search"
121122
aria-label="Recherche"
@@ -128,6 +129,7 @@ export default defineComponent({
128129
/>
129130
</button>
130131
<button
132+
v-if="quickLinks?.length"
131133
id="button-menu"
132134
class="fr-btn--menu fr-btn"
133135
:data-fr-opened="showMenu"

src/components/DsfrHeader/DsfrHeaderMenuLink.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ export default defineComponent({
9292
</template>
9393

9494
<style scoped>
95-
9695
.icon-left {
9796
margin-right: 0.5rem
9897
}
@@ -105,7 +104,7 @@ export default defineComponent({
105104
align-items: center;
106105
}
107106
108-
.reverse {
107+
.fr-header .fr-links-group .reverse {
109108
flex-direction: row-reverse;
110109
}
111110
</style>

src/components/DsfrInput/DsfrInput.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export default defineComponent({
2929
type: String,
3030
default: '',
3131
},
32+
isWithWrapper: Boolean,
3233
labelVisible: Boolean,
3334
modelValue: {
3435
type: String,
@@ -62,8 +63,13 @@ export default defineComponent({
6263
>{{ hint }}</span>
6364
</label>
6465
<div
65-
class="fr-input-wrap"
66-
:class="[wrapperClass, { 'fr-fi-calendar-line': $attrs.type === 'date' }]"
66+
:class="[
67+
{
68+
'fr-input-wrap': isWithWrapper || $attrs.type === 'date',
69+
'fr-fi-calendar-line': $attrs.type === 'date',
70+
},
71+
wrapperClass,
72+
]"
6773
>
6874
<component
6975
:is="isComponent"

0 commit comments

Comments
 (0)