@atlaskit/datetime-picker 13.7.4 → 13.7.6
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/CHANGELOG.md +16 -0
- package/dist/cjs/components/date-picker.js +1 -1
- package/dist/cjs/components/date-time-picker.js +34 -27
- package/dist/cjs/components/time-picker.js +1 -1
- package/dist/cjs/internal/menu.js +1 -2
- package/dist/es2019/components/date-picker.js +1 -1
- package/dist/es2019/components/date-time-picker.js +34 -27
- package/dist/es2019/components/time-picker.js +1 -1
- package/dist/es2019/internal/menu.js +1 -2
- package/dist/esm/components/date-picker.js +1 -1
- package/dist/esm/components/date-time-picker.js +34 -27
- package/dist/esm/components/time-picker.js +1 -1
- package/dist/esm/internal/menu.js +1 -2
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 13.7.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#125675](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/125675)
|
|
8
|
+
[`56a62aafb8d80`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/56a62aafb8d80) -
|
|
9
|
+
Refactoring to make locally defined variables that were assigned as spread props explicit.
|
|
10
|
+
|
|
11
|
+
## 13.7.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#123484](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/123484)
|
|
16
|
+
[`404b4cb52e659`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/404b4cb52e659) -
|
|
17
|
+
Launch layering in datetime picker to fix escape close issue
|
|
18
|
+
|
|
3
19
|
## 13.7.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -39,7 +39,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
39
39
|
* @jsx jsx
|
|
40
40
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
41
41
|
var packageName = "@atlaskit/datetime-picker";
|
|
42
|
-
var packageVersion = "13.7.
|
|
42
|
+
var packageVersion = "13.7.6";
|
|
43
43
|
var datePickerDefaultProps = {
|
|
44
44
|
appearance: 'default',
|
|
45
45
|
autoFocus: false,
|
|
@@ -34,7 +34,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
34
34
|
* @jsx jsx
|
|
35
35
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
36
36
|
var packageName = "@atlaskit/datetime-picker";
|
|
37
|
-
var packageVersion = "13.7.
|
|
37
|
+
var packageVersion = "13.7.6";
|
|
38
38
|
// Make DatePicker 50% the width of DateTimePicker
|
|
39
39
|
// If rendering an icon container, shrink the TimePicker
|
|
40
40
|
var datePickerContainerStyles = (0, _react2.css)({
|
|
@@ -211,34 +211,29 @@ var DateTimePickerComponent = exports.DateTimePickerWithoutAnalytics = /*#__PURE
|
|
|
211
211
|
value: function render() {
|
|
212
212
|
var _this$props = this.props,
|
|
213
213
|
ariaDescribedBy = _this$props['aria-describedby'],
|
|
214
|
+
appearance = _this$props.appearance,
|
|
214
215
|
autoFocus = _this$props.autoFocus,
|
|
216
|
+
dateFormat = _this$props.dateFormat,
|
|
217
|
+
datePickerProps = _this$props.datePickerProps,
|
|
218
|
+
datePickerSelectProps = _this$props.datePickerSelectProps,
|
|
215
219
|
id = _this$props.id,
|
|
216
220
|
innerProps = _this$props.innerProps,
|
|
217
221
|
isDisabled = _this$props.isDisabled,
|
|
222
|
+
isInvalid = _this$props.isInvalid,
|
|
223
|
+
locale = _this$props.locale,
|
|
218
224
|
name = _this$props.name,
|
|
225
|
+
spacing = _this$props.spacing,
|
|
226
|
+
testId = _this$props.testId,
|
|
227
|
+
timeFormat = _this$props.timeFormat,
|
|
219
228
|
timeIsEditable = _this$props.timeIsEditable,
|
|
220
|
-
dateFormat = _this$props.dateFormat,
|
|
221
|
-
datePickerProps = _this$props.datePickerProps,
|
|
222
|
-
datePickerSelectProps = _this$props.datePickerSelectProps,
|
|
223
229
|
timePickerProps = _this$props.timePickerProps,
|
|
224
230
|
timePickerSelectProps = _this$props.timePickerSelectProps,
|
|
225
|
-
times = _this$props.times
|
|
226
|
-
timeFormat = _this$props.timeFormat,
|
|
227
|
-
locale = _this$props.locale,
|
|
228
|
-
testId = _this$props.testId;
|
|
231
|
+
times = _this$props.times;
|
|
229
232
|
var _this$getSafeState = this.getSafeState(),
|
|
230
233
|
isFocused = _this$getSafeState.isFocused,
|
|
231
234
|
value = _this$getSafeState.value,
|
|
232
235
|
dateValue = _this$getSafeState.dateValue,
|
|
233
236
|
timeValue = _this$getSafeState.timeValue;
|
|
234
|
-
var bothProps = {
|
|
235
|
-
isDisabled: isDisabled,
|
|
236
|
-
onBlur: this.onBlur,
|
|
237
|
-
onFocus: this.onFocus,
|
|
238
|
-
isInvalid: this.props.isInvalid,
|
|
239
|
-
appearance: this.props.appearance,
|
|
240
|
-
spacing: this.props.spacing
|
|
241
|
-
};
|
|
242
237
|
var _datePickerSelectProp = datePickerSelectProps.styles,
|
|
243
238
|
datePickerStyles = _datePickerSelectProp === void 0 ? {} : _datePickerSelectProp;
|
|
244
239
|
var _timePickerSelectProp = timePickerSelectProps.styles,
|
|
@@ -258,10 +253,10 @@ var DateTimePickerComponent = exports.DateTimePickerWithoutAnalytics = /*#__PURE
|
|
|
258
253
|
// Don't use Date or TimePicker's because they can't be customised
|
|
259
254
|
var isClearable = Boolean(dateValue || timeValue);
|
|
260
255
|
return (0, _react2.jsx)(_dateTimePickerContainer.DateTimePickerContainer, {
|
|
261
|
-
appearance:
|
|
256
|
+
appearance: appearance,
|
|
262
257
|
isDisabled: isDisabled,
|
|
263
258
|
isFocused: isFocused,
|
|
264
|
-
isInvalid:
|
|
259
|
+
isInvalid: isInvalid,
|
|
265
260
|
testId: testId,
|
|
266
261
|
innerProps: innerProps
|
|
267
262
|
}, (0, _react2.jsx)("input", {
|
|
@@ -271,28 +266,40 @@ var DateTimePickerComponent = exports.DateTimePickerWithoutAnalytics = /*#__PURE
|
|
|
271
266
|
"data-testid": testId && "".concat(testId, "--input")
|
|
272
267
|
}), (0, _react2.jsx)("div", {
|
|
273
268
|
css: datePickerContainerStyles
|
|
274
|
-
}, (0, _react2.jsx)(_datePicker.default, (0, _extends2.default)({
|
|
269
|
+
}, (0, _react2.jsx)(_datePicker.default, (0, _extends2.default)({
|
|
270
|
+
appearance: appearance,
|
|
275
271
|
autoFocus: autoFocus,
|
|
276
272
|
dateFormat: dateFormat,
|
|
277
273
|
hideIcon: true,
|
|
278
274
|
id: id,
|
|
275
|
+
isDisabled: isDisabled,
|
|
276
|
+
isInvalid: isInvalid,
|
|
277
|
+
locale: locale,
|
|
278
|
+
onBlur: this.onBlur,
|
|
279
279
|
onChange: this.onDateChange,
|
|
280
|
+
onFocus: this.onFocus,
|
|
280
281
|
selectProps: mergedDatePickerSelectProps,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
spacing: spacing,
|
|
283
|
+
testId: testId && "".concat(testId, "--datepicker"),
|
|
284
|
+
value: dateValue
|
|
284
285
|
}, datePickerProps))), (0, _react2.jsx)("div", {
|
|
285
286
|
css: timePickerContainerStyles
|
|
286
|
-
}, (0, _react2.jsx)(_timePicker.default, (0, _extends2.default)({
|
|
287
|
+
}, (0, _react2.jsx)(_timePicker.default, (0, _extends2.default)({
|
|
288
|
+
appearance: appearance,
|
|
287
289
|
hideIcon: true,
|
|
290
|
+
isDisabled: isDisabled,
|
|
291
|
+
isInvalid: isInvalid,
|
|
292
|
+
locale: locale,
|
|
293
|
+
onBlur: this.onBlur,
|
|
288
294
|
onChange: this.onTimeChange,
|
|
295
|
+
onFocus: this.onFocus,
|
|
289
296
|
selectProps: mergedTimePickerSelectProps,
|
|
290
|
-
|
|
297
|
+
spacing: spacing,
|
|
298
|
+
testId: testId && "".concat(testId, "--timepicker"),
|
|
299
|
+
timeFormat: timeFormat,
|
|
291
300
|
timeIsEditable: timeIsEditable,
|
|
292
301
|
times: times,
|
|
293
|
-
|
|
294
|
-
locale: locale,
|
|
295
|
-
testId: testId && "".concat(testId, "--timepicker")
|
|
302
|
+
value: timeValue
|
|
296
303
|
}, timePickerProps))), isClearable && !isDisabled ? (0, _react2.jsx)("button", {
|
|
297
304
|
css: iconContainerStyles,
|
|
298
305
|
onClick: this.onClear,
|
|
@@ -36,7 +36,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
36
36
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // eslint-disable-next-line no-restricted-imports
|
|
37
37
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
38
38
|
var packageName = "@atlaskit/datetime-picker";
|
|
39
|
-
var packageVersion = "13.7.
|
|
39
|
+
var packageVersion = "13.7.6";
|
|
40
40
|
var menuStyles = {
|
|
41
41
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
42
42
|
position: 'static',
|
|
@@ -10,7 +10,6 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _dateFns = require("date-fns");
|
|
11
11
|
var _calendar = _interopRequireDefault(require("@atlaskit/calendar"));
|
|
12
12
|
var _layering = require("@atlaskit/layering");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
14
|
var _constants = require("@atlaskit/theme/constants");
|
|
16
15
|
var _fixedLayer = _interopRequireDefault(require("../internal/fixed-layer"));
|
|
@@ -43,7 +42,7 @@ var Menu = exports.Menu = function Menu(_ref) {
|
|
|
43
42
|
var selectProps = _ref.selectProps,
|
|
44
43
|
innerProps = _ref.innerProps;
|
|
45
44
|
return (0, _react.jsx)(_layering.UNSAFE_LAYERING, {
|
|
46
|
-
isDisabled:
|
|
45
|
+
isDisabled: false
|
|
47
46
|
}, (0, _react.jsx)(_fixedLayer.default, {
|
|
48
47
|
inputValue: selectProps.inputValue,
|
|
49
48
|
containerRef: selectProps.calendarContainerRef,
|
|
@@ -21,7 +21,7 @@ import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date'
|
|
|
21
21
|
import { convertTokens } from '../internal/parse-tokens';
|
|
22
22
|
import { makeSingleValue } from '../internal/single-value';
|
|
23
23
|
const packageName = "@atlaskit/datetime-picker";
|
|
24
|
-
const packageVersion = "13.7.
|
|
24
|
+
const packageVersion = "13.7.6";
|
|
25
25
|
const datePickerDefaultProps = {
|
|
26
26
|
appearance: 'default',
|
|
27
27
|
autoFocus: false,
|
|
@@ -20,7 +20,7 @@ import { convertTokens } from '../internal/parse-tokens';
|
|
|
20
20
|
import DatePicker from './date-picker';
|
|
21
21
|
import TimePicker from './time-picker';
|
|
22
22
|
const packageName = "@atlaskit/datetime-picker";
|
|
23
|
-
const packageVersion = "13.7.
|
|
23
|
+
const packageVersion = "13.7.6";
|
|
24
24
|
// Make DatePicker 50% the width of DateTimePicker
|
|
25
25
|
// If rendering an icon container, shrink the TimePicker
|
|
26
26
|
const datePickerContainerStyles = css({
|
|
@@ -193,21 +193,24 @@ class DateTimePickerComponent extends React.Component {
|
|
|
193
193
|
render() {
|
|
194
194
|
const {
|
|
195
195
|
'aria-describedby': ariaDescribedBy,
|
|
196
|
+
appearance,
|
|
196
197
|
autoFocus,
|
|
198
|
+
dateFormat,
|
|
199
|
+
datePickerProps,
|
|
200
|
+
datePickerSelectProps,
|
|
197
201
|
id,
|
|
198
202
|
innerProps,
|
|
199
203
|
isDisabled,
|
|
204
|
+
isInvalid,
|
|
205
|
+
locale,
|
|
200
206
|
name,
|
|
207
|
+
spacing,
|
|
208
|
+
testId,
|
|
209
|
+
timeFormat,
|
|
201
210
|
timeIsEditable,
|
|
202
|
-
dateFormat,
|
|
203
|
-
datePickerProps,
|
|
204
|
-
datePickerSelectProps,
|
|
205
211
|
timePickerProps,
|
|
206
212
|
timePickerSelectProps,
|
|
207
|
-
times
|
|
208
|
-
timeFormat,
|
|
209
|
-
locale,
|
|
210
|
-
testId
|
|
213
|
+
times
|
|
211
214
|
} = this.props;
|
|
212
215
|
const {
|
|
213
216
|
isFocused,
|
|
@@ -215,14 +218,6 @@ class DateTimePickerComponent extends React.Component {
|
|
|
215
218
|
dateValue,
|
|
216
219
|
timeValue
|
|
217
220
|
} = this.getSafeState();
|
|
218
|
-
const bothProps = {
|
|
219
|
-
isDisabled,
|
|
220
|
-
onBlur: this.onBlur,
|
|
221
|
-
onFocus: this.onFocus,
|
|
222
|
-
isInvalid: this.props.isInvalid,
|
|
223
|
-
appearance: this.props.appearance,
|
|
224
|
-
spacing: this.props.spacing
|
|
225
|
-
};
|
|
226
221
|
const {
|
|
227
222
|
styles: datePickerStyles = {}
|
|
228
223
|
} = datePickerSelectProps;
|
|
@@ -246,10 +241,10 @@ class DateTimePickerComponent extends React.Component {
|
|
|
246
241
|
// Don't use Date or TimePicker's because they can't be customised
|
|
247
242
|
const isClearable = Boolean(dateValue || timeValue);
|
|
248
243
|
return jsx(DateTimePickerContainer, {
|
|
249
|
-
appearance:
|
|
244
|
+
appearance: appearance,
|
|
250
245
|
isDisabled: isDisabled,
|
|
251
246
|
isFocused: isFocused,
|
|
252
|
-
isInvalid:
|
|
247
|
+
isInvalid: isInvalid,
|
|
253
248
|
testId: testId,
|
|
254
249
|
innerProps: innerProps
|
|
255
250
|
}, jsx("input", {
|
|
@@ -259,28 +254,40 @@ class DateTimePickerComponent extends React.Component {
|
|
|
259
254
|
"data-testid": testId && `${testId}--input`
|
|
260
255
|
}), jsx("div", {
|
|
261
256
|
css: datePickerContainerStyles
|
|
262
|
-
}, jsx(DatePicker, _extends({
|
|
257
|
+
}, jsx(DatePicker, _extends({
|
|
258
|
+
appearance: appearance,
|
|
263
259
|
autoFocus: autoFocus,
|
|
264
260
|
dateFormat: dateFormat,
|
|
265
261
|
hideIcon: true,
|
|
266
262
|
id: id,
|
|
263
|
+
isDisabled: isDisabled,
|
|
264
|
+
isInvalid: isInvalid,
|
|
265
|
+
locale: locale,
|
|
266
|
+
onBlur: this.onBlur,
|
|
267
267
|
onChange: this.onDateChange,
|
|
268
|
+
onFocus: this.onFocus,
|
|
268
269
|
selectProps: mergedDatePickerSelectProps,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
spacing: spacing,
|
|
271
|
+
testId: testId && `${testId}--datepicker`,
|
|
272
|
+
value: dateValue
|
|
272
273
|
}, datePickerProps))), jsx("div", {
|
|
273
274
|
css: timePickerContainerStyles
|
|
274
|
-
}, jsx(TimePicker, _extends({
|
|
275
|
+
}, jsx(TimePicker, _extends({
|
|
276
|
+
appearance: appearance,
|
|
275
277
|
hideIcon: true,
|
|
278
|
+
isDisabled: isDisabled,
|
|
279
|
+
isInvalid: isInvalid,
|
|
280
|
+
locale: locale,
|
|
281
|
+
onBlur: this.onBlur,
|
|
276
282
|
onChange: this.onTimeChange,
|
|
283
|
+
onFocus: this.onFocus,
|
|
277
284
|
selectProps: mergedTimePickerSelectProps,
|
|
278
|
-
|
|
285
|
+
spacing: spacing,
|
|
286
|
+
testId: testId && `${testId}--timepicker`,
|
|
287
|
+
timeFormat: timeFormat,
|
|
279
288
|
timeIsEditable: timeIsEditable,
|
|
280
289
|
times: times,
|
|
281
|
-
|
|
282
|
-
locale: locale,
|
|
283
|
-
testId: testId && `${testId}--timepicker`
|
|
290
|
+
value: timeValue
|
|
284
291
|
}, timePickerProps))), isClearable && !isDisabled ? jsx("button", {
|
|
285
292
|
css: iconContainerStyles,
|
|
286
293
|
onClick: this.onClear,
|
|
@@ -16,7 +16,7 @@ import parseTime from '../internal/parse-time';
|
|
|
16
16
|
import { convertTokens } from '../internal/parse-tokens';
|
|
17
17
|
import { makeSingleValue } from '../internal/single-value';
|
|
18
18
|
const packageName = "@atlaskit/datetime-picker";
|
|
19
|
-
const packageVersion = "13.7.
|
|
19
|
+
const packageVersion = "13.7.6";
|
|
20
20
|
const menuStyles = {
|
|
21
21
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
22
22
|
position: 'static',
|
|
@@ -8,7 +8,6 @@ import { css, jsx } from '@emotion/react';
|
|
|
8
8
|
import { isValid, parseISO } from 'date-fns';
|
|
9
9
|
import Calendar from '@atlaskit/calendar';
|
|
10
10
|
import { UNSAFE_LAYERING } from '@atlaskit/layering';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
import { N0, N50A, N60A } from '@atlaskit/theme/colors';
|
|
13
12
|
import { layers } from '@atlaskit/theme/constants';
|
|
14
13
|
import FixedLayer from '../internal/fixed-layer';
|
|
@@ -35,7 +34,7 @@ export const Menu = ({
|
|
|
35
34
|
selectProps,
|
|
36
35
|
innerProps
|
|
37
36
|
}) => jsx(UNSAFE_LAYERING, {
|
|
38
|
-
isDisabled:
|
|
37
|
+
isDisabled: false
|
|
39
38
|
}, jsx(FixedLayer, {
|
|
40
39
|
inputValue: selectProps.inputValue,
|
|
41
40
|
containerRef: selectProps.calendarContainerRef,
|
|
@@ -32,7 +32,7 @@ import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date'
|
|
|
32
32
|
import { convertTokens } from '../internal/parse-tokens';
|
|
33
33
|
import { makeSingleValue } from '../internal/single-value';
|
|
34
34
|
var packageName = "@atlaskit/datetime-picker";
|
|
35
|
-
var packageVersion = "13.7.
|
|
35
|
+
var packageVersion = "13.7.6";
|
|
36
36
|
var datePickerDefaultProps = {
|
|
37
37
|
appearance: 'default',
|
|
38
38
|
autoFocus: false,
|
|
@@ -30,7 +30,7 @@ import { convertTokens } from '../internal/parse-tokens';
|
|
|
30
30
|
import DatePicker from './date-picker';
|
|
31
31
|
import TimePicker from './time-picker';
|
|
32
32
|
var packageName = "@atlaskit/datetime-picker";
|
|
33
|
-
var packageVersion = "13.7.
|
|
33
|
+
var packageVersion = "13.7.6";
|
|
34
34
|
// Make DatePicker 50% the width of DateTimePicker
|
|
35
35
|
// If rendering an icon container, shrink the TimePicker
|
|
36
36
|
var datePickerContainerStyles = css({
|
|
@@ -207,34 +207,29 @@ var DateTimePickerComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
207
207
|
value: function render() {
|
|
208
208
|
var _this$props = this.props,
|
|
209
209
|
ariaDescribedBy = _this$props['aria-describedby'],
|
|
210
|
+
appearance = _this$props.appearance,
|
|
210
211
|
autoFocus = _this$props.autoFocus,
|
|
212
|
+
dateFormat = _this$props.dateFormat,
|
|
213
|
+
datePickerProps = _this$props.datePickerProps,
|
|
214
|
+
datePickerSelectProps = _this$props.datePickerSelectProps,
|
|
211
215
|
id = _this$props.id,
|
|
212
216
|
innerProps = _this$props.innerProps,
|
|
213
217
|
isDisabled = _this$props.isDisabled,
|
|
218
|
+
isInvalid = _this$props.isInvalid,
|
|
219
|
+
locale = _this$props.locale,
|
|
214
220
|
name = _this$props.name,
|
|
221
|
+
spacing = _this$props.spacing,
|
|
222
|
+
testId = _this$props.testId,
|
|
223
|
+
timeFormat = _this$props.timeFormat,
|
|
215
224
|
timeIsEditable = _this$props.timeIsEditable,
|
|
216
|
-
dateFormat = _this$props.dateFormat,
|
|
217
|
-
datePickerProps = _this$props.datePickerProps,
|
|
218
|
-
datePickerSelectProps = _this$props.datePickerSelectProps,
|
|
219
225
|
timePickerProps = _this$props.timePickerProps,
|
|
220
226
|
timePickerSelectProps = _this$props.timePickerSelectProps,
|
|
221
|
-
times = _this$props.times
|
|
222
|
-
timeFormat = _this$props.timeFormat,
|
|
223
|
-
locale = _this$props.locale,
|
|
224
|
-
testId = _this$props.testId;
|
|
227
|
+
times = _this$props.times;
|
|
225
228
|
var _this$getSafeState = this.getSafeState(),
|
|
226
229
|
isFocused = _this$getSafeState.isFocused,
|
|
227
230
|
value = _this$getSafeState.value,
|
|
228
231
|
dateValue = _this$getSafeState.dateValue,
|
|
229
232
|
timeValue = _this$getSafeState.timeValue;
|
|
230
|
-
var bothProps = {
|
|
231
|
-
isDisabled: isDisabled,
|
|
232
|
-
onBlur: this.onBlur,
|
|
233
|
-
onFocus: this.onFocus,
|
|
234
|
-
isInvalid: this.props.isInvalid,
|
|
235
|
-
appearance: this.props.appearance,
|
|
236
|
-
spacing: this.props.spacing
|
|
237
|
-
};
|
|
238
233
|
var _datePickerSelectProp = datePickerSelectProps.styles,
|
|
239
234
|
datePickerStyles = _datePickerSelectProp === void 0 ? {} : _datePickerSelectProp;
|
|
240
235
|
var _timePickerSelectProp = timePickerSelectProps.styles,
|
|
@@ -254,10 +249,10 @@ var DateTimePickerComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
254
249
|
// Don't use Date or TimePicker's because they can't be customised
|
|
255
250
|
var isClearable = Boolean(dateValue || timeValue);
|
|
256
251
|
return jsx(DateTimePickerContainer, {
|
|
257
|
-
appearance:
|
|
252
|
+
appearance: appearance,
|
|
258
253
|
isDisabled: isDisabled,
|
|
259
254
|
isFocused: isFocused,
|
|
260
|
-
isInvalid:
|
|
255
|
+
isInvalid: isInvalid,
|
|
261
256
|
testId: testId,
|
|
262
257
|
innerProps: innerProps
|
|
263
258
|
}, jsx("input", {
|
|
@@ -267,28 +262,40 @@ var DateTimePickerComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
267
262
|
"data-testid": testId && "".concat(testId, "--input")
|
|
268
263
|
}), jsx("div", {
|
|
269
264
|
css: datePickerContainerStyles
|
|
270
|
-
}, jsx(DatePicker, _extends({
|
|
265
|
+
}, jsx(DatePicker, _extends({
|
|
266
|
+
appearance: appearance,
|
|
271
267
|
autoFocus: autoFocus,
|
|
272
268
|
dateFormat: dateFormat,
|
|
273
269
|
hideIcon: true,
|
|
274
270
|
id: id,
|
|
271
|
+
isDisabled: isDisabled,
|
|
272
|
+
isInvalid: isInvalid,
|
|
273
|
+
locale: locale,
|
|
274
|
+
onBlur: this.onBlur,
|
|
275
275
|
onChange: this.onDateChange,
|
|
276
|
+
onFocus: this.onFocus,
|
|
276
277
|
selectProps: mergedDatePickerSelectProps,
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
spacing: spacing,
|
|
279
|
+
testId: testId && "".concat(testId, "--datepicker"),
|
|
280
|
+
value: dateValue
|
|
280
281
|
}, datePickerProps))), jsx("div", {
|
|
281
282
|
css: timePickerContainerStyles
|
|
282
|
-
}, jsx(TimePicker, _extends({
|
|
283
|
+
}, jsx(TimePicker, _extends({
|
|
284
|
+
appearance: appearance,
|
|
283
285
|
hideIcon: true,
|
|
286
|
+
isDisabled: isDisabled,
|
|
287
|
+
isInvalid: isInvalid,
|
|
288
|
+
locale: locale,
|
|
289
|
+
onBlur: this.onBlur,
|
|
284
290
|
onChange: this.onTimeChange,
|
|
291
|
+
onFocus: this.onFocus,
|
|
285
292
|
selectProps: mergedTimePickerSelectProps,
|
|
286
|
-
|
|
293
|
+
spacing: spacing,
|
|
294
|
+
testId: testId && "".concat(testId, "--timepicker"),
|
|
295
|
+
timeFormat: timeFormat,
|
|
287
296
|
timeIsEditable: timeIsEditable,
|
|
288
297
|
times: times,
|
|
289
|
-
|
|
290
|
-
locale: locale,
|
|
291
|
-
testId: testId && "".concat(testId, "--timepicker")
|
|
298
|
+
value: timeValue
|
|
292
299
|
}, timePickerProps))), isClearable && !isDisabled ? jsx("button", {
|
|
293
300
|
css: iconContainerStyles,
|
|
294
301
|
onClick: this.onClear,
|
|
@@ -28,7 +28,7 @@ import parseTime from '../internal/parse-time';
|
|
|
28
28
|
import { convertTokens } from '../internal/parse-tokens';
|
|
29
29
|
import { makeSingleValue } from '../internal/single-value';
|
|
30
30
|
var packageName = "@atlaskit/datetime-picker";
|
|
31
|
-
var packageVersion = "13.7.
|
|
31
|
+
var packageVersion = "13.7.6";
|
|
32
32
|
var menuStyles = {
|
|
33
33
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
34
34
|
position: 'static',
|
|
@@ -8,7 +8,6 @@ import { css, jsx } from '@emotion/react';
|
|
|
8
8
|
import { isValid, parseISO } from 'date-fns';
|
|
9
9
|
import Calendar from '@atlaskit/calendar';
|
|
10
10
|
import { UNSAFE_LAYERING } from '@atlaskit/layering';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
import { N0, N50A, N60A } from '@atlaskit/theme/colors';
|
|
13
12
|
import { layers } from '@atlaskit/theme/constants';
|
|
14
13
|
import FixedLayer from '../internal/fixed-layer';
|
|
@@ -35,7 +34,7 @@ export var Menu = function Menu(_ref) {
|
|
|
35
34
|
var selectProps = _ref.selectProps,
|
|
36
35
|
innerProps = _ref.innerProps;
|
|
37
36
|
return jsx(UNSAFE_LAYERING, {
|
|
38
|
-
isDisabled:
|
|
37
|
+
isDisabled: false
|
|
39
38
|
}, jsx(FixedLayer, {
|
|
40
39
|
inputValue: selectProps.inputValue,
|
|
41
40
|
containerRef: selectProps.calendarContainerRef,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "13.7.
|
|
3
|
+
"version": "13.7.6",
|
|
4
4
|
"description": "A date time picker allows the user to select an associated date and time.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
43
43
|
"@atlaskit/calendar": "^14.4.0",
|
|
44
44
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
45
|
-
"@atlaskit/icon": "^22.
|
|
45
|
+
"@atlaskit/icon": "^22.10.0",
|
|
46
46
|
"@atlaskit/layering": "^0.3.0",
|
|
47
47
|
"@atlaskit/locale": "^2.7.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
49
49
|
"@atlaskit/popper": "^6.1.0",
|
|
50
50
|
"@atlaskit/select": "^17.11.0",
|
|
51
51
|
"@atlaskit/theme": "^12.11.0",
|
|
52
|
-
"@atlaskit/tokens": "^1.
|
|
52
|
+
"@atlaskit/tokens": "^1.57.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@emotion/react": "^11.7.1",
|
|
55
55
|
"date-fns": "^2.17.0",
|
|
@@ -104,9 +104,6 @@
|
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
"platform-feature-flags": {
|
|
107
|
-
"platform.design-system-team.layering_qmiw3": {
|
|
108
|
-
"type": "boolean"
|
|
109
|
-
},
|
|
110
107
|
"platform.design-system-team.date-picker-input-a11y-fix_cbbxs": {
|
|
111
108
|
"type": "boolean"
|
|
112
109
|
},
|