Skip to content

Commit 411cabc

Browse files
author
ppinette
committed
[ui-dsfr] ajoute des classes utilitaires pour flex
1 parent 171b6c1 commit 411cabc

File tree

9 files changed

+156
-15
lines changed

9 files changed

+156
-15
lines changed

vertigo-ui-dsfr/src/components/DsfrButtonIcon/DsfrButtonIcon.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ const onMouseLeave = () => {
125125
<button
126126
:id="`button-${id}`"
127127
ref="source"
128-
class="fr-btn fr-btn--tooltip"
128+
class="fr-btn fr-btn--sm"
129129
:class="{
130130
'fr-btn--tertiary': !noOutline,
131131
'fr-btn--tertiary-no-outline': noOutline,
132-
icon: true
132+
[icon]: true
133133
}"
134134
:aria-labelledby="id"
135135
@mouseenter="onMouseEnter()"

vertigo-ui-dsfr/src/utils.css

Lines changed: 135 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,144 @@
1+
/* size */
2+
3+
.h-full {
4+
height: 100%;
5+
}
6+
7+
.w-full {
8+
width: 100%;
9+
}
10+
11+
.position-relative {
12+
position: relative;
13+
}
14+
15+
/* whitespace */
16+
17+
.whitespace-normal {
18+
white-space: normal;
19+
}
20+
21+
.whitespace-pre {
22+
white-space: pre;
23+
}
24+
25+
/* flex utils */
26+
127
.flex {
228
display: flex;
329
}
430

31+
.flex-nowrap {
32+
flex-wrap: nowrap;
33+
}
34+
35+
.grow {
36+
flex-grow: 1;
37+
}
38+
39+
.grow-0 {
40+
flex-grow: 0;
41+
}
42+
43+
.shrink {
44+
flex-shrink: 1;
45+
}
46+
47+
.shrink-0 {
48+
flex-shrink: 0;
49+
}
50+
51+
.gap {
52+
gap: .75rem
53+
}
54+
55+
.gap-x {
56+
column-gap: .75rem;
57+
}
58+
59+
.gap-y {
60+
row-gap: .75rem;
61+
}
62+
63+
.gap--sm {
64+
gap: .5rem
65+
}
66+
67+
.gap-x--sm {
68+
column-gap: .5rem;
69+
}
70+
71+
.gap-y--sm {
72+
row-gap: .5rem;
73+
}
74+
75+
.items-start {
76+
align-items: flex-start;
77+
}
78+
79+
.items-end {
80+
align-items: flex-end;
81+
}
82+
83+
.items-center {
84+
align-items: center;
85+
}
86+
87+
.items-baseline {
88+
align-items: baseline;
89+
}
90+
91+
.items-stretch {
92+
align-items: stretch;
93+
}
94+
95+
.justify-normal {
96+
justify-content: normal;
97+
}
98+
99+
.justify-start {
100+
justify-content: flex-start;
101+
}
102+
103+
.justify-end {
104+
justify-content: flex-end;
105+
}
106+
107+
.justify-center {
108+
justify-content: center;
109+
}
110+
5111
.justify-between {
6112
justify-content: space-between;
7113
}
8114

9-
.w-full {
10-
width: 100%;
115+
.justify-around {
116+
justify-content: space-around;
117+
}
118+
119+
.justify-evenly {
120+
justify-content: space-evenly;
121+
}
122+
123+
.justify-stretch {
124+
justify-content: stretch;
125+
}
126+
127+
.self-auto {
128+
align-self: auto;
129+
}
130+
.self-start {
131+
align-self: flex-start;
132+
}
133+
.self-end {
134+
align-self: flex-end;
135+
}
136+
.self-center {
137+
align-self: center;
138+
}
139+
.self-stretch {
140+
align-self: stretch;
11141
}
142+
.self-baseline {
143+
align-self: baseline;
144+
}

vertigo-ui/src/main/resources/io/vertigo/ui/components/dsfr/table/dsfr-table.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
<vu:content></vu:content>
4646
<vu:dsfr-column name="action" label="Actions" sortable="false" align="right"
4747
th:if="${actions_slot != null}">
48-
<vu:content-slot name="actions_slot" th:with="label=null, title=null, vTitle=null"/>
48+
<div class="flex gap--sm">
49+
<vu:content-slot name="actions_slot" th:with="label=null, title=null, vTitle=null"/>
50+
</div>
4951
</vu:dsfr-column>
5052
</template>
5153
</dsfr-custom-data-table>

vertigo-ui/src/main/resources/io/vertigo/ui/static/3rdParty/dsfr/dsfr.es.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertigo-ui/src/main/resources/io/vertigo/ui/static/3rdParty/dsfr/dsfr.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertigo-ui/src/main/resources/io/vertigo/ui/static/3rdParty/dsfr/dsfr.umd.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertigo-ui/src/main/resources/io/vertigo/ui/static/3rdParty/dsfr/dsfr.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertigo-ui/src/main/resources/io/vertigo/ui/static/3rdParty/dsfr/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertigo-ui/src/test/resources/testWebApp/WEB-INF/views/data/componentsDemoDsfr.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@
163163
<vu:dsfr-button-icon icon="ri-information-2-line"
164164
label="'`Ouvrir la modale de la ligne n°${idx}`'"
165165
/>
166+
<vu:dsfr-button-icon icon="fr-icon-delete-bin-line"
167+
label="'`Ouvrir la modale de la ligne n°${idx}`'"
168+
/>
169+
<vu:dsfr-button-icon icon="fr-icon-eye-line"
170+
label="'`Ouvrir la modale de la ligne n°${idx}`'"
171+
/>
166172
</vu:slot>
167173
<vu:slot name="header_slot">
168174
<vu:dsfr-column-header field="movId">

0 commit comments

Comments
 (0)