@clayui/table 3.38.0 → 3.56.0
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/README.md +19 -0
- package/lib/Body.d.ts +4 -0
- package/lib/Cell.d.ts +30 -0
- package/lib/Head.d.ts +4 -0
- package/lib/Row.d.ts +14 -0
- package/lib/index.d.ts +40 -0
- package/lib/types.d.ts +4 -0
- package/package.json +4 -4
- package/README.mdx +0 -14
package/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# `@clayui/table`
|
|
2
|
+
|
|
3
|
+
A table is a specific pattern for comparing datasets in a very direct and analytical way.
|
|
4
|
+
|
|
5
|
+
- [Documentation](https://clayui.com/docs/components/table.html)
|
|
6
|
+
- [Changelog](./CHANGELOG.md)
|
|
7
|
+
- [Breaking change schedule](./BREAKING.md)
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Run `yarn`
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
yarn add @clayui/table
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Contribute
|
|
18
|
+
|
|
19
|
+
We'd love to get contributions from you! Please, check our [Contributing Guidelines](https://github.com/liferay/clay/blob/master/CONTRIBUTING.md) to see how you can help us improve.
|
package/lib/Body.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
|
|
3
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4
|
+
*/
|
|
1
5
|
import React from 'react';
|
|
2
6
|
declare const ClayTableBody: React.ForwardRefExoticComponent<React.TableHTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
3
7
|
export default ClayTableBody;
|
package/lib/Cell.d.ts
CHANGED
|
@@ -1,16 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
|
|
3
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4
|
+
*/
|
|
1
5
|
import React from 'react';
|
|
2
6
|
import { TDelimiter } from './types';
|
|
3
7
|
declare type ColumnTextAlignmentType = 'center' | 'end' | 'start';
|
|
4
8
|
declare type TableCellBaseProps = React.ThHTMLAttributes<HTMLTableHeaderCellElement> & React.TdHTMLAttributes<HTMLTableDataCellElement>;
|
|
5
9
|
declare type TextCellAlignmentType = 'center' | 'left' | 'right';
|
|
6
10
|
export interface ICellProps extends TableCellBaseProps {
|
|
11
|
+
/**
|
|
12
|
+
* Aligns the text inside the Cell.
|
|
13
|
+
*/
|
|
7
14
|
align?: TextCellAlignmentType;
|
|
15
|
+
/**
|
|
16
|
+
* Sometimes we are unable to remove specific table columns from the DOM
|
|
17
|
+
* and need to hide it using CSS. This property can be added to the "new"
|
|
18
|
+
* first or last cell to maintain table styles on the left and right side.
|
|
19
|
+
*/
|
|
8
20
|
cellDelimiter?: TDelimiter;
|
|
21
|
+
/**
|
|
22
|
+
* Aligns horizontally contents inside the Cell.
|
|
23
|
+
*/
|
|
9
24
|
columnTextAlignment?: ColumnTextAlignmentType;
|
|
25
|
+
/**
|
|
26
|
+
* Fills out the remaining space inside a Cell.
|
|
27
|
+
*/
|
|
10
28
|
expanded?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Defines the type of the Cell element, if true,
|
|
31
|
+
* cell element will be a `<th>`, otherwise `<td>`.
|
|
32
|
+
*/
|
|
11
33
|
headingCell?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Applies a style of heading inside a child of table
|
|
36
|
+
* header cell element.
|
|
37
|
+
*/
|
|
12
38
|
headingTitle?: boolean;
|
|
13
39
|
noWrap?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Truncates the text inside a Cell. Requires `expanded`
|
|
42
|
+
* property value set to true.
|
|
43
|
+
*/
|
|
14
44
|
truncate?: boolean;
|
|
15
45
|
}
|
|
16
46
|
declare const ClayTableCell: React.ForwardRefExoticComponent<ICellProps & React.RefAttributes<HTMLTableDataCellElement | HTMLTableHeaderCellElement>>;
|
package/lib/Head.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
|
|
3
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4
|
+
*/
|
|
1
5
|
import React from 'react';
|
|
2
6
|
declare const ClayTableHead: React.ForwardRefExoticComponent<React.TableHTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
3
7
|
export default ClayTableHead;
|
package/lib/Row.d.ts
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
|
|
3
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4
|
+
*/
|
|
1
5
|
import React from 'react';
|
|
2
6
|
import { TDelimiter } from './types';
|
|
3
7
|
export interface IRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
8
|
+
/**
|
|
9
|
+
* Forces the active state inside the row.
|
|
10
|
+
*/
|
|
4
11
|
active?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Applies a divider style inside the row.
|
|
14
|
+
*/
|
|
5
15
|
divider?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* This property can be added to the "new" first
|
|
18
|
+
* or last ClayTable.Row to maintain table styles on the top and bottom sides.
|
|
19
|
+
*/
|
|
6
20
|
rowDelimiter?: TDelimiter;
|
|
7
21
|
}
|
|
8
22
|
declare const ClayTableRow: React.ForwardRefExoticComponent<IRowProps & React.RefAttributes<HTMLTableRowElement>>;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,17 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
|
|
3
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4
|
+
*/
|
|
1
5
|
import React from 'react';
|
|
2
6
|
declare type ResposiveSizeType = 'lg' | 'md' | 'sm' | 'xl';
|
|
3
7
|
declare type VerticalAlignmentType = 'bottom' | 'middle' | 'top';
|
|
4
8
|
interface IProps extends React.HTMLAttributes<HTMLTableElement> {
|
|
9
|
+
/**
|
|
10
|
+
* This property vertically align the contents
|
|
11
|
+
* inside the table body according a given position.
|
|
12
|
+
*/
|
|
5
13
|
bodyVerticalAlignment?: VerticalAlignmentType;
|
|
14
|
+
/**
|
|
15
|
+
* Applies a Bordered style on Table's columns.
|
|
16
|
+
*/
|
|
6
17
|
borderedColumns?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Removes the default border and rounded corners from table.
|
|
20
|
+
*/
|
|
7
21
|
borderless?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* This property keeps all the headings on one line.
|
|
24
|
+
*/
|
|
8
25
|
headingNoWrap?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* This property vertically align the contents
|
|
28
|
+
* inside the table header according a given position.
|
|
29
|
+
*/
|
|
9
30
|
headVerticalAlignment?: VerticalAlignmentType;
|
|
31
|
+
/**
|
|
32
|
+
* Applies a Hover style on Table.
|
|
33
|
+
*/
|
|
10
34
|
hover?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* This property enables keeping everything on one line.
|
|
37
|
+
*/
|
|
11
38
|
noWrap?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Turns the table responsive.
|
|
41
|
+
*/
|
|
12
42
|
responsive?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Defines the responsive sizing.
|
|
45
|
+
*/
|
|
13
46
|
responsiveSize?: ResposiveSizeType;
|
|
47
|
+
/**
|
|
48
|
+
* Applies a Striped style on Table.
|
|
49
|
+
*/
|
|
14
50
|
striped?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* This property vertically align the contents
|
|
53
|
+
* inside the table according a given position.
|
|
54
|
+
*/
|
|
15
55
|
tableVerticalAlignment?: VerticalAlignmentType;
|
|
16
56
|
}
|
|
17
57
|
declare const _default: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLDivElement>> & {
|
package/lib/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clayui/table",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.56.0",
|
|
4
4
|
"description": "ClayTable component",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"repository": "https://github.com/liferay/clay",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "cross-env NODE_ENV=production babel src --root-mode upward --out-dir lib --extensions .ts,.tsx",
|
|
20
|
-
"
|
|
21
|
-
"prepublishOnly": "yarn build && yarn
|
|
20
|
+
"buildTypes": "cross-env NODE_ENV=production tsc --project ./tsconfig.declarations.json",
|
|
21
|
+
"prepublishOnly": "yarn build && yarn buildTypes",
|
|
22
22
|
"test": "jest --config ../../jest.config.js"
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"browserslist": [
|
|
37
37
|
"extends browserslist-config-clay"
|
|
38
38
|
],
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "1c33d9c709d8ce071862f0087c76ac23ce11465b"
|
|
40
40
|
}
|
package/README.mdx
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'Table'
|
|
3
|
-
description: 'A table is a specific pattern for comparing datasets in a very direct and analytical way.'
|
|
4
|
-
lexiconDefinition: 'https://liferay.design/lexicon/core-components/table/'
|
|
5
|
-
packageNpm: '@clayui/table'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
import {Table} from '$packages/clay-table/docs/index';
|
|
9
|
-
|
|
10
|
-
## Composing
|
|
11
|
-
|
|
12
|
-
You compose the table with the main components to assemble a table with your use cases, use `ClayButton`, `ClayDropDown`... in the cells and try it out. We recommend that you review the [use cases in the Storybook](https://storybook.clayui.com/?path=/story/claytable--default).
|
|
13
|
-
|
|
14
|
-
<Table />
|