Blame view

src/styles/components/date-picker.less 8.03 KB
50637863   梁灏   update DatePicker
1
  @date-picker-prefix-cls: ~"@{css-prefix}date-picker";
c46f385a   梁灏   update DatePicker
2
  @picker-prefix-cls: ~"@{css-prefix}picker";
50637863   梁灏   update DatePicker
3
  
3cf7cfd1   梁灏   update DatePicker
4
  @date-picker-cells-width: 196px;
e55ba7a2   Sergio Crisostomo   Add week numbers
5
  @date-picker-cells-width-with-weeknumbers: 226px;
3cf7cfd1   梁灏   update DatePicker
6
  
50637863   梁灏   update DatePicker
7
  .@{date-picker-prefix-cls} {
b89a982e   梁灏   fixed #205
8
      //position: relative;
f7a436c0   Aresn   update Date style
9
      display: inline-block;
ba3e34e0   梁灏   update some styles
10
      line-height: normal;
b89a982e   梁灏   fixed #205
11
12
13
      &-rel{
          position: relative;
      }
50637863   梁灏   update DatePicker
14
15
      .@{select-dropdown-prefix-cls} {
          width: auto;
c46f385a   梁灏   update DatePicker
16
          padding: 0;
50637863   梁灏   update DatePicker
17
18
19
20
          overflow: visible;
          max-height: none;
      }
      &-cells{
3cf7cfd1   梁灏   update DatePicker
21
          width: @date-picker-cells-width;
50637863   梁灏   update DatePicker
22
          margin: 10px;
891f61d8   梁灏   fixed #577
23
          white-space: normal;
50637863   梁灏   update DatePicker
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
          span{
              display: inline-block;
              width: 24px;
              height: 24px;
  
              em{
                  display: inline-block;
                  width: 24px;
                  height: 24px;
                  line-height: 24px;
                  margin: 2px;
                  font-style: normal;
                  border-radius: @btn-border-radius-small;
                  text-align: center;
                  transition: all @transition-time @ease-in-out;
              }
          }
          &-header span{
              line-height: 24px;
              text-align: center;
              margin: 2px;
              color: @btn-disable-color;
          }
cdc79b9a   Aresn   Update date-picke...
47
          &-cell:hover{
75cb2998   Sergio Crisostomo   Add keyboard navi...
48
              em{
cdc79b9a   Aresn   Update date-picke...
49
                  background: @date-picker-cell-hover-bg;
75cb2998   Sergio Crisostomo   Add keyboard navi...
50
51
              }
          }
cdc79b9a   Aresn   Update date-picke...
52
53
54
55
56
57
          &-focused{
              em{
                  box-shadow: 0 0 0 1px @primary-color inset;
              }
          }
          
50637863   梁灏   update DatePicker
58
59
60
61
62
63
          &-cell{
              span&{
                  width: 28px;
                  height: 28px;
                  cursor: pointer;
              }
50637863   梁灏   update DatePicker
64
65
66
67
68
69
70
71
72
73
              &-prev-month,&-next-month{
                  em{
                      color: @btn-disable-color;
                  }
                  &:hover{
                      em{
                          background: transparent;
                      }
                  }
              }
e55ba7a2   Sergio Crisostomo   Add week numbers
74
              span&-week-label,span&-week-label:hover,span&-disabled,span&-disabled:hover{
50637863   梁灏   update DatePicker
75
                  cursor: @cursor-disabled;
50637863   梁灏   update DatePicker
76
77
78
79
80
81
                  color: @btn-disable-color;
                  em{
                      color: inherit;
                      background: inherit;
                  }
              }
e55ba7a2   Sergio Crisostomo   Add week numbers
82
83
84
              span&-disabled,span&-disabled:hover{
                  background: @btn-disable-bg;
              }
50637863   梁灏   update DatePicker
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
              &-today{
                  em {
                      position: relative;
                      &:after{
                          content: '';
                          display: block;
                          width: 6px;
                          height: 6px;
                          border-radius: 50%;
                          background: @primary-color;
                          position: absolute;
                          top: 1px;
                          right: 1px;
                      }
                  }
              }
3cf7cfd1   梁灏   update DatePicker
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
              &-range{
                  position: relative;
                  em{
                      position: relative;
                      z-index: 1;
                  }
                  &:before{
                      content: '';
                      display: block;
                      background: @date-picker-cell-hover-bg;
                      border-radius: 0;
                      border: 0;
                      position: absolute;
                      top: 2px;
                      bottom: 2px;
                      left: 0;
                      right: 0;
                  }
              }
              &-selected,&-selected:hover
              {
50637863   梁灏   update DatePicker
122
123
124
125
126
127
128
129
130
131
132
                  em{
                      background: @primary-color;
                      color: #fff;
                  }
              }
              span&-disabled&-selected{
                  em {
                      background: @btn-disable-color;
                      color: @btn-disable-bg;
                  }
              }
3cf7cfd1   梁灏   update DatePicker
133
134
              &-today&-selected
              {
50637863   梁灏   update DatePicker
135
136
137
138
139
140
141
142
                  em{
                      &:after{
                          background: #fff;
                      }
                  }
              }
          }
      }
c46f385a   梁灏   update DatePicker
143
  
e55ba7a2   Sergio Crisostomo   Add week numbers
144
145
146
147
      &-cells-show-week-numbers {
          width: @date-picker-cells-width-with-weeknumbers;
      }
  
c46f385a   梁灏   update DatePicker
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
      &-cells-year,&-cells-month{
          margin-top: 14px;
          span{
              width: 40px;
              height: 28px;
              line-height: 28px;
              margin: 10px 12px;
              border-radius: @btn-border-radius-small;
              em{
                  width: 40px;
                  height: 28px;
                  line-height: 28px;
                  margin: 0;
              }
          }
75cb2998   Sergio Crisostomo   Add keyboard navi...
163
164
165
166
167
  
          .@{date-picker-prefix-cls}-cells-cell-focused{
              background-color: tint(@primary-color, 80%);
          }
  
c46f385a   梁灏   update DatePicker
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
      }
  
      &-header{
          height: 32px;
          line-height: 32px;
          text-align: center;
          border-bottom: 1px solid @border-color-split;
          &-label{
              cursor: pointer;
              transition: color @transition-time @ease-in-out;
              &:hover{
                  color: @primary-color;
              }
          }
      }
75cb2998   Sergio Crisostomo   Add keyboard navi...
183
184
185
186
187
      &-btn-pulse{
          background-color: tint(@primary-color, 80%) !important;
          border-radius: @border-radius-small;
          transition: background-color @transition-time @ease-in-out;
      }
c46f385a   梁灏   update DatePicker
188
189
190
191
192
      &-prev-btn{
          float: left;
          &-arrow-double{
              margin-left: 10px;
              i:after{
ca69e094   梁灏   update icons
193
                  content: "\F115";
c46f385a   梁灏   update DatePicker
194
195
196
197
198
199
200
201
              }
          }
      }
      &-next-btn{
          float: right;
          &-arrow-double{
              margin-right: 10px;
              i:after{
ca69e094   梁灏   update icons
202
                  content: "\F11F";
c46f385a   梁灏   update DatePicker
203
204
205
              }
          }
      }
3cf7cfd1   梁灏   update DatePicker
206
207
208
209
210
211
212
213
214
215
  
      &-with-range{
          .@{picker-prefix-cls}-panel{
              &-body{
                  min-width: (@date-picker-cells-width + 20) * 2;
              }
              &-content{
                  float: left;
              }
          }
e55ba7a2   Sergio Crisostomo   Add week numbers
216
217
218
219
          .@{picker-prefix-cls}-cells-show-week-numbers {
              min-width: (@date-picker-cells-width-with-weeknumbers + 20) * 2;
          }
  
3cf7cfd1   梁灏   update DatePicker
220
      }
e55ba7a2   Sergio Crisostomo   Add week numbers
221
  
f8bba1ac   梁灏   fixed DatePicker ...
222
223
      &-with-week-numbers{
          .@{picker-prefix-cls}-panel{
e56c394d   Sergio Crisostomo   Correct time layo...
224
              &-body-date {
f8bba1ac   梁灏   fixed DatePicker ...
225
226
227
228
229
                  min-width: (@date-picker-cells-width-with-weeknumbers + 20) * 2;
              }
          }
      }
  
ecaf8d51   梁灏   Date add transfer...
230
231
232
      &-transfer{
          z-index: @zindex-transfer;
          max-height: none;
a36ef0f2   梁灏   fixed #2050
233
          width: auto;
ecaf8d51   梁灏   Date add transfer...
234
      }
75cb2998   Sergio Crisostomo   Add keyboard navi...
235
236
237
238
  
      &-focused input{
          .active();
      }
c46f385a   梁灏   update DatePicker
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
  }
  
  .@{picker-prefix-cls} {
      &-panel{
          &-icon-btn{
              display: inline-block;
              width: 20px;
              height: 24px;
              line-height: 26px;
              margin-top: 4px;
              text-align: center;
              cursor: pointer;
              color: @btn-disable-color;
              transition: color @transition-time @ease-in-out;
              &:hover{
                  color: @primary-color;
              }
              i{
                  font-size: 14px;
              }
          }
2533a192   梁灏   update DatePicker
260
261
262
263
264
265
266
267
268
269
270
  
          &-body-wrapper&-with-sidebar{
              padding-left: 92px;
          }
          &-sidebar{
              width: 92px;
              float: left;
              margin-left: -92px;
              position: absolute;
              top: 0;
              bottom: 0;
e55f00ff   梁灏   update DatePicker
271
272
              background: @table-thead-bg;
              border-right: 1px solid @border-color-split;
2533a192   梁灏   update DatePicker
273
              border-radius: @border-radius-small 0 0 @border-radius-small;
e55f00ff   梁灏   update DatePicker
274
              overflow: auto;
2533a192   梁灏   update DatePicker
275
276
          }
          &-shortcut{
e55f00ff   梁灏   update DatePicker
277
278
279
              padding: @btn-padding-large;
              transition: all @transition-time @ease-in-out;
              cursor: pointer;
6e572d44   梁灏   fixed #133
280
281
282
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
2533a192   梁灏   update DatePicker
283
  
e55f00ff   梁灏   update DatePicker
284
285
286
              &:hover{
                  background: @border-color-split;
              }
2533a192   梁灏   update DatePicker
287
288
289
290
          }
          &-body{
              float: left;
          }
c46f385a   梁灏   update DatePicker
291
      }
b9041a0d   梁灏   DatePicker add co...
292
293
294
295
296
297
  
      &-confirm{
          border-top: 1px solid @border-color-split;
          text-align: right;
          padding: 8px;
          clear: both;
5cc9b892   梁灏   update DateTimePi...
298
299
300
301
302
303
304
305
306
307
308
309
310
311
          & > span{
              color: @link-color;
              cursor: pointer;
              user-select: none;
              float: left;
              padding: 2px 0;
              transition: all @transition-time @ease-in-out;
              &:hover{
                  color: @link-hover-color;
              }
              &:active{
                  color: @link-active-color;
              }
          }
75cb2998   Sergio Crisostomo   Add keyboard navi...
312
313
314
  
          &-time{
              float: left;
2dc27713   梁灏   update DateTimePi...
315
          }
b9041a0d   梁灏   DatePicker add co...
316
      }
e56c394d   Sergio Crisostomo   Correct time layo...
317
  }