@atlaskit/datetime-picker 15.10.3 → 15.10.5

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 (29) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/components/date-picker-class.js +6 -8
  3. package/dist/cjs/components/date-picker-fc.js +4 -6
  4. package/dist/cjs/components/date-time-picker-class.js +1 -1
  5. package/dist/cjs/components/date-time-picker-fc.js +1 -1
  6. package/dist/cjs/components/time-picker.js +1 -1
  7. package/dist/cjs/internal/fixed-layer-menu.js +1 -5
  8. package/dist/cjs/internal/single-value.js +1 -5
  9. package/dist/es2019/components/date-picker-class.js +6 -8
  10. package/dist/es2019/components/date-picker-fc.js +4 -6
  11. package/dist/es2019/components/date-time-picker-class.js +1 -1
  12. package/dist/es2019/components/date-time-picker-fc.js +1 -1
  13. package/dist/es2019/components/time-picker.js +1 -1
  14. package/dist/es2019/internal/fixed-layer-menu.js +0 -4
  15. package/dist/es2019/internal/single-value.js +0 -4
  16. package/dist/esm/components/date-picker-class.js +6 -8
  17. package/dist/esm/components/date-picker-fc.js +4 -6
  18. package/dist/esm/components/date-time-picker-class.js +1 -1
  19. package/dist/esm/components/date-time-picker-fc.js +1 -1
  20. package/dist/esm/components/time-picker.js +1 -1
  21. package/dist/esm/internal/fixed-layer-menu.js +1 -5
  22. package/dist/esm/internal/single-value.js +1 -5
  23. package/dist/types/components/date-picker-class.d.ts +5 -0
  24. package/dist/types/internal/fixed-layer-menu.d.ts +1 -1
  25. package/dist/types/internal/single-value.d.ts +1 -1
  26. package/dist/types-ts4.5/components/date-picker-class.d.ts +5 -0
  27. package/dist/types-ts4.5/internal/fixed-layer-menu.d.ts +1 -1
  28. package/dist/types-ts4.5/internal/single-value.d.ts +1 -1
  29. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/datetime-picker
2
2
 
3
+ ## 15.10.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#178643](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/178643)
8
+ [`598b1dc3753cc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/598b1dc3753cc) -
9
+ Fix instances of module level FG evaluation
10
+ - Updated dependencies
11
+
12
+ ## 15.10.4
13
+
14
+ ### Patch Changes
15
+
16
+ - [#177875](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/177875)
17
+ [`d0c3d27216b7c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d0c3d27216b7c) -
18
+ Clean up props for select new improvement on theme and customized components
19
+ - Updated dependencies
20
+
3
21
  ## 15.10.3
4
22
 
5
23
  ### Patch Changes
@@ -41,7 +41,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
41
41
  * @jsx jsx
42
42
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
43
43
  var packageName = "@atlaskit/datetime-picker";
44
- var packageVersion = "15.10.3";
44
+ var packageVersion = "15.10.5";
45
45
  var dropdownIndicatorStyles = (0, _primitives.xcss)({
46
46
  minWidth: "var(--ds-space-300, 24px)",
47
47
  minHeight: "var(--ds-space-300, 24px)",
@@ -49,11 +49,6 @@ var dropdownIndicatorStyles = (0, _primitives.xcss)({
49
49
  alignItems: 'center',
50
50
  justifyContent: 'center'
51
51
  });
52
-
53
- // eslint-disable-next-line @atlaskit/platform/no-module-level-eval
54
- var CalendarIcon = (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? _calendar.default :
55
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
56
- _calendar2.default;
57
52
  var datePickerDefaultProps = {
58
53
  defaultIsOpen: false,
59
54
  defaultValue: '',
@@ -109,6 +104,9 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
109
104
  (0, _defineProperty2.default)(_this, "containerRef", null);
110
105
  (0, _defineProperty2.default)(_this, "calendarRef", /*#__PURE__*/(0, _react.createRef)());
111
106
  (0, _defineProperty2.default)(_this, "calendarButtonRef", /*#__PURE__*/(0, _react.createRef)());
107
+ (0, _defineProperty2.default)(_this, "CalendarIcon", (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? _calendar.default :
108
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
109
+ _calendar2.default);
112
110
  // All state needs to be accessed via this function so that the state is mapped from props
113
111
  // correctly to allow controlled/uncontrolled usage.
114
112
  (0, _defineProperty2.default)(_this, "getValue", function () {
@@ -439,7 +437,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
439
437
  disabled = _this$props.disabled,
440
438
  disabledDateFilter = _this$props.disabledDateFilter,
441
439
  _this$props$icon = _this$props.icon,
442
- Icon = _this$props$icon === void 0 ? CalendarIcon : _this$props$icon,
440
+ Icon = _this$props$icon === void 0 ? this.CalendarIcon : _this$props$icon,
443
441
  _this$props$id = _this$props.id,
444
442
  id = _this$props$id === void 0 ? '' : _this$props$id,
445
443
  _this$props$innerProp = _this$props.innerProps,
@@ -642,7 +640,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
642
640
  "aria-labelledby": inputLabelId ? "".concat(inputLabelId, " ").concat(openCalendarLabelId) : undefined,
643
641
  id: openCalendarLabelId,
644
642
  icon: function icon(iconProps) {
645
- return (0, _react2.jsx)(CalendarIcon, (0, _extends2.default)({}, iconProps, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? {
643
+ return (0, _react2.jsx)(_this2.CalendarIcon, (0, _extends2.default)({}, iconProps, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? {
646
644
  color: "var(--ds-icon, #44546F)"
647
645
  } : {
648
646
  primaryColor: "var(--ds-icon, #44546F)"
@@ -39,7 +39,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
39
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; }
40
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; }
41
41
  var packageName = "@atlaskit/datetime-picker";
42
- var packageVersion = "15.10.3";
42
+ var packageVersion = "15.10.5";
43
43
  var analyticsAttributes = {
44
44
  componentName: 'datePicker',
45
45
  packageName: packageName,
@@ -55,11 +55,6 @@ var dropdownIndicatorStyles = (0, _primitives.xcss)({
55
55
  alignItems: 'center',
56
56
  justifyContent: 'center'
57
57
  });
58
-
59
- // eslint-disable-next-line @atlaskit/platform/no-module-level-eval, @atlaskit/platform/ensure-feature-flag-prefix
60
- var CalendarIcon = (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? _calendar.default :
61
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
62
- _calendar2.default;
63
58
  var iconContainerStyles = (0, _primitives.xcss)({
64
59
  display: 'flex',
65
60
  height: '100%',
@@ -96,6 +91,9 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
96
91
  var containerRef = (0, _react.useRef)(null);
97
92
  var calendarRef = (0, _react.useRef)(null);
98
93
  var calendarButtonRef = (0, _react.useRef)(null);
94
+ var CalendarIcon = (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? _calendar.default :
95
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
96
+ _calendar2.default;
99
97
  var _props$appearance = props.appearance,
100
98
  appearance = _props$appearance === void 0 ? 'default' : _props$appearance,
101
99
  _props$autoFocus = props.autoFocus,
@@ -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.10.3";
40
+ var packageVersion = "15.10.5";
41
41
  // Make DatePicker 50% the width of DateTimePicker
42
42
  // If rendering an icon container, shrink the TimePicker
43
43
  var datePickerContainerStyles = (0, _react2.css)({
@@ -37,7 +37,7 @@ 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.10.3";
40
+ var packageVersion = "15.10.5";
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.10.3";
30
+ var packageVersion = "15.10.5";
31
31
  var menuStyles = {
32
32
  /* Need to remove default absolute positioning as that causes issues with position fixed */
33
33
  position: 'static',
@@ -10,7 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
10
10
  var _react = require("@emotion/react");
11
11
  var _select = require("@atlaskit/select");
12
12
  var _fixedLayer = _interopRequireDefault(require("../internal/fixed-layer"));
13
- var _excluded = ["className", "clearValue", "cx", "getStyles", "getValue", "hasValue", "innerProps", "innerRef", "isLoading", "isMulti", "isRtl", "maxMenuHeight", "menuPlacement", "menuPosition", "menuShouldScrollIntoView", "minMenuHeight", "options", "placement", "selectOption", "selectProps", "setValue", "theme", "children"];
13
+ var _excluded = ["className", "clearValue", "cx", "getStyles", "getValue", "hasValue", "innerProps", "innerRef", "isLoading", "isMulti", "isRtl", "maxMenuHeight", "menuPlacement", "menuPosition", "menuShouldScrollIntoView", "minMenuHeight", "options", "placement", "selectOption", "selectProps", "setValue", "children"];
14
14
  /**
15
15
  * @jsxRuntime classic
16
16
  * @jsx jsx
@@ -41,7 +41,6 @@ var FixedLayerMenu = exports.FixedLayerMenu = function FixedLayerMenu(_ref) {
41
41
  selectOption = _ref.selectOption,
42
42
  selectProps = _ref.selectProps,
43
43
  setValue = _ref.setValue,
44
- theme = _ref.theme,
45
44
  children = _ref.children,
46
45
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
47
46
  return (0, _react.jsx)(_fixedLayer.default, {
@@ -72,9 +71,6 @@ var FixedLayerMenu = exports.FixedLayerMenu = function FixedLayerMenu(_ref) {
72
71
  selectOption: selectOption,
73
72
  selectProps: selectProps,
74
73
  setValue: setValue
75
- // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
76
- ,
77
- theme: theme
78
74
  }), children)
79
75
  //@ts-ignore react-select unsupported props
80
76
  ,
@@ -9,7 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _select = require("@atlaskit/select");
12
- var _excluded = ["children", "className", "clearValue", "cx", "data", "getStyles", "getValue", "hasValue", "isDisabled", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
12
+ var _excluded = ["children", "className", "clearValue", "cx", "data", "getStyles", "getValue", "hasValue", "isDisabled", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue"];
13
13
  /**
14
14
  * This creates a functional component that `react-select` will use to make the
15
15
  * SingleValue part of the different pickers.
@@ -32,7 +32,6 @@ var makeSingleValue = exports.makeSingleValue = function makeSingleValue(_ref) {
32
32
  selectOption = _ref2.selectOption,
33
33
  selectProps = _ref2.selectProps,
34
34
  setValue = _ref2.setValue,
35
- theme = _ref2.theme,
36
35
  rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
37
36
  return /*#__PURE__*/_react.default.createElement(_select.components.SingleValue, (0, _extends2.default)({}, rest, {
38
37
  // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides, @atlaskit/ui-styling-standard/no-classname-prop
@@ -53,9 +52,6 @@ var makeSingleValue = exports.makeSingleValue = function makeSingleValue(_ref) {
53
52
  selectOption: selectOption,
54
53
  selectProps: selectProps,
55
54
  setValue: setValue
56
- // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
57
- ,
58
- theme: theme
59
55
  }), children);
60
56
  };
61
57
  };
@@ -25,7 +25,7 @@ import { Menu } from '../internal/menu';
25
25
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
26
26
  import { makeSingleValue } from '../internal/single-value';
27
27
  const packageName = "@atlaskit/datetime-picker";
28
- const packageVersion = "15.10.3";
28
+ const packageVersion = "15.10.5";
29
29
  const dropdownIndicatorStyles = xcss({
30
30
  minWidth: "var(--ds-space-300, 24px)",
31
31
  minHeight: "var(--ds-space-300, 24px)",
@@ -33,11 +33,6 @@ const dropdownIndicatorStyles = xcss({
33
33
  alignItems: 'center',
34
34
  justifyContent: 'center'
35
35
  });
36
-
37
- // eslint-disable-next-line @atlaskit/platform/no-module-level-eval
38
- const CalendarIcon = fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
39
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
40
- CalendarIconOld;
41
36
  const datePickerDefaultProps = {
42
37
  defaultIsOpen: false,
43
38
  defaultValue: '',
@@ -89,6 +84,9 @@ class DatePickerComponent extends Component {
89
84
  _defineProperty(this, "containerRef", null);
90
85
  _defineProperty(this, "calendarRef", /*#__PURE__*/createRef());
91
86
  _defineProperty(this, "calendarButtonRef", /*#__PURE__*/createRef());
87
+ _defineProperty(this, "CalendarIcon", fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
88
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
89
+ CalendarIconOld);
92
90
  // All state needs to be accessed via this function so that the state is mapped from props
93
91
  // correctly to allow controlled/uncontrolled usage.
94
92
  _defineProperty(this, "getValue", () => {
@@ -425,7 +423,7 @@ class DatePickerComponent extends Component {
425
423
  openCalendarLabel = 'Open calendar',
426
424
  disabled,
427
425
  disabledDateFilter,
428
- icon: Icon = CalendarIcon,
426
+ icon: Icon = this.CalendarIcon,
429
427
  id = '',
430
428
  innerProps = {},
431
429
  inputLabel = 'Date picker',
@@ -619,7 +617,7 @@ class DatePickerComponent extends Component {
619
617
  label: !inputLabelId ? fullopenCalendarLabel : openCalendarLabel,
620
618
  "aria-labelledby": inputLabelId ? `${inputLabelId} ${openCalendarLabelId}` : undefined,
621
619
  id: openCalendarLabelId,
622
- icon: iconProps => jsx(CalendarIcon, _extends({}, iconProps, fg('platform-visual-refresh-icon-ads-migration') ? {
620
+ icon: iconProps => jsx(this.CalendarIcon, _extends({}, iconProps, fg('platform-visual-refresh-icon-ads-migration') ? {
623
621
  color: "var(--ds-icon, #44546F)"
624
622
  } : {
625
623
  primaryColor: "var(--ds-icon, #44546F)"
@@ -24,7 +24,7 @@ import { Menu } from '../internal/menu';
24
24
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
25
25
  import { makeSingleValue } from '../internal/single-value';
26
26
  const packageName = "@atlaskit/datetime-picker";
27
- const packageVersion = "15.10.3";
27
+ const packageVersion = "15.10.5";
28
28
  const analyticsAttributes = {
29
29
  componentName: 'datePicker',
30
30
  packageName,
@@ -40,11 +40,6 @@ const dropdownIndicatorStyles = xcss({
40
40
  alignItems: 'center',
41
41
  justifyContent: 'center'
42
42
  });
43
-
44
- // eslint-disable-next-line @atlaskit/platform/no-module-level-eval, @atlaskit/platform/ensure-feature-flag-prefix
45
- const CalendarIcon = fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
46
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
47
- CalendarIconOld;
48
43
  const iconContainerStyles = xcss({
49
44
  display: 'flex',
50
45
  height: '100%',
@@ -81,6 +76,9 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
81
76
  const containerRef = useRef(null);
82
77
  const calendarRef = useRef(null);
83
78
  const calendarButtonRef = useRef(null);
79
+ const CalendarIcon = fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
80
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
81
+ CalendarIconOld;
84
82
  const {
85
83
  appearance = 'default',
86
84
  autoFocus = false,
@@ -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.10.3";
25
+ const packageVersion = "15.10.5";
26
26
  // Make DatePicker 50% the width of DateTimePicker
27
27
  // If rendering an icon container, shrink the TimePicker
28
28
  const datePickerContainerStyles = css({
@@ -18,7 +18,7 @@ const DatePicker = componentWithCondition(
18
18
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
19
19
  () => fg('dst-date-picker-use-functional-component'), DatePickerNew, DatePickerOld);
20
20
  const packageName = "@atlaskit/datetime-picker";
21
- const packageVersion = "15.10.3";
21
+ const packageVersion = "15.10.5";
22
22
  const analyticsAttributes = {
23
23
  componentName: 'dateTimePicker',
24
24
  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.10.3";
14
+ const packageVersion = "15.10.5";
15
15
  const menuStyles = {
16
16
  /* Need to remove default absolute positioning as that causes issues with position fixed */
17
17
  position: 'static',
@@ -33,7 +33,6 @@ export const FixedLayerMenu = ({
33
33
  selectOption,
34
34
  selectProps,
35
35
  setValue,
36
- theme,
37
36
  children,
38
37
  ...rest
39
38
  }) => jsx(FixedLayer, {
@@ -64,9 +63,6 @@ export const FixedLayerMenu = ({
64
63
  selectOption: selectOption,
65
64
  selectProps: selectProps,
66
65
  setValue: setValue
67
- // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
68
- ,
69
- theme: theme
70
66
  }), children)
71
67
  //@ts-ignore react-select unsupported props
72
68
  ,
@@ -24,7 +24,6 @@ export const makeSingleValue = ({
24
24
  selectOption,
25
25
  selectProps,
26
26
  setValue,
27
- theme,
28
27
  ...rest
29
28
  }) => {
30
29
  return /*#__PURE__*/React.createElement(components.SingleValue, _extends({}, rest, {
@@ -46,8 +45,5 @@ export const makeSingleValue = ({
46
45
  selectOption: selectOption,
47
46
  selectProps: selectProps,
48
47
  setValue: setValue
49
- // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
50
- ,
51
- theme: theme
52
48
  }), children);
53
49
  };
@@ -34,7 +34,7 @@ import { Menu } from '../internal/menu';
34
34
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
35
35
  import { makeSingleValue } from '../internal/single-value';
36
36
  var packageName = "@atlaskit/datetime-picker";
37
- var packageVersion = "15.10.3";
37
+ var packageVersion = "15.10.5";
38
38
  var dropdownIndicatorStyles = xcss({
39
39
  minWidth: "var(--ds-space-300, 24px)",
40
40
  minHeight: "var(--ds-space-300, 24px)",
@@ -42,11 +42,6 @@ var dropdownIndicatorStyles = xcss({
42
42
  alignItems: 'center',
43
43
  justifyContent: 'center'
44
44
  });
45
-
46
- // eslint-disable-next-line @atlaskit/platform/no-module-level-eval
47
- var CalendarIcon = fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
48
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
49
- CalendarIconOld;
50
45
  var datePickerDefaultProps = {
51
46
  defaultIsOpen: false,
52
47
  defaultValue: '',
@@ -102,6 +97,9 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
102
97
  _defineProperty(_this, "containerRef", null);
103
98
  _defineProperty(_this, "calendarRef", /*#__PURE__*/createRef());
104
99
  _defineProperty(_this, "calendarButtonRef", /*#__PURE__*/createRef());
100
+ _defineProperty(_this, "CalendarIcon", fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
101
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
102
+ CalendarIconOld);
105
103
  // All state needs to be accessed via this function so that the state is mapped from props
106
104
  // correctly to allow controlled/uncontrolled usage.
107
105
  _defineProperty(_this, "getValue", function () {
@@ -432,7 +430,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
432
430
  disabled = _this$props.disabled,
433
431
  disabledDateFilter = _this$props.disabledDateFilter,
434
432
  _this$props$icon = _this$props.icon,
435
- Icon = _this$props$icon === void 0 ? CalendarIcon : _this$props$icon,
433
+ Icon = _this$props$icon === void 0 ? this.CalendarIcon : _this$props$icon,
436
434
  _this$props$id = _this$props.id,
437
435
  id = _this$props$id === void 0 ? '' : _this$props$id,
438
436
  _this$props$innerProp = _this$props.innerProps,
@@ -635,7 +633,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
635
633
  "aria-labelledby": inputLabelId ? "".concat(inputLabelId, " ").concat(openCalendarLabelId) : undefined,
636
634
  id: openCalendarLabelId,
637
635
  icon: function icon(iconProps) {
638
- return jsx(CalendarIcon, _extends({}, iconProps, fg('platform-visual-refresh-icon-ads-migration') ? {
636
+ return jsx(_this2.CalendarIcon, _extends({}, iconProps, fg('platform-visual-refresh-icon-ads-migration') ? {
639
637
  color: "var(--ds-icon, #44546F)"
640
638
  } : {
641
639
  primaryColor: "var(--ds-icon, #44546F)"
@@ -30,7 +30,7 @@ import { Menu } from '../internal/menu';
30
30
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
31
31
  import { makeSingleValue } from '../internal/single-value';
32
32
  var packageName = "@atlaskit/datetime-picker";
33
- var packageVersion = "15.10.3";
33
+ var packageVersion = "15.10.5";
34
34
  var analyticsAttributes = {
35
35
  componentName: 'datePicker',
36
36
  packageName: packageName,
@@ -46,11 +46,6 @@ var dropdownIndicatorStyles = xcss({
46
46
  alignItems: 'center',
47
47
  justifyContent: 'center'
48
48
  });
49
-
50
- // eslint-disable-next-line @atlaskit/platform/no-module-level-eval, @atlaskit/platform/ensure-feature-flag-prefix
51
- var CalendarIcon = fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
52
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
53
- CalendarIconOld;
54
49
  var iconContainerStyles = xcss({
55
50
  display: 'flex',
56
51
  height: '100%',
@@ -87,6 +82,9 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
87
82
  var containerRef = useRef(null);
88
83
  var calendarRef = useRef(null);
89
84
  var calendarButtonRef = useRef(null);
85
+ var CalendarIcon = fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
86
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
87
+ CalendarIconOld;
90
88
  var _props$appearance = props.appearance,
91
89
  appearance = _props$appearance === void 0 ? 'default' : _props$appearance,
92
90
  _props$autoFocus = props.autoFocus,
@@ -33,7 +33,7 @@ var DatePicker = componentWithCondition(function () {
33
33
  return fg('dst-date-picker-use-functional-component');
34
34
  }, DatePickerNew, DatePickerOld);
35
35
  var packageName = "@atlaskit/datetime-picker";
36
- var packageVersion = "15.10.3";
36
+ var packageVersion = "15.10.5";
37
37
  // Make DatePicker 50% the width of DateTimePicker
38
38
  // If rendering an icon container, shrink the TimePicker
39
39
  var datePickerContainerStyles = css({
@@ -27,7 +27,7 @@ function () {
27
27
  return fg('dst-date-picker-use-functional-component');
28
28
  }, DatePickerNew, DatePickerOld);
29
29
  var packageName = "@atlaskit/datetime-picker";
30
- var packageVersion = "15.10.3";
30
+ var packageVersion = "15.10.5";
31
31
  var analyticsAttributes = {
32
32
  componentName: 'dateTimePicker',
33
33
  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.10.3";
20
+ var packageVersion = "15.10.5";
21
21
  var menuStyles = {
22
22
  /* Need to remove default absolute positioning as that causes issues with position fixed */
23
23
  position: 'static',
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["className", "clearValue", "cx", "getStyles", "getValue", "hasValue", "innerProps", "innerRef", "isLoading", "isMulti", "isRtl", "maxMenuHeight", "menuPlacement", "menuPosition", "menuShouldScrollIntoView", "minMenuHeight", "options", "placement", "selectOption", "selectProps", "setValue", "theme", "children"];
3
+ var _excluded = ["className", "clearValue", "cx", "getStyles", "getValue", "hasValue", "innerProps", "innerRef", "isLoading", "isMulti", "isRtl", "maxMenuHeight", "menuPlacement", "menuPosition", "menuShouldScrollIntoView", "minMenuHeight", "options", "placement", "selectOption", "selectProps", "setValue", "children"];
4
4
  /**
5
5
  * @jsxRuntime classic
6
6
  * @jsx jsx
@@ -35,7 +35,6 @@ export var FixedLayerMenu = function FixedLayerMenu(_ref) {
35
35
  selectOption = _ref.selectOption,
36
36
  selectProps = _ref.selectProps,
37
37
  setValue = _ref.setValue,
38
- theme = _ref.theme,
39
38
  children = _ref.children,
40
39
  rest = _objectWithoutProperties(_ref, _excluded);
41
40
  return jsx(FixedLayer, {
@@ -66,9 +65,6 @@ export var FixedLayerMenu = function FixedLayerMenu(_ref) {
66
65
  selectOption: selectOption,
67
66
  selectProps: selectProps,
68
67
  setValue: setValue
69
- // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
70
- ,
71
- theme: theme
72
68
  }), children)
73
69
  //@ts-ignore react-select unsupported props
74
70
  ,
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "className", "clearValue", "cx", "data", "getStyles", "getValue", "hasValue", "isDisabled", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
3
+ var _excluded = ["children", "className", "clearValue", "cx", "data", "getStyles", "getValue", "hasValue", "isDisabled", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue"];
4
4
  import React from 'react';
5
5
  import { components } from '@atlaskit/select';
6
6
 
@@ -26,7 +26,6 @@ export var makeSingleValue = function makeSingleValue(_ref) {
26
26
  selectOption = _ref2.selectOption,
27
27
  selectProps = _ref2.selectProps,
28
28
  setValue = _ref2.setValue,
29
- theme = _ref2.theme,
30
29
  rest = _objectWithoutProperties(_ref2, _excluded);
31
30
  return /*#__PURE__*/React.createElement(components.SingleValue, _extends({}, rest, {
32
31
  // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides, @atlaskit/ui-styling-standard/no-classname-prop
@@ -47,9 +46,6 @@ export var makeSingleValue = function makeSingleValue(_ref) {
47
46
  selectOption: selectOption,
48
47
  selectProps: selectProps,
49
48
  setValue: setValue
50
- // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
51
- ,
52
- theme: theme
53
49
  }), children);
54
50
  };
55
51
  };
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import { Component } from 'react';
6
6
  import { jsx } from '@emotion/react';
7
+ import CalendarIconOld from '@atlaskit/icon/glyph/calendar';
7
8
  import { type LocalizationProvider } from '@atlaskit/locale';
8
9
  import { type ActionMeta, type InputActionMeta } from '@atlaskit/select';
9
10
  import { type DatePickerBaseProps } from '../types';
@@ -50,6 +51,10 @@ declare class DatePickerComponent extends Component<DatePickerProps, State> {
50
51
  containerRef: HTMLElement | null;
51
52
  calendarRef: React.RefObject<HTMLDivElement | null>;
52
53
  calendarButtonRef: React.RefObject<HTMLButtonElement>;
54
+ CalendarIcon: {
55
+ (props: Omit<import("@atlaskit/icon").NewCoreIconProps, "LEGACY_fallbackIcon">): JSX.Element;
56
+ displayName: string;
57
+ } | typeof CalendarIconOld;
53
58
  constructor(props: any);
54
59
  static getDerivedStateFromProps(nextProps: Readonly<DatePickerProps>, prevState: State): {
55
60
  l10n: LocalizationProvider;
@@ -7,4 +7,4 @@ import { type MenuProps, type OptionType } from '@atlaskit/select';
7
7
  /**
8
8
  * This is the fixed layer menu used in the time picker.
9
9
  */
10
- export declare const FixedLayerMenu: ({ className, clearValue, cx, getStyles, getValue, hasValue, innerProps, innerRef, isLoading, isMulti, isRtl, maxMenuHeight, menuPlacement, menuPosition, menuShouldScrollIntoView, minMenuHeight, options, placement, selectOption, selectProps, setValue, theme, children, ...rest }: MenuProps<OptionType>) => jsx.JSX.Element;
10
+ export declare const FixedLayerMenu: ({ className, clearValue, cx, getStyles, getValue, hasValue, innerProps, innerRef, isLoading, isMulti, isRtl, maxMenuHeight, menuPlacement, menuPosition, menuShouldScrollIntoView, minMenuHeight, options, placement, selectOption, selectProps, setValue, children, ...rest }: MenuProps<OptionType>) => jsx.JSX.Element;
@@ -6,4 +6,4 @@ import { type OptionType, type SingleValueProps } from '@atlaskit/select';
6
6
  */
7
7
  export declare const makeSingleValue: ({ lang }: {
8
8
  lang: string;
9
- }) => ({ children, className, clearValue, cx, data, getStyles, getValue, hasValue, isDisabled, isMulti, isRtl, options, selectOption, selectProps, setValue, theme, ...rest }: SingleValueProps<OptionType, false>) => JSX.Element;
9
+ }) => ({ children, className, clearValue, cx, data, getStyles, getValue, hasValue, isDisabled, isMulti, isRtl, options, selectOption, selectProps, setValue, ...rest }: SingleValueProps<OptionType, false>) => JSX.Element;
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import { Component } from 'react';
6
6
  import { jsx } from '@emotion/react';
7
+ import CalendarIconOld from '@atlaskit/icon/glyph/calendar';
7
8
  import { type LocalizationProvider } from '@atlaskit/locale';
8
9
  import { type ActionMeta, type InputActionMeta } from '@atlaskit/select';
9
10
  import { type DatePickerBaseProps } from '../types';
@@ -50,6 +51,10 @@ declare class DatePickerComponent extends Component<DatePickerProps, State> {
50
51
  containerRef: HTMLElement | null;
51
52
  calendarRef: React.RefObject<HTMLDivElement | null>;
52
53
  calendarButtonRef: React.RefObject<HTMLButtonElement>;
54
+ CalendarIcon: {
55
+ (props: Omit<import("@atlaskit/icon").NewCoreIconProps, "LEGACY_fallbackIcon">): JSX.Element;
56
+ displayName: string;
57
+ } | typeof CalendarIconOld;
53
58
  constructor(props: any);
54
59
  static getDerivedStateFromProps(nextProps: Readonly<DatePickerProps>, prevState: State): {
55
60
  l10n: LocalizationProvider;
@@ -7,4 +7,4 @@ import { type MenuProps, type OptionType } from '@atlaskit/select';
7
7
  /**
8
8
  * This is the fixed layer menu used in the time picker.
9
9
  */
10
- export declare const FixedLayerMenu: ({ className, clearValue, cx, getStyles, getValue, hasValue, innerProps, innerRef, isLoading, isMulti, isRtl, maxMenuHeight, menuPlacement, menuPosition, menuShouldScrollIntoView, minMenuHeight, options, placement, selectOption, selectProps, setValue, theme, children, ...rest }: MenuProps<OptionType>) => jsx.JSX.Element;
10
+ export declare const FixedLayerMenu: ({ className, clearValue, cx, getStyles, getValue, hasValue, innerProps, innerRef, isLoading, isMulti, isRtl, maxMenuHeight, menuPlacement, menuPosition, menuShouldScrollIntoView, minMenuHeight, options, placement, selectOption, selectProps, setValue, children, ...rest }: MenuProps<OptionType>) => jsx.JSX.Element;
@@ -6,4 +6,4 @@ import { type OptionType, type SingleValueProps } from '@atlaskit/select';
6
6
  */
7
7
  export declare const makeSingleValue: ({ lang }: {
8
8
  lang: string;
9
- }) => ({ children, className, clearValue, cx, data, getStyles, getValue, hasValue, isDisabled, isMulti, isRtl, options, selectOption, selectProps, setValue, theme, ...rest }: SingleValueProps<OptionType, false>) => JSX.Element;
9
+ }) => ({ children, className, clearValue, cx, data, getStyles, getValue, hasValue, isDisabled, isMulti, isRtl, options, selectOption, selectProps, setValue, ...rest }: SingleValueProps<OptionType, false>) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "15.10.3",
3
+ "version": "15.10.5",
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/"
@@ -47,9 +47,9 @@
47
47
  "@atlaskit/platform-feature-flags": "^0.3.0",
48
48
  "@atlaskit/popper": "^6.3.0",
49
49
  "@atlaskit/primitives": "^13.3.0",
50
- "@atlaskit/select": "^18.8.0",
50
+ "@atlaskit/select": "^18.9.0",
51
51
  "@atlaskit/theme": "^14.0.0",
52
- "@atlaskit/tokens": "^2.4.0",
52
+ "@atlaskit/tokens": "^2.5.0",
53
53
  "@atlaskit/visually-hidden": "^1.5.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1",
@@ -71,7 +71,7 @@
71
71
  "@atlaskit/section-message": "^6.8.0",
72
72
  "@atlaskit/ssr": "*",
73
73
  "@atlaskit/textfield": "^6.7.0",
74
- "@atlaskit/toggle": "^13.4.0",
74
+ "@atlaskit/toggle": "^14.0.0",
75
75
  "@atlaskit/visual-regression": "*",
76
76
  "@atlassian/feature-flags-test-utils": "*",
77
77
  "@testing-library/react": "^12.1.5",