@atlaskit/datetime-picker 12.7.11 → 12.7.12

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/datetime-picker
2
2
 
3
+ ## 12.7.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5fae4d61ff7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5fae4d61ff7) - Move event handlers to time picker input
8
+
3
9
  ## 12.7.11
4
10
 
5
11
  ### Patch Changes
@@ -38,7 +38,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
38
38
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
39
39
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable @repo/internal/react/use-noop */ /** @jsx jsx */ // eslint-disable-next-line no-restricted-imports
40
40
  var packageName = "@atlaskit/datetime-picker";
41
- var packageVersion = "12.7.11";
41
+ var packageVersion = "12.7.12";
42
42
 
43
43
  /* eslint-disable react/no-unused-prop-types */
44
44
 
@@ -31,7 +31,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
31
31
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
32
32
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } /* eslint-disable @repo/internal/react/use-noop */ /** @jsx jsx */ // eslint-disable-next-line no-restricted-imports
33
33
  var packageName = "@atlaskit/datetime-picker";
34
- var packageVersion = "12.7.11";
34
+ var packageVersion = "12.7.12";
35
35
 
36
36
  /* eslint-disable react/no-unused-prop-types */
37
37
 
@@ -341,9 +341,7 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
341
341
  timeFormat: timeFormat,
342
342
  locale: locale,
343
343
  testId: testId && "".concat(testId, "--timepicker")
344
- }, timePickerProps))), isClearable && !isDisabled ?
345
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
346
- (0, _react2.jsx)("button", {
344
+ }, timePickerProps))), isClearable && !isDisabled ? (0, _react2.jsx)("button", {
347
345
  css: iconContainerStyles,
348
346
  onClick: this.onClear,
349
347
  "data-testid": testId && "".concat(testId, "--icon--container"),
@@ -39,7 +39,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
39
39
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
40
40
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
41
  var packageName = "@atlaskit/datetime-picker";
42
- var packageVersion = "12.7.11";
42
+ var packageVersion = "12.7.12";
43
43
 
44
44
  /* eslint-disable react/no-unused-prop-types */
45
45
 
@@ -321,46 +321,42 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
321
321
  });
322
322
  }
323
323
  });
324
- return (
325
- /*#__PURE__*/
326
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
327
- _react.default.createElement("div", (0, _extends2.default)({}, innerProps, {
328
- ref: this.setContainerRef,
329
- "data-testid": testId && "".concat(testId, "--container"),
330
- onKeyDown: this.onSelectKeyDown
331
- }), /*#__PURE__*/_react.default.createElement("input", {
332
- name: name,
333
- type: "hidden",
334
- value: value,
335
- "data-testid": testId && "".concat(testId, "--input")
336
- }), /*#__PURE__*/_react.default.createElement(SelectComponent, (0, _extends2.default)({
337
- appearance: this.props.appearance,
338
- autoFocus: autoFocus,
339
- components: selectComponents,
340
- instanceId: id,
341
- isClearable: true,
342
- isDisabled: isDisabled,
343
- menuIsOpen: isOpen && !isDisabled,
344
- menuPlacement: "auto",
345
- openMenuOnFocus: true,
346
- onBlur: this.onBlur,
347
- onCreateOption: this.onCreateOption,
348
- onChange: this.onChange,
349
- options: this.getOptions(),
350
- onFocus: this.onFocus,
351
- onMenuOpen: this.onMenuOpen,
352
- onMenuClose: this.onMenuClose,
353
- placeholder: this.getPlaceholder(),
354
- styles: mergedStyles,
355
- value: labelAndValue,
356
- spacing: spacing
357
- // @ts-ignore caused by prop not part of @atlaskit/select
358
- ,
359
- fixedLayerRef: this.containerRef,
360
- isInvalid: isInvalid,
361
- testId: testId
362
- }, otherSelectProps)))
363
- );
324
+ return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, innerProps, {
325
+ ref: this.setContainerRef,
326
+ "data-testid": testId && "".concat(testId, "--container")
327
+ }), /*#__PURE__*/_react.default.createElement("input", {
328
+ name: name,
329
+ type: "hidden",
330
+ value: value,
331
+ "data-testid": testId && "".concat(testId, "--input"),
332
+ onKeyDown: this.onSelectKeyDown
333
+ }), /*#__PURE__*/_react.default.createElement(SelectComponent, (0, _extends2.default)({
334
+ appearance: this.props.appearance,
335
+ autoFocus: autoFocus,
336
+ components: selectComponents,
337
+ instanceId: id,
338
+ isClearable: true,
339
+ isDisabled: isDisabled,
340
+ menuIsOpen: isOpen && !isDisabled,
341
+ menuPlacement: "auto",
342
+ openMenuOnFocus: true,
343
+ onBlur: this.onBlur,
344
+ onCreateOption: this.onCreateOption,
345
+ onChange: this.onChange,
346
+ options: this.getOptions(),
347
+ onFocus: this.onFocus,
348
+ onMenuOpen: this.onMenuOpen,
349
+ onMenuClose: this.onMenuClose,
350
+ placeholder: this.getPlaceholder(),
351
+ styles: mergedStyles,
352
+ value: labelAndValue,
353
+ spacing: spacing
354
+ // @ts-ignore caused by prop not part of @atlaskit/select
355
+ ,
356
+ fixedLayerRef: this.containerRef,
357
+ isInvalid: isInvalid,
358
+ testId: testId
359
+ }, otherSelectProps)));
364
360
  }
365
361
  }]);
366
362
  return TimePicker;
@@ -20,7 +20,7 @@ import FixedLayer from '../internal/fixed-layer';
20
20
  import { makeSingleValue } from '../internal/single-value';
21
21
  import { convertTokens } from './utils';
22
22
  const packageName = "@atlaskit/datetime-picker";
23
- const packageVersion = "12.7.11";
23
+ const packageVersion = "12.7.12";
24
24
 
25
25
  /* eslint-disable react/no-unused-prop-types */
26
26
 
@@ -17,7 +17,7 @@ import DatePicker from './date-picker';
17
17
  import TimePicker from './time-picker';
18
18
  import { convertTokens } from './utils';
19
19
  const packageName = "@atlaskit/datetime-picker";
20
- const packageVersion = "12.7.11";
20
+ const packageVersion = "12.7.12";
21
21
 
22
22
  /* eslint-disable react/no-unused-prop-types */
23
23
 
@@ -327,9 +327,7 @@ class DateTimePicker extends React.Component {
327
327
  timeFormat: timeFormat,
328
328
  locale: locale,
329
329
  testId: testId && `${testId}--timepicker`
330
- }, timePickerProps))), isClearable && !isDisabled ?
331
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
332
- jsx("button", {
330
+ }, timePickerProps))), isClearable && !isDisabled ? jsx("button", {
333
331
  css: iconContainerStyles,
334
332
  onClick: this.onClear,
335
333
  "data-testid": testId && `${testId}--icon--container`,
@@ -17,7 +17,7 @@ import parseTime from '../internal/parse-time';
17
17
  import { makeSingleValue } from '../internal/single-value';
18
18
  import { convertTokens } from './utils';
19
19
  const packageName = "@atlaskit/datetime-picker";
20
- const packageVersion = "12.7.11";
20
+ const packageVersion = "12.7.12";
21
21
 
22
22
  /* eslint-disable react/no-unused-prop-types */
23
23
 
@@ -295,46 +295,42 @@ class TimePicker extends React.Component {
295
295
  paddingRight: renderIconContainer ? gridSize() - ICON_PADDING : 0
296
296
  })
297
297
  });
298
- return (
299
- /*#__PURE__*/
300
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
301
- React.createElement("div", _extends({}, innerProps, {
302
- ref: this.setContainerRef,
303
- "data-testid": testId && `${testId}--container`,
304
- onKeyDown: this.onSelectKeyDown
305
- }), /*#__PURE__*/React.createElement("input", {
306
- name: name,
307
- type: "hidden",
308
- value: value,
309
- "data-testid": testId && `${testId}--input`
310
- }), /*#__PURE__*/React.createElement(SelectComponent, _extends({
311
- appearance: this.props.appearance,
312
- autoFocus: autoFocus,
313
- components: selectComponents,
314
- instanceId: id,
315
- isClearable: true,
316
- isDisabled: isDisabled,
317
- menuIsOpen: isOpen && !isDisabled,
318
- menuPlacement: "auto",
319
- openMenuOnFocus: true,
320
- onBlur: this.onBlur,
321
- onCreateOption: this.onCreateOption,
322
- onChange: this.onChange,
323
- options: this.getOptions(),
324
- onFocus: this.onFocus,
325
- onMenuOpen: this.onMenuOpen,
326
- onMenuClose: this.onMenuClose,
327
- placeholder: this.getPlaceholder(),
328
- styles: mergedStyles,
329
- value: labelAndValue,
330
- spacing: spacing
331
- // @ts-ignore caused by prop not part of @atlaskit/select
332
- ,
333
- fixedLayerRef: this.containerRef,
334
- isInvalid: isInvalid,
335
- testId: testId
336
- }, otherSelectProps)))
337
- );
298
+ return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
299
+ ref: this.setContainerRef,
300
+ "data-testid": testId && `${testId}--container`
301
+ }), /*#__PURE__*/React.createElement("input", {
302
+ name: name,
303
+ type: "hidden",
304
+ value: value,
305
+ "data-testid": testId && `${testId}--input`,
306
+ onKeyDown: this.onSelectKeyDown
307
+ }), /*#__PURE__*/React.createElement(SelectComponent, _extends({
308
+ appearance: this.props.appearance,
309
+ autoFocus: autoFocus,
310
+ components: selectComponents,
311
+ instanceId: id,
312
+ isClearable: true,
313
+ isDisabled: isDisabled,
314
+ menuIsOpen: isOpen && !isDisabled,
315
+ menuPlacement: "auto",
316
+ openMenuOnFocus: true,
317
+ onBlur: this.onBlur,
318
+ onCreateOption: this.onCreateOption,
319
+ onChange: this.onChange,
320
+ options: this.getOptions(),
321
+ onFocus: this.onFocus,
322
+ onMenuOpen: this.onMenuOpen,
323
+ onMenuClose: this.onMenuClose,
324
+ placeholder: this.getPlaceholder(),
325
+ styles: mergedStyles,
326
+ value: labelAndValue,
327
+ spacing: spacing
328
+ // @ts-ignore caused by prop not part of @atlaskit/select
329
+ ,
330
+ fixedLayerRef: this.containerRef,
331
+ isInvalid: isInvalid,
332
+ testId: testId
333
+ }, otherSelectProps)));
338
334
  }
339
335
  }
340
336
  _defineProperty(TimePicker, "defaultProps", timePickerDefaultProps);
@@ -31,7 +31,7 @@ import FixedLayer from '../internal/fixed-layer';
31
31
  import { makeSingleValue } from '../internal/single-value';
32
32
  import { convertTokens } from './utils';
33
33
  var packageName = "@atlaskit/datetime-picker";
34
- var packageVersion = "12.7.11";
34
+ var packageVersion = "12.7.12";
35
35
 
36
36
  /* eslint-disable react/no-unused-prop-types */
37
37
 
@@ -27,7 +27,7 @@ import DatePicker from './date-picker';
27
27
  import TimePicker from './time-picker';
28
28
  import { convertTokens } from './utils';
29
29
  var packageName = "@atlaskit/datetime-picker";
30
- var packageVersion = "12.7.11";
30
+ var packageVersion = "12.7.12";
31
31
 
32
32
  /* eslint-disable react/no-unused-prop-types */
33
33
 
@@ -335,9 +335,7 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
335
335
  timeFormat: timeFormat,
336
336
  locale: locale,
337
337
  testId: testId && "".concat(testId, "--timepicker")
338
- }, timePickerProps))), isClearable && !isDisabled ?
339
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
340
- jsx("button", {
338
+ }, timePickerProps))), isClearable && !isDisabled ? jsx("button", {
341
339
  css: iconContainerStyles,
342
340
  onClick: this.onClear,
343
341
  "data-testid": testId && "".concat(testId, "--icon--container"),
@@ -30,7 +30,7 @@ import parseTime from '../internal/parse-time';
30
30
  import { makeSingleValue } from '../internal/single-value';
31
31
  import { convertTokens } from './utils';
32
32
  var packageName = "@atlaskit/datetime-picker";
33
- var packageVersion = "12.7.11";
33
+ var packageVersion = "12.7.12";
34
34
 
35
35
  /* eslint-disable react/no-unused-prop-types */
36
36
 
@@ -312,46 +312,42 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
312
312
  });
313
313
  }
314
314
  });
315
- return (
316
- /*#__PURE__*/
317
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
318
- React.createElement("div", _extends({}, innerProps, {
319
- ref: this.setContainerRef,
320
- "data-testid": testId && "".concat(testId, "--container"),
321
- onKeyDown: this.onSelectKeyDown
322
- }), /*#__PURE__*/React.createElement("input", {
323
- name: name,
324
- type: "hidden",
325
- value: value,
326
- "data-testid": testId && "".concat(testId, "--input")
327
- }), /*#__PURE__*/React.createElement(SelectComponent, _extends({
328
- appearance: this.props.appearance,
329
- autoFocus: autoFocus,
330
- components: selectComponents,
331
- instanceId: id,
332
- isClearable: true,
333
- isDisabled: isDisabled,
334
- menuIsOpen: isOpen && !isDisabled,
335
- menuPlacement: "auto",
336
- openMenuOnFocus: true,
337
- onBlur: this.onBlur,
338
- onCreateOption: this.onCreateOption,
339
- onChange: this.onChange,
340
- options: this.getOptions(),
341
- onFocus: this.onFocus,
342
- onMenuOpen: this.onMenuOpen,
343
- onMenuClose: this.onMenuClose,
344
- placeholder: this.getPlaceholder(),
345
- styles: mergedStyles,
346
- value: labelAndValue,
347
- spacing: spacing
348
- // @ts-ignore caused by prop not part of @atlaskit/select
349
- ,
350
- fixedLayerRef: this.containerRef,
351
- isInvalid: isInvalid,
352
- testId: testId
353
- }, otherSelectProps)))
354
- );
315
+ return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
316
+ ref: this.setContainerRef,
317
+ "data-testid": testId && "".concat(testId, "--container")
318
+ }), /*#__PURE__*/React.createElement("input", {
319
+ name: name,
320
+ type: "hidden",
321
+ value: value,
322
+ "data-testid": testId && "".concat(testId, "--input"),
323
+ onKeyDown: this.onSelectKeyDown
324
+ }), /*#__PURE__*/React.createElement(SelectComponent, _extends({
325
+ appearance: this.props.appearance,
326
+ autoFocus: autoFocus,
327
+ components: selectComponents,
328
+ instanceId: id,
329
+ isClearable: true,
330
+ isDisabled: isDisabled,
331
+ menuIsOpen: isOpen && !isDisabled,
332
+ menuPlacement: "auto",
333
+ openMenuOnFocus: true,
334
+ onBlur: this.onBlur,
335
+ onCreateOption: this.onCreateOption,
336
+ onChange: this.onChange,
337
+ options: this.getOptions(),
338
+ onFocus: this.onFocus,
339
+ onMenuOpen: this.onMenuOpen,
340
+ onMenuClose: this.onMenuClose,
341
+ placeholder: this.getPlaceholder(),
342
+ styles: mergedStyles,
343
+ value: labelAndValue,
344
+ spacing: spacing
345
+ // @ts-ignore caused by prop not part of @atlaskit/select
346
+ ,
347
+ fixedLayerRef: this.containerRef,
348
+ isInvalid: isInvalid,
349
+ testId: testId
350
+ }, otherSelectProps)));
355
351
  }
356
352
  }]);
357
353
  return TimePicker;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "12.7.11",
3
+ "version": "12.7.12",
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/"