@atlaskit/datetime-picker 15.5.2 → 15.6.0
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 +15 -0
- package/dist/cjs/components/date-picker-class.js +45 -10
- package/dist/cjs/components/date-picker-fc.js +46 -11
- package/dist/cjs/components/date-time-picker-class.js +6 -6
- package/dist/cjs/components/date-time-picker-fc.js +6 -6
- package/dist/cjs/components/time-picker.js +1 -1
- package/dist/es2019/components/date-picker-class.js +43 -11
- package/dist/es2019/components/date-picker-fc.js +43 -11
- package/dist/es2019/components/date-time-picker-class.js +5 -5
- package/dist/es2019/components/date-time-picker-fc.js +5 -5
- package/dist/es2019/components/time-picker.js +1 -1
- package/dist/esm/components/date-picker-class.js +46 -11
- package/dist/esm/components/date-picker-fc.js +47 -12
- package/dist/esm/components/date-time-picker-class.js +5 -5
- package/dist/esm/components/date-time-picker-fc.js +5 -5
- package/dist/esm/components/time-picker.js +1 -1
- package/dist/types/components/date-picker-class.d.ts +2 -2
- package/dist/types/components/date-picker-fc.d.ts +1 -1
- package/dist/types/components/date-picker.d.ts +3 -3
- package/dist/types/types.d.ts +9 -2
- package/dist/types-ts4.5/components/date-picker-class.d.ts +2 -2
- package/dist/types-ts4.5/components/date-picker-fc.d.ts +1 -1
- package/dist/types-ts4.5/components/date-picker.d.ts +3 -3
- package/dist/types-ts4.5/types.d.ts +9 -2
- package/package.json +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 15.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#157307](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157307)
|
|
8
|
+
[`a1e80ec0a5e4a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a1e80ec0a5e4a) -
|
|
9
|
+
Enable new icons behind a feature flag.
|
|
10
|
+
- [#157307](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157307)
|
|
11
|
+
[`e6c2d403fadd0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e6c2d403fadd0) -
|
|
12
|
+
Add clearControlLabel to datepicker component.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 15.5.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -19,8 +19,10 @@ var _react2 = require("@emotion/react");
|
|
|
19
19
|
var _dateFns = require("date-fns");
|
|
20
20
|
var _reactUid = require("react-uid");
|
|
21
21
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
22
|
-
var _calendar = _interopRequireDefault(require("@atlaskit/icon/
|
|
22
|
+
var _calendar = _interopRequireDefault(require("@atlaskit/icon/core/migration/calendar"));
|
|
23
|
+
var _calendar2 = _interopRequireDefault(require("@atlaskit/icon/glyph/calendar"));
|
|
23
24
|
var _locale = require("@atlaskit/locale");
|
|
25
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
24
26
|
var _primitives = require("@atlaskit/primitives");
|
|
25
27
|
var _select = _interopRequireWildcard(require("@atlaskit/select"));
|
|
26
28
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -44,7 +46,17 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
44
46
|
// version very soon from converting this to functional. And also React 18 is on
|
|
45
47
|
// the horizon
|
|
46
48
|
var packageName = "@atlaskit/datetime-picker";
|
|
47
|
-
var packageVersion = "15.
|
|
49
|
+
var packageVersion = "15.6.0";
|
|
50
|
+
var dropdownIndicatorStyles = (0, _primitives.xcss)({
|
|
51
|
+
minWidth: "var(--ds-space-300, 24px)",
|
|
52
|
+
minHeight: "var(--ds-space-300, 24px)",
|
|
53
|
+
display: 'flex',
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
justifyContent: 'center'
|
|
56
|
+
});
|
|
57
|
+
var CalendarIcon = (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? _calendar.default :
|
|
58
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
59
|
+
_calendar2.default;
|
|
48
60
|
var datePickerDefaultProps = {
|
|
49
61
|
defaultIsOpen: false,
|
|
50
62
|
defaultValue: '',
|
|
@@ -83,9 +95,16 @@ var iconContainerStyles = (0, _react2.css)({
|
|
|
83
95
|
var iconSpacingWithClearButtonStyles = (0, _react2.css)({
|
|
84
96
|
marginInlineEnd: "var(--ds-space-400, 2rem)"
|
|
85
97
|
});
|
|
98
|
+
var iconSpacingWithoutClearButtonStylesNew = (0, _react2.css)({
|
|
99
|
+
marginInlineEnd: "var(--ds-space-050, 0.25rem)"
|
|
100
|
+
});
|
|
86
101
|
var iconSpacingWithoutClearButtonStyles = (0, _react2.css)({
|
|
87
102
|
marginInlineEnd: "var(--ds-space-025, 0.125rem)"
|
|
88
103
|
});
|
|
104
|
+
var calendarButtonFixedSizeStyles = (0, _primitives.xcss)({
|
|
105
|
+
width: "".concat(32 / 14, "em"),
|
|
106
|
+
height: "".concat(32 / 14, "em")
|
|
107
|
+
});
|
|
89
108
|
var calendarButtonStyles = (0, _primitives.xcss)({
|
|
90
109
|
borderRadius: 'border.radius',
|
|
91
110
|
':hover': {
|
|
@@ -422,6 +441,8 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
422
441
|
ariaDescribedBy = _this$props['aria-describedby'],
|
|
423
442
|
_this$props$autoFocus = _this$props.autoFocus,
|
|
424
443
|
autoFocus = _this$props$autoFocus === void 0 ? false : _this$props$autoFocus,
|
|
444
|
+
_this$props$clearCont = _this$props.clearControlLabel,
|
|
445
|
+
clearControlLabel = _this$props$clearCont === void 0 ? 'Clear' : _this$props$clearCont,
|
|
425
446
|
_this$props$hideIcon = _this$props.hideIcon,
|
|
426
447
|
hideIcon = _this$props$hideIcon === void 0 ? false : _this$props$hideIcon,
|
|
427
448
|
_this$props$openCalen = _this$props.openCalendarLabel,
|
|
@@ -429,7 +450,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
429
450
|
disabled = _this$props.disabled,
|
|
430
451
|
disabledDateFilter = _this$props.disabledDateFilter,
|
|
431
452
|
_this$props$icon = _this$props.icon,
|
|
432
|
-
|
|
453
|
+
Icon = _this$props$icon === void 0 ? CalendarIcon : _this$props$icon,
|
|
433
454
|
_this$props$id = _this$props.id,
|
|
434
455
|
id = _this$props$id === void 0 ? '' : _this$props$id,
|
|
435
456
|
_this$props$innerProp = _this$props.innerProps,
|
|
@@ -467,7 +488,17 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
467
488
|
actualSelectInputValue = selectInputValue;
|
|
468
489
|
var menuIsOpen = this.getIsOpen() && !isDisabled;
|
|
469
490
|
var showClearIndicator = Boolean((value || selectInputValue) && !hideIcon);
|
|
470
|
-
var
|
|
491
|
+
var clearIndicator = Icon;
|
|
492
|
+
|
|
493
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
494
|
+
if ((0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration')) {
|
|
495
|
+
clearIndicator = function clearIndicator(props) {
|
|
496
|
+
return (0, _react2.jsx)(_primitives.Box, {
|
|
497
|
+
xcss: dropdownIndicatorStyles
|
|
498
|
+
}, (0, _react2.jsx)(Icon, props));
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
var dropDownIcon = appearance === 'subtle' || hideIcon || showClearIndicator ? null : clearIndicator;
|
|
471
502
|
var SingleValue = (0, _singleValue.makeSingleValue)({
|
|
472
503
|
lang: this.props.locale
|
|
473
504
|
});
|
|
@@ -554,6 +585,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
554
585
|
"aria-describedby": ariaDescribedBy,
|
|
555
586
|
"aria-label": label || undefined,
|
|
556
587
|
autoFocus: autoFocus,
|
|
588
|
+
clearControlLabel: clearControlLabel,
|
|
557
589
|
closeMenuOnSelect: true
|
|
558
590
|
// FOr some reason, this and the below `styles` type error _only_ show
|
|
559
591
|
// up when you alter some of the properties in the `selectComponents`
|
|
@@ -610,7 +642,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
610
642
|
}
|
|
611
643
|
}, function (openCalendarLabelId) {
|
|
612
644
|
return (0, _react2.jsx)("div", {
|
|
613
|
-
css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : iconSpacingWithoutClearButtonStyles]
|
|
645
|
+
css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? iconSpacingWithoutClearButtonStylesNew : iconSpacingWithoutClearButtonStyles]
|
|
614
646
|
}, inputLabelId && (0, _react2.jsx)(_visuallyHidden.default, {
|
|
615
647
|
id: openCalendarLabelId
|
|
616
648
|
}, ", ", openCalendarLabel), (0, _react2.jsx)(_primitives.Pressable, (0, _extends2.default)({}, inputLabelId ? {
|
|
@@ -624,12 +656,15 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
624
656
|
testId: testId && "".concat(testId, "--open-calendar-button"),
|
|
625
657
|
type: "button",
|
|
626
658
|
backgroundColor: "color.background.neutral.subtle",
|
|
627
|
-
padding:
|
|
628
|
-
xcss: calendarButtonStyles
|
|
629
|
-
}), (0, _react2.jsx)(
|
|
630
|
-
label: ""
|
|
659
|
+
padding: (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? 'space.0' : 'space.050',
|
|
660
|
+
xcss: [calendarButtonStyles, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') && calendarButtonFixedSizeStyles]
|
|
661
|
+
}), (0, _react2.jsx)(CalendarIcon, (0, _extends2.default)({
|
|
662
|
+
label: ""
|
|
663
|
+
}, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? {
|
|
664
|
+
color: "var(--ds-icon, #44546F)"
|
|
665
|
+
} : {
|
|
631
666
|
primaryColor: "var(--ds-icon, #44546F)"
|
|
632
|
-
})));
|
|
667
|
+
}))));
|
|
633
668
|
}) : null)
|
|
634
669
|
);
|
|
635
670
|
}
|
|
@@ -15,8 +15,10 @@ var _react2 = require("@emotion/react");
|
|
|
15
15
|
var _dateFns = require("date-fns");
|
|
16
16
|
var _reactUid = require("react-uid");
|
|
17
17
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
18
|
-
var _calendar = _interopRequireDefault(require("@atlaskit/icon/
|
|
18
|
+
var _calendar = _interopRequireDefault(require("@atlaskit/icon/core/migration/calendar"));
|
|
19
|
+
var _calendar2 = _interopRequireDefault(require("@atlaskit/icon/glyph/calendar"));
|
|
19
20
|
var _locale = require("@atlaskit/locale");
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
22
|
var _primitives = require("@atlaskit/primitives");
|
|
21
23
|
var _select = _interopRequireWildcard(require("@atlaskit/select"));
|
|
22
24
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -27,7 +29,7 @@ var _indicatorsContainer = require("../internal/indicators-container");
|
|
|
27
29
|
var _menu = require("../internal/menu");
|
|
28
30
|
var _parseDate = require("../internal/parse-date");
|
|
29
31
|
var _singleValue = require("../internal/single-value");
|
|
30
|
-
var _excluded = ["appearance", "autoFocus", "hideIcon", "openCalendarLabel", "defaultIsOpen", "defaultValue", "disabled", "disabledDateFilter", "icon", "id", "innerProps", "inputLabel", "inputLabelId", "isDisabled", "isInvalid", "isRequired", "label", "name", "onBlur", "onChange", "onFocus", "selectProps", "shouldShowCalendarButton", "spacing", "locale", "value", "isOpen", "maxDate", "minDate", "weekStartDay", "formatDisplayLabel", "testId", "aria-describedby", "placeholder", "nextMonthLabel", "previousMonthLabel"];
|
|
32
|
+
var _excluded = ["appearance", "autoFocus", "clearControlLabel", "hideIcon", "openCalendarLabel", "defaultIsOpen", "defaultValue", "disabled", "disabledDateFilter", "icon", "id", "innerProps", "inputLabel", "inputLabelId", "isDisabled", "isInvalid", "isRequired", "label", "name", "onBlur", "onChange", "onFocus", "selectProps", "shouldShowCalendarButton", "spacing", "locale", "value", "isOpen", "maxDate", "minDate", "weekStartDay", "formatDisplayLabel", "testId", "aria-describedby", "placeholder", "nextMonthLabel", "previousMonthLabel"];
|
|
31
33
|
/**
|
|
32
34
|
* @jsxRuntime classic
|
|
33
35
|
* @jsx jsx
|
|
@@ -41,7 +43,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
41
43
|
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; }
|
|
42
44
|
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; }
|
|
43
45
|
var packageName = "@atlaskit/datetime-picker";
|
|
44
|
-
var packageVersion = "15.
|
|
46
|
+
var packageVersion = "15.6.0";
|
|
45
47
|
var analyticsAttributes = {
|
|
46
48
|
componentName: 'datePicker',
|
|
47
49
|
packageName: packageName,
|
|
@@ -50,6 +52,16 @@ var analyticsAttributes = {
|
|
|
50
52
|
var pickerContainerStyles = (0, _react2.css)({
|
|
51
53
|
position: 'relative'
|
|
52
54
|
});
|
|
55
|
+
var dropdownIndicatorStyles = (0, _primitives.xcss)({
|
|
56
|
+
minWidth: "var(--ds-space-300, 24px)",
|
|
57
|
+
minHeight: "var(--ds-space-300, 24px)",
|
|
58
|
+
display: 'flex',
|
|
59
|
+
alignItems: 'center',
|
|
60
|
+
justifyContent: 'center'
|
|
61
|
+
});
|
|
62
|
+
var CalendarIcon = (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? _calendar.default :
|
|
63
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
64
|
+
_calendar2.default;
|
|
53
65
|
var iconContainerStyles = (0, _react2.css)({
|
|
54
66
|
display: 'flex',
|
|
55
67
|
height: '100%',
|
|
@@ -67,9 +79,16 @@ var iconContainerStyles = (0, _react2.css)({
|
|
|
67
79
|
var iconSpacingWithClearButtonStyles = (0, _react2.css)({
|
|
68
80
|
marginInlineEnd: "var(--ds-space-400, 2rem)"
|
|
69
81
|
});
|
|
82
|
+
var iconSpacingWithoutClearButtonStylesNew = (0, _react2.css)({
|
|
83
|
+
marginInlineEnd: "var(--ds-space-050, 0.25rem)"
|
|
84
|
+
});
|
|
70
85
|
var iconSpacingWithoutClearButtonStyles = (0, _react2.css)({
|
|
71
86
|
marginInlineEnd: "var(--ds-space-025, 0.125rem)"
|
|
72
87
|
});
|
|
88
|
+
var calendarButtonFixedSizeStyles = (0, _primitives.xcss)({
|
|
89
|
+
width: "".concat(32 / 14, "em"),
|
|
90
|
+
height: "".concat(32 / 14, "em")
|
|
91
|
+
});
|
|
73
92
|
var calendarButtonStyles = (0, _primitives.xcss)({
|
|
74
93
|
borderRadius: 'border.radius',
|
|
75
94
|
':hover': {
|
|
@@ -96,6 +115,8 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
|
|
|
96
115
|
appearance = _props$appearance === void 0 ? 'default' : _props$appearance,
|
|
97
116
|
_props$autoFocus = props.autoFocus,
|
|
98
117
|
autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,
|
|
118
|
+
_props$clearControlLa = props.clearControlLabel,
|
|
119
|
+
clearControlLabel = _props$clearControlLa === void 0 ? 'Clear' : _props$clearControlLa,
|
|
99
120
|
_props$hideIcon = props.hideIcon,
|
|
100
121
|
hideIcon = _props$hideIcon === void 0 ? false : _props$hideIcon,
|
|
101
122
|
_props$openCalendarLa = props.openCalendarLabel,
|
|
@@ -111,7 +132,7 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
|
|
|
111
132
|
return false;
|
|
112
133
|
} : _props$disabledDateFi,
|
|
113
134
|
_props$icon = props.icon,
|
|
114
|
-
|
|
135
|
+
Icon = _props$icon === void 0 ? CalendarIcon : _props$icon,
|
|
115
136
|
_props$id = props.id,
|
|
116
137
|
id = _props$id === void 0 ? '' : _props$id,
|
|
117
138
|
_props$innerProps = props.innerProps,
|
|
@@ -458,7 +479,17 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
|
|
|
458
479
|
actualSelectInputValue = selectInputValue;
|
|
459
480
|
var menuIsOpen = getIsOpen() && !isDisabled;
|
|
460
481
|
var showClearIndicator = Boolean((getterValue || selectInputValue) && !hideIcon);
|
|
461
|
-
var
|
|
482
|
+
var clearIndicator = Icon;
|
|
483
|
+
|
|
484
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
485
|
+
if ((0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration')) {
|
|
486
|
+
clearIndicator = function clearIndicator(props) {
|
|
487
|
+
return (0, _react2.jsx)(_primitives.Box, {
|
|
488
|
+
xcss: dropdownIndicatorStyles
|
|
489
|
+
}, (0, _react2.jsx)(Icon, props));
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
var dropDownIcon = appearance === 'subtle' || hideIcon || showClearIndicator ? null : clearIndicator;
|
|
462
493
|
var SingleValue = (0, _singleValue.makeSingleValue)({
|
|
463
494
|
lang: propLocale
|
|
464
495
|
});
|
|
@@ -546,6 +577,7 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
|
|
|
546
577
|
"aria-describedby": ariaDescribedBy,
|
|
547
578
|
"aria-label": label || undefined,
|
|
548
579
|
autoFocus: autoFocus,
|
|
580
|
+
clearControlLabel: clearControlLabel,
|
|
549
581
|
closeMenuOnSelect: true
|
|
550
582
|
// For some reason, this and the below `styles` type error _only_ show
|
|
551
583
|
// up when you alter some of the properties in the `selectComponents`
|
|
@@ -597,7 +629,7 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
|
|
|
597
629
|
previousMonthLabel: previousMonthLabel,
|
|
598
630
|
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay
|
|
599
631
|
})), shouldShowCalendarButton && !isDisabled ? (0, _react2.jsx)("div", {
|
|
600
|
-
css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : iconSpacingWithoutClearButtonStyles]
|
|
632
|
+
css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? iconSpacingWithoutClearButtonStylesNew : iconSpacingWithoutClearButtonStyles]
|
|
601
633
|
}, inputLabelId && (0, _react2.jsx)(_visuallyHidden.default, {
|
|
602
634
|
id: openCalendarLabelId
|
|
603
635
|
}, ", ", openCalendarLabel), (0, _react2.jsx)(_primitives.Pressable, (0, _extends2.default)({}, inputLabelId ? {
|
|
@@ -611,12 +643,15 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
|
|
|
611
643
|
testId: testId && "".concat(testId, "--open-calendar-button"),
|
|
612
644
|
type: "button",
|
|
613
645
|
backgroundColor: "color.background.neutral.subtle",
|
|
614
|
-
padding:
|
|
615
|
-
xcss: calendarButtonStyles
|
|
616
|
-
}), (0, _react2.jsx)(
|
|
617
|
-
label: ""
|
|
646
|
+
padding: (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? 'space.0' : 'space.050',
|
|
647
|
+
xcss: [calendarButtonStyles, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') && calendarButtonFixedSizeStyles]
|
|
648
|
+
}), (0, _react2.jsx)(CalendarIcon, (0, _extends2.default)({
|
|
649
|
+
label: ""
|
|
650
|
+
}, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? {
|
|
651
|
+
color: "var(--ds-icon, #44546F)"
|
|
652
|
+
} : {
|
|
618
653
|
primaryColor: "var(--ds-icon, #44546F)"
|
|
619
|
-
}))) : null)
|
|
654
|
+
})))) : null)
|
|
620
655
|
);
|
|
621
656
|
});
|
|
622
657
|
var _default = exports.default = DatePicker;
|
|
@@ -16,7 +16,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
var _dateFns = require("date-fns");
|
|
18
18
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
19
|
-
var
|
|
19
|
+
var _crossCircleSelectClear = _interopRequireDefault(require("@atlaskit/icon/utility/migration/cross-circle--select-clear"));
|
|
20
20
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
21
|
var _select = require("@atlaskit/select");
|
|
22
22
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -38,7 +38,7 @@ var DatePicker = (0, _ffComponent.componentWithCondition)(function () {
|
|
|
38
38
|
return (0, _platformFeatureFlags.fg)('dst-date-picker-use-functional-component');
|
|
39
39
|
}, _datePickerFc.default, _datePickerClass.default);
|
|
40
40
|
var packageName = "@atlaskit/datetime-picker";
|
|
41
|
-
var packageVersion = "15.
|
|
41
|
+
var packageVersion = "15.6.0";
|
|
42
42
|
// Make DatePicker 50% the width of DateTimePicker
|
|
43
43
|
// If rendering an icon container, shrink the TimePicker
|
|
44
44
|
var datePickerContainerStyles = (0, _react2.css)({
|
|
@@ -402,11 +402,11 @@ var DateTimePickerComponent = exports.DateTimePickerWithoutAnalytics = /*#__PURE
|
|
|
402
402
|
"data-testid": testId && "".concat(testId, "--icon--container"),
|
|
403
403
|
tabIndex: -1,
|
|
404
404
|
type: "button"
|
|
405
|
-
}, (0, _react2.jsx)(
|
|
406
|
-
|
|
407
|
-
|
|
405
|
+
}, (0, _react2.jsx)(_crossCircleSelectClear.default, {
|
|
406
|
+
LEGACY_size: "small",
|
|
407
|
+
color: "currentColor",
|
|
408
408
|
label: clearControlLabel
|
|
409
|
-
})) : null);
|
|
409
|
+
}), ' ') : null);
|
|
410
410
|
}
|
|
411
411
|
}]);
|
|
412
412
|
return DateTimePickerComponent;
|
|
@@ -13,7 +13,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _react2 = require("@emotion/react");
|
|
14
14
|
var _dateFns = require("date-fns");
|
|
15
15
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
16
|
-
var
|
|
16
|
+
var _crossCircleSelectClear = _interopRequireDefault(require("@atlaskit/icon/utility/migration/cross-circle--select-clear"));
|
|
17
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
18
|
var _select = require("@atlaskit/select");
|
|
19
19
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -37,7 +37,7 @@ var DatePicker = (0, _ffComponent.componentWithCondition)(function () {
|
|
|
37
37
|
return (0, _platformFeatureFlags.fg)('dst-date-picker-use-functional-component');
|
|
38
38
|
}, _datePickerFc.default, _datePickerClass.default);
|
|
39
39
|
var packageName = "@atlaskit/datetime-picker";
|
|
40
|
-
var packageVersion = "15.
|
|
40
|
+
var packageVersion = "15.6.0";
|
|
41
41
|
var analyticsAttributes = {
|
|
42
42
|
componentName: 'dateTimePicker',
|
|
43
43
|
packageName: packageName,
|
|
@@ -389,10 +389,10 @@ var DateTimePicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
389
389
|
"data-testid": testId && "".concat(testId, "--icon--container"),
|
|
390
390
|
tabIndex: -1,
|
|
391
391
|
type: "button"
|
|
392
|
-
}, (0, _react2.jsx)(
|
|
393
|
-
|
|
394
|
-
|
|
392
|
+
}, (0, _react2.jsx)(_crossCircleSelectClear.default, {
|
|
393
|
+
LEGACY_size: "small",
|
|
394
|
+
color: "currentColor",
|
|
395
395
|
label: clearControlLabel
|
|
396
|
-
})) : null);
|
|
396
|
+
}), ' ') : null);
|
|
397
397
|
});
|
|
398
398
|
var _default = exports.default = DateTimePicker;
|
|
@@ -27,7 +27,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
27
27
|
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; }
|
|
28
28
|
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; }
|
|
29
29
|
var packageName = "@atlaskit/datetime-picker";
|
|
30
|
-
var packageVersion = "15.
|
|
30
|
+
var packageVersion = "15.6.0";
|
|
31
31
|
var menuStyles = {
|
|
32
32
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
33
33
|
position: 'static',
|
|
@@ -14,9 +14,11 @@ import { isValid, parseISO } from 'date-fns';
|
|
|
14
14
|
// the horizon
|
|
15
15
|
import { UID } from 'react-uid';
|
|
16
16
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
17
|
-
import
|
|
17
|
+
import CalendarIconNew from '@atlaskit/icon/core/migration/calendar';
|
|
18
|
+
import CalendarIconOld from '@atlaskit/icon/glyph/calendar';
|
|
18
19
|
import { createLocalizationProvider } from '@atlaskit/locale';
|
|
19
|
-
import {
|
|
20
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
|
+
import { Box, Pressable, xcss } from '@atlaskit/primitives';
|
|
20
22
|
import Select, { mergeStyles } from '@atlaskit/select';
|
|
21
23
|
import { N500, N70 } from '@atlaskit/theme/colors';
|
|
22
24
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -27,7 +29,17 @@ import { Menu } from '../internal/menu';
|
|
|
27
29
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
28
30
|
import { makeSingleValue } from '../internal/single-value';
|
|
29
31
|
const packageName = "@atlaskit/datetime-picker";
|
|
30
|
-
const packageVersion = "15.
|
|
32
|
+
const packageVersion = "15.6.0";
|
|
33
|
+
const dropdownIndicatorStyles = xcss({
|
|
34
|
+
minWidth: "var(--ds-space-300, 24px)",
|
|
35
|
+
minHeight: "var(--ds-space-300, 24px)",
|
|
36
|
+
display: 'flex',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
justifyContent: 'center'
|
|
39
|
+
});
|
|
40
|
+
const CalendarIcon = fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
|
|
41
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
42
|
+
CalendarIconOld;
|
|
31
43
|
const datePickerDefaultProps = {
|
|
32
44
|
defaultIsOpen: false,
|
|
33
45
|
defaultValue: '',
|
|
@@ -64,9 +76,16 @@ const iconContainerStyles = css({
|
|
|
64
76
|
const iconSpacingWithClearButtonStyles = css({
|
|
65
77
|
marginInlineEnd: "var(--ds-space-400, 2rem)"
|
|
66
78
|
});
|
|
79
|
+
const iconSpacingWithoutClearButtonStylesNew = css({
|
|
80
|
+
marginInlineEnd: "var(--ds-space-050, 0.25rem)"
|
|
81
|
+
});
|
|
67
82
|
const iconSpacingWithoutClearButtonStyles = css({
|
|
68
83
|
marginInlineEnd: "var(--ds-space-025, 0.125rem)"
|
|
69
84
|
});
|
|
85
|
+
const calendarButtonFixedSizeStyles = xcss({
|
|
86
|
+
width: `${32 / 14}em`,
|
|
87
|
+
height: `${32 / 14}em`
|
|
88
|
+
});
|
|
70
89
|
const calendarButtonStyles = xcss({
|
|
71
90
|
borderRadius: 'border.radius',
|
|
72
91
|
':hover': {
|
|
@@ -410,11 +429,12 @@ class DatePickerComponent extends Component {
|
|
|
410
429
|
appearance = 'default',
|
|
411
430
|
'aria-describedby': ariaDescribedBy,
|
|
412
431
|
autoFocus = false,
|
|
432
|
+
clearControlLabel = 'Clear',
|
|
413
433
|
hideIcon = false,
|
|
414
434
|
openCalendarLabel = 'Open calendar',
|
|
415
435
|
disabled,
|
|
416
436
|
disabledDateFilter,
|
|
417
|
-
icon = CalendarIcon,
|
|
437
|
+
icon: Icon = CalendarIcon,
|
|
418
438
|
id = '',
|
|
419
439
|
innerProps = {},
|
|
420
440
|
inputLabel = 'Date picker',
|
|
@@ -444,7 +464,15 @@ class DatePickerComponent extends Component {
|
|
|
444
464
|
actualSelectInputValue = selectInputValue;
|
|
445
465
|
const menuIsOpen = this.getIsOpen() && !isDisabled;
|
|
446
466
|
const showClearIndicator = Boolean((value || selectInputValue) && !hideIcon);
|
|
447
|
-
|
|
467
|
+
let clearIndicator = Icon;
|
|
468
|
+
|
|
469
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
470
|
+
if (fg('platform-visual-refresh-icons') && fg('platform-visual-refresh-icon-ads-migration')) {
|
|
471
|
+
clearIndicator = props => jsx(Box, {
|
|
472
|
+
xcss: dropdownIndicatorStyles
|
|
473
|
+
}, jsx(Icon, props));
|
|
474
|
+
}
|
|
475
|
+
const dropDownIcon = appearance === 'subtle' || hideIcon || showClearIndicator ? null : clearIndicator;
|
|
448
476
|
const SingleValue = makeSingleValue({
|
|
449
477
|
lang: this.props.locale
|
|
450
478
|
});
|
|
@@ -533,6 +561,7 @@ class DatePickerComponent extends Component {
|
|
|
533
561
|
"aria-describedby": ariaDescribedBy,
|
|
534
562
|
"aria-label": label || undefined,
|
|
535
563
|
autoFocus: autoFocus,
|
|
564
|
+
clearControlLabel: clearControlLabel,
|
|
536
565
|
closeMenuOnSelect: true
|
|
537
566
|
// FOr some reason, this and the below `styles` type error _only_ show
|
|
538
567
|
// up when you alter some of the properties in the `selectComponents`
|
|
@@ -586,7 +615,7 @@ class DatePickerComponent extends Component {
|
|
|
586
615
|
})), shouldShowCalendarButton && !isDisabled ? jsx(UID, {
|
|
587
616
|
name: id => `open-calendar-label--${id}`
|
|
588
617
|
}, openCalendarLabelId => jsx("div", {
|
|
589
|
-
css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : iconSpacingWithoutClearButtonStyles]
|
|
618
|
+
css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : fg('platform-visual-refresh-icon-ads-migration') ? iconSpacingWithoutClearButtonStylesNew : iconSpacingWithoutClearButtonStyles]
|
|
590
619
|
}, inputLabelId && jsx(VisuallyHidden, {
|
|
591
620
|
id: openCalendarLabelId
|
|
592
621
|
}, ", ", openCalendarLabel), jsx(Pressable, _extends({}, inputLabelId ? {
|
|
@@ -600,12 +629,15 @@ class DatePickerComponent extends Component {
|
|
|
600
629
|
testId: testId && `${testId}--open-calendar-button`,
|
|
601
630
|
type: "button",
|
|
602
631
|
backgroundColor: "color.background.neutral.subtle",
|
|
603
|
-
padding:
|
|
604
|
-
xcss: calendarButtonStyles
|
|
605
|
-
}), jsx(CalendarIcon, {
|
|
606
|
-
label: ""
|
|
632
|
+
padding: fg('platform-visual-refresh-icon-ads-migration') ? 'space.0' : 'space.050',
|
|
633
|
+
xcss: [calendarButtonStyles, fg('platform-visual-refresh-icon-ads-migration') && calendarButtonFixedSizeStyles]
|
|
634
|
+
}), jsx(CalendarIcon, _extends({
|
|
635
|
+
label: ""
|
|
636
|
+
}, fg('platform-visual-refresh-icon-ads-migration') ? {
|
|
637
|
+
color: "var(--ds-icon, #44546F)"
|
|
638
|
+
} : {
|
|
607
639
|
primaryColor: "var(--ds-icon, #44546F)"
|
|
608
|
-
})))) : null)
|
|
640
|
+
}))))) : null)
|
|
609
641
|
);
|
|
610
642
|
}
|
|
611
643
|
}
|
|
@@ -13,9 +13,11 @@ import { isValid, parseISO } from 'date-fns';
|
|
|
13
13
|
// the horizon
|
|
14
14
|
import { useUID } from 'react-uid';
|
|
15
15
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
16
|
-
import
|
|
16
|
+
import CalendarIconNew from '@atlaskit/icon/core/migration/calendar';
|
|
17
|
+
import CalendarIconOld from '@atlaskit/icon/glyph/calendar';
|
|
17
18
|
import { createLocalizationProvider } from '@atlaskit/locale';
|
|
18
|
-
import {
|
|
19
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
+
import { Box, Pressable, xcss } from '@atlaskit/primitives';
|
|
19
21
|
import Select, { mergeStyles } from '@atlaskit/select';
|
|
20
22
|
import { N500, N70 } from '@atlaskit/theme/colors';
|
|
21
23
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -26,7 +28,7 @@ import { Menu } from '../internal/menu';
|
|
|
26
28
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
27
29
|
import { makeSingleValue } from '../internal/single-value';
|
|
28
30
|
const packageName = "@atlaskit/datetime-picker";
|
|
29
|
-
const packageVersion = "15.
|
|
31
|
+
const packageVersion = "15.6.0";
|
|
30
32
|
const analyticsAttributes = {
|
|
31
33
|
componentName: 'datePicker',
|
|
32
34
|
packageName,
|
|
@@ -35,6 +37,16 @@ const analyticsAttributes = {
|
|
|
35
37
|
const pickerContainerStyles = css({
|
|
36
38
|
position: 'relative'
|
|
37
39
|
});
|
|
40
|
+
const dropdownIndicatorStyles = xcss({
|
|
41
|
+
minWidth: "var(--ds-space-300, 24px)",
|
|
42
|
+
minHeight: "var(--ds-space-300, 24px)",
|
|
43
|
+
display: 'flex',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
justifyContent: 'center'
|
|
46
|
+
});
|
|
47
|
+
const CalendarIcon = fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
|
|
48
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
49
|
+
CalendarIconOld;
|
|
38
50
|
const iconContainerStyles = css({
|
|
39
51
|
display: 'flex',
|
|
40
52
|
height: '100%',
|
|
@@ -52,9 +64,16 @@ const iconContainerStyles = css({
|
|
|
52
64
|
const iconSpacingWithClearButtonStyles = css({
|
|
53
65
|
marginInlineEnd: "var(--ds-space-400, 2rem)"
|
|
54
66
|
});
|
|
67
|
+
const iconSpacingWithoutClearButtonStylesNew = css({
|
|
68
|
+
marginInlineEnd: "var(--ds-space-050, 0.25rem)"
|
|
69
|
+
});
|
|
55
70
|
const iconSpacingWithoutClearButtonStyles = css({
|
|
56
71
|
marginInlineEnd: "var(--ds-space-025, 0.125rem)"
|
|
57
72
|
});
|
|
73
|
+
const calendarButtonFixedSizeStyles = xcss({
|
|
74
|
+
width: `${32 / 14}em`,
|
|
75
|
+
height: `${32 / 14}em`
|
|
76
|
+
});
|
|
58
77
|
const calendarButtonStyles = xcss({
|
|
59
78
|
borderRadius: 'border.radius',
|
|
60
79
|
':hover': {
|
|
@@ -80,13 +99,14 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
80
99
|
const {
|
|
81
100
|
appearance = 'default',
|
|
82
101
|
autoFocus = false,
|
|
102
|
+
clearControlLabel = 'Clear',
|
|
83
103
|
hideIcon = false,
|
|
84
104
|
openCalendarLabel = 'Open calendar',
|
|
85
105
|
defaultIsOpen = false,
|
|
86
106
|
defaultValue = '',
|
|
87
107
|
disabled = [],
|
|
88
108
|
disabledDateFilter = _ => false,
|
|
89
|
-
icon = CalendarIcon,
|
|
109
|
+
icon: Icon = CalendarIcon,
|
|
90
110
|
id = '',
|
|
91
111
|
innerProps = {},
|
|
92
112
|
inputLabel = 'Date picker',
|
|
@@ -385,7 +405,15 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
385
405
|
actualSelectInputValue = selectInputValue;
|
|
386
406
|
const menuIsOpen = getIsOpen() && !isDisabled;
|
|
387
407
|
const showClearIndicator = Boolean((getterValue || selectInputValue) && !hideIcon);
|
|
388
|
-
|
|
408
|
+
let clearIndicator = Icon;
|
|
409
|
+
|
|
410
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
411
|
+
if (fg('platform-visual-refresh-icons') && fg('platform-visual-refresh-icon-ads-migration')) {
|
|
412
|
+
clearIndicator = props => jsx(Box, {
|
|
413
|
+
xcss: dropdownIndicatorStyles
|
|
414
|
+
}, jsx(Icon, props));
|
|
415
|
+
}
|
|
416
|
+
const dropDownIcon = appearance === 'subtle' || hideIcon || showClearIndicator ? null : clearIndicator;
|
|
389
417
|
const SingleValue = makeSingleValue({
|
|
390
418
|
lang: propLocale
|
|
391
419
|
});
|
|
@@ -475,6 +503,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
475
503
|
"aria-describedby": ariaDescribedBy,
|
|
476
504
|
"aria-label": label || undefined,
|
|
477
505
|
autoFocus: autoFocus,
|
|
506
|
+
clearControlLabel: clearControlLabel,
|
|
478
507
|
closeMenuOnSelect: true
|
|
479
508
|
// For some reason, this and the below `styles` type error _only_ show
|
|
480
509
|
// up when you alter some of the properties in the `selectComponents`
|
|
@@ -526,7 +555,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
526
555
|
previousMonthLabel: previousMonthLabel,
|
|
527
556
|
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay
|
|
528
557
|
})), shouldShowCalendarButton && !isDisabled ? jsx("div", {
|
|
529
|
-
css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : iconSpacingWithoutClearButtonStyles]
|
|
558
|
+
css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : fg('platform-visual-refresh-icon-ads-migration') ? iconSpacingWithoutClearButtonStylesNew : iconSpacingWithoutClearButtonStyles]
|
|
530
559
|
}, inputLabelId && jsx(VisuallyHidden, {
|
|
531
560
|
id: openCalendarLabelId
|
|
532
561
|
}, ", ", openCalendarLabel), jsx(Pressable, _extends({}, inputLabelId ? {
|
|
@@ -540,12 +569,15 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
540
569
|
testId: testId && `${testId}--open-calendar-button`,
|
|
541
570
|
type: "button",
|
|
542
571
|
backgroundColor: "color.background.neutral.subtle",
|
|
543
|
-
padding:
|
|
544
|
-
xcss: calendarButtonStyles
|
|
545
|
-
}), jsx(CalendarIcon, {
|
|
546
|
-
label: ""
|
|
572
|
+
padding: fg('platform-visual-refresh-icon-ads-migration') ? 'space.0' : 'space.050',
|
|
573
|
+
xcss: [calendarButtonStyles, fg('platform-visual-refresh-icon-ads-migration') && calendarButtonFixedSizeStyles]
|
|
574
|
+
}), jsx(CalendarIcon, _extends({
|
|
575
|
+
label: ""
|
|
576
|
+
}, fg('platform-visual-refresh-icon-ads-migration') ? {
|
|
577
|
+
color: "var(--ds-icon, #44546F)"
|
|
578
|
+
} : {
|
|
547
579
|
primaryColor: "var(--ds-icon, #44546F)"
|
|
548
|
-
}))) : null)
|
|
580
|
+
})))) : null)
|
|
549
581
|
);
|
|
550
582
|
});
|
|
551
583
|
export default DatePicker;
|
|
@@ -9,7 +9,7 @@ import React from 'react';
|
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { format, isValid, parseISO } from 'date-fns';
|
|
11
11
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
12
|
-
import SelectClearIcon from '@atlaskit/icon/
|
|
12
|
+
import SelectClearIcon from '@atlaskit/icon/utility/migration/cross-circle--select-clear';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
14
|
import { mergeStyles } from '@atlaskit/select';
|
|
15
15
|
import { N500, N70 } from '@atlaskit/theme/colors';
|
|
@@ -22,7 +22,7 @@ import DatePickerNew from './date-picker-fc';
|
|
|
22
22
|
import TimePicker from './time-picker';
|
|
23
23
|
const DatePicker = componentWithCondition(() => fg('dst-date-picker-use-functional-component'), DatePickerNew, DatePickerOld);
|
|
24
24
|
const packageName = "@atlaskit/datetime-picker";
|
|
25
|
-
const packageVersion = "15.
|
|
25
|
+
const packageVersion = "15.6.0";
|
|
26
26
|
// Make DatePicker 50% the width of DateTimePicker
|
|
27
27
|
// If rendering an icon container, shrink the TimePicker
|
|
28
28
|
const datePickerContainerStyles = css({
|
|
@@ -364,10 +364,10 @@ class DateTimePickerComponent extends React.Component {
|
|
|
364
364
|
tabIndex: -1,
|
|
365
365
|
type: "button"
|
|
366
366
|
}, jsx(SelectClearIcon, {
|
|
367
|
-
|
|
368
|
-
|
|
367
|
+
LEGACY_size: "small",
|
|
368
|
+
color: "currentColor",
|
|
369
369
|
label: clearControlLabel
|
|
370
|
-
})) : null);
|
|
370
|
+
}), ' ') : null);
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
_defineProperty(DateTimePickerComponent, "defaultProps", dateTimePickerDefaultProps);
|