@atlaskit/datetime-picker 17.6.5 → 17.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.
Files changed (149) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/date-picker/package.json +17 -0
  3. package/date-time-picker/package.json +17 -0
  4. package/dist/cjs/components/date-picker.js +20 -15
  5. package/dist/cjs/components/date-time-picker-class.js +7 -9
  6. package/dist/cjs/components/date-time-picker-fc.js +468 -7
  7. package/dist/cjs/components/time-picker.js +11 -8
  8. package/dist/cjs/entry-points/date-picker.js +13 -0
  9. package/dist/cjs/entry-points/date-time-picker.js +13 -0
  10. package/dist/cjs/entry-points/time-picker.js +13 -0
  11. package/dist/cjs/entry-points/types.js +1 -0
  12. package/dist/cjs/internal/convert-to24hr-time.js +66 -0
  13. package/dist/cjs/internal/default-date-format.js +7 -0
  14. package/dist/cjs/internal/default-times.js +7 -0
  15. package/dist/cjs/internal/empty-component.js +12 -0
  16. package/dist/cjs/internal/format-date-time-zone-into-iso.js +15 -0
  17. package/dist/cjs/internal/format-date.js +39 -0
  18. package/dist/cjs/internal/{date-picker-migration.js → get-parsed-iso.js} +4 -48
  19. package/dist/cjs/internal/get-placeholder.js +32 -0
  20. package/dist/cjs/internal/get-safe-calendar-value.js +18 -0
  21. package/dist/cjs/internal/get-short-iso-string.js +13 -0
  22. package/dist/cjs/internal/is-date-disabled.js +29 -0
  23. package/dist/cjs/internal/is-valid.js +39 -0
  24. package/dist/cjs/internal/pad-two.js +9 -0
  25. package/dist/cjs/internal/parse-date.js +31 -20
  26. package/dist/cjs/internal/parse-time.js +6 -102
  27. package/dist/cjs/internal/placeholder-date-time.js +9 -0
  28. package/dist/cjs/internal/remove-spacer.js +9 -0
  29. package/dist/es2019/components/date-picker.js +9 -4
  30. package/dist/es2019/components/date-time-picker-class.js +4 -6
  31. package/dist/es2019/components/date-time-picker-fc.js +451 -5
  32. package/dist/es2019/components/time-picker.js +5 -2
  33. package/dist/es2019/entry-points/date-picker.js +1 -0
  34. package/dist/es2019/entry-points/date-time-picker.js +1 -0
  35. package/dist/es2019/entry-points/time-picker.js +1 -0
  36. package/dist/es2019/entry-points/types.js +0 -0
  37. package/dist/es2019/internal/convert-to24hr-time.js +60 -0
  38. package/dist/es2019/internal/default-date-format.js +1 -0
  39. package/dist/es2019/internal/default-times.js +1 -0
  40. package/dist/es2019/internal/empty-component.js +4 -0
  41. package/dist/es2019/internal/format-date-time-zone-into-iso.js +9 -0
  42. package/dist/es2019/internal/format-date.js +34 -0
  43. package/dist/es2019/internal/{date-picker-migration.js → get-parsed-iso.js} +2 -54
  44. package/dist/es2019/internal/get-placeholder.js +28 -0
  45. package/dist/es2019/internal/get-safe-calendar-value.js +11 -0
  46. package/dist/es2019/internal/get-short-iso-string.js +6 -0
  47. package/dist/es2019/internal/is-date-disabled.js +25 -0
  48. package/dist/es2019/internal/is-valid.js +33 -0
  49. package/dist/es2019/internal/pad-two.js +3 -0
  50. package/dist/es2019/internal/parse-date.js +33 -18
  51. package/dist/es2019/internal/parse-time.js +3 -96
  52. package/dist/es2019/internal/placeholder-date-time.js +3 -0
  53. package/dist/es2019/internal/remove-spacer.js +3 -0
  54. package/dist/esm/components/date-picker.js +9 -4
  55. package/dist/esm/components/date-time-picker-class.js +4 -6
  56. package/dist/esm/components/date-time-picker-fc.js +468 -7
  57. package/dist/esm/components/time-picker.js +5 -2
  58. package/dist/esm/entry-points/date-picker.js +1 -0
  59. package/dist/esm/entry-points/date-time-picker.js +1 -0
  60. package/dist/esm/entry-points/time-picker.js +1 -0
  61. package/dist/esm/entry-points/types.js +0 -0
  62. package/dist/esm/internal/convert-to24hr-time.js +60 -0
  63. package/dist/esm/internal/default-date-format.js +1 -0
  64. package/dist/esm/internal/default-times.js +1 -0
  65. package/dist/esm/internal/empty-component.js +6 -0
  66. package/dist/esm/internal/format-date-time-zone-into-iso.js +9 -0
  67. package/dist/esm/internal/format-date.js +32 -0
  68. package/dist/esm/internal/{date-picker-migration.js → get-parsed-iso.js} +2 -46
  69. package/dist/esm/internal/get-placeholder.js +26 -0
  70. package/dist/esm/internal/get-safe-calendar-value.js +11 -0
  71. package/dist/esm/internal/get-short-iso-string.js +6 -0
  72. package/dist/esm/internal/is-date-disabled.js +23 -0
  73. package/dist/esm/internal/is-valid.js +33 -0
  74. package/dist/esm/internal/pad-two.js +3 -0
  75. package/dist/esm/internal/parse-date.js +31 -18
  76. package/dist/esm/internal/parse-time.js +3 -96
  77. package/dist/esm/internal/placeholder-date-time.js +3 -0
  78. package/dist/esm/internal/remove-spacer.js +3 -0
  79. package/dist/types/components/date-time-picker-class.d.ts +0 -2
  80. package/dist/types/components/date-time-picker-fc.d.ts +4 -2
  81. package/dist/types/entry-points/date-picker.d.ts +2 -0
  82. package/dist/types/entry-points/date-time-picker.d.ts +1 -0
  83. package/dist/types/entry-points/time-picker.d.ts +1 -0
  84. package/dist/types/entry-points/types.d.ts +1 -0
  85. package/dist/types/internal/convert-to24hr-time.d.ts +7 -0
  86. package/dist/types/internal/default-date-format.d.ts +1 -0
  87. package/dist/types/internal/default-times.d.ts +1 -0
  88. package/dist/types/internal/empty-component.d.ts +4 -0
  89. package/dist/types/internal/format-date-time-zone-into-iso.d.ts +4 -0
  90. package/dist/{types-ts4.5/internal/date-picker-migration.d.ts → types/internal/format-date.d.ts} +0 -28
  91. package/dist/types/internal/get-parsed-iso.d.ts +20 -0
  92. package/dist/types/internal/get-placeholder.d.ts +22 -0
  93. package/dist/types/internal/get-safe-calendar-value.d.ts +1 -0
  94. package/dist/types/internal/get-short-iso-string.d.ts +1 -0
  95. package/dist/types/internal/is-date-disabled.d.ts +20 -0
  96. package/dist/types/internal/is-valid.d.ts +1 -0
  97. package/dist/types/internal/pad-two.d.ts +1 -0
  98. package/dist/types/internal/parse-date.d.ts +26 -5
  99. package/dist/types/internal/parse-time.d.ts +0 -9
  100. package/dist/types/internal/placeholder-date-time.d.ts +1 -0
  101. package/dist/types/internal/remove-spacer.d.ts +1 -0
  102. package/dist/types-ts4.5/components/date-time-picker-class.d.ts +0 -2
  103. package/dist/types-ts4.5/components/date-time-picker-fc.d.ts +4 -2
  104. package/dist/types-ts4.5/entry-points/date-picker.d.ts +2 -0
  105. package/dist/types-ts4.5/entry-points/date-time-picker.d.ts +1 -0
  106. package/dist/types-ts4.5/entry-points/time-picker.d.ts +1 -0
  107. package/dist/types-ts4.5/entry-points/types.d.ts +1 -0
  108. package/dist/types-ts4.5/internal/convert-to24hr-time.d.ts +7 -0
  109. package/dist/types-ts4.5/internal/default-date-format.d.ts +1 -0
  110. package/dist/types-ts4.5/internal/default-times.d.ts +1 -0
  111. package/dist/types-ts4.5/internal/empty-component.d.ts +4 -0
  112. package/dist/types-ts4.5/internal/format-date-time-zone-into-iso.d.ts +4 -0
  113. package/dist/{types/internal/date-picker-migration.d.ts → types-ts4.5/internal/format-date.d.ts} +0 -28
  114. package/dist/types-ts4.5/internal/get-parsed-iso.d.ts +20 -0
  115. package/dist/types-ts4.5/internal/get-placeholder.d.ts +22 -0
  116. package/dist/types-ts4.5/internal/get-safe-calendar-value.d.ts +1 -0
  117. package/dist/types-ts4.5/internal/get-short-iso-string.d.ts +1 -0
  118. package/dist/types-ts4.5/internal/is-date-disabled.d.ts +20 -0
  119. package/dist/types-ts4.5/internal/is-valid.d.ts +1 -0
  120. package/dist/types-ts4.5/internal/pad-two.d.ts +1 -0
  121. package/dist/types-ts4.5/internal/parse-date.d.ts +26 -5
  122. package/dist/types-ts4.5/internal/parse-time.d.ts +0 -9
  123. package/dist/types-ts4.5/internal/placeholder-date-time.d.ts +1 -0
  124. package/dist/types-ts4.5/internal/remove-spacer.d.ts +1 -0
  125. package/package.json +11 -14
  126. package/time-picker/package.json +17 -0
  127. package/types/package.json +5 -5
  128. package/dist/cjs/components/date-time-picker-fc-new.js +0 -479
  129. package/dist/cjs/components/date-time-picker-fc-old.js +0 -370
  130. package/dist/cjs/internal/index.js +0 -31
  131. package/dist/es2019/components/date-time-picker-fc-new.js +0 -456
  132. package/dist/es2019/components/date-time-picker-fc-old.compiled.css +0 -6
  133. package/dist/es2019/components/date-time-picker-fc-old.js +0 -336
  134. package/dist/es2019/internal/index.js +0 -20
  135. package/dist/esm/components/date-time-picker-fc-new.compiled.css +0 -6
  136. package/dist/esm/components/date-time-picker-fc-new.js +0 -473
  137. package/dist/esm/components/date-time-picker-fc-old.compiled.css +0 -6
  138. package/dist/esm/components/date-time-picker-fc-old.js +0 -364
  139. package/dist/esm/internal/index.js +0 -22
  140. package/dist/types/components/date-time-picker-fc-new.d.ts +0 -6
  141. package/dist/types/components/date-time-picker-fc-old.d.ts +0 -6
  142. package/dist/types/internal/index.d.ts +0 -10
  143. package/dist/types-ts4.5/components/date-time-picker-fc-new.d.ts +0 -6
  144. package/dist/types-ts4.5/components/date-time-picker-fc-old.d.ts +0 -6
  145. package/dist/types-ts4.5/internal/index.d.ts +0 -10
  146. package/offerings.json +0 -98
  147. /package/dist/cjs/components/{date-time-picker-fc-new.compiled.css → date-time-picker-fc.compiled.css} +0 -0
  148. /package/dist/{cjs/components/date-time-picker-fc-old.compiled.css → es2019/components/date-time-picker-fc.compiled.css} +0 -0
  149. /package/dist/{es2019/components/date-time-picker-fc-new.compiled.css → esm/components/date-time-picker-fc.compiled.css} +0 -0
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Everything in this file is to smooth out the migration of the new date picker
3
+ * (https://product-fabric.atlassian.net/browse/DSP-20682). When that ticket is
4
+ * complete, all of these functions will ilkely be merged back into the date
5
+ * picker. Please do not pre-optimize and put these back into the date picker
6
+ * unless you are working on the DTP Refresh and you have a good reason to do
7
+ * so, thank you!
8
+ *
9
+ * All variables within the `di` objects are dependency injections. They should
10
+ * be read from within the component at the end of the day. But because we are
11
+ * extracting them, we have to inject them in every place manually. When we
12
+ * re-introduce them to the components, we can likely remove the `di` variables
13
+ * and instead use internal variables.
14
+ *
15
+ * If component _only_ has injected variables, it is fully internal and was
16
+ * broken out to be it's own function.
17
+ */
18
+
19
+ // oxlint-disable-next-line @atlassian/no-restricted-imports
20
+
21
+ import { placeholderDatetime } from './placeholder-date-time';
22
+ export const getPlaceholder = di => {
23
+ const {
24
+ placeholder,
25
+ l10n
26
+ } = di;
27
+ return placeholder || l10n.formatDate(placeholderDatetime);
28
+ };
@@ -0,0 +1,11 @@
1
+ // oxlint-disable-next-line @atlassian/no-restricted-imports
2
+ import { getShortISOString } from './get-short-iso-string';
3
+ export function getSafeCalendarValue(calendarValue) {
4
+ // If `calendarValue` has a year that is greater than 9999, default to
5
+ // today's date
6
+ const yearIsOverLimit = calendarValue.match(/^\d{5,}/);
7
+ if (yearIsOverLimit) {
8
+ return getShortISOString(new Date());
9
+ }
10
+ return calendarValue;
11
+ }
@@ -0,0 +1,6 @@
1
+ // oxlint-disable-next-line @atlassian/no-restricted-imports
2
+ import { format } from 'date-fns';
3
+ import { convertTokens } from './parse-tokens';
4
+ export function getShortISOString(date) {
5
+ return format(date, convertTokens('YYYY-MM-DD'));
6
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Everything in this file is to smooth out the migration of the new date picker
3
+ * (https://product-fabric.atlassian.net/browse/DSP-20682). When that ticket is
4
+ * complete, all of these functions will ilkely be merged back into the date
5
+ * picker. Please do not pre-optimize and put these back into the date picker
6
+ * unless you are working on the DTP Refresh and you have a good reason to do
7
+ * so, thank you!
8
+ *
9
+ * All variables within the `di` objects are dependency injections. They should
10
+ * be read from within the component at the end of the day. But because we are
11
+ * extracting them, we have to inject them in every place manually. When we
12
+ * re-introduce them to the components, we can likely remove the `di` variables
13
+ * and instead use internal variables.
14
+ *
15
+ * If component _only_ has injected variables, it is fully internal and was
16
+ * broken out to be it's own function.
17
+ */
18
+
19
+ // oxlint-disable-next-line @atlassian/no-restricted-imports
20
+ export const isDateDisabled = (date, di) => {
21
+ const {
22
+ disabled
23
+ } = di;
24
+ return disabled.indexOf(date) > -1;
25
+ };
@@ -0,0 +1,33 @@
1
+ export function isValid(timeString) {
2
+ /**
3
+ * Regex match for `12:34`, `12:34:56`, `1:23:56 p`, `1:23:56PM`, and a bit more…
4
+ */
5
+ const time = timeString.trim().match(/([012]?[\d])(?::([0-5][\d]))?(?::([0-5][\d]))?\s*([ap]m?)?/i);
6
+
7
+ /**
8
+ * Regex match for `1234`, `12:34`, `12.34`, `123456`, `12:34:56`, `12.34.56`
9
+ */
10
+ const time24hr = timeString.trim().match(/([012][\d])[:.]?([0-5][\d])([:.]?([0-5][\d]))?/);
11
+
12
+ /**
13
+ * Convert `2:34:56 pm` down to `23456`
14
+ */
15
+ const num = timeString.replace(/[^0-9]/g, '');
16
+ const includesSeconds = time && time[1] !== undefined && time[2] !== undefined && time[3] !== undefined || time24hr && time24hr[1] !== undefined && time24hr[2] !== undefined && time24hr[4] !== undefined;
17
+ if (!time && !time24hr) {
18
+ return false;
19
+ }
20
+ if (time && !time[1]) {
21
+ return false;
22
+ }
23
+ if (num.length > 6) {
24
+ return false;
25
+ }
26
+ if (num.length > 4 && !includesSeconds) {
27
+ return false;
28
+ }
29
+ if (num.length === 2 && parseInt(num, 10) > 12) {
30
+ return false;
31
+ }
32
+ return true;
33
+ }
@@ -0,0 +1,3 @@
1
+ export function padToTwo(number) {
2
+ return number <= 99 ? `0${number}`.slice(-2) : `${number}`;
3
+ }
@@ -1,22 +1,37 @@
1
- // oxlint-disable-next-line @atlassian/no-restricted-imports
2
- import { format } from 'date-fns';
3
- import { convertTokens } from './parse-tokens';
4
-
5
1
  /**
6
- * Converts a Date object into an ISO date, formatted `YYYY-MM-DD`.
2
+ * Everything in this file is to smooth out the migration of the new date picker
3
+ * (https://product-fabric.atlassian.net/browse/DSP-20682). When that ticket is
4
+ * complete, all of these functions will ilkely be merged back into the date
5
+ * picker. Please do not pre-optimize and put these back into the date picker
6
+ * unless you are working on the DTP Refresh and you have a good reason to do
7
+ * so, thank you!
8
+ *
9
+ * All variables within the `di` objects are dependency injections. They should
10
+ * be read from within the component at the end of the day. But because we are
11
+ * extracting them, we have to inject them in every place manually. When we
12
+ * re-introduce them to the components, we can likely remove the `di` variables
13
+ * and instead use internal variables.
7
14
  *
8
- * @param date The date to convert.
9
- * @returns An ISO date (`YYYY-MM-DD`).
15
+ * If component _only_ has injected variables, it is fully internal and was
16
+ * broken out to be it's own function.
17
+ */
18
+
19
+ import { defaultDateFormat } from './default-date-format';
20
+
21
+ /**
22
+ * There are two props that can change how the date is parsed.
23
+ * The priority of props used is:
24
+ * 1. `parseInputValue`
25
+ * 2. `locale`
10
26
  */
11
- export function getShortISOString(date) {
12
- return format(date, convertTokens('YYYY-MM-DD'));
13
- }
14
- export function getSafeCalendarValue(calendarValue) {
15
- // If `calendarValue` has a year that is greater than 9999, default to
16
- // today's date
17
- const yearIsOverLimit = calendarValue.match(/^\d{5,}/);
18
- if (yearIsOverLimit) {
19
- return getShortISOString(new Date());
27
+ export const parseDate = (date, di) => {
28
+ const {
29
+ parseInputValue,
30
+ dateFormat,
31
+ l10n
32
+ } = di;
33
+ if (parseInputValue) {
34
+ return parseInputValue(date, dateFormat || defaultDateFormat);
20
35
  }
21
- return calendarValue;
22
- }
36
+ return l10n.parseDate(date);
37
+ };
@@ -1,99 +1,6 @@
1
- const map24 = {
2
- '12': '12',
3
- '01': '13',
4
- '02': '14',
5
- '03': '15',
6
- '04': '16',
7
- '05': '17',
8
- '06': '18',
9
- '07': '19',
10
- '08': '20',
11
- '09': '21',
12
- '10': '22',
13
- '11': '23'
14
- };
15
- export function isValid(timeString) {
16
- /**
17
- * Regex match for `12:34`, `12:34:56`, `1:23:56 p`, `1:23:56PM`, and a bit more…
18
- */
19
- const time = timeString.trim().match(/([012]?[\d])(?::([0-5][\d]))?(?::([0-5][\d]))?\s*([ap]m?)?/i);
20
-
21
- /**
22
- * Regex match for `1234`, `12:34`, `12.34`, `123456`, `12:34:56`, `12.34.56`
23
- */
24
- const time24hr = timeString.trim().match(/([012][\d])[:.]?([0-5][\d])([:.]?([0-5][\d]))?/);
25
-
26
- /**
27
- * Convert `2:34:56 pm` down to `23456`
28
- */
29
- const num = timeString.replace(/[^0-9]/g, '');
30
- const includesSeconds = time && time[1] !== undefined && time[2] !== undefined && time[3] !== undefined || time24hr && time24hr[1] !== undefined && time24hr[2] !== undefined && time24hr[4] !== undefined;
31
- if (!time && !time24hr) {
32
- return false;
33
- }
34
- if (time && !time[1]) {
35
- return false;
36
- }
37
- if (num.length > 6) {
38
- return false;
39
- }
40
- if (num.length > 4 && !includesSeconds) {
41
- return false;
42
- }
43
- if (num.length === 2 && parseInt(num, 10) > 12) {
44
- return false;
45
- }
46
- return true;
47
- }
48
- export function removeSpacer(time) {
49
- return time.replace(/[:.]/g, '');
50
- }
51
- function formatSemi24(time) {
52
- if (time.length === 1) {
53
- return `0${time}00`;
54
- }
55
- if (time.length === 2) {
56
- return `${time}00`;
57
- }
58
- if (time.length === 3 || time.length === 5) {
59
- return `0${time}`;
60
- }
61
- return time;
62
- }
63
- function checkHour(hour, meridiem) {
64
- if (hour > '24') {
65
- return null;
66
- }
67
- if (hour === '12' && meridiem === 'a') {
68
- return '00';
69
- }
70
- if (hour < '12' && meridiem === 'p') {
71
- return map24[hour];
72
- }
73
- return hour;
74
- }
75
- function checkMinuteSecond(value) {
76
- if (value > '59') {
77
- return null;
78
- }
79
- return value;
80
- }
81
- export function convertTo24hrTime(time) {
82
- const timeArray = time.toLowerCase().split(/(p|a)/i);
83
- const meridiem = timeArray[1];
84
- const semi24 = formatSemi24(timeArray[0].trim());
85
- const hour = checkHour(semi24.substring(0, 2), meridiem);
86
- const minute = checkMinuteSecond(semi24.substring(2, 4));
87
- const seconds = semi24.length === 6 && checkMinuteSecond(semi24.substring(4, 6));
88
- if (!hour || !minute) {
89
- return null;
90
- }
91
- return {
92
- hour: parseInt(hour, 10),
93
- minute: parseInt(minute, 10),
94
- seconds: parseInt(seconds || '0', 10) || 0
95
- };
96
- }
1
+ import { convertTo24hrTime } from './convert-to24hr-time';
2
+ import { isValid } from './is-valid';
3
+ import { removeSpacer } from './remove-spacer';
97
4
  function assignToDate(time) {
98
5
  const dateTime = new Date();
99
6
  dateTime.setHours(time.hour);
@@ -0,0 +1,3 @@
1
+ // This date was chosen to clearly show date and time formats (day > 12)
2
+ // e.g. 18/02/1993 vs. 2/18/1993 and 1:00 PM vs 13:00
3
+ export const placeholderDatetime = new Date(1993, 1, 18, 13);
@@ -0,0 +1,3 @@
1
+ export function removeSpacer(time) {
2
+ return time.replace(/[:.]/g, '');
3
+ }
@@ -23,14 +23,19 @@ import CalendarIcon from '@atlaskit/icon/core/calendar';
23
23
  import { createLocalizationProvider } from '@atlaskit/locale';
24
24
  import { Box } from '@atlaskit/primitives/compiled';
25
25
  import Select, { mergeStyles } from '@atlaskit/select';
26
- import { EmptyComponent } from '../internal';
27
- import { formatDate, getParsedISO, getPlaceholder, isDateDisabled, parseDate } from '../internal/date-picker-migration';
26
+ import { EmptyComponent } from '../internal/empty-component';
27
+ import { formatDate } from '../internal/format-date';
28
+ import { getParsedISO } from '../internal/get-parsed-iso';
29
+ import { getPlaceholder } from '../internal/get-placeholder';
30
+ import { getSafeCalendarValue } from '../internal/get-safe-calendar-value';
31
+ import { getShortISOString } from '../internal/get-short-iso-string';
28
32
  import { IndicatorsContainer as _IndicatorsContainer } from '../internal/indicators-container';
33
+ import { isDateDisabled } from '../internal/is-date-disabled';
29
34
  import { Menu } from '../internal/menu';
30
- import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
35
+ import { parseDate } from '../internal/parse-date';
31
36
  import { makeSingleValue } from '../internal/single-value';
32
37
  var packageName = "@atlaskit/datetime-picker";
33
- var packageVersion = "17.6.5";
38
+ var packageVersion = "17.7.0";
34
39
  var styles = {
35
40
  pickerContainerStyle: "_kqswh2mm",
36
41
  dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
@@ -19,13 +19,13 @@ import { format, isValid, parseISO } from 'date-fns';
19
19
  import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
20
20
  import SelectClearIcon from '@atlaskit/icon/core/cross-circle';
21
21
  import { mergeStyles } from '@atlaskit/select';
22
- import { formatDateTimeZoneIntoIso } from '../internal';
23
22
  import { DateTimePickerContainer } from '../internal/date-time-picker-container';
23
+ import { formatDateTimeZoneIntoIso } from '../internal/format-date-time-zone-into-iso';
24
24
  import { convertTokens } from '../internal/parse-tokens';
25
25
  import DatePicker from './date-picker';
26
26
  import TimePicker from './time-picker';
27
27
  var packageName = "@atlaskit/datetime-picker";
28
- var packageVersion = "17.6.5";
28
+ var packageVersion = "17.7.0";
29
29
  var compiledStyles = {
30
30
  datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
31
31
  timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
@@ -58,8 +58,6 @@ var dateTimePickerDefaultProps = {
58
58
  // Not including a default prop for value as it will
59
59
  // Make the component a controlled component
60
60
  };
61
- export var datePickerDefaultAriaLabel = 'Date';
62
- export var timePickerDefaultAriaLabel = 'Time';
63
61
 
64
62
  // eslint-disable-next-line @repo/internal/react/no-class-components
65
63
  var DateTimePickerComponent = /*#__PURE__*/function (_React$Component) {
@@ -266,13 +264,13 @@ var DateTimePickerComponent = /*#__PURE__*/function (_React$Component) {
266
264
  var timeValue = parsedValues === null || parsedValues === void 0 ? void 0 : parsedValues.timeValue;
267
265
  var datePickerSelectProps = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.selectProps;
268
266
  var datePickerAriaDescribedBy = datePickerProps['aria-describedby'] || ariaDescribedBy;
269
- var datePickerLabel = datePickerProps.label || datePickerDefaultAriaLabel;
267
+ var datePickerLabel = datePickerProps.label || 'Date';
270
268
  var mergedDatePickerSelectProps = _objectSpread(_objectSpread({}, datePickerSelectProps), {}, {
271
269
  styles: mergeStyles(styles, datePickerSelectProps === null || datePickerSelectProps === void 0 ? void 0 : datePickerSelectProps.styles)
272
270
  });
273
271
  var timePickerSelectProps = timePickerProps === null || timePickerProps === void 0 ? void 0 : timePickerProps.selectProps;
274
272
  var timePickerAriaDescribedBy = timePickerProps['aria-describedby'] || ariaDescribedBy;
275
- var timePickerLabel = timePickerProps.label || timePickerDefaultAriaLabel;
273
+ var timePickerLabel = timePickerProps.label || 'Time';
276
274
  var mergedTimePickerSelectProps = _objectSpread(_objectSpread({}, timePickerSelectProps), {}, {
277
275
  styles: mergeStyles(styles, timePickerSelectProps === null || timePickerSelectProps === void 0 ? void 0 : timePickerSelectProps.styles)
278
276
  });