This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Showing
61 changed files
with
912 additions
and
1,059 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,5 @@ Temporary Items | |
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
|
||
output/* | ||
dist/* | ||
bin/* |
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 +1,2 @@ | ||
import './ms-calendar'; | ||
import './ms-calendar'; | ||
import './ms-calendar.scss'; |
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,18 +1,16 @@ | ||
<template> | ||
<div class="ane-calendar"> | ||
<table class="ane-calendar-year-view"> | ||
<tbody> | ||
<tr :for="(i, row) in @table"> | ||
<td class="ane-calendar-cell" | ||
:class="[ | ||
(@isSelected(cell) ? 'ane-calendar-selected-day' : ''), | ||
(@view > 1 && (i + j === 0 || i * j === 6) ? 'ane-calendar-prev-month-cell' : '') | ||
]" | ||
:for="(j, cell) in row"> | ||
<div class="ane-calendar-date" :click="@handleCellClick(cell)">{{cell.label}}</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</template> | ||
<div class="ane-calendar"> | ||
<table class="ane-calendar-year-view"> | ||
<tbody> | ||
<tr :for="(i, row) in @table"> | ||
<td class="ane-calendar-cell" | ||
:class="[ | ||
(@isSelected(cell) ? 'ane-calendar-selected-day' : ''), | ||
(@view > 1 && (i + j === 0 || i * j === 6) ? 'ane-calendar-prev-month-cell' : '') | ||
]" | ||
:for="(j, cell) in row"> | ||
<div class="ane-calendar-date" :click="@handleCellClick(cell)">{{cell.label}}</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</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
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,108 +1,24 @@ | ||
<template> | ||
<div class="ane-calendar"> | ||
<div class="row" ms-if="@showHeader"> | ||
<div class="col-md-2 col-md-offset-4"> | ||
<ms-select :widget="{value:[@currentYear],options:@currentYearOptions,onChange:@handleYearChange}"></ms-select> | ||
</div> | ||
<div class="col-md-2"> | ||
<ms-select :widget="{value:[@currentMonth],options:@monthOptions,onChange:@handleMonthChange}"></ms-select> | ||
</div> | ||
<div class="ane-calendar"> | ||
<div class="row" ms-if="@showHeader"> | ||
<div class="col-md-2 col-md-offset-4"> | ||
<ms-select :widget="{value:[@currentYear],options:@currentYearOptions,onChange:@handleYearChange}"></ms-select> | ||
</div> | ||
<div class="col-md-2"> | ||
<ms-select :widget="{value:[@currentMonth],options:@monthOptions,onChange:@handleMonthChange}"></ms-select> | ||
</div> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th class="ane-calendar-column-header" :for="day in @weekdays">{{day}}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr :for="week in @table"> | ||
<td class="ane-calendar-cell" :class="el.className" :for="el in week"> | ||
<div class="ane-calendar-date" :click="@handleDateClick(el) | stop">{{el.date}}</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</template> | ||
<style lang="scss"> | ||
@import '../../styles/index'; | ||
$calendar-prefix-cls: #{$ane-prefix}-calendar; | ||
|
||
.#{$calendar-prefix-cls} { | ||
table { | ||
width: 100%; | ||
max-width: 100%; | ||
} | ||
|
||
&-column-header { | ||
line-height: 18px; | ||
width: 33px; | ||
padding: 6px 0; | ||
text-align: center; | ||
} | ||
&-cell { | ||
padding: 4px 0; | ||
} | ||
&-prev-month-cell &-date, &-next-month-cell &-date { | ||
color: $calendar-disabled-date-color; | ||
} | ||
&-today &-date { | ||
border-color: $brand-primary; | ||
font-weight: 700; | ||
color: $brand-primary; | ||
} | ||
&-selected-day &-date { | ||
background: $brand-primary; | ||
color: #fff; | ||
border: 1px solid transparent; | ||
|
||
&:hover { | ||
background: $brand-primary; | ||
} | ||
} | ||
&-disabled-cell &-date { | ||
cursor: not-allowed; | ||
color: $calendar-disabled-date-color; | ||
background: $calendar-disabled-date-bg; | ||
border-radius: 0; | ||
width: auto; | ||
border: 1px solid transparent; | ||
|
||
&:hover { | ||
background: $calendar-disabled-date-bg; | ||
} | ||
} | ||
&-date { | ||
display: block; | ||
margin: 0 auto; | ||
color: $text-color; | ||
border-radius: 2px; | ||
width: 20px; | ||
height: 20px; | ||
line-height: 18px; | ||
border: 1px solid transparent; | ||
padding: 0; | ||
background: transparent; | ||
text-align: center; | ||
cursor: pointer; | ||
|
||
&:hover { | ||
background: $item-hover-bg; | ||
} | ||
} | ||
|
||
&-year-view { | ||
table-layout: fixed; | ||
text-align: center; | ||
} | ||
&-year-view &-cell { | ||
padding: 20px 0; | ||
} | ||
&-year-view &-date { | ||
width: auto; | ||
display: inline-block; | ||
padding: 0 6px; | ||
white-space: nowrap; | ||
} | ||
} | ||
</style> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th class="ane-calendar-column-header" :for="day in @weekdays">{{day}}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr :for="week in @table"> | ||
<td class="ane-calendar-cell" :class="el.className" :for="el in week"> | ||
<div class="ane-calendar-date" :click="@handleDateClick(el) | stop">{{el.date}}</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
@import '../../styles/index'; | ||
$calendar-prefix-cls: #{$ane-prefix}-calendar; | ||
|
||
.#{$calendar-prefix-cls} { | ||
table { | ||
width: 100%; | ||
max-width: 100%; | ||
} | ||
|
||
&-column-header { | ||
line-height: 18px; | ||
width: 33px; | ||
padding: 6px 0; | ||
text-align: center; | ||
} | ||
&-cell { | ||
padding: 4px 0; | ||
} | ||
&-prev-month-cell &-date, &-next-month-cell &-date { | ||
color: $calendar-disabled-date-color; | ||
} | ||
&-today &-date { | ||
border-color: $brand-primary; | ||
font-weight: 700; | ||
color: $brand-primary; | ||
} | ||
&-selected-day &-date { | ||
background: $brand-primary; | ||
color: #fff; | ||
border: 1px solid transparent; | ||
|
||
&:hover { | ||
background: $brand-primary; | ||
} | ||
} | ||
&-disabled-cell &-date { | ||
cursor: not-allowed; | ||
color: $calendar-disabled-date-color; | ||
background: $calendar-disabled-date-bg; | ||
border-radius: 0; | ||
width: auto; | ||
border: 1px solid transparent; | ||
|
||
&:hover { | ||
background: $calendar-disabled-date-bg; | ||
} | ||
} | ||
&-date { | ||
display: block; | ||
margin: 0 auto; | ||
color: $text-color; | ||
border-radius: 2px; | ||
width: 20px; | ||
height: 20px; | ||
line-height: 18px; | ||
border: 1px solid transparent; | ||
padding: 0; | ||
background: transparent; | ||
text-align: center; | ||
cursor: pointer; | ||
|
||
&:hover { | ||
background: $item-hover-bg; | ||
} | ||
} | ||
|
||
&-year-view { | ||
table-layout: fixed; | ||
text-align: center; | ||
} | ||
&-year-view &-cell { | ||
padding: 20px 0; | ||
} | ||
&-year-view &-date { | ||
width: auto; | ||
display: inline-block; | ||
padding: 0 6px; | ||
white-space: nowrap; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
import './ms-checkbox'; | ||
import './ms-checkbox-group'; | ||
import './ms-checkbox-group'; | ||
import './ms-checkbox.scss'; |
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.