@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-tables-react",
3
- "version": "10.0.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 --es --cjs && copyfiles --flat src/index.d.ts types",
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": "83b5c8952328ec39a99040567677ab01c3180f42"
45
+ "gitHead": "92933c40501d4208f1820cc0a6972ce46c0f14b3"
46
46
  }
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const CellContent: React.FC<React.ComponentPropsWithoutRef<'div'>>;
@@ -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,4 @@
1
+ import React from 'react';
2
+ export interface TableBodyProps extends React.ComponentPropsWithoutRef<'tbody'> {
3
+ }
4
+ export declare const TableBody: React.FC<TableBodyProps>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export interface TableCaptionProps extends React.ComponentPropsWithoutRef<'caption'> {
3
+ }
4
+ export declare const TableCaption: React.ForwardRefExoticComponent<TableCaptionProps & React.RefAttributes<HTMLTableCaptionElement>>;
@@ -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,4 @@
1
+ import React from 'react';
2
+ export interface TableDataCellProps extends React.ComponentPropsWithoutRef<'td'> {
3
+ }
4
+ export declare const TableDataCell: React.ForwardRefExoticComponent<TableDataCellProps & React.RefAttributes<HTMLTableCellElement>>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export interface TableFootProps extends React.ComponentPropsWithoutRef<'tfoot'> {
3
+ }
4
+ export declare const TableFoot: React.FC<TableFootProps>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export interface TableHeadProps extends React.ComponentPropsWithoutRef<'thead'> {
3
+ }
4
+ export declare const TableHead: React.FC<TableHeadProps>;
@@ -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,4 @@
1
+ import React from 'react';
2
+ export interface TableRowProps extends React.ComponentPropsWithoutRef<'tr'> {
3
+ }
4
+ export declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
@@ -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>>;
@@ -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';
@@ -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
+ };
@@ -0,0 +1,6 @@
1
+ export declare const ariaSortOrders: readonly ["none", "ascending", "descending"];
2
+ export type SortOrder = (typeof ariaSortOrders)[number];
3
+ export type InitialSort = {
4
+ sortOrder: SortOrder;
5
+ sortKey: string;
6
+ };