Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feat(table): tableau v2 [DS-3742] #911

Merged
merged 113 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from 112 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
1c9eb21
feat(datagrid): spike structure en div
zellerbaptiste Feb 7, 2024
48bd5ba
feat(datagrid): ajoute exemple de rowspan
zellerbaptiste Feb 14, 2024
10309d9
feat(datagrid): ajoute exemple de rowspan
zellerbaptiste Feb 14, 2024
a285ae0
feat(datagrid): ajoute exemple de rowspan
zellerbaptiste Feb 14, 2024
28bd78f
feat(datagrid): ajoute exemple de rowspan
zellerbaptiste Feb 14, 2024
7d0de0b
feat(datatable): ajoute la structure en table
zellerbaptiste Feb 15, 2024
745699a
feat(datatable): ajoute la structure en table
zellerbaptiste Feb 15, 2024
662ab64
feat(datatable): tableau complexe
zellerbaptiste Feb 23, 2024
847e44a
feat(datatable): wip
zellerbaptiste Feb 26, 2024
1bb138e
feat(datatable): wip
zellerbaptiste Feb 26, 2024
75f2e76
feat(table): deprecie v1 et ajoute v2
zellerbaptiste Mar 6, 2024
dce16ee
feat(table): deprecie v1 et ajoute v2
zellerbaptiste Mar 6, 2024
3c95fbb
feat(table): deprecie v1 et ajoute v2
zellerbaptiste Mar 6, 2024
b8cb315
feat(table): v2 met a jour les bordures et ajoute icones de tri
zellerbaptiste Mar 8, 2024
d3a0a59
feat(table): v2 ajoute des utilitaires de largeur de cellules
zellerbaptiste Mar 8, 2024
61ce160
feat(table): ajoute exemple petite largeur
zellerbaptiste Mar 12, 2024
a191822
feat(table): ajoute les entetes de ligne
zellerbaptiste Mar 14, 2024
42328e8
feat(table): ajoute les entetes de ligne
zellerbaptiste Mar 14, 2024
d03850f
feat(table): ajoute les ombres
zellerbaptiste Mar 14, 2024
42f8701
feat(table): met a jour le style de la v1 depreciee
zellerbaptiste Mar 15, 2024
f194788
feat(table): retire ombre et ajoute bordure au scroll
zellerbaptiste Mar 19, 2024
11b18c3
feat(table): ajoute les lignes accordeons
zellerbaptiste Mar 19, 2024
ffd911c
feat(table): ajoute les lignes depliables
zellerbaptiste Mar 20, 2024
f545c01
feat(table): ajoute les lignes repliables dynamiques
zellerbaptiste Mar 21, 2024
de07430
feat(table): ajoute exemple cellules fusionnees accessibles
zellerbaptiste Mar 22, 2024
7336a98
feat(table): met a jour double entree
zellerbaptiste Mar 22, 2024
7769ef7
feat(table): met a jour le style
zellerbaptiste Mar 22, 2024
a44181d
feat(table): met à jour accessibilité
lab9fr Mar 25, 2024
3843d85
feat(table): met a jour la taille des entetes de ligne
zellerbaptiste Mar 25, 2024
a86b3ed
feat(table): met a jour le style selectionne
zellerbaptiste Mar 26, 2024
ed1dabc
feat(table): ajoute la selection des lignes et colonnes
zellerbaptiste Mar 26, 2024
83495f7
feat(table): selection multiple en cours
zellerbaptiste Mar 27, 2024
056ef3d
feat(table): met a jour style select et collapse
zellerbaptiste Mar 28, 2024
4c1bab1
feat(table): met a jour les icones de filtre
zellerbaptiste Mar 28, 2024
88af380
feat(table): fix un bug sur la selection de lignes
zellerbaptiste Mar 28, 2024
9ee4895
feat(table): ajoute les classes de bouton de filtre
zellerbaptiste Mar 28, 2024
a31a9b9
feat(table): ajoute le style hover sur les lignes
zellerbaptiste Mar 29, 2024
4aebf72
feat(table): ajoute le style des colonnes au survol
zellerbaptiste Mar 29, 2024
825add6
feat(table): ajoute le header et footer
zellerbaptiste Apr 2, 2024
ede5ba9
feat(table): met a jour le footer
zellerbaptiste Apr 3, 2024
80152eb
feat(table): ajout le token border contrast grey
zellerbaptiste Apr 3, 2024
d93a3d3
feat(table): met a jour les couleur des bordures
zellerbaptiste Apr 3, 2024
7a7a96a
feat(table): modifie implentation du hover des colonnes
zellerbaptiste Apr 4, 2024
86f7f37
feat(table): met a jour hover des colonnes
zellerbaptiste Apr 4, 2024
5a6153c
feat(table): met a jour le positionnement du caption
zellerbaptiste Apr 4, 2024
1fd82bc
feat(table): met a jour le positionnement du caption
zellerbaptiste Apr 4, 2024
a9da573
feat(table): met a jour le zindex du hover
zellerbaptiste Apr 4, 2024
279c930
feat(table): met a jour le zindex du hover
zellerbaptiste Apr 4, 2024
0e3aca9
feat(table): met a jour header et footer
zellerbaptiste Apr 4, 2024
72cc532
feat(table): corrige hover sur lignes imbriquees
zellerbaptiste Apr 4, 2024
e9ca4dd
feat(table): corrige hover sur lignes imbriquees
zellerbaptiste Apr 4, 2024
e4955ad
feat(table): ajoute une variante avec bordures verticales
zellerbaptiste Apr 5, 2024
bbe6817
feat(table): met a jour les entetes de ligne
zellerbaptiste Apr 5, 2024
8759b61
feat(table): met a jour sample cellules fusionnees
zellerbaptiste Apr 5, 2024
eec12e2
feat(table): refacto page composant
zellerbaptiste Apr 11, 2024
524231b
feat(table): refacto page exemple
zellerbaptiste Apr 12, 2024
6d81ec8
feat(table): refacto bordered
zellerbaptiste Apr 12, 2024
a62c08c
feat(table): refacto donnees page exemple
zellerbaptiste Apr 16, 2024
9c87b06
feat(table): met a jour accessibilite et survol
zellerbaptiste Apr 17, 2024
b0f8c4d
feat(table): met a jour accessibilite et survol
zellerbaptiste Apr 17, 2024
9691237
feat(table): corrige taille du survol
zellerbaptiste Apr 18, 2024
72f7853
feat(table): corrige survol sur entete de colonne multiple
zellerbaptiste Apr 19, 2024
9437d84
feat(table): corrige attributs accessibilite tableaux complexes
zellerbaptiste Apr 19, 2024
7a682fc
feat(table): ajoute le recalcule des largeurs des entetes de ligne
zellerbaptiste Apr 19, 2024
dd9d57a
feat(table): retire les exemples de lignes depliables
zellerbaptiste Apr 29, 2024
d6c4d61
feat(table): corrige selectionner tout
zellerbaptiste Apr 29, 2024
3893bea
feat(table): dynamise exemple de tableau fusionne
zellerbaptiste Apr 30, 2024
aaad4ee
feat(table): correctifs revue design
zellerbaptiste May 3, 2024
8656493
feat(table): retire le rollhover sur les colonnes
zellerbaptiste May 7, 2024
72d61f7
feat(table): retire l'etat de cellule selsectionnee
zellerbaptiste May 7, 2024
f4269e4
feat(table): met a jour le style des lignes selectionnes
zellerbaptiste May 7, 2024
d0c4308
feat(table): met a jour les exemples
zellerbaptiste May 7, 2024
e7d111d
feat(table): met a jour le style de la checkbox de selection
zellerbaptiste May 7, 2024
b76a39a
feat(table): met a jour les lignes selectionnees
zellerbaptiste May 13, 2024
47b6b89
fix(table): lint
keryanS May 21, 2024
e3dc040
Update src/component/table/style/module/_default.scss
zellerbaptiste May 21, 2024
c013e9b
Update src/component/table/style/module/_default.scss
zellerbaptiste May 21, 2024
c839ab6
Update src/core/icon/system/sort-asc-line.svg
zellerbaptiste May 21, 2024
4fdf0bc
feat(table): corrige erreur de build et autres retours de pr
zellerbaptiste May 21, 2024
510998b
feat(table): remplace attribut tag par markup pour plus de clarete
zellerbaptiste May 21, 2024
d710c19
feat(table): met a jiur la jsdoc et indent les fichiers
zellerbaptiste May 21, 2024
64b52d0
feat(table): corrige pour ie11
zellerbaptiste May 22, 2024
6b2f234
Update src/component/table/style/module/_footer.scss
zellerbaptiste May 22, 2024
ef6fd85
Update src/component/table/style/module/_default.scss
zellerbaptiste May 22, 2024
a60cf93
Update src/component/table/style/module/_header.scss
zellerbaptiste May 22, 2024
5488780
Update src/component/table/style/module/_variants.scss
zellerbaptiste May 22, 2024
2988598
feat(table): correctifs de retour pr
zellerbaptiste May 22, 2024
4919612
feat(table): ajoute un label transparent sur les checkboxes fixes
zellerbaptiste May 23, 2024
f47cbdd
feat(table): ajoute un exmple avec classes utilitaires
zellerbaptiste May 23, 2024
3f4c76f
feat(table): met a jour exemple avec classes utilitaires
zellerbaptiste May 23, 2024
bfb5eed
feat(table): met a jour exemple avec classes utilitaires
zellerbaptiste May 23, 2024
70895ef
Update src/component/table/style/module/_default.scss
zellerbaptiste May 23, 2024
3636003
Update src/component/table/style/module/_default.scss
zellerbaptiste May 23, 2024
3dd995f
feat(table): met a jour exemple types de contenus
zellerbaptiste May 23, 2024
13bef72
feat(table): met a jour les classes utilitaires bem
zellerbaptiste May 23, 2024
fe93df7
feat(table): met a jour agencement footer responsive
zellerbaptiste May 24, 2024
340bf15
feat(table): met a jour agencement footer responsive
zellerbaptiste May 24, 2024
46d73a9
feat(table): retire la variante depliable
zellerbaptiste May 24, 2024
a70a906
feat(table): ajoute module sass rotate
zellerbaptiste May 27, 2024
1bc2f2b
feat(table): corrige etat selectionne des lignes
zellerbaptiste May 27, 2024
9670d01
feat(table): refacto js selection des lignes
zellerbaptiste May 28, 2024
d5e3e6b
feat(table): met a jour la mixin rotate
zellerbaptiste May 28, 2024
23fbed3
feat(table): met a jour la page d'exemple
zellerbaptiste May 29, 2024
fb1e7e3
feat(table): met a jour la page d'exemple
zellerbaptiste May 29, 2024
d22fffd
feat(table): met a jour la page d'exemple
zellerbaptiste May 29, 2024
1ffd0d8
feat(table): ajoute un exemple avec cellule accentuee
zellerbaptiste May 29, 2024
dac9c7c
feat(table): ajoute un exemple avec cellule accentuee
zellerbaptiste May 29, 2024
82480cc
feat(table): ajoute un exemple avec cellule accentuee
zellerbaptiste May 29, 2024
eaff0bb
feat(table): ajoute les classes utilitaires accentuation specifiques
zellerbaptiste May 30, 2024
4991591
feat(table): corrige la version depreciee pour ie
zellerbaptiste May 30, 2024
52ee72a
feat(table): refacto des events de checkbox
zellerbaptiste May 31, 2024
5ea7e96
feat(table): retire exemple accentuation
zellerbaptiste May 31, 2024
aee5764
feat(table): met a jour les icones de tri
zellerbaptiste May 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions module/animate/_index.scss
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@forward 'mixin/rotate';
@forward 'mixin/caret';
12 changes: 3 additions & 9 deletions module/animate/mixin/_caret.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
@mixin caret() {
&::after {
transition: transform 0.3s;
}
@use 'rotate';

&[aria-expanded='true'] {
&::after {
transform: rotate(-180deg);
}
}
@mixin caret() {
@include rotate.rotate('&[aria-expanded="true"]', '-180', 'after');
}
11 changes: 11 additions & 0 deletions module/animate/mixin/_rotate.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@mixin rotate($activeSelector, $deg: -180, $pseudo: before, $duration: 0.3) {
&::#{$pseudo} {
transition: transform #{$duration}s;
}

#{$activeSelector} {
&::#{$pseudo} {
transform: rotate(#{$deg}deg);
}
}
}
3 changes: 3 additions & 0 deletions module/color/variable/_decisions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ $values: (
primary: main,
accent: main
),
contrast: (
neutral: soft
),
active: (
primary: strong
),
Expand Down
4 changes: 2 additions & 2 deletions src/analytics/example/component/table/index.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%
<%
const sample = getSample(include);
let data = { caption: 'Caption du tableau (accessibilité)', col: 6, row: 3};
let data = { caption: 'Titre du tableau (caption)', col: 6, row: 3};
%>


Expand Down
11 changes: 11 additions & 0 deletions src/component/button/style/_legacy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
////

@use 'module/legacy';
@use 'module/animate';

@include legacy.is(ie11) {
#{ns(btn)} {
Expand Down Expand Up @@ -68,6 +69,16 @@
@include icon-legacy(team-line, sm);
}

#{ns(btn--sort)} {
@include icon-legacy(sort-asc-desc-line, sm);
@include animate.rotate('&[aria-sorting='desc']');

&[aria-sorting='asc'],
&[aria-sorting='desc'] {
@include icon-legacy(sort-asc-line, sm);
}
}

#{ns-group(btns)} {
@include disable-list-style-legacy(true);

Expand Down
1 change: 1 addition & 0 deletions src/component/button/style/_module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
@import 'module/account';
@import 'module/team';
@import 'module/briefcase';
@import 'module/sort';
1 change: 1 addition & 0 deletions src/component/button/style/_scheme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

// Grey outline variant
&--tertiary,
&--sort,
&--account {
@include btn-kind-scheme(3, $legacy);
}
Expand Down
16 changes: 16 additions & 0 deletions src/component/button/style/module/_sort.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
////
/// Button Module - Expand
/// @group button
////

@use 'module/animate';

#{ns(btn--sort)} {
@include nest-btn(sm, only, sort-asc-desc-line, null, false);
@include animate.rotate('&[aria-sorting='desc']');

&[aria-sorting='asc'],
&[aria-sorting='desc'] {
@include nest-btn(sm, only, sort-asc-line, null, false);
}
}
2 changes: 2 additions & 0 deletions src/component/checkbox/.package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ wrapper: col-8
style:
- core
- form
script:
- core
2 changes: 2 additions & 0 deletions src/component/checkbox/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import api from '../api.js';
export default api;
12 changes: 12 additions & 0 deletions src/component/checkbox/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import api from './api.js';
import { CheckboxSelector } from './script/checkbox/checkbox-selector';
import { CheckboxEmission } from './script/checkbox/checkbox-emission.js';
import { CheckboxInput } from './script/checkbox/checkbox-input.js';

api.checkbox = {
CheckboxSelector: CheckboxSelector,
CheckboxEmission: CheckboxEmission,
CheckboxInput: CheckboxInput
};

export default api;
5 changes: 5 additions & 0 deletions src/component/checkbox/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import api from './index.js';

api.internals.register(api.checkbox.CheckboxSelector.INPUT, api.checkbox.CheckboxInput);

export default api;
8 changes: 8 additions & 0 deletions src/component/checkbox/script/checkbox/checkbox-emission.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import api from '../../api.js';

const CheckboxEmission = {
CHANGE: api.internals.ns.emission('checkbox', 'change'),
RETRIEVE: api.internals.ns.emission('checkbox', 'retrieve')
};

export { CheckboxEmission };
29 changes: 29 additions & 0 deletions src/component/checkbox/script/checkbox/checkbox-input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import api from '../../api.js';
import { CheckboxEmission } from './checkbox-emission.js';

class CheckboxInput extends api.core.Instance {
static get instanceClassName () {
return 'CheckboxInput';
}

constructor () {
super();
this._handlingChange = this.handleChange.bind(this);
}

init () {
this.node.addEventListener('change', this._handlingChange);
this.addDescent(CheckboxEmission.RETRIEVE, this._handlingChange);
this.handleChange();
}

get isChecked () {
return this.node.checked;
}

handleChange () {
this.ascend(CheckboxEmission.CHANGE, this.node);
}
}

export { CheckboxInput };
5 changes: 5 additions & 0 deletions src/component/checkbox/script/checkbox/checkbox-selector.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import api from '../../api.js';

export const CheckboxSelector = {
INPUT: `${api.internals.ns.selector('checkbox-group')} input[type="checkbox"]`
};
3 changes: 2 additions & 1 deletion src/component/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import api from './api.js';
import './accordion/main.js';
import './button/main.js';
import './card/main.js';
import './checkbox/main.js';
import './segmented/main.js';
import './breadcrumb/main.js';
import './tooltip/main.js';
Expand All @@ -11,11 +12,11 @@ import './modal/main.js';
import './password/main.js';
import './navigation/main.js';
import './tab/main.js';
import './table/main.js';
import './tag/main.js';
import './transcription/main.js';
import './tile/main.js';
import './range/main.js';
import './header/main.js';
import './display/main.js';
import './table/main.js';
export default api;
2 changes: 1 addition & 1 deletion src/component/segmented/template/ejs/segmented.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ switch (segmented.size) {
<span class="<%= prefix %>-hint-text"><%= segmented.hint %></span>
<% } %>
</legend>
<div class="<%= prefix %>-segmented__elements">
<div class="<%= prefix %>-segmented__elements">
<% for (const element of segmented.elements) { %>
<%- include('./segmented-element', {element: element}); %>
<% } %>
Expand Down
16 changes: 16 additions & 0 deletions src/component/table/.package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,19 @@ style:
- core
script:
- core
- checkbox
- tooltip
example:
style:
- alert
- badge
- button
- checkbox
- input
- link
- pagination
- select
- segmented
- tag
- toggle
- tooltip
27 changes: 27 additions & 0 deletions src/component/table/deprecated/example/index.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<%
const sample = getSample(include);
let data = { caption: 'Titre du tableau (caption)', col: 6, row: 3};
let dataBordered = { caption: 'Titre du tableau (caption)', bordered: true, col: 6, row: 3};
let dataNoScroll = { caption: 'Titre du tableau (caption) non scrollable', noScroll: true, col: 6};
let dataLayoutFixed = { caption: 'Titre du tableau (caption) fixé', layout: "fixed", col: 3};
let dataNoCaption = { caption: 'Titre du tableau (caption) caché', noCaption: true, col: 6};
let dataCaptionBottom = { caption: 'Titre du tableau (caption) en bas', captionBottom: true, col: 6};

// @TODO: revoir les grilles avec layout
%>

<%- sample('Tableau par défaut', './sample/table-default', {table:data}, true) %>

<%- sample('Tableau avec bordure', './sample/table-default', {table:dataBordered}, true) %>

<%- sample('Tableau non scrollable', './sample/table-default', {table:dataNoScroll}, true) %>

<%- sample('Tableau colonnes fixées (layout-fixed)', './sample/table-default', {table:dataLayoutFixed}, true) %>

<%- sample('Tableau avec titre invisible', './sample/table-default', {table:dataNoCaption}, true) %>

<%- sample('Tableau avec titre en bas', './sample/table-default', {table:dataCaptionBottom}, true) %>

<%- sample('Tableau accentué', './sample/table-default', {table: {...data, accent:'green-emeraude'}}, true) %>

<%- sample('Tableau accentué avec bordure', './sample/table-default', {table:{...dataBordered, accent:'green-emeraude'}}, true) %>
25 changes: 25 additions & 0 deletions src/component/table/deprecated/example/sample/table-default.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<%
const table = locals.table || {};
const col = table.col || 2;
const row = table.row || 2;
let data = {
caption: table.caption || undefined,
bordered: table.bordered || false,
noScroll: table.noScroll || false,
noCaption: table.noCaption || false,
captionBottom: table.captionBottom || false,
accent: table.accent || undefined,
layout: table.layout
}

data.data = new Array(row);
for(let r = 0; r < row; r++) {
data.data[r] = new Array(col);
for(let c = 0; c < col; c++) {
if(r === 0) data.data[0][c] = 'th' + c;
else data.data[r][c] = lorem(null , 25);
}
}
%>

<%- include('../../template/ejs/table', {table: data}); %>
92 changes: 92 additions & 0 deletions src/component/table/deprecated/style/_legacy.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
////
/// Table Legacy - deprecated
/// @group table - deprecated
////

@use 'module/legacy';
@use 'module/color';

@include legacy.is(ie11) {
#{ns(table)} {
& > table {
background-image: none;

thead {
background-image: none;

tr {
&:first-child {
th {
@include color.border(contrast grey, (legacy: true, important: false, side: 'top'));
}
}

&:last-child {
th {
@include color.border(plain grey, (legacy: true, important: false, side: 'bottom'));
}
}
}
}

tbody {
tr {
background-image: none;

&:last-child {
th,
td {
@include color.border(contrast grey, (legacy: true, important: false, side: 'bottom'));
}
}
}
}

th,
td {
&:first-child {
@include color.border(contrast grey, (legacy: true, important: false, side: 'left'));
}

&:last-child {
@include color.border(contrast grey, (legacy: true, important: false, side: 'right'));
}
}
}

@include color.accentuate {
& > table {
background-image: none;

thead {
background-image: none;
}

tbody {
tr {
background-image: none;
}
}
}

&#{ns(table--bordered)} {
& > table {
tbody {
tr {
background-image: none;
}
}
}
}
}

&--bordered {
& > table {
th,
td {
@include color.border(contrast grey, (legacy: true, important: false, side: 'bottom'));
}
}
}
}
}
8 changes: 8 additions & 0 deletions src/component/table/deprecated/style/_module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
////
/// Table Module - deprecated
/// @group Table - deprecated
////

@import 'module/default';
@import 'module/variants';
@import 'module/shadow';
Loading