Skip to content

Commit 030319b

Browse files
committed
🎨(VDPicker): Renamed components & reorganized folders
1 parent bac604d commit 030319b

38 files changed

+131
-131
lines changed

Diff for: .size-snapshot.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
22
"dist/vue-datepicker.min.js": {
3-
"bundled": 134421,
4-
"minified": 75625,
3+
"bundled": 134322,
4+
"minified": 75572,
55
"gzipped": 19753
66
},
77
"dist/vue-datepicker.esm.js": {
8-
"bundled": 134398,
9-
"minified": 81653,
10-
"gzipped": 20802,
8+
"bundled": 134299,
9+
"minified": 81554,
10+
"gzipped": 20805,
1111
"treeshaked": {
1212
"rollup": {
13-
"code": 75445,
13+
"code": 75392,
1414
"import_statements": 144
1515
},
1616
"webpack": {
17-
"code": 76622
17+
"code": 76569
1818
}
1919
}
2020
},
2121
"dist/vue-datepicker.umd.js": {
22-
"bundled": 143257,
23-
"minified": 75922,
22+
"bundled": 143158,
23+
"minified": 75869,
2424
"gzipped": 19874
2525
}
2626
}

Diff for: dist/vue-datepicker.esm.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/vue-datepicker.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/vue-datepicker.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/vue-datepicker.umd.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/components/DatePicker/index.js

-3
This file was deleted.

Diff for: src/components/DatePicker/DatePicker.js renamed to src/components/VDPicker/VDPicker.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import { clearAllBodyScrollLocks } from 'body-scroll-lock';
22

33
// Styles
4-
import './DatePicker.scss';
4+
import './VDPicker.scss';
55

66
// directives
77
import ClickOutside from '../../directives/click-outside';
88

99
// components
1010
import VDMenu from '../VDMenu';
11-
import DatePickerCustomInput from './DatePickerCustomInput';
12-
import DatePickerOverlay from './DatePickerOverlay';
13-
import DatePickerAgenda from './DatePickerAgenda';
11+
import VDPickerCustomInput from './VDPickerCustomInput/VDPickerCustomInput';
12+
import VDPickerOverlay from './VDPickerOverlay/VDPickerOverlay';
13+
import VDPickerAgenda from './VDPickerAgenda/VDPickerAgenda';
1414

1515
// constants
1616
import { Z_INDEX_LIST, KEYCODES, DATE_HEADER_REGEX } from '../../constants';
@@ -35,7 +35,7 @@ export const defaultMenuProps = {
3535
};
3636

3737
export default {
38-
name: 'DatePicker',
38+
name: 'VDPicker.js',
3939
directives: { ClickOutside },
4040
props: {
4141
id: { type: String, default: undefined },
@@ -107,9 +107,9 @@ export default {
107107
computed: {
108108
classes () {
109109
return {
110-
'datepicker__wrapper--inline': this.inline,
111-
'datepicker__wrapper--disabled': this.disabled,
112-
'datepicker__wrapper--rtl': this.rtl,
110+
'vd-wrapper--inline': this.inline,
111+
'vd-wrapper--disabled': this.disabled,
112+
'vd-wrapper--rtl': this.rtl,
113113
};
114114
},
115115
currentLocale () {
@@ -295,7 +295,7 @@ export default {
295295
},
296296
genActivator () {
297297
return this.$createElement('div', {
298-
staticClass: 'datepicker__activator',
298+
staticClass: 'vd-activator',
299299
directives: [{
300300
name: 'click-outside',
301301
value: {
@@ -315,7 +315,7 @@ export default {
315315
]);
316316
},
317317
genCustomInput () {
318-
return this.$createElement(DatePickerCustomInput, {
318+
return this.$createElement(VDPickerCustomInput, {
319319
props: {
320320
clearable: this.clearable,
321321
closeOnClickOutside: this.isMenuActive && !this.shouldShowBottomSheet,
@@ -343,7 +343,7 @@ export default {
343343
genOverlay () {
344344
if (!this.shouldShowBottomSheet) return;
345345

346-
return this.$createElement(DatePickerOverlay, {
346+
return this.$createElement(VDPickerOverlay, {
347347
props: {
348348
value: this.isMenuActive && this.shouldShowBottomSheet,
349349
zIndex: parseInt(this.zIndex),
@@ -354,7 +354,7 @@ export default {
354354
});
355355
},
356356
genAgenda () {
357-
return this.$createElement(DatePickerAgenda, {
357+
return this.$createElement(VDPickerAgenda, {
358358
props: {
359359
activeBottomSheet: this.isBooted && this.isMenuActive && this.shouldShowBottomSheet,
360360
allowedDates: this.allowedDates,

Diff for: src/components/DatePicker/DatePicker.scss renamed to src/components/VDPicker/VDPicker.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}
4141
}
4242

43-
.datepicker__activator {
43+
.vd-activator {
4444
display: flex;
4545
flex: 1 1 auto;
4646
max-width: 100%;

Diff for: src/components/DatePicker/DatePickerAgenda.js renamed to src/components/VDPicker/VDPickerAgenda/VDPickerAgenda.js

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { disableBodyScroll, enableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock';
22

33
// Styles
4-
import './DatePickerAgenda.scss';
4+
import './VDPickerAgenda.scss';
55

66
// Mixins
7-
import colorable from '../../mixins/colorable';
7+
import colorable from '../../../mixins/colorable';
88

99
// Components
10-
import DatePickerControls from './DatePickerControls';
11-
import DatePickerHeader from './DatePickerHeader';
12-
import DatePickerPresets from './DatePickerPresets';
13-
import DatePickerTableDate from './DatePickerTableDate';
14-
import DatePickerValidate from './DatePickerValidate';
15-
import DatePickerYearMonth from './DatePickerYearMonth';
16-
import VDIcon from '../VDIcon';
10+
import VDPickerControls from '../VDPickerControls/VDPickerControls';
11+
import VDPickerHeader from '../VDPickerHeader/VDPickerHeader';
12+
import VDPickerPresets from '../VDPickerPresets/VDPickerPresets';
13+
import VDPickerTableDate from '../VDPickerTableDate/VDPickerTableDate';
14+
import VDPickerValidate from '../VDPickerValidate/VDPickerValidate';
15+
import VDPickerYearMonth from '../VDPickerYearMonth/VDPickerYearMonth';
16+
import VDIcon from '../../VDIcon';
1717

1818
// Functions
1919
import Dates, {
@@ -24,14 +24,14 @@ import Dates, {
2424
formatDate,
2525
generateMonthAndYear,
2626
convertQuarterToMonth,
27-
} from '../../utils/Dates';
28-
import { computeAgendaHeight } from '../../utils/positions';
27+
} from '../../../utils/Dates';
28+
import { computeAgendaHeight } from '../../../utils/positions';
2929

3030
// Constants
31-
import { yearMonthSelectorTypes } from '../../constants';
31+
import { yearMonthSelectorTypes } from '../../../constants';
3232

3333
export default {
34-
name: 'DatePickerAgenda',
34+
name: 'VDPickerAgenda',
3535
mixins: [colorable],
3636
props: {
3737
activeBottomSheet: { type: Boolean, default: false },
@@ -282,7 +282,7 @@ export default {
282282
]);
283283
},
284284
genHeader () {
285-
return this.$createElement(DatePickerHeader, {
285+
return this.$createElement(VDPickerHeader, {
286286
props: {
287287
color: this.color,
288288
formatHeader: this.formatHeader,
@@ -301,7 +301,7 @@ export default {
301301
});
302302
},
303303
genPresets () {
304-
return this.$createElement(DatePickerPresets, {
304+
return this.$createElement(VDPickerPresets, {
305305
props: {
306306
rangePresets: this.rangePresets,
307307
mutableDate: this.mutableDate,
@@ -328,7 +328,7 @@ export default {
328328
}, children);
329329
},
330330
genControls () {
331-
return this.$createElement(DatePickerControls, {
331+
return this.$createElement(VDPickerControls, {
332332
props: {
333333
currentDate: this.currentDate,
334334
transitionName: this.transitionLabelName,
@@ -342,7 +342,7 @@ export default {
342342
});
343343
},
344344
genTableDate () {
345-
return this.$createElement(DatePickerTableDate, {
345+
return this.$createElement(VDPickerTableDate, {
346346
props: {
347347
allowedDates: this.allowedDates,
348348
color: this.color,
@@ -365,7 +365,7 @@ export default {
365365
});
366366
},
367367
genYearMonth () {
368-
return this.$createElement(DatePickerYearMonth, {
368+
return this.$createElement(VDPickerYearMonth, {
369369
props: {
370370
active: this.shouldShowYearMonthSelector,
371371
color: this.color,
@@ -386,7 +386,7 @@ export default {
386386
});
387387
},
388388
genValidate () {
389-
return this.$createElement(DatePickerValidate, {
389+
return this.$createElement(VDPickerValidate, {
390390
props: {
391391
buttonValidate: this.buttonValidate,
392392
buttonCancel: this.buttonCancel,

Diff for: src/components/DatePicker/DatePickerAgenda.scss renamed to src/components/VDPicker/VDPickerAgenda/VDPickerAgenda.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
@import '../../styles/abstracts/_index.scss',
2-
'../../styles/base/_transitions.scss';
1+
@import '../../../styles/abstracts/_index.scss',
2+
'../../../styles/base/_transitions.scss';
33

44
.vd-picker,
55
.vd-picker *,

Diff for: src/components/DatePicker/DatePickerControls.js renamed to src/components/VDPicker/VDPickerControls/VDPickerControls.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// Styles
2-
import './DatePickerControls.scss';
2+
import './VDPickerControls.scss';
33

44
// Mixins
5-
import colorable from '../../mixins/colorable';
5+
import colorable from '../../../mixins/colorable';
66

77
// Components
8-
import VDIcon from '../VDIcon';
8+
import VDIcon from '../../VDIcon';
99

1010
// Functions
11-
import { isBeforeDate, isAfterDate } from '../../utils/Dates';
11+
import { isBeforeDate, isAfterDate } from '../../../utils/Dates';
1212

1313
export default {
14-
name: 'DatePickerControls',
14+
name: 'VDPickerControls',
1515
mixins: [colorable],
1616
props: {
1717
currentDate: { type: Object, required: true },

Diff for: src/components/DatePicker/DatePickerControls.scss renamed to src/components/VDPicker/VDPickerControls/VDPickerControls.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
@import '../../styles/abstracts/_index.scss',
2-
'../../styles/base/_transitions.scss';
1+
@import '../../../styles/abstracts/_index.scss',
2+
'../../../styles/base/_transitions.scss';
33

44
.vd-picker__controls {
55
position: relative;

Diff for: src/components/DatePicker/DatePickerCustomInput.js renamed to src/components/VDPicker/VDPickerCustomInput/VDPickerCustomInput.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// Styles
2-
import './DatePickerCustomInput.scss';
2+
import './VDPickerCustomInput.scss';
33

44
// mixins
5-
import colorable from '../../mixins/colorable';
5+
import colorable from '../../../mixins/colorable';
66

77
// directives
8-
import ClickOutside from '../../directives/click-outside';
8+
import ClickOutside from '../../../directives/click-outside';
99

1010
// components
11-
import VDIcon from '../VDIcon';
11+
import VDIcon from '../../VDIcon';
1212

1313
export default {
14-
name: 'DatePickerCustomInput',
14+
name: 'VDPickerCustomInput',
1515
mixins: [colorable],
1616
directives: { ClickOutside },
1717
props: {

Diff for: src/components/DatePicker/DatePickerCustomInput.scss renamed to src/components/VDPicker/VDPickerCustomInput/VDPickerCustomInput.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../../styles/abstracts/_index.scss';
1+
@import '../../../styles/abstracts/_index.scss';
22

33
.vd-picker__input {
44
position: relative;

Diff for: src/components/DatePicker/DatePickerHeader.js renamed to src/components/VDPicker/VDPickerHeader/VDPickerHeader.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// Styles
2-
import './DatePickerHeader.scss';
2+
import './VDPickerHeader.scss';
33

44
// Mixins
5-
import colorable from '../../mixins/colorable';
5+
import colorable from '../../../mixins/colorable';
66

77
// Functions
8-
import { formatDateWithLocale, getRangeDatesFormatted } from '../../utils/Dates';
8+
import { formatDateWithLocale, getRangeDatesFormatted } from '../../../utils/Dates';
99

1010
// Constants
11-
import { DATE_HEADER_REGEX } from '../../constants';
11+
import { DATE_HEADER_REGEX } from '../../../constants';
1212

1313
export default {
14-
name: 'DatePickerHeader',
14+
name: 'VDPickerHeader',
1515
mixins: [colorable],
1616
props: {
1717
color: { type: String },

Diff for: src/components/DatePicker/DatePickerHeader.scss renamed to src/components/VDPicker/VDPickerHeader/VDPickerHeader.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
@import '../../styles/abstracts/_index.scss',
2-
'../../styles/base/_transitions.scss';
1+
@import '../../../styles/abstracts/_index.scss',
2+
'../../../styles/base/_transitions.scss';
33

44
.vd-picker__header {
55
color: white;

Diff for: src/components/DatePicker/DatePickerOverlay.js renamed to src/components/VDPicker/VDPickerOverlay/VDPickerOverlay.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Styles
2-
import './DatePickerOverlay.scss';
2+
import './VDPickerOverlay.scss';
33

44
// Mixins
5-
import detachable from '../../mixins/detachable';
6-
import toggleable from '../../mixins/toggleable';
5+
import detachable from '../../../mixins/detachable';
6+
import toggleable from '../../../mixins/toggleable';
77

88
export default {
9-
name: 'DatePickerOverlay',
9+
name: 'VDPickerOverlay',
1010
mixins: [detachable, toggleable],
1111
props: {
1212
zIndex: { type: Number },

Diff for: src/components/DatePicker/DatePickerOverlay.scss renamed to src/components/VDPicker/VDPickerOverlay/VDPickerOverlay.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../../styles/abstracts/_index.scss';
1+
@import '../../../styles/abstracts/_index.scss';
22

33
.vd-picker__overlay {
44
position: fixed;

Diff for: src/components/DatePicker/DatePickerPresets.js renamed to src/components/VDPicker/VDPickerPresets/VDPickerPresets.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// Styles
2-
import './DatePickerPresets.scss';
2+
import './VDPickerPresets.scss';
33

44
// Mixins
5-
import colorable from '../../mixins/colorable';
5+
import colorable from '../../../mixins/colorable';
66

77
// Functions
88
import {
99
generateDateRangeWithoutDisabled,
1010
areSameDates,
11-
} from '../../utils/Dates';
11+
} from '../../../utils/Dates';
1212

1313
// Constants
14-
import { MAX_PRESETS_NUMBER } from '../../constants';
14+
import { MAX_PRESETS_NUMBER } from '../../../constants';
1515

1616
export default {
17-
name: 'DatePickerPresets',
17+
name: 'VDPickerPresets',
1818
mixins: [colorable],
1919
props: {
2020
rangePresets: { type: Array },

Diff for: src/components/DatePicker/DatePickerPresets.scss renamed to src/components/VDPicker/VDPickerPresets/VDPickerPresets.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../../styles/abstracts/_index.scss';
1+
@import '../../../styles/abstracts/_index.scss';
22

33
.vd-picker__presets {
44
position: relative;

0 commit comments

Comments
 (0)