-
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.
feat(core/grid): add grid component (#721)
Co-authored-by: Lukas Maurer <lukas.maurer@siemens.com>
- Loading branch information
1 parent
2cad394
commit d82ef06
Showing
105 changed files
with
2,915 additions
and
417 deletions.
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
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
55 changes: 55 additions & 0 deletions
55
packages/angular-test-app/src/preview-examples/grid-fixed.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,55 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 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. | ||
--> | ||
<h5>fixed: sm</h5> | ||
<ix-grid fixed="fixed-sm"> | ||
<ix-row> | ||
<ix-col>1</ix-col> | ||
<ix-col>2</ix-col> | ||
<ix-col>3</ix-col> | ||
<ix-col>4</ix-col> | ||
<ix-col>5</ix-col> | ||
<ix-col>6</ix-col> | ||
</ix-row> | ||
</ix-grid> | ||
|
||
<h5>fixed</h5> | ||
<ix-grid fixed> | ||
<ix-row> | ||
<ix-col>1</ix-col> | ||
<ix-col>2</ix-col> | ||
<ix-col>3</ix-col> | ||
<ix-col>4</ix-col> | ||
<ix-col>5</ix-col> | ||
<ix-col>6</ix-col> | ||
</ix-row> | ||
</ix-grid> | ||
|
||
<h5>fixed: md</h5> | ||
<ix-grid fixed="fixed-md"> | ||
<ix-row> | ||
<ix-col>1</ix-col> | ||
<ix-col>2</ix-col> | ||
<ix-col>3</ix-col> | ||
<ix-col>4</ix-col> | ||
<ix-col>5</ix-col> | ||
<ix-col>6</ix-col> | ||
</ix-row> | ||
</ix-grid> | ||
|
||
<h5>fixed: lg</h5> | ||
<ix-grid fixed="fixed-lg"> | ||
<ix-row> | ||
<ix-col>1</ix-col> | ||
<ix-col>2</ix-col> | ||
<ix-col>3</ix-col> | ||
<ix-col>4</ix-col> | ||
<ix-col>5</ix-col> | ||
<ix-col>6</ix-col> | ||
</ix-row> | ||
</ix-grid> |
30 changes: 30 additions & 0 deletions
30
packages/angular-test-app/src/preview-examples/grid-fixed.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,30 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 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 { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-example', | ||
templateUrl: './grid-fixed.html', | ||
styles: [ | ||
` | ||
ix-grid { | ||
margin-bottom: 1rem; | ||
} | ||
ix-col { | ||
background-color: var(--theme-color-primary); | ||
border: var(--theme-std-bdr-2); | ||
text-align: center; | ||
color: var(--theme-color-inv-contrast-text); | ||
} | ||
`, | ||
], | ||
}) | ||
export default class GridFixed {} |
45 changes: 45 additions & 0 deletions
45
packages/angular-test-app/src/preview-examples/grid-fluid.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,45 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 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. | ||
--> | ||
<div class="example-parent"> | ||
<h4>Non fluid (default)</h4> | ||
<ix-grid> | ||
<ix-row> | ||
<ix-col>1</ix-col> | ||
<ix-col>2</ix-col> | ||
<ix-col>3</ix-col> | ||
<ix-col>4</ix-col> | ||
<ix-col>5</ix-col> | ||
<ix-col>6</ix-col> | ||
<ix-col>7</ix-col> | ||
<ix-col>8</ix-col> | ||
<ix-col>9</ix-col> | ||
<ix-col>10</ix-col> | ||
<ix-col>11</ix-col> | ||
<ix-col>12</ix-col> | ||
</ix-row> | ||
</ix-grid> | ||
|
||
<h4>fluid</h4> | ||
<ix-grid fluid> | ||
<ix-row> | ||
<ix-col>1</ix-col> | ||
<ix-col>2</ix-col> | ||
<ix-col>3</ix-col> | ||
<ix-col>4</ix-col> | ||
<ix-col>5</ix-col> | ||
<ix-col>6</ix-col> | ||
<ix-col>7</ix-col> | ||
<ix-col>8</ix-col> | ||
<ix-col>9</ix-col> | ||
<ix-col>10</ix-col> | ||
<ix-col>11</ix-col> | ||
<ix-col>12</ix-col> | ||
</ix-row> | ||
</ix-grid> | ||
</div> |
36 changes: 36 additions & 0 deletions
36
packages/angular-test-app/src/preview-examples/grid-fluid.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,36 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 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 { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-example', | ||
templateUrl: './grid-fluid.html', | ||
styles: [ | ||
` | ||
ix-grid { | ||
margin-bottom: 1rem; | ||
} | ||
ix-col { | ||
background-color: var(--theme-color-primary); | ||
border: var(--theme-std-bdr-2); | ||
text-align: center; | ||
color: var(--theme-color-inv-contrast-text); | ||
} | ||
.example-parent { | ||
padding-top: 1rem; | ||
padding-bottom: 0.25rem; | ||
background-color: var(--theme-color-info-40); | ||
} | ||
`, | ||
], | ||
}) | ||
export default class GridFluid {} |
29 changes: 29 additions & 0 deletions
29
packages/angular-test-app/src/preview-examples/grid-size.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,29 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 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. | ||
--> | ||
<h4>Column 6 takes up more space to a max of 12 columns total</h4> | ||
<ix-grid> | ||
<ix-row> | ||
<ix-col>1</ix-col> | ||
<ix-col>2</ix-col> | ||
<ix-col>3</ix-col> | ||
<ix-col>4</ix-col> | ||
<ix-col>5</ix-col> | ||
<ix-col size="6">6</ix-col> | ||
</ix-row> | ||
</ix-grid> | ||
|
||
<h4>Stack columns on smaller screens</h4> | ||
<ix-grid> | ||
<ix-row> | ||
<ix-col size="12" size-md="3">1</ix-col> | ||
<ix-col size="12" size-md="3">2</ix-col> | ||
<ix-col size="12" size-md="3">3</ix-col> | ||
<ix-col size="12" size-md="3">4</ix-col> | ||
</ix-row> | ||
</ix-grid> |
30 changes: 30 additions & 0 deletions
30
packages/angular-test-app/src/preview-examples/grid-size.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,30 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 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 { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-example', | ||
templateUrl: './grid-size.html', | ||
styles: [ | ||
` | ||
ix-grid { | ||
margin-bottom: 1rem; | ||
} | ||
ix-col { | ||
background-color: var(--theme-color-primary); | ||
border: var(--theme-std-bdr-2); | ||
text-align: center; | ||
color: var(--theme-color-inv-contrast-text); | ||
} | ||
`, | ||
], | ||
}) | ||
export default class GridSize {} |
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,35 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 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. | ||
--> | ||
<ix-grid> | ||
<ix-row> | ||
<ix-col>1</ix-col> | ||
<ix-col>2</ix-col> | ||
<ix-col>3</ix-col> | ||
<ix-col>4</ix-col> | ||
<ix-col>5</ix-col> | ||
<ix-col>6</ix-col> | ||
</ix-row> | ||
</ix-grid> | ||
|
||
<ix-grid> | ||
<ix-row> | ||
<ix-col>1</ix-col> | ||
<ix-col>2</ix-col> | ||
<ix-col>3</ix-col> | ||
<ix-col>4</ix-col> | ||
<ix-col>5</ix-col> | ||
<ix-col>6</ix-col> | ||
<ix-col>7</ix-col> | ||
<ix-col>8</ix-col> | ||
<ix-col>9</ix-col> | ||
<ix-col>10</ix-col> | ||
<ix-col>11</ix-col> | ||
<ix-col>12</ix-col> | ||
</ix-row> | ||
</ix-grid> |
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,30 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 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 { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-example', | ||
templateUrl: './grid.html', | ||
styles: [ | ||
` | ||
ix-grid { | ||
margin-bottom: 1rem; | ||
} | ||
ix-col { | ||
background-color: var(--theme-color-primary); | ||
border: var(--theme-std-bdr-2); | ||
text-align: center; | ||
color: var(--theme-color-inv-contrast-text); | ||
} | ||
`, | ||
], | ||
}) | ||
export default class Grid {} |
Oops, something went wrong.