@coorpacademy/components 11.11.8 → 11.11.9-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/input-switch/style.css +2 -1
- package/es/atom/select/style.css +1 -0
- package/es/molecule/errors-table/index.d.ts +16 -0
- package/es/molecule/errors-table/index.d.ts.map +1 -0
- package/es/molecule/errors-table/index.js +58 -0
- package/es/molecule/errors-table/index.js.map +1 -0
- package/es/molecule/errors-table/style.css +64 -0
- package/es/molecule/errors-table/types.d.ts +24 -0
- package/es/molecule/errors-table/types.d.ts.map +1 -0
- package/es/molecule/errors-table/types.js +13 -0
- package/es/molecule/errors-table/types.js.map +1 -0
- package/es/molecule/filters/filters-wapper.css +0 -1
- package/es/organism/mooc-header/style.css +3 -1
- package/es/variables/colors.css +1 -0
- package/lib/atom/input-switch/style.css +2 -1
- package/lib/atom/select/style.css +1 -0
- package/lib/molecule/errors-table/index.d.ts +16 -0
- package/lib/molecule/errors-table/index.d.ts.map +1 -0
- package/lib/molecule/errors-table/index.js +68 -0
- package/lib/molecule/errors-table/index.js.map +1 -0
- package/lib/molecule/errors-table/style.css +64 -0
- package/lib/molecule/errors-table/types.d.ts +24 -0
- package/lib/molecule/errors-table/types.d.ts.map +1 -0
- package/lib/molecule/errors-table/types.js +24 -0
- package/lib/molecule/errors-table/types.js.map +1 -0
- package/lib/molecule/filters/filters-wapper.css +0 -1
- package/lib/organism/mooc-header/style.css +3 -1
- package/lib/variables/colors.css +1 -0
- package/package.json +2 -2
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@value white from colors;
|
|
5
5
|
@value light from colors;
|
|
6
6
|
@value dark from colors;
|
|
7
|
+
@value positive from colors;
|
|
7
8
|
@value cm_grey_200 from colors;
|
|
8
9
|
@value black from colors;
|
|
9
10
|
@value cm_primary_blue from colors;
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
.checkbox:checked ~ label {
|
|
81
|
-
background:
|
|
82
|
+
background: positive;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
.default input:checked ~ label::after {
|
package/es/atom/select/style.css
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Props } from './types';
|
|
3
|
+
declare const ErrorsTable: {
|
|
4
|
+
(props: Props): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
columns: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
7
|
+
title: import("prop-types").Validator<string>;
|
|
8
|
+
}> | null | undefined)[]>;
|
|
9
|
+
rows: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
10
|
+
fields: import("prop-types").Requireable<(string | null | undefined)[]>;
|
|
11
|
+
}> | null | undefined)[]>;
|
|
12
|
+
ariaDescribedby: import("prop-types").Requireable<string>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default ErrorsTable;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/errors-table/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,KAAK,EAAY,MAAM,SAAS,CAAC;AAEzC,QAAA,MAAM,WAAW;YAAW,KAAK;;;;;;;;;;CAuDhC,CAAC;AAIF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
/* eslint-disable css-modules/no-unused-class */
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import classnames from 'classnames';
|
|
6
|
+
import style from './style.css';
|
|
7
|
+
import { propTypes } from './types';
|
|
8
|
+
|
|
9
|
+
const ErrorsTable = props => {
|
|
10
|
+
const {
|
|
11
|
+
columns = [],
|
|
12
|
+
rows = [],
|
|
13
|
+
ariaDescribedby
|
|
14
|
+
} = props;
|
|
15
|
+
const headerRow = columns.map((column, cIndex) => {
|
|
16
|
+
const {
|
|
17
|
+
title
|
|
18
|
+
} = column;
|
|
19
|
+
return /*#__PURE__*/React.createElement("th", {
|
|
20
|
+
className: classnames(style[`header-${cIndex + 1}`]),
|
|
21
|
+
key: `${title}-${cIndex + 1}`,
|
|
22
|
+
role: "columnheader"
|
|
23
|
+
}, /*#__PURE__*/React.createElement("div", null, title));
|
|
24
|
+
});
|
|
25
|
+
const headerView = [/*#__PURE__*/React.createElement("th", {
|
|
26
|
+
className: classnames(style[`header-0`]),
|
|
27
|
+
key: "header"
|
|
28
|
+
}, /*#__PURE__*/React.createElement("div", null, " ", ''))].concat(headerRow);
|
|
29
|
+
const bodyView = rows.map((row, index) => {
|
|
30
|
+
const {
|
|
31
|
+
fields = []
|
|
32
|
+
} = row;
|
|
33
|
+
const bodyRow = fields.map((field, fIndex) => {
|
|
34
|
+
return /*#__PURE__*/React.createElement("td", {
|
|
35
|
+
className: classnames(style.col, style[`col-${fIndex + 1}`]),
|
|
36
|
+
key: `${field}-${fIndex}`
|
|
37
|
+
}, field || '');
|
|
38
|
+
});
|
|
39
|
+
bodyRow.unshift( /*#__PURE__*/React.createElement("td", {
|
|
40
|
+
className: classnames(style.col, style[`col-0`]),
|
|
41
|
+
key: "header"
|
|
42
|
+
}, index + 1));
|
|
43
|
+
return /*#__PURE__*/React.createElement("tr", {
|
|
44
|
+
key: `line-${index}`
|
|
45
|
+
}, bodyRow);
|
|
46
|
+
});
|
|
47
|
+
return /*#__PURE__*/React.createElement("table", _extends({}, ariaDescribedby ? {
|
|
48
|
+
'aria-describedby': ariaDescribedby
|
|
49
|
+
} : {}, {
|
|
50
|
+
className: style.table
|
|
51
|
+
}), /*#__PURE__*/React.createElement("thead", {
|
|
52
|
+
className: style.thead
|
|
53
|
+
}, /*#__PURE__*/React.createElement("tr", null, headerView)), /*#__PURE__*/React.createElement("tbody", null, bodyView));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
ErrorsTable.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
57
|
+
export default ErrorsTable;
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","classnames","style","propTypes","ErrorsTable","props","columns","rows","ariaDescribedby","headerRow","map","column","cIndex","title","headerView","concat","bodyView","row","index","fields","bodyRow","field","fIndex","col","unshift","table","thead"],"sources":["../../../src/molecule/errors-table/index.tsx"],"sourcesContent":["/* eslint-disable css-modules/no-unused-class */\nimport React from 'react';\nimport classnames from 'classnames';\nimport style from './style.css';\nimport {Props, propTypes} from './types';\n\nconst ErrorsTable = (props: Props) => {\n const {columns = [], rows = [], ariaDescribedby} = props;\n\n const headerRow = columns.map((column, cIndex) => {\n const {title} = column;\n return (\n <th\n className={classnames(style[`header-${cIndex + 1}`])}\n key={`${title}-${cIndex + 1}`}\n role=\"columnheader\"\n >\n <div>{title}</div>\n </th>\n );\n });\n\n const headerView = [\n <th className={classnames(style[`header-0`])} key=\"header\">\n <div> {''}</div>\n </th>\n ].concat(headerRow);\n\n const bodyView = rows.map((row, index) => {\n const {fields = []} = row;\n\n const bodyRow = fields.map((field: string, fIndex: number) => {\n return (\n <td\n className={classnames(style.col, style[`col-${fIndex + 1}`])}\n key={`${field}-${fIndex}`}\n >\n {field || ''}\n </td>\n );\n });\n bodyRow.unshift(\n <td className={classnames(style.col, style[`col-0`])} key=\"header\">\n {index + 1}\n </td>\n );\n\n return <tr key={`line-${index}`}>{bodyRow}</tr>;\n });\n\n return (\n <table\n {...(ariaDescribedby ? {'aria-describedby': ariaDescribedby} : {})}\n className={style.table}\n >\n <thead className={style.thead}>\n <tr>{headerView}</tr>\n </thead>\n <tbody>{bodyView}</tbody>\n </table>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,GAAG,EAAG,GAAED,KAAM,IAAGC,MAAO;MAF1B,GAIGD,KAAK,IAAI,EAJZ,CADF;IAQD,CATe,CAAhB;IAUAD,OAAO,CAACI,OAAR,eACE;MAAI,SAAS,EAAEvB,UAAU,CAACC,KAAK,CAACqB,GAAP,EAAYrB,KAAK,CAAE,OAAF,CAAjB,CAAzB;MAAsD,GAAG,EAAC;IAA1D,GACGgB,KAAK,GAAG,CADX,CADF;IAMA,oBAAO;MAAI,GAAG,EAAG,QAAOA,KAAM;IAAvB,GAA2BE,OAA3B,CAAP;EACD,CApBgB,CAAjB;EAsBA,oBACE,0CACOZ,eAAe,GAAG;IAAC,oBAAoBA;EAArB,CAAH,GAA2C,EADjE;IAEE,SAAS,EAAEN,KAAK,CAACuB;EAFnB,iBAIE;IAAO,SAAS,EAAEvB,KAAK,CAACwB;EAAxB,gBACE,gCAAKZ,UAAL,CADF,CAJF,eAOE,mCAAQE,QAAR,CAPF,CADF;AAWD,CAvDD;;AAyDAZ,WAAW,CAACD,SAAZ,2CAAwBA,SAAxB;AAEA,eAAeC,WAAf"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value xtraLightGrey from colors;
|
|
3
|
+
@value cm_grey_400 from colors;
|
|
4
|
+
@value cm_grey_700 from colors;
|
|
5
|
+
@value cm_negative_red_200 from colors;
|
|
6
|
+
@value light from colors;
|
|
7
|
+
|
|
8
|
+
.table {
|
|
9
|
+
border: 1px solid light;
|
|
10
|
+
font-family: 'Gilroy';
|
|
11
|
+
font-style: normal;
|
|
12
|
+
border-spacing: 0;
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.table .thead {
|
|
19
|
+
background-color: xtraLightGrey;
|
|
20
|
+
font-weight: 600;
|
|
21
|
+
font-size: 14px;
|
|
22
|
+
line-height: 24px;
|
|
23
|
+
color: cm_grey_400;
|
|
24
|
+
height: 40px;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
text-align: left;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.table .col {
|
|
30
|
+
text-align: left;
|
|
31
|
+
padding-top: 8px;
|
|
32
|
+
padding-bottom: 8px;
|
|
33
|
+
position: relative;
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
line-height: 16px;
|
|
37
|
+
color: cm_grey_700;
|
|
38
|
+
border-top: 1px solid light;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.table .header-0 {
|
|
42
|
+
width: 57px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.table .header-1 {
|
|
46
|
+
width: 182px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.table .col-2 {
|
|
50
|
+
color: cm_negative_red_200;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.table .col-1 {
|
|
54
|
+
width: 182px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.table .col-0 {
|
|
58
|
+
text-align: center;
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
line-height: 16px;
|
|
62
|
+
width: 57px;
|
|
63
|
+
color: cm_grey_400;
|
|
64
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export declare const propTypes: {
|
|
3
|
+
columns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
4
|
+
title: PropTypes.Validator<string>;
|
|
5
|
+
}> | null | undefined)[]>;
|
|
6
|
+
rows: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
7
|
+
fields: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
8
|
+
}> | null | undefined)[]>;
|
|
9
|
+
ariaDescribedby: PropTypes.Requireable<string>;
|
|
10
|
+
};
|
|
11
|
+
export declare type Column = {
|
|
12
|
+
title: string;
|
|
13
|
+
};
|
|
14
|
+
export declare type Row = {
|
|
15
|
+
fields: string[];
|
|
16
|
+
};
|
|
17
|
+
export declare type Columns = [Column, Column];
|
|
18
|
+
export declare type Rows = Row[];
|
|
19
|
+
export declare type Props = {
|
|
20
|
+
columns: Columns;
|
|
21
|
+
rows: Rows;
|
|
22
|
+
ariaDescribedby?: string;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/errors-table/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAUnC,eAAO,MAAM,SAAS;;;;;;;;CAIrB,CAAC;AAEF,oBAAY,MAAM,GAAG;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC;AACrC,oBAAY,GAAG,GAAG;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAC,CAAC;AACrC,oBAAY,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACvC,oBAAY,IAAI,GAAG,GAAG,EAAE,CAAC;AAEzB,oBAAY,KAAK,GAAG;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
const columnProptypes = PropTypes.shape({
|
|
3
|
+
title: PropTypes.string.isRequired
|
|
4
|
+
});
|
|
5
|
+
const rowProptypes = PropTypes.shape({
|
|
6
|
+
fields: PropTypes.arrayOf(PropTypes.string)
|
|
7
|
+
});
|
|
8
|
+
export const propTypes = {
|
|
9
|
+
columns: PropTypes.arrayOf(columnProptypes),
|
|
10
|
+
rows: PropTypes.arrayOf(rowProptypes),
|
|
11
|
+
ariaDescribedby: PropTypes.string
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","columnProptypes","shape","title","string","isRequired","rowProptypes","fields","arrayOf","propTypes","columns","rows","ariaDescribedby"],"sources":["../../../src/molecule/errors-table/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst columnProptypes = PropTypes.shape({\n title: PropTypes.string.isRequired\n});\n\nconst rowProptypes = PropTypes.shape({\n fields: PropTypes.arrayOf(PropTypes.string)\n});\n\nexport const propTypes = {\n columns: PropTypes.arrayOf(columnProptypes),\n rows: PropTypes.arrayOf(rowProptypes),\n ariaDescribedby: PropTypes.string\n};\n\nexport type Column = {title: string};\nexport type Row = {fields: string[]};\nexport type Columns = [Column, Column];\nexport type Rows = Row[];\n\nexport type Props = {\n columns: Columns;\n rows: Rows;\n ariaDescribedby?: string;\n};\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,MAAMC,eAAe,GAAGD,SAAS,CAACE,KAAV,CAAgB;EACtCC,KAAK,EAAEH,SAAS,CAACI,MAAV,CAAiBC;AADc,CAAhB,CAAxB;AAIA,MAAMC,YAAY,GAAGN,SAAS,CAACE,KAAV,CAAgB;EACnCK,MAAM,EAAEP,SAAS,CAACQ,OAAV,CAAkBR,SAAS,CAACI,MAA5B;AAD2B,CAAhB,CAArB;AAIA,OAAO,MAAMK,SAAS,GAAG;EACvBC,OAAO,EAAEV,SAAS,CAACQ,OAAV,CAAkBP,eAAlB,CADc;EAEvBU,IAAI,EAAEX,SAAS,CAACQ,OAAV,CAAkBF,YAAlB,CAFiB;EAGvBM,eAAe,EAAEZ,SAAS,CAACI;AAHJ,CAAlB"}
|
|
@@ -482,12 +482,14 @@
|
|
|
482
482
|
|
|
483
483
|
.languageSelect {
|
|
484
484
|
width: 98%;
|
|
485
|
+
height: 30px;
|
|
485
486
|
}
|
|
486
487
|
|
|
487
|
-
.setting:nth-child(
|
|
488
|
+
.setting:nth-child(-n+2) {
|
|
488
489
|
flex-direction: column;
|
|
489
490
|
height: 60px;
|
|
490
491
|
align-items: baseline;
|
|
492
|
+
margin-top: 10px;
|
|
491
493
|
}
|
|
492
494
|
|
|
493
495
|
.setting .label {
|
package/es/variables/colors.css
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@value white from colors;
|
|
5
5
|
@value light from colors;
|
|
6
6
|
@value dark from colors;
|
|
7
|
+
@value positive from colors;
|
|
7
8
|
@value cm_grey_200 from colors;
|
|
8
9
|
@value black from colors;
|
|
9
10
|
@value cm_primary_blue from colors;
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
.checkbox:checked ~ label {
|
|
81
|
-
background:
|
|
82
|
+
background: positive;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
.default input:checked ~ label::after {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Props } from './types';
|
|
3
|
+
declare const ErrorsTable: {
|
|
4
|
+
(props: Props): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
columns: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
7
|
+
title: import("prop-types").Validator<string>;
|
|
8
|
+
}> | null | undefined)[]>;
|
|
9
|
+
rows: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
10
|
+
fields: import("prop-types").Requireable<(string | null | undefined)[]>;
|
|
11
|
+
}> | null | undefined)[]>;
|
|
12
|
+
ariaDescribedby: import("prop-types").Requireable<string>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default ErrorsTable;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/errors-table/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,KAAK,EAAY,MAAM,SAAS,CAAC;AAEzC,QAAA,MAAM,WAAW;YAAW,KAAK;;;;;;;;;;CAuDhC,CAAC;AAIF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
|
|
10
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
11
|
+
|
|
12
|
+
var _types = require("./types");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
|
|
18
|
+
const ErrorsTable = props => {
|
|
19
|
+
const {
|
|
20
|
+
columns = [],
|
|
21
|
+
rows = [],
|
|
22
|
+
ariaDescribedby
|
|
23
|
+
} = props;
|
|
24
|
+
const headerRow = columns.map((column, cIndex) => {
|
|
25
|
+
const {
|
|
26
|
+
title
|
|
27
|
+
} = column;
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement("th", {
|
|
29
|
+
className: (0, _classnames.default)(_style.default[`header-${cIndex + 1}`]),
|
|
30
|
+
key: `${title}-${cIndex + 1}`,
|
|
31
|
+
role: "columnheader"
|
|
32
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, title));
|
|
33
|
+
});
|
|
34
|
+
const headerView = [/*#__PURE__*/_react.default.createElement("th", {
|
|
35
|
+
className: (0, _classnames.default)(_style.default[`header-0`]),
|
|
36
|
+
key: "header"
|
|
37
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, " ", ''))].concat(headerRow);
|
|
38
|
+
const bodyView = rows.map((row, index) => {
|
|
39
|
+
const {
|
|
40
|
+
fields = []
|
|
41
|
+
} = row;
|
|
42
|
+
const bodyRow = fields.map((field, fIndex) => {
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement("td", {
|
|
44
|
+
className: (0, _classnames.default)(_style.default.col, _style.default[`col-${fIndex + 1}`]),
|
|
45
|
+
key: `${field}-${fIndex}`
|
|
46
|
+
}, field || '');
|
|
47
|
+
});
|
|
48
|
+
bodyRow.unshift( /*#__PURE__*/_react.default.createElement("td", {
|
|
49
|
+
className: (0, _classnames.default)(_style.default.col, _style.default[`col-0`]),
|
|
50
|
+
key: "header"
|
|
51
|
+
}, index + 1));
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement("tr", {
|
|
53
|
+
key: `line-${index}`
|
|
54
|
+
}, bodyRow);
|
|
55
|
+
});
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement("table", _extends({}, ariaDescribedby ? {
|
|
57
|
+
'aria-describedby': ariaDescribedby
|
|
58
|
+
} : {}, {
|
|
59
|
+
className: _style.default.table
|
|
60
|
+
}), /*#__PURE__*/_react.default.createElement("thead", {
|
|
61
|
+
className: _style.default.thead
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement("tr", null, headerView)), /*#__PURE__*/_react.default.createElement("tbody", null, bodyView));
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
ErrorsTable.propTypes = process.env.NODE_ENV !== "production" ? _types.propTypes : {};
|
|
66
|
+
var _default = ErrorsTable;
|
|
67
|
+
exports.default = _default;
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ErrorsTable","props","columns","rows","ariaDescribedby","headerRow","map","column","cIndex","title","classnames","style","headerView","concat","bodyView","row","index","fields","bodyRow","field","fIndex","col","unshift","table","thead","propTypes"],"sources":["../../../src/molecule/errors-table/index.tsx"],"sourcesContent":["/* eslint-disable css-modules/no-unused-class */\nimport React from 'react';\nimport classnames from 'classnames';\nimport style from './style.css';\nimport {Props, propTypes} from './types';\n\nconst ErrorsTable = (props: Props) => {\n const {columns = [], rows = [], ariaDescribedby} = props;\n\n const headerRow = columns.map((column, cIndex) => {\n const {title} = column;\n return (\n <th\n className={classnames(style[`header-${cIndex + 1}`])}\n key={`${title}-${cIndex + 1}`}\n role=\"columnheader\"\n >\n <div>{title}</div>\n </th>\n );\n });\n\n const headerView = [\n <th className={classnames(style[`header-0`])} key=\"header\">\n <div> {''}</div>\n </th>\n ].concat(headerRow);\n\n const bodyView = rows.map((row, index) => {\n const {fields = []} = row;\n\n const bodyRow = fields.map((field: string, fIndex: number) => {\n return (\n <td\n className={classnames(style.col, style[`col-${fIndex + 1}`])}\n key={`${field}-${fIndex}`}\n >\n {field || ''}\n </td>\n );\n });\n bodyRow.unshift(\n <td className={classnames(style.col, style[`col-0`])} key=\"header\">\n {index + 1}\n </td>\n );\n\n return <tr key={`line-${index}`}>{bodyRow}</tr>;\n });\n\n return (\n <table\n {...(ariaDescribedby ? {'aria-describedby': ariaDescribedby} : {})}\n className={style.table}\n >\n <thead className={style.thead}>\n <tr>{headerView}</tr>\n </thead>\n <tbody>{bodyView}</tbody>\n </table>\n );\n};\n\nErrorsTable.propTypes = propTypes;\n\nexport default ErrorsTable;\n"],"mappings":";;;;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,WAAW,GAAIC,KAAD,IAAkB;EACpC,MAAM;IAACC,OAAO,GAAG,EAAX;IAAeC,IAAI,GAAG,EAAtB;IAA0BC;EAA1B,IAA6CH,KAAnD;EAEA,MAAMI,SAAS,GAAGH,OAAO,CAACI,GAAR,CAAY,CAACC,MAAD,EAASC,MAAT,KAAoB;IAChD,MAAM;MAACC;IAAD,IAAUF,MAAhB;IACA,oBACE;MACE,SAAS,EAAE,IAAAG,mBAAA,EAAWC,cAAA,CAAO,UAASH,MAAM,GAAG,CAAE,EAA3B,CAAX,CADb;MAEE,GAAG,EAAG,GAAEC,KAAM,IA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E,4CAAQE,QAAR,CAPF,CADF;AAWD,CAvDD;;AAyDAd,WAAW,CAACyB,SAAZ,2CAAwBA,gBAAxB;eAEezB,W"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value xtraLightGrey from colors;
|
|
3
|
+
@value cm_grey_400 from colors;
|
|
4
|
+
@value cm_grey_700 from colors;
|
|
5
|
+
@value cm_negative_red_200 from colors;
|
|
6
|
+
@value light from colors;
|
|
7
|
+
|
|
8
|
+
.table {
|
|
9
|
+
border: 1px solid light;
|
|
10
|
+
font-family: 'Gilroy';
|
|
11
|
+
font-style: normal;
|
|
12
|
+
border-spacing: 0;
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.table .thead {
|
|
19
|
+
background-color: xtraLightGrey;
|
|
20
|
+
font-weight: 600;
|
|
21
|
+
font-size: 14px;
|
|
22
|
+
line-height: 24px;
|
|
23
|
+
color: cm_grey_400;
|
|
24
|
+
height: 40px;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
text-align: left;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.table .col {
|
|
30
|
+
text-align: left;
|
|
31
|
+
padding-top: 8px;
|
|
32
|
+
padding-bottom: 8px;
|
|
33
|
+
position: relative;
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
line-height: 16px;
|
|
37
|
+
color: cm_grey_700;
|
|
38
|
+
border-top: 1px solid light;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.table .header-0 {
|
|
42
|
+
width: 57px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.table .header-1 {
|
|
46
|
+
width: 182px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.table .col-2 {
|
|
50
|
+
color: cm_negative_red_200;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.table .col-1 {
|
|
54
|
+
width: 182px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.table .col-0 {
|
|
58
|
+
text-align: center;
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
line-height: 16px;
|
|
62
|
+
width: 57px;
|
|
63
|
+
color: cm_grey_400;
|
|
64
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export declare const propTypes: {
|
|
3
|
+
columns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
4
|
+
title: PropTypes.Validator<string>;
|
|
5
|
+
}> | null | undefined)[]>;
|
|
6
|
+
rows: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
7
|
+
fields: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
8
|
+
}> | null | undefined)[]>;
|
|
9
|
+
ariaDescribedby: PropTypes.Requireable<string>;
|
|
10
|
+
};
|
|
11
|
+
export declare type Column = {
|
|
12
|
+
title: string;
|
|
13
|
+
};
|
|
14
|
+
export declare type Row = {
|
|
15
|
+
fields: string[];
|
|
16
|
+
};
|
|
17
|
+
export declare type Columns = [Column, Column];
|
|
18
|
+
export declare type Rows = Row[];
|
|
19
|
+
export declare type Props = {
|
|
20
|
+
columns: Columns;
|
|
21
|
+
rows: Rows;
|
|
22
|
+
ariaDescribedby?: string;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/errors-table/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAUnC,eAAO,MAAM,SAAS;;;;;;;;CAIrB,CAAC;AAEF,oBAAY,MAAM,GAAG;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC;AACrC,oBAAY,GAAG,GAAG;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAC,CAAC;AACrC,oBAAY,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACvC,oBAAY,IAAI,GAAG,GAAG,EAAE,CAAC;AAEzB,oBAAY,KAAK,GAAG;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.propTypes = void 0;
|
|
5
|
+
|
|
6
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
const columnProptypes = _propTypes.default.shape({
|
|
11
|
+
title: _propTypes.default.string.isRequired
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const rowProptypes = _propTypes.default.shape({
|
|
15
|
+
fields: _propTypes.default.arrayOf(_propTypes.default.string)
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const propTypes = {
|
|
19
|
+
columns: _propTypes.default.arrayOf(columnProptypes),
|
|
20
|
+
rows: _propTypes.default.arrayOf(rowProptypes),
|
|
21
|
+
ariaDescribedby: _propTypes.default.string
|
|
22
|
+
};
|
|
23
|
+
exports.propTypes = propTypes;
|
|
24
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":["columnProptypes","PropTypes","shape","title","string","isRequired","rowProptypes","fields","arrayOf","propTypes","columns","rows","ariaDescribedby"],"sources":["../../../src/molecule/errors-table/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst columnProptypes = PropTypes.shape({\n title: PropTypes.string.isRequired\n});\n\nconst rowProptypes = PropTypes.shape({\n fields: PropTypes.arrayOf(PropTypes.string)\n});\n\nexport const propTypes = {\n columns: PropTypes.arrayOf(columnProptypes),\n rows: PropTypes.arrayOf(rowProptypes),\n ariaDescribedby: PropTypes.string\n};\n\nexport type Column = {title: string};\nexport type Row = {fields: string[]};\nexport type Columns = [Column, Column];\nexport type Rows = Row[];\n\nexport type Props = {\n columns: Columns;\n rows: Rows;\n ariaDescribedby?: string;\n};\n"],"mappings":";;;;;AAAA;;;;AAEA,MAAMA,eAAe,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EACtCC,KAAK,EAAEF,kBAAA,CAAUG,MAAV,CAAiBC;AADc,CAAhB,CAAxB;;AAIA,MAAMC,YAAY,GAAGL,kBAAA,CAAUC,KAAV,CAAgB;EACnCK,MAAM,EAAEN,kBAAA,CAAUO,OAAV,CAAkBP,kBAAA,CAAUG,MAA5B;AAD2B,CAAhB,CAArB;;AAIO,MAAMK,SAAS,GAAG;EACvBC,OAAO,EAAET,kBAAA,CAAUO,OAAV,CAAkBR,eAAlB,CADc;EAEvBW,IAAI,EAAEV,kBAAA,CAAUO,OAAV,CAAkBF,YAAlB,CAFiB;EAGvBM,eAAe,EAAEX,kBAAA,CAAUG;AAHJ,CAAlB"}
|
|
@@ -482,12 +482,14 @@
|
|
|
482
482
|
|
|
483
483
|
.languageSelect {
|
|
484
484
|
width: 98%;
|
|
485
|
+
height: 30px;
|
|
485
486
|
}
|
|
486
487
|
|
|
487
|
-
.setting:nth-child(
|
|
488
|
+
.setting:nth-child(-n+2) {
|
|
488
489
|
flex-direction: column;
|
|
489
490
|
height: 60px;
|
|
490
491
|
align-items: baseline;
|
|
492
|
+
margin-top: 10px;
|
|
491
493
|
}
|
|
492
494
|
|
|
493
495
|
.setting .label {
|
package/lib/variables/colors.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.11.
|
|
3
|
+
"version": "11.11.9-alpha.5+021ae82d60",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -165,5 +165,5 @@
|
|
|
165
165
|
"last 2 versions",
|
|
166
166
|
"IE 11"
|
|
167
167
|
],
|
|
168
|
-
"gitHead": "
|
|
168
|
+
"gitHead": "021ae82d60c091df3a143266d0aebe0a2662b528"
|
|
169
169
|
}
|