@atlaskit/datetime-picker 16.2.3 → 17.0.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/cjs/components/date-picker-class.compiled.css +16 -0
  3. package/dist/cjs/components/date-picker-class.js +122 -146
  4. package/dist/cjs/components/date-picker-fc.compiled.css +16 -0
  5. package/dist/cjs/components/date-picker-fc.js +117 -144
  6. package/dist/cjs/components/date-time-picker-class.compiled.css +19 -0
  7. package/dist/cjs/components/date-time-picker-class.js +22 -47
  8. package/dist/cjs/components/date-time-picker-fc.compiled.css +6 -0
  9. package/dist/cjs/components/date-time-picker-fc.js +22 -27
  10. package/dist/cjs/components/time-picker.js +1 -1
  11. package/dist/cjs/internal/date-time-picker-container.compiled.css +21 -0
  12. package/dist/cjs/internal/date-time-picker-container.js +26 -71
  13. package/dist/cjs/internal/ff-component.js +0 -2
  14. package/dist/cjs/internal/fixed-layer-menu.js +8 -8
  15. package/dist/cjs/internal/fixed-layer.compiled.css +4 -0
  16. package/dist/cjs/internal/fixed-layer.js +14 -13
  17. package/dist/cjs/internal/indicators-container.compiled.css +2 -0
  18. package/dist/cjs/internal/indicators-container.js +14 -15
  19. package/dist/cjs/internal/menu.compiled.css +6 -0
  20. package/dist/cjs/internal/menu.js +15 -32
  21. package/dist/es2019/components/date-picker-class.compiled.css +16 -0
  22. package/dist/es2019/components/date-picker-class.js +117 -143
  23. package/dist/es2019/components/date-picker-fc.compiled.css +16 -0
  24. package/dist/es2019/components/date-picker-fc.js +114 -141
  25. package/dist/es2019/components/date-time-picker-class.compiled.css +19 -0
  26. package/dist/es2019/components/date-time-picker-class.js +21 -49
  27. package/dist/es2019/components/date-time-picker-fc.compiled.css +6 -0
  28. package/dist/es2019/components/date-time-picker-fc.js +19 -24
  29. package/dist/es2019/components/time-picker.js +1 -1
  30. package/dist/es2019/internal/date-time-picker-container.compiled.css +21 -0
  31. package/dist/es2019/internal/date-time-picker-container.js +18 -69
  32. package/dist/es2019/internal/ff-component.js +0 -2
  33. package/dist/es2019/internal/fixed-layer-menu.js +5 -8
  34. package/dist/es2019/internal/fixed-layer.compiled.css +4 -0
  35. package/dist/es2019/internal/fixed-layer.js +13 -12
  36. package/dist/es2019/internal/indicators-container.compiled.css +2 -0
  37. package/dist/es2019/internal/indicators-container.js +11 -16
  38. package/dist/es2019/internal/menu.compiled.css +6 -0
  39. package/dist/es2019/internal/menu.js +11 -30
  40. package/dist/esm/components/date-picker-class.compiled.css +16 -0
  41. package/dist/esm/components/date-picker-class.js +120 -147
  42. package/dist/esm/components/date-picker-fc.compiled.css +16 -0
  43. package/dist/esm/components/date-picker-fc.js +116 -144
  44. package/dist/esm/components/date-time-picker-class.compiled.css +19 -0
  45. package/dist/esm/components/date-time-picker-class.js +21 -49
  46. package/dist/esm/components/date-time-picker-fc.compiled.css +6 -0
  47. package/dist/esm/components/date-time-picker-fc.js +19 -24
  48. package/dist/esm/components/time-picker.js +1 -1
  49. package/dist/esm/internal/date-time-picker-container.compiled.css +21 -0
  50. package/dist/esm/internal/date-time-picker-container.js +22 -69
  51. package/dist/esm/internal/ff-component.js +0 -2
  52. package/dist/esm/internal/fixed-layer-menu.js +5 -8
  53. package/dist/esm/internal/fixed-layer.compiled.css +4 -0
  54. package/dist/esm/internal/fixed-layer.js +13 -13
  55. package/dist/esm/internal/indicators-container.compiled.css +2 -0
  56. package/dist/esm/internal/indicators-container.js +11 -16
  57. package/dist/esm/internal/menu.compiled.css +6 -0
  58. package/dist/esm/internal/menu.js +11 -30
  59. package/dist/types/components/date-picker-class.d.ts +2 -3
  60. package/dist/types/components/date-picker.d.ts +1 -1
  61. package/dist/types/components/date-time-picker-class.d.ts +4 -5
  62. package/dist/types/components/date-time-picker.d.ts +3 -3
  63. package/dist/types/internal/date-time-picker-container.d.ts +4 -0
  64. package/dist/types/internal/fixed-layer-menu.d.ts +2 -6
  65. package/dist/types/internal/fixed-layer.d.ts +5 -1
  66. package/dist/types/internal/indicators-container.d.ts +2 -2
  67. package/dist/types/internal/menu.d.ts +6 -2
  68. package/dist/types-ts4.5/components/date-picker-class.d.ts +2 -3
  69. package/dist/types-ts4.5/components/date-picker.d.ts +1 -1
  70. package/dist/types-ts4.5/components/date-time-picker-class.d.ts +4 -5
  71. package/dist/types-ts4.5/components/date-time-picker.d.ts +3 -3
  72. package/dist/types-ts4.5/internal/date-time-picker-container.d.ts +4 -0
  73. package/dist/types-ts4.5/internal/fixed-layer-menu.d.ts +2 -6
  74. package/dist/types-ts4.5/internal/fixed-layer.d.ts +5 -1
  75. package/dist/types-ts4.5/internal/indicators-container.d.ts +2 -2
  76. package/dist/types-ts4.5/internal/menu.d.ts +6 -2
  77. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @atlaskit/datetime-picker
2
2
 
3
+ ## 17.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#142578](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/142578)
8
+ [`a1e85a3a1ca96`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a1e85a3a1ca96) -
9
+ Add componenets API support in selectProps
10
+ - Updated dependencies
11
+
12
+ ## 17.0.0
13
+
14
+ ### Major Changes
15
+
16
+ - [#129617](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/129617)
17
+ [`0afd40c7a88c1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0afd40c7a88c1) -
18
+ Migrated from `@emotion/react` to `@compiled/react` in order to improve performance, align with
19
+ the rest of the Atlaskit techstack, and support React 18 Streaming SSR.
20
+
21
+ Please note, in order to use this version of `@atlaskit/datetime-picker`, you will need to ensure
22
+ that your bundler is configured to handle `.css` imports correctly. Most bundlers come with
23
+ built-in support for `.css` imports, so you may not need to do anything. If you are using a
24
+ different bundler, please refer to the documentation for that bundler to understand how to handle
25
+ `.css` imports.
26
+
27
+ For more information on the migration, please refer to
28
+ [RFC-73 Migrating our components to Compiled CSS-in-JS](https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953).
29
+
3
30
  ## 16.2.3
4
31
 
5
32
  ### Patch Changes
@@ -0,0 +1,16 @@
1
+
2
+ ._v564vrg3{transition:color .15s}._12l21b66{margin-inline-end:var(--ds-space-050,4px)}
3
+ ._12l2xy5q{margin-inline-end:var(--ds-space-400,2pc)}
4
+ ._152tze3t{inset-block-start:var(--ds-space-0,0)}
5
+ ._1bah1h6o{justify-content:center}
6
+ ._1e0c1txw{display:flex}
7
+ ._1tke1k8s{min-height:1.5rem}
8
+ ._1ul91k8s{min-width:1.5rem}
9
+ ._4cvr1h6o{align-items:center}
10
+ ._4t3i1osq{height:100%}
11
+ ._i0dl1kw7{flex-basis:inherit}
12
+ ._kqswh2mm{position:relative}
13
+ ._kqswstnw{position:absolute}
14
+ ._rjxpze3t{inset-inline-end:var(--ds-space-0,0)}
15
+ ._syaz131l{color:var(--ds-text-subtlest,#626f86)}
16
+ ._30l31gjq:hover{color:var(--ds-text-subtle,#44546f)}
@@ -1,3 +1,4 @@
1
+ /* date-picker-class.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -6,6 +7,10 @@ Object.defineProperty(exports, "__esModule", {
6
7
  value: true
7
8
  });
8
9
  exports.default = exports.DatePickerWithoutAnalytics = void 0;
10
+ require("./date-picker-class.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
13
+ var _runtime = require("@compiled/react/runtime");
9
14
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
15
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
16
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
@@ -13,16 +18,15 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
13
18
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
14
19
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
20
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
- var _react = require("react");
17
- var _react2 = require("@emotion/react");
18
21
  var _dateFns = require("date-fns");
19
22
  var _analyticsNext = require("@atlaskit/analytics-next");
20
23
  var _new = require("@atlaskit/button/new");
24
+ var _css = require("@atlaskit/css");
21
25
  var _useId = require("@atlaskit/ds-lib/use-id");
22
26
  var _calendar = _interopRequireDefault(require("@atlaskit/icon/core/migration/calendar"));
23
27
  var _locale = require("@atlaskit/locale");
24
28
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
25
- var _primitives = require("@atlaskit/primitives");
29
+ var _compiled = require("@atlaskit/primitives/compiled");
26
30
  var _select = _interopRequireWildcard(require("@atlaskit/select"));
27
31
  var _internal = require("../internal");
28
32
  var _datePickerMigration = require("../internal/date-picker-migration");
@@ -35,19 +39,9 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
35
39
  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; }
36
40
  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; }
37
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)); }
38
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
39
- * @jsxRuntime classic
40
- * @jsx jsx
41
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
42
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
42
43
  var packageName = "@atlaskit/datetime-picker";
43
- var packageVersion = "16.2.3";
44
- var dropdownIndicatorStyles = (0, _primitives.xcss)({
45
- minWidth: "var(--ds-space-300, 24px)",
46
- minHeight: "var(--ds-space-300, 24px)",
47
- display: 'flex',
48
- alignItems: 'center',
49
- justifyContent: 'center'
50
- });
44
+ var packageVersion = "17.0.1";
51
45
  var datePickerDefaultProps = {
52
46
  defaultIsOpen: false,
53
47
  defaultValue: '',
@@ -66,29 +60,13 @@ var datePickerDefaultProps = {
66
60
  // Not including a default prop for value as it will
67
61
  // Make the component a controlled component
68
62
  };
69
- var pickerContainerStyles = (0, _react2.css)({
70
- position: 'relative'
71
- });
72
- var iconContainerStyles = (0, _primitives.xcss)({
73
- display: 'flex',
74
- height: '100%',
75
- position: 'absolute',
76
- alignItems: 'center',
77
- flexBasis: 'inherit',
78
- color: 'color.text.subtlest',
79
- insetBlockStart: 'space.0',
80
- insetInlineEnd: 'space.0',
81
- transition: "color 150ms",
82
- ':hover': {
83
- color: 'color.text.subtle'
84
- }
85
- });
86
- var iconSpacingWithClearButtonStyles = (0, _primitives.xcss)({
87
- marginInlineEnd: 'space.400'
88
- });
89
- var iconSpacingWithoutClearButtonStyles = (0, _primitives.xcss)({
90
- marginInlineEnd: 'space.050'
91
- });
63
+ var styles = {
64
+ pickerContainerStyles: "_kqswh2mm",
65
+ iconContainerStyles: "_v564vrg3 _1e0c1txw _4t3i1osq _kqswstnw _4cvr1h6o _i0dl1kw7 _syaz131l _152tze3t _rjxpze3t _30l31gjq",
66
+ iconSpacingWithClearButtonStyles: "_12l2xy5q",
67
+ iconSpacingWithoutClearButtonStyles: "_12l21b66",
68
+ dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o"
69
+ };
92
70
 
93
71
  // eslint-disable-next-line @repo/internal/react/no-class-components
94
72
  var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Component) {
@@ -470,23 +448,23 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
470
448
  var showClearIndicator = Boolean((value || selectInputValue) && !hideIcon);
471
449
  var clearIndicator = Icon;
472
450
 
473
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning
451
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
474
452
  if ((0, _platformFeatureFlags.fg)('platform-visual-refresh-icons')) {
475
453
  clearIndicator = function clearIndicator(props) {
476
- return (0, _react2.jsx)(_primitives.Box, {
477
- xcss: dropdownIndicatorStyles
478
- }, (0, _react2.jsx)(Icon, props));
454
+ return /*#__PURE__*/React.createElement(_compiled.Box, {
455
+ xcss: styles.dropdownIndicatorStyles
456
+ }, /*#__PURE__*/React.createElement(Icon, props));
479
457
  };
480
458
  }
481
459
  var dropDownIcon = appearance === 'subtle' || hideIcon || showClearIndicator ? null : clearIndicator;
482
460
  var SingleValue = (0, _singleValue.makeSingleValue)({
483
461
  lang: this.props.locale
484
462
  });
485
- var selectComponents = _objectSpread(_objectSpread({
463
+ var selectComponents = _objectSpread(_objectSpread(_objectSpread({
486
464
  DropdownIndicator: shouldShowCalendarButton ? _internal.EmptyComponent : dropDownIcon
487
465
  }, shouldShowCalendarButton ? {
488
466
  IndicatorsContainer: function IndicatorsContainer(props) {
489
- return (0, _react2.jsx)(_indicatorsContainer.IndicatorsContainer, (0, _extends2.default)({}, props, {
467
+ return /*#__PURE__*/React.createElement(_indicatorsContainer.IndicatorsContainer, (0, _extends2.default)({}, props, {
490
468
  showClearIndicator: showClearIndicator
491
469
  }));
492
470
  }
@@ -495,7 +473,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
495
473
  SingleValue: SingleValue
496
474
  }, !showClearIndicator && {
497
475
  ClearIndicator: _internal.EmptyComponent
498
- });
476
+ }), selectProps.components);
499
477
  var _selectProps$styles = selectProps.styles,
500
478
  selectStyles = _selectProps$styles === void 0 ? {} : _selectProps$styles;
501
479
  var disabledStyle = isDisabled ? {
@@ -543,107 +521,105 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
543
521
 
544
522
  // `label` takes precedence of the `inputLabel`
545
523
  var fullopenCalendarLabel = label || inputLabel ? "".concat(label || inputLabel, ", ").concat(openCalendarLabel) : openCalendarLabel;
546
- return (
547
- // These event handlers must be on this element because the events come
548
- // from different child elements.
549
- // Until innerProps is removed, it must remain a div rather than a primitive component.
550
- (0, _react2.jsx)("div", (0, _extends2.default)({}, innerProps, {
551
- css: pickerContainerStyles
552
- // Since the onclick, onfocus are passed down, adding role="presentation" prevents typecheck errors.
553
- ,
554
- role: "presentation",
555
- onBlur: this.onContainerBlur,
556
- onFocus: this.onContainerFocus,
557
- onClick: this.onInputClick,
558
- onInput: this.onTextInput,
559
- onKeyDown: this.onInputKeyDown,
560
- ref: this.getContainerRef,
561
- "data-testid": testId && "".concat(testId, "--container")
562
- }), (0, _react2.jsx)("input", {
563
- name: name,
564
- type: "hidden",
565
- value: value,
566
- "data-testid": testId && "".concat(testId, "--input")
567
- }), (0, _react2.jsx)(_select.default, (0, _extends2.default)({
568
- appearance: this.props.appearance,
569
- "aria-describedby": ariaDescribedBy,
570
- label: label || undefined,
571
- autoFocus: autoFocus,
572
- clearControlLabel: clearControlLabel,
573
- closeMenuOnSelect: true
574
- // FOr some reason, this and the below `styles` type error _only_ show
575
- // up when you alter some of the properties in the `selectComponents`
576
- // object. These errors are still present, and I suspect have always
577
- // been present, without changing the unrelated code. Ignoring as the
578
- // component still works as expected despite this error. And also
579
- // because the select refresh team may solve it later.
580
- ,
581
- components: selectComponents,
582
- enableAnimation: false,
583
- inputId: id,
584
- inputValue: actualSelectInputValue,
585
- isDisabled: isDisabled,
586
- isRequired: isRequired,
587
- menuIsOpen: menuIsOpen,
588
- onBlur: this.onSelectBlur,
589
- onChange: this.onSelectChange,
590
- onFocus: this.onSelectFocus,
591
- onInputChange: this.handleSelectInputChange,
592
- placeholder: (0, _datePickerMigration.getPlaceholder)({
593
- placeholder: this.props.placeholder,
594
- l10n: this.state.l10n
595
- }),
596
- styles: mergedStyles,
597
- value: initialValue
598
- }, selectProps, {
599
- // These are below the spread because I don't know what is in
600
- // selectProps or not and what wil be overwritten
601
- isClearable: true,
602
- isInvalid: isInvalid,
603
- spacing: spacing,
604
- testId: testId
605
- // These aren't part of `Select`'s API, but we're using them here.
606
- // @ts-ignore -- Property 'calendarContainerRef' does not exist on type 'IntrinsicAttributes & LibraryManagedAttributes<(<Option extends unknown = OptionType, IsMulti extends boolean = false>(props: AtlaskitSelectProps<Option, IsMulti> & { ...; }) => Element), AtlaskitSelectProps<...> & { ...; }>'.
607
- ,
608
- calendarContainerRef: calendarProps.calendarContainerRef,
609
- calendarDisabled: calendarProps.calendarDisabled,
610
- calendarDisabledDateFilter: calendarProps.calendarDisabledDateFilter,
611
- calendarLocale: calendarProps.calendarLocale,
612
- calendarMaxDate: calendarProps.calendarMaxDate,
613
- calendarMinDate: calendarProps.calendarMinDate,
614
- calendarRef: calendarProps.calendarRef,
615
- calendarValue: calendarProps.calendarValue,
616
- calendarView: calendarProps.calendarView,
617
- calendarWeekStartDay: calendarProps.calendarWeekStartDay,
618
- nextMonthLabel: nextMonthLabel,
619
- onCalendarChange: calendarProps.onCalendarChange,
620
- onCalendarSelect: calendarProps.onCalendarSelect,
621
- previousMonthLabel: previousMonthLabel,
622
- shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
623
- menuInnerWrapper: calendarProps.menuInnerWrapper
624
- })), shouldShowCalendarButton && !isDisabled ? (0, _react2.jsx)(_useId.IdProvider, {
625
- prefix: "open-calendar-label--"
626
- }, function (_ref3) {
627
- var openCalendarLabelId = _ref3.id;
628
- return (0, _react2.jsx)(_primitives.Box, {
629
- xcss: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : iconSpacingWithoutClearButtonStyles]
630
- }, (0, _react2.jsx)(_new.IconButton, {
631
- appearance: "subtle",
632
- label: !inputLabelId ? fullopenCalendarLabel : openCalendarLabel,
633
- "aria-labelledby": inputLabelId ? "".concat(inputLabelId, " ").concat(openCalendarLabelId) : undefined,
634
- id: openCalendarLabelId,
635
- icon: function icon(iconProps) {
636
- return (0, _react2.jsx)(_calendar.default, (0, _extends2.default)({}, iconProps, {
637
- color: "var(--ds-icon, #44546F)"
638
- }));
639
- },
640
- onClick: _this2.onCalendarButtonClick,
641
- onKeyDown: _this2.onCalendarButtonKeyDown,
642
- ref: _this2.calendarButtonRef,
643
- testId: testId && "".concat(testId, "--open-calendar-button")
644
- }));
645
- }) : null)
646
- );
524
+ return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({}, innerProps, {
525
+ // Since the onclick, onfocus are passed down, adding role="presentation" prevents typecheck errors.
526
+ role: "presentation",
527
+ onBlur: this.onContainerBlur,
528
+ onFocus: this.onContainerFocus,
529
+ onClick: this.onInputClick,
530
+ onInput: this.onTextInput,
531
+ onKeyDown: this.onInputKeyDown,
532
+ ref: this.getContainerRef,
533
+ "data-testid": testId && "".concat(testId, "--container"),
534
+ className: (0, _runtime.ax)([styles.pickerContainerStyles])
535
+ }), /*#__PURE__*/React.createElement("input", {
536
+ name: name,
537
+ type: "hidden",
538
+ value: value,
539
+ "data-testid": testId && "".concat(testId, "--input")
540
+ }), /*#__PURE__*/React.createElement(_select.default, (0, _extends2.default)({
541
+ appearance: this.props.appearance,
542
+ "aria-describedby": ariaDescribedBy,
543
+ label: label || undefined
544
+ // eslint-disable-next-line jsx-a11y/no-autofocus
545
+ ,
546
+ autoFocus: autoFocus,
547
+ clearControlLabel: clearControlLabel,
548
+ closeMenuOnSelect: true,
549
+ enableAnimation: false,
550
+ inputId: id,
551
+ inputValue: actualSelectInputValue,
552
+ isDisabled: isDisabled,
553
+ isRequired: isRequired,
554
+ menuIsOpen: menuIsOpen,
555
+ onBlur: this.onSelectBlur,
556
+ onChange: this.onSelectChange,
557
+ onFocus: this.onSelectFocus,
558
+ onInputChange: this.handleSelectInputChange,
559
+ placeholder: (0, _datePickerMigration.getPlaceholder)({
560
+ placeholder: this.props.placeholder,
561
+ l10n: this.state.l10n
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
+ ,
565
+ styles: mergedStyles,
566
+ value: initialValue
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
575
+ // These are below the spread because I don't know what is in
576
+ // selectProps or not and what wil be overwritten
577
+ ,
578
+ isClearable: true,
579
+ isInvalid: isInvalid,
580
+ spacing: spacing,
581
+ testId: testId
582
+ // These aren't part of `Select`'s API, but we're using them here.
583
+ // @ts-ignore -- Property 'calendarContainerRef' does not exist on type 'IntrinsicAttributes & LibraryManagedAttributes<(<Option extends unknown = OptionType, IsMulti extends boolean = false>(props: AtlaskitSelectProps<Option, IsMulti> & { ...; }) => Element), AtlaskitSelectProps<...> & { ...; }>'.
584
+ ,
585
+ calendarContainerRef: calendarProps.calendarContainerRef,
586
+ calendarDisabled: calendarProps.calendarDisabled,
587
+ calendarDisabledDateFilter: calendarProps.calendarDisabledDateFilter,
588
+ calendarLocale: calendarProps.calendarLocale,
589
+ calendarMaxDate: calendarProps.calendarMaxDate,
590
+ calendarMinDate: calendarProps.calendarMinDate,
591
+ calendarRef: calendarProps.calendarRef,
592
+ calendarValue: calendarProps.calendarValue,
593
+ calendarView: calendarProps.calendarView,
594
+ calendarWeekStartDay: calendarProps.calendarWeekStartDay,
595
+ nextMonthLabel: nextMonthLabel,
596
+ onCalendarChange: calendarProps.onCalendarChange,
597
+ onCalendarSelect: calendarProps.onCalendarSelect,
598
+ previousMonthLabel: previousMonthLabel,
599
+ shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
600
+ menuInnerWrapper: calendarProps.menuInnerWrapper
601
+ })), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(_useId.IdProvider, {
602
+ prefix: "open-calendar-label--"
603
+ }, function (_ref3) {
604
+ var openCalendarLabelId = _ref3.id;
605
+ return /*#__PURE__*/React.createElement(_compiled.Box, {
606
+ xcss: (0, _css.cx)(styles.iconContainerStyles, value && !hideIcon ? styles.iconSpacingWithClearButtonStyles : styles.iconSpacingWithoutClearButtonStyles)
607
+ }, /*#__PURE__*/React.createElement(_new.IconButton, {
608
+ appearance: "subtle",
609
+ label: !inputLabelId ? fullopenCalendarLabel : openCalendarLabel,
610
+ "aria-labelledby": inputLabelId ? "".concat(inputLabelId, " ").concat(openCalendarLabelId) : undefined,
611
+ id: openCalendarLabelId,
612
+ icon: function icon(iconProps) {
613
+ return /*#__PURE__*/React.createElement(_calendar.default, (0, _extends2.default)({}, iconProps, {
614
+ color: "var(--ds-icon, #44546F)"
615
+ }));
616
+ },
617
+ onClick: _this2.onCalendarButtonClick,
618
+ onKeyDown: _this2.onCalendarButtonKeyDown,
619
+ ref: _this2.calendarButtonRef,
620
+ testId: testId && "".concat(testId, "--open-calendar-button")
621
+ }));
622
+ }) : null);
647
623
  }
648
624
  }], [{
649
625
  key: "getDerivedStateFromProps",
@@ -0,0 +1,16 @@
1
+
2
+ ._v564vrg3{transition:color .15s}._12l21b66{margin-inline-end:var(--ds-space-050,4px)}
3
+ ._12l2xy5q{margin-inline-end:var(--ds-space-400,2pc)}
4
+ ._152tze3t{inset-block-start:var(--ds-space-0,0)}
5
+ ._1bah1h6o{justify-content:center}
6
+ ._1e0c1txw{display:flex}
7
+ ._1tke1k8s{min-height:1.5rem}
8
+ ._1ul91k8s{min-width:1.5rem}
9
+ ._4cvr1h6o{align-items:center}
10
+ ._4t3i1osq{height:100%}
11
+ ._i0dl1kw7{flex-basis:inherit}
12
+ ._kqswh2mm{position:relative}
13
+ ._kqswstnw{position:absolute}
14
+ ._rjxpze3t{inset-inline-end:var(--ds-space-0,0)}
15
+ ._syaz131l{color:var(--ds-text-subtlest,#626f86)}
16
+ ._30l31gjq:hover{color:var(--ds-text-subtle,#44546f)}