@transferwise/components 0.0.0-experimental-d1715ff → 0.0.0-experimental-3064bdb
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/build/i18n/en.json +2 -0
- package/build/i18n/en.json.js +2 -0
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +2 -0
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/main.css +214 -0
- package/build/styles/main.css +214 -0
- package/build/styles/table/Table.css +214 -0
- package/build/types/table/Table.d.ts +23 -0
- package/build/types/table/Table.d.ts.map +1 -0
- package/build/types/table/Table.messages.d.ts +12 -0
- package/build/types/table/Table.messages.d.ts.map +1 -0
- package/build/types/table/TableCell.d.ts +37 -0
- package/build/types/table/TableCell.d.ts.map +1 -0
- package/build/types/table/TableHeader.d.ts +12 -0
- package/build/types/table/TableHeader.d.ts.map +1 -0
- package/build/types/table/TableRow.d.ts +17 -0
- package/build/types/table/TableRow.d.ts.map +1 -0
- package/build/types/table/TableStatusText.d.ts +9 -0
- package/build/types/table/TableStatusText.d.ts.map +1 -0
- package/build/types/table/index.d.ts +6 -0
- package/build/types/table/index.d.ts.map +1 -0
- package/package.json +5 -5
- package/src/i18n/en.json +2 -0
- package/src/main.css +214 -0
- package/src/main.less +1 -0
- package/src/table/Table.css +214 -0
- package/src/table/Table.less +253 -0
- package/src/table/Table.messages.ts +12 -0
- package/src/table/Table.spec.tsx +87 -0
- package/src/table/Table.story.tsx +352 -0
- package/src/table/Table.tsx +121 -0
- package/src/table/TableCell.spec.tsx +298 -0
- package/src/table/TableCell.tsx +153 -0
- package/src/table/TableHeader.spec.tsx +58 -0
- package/src/table/TableHeader.tsx +50 -0
- package/src/table/TableRow.spec.tsx +104 -0
- package/src/table/TableRow.tsx +62 -0
- package/src/table/TableStatusText.spec.tsx +53 -0
- package/src/table/TableStatusText.tsx +35 -0
- package/src/table/index.ts +11 -0
- package/src/test-utils/assets/avatar-rectangle-fox.webp +0 -0
- package/src/test-utils/assets/avatar-square-dude.webp +0 -0
- package/src/test-utils/assets/tapestry-01.png +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TableHeaderType } from './TableHeader';
|
|
2
|
+
import { TableRowClickableType, TableRowType } from './TableRow';
|
|
3
|
+
export interface TableProps {
|
|
4
|
+
data: {
|
|
5
|
+
headers?: TableHeaderType[];
|
|
6
|
+
content?: TableRowType[] | TableRowClickableType[];
|
|
7
|
+
onRowClick?: (rowData: TableRowType | TableRowClickableType) => void;
|
|
8
|
+
};
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
className?: string | undefined;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
error?: {
|
|
13
|
+
message?: string;
|
|
14
|
+
action?: {
|
|
15
|
+
href?: string;
|
|
16
|
+
text?: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
onRetry?: () => void;
|
|
20
|
+
}
|
|
21
|
+
declare const Table: React.FC<TableProps>;
|
|
22
|
+
export default Table;
|
|
23
|
+
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/table/Table.tsx"],"names":[],"mappings":"AAEA,OAAoB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAiB,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAS3E,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE;QACJ,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;QAC5B,OAAO,CAAC,EAAE,YAAY,EAAE,GAAG,qBAAqB,EAAE,CAAC;QACnD,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,GAAG,qBAAqB,KAAK,IAAI,CAAC;KACtE,CAAC;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE;YACP,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,IAAI,CAAC,EAAE,MAAM,CAAC;SACf,CAAC;KACH,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAuF/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.messages.d.ts","sourceRoot":"","sources":["../../../src/table/Table.messages.ts"],"names":[],"mappings":";;;;;;;;;;AAEA,wBASG"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TextPropsType {
|
|
3
|
+
primaryText?: string;
|
|
4
|
+
secondaryText?: string;
|
|
5
|
+
}
|
|
6
|
+
interface StatusPropsType {
|
|
7
|
+
status?: 'error' | 'success';
|
|
8
|
+
}
|
|
9
|
+
export interface LeadingContentType extends TextPropsType, StatusPropsType {
|
|
10
|
+
initials?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface TextContentType extends StatusPropsType {
|
|
13
|
+
text?: string;
|
|
14
|
+
}
|
|
15
|
+
interface CurrencyType {
|
|
16
|
+
value: string | number;
|
|
17
|
+
currency: string;
|
|
18
|
+
}
|
|
19
|
+
export interface CurrencyContentType extends StatusPropsType {
|
|
20
|
+
primaryCurrency?: CurrencyType;
|
|
21
|
+
secondaryCurrency?: CurrencyType;
|
|
22
|
+
}
|
|
23
|
+
export interface StatusContentType extends TextPropsType {
|
|
24
|
+
sentiment?: 'negative' | 'neutral' | 'positive' | 'warning' | 'pending';
|
|
25
|
+
}
|
|
26
|
+
export interface TableCellProps {
|
|
27
|
+
type?: 'leading' | 'text' | 'currency' | 'status';
|
|
28
|
+
content?: LeadingContentType & TextContentType & CurrencyContentType & StatusContentType;
|
|
29
|
+
alignment?: 'right' | 'left';
|
|
30
|
+
className?: string;
|
|
31
|
+
colSpan?: number;
|
|
32
|
+
hasSeparator?: boolean;
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
declare const TableCell: ({ type, content, alignment, className, colSpan, hasSeparator, children, }: TableCellProps) => React.JSX.Element;
|
|
36
|
+
export default TableCell;
|
|
37
|
+
//# sourceMappingURL=TableCell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../src/table/TableCell.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,aAAa;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD,UAAU,eAAe;IACvB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B;AAGD,MAAM,WAAW,kBAAmB,SAAQ,aAAa,EAAE,eAAe;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,iBAAiB,CAAC,EAAE,YAAY,CAAC;CAClC;AAED,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,SAAS,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;CACzE;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;IAClD,OAAO,CAAC,EAAE,kBAAkB,GAAG,eAAe,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;IACzF,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,SAAS,8EAQZ,cAAc,sBAwFhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface TableHeaderType {
|
|
2
|
+
header?: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
alignment?: 'right' | 'left';
|
|
5
|
+
hasError?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface TableHeaderProps extends TableHeaderType {
|
|
8
|
+
hasActionColumn?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const TableHeader: React.FC<TableHeaderProps>;
|
|
11
|
+
export default TableHeader;
|
|
12
|
+
//# sourceMappingURL=TableHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../src/table/TableHeader.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAgC3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableCellProps } from './TableCell';
|
|
3
|
+
export interface TableRowType {
|
|
4
|
+
rowContent?: TableCellProps[];
|
|
5
|
+
}
|
|
6
|
+
export interface TableRowClickableType extends TableRowType {
|
|
7
|
+
id: number | string;
|
|
8
|
+
}
|
|
9
|
+
export interface TableRowProps {
|
|
10
|
+
rowData?: TableRowType | TableRowClickableType;
|
|
11
|
+
hasSeparator?: boolean;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
onRowClick?: (rowData: TableRowType | TableRowClickableType) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const TableRow: ({ rowData, hasSeparator, children, onRowClick }: TableRowProps) => React.JSX.Element;
|
|
16
|
+
export default TableRow;
|
|
17
|
+
//# sourceMappingURL=TableRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../src/table/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKxD,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,YAAY,GAAG,qBAAqB,CAAC;IAC/C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,GAAG,qBAAqB,KAAK,IAAI,CAAC;CACtE;AAED,QAAA,MAAM,QAAQ,oDAA6D,aAAa,sBAsCvF,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface TableStatusTextProps {
|
|
2
|
+
text: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
status?: 'success' | 'error';
|
|
5
|
+
typography?: 'default' | 'large-bold';
|
|
6
|
+
}
|
|
7
|
+
declare const TableStatusText: React.FC<TableStatusTextProps>;
|
|
8
|
+
export default TableStatusText;
|
|
9
|
+
//# sourceMappingURL=TableStatusText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableStatusText.d.ts","sourceRoot":"","sources":["../../../src/table/TableStatusText.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;CACvC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsBnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default } from './Table';
|
|
2
|
+
export type { TableProps } from './Table';
|
|
3
|
+
export type { TableRowType, TableRowClickableType } from './TableRow';
|
|
4
|
+
export type { TableHeaderType } from './TableHeader';
|
|
5
|
+
export type { LeadingContentType, TextContentType, CurrencyContentType, StatusContentType, TableCellProps, } from './TableCell';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACtE,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,GACf,MAAM,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-3064bdb",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@types/react": "^18.3.11",
|
|
80
80
|
"@types/react-dom": "^18.3.1",
|
|
81
81
|
"@types/react-transition-group": "4.4.10",
|
|
82
|
-
"@wise/art": "^2.
|
|
82
|
+
"@wise/art": "^2.7.0",
|
|
83
83
|
"babel-plugin-formatjs": "^10.5.16",
|
|
84
84
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
85
85
|
"enzyme": "^3.11.0",
|
|
@@ -91,14 +91,14 @@
|
|
|
91
91
|
"rollup": "^4.18.1",
|
|
92
92
|
"rollup-preserve-directives": "^1.1.1",
|
|
93
93
|
"storybook": "^8.2.2",
|
|
94
|
-
"@transferwise/less-config": "3.1.0",
|
|
95
94
|
"@transferwise/neptune-css": "14.19.1",
|
|
96
|
-
"@wise/components-theming": "1.6.1"
|
|
95
|
+
"@wise/components-theming": "1.6.1",
|
|
96
|
+
"@transferwise/less-config": "3.1.0"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
99
|
"@transferwise/icons": "^3.13.1",
|
|
100
100
|
"@transferwise/neptune-css": "^14.9.6",
|
|
101
|
-
"@wise/art": "^2.
|
|
101
|
+
"@wise/art": "^2.7.0",
|
|
102
102
|
"@wise/components-theming": "^1.0.0",
|
|
103
103
|
"react": ">=18",
|
|
104
104
|
"react-dom": ">=18",
|
package/src/i18n/en.json
CHANGED
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
"neptune.Summary.statusDone": "Item done",
|
|
31
31
|
"neptune.Summary.statusNotDone": "Item to do",
|
|
32
32
|
"neptune.Summary.statusPending": "Item pending",
|
|
33
|
+
"neptune.Table.emptyData": "No results found",
|
|
34
|
+
"neptune.Table.refreshPage": "Refresh page",
|
|
33
35
|
"neptune.Upload.csButtonText": "Upload another file?",
|
|
34
36
|
"neptune.Upload.csFailureText": "Upload failed. Please, try again",
|
|
35
37
|
"neptune.Upload.csSuccessText": "Upload complete!",
|
package/src/main.css
CHANGED
|
@@ -5025,6 +5025,220 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
5025
5025
|
padding: 0 var(--size-24);
|
|
5026
5026
|
}
|
|
5027
5027
|
}
|
|
5028
|
+
.np-table {
|
|
5029
|
+
width: 100%;
|
|
5030
|
+
background-color: transparent;
|
|
5031
|
+
}
|
|
5032
|
+
.np-table-container {
|
|
5033
|
+
padding: 8px;
|
|
5034
|
+
padding: var(--size-8);
|
|
5035
|
+
background-color: rgba(134,167,189,0.10196);
|
|
5036
|
+
background-color: var(--color-background-neutral);
|
|
5037
|
+
border-radius: 16px;
|
|
5038
|
+
border-radius: var(--radius-medium);
|
|
5039
|
+
}
|
|
5040
|
+
.np-table-container--loading .np-table-header {
|
|
5041
|
+
min-width: calc(160px * 2);
|
|
5042
|
+
}
|
|
5043
|
+
.np-table-container--center {
|
|
5044
|
+
margin-right: auto;
|
|
5045
|
+
margin-left: auto;
|
|
5046
|
+
}
|
|
5047
|
+
.np-table-container--full-width {
|
|
5048
|
+
width: 100%;
|
|
5049
|
+
}
|
|
5050
|
+
.np-table-inner-container {
|
|
5051
|
+
background-image: linear-gradient(to right, #ffffff, #ffffff), linear-gradient(to right, #ffffff, #ffffff), linear-gradient(to right, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0)), linear-gradient(to left, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0));
|
|
5052
|
+
background-image: linear-gradient(to right, var(--color-background-screen), var(--color-background-screen)), linear-gradient(to right, var(--color-background-screen), var(--color-background-screen)), linear-gradient(to right, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0)), linear-gradient(to left, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0));
|
|
5053
|
+
background-position: left center, right center, left center, right center;
|
|
5054
|
+
background-repeat: no-repeat;
|
|
5055
|
+
background-color: #ffffff;
|
|
5056
|
+
background-color: var(--color-background-screen);
|
|
5057
|
+
background-size: 10px 100%, 10px 100%, 10px 100%, 10px 100%;
|
|
5058
|
+
background-attachment: local, local, scroll, scroll;
|
|
5059
|
+
overflow-x: auto;
|
|
5060
|
+
border-radius: 10px;
|
|
5061
|
+
}
|
|
5062
|
+
.np-table-row:last-child .np-table-cell:first-child {
|
|
5063
|
+
border-bottom-left-radius: 10px;
|
|
5064
|
+
}
|
|
5065
|
+
.np-table-row:last-child .np-table-cell:last-child {
|
|
5066
|
+
border-bottom-right-radius: 10px;
|
|
5067
|
+
}
|
|
5068
|
+
.np-table-row--clickable:hover .np-table-cell {
|
|
5069
|
+
background-color: var(--color-background-screen-hover);
|
|
5070
|
+
cursor: pointer;
|
|
5071
|
+
}
|
|
5072
|
+
.np-table-row--separator .np-table-cell {
|
|
5073
|
+
padding: 0;
|
|
5074
|
+
}
|
|
5075
|
+
.np-table-header,
|
|
5076
|
+
.np-table-cell {
|
|
5077
|
+
padding: 0;
|
|
5078
|
+
}
|
|
5079
|
+
.np-table-header:first-child,
|
|
5080
|
+
.np-table-cell:first-child {
|
|
5081
|
+
padding-left: 16px;
|
|
5082
|
+
padding-left: var(--size-16);
|
|
5083
|
+
}
|
|
5084
|
+
.np-table-header:first-child .np-table-header-content,
|
|
5085
|
+
.np-table-cell:first-child .np-table-header-content,
|
|
5086
|
+
.np-table-header:first-child .np-table-cell-content,
|
|
5087
|
+
.np-table-cell:first-child .np-table-cell-content {
|
|
5088
|
+
padding-left: 0;
|
|
5089
|
+
}
|
|
5090
|
+
.np-table-header:last-child,
|
|
5091
|
+
.np-table-cell:last-child {
|
|
5092
|
+
padding-right: 16px;
|
|
5093
|
+
padding-right: var(--size-16);
|
|
5094
|
+
}
|
|
5095
|
+
.np-table-header:last-child .np-table-header-content,
|
|
5096
|
+
.np-table-cell:last-child .np-table-header-content,
|
|
5097
|
+
.np-table-header:last-child .np-table-cell-content,
|
|
5098
|
+
.np-table-cell:last-child .np-table-cell-content {
|
|
5099
|
+
padding-right: 0;
|
|
5100
|
+
}
|
|
5101
|
+
.np-table-header .np-text-body-large-bold,
|
|
5102
|
+
.np-table-cell .np-text-body-large-bold {
|
|
5103
|
+
font-size: 0.875rem;
|
|
5104
|
+
font-size: var(--font-size-14);
|
|
5105
|
+
}
|
|
5106
|
+
.np-table-header.np-table-header--right,
|
|
5107
|
+
.np-table-cell.np-table-cell--right {
|
|
5108
|
+
padding-right: calc(8px + 12px);
|
|
5109
|
+
padding-right: calc(var(--size-8) + var(--size-12));
|
|
5110
|
+
}
|
|
5111
|
+
.np-table-header.np-table-header--right > .np-text-body-default,
|
|
5112
|
+
.np-table-cell.np-table-cell--right > .np-text-body-default {
|
|
5113
|
+
text-align: right;
|
|
5114
|
+
}
|
|
5115
|
+
.np-table-header.np-table-header--right .np-table-header-content,
|
|
5116
|
+
.np-table-cell.np-table-cell--right .np-table-content {
|
|
5117
|
+
justify-content: end;
|
|
5118
|
+
}
|
|
5119
|
+
.np-table-header-content,
|
|
5120
|
+
.np-table-content {
|
|
5121
|
+
display: flex;
|
|
5122
|
+
align-items: center;
|
|
5123
|
+
justify-content: start;
|
|
5124
|
+
}
|
|
5125
|
+
.np-table-header {
|
|
5126
|
+
min-width: 160px;
|
|
5127
|
+
padding-right: 8px;
|
|
5128
|
+
padding-right: var(--size-8);
|
|
5129
|
+
padding-bottom: 8px;
|
|
5130
|
+
padding-bottom: var(--size-8);
|
|
5131
|
+
padding-left: 8px;
|
|
5132
|
+
padding-left: var(--size-8);
|
|
5133
|
+
background-color: rgba(134,167,189,0.10196);
|
|
5134
|
+
background-color: var(--color-background-neutral);
|
|
5135
|
+
color: #37517e;
|
|
5136
|
+
color: var(--color-content-primary);
|
|
5137
|
+
}
|
|
5138
|
+
.np-table-header-content {
|
|
5139
|
+
padding-top: 5px;
|
|
5140
|
+
padding-bottom: 5px;
|
|
5141
|
+
white-space: nowrap;
|
|
5142
|
+
}
|
|
5143
|
+
.np-table-header--has-error {
|
|
5144
|
+
color: var(--color-sentiment-negative);
|
|
5145
|
+
}
|
|
5146
|
+
.np-table-cell {
|
|
5147
|
+
padding: 16px 8px;
|
|
5148
|
+
padding: var(--size-16) var(--size-8);
|
|
5149
|
+
}
|
|
5150
|
+
.np-table-cell--primary {
|
|
5151
|
+
min-width: 200px;
|
|
5152
|
+
}
|
|
5153
|
+
.np-table-cell--currency .np-text-body-default {
|
|
5154
|
+
white-space: nowrap;
|
|
5155
|
+
}
|
|
5156
|
+
.np-table-cell--status .status-circle {
|
|
5157
|
+
width: 24px;
|
|
5158
|
+
height: 24px;
|
|
5159
|
+
}
|
|
5160
|
+
.np-table-cell--status .status-circle .status-icon > svg {
|
|
5161
|
+
width: 21px;
|
|
5162
|
+
height: 21px;
|
|
5163
|
+
}
|
|
5164
|
+
.np-table-cell .tw-chevron {
|
|
5165
|
+
margin-left: 8px;
|
|
5166
|
+
margin-left: var(--size-8);
|
|
5167
|
+
}
|
|
5168
|
+
.np-table-cell-separator {
|
|
5169
|
+
margin-top: 4px;
|
|
5170
|
+
margin-top: var(--size-4);
|
|
5171
|
+
margin-bottom: 4px;
|
|
5172
|
+
margin-bottom: var(--size-4);
|
|
5173
|
+
height: 1px;
|
|
5174
|
+
padding: 0;
|
|
5175
|
+
background-color: rgba(134,167,189,0.10196);
|
|
5176
|
+
background-color: var(--color-background-neutral);
|
|
5177
|
+
}
|
|
5178
|
+
.np-table-cell .np-text-body-default {
|
|
5179
|
+
line-height: 1.375rem;
|
|
5180
|
+
line-height: var(--line-height-22);
|
|
5181
|
+
}
|
|
5182
|
+
.np-table-cell .np-text-body-large-bold {
|
|
5183
|
+
display: flex;
|
|
5184
|
+
align-items: center;
|
|
5185
|
+
color: #37517e;
|
|
5186
|
+
color: var(--color-content-primary);
|
|
5187
|
+
white-space: nowrap;
|
|
5188
|
+
}
|
|
5189
|
+
.np-table-cell .np-table-content--success {
|
|
5190
|
+
color: var(--color-sentiment-positive);
|
|
5191
|
+
}
|
|
5192
|
+
.np-table-cell .np-table-content--error {
|
|
5193
|
+
color: var(--color-sentiment-negative);
|
|
5194
|
+
}
|
|
5195
|
+
.np-table-cell .tw-loader {
|
|
5196
|
+
margin: 150px auto;
|
|
5197
|
+
}
|
|
5198
|
+
@media (max-width: 320px) {
|
|
5199
|
+
.np-table-cell .tw-loader {
|
|
5200
|
+
margin-top: 70px;
|
|
5201
|
+
margin-bottom: 70px;
|
|
5202
|
+
}
|
|
5203
|
+
}
|
|
5204
|
+
.np-table-content {
|
|
5205
|
+
gap: 12px;
|
|
5206
|
+
gap: var(--size-12);
|
|
5207
|
+
}
|
|
5208
|
+
.np-table-content--success,
|
|
5209
|
+
.np-table-content--error {
|
|
5210
|
+
gap: 4px;
|
|
5211
|
+
gap: var(--size-4);
|
|
5212
|
+
}
|
|
5213
|
+
.np-table-content--success .np-table-content-text,
|
|
5214
|
+
.np-table-content--error .np-table-content-text {
|
|
5215
|
+
line-height: 155%;
|
|
5216
|
+
}
|
|
5217
|
+
.np-table-content-media {
|
|
5218
|
+
flex-shrink: 0;
|
|
5219
|
+
}
|
|
5220
|
+
.np-table-content-body {
|
|
5221
|
+
display: flex;
|
|
5222
|
+
flex-direction: column;
|
|
5223
|
+
font-size: 0.75rem;
|
|
5224
|
+
font-size: var(--font-size-12);
|
|
5225
|
+
color: #768e9c;
|
|
5226
|
+
color: var(--color-content-tertiary);
|
|
5227
|
+
}
|
|
5228
|
+
.np-table-content--reversed {
|
|
5229
|
+
flex-direction: row-reverse;
|
|
5230
|
+
}
|
|
5231
|
+
.np-table-content--reversed .np-table-content-body {
|
|
5232
|
+
align-items: end;
|
|
5233
|
+
}
|
|
5234
|
+
.np-table-empty-data {
|
|
5235
|
+
display: flex;
|
|
5236
|
+
align-items: center;
|
|
5237
|
+
}
|
|
5238
|
+
.np-table-empty-data .status-circle {
|
|
5239
|
+
margin-right: 12px;
|
|
5240
|
+
margin-right: var(--size-12);
|
|
5241
|
+
}
|
|
5028
5242
|
.np-tile {
|
|
5029
5243
|
min-width: 120px;
|
|
5030
5244
|
border-radius: 10px;
|
package/src/main.less
CHANGED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
.np-table {
|
|
2
|
+
width: 100%;
|
|
3
|
+
background-color: transparent;
|
|
4
|
+
}
|
|
5
|
+
.np-table-container {
|
|
6
|
+
padding: 8px;
|
|
7
|
+
padding: var(--size-8);
|
|
8
|
+
background-color: rgba(134,167,189,0.10196);
|
|
9
|
+
background-color: var(--color-background-neutral);
|
|
10
|
+
border-radius: 16px;
|
|
11
|
+
border-radius: var(--radius-medium);
|
|
12
|
+
}
|
|
13
|
+
.np-table-container--loading .np-table-header {
|
|
14
|
+
min-width: calc(160px * 2);
|
|
15
|
+
}
|
|
16
|
+
.np-table-container--center {
|
|
17
|
+
margin-right: auto;
|
|
18
|
+
margin-left: auto;
|
|
19
|
+
}
|
|
20
|
+
.np-table-container--full-width {
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
.np-table-inner-container {
|
|
24
|
+
background-image: linear-gradient(to right, #ffffff, #ffffff), linear-gradient(to right, #ffffff, #ffffff), linear-gradient(to right, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0)), linear-gradient(to left, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0));
|
|
25
|
+
background-image: linear-gradient(to right, var(--color-background-screen), var(--color-background-screen)), linear-gradient(to right, var(--color-background-screen), var(--color-background-screen)), linear-gradient(to right, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0)), linear-gradient(to left, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0));
|
|
26
|
+
background-position: left center, right center, left center, right center;
|
|
27
|
+
background-repeat: no-repeat;
|
|
28
|
+
background-color: #ffffff;
|
|
29
|
+
background-color: var(--color-background-screen);
|
|
30
|
+
background-size: 10px 100%, 10px 100%, 10px 100%, 10px 100%;
|
|
31
|
+
background-attachment: local, local, scroll, scroll;
|
|
32
|
+
overflow-x: auto;
|
|
33
|
+
border-radius: 10px;
|
|
34
|
+
}
|
|
35
|
+
.np-table-row:last-child .np-table-cell:first-child {
|
|
36
|
+
border-bottom-left-radius: 10px;
|
|
37
|
+
}
|
|
38
|
+
.np-table-row:last-child .np-table-cell:last-child {
|
|
39
|
+
border-bottom-right-radius: 10px;
|
|
40
|
+
}
|
|
41
|
+
.np-table-row--clickable:hover .np-table-cell {
|
|
42
|
+
background-color: var(--color-background-screen-hover);
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
.np-table-row--separator .np-table-cell {
|
|
46
|
+
padding: 0;
|
|
47
|
+
}
|
|
48
|
+
.np-table-header,
|
|
49
|
+
.np-table-cell {
|
|
50
|
+
padding: 0;
|
|
51
|
+
}
|
|
52
|
+
.np-table-header:first-child,
|
|
53
|
+
.np-table-cell:first-child {
|
|
54
|
+
padding-left: 16px;
|
|
55
|
+
padding-left: var(--size-16);
|
|
56
|
+
}
|
|
57
|
+
.np-table-header:first-child .np-table-header-content,
|
|
58
|
+
.np-table-cell:first-child .np-table-header-content,
|
|
59
|
+
.np-table-header:first-child .np-table-cell-content,
|
|
60
|
+
.np-table-cell:first-child .np-table-cell-content {
|
|
61
|
+
padding-left: 0;
|
|
62
|
+
}
|
|
63
|
+
.np-table-header:last-child,
|
|
64
|
+
.np-table-cell:last-child {
|
|
65
|
+
padding-right: 16px;
|
|
66
|
+
padding-right: var(--size-16);
|
|
67
|
+
}
|
|
68
|
+
.np-table-header:last-child .np-table-header-content,
|
|
69
|
+
.np-table-cell:last-child .np-table-header-content,
|
|
70
|
+
.np-table-header:last-child .np-table-cell-content,
|
|
71
|
+
.np-table-cell:last-child .np-table-cell-content {
|
|
72
|
+
padding-right: 0;
|
|
73
|
+
}
|
|
74
|
+
.np-table-header .np-text-body-large-bold,
|
|
75
|
+
.np-table-cell .np-text-body-large-bold {
|
|
76
|
+
font-size: 0.875rem;
|
|
77
|
+
font-size: var(--font-size-14);
|
|
78
|
+
}
|
|
79
|
+
.np-table-header.np-table-header--right,
|
|
80
|
+
.np-table-cell.np-table-cell--right {
|
|
81
|
+
padding-right: calc(8px + 12px);
|
|
82
|
+
padding-right: calc(var(--size-8) + var(--size-12));
|
|
83
|
+
}
|
|
84
|
+
.np-table-header.np-table-header--right > .np-text-body-default,
|
|
85
|
+
.np-table-cell.np-table-cell--right > .np-text-body-default {
|
|
86
|
+
text-align: right;
|
|
87
|
+
}
|
|
88
|
+
.np-table-header.np-table-header--right .np-table-header-content,
|
|
89
|
+
.np-table-cell.np-table-cell--right .np-table-content {
|
|
90
|
+
justify-content: end;
|
|
91
|
+
}
|
|
92
|
+
.np-table-header-content,
|
|
93
|
+
.np-table-content {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: start;
|
|
97
|
+
}
|
|
98
|
+
.np-table-header {
|
|
99
|
+
min-width: 160px;
|
|
100
|
+
padding-right: 8px;
|
|
101
|
+
padding-right: var(--size-8);
|
|
102
|
+
padding-bottom: 8px;
|
|
103
|
+
padding-bottom: var(--size-8);
|
|
104
|
+
padding-left: 8px;
|
|
105
|
+
padding-left: var(--size-8);
|
|
106
|
+
background-color: rgba(134,167,189,0.10196);
|
|
107
|
+
background-color: var(--color-background-neutral);
|
|
108
|
+
color: #37517e;
|
|
109
|
+
color: var(--color-content-primary);
|
|
110
|
+
}
|
|
111
|
+
.np-table-header-content {
|
|
112
|
+
padding-top: 5px;
|
|
113
|
+
padding-bottom: 5px;
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
}
|
|
116
|
+
.np-table-header--has-error {
|
|
117
|
+
color: var(--color-sentiment-negative);
|
|
118
|
+
}
|
|
119
|
+
.np-table-cell {
|
|
120
|
+
padding: 16px 8px;
|
|
121
|
+
padding: var(--size-16) var(--size-8);
|
|
122
|
+
}
|
|
123
|
+
.np-table-cell--primary {
|
|
124
|
+
min-width: 200px;
|
|
125
|
+
}
|
|
126
|
+
.np-table-cell--currency .np-text-body-default {
|
|
127
|
+
white-space: nowrap;
|
|
128
|
+
}
|
|
129
|
+
.np-table-cell--status .status-circle {
|
|
130
|
+
width: 24px;
|
|
131
|
+
height: 24px;
|
|
132
|
+
}
|
|
133
|
+
.np-table-cell--status .status-circle .status-icon > svg {
|
|
134
|
+
width: 21px;
|
|
135
|
+
height: 21px;
|
|
136
|
+
}
|
|
137
|
+
.np-table-cell .tw-chevron {
|
|
138
|
+
margin-left: 8px;
|
|
139
|
+
margin-left: var(--size-8);
|
|
140
|
+
}
|
|
141
|
+
.np-table-cell-separator {
|
|
142
|
+
margin-top: 4px;
|
|
143
|
+
margin-top: var(--size-4);
|
|
144
|
+
margin-bottom: 4px;
|
|
145
|
+
margin-bottom: var(--size-4);
|
|
146
|
+
height: 1px;
|
|
147
|
+
padding: 0;
|
|
148
|
+
background-color: rgba(134,167,189,0.10196);
|
|
149
|
+
background-color: var(--color-background-neutral);
|
|
150
|
+
}
|
|
151
|
+
.np-table-cell .np-text-body-default {
|
|
152
|
+
line-height: 1.375rem;
|
|
153
|
+
line-height: var(--line-height-22);
|
|
154
|
+
}
|
|
155
|
+
.np-table-cell .np-text-body-large-bold {
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
color: #37517e;
|
|
159
|
+
color: var(--color-content-primary);
|
|
160
|
+
white-space: nowrap;
|
|
161
|
+
}
|
|
162
|
+
.np-table-cell .np-table-content--success {
|
|
163
|
+
color: var(--color-sentiment-positive);
|
|
164
|
+
}
|
|
165
|
+
.np-table-cell .np-table-content--error {
|
|
166
|
+
color: var(--color-sentiment-negative);
|
|
167
|
+
}
|
|
168
|
+
.np-table-cell .tw-loader {
|
|
169
|
+
margin: 150px auto;
|
|
170
|
+
}
|
|
171
|
+
@media (max-width: 320px) {
|
|
172
|
+
.np-table-cell .tw-loader {
|
|
173
|
+
margin-top: 70px;
|
|
174
|
+
margin-bottom: 70px;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
.np-table-content {
|
|
178
|
+
gap: 12px;
|
|
179
|
+
gap: var(--size-12);
|
|
180
|
+
}
|
|
181
|
+
.np-table-content--success,
|
|
182
|
+
.np-table-content--error {
|
|
183
|
+
gap: 4px;
|
|
184
|
+
gap: var(--size-4);
|
|
185
|
+
}
|
|
186
|
+
.np-table-content--success .np-table-content-text,
|
|
187
|
+
.np-table-content--error .np-table-content-text {
|
|
188
|
+
line-height: 155%;
|
|
189
|
+
}
|
|
190
|
+
.np-table-content-media {
|
|
191
|
+
flex-shrink: 0;
|
|
192
|
+
}
|
|
193
|
+
.np-table-content-body {
|
|
194
|
+
display: flex;
|
|
195
|
+
flex-direction: column;
|
|
196
|
+
font-size: 0.75rem;
|
|
197
|
+
font-size: var(--font-size-12);
|
|
198
|
+
color: #768e9c;
|
|
199
|
+
color: var(--color-content-tertiary);
|
|
200
|
+
}
|
|
201
|
+
.np-table-content--reversed {
|
|
202
|
+
flex-direction: row-reverse;
|
|
203
|
+
}
|
|
204
|
+
.np-table-content--reversed .np-table-content-body {
|
|
205
|
+
align-items: end;
|
|
206
|
+
}
|
|
207
|
+
.np-table-empty-data {
|
|
208
|
+
display: flex;
|
|
209
|
+
align-items: center;
|
|
210
|
+
}
|
|
211
|
+
.np-table-empty-data .status-circle {
|
|
212
|
+
margin-right: 12px;
|
|
213
|
+
margin-right: var(--size-12);
|
|
214
|
+
}
|