-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f67e02c
commit 07d32ce
Showing
15 changed files
with
387 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2022 Siemens AG | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
@import 'mixins/fonts'; | ||
|
||
.table { | ||
@include text-default; | ||
|
||
thead { | ||
background-color: var(--theme-table-header-row--background); | ||
} | ||
|
||
th, | ||
td { | ||
border-bottom-color: var(--theme-table-data-row--border-color); | ||
} | ||
} | ||
|
||
.table-striped > tbody > tr:nth-of-type(odd) > * { | ||
--bs-table-accent-bg: var(--theme-table-data-row-alt--background); | ||
color: inherit; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
packages/core/src/components/html-table/test/basic/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2022 Siemens AG | ||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Stencil Component Starter</title> | ||
</head> | ||
<body> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th scope="col">#</th> | ||
<th scope="col">First</th> | ||
<th scope="col">Last</th> | ||
<th scope="col">Handle</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th scope="row">1</th> | ||
<td>Mark</td> | ||
<td>Otto</td> | ||
<td>@mdo</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">2</th> | ||
<td>Jacob</td> | ||
<td>Thornton</td> | ||
<td>@fat</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">3</th> | ||
<td colspan="2">Larry the Bird</td> | ||
<td>@twitter</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script> | ||
</body> | ||
</html> |
23 changes: 23 additions & 0 deletions
23
packages/core/src/components/html-table/test/html-table.e2e.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2022 Siemens AG | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import { expect } from '@playwright/test'; | ||
import { regressionTest } from '@utils/test'; | ||
|
||
regressionTest.describe('html-table', () => { | ||
regressionTest('basic', async ({ page }) => { | ||
await page.goto(`html-table/test/basic`); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); | ||
}); | ||
|
||
regressionTest('striped', async ({ page }) => { | ||
await page.goto(`html-table/test/striped`); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); | ||
}); | ||
}); |
Binary file added
BIN
+13.3 KB
...ble.e2e.ts-snapshots/html-table-basic-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.1 KB
...le.e2e.ts-snapshots/html-table-basic-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.3 KB
...e.e2e.ts-snapshots/html-table-striped-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.2 KB
....e2e.ts-snapshots/html-table-striped-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions
48
packages/core/src/components/html-table/test/striped/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2022 Siemens AG | ||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Stencil Component Starter</title> | ||
</head> | ||
<body> | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th scope="col">#</th> | ||
<th scope="col">First</th> | ||
<th scope="col">Last</th> | ||
<th scope="col">Handle</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th scope="row">1</th> | ||
<td>Mark</td> | ||
<td>Otto</td> | ||
<td>@mdo</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">2</th> | ||
<td>Jacob</td> | ||
<td>Thornton</td> | ||
<td>@fat</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">3</th> | ||
<td colspan="2">Larry the Bird</td> | ||
<td>@twitter</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
.../documentation/docs/auto-generated/previews/web-component/html-table-striped.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// SPDX-FileCopyrightText: 2022 Siemens AG | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
<!-- Auto generated! Please edit here: siemens-ix/packages/documentation/static/webcomponent-examples/html-table-striped.html --> | ||
```html | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th scope="col">#</th> | ||
<th scope="col">First</th> | ||
<th scope="col">Last</th> | ||
<th scope="col">Handle</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th scope="row">1</th> | ||
<td>Mark</td> | ||
<td>Otto</td> | ||
<td>@mdo</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">2</th> | ||
<td>Jacob</td> | ||
<td>Thornton</td> | ||
<td>@fat</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">3</th> | ||
<td colspan="2">Larry the Bird</td> | ||
<td>@twitter</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
``` |
36 changes: 36 additions & 0 deletions
36
packages/documentation/docs/auto-generated/previews/web-component/html-table.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// SPDX-FileCopyrightText: 2022 Siemens AG | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
<!-- Auto generated! Please edit here: siemens-ix/packages/documentation/static/webcomponent-examples/html-table.html --> | ||
```html | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th scope="col">#</th> | ||
<th scope="col">First</th> | ||
<th scope="col">Last</th> | ||
<th scope="col">Handle</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th scope="row">1</th> | ||
<td>Mark</td> | ||
<td>Otto</td> | ||
<td>@mdo</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">2</th> | ||
<td>Jacob</td> | ||
<td>Thornton</td> | ||
<td>@fat</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">3</th> | ||
<td colspan="2">Larry the Bird</td> | ||
<td>@twitter</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import TabItem from '@theme/TabItem'; | ||
import Preview from '@site/src/components/Preview'; | ||
|
||
import SourceTable from './../auto-generated/previews/web-component/html-table.md' | ||
import SourceTableStriped from './../auto-generated/previews/web-component/html-table-striped.md' | ||
|
||
# HTML Table | ||
|
||
## Usage | ||
|
||
<Preview name="html-table" height="12rem"> | ||
<TabItem value="javascript"> | ||
<SourceTable /> | ||
</TabItem> | ||
</Preview> | ||
|
||
### Striped | ||
|
||
<Preview name="html-table-striped" height="12rem"> | ||
<TabItem value="javascript"> | ||
<SourceTableStriped /> | ||
</TabItem> | ||
</Preview> |
56 changes: 56 additions & 0 deletions
56
packages/documentation/static/webcomponent-examples/html-table-striped.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2022 Siemens AG | ||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Pill example</title> | ||
<link rel="stylesheet" href="lib/ix-icons/dist/css/ix-icons.css" /> | ||
<link rel="stylesheet" href="lib/ix/dist/siemens-ix/siemens-ix.css" /> | ||
<link | ||
rel="stylesheet" | ||
href="lib/ix-brand-theme/dist/ix-brand-theme/ix-brand-theme.css" | ||
/> | ||
<script type="module"> | ||
import { defineCustomElements } from './lib/ix/loader/index.js'; | ||
defineCustomElements(); | ||
</script> | ||
</head> | ||
<body class="theme-brand-dark"> | ||
<!-- Preview code --> | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th scope="col">#</th> | ||
<th scope="col">First</th> | ||
<th scope="col">Last</th> | ||
<th scope="col">Handle</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th scope="row">1</th> | ||
<td>Mark</td> | ||
<td>Otto</td> | ||
<td>@mdo</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">2</th> | ||
<td>Jacob</td> | ||
<td>Thornton</td> | ||
<td>@fat</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">3</th> | ||
<td colspan="2">Larry the Bird</td> | ||
<td>@twitter</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<!-- Preview code --> | ||
<script type="text/javascript" src="lib/utils/demo.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.