-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TabPanel: Update Overview demo with tabsPosition, stylingMode and ico…
…nPosition
- Loading branch information
1 parent
c6fb72a
commit a7aec8c
Showing
42 changed files
with
3,087 additions
and
940 deletions.
There are no files selected for viewing
121 changes: 95 additions & 26 deletions
121
JSDemos/Demos/TabPanel/Overview/Angular/app/app.component.css
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 |
---|---|---|
@@ -1,45 +1,114 @@ | ||
::ng-deep .tabpanel-item { | ||
height: 200px; | ||
-webkit-touch-callout: none; | ||
-webkit-user-select: none; | ||
-khtml-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none; | ||
user-select: none; | ||
padding-left: 25px; | ||
padding-top: 55px; | ||
::ng-deep .tabpanel-demo { | ||
display: flex; | ||
height: 100%; | ||
min-height: 450px; | ||
} | ||
|
||
::ng-deep .mobile .tabpanel-item { | ||
padding-top: 10px; | ||
::ng-deep .widget-container { | ||
display: inline; | ||
flex-grow: 1; | ||
min-width: 450px; | ||
padding: 16px 32px; | ||
} | ||
|
||
::ng-deep .tabpanel-item > div { | ||
float: left; | ||
padding: 0 85px 10px 10px; | ||
::ng-deep .dx-theme-material .dx-tabpanel { | ||
border-radius: 8px; | ||
overflow: clip; | ||
} | ||
|
||
::ng-deep .tabpanel-item p { | ||
font-size: 16px; | ||
margin: 0; | ||
} | ||
|
||
::ng-deep .item-box { | ||
font-size: 16px; | ||
margin: 15px 0 45px 10px; | ||
::ng-deep .dx-tabs-vertical { | ||
min-width: 120px; | ||
} | ||
|
||
::ng-deep .options { | ||
display: inline-flex; | ||
flex-direction: column; | ||
flex-shrink: 0; | ||
box-sizing: border-box; | ||
width: 300px; | ||
padding: 20px; | ||
background-color: rgba(191, 191, 191, 0.15); | ||
margin-top: 20px; | ||
} | ||
|
||
::ng-deep .tabpanel-item { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 12px; | ||
padding: 24px; | ||
} | ||
|
||
::ng-deep .caption { | ||
font-size: 18px; | ||
font-weight: 500; | ||
font-size: 18px; | ||
} | ||
|
||
::ng-deep .option { | ||
margin-top: 10px; | ||
margin-top: 20px; | ||
} | ||
|
||
::ng-deep .task-item { | ||
position: relative; | ||
display: flex; | ||
justify-content: space-between; | ||
width: 100%; | ||
height: 48px; | ||
padding: 8px; | ||
border-radius: 4px; | ||
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.15); | ||
} | ||
|
||
::ng-deep .task-item::before { | ||
content: ''; | ||
position: absolute; | ||
top: 8px; | ||
left: 6px; | ||
bottom: 8px; | ||
width: 3px; | ||
border-radius: 4px; | ||
} | ||
|
||
::ng-deep .task-item-priority-high::before { | ||
background-color: #e1bee7; | ||
} | ||
|
||
::ng-deep .task-item-priority-medium::before { | ||
background-color: #ffe0b2; | ||
} | ||
|
||
::ng-deep .task-item-priority-low::before { | ||
background-color: #c8e6c9; | ||
} | ||
|
||
::ng-deep .task-item-text, | ||
::ng-deep .task-item-info { | ||
display: inline-flex; | ||
align-items: center; | ||
height: 100%; | ||
padding: 0 16px; | ||
margin: 0; | ||
} | ||
|
||
::ng-deep .task-item-info { | ||
width: 240px; | ||
min-width: 240px; | ||
font-size: 12px; | ||
opacity: 0.38; | ||
} | ||
|
||
::ng-deep .task-item-pseudo-button { | ||
position: absolute; | ||
right: 8px; | ||
top: 50%; | ||
font-size: 18px; | ||
transform: translateY(-50%); | ||
cursor: pointer; | ||
opacity: 0.6; | ||
} | ||
|
||
::ng-deep .dx-theme-material .widget-container { | ||
background-color: rgba(191, 191, 191, 0.15); | ||
} | ||
|
||
::ng-deep .dx-color-scheme-contrast .task-item { | ||
border: 1px solid #fff; | ||
} |
134 changes: 74 additions & 60 deletions
134
JSDemos/Demos/TabPanel/Overview/Angular/app/app.component.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 |
---|---|---|
@@ -1,64 +1,78 @@ | ||
<dx-tab-panel | ||
#tabPanel | ||
[height]="260" | ||
[dataSource]="companies" | ||
[selectedIndex]="0" | ||
[loop]="false" | ||
[animationEnabled]="true" | ||
[swipeEnabled]="true" | ||
> | ||
<div *dxTemplate="let company of 'title'"> | ||
<span>{{ company.CompanyName }}</span> | ||
</div> | ||
<div *dxTemplate="let company of 'item'"> | ||
<div class="tabpanel-item"> | ||
<div> | ||
<p> | ||
<b>{{ company.City }}</b> | ||
(<span>{{ company.State }}</span | ||
>) | ||
</p> | ||
<p> | ||
<span>{{ company.Zipcode }}</span> | ||
<span>{{ company.Address }}</span> | ||
</p> | ||
</div> | ||
<div> | ||
<p> | ||
Phone: <b>{{ company.Phone }}</b> | ||
</p> | ||
<p> | ||
Fax: <b>{{ company.Fax }}</b> | ||
</p> | ||
<p> | ||
Website: | ||
<a href="{{ company.Website }}" target="_blank"> | ||
{{ company.Website }} | ||
</a> | ||
</p> | ||
<div class="tabpanel-demo"> | ||
<div class="widget-container"> | ||
<dx-tab-panel | ||
class="dx-theme-background-color" | ||
width="100%" | ||
[height]="418" | ||
[animationEnabled]="true" | ||
[swipeEnabled]="true" | ||
[dataSource]="dataSource" | ||
[selectedIndex]="selectedIndex" | ||
[tabsPosition]="tabsPosition" | ||
[stylingMode]="stylingMode" | ||
[iconPosition]="iconPosition" | ||
[showNavButtons]="showNavButtons" | ||
> | ||
<div *dxTemplate="let tabPanelItem of 'item'"> | ||
<div class="tabpanel-item"> | ||
<div | ||
*ngFor="let task of tabPanelItem.tasks" | ||
[className]="getTaskClassName(task.priority)" | ||
> | ||
<p class="task-item-text"> | ||
{{ task.text }} | ||
</p> | ||
|
||
<p class="task-item-info"> | ||
{{ task.date }} by {{ task.assignedBy }} | ||
</p> | ||
|
||
<i class="task-item-pseudo-button dx-icon dx-icon-overflow"></i> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</dx-tab-panel> | ||
<div class="item-box"> | ||
Item <span>{{ tabPanel.selectedIndex + 1 }}</span> of | ||
<span>{{ itemCount }}</span> | ||
</div> | ||
<div class="options"> | ||
<div class="caption">Options</div> | ||
<div class="option"> | ||
<dx-check-box text="Loop enabled" [(value)]="tabPanel.loop"></dx-check-box> | ||
</dx-tab-panel> | ||
</div> | ||
<div class="option"> | ||
<dx-check-box | ||
text="Animation enabled" | ||
[(value)]="tabPanel.animationEnabled" | ||
></dx-check-box> | ||
</div> | ||
<div class="option"> | ||
<dx-check-box | ||
text="Swipe enabled" | ||
[(value)]="tabPanel.swipeEnabled" | ||
></dx-check-box> | ||
|
||
<div class="options"> | ||
<div class="caption">Options</div> | ||
|
||
<div class="option"> | ||
<div class="option-label">Tabs position</div> | ||
|
||
<dx-select-box | ||
[inputAttr]="{ 'aria-label': 'Tabs positions' }" | ||
[items]="tabsPositions" | ||
[(value)]="tabsPosition" | ||
></dx-select-box> | ||
</div> | ||
|
||
<div class="option"> | ||
<div class="option-label">Styling mode</div> | ||
|
||
<dx-select-box | ||
[inputAttr]="{ 'aria-label': 'Styling mode' }" | ||
[items]="stylingModes" | ||
[(value)]="stylingMode" | ||
></dx-select-box> | ||
</div> | ||
|
||
<div class="option"> | ||
<div class="option-label">Icon position</div> | ||
|
||
<dx-select-box | ||
[inputAttr]="{ 'aria-label': 'Icon positions' }" | ||
[items]="iconPositions" | ||
[(value)]="iconPosition" | ||
></dx-select-box> | ||
</div> | ||
|
||
<div class="option"> | ||
<dx-check-box | ||
text="Show navigation buttons" | ||
[elementAttr]="{ 'aria-label': 'Show navigation buttons' }" | ||
[(value)]="showNavButtons" | ||
></dx-check-box> | ||
</div> | ||
</div> | ||
</div> |
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
Oops, something went wrong.