Skip to content

Commit

Permalink
feat(table): agent - add the table component with its pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
JLou committed Feb 20, 2024
1 parent ada6262 commit 83b3e7d
Show file tree
Hide file tree
Showing 27 changed files with 1,545 additions and 4 deletions.
22 changes: 21 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,25 @@
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
},
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#1f6fd0",
"activityBar.background": "#1f6fd0",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#ee90bb",
"activityBarBadge.foreground": "#15202b",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#1f6fd0",
"statusBar.background": "#1857a4",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#1f6fd0",
"statusBarItem.remoteBackground": "#1857a4",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#1857a4",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#1857a499",
"titleBar.inactiveForeground": "#e7e7e799"
},
"peacock.color": "#1857a4"
}
148 changes: 148 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions packages/css/.storybook/cssTheme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { create } from "@storybook/theming/create";

export default create({
base: "light",
brandTitle: "Design system - CSS",
brandUrl: "https://github.com/AxaFrance/design-system",
brandTarget: "_self",
});
2 changes: 1 addition & 1 deletion packages/css/.storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addons } from '@storybook/addons';
import logo from './css3.svg'
import logo from './css3.svg';

addons.setConfig({
theme: {
Expand Down
1 change: 1 addition & 0 deletions packages/css/src/Form/Select/Select.agent.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
position: absolute;
top: 50%;
right: 1em;
height: 0.7em; /* when using pure svgs */
font-size: 0.7em;
transform: translateY(-50%);
}
Expand Down
78 changes: 78 additions & 0 deletions packages/css/src/Table/Pager.agent.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
@use "../common/common.agent.scss" as common;

/* stylelint-disable no-descending-specificity */
.af-pager {
&__pagination {
display: flex;
margin: 0;
padding: 0;
flex-wrap: wrap;
align-items: center;
justify-content: center;
list-style: none;
}

&__item {
border-radius: common.rem(25px);
font-size: 0.9375rem;

&--active {
min-width: 1.9rem;
height: 1.9rem;
text-align: center;
color: common.$white;
background: common.$color-axa;

&:hover {
background: common.$color-azur;
}

.af-pager__item-link {
color: common.$white;
}
}

&-link,
&-nolink {
display: inline-flex;
padding: 0.3em 0.5rem;
color: common.$color-pager-link;
}

&-text {
text-decoration: underline;
}

&-icon {
margin: 0 0.5rem;

&:hover {
text-decoration: none;
}
}
}
}

@include common.media-breakpoint-down(xs) {
.af-paging__pager {
margin-top: 2rem;
}

.af-paging__limit {
width: 100%;
margin: 1rem auto;
text-align: center;

[class^="col"] {
width: inherit;
padding: inherit;
flex-basis: inherit;
flex-grow: inherit;
}

.af-form__group {
justify-content: space-evenly;
}
}
}
/* stylelint-enable no-descending-specificity */
61 changes: 61 additions & 0 deletions packages/css/src/Table/Paging.agent.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
@use "../common/common.agent.scss" as common;
@use "../Form/Select/Select.agent.scss";

.af-paging {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-start;

&__limit {
margin-top: 2rem;
order: 2;
color: common.$color-pager-link;

.af-form__group {
margin: 0;
font-size: 0.9375rem;

&-label {
font-weight: normal;
}

.af-form__input-select {
padding: 2px 29px 2px 14px;
}
}
}

&__pager {
flex-basis: 100%;
order: 1;
}
}

@include common.media-breakpoint-up(md) {
.af-paging {
&__limit {
margin: 0;
flex-basis: 40%;
order: 1;
}

&__pager {
flex-basis: 60%;
order: 2;
}
}
}
@include common.media-breakpoint-up(xl) {
.af-paging {
&__limit {
flex-basis: 30%;
order: 1;
}

&__pager {
flex-basis: 70%;
order: 2;
}
}
}
Loading

0 comments on commit 83b3e7d

Please sign in to comment.