@autoguru/overdrive 4.48.0-next.1 → 4.48.0-next.3
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.
- package/dist/components/Columns/Columns.d.ts.map +1 -1
- package/dist/components/Columns/Columns.js +1 -3
- package/dist/components/DateInput/DateInput.d.ts +7 -1
- package/dist/components/DateInput/DateInput.d.ts.map +1 -1
- package/dist/components/DateInput/DateInput.js +11 -10
- package/dist/components/Popover/Popover.css.d.ts.map +1 -1
- package/dist/components/Popover/Popover.css.js +2 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Columns.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/Columns.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACb,cAAc,EAGd,SAAS,EAET,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EAAE,WAAW,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,MAAM,WAAW,YAChB,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,KAAK,CAAC,EAC9C,MAAM,CAAC,YAAY;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9C;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1D;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC,MAAM,OAAO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C;CAChB;AAED,eAAO,MAAM,aAAa,0CAAiD,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,OAAO,+FAmEnB,CAAC"}
|
|
@@ -70,9 +70,7 @@ export const Columns = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
70
70
|
noWrap,
|
|
71
71
|
wrappingDirection
|
|
72
72
|
}), className],
|
|
73
|
-
odComponent: 'columns'
|
|
74
|
-
display: 'flex',
|
|
75
|
-
flexDirection: 'row'
|
|
73
|
+
odComponent: 'columns'
|
|
76
74
|
}));
|
|
77
75
|
return /*#__PURE__*/_jsx(Component, _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
78
76
|
ref: ref,
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type DatePickerProps } from '../DatePicker/DatePicker';
|
|
3
3
|
type FilteredDatePickerProps = Pick<DatePickerProps, 'calendarOptions' | 'lang'>;
|
|
4
|
+
export interface DateInputProps extends FilteredDatePickerProps, Partial<Pick<HTMLInputElement, 'min' | 'max'>> {
|
|
5
|
+
/**
|
|
6
|
+
* Accessible label for the date input field, can be the same or different to the `placeholder` content
|
|
7
|
+
*/
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
4
10
|
/**
|
|
5
11
|
* Input component for structured date entry with integrated calendar date picker.
|
|
6
12
|
*
|
|
@@ -42,6 +48,6 @@ type FilteredDatePickerProps = Pick<DatePickerProps, 'calendarOptions' | 'lang'>
|
|
|
42
48
|
* />
|
|
43
49
|
* ```
|
|
44
50
|
*/
|
|
45
|
-
export declare const DateInput: React.ForwardRefExoticComponent<
|
|
51
|
+
export declare const DateInput: React.ForwardRefExoticComponent<DateInputProps & import("../private/InputBase/withEnhancedInput").EnhanceInputPrimitiveProps<HTMLInputElement> & import("../private/InputBase/withEnhancedInput").EventHandlers<HTMLInputElement> & import("../private/InputBase/withEnhancedInput").ValidationProps & React.RefAttributes<HTMLInputElement>>;
|
|
46
52
|
export {};
|
|
47
53
|
//# sourceMappingURL=DateInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../lib/components/DateInput/DateInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAMN,MAAM,OAAO,CAAC;AAWf,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAM5E,KAAK,uBAAuB,GAAG,IAAI,CAClC,eAAe,EACf,iBAAiB,GAAG,MAAM,CAC1B,CAAC;
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../lib/components/DateInput/DateInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAMN,MAAM,OAAO,CAAC;AAWf,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAM5E,KAAK,uBAAuB,GAAG,IAAI,CAClC,eAAe,EACf,iBAAiB,GAAG,MAAM,CAC1B,CAAC;AAEF,MAAM,WAAW,cAChB,SAAQ,uBAAuB,EAC9B,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,KAAK,CAAC,CAAC;IAC/C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAmCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,SAAS,+UAwJrB,CAAC"}
|
|
@@ -90,6 +90,7 @@ export const DateInput = withEnhancedInput(({
|
|
|
90
90
|
calendarOptions,
|
|
91
91
|
eventHandlers,
|
|
92
92
|
field,
|
|
93
|
+
label,
|
|
93
94
|
lang,
|
|
94
95
|
max,
|
|
95
96
|
min,
|
|
@@ -104,7 +105,6 @@ export const DateInput = withEnhancedInput(({
|
|
|
104
105
|
const {
|
|
105
106
|
disabled,
|
|
106
107
|
name,
|
|
107
|
-
onChange,
|
|
108
108
|
value
|
|
109
109
|
} = field;
|
|
110
110
|
const datePickerRef = useRef(null);
|
|
@@ -113,10 +113,6 @@ export const DateInput = withEnhancedInput(({
|
|
|
113
113
|
locale
|
|
114
114
|
} = useLocale();
|
|
115
115
|
const [selectedDate, setSelectedDate] = useState(value ? safeParseDateString(value) : null);
|
|
116
|
-
const minMaxValues = {
|
|
117
|
-
minValue: min ? safeParseDateString(min) : undefined,
|
|
118
|
-
maxValue: max ? safeParseDateString(max) : undefined
|
|
119
|
-
};
|
|
120
116
|
useEffect(() => {
|
|
121
117
|
const parsedDate = value ? safeParseDateString(value) : null;
|
|
122
118
|
setSelectedDate(parsedDate);
|
|
@@ -126,7 +122,7 @@ export const DateInput = withEnhancedInput(({
|
|
|
126
122
|
const dateString = formatDateValue(date);
|
|
127
123
|
|
|
128
124
|
// Trigger the withEnhancedInput onChange mechanism
|
|
129
|
-
if (eventHandlers.onChange
|
|
125
|
+
if (eventHandlers.onChange) {
|
|
130
126
|
// Create a synthetic event for compatibility with withEnhancedInput
|
|
131
127
|
const event = {
|
|
132
128
|
currentTarget: {
|
|
@@ -138,7 +134,7 @@ export const DateInput = withEnhancedInput(({
|
|
|
138
134
|
};
|
|
139
135
|
eventHandlers.onChange(event);
|
|
140
136
|
}
|
|
141
|
-
}, [eventHandlers
|
|
137
|
+
}, [eventHandlers]);
|
|
142
138
|
const createSyntheticHandler = useCallback(handler => {
|
|
143
139
|
if (!handler) return;
|
|
144
140
|
return e => {
|
|
@@ -156,8 +152,11 @@ export const DateInput = withEnhancedInput(({
|
|
|
156
152
|
onBlur: handleBlur,
|
|
157
153
|
onChange: handleDateChange,
|
|
158
154
|
onFocus: handleFocus,
|
|
159
|
-
value: selectedDate
|
|
160
|
-
|
|
155
|
+
value: selectedDate,
|
|
156
|
+
label,
|
|
157
|
+
minValue: min ? safeParseDateString(min) : undefined,
|
|
158
|
+
maxValue: max ? safeParseDateString(max) : undefined
|
|
159
|
+
});
|
|
161
160
|
const dateFieldState = useDateFieldState(_objectSpread(_objectSpread({}, hookProps), {}, {
|
|
162
161
|
locale,
|
|
163
162
|
createCalendar
|
|
@@ -194,7 +193,9 @@ export const DateInput = withEnhancedInput(({
|
|
|
194
193
|
id: id,
|
|
195
194
|
name: name,
|
|
196
195
|
value: formatDateValue(selectedDate),
|
|
197
|
-
|
|
196
|
+
min: min,
|
|
197
|
+
max: max,
|
|
198
|
+
calendarOptions: _objectSpread(_objectSpread({}, defaultCalendarOptions), calendarOptions),
|
|
198
199
|
disabled: disabled,
|
|
199
200
|
lang: lang,
|
|
200
201
|
size: size,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Popover/Popover.css.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,QAiBvB,CAAC;AAEH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"Popover.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Popover/Popover.css.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,QAiBvB,CAAC;AAEH,eAAO,MAAM,YAAY,QAevB,CAAC;AAEH,eAAO,MAAM,eAAe,QAY1B,CAAC"}
|
|
@@ -27,6 +27,7 @@ export const triggerStyle = style({
|
|
|
27
27
|
[cssLayerComponent]: {
|
|
28
28
|
background: 'transparent',
|
|
29
29
|
border: 'none',
|
|
30
|
+
color: 'inherit',
|
|
30
31
|
cursor: 'pointer',
|
|
31
32
|
padding: 0,
|
|
32
33
|
selectors: {
|
|
@@ -46,7 +47,7 @@ export const fullScreenStyle = style({
|
|
|
46
47
|
position: 'fixed',
|
|
47
48
|
right: 0,
|
|
48
49
|
top: 0,
|
|
49
|
-
zIndex:
|
|
50
|
+
zIndex: 2000 // higher than modal
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
}, "fullScreenStyle");
|
package/package.json
CHANGED