@sb1/ffe-tables-react 10.0.0 → 10.0.1
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/package.json +3 -3
- package/types/CellContent.d.ts +2 -0
- package/types/Table.d.ts +11 -0
- package/types/TableBody.d.ts +4 -0
- package/types/TableCaption.d.ts +4 -0
- package/types/TableContext.d.ts +15 -0
- package/types/TableDataCell.d.ts +4 -0
- package/types/TableFoot.d.ts +4 -0
- package/types/TableHead.d.ts +4 -0
- package/types/TableHeaderCell.d.ts +5 -0
- package/types/TableRow.d.ts +4 -0
- package/types/TableRowExpandable.d.ts +6 -0
- package/types/index.d.ts +9 -0
- package/types/texts.d.ts +14 -0
- package/types/types.d.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-tables-react",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "React implementation of ffe-tables",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"url": "ssh://git@github.com:SpareBank1/designsystem.git"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "ffe-buildtool tsc
|
|
21
|
+
"build": "ffe-buildtool tsc",
|
|
22
22
|
"build:es": "ffe-buildtool tsc --es",
|
|
23
23
|
"lint": "eslint src",
|
|
24
24
|
"lint:fix": "eslint src --fix",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "92933c40501d4208f1820cc0a6972ce46c0f14b3"
|
|
46
46
|
}
|
package/types/Table.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableContextInterFace } from './TableContext';
|
|
3
|
+
import { InitialSort } from './types';
|
|
4
|
+
export interface TableProps extends Omit<React.ComponentPropsWithoutRef<'table'>, 'children'> {
|
|
5
|
+
initialSort?: InitialSort;
|
|
6
|
+
children: React.ReactNode | (({ activeSortOrder, activeSortKey, }: {
|
|
7
|
+
activeSortOrder?: TableContextInterFace['activeSortOrder'];
|
|
8
|
+
activeSortKey?: TableContextInterFace['activeSortKey'];
|
|
9
|
+
}) => React.ReactNode);
|
|
10
|
+
}
|
|
11
|
+
export declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SortOrder, InitialSort } from './types';
|
|
3
|
+
export interface TableContextInterFace {
|
|
4
|
+
activeSortOrder?: SortOrder;
|
|
5
|
+
activeSortKey?: string;
|
|
6
|
+
updateSort: (sortKey: string) => void;
|
|
7
|
+
getSort: (sortKey: string) => SortOrder;
|
|
8
|
+
}
|
|
9
|
+
export declare const TableContext: React.Context<TableContextInterFace>;
|
|
10
|
+
interface Props {
|
|
11
|
+
initialSort?: InitialSort;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const TableProvider: React.FC<Props>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TableHeaderCellProps extends React.ComponentPropsWithoutRef<'th'> {
|
|
3
|
+
sortKey?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const TableHeaderCell: React.ForwardRefExoticComponent<TableHeaderCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TableRowExpandableProps extends React.ComponentPropsWithoutRef<'tr'> {
|
|
3
|
+
expandContent: React.ReactNode;
|
|
4
|
+
locale?: 'nb' | 'nn' | 'en';
|
|
5
|
+
}
|
|
6
|
+
export declare const TableRowExpandable: React.ForwardRefExoticComponent<TableRowExpandableProps & React.RefAttributes<HTMLTableRowElement>>;
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { Table, TableProps } from './Table';
|
|
2
|
+
export { TableBody, TableBodyProps } from './TableBody';
|
|
3
|
+
export { TableDataCell, TableDataCellProps } from './TableDataCell';
|
|
4
|
+
export { TableFoot, TableFootProps } from './TableFoot';
|
|
5
|
+
export { TableHead, TableHeadProps } from './TableHead';
|
|
6
|
+
export { TableHeaderCell, TableHeaderCellProps } from './TableHeaderCell';
|
|
7
|
+
export { TableRow, TableRowProps } from './TableRow';
|
|
8
|
+
export { TableCaption, TableCaptionProps } from './TableCaption';
|
|
9
|
+
export { TableRowExpandable, TableRowExpandableProps, } from './TableRowExpandable';
|
package/types/texts.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const txt: {
|
|
2
|
+
nb: {
|
|
3
|
+
readonly showMore: "Vis mer";
|
|
4
|
+
readonly showLess: "Vis mindre";
|
|
5
|
+
};
|
|
6
|
+
nn: {
|
|
7
|
+
readonly showMore: "Vis meir";
|
|
8
|
+
readonly showLess: "Vis mindre";
|
|
9
|
+
};
|
|
10
|
+
en: {
|
|
11
|
+
readonly showMore: "Show more";
|
|
12
|
+
readonly showLess: "Show less";
|
|
13
|
+
};
|
|
14
|
+
};
|