@atlaskit/datetime-picker 15.7.1 → 15.8.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/datetime-picker
2
2
 
3
+ ## 15.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#161680](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161680)
8
+ [`e47891c352097`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e47891c352097) -
9
+ Update date picker to include latest primitives and css
10
+
3
11
  ## 15.7.1
4
12
 
5
13
  ### Patch Changes
@@ -43,7 +43,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
43
43
  * @jsx jsx
44
44
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
45
45
  var packageName = "@atlaskit/datetime-picker";
46
- var packageVersion = "15.7.1";
46
+ var packageVersion = "15.8.0";
47
47
  var dropdownIndicatorStyles = (0, _primitives.xcss)({
48
48
  minWidth: "var(--ds-space-300, 24px)",
49
49
  minHeight: "var(--ds-space-300, 24px)",
@@ -21,7 +21,6 @@ var _locale = require("@atlaskit/locale");
21
21
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
22
22
  var _primitives = require("@atlaskit/primitives");
23
23
  var _select = _interopRequireWildcard(require("@atlaskit/select"));
24
- var _colors = require("@atlaskit/theme/colors");
25
24
  var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
26
25
  var _internal = require("../internal");
27
26
  var _datePickerMigration = require("../internal/date-picker-migration");
@@ -40,7 +39,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
40
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; }
41
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; }
42
41
  var packageName = "@atlaskit/datetime-picker";
43
- var packageVersion = "15.7.1";
42
+ var packageVersion = "15.8.0";
44
43
  var analyticsAttributes = {
45
44
  componentName: 'datePicker',
46
45
  packageName: packageName,
@@ -56,31 +55,33 @@ var dropdownIndicatorStyles = (0, _primitives.xcss)({
56
55
  alignItems: 'center',
57
56
  justifyContent: 'center'
58
57
  });
58
+
59
+ // eslint-disable-next-line @atlaskit/platform/no-module-level-eval, @atlaskit/platform/ensure-feature-flag-prefix
59
60
  var CalendarIcon = (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? _calendar.default :
60
61
  // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
61
62
  _calendar2.default;
62
- var iconContainerStyles = (0, _react2.css)({
63
+ var iconContainerStyles = (0, _primitives.xcss)({
63
64
  display: 'flex',
64
65
  height: '100%',
65
66
  position: 'absolute',
66
67
  alignItems: 'center',
67
68
  flexBasis: 'inherit',
68
- color: "var(--ds-text-subtlest, ".concat(_colors.N70, ")"),
69
- insetBlockStart: 0,
70
- insetInlineEnd: 0,
69
+ color: 'color.text.subtlest',
70
+ insetBlockStart: 'space.0',
71
+ insetInlineEnd: 'space.0',
71
72
  transition: "color 150ms",
72
- '&:hover': {
73
- color: "var(--ds-text-subtle, ".concat(_colors.N500, ")")
73
+ ':hover': {
74
+ color: 'color.text.subtle'
74
75
  }
75
76
  });
76
- var iconSpacingWithClearButtonStyles = (0, _react2.css)({
77
- marginInlineEnd: "var(--ds-space-400, 2rem)"
77
+ var iconSpacingWithClearButtonStyles = (0, _primitives.xcss)({
78
+ marginInlineEnd: 'space.400'
78
79
  });
79
- var iconSpacingWithoutClearButtonStylesNew = (0, _react2.css)({
80
- marginInlineEnd: "var(--ds-space-050, 0.25rem)"
80
+ var iconSpacingWithoutClearButtonStylesNew = (0, _primitives.xcss)({
81
+ marginInlineEnd: 'space.050'
81
82
  });
82
- var iconSpacingWithoutClearButtonStyles = (0, _react2.css)({
83
- marginInlineEnd: "var(--ds-space-025, 0.125rem)"
83
+ var iconSpacingWithoutClearButtonStyles = (0, _primitives.xcss)({
84
+ marginInlineEnd: 'space.025'
84
85
  });
85
86
  var calendarButtonFixedSizeStyles = (0, _primitives.xcss)({
86
87
  width: "".concat(32 / 14, "em"),
@@ -478,7 +479,7 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
478
479
  var showClearIndicator = Boolean((getterValue || selectInputValue) && !hideIcon);
479
480
  var clearIndicator = Icon;
480
481
 
481
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning
482
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
482
483
  if ((0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration')) {
483
484
  clearIndicator = function clearIndicator(props) {
484
485
  return (0, _react2.jsx)(_primitives.Box, {
@@ -553,17 +554,19 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
553
554
  var openCalendarLabelId = "open-calendar-label--".concat((0, _useId.useId)());
554
555
  return (
555
556
  // These event handlers must be on this element because the events come
556
- // from different child elements.
557
+ // from different child elements. Cannot use Box primtive until we remove ...innerProps
557
558
  (0, _react2.jsx)("div", (0, _extends2.default)({}, innerProps, {
558
559
  css: pickerContainerStyles,
559
- role: "presentation",
560
+ "data-testid": testId && "".concat(testId, "--container"),
560
561
  onBlur: onContainerBlur,
561
562
  onFocus: onContainerFocus,
562
563
  onClick: onInputClick,
563
564
  onInput: onTextInput,
564
565
  onKeyDown: onInputKeyDown,
565
- ref: getContainerRef,
566
- "data-testid": testId && "".concat(testId, "--container")
566
+ ref: getContainerRef
567
+ // loophole role="presentation" as it solves the onclick, onfocus, etc. typecheck errors
568
+ ,
569
+ role: "presentation"
567
570
  }), (0, _react2.jsx)("input", {
568
571
  name: name,
569
572
  type: "hidden",
@@ -597,7 +600,9 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
597
600
  placeholder: (0, _datePickerMigration.getPlaceholder)({
598
601
  placeholder: placeholder,
599
602
  l10n: l10n
600
- }),
603
+ })
604
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
605
+ ,
601
606
  styles: mergedStyles,
602
607
  value: initialValue
603
608
  }, selectProps, {
@@ -625,8 +630,10 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
625
630
  onCalendarSelect: calendarProps.onCalendarSelect,
626
631
  previousMonthLabel: previousMonthLabel,
627
632
  shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay
628
- })), shouldShowCalendarButton && !isDisabled ? (0, _react2.jsx)("div", {
629
- css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? iconSpacingWithoutClearButtonStylesNew : iconSpacingWithoutClearButtonStyles]
633
+ })), shouldShowCalendarButton && !isDisabled ? (0, _react2.jsx)(_primitives.Box, {
634
+ xcss: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles :
635
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
636
+ (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? iconSpacingWithoutClearButtonStylesNew : iconSpacingWithoutClearButtonStyles]
630
637
  }, inputLabelId && (0, _react2.jsx)(_visuallyHidden.default, {
631
638
  id: openCalendarLabelId
632
639
  }, ", ", openCalendarLabel), (0, _react2.jsx)(_primitives.Pressable, (0, _extends2.default)({}, inputLabelId ? {
@@ -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.7.1";
41
+ var packageVersion = "15.8.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)({
@@ -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.7.1";
40
+ var packageVersion = "15.8.0";
41
41
  var analyticsAttributes = {
42
42
  componentName: 'dateTimePicker',
43
43
  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 = "15.7.1";
30
+ var packageVersion = "15.8.0";
31
31
  var menuStyles = {
32
32
  /* Need to remove default absolute positioning as that causes issues with position fixed */
33
33
  position: 'static',
@@ -26,7 +26,7 @@ import { Menu } from '../internal/menu';
26
26
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
27
27
  import { makeSingleValue } from '../internal/single-value';
28
28
  const packageName = "@atlaskit/datetime-picker";
29
- const packageVersion = "15.7.1";
29
+ const packageVersion = "15.8.0";
30
30
  const dropdownIndicatorStyles = xcss({
31
31
  minWidth: "var(--ds-space-300, 24px)",
32
32
  minHeight: "var(--ds-space-300, 24px)",
@@ -16,7 +16,6 @@ import { createLocalizationProvider } from '@atlaskit/locale';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
17
  import { Box, Pressable, xcss } from '@atlaskit/primitives';
18
18
  import Select, { mergeStyles } from '@atlaskit/select';
19
- import { N500, N70 } from '@atlaskit/theme/colors';
20
19
  import VisuallyHidden from '@atlaskit/visually-hidden';
21
20
  import { EmptyComponent } from '../internal';
22
21
  import { formatDate, getParsedISO, getPlaceholder, isDateDisabled, parseDate } from '../internal/date-picker-migration';
@@ -25,7 +24,7 @@ import { Menu } from '../internal/menu';
25
24
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
26
25
  import { makeSingleValue } from '../internal/single-value';
27
26
  const packageName = "@atlaskit/datetime-picker";
28
- const packageVersion = "15.7.1";
27
+ const packageVersion = "15.8.0";
29
28
  const analyticsAttributes = {
30
29
  componentName: 'datePicker',
31
30
  packageName,
@@ -41,31 +40,33 @@ const dropdownIndicatorStyles = xcss({
41
40
  alignItems: 'center',
42
41
  justifyContent: 'center'
43
42
  });
43
+
44
+ // eslint-disable-next-line @atlaskit/platform/no-module-level-eval, @atlaskit/platform/ensure-feature-flag-prefix
44
45
  const CalendarIcon = fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
45
46
  // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
46
47
  CalendarIconOld;
47
- const iconContainerStyles = css({
48
+ const iconContainerStyles = xcss({
48
49
  display: 'flex',
49
50
  height: '100%',
50
51
  position: 'absolute',
51
52
  alignItems: 'center',
52
53
  flexBasis: 'inherit',
53
- color: `var(--ds-text-subtlest, ${N70})`,
54
- insetBlockStart: 0,
55
- insetInlineEnd: 0,
54
+ color: 'color.text.subtlest',
55
+ insetBlockStart: 'space.0',
56
+ insetInlineEnd: 'space.0',
56
57
  transition: `color 150ms`,
57
- '&:hover': {
58
- color: `var(--ds-text-subtle, ${N500})`
58
+ ':hover': {
59
+ color: 'color.text.subtle'
59
60
  }
60
61
  });
61
- const iconSpacingWithClearButtonStyles = css({
62
- marginInlineEnd: "var(--ds-space-400, 2rem)"
62
+ const iconSpacingWithClearButtonStyles = xcss({
63
+ marginInlineEnd: 'space.400'
63
64
  });
64
- const iconSpacingWithoutClearButtonStylesNew = css({
65
- marginInlineEnd: "var(--ds-space-050, 0.25rem)"
65
+ const iconSpacingWithoutClearButtonStylesNew = xcss({
66
+ marginInlineEnd: 'space.050'
66
67
  });
67
- const iconSpacingWithoutClearButtonStyles = css({
68
- marginInlineEnd: "var(--ds-space-025, 0.125rem)"
68
+ const iconSpacingWithoutClearButtonStyles = xcss({
69
+ marginInlineEnd: 'space.025'
69
70
  });
70
71
  const calendarButtonFixedSizeStyles = xcss({
71
72
  width: `${32 / 14}em`,
@@ -404,7 +405,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
404
405
  const showClearIndicator = Boolean((getterValue || selectInputValue) && !hideIcon);
405
406
  let clearIndicator = Icon;
406
407
 
407
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning
408
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
408
409
  if (fg('platform-visual-refresh-icons') && fg('platform-visual-refresh-icon-ads-migration')) {
409
410
  clearIndicator = props => jsx(Box, {
410
411
  xcss: dropdownIndicatorStyles
@@ -479,17 +480,19 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
479
480
  const openCalendarLabelId = `open-calendar-label--${useId()}`;
480
481
  return (
481
482
  // These event handlers must be on this element because the events come
482
- // from different child elements.
483
+ // from different child elements. Cannot use Box primtive until we remove ...innerProps
483
484
  jsx("div", _extends({}, innerProps, {
484
485
  css: pickerContainerStyles,
485
- role: "presentation",
486
+ "data-testid": testId && `${testId}--container`,
486
487
  onBlur: onContainerBlur,
487
488
  onFocus: onContainerFocus,
488
489
  onClick: onInputClick,
489
490
  onInput: onTextInput,
490
491
  onKeyDown: onInputKeyDown,
491
- ref: getContainerRef,
492
- "data-testid": testId && `${testId}--container`
492
+ ref: getContainerRef
493
+ // loophole role="presentation" as it solves the onclick, onfocus, etc. typecheck errors
494
+ ,
495
+ role: "presentation"
493
496
  }), jsx("input", {
494
497
  name: name,
495
498
  type: "hidden",
@@ -523,7 +526,9 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
523
526
  placeholder: getPlaceholder({
524
527
  placeholder: placeholder,
525
528
  l10n: l10n
526
- }),
529
+ })
530
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
531
+ ,
527
532
  styles: mergedStyles,
528
533
  value: initialValue
529
534
  }, selectProps, {
@@ -551,8 +556,10 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
551
556
  onCalendarSelect: calendarProps.onCalendarSelect,
552
557
  previousMonthLabel: previousMonthLabel,
553
558
  shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay
554
- })), shouldShowCalendarButton && !isDisabled ? jsx("div", {
555
- css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : fg('platform-visual-refresh-icon-ads-migration') ? iconSpacingWithoutClearButtonStylesNew : iconSpacingWithoutClearButtonStyles]
559
+ })), shouldShowCalendarButton && !isDisabled ? jsx(Box, {
560
+ xcss: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles :
561
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
562
+ fg('platform-visual-refresh-icon-ads-migration') ? iconSpacingWithoutClearButtonStylesNew : iconSpacingWithoutClearButtonStyles]
556
563
  }, inputLabelId && jsx(VisuallyHidden, {
557
564
  id: openCalendarLabelId
558
565
  }, ", ", openCalendarLabel), jsx(Pressable, _extends({}, inputLabelId ? {
@@ -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.7.1";
25
+ const packageVersion = "15.8.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({
@@ -21,7 +21,7 @@ import DatePickerNew from './date-picker-fc';
21
21
  import TimePicker from './time-picker';
22
22
  const DatePicker = componentWithCondition(() => fg('dst-date-picker-use-functional-component'), DatePickerNew, DatePickerOld);
23
23
  const packageName = "@atlaskit/datetime-picker";
24
- const packageVersion = "15.7.1";
24
+ const packageVersion = "15.8.0";
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 = "15.7.1";
14
+ const packageVersion = "15.8.0";
15
15
  const menuStyles = {
16
16
  /* Need to remove default absolute positioning as that causes issues with position fixed */
17
17
  position: 'static',
@@ -36,7 +36,7 @@ import { Menu } from '../internal/menu';
36
36
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
37
37
  import { makeSingleValue } from '../internal/single-value';
38
38
  var packageName = "@atlaskit/datetime-picker";
39
- var packageVersion = "15.7.1";
39
+ var packageVersion = "15.8.0";
40
40
  var dropdownIndicatorStyles = xcss({
41
41
  minWidth: "var(--ds-space-300, 24px)",
42
42
  minHeight: "var(--ds-space-300, 24px)",
@@ -22,7 +22,6 @@ import { createLocalizationProvider } from '@atlaskit/locale';
22
22
  import { fg } from '@atlaskit/platform-feature-flags';
23
23
  import { Box, Pressable, xcss } from '@atlaskit/primitives';
24
24
  import Select, { mergeStyles } from '@atlaskit/select';
25
- import { N500, N70 } from '@atlaskit/theme/colors';
26
25
  import VisuallyHidden from '@atlaskit/visually-hidden';
27
26
  import { EmptyComponent } from '../internal';
28
27
  import { formatDate, getParsedISO, getPlaceholder, isDateDisabled, parseDate } from '../internal/date-picker-migration';
@@ -31,7 +30,7 @@ import { Menu } from '../internal/menu';
31
30
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
32
31
  import { makeSingleValue } from '../internal/single-value';
33
32
  var packageName = "@atlaskit/datetime-picker";
34
- var packageVersion = "15.7.1";
33
+ var packageVersion = "15.8.0";
35
34
  var analyticsAttributes = {
36
35
  componentName: 'datePicker',
37
36
  packageName: packageName,
@@ -47,31 +46,33 @@ var dropdownIndicatorStyles = xcss({
47
46
  alignItems: 'center',
48
47
  justifyContent: 'center'
49
48
  });
49
+
50
+ // eslint-disable-next-line @atlaskit/platform/no-module-level-eval, @atlaskit/platform/ensure-feature-flag-prefix
50
51
  var CalendarIcon = fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
51
52
  // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
52
53
  CalendarIconOld;
53
- var iconContainerStyles = css({
54
+ var iconContainerStyles = xcss({
54
55
  display: 'flex',
55
56
  height: '100%',
56
57
  position: 'absolute',
57
58
  alignItems: 'center',
58
59
  flexBasis: 'inherit',
59
- color: "var(--ds-text-subtlest, ".concat(N70, ")"),
60
- insetBlockStart: 0,
61
- insetInlineEnd: 0,
60
+ color: 'color.text.subtlest',
61
+ insetBlockStart: 'space.0',
62
+ insetInlineEnd: 'space.0',
62
63
  transition: "color 150ms",
63
- '&:hover': {
64
- color: "var(--ds-text-subtle, ".concat(N500, ")")
64
+ ':hover': {
65
+ color: 'color.text.subtle'
65
66
  }
66
67
  });
67
- var iconSpacingWithClearButtonStyles = css({
68
- marginInlineEnd: "var(--ds-space-400, 2rem)"
68
+ var iconSpacingWithClearButtonStyles = xcss({
69
+ marginInlineEnd: 'space.400'
69
70
  });
70
- var iconSpacingWithoutClearButtonStylesNew = css({
71
- marginInlineEnd: "var(--ds-space-050, 0.25rem)"
71
+ var iconSpacingWithoutClearButtonStylesNew = xcss({
72
+ marginInlineEnd: 'space.050'
72
73
  });
73
- var iconSpacingWithoutClearButtonStyles = css({
74
- marginInlineEnd: "var(--ds-space-025, 0.125rem)"
74
+ var iconSpacingWithoutClearButtonStyles = xcss({
75
+ marginInlineEnd: 'space.025'
75
76
  });
76
77
  var calendarButtonFixedSizeStyles = xcss({
77
78
  width: "".concat(32 / 14, "em"),
@@ -469,7 +470,7 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
469
470
  var showClearIndicator = Boolean((getterValue || selectInputValue) && !hideIcon);
470
471
  var clearIndicator = Icon;
471
472
 
472
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning
473
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
473
474
  if (fg('platform-visual-refresh-icons') && fg('platform-visual-refresh-icon-ads-migration')) {
474
475
  clearIndicator = function clearIndicator(props) {
475
476
  return jsx(Box, {
@@ -544,17 +545,19 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
544
545
  var openCalendarLabelId = "open-calendar-label--".concat(useId());
545
546
  return (
546
547
  // These event handlers must be on this element because the events come
547
- // from different child elements.
548
+ // from different child elements. Cannot use Box primtive until we remove ...innerProps
548
549
  jsx("div", _extends({}, innerProps, {
549
550
  css: pickerContainerStyles,
550
- role: "presentation",
551
+ "data-testid": testId && "".concat(testId, "--container"),
551
552
  onBlur: onContainerBlur,
552
553
  onFocus: onContainerFocus,
553
554
  onClick: onInputClick,
554
555
  onInput: onTextInput,
555
556
  onKeyDown: onInputKeyDown,
556
- ref: getContainerRef,
557
- "data-testid": testId && "".concat(testId, "--container")
557
+ ref: getContainerRef
558
+ // loophole role="presentation" as it solves the onclick, onfocus, etc. typecheck errors
559
+ ,
560
+ role: "presentation"
558
561
  }), jsx("input", {
559
562
  name: name,
560
563
  type: "hidden",
@@ -588,7 +591,9 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
588
591
  placeholder: getPlaceholder({
589
592
  placeholder: placeholder,
590
593
  l10n: l10n
591
- }),
594
+ })
595
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
596
+ ,
592
597
  styles: mergedStyles,
593
598
  value: initialValue
594
599
  }, selectProps, {
@@ -616,8 +621,10 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
616
621
  onCalendarSelect: calendarProps.onCalendarSelect,
617
622
  previousMonthLabel: previousMonthLabel,
618
623
  shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay
619
- })), shouldShowCalendarButton && !isDisabled ? jsx("div", {
620
- css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : fg('platform-visual-refresh-icon-ads-migration') ? iconSpacingWithoutClearButtonStylesNew : iconSpacingWithoutClearButtonStyles]
624
+ })), shouldShowCalendarButton && !isDisabled ? jsx(Box, {
625
+ xcss: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles :
626
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
627
+ fg('platform-visual-refresh-icon-ads-migration') ? iconSpacingWithoutClearButtonStylesNew : iconSpacingWithoutClearButtonStyles]
621
628
  }, inputLabelId && jsx(VisuallyHidden, {
622
629
  id: openCalendarLabelId
623
630
  }, ", ", openCalendarLabel), jsx(Pressable, _extends({}, inputLabelId ? {
@@ -34,7 +34,7 @@ var DatePicker = componentWithCondition(function () {
34
34
  return fg('dst-date-picker-use-functional-component');
35
35
  }, DatePickerNew, DatePickerOld);
36
36
  var packageName = "@atlaskit/datetime-picker";
37
- var packageVersion = "15.7.1";
37
+ var packageVersion = "15.8.0";
38
38
  // Make DatePicker 50% the width of DateTimePicker
39
39
  // If rendering an icon container, shrink the TimePicker
40
40
  var datePickerContainerStyles = css({
@@ -30,7 +30,7 @@ var DatePicker = componentWithCondition(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 = "15.7.1";
33
+ var packageVersion = "15.8.0";
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 = "15.7.1";
20
+ var packageVersion = "15.8.0";
21
21
  var menuStyles = {
22
22
  /* Need to remove default absolute positioning as that causes issues with position fixed */
23
23
  position: 'static',
@@ -67,6 +67,7 @@ export interface DatePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
67
67
  /**
68
68
  * Set the `aria-label` for the clear button.
69
69
  * Add the word "Clear" at the beginning of the clearControlLabel.
70
+ * For instance, for a field to set an appointment, use "Clear appointment date and time".
70
71
  */
71
72
  clearControlLabel?: string;
72
73
  /**
@@ -277,6 +278,7 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
277
278
  /**
278
279
  * Set the `aria-label` for the clear button.
279
280
  * Add the word "Clear" at the beginning of the clearControlLabel.
281
+ * For instance, for a field to set an appointment, use "Clear appointment date and time".
280
282
  */
281
283
  clearControlLabel?: string;
282
284
  /**
@@ -409,6 +411,7 @@ export interface DateTimePickerBaseProps extends WithAnalyticsEventsProps {
409
411
  /**
410
412
  * Set the `aria-label` for the clear button.
411
413
  * Add the word "Clear" at the beginning of the clearControlLabel.
414
+ * For instance, for a field to set an appointment, use "Clear appointment date and time".
412
415
  */
413
416
  clearControlLabel?: string;
414
417
  /**
@@ -67,6 +67,7 @@ export interface DatePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
67
67
  /**
68
68
  * Set the `aria-label` for the clear button.
69
69
  * Add the word "Clear" at the beginning of the clearControlLabel.
70
+ * For instance, for a field to set an appointment, use "Clear appointment date and time".
70
71
  */
71
72
  clearControlLabel?: string;
72
73
  /**
@@ -277,6 +278,7 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
277
278
  /**
278
279
  * Set the `aria-label` for the clear button.
279
280
  * Add the word "Clear" at the beginning of the clearControlLabel.
281
+ * For instance, for a field to set an appointment, use "Clear appointment date and time".
280
282
  */
281
283
  clearControlLabel?: string;
282
284
  /**
@@ -409,6 +411,7 @@ export interface DateTimePickerBaseProps extends WithAnalyticsEventsProps {
409
411
  /**
410
412
  * Set the `aria-label` for the clear button.
411
413
  * Add the word "Clear" at the beginning of the clearControlLabel.
414
+ * For instance, for a field to set an appointment, use "Clear appointment date and time".
412
415
  */
413
416
  clearControlLabel?: string;
414
417
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "15.7.1",
3
+ "version": "15.8.0",
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/"
@@ -44,9 +44,9 @@
44
44
  "@atlaskit/platform-feature-flags": "^0.3.0",
45
45
  "@atlaskit/popper": "^6.3.0",
46
46
  "@atlaskit/primitives": "^13.0.0",
47
- "@atlaskit/select": "^18.4.0",
47
+ "@atlaskit/select": "^18.5.0",
48
48
  "@atlaskit/theme": "^14.0.0",
49
- "@atlaskit/tokens": "^2.0.0",
49
+ "@atlaskit/tokens": "^2.2.0",
50
50
  "@atlaskit/visually-hidden": "^1.5.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "@emotion/react": "^11.7.1",