@atlaskit/datetime-picker 11.1.0 → 11.1.4
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 +25 -0
- package/dist/cjs/components/DatePicker.js +8 -10
- package/dist/cjs/components/DateTimePicker.js +16 -18
- package/dist/cjs/components/TimePicker.js +11 -10
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/internal/FixedLayer.js +2 -2
- package/dist/cjs/internal/index.js +3 -2
- package/dist/cjs/internal/parseTime.js +4 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/DatePicker.js +5 -6
- package/dist/es2019/components/DateTimePicker.js +12 -13
- package/dist/es2019/components/TimePicker.js +3 -4
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/DatePicker.js +8 -9
- package/dist/esm/components/DateTimePicker.js +16 -17
- package/dist/esm/components/TimePicker.js +10 -9
- package/dist/esm/internal/FixedLayer.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/components/DatePicker.d.ts +1 -1
- package/dist/types/components/TimePicker.d.ts +1 -1
- package/dist/types/internal/index.d.ts +1 -0
- package/package.json +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 11.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 11.1.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`c55c736ecea`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c55c736ecea) - Patch VULN AFP-3486 AFP-3487 AFP-3488 AFP-3489
|
|
14
|
+
|
|
15
|
+
## 11.1.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
22
|
+
## 11.1.1
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- [`095021b1e08`](https://bitbucket.org/atlassian/atlassian-frontend/commits/095021b1e08) - renaming deprecated lifecycle methods
|
|
27
|
+
|
|
3
28
|
## 11.1.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
|
@@ -49,8 +49,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
49
49
|
|
|
50
50
|
var _constants = require("@atlaskit/theme/constants");
|
|
51
51
|
|
|
52
|
-
var _tokens = require("@atlaskit/tokens");
|
|
53
|
-
|
|
54
52
|
var _internal = require("../internal");
|
|
55
53
|
|
|
56
54
|
var _FixedLayer = _interopRequireDefault(require("../internal/FixedLayer"));
|
|
@@ -61,16 +59,16 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
61
59
|
|
|
62
60
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
63
61
|
|
|
64
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
62
|
+
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; }
|
|
65
63
|
|
|
66
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
64
|
+
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; }
|
|
67
65
|
|
|
68
66
|
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); }; }
|
|
69
67
|
|
|
70
68
|
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; } }
|
|
71
69
|
|
|
72
70
|
var packageName = "@atlaskit/datetime-picker";
|
|
73
|
-
var packageVersion = "11.1.
|
|
71
|
+
var packageVersion = "11.1.4";
|
|
74
72
|
/* eslint-disable react/no-unused-prop-types */
|
|
75
73
|
|
|
76
74
|
function getDateObj(date) {
|
|
@@ -88,9 +86,9 @@ function getValidDate(iso) {
|
|
|
88
86
|
|
|
89
87
|
var menuStyles = (0, _core.css)({
|
|
90
88
|
zIndex: _constants.layers.dialog(),
|
|
91
|
-
backgroundColor: (
|
|
89
|
+
backgroundColor: "var(--ds-background-default, ".concat(_colors.N20, ")"),
|
|
92
90
|
borderRadius: "".concat((0, _constants.borderRadius)(), "px"),
|
|
93
|
-
boxShadow: (
|
|
91
|
+
boxShadow: "var(--ds-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")")
|
|
94
92
|
});
|
|
95
93
|
|
|
96
94
|
var Menu = function Menu(_ref) {
|
|
@@ -382,7 +380,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
382
380
|
});
|
|
383
381
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getSubtleControlStyles", function (isOpen) {
|
|
384
382
|
return {
|
|
385
|
-
border: "2px solid ".concat(isOpen ? (
|
|
383
|
+
border: "2px solid ".concat(isOpen ? "var(--ds-border-focus, ".concat(_colors.B100, ")") : "transparent"),
|
|
386
384
|
backgroundColor: 'transparent',
|
|
387
385
|
padding: '1px'
|
|
388
386
|
};
|
|
@@ -447,8 +445,8 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
447
445
|
}
|
|
448
446
|
|
|
449
447
|
(0, _createClass2.default)(DatePicker, [{
|
|
450
|
-
key: "
|
|
451
|
-
value: function
|
|
448
|
+
key: "UNSAFE_componentWillReceiveProps",
|
|
449
|
+
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
452
450
|
if (this.props.locale !== nextProps.locale) {
|
|
453
451
|
this.setState({
|
|
454
452
|
l10n: (0, _locale.createLocalizationProvider)(nextProps.locale)
|
|
@@ -41,8 +41,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
41
41
|
|
|
42
42
|
var _constants = require("@atlaskit/theme/constants");
|
|
43
43
|
|
|
44
|
-
var _tokens = require("@atlaskit/tokens");
|
|
45
|
-
|
|
46
44
|
var _internal = require("../internal");
|
|
47
45
|
|
|
48
46
|
var _DatePicker = _interopRequireDefault(require("./DatePicker"));
|
|
@@ -55,22 +53,22 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
55
53
|
|
|
56
54
|
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; } }
|
|
57
55
|
|
|
58
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
56
|
+
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; }
|
|
59
57
|
|
|
60
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
58
|
+
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; }
|
|
61
59
|
|
|
62
60
|
var packageName = "@atlaskit/datetime-picker";
|
|
63
|
-
var packageVersion = "11.1.
|
|
61
|
+
var packageVersion = "11.1.4";
|
|
64
62
|
/* eslint-disable react/no-unused-prop-types */
|
|
65
63
|
|
|
66
64
|
var isInvalidBorderStyles = (0, _core.css)({
|
|
67
|
-
borderColor: (
|
|
65
|
+
borderColor: "var(--ds-iconBorder-danger, ".concat(_colors.R400, ")")
|
|
68
66
|
});
|
|
69
67
|
var isFocusedBorderStyles = (0, _core.css)({
|
|
70
|
-
borderColor: (
|
|
68
|
+
borderColor: "var(--ds-border-focus, ".concat(_colors.B100, ")")
|
|
71
69
|
});
|
|
72
70
|
var isFocusedStyles = (0, _core.css)({
|
|
73
|
-
backgroundColor: (
|
|
71
|
+
backgroundColor: "var(--ds-background-default, ".concat(_colors.N0, ")")
|
|
74
72
|
});
|
|
75
73
|
var subtleBgStyles = (0, _core.css)({
|
|
76
74
|
backgroundColor: 'transparent',
|
|
@@ -78,14 +76,14 @@ var subtleBgStyles = (0, _core.css)({
|
|
|
78
76
|
});
|
|
79
77
|
var hoverStyles = (0, _core.css)({
|
|
80
78
|
'&:hover': {
|
|
81
|
-
backgroundColor: (
|
|
82
|
-
borderColor: (
|
|
79
|
+
backgroundColor: "var(--ds-background-default, ".concat(_colors.N30, ")"),
|
|
80
|
+
borderColor: "var(--ds-border-neutral, ".concat(_colors.N30, ")")
|
|
83
81
|
}
|
|
84
82
|
});
|
|
85
83
|
var isInvalidHoverStyles = (0, _core.css)({
|
|
86
84
|
'&:hover': {
|
|
87
|
-
backgroundColor: (
|
|
88
|
-
borderColor: (
|
|
85
|
+
backgroundColor: "var(--ds-background-default, ".concat(_colors.N0, ")"),
|
|
86
|
+
borderColor: "var(--ds-iconBorder-danger, ".concat(_colors.R400, ")")
|
|
89
87
|
}
|
|
90
88
|
});
|
|
91
89
|
var isDisabledStyles = (0, _core.css)({
|
|
@@ -95,8 +93,8 @@ var isDisabledStyles = (0, _core.css)({
|
|
|
95
93
|
});
|
|
96
94
|
var baseContainerStyles = (0, _core.css)({
|
|
97
95
|
display: 'flex',
|
|
98
|
-
backgroundColor: (
|
|
99
|
-
border: "2px solid ".concat((
|
|
96
|
+
backgroundColor: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N20, ")"),
|
|
97
|
+
border: "2px solid ".concat("var(--ds-border-neutral, ".concat(_colors.N20, ")")),
|
|
100
98
|
borderRadius: "".concat((0, _constants.borderRadius)(), "px"),
|
|
101
99
|
transition: 'background-color 200ms ease-in-out, border-color 200ms ease-in-out',
|
|
102
100
|
'&:hover': {
|
|
@@ -123,10 +121,10 @@ var iconContainerStyles = (0, _core.css)({
|
|
|
123
121
|
paddingLeft: "".concat(ICON_PADDING * 2, "px"),
|
|
124
122
|
alignItems: 'center',
|
|
125
123
|
flexBasis: 'inherit',
|
|
126
|
-
color: (
|
|
124
|
+
color: "var(--ds-text-lowEmphasis, ".concat(_colors.N70, ")"),
|
|
127
125
|
transition: "color 150ms",
|
|
128
126
|
'&:hover': {
|
|
129
|
-
color: (
|
|
127
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N500, ")")
|
|
130
128
|
}
|
|
131
129
|
}); // react-select overrides (via @atlaskit/select).
|
|
132
130
|
|
|
@@ -260,9 +258,9 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
260
258
|
});
|
|
261
259
|
|
|
262
260
|
if (dateValue && timeValue) {
|
|
263
|
-
var
|
|
261
|
+
var value = (0, _internal.formatDateTimeZoneIntoIso)(dateValue, timeValue, zoneValue);
|
|
264
262
|
|
|
265
|
-
var _this$parseValue = this.parseValue(
|
|
263
|
+
var _this$parseValue = this.parseValue(value, dateValue, timeValue, zoneValue),
|
|
266
264
|
parsedZone = _this$parseValue.zoneValue;
|
|
267
265
|
|
|
268
266
|
var valueWithValidZone = (0, _internal.formatDateTimeZoneIntoIso)(dateValue, timeValue, parsedZone);
|
|
@@ -43,8 +43,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
43
43
|
|
|
44
44
|
var _constants = require("@atlaskit/theme/constants");
|
|
45
45
|
|
|
46
|
-
var _tokens = require("@atlaskit/tokens");
|
|
47
|
-
|
|
48
46
|
var _internal = require("../internal");
|
|
49
47
|
|
|
50
48
|
var _FixedLayer = _interopRequireDefault(require("../internal/FixedLayer"));
|
|
@@ -53,20 +51,23 @@ var _parseTime = _interopRequireDefault(require("../internal/parseTime"));
|
|
|
53
51
|
|
|
54
52
|
var _utils = require("./utils");
|
|
55
53
|
|
|
54
|
+
var _excluded = ["selectProps"],
|
|
55
|
+
_excluded2 = ["styles"];
|
|
56
|
+
|
|
56
57
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
57
58
|
|
|
58
59
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
59
60
|
|
|
60
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
61
|
+
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; }
|
|
61
62
|
|
|
62
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
63
|
+
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; }
|
|
63
64
|
|
|
64
65
|
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); }; }
|
|
65
66
|
|
|
66
67
|
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; } }
|
|
67
68
|
|
|
68
69
|
var packageName = "@atlaskit/datetime-picker";
|
|
69
|
-
var packageVersion = "11.1.
|
|
70
|
+
var packageVersion = "11.1.4";
|
|
70
71
|
var menuStyles = {
|
|
71
72
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
72
73
|
position: 'static',
|
|
@@ -80,7 +81,7 @@ var menuStyles = {
|
|
|
80
81
|
|
|
81
82
|
var FixedLayerMenu = function FixedLayerMenu(_ref) {
|
|
82
83
|
var selectProps = _ref.selectProps,
|
|
83
|
-
rest = (0, _objectWithoutProperties2.default)(_ref,
|
|
84
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
84
85
|
return /*#__PURE__*/_react.default.createElement(_FixedLayer.default, {
|
|
85
86
|
inputValue: selectProps.inputValue,
|
|
86
87
|
containerRef: selectProps.fixedLayerRef,
|
|
@@ -235,7 +236,7 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
235
236
|
});
|
|
236
237
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getSubtleControlStyles", function (selectStyles) {
|
|
237
238
|
return !selectStyles.control ? {
|
|
238
|
-
border: "2px solid ".concat(_this.getSafeState().isFocused ? (
|
|
239
|
+
border: "2px solid ".concat(_this.getSafeState().isFocused ? "var(--ds-border-focus, ".concat(_colors.B100, ")") : "transparent"),
|
|
239
240
|
backgroundColor: 'transparent',
|
|
240
241
|
padding: '1px'
|
|
241
242
|
} : {};
|
|
@@ -284,8 +285,8 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
284
285
|
}
|
|
285
286
|
|
|
286
287
|
(0, _createClass2.default)(TimePicker, [{
|
|
287
|
-
key: "
|
|
288
|
-
value: function
|
|
288
|
+
key: "UNSAFE_componentWillReceiveProps",
|
|
289
|
+
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
289
290
|
if (this.props.locale !== nextProps.locale) {
|
|
290
291
|
this.setState({
|
|
291
292
|
l10n: (0, _locale.createLocalizationProvider)(nextProps.locale)
|
|
@@ -332,7 +333,7 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
332
333
|
var validationState = this.props.isInvalid ? 'error' : 'default';
|
|
333
334
|
var _selectProps$styles = selectProps.styles,
|
|
334
335
|
selectStyles = _selectProps$styles === void 0 ? {} : _selectProps$styles,
|
|
335
|
-
otherSelectProps = (0, _objectWithoutProperties2.default)(selectProps,
|
|
336
|
+
otherSelectProps = (0, _objectWithoutProperties2.default)(selectProps, _excluded2);
|
|
336
337
|
var controlStyles = this.props.appearance === 'subtle' ? this.getSubtleControlStyles(selectStyles) : {};
|
|
337
338
|
var SelectComponent = this.props.timeIsEditable ? _select.CreatableSelect : _select.default;
|
|
338
339
|
var labelAndValue = value && {
|
package/dist/cjs/index.js
CHANGED
|
@@ -11,16 +11,16 @@ Object.defineProperty(exports, "DatePicker", {
|
|
|
11
11
|
return _DatePicker.default;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
Object.defineProperty(exports, "
|
|
14
|
+
Object.defineProperty(exports, "DateTimePicker", {
|
|
15
15
|
enumerable: true,
|
|
16
16
|
get: function get() {
|
|
17
|
-
return
|
|
17
|
+
return _DateTimePicker.default;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
Object.defineProperty(exports, "
|
|
20
|
+
Object.defineProperty(exports, "TimePicker", {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function get() {
|
|
23
|
-
return
|
|
23
|
+
return _TimePicker.default;
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
|
|
@@ -31,9 +31,9 @@ var _popper = require("@atlaskit/popper");
|
|
|
31
31
|
|
|
32
32
|
var _constants = require("@atlaskit/theme/constants");
|
|
33
33
|
|
|
34
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
34
|
+
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; }
|
|
35
35
|
|
|
36
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
36
|
+
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; }
|
|
37
37
|
|
|
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
|
|
|
@@ -5,9 +5,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.defaultTimes = exports.defaultTimeFormat = exports.defaultDateFormat = exports.EmptyClearIndicator = exports.DropdownIndicator = void 0;
|
|
9
9
|
exports.formatDateTimeZoneIntoIso = formatDateTimeZoneIntoIso;
|
|
10
|
-
exports.
|
|
10
|
+
exports.padToTwo = padToTwo;
|
|
11
|
+
exports.placeholderDatetime = void 0;
|
|
11
12
|
|
|
12
13
|
var _react = _interopRequireDefault(require("react"));
|
|
13
14
|
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.removeSpacer = removeSpacer;
|
|
8
|
-
exports.formatSemi24 = formatSemi24;
|
|
6
|
+
exports.assignToDate = assignToDate;
|
|
9
7
|
exports.checkHour = checkHour;
|
|
10
8
|
exports.checkMinute = checkMinute;
|
|
11
9
|
exports.convertTo24hrTime = convertTo24hrTime;
|
|
12
|
-
exports.assignToDate = assignToDate;
|
|
13
10
|
exports.default = _default;
|
|
11
|
+
exports.formatSemi24 = formatSemi24;
|
|
12
|
+
exports.isValid = isValid;
|
|
13
|
+
exports.removeSpacer = removeSpacer;
|
|
14
14
|
var map24 = {
|
|
15
15
|
'12': '12',
|
|
16
16
|
'01': '13',
|
package/dist/cjs/version.json
CHANGED
|
@@ -14,12 +14,11 @@ import { createLocalizationProvider } from '@atlaskit/locale';
|
|
|
14
14
|
import Select, { mergeStyles } from '@atlaskit/select';
|
|
15
15
|
import { B100, N20, N50A, N60A } from '@atlaskit/theme/colors';
|
|
16
16
|
import { borderRadius, gridSize, layers } from '@atlaskit/theme/constants';
|
|
17
|
-
import { token } from '@atlaskit/tokens';
|
|
18
17
|
import { defaultDateFormat, EmptyClearIndicator, padToTwo, placeholderDatetime } from '../internal';
|
|
19
18
|
import FixedLayer from '../internal/FixedLayer';
|
|
20
19
|
import { convertTokens } from './utils';
|
|
21
20
|
const packageName = "@atlaskit/datetime-picker";
|
|
22
|
-
const packageVersion = "11.1.
|
|
21
|
+
const packageVersion = "11.1.4";
|
|
23
22
|
/* eslint-disable react/no-unused-prop-types */
|
|
24
23
|
|
|
25
24
|
function getDateObj(date) {
|
|
@@ -37,9 +36,9 @@ function getValidDate(iso) {
|
|
|
37
36
|
|
|
38
37
|
const menuStyles = css({
|
|
39
38
|
zIndex: layers.dialog(),
|
|
40
|
-
backgroundColor:
|
|
39
|
+
backgroundColor: `var(--ds-background-default, ${N20})`,
|
|
41
40
|
borderRadius: `${borderRadius()}px`,
|
|
42
|
-
boxShadow:
|
|
41
|
+
boxShadow: `var(--ds-overlay, ${`0 4px 8px -2px ${N50A}, 0 0 1px ${N60A}`})`
|
|
43
42
|
});
|
|
44
43
|
|
|
45
44
|
const Menu = ({
|
|
@@ -329,7 +328,7 @@ class DatePicker extends Component {
|
|
|
329
328
|
});
|
|
330
329
|
|
|
331
330
|
_defineProperty(this, "getSubtleControlStyles", isOpen => ({
|
|
332
|
-
border: `2px solid ${isOpen ?
|
|
331
|
+
border: `2px solid ${isOpen ? `var(--ds-border-focus, ${B100})` : `transparent`}`,
|
|
333
332
|
backgroundColor: 'transparent',
|
|
334
333
|
padding: '1px'
|
|
335
334
|
}));
|
|
@@ -398,7 +397,7 @@ class DatePicker extends Component {
|
|
|
398
397
|
};
|
|
399
398
|
}
|
|
400
399
|
|
|
401
|
-
|
|
400
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
402
401
|
if (this.props.locale !== nextProps.locale) {
|
|
403
402
|
this.setState({
|
|
404
403
|
l10n: createLocalizationProvider(nextProps.locale)
|
|
@@ -12,23 +12,22 @@ import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
|
|
|
12
12
|
import { mergeStyles } from '@atlaskit/select';
|
|
13
13
|
import { B100, N0, N20, N30, N500, N70, R400 } from '@atlaskit/theme/colors';
|
|
14
14
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
15
|
-
import { token } from '@atlaskit/tokens';
|
|
16
15
|
import { defaultTimes, formatDateTimeZoneIntoIso } from '../internal';
|
|
17
16
|
import DatePicker from './DatePicker';
|
|
18
17
|
import TimePicker from './TimePicker';
|
|
19
18
|
import { convertTokens } from './utils';
|
|
20
19
|
const packageName = "@atlaskit/datetime-picker";
|
|
21
|
-
const packageVersion = "11.1.
|
|
20
|
+
const packageVersion = "11.1.4";
|
|
22
21
|
/* eslint-disable react/no-unused-prop-types */
|
|
23
22
|
|
|
24
23
|
const isInvalidBorderStyles = css({
|
|
25
|
-
borderColor:
|
|
24
|
+
borderColor: `var(--ds-iconBorder-danger, ${R400})`
|
|
26
25
|
});
|
|
27
26
|
const isFocusedBorderStyles = css({
|
|
28
|
-
borderColor:
|
|
27
|
+
borderColor: `var(--ds-border-focus, ${B100})`
|
|
29
28
|
});
|
|
30
29
|
const isFocusedStyles = css({
|
|
31
|
-
backgroundColor:
|
|
30
|
+
backgroundColor: `var(--ds-background-default, ${N0})`
|
|
32
31
|
});
|
|
33
32
|
const subtleBgStyles = css({
|
|
34
33
|
backgroundColor: 'transparent',
|
|
@@ -36,14 +35,14 @@ const subtleBgStyles = css({
|
|
|
36
35
|
});
|
|
37
36
|
const hoverStyles = css({
|
|
38
37
|
'&:hover': {
|
|
39
|
-
backgroundColor:
|
|
40
|
-
borderColor:
|
|
38
|
+
backgroundColor: `var(--ds-background-default, ${N30})`,
|
|
39
|
+
borderColor: `var(--ds-border-neutral, ${N30})`
|
|
41
40
|
}
|
|
42
41
|
});
|
|
43
42
|
const isInvalidHoverStyles = css({
|
|
44
43
|
'&:hover': {
|
|
45
|
-
backgroundColor:
|
|
46
|
-
borderColor:
|
|
44
|
+
backgroundColor: `var(--ds-background-default, ${N0})`,
|
|
45
|
+
borderColor: `var(--ds-iconBorder-danger, ${R400})`
|
|
47
46
|
}
|
|
48
47
|
});
|
|
49
48
|
const isDisabledStyles = css({
|
|
@@ -53,8 +52,8 @@ const isDisabledStyles = css({
|
|
|
53
52
|
});
|
|
54
53
|
const baseContainerStyles = css({
|
|
55
54
|
display: 'flex',
|
|
56
|
-
backgroundColor:
|
|
57
|
-
border: `2px solid ${
|
|
55
|
+
backgroundColor: `var(--ds-background-subtleNeutral-resting, ${N20})`,
|
|
56
|
+
border: `2px solid ${`var(--ds-border-neutral, ${N20})`}`,
|
|
58
57
|
borderRadius: `${borderRadius()}px`,
|
|
59
58
|
transition: 'background-color 200ms ease-in-out, border-color 200ms ease-in-out',
|
|
60
59
|
'&:hover': {
|
|
@@ -81,10 +80,10 @@ const iconContainerStyles = css({
|
|
|
81
80
|
paddingLeft: `${ICON_PADDING * 2}px`,
|
|
82
81
|
alignItems: 'center',
|
|
83
82
|
flexBasis: 'inherit',
|
|
84
|
-
color:
|
|
83
|
+
color: `var(--ds-text-lowEmphasis, ${N70})`,
|
|
85
84
|
transition: `color 150ms`,
|
|
86
85
|
'&:hover': {
|
|
87
|
-
color:
|
|
86
|
+
color: `var(--ds-text-mediumEmphasis, ${N500})`
|
|
88
87
|
}
|
|
89
88
|
}); // react-select overrides (via @atlaskit/select).
|
|
90
89
|
|
|
@@ -9,13 +9,12 @@ import { createLocalizationProvider } from '@atlaskit/locale';
|
|
|
9
9
|
import Select, { components, CreatableSelect, mergeStyles } from '@atlaskit/select';
|
|
10
10
|
import { B100 } from '@atlaskit/theme/colors';
|
|
11
11
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
12
|
-
import { token } from '@atlaskit/tokens';
|
|
13
12
|
import { defaultTimeFormat, defaultTimes, DropdownIndicator, EmptyClearIndicator, placeholderDatetime } from '../internal';
|
|
14
13
|
import FixedLayer from '../internal/FixedLayer';
|
|
15
14
|
import parseTime from '../internal/parseTime';
|
|
16
15
|
import { convertTokens } from './utils';
|
|
17
16
|
const packageName = "@atlaskit/datetime-picker";
|
|
18
|
-
const packageVersion = "11.1.
|
|
17
|
+
const packageVersion = "11.1.4";
|
|
19
18
|
const menuStyles = {
|
|
20
19
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
21
20
|
position: 'static',
|
|
@@ -180,7 +179,7 @@ class TimePicker extends React.Component {
|
|
|
180
179
|
});
|
|
181
180
|
|
|
182
181
|
_defineProperty(this, "getSubtleControlStyles", selectStyles => !selectStyles.control ? {
|
|
183
|
-
border: `2px solid ${this.getSafeState().isFocused ?
|
|
182
|
+
border: `2px solid ${this.getSafeState().isFocused ? `var(--ds-border-focus, ${B100})` : `transparent`}`,
|
|
184
183
|
backgroundColor: 'transparent',
|
|
185
184
|
padding: '1px'
|
|
186
185
|
} : {});
|
|
@@ -231,7 +230,7 @@ class TimePicker extends React.Component {
|
|
|
231
230
|
});
|
|
232
231
|
}
|
|
233
232
|
|
|
234
|
-
|
|
233
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
235
234
|
if (this.props.locale !== nextProps.locale) {
|
|
236
235
|
this.setState({
|
|
237
236
|
l10n: createLocalizationProvider(nextProps.locale)
|
package/dist/es2019/version.json
CHANGED
|
@@ -8,9 +8,9 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
import _extends from "@babel/runtime/helpers/extends";
|
|
10
10
|
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
11
|
+
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; }
|
|
12
12
|
|
|
13
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
13
|
+
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) { _defineProperty(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; }
|
|
14
14
|
|
|
15
15
|
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); }; }
|
|
16
16
|
|
|
@@ -29,12 +29,11 @@ import { createLocalizationProvider } from '@atlaskit/locale';
|
|
|
29
29
|
import Select, { mergeStyles } from '@atlaskit/select';
|
|
30
30
|
import { B100, N20, N50A, N60A } from '@atlaskit/theme/colors';
|
|
31
31
|
import { borderRadius, gridSize, layers } from '@atlaskit/theme/constants';
|
|
32
|
-
import { token } from '@atlaskit/tokens';
|
|
33
32
|
import { defaultDateFormat, EmptyClearIndicator, padToTwo, placeholderDatetime } from '../internal';
|
|
34
33
|
import FixedLayer from '../internal/FixedLayer';
|
|
35
34
|
import { convertTokens } from './utils';
|
|
36
35
|
var packageName = "@atlaskit/datetime-picker";
|
|
37
|
-
var packageVersion = "11.1.
|
|
36
|
+
var packageVersion = "11.1.4";
|
|
38
37
|
/* eslint-disable react/no-unused-prop-types */
|
|
39
38
|
|
|
40
39
|
function getDateObj(date) {
|
|
@@ -52,9 +51,9 @@ function getValidDate(iso) {
|
|
|
52
51
|
|
|
53
52
|
var menuStyles = css({
|
|
54
53
|
zIndex: layers.dialog(),
|
|
55
|
-
backgroundColor:
|
|
54
|
+
backgroundColor: "var(--ds-background-default, ".concat(N20, ")"),
|
|
56
55
|
borderRadius: "".concat(borderRadius(), "px"),
|
|
57
|
-
boxShadow:
|
|
56
|
+
boxShadow: "var(--ds-overlay, ".concat("0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")")
|
|
58
57
|
});
|
|
59
58
|
|
|
60
59
|
var Menu = function Menu(_ref) {
|
|
@@ -364,7 +363,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
364
363
|
|
|
365
364
|
_defineProperty(_assertThisInitialized(_this), "getSubtleControlStyles", function (isOpen) {
|
|
366
365
|
return {
|
|
367
|
-
border: "2px solid ".concat(isOpen ?
|
|
366
|
+
border: "2px solid ".concat(isOpen ? "var(--ds-border-focus, ".concat(B100, ")") : "transparent"),
|
|
368
367
|
backgroundColor: 'transparent',
|
|
369
368
|
padding: '1px'
|
|
370
369
|
};
|
|
@@ -432,8 +431,8 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
432
431
|
}
|
|
433
432
|
|
|
434
433
|
_createClass(DatePicker, [{
|
|
435
|
-
key: "
|
|
436
|
-
value: function
|
|
434
|
+
key: "UNSAFE_componentWillReceiveProps",
|
|
435
|
+
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
437
436
|
if (this.props.locale !== nextProps.locale) {
|
|
438
437
|
this.setState({
|
|
439
438
|
l10n: createLocalizationProvider(nextProps.locale)
|
|
@@ -11,9 +11,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
11
11
|
|
|
12
12
|
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; } }
|
|
13
13
|
|
|
14
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
14
|
+
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; }
|
|
15
15
|
|
|
16
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
16
|
+
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) { _defineProperty(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; }
|
|
17
17
|
|
|
18
18
|
/** @jsx jsx */
|
|
19
19
|
import React from 'react';
|
|
@@ -26,23 +26,22 @@ import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
|
|
|
26
26
|
import { mergeStyles } from '@atlaskit/select';
|
|
27
27
|
import { B100, N0, N20, N30, N500, N70, R400 } from '@atlaskit/theme/colors';
|
|
28
28
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
29
|
-
import { token } from '@atlaskit/tokens';
|
|
30
29
|
import { defaultTimes, formatDateTimeZoneIntoIso } from '../internal';
|
|
31
30
|
import DatePicker from './DatePicker';
|
|
32
31
|
import TimePicker from './TimePicker';
|
|
33
32
|
import { convertTokens } from './utils';
|
|
34
33
|
var packageName = "@atlaskit/datetime-picker";
|
|
35
|
-
var packageVersion = "11.1.
|
|
34
|
+
var packageVersion = "11.1.4";
|
|
36
35
|
/* eslint-disable react/no-unused-prop-types */
|
|
37
36
|
|
|
38
37
|
var isInvalidBorderStyles = css({
|
|
39
|
-
borderColor:
|
|
38
|
+
borderColor: "var(--ds-iconBorder-danger, ".concat(R400, ")")
|
|
40
39
|
});
|
|
41
40
|
var isFocusedBorderStyles = css({
|
|
42
|
-
borderColor:
|
|
41
|
+
borderColor: "var(--ds-border-focus, ".concat(B100, ")")
|
|
43
42
|
});
|
|
44
43
|
var isFocusedStyles = css({
|
|
45
|
-
backgroundColor:
|
|
44
|
+
backgroundColor: "var(--ds-background-default, ".concat(N0, ")")
|
|
46
45
|
});
|
|
47
46
|
var subtleBgStyles = css({
|
|
48
47
|
backgroundColor: 'transparent',
|
|
@@ -50,14 +49,14 @@ var subtleBgStyles = css({
|
|
|
50
49
|
});
|
|
51
50
|
var hoverStyles = css({
|
|
52
51
|
'&:hover': {
|
|
53
|
-
backgroundColor:
|
|
54
|
-
borderColor:
|
|
52
|
+
backgroundColor: "var(--ds-background-default, ".concat(N30, ")"),
|
|
53
|
+
borderColor: "var(--ds-border-neutral, ".concat(N30, ")")
|
|
55
54
|
}
|
|
56
55
|
});
|
|
57
56
|
var isInvalidHoverStyles = css({
|
|
58
57
|
'&:hover': {
|
|
59
|
-
backgroundColor:
|
|
60
|
-
borderColor:
|
|
58
|
+
backgroundColor: "var(--ds-background-default, ".concat(N0, ")"),
|
|
59
|
+
borderColor: "var(--ds-iconBorder-danger, ".concat(R400, ")")
|
|
61
60
|
}
|
|
62
61
|
});
|
|
63
62
|
var isDisabledStyles = css({
|
|
@@ -67,8 +66,8 @@ var isDisabledStyles = css({
|
|
|
67
66
|
});
|
|
68
67
|
var baseContainerStyles = css({
|
|
69
68
|
display: 'flex',
|
|
70
|
-
backgroundColor:
|
|
71
|
-
border: "2px solid ".concat(
|
|
69
|
+
backgroundColor: "var(--ds-background-subtleNeutral-resting, ".concat(N20, ")"),
|
|
70
|
+
border: "2px solid ".concat("var(--ds-border-neutral, ".concat(N20, ")")),
|
|
72
71
|
borderRadius: "".concat(borderRadius(), "px"),
|
|
73
72
|
transition: 'background-color 200ms ease-in-out, border-color 200ms ease-in-out',
|
|
74
73
|
'&:hover': {
|
|
@@ -95,10 +94,10 @@ var iconContainerStyles = css({
|
|
|
95
94
|
paddingLeft: "".concat(ICON_PADDING * 2, "px"),
|
|
96
95
|
alignItems: 'center',
|
|
97
96
|
flexBasis: 'inherit',
|
|
98
|
-
color:
|
|
97
|
+
color: "var(--ds-text-lowEmphasis, ".concat(N70, ")"),
|
|
99
98
|
transition: "color 150ms",
|
|
100
99
|
'&:hover': {
|
|
101
|
-
color:
|
|
100
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(N500, ")")
|
|
102
101
|
}
|
|
103
102
|
}); // react-select overrides (via @atlaskit/select).
|
|
104
103
|
|
|
@@ -240,9 +239,9 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
240
239
|
});
|
|
241
240
|
|
|
242
241
|
if (dateValue && timeValue) {
|
|
243
|
-
var
|
|
242
|
+
var value = formatDateTimeZoneIntoIso(dateValue, timeValue, zoneValue);
|
|
244
243
|
|
|
245
|
-
var _this$parseValue = this.parseValue(
|
|
244
|
+
var _this$parseValue = this.parseValue(value, dateValue, timeValue, zoneValue),
|
|
246
245
|
parsedZone = _this$parseValue.zoneValue;
|
|
247
246
|
|
|
248
247
|
var valueWithValidZone = formatDateTimeZoneIntoIso(dateValue, timeValue, parsedZone);
|
|
@@ -7,10 +7,12 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
import _extends from "@babel/runtime/helpers/extends";
|
|
9
9
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
10
|
+
var _excluded = ["selectProps"],
|
|
11
|
+
_excluded2 = ["styles"];
|
|
10
12
|
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
13
|
+
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; }
|
|
12
14
|
|
|
13
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
15
|
+
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) { _defineProperty(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; }
|
|
14
16
|
|
|
15
17
|
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); }; }
|
|
16
18
|
|
|
@@ -25,13 +27,12 @@ import { createLocalizationProvider } from '@atlaskit/locale';
|
|
|
25
27
|
import Select, { components, CreatableSelect, mergeStyles } from '@atlaskit/select';
|
|
26
28
|
import { B100 } from '@atlaskit/theme/colors';
|
|
27
29
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
28
|
-
import { token } from '@atlaskit/tokens';
|
|
29
30
|
import { defaultTimeFormat, defaultTimes, DropdownIndicator, EmptyClearIndicator, placeholderDatetime } from '../internal';
|
|
30
31
|
import FixedLayer from '../internal/FixedLayer';
|
|
31
32
|
import parseTime from '../internal/parseTime';
|
|
32
33
|
import { convertTokens } from './utils';
|
|
33
34
|
var packageName = "@atlaskit/datetime-picker";
|
|
34
|
-
var packageVersion = "11.1.
|
|
35
|
+
var packageVersion = "11.1.4";
|
|
35
36
|
var menuStyles = {
|
|
36
37
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
37
38
|
position: 'static',
|
|
@@ -45,7 +46,7 @@ var menuStyles = {
|
|
|
45
46
|
|
|
46
47
|
var FixedLayerMenu = function FixedLayerMenu(_ref) {
|
|
47
48
|
var selectProps = _ref.selectProps,
|
|
48
|
-
rest = _objectWithoutProperties(_ref,
|
|
49
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
49
50
|
|
|
50
51
|
return /*#__PURE__*/React.createElement(FixedLayer, {
|
|
51
52
|
inputValue: selectProps.inputValue,
|
|
@@ -213,7 +214,7 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
213
214
|
|
|
214
215
|
_defineProperty(_assertThisInitialized(_this), "getSubtleControlStyles", function (selectStyles) {
|
|
215
216
|
return !selectStyles.control ? {
|
|
216
|
-
border: "2px solid ".concat(_this.getSafeState().isFocused ?
|
|
217
|
+
border: "2px solid ".concat(_this.getSafeState().isFocused ? "var(--ds-border-focus, ".concat(B100, ")") : "transparent"),
|
|
217
218
|
backgroundColor: 'transparent',
|
|
218
219
|
padding: '1px'
|
|
219
220
|
} : {};
|
|
@@ -265,8 +266,8 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
265
266
|
}
|
|
266
267
|
|
|
267
268
|
_createClass(TimePicker, [{
|
|
268
|
-
key: "
|
|
269
|
-
value: function
|
|
269
|
+
key: "UNSAFE_componentWillReceiveProps",
|
|
270
|
+
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
270
271
|
if (this.props.locale !== nextProps.locale) {
|
|
271
272
|
this.setState({
|
|
272
273
|
l10n: createLocalizationProvider(nextProps.locale)
|
|
@@ -314,7 +315,7 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
314
315
|
|
|
315
316
|
var _selectProps$styles = selectProps.styles,
|
|
316
317
|
selectStyles = _selectProps$styles === void 0 ? {} : _selectProps$styles,
|
|
317
|
-
otherSelectProps = _objectWithoutProperties(selectProps,
|
|
318
|
+
otherSelectProps = _objectWithoutProperties(selectProps, _excluded2);
|
|
318
319
|
|
|
319
320
|
var controlStyles = this.props.appearance === 'subtle' ? this.getSubtleControlStyles(selectStyles) : {};
|
|
320
321
|
var SelectComponent = this.props.timeIsEditable ? CreatableSelect : Select;
|
|
@@ -6,9 +6,9 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
|
|
9
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
9
|
+
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; }
|
|
10
10
|
|
|
11
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
11
|
+
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) { _defineProperty(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; }
|
|
12
12
|
|
|
13
13
|
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); }; }
|
|
14
14
|
|
package/dist/esm/version.json
CHANGED
|
@@ -159,7 +159,7 @@ declare class DatePicker extends Component<DatePickerProps, State> {
|
|
|
159
159
|
calendarRef: CalendarRef | null;
|
|
160
160
|
containerRef: HTMLElement | null;
|
|
161
161
|
constructor(props: any);
|
|
162
|
-
|
|
162
|
+
UNSAFE_componentWillReceiveProps(nextProps: Readonly<DatePickerProps>): void;
|
|
163
163
|
getSafeState: () => {
|
|
164
164
|
inputValue: any;
|
|
165
165
|
isOpen: boolean;
|
|
@@ -135,7 +135,7 @@ declare class TimePicker extends React.Component<TimePickerProps, State> {
|
|
|
135
135
|
isFocused: boolean;
|
|
136
136
|
l10n: LocalizationProvider;
|
|
137
137
|
};
|
|
138
|
-
|
|
138
|
+
UNSAFE_componentWillReceiveProps(nextProps: TimePickerProps): void;
|
|
139
139
|
getSafeState: () => State;
|
|
140
140
|
getOptions(): Array<Option>;
|
|
141
141
|
onChange: (v: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.4",
|
|
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/"
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"atlassian": {
|
|
18
18
|
"team": "Design System Team",
|
|
19
19
|
"deprecatedAutoEntryPoints": true,
|
|
20
|
-
"inPublicMirror": true,
|
|
21
20
|
"releaseModel": "scheduled",
|
|
22
21
|
"website": {
|
|
23
22
|
"name": "Date time picker"
|
|
@@ -26,33 +25,32 @@
|
|
|
26
25
|
"dependencies": {
|
|
27
26
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
28
27
|
"@atlaskit/calendar": "^12.0.0",
|
|
29
|
-
"@atlaskit/icon": "^21.
|
|
28
|
+
"@atlaskit/icon": "^21.10.0",
|
|
30
29
|
"@atlaskit/locale": "^2.1.0",
|
|
31
30
|
"@atlaskit/popper": "^5.2.0",
|
|
32
31
|
"@atlaskit/select": "^15.2.0",
|
|
33
|
-
"@atlaskit/theme": "^12.
|
|
34
|
-
"@atlaskit/tokens": "^0.
|
|
32
|
+
"@atlaskit/theme": "^12.1.0",
|
|
33
|
+
"@atlaskit/tokens": "^0.5.0",
|
|
35
34
|
"@babel/runtime": "^7.0.0",
|
|
36
35
|
"@emotion/core": "^10.0.9",
|
|
37
36
|
"date-fns": "^2.17.0",
|
|
38
|
-
"lodash": "^4.17.
|
|
37
|
+
"lodash": "^4.17.21",
|
|
39
38
|
"react-scrolllock": "^5.0.1"
|
|
40
39
|
},
|
|
41
40
|
"peerDependencies": {
|
|
42
41
|
"react": "^16.8.0"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
45
|
-
"@atlaskit/build-utils": "*",
|
|
46
44
|
"@atlaskit/button": "^16.0.0",
|
|
47
45
|
"@atlaskit/docs": "*",
|
|
48
46
|
"@atlaskit/field-base": "^15.0.5",
|
|
49
|
-
"@atlaskit/field-range": "^9.0.0",
|
|
50
47
|
"@atlaskit/form": "^8.4.0",
|
|
51
|
-
"@atlaskit/modal-dialog": "^12.
|
|
48
|
+
"@atlaskit/modal-dialog": "^12.2.0",
|
|
49
|
+
"@atlaskit/range": "^5.0.11",
|
|
52
50
|
"@atlaskit/section-message": "^6.0.0",
|
|
53
51
|
"@atlaskit/ssr": "*",
|
|
54
52
|
"@atlaskit/textfield": "^5.0.0",
|
|
55
|
-
"@atlaskit/toggle": "^12.
|
|
53
|
+
"@atlaskit/toggle": "^12.4.0",
|
|
56
54
|
"@atlaskit/visual-regression": "*",
|
|
57
55
|
"@atlaskit/webdriver-runner": "*",
|
|
58
56
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
@@ -71,7 +69,10 @@
|
|
|
71
69
|
"import-structure": "atlassian-conventions"
|
|
72
70
|
},
|
|
73
71
|
"@repo/internal": {
|
|
74
|
-
"styling":
|
|
72
|
+
"styling": [
|
|
73
|
+
"static",
|
|
74
|
+
"emotion"
|
|
75
|
+
],
|
|
75
76
|
"theming": "tokens"
|
|
76
77
|
}
|
|
77
78
|
},
|