@mekari/pixel-date-picker
Advanced tools
Comparing version 0.9.7 to 0.9.8
{ | ||
"name": "@mekari/pixel-date-picker", | ||
"version": "0.9.7", | ||
"version": "0.9.8", | ||
"description": "Mekari Pixel | Date picker component", | ||
@@ -27,12 +27,12 @@ "homepage": "https://mekari.design/", | ||
"dependencies": { | ||
"@mekari/pixel-box": "0.2.0", | ||
"@mekari/pixel-flex": "0.2.0", | ||
"@mekari/pixel-simple-grid": "0.2.0", | ||
"@mekari/pixel-button": "0.2.6", | ||
"@mekari/pixel-button-icon": "0.8.6", | ||
"@mekari/pixel-icon": "0.11.5", | ||
"@mekari/pixel-input": "0.5.6", | ||
"@mekari/pixel-text": "0.2.0", | ||
"@mekari/pixel-utils": "0.4.0", | ||
"@mekari/pixel-popover": "0.8.6", | ||
"@mekari/pixel-box": "0.2.1", | ||
"@mekari/pixel-flex": "0.2.1", | ||
"@mekari/pixel-simple-grid": "0.2.1", | ||
"@mekari/pixel-button": "0.2.7", | ||
"@mekari/pixel-button-icon": "0.8.7", | ||
"@mekari/pixel-icon": "0.11.6", | ||
"@mekari/pixel-input": "0.5.7", | ||
"@mekari/pixel-text": "0.2.1", | ||
"@mekari/pixel-utils": "0.5.0", | ||
"@mekari/pixel-popover": "0.8.7", | ||
"date-format-parse": "^0.2.7" | ||
@@ -39,0 +39,0 @@ }, |
@@ -25,3 +25,3 @@ import { getWeek, format } from 'date-format-parse' | ||
default: undefined | ||
}, | ||
} | ||
}, | ||
@@ -80,3 +80,3 @@ props: { | ||
return { | ||
hoveredBiweekDates: [], | ||
hoveredBiweekDates: [] | ||
} | ||
@@ -232,3 +232,3 @@ }, | ||
}, | ||
borderRadius: 0, | ||
borderRadius: 0 | ||
} | ||
@@ -316,3 +316,3 @@ } | ||
...(col === 0 && { borderLeftRadius: 'sm' }), | ||
...(col === 6 && { borderRightRadius: 'sm' }), | ||
...(col === 6 && { borderRightRadius: 'sm' }) | ||
}) | ||
@@ -327,3 +327,7 @@ } | ||
if (this.hoveredBiweekDates.length === 2) { | ||
const isBiweekDates = isDateBetween(item, this.hoveredBiweekDates[0], this.hoveredBiweekDates[1]) | ||
const isBiweekDates = isDateBetween( | ||
item, | ||
this.hoveredBiweekDates[0], | ||
this.hoveredBiweekDates[1] | ||
) | ||
const isStartBiweek = isBiweekDates && col === 0 | ||
@@ -339,9 +343,9 @@ const isEndBiweek = isBiweekDates && col === 6 | ||
backgroundColor: 'none' | ||
}, | ||
} | ||
} | ||
const startHoverStyle = { | ||
borderLeftRadius: 'md', | ||
borderLeftRadius: 'md' | ||
} | ||
const endHoverStyle = { | ||
borderRightRadius: 'md', | ||
borderRightRadius: 'md' | ||
} | ||
@@ -352,3 +356,3 @@ | ||
...(isStartBiweek && startHoverStyle), | ||
...(isEndBiweek && endHoverStyle), | ||
...(isEndBiweek && endHoverStyle) | ||
} | ||
@@ -368,3 +372,3 @@ } | ||
borderTopLeftRadius: isStartBiweek ? 'sm' : 0, | ||
borderBottomLeftRadius: isStartBiweek ? 'sm' : 0, | ||
borderBottomLeftRadius: isStartBiweek ? 'sm' : 0 | ||
} | ||
@@ -401,3 +405,3 @@ } | ||
...activeBiweekStyle, | ||
...hoverBiweekStyle, | ||
...hoverBiweekStyle | ||
} | ||
@@ -472,4 +476,4 @@ }, | ||
h( | ||
MpBox, | ||
null, | ||
MpFlex, | ||
{}, | ||
this.yearMonth.map((item, index) => | ||
@@ -481,6 +485,7 @@ h( | ||
attrs: { | ||
display: 'block', | ||
variant: 'unstyled', | ||
fontSize: 'md', | ||
minWidth: 0, | ||
h: 0, | ||
h: 'auto', | ||
p: 0, | ||
@@ -526,3 +531,3 @@ pr: index === 0 ? '2px' : 0, | ||
pt: '6px', | ||
role: 'group', | ||
role: 'group' | ||
}, | ||
@@ -541,3 +546,3 @@ class: this.getRowClasses(row) | ||
title: this.getCellTitle(item), | ||
...this.cellStyle(item, row, col), | ||
...this.cellStyle(item, row, col) | ||
}, | ||
@@ -560,24 +565,24 @@ on: { | ||
this.isShortcut && | ||
h( | ||
MpFlex, | ||
{ | ||
attrs: { | ||
'data-pixel-part': 'MpDatePicker-Shortcut', | ||
pt: '12px', | ||
'justify-content': 'center' | ||
} | ||
}, | ||
[ | ||
h( | ||
MpButton, | ||
{ | ||
attrs: { variant: 'ghost', isDisabled: this.isDisabledShortcut() }, | ||
on: { click: this.handleShortcut } | ||
}, | ||
'Today' | ||
) | ||
] | ||
) | ||
h( | ||
MpFlex, | ||
{ | ||
attrs: { | ||
'data-pixel-part': 'MpDatePicker-Shortcut', | ||
pt: '12px', | ||
'justify-content': 'center' | ||
} | ||
}, | ||
[ | ||
h( | ||
MpButton, | ||
{ | ||
attrs: { variant: 'ghost', isDisabled: this.isDisabledShortcut() }, | ||
on: { click: this.handleShortcut } | ||
}, | ||
'Today' | ||
) | ||
] | ||
) | ||
]) | ||
} | ||
} |
@@ -235,3 +235,9 @@ import { chunk } from '../util/base' | ||
MpFlex, | ||
{ attrs: { 'data-pixel-part': 'MpDatePicker-Header', justifyContent: 'space-between' } }, | ||
{ | ||
attrs: { | ||
'data-pixel-part': 'MpDatePicker-Header', | ||
justifyContent: 'space-between', | ||
alignCenter: 'center' | ||
} | ||
}, | ||
[ | ||
@@ -247,6 +253,7 @@ h(MpButtonIcon, { | ||
attrs: { | ||
display: 'block', | ||
variant: 'unstyled', | ||
fontSize: 'md', | ||
minWidth: 0, | ||
h: 0, | ||
h: 'auto', | ||
p: 0, | ||
@@ -315,24 +322,25 @@ fontWeight: 'semibold', | ||
), | ||
this.isShortcut && h( | ||
MpFlex, | ||
{ | ||
attrs: { | ||
'data-pixel-part': 'MpDatePicker-Shortcut', | ||
pt: '12px', | ||
'justify-content': 'center' | ||
} | ||
}, | ||
[ | ||
h( | ||
MpButton, | ||
{ | ||
attrs: { variant: 'ghost', isDisabled: this.isDisabledShortcut() }, | ||
on: { click: this.handleShortcut } | ||
}, | ||
'This Month' | ||
) | ||
] | ||
) | ||
this.isShortcut && | ||
h( | ||
MpFlex, | ||
{ | ||
attrs: { | ||
'data-pixel-part': 'MpDatePicker-Shortcut', | ||
pt: '12px', | ||
'justify-content': 'center' | ||
} | ||
}, | ||
[ | ||
h( | ||
MpButton, | ||
{ | ||
attrs: { variant: 'ghost', isDisabled: this.isDisabledShortcut() }, | ||
on: { click: this.handleShortcut } | ||
}, | ||
'This Month' | ||
) | ||
] | ||
) | ||
]) | ||
} | ||
} |
@@ -37,3 +37,3 @@ // import IconButton from './icon-button' | ||
type: Function, | ||
default: () => { } | ||
default: () => {} | ||
}, | ||
@@ -47,3 +47,3 @@ isDisableHeader: { | ||
default: true | ||
}, | ||
} | ||
}, | ||
@@ -132,8 +132,8 @@ computed: { | ||
? { | ||
color: 'white', | ||
backgroundColor: 'blue.400', | ||
_hover: { | ||
backgroundColor: 'blue.400' | ||
color: 'white', | ||
backgroundColor: 'blue.400', | ||
_hover: { | ||
backgroundColor: 'blue.400' | ||
} | ||
} | ||
} | ||
: {} | ||
@@ -245,3 +245,9 @@ | ||
MpFlex, | ||
{ attrs: { 'data-pixel-part': 'MpDatePicker-Header', justifyContent: 'space-between' } }, | ||
{ | ||
attrs: { | ||
'data-pixel-part': 'MpDatePicker-Header', | ||
justifyContent: 'space-between', | ||
alignItems: 'center' | ||
} | ||
}, | ||
[ | ||
@@ -316,24 +322,25 @@ h(MpButtonIcon, { | ||
), | ||
this.isShortcut && h( | ||
MpFlex, | ||
{ | ||
attrs: { | ||
'data-pixel-part': 'MpDatePicker-Shortcut', | ||
pt: '12px', | ||
'justify-content': 'center' | ||
} | ||
}, | ||
[ | ||
h( | ||
MpButton, | ||
{ | ||
attrs: { variant: 'ghost', isDisabled: this.isDisabledShortcut() }, | ||
on: { click: this.handleShortcut } | ||
}, | ||
'This Year' | ||
) | ||
] | ||
) | ||
this.isShortcut && | ||
h( | ||
MpFlex, | ||
{ | ||
attrs: { | ||
'data-pixel-part': 'MpDatePicker-Shortcut', | ||
pt: '12px', | ||
'justify-content': 'center' | ||
} | ||
}, | ||
[ | ||
h( | ||
MpButton, | ||
{ | ||
attrs: { variant: 'ghost', isDisabled: this.isDisabledShortcut() }, | ||
on: { click: this.handleShortcut } | ||
}, | ||
'This Year' | ||
) | ||
] | ||
) | ||
]) | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
431357
15820
+ Added@mekari/pixel-box@0.2.1(transitive)
+ Added@mekari/pixel-button@0.2.7(transitive)
+ Added@mekari/pixel-button-icon@0.8.7(transitive)
+ Added@mekari/pixel-divider@0.2.1(transitive)
+ Added@mekari/pixel-flex@0.2.1(transitive)
+ Added@mekari/pixel-grid@0.2.1(transitive)
+ Added@mekari/pixel-icon@0.11.6(transitive)
+ Added@mekari/pixel-input@0.5.7(transitive)
+ Added@mekari/pixel-no-ssr@0.2.1(transitive)
+ Added@mekari/pixel-popover@0.8.7(transitive)
+ Added@mekari/pixel-popper@0.3.2(transitive)
+ Added@mekari/pixel-portal@0.2.1(transitive)
+ Added@mekari/pixel-pseudo-box@0.2.1(transitive)
+ Added@mekari/pixel-simple-grid@0.2.1(transitive)
+ Added@mekari/pixel-spinner@0.2.1(transitive)
+ Added@mekari/pixel-text@0.2.1(transitive)
+ Added@mekari/pixel-utils@0.5.0(transitive)
+ Added@mekari/pixel-visually-hidden@0.2.1(transitive)
- Removed@mekari/pixel-box@0.2.0(transitive)
- Removed@mekari/pixel-button@0.2.6(transitive)
- Removed@mekari/pixel-button-icon@0.8.6(transitive)
- Removed@mekari/pixel-divider@0.2.0(transitive)
- Removed@mekari/pixel-flex@0.2.0(transitive)
- Removed@mekari/pixel-grid@0.2.0(transitive)
- Removed@mekari/pixel-icon@0.11.5(transitive)
- Removed@mekari/pixel-input@0.5.6(transitive)
- Removed@mekari/pixel-no-ssr@0.2.0(transitive)
- Removed@mekari/pixel-popover@0.8.6(transitive)
- Removed@mekari/pixel-popper@0.3.1(transitive)
- Removed@mekari/pixel-portal@0.2.0(transitive)
- Removed@mekari/pixel-pseudo-box@0.2.0(transitive)
- Removed@mekari/pixel-simple-grid@0.2.0(transitive)
- Removed@mekari/pixel-spinner@0.2.0(transitive)
- Removed@mekari/pixel-text@0.2.0(transitive)
- Removed@mekari/pixel-utils@0.4.0(transitive)
- Removed@mekari/pixel-visually-hidden@0.2.0(transitive)
Updated@mekari/pixel-box@0.2.1
Updated@mekari/pixel-button@0.2.7
Updated@mekari/pixel-flex@0.2.1
Updated@mekari/pixel-icon@0.11.6
Updated@mekari/pixel-input@0.5.7
Updated@mekari/pixel-popover@0.8.7
Updated@mekari/pixel-text@0.2.1
Updated@mekari/pixel-utils@0.5.0