Skip to content

Commit

Permalink
feat: table: Add loc support and column, cell css vertical alignment …
Browse files Browse the repository at this point in the history
…prop (#394)

* feat: table: Add loc support and column, cell css vertical alignment prop

* chore: storybook: remove unused import

* chore: table: make locale prop optional

* chore: table: address pr feedback

* chore: table: remove generic placeholder to ensure it never shows in apps

* chore: table: update from usememo to useeffect

usestate is setting default string values so useeffect is preferred
  • Loading branch information
dkilgore-eightfold authored Sep 28, 2022
1 parent c3c5f32 commit e0045e3
Show file tree
Hide file tree
Showing 83 changed files with 1,303 additions and 128 deletions.
2 changes: 2 additions & 0 deletions src/components/Locale/Default.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/en_US';

const typeTemplate = '${label} is not a valid ${type}';

Expand Down Expand Up @@ -58,6 +59,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/cs_CZ.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/cs_CZ';

const localeValues: Locale = {
locale: 'cs',
global: {
placeholder: 'Prosím vyber',
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/da_DK.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/da_DK';

const localeValues: Locale = {
locale: 'da',
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/de_DE.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/de_DE';

const typeTemplate = '${label} ist nicht gültig. ${type} erwartet';

Expand Down Expand Up @@ -57,6 +58,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/el_GR.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/el_GR';

const localeValues: Locale = {
locale: 'el',
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/en_GB.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/en_GB';

const typeTemplate = '${label} is not a valid ${type}';

Expand Down Expand Up @@ -58,6 +59,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/es_DO.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/es_DO';

const typeTemplate = '${label} no es un ${type} válido';

Expand Down Expand Up @@ -58,6 +59,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/es_ES.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/es_ES';

const typeTemplate = '${label} no es un ${type} válido';

Expand Down Expand Up @@ -58,6 +59,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/es_MX.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/es_MX';

const typeTemplate = '${label} no es un ${type} válido';

Expand Down Expand Up @@ -58,6 +59,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/fi_FI.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/fi_FI';

const localeValues: Locale = {
locale: 'fi',
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/fr_BE.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/fr_BE';

const localeValues: Locale = {
locale: 'fr',
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/fr_CA.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/fr_CA';

const localeValues: Locale = {
locale: 'fr',
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/fr_FR.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/fr_FR';

const typeTemplate =
"La valeur du champ ${label} n'est pas valide pour le type ${type}";
Expand Down Expand Up @@ -58,6 +59,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/he_IL.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/he_IL';

const typeTemplate = '${label} הוא לא ${type} תקין';

Expand Down Expand Up @@ -57,6 +58,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/hr_HR.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/hr_HR';

const typeTemplate = '${label} nije valjan ${type}';

Expand Down Expand Up @@ -58,6 +59,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/ht_HT.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/ht_HT';

const typeTemplate =
"La valeur du champ ${label} n'est pas valide pour le type ${type}";
Expand Down Expand Up @@ -58,6 +59,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/hu_HU.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/hu_HU';

const localeValues: Locale = {
locale: 'hu',
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/it_IT.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/it_IT';

const localeValues: Locale = {
locale: 'it',
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/ja_JP.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/ja_JP';

const typeTemplate = '${label}は有効な${type}ではありません';

Expand Down Expand Up @@ -54,6 +55,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/ko_KR.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/ko_KR';

const typeTemplate = '${label} 유효하지 않은 ${type}';

Expand Down Expand Up @@ -54,6 +55,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/ms_MY.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/ms_MY';

const localeValues: Locale = {
locale: 'ms-my',
global: {
placeholder: 'Sila pilih',
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/nb_NO.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/nb_NO';

const typeTemplate = '${label} er ikke et gyldig ${type}';

Expand Down Expand Up @@ -58,6 +59,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/nl_BE.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/nl_BE';

const typeTemplate = '${label} is geen geldige ${type}';

Expand Down Expand Up @@ -59,6 +60,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/nl_NL.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/nl_NL';

const typeTemplate = '${label} is geen geldige ${type}';

Expand Down Expand Up @@ -59,6 +60,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/pl_PL.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/pl_PL';

const typeTemplate = '${label} nie posiada poprawnej wartości dla typu ${type}';

Expand Down Expand Up @@ -59,6 +60,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/pt_BR.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/pt_BR';

const typeTemplate = '${label} não é um ${type} válido';

Expand Down Expand Up @@ -58,6 +59,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/pt_PT.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/pt_PT';

const localeValues: Locale = {
locale: 'pt',
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/ru_RU.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/ru_RU';

const typeTemplate: string = '${label} не является типом ${type}';

Expand Down Expand Up @@ -56,6 +57,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
2 changes: 2 additions & 0 deletions src/components/Locale/sv_SE.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-template-curly-in-string */
import type { Locale } from '../LocaleProvider';
import Table from '../Table/Locale/sv_SE';

const typeTemplate = '${label} är inte en giltig ${type}';

Expand Down Expand Up @@ -59,6 +60,7 @@ const localeValues: Locale = {
},
},
},
Table,
};

export default localeValues;
Loading

0 comments on commit e0045e3

Please sign in to comment.