Skip to content

Commit e0135af

Browse files
authored
Patch 1.0.4 (#9)
* chore: update BS 4.1.3, Shards 2.1.0 * chore: update dist * chore: update readme * fix: computed `d-col` offset and order classes * fix: incorrect use of `.includes()` in `<d-list-group-item>` * fix: propagate link-specific props for d-dropdown-item * feature(d-progress): add size prop + docs * fix(d-card): bind listeners to the card component * fix(d-datepicker): fix highlighted colors * feature(d-datepicker): impr. highlighted dates, add small datepicker prop/modifier * fix(d-datepicker): fix datepickers inside input groups * fix(d-input): allow file inputs (temp) * chore: bump version number (1.0.4), update dist + changelog
1 parent 439f72a commit e0135af

25 files changed

+700
-421
lines changed

CHANGELOG.md

+29-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [1.0.0] - 2018-09-11
5+
### 1.0.4 - (2018-10-15)
6+
7+
* feature(d-datepicker): impr. highlighted dates, add small datepicker prop/modifier
8+
* feature(d-progress): add size prop + docs
9+
* fix(d-input): allow file inputs (temp)
10+
* fix(d-datepicker): fix datepickers inside input groups
11+
* fix(d-datepicker): fix highlighted colors
12+
* fix(d-card): bind listeners to the card component
13+
* fix: propagate link-specific props for d-dropdown-item
14+
* fix: incorrect use of `.includes()` in `<d-list-group-item>`
15+
* fix: computed `d-col` offset and order classes
16+
* chore: update readme
17+
18+
### 1.0.3 - (2018-09-18)
19+
20+
* chore: update BS 4.1.3, Shards 2.1.0
21+
* chore: update dist
22+
23+
### 1.0.2 - (2018-09-18)
24+
25+
* fix(alert): close button alert issues
26+
* fix(d-link): invalid `to` prop binding
27+
28+
### 1.0.1 - (2018-09-12)
29+
30+
* Fixed linting errors.
31+
32+
### 1.0.0 - (2018-09-11)
633

734
* Initial release.
35+

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ If you'd like to fix a bug or work on a feature, make sure to follow the steps b
138138

139139
1. Clone the repository.
140140
2. Run `yarn` to install all required dependencies.
141-
3. Install Vue CLI and the CLI service globally by running: `npm i -g @vue/cli @vue/cli-service-global`.
141+
3. Install Vue CLI and the CLI service globally by running: `npm i -g @vue/cli @vue/cli-service-global` or `yarn global add @vue/cli-service-global`.
142142
4. Run `yarn watch` in order to kickstart the server and run the sandbox with hot reloading.
143143
5. Refer to the `sandbox/Sandbox.vue` file for more details.
144144

dist/shards-vue.common.js

+129-28
Large diffs are not rendered by default.

dist/shards-vue.common.js.map

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

dist/shards-vue.common.min.js

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

dist/shards-vue.common.min.map

+1-1
Large diffs are not rendered by default.

dist/shards-vue.esm.js

+129-28
Large diffs are not rendered by default.

dist/shards-vue.esm.js.map

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

dist/shards-vue.esm.min.js

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

dist/shards-vue.esm.min.map

+1-1
Large diffs are not rendered by default.

dist/shards-vue.umd.js

+129-28
Large diffs are not rendered by default.

dist/shards-vue.umd.js.map

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

dist/shards-vue.umd.min.js

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

dist/shards-vue.umd.min.map

+1-1
Large diffs are not rendered by default.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "shards-vue",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"license": "MIT",
55
"description": "A free, beautiful and modern Vue.js UI kit based on the Shards UI kit.",
66
"main": "dist/shards-vue.common.js",

src/components/card/Card.vue

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<component :is="tag"
33
v-bind="$attrs"
4+
v-on="$listeners"
45
:class="[
56
'card',
67
Boolean(align) ? `text-${align}` : '',

src/components/container/Col.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ export const createBreakpointClass = (type, breakpoint, val) => {
2424
2525
let className = type
2626
27-
if (breakpoint) // -md ?
28-
className += `-${breakpoint}`
27+
if (breakpoint) {
28+
className += `-${breakpoint.replace(type, '')}` // -md ?
29+
}
2930
3031
if (type === 'col' && (val === '' || val === true)) {
3132
return className.toLowerCase() // .col-md

src/components/datepicker/Datepicker.vue

+177-75
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,33 @@
11
<template>
22
<VueDatepicker
3-
v-bind="$props"
3+
:value="value"
4+
:name="name"
5+
:id="id"
6+
:format="format"
7+
:language="language"
8+
:open-date="openDate"
9+
:day-cell-content="dayCellContent"
10+
:full-month-name="fullMonthName"
11+
:disabled-dates="disabledDates"
12+
:highlighted="highlighted"
13+
:placeholder="placeholder"
14+
:inline="inline"
15+
:calendar-class="computedCalendarClass"
16+
:input-class="inputClass"
17+
:wrapper-class="wrapperClass"
18+
:monday-first="mondayFirst"
19+
:clear-button="clearButton"
20+
:clear-button-icon="clearButtonIcon"
21+
:calendar-button="calendarButton"
22+
:calendar-button-icon="calendarButtonIcon"
23+
:calendar-button-icon-content="calendarButtonIconContent"
24+
:initial-view="initialView"
25+
:disabled="disabled"
26+
:required="required"
27+
:typeable="typeable"
28+
:use-utc="useUtc"
29+
:minimum-view="minimumView"
30+
:maximum-view="maximumView"
431
v-on="$listeners">
532
<slot name="beforeCalendarHeader" slot="beforeCalendarHeader" />
633
<slot name="afterDateInput" slot="afterDateInput" />
@@ -86,7 +113,10 @@ export default {
86113
/**
87114
* The CSS class applied to the calendar element.
88115
*/
89-
calendarClass: [String, Object, Array],
116+
calendarClass: {
117+
type: [String, Object, Array],
118+
default: ''
119+
},
90120
/**
91121
* The CSS Class applied to the input element.
92122
*/
@@ -155,6 +185,20 @@ export default {
155185
maximumView: {
156186
type: String,
157187
default: 'year'
188+
},
189+
/**
190+
* Whether the datepicker should be small, or not.
191+
*/
192+
small: {
193+
type: Boolean,
194+
default: false
195+
}
196+
},
197+
computed: {
198+
computedCalendarClass() {
199+
let _calendarClass = this.small ? 'vdp-datepicker__small' : ''
200+
201+
return _calendarClass += this.calendarClass
158202
}
159203
}
160204
}
@@ -193,92 +237,150 @@ export default {
193237
$datepicker-cell-line-height: 2;
194238
$datepicker-cell-font-size: 1rem;
195239
196-
.vdp-datepicker__calendar {
197-
color: $datepicker-color;
198-
padding: $datepicker-padding-y $datepicker-padding-x;
199-
min-width: $datepicker-min-width;
200-
font-size: $datepicker-font-size;
201-
font-weight: $datepicker-font-weight;
202-
font-family: $font-system;
203-
background-color: $datepicker-background-color;
204-
border: $datepicker-border;
205-
border-radius: $datepicker-border-radius;
206-
box-shadow: $datepicker-drop-shadows;
207-
border: 1px solid rgba($black,.15) !important;
208-
209-
// Header
210-
header {
211-
display: flex;
212-
padding-bottom: 10px;
213-
214-
span {
215-
transition: $transition-default;
216-
border-radius: $border-radius-default;
217-
font-weight: 500;
240+
$datepicker-small-padding-y: .625rem;
241+
$datepicker-small-padding-x: .625rem;
242+
$datepicker-small-font-size: .75rem;
243+
$datepicker-small-max-width: 235px;
218244
219-
&.next:after {
220-
border-left-color: $color-silver-sand;
221-
}
245+
$datepicker-small-day-font-size: 12px;
246+
$datepicker-small-day-font-weight: 500;
247+
$datepicker-small-day-width: 1.875rem;
248+
$datepicker-small-day-height: 1.875rem;
249+
$datepicker-small-day-line-height: 2.25;
222250
223-
&.prev:after {
224-
border-right-color: $color-silver-sand;
225-
}
226-
}
227-
}
251+
$datepicker-small-day-header-font-size: 100%;
228252
229-
// Header elements and specific calendar cells.
230-
header span,
231-
.cell.day:not(.disabled):not(.blank), .cell.month, .cell.year {
232-
&:hover {
233-
background-color: $datepicker-cell-hover-color;
234-
border-color: $border-color !important;
235-
}
236-
}
253+
div.vdp-datepicker {
254+
&__calendar {
255+
color: $datepicker-color;
256+
padding: $datepicker-padding-y $datepicker-padding-x;
257+
min-width: $datepicker-min-width;
258+
font-size: $datepicker-font-size;
259+
font-weight: $datepicker-font-weight;
260+
font-family: $font-system;
261+
background-color: $datepicker-background-color;
262+
border: $datepicker-border;
263+
border-radius: $datepicker-border-radius;
264+
box-shadow: $datepicker-drop-shadows;
265+
border: 1px solid rgba($black,.15) !important;
237266
238-
// Cells
239-
.cell {
240-
line-height: $datepicker-cell-line-height;
241-
font-size: $datepicker-cell-font-size;
242-
border-radius: $border-radius-default;
243-
transition: $transition-default;
244-
border-color: $border-color;
245-
height: auto;
246-
247-
// Day headers
248-
&.day-header {
249-
font-weight: 500;
250-
}
267+
// Header
268+
header {
269+
display: flex;
270+
padding-bottom: 10px;
251271
252-
// Days
253-
&.day {
254-
width: $datepicker-cell-width;
255-
height: $datepicker-cell-height;
256-
border-radius: 50%;
257-
}
272+
span {
273+
transition: $transition-default;
274+
border-radius: $border-radius-default;
275+
font-weight: 500;
276+
277+
&.next:after {
278+
border-left-color: $color-silver-sand;
279+
}
258280
259-
// Months
260-
&.month,
261-
&.year {
262-
height: $datepicker-cell-height;
263-
font-size: 12px;
264-
line-height: 33px;
281+
&.prev:after {
282+
border-right-color: $color-silver-sand;
283+
}
284+
}
265285
}
266286
267-
// Selected
268-
&.selected,
269-
&.highlighted.selected {
270-
background: $color-primary !important;
271-
color: $white;
287+
// Header elements and specific calendar cells.
288+
header span,
289+
.cell.day:not(.disabled):not(.blank), .cell.month, .cell.year {
272290
&:hover {
273-
background: darken($color-primary, 5) !important;
291+
background-color: $datepicker-cell-hover-color;
274292
border-color: $border-color !important;
275293
}
276294
}
277295
278-
&.highlighted {
279-
background: lighten($color-primary, 45) !important;
280-
&:hover {
281-
border-color: $border-color !important;
296+
// Cells
297+
.cell {
298+
line-height: $datepicker-cell-line-height;
299+
font-size: $datepicker-cell-font-size;
300+
border-radius: $border-radius-default;
301+
transition: $transition-default;
302+
border-color: $border-color;
303+
height: auto;
304+
305+
// Day headers
306+
&.day-header {
307+
font-weight: 500;
308+
}
309+
310+
// Days
311+
&.day {
312+
width: $datepicker-cell-width;
313+
height: $datepicker-cell-height;
314+
border-radius: 50%;
315+
}
316+
317+
// Months
318+
&.month,
319+
&.year {
320+
height: $datepicker-cell-height;
321+
font-size: 12px;
322+
line-height: 33px;
323+
}
324+
325+
// Selected
326+
&.selected,
327+
&.highlighted.selected {
328+
background: $color-primary !important;
329+
color: $white;
330+
&:hover {
331+
background: darken($color-primary, 5) !important;
332+
border-color: $border-color !important;
333+
}
334+
}
335+
336+
&.highlighted {
337+
background: $color-primary;
338+
color: $white;
339+
340+
&:hover {
341+
background: darken($color-primary, 5) !important;
342+
border-color: $border-color !important;
343+
}
344+
345+
&:not(.highlight-start):not(.highlight-end) {
346+
border-radius: 0;
347+
}
348+
349+
&.highlight-start {
350+
border-top-right-radius: 0;
351+
border-bottom-right-radius: 0;
352+
}
353+
354+
&.highlight-end {
355+
border-top-left-radius: 0;
356+
border-bottom-left-radius: 0;
357+
}
358+
}
359+
}
360+
}
361+
362+
// Small Datepicker modifier.
363+
&__small {
364+
padding: $datepicker-small-padding-y $datepicker-small-padding-x;
365+
font-size: $datepicker-small-font-size;
366+
max-width: $datepicker-small-max-width;
367+
368+
.cell {
369+
&.day {
370+
width: $datepicker-small-day-width;
371+
height: $datepicker-small-day-height;
372+
line-height: $datepicker-small-day-line-height;
373+
}
374+
375+
&.day,
376+
&.month,
377+
&.year {
378+
font-size: $datepicker-small-day-font-size;
379+
font-weight: $datepicker-small-day-font-weight;
380+
}
381+
382+
&.day-header {
383+
font-size: $datepicker-small-day-header-font-size;
282384
}
283385
}
284386
}

src/components/dropdown/DropdownItem.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<d-link class="dropdown-item" role="menuitem">
2+
<d-link class="dropdown-item" role="menuitem" v-bind="$props">
33
<slot />
44
</d-link>
55
</template>

0 commit comments

Comments
 (0)