@atlaskit/datetime-picker 12.1.0 → 12.1.1
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/DatePicker.js +9 -6
- package/dist/cjs/components/DateTimePicker.js +1 -1
- package/dist/cjs/components/TimePicker.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/DatePicker.js +9 -6
- package/dist/es2019/components/DateTimePicker.js +1 -1
- package/dist/es2019/components/TimePicker.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/DatePicker.js +9 -6
- package/dist/esm/components/DateTimePicker.js +1 -1
- package/dist/esm/components/TimePicker.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/DatePicker.d.ts +3 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 12.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3fa327b5d01`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3fa327b5d01) - [ux] Border on a subtle appearance date-picker will now persist after a date is selected and field is in focus
|
|
8
|
+
|
|
3
9
|
## 12.1.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -68,7 +68,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
68
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; } }
|
|
69
69
|
|
|
70
70
|
var packageName = "@atlaskit/datetime-picker";
|
|
71
|
-
var packageVersion = "12.1.
|
|
71
|
+
var packageVersion = "12.1.1";
|
|
72
72
|
/* eslint-disable react/no-unused-prop-types */
|
|
73
73
|
|
|
74
74
|
function getDateObj(date) {
|
|
@@ -216,7 +216,8 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
216
216
|
});
|
|
217
217
|
} else {
|
|
218
218
|
_this.setState({
|
|
219
|
-
isOpen: false
|
|
219
|
+
isOpen: false,
|
|
220
|
+
isFocused: false
|
|
220
221
|
});
|
|
221
222
|
}
|
|
222
223
|
|
|
@@ -235,7 +236,8 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
235
236
|
} else {
|
|
236
237
|
_this.setState({
|
|
237
238
|
isOpen: true,
|
|
238
|
-
view: value
|
|
239
|
+
view: value,
|
|
240
|
+
isFocused: true
|
|
239
241
|
});
|
|
240
242
|
}
|
|
241
243
|
|
|
@@ -386,9 +388,9 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
386
388
|
_this.forceUpdate();
|
|
387
389
|
}
|
|
388
390
|
});
|
|
389
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getSubtleControlStyles", function (
|
|
391
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getSubtleControlStyles", function () {
|
|
390
392
|
return {
|
|
391
|
-
border: "2px solid ".concat(
|
|
393
|
+
border: "2px solid ".concat(_this.getSafeState().isFocused ? "var(--ds-border-focused, ".concat(_colors.B100, ")") : "transparent"),
|
|
392
394
|
backgroundColor: 'transparent',
|
|
393
395
|
padding: '1px'
|
|
394
396
|
};
|
|
@@ -442,6 +444,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
442
444
|
|
|
443
445
|
_this.state = {
|
|
444
446
|
isOpen: _this.props.defaultIsOpen,
|
|
447
|
+
isFocused: false,
|
|
445
448
|
clearingFromIcon: false,
|
|
446
449
|
inputValue: _this.props.selectProps.inputValue,
|
|
447
450
|
selectedValue: _this.props.value || _this.props.defaultValue,
|
|
@@ -509,7 +512,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
509
512
|
|
|
510
513
|
var _selectProps$styles = selectProps.styles,
|
|
511
514
|
selectStyles = _selectProps$styles === void 0 ? {} : _selectProps$styles;
|
|
512
|
-
var controlStyles = appearance === 'subtle' ? this.getSubtleControlStyles(
|
|
515
|
+
var controlStyles = appearance === 'subtle' ? this.getSubtleControlStyles() : {};
|
|
513
516
|
var disabledStyle = isDisabled ? {
|
|
514
517
|
pointerEvents: 'none'
|
|
515
518
|
} : {};
|
|
@@ -58,7 +58,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
58
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; }
|
|
59
59
|
|
|
60
60
|
var packageName = "@atlaskit/datetime-picker";
|
|
61
|
-
var packageVersion = "12.1.
|
|
61
|
+
var packageVersion = "12.1.1";
|
|
62
62
|
/* eslint-disable react/no-unused-prop-types */
|
|
63
63
|
|
|
64
64
|
var isInvalidBorderStyles = (0, _core.css)({
|
|
@@ -67,7 +67,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
67
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; } }
|
|
68
68
|
|
|
69
69
|
var packageName = "@atlaskit/datetime-picker";
|
|
70
|
-
var packageVersion = "12.1.
|
|
70
|
+
var packageVersion = "12.1.1";
|
|
71
71
|
var menuStyles = {
|
|
72
72
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
73
73
|
position: 'static',
|
package/dist/cjs/version.json
CHANGED
|
@@ -18,7 +18,7 @@ import { defaultDateFormat, EmptyClearIndicator, padToTwo, placeholderDatetime }
|
|
|
18
18
|
import FixedLayer from '../internal/FixedLayer';
|
|
19
19
|
import { convertTokens } from './utils';
|
|
20
20
|
const packageName = "@atlaskit/datetime-picker";
|
|
21
|
-
const packageVersion = "12.1.
|
|
21
|
+
const packageVersion = "12.1.1";
|
|
22
22
|
/* eslint-disable react/no-unused-prop-types */
|
|
23
23
|
|
|
24
24
|
function getDateObj(date) {
|
|
@@ -161,7 +161,8 @@ class DatePicker extends Component {
|
|
|
161
161
|
});
|
|
162
162
|
} else {
|
|
163
163
|
this.setState({
|
|
164
|
-
isOpen: false
|
|
164
|
+
isOpen: false,
|
|
165
|
+
isFocused: false
|
|
165
166
|
});
|
|
166
167
|
}
|
|
167
168
|
|
|
@@ -182,7 +183,8 @@ class DatePicker extends Component {
|
|
|
182
183
|
} else {
|
|
183
184
|
this.setState({
|
|
184
185
|
isOpen: true,
|
|
185
|
-
view: value
|
|
186
|
+
view: value,
|
|
187
|
+
isFocused: true
|
|
186
188
|
});
|
|
187
189
|
}
|
|
188
190
|
|
|
@@ -335,8 +337,8 @@ class DatePicker extends Component {
|
|
|
335
337
|
}
|
|
336
338
|
});
|
|
337
339
|
|
|
338
|
-
_defineProperty(this, "getSubtleControlStyles",
|
|
339
|
-
border: `2px solid ${
|
|
340
|
+
_defineProperty(this, "getSubtleControlStyles", () => ({
|
|
341
|
+
border: `2px solid ${this.getSafeState().isFocused ? `var(--ds-border-focused, ${B100})` : `transparent`}`,
|
|
340
342
|
backgroundColor: 'transparent',
|
|
341
343
|
padding: '1px'
|
|
342
344
|
}));
|
|
@@ -396,6 +398,7 @@ class DatePicker extends Component {
|
|
|
396
398
|
} = getDateObj(new Date());
|
|
397
399
|
this.state = {
|
|
398
400
|
isOpen: this.props.defaultIsOpen,
|
|
401
|
+
isFocused: false,
|
|
399
402
|
clearingFromIcon: false,
|
|
400
403
|
inputValue: this.props.selectProps.inputValue,
|
|
401
404
|
selectedValue: this.props.value || this.props.defaultValue,
|
|
@@ -460,7 +463,7 @@ class DatePicker extends Component {
|
|
|
460
463
|
const {
|
|
461
464
|
styles: selectStyles = {}
|
|
462
465
|
} = selectProps;
|
|
463
|
-
const controlStyles = appearance === 'subtle' ? this.getSubtleControlStyles(
|
|
466
|
+
const controlStyles = appearance === 'subtle' ? this.getSubtleControlStyles() : {};
|
|
464
467
|
const disabledStyle = isDisabled ? {
|
|
465
468
|
pointerEvents: 'none'
|
|
466
469
|
} : {};
|
|
@@ -17,7 +17,7 @@ import DatePicker from './DatePicker';
|
|
|
17
17
|
import TimePicker from './TimePicker';
|
|
18
18
|
import { convertTokens } from './utils';
|
|
19
19
|
const packageName = "@atlaskit/datetime-picker";
|
|
20
|
-
const packageVersion = "12.1.
|
|
20
|
+
const packageVersion = "12.1.1";
|
|
21
21
|
/* eslint-disable react/no-unused-prop-types */
|
|
22
22
|
|
|
23
23
|
const isInvalidBorderStyles = css({
|
|
@@ -14,7 +14,7 @@ import FixedLayer from '../internal/FixedLayer';
|
|
|
14
14
|
import parseTime from '../internal/parseTime';
|
|
15
15
|
import { convertTokens } from './utils';
|
|
16
16
|
const packageName = "@atlaskit/datetime-picker";
|
|
17
|
-
const packageVersion = "12.1.
|
|
17
|
+
const packageVersion = "12.1.1";
|
|
18
18
|
const menuStyles = {
|
|
19
19
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
20
20
|
position: 'static',
|
package/dist/es2019/version.json
CHANGED
|
@@ -33,7 +33,7 @@ import { defaultDateFormat, EmptyClearIndicator, padToTwo, placeholderDatetime }
|
|
|
33
33
|
import FixedLayer from '../internal/FixedLayer';
|
|
34
34
|
import { convertTokens } from './utils';
|
|
35
35
|
var packageName = "@atlaskit/datetime-picker";
|
|
36
|
-
var packageVersion = "12.1.
|
|
36
|
+
var packageVersion = "12.1.1";
|
|
37
37
|
/* eslint-disable react/no-unused-prop-types */
|
|
38
38
|
|
|
39
39
|
function getDateObj(date) {
|
|
@@ -190,7 +190,8 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
190
190
|
});
|
|
191
191
|
} else {
|
|
192
192
|
_this.setState({
|
|
193
|
-
isOpen: false
|
|
193
|
+
isOpen: false,
|
|
194
|
+
isFocused: false
|
|
194
195
|
});
|
|
195
196
|
}
|
|
196
197
|
|
|
@@ -210,7 +211,8 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
210
211
|
} else {
|
|
211
212
|
_this.setState({
|
|
212
213
|
isOpen: true,
|
|
213
|
-
view: value
|
|
214
|
+
view: value,
|
|
215
|
+
isFocused: true
|
|
214
216
|
});
|
|
215
217
|
}
|
|
216
218
|
|
|
@@ -369,9 +371,9 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
369
371
|
}
|
|
370
372
|
});
|
|
371
373
|
|
|
372
|
-
_defineProperty(_assertThisInitialized(_this), "getSubtleControlStyles", function (
|
|
374
|
+
_defineProperty(_assertThisInitialized(_this), "getSubtleControlStyles", function () {
|
|
373
375
|
return {
|
|
374
|
-
border: "2px solid ".concat(
|
|
376
|
+
border: "2px solid ".concat(_this.getSafeState().isFocused ? "var(--ds-border-focused, ".concat(B100, ")") : "transparent"),
|
|
375
377
|
backgroundColor: 'transparent',
|
|
376
378
|
padding: '1px'
|
|
377
379
|
};
|
|
@@ -428,6 +430,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
428
430
|
|
|
429
431
|
_this.state = {
|
|
430
432
|
isOpen: _this.props.defaultIsOpen,
|
|
433
|
+
isFocused: false,
|
|
431
434
|
clearingFromIcon: false,
|
|
432
435
|
inputValue: _this.props.selectProps.inputValue,
|
|
433
436
|
selectedValue: _this.props.value || _this.props.defaultValue,
|
|
@@ -495,7 +498,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
495
498
|
|
|
496
499
|
var _selectProps$styles = selectProps.styles,
|
|
497
500
|
selectStyles = _selectProps$styles === void 0 ? {} : _selectProps$styles;
|
|
498
|
-
var controlStyles = appearance === 'subtle' ? this.getSubtleControlStyles(
|
|
501
|
+
var controlStyles = appearance === 'subtle' ? this.getSubtleControlStyles() : {};
|
|
499
502
|
var disabledStyle = isDisabled ? {
|
|
500
503
|
pointerEvents: 'none'
|
|
501
504
|
} : {};
|
|
@@ -31,7 +31,7 @@ import DatePicker from './DatePicker';
|
|
|
31
31
|
import TimePicker from './TimePicker';
|
|
32
32
|
import { convertTokens } from './utils';
|
|
33
33
|
var packageName = "@atlaskit/datetime-picker";
|
|
34
|
-
var packageVersion = "12.1.
|
|
34
|
+
var packageVersion = "12.1.1";
|
|
35
35
|
/* eslint-disable react/no-unused-prop-types */
|
|
36
36
|
|
|
37
37
|
var isInvalidBorderStyles = css({
|
|
@@ -32,7 +32,7 @@ import FixedLayer from '../internal/FixedLayer';
|
|
|
32
32
|
import parseTime from '../internal/parseTime';
|
|
33
33
|
import { convertTokens } from './utils';
|
|
34
34
|
var packageName = "@atlaskit/datetime-picker";
|
|
35
|
-
var packageVersion = "12.1.
|
|
35
|
+
var packageVersion = "12.1.1";
|
|
36
36
|
var menuStyles = {
|
|
37
37
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
38
38
|
position: 'static',
|
package/dist/esm/version.json
CHANGED
|
@@ -109,6 +109,7 @@ interface State {
|
|
|
109
109
|
* This variable defines whether the default onSelectBlur or onSelectFocus
|
|
110
110
|
* events should behave as normal
|
|
111
111
|
*/
|
|
112
|
+
isFocused: boolean;
|
|
112
113
|
clearingFromIcon: boolean;
|
|
113
114
|
value: string;
|
|
114
115
|
/** Value to be shown in the calendar as selected. */
|
|
@@ -168,6 +169,7 @@ declare class DatePicker extends Component<DatePickerProps, State> {
|
|
|
168
169
|
inputValue: any;
|
|
169
170
|
isOpen: boolean;
|
|
170
171
|
value: string;
|
|
172
|
+
isFocused: boolean;
|
|
171
173
|
clearingFromIcon: boolean;
|
|
172
174
|
selectedValue: string;
|
|
173
175
|
view: string;
|
|
@@ -190,7 +192,7 @@ declare class DatePicker extends Component<DatePickerProps, State> {
|
|
|
190
192
|
refCalendar: (ref: CalendarRef | null) => void;
|
|
191
193
|
handleInputChange: (inputValue: string, actionMeta: {}) => void;
|
|
192
194
|
getContainerRef: (ref: HTMLElement | null) => void;
|
|
193
|
-
getSubtleControlStyles: (
|
|
195
|
+
getSubtleControlStyles: () => {
|
|
194
196
|
border: string;
|
|
195
197
|
backgroundColor: string;
|
|
196
198
|
padding: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.1",
|
|
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/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/icon": "^21.10.0",
|
|
30
30
|
"@atlaskit/locale": "^2.1.0",
|
|
31
31
|
"@atlaskit/popper": "^5.2.0",
|
|
32
|
-
"@atlaskit/select": "^15.
|
|
32
|
+
"@atlaskit/select": "^15.4.0",
|
|
33
33
|
"@atlaskit/theme": "^12.1.0",
|
|
34
34
|
"@atlaskit/tokens": "^0.10.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0",
|