@atlaskit/datetime-picker 17.0.0 → 17.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/datetime-picker
2
2
 
3
+ ## 17.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 17.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#142578](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/142578)
14
+ [`a1e85a3a1ca96`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a1e85a3a1ca96) -
15
+ Add componenets API support in selectProps
16
+ - Updated dependencies
17
+
3
18
  ## 17.0.0
4
19
 
5
20
  ### Major Changes
@@ -41,7 +41,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
41
41
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
42
42
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
43
43
  var packageName = "@atlaskit/datetime-picker";
44
- var packageVersion = "17.0.0";
44
+ var packageVersion = "17.0.2";
45
45
  var datePickerDefaultProps = {
46
46
  defaultIsOpen: false,
47
47
  defaultValue: '',
@@ -448,7 +448,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
448
448
  var showClearIndicator = Boolean((value || selectInputValue) && !hideIcon);
449
449
  var clearIndicator = Icon;
450
450
 
451
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
451
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
452
452
  if ((0, _platformFeatureFlags.fg)('platform-visual-refresh-icons')) {
453
453
  clearIndicator = function clearIndicator(props) {
454
454
  return /*#__PURE__*/React.createElement(_compiled.Box, {
@@ -460,7 +460,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
460
460
  var SingleValue = (0, _singleValue.makeSingleValue)({
461
461
  lang: this.props.locale
462
462
  });
463
- var selectComponents = _objectSpread(_objectSpread({
463
+ var selectComponents = _objectSpread(_objectSpread(_objectSpread({
464
464
  DropdownIndicator: shouldShowCalendarButton ? _internal.EmptyComponent : dropDownIcon
465
465
  }, shouldShowCalendarButton ? {
466
466
  IndicatorsContainer: function IndicatorsContainer(props) {
@@ -473,7 +473,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
473
473
  SingleValue: SingleValue
474
474
  }, !showClearIndicator && {
475
475
  ClearIndicator: _internal.EmptyComponent
476
- });
476
+ }), selectProps.components);
477
477
  var _selectProps$styles = selectProps.styles,
478
478
  selectStyles = _selectProps$styles === void 0 ? {} : _selectProps$styles;
479
479
  var disabledStyle = isDisabled ? {
@@ -545,15 +545,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
545
545
  ,
546
546
  autoFocus: autoFocus,
547
547
  clearControlLabel: clearControlLabel,
548
- closeMenuOnSelect: true
549
- // FOr some reason, this and the below `styles` type error _only_ show
550
- // up when you alter some of the properties in the `selectComponents`
551
- // object. These errors are still present, and I suspect have always
552
- // been present, without changing the unrelated code. Ignoring as the
553
- // component still works as expected despite this error. And also
554
- // because the select refresh team may solve it later.
555
- ,
556
- components: selectComponents,
548
+ closeMenuOnSelect: true,
557
549
  enableAnimation: false,
558
550
  inputId: id,
559
551
  inputValue: actualSelectInputValue,
@@ -567,12 +559,22 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
567
559
  placeholder: (0, _datePickerMigration.getPlaceholder)({
568
560
  placeholder: this.props.placeholder,
569
561
  l10n: this.state.l10n
570
- }),
562
+ })
563
+ // @ts-ignore -- Argument of type 'StylesConfig<OptionType, false, GroupBase<OptionType>>' is not assignable to parameter of type 'StylesConfig<OptionType, boolean, GroupBase<OptionType>>'
564
+ ,
571
565
  styles: mergedStyles,
572
566
  value: initialValue
573
567
  }, selectProps, {
568
+ // For some reason, this and the below `styles` type error _only_ show
569
+ // up when you alter some of the properties in the `selectComponents`
570
+ // object. These errors are still present, and I suspect have always
571
+ // been present, without changing the unrelated code. Ignoring as the
572
+ // component still works as expected despite this error. And also
573
+ // because the select refresh team may solve it later.
574
+ components: selectComponents
574
575
  // These are below the spread because I don't know what is in
575
576
  // selectProps or not and what wil be overwritten
577
+ ,
576
578
  isClearable: true,
577
579
  isInvalid: isInvalid,
578
580
  spacing: spacing,
@@ -37,7 +37,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
37
37
  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; }
38
38
  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; }
39
39
  var packageName = "@atlaskit/datetime-picker";
40
- var packageVersion = "17.0.0";
40
+ var packageVersion = "17.0.2";
41
41
  var styles = {
42
42
  pickerContainerStyle: "_kqswh2mm",
43
43
  dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
@@ -440,7 +440,7 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
440
440
  var showClearIndicator = Boolean((getterValue || selectInputValue) && !hideIcon);
441
441
  var clearIndicator = Icon;
442
442
 
443
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
443
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
444
444
  if ((0, _platformFeatureFlags.fg)('platform-visual-refresh-icons')) {
445
445
  clearIndicator = function clearIndicator(props) {
446
446
  return /*#__PURE__*/React.createElement(_compiled.Box, {
@@ -452,7 +452,7 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
452
452
  var SingleValue = (0, _singleValue.makeSingleValue)({
453
453
  lang: propLocale
454
454
  });
455
- var selectComponents = _objectSpread(_objectSpread({
455
+ var selectComponents = _objectSpread(_objectSpread(_objectSpread({}, selectProps.components), {}, {
456
456
  DropdownIndicator: shouldShowCalendarButton ? _internal.EmptyComponent : dropDownIcon
457
457
  }, shouldShowCalendarButton ? {
458
458
  IndicatorsContainer: function IndicatorsContainer(props) {
@@ -543,15 +543,7 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
543
543
  ,
544
544
  autoFocus: autoFocus,
545
545
  clearControlLabel: clearControlLabel,
546
- closeMenuOnSelect: true
547
- // For some reason, this and the below `styles` type error _only_ show
548
- // up when you alter some of the properties in the `selectComponents`
549
- // object. These errors are still present, and I suspect have always
550
- // been present, without changing the unrelated code. Ignoring as the
551
- // component still works as expected despite this error. And also
552
- // because the select refresh team may solve it later.
553
- ,
554
- components: selectComponents,
546
+ closeMenuOnSelect: true,
555
547
  enableAnimation: false,
556
548
  inputId: id,
557
549
  inputValue: actualSelectInputValue,
@@ -567,12 +559,21 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
567
559
  l10n: l10n
568
560
  })
569
561
  // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
562
+ // @ts-ignore -- Type 'OptionType' is not assignable to type '{ label: string; value: string; }'
570
563
  ,
571
564
  styles: mergedStyles,
572
565
  value: initialValue
573
566
  }, selectProps, {
567
+ // For some reason, this and the below `styles` type error _only_ show
568
+ // up when you alter some of the properties in the `selectComponents`
569
+ // object. These errors are still present, and I suspect have always
570
+ // been present, without changing the unrelated code. Ignoring as the
571
+ // component still works as expected despite this error. And also
572
+ // because the select refresh team may solve it later.
573
+ components: selectComponents
574
574
  // These are below the spread because I don't know what is in
575
575
  // selectProps or not and what wil be overwritten
576
+ ,
576
577
  isClearable: true,
577
578
  isInvalid: isInvalid,
578
579
  spacing: spacing,
@@ -605,7 +606,6 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
605
606
  id: openCalendarLabelId,
606
607
  icon: function icon(iconProps) {
607
608
  return /*#__PURE__*/React.createElement(_calendar.default, (0, _extends2.default)({}, iconProps, {
608
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
609
609
  color: "var(--ds-icon, #44546F)"
610
610
  }));
611
611
  },
@@ -35,7 +35,7 @@ var DatePicker = (0, _ffComponent.componentWithCondition)(function () {
35
35
  return (0, _platformFeatureFlags.fg)('dst-date-picker-use-functional-component');
36
36
  }, _datePickerFc.default, _datePickerClass.default);
37
37
  var packageName = "@atlaskit/datetime-picker";
38
- var packageVersion = "17.0.0";
38
+ var packageVersion = "17.0.2";
39
39
  var compiledStyles = {
40
40
  datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
41
41
  timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
@@ -40,7 +40,7 @@ function () {
40
40
  return (0, _platformFeatureFlags.fg)('dst-date-picker-use-functional-component');
41
41
  }, _datePickerFc.default, _datePickerClass.default);
42
42
  var packageName = "@atlaskit/datetime-picker";
43
- var packageVersion = "17.0.0";
43
+ var packageVersion = "17.0.2";
44
44
  var analyticsAttributes = {
45
45
  componentName: 'dateTimePicker',
46
46
  packageName: packageName,
@@ -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 = "17.0.0";
30
+ var packageVersion = "17.0.2";
31
31
  var menuStyles = {
32
32
  /* Need to remove default absolute positioning as that causes issues with position fixed */
33
33
  position: 'static',
@@ -52,7 +52,5 @@ function componentWithCondition(condition, ComponentTrue, ComponentFalse) {
52
52
  if (ComponentTrue.name !== '') {
53
53
  ComponentWithCondition.displayName = "ComponentWithCondition[".concat(condition.name, "]");
54
54
  }
55
-
56
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
57
55
  return ComponentWithCondition;
58
56
  }
@@ -22,7 +22,7 @@ import { Menu } from '../internal/menu';
22
22
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
23
23
  import { makeSingleValue } from '../internal/single-value';
24
24
  const packageName = "@atlaskit/datetime-picker";
25
- const packageVersion = "17.0.0";
25
+ const packageVersion = "17.0.2";
26
26
  const datePickerDefaultProps = {
27
27
  defaultIsOpen: false,
28
28
  defaultValue: '',
@@ -423,7 +423,7 @@ class DatePickerComponent extends Component {
423
423
  const showClearIndicator = Boolean((value || selectInputValue) && !hideIcon);
424
424
  let clearIndicator = Icon;
425
425
 
426
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
426
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
427
427
  if (fg('platform-visual-refresh-icons')) {
428
428
  clearIndicator = props => /*#__PURE__*/React.createElement(Box, {
429
429
  xcss: styles.dropdownIndicatorStyles
@@ -446,7 +446,8 @@ class DatePickerComponent extends Component {
446
446
  SingleValue,
447
447
  ...(!showClearIndicator && {
448
448
  ClearIndicator: EmptyComponent
449
- })
449
+ }),
450
+ ...selectProps.components
450
451
  };
451
452
  const {
452
453
  styles: selectStyles = {}
@@ -520,15 +521,7 @@ class DatePickerComponent extends Component {
520
521
  ,
521
522
  autoFocus: autoFocus,
522
523
  clearControlLabel: clearControlLabel,
523
- closeMenuOnSelect: true
524
- // FOr some reason, this and the below `styles` type error _only_ show
525
- // up when you alter some of the properties in the `selectComponents`
526
- // object. These errors are still present, and I suspect have always
527
- // been present, without changing the unrelated code. Ignoring as the
528
- // component still works as expected despite this error. And also
529
- // because the select refresh team may solve it later.
530
- ,
531
- components: selectComponents,
524
+ closeMenuOnSelect: true,
532
525
  enableAnimation: false,
533
526
  inputId: id,
534
527
  inputValue: actualSelectInputValue,
@@ -542,12 +535,22 @@ class DatePickerComponent extends Component {
542
535
  placeholder: getPlaceholder({
543
536
  placeholder: this.props.placeholder,
544
537
  l10n: this.state.l10n
545
- }),
538
+ })
539
+ // @ts-ignore -- Argument of type 'StylesConfig<OptionType, false, GroupBase<OptionType>>' is not assignable to parameter of type 'StylesConfig<OptionType, boolean, GroupBase<OptionType>>'
540
+ ,
546
541
  styles: mergedStyles,
547
542
  value: initialValue
548
543
  }, selectProps, {
544
+ // For some reason, this and the below `styles` type error _only_ show
545
+ // up when you alter some of the properties in the `selectComponents`
546
+ // object. These errors are still present, and I suspect have always
547
+ // been present, without changing the unrelated code. Ignoring as the
548
+ // component still works as expected despite this error. And also
549
+ // because the select refresh team may solve it later.
550
+ components: selectComponents
549
551
  // These are below the spread because I don't know what is in
550
552
  // selectProps or not and what wil be overwritten
553
+ ,
551
554
  isClearable: true,
552
555
  isInvalid: isInvalid,
553
556
  spacing: spacing,
@@ -21,7 +21,7 @@ import { Menu } from '../internal/menu';
21
21
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
22
22
  import { makeSingleValue } from '../internal/single-value';
23
23
  const packageName = "@atlaskit/datetime-picker";
24
- const packageVersion = "17.0.0";
24
+ const packageVersion = "17.0.2";
25
25
  const styles = {
26
26
  pickerContainerStyle: "_kqswh2mm",
27
27
  dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
@@ -365,7 +365,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
365
365
  const showClearIndicator = Boolean((getterValue || selectInputValue) && !hideIcon);
366
366
  let clearIndicator = Icon;
367
367
 
368
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
368
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
369
369
  if (fg('platform-visual-refresh-icons')) {
370
370
  clearIndicator = props => /*#__PURE__*/React.createElement(Box, {
371
371
  xcss: styles.dropdownIndicatorStyles
@@ -376,6 +376,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
376
376
  lang: propLocale
377
377
  });
378
378
  const selectComponents = {
379
+ ...selectProps.components,
379
380
  DropdownIndicator: shouldShowCalendarButton ? EmptyComponent : dropDownIcon,
380
381
  // Only use this new container component if the calendar button is shown.
381
382
  // Otherwise, it throws errors downstream for some reason
@@ -468,15 +469,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
468
469
  ,
469
470
  autoFocus: autoFocus,
470
471
  clearControlLabel: clearControlLabel,
471
- closeMenuOnSelect: true
472
- // For some reason, this and the below `styles` type error _only_ show
473
- // up when you alter some of the properties in the `selectComponents`
474
- // object. These errors are still present, and I suspect have always
475
- // been present, without changing the unrelated code. Ignoring as the
476
- // component still works as expected despite this error. And also
477
- // because the select refresh team may solve it later.
478
- ,
479
- components: selectComponents,
472
+ closeMenuOnSelect: true,
480
473
  enableAnimation: false,
481
474
  inputId: id,
482
475
  inputValue: actualSelectInputValue,
@@ -492,12 +485,21 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
492
485
  l10n: l10n
493
486
  })
494
487
  // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
488
+ // @ts-ignore -- Type 'OptionType' is not assignable to type '{ label: string; value: string; }'
495
489
  ,
496
490
  styles: mergedStyles,
497
491
  value: initialValue
498
492
  }, selectProps, {
493
+ // For some reason, this and the below `styles` type error _only_ show
494
+ // up when you alter some of the properties in the `selectComponents`
495
+ // object. These errors are still present, and I suspect have always
496
+ // been present, without changing the unrelated code. Ignoring as the
497
+ // component still works as expected despite this error. And also
498
+ // because the select refresh team may solve it later.
499
+ components: selectComponents
499
500
  // These are below the spread because I don't know what is in
500
501
  // selectProps or not and what wil be overwritten
502
+ ,
501
503
  isClearable: true,
502
504
  isInvalid: isInvalid,
503
505
  spacing: spacing,
@@ -529,7 +531,6 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
529
531
  "aria-labelledby": inputLabelId ? `${inputLabelId} ${openCalendarLabelId}` : undefined,
530
532
  id: openCalendarLabelId,
531
533
  icon: iconProps => /*#__PURE__*/React.createElement(CalendarIcon, _extends({}, iconProps, {
532
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
533
534
  color: "var(--ds-icon, #44546F)"
534
535
  })),
535
536
  onClick: onCalendarButtonClick,
@@ -17,7 +17,7 @@ import DatePickerNew from './date-picker-fc';
17
17
  import TimePicker from './time-picker';
18
18
  const DatePicker = componentWithCondition(() => fg('dst-date-picker-use-functional-component'), DatePickerNew, DatePickerOld);
19
19
  const packageName = "@atlaskit/datetime-picker";
20
- const packageVersion = "17.0.0";
20
+ const packageVersion = "17.0.2";
21
21
  const compiledStyles = {
22
22
  datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
23
23
  timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
@@ -21,7 +21,7 @@ const DatePicker = componentWithCondition(
21
21
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
22
22
  () => fg('dst-date-picker-use-functional-component'), DatePickerNew, DatePickerOld);
23
23
  const packageName = "@atlaskit/datetime-picker";
24
- const packageVersion = "17.0.0";
24
+ const packageVersion = "17.0.2";
25
25
  const analyticsAttributes = {
26
26
  componentName: 'dateTimePicker',
27
27
  packageName,
@@ -11,7 +11,7 @@ import parseTime from '../internal/parse-time';
11
11
  import { convertTokens } from '../internal/parse-tokens';
12
12
  import { makeSingleValue } from '../internal/single-value';
13
13
  const packageName = "@atlaskit/datetime-picker";
14
- const packageVersion = "17.0.0";
14
+ const packageVersion = "17.0.2";
15
15
  const menuStyles = {
16
16
  /* Need to remove default absolute positioning as that causes issues with position fixed */
17
17
  position: 'static',
@@ -41,7 +41,5 @@ export function componentWithCondition(condition, ComponentTrue, ComponentFalse)
41
41
  if (ComponentTrue.name !== '') {
42
42
  ComponentWithCondition.displayName = `ComponentWithCondition[${condition.name}]`;
43
43
  }
44
-
45
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
46
44
  return ComponentWithCondition;
47
45
  }
@@ -31,7 +31,7 @@ import { Menu } from '../internal/menu';
31
31
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
32
32
  import { makeSingleValue } from '../internal/single-value';
33
33
  var packageName = "@atlaskit/datetime-picker";
34
- var packageVersion = "17.0.0";
34
+ var packageVersion = "17.0.2";
35
35
  var datePickerDefaultProps = {
36
36
  defaultIsOpen: false,
37
37
  defaultValue: '',
@@ -438,7 +438,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
438
438
  var showClearIndicator = Boolean((value || selectInputValue) && !hideIcon);
439
439
  var clearIndicator = Icon;
440
440
 
441
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
441
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
442
442
  if (fg('platform-visual-refresh-icons')) {
443
443
  clearIndicator = function clearIndicator(props) {
444
444
  return /*#__PURE__*/React.createElement(Box, {
@@ -450,7 +450,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
450
450
  var SingleValue = makeSingleValue({
451
451
  lang: this.props.locale
452
452
  });
453
- var selectComponents = _objectSpread(_objectSpread({
453
+ var selectComponents = _objectSpread(_objectSpread(_objectSpread({
454
454
  DropdownIndicator: shouldShowCalendarButton ? EmptyComponent : dropDownIcon
455
455
  }, shouldShowCalendarButton ? {
456
456
  IndicatorsContainer: function IndicatorsContainer(props) {
@@ -463,7 +463,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
463
463
  SingleValue: SingleValue
464
464
  }, !showClearIndicator && {
465
465
  ClearIndicator: EmptyComponent
466
- });
466
+ }), selectProps.components);
467
467
  var _selectProps$styles = selectProps.styles,
468
468
  selectStyles = _selectProps$styles === void 0 ? {} : _selectProps$styles;
469
469
  var disabledStyle = isDisabled ? {
@@ -535,15 +535,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
535
535
  ,
536
536
  autoFocus: autoFocus,
537
537
  clearControlLabel: clearControlLabel,
538
- closeMenuOnSelect: true
539
- // FOr some reason, this and the below `styles` type error _only_ show
540
- // up when you alter some of the properties in the `selectComponents`
541
- // object. These errors are still present, and I suspect have always
542
- // been present, without changing the unrelated code. Ignoring as the
543
- // component still works as expected despite this error. And also
544
- // because the select refresh team may solve it later.
545
- ,
546
- components: selectComponents,
538
+ closeMenuOnSelect: true,
547
539
  enableAnimation: false,
548
540
  inputId: id,
549
541
  inputValue: actualSelectInputValue,
@@ -557,12 +549,22 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
557
549
  placeholder: getPlaceholder({
558
550
  placeholder: this.props.placeholder,
559
551
  l10n: this.state.l10n
560
- }),
552
+ })
553
+ // @ts-ignore -- Argument of type 'StylesConfig<OptionType, false, GroupBase<OptionType>>' is not assignable to parameter of type 'StylesConfig<OptionType, boolean, GroupBase<OptionType>>'
554
+ ,
561
555
  styles: mergedStyles,
562
556
  value: initialValue
563
557
  }, selectProps, {
558
+ // For some reason, this and the below `styles` type error _only_ show
559
+ // up when you alter some of the properties in the `selectComponents`
560
+ // object. These errors are still present, and I suspect have always
561
+ // been present, without changing the unrelated code. Ignoring as the
562
+ // component still works as expected despite this error. And also
563
+ // because the select refresh team may solve it later.
564
+ components: selectComponents
564
565
  // These are below the spread because I don't know what is in
565
566
  // selectProps or not and what wil be overwritten
567
+ ,
566
568
  isClearable: true,
567
569
  isInvalid: isInvalid,
568
570
  spacing: spacing,
@@ -27,7 +27,7 @@ import { Menu } from '../internal/menu';
27
27
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
28
28
  import { makeSingleValue } from '../internal/single-value';
29
29
  var packageName = "@atlaskit/datetime-picker";
30
- var packageVersion = "17.0.0";
30
+ var packageVersion = "17.0.2";
31
31
  var styles = {
32
32
  pickerContainerStyle: "_kqswh2mm",
33
33
  dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
@@ -430,7 +430,7 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
430
430
  var showClearIndicator = Boolean((getterValue || selectInputValue) && !hideIcon);
431
431
  var clearIndicator = Icon;
432
432
 
433
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
433
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
434
434
  if (fg('platform-visual-refresh-icons')) {
435
435
  clearIndicator = function clearIndicator(props) {
436
436
  return /*#__PURE__*/React.createElement(Box, {
@@ -442,7 +442,7 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
442
442
  var SingleValue = makeSingleValue({
443
443
  lang: propLocale
444
444
  });
445
- var selectComponents = _objectSpread(_objectSpread({
445
+ var selectComponents = _objectSpread(_objectSpread(_objectSpread({}, selectProps.components), {}, {
446
446
  DropdownIndicator: shouldShowCalendarButton ? EmptyComponent : dropDownIcon
447
447
  }, shouldShowCalendarButton ? {
448
448
  IndicatorsContainer: function IndicatorsContainer(props) {
@@ -533,15 +533,7 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
533
533
  ,
534
534
  autoFocus: autoFocus,
535
535
  clearControlLabel: clearControlLabel,
536
- closeMenuOnSelect: true
537
- // For some reason, this and the below `styles` type error _only_ show
538
- // up when you alter some of the properties in the `selectComponents`
539
- // object. These errors are still present, and I suspect have always
540
- // been present, without changing the unrelated code. Ignoring as the
541
- // component still works as expected despite this error. And also
542
- // because the select refresh team may solve it later.
543
- ,
544
- components: selectComponents,
536
+ closeMenuOnSelect: true,
545
537
  enableAnimation: false,
546
538
  inputId: id,
547
539
  inputValue: actualSelectInputValue,
@@ -557,12 +549,21 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
557
549
  l10n: l10n
558
550
  })
559
551
  // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
552
+ // @ts-ignore -- Type 'OptionType' is not assignable to type '{ label: string; value: string; }'
560
553
  ,
561
554
  styles: mergedStyles,
562
555
  value: initialValue
563
556
  }, selectProps, {
557
+ // For some reason, this and the below `styles` type error _only_ show
558
+ // up when you alter some of the properties in the `selectComponents`
559
+ // object. These errors are still present, and I suspect have always
560
+ // been present, without changing the unrelated code. Ignoring as the
561
+ // component still works as expected despite this error. And also
562
+ // because the select refresh team may solve it later.
563
+ components: selectComponents
564
564
  // These are below the spread because I don't know what is in
565
565
  // selectProps or not and what wil be overwritten
566
+ ,
566
567
  isClearable: true,
567
568
  isInvalid: isInvalid,
568
569
  spacing: spacing,
@@ -595,7 +596,6 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
595
596
  id: openCalendarLabelId,
596
597
  icon: function icon(iconProps) {
597
598
  return /*#__PURE__*/React.createElement(CalendarIcon, _extends({}, iconProps, {
598
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
599
599
  color: "var(--ds-icon, #44546F)"
600
600
  }));
601
601
  },
@@ -28,7 +28,7 @@ var DatePicker = componentWithCondition(function () {
28
28
  return fg('dst-date-picker-use-functional-component');
29
29
  }, DatePickerNew, DatePickerOld);
30
30
  var packageName = "@atlaskit/datetime-picker";
31
- var packageVersion = "17.0.0";
31
+ var packageVersion = "17.0.2";
32
32
  var compiledStyles = {
33
33
  datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
34
34
  timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
@@ -30,7 +30,7 @@ function () {
30
30
  return fg('dst-date-picker-use-functional-component');
31
31
  }, DatePickerNew, DatePickerOld);
32
32
  var packageName = "@atlaskit/datetime-picker";
33
- var packageVersion = "17.0.0";
33
+ var packageVersion = "17.0.2";
34
34
  var analyticsAttributes = {
35
35
  componentName: 'dateTimePicker',
36
36
  packageName: packageName,
@@ -17,7 +17,7 @@ import parseTime from '../internal/parse-time';
17
17
  import { convertTokens } from '../internal/parse-tokens';
18
18
  import { makeSingleValue } from '../internal/single-value';
19
19
  var packageName = "@atlaskit/datetime-picker";
20
- var packageVersion = "17.0.0";
20
+ var packageVersion = "17.0.2";
21
21
  var menuStyles = {
22
22
  /* Need to remove default absolute positioning as that causes issues with position fixed */
23
23
  position: 'static',
@@ -43,7 +43,5 @@ export function componentWithCondition(condition, ComponentTrue, ComponentFalse)
43
43
  if (ComponentTrue.name !== '') {
44
44
  ComponentWithCondition.displayName = "ComponentWithCondition[".concat(condition.name, "]");
45
45
  }
46
-
47
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
48
46
  return ComponentWithCondition;
49
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "17.0.0",
3
+ "version": "17.0.2",
4
4
  "description": "A date time picker allows the user to select an associated date and time.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -42,14 +42,14 @@
42
42
  "@atlaskit/calendar": "^17.1.0",
43
43
  "@atlaskit/css": "^0.10.0",
44
44
  "@atlaskit/ds-lib": "^4.0.0",
45
- "@atlaskit/icon": "^25.5.0",
45
+ "@atlaskit/icon": "^26.0.0",
46
46
  "@atlaskit/layering": "^2.1.0",
47
47
  "@atlaskit/locale": "^3.0.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
49
  "@atlaskit/popper": "^7.0.0",
50
- "@atlaskit/primitives": "^14.3.0",
51
- "@atlaskit/select": "^20.1.0",
52
- "@atlaskit/tokens": "^4.6.0",
50
+ "@atlaskit/primitives": "^14.7.0",
51
+ "@atlaskit/select": "^20.4.0",
52
+ "@atlaskit/tokens": "^4.8.0",
53
53
  "@atlaskit/visually-hidden": "^3.0.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@compiled/react": "^0.18.3",
@@ -59,23 +59,23 @@
59
59
  "react": "^18.2.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@af/accessibility-testing": "^2.0.0",
63
- "@af/integration-testing": "^0.5.0",
64
- "@af/visual-regression": "^1.3.0",
65
- "@atlaskit/code": "^16.3.0",
62
+ "@af/accessibility-testing": "workspace:^",
63
+ "@af/integration-testing": "workspace:^",
64
+ "@af/visual-regression": "workspace:^",
65
+ "@atlaskit/code": "^17.1.0",
66
66
  "@atlaskit/codemod-utils": "^4.2.0",
67
67
  "@atlaskit/docs": "^10.0.0",
68
68
  "@atlaskit/form": "^12.0.0",
69
- "@atlaskit/heading": "^5.1.0",
69
+ "@atlaskit/heading": "^5.2.0",
70
70
  "@atlaskit/link": "^3.1.0",
71
71
  "@atlaskit/modal-dialog": "^14.1.0",
72
- "@atlaskit/popup": "^3.0.0",
72
+ "@atlaskit/popup": "^4.1.0",
73
73
  "@atlaskit/range": "^9.0.0",
74
74
  "@atlaskit/section-message": "^8.2.0",
75
- "@atlaskit/ssr": "^0.4.0",
75
+ "@atlaskit/ssr": "workspace:^",
76
76
  "@atlaskit/textfield": "^8.0.0",
77
77
  "@atlaskit/toggle": "^15.0.0",
78
- "@atlaskit/visual-regression": "^0.10.0",
78
+ "@atlaskit/visual-regression": "workspace:^",
79
79
  "@atlassian/ssr-tests": "^0.2.0",
80
80
  "@testing-library/react": "^13.4.0",
81
81
  "@testing-library/user-event": "^14.4.3",