@aurodesignsystem-dev/auro-table 0.0.0-pr134.0 → 0.0.0-pr135.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 +214 -25
- package/custom-elements.json +979 -0
- package/demo/api.md +22 -10
- package/demo/auro-table.min.js +524 -34
- package/demo/index.md +1 -1
- package/dist/auro-table-Dx0M-P1P.js +12 -0
- package/dist/index.d.ts +12 -9
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +7 -4
- package/dist/auro-table-Bk6DedD_.js +0 -11
package/demo/api.md
CHANGED
|
@@ -3,13 +3,25 @@
|
|
|
3
3
|
|
|
4
4
|
# auro-table
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
### Properties & Attributes
|
|
7
7
|
|
|
8
|
-
|
|
|
9
|
-
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
8
|
+
| Properties | Attributes | Type | Default | Description |
|
|
9
|
+
| ------------- | ------------- | ------- | ------- | ------------------------------------------------------------ |
|
|
10
|
+
| columnHeaders | columnHeaders | array | | An array of strings representing the table's column headers. |
|
|
11
|
+
| componentData | componentData | array | | An array of objects representing the table's data rows. |
|
|
12
|
+
| nowrap | nowrap | boolean | false | When true, prevents the table from wrapping its content. |
|
|
13
|
+
|
|
14
|
+
### Methods
|
|
15
|
+
|
|
16
|
+
| Name | Parameters | Return | Description |
|
|
17
|
+
| -------- | ------------------------------------------------------------------- | ------ | ------------------------------------------------- |
|
|
18
|
+
| register | `name` (string) - The name of element that you want to register to. | | This will register this element with the browser. |
|
|
19
|
+
|
|
20
|
+
### Slots
|
|
21
|
+
|
|
22
|
+
| Name | Description |
|
|
23
|
+
| --------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
24
|
+
| (default) | Default slot for projecting a native `<table>` element. Only available when `columnHeaders` and `componentData` are not set. |
|
|
13
25
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
14
26
|
|
|
15
27
|
## API Examples
|
|
@@ -18,19 +30,19 @@ The `auro-table` component supports two methods of table generation, either via
|
|
|
18
30
|
|
|
19
31
|
### Attribute Data Table
|
|
20
32
|
|
|
21
|
-
In order to have the component generate your table for you, you can pass data to the `
|
|
33
|
+
In order to have the component generate your table for you, you can pass data to the `columnHeaders` and `componentData` attributes to define your column headers and cell data respectively.
|
|
22
34
|
|
|
23
35
|
#### Attribute Definitions
|
|
24
36
|
|
|
25
|
-
##### `
|
|
26
|
-
This attribute takes an array of column headers to use, and accepts blank strings for empty columns. It does not support duplicate values, including empty strings, as each value is used as a key to project data into the table cells via the `
|
|
37
|
+
##### `columnHeaders`
|
|
38
|
+
This attribute takes an array of column headers to use, and accepts blank strings for empty columns. It does not support duplicate values, including empty strings, as each value is used as a key to project data into the table cells via the `componentData` attribute.
|
|
27
39
|
|
|
28
40
|
Example:
|
|
29
41
|
```javascript
|
|
30
42
|
["Column 1", "Column 2", "Column 3"]
|
|
31
43
|
```
|
|
32
44
|
|
|
33
|
-
##### `
|
|
45
|
+
##### `componentData`
|
|
34
46
|
This attribute takes an array of objects, with each object representing a row with data defined for each cell by specifying the matching column-header value.
|
|
35
47
|
|
|
36
48
|
Example:
|