@atlaskit/datetime-picker 12.5.1 → 12.5.3

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,17 @@
1
1
  # @atlaskit/datetime-picker
2
2
 
3
+ ## 12.5.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`49b08bfdf5f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/49b08bfdf5f) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
8
+
9
+ ## 12.5.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
14
+
3
15
  ## 12.5.1
4
16
 
5
17
  ### Patch Changes
@@ -35,8 +35,9 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
35
35
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
36
36
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
37
37
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable @repo/internal/react/use-noop */ /** @jsx jsx */ // eslint-disable-next-line no-restricted-imports
38
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
38
39
  var packageName = "@atlaskit/datetime-picker";
39
- var packageVersion = "12.5.1";
40
+ var packageVersion = "12.5.3";
40
41
 
41
42
  /* eslint-disable react/no-unused-prop-types */
42
43
 
@@ -31,7 +31,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
31
31
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
32
32
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } /* eslint-disable @repo/internal/react/use-noop */ /** @jsx jsx */ // eslint-disable-next-line no-restricted-imports
33
33
  var packageName = "@atlaskit/datetime-picker";
34
- var packageVersion = "12.5.1";
34
+ var packageVersion = "12.5.3";
35
35
 
36
36
  /* eslint-disable react/no-unused-prop-types */
37
37
 
@@ -102,9 +102,9 @@ var timePickerContainerStyles = (0, _react2.css)({
102
102
  var ICON_PADDING = 2;
103
103
  var iconContainerStyles = (0, _react2.css)({
104
104
  display: 'flex',
105
- paddingTop: "6px",
106
- paddingRight: "".concat((0, _constants.gridSize)(), "px"),
107
- paddingBottom: "6px",
105
+ paddingTop: "var(--ds-space-075, 6px)",
106
+ paddingRight: "var(--ds-space-100, 8px)",
107
+ paddingBottom: "var(--ds-space-075, 6px)",
108
108
  paddingLeft: "".concat(ICON_PADDING * 2, "px"),
109
109
  alignItems: 'center',
110
110
  flexBasis: 'inherit',
@@ -38,7 +38,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
38
38
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
39
39
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
40
40
  var packageName = "@atlaskit/datetime-picker";
41
- var packageVersion = "12.5.1";
41
+ var packageVersion = "12.5.3";
42
42
 
43
43
  /* eslint-disable react/no-unused-prop-types */
44
44
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "12.5.1",
3
+ "version": "12.5.3",
4
4
  "sideEffects": false
5
5
  }
@@ -13,12 +13,13 @@ import CalendarIcon from '@atlaskit/icon/glyph/calendar';
13
13
  import { createLocalizationProvider } from '@atlaskit/locale';
14
14
  import Select, { mergeStyles } from '@atlaskit/select';
15
15
  import { N0, N50A, N60A } from '@atlaskit/theme/colors';
16
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
16
17
  import { borderRadius, gridSize, layers } from '@atlaskit/theme/constants';
17
18
  import { defaultDateFormat, EmptyComponent, padToTwo, placeholderDatetime } from '../internal';
18
19
  import FixedLayer from '../internal/fixed-layer';
19
20
  import { convertTokens } from './utils';
20
21
  const packageName = "@atlaskit/datetime-picker";
21
- const packageVersion = "12.5.1";
22
+ const packageVersion = "12.5.3";
22
23
 
23
24
  /* eslint-disable react/no-unused-prop-types */
24
25
 
@@ -11,13 +11,13 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
11
11
  import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
12
12
  import { mergeStyles } from '@atlaskit/select';
13
13
  import { B100, N0, N20, N30, N500, N70, R400 } from '@atlaskit/theme/colors';
14
- import { borderRadius, gridSize } from '@atlaskit/theme/constants';
14
+ import { borderRadius } from '@atlaskit/theme/constants';
15
15
  import { defaultTimes, formatDateTimeZoneIntoIso } from '../internal';
16
16
  import DatePicker from './date-picker';
17
17
  import TimePicker from './time-picker';
18
18
  import { convertTokens } from './utils';
19
19
  const packageName = "@atlaskit/datetime-picker";
20
- const packageVersion = "12.5.1";
20
+ const packageVersion = "12.5.3";
21
21
 
22
22
  /* eslint-disable react/no-unused-prop-types */
23
23
 
@@ -88,9 +88,9 @@ const timePickerContainerStyles = css({
88
88
  const ICON_PADDING = 2;
89
89
  const iconContainerStyles = css({
90
90
  display: 'flex',
91
- paddingTop: `6px`,
92
- paddingRight: `${gridSize()}px`,
93
- paddingBottom: `6px`,
91
+ paddingTop: "var(--ds-space-075, 6px)",
92
+ paddingRight: "var(--ds-space-100, 8px)",
93
+ paddingBottom: "var(--ds-space-075, 6px)",
94
94
  paddingLeft: `${ICON_PADDING * 2}px`,
95
95
  alignItems: 'center',
96
96
  flexBasis: 'inherit',
@@ -16,7 +16,7 @@ import FixedLayer from '../internal/fixed-layer';
16
16
  import parseTime from '../internal/parse-time';
17
17
  import { convertTokens } from './utils';
18
18
  const packageName = "@atlaskit/datetime-picker";
19
- const packageVersion = "12.5.1";
19
+ const packageVersion = "12.5.3";
20
20
 
21
21
  /* eslint-disable react/no-unused-prop-types */
22
22
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "12.5.1",
3
+ "version": "12.5.3",
4
4
  "sideEffects": false
5
5
  }
@@ -24,12 +24,13 @@ import CalendarIcon from '@atlaskit/icon/glyph/calendar';
24
24
  import { createLocalizationProvider } from '@atlaskit/locale';
25
25
  import Select, { mergeStyles } from '@atlaskit/select';
26
26
  import { N0, N50A, N60A } from '@atlaskit/theme/colors';
27
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
27
28
  import { borderRadius, gridSize, layers } from '@atlaskit/theme/constants';
28
29
  import { defaultDateFormat, EmptyComponent, padToTwo, placeholderDatetime } from '../internal';
29
30
  import FixedLayer from '../internal/fixed-layer';
30
31
  import { convertTokens } from './utils';
31
32
  var packageName = "@atlaskit/datetime-picker";
32
- var packageVersion = "12.5.1";
33
+ var packageVersion = "12.5.3";
33
34
 
34
35
  /* eslint-disable react/no-unused-prop-types */
35
36
 
@@ -21,13 +21,13 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
21
21
  import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
22
22
  import { mergeStyles } from '@atlaskit/select';
23
23
  import { B100, N0, N20, N30, N500, N70, R400 } from '@atlaskit/theme/colors';
24
- import { borderRadius, gridSize } from '@atlaskit/theme/constants';
24
+ import { borderRadius } from '@atlaskit/theme/constants';
25
25
  import { defaultTimes, formatDateTimeZoneIntoIso } from '../internal';
26
26
  import DatePicker from './date-picker';
27
27
  import TimePicker from './time-picker';
28
28
  import { convertTokens } from './utils';
29
29
  var packageName = "@atlaskit/datetime-picker";
30
- var packageVersion = "12.5.1";
30
+ var packageVersion = "12.5.3";
31
31
 
32
32
  /* eslint-disable react/no-unused-prop-types */
33
33
 
@@ -98,9 +98,9 @@ var timePickerContainerStyles = css({
98
98
  var ICON_PADDING = 2;
99
99
  var iconContainerStyles = css({
100
100
  display: 'flex',
101
- paddingTop: "6px",
102
- paddingRight: "".concat(gridSize(), "px"),
103
- paddingBottom: "6px",
101
+ paddingTop: "var(--ds-space-075, 6px)",
102
+ paddingRight: "var(--ds-space-100, 8px)",
103
+ paddingBottom: "var(--ds-space-075, 6px)",
104
104
  paddingLeft: "".concat(ICON_PADDING * 2, "px"),
105
105
  alignItems: 'center',
106
106
  flexBasis: 'inherit',
@@ -29,7 +29,7 @@ import FixedLayer from '../internal/fixed-layer';
29
29
  import parseTime from '../internal/parse-time';
30
30
  import { convertTokens } from './utils';
31
31
  var packageName = "@atlaskit/datetime-picker";
32
- var packageVersion = "12.5.1";
32
+ var packageVersion = "12.5.3";
33
33
 
34
34
  /* eslint-disable react/no-unused-prop-types */
35
35
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "12.5.1",
3
+ "version": "12.5.3",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,285 @@
1
+ /** @jsx jsx */
2
+ import { Component } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
5
+ import { CalendarRef } from '@atlaskit/calendar';
6
+ import { LocalizationProvider } from '@atlaskit/locale';
7
+ import { ActionMeta, DropdownIndicatorProps, OptionType, ValueType } from '@atlaskit/select';
8
+ import { Appearance, SelectProps, Spacing } from '../types';
9
+ export interface DatePickerBaseProps extends WithAnalyticsEventsProps {
10
+ /**
11
+ * Set the appearance of the picker.
12
+ *
13
+ * `subtle` will remove the borders, background, and icon.
14
+ *
15
+ *NOTE:** Appearance values will be ignored if styles are parsed through `selectProps`.
16
+ */
17
+ appearance?: Appearance;
18
+ /**
19
+ * Set the picker to autofocus on mount.
20
+ */
21
+ autoFocus?: boolean;
22
+ /**
23
+ * The default for `isOpen`. Will be `false` if not provided.
24
+ */
25
+ defaultIsOpen?: boolean;
26
+ /**
27
+ * The default for `value`.
28
+ */
29
+ defaultValue?: string;
30
+ /**
31
+ * An array of ISO dates that should be disabled on the calendar. This does not affect what users can type into the picker.
32
+ */
33
+ disabled?: string[];
34
+ /**
35
+ * A filter function for disabling dates on the calendar. This does not affect what users can type into the picker.
36
+ *
37
+ * The function is called with a date string in the format `YYYY-MM-DD` and should return `true` if the date should be disabled.
38
+ */
39
+ disabledDateFilter?: (date: string) => boolean;
40
+ /**
41
+ * The latest enabled date. Dates after this are disabled on the calendar. This does not affect what users can type into the picker.
42
+ */
43
+ maxDate?: string;
44
+ /**
45
+ * The earliest enabled date. Dates before this are disabled on the calendar. This does not affect what users can type into the picker.
46
+ */
47
+ minDate?: string;
48
+ /**
49
+ * The icon shown in the picker.
50
+ */
51
+ icon?: React.ComponentType<DropdownIndicatorProps<OptionType>>;
52
+ /**
53
+ * The id of the field. Currently, react-select transforms this to have a `react-select-` prefix, and an `--input` suffix when applied to the input. For example, the id `my-input` would be transformed to `react-select-my-input--input`.
54
+ *
55
+ * Keep this in mind when needing to refer to the ID. This will be fixed in an upcoming release.
56
+ */
57
+ id?: string;
58
+ /**
59
+ * Props to apply to the container.
60
+ */
61
+ innerProps?: React.AllHTMLAttributes<HTMLElement>;
62
+ /**
63
+ * Set if the picker is disabled.
64
+ */
65
+ isDisabled?: boolean;
66
+ /**
67
+ * Set if the picker is open.
68
+ */
69
+ isOpen?: boolean;
70
+ /**
71
+ * The name of the field.
72
+ */
73
+ name?: string;
74
+ /**
75
+ * The aria-label attribute associated with the next-month arrow.
76
+ */
77
+ nextMonthLabel?: string;
78
+ /**
79
+ * Called when the field is blurred.
80
+ */
81
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
82
+ /**
83
+ * Called when the value changes. The only argument is an ISO time or empty string.
84
+ */
85
+ onChange?: (value: string) => void;
86
+ /**
87
+ * Called when the field is focused.
88
+ */
89
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
90
+ /**
91
+ * A function for parsing input characters and transforming them into a Date object. By default parses the date string based off the locale.
92
+ */
93
+ parseInputValue?: (date: string, dateFormat: string) => Date;
94
+ /**
95
+ * A function for formatting the date displayed in the input. By default composes together [date-fn's parse method](https://date-fns.org/v1.29.0/docs/parse) and [date-fn's format method](https://date-fns.org/v1.29.0/docs/format) to return a correctly formatted date string.
96
+ */
97
+ formatDisplayLabel?: (value: string, dateFormat: string) => string;
98
+ /**
99
+ * The aria-label attribute associated with the previous-month arrow.
100
+ */
101
+ previousMonthLabel?: string;
102
+ /**
103
+ * Props to apply to the select. This can be used to set options such as placeholder text.
104
+ * See [the `Select` documentation for further information](/components/select).
105
+ */
106
+ selectProps?: SelectProps;
107
+ /**
108
+ * The spacing for the select control.
109
+ *
110
+ * Compact is `gridSize() * 4`, default is `gridSize * 5`.
111
+ */
112
+ spacing?: Spacing;
113
+ /**
114
+ * The ISO time used as the input value.
115
+ */
116
+ value?: string;
117
+ /**
118
+ * Set if the picker has an invalid value.
119
+ */
120
+ isInvalid?: boolean;
121
+ /**
122
+ * Hides icon for dropdown indicator.
123
+ */
124
+ hideIcon?: boolean;
125
+ /**
126
+ * Format the date with a string that is accepted by [date-fn's format function](https://date-fns.org/v1.29.0/docs/format).
127
+ */
128
+ dateFormat?: string;
129
+ /**
130
+ * Placeholder text displayed in input
131
+ */
132
+ placeholder?: string;
133
+ /**
134
+ * Locale used to format the date and calendar. See [DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat).
135
+ */
136
+ locale?: string;
137
+ /**
138
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
139
+ * - `{testId}--container` wrapping element of date-picker
140
+ * - `{testId}--calendar--container` nested calendar component
141
+ */
142
+ testId?: string;
143
+ /**
144
+ * Start day of the week for the calendar.
145
+ * - `0` sunday (default value)
146
+ * - `1` monday
147
+ * - `2` tuesday
148
+ * - `3` wednesday
149
+ * - `4` thursday
150
+ * - `5` friday
151
+ * - `6` saturday
152
+ */
153
+ weekStartDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
154
+ }
155
+ type DatePickerProps = typeof datePickerDefaultProps & DatePickerBaseProps;
156
+ interface State {
157
+ isOpen: boolean;
158
+ /**
159
+ * When being cleared from the icon the DatePicker is blurred.
160
+ * This variable defines whether the default onSelectBlur or onSelectFocus
161
+ * events should behave as normal
162
+ */
163
+ isFocused: boolean;
164
+ clearingFromIcon: boolean;
165
+ value: string;
166
+ calendarValue: string;
167
+ selectInputValue: string;
168
+ l10n: LocalizationProvider;
169
+ }
170
+ declare const datePickerDefaultProps: {
171
+ appearance: Appearance;
172
+ autoFocus: boolean;
173
+ defaultIsOpen: boolean;
174
+ defaultValue: string;
175
+ disabled: string[];
176
+ disabledDateFilter: (_: string) => boolean;
177
+ hideIcon: boolean;
178
+ icon: import("react").ComponentType<DropdownIndicatorProps<OptionType, boolean, import("@atlaskit/select").GroupType<OptionType>>>;
179
+ id: string;
180
+ innerProps: {};
181
+ isDisabled: boolean;
182
+ isInvalid: boolean;
183
+ name: string;
184
+ onBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
185
+ onChange: (value: string) => void;
186
+ onFocus: (event: React.FocusEvent<HTMLInputElement>) => void;
187
+ selectProps: {};
188
+ spacing: Spacing;
189
+ locale: string;
190
+ };
191
+ declare class DatePicker extends Component<DatePickerProps, State> {
192
+ static defaultProps: {
193
+ appearance: Appearance;
194
+ autoFocus: boolean;
195
+ defaultIsOpen: boolean;
196
+ defaultValue: string;
197
+ disabled: string[];
198
+ disabledDateFilter: (_: string) => boolean;
199
+ hideIcon: boolean;
200
+ icon: import("react").ComponentType<DropdownIndicatorProps<OptionType, boolean, import("@atlaskit/select").GroupType<OptionType>>>;
201
+ id: string;
202
+ innerProps: {};
203
+ isDisabled: boolean;
204
+ isInvalid: boolean;
205
+ name: string;
206
+ onBlur: (event: import("react").FocusEvent<HTMLInputElement>) => void;
207
+ onChange: (value: string) => void;
208
+ onFocus: (event: import("react").FocusEvent<HTMLInputElement>) => void;
209
+ selectProps: {};
210
+ spacing: Spacing;
211
+ locale: string;
212
+ };
213
+ calendarRef: CalendarRef | null;
214
+ containerRef: HTMLElement | null;
215
+ constructor(props: any);
216
+ UNSAFE_componentWillReceiveProps(nextProps: Readonly<DatePickerProps>): void;
217
+ getSafeState: () => {
218
+ inputValue: any;
219
+ isOpen: boolean;
220
+ value: string;
221
+ isFocused: boolean;
222
+ clearingFromIcon: boolean;
223
+ calendarValue: string;
224
+ selectInputValue: string;
225
+ l10n: LocalizationProvider;
226
+ };
227
+ isDateDisabled: (date: string) => boolean;
228
+ onCalendarChange: ({ iso }: {
229
+ iso: string;
230
+ }) => void;
231
+ onCalendarSelect: ({ iso }: {
232
+ iso: string;
233
+ }) => void;
234
+ onInputClick: () => void;
235
+ onSelectBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
236
+ onSelectFocus: (event: React.FocusEvent<HTMLInputElement>) => void;
237
+ onTextInput: (event: React.ChangeEvent<HTMLInputElement>) => void;
238
+ getSafeCalendarValue: (calendarValue: string) => string;
239
+ onInputKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
240
+ onClear: () => void;
241
+ onSelectChange: (value: ValueType<OptionType>, action: ActionMeta) => void;
242
+ refCalendar: (ref: CalendarRef | null) => void;
243
+ handleSelectInputChange: (selectInputValue: string, actionMeta: {}) => void;
244
+ getContainerRef: (ref: HTMLElement | null) => void;
245
+ /**
246
+ * There are two props that can change how the date is parsed.
247
+ * The priority of props used is:
248
+ * 1. parseInputValue
249
+ * 2. locale
250
+ */
251
+ parseDate: (date: string) => Date;
252
+ /**
253
+ * There are multiple props that can change how the date is formatted.
254
+ * The priority of props used is:
255
+ * 1. formatDisplayLabel
256
+ * 2. dateFormat
257
+ * 3. locale
258
+ */
259
+ formatDate: (value: string) => string;
260
+ getPlaceholder: () => string;
261
+ render(): jsx.JSX.Element;
262
+ }
263
+ export { DatePicker as DatePickerWithoutAnalytics };
264
+ declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps, keyof WithAnalyticsEventsProps>, "testId" | "maxDate" | "minDate" | "isOpen" | "nextMonthLabel" | "parseInputValue" | "formatDisplayLabel" | "previousMonthLabel" | "value" | "dateFormat" | "placeholder" | "weekStartDay"> & Partial<Pick<Omit<DatePickerProps, keyof WithAnalyticsEventsProps>, "icon" | "disabled" | "appearance" | "autoFocus" | "defaultIsOpen" | "defaultValue" | "disabledDateFilter" | "id" | "innerProps" | "isDisabled" | "name" | "onBlur" | "onChange" | "onFocus" | "selectProps" | "spacing" | "isInvalid" | "hideIcon" | "locale">> & Partial<Pick<{
265
+ appearance: Appearance;
266
+ autoFocus: boolean;
267
+ defaultIsOpen: boolean;
268
+ defaultValue: string;
269
+ disabled: string[];
270
+ disabledDateFilter: (_: string) => boolean;
271
+ hideIcon: boolean;
272
+ icon: import("react").ComponentType<DropdownIndicatorProps<OptionType, boolean, import("@atlaskit/select").GroupType<OptionType>>>;
273
+ id: string;
274
+ innerProps: {};
275
+ isDisabled: boolean;
276
+ isInvalid: boolean;
277
+ name: string;
278
+ onBlur: (event: import("react").FocusEvent<HTMLInputElement>) => void;
279
+ onChange: (value: string) => void;
280
+ onFocus: (event: import("react").FocusEvent<HTMLInputElement>) => void;
281
+ selectProps: {};
282
+ spacing: Spacing;
283
+ locale: string;
284
+ }, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "testId" | "icon" | "disabled" | "appearance" | "autoFocus" | "defaultIsOpen" | "defaultValue" | "disabledDateFilter" | "maxDate" | "minDate" | "id" | "innerProps" | "isDisabled" | "isOpen" | "name" | "nextMonthLabel" | "onBlur" | "onChange" | "onFocus" | "parseInputValue" | "formatDisplayLabel" | "previousMonthLabel" | "selectProps" | "spacing" | "value" | "isInvalid" | "hideIcon" | "dateFormat" | "placeholder" | "locale" | "weekStartDay" | "key" | "analyticsContext"> & import("react").RefAttributes<any>>;
285
+ export default _default;
@@ -0,0 +1,220 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
5
+ import { SelectProps } from '@atlaskit/select';
6
+ import { Appearance, Spacing } from '../types';
7
+ import { DatePickerBaseProps as DatePickerProps } from './date-picker';
8
+ import { TimePickerBaseProps as TimePickerProps } from './time-picker';
9
+ export interface DateTimePickerBaseProps extends WithAnalyticsEventsProps {
10
+ /**
11
+ * Set the appearance of the picker.
12
+ *
13
+ * `subtle` will remove the borders and background.
14
+ */
15
+ appearance?: Appearance;
16
+ /**
17
+ * Set the picker to autofocus on mount.
18
+ */
19
+ autoFocus?: boolean;
20
+ /**
21
+ * The default for `value`.
22
+ */
23
+ defaultValue?: string;
24
+ /**
25
+ * The id of the field. Currently, react-select transforms this to have a `react-select-` prefix, and an `--input` suffix when applied to the input. For example, the id `my-input` would be transformed to `react-select-my-input--input`.
26
+ * Keep this in mind when needing to refer to the ID. This will be fixed in an upcoming release.
27
+ */
28
+ id?: string;
29
+ /**
30
+ * Props to apply to the container. *
31
+ */
32
+ innerProps?: React.AllHTMLAttributes<HTMLElement>;
33
+ /**
34
+ * Set if the field is disabled.
35
+ */
36
+ isDisabled?: boolean;
37
+ /**
38
+ * The name of the field.
39
+ */
40
+ name?: string;
41
+ /**
42
+ * Called when the field is blurred.
43
+ */
44
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
45
+ /**
46
+ * Called when the value changes and the date / time is a complete value, or empty. The only value is an ISO string or empty string.
47
+ */
48
+ onChange?: (value: string) => void;
49
+ /**
50
+ * Called when the field is focused.
51
+ */
52
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
53
+ /**
54
+ * The ISO time that should be used as the input value.
55
+ */
56
+ value?: string;
57
+ /**
58
+ * Set if users can edit the input, allowing them to add custom times.
59
+ */
60
+ timeIsEditable?: boolean;
61
+ /**
62
+ * Set if the picker has an invalid value.
63
+ */
64
+ isInvalid?: boolean;
65
+ /**
66
+ * Format the date with a string that is accepted by [date-fns's format function](https://date-fns.org/v1.29.0/docs/format).
67
+ */
68
+ dateFormat?: string;
69
+ /**
70
+ * Props applied to the `DatePicker`.
71
+ */
72
+ datePickerProps?: DatePickerProps;
73
+ /**
74
+ * Props applied to the `TimePicker`.
75
+ */
76
+ timePickerProps?: TimePickerProps;
77
+ /**
78
+ * Function used to parse datetime values into their date, time and timezone sub-values. *
79
+ */
80
+ parseValue?: (dateTimeValue: string, date: string, time: string, timezone: string) => {
81
+ dateValue: string;
82
+ timeValue: string;
83
+ zoneValue: string;
84
+ };
85
+ /**
86
+ * [Select props](/components/select) to pass onto the `DatePicker` component's `Select`. This can be used to set options such as placeholder text.
87
+ */
88
+ datePickerSelectProps?: SelectProps<any>;
89
+ /**
90
+ * [Select props](/components/select) to pass onto the `TimePicker` component's `Select`. This can be used to set options such as placeholder text.
91
+ */
92
+ timePickerSelectProps?: SelectProps<any>;
93
+ /**
94
+ * The times shown by the `TimePicker`.
95
+ */
96
+ times?: Array<string>;
97
+ /**
98
+ * The format that times are displayed in. Values should be those accepted by [date-fns's format function](https://date-fns.org/v1.29.0/docs/format).
99
+ */
100
+ timeFormat?: string;
101
+ /**
102
+ * The spacing for the select control.
103
+ *
104
+ * Compact is `gridSize() * 4`, default is `gridSize() * 5`.
105
+ */
106
+ spacing?: Spacing;
107
+ /**
108
+ * Locale used for formatting dates and times. See [DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat).
109
+ */
110
+ locale?: string;
111
+ /**
112
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
113
+ * - `{testId}--datepicker--container` wrapping element of date-picker
114
+ * - `{testId}--timepicker--container` wrapping element of time-picker
115
+ */
116
+ testId?: string;
117
+ }
118
+ type DateTimePickerProps = typeof dateTimePickerDefaultProps & DateTimePickerBaseProps;
119
+ interface State {
120
+ active: 0 | 1 | 2;
121
+ dateValue: string;
122
+ isFocused: boolean;
123
+ timeValue: string;
124
+ value: string;
125
+ zoneValue: string;
126
+ }
127
+ declare const dateTimePickerDefaultProps: {
128
+ appearance: string;
129
+ autoFocus: boolean;
130
+ isDisabled: boolean;
131
+ name: string;
132
+ onBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
133
+ onChange: (value: string) => void;
134
+ onFocus: (event: React.FocusEvent<HTMLInputElement>) => void;
135
+ innerProps: {};
136
+ id: string;
137
+ defaultValue: string;
138
+ timeIsEditable: boolean;
139
+ isInvalid: boolean;
140
+ datePickerProps: {};
141
+ timePickerProps: {};
142
+ datePickerSelectProps: {};
143
+ timePickerSelectProps: {};
144
+ times: string[];
145
+ spacing: string;
146
+ locale: string;
147
+ };
148
+ export declare const datePickerDefaultAriaLabel = "Date";
149
+ export declare const timePickerDefaultAriaLabel = "Time";
150
+ declare class DateTimePicker extends React.Component<DateTimePickerProps, State> {
151
+ static defaultProps: {
152
+ appearance: string;
153
+ autoFocus: boolean;
154
+ isDisabled: boolean;
155
+ name: string;
156
+ onBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
157
+ onChange: (value: string) => void;
158
+ onFocus: (event: React.FocusEvent<HTMLInputElement>) => void;
159
+ innerProps: {};
160
+ id: string;
161
+ defaultValue: string;
162
+ timeIsEditable: boolean;
163
+ isInvalid: boolean;
164
+ datePickerProps: {};
165
+ timePickerProps: {};
166
+ datePickerSelectProps: {};
167
+ timePickerSelectProps: {};
168
+ times: string[];
169
+ spacing: string;
170
+ locale: string;
171
+ };
172
+ state: State;
173
+ getSafeState: () => {
174
+ dateValue: string;
175
+ timeValue: string;
176
+ zoneValue: string;
177
+ value: string;
178
+ active: 0 | 1 | 2;
179
+ isFocused: boolean;
180
+ };
181
+ parseValue(value: string, dateValue: string, timeValue: string, zoneValue: string): {
182
+ dateValue: string;
183
+ timeValue: string;
184
+ zoneValue: string;
185
+ };
186
+ onBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
187
+ onFocus: (event: React.FocusEvent<HTMLInputElement>) => void;
188
+ onDateChange: (dateValue: string) => void;
189
+ onTimeChange: (timeValue: string) => void;
190
+ onClear: () => void;
191
+ onValueChange({ dateValue, timeValue, zoneValue, }: {
192
+ dateValue: string;
193
+ timeValue: string;
194
+ zoneValue: string;
195
+ }): void;
196
+ render(): jsx.JSX.Element;
197
+ }
198
+ export { DateTimePicker as DateTimePickerWithoutAnalytics };
199
+ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DateTimePickerProps, keyof WithAnalyticsEventsProps>, "testId" | "value" | "dateFormat" | "timeFormat" | "parseValue"> & Partial<Pick<Omit<DateTimePickerProps, keyof WithAnalyticsEventsProps>, "times" | "appearance" | "autoFocus" | "defaultValue" | "id" | "innerProps" | "isDisabled" | "name" | "onBlur" | "onChange" | "onFocus" | "spacing" | "isInvalid" | "locale" | "timeIsEditable" | "datePickerProps" | "timePickerProps" | "datePickerSelectProps" | "timePickerSelectProps">> & Partial<Pick<{
200
+ appearance: string;
201
+ autoFocus: boolean;
202
+ isDisabled: boolean;
203
+ name: string;
204
+ onBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
205
+ onChange: (value: string) => void;
206
+ onFocus: (event: React.FocusEvent<HTMLInputElement>) => void;
207
+ innerProps: {};
208
+ id: string;
209
+ defaultValue: string;
210
+ timeIsEditable: boolean;
211
+ isInvalid: boolean;
212
+ datePickerProps: {};
213
+ timePickerProps: {};
214
+ datePickerSelectProps: {};
215
+ timePickerSelectProps: {};
216
+ times: string[];
217
+ spacing: string;
218
+ locale: string;
219
+ }, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "times" | "testId" | "appearance" | "autoFocus" | "defaultValue" | "id" | "innerProps" | "isDisabled" | "name" | "onBlur" | "onChange" | "onFocus" | "spacing" | "value" | "isInvalid" | "dateFormat" | "locale" | "key" | "analyticsContext" | "timeIsEditable" | "timeFormat" | "datePickerProps" | "timePickerProps" | "parseValue" | "datePickerSelectProps" | "timePickerSelectProps"> & React.RefAttributes<any>>;
220
+ export default _default;
@@ -0,0 +1,226 @@
1
+ import React from 'react';
2
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
+ import { LocalizationProvider } from '@atlaskit/locale';
4
+ import { ActionMeta, OptionType, SelectProps, ValueType } from '@atlaskit/select';
5
+ import { Appearance, Spacing } from '../types';
6
+ interface Option {
7
+ label: string;
8
+ value: string;
9
+ }
10
+ export interface TimePickerBaseProps extends WithAnalyticsEventsProps {
11
+ /**
12
+ * Set the appearance of the picker.
13
+ * `subtle` will remove the borders, background, and icon.
14
+ *
15
+ * __NOTE:__ Appearance values will be ignored if styles are parsed through `selectProps`.
16
+ */
17
+ appearance?: Appearance;
18
+ /**
19
+ * Set the picker to autofocus on mount.
20
+ */
21
+ autoFocus?: boolean;
22
+ /**
23
+ * The default for `isOpen`.
24
+ */
25
+ defaultIsOpen?: boolean;
26
+ /**
27
+ * The default for `value`.
28
+ */
29
+ defaultValue?: string;
30
+ /**
31
+ * A function for formatting the displayed time value in the input. By default parses with an internal time parser, and formats using the [date-fns format function]((https://date-fns.org/v1.29.0/docs/format))
32
+ */
33
+ formatDisplayLabel?: (time: string, timeFormat: string) => string;
34
+ /**
35
+ * The id of the field. Currently, react-select transforms this to have a `react-select-` prefix, and an `--input` suffix when applied to the input. For example, the id `my-input` would be transformed to `react-select-my-input--input`. Keep this in mind when needing to refer to the ID. This will be fixed in an upcoming release.
36
+ */
37
+ id?: string;
38
+ /**
39
+ * Props to apply to the container. *
40
+ */
41
+ innerProps?: React.AllHTMLAttributes<HTMLElement>;
42
+ /**
43
+ * Set if the field is disabled.
44
+ */
45
+ isDisabled?: boolean;
46
+ /**
47
+ * Set if the dropdown is open. Will be `false` if not provided.
48
+ */
49
+ isOpen?: boolean;
50
+ /**
51
+ * The name of the field.
52
+ */
53
+ name?: string;
54
+ /**
55
+ * Called when the field is blurred.
56
+ */
57
+ onBlur?: React.FocusEventHandler<HTMLElement>;
58
+ /**
59
+ * Called when the value changes. The only argument is an ISO time or empty string.
60
+ */
61
+ onChange?: (value: string) => void;
62
+ /**
63
+ * Called when the field is focused.
64
+ */
65
+ onFocus?: React.FocusEventHandler<HTMLElement>;
66
+ parseInputValue?: (time: string, timeFormat: string) => string | Date;
67
+ /**
68
+ * Props to apply to the select.
69
+ */
70
+ selectProps?: SelectProps<any>;
71
+ /**
72
+ * The spacing for the select control.
73
+ *
74
+ * Compact is `gridSize() * 4`, default is `gridSize * 5`.
75
+ */
76
+ spacing?: Spacing;
77
+ /**
78
+ * The times shown in the dropdown.
79
+ */
80
+ times?: string[];
81
+ /**
82
+ * Set if users can edit the input, allowing them to add custom times.
83
+ */
84
+ timeIsEditable?: boolean;
85
+ /**
86
+ * The ISO time that should be used as the input value.
87
+ */
88
+ value?: string;
89
+ /**
90
+ * Set if the picker has an invalid value.
91
+ */
92
+ isInvalid?: boolean;
93
+ /**
94
+ * Hides icon for dropdown indicator.
95
+ */
96
+ hideIcon?: boolean;
97
+ /**
98
+ * Time format that is accepted by [date-fns's format function](https://date-fns.org/v1.29.0/docs/format).
99
+ */
100
+ timeFormat?: string;
101
+ /**
102
+ * Placeholder text displayed in input.
103
+ */
104
+ placeholder?: string;
105
+ /**
106
+ * Locale used to format the time. See [DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat).
107
+ */
108
+ locale?: string;
109
+ /**
110
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests:
111
+ * - `{testId}--container` wrapping element of time-picker
112
+ */
113
+ testId?: string;
114
+ }
115
+ type TimePickerProps = typeof timePickerDefaultProps & TimePickerBaseProps;
116
+ interface State {
117
+ isOpen: boolean;
118
+ /**
119
+ * When being cleared from the icon the TimePicker is blurred.
120
+ * This variable defines whether the default onMenuOpen or onMenuClose
121
+ * events should behave as normal
122
+ */
123
+ clearingFromIcon: boolean;
124
+ value: string;
125
+ isFocused: boolean;
126
+ l10n: LocalizationProvider;
127
+ }
128
+ declare const timePickerDefaultProps: {
129
+ appearance: Appearance;
130
+ autoFocus: boolean;
131
+ defaultIsOpen: boolean;
132
+ defaultValue: string;
133
+ hideIcon: boolean;
134
+ id: string;
135
+ innerProps: {};
136
+ isDisabled: boolean;
137
+ isInvalid: boolean;
138
+ name: string;
139
+ onBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
140
+ onChange: (value: string) => void;
141
+ onFocus: (event: React.FocusEvent<HTMLInputElement>) => void;
142
+ parseInputValue: (time: string, timeFormat: string) => string | Date;
143
+ selectProps: {};
144
+ spacing: Spacing;
145
+ times: string[];
146
+ timeIsEditable: boolean;
147
+ locale: string;
148
+ };
149
+ declare class TimePicker extends React.Component<TimePickerProps, State> {
150
+ containerRef: HTMLElement | null;
151
+ static defaultProps: {
152
+ appearance: Appearance;
153
+ autoFocus: boolean;
154
+ defaultIsOpen: boolean;
155
+ defaultValue: string;
156
+ hideIcon: boolean;
157
+ id: string;
158
+ innerProps: {};
159
+ isDisabled: boolean;
160
+ isInvalid: boolean;
161
+ name: string;
162
+ onBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
163
+ onChange: (value: string) => void;
164
+ onFocus: (event: React.FocusEvent<HTMLInputElement>) => void;
165
+ parseInputValue: (time: string, timeFormat: string) => string | Date;
166
+ selectProps: {};
167
+ spacing: Spacing;
168
+ times: string[];
169
+ timeIsEditable: boolean;
170
+ locale: string;
171
+ };
172
+ state: {
173
+ isOpen: boolean;
174
+ clearingFromIcon: boolean;
175
+ value: string;
176
+ isFocused: boolean;
177
+ l10n: LocalizationProvider;
178
+ };
179
+ UNSAFE_componentWillReceiveProps(nextProps: TimePickerProps): void;
180
+ getSafeState: () => State;
181
+ getOptions(): Array<Option>;
182
+ onChange: (newValue: ValueType<OptionType> | string, action?: ActionMeta<OptionType>) => void;
183
+ /**
184
+ * Only allow custom times if timeIsEditable prop is true
185
+ */
186
+ onCreateOption: (inputValue: string) => void;
187
+ onMenuOpen: () => void;
188
+ onMenuClose: () => void;
189
+ setContainerRef: (ref: HTMLElement | null) => void;
190
+ onBlur: (event: React.FocusEvent<HTMLElement>) => void;
191
+ onFocus: (event: React.FocusEvent<HTMLElement>) => void;
192
+ onSelectKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
193
+ /**
194
+ * There are multiple props that can change how the time is formatted.
195
+ * The priority of props used is:
196
+ * 1. formatDisplayLabel
197
+ * 2. timeFormat
198
+ * 3. locale
199
+ */
200
+ formatTime: (time: string) => string;
201
+ getPlaceholder: () => string;
202
+ render(): JSX.Element;
203
+ }
204
+ export { TimePicker as TimePickerWithoutAnalytics };
205
+ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePickerProps, keyof WithAnalyticsEventsProps>, "testId" | "isOpen" | "formatDisplayLabel" | "value" | "placeholder" | "timeFormat"> & Partial<Pick<Omit<TimePickerProps, keyof WithAnalyticsEventsProps>, "times" | "appearance" | "autoFocus" | "defaultIsOpen" | "defaultValue" | "id" | "innerProps" | "isDisabled" | "name" | "onBlur" | "onChange" | "onFocus" | "parseInputValue" | "selectProps" | "spacing" | "isInvalid" | "hideIcon" | "locale" | "timeIsEditable">> & Partial<Pick<{
206
+ appearance: Appearance;
207
+ autoFocus: boolean;
208
+ defaultIsOpen: boolean;
209
+ defaultValue: string;
210
+ hideIcon: boolean;
211
+ id: string;
212
+ innerProps: {};
213
+ isDisabled: boolean;
214
+ isInvalid: boolean;
215
+ name: string;
216
+ onBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
217
+ onChange: (value: string) => void;
218
+ onFocus: (event: React.FocusEvent<HTMLInputElement>) => void;
219
+ parseInputValue: (time: string, timeFormat: string) => string | Date;
220
+ selectProps: {};
221
+ spacing: Spacing;
222
+ times: string[];
223
+ timeIsEditable: boolean;
224
+ locale: string;
225
+ }, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "times" | "testId" | "appearance" | "autoFocus" | "defaultIsOpen" | "defaultValue" | "id" | "innerProps" | "isDisabled" | "isOpen" | "name" | "onBlur" | "onChange" | "onFocus" | "parseInputValue" | "formatDisplayLabel" | "selectProps" | "spacing" | "value" | "isInvalid" | "hideIcon" | "placeholder" | "locale" | "key" | "analyticsContext" | "timeIsEditable" | "timeFormat"> & React.RefAttributes<any>>;
226
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare function convertTokens(format: string): string;
@@ -0,0 +1,7 @@
1
+ export { default as DatePicker } from './components/date-picker';
2
+ export type { DatePickerBaseProps as DatePickerProps } from './components/date-picker';
3
+ export { default as TimePicker } from './components/time-picker';
4
+ export type { TimePickerBaseProps as TimePickerProps } from './components/time-picker';
5
+ export { default as DateTimePicker } from './components/date-time-picker';
6
+ export type { DateTimePickerBaseProps as DateTimePickerProps } from './components/date-time-picker';
7
+ export type { Appearance, Spacing } from './types';
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ interface FixedLayerProps {
3
+ /**
4
+ * A ref to the container that the content should be layered around for height calculation
5
+ * purposes. This must be an ancestor element as component does not attach the layered content around
6
+ * the ref itself.
7
+ */
8
+ containerRef: HTMLElement | null;
9
+ /**
10
+ * The content to render in the layer.
11
+ */
12
+ content: React.ReactNode;
13
+ /**
14
+ * input value from the menu.
15
+ */
16
+ inputValue: string;
17
+ /**
18
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
19
+ * - `{testId}--popper-container` wrapping element of time-picker
20
+ */
21
+ testId?: string;
22
+ }
23
+ /**
24
+ * This component renders layered content with fixed positioning.
25
+ * Scroll is locked outside the layer to prevent the layered content from detaching from the
26
+ * container ref.
27
+ */
28
+ export default class FixedLayer extends React.Component<FixedLayerProps> {
29
+ update: () => void;
30
+ componentDidUpdate(prevProps: any): void;
31
+ render(): JSX.Element;
32
+ }
33
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare const EmptyComponent: () => null;
2
+ export declare const placeholderDatetime: Date;
3
+ export declare const defaultTimes: string[];
4
+ export declare const defaultTimeFormat = "h:mma";
5
+ export declare const defaultDateFormat = "YYYY/MM/DD";
6
+ export declare function padToTwo(number: number): string;
7
+ export declare function formatDateTimeZoneIntoIso(date: string, time: string, zone: string): string;
@@ -0,0 +1,14 @@
1
+ export declare function isValid(timeString: string): boolean;
2
+ export declare function removeSpacer(time: string): string;
3
+ export declare function formatSemi24(time: string): string;
4
+ export declare function checkHour(hour: string, meridiem: string): string | null;
5
+ export declare function checkMinute(minute: string): string | null;
6
+ export declare function convertTo24hrTime(time: string): {
7
+ hour: number;
8
+ minute: number;
9
+ } | null;
10
+ export declare function assignToDate(time: {
11
+ hour: number;
12
+ minute: number;
13
+ }): Date;
14
+ export default function (time: string): string | Date;
@@ -0,0 +1,3 @@
1
+ export type Appearance = 'default' | 'subtle' | 'none';
2
+ export type Spacing = 'compact' | 'default';
3
+ export type SelectProps = any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "12.5.1",
3
+ "version": "12.5.3",
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/"
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/calendar": "^13.1.0",
37
37
  "@atlaskit/ds-lib": "^2.2.0",
38
38
  "@atlaskit/icon": "^21.12.0",
39
- "@atlaskit/locale": "^2.4.0",
39
+ "@atlaskit/locale": "^2.5.0",
40
40
  "@atlaskit/popper": "^5.5.0",
41
41
  "@atlaskit/select": "^16.2.0",
42
42
  "@atlaskit/theme": "^12.5.0",