File tree Expand file tree Collapse file tree 5 files changed +16
-11
lines changed
packages/pf3-component-mapper
src/form-fields/date-time-picker Expand file tree Collapse file tree 5 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 45
45
"eslint-plugin-react" : " ^7.11.1" ,
46
46
"html-webpack-plugin" : " ^3.2.0" ,
47
47
"mini-css-extract-plugin" : " ^0.4.4" ,
48
- "node-sass" : " ^4.10 .0" ,
48
+ "node-sass" : " ^4.12 .0" ,
49
49
"patternfly-react" : " ^2.28.2" ,
50
50
"prop-types" : " ^15.6.2" ,
51
51
"react" : " ^16.6.3" ,
58
58
"rollup-plugin-commonjs" : " ^10.1.0" ,
59
59
"rollup-plugin-node-globals" : " ^1.4.0" ,
60
60
"rollup-plugin-node-resolve" : " ^5.2.0" ,
61
+ "rollup-plugin-postcss" : " ^2.0.3" ,
61
62
"rollup-plugin-replace" : " ^2.2.0" ,
62
- "rollup-plugin-sass" : " ^1.2.2" ,
63
63
"rollup-plugin-size-snapshot" : " ^0.10.0" ,
64
64
"rollup-plugin-terser" : " ^5.1.2" ,
65
65
"sass-loader" : " ^7.1.0" ,
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ import replace from 'rollup-plugin-replace';
5
5
import nodeGlobals from 'rollup-plugin-node-globals' ;
6
6
import { terser } from 'rollup-plugin-terser' ;
7
7
import { sizeSnapshot } from 'rollup-plugin-size-snapshot' ;
8
- import sass from 'rollup-plugin-sass' ;
9
8
import async from 'rollup-plugin-async' ;
9
+ import postcss from 'rollup-plugin-postcss' ;
10
10
11
11
const globals = {
12
12
react : 'React' ,
@@ -23,9 +23,14 @@ const babelOptions = {
23
23
24
24
const commonjsOptions = {
25
25
ignoreGlobal : true ,
26
- include : / n o d e _ m o d u l e s / ,
26
+ include : [
27
+ / n o d e _ m o d u l e s / ,
28
+ '../../node_modules/**' ,
29
+
30
+ ] ,
27
31
namedExports : {
28
32
'../react-form-renderer/dist/index.js' : [ 'composeValidators' ] ,
33
+ '../../node_modules/react-day-picker/DayPicker.js' : [ 'DayPicker' ] ,
29
34
} ,
30
35
} ;
31
36
@@ -42,17 +47,17 @@ export default [{
42
47
plugins : [
43
48
async ( ) ,
44
49
nodeResolve ( ) ,
45
- babel ( babelOptions ) ,
46
50
commonjs ( commonjsOptions ) ,
51
+ babel ( babelOptions ) ,
47
52
nodeGlobals ( ) , // Wait for https://github.com/cssinjs/jss/pull/893
48
53
replace ( { 'process.env.NODE_ENV' : JSON . stringify ( 'production' ) } ) ,
49
54
sizeSnapshot ( { snapshotPath : 'size-snapshot.json' } ) ,
50
55
terser ( {
51
56
keep_classnames : true ,
52
57
keep_fnames : true ,
53
58
} ) ,
54
- sass ( {
55
- insert : true ,
59
+ postcss ( {
60
+ inject : true ,
56
61
} ) ,
57
62
] ,
58
63
} ] ;
Original file line number Diff line number Diff line change 1
- @import ' ~react-day-picker/lib/style.css' ;
2
-
3
1
.picker-input [readonly ]:hover {
4
2
border-color : #7dc3e8 ;
5
3
}
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import PickerInput from './picker-input';
5
5
import PopoverRoot from './popover-root' ;
6
6
import { createDisabledDays } from './helpers' ;
7
7
8
+ import 'react-day-picker/lib/style.css' ;
9
+
8
10
const selectValidDate = ( newDate , disabledDays ) => {
9
11
const { after, before } = disabledDays . find ( item => typeof item === 'object' && ! ( item instanceof Date ) ) || { } ;
10
12
if ( before && newDate < before ) {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Navbar from './navbar';
4
4
import MonthSelector from './month-selector' ;
5
5
import YearSelector from './year-selector' ;
6
6
import TimePicker from './time-picker' ;
7
- import DayPicker from 'react-day-picker/DayPicker' ;
7
+ import * as DayPicker from 'react-day-picker/DayPicker' ;
8
8
import MomentLocaleUtils from 'react-day-picker/moment' ;
9
9
import './date-picker-styles.scss' ;
10
10
@@ -54,7 +54,7 @@ const PopoverRoot = ({
54
54
onPreviousClick = { ( ) => yearChange ( selectedDay ? selectedDay . getFullYear ( ) - 1 : new Date ( ) . getFullYear ( ) - 1 ) }
55
55
/> )
56
56
:
57
- < DayPicker
57
+ < DayPicker . DayPicker
58
58
onDayClick = { onDayClick }
59
59
selectedDays = { selectedDay }
60
60
month = { selectedDay }
You can’t perform that action at this time.
0 commit comments