diff --git a/mdc-data-table/CHANGELOG.md b/mdc-data-table/CHANGELOG.md new file mode 100644 index 0000000000..6a61842c15 --- /dev/null +++ b/mdc-data-table/CHANGELOG.md @@ -0,0 +1,32 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [3.1.1](https://github.com/material-components/material-components-web/compare/v3.1.0...v3.1.1) (2019-08-14) + +### Bug Fixes + +- **data-table:** Fixed alignment of header cell title for numer… ([#4963](https://github.com/material-components/material-components-web/issues/4963)) ([b6274a7](https://github.com/material-components/material-components-web/commit/b6274a7)) + +# [4.0.0-alpha.0](https://github.com/material-components/material-components-web/compare/v3.1.0...v4.0.0-alpha.0) (2019-08-07) + +**Note:** Version bump only for package @material/data-table + +# [3.1.0](https://github.com/material-components/material-components-web/compare/v3.0.0...v3.1.0) (2019-07-22) + +### Features + +- **data-table:** Added data table component ([#4889](https://github.com/material-components/material-components-web/issues/4889)) ([7d3380a](https://github.com/material-components/material-components-web/commit/7d3380a)) + +# [3.1.0-alpha.0](https://github.com/material-components/material-components-web/compare/v3.0.0...v3.1.0-alpha.0) (2019-07-16) + +### Features + +- **data-table:** Added data table component ([#4889](https://github.com/material-components/material-components-web/issues/4889)) ([7d3380a](https://github.com/material-components/material-components-web/commit/7d3380a)) + +# [3.1.0](https://github.com/material-components/material-components-web/compare/v3.0.0...v3.1.0) (2019-07-16) + +### Features + +- **data-table:** Added data table component ([#4889](https://github.com/material-components/material-components-web/issues/4889)) ([7d3380a](https://github.com/material-components/material-components-web/commit/7d3380a)) diff --git a/mdc-data-table/LICENSE b/mdc-data-table/LICENSE new file mode 100644 index 0000000000..2f45e07741 --- /dev/null +++ b/mdc-data-table/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2014-2019 Google, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/mdc-data-table/README.md b/mdc-data-table/README.md new file mode 100644 index 0000000000..114d2e517b --- /dev/null +++ b/mdc-data-table/README.md @@ -0,0 +1,411 @@ + + +# Data Table + +Data tables display information in a grid-like format of rows and columns. They organize information in a way that's +easy to scan, so that users can look for patterns and insights. + +## Design & API Documentation + +
+ Dessert + | ++ Carbs (g) + | ++ Protein (g) + | ++ Comments + | +
---|---|---|---|
Frozen yogurt | +24 | +4.0 | +Super tasty | +
Ice cream sandwich | +37 | ++ 4.33333333333 + | +I like ice cream more | +
Eclair | +24 | +6.0 | +New filing flavor | +
+
+
+
+
+
+
+
+ |
+ + Status + | ++ Signal name + | ++ Severity + | ++ Stage + | ++ Time + | ++ Roles + | +
---|---|---|---|---|---|---|
+
+
+
+
+
+
+
+ |
+ Online | +Arcus watch slowdown | +Medium | +Triaged | +0:33 | +Allison Brie | +
+
+
+
+
+
+
+
+ |
+ Offline | ++ monarch: prod shared ares-managed-features-provider-heavy + | +Huge | +Triaged | +0:33 | +Brie Larson | +
+
+
+
+
+
+
+
+ |
+ Online | ++ monarch: prod shared ares-managed-features-provider-heavy + | +Minor | +Not triaged | +0:33 | +Jeremy Lake | +
+
+
+
+
+
+
+
+ |
+ Online | +Arcus watch slowdown | +Negligible | +Triaged | +0:33 | +Angelina Cheng | +
+ |
+ `
+ : ""}
+ ${Object.entries(this.columns).map((columnEntry) => {
+ const [key, column] = columnEntry;
+ const sorted = key === this._sortColumn;
+ const classes = {
+ "mdc-data-table__cell--numeric": Boolean(
+ column.type && column.type === "numeric"
+ ),
+ sortable: Boolean(column.sortable),
+ "not-sorted": Boolean(column.sortable && !sorted),
+ };
+ return html`
+
+ ${column.sortable
+ ? html`
+ |
+ `;
+ })}
+
---|---|
+ |
+ `
+ : ""}
+ ${Object.entries(this.columns).map((columnEntry) => {
+ const [key, column] = columnEntry;
+ return html`
+ + ${column.template + ? column.template(row[key]) + : row[key]} + | + `; + })} +