@wangxinowo/vue-datepicker-next 1.0.3 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,510 +1,9 @@
1
1
  /* stylelint-disable at-rule-no-unknown */
2
2
 
3
- // Reboot
4
- //
5
- // Normalization of HTML elements, manually forked from Normalize.css to remove
6
- // styles targeting irrelevant browsers while applying new styles.
7
- //
8
- // Normalize is licensed MIT. https://github.com/necolas/normalize.css
3
+ // 组件内部样式 - 不污染全局样式
4
+ // 所有样式都使用 ant- 前缀命名空间
9
5
 
10
- // HTML & Body reset
11
- @{html-selector},
12
- body {
13
- .square(100%);
14
- }
15
-
16
- // remove the clear button of a text input control in IE10+
17
- input::-ms-clear,
18
- input::-ms-reveal {
19
- display: none;
20
- }
21
-
22
- // Document
23
- //
24
- // 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
25
- // 2. Change the default font family in all browsers.
26
- // 3. Correct the line height in all browsers.
27
- // 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
28
- // 5. Setting @viewport causes scrollbars to overlap content in IE11 and Edge, so
29
- // we force a non-overlapping, non-auto-hiding scrollbar to counteract.
30
- // 6. Change the default tap highlight to be completely transparent in iOS.
31
-
32
- *,
33
- *::before,
34
- *::after {
35
- box-sizing: border-box; // 1
36
- }
37
-
38
- @{html-selector} {
39
- font-family: sans-serif; // 2
40
- line-height: 1.15; // 3
41
- -webkit-text-size-adjust: 100%; // 4
42
- -ms-text-size-adjust: 100%; // 4
43
- -ms-overflow-style: scrollbar; // 5
44
- -webkit-tap-highlight-color: fade(@black, 0%); // 6
45
- }
46
-
47
- // IE10+ doesn't honor `<meta name="viewport">` in some cases.
48
- @-ms-viewport {
49
- width: device-width;
50
- }
51
-
52
- // Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
53
- article,
54
- aside,
55
- dialog,
56
- figcaption,
57
- figure,
58
- footer,
59
- header,
60
- hgroup,
61
- main,
62
- nav,
63
- section {
64
- display: block;
65
- }
66
-
67
- // Body
68
- //
69
- // 1. remove the margin in all browsers.
70
- // 2. As a best practice, apply a default `body-background`.
71
-
72
- body {
73
- margin: 0; // 1
74
- color: @text-color;
75
- font-size: @font-size-base;
76
- font-family: @font-family;
77
- font-variant: @font-variant-base;
78
- line-height: @line-height-base;
79
- background-color: @body-background; // 2
80
- font-feature-settings: @font-feature-settings-base;
81
- }
82
-
83
- // Suppress the focus outline on elements that cannot be accessed via keyboard.
84
- // This prevents an unwanted focus outline from appearing around elements that
85
- // might still respond to pointer events.
86
- //
87
- // Credit: https://github.com/suitcss/base
88
- [tabindex='-1']:focus {
89
- outline: none !important;
90
- }
91
-
92
- // Content grouping
93
- //
94
- // 1. Add the correct box sizing in Firefox.
95
- // 2. Show the overflow in Edge and IE.
96
-
97
- hr {
98
- box-sizing: content-box; // 1
99
- height: 0; // 1
100
- overflow: visible; // 2
101
- }
102
-
103
- //
104
- // Typography
105
- //
106
-
107
- // remove top margins from headings
108
- //
109
- // By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
110
- // margin for easier control within type scales as it avoids margin collapsing.
111
- h1,
112
- h2,
113
- h3,
114
- h4,
115
- h5,
116
- h6 {
117
- margin-top: 0;
118
- margin-bottom: 0.5em;
119
- color: @heading-color;
120
- font-weight: 500;
121
- }
122
-
123
- // Reset margins on paragraphs
124
- //
125
- // Similarly, the top margin on `<p>`s get reset. However, we also reset the
126
- // bottom margin to use `em` units instead of `em`.
127
- p {
128
- margin-top: 0;
129
- margin-bottom: 1em;
130
- }
131
-
132
- // Abbreviations
133
- //
134
- // 1. remove the bottom border in Firefox 39-.
135
- // 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
136
- // 3. Add explicit cursor to indicate changed behavior.
137
- // 4. Duplicate behavior to the data-* attribute for our tooltip plugin
138
-
139
- abbr[title],
140
- abbr[data-original-title] {
141
- // 4
142
- text-decoration: underline; // 2
143
- text-decoration: underline dotted; // 2
144
- border-bottom: 0; // 1
145
- cursor: help; // 3
146
- }
147
-
148
- address {
149
- margin-bottom: 1em;
150
- font-style: normal;
151
- line-height: inherit;
152
- }
153
-
154
- input[type='text'],
155
- input[type='password'],
156
- input[type='number'],
157
- textarea {
158
- -webkit-appearance: none;
159
- }
160
-
161
- ol,
162
- ul,
163
- dl {
164
- margin-top: 0;
165
- margin-bottom: 1em;
166
- }
167
-
168
- ol ol,
169
- ul ul,
170
- ol ul,
171
- ul ol {
172
- margin-bottom: 0;
173
- }
174
-
175
- dt {
176
- font-weight: 500;
177
- }
178
-
179
- dd {
180
- margin-bottom: 0.5em;
181
- margin-left: 0; // Undo browser default
182
- }
183
-
184
- blockquote {
185
- margin: 0 0 1em;
186
- }
187
-
188
- dfn {
189
- font-style: italic; // Add the correct font style in Android 4.3-
190
- }
191
-
192
- b,
193
- strong {
194
- font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari
195
- }
196
-
197
- small {
198
- font-size: 80%; // Add the correct font size in all browsers
199
- }
200
-
201
- //
202
- // Prevent `sub` and `sup` elements from affecting the line height in
203
- // all browsers.
204
- //
205
-
206
- sub,
207
- sup {
208
- position: relative;
209
- font-size: 75%;
210
- line-height: 0;
211
- vertical-align: baseline;
212
- }
213
-
214
- sub {
215
- bottom: -0.25em;
216
- }
217
- sup {
218
- top: -0.5em;
219
- }
220
-
221
- //
222
- // Links
223
- //
224
-
225
- a {
226
- color: @link-color;
227
- text-decoration: @link-decoration;
228
- background-color: transparent; // remove the gray background on active links in IE 10.
229
- outline: none;
230
- cursor: pointer;
231
- transition: color 0.3s;
232
- -webkit-text-decoration-skip: objects; // remove gaps in links underline in iOS 8+ and Safari 8+.
233
-
234
- &:hover {
235
- color: @link-hover-color;
236
- }
237
-
238
- &:active {
239
- color: @link-active-color;
240
- }
241
-
242
- &:active,
243
- &:hover {
244
- text-decoration: @link-hover-decoration;
245
- outline: 0;
246
- }
247
-
248
- &[disabled] {
249
- color: @disabled-color;
250
- cursor: not-allowed;
251
- pointer-events: none;
252
- }
253
- }
254
-
255
- //
256
- // Code
257
- //
258
-
259
- pre,
260
- code,
261
- kbd,
262
- samp {
263
- font-size: 1em; // Correct the odd `em` font sizing in all browsers.
264
- font-family: @code-family;
265
- }
266
-
267
- pre {
268
- // remove browser default top margin
269
- margin-top: 0;
270
- // Reset browser default of `1em` to use `em`s
271
- margin-bottom: 1em;
272
- // Don't allow content to break outside
273
- overflow: auto;
274
- }
275
-
276
- //
277
- // Figures
278
- //
279
- figure {
280
- // Apply a consistent margin strategy (matches our type styles).
281
- margin: 0 0 1em;
282
- }
283
-
284
- //
285
- // Images and content
286
- //
287
-
288
- img {
289
- vertical-align: middle;
290
- border-style: none; // remove the border on images inside links in IE 10-.
291
- }
292
-
293
- svg:not(:root) {
294
- overflow: hidden; // Hide the overflow in IE
295
- }
296
-
297
- // Avoid 300ms click delay on touch devices that support the `touch-action` CSS property.
298
- //
299
- // In particular, unlike most other browsers, IE11+Edge on Windows 10 on touch devices and IE Mobile 10-11
300
- // DON'T remove the click delay when `<meta name="viewport" content="width=device-width">` is present.
301
- // However, they DO support emoving the click delay via `touch-action: manipulation`.
302
- // See:
303
- // * https://getbootstrap.com/docs/4.0/content/reboot/#click-delay-optimization-for-touch
304
- // * http://caniuse.com/#feat=css-touch-action
305
- // * https://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay
306
-
307
- a,
308
- area,
309
- button,
310
- [role='button'],
311
- input:not([type='range']),
312
- label,
313
- select,
314
- summary,
315
- textarea {
316
- touch-action: manipulation;
317
- }
318
-
319
- //
320
- // Tables
321
- //
322
-
323
- table {
324
- border-collapse: collapse; // Prevent double borders
325
- }
326
-
327
- caption {
328
- padding-top: 0.75em;
329
- padding-bottom: 0.3em;
330
- color: @text-color-secondary;
331
- text-align: left;
332
- caption-side: bottom;
333
- }
334
-
335
- th {
336
- // Matches default `<td>` alignment by inheriting from the `<body>`, or the
337
- // closest parent with a set `text-align`.
338
- text-align: inherit;
339
- }
340
-
341
- //
342
- // Forms
343
- //
344
-
345
- input,
346
- button,
347
- select,
348
- optgroup,
349
- textarea {
350
- margin: 0; // remove the margin in Firefox and Safari
351
- color: inherit;
352
- font-size: inherit;
353
- font-family: inherit;
354
- line-height: inherit;
355
- }
356
-
357
- button,
358
- input {
359
- overflow: visible; // Show the overflow in Edge
360
- }
361
-
362
- button,
363
- select {
364
- text-transform: none; // remove the inheritance of text transform in Firefox
365
- }
366
-
367
- // 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
368
- // controls in Android 4.
369
- // 2. Correct the inability to style clickable types in iOS and Safari.
370
- button,
371
- @{html-selector} [type="button"], /* 1 */
372
- [type="reset"],
373
- [type="submit"] {
374
- -webkit-appearance: button; // 2
375
- }
376
-
377
- // remove inner border and padding from Firefox, but don't restore the outline like Normalize.
378
- button::-moz-focus-inner,
379
- [type='button']::-moz-focus-inner,
380
- [type='reset']::-moz-focus-inner,
381
- [type='submit']::-moz-focus-inner {
382
- padding: 0;
383
- border-style: none;
384
- }
385
-
386
- input[type='radio'],
387
- input[type='checkbox'] {
388
- box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
389
- padding: 0; // 2. remove the padding in IE 10-
390
- }
391
-
392
- input[type='date'],
393
- input[type='time'],
394
- input[type='datetime-local'],
395
- input[type='month'] {
396
- // remove the default appearance of temporal inputs to avoid a Mobile Safari
397
- // bug where setting a custom line-height prevents text from being vertically
398
- // centered within the input.
399
- // See https://bugs.webkit.org/show_bug.cgi?id=139848
400
- // and https://github.com/twbs/bootstrap/issues/11266
401
- -webkit-appearance: listbox;
402
- }
403
-
404
- textarea {
405
- overflow: auto; // remove the default vertical scrollbar in IE.
406
- // Textareas should really only resize vertically so they don't break their (horizontal) containers.
407
- resize: vertical;
408
- }
409
-
410
- fieldset {
411
- // Browsers set a default `min-width: min-content;` on fieldsets,
412
- // unlike e.g. `<div>`s, which have `min-width: 0;` by default.
413
- // So we reset that to ensure fieldsets behave more like a standard block element.
414
- // See https://github.com/twbs/bootstrap/issues/12359
415
- // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
416
- min-width: 0;
417
- margin: 0;
418
- // Reset the default outline behavior of fieldsets so they don't affect page layout.
419
- padding: 0;
420
- border: 0;
421
- }
422
-
423
- // 1. Correct the text wrapping in Edge and IE.
424
- // 2. Correct the color inheritance from `fieldset` elements in IE.
425
- legend {
426
- display: block;
427
- width: 100%;
428
- max-width: 100%; // 1
429
- margin-bottom: 0.5em;
430
- padding: 0;
431
- color: inherit; // 2
432
- font-size: 1.5em;
433
- line-height: inherit;
434
- white-space: normal; // 1
435
- }
436
-
437
- progress {
438
- vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
439
- }
440
-
441
- // Correct the cursor style of incement and decement buttons in Chrome.
442
- [type='number']::-webkit-inner-spin-button,
443
- [type='number']::-webkit-outer-spin-button {
444
- height: auto;
445
- }
446
-
447
- [type='search'] {
448
- // This overrides the extra rounded corners on search inputs in iOS so that our
449
- // `.form-control` class can properly style them. Note that this cannot simply
450
- // be added to `.form-control` as it's not specific enough. For details, see
451
- // https://github.com/twbs/bootstrap/issues/11586.
452
- outline-offset: -2px; // 2. Correct the outline style in Safari.
453
- -webkit-appearance: none;
454
- }
455
-
456
- //
457
- // remove the inner padding and cancel buttons in Chrome and Safari on macOS.
458
- //
459
-
460
- [type='search']::-webkit-search-cancel-button,
461
- [type='search']::-webkit-search-decoration {
462
- -webkit-appearance: none;
463
- }
464
-
465
- //
466
- // 1. Correct the inability to style clickable types in iOS and Safari.
467
- // 2. Change font properties to `inherit` in Safari.
468
- //
469
-
470
- ::-webkit-file-upload-button {
471
- font: inherit; // 2
472
- -webkit-appearance: button; // 1
473
- }
474
-
475
- //
476
- // Correct element displays
477
- //
478
-
479
- output {
480
- display: inline-block;
481
- }
482
-
483
- summary {
484
- display: list-item; // Add the correct display in all browsers
485
- }
486
-
487
- template {
488
- display: none; // Add the correct display in IE
489
- }
490
-
491
- // Always hide an element with the `hidden` HTML attribute (from PureCSS).
492
- // Needed for proper display in IE 10-.
493
- [hidden] {
494
- display: none !important;
495
- }
496
-
497
- mark {
498
- padding: 0.2em;
499
- background-color: @yellow-1;
500
- }
501
-
502
- ::selection {
503
- color: @text-color-inverse;
504
- background: @text-selection-bg;
505
- }
506
-
507
- // Utility classes
508
- .clearfix {
6
+ // 工具类 - 使用 ant- 前缀
7
+ .ant-clearfix {
509
8
  .clearfix();
510
9
  }
@@ -1,11 +1,12 @@
1
+ // 使用 ant- 前缀避免全局样式污染
1
2
  .fade-motion(@className, @keyframeName) {
2
3
  .make-motion(@className, @keyframeName);
3
- .@{className}-enter,
4
- .@{className}-appear {
4
+ .ant-@{className}-enter,
5
+ .ant-@{className}-appear {
5
6
  opacity: 0;
6
7
  animation-timing-function: linear;
7
8
  }
8
- .@{className}-leave {
9
+ .ant-@{className}-leave {
9
10
  animation-timing-function: linear;
10
11
  }
11
12
  }
@@ -1,11 +1,12 @@
1
+ // 使用 ant- 前缀避免全局样式污染
1
2
  .move-motion(@className, @keyframeName) {
2
3
  .make-motion(@className, @keyframeName);
3
- .@{className}-enter,
4
- .@{className}-appear {
4
+ .ant-@{className}-enter,
5
+ .ant-@{className}-appear {
5
6
  opacity: 0;
6
7
  animation-timing-function: @ease-out-circ;
7
8
  }
8
- .@{className}-leave {
9
+ .ant-@{className}-leave {
9
10
  animation-timing-function: @ease-in-circ;
10
11
  }
11
12
  }
@@ -9,7 +9,9 @@
9
9
  position: relative;
10
10
  }
11
11
 
12
- html {
12
+ // 使用 CSS 变量代替全局 html 选择器,避免污染全局样式
13
+ // 组件内部通过 :root 或局部变量使用
14
+ :root {
13
15
  --antd-wave-shadow-color: @primary-color;
14
16
  }
15
17
 
@@ -1,11 +1,12 @@
1
+ // 使用 ant- 前缀避免全局样式污染
1
2
  .slide-motion(@className, @keyframeName) {
2
3
  .make-motion(@className, @keyframeName);
3
- .@{className}-enter,
4
- .@{className}-appear {
4
+ .ant-@{className}-enter,
5
+ .ant-@{className}-appear {
5
6
  opacity: 0;
6
7
  animation-timing-function: @ease-out-quint;
7
8
  }
8
- .@{className}-leave {
9
+ .ant-@{className}-leave {
9
10
  animation-timing-function: @ease-in-quint;
10
11
  }
11
12
  }
@@ -1,12 +1,13 @@
1
+ // 使用 ant- 前缀避免全局样式污染
1
2
  .swing-motion(@className, @keyframeName) {
2
- .@{className}-enter,
3
- .@{className}-appear {
3
+ .ant-@{className}-enter,
4
+ .ant-@{className}-appear {
4
5
  .motion-common();
5
6
 
6
7
  animation-play-state: paused;
7
8
  }
8
- .@{className}-enter.@{className}-enter-active,
9
- .@{className}-appear.@{className}-appear-active {
9
+ .ant-@{className}-enter.ant-@{className}-enter-active,
10
+ .ant-@{className}-appear.ant-@{className}-appear-active {
10
11
  animation-name: ~'@{keyframeName}In';
11
12
  animation-play-state: running;
12
13
  }
@@ -1,12 +1,13 @@
1
+ // 使用 ant- 前缀避免全局样式污染
1
2
  .zoom-motion(@className, @keyframeName, @duration: @animation-duration-base) {
2
3
  .make-motion(@className, @keyframeName, @duration);
3
- .@{className}-enter,
4
- .@{className}-appear {
4
+ .ant-@{className}-enter,
5
+ .ant-@{className}-appear {
5
6
  transform: scale(0); // need this by yiminghe
6
7
  opacity: 0;
7
8
  animation-timing-function: @ease-out-circ;
8
9
  }
9
- .@{className}-leave {
10
+ .ant-@{className}-leave {
10
11
  animation-timing-function: @ease-in-out-circ;
11
12
  }
12
13
  }
@@ -10,24 +10,25 @@
10
10
  animation-fill-mode: both;
11
11
  }
12
12
 
13
+ // 使用 ant- 前缀避免全局样式污染
13
14
  .make-motion(@className, @keyframeName, @duration: @animation-duration-base) {
14
- .@{className}-enter,
15
- .@{className}-appear {
15
+ .ant-@{className}-enter,
16
+ .ant-@{className}-appear {
16
17
  .motion-common(@duration);
17
18
 
18
19
  animation-play-state: paused;
19
20
  }
20
- .@{className}-leave {
21
+ .ant-@{className}-leave {
21
22
  .motion-common-leave(@duration);
22
23
 
23
24
  animation-play-state: paused;
24
25
  }
25
- .@{className}-enter.@{className}-enter-active,
26
- .@{className}-appear.@{className}-appear-active {
26
+ .ant-@{className}-enter.ant-@{className}-enter-active,
27
+ .ant-@{className}-appear.ant-@{className}-appear-active {
27
28
  animation-name: ~'@{keyframeName}In';
28
29
  animation-play-state: running;
29
30
  }
30
- .@{className}-leave.@{className}-leave-active {
31
+ .ant-@{className}-leave.ant-@{className}-leave-active {
31
32
  animation-name: ~'@{keyframeName}Out';
32
33
  animation-play-state: running;
33
34
  pointer-events: none;
@@ -83,7 +83,7 @@ const TimePicker = {
83
83
  disabledSeconds: undefined,
84
84
  hideDisabledOptions: false,
85
85
  placement: 'bottomLeft',
86
- transitionName: 'slide-up',
86
+ transitionName: 'ant-slide-up',
87
87
  focusOnOpen: true,
88
88
  allowClear: true,
89
89
  }),
@@ -18,7 +18,7 @@ export default () => ({
18
18
  'rightTop',
19
19
  'rightBottom',
20
20
  ]).def('top'),
21
- transitionName: PropTypes.string.def('zoom-big-fast'),
21
+ transitionName: PropTypes.string.def('ant-zoom-big-fast'),
22
22
  // onVisibleChange: PropTypes.func,
23
23
  overlayStyle: PropTypes.object.def(() => ({})),
24
24
  overlayClassName: PropTypes.string,