@atlaskit/datetime-picker 13.0.1 → 13.0.2
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 +6 -0
- package/dist/cjs/components/date-picker.js +10 -9
- package/dist/cjs/components/date-time-picker.js +9 -9
- package/dist/cjs/components/time-picker.js +1 -1
- package/dist/cjs/internal/clear-button.js +6 -9
- package/dist/cjs/internal/clear-indicator.js +3 -3
- package/dist/es2019/components/date-picker.js +10 -10
- package/dist/es2019/components/date-time-picker.js +9 -10
- package/dist/es2019/components/time-picker.js +1 -1
- package/dist/es2019/internal/clear-button.js +6 -8
- package/dist/es2019/internal/clear-indicator.js +3 -5
- package/dist/esm/components/date-picker.js +10 -10
- package/dist/esm/components/date-time-picker.js +9 -10
- package/dist/esm/components/time-picker.js +1 -1
- package/dist/esm/internal/clear-button.js +6 -8
- package/dist/esm/internal/clear-indicator.js +3 -5
- package/package.json +4 -3
- package/tmp/api-report-tmp.d.ts +0 -270
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 13.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#58458](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58458) [`536478cdcf0b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/536478cdcf0b) - Made some tiny tweaks to the weekday header so its height is now an integer.
|
|
8
|
+
|
|
3
9
|
## 13.0.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -38,9 +38,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
38
38
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
39
39
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
40
40
|
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); }; }
|
|
41
|
-
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
|
+
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; } }
|
|
42
42
|
var packageName = "@atlaskit/datetime-picker";
|
|
43
|
-
var packageVersion = "13.0.
|
|
43
|
+
var packageVersion = "13.0.2";
|
|
44
44
|
function getValidDate(iso) {
|
|
45
45
|
var date = (0, _dateFns.parseISO)(iso);
|
|
46
46
|
return (0, _dateFns.isValid)(date) ? {
|
|
@@ -62,14 +62,14 @@ var menuStyles = (0, _react2.css)({
|
|
|
62
62
|
var Menu = function Menu(_ref) {
|
|
63
63
|
var selectProps = _ref.selectProps,
|
|
64
64
|
innerProps = _ref.innerProps;
|
|
65
|
-
return
|
|
65
|
+
return /*#__PURE__*/React.createElement(_layering.UNSAFE_LAYERING, {
|
|
66
66
|
isDisabled: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.layering_qmiw3') ? false : true
|
|
67
|
-
},
|
|
67
|
+
}, /*#__PURE__*/React.createElement(_fixedLayer.default, {
|
|
68
68
|
inputValue: selectProps.inputValue,
|
|
69
69
|
containerRef: selectProps.calendarContainerRef,
|
|
70
|
-
content:
|
|
70
|
+
content: /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
71
71
|
css: menuStyles
|
|
72
|
-
}, innerProps),
|
|
72
|
+
}, innerProps), /*#__PURE__*/React.createElement(_calendar.default, (0, _extends2.default)({}, getValidDate(selectProps.calendarValue), getValidDate(selectProps.calendarView), {
|
|
73
73
|
disabled: selectProps.calendarDisabled,
|
|
74
74
|
disabledDateFilter: selectProps.calendarDisabledDateFilter,
|
|
75
75
|
minDate: selectProps.calendarMinDate,
|
|
@@ -468,9 +468,10 @@ var DatePicker = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Co
|
|
|
468
468
|
previousMonthLabel: previousMonthLabel
|
|
469
469
|
};
|
|
470
470
|
return (
|
|
471
|
+
/*#__PURE__*/
|
|
471
472
|
// These event handlers must be on this element because the events come
|
|
472
473
|
// from different child elements.
|
|
473
|
-
|
|
474
|
+
React.createElement("div", (0, _extends2.default)({}, innerProps, {
|
|
474
475
|
role: "presentation",
|
|
475
476
|
onBlur: this.onContainerBlur,
|
|
476
477
|
onClick: this.onInputClick,
|
|
@@ -478,12 +479,12 @@ var DatePicker = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Co
|
|
|
478
479
|
onKeyDown: this.onInputKeyDown,
|
|
479
480
|
ref: this.getContainerRef,
|
|
480
481
|
"data-testid": testId && "".concat(testId, "--container")
|
|
481
|
-
}),
|
|
482
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
482
483
|
name: name,
|
|
483
484
|
type: "hidden",
|
|
484
485
|
value: value,
|
|
485
486
|
"data-testid": testId && "".concat(testId, "--input")
|
|
486
|
-
}),
|
|
487
|
+
}), /*#__PURE__*/React.createElement(_select.default, (0, _extends2.default)({
|
|
487
488
|
appearance: this.props.appearance,
|
|
488
489
|
enableAnimation: false,
|
|
489
490
|
menuIsOpen: menuIsOpen,
|
|
@@ -29,9 +29,9 @@ var _utils = require("./utils");
|
|
|
29
29
|
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); }; }
|
|
30
30
|
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; } }
|
|
31
31
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33
33
|
var packageName = "@atlaskit/datetime-picker";
|
|
34
|
-
var packageVersion = "13.0.
|
|
34
|
+
var packageVersion = "13.0.2";
|
|
35
35
|
var isInvalidBorderStyles = (0, _react2.css)({
|
|
36
36
|
borderColor: "var(--ds-border-danger, ".concat(_colors.R400, ")")
|
|
37
37
|
});
|
|
@@ -306,19 +306,19 @@ var DateTimePicker = exports.DateTimePickerWithoutAnalytics = /*#__PURE__*/funct
|
|
|
306
306
|
var isClearable = Boolean(dateValue || timeValue);
|
|
307
307
|
var notFocusedOrIsDisabled = !(isFocused || isDisabled);
|
|
308
308
|
var ariaLabelledbyId = id && "label--".concat(id);
|
|
309
|
-
return
|
|
309
|
+
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
|
|
310
310
|
css: [baseContainerStyles, isDisabled && isDisabledStyles, isFocused && isFocusedStyles, bothProps.appearance === 'subtle' && (isFocused ? subtleFocusedBgStyles : subtleBgStyles), isFocused && isFocusedBorderStyles, bothProps.isInvalid && isInvalidBorderStyles, notFocusedOrIsDisabled && (bothProps.isInvalid ? isInvalidHoverStyles : hoverStyles), bothProps.appearance === 'none' && noBgStyles]
|
|
311
311
|
}, innerProps, {
|
|
312
312
|
"aria-labelledby": innerProps['aria-labelledby'] || ariaLabelledbyId,
|
|
313
313
|
"data-testid": testId
|
|
314
|
-
}),
|
|
314
|
+
}), /*#__PURE__*/_react.default.createElement("input", {
|
|
315
315
|
name: name,
|
|
316
316
|
type: "hidden",
|
|
317
317
|
value: value,
|
|
318
318
|
"data-testid": testId && "".concat(testId, "--input")
|
|
319
|
-
}),
|
|
319
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
320
320
|
css: datePickerContainerStyles
|
|
321
|
-
},
|
|
321
|
+
}, /*#__PURE__*/_react.default.createElement(_datePicker.default, (0, _extends2.default)({}, bothProps, {
|
|
322
322
|
autoFocus: autoFocus,
|
|
323
323
|
dateFormat: dateFormat,
|
|
324
324
|
hideIcon: true,
|
|
@@ -328,9 +328,9 @@ var DateTimePicker = exports.DateTimePickerWithoutAnalytics = /*#__PURE__*/funct
|
|
|
328
328
|
value: dateValue,
|
|
329
329
|
locale: locale,
|
|
330
330
|
testId: testId && "".concat(testId, "--datepicker")
|
|
331
|
-
}, datePickerProps))),
|
|
331
|
+
}, datePickerProps))), /*#__PURE__*/_react.default.createElement("div", {
|
|
332
332
|
css: timePickerContainerStyles
|
|
333
|
-
},
|
|
333
|
+
}, /*#__PURE__*/_react.default.createElement(_timePicker.default, (0, _extends2.default)({}, bothProps, {
|
|
334
334
|
hideIcon: true,
|
|
335
335
|
onChange: this.onTimeChange,
|
|
336
336
|
selectProps: mergedTimePickerSelectProps,
|
|
@@ -340,7 +340,7 @@ var DateTimePicker = exports.DateTimePickerWithoutAnalytics = /*#__PURE__*/funct
|
|
|
340
340
|
timeFormat: timeFormat,
|
|
341
341
|
locale: locale,
|
|
342
342
|
testId: testId && "".concat(testId, "--timepicker")
|
|
343
|
-
}, timePickerProps))), isClearable && !isDisabled ?
|
|
343
|
+
}, timePickerProps))), isClearable && !isDisabled ? /*#__PURE__*/_react.default.createElement(_clearButton.default, {
|
|
344
344
|
inputId: id,
|
|
345
345
|
buttonStyles: iconContainerStyles,
|
|
346
346
|
onClick: this.onClear,
|
|
@@ -38,7 +38,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
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; } }
|
|
40
40
|
var packageName = "@atlaskit/datetime-picker";
|
|
41
|
-
var packageVersion = "13.0.
|
|
41
|
+
var packageVersion = "13.0.2";
|
|
42
42
|
var menuStyles = {
|
|
43
43
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
44
44
|
position: 'static',
|
|
@@ -5,10 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _react = require("@emotion/react");
|
|
9
8
|
var _selectClear = _interopRequireDefault(require("@atlaskit/icon/glyph/select-clear"));
|
|
10
|
-
/** @jsx jsx */
|
|
11
|
-
|
|
12
9
|
/**
|
|
13
10
|
* __Clear button__
|
|
14
11
|
*/
|
|
@@ -24,21 +21,21 @@ var ClearButton = function ClearButton(_ref) {
|
|
|
24
21
|
onClick = _ref.onClick;
|
|
25
22
|
var labelId = inputId && "label--".concat(inputId);
|
|
26
23
|
var clearButtonId = inputId && "clear-btn--".concat(inputId);
|
|
27
|
-
return
|
|
24
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
25
|
+
"aria-labelledby": inputId ? "".concat(clearButtonId, " ").concat(labelId) : "".concat(clearButtonId),
|
|
28
26
|
css: buttonStyles,
|
|
29
27
|
type: "button",
|
|
30
28
|
tabIndex: -1,
|
|
31
29
|
"data-testid": "".concat(dataTestId, "--clear--btn"),
|
|
32
30
|
onClick: onClick
|
|
33
|
-
},
|
|
31
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
34
32
|
hidden: true,
|
|
35
33
|
id: clearButtonId
|
|
36
|
-
}, "Clear"),
|
|
34
|
+
}, "Clear"), /*#__PURE__*/React.createElement("span", {
|
|
37
35
|
style: {
|
|
38
36
|
display: 'flex'
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
}, (0, _react.jsx)(_selectClear.default, {
|
|
37
|
+
}
|
|
38
|
+
}, /*#__PURE__*/React.createElement(_selectClear.default, {
|
|
42
39
|
size: iconSize,
|
|
43
40
|
label: inputId ? '' : label,
|
|
44
41
|
primaryColor: primaryColor
|
|
@@ -10,7 +10,7 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _select = require("@atlaskit/select");
|
|
11
11
|
var _clearButton = _interopRequireDefault(require("./clear-button"));
|
|
12
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
14
|
var buttonStyles = (0, _react.css)({
|
|
15
15
|
display: 'flex',
|
|
16
16
|
alignItems: 'center',
|
|
@@ -24,11 +24,11 @@ var buttonStyles = (0, _react.css)({
|
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
26
|
var ClearIndicator = function ClearIndicator(props) {
|
|
27
|
-
return
|
|
27
|
+
return /*#__PURE__*/React.createElement(_select.components.ClearIndicator, _objectSpread(_objectSpread({}, props), {}, {
|
|
28
28
|
innerProps: _objectSpread(_objectSpread({}, props.innerProps), {}, {
|
|
29
29
|
'aria-hidden': 'false'
|
|
30
30
|
})
|
|
31
|
-
}),
|
|
31
|
+
}), /*#__PURE__*/React.createElement(_clearButton.default, {
|
|
32
32
|
buttonStyles: buttonStyles,
|
|
33
33
|
inputId: props.selectProps.inputId,
|
|
34
34
|
dataTestId: props.selectProps.testId
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import { Component } from 'react';
|
|
5
|
-
import { css
|
|
4
|
+
import { css } from '@emotion/react';
|
|
6
5
|
import { format, isValid, lastDayOfMonth, parseISO } from 'date-fns';
|
|
7
6
|
import pick from 'lodash/pick';
|
|
8
7
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -20,7 +19,7 @@ import FixedLayer from '../internal/fixed-layer';
|
|
|
20
19
|
import { makeSingleValue } from '../internal/single-value';
|
|
21
20
|
import { convertTokens } from './utils';
|
|
22
21
|
const packageName = "@atlaskit/datetime-picker";
|
|
23
|
-
const packageVersion = "13.0.
|
|
22
|
+
const packageVersion = "13.0.2";
|
|
24
23
|
function getValidDate(iso) {
|
|
25
24
|
const date = parseISO(iso);
|
|
26
25
|
return isValid(date) ? {
|
|
@@ -42,14 +41,14 @@ const menuStyles = css({
|
|
|
42
41
|
const Menu = ({
|
|
43
42
|
selectProps,
|
|
44
43
|
innerProps
|
|
45
|
-
}) =>
|
|
44
|
+
}) => /*#__PURE__*/React.createElement(UNSAFE_LAYERING, {
|
|
46
45
|
isDisabled: getBooleanFF('platform.design-system-team.layering_qmiw3') ? false : true
|
|
47
|
-
},
|
|
46
|
+
}, /*#__PURE__*/React.createElement(FixedLayer, {
|
|
48
47
|
inputValue: selectProps.inputValue,
|
|
49
48
|
containerRef: selectProps.calendarContainerRef,
|
|
50
|
-
content:
|
|
49
|
+
content: /*#__PURE__*/React.createElement("div", _extends({
|
|
51
50
|
css: menuStyles
|
|
52
|
-
}, innerProps),
|
|
51
|
+
}, innerProps), /*#__PURE__*/React.createElement(Calendar, _extends({}, getValidDate(selectProps.calendarValue), getValidDate(selectProps.calendarView), {
|
|
53
52
|
disabled: selectProps.calendarDisabled,
|
|
54
53
|
disabledDateFilter: selectProps.calendarDisabledDateFilter,
|
|
55
54
|
minDate: selectProps.calendarMinDate,
|
|
@@ -468,9 +467,10 @@ class DatePicker extends Component {
|
|
|
468
467
|
previousMonthLabel
|
|
469
468
|
};
|
|
470
469
|
return (
|
|
470
|
+
/*#__PURE__*/
|
|
471
471
|
// These event handlers must be on this element because the events come
|
|
472
472
|
// from different child elements.
|
|
473
|
-
|
|
473
|
+
React.createElement("div", _extends({}, innerProps, {
|
|
474
474
|
role: "presentation",
|
|
475
475
|
onBlur: this.onContainerBlur,
|
|
476
476
|
onClick: this.onInputClick,
|
|
@@ -478,12 +478,12 @@ class DatePicker extends Component {
|
|
|
478
478
|
onKeyDown: this.onInputKeyDown,
|
|
479
479
|
ref: this.getContainerRef,
|
|
480
480
|
"data-testid": testId && `${testId}--container`
|
|
481
|
-
}),
|
|
481
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
482
482
|
name: name,
|
|
483
483
|
type: "hidden",
|
|
484
484
|
value: value,
|
|
485
485
|
"data-testid": testId && `${testId}--input`
|
|
486
|
-
}),
|
|
486
|
+
}), /*#__PURE__*/React.createElement(Select, _extends({
|
|
487
487
|
appearance: this.props.appearance,
|
|
488
488
|
enableAnimation: false,
|
|
489
489
|
menuIsOpen: menuIsOpen,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import React from 'react';
|
|
5
|
-
import { css
|
|
4
|
+
import { css } from '@emotion/react';
|
|
6
5
|
import { format, isValid, parseISO } from 'date-fns';
|
|
7
6
|
import pick from 'lodash/pick';
|
|
8
7
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -15,7 +14,7 @@ import DatePicker from './date-picker';
|
|
|
15
14
|
import TimePicker from './time-picker';
|
|
16
15
|
import { convertTokens } from './utils';
|
|
17
16
|
const packageName = "@atlaskit/datetime-picker";
|
|
18
|
-
const packageVersion = "13.0.
|
|
17
|
+
const packageVersion = "13.0.2";
|
|
19
18
|
const isInvalidBorderStyles = css({
|
|
20
19
|
borderColor: `var(--ds-border-danger, ${R400})`
|
|
21
20
|
});
|
|
@@ -292,19 +291,19 @@ class DateTimePicker extends React.Component {
|
|
|
292
291
|
const isClearable = Boolean(dateValue || timeValue);
|
|
293
292
|
const notFocusedOrIsDisabled = !(isFocused || isDisabled);
|
|
294
293
|
const ariaLabelledbyId = id && `label--${id}`;
|
|
295
|
-
return
|
|
294
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
296
295
|
css: [baseContainerStyles, isDisabled && isDisabledStyles, isFocused && isFocusedStyles, bothProps.appearance === 'subtle' && (isFocused ? subtleFocusedBgStyles : subtleBgStyles), isFocused && isFocusedBorderStyles, bothProps.isInvalid && isInvalidBorderStyles, notFocusedOrIsDisabled && (bothProps.isInvalid ? isInvalidHoverStyles : hoverStyles), bothProps.appearance === 'none' && noBgStyles]
|
|
297
296
|
}, innerProps, {
|
|
298
297
|
"aria-labelledby": innerProps['aria-labelledby'] || ariaLabelledbyId,
|
|
299
298
|
"data-testid": testId
|
|
300
|
-
}),
|
|
299
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
301
300
|
name: name,
|
|
302
301
|
type: "hidden",
|
|
303
302
|
value: value,
|
|
304
303
|
"data-testid": testId && `${testId}--input`
|
|
305
|
-
}),
|
|
304
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
306
305
|
css: datePickerContainerStyles
|
|
307
|
-
},
|
|
306
|
+
}, /*#__PURE__*/React.createElement(DatePicker, _extends({}, bothProps, {
|
|
308
307
|
autoFocus: autoFocus,
|
|
309
308
|
dateFormat: dateFormat,
|
|
310
309
|
hideIcon: true,
|
|
@@ -314,9 +313,9 @@ class DateTimePicker extends React.Component {
|
|
|
314
313
|
value: dateValue,
|
|
315
314
|
locale: locale,
|
|
316
315
|
testId: testId && `${testId}--datepicker`
|
|
317
|
-
}, datePickerProps))),
|
|
316
|
+
}, datePickerProps))), /*#__PURE__*/React.createElement("div", {
|
|
318
317
|
css: timePickerContainerStyles
|
|
319
|
-
},
|
|
318
|
+
}, /*#__PURE__*/React.createElement(TimePicker, _extends({}, bothProps, {
|
|
320
319
|
hideIcon: true,
|
|
321
320
|
onChange: this.onTimeChange,
|
|
322
321
|
selectProps: mergedTimePickerSelectProps,
|
|
@@ -326,7 +325,7 @@ class DateTimePicker extends React.Component {
|
|
|
326
325
|
timeFormat: timeFormat,
|
|
327
326
|
locale: locale,
|
|
328
327
|
testId: testId && `${testId}--timepicker`
|
|
329
|
-
}, timePickerProps))), isClearable && !isDisabled ?
|
|
328
|
+
}, timePickerProps))), isClearable && !isDisabled ? /*#__PURE__*/React.createElement(ClearButton, {
|
|
330
329
|
inputId: id,
|
|
331
330
|
buttonStyles: iconContainerStyles,
|
|
332
331
|
onClick: this.onClear,
|
|
@@ -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 = "13.0.
|
|
20
|
+
const packageVersion = "13.0.2";
|
|
21
21
|
const menuStyles = {
|
|
22
22
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
23
23
|
position: 'static',
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
1
|
import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
|
|
4
2
|
/**
|
|
5
3
|
* __Clear button__
|
|
@@ -15,21 +13,21 @@ const ClearButton = ({
|
|
|
15
13
|
}) => {
|
|
16
14
|
const labelId = inputId && `label--${inputId}`;
|
|
17
15
|
const clearButtonId = inputId && `clear-btn--${inputId}`;
|
|
18
|
-
return
|
|
16
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
17
|
+
"aria-labelledby": inputId ? `${clearButtonId} ${labelId}` : `${clearButtonId}`,
|
|
19
18
|
css: buttonStyles,
|
|
20
19
|
type: "button",
|
|
21
20
|
tabIndex: -1,
|
|
22
21
|
"data-testid": `${dataTestId}--clear--btn`,
|
|
23
22
|
onClick: onClick
|
|
24
|
-
},
|
|
23
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
25
24
|
hidden: true,
|
|
26
25
|
id: clearButtonId
|
|
27
|
-
}, "Clear"),
|
|
26
|
+
}, "Clear"), /*#__PURE__*/React.createElement("span", {
|
|
28
27
|
style: {
|
|
29
28
|
display: 'flex'
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
}, jsx(SelectClearIcon, {
|
|
29
|
+
}
|
|
30
|
+
}, /*#__PURE__*/React.createElement(SelectClearIcon, {
|
|
33
31
|
size: iconSize,
|
|
34
32
|
label: inputId ? '' : label,
|
|
35
33
|
primaryColor: primaryColor
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { css, jsx } from '@emotion/react';
|
|
2
|
+
import { css } from '@emotion/react';
|
|
5
3
|
import { components } from '@atlaskit/select';
|
|
6
4
|
import ClearButton from './clear-button';
|
|
7
5
|
const buttonStyles = css({
|
|
@@ -17,12 +15,12 @@ const buttonStyles = css({
|
|
|
17
15
|
*
|
|
18
16
|
*/
|
|
19
17
|
const ClearIndicator = props => {
|
|
20
|
-
return
|
|
18
|
+
return /*#__PURE__*/React.createElement(components.ClearIndicator, _extends({}, props, {
|
|
21
19
|
innerProps: {
|
|
22
20
|
...props.innerProps,
|
|
23
21
|
'aria-hidden': 'false'
|
|
24
22
|
}
|
|
25
|
-
}),
|
|
23
|
+
}), /*#__PURE__*/React.createElement(ClearButton, {
|
|
26
24
|
buttonStyles: buttonStyles,
|
|
27
25
|
inputId: props.selectProps.inputId,
|
|
28
26
|
dataTestId: props.selectProps.testId
|
|
@@ -11,9 +11,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
11
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
13
|
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; } }
|
|
14
|
-
/** @jsx jsx */
|
|
15
14
|
import { Component } from 'react';
|
|
16
|
-
import { css
|
|
15
|
+
import { css } from '@emotion/react';
|
|
17
16
|
import { format, isValid, lastDayOfMonth, parseISO } from 'date-fns';
|
|
18
17
|
import pick from 'lodash/pick';
|
|
19
18
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -31,7 +30,7 @@ import FixedLayer from '../internal/fixed-layer';
|
|
|
31
30
|
import { makeSingleValue } from '../internal/single-value';
|
|
32
31
|
import { convertTokens } from './utils';
|
|
33
32
|
var packageName = "@atlaskit/datetime-picker";
|
|
34
|
-
var packageVersion = "13.0.
|
|
33
|
+
var packageVersion = "13.0.2";
|
|
35
34
|
function getValidDate(iso) {
|
|
36
35
|
var date = parseISO(iso);
|
|
37
36
|
return isValid(date) ? {
|
|
@@ -53,14 +52,14 @@ var menuStyles = css({
|
|
|
53
52
|
var Menu = function Menu(_ref) {
|
|
54
53
|
var selectProps = _ref.selectProps,
|
|
55
54
|
innerProps = _ref.innerProps;
|
|
56
|
-
return
|
|
55
|
+
return /*#__PURE__*/React.createElement(UNSAFE_LAYERING, {
|
|
57
56
|
isDisabled: getBooleanFF('platform.design-system-team.layering_qmiw3') ? false : true
|
|
58
|
-
},
|
|
57
|
+
}, /*#__PURE__*/React.createElement(FixedLayer, {
|
|
59
58
|
inputValue: selectProps.inputValue,
|
|
60
59
|
containerRef: selectProps.calendarContainerRef,
|
|
61
|
-
content:
|
|
60
|
+
content: /*#__PURE__*/React.createElement("div", _extends({
|
|
62
61
|
css: menuStyles
|
|
63
|
-
}, innerProps),
|
|
62
|
+
}, innerProps), /*#__PURE__*/React.createElement(Calendar, _extends({}, getValidDate(selectProps.calendarValue), getValidDate(selectProps.calendarView), {
|
|
64
63
|
disabled: selectProps.calendarDisabled,
|
|
65
64
|
disabledDateFilter: selectProps.calendarDisabledDateFilter,
|
|
66
65
|
minDate: selectProps.calendarMinDate,
|
|
@@ -459,9 +458,10 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
459
458
|
previousMonthLabel: previousMonthLabel
|
|
460
459
|
};
|
|
461
460
|
return (
|
|
461
|
+
/*#__PURE__*/
|
|
462
462
|
// These event handlers must be on this element because the events come
|
|
463
463
|
// from different child elements.
|
|
464
|
-
|
|
464
|
+
React.createElement("div", _extends({}, innerProps, {
|
|
465
465
|
role: "presentation",
|
|
466
466
|
onBlur: this.onContainerBlur,
|
|
467
467
|
onClick: this.onInputClick,
|
|
@@ -469,12 +469,12 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
469
469
|
onKeyDown: this.onInputKeyDown,
|
|
470
470
|
ref: this.getContainerRef,
|
|
471
471
|
"data-testid": testId && "".concat(testId, "--container")
|
|
472
|
-
}),
|
|
472
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
473
473
|
name: name,
|
|
474
474
|
type: "hidden",
|
|
475
475
|
value: value,
|
|
476
476
|
"data-testid": testId && "".concat(testId, "--input")
|
|
477
|
-
}),
|
|
477
|
+
}), /*#__PURE__*/React.createElement(Select, _extends({
|
|
478
478
|
appearance: this.props.appearance,
|
|
479
479
|
enableAnimation: false,
|
|
480
480
|
menuIsOpen: menuIsOpen,
|
|
@@ -10,9 +10,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
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; } }
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
-
/** @jsx jsx */
|
|
14
13
|
import React from 'react';
|
|
15
|
-
import { css
|
|
14
|
+
import { css } from '@emotion/react';
|
|
16
15
|
import { format, isValid, parseISO } from 'date-fns';
|
|
17
16
|
import pick from 'lodash/pick';
|
|
18
17
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -25,7 +24,7 @@ import DatePicker from './date-picker';
|
|
|
25
24
|
import TimePicker from './time-picker';
|
|
26
25
|
import { convertTokens } from './utils';
|
|
27
26
|
var packageName = "@atlaskit/datetime-picker";
|
|
28
|
-
var packageVersion = "13.0.
|
|
27
|
+
var packageVersion = "13.0.2";
|
|
29
28
|
var isInvalidBorderStyles = css({
|
|
30
29
|
borderColor: "var(--ds-border-danger, ".concat(R400, ")")
|
|
31
30
|
});
|
|
@@ -300,19 +299,19 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
300
299
|
var isClearable = Boolean(dateValue || timeValue);
|
|
301
300
|
var notFocusedOrIsDisabled = !(isFocused || isDisabled);
|
|
302
301
|
var ariaLabelledbyId = id && "label--".concat(id);
|
|
303
|
-
return
|
|
302
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
304
303
|
css: [baseContainerStyles, isDisabled && isDisabledStyles, isFocused && isFocusedStyles, bothProps.appearance === 'subtle' && (isFocused ? subtleFocusedBgStyles : subtleBgStyles), isFocused && isFocusedBorderStyles, bothProps.isInvalid && isInvalidBorderStyles, notFocusedOrIsDisabled && (bothProps.isInvalid ? isInvalidHoverStyles : hoverStyles), bothProps.appearance === 'none' && noBgStyles]
|
|
305
304
|
}, innerProps, {
|
|
306
305
|
"aria-labelledby": innerProps['aria-labelledby'] || ariaLabelledbyId,
|
|
307
306
|
"data-testid": testId
|
|
308
|
-
}),
|
|
307
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
309
308
|
name: name,
|
|
310
309
|
type: "hidden",
|
|
311
310
|
value: value,
|
|
312
311
|
"data-testid": testId && "".concat(testId, "--input")
|
|
313
|
-
}),
|
|
312
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
314
313
|
css: datePickerContainerStyles
|
|
315
|
-
},
|
|
314
|
+
}, /*#__PURE__*/React.createElement(DatePicker, _extends({}, bothProps, {
|
|
316
315
|
autoFocus: autoFocus,
|
|
317
316
|
dateFormat: dateFormat,
|
|
318
317
|
hideIcon: true,
|
|
@@ -322,9 +321,9 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
322
321
|
value: dateValue,
|
|
323
322
|
locale: locale,
|
|
324
323
|
testId: testId && "".concat(testId, "--datepicker")
|
|
325
|
-
}, datePickerProps))),
|
|
324
|
+
}, datePickerProps))), /*#__PURE__*/React.createElement("div", {
|
|
326
325
|
css: timePickerContainerStyles
|
|
327
|
-
},
|
|
326
|
+
}, /*#__PURE__*/React.createElement(TimePicker, _extends({}, bothProps, {
|
|
328
327
|
hideIcon: true,
|
|
329
328
|
onChange: this.onTimeChange,
|
|
330
329
|
selectProps: mergedTimePickerSelectProps,
|
|
@@ -334,7 +333,7 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
334
333
|
timeFormat: timeFormat,
|
|
335
334
|
locale: locale,
|
|
336
335
|
testId: testId && "".concat(testId, "--timepicker")
|
|
337
|
-
}, timePickerProps))), isClearable && !isDisabled ?
|
|
336
|
+
}, timePickerProps))), isClearable && !isDisabled ? /*#__PURE__*/React.createElement(ClearButton, {
|
|
338
337
|
inputId: id,
|
|
339
338
|
buttonStyles: iconContainerStyles,
|
|
340
339
|
onClick: this.onClear,
|
|
@@ -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 = "13.0.
|
|
33
|
+
var packageVersion = "13.0.2";
|
|
34
34
|
var menuStyles = {
|
|
35
35
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
36
36
|
position: 'static',
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
1
|
import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
|
|
4
2
|
/**
|
|
5
3
|
* __Clear button__
|
|
@@ -16,21 +14,21 @@ var ClearButton = function ClearButton(_ref) {
|
|
|
16
14
|
onClick = _ref.onClick;
|
|
17
15
|
var labelId = inputId && "label--".concat(inputId);
|
|
18
16
|
var clearButtonId = inputId && "clear-btn--".concat(inputId);
|
|
19
|
-
return
|
|
17
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
18
|
+
"aria-labelledby": inputId ? "".concat(clearButtonId, " ").concat(labelId) : "".concat(clearButtonId),
|
|
20
19
|
css: buttonStyles,
|
|
21
20
|
type: "button",
|
|
22
21
|
tabIndex: -1,
|
|
23
22
|
"data-testid": "".concat(dataTestId, "--clear--btn"),
|
|
24
23
|
onClick: onClick
|
|
25
|
-
},
|
|
24
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
26
25
|
hidden: true,
|
|
27
26
|
id: clearButtonId
|
|
28
|
-
}, "Clear"),
|
|
27
|
+
}, "Clear"), /*#__PURE__*/React.createElement("span", {
|
|
29
28
|
style: {
|
|
30
29
|
display: 'flex'
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
}, jsx(SelectClearIcon, {
|
|
30
|
+
}
|
|
31
|
+
}, /*#__PURE__*/React.createElement(SelectClearIcon, {
|
|
34
32
|
size: iconSize,
|
|
35
33
|
label: inputId ? '' : label,
|
|
36
34
|
primaryColor: primaryColor
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
4
|
+
import { css } from '@emotion/react';
|
|
7
5
|
import { components } from '@atlaskit/select';
|
|
8
6
|
import ClearButton from './clear-button';
|
|
9
7
|
var buttonStyles = css({
|
|
@@ -19,11 +17,11 @@ var buttonStyles = css({
|
|
|
19
17
|
*
|
|
20
18
|
*/
|
|
21
19
|
var ClearIndicator = function ClearIndicator(props) {
|
|
22
|
-
return
|
|
20
|
+
return /*#__PURE__*/React.createElement(components.ClearIndicator, _objectSpread(_objectSpread({}, props), {}, {
|
|
23
21
|
innerProps: _objectSpread(_objectSpread({}, props.innerProps), {}, {
|
|
24
22
|
'aria-hidden': 'false'
|
|
25
23
|
})
|
|
26
|
-
}),
|
|
24
|
+
}), /*#__PURE__*/React.createElement(ClearButton, {
|
|
27
25
|
buttonStyles: buttonStyles,
|
|
28
26
|
inputId: props.selectProps.inputId,
|
|
29
27
|
dataTestId: props.selectProps.testId
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.2",
|
|
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,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/popper": "^5.5.0",
|
|
43
43
|
"@atlaskit/select": "^17.0.0",
|
|
44
44
|
"@atlaskit/theme": "^12.6.0",
|
|
45
|
-
"@atlaskit/tokens": "^1.
|
|
45
|
+
"@atlaskit/tokens": "^1.29.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"@emotion/react": "^11.7.1",
|
|
48
48
|
"date-fns": "^2.17.0",
|
|
@@ -54,10 +54,11 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@af/accessibility-testing": "*",
|
|
57
|
+
"@af/integration-testing": "*",
|
|
57
58
|
"@atlaskit/button": "^16.17.0",
|
|
58
59
|
"@atlaskit/docs": "*",
|
|
59
60
|
"@atlaskit/form": "^9.0.0",
|
|
60
|
-
"@atlaskit/modal-dialog": "^12.
|
|
61
|
+
"@atlaskit/modal-dialog": "^12.10.0",
|
|
61
62
|
"@atlaskit/popup": "^1.11.0",
|
|
62
63
|
"@atlaskit/range": "^7.1.0",
|
|
63
64
|
"@atlaskit/section-message": "^6.4.0",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/datetime-picker"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { ComponentType } from 'react';
|
|
8
|
-
import { DropdownIndicatorProps } from '@atlaskit/select';
|
|
9
|
-
import { FocusEvent as FocusEvent_2 } from 'react';
|
|
10
|
-
import { ForwardRefExoticComponent } from 'react';
|
|
11
|
-
import { GroupType } from '@atlaskit/select';
|
|
12
|
-
import { OptionType } from '@atlaskit/select';
|
|
13
|
-
import { default as React_2 } from 'react';
|
|
14
|
-
import { RefAttributes } from 'react';
|
|
15
|
-
import { SelectProps } from '@atlaskit/select';
|
|
16
|
-
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
17
|
-
import { WithContextProps } from '@atlaskit/analytics-next';
|
|
18
|
-
|
|
19
|
-
// @public (undocumented)
|
|
20
|
-
export type Appearance = 'default' | 'none' | 'subtle';
|
|
21
|
-
|
|
22
|
-
// @public (undocumented)
|
|
23
|
-
export const DatePicker: ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps_2, keyof WithAnalyticsEventsProps>, "dateFormat" | "formatDisplayLabel" | "isOpen" | "maxDate" | "minDate" | "nextMonthLabel" | "parseInputValue" | "placeholder" | "previousMonthLabel" | "testId" | "value" | "weekStartDay"> & Partial<Pick<Omit<DatePickerProps_2, keyof WithAnalyticsEventsProps>, "appearance" | "autoFocus" | "defaultIsOpen" | "defaultValue" | "disabled" | "disabledDateFilter" | "hideIcon" | "icon" | "id" | "innerProps" | "isDisabled" | "isInvalid" | "locale" | "name" | "onBlur" | "onChange" | "onFocus" | "selectProps" | "spacing">> & Partial<Pick<{
|
|
24
|
-
appearance: Appearance;
|
|
25
|
-
autoFocus: boolean;
|
|
26
|
-
defaultIsOpen: boolean;
|
|
27
|
-
defaultValue: string;
|
|
28
|
-
disabled: string[];
|
|
29
|
-
disabledDateFilter: (_: string) => boolean;
|
|
30
|
-
hideIcon: boolean;
|
|
31
|
-
icon: ComponentType<DropdownIndicatorProps<OptionType, boolean, GroupType<OptionType>>>;
|
|
32
|
-
id: string;
|
|
33
|
-
innerProps: {};
|
|
34
|
-
isDisabled: boolean;
|
|
35
|
-
isInvalid: boolean;
|
|
36
|
-
name: string;
|
|
37
|
-
onBlur: (_event: FocusEvent_2<HTMLInputElement>) => void;
|
|
38
|
-
onChange: (_value: string) => void;
|
|
39
|
-
onFocus: (_event: FocusEvent_2<HTMLInputElement>) => void;
|
|
40
|
-
selectProps: {};
|
|
41
|
-
spacing: Spacing;
|
|
42
|
-
locale: string;
|
|
43
|
-
}, never>> & RefAttributes<any> & WithContextProps, "analyticsContext" | "appearance" | "autoFocus" | "dateFormat" | "defaultIsOpen" | "defaultValue" | "disabled" | "disabledDateFilter" | "formatDisplayLabel" | "hideIcon" | "icon" | "id" | "innerProps" | "isDisabled" | "isInvalid" | "isOpen" | "key" | "locale" | "maxDate" | "minDate" | "name" | "nextMonthLabel" | "onBlur" | "onChange" | "onFocus" | "parseInputValue" | "placeholder" | "previousMonthLabel" | "selectProps" | "spacing" | "testId" | "value" | "weekStartDay"> & RefAttributes<any>>;
|
|
44
|
-
|
|
45
|
-
// @public (undocumented)
|
|
46
|
-
const datePickerDefaultProps: {
|
|
47
|
-
appearance: Appearance;
|
|
48
|
-
autoFocus: boolean;
|
|
49
|
-
defaultIsOpen: boolean;
|
|
50
|
-
defaultValue: string;
|
|
51
|
-
disabled: string[];
|
|
52
|
-
disabledDateFilter: (_: string) => boolean;
|
|
53
|
-
hideIcon: boolean;
|
|
54
|
-
icon: ComponentType<DropdownIndicatorProps<OptionType, boolean, GroupType<OptionType>>>;
|
|
55
|
-
id: string;
|
|
56
|
-
innerProps: {};
|
|
57
|
-
isDisabled: boolean;
|
|
58
|
-
isInvalid: boolean;
|
|
59
|
-
name: string;
|
|
60
|
-
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
61
|
-
onChange: (_value: string) => void;
|
|
62
|
-
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
63
|
-
selectProps: {};
|
|
64
|
-
spacing: Spacing;
|
|
65
|
-
locale: string;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
// @public (undocumented)
|
|
69
|
-
export interface DatePickerProps extends WithAnalyticsEventsProps {
|
|
70
|
-
appearance?: Appearance;
|
|
71
|
-
autoFocus?: boolean;
|
|
72
|
-
dateFormat?: string;
|
|
73
|
-
defaultIsOpen?: boolean;
|
|
74
|
-
defaultValue?: string;
|
|
75
|
-
disabled?: string[];
|
|
76
|
-
disabledDateFilter?: (date: string) => boolean;
|
|
77
|
-
formatDisplayLabel?: (value: string, dateFormat: string) => string;
|
|
78
|
-
hideIcon?: boolean;
|
|
79
|
-
icon?: React.ComponentType<DropdownIndicatorProps<OptionType>>;
|
|
80
|
-
id?: string;
|
|
81
|
-
innerProps?: React.AllHTMLAttributes<HTMLElement>;
|
|
82
|
-
isDisabled?: boolean;
|
|
83
|
-
isInvalid?: boolean;
|
|
84
|
-
isOpen?: boolean;
|
|
85
|
-
locale?: string;
|
|
86
|
-
maxDate?: string;
|
|
87
|
-
minDate?: string;
|
|
88
|
-
name?: string;
|
|
89
|
-
nextMonthLabel?: string;
|
|
90
|
-
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
91
|
-
onChange?: (value: string) => void;
|
|
92
|
-
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
93
|
-
parseInputValue?: (date: string, dateFormat: string) => Date;
|
|
94
|
-
placeholder?: string;
|
|
95
|
-
previousMonthLabel?: string;
|
|
96
|
-
selectProps?: SelectProps<any>;
|
|
97
|
-
spacing?: Spacing;
|
|
98
|
-
testId?: string;
|
|
99
|
-
value?: string;
|
|
100
|
-
weekStartDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// @public (undocumented)
|
|
104
|
-
type DatePickerProps_2 = typeof datePickerDefaultProps & DatePickerProps;
|
|
105
|
-
|
|
106
|
-
// @public (undocumented)
|
|
107
|
-
export const DateTimePicker: React_2.ForwardRefExoticComponent<Pick<Pick<Omit<DateTimePickerProps_2, keyof WithAnalyticsEventsProps>, "dateFormat" | "parseValue" | "testId" | "timeFormat" | "value"> & Partial<Pick<Omit<DateTimePickerProps_2, keyof WithAnalyticsEventsProps>, "appearance" | "autoFocus" | "datePickerProps" | "datePickerSelectProps" | "defaultValue" | "id" | "innerProps" | "isDisabled" | "isInvalid" | "locale" | "name" | "onBlur" | "onChange" | "onFocus" | "spacing" | "timeIsEditable" | "timePickerProps" | "timePickerSelectProps" | "times">> & Partial<Pick<{
|
|
108
|
-
appearance: string;
|
|
109
|
-
autoFocus: boolean;
|
|
110
|
-
isDisabled: boolean;
|
|
111
|
-
name: string;
|
|
112
|
-
onBlur: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
113
|
-
onChange: (_value: string) => void;
|
|
114
|
-
onFocus: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
115
|
-
innerProps: {};
|
|
116
|
-
id: string;
|
|
117
|
-
defaultValue: string;
|
|
118
|
-
timeIsEditable: boolean;
|
|
119
|
-
isInvalid: boolean;
|
|
120
|
-
datePickerProps: {};
|
|
121
|
-
timePickerProps: {};
|
|
122
|
-
datePickerSelectProps: {};
|
|
123
|
-
timePickerSelectProps: {};
|
|
124
|
-
times: string[];
|
|
125
|
-
spacing: string;
|
|
126
|
-
locale: string;
|
|
127
|
-
}, never>> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "appearance" | "autoFocus" | "dateFormat" | "datePickerProps" | "datePickerSelectProps" | "defaultValue" | "id" | "innerProps" | "isDisabled" | "isInvalid" | "key" | "locale" | "name" | "onBlur" | "onChange" | "onFocus" | "parseValue" | "spacing" | "testId" | "timeFormat" | "timeIsEditable" | "timePickerProps" | "timePickerSelectProps" | "times" | "value"> & React_2.RefAttributes<any>>;
|
|
128
|
-
|
|
129
|
-
// @public (undocumented)
|
|
130
|
-
const dateTimePickerDefaultProps: {
|
|
131
|
-
appearance: string;
|
|
132
|
-
autoFocus: boolean;
|
|
133
|
-
isDisabled: boolean;
|
|
134
|
-
name: string;
|
|
135
|
-
onBlur: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
136
|
-
onChange: (_value: string) => void;
|
|
137
|
-
onFocus: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
138
|
-
innerProps: {};
|
|
139
|
-
id: string;
|
|
140
|
-
defaultValue: string;
|
|
141
|
-
timeIsEditable: boolean;
|
|
142
|
-
isInvalid: boolean;
|
|
143
|
-
datePickerProps: {};
|
|
144
|
-
timePickerProps: {};
|
|
145
|
-
datePickerSelectProps: {};
|
|
146
|
-
timePickerSelectProps: {};
|
|
147
|
-
times: string[];
|
|
148
|
-
spacing: string;
|
|
149
|
-
locale: string;
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
// @public (undocumented)
|
|
153
|
-
export interface DateTimePickerProps extends WithAnalyticsEventsProps {
|
|
154
|
-
appearance?: Appearance;
|
|
155
|
-
autoFocus?: boolean;
|
|
156
|
-
dateFormat?: string;
|
|
157
|
-
datePickerProps?: DatePickerProps;
|
|
158
|
-
datePickerSelectProps?: SelectProps<any>;
|
|
159
|
-
defaultValue?: string;
|
|
160
|
-
id?: string;
|
|
161
|
-
innerProps?: React_2.AllHTMLAttributes<HTMLElement>;
|
|
162
|
-
isDisabled?: boolean;
|
|
163
|
-
isInvalid?: boolean;
|
|
164
|
-
locale?: string;
|
|
165
|
-
name?: string;
|
|
166
|
-
onBlur?: React_2.FocusEventHandler<HTMLInputElement>;
|
|
167
|
-
onChange?: (value: string) => void;
|
|
168
|
-
onFocus?: React_2.FocusEventHandler<HTMLInputElement>;
|
|
169
|
-
parseValue?: (dateTimeValue: string, date: string, time: string, timezone: string) => {
|
|
170
|
-
dateValue: string;
|
|
171
|
-
timeValue: string;
|
|
172
|
-
zoneValue: string;
|
|
173
|
-
};
|
|
174
|
-
spacing?: Spacing;
|
|
175
|
-
testId?: string;
|
|
176
|
-
timeFormat?: string;
|
|
177
|
-
timeIsEditable?: boolean;
|
|
178
|
-
timePickerProps?: TimePickerProps;
|
|
179
|
-
timePickerSelectProps?: SelectProps<any>;
|
|
180
|
-
times?: Array<string>;
|
|
181
|
-
value?: string;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// @public (undocumented)
|
|
185
|
-
type DateTimePickerProps_2 = typeof dateTimePickerDefaultProps & DateTimePickerProps;
|
|
186
|
-
|
|
187
|
-
// @public (undocumented)
|
|
188
|
-
export type Spacing = 'compact' | 'default';
|
|
189
|
-
|
|
190
|
-
// @public (undocumented)
|
|
191
|
-
export const TimePicker: React_2.ForwardRefExoticComponent<Pick<Pick<Omit<TimePickerProps_2, keyof WithAnalyticsEventsProps>, "formatDisplayLabel" | "isOpen" | "placeholder" | "testId" | "timeFormat" | "value"> & Partial<Pick<Omit<TimePickerProps_2, keyof WithAnalyticsEventsProps>, "appearance" | "autoFocus" | "defaultIsOpen" | "defaultValue" | "hideIcon" | "id" | "innerProps" | "isDisabled" | "isInvalid" | "locale" | "name" | "onBlur" | "onChange" | "onFocus" | "parseInputValue" | "selectProps" | "spacing" | "timeIsEditable" | "times">> & Partial<Pick<{
|
|
192
|
-
appearance: Appearance;
|
|
193
|
-
autoFocus: boolean;
|
|
194
|
-
defaultIsOpen: boolean;
|
|
195
|
-
defaultValue: string;
|
|
196
|
-
hideIcon: boolean;
|
|
197
|
-
id: string;
|
|
198
|
-
innerProps: {};
|
|
199
|
-
isDisabled: boolean;
|
|
200
|
-
isInvalid: boolean;
|
|
201
|
-
name: string;
|
|
202
|
-
onBlur: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
203
|
-
onChange: (_value: string) => void;
|
|
204
|
-
onFocus: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
205
|
-
parseInputValue: (time: string, _timeFormat: string) => Date | string;
|
|
206
|
-
selectProps: {};
|
|
207
|
-
spacing: Spacing;
|
|
208
|
-
times: string[];
|
|
209
|
-
timeIsEditable: boolean;
|
|
210
|
-
locale: string;
|
|
211
|
-
}, never>> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "appearance" | "autoFocus" | "defaultIsOpen" | "defaultValue" | "formatDisplayLabel" | "hideIcon" | "id" | "innerProps" | "isDisabled" | "isInvalid" | "isOpen" | "key" | "locale" | "name" | "onBlur" | "onChange" | "onFocus" | "parseInputValue" | "placeholder" | "selectProps" | "spacing" | "testId" | "timeFormat" | "timeIsEditable" | "times" | "value"> & React_2.RefAttributes<any>>;
|
|
212
|
-
|
|
213
|
-
// @public (undocumented)
|
|
214
|
-
const timePickerDefaultProps: {
|
|
215
|
-
appearance: Appearance;
|
|
216
|
-
autoFocus: boolean;
|
|
217
|
-
defaultIsOpen: boolean;
|
|
218
|
-
defaultValue: string;
|
|
219
|
-
hideIcon: boolean;
|
|
220
|
-
id: string;
|
|
221
|
-
innerProps: {};
|
|
222
|
-
isDisabled: boolean;
|
|
223
|
-
isInvalid: boolean;
|
|
224
|
-
name: string;
|
|
225
|
-
onBlur: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
226
|
-
onChange: (_value: string) => void;
|
|
227
|
-
onFocus: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
228
|
-
parseInputValue: (time: string, _timeFormat: string) => Date | string;
|
|
229
|
-
selectProps: {};
|
|
230
|
-
spacing: Spacing;
|
|
231
|
-
times: string[];
|
|
232
|
-
timeIsEditable: boolean;
|
|
233
|
-
locale: string;
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
// @public (undocumented)
|
|
237
|
-
export interface TimePickerProps extends WithAnalyticsEventsProps {
|
|
238
|
-
appearance?: Appearance;
|
|
239
|
-
autoFocus?: boolean;
|
|
240
|
-
defaultIsOpen?: boolean;
|
|
241
|
-
defaultValue?: string;
|
|
242
|
-
formatDisplayLabel?: (time: string, timeFormat: string) => string;
|
|
243
|
-
hideIcon?: boolean;
|
|
244
|
-
id?: string;
|
|
245
|
-
innerProps?: React_2.AllHTMLAttributes<HTMLElement>;
|
|
246
|
-
isDisabled?: boolean;
|
|
247
|
-
isInvalid?: boolean;
|
|
248
|
-
isOpen?: boolean;
|
|
249
|
-
locale?: string;
|
|
250
|
-
name?: string;
|
|
251
|
-
onBlur?: React_2.FocusEventHandler<HTMLElement>;
|
|
252
|
-
onChange?: (value: string) => void;
|
|
253
|
-
onFocus?: React_2.FocusEventHandler<HTMLElement>;
|
|
254
|
-
parseInputValue?: (time: string, timeFormat: string) => Date | string;
|
|
255
|
-
placeholder?: string;
|
|
256
|
-
selectProps?: SelectProps<any>;
|
|
257
|
-
spacing?: Spacing;
|
|
258
|
-
testId?: string;
|
|
259
|
-
timeFormat?: string;
|
|
260
|
-
timeIsEditable?: boolean;
|
|
261
|
-
times?: string[];
|
|
262
|
-
value?: string;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
// @public (undocumented)
|
|
266
|
-
type TimePickerProps_2 = typeof timePickerDefaultProps & TimePickerProps;
|
|
267
|
-
|
|
268
|
-
// (No @packageDocumentation comment for this package)
|
|
269
|
-
|
|
270
|
-
```
|