@atlaskit/datetime-picker 13.0.12 → 13.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/datetime-picker
2
2
 
3
+ ## 13.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#79261](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/79261) [`d679c084e0a9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d679c084e0a9) - Add optional `label` prop to DatePicker and TimePicker to supply an accessible name via `aria-label`
8
+
3
9
  ## 13.0.12
4
10
 
5
11
  ### Patch Changes
@@ -36,7 +36,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
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; } } /** @jsx jsx */
38
38
  var packageName = "@atlaskit/datetime-picker";
39
- var packageVersion = "13.0.12";
39
+ var packageVersion = "13.1.0";
40
40
  var datePickerDefaultProps = {
41
41
  appearance: 'default',
42
42
  autoFocus: false,
@@ -52,6 +52,7 @@ var datePickerDefaultProps = {
52
52
  innerProps: {},
53
53
  isDisabled: false,
54
54
  isInvalid: false,
55
+ label: '',
55
56
  name: '',
56
57
  // These disables are here for proper typing when used as defaults. They
57
58
  // should *not* use the `noop` function.
@@ -359,6 +360,7 @@ var DatePicker = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Co
359
360
  maxDate = _this$props3.maxDate,
360
361
  minDate = _this$props3.minDate,
361
362
  isInvalid = _this$props3.isInvalid,
363
+ label = _this$props3.label,
362
364
  name = _this$props3.name,
363
365
  nextMonthLabel = _this$props3.nextMonthLabel,
364
366
  previousMonthLabel = _this$props3.previousMonthLabel,
@@ -430,6 +432,7 @@ var DatePicker = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Co
430
432
  value: value,
431
433
  "data-testid": testId && "".concat(testId, "--input")
432
434
  }), (0, _react2.jsx)(_select.default, (0, _extends2.default)({
435
+ "aria-label": label || undefined,
433
436
  appearance: this.props.appearance,
434
437
  enableAnimation: false,
435
438
  menuIsOpen: menuIsOpen,
@@ -31,7 +31,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
31
31
  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; }
32
32
  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; } /** @jsx jsx */
33
33
  var packageName = "@atlaskit/datetime-picker";
34
- var packageVersion = "13.0.12";
34
+ var packageVersion = "13.1.0";
35
35
  // Make DatePicker 50% the width of DateTimePicker
36
36
  // If rendering an icon container, shrink the TimePicker
37
37
  var datePickerContainerStyles = (0, _react2.css)({
@@ -240,11 +240,11 @@ var DateTimePicker = exports.DateTimePickerWithoutAnalytics = /*#__PURE__*/funct
240
240
  var _timePickerSelectProp = timePickerSelectProps.styles,
241
241
  timePickerStyles = _timePickerSelectProp === void 0 ? {} : _timePickerSelectProp;
242
242
  var mergedDatePickerSelectProps = _objectSpread(_objectSpread({}, datePickerSelectProps), {}, {
243
- 'aria-label': datePickerSelectProps['aria-label'] || datePickerDefaultAriaLabel,
243
+ 'aria-label': datePickerProps['label'] || datePickerSelectProps['aria-label'] || datePickerDefaultAriaLabel,
244
244
  styles: (0, _select.mergeStyles)(styles, datePickerStyles)
245
245
  });
246
246
  var mergedTimePickerSelectProps = _objectSpread(_objectSpread({}, timePickerSelectProps), {}, {
247
- 'aria-label': timePickerSelectProps['aria-label'] || timePickerDefaultAriaLabel,
247
+ 'aria-label': timePickerProps['label'] || timePickerSelectProps['aria-label'] || timePickerDefaultAriaLabel,
248
248
  styles: (0, _select.mergeStyles)(styles, timePickerStyles)
249
249
  });
250
250
 
@@ -36,7 +36,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
36
36
  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-next-line no-restricted-imports
37
37
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
38
38
  var packageName = "@atlaskit/datetime-picker";
39
- var packageVersion = "13.0.12";
39
+ var packageVersion = "13.1.0";
40
40
  var menuStyles = {
41
41
  /* Need to remove default absolute positioning as that causes issues with position fixed */
42
42
  position: 'static',
@@ -55,6 +55,7 @@ var timePickerDefaultProps = {
55
55
  innerProps: {},
56
56
  isDisabled: false,
57
57
  isInvalid: false,
58
+ label: '',
58
59
  name: '',
59
60
  // These disables are here for proper typing when used as defaults. They
60
61
  // should *not* use the `noop` function.
@@ -205,6 +206,7 @@ var TimePicker = exports.TimePickerWithoutAnalytics = /*#__PURE__*/function (_Re
205
206
  id = _this$props2.id,
206
207
  innerProps = _this$props2.innerProps,
207
208
  isDisabled = _this$props2.isDisabled,
209
+ label = _this$props2.label,
208
210
  locale = _this$props2.locale,
209
211
  name = _this$props2.name,
210
212
  placeholder = _this$props2.placeholder,
@@ -298,6 +300,7 @@ var TimePicker = exports.TimePickerWithoutAnalytics = /*#__PURE__*/function (_Re
298
300
  "data-testid": testId && "".concat(testId, "--input"),
299
301
  onKeyDown: this.onSelectKeyDown
300
302
  }), /*#__PURE__*/_react.default.createElement(SelectComponent, (0, _extends2.default)({
303
+ "aria-label": label || undefined,
301
304
  appearance: appearance,
302
305
  autoFocus: autoFocus,
303
306
  components: selectComponents,
@@ -16,7 +16,7 @@ import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date'
16
16
  import { convertTokens } from '../internal/parse-tokens';
17
17
  import { makeSingleValue } from '../internal/single-value';
18
18
  const packageName = "@atlaskit/datetime-picker";
19
- const packageVersion = "13.0.12";
19
+ const packageVersion = "13.1.0";
20
20
  const datePickerDefaultProps = {
21
21
  appearance: 'default',
22
22
  autoFocus: false,
@@ -30,6 +30,7 @@ const datePickerDefaultProps = {
30
30
  innerProps: {},
31
31
  isDisabled: false,
32
32
  isInvalid: false,
33
+ label: '',
33
34
  name: '',
34
35
  // These disables are here for proper typing when used as defaults. They
35
36
  // should *not* use the `noop` function.
@@ -355,6 +356,7 @@ class DatePicker extends Component {
355
356
  maxDate,
356
357
  minDate,
357
358
  isInvalid,
359
+ label,
358
360
  name,
359
361
  nextMonthLabel,
360
362
  previousMonthLabel,
@@ -430,6 +432,7 @@ class DatePicker extends Component {
430
432
  value: value,
431
433
  "data-testid": testId && `${testId}--input`
432
434
  }), jsx(Select, _extends({
435
+ "aria-label": label || undefined,
433
436
  appearance: this.props.appearance,
434
437
  enableAnimation: false,
435
438
  menuIsOpen: menuIsOpen,
@@ -15,7 +15,7 @@ import { convertTokens } from '../internal/parse-tokens';
15
15
  import DatePicker from './date-picker';
16
16
  import TimePicker from './time-picker';
17
17
  const packageName = "@atlaskit/datetime-picker";
18
- const packageVersion = "13.0.12";
18
+ const packageVersion = "13.1.0";
19
19
  // Make DatePicker 50% the width of DateTimePicker
20
20
  // If rendering an icon container, shrink the TimePicker
21
21
  const datePickerContainerStyles = css({
@@ -225,12 +225,12 @@ class DateTimePicker extends React.Component {
225
225
  } = timePickerSelectProps;
226
226
  const mergedDatePickerSelectProps = {
227
227
  ...datePickerSelectProps,
228
- 'aria-label': datePickerSelectProps['aria-label'] || datePickerDefaultAriaLabel,
228
+ 'aria-label': datePickerProps['label'] || datePickerSelectProps['aria-label'] || datePickerDefaultAriaLabel,
229
229
  styles: mergeStyles(styles, datePickerStyles)
230
230
  };
231
231
  const mergedTimePickerSelectProps = {
232
232
  ...timePickerSelectProps,
233
- 'aria-label': timePickerSelectProps['aria-label'] || timePickerDefaultAriaLabel,
233
+ 'aria-label': timePickerProps['label'] || timePickerSelectProps['aria-label'] || timePickerDefaultAriaLabel,
234
234
  styles: mergeStyles(styles, timePickerStyles)
235
235
  };
236
236
 
@@ -16,7 +16,7 @@ import parseTime from '../internal/parse-time';
16
16
  import { convertTokens } from '../internal/parse-tokens';
17
17
  import { makeSingleValue } from '../internal/single-value';
18
18
  const packageName = "@atlaskit/datetime-picker";
19
- const packageVersion = "13.0.12";
19
+ const packageVersion = "13.1.0";
20
20
  const menuStyles = {
21
21
  /* Need to remove default absolute positioning as that causes issues with position fixed */
22
22
  position: 'static',
@@ -35,6 +35,7 @@ const timePickerDefaultProps = {
35
35
  innerProps: {},
36
36
  isDisabled: false,
37
37
  isInvalid: false,
38
+ label: '',
38
39
  name: '',
39
40
  // These disables are here for proper typing when used as defaults. They
40
41
  // should *not* use the `noop` function.
@@ -180,6 +181,7 @@ class TimePicker extends React.Component {
180
181
  id,
181
182
  innerProps,
182
183
  isDisabled,
184
+ label,
183
185
  locale,
184
186
  name,
185
187
  placeholder,
@@ -275,6 +277,7 @@ class TimePicker extends React.Component {
275
277
  "data-testid": testId && `${testId}--input`,
276
278
  onKeyDown: this.onSelectKeyDown
277
279
  }), /*#__PURE__*/React.createElement(SelectComponent, _extends({
280
+ "aria-label": label || undefined,
278
281
  appearance: appearance,
279
282
  autoFocus: autoFocus,
280
283
  components: selectComponents,
@@ -27,7 +27,7 @@ import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date'
27
27
  import { convertTokens } from '../internal/parse-tokens';
28
28
  import { makeSingleValue } from '../internal/single-value';
29
29
  var packageName = "@atlaskit/datetime-picker";
30
- var packageVersion = "13.0.12";
30
+ var packageVersion = "13.1.0";
31
31
  var datePickerDefaultProps = {
32
32
  appearance: 'default',
33
33
  autoFocus: false,
@@ -43,6 +43,7 @@ var datePickerDefaultProps = {
43
43
  innerProps: {},
44
44
  isDisabled: false,
45
45
  isInvalid: false,
46
+ label: '',
46
47
  name: '',
47
48
  // These disables are here for proper typing when used as defaults. They
48
49
  // should *not* use the `noop` function.
@@ -350,6 +351,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
350
351
  maxDate = _this$props3.maxDate,
351
352
  minDate = _this$props3.minDate,
352
353
  isInvalid = _this$props3.isInvalid,
354
+ label = _this$props3.label,
353
355
  name = _this$props3.name,
354
356
  nextMonthLabel = _this$props3.nextMonthLabel,
355
357
  previousMonthLabel = _this$props3.previousMonthLabel,
@@ -421,6 +423,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
421
423
  value: value,
422
424
  "data-testid": testId && "".concat(testId, "--input")
423
425
  }), jsx(Select, _extends({
426
+ "aria-label": label || undefined,
424
427
  appearance: this.props.appearance,
425
428
  enableAnimation: false,
426
429
  menuIsOpen: menuIsOpen,
@@ -25,7 +25,7 @@ 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 = "13.0.12";
28
+ var packageVersion = "13.1.0";
29
29
  // Make DatePicker 50% the width of DateTimePicker
30
30
  // If rendering an icon container, shrink the TimePicker
31
31
  var datePickerContainerStyles = css({
@@ -234,11 +234,11 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
234
234
  var _timePickerSelectProp = timePickerSelectProps.styles,
235
235
  timePickerStyles = _timePickerSelectProp === void 0 ? {} : _timePickerSelectProp;
236
236
  var mergedDatePickerSelectProps = _objectSpread(_objectSpread({}, datePickerSelectProps), {}, {
237
- 'aria-label': datePickerSelectProps['aria-label'] || datePickerDefaultAriaLabel,
237
+ 'aria-label': datePickerProps['label'] || datePickerSelectProps['aria-label'] || datePickerDefaultAriaLabel,
238
238
  styles: mergeStyles(styles, datePickerStyles)
239
239
  });
240
240
  var mergedTimePickerSelectProps = _objectSpread(_objectSpread({}, timePickerSelectProps), {}, {
241
- 'aria-label': timePickerSelectProps['aria-label'] || timePickerDefaultAriaLabel,
241
+ 'aria-label': timePickerProps['label'] || timePickerSelectProps['aria-label'] || timePickerDefaultAriaLabel,
242
242
  styles: mergeStyles(styles, timePickerStyles)
243
243
  });
244
244
 
@@ -28,7 +28,7 @@ import parseTime from '../internal/parse-time';
28
28
  import { convertTokens } from '../internal/parse-tokens';
29
29
  import { makeSingleValue } from '../internal/single-value';
30
30
  var packageName = "@atlaskit/datetime-picker";
31
- var packageVersion = "13.0.12";
31
+ var packageVersion = "13.1.0";
32
32
  var menuStyles = {
33
33
  /* Need to remove default absolute positioning as that causes issues with position fixed */
34
34
  position: 'static',
@@ -47,6 +47,7 @@ var timePickerDefaultProps = {
47
47
  innerProps: {},
48
48
  isDisabled: false,
49
49
  isInvalid: false,
50
+ label: '',
50
51
  name: '',
51
52
  // These disables are here for proper typing when used as defaults. They
52
53
  // should *not* use the `noop` function.
@@ -197,6 +198,7 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
197
198
  id = _this$props2.id,
198
199
  innerProps = _this$props2.innerProps,
199
200
  isDisabled = _this$props2.isDisabled,
201
+ label = _this$props2.label,
200
202
  locale = _this$props2.locale,
201
203
  name = _this$props2.name,
202
204
  placeholder = _this$props2.placeholder,
@@ -290,6 +292,7 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
290
292
  "data-testid": testId && "".concat(testId, "--input"),
291
293
  onKeyDown: this.onSelectKeyDown
292
294
  }), /*#__PURE__*/React.createElement(SelectComponent, _extends({
295
+ "aria-label": label || undefined,
293
296
  appearance: appearance,
294
297
  autoFocus: autoFocus,
295
298
  components: selectComponents,
@@ -34,6 +34,7 @@ declare const datePickerDefaultProps: {
34
34
  innerProps: {};
35
35
  isDisabled: boolean;
36
36
  isInvalid: boolean;
37
+ label: string;
37
38
  name: string;
38
39
  onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
39
40
  onChange: (_value: string) => void;
@@ -56,6 +57,7 @@ declare class DatePicker extends Component<DatePickerProps, State> {
56
57
  innerProps: {};
57
58
  isDisabled: boolean;
58
59
  isInvalid: boolean;
60
+ label: string;
59
61
  name: string;
60
62
  onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
61
63
  onChange: (_value: string) => void;
@@ -119,7 +121,7 @@ declare class DatePicker extends Component<DatePickerProps, State> {
119
121
  render(): jsx.JSX.Element;
120
122
  }
121
123
  export { DatePicker as DatePickerWithoutAnalytics };
122
- declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "testId" | "placeholder" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "value" | "isOpen" | "parseInputValue" | "formatDisplayLabel" | "dateFormat"> & Partial<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "icon" | "disabled" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "locale" | "autoFocus" | "defaultIsOpen" | "name" | "spacing" | "isInvalid" | "hideIcon">> & Partial<Pick<{
124
+ declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "testId" | "placeholder" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "value" | "isOpen" | "parseInputValue" | "formatDisplayLabel" | "dateFormat"> & Partial<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "icon" | "disabled" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "locale" | "autoFocus" | "defaultIsOpen" | "name" | "spacing" | "isInvalid" | "hideIcon">> & Partial<Pick<{
123
125
  appearance: Appearance;
124
126
  autoFocus: boolean;
125
127
  defaultIsOpen: boolean;
@@ -132,6 +134,7 @@ declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit
132
134
  innerProps: {};
133
135
  isDisabled: boolean;
134
136
  isInvalid: boolean;
137
+ label: string;
135
138
  name: string;
136
139
  onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
137
140
  onChange: (_value: string) => void;
@@ -139,5 +142,5 @@ declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit
139
142
  selectProps: {};
140
143
  spacing: Spacing;
141
144
  locale: string;
142
- }, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "testId" | "icon" | "disabled" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "value" | "autoFocus" | "defaultIsOpen" | "isOpen" | "name" | "parseInputValue" | "formatDisplayLabel" | "spacing" | "isInvalid" | "hideIcon" | "dateFormat"> & import("react").RefAttributes<any>>;
145
+ }, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "testId" | "label" | "icon" | "disabled" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "value" | "autoFocus" | "defaultIsOpen" | "isOpen" | "name" | "parseInputValue" | "formatDisplayLabel" | "spacing" | "isInvalid" | "hideIcon" | "dateFormat"> & import("react").RefAttributes<any>>;
143
146
  export default _default;
@@ -23,6 +23,7 @@ declare const timePickerDefaultProps: {
23
23
  innerProps: {};
24
24
  isDisabled: boolean;
25
25
  isInvalid: boolean;
26
+ label: string;
26
27
  name: string;
27
28
  onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
28
29
  onChange: (_value: string) => void;
@@ -46,6 +47,7 @@ declare class TimePicker extends React.Component<TimePickerProps, State> {
46
47
  innerProps: {};
47
48
  isDisabled: boolean;
48
49
  isInvalid: boolean;
50
+ label: string;
49
51
  name: string;
50
52
  onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
51
53
  onChange: (_value: string) => void;
@@ -78,7 +80,7 @@ declare class TimePicker extends React.Component<TimePickerProps, State> {
78
80
  render(): JSX.Element;
79
81
  }
80
82
  export { TimePicker as TimePickerWithoutAnalytics };
81
- declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "testId" | "placeholder" | "value" | "isOpen" | "formatDisplayLabel" | "timeFormat"> & Partial<Pick<Omit<TimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "times" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "locale" | "autoFocus" | "defaultIsOpen" | "name" | "parseInputValue" | "spacing" | "isInvalid" | "hideIcon" | "timeIsEditable">> & Partial<Pick<{
83
+ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "testId" | "placeholder" | "value" | "isOpen" | "formatDisplayLabel" | "timeFormat"> & Partial<Pick<Omit<TimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "times" | "label" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "locale" | "autoFocus" | "defaultIsOpen" | "name" | "parseInputValue" | "spacing" | "isInvalid" | "hideIcon" | "timeIsEditable">> & Partial<Pick<{
82
84
  appearance: Appearance;
83
85
  autoFocus: boolean;
84
86
  defaultIsOpen: boolean;
@@ -88,6 +90,7 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePicke
88
90
  innerProps: {};
89
91
  isDisabled: boolean;
90
92
  isInvalid: boolean;
93
+ label: string;
91
94
  name: string;
92
95
  onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
93
96
  onChange: (_value: string) => void;
@@ -98,5 +101,5 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePicke
98
101
  times: string[];
99
102
  timeIsEditable: boolean;
100
103
  locale: string;
101
- }, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "times" | "testId" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "locale" | "analyticsContext" | "value" | "autoFocus" | "defaultIsOpen" | "isOpen" | "name" | "parseInputValue" | "formatDisplayLabel" | "spacing" | "isInvalid" | "hideIcon" | "timeIsEditable" | "timeFormat"> & React.RefAttributes<any>>;
104
+ }, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "times" | "testId" | "label" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "locale" | "analyticsContext" | "value" | "autoFocus" | "defaultIsOpen" | "isOpen" | "name" | "parseInputValue" | "formatDisplayLabel" | "spacing" | "isInvalid" | "hideIcon" | "timeIsEditable" | "timeFormat"> & React.RefAttributes<any>>;
102
105
  export default _default;
@@ -34,6 +34,10 @@ export interface DatePickerBaseProps extends WithAnalyticsEventsProps {
34
34
  * The function is called with a date string in the format `YYYY-MM-DD` and should return `true` if the date should be disabled.
35
35
  */
36
36
  disabledDateFilter?: (date: string) => boolean;
37
+ /**
38
+ * Accessible name for the Date Picker Select, rendered as `aria-label`. This will override any other method of providing a label.
39
+ */
40
+ label?: string;
37
41
  /**
38
42
  * The latest enabled date. Dates after this are disabled on the calendar. This does not affect what users can type into the picker.
39
43
  */
@@ -190,6 +194,10 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps {
190
194
  * Set if the dropdown is open. Will be `false` if not provided.
191
195
  */
192
196
  isOpen?: boolean;
197
+ /**
198
+ * Accessible name for the Time Picker Select, rendered as `aria-label`. This will override any other method of providing a label.
199
+ */
200
+ label?: string;
193
201
  /**
194
202
  * The name of the field.
195
203
  */
@@ -34,6 +34,7 @@ declare const datePickerDefaultProps: {
34
34
  innerProps: {};
35
35
  isDisabled: boolean;
36
36
  isInvalid: boolean;
37
+ label: string;
37
38
  name: string;
38
39
  onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
39
40
  onChange: (_value: string) => void;
@@ -56,6 +57,7 @@ declare class DatePicker extends Component<DatePickerProps, State> {
56
57
  innerProps: {};
57
58
  isDisabled: boolean;
58
59
  isInvalid: boolean;
60
+ label: string;
59
61
  name: string;
60
62
  onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
61
63
  onChange: (_value: string) => void;
@@ -119,7 +121,7 @@ declare class DatePicker extends Component<DatePickerProps, State> {
119
121
  render(): jsx.JSX.Element;
120
122
  }
121
123
  export { DatePicker as DatePickerWithoutAnalytics };
122
- declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "testId" | "placeholder" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "value" | "isOpen" | "parseInputValue" | "formatDisplayLabel" | "dateFormat"> & Partial<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "icon" | "disabled" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "locale" | "autoFocus" | "defaultIsOpen" | "name" | "spacing" | "isInvalid" | "hideIcon">> & Partial<Pick<{
124
+ declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "testId" | "placeholder" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "value" | "isOpen" | "parseInputValue" | "formatDisplayLabel" | "dateFormat"> & Partial<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "icon" | "disabled" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "locale" | "autoFocus" | "defaultIsOpen" | "name" | "spacing" | "isInvalid" | "hideIcon">> & Partial<Pick<{
123
125
  appearance: Appearance;
124
126
  autoFocus: boolean;
125
127
  defaultIsOpen: boolean;
@@ -132,6 +134,7 @@ declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit
132
134
  innerProps: {};
133
135
  isDisabled: boolean;
134
136
  isInvalid: boolean;
137
+ label: string;
135
138
  name: string;
136
139
  onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
137
140
  onChange: (_value: string) => void;
@@ -139,5 +142,5 @@ declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit
139
142
  selectProps: {};
140
143
  spacing: Spacing;
141
144
  locale: string;
142
- }, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "testId" | "icon" | "disabled" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "value" | "autoFocus" | "defaultIsOpen" | "isOpen" | "name" | "parseInputValue" | "formatDisplayLabel" | "spacing" | "isInvalid" | "hideIcon" | "dateFormat"> & import("react").RefAttributes<any>>;
145
+ }, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "testId" | "label" | "icon" | "disabled" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "value" | "autoFocus" | "defaultIsOpen" | "isOpen" | "name" | "parseInputValue" | "formatDisplayLabel" | "spacing" | "isInvalid" | "hideIcon" | "dateFormat"> & import("react").RefAttributes<any>>;
143
146
  export default _default;
@@ -23,6 +23,7 @@ declare const timePickerDefaultProps: {
23
23
  innerProps: {};
24
24
  isDisabled: boolean;
25
25
  isInvalid: boolean;
26
+ label: string;
26
27
  name: string;
27
28
  onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
28
29
  onChange: (_value: string) => void;
@@ -46,6 +47,7 @@ declare class TimePicker extends React.Component<TimePickerProps, State> {
46
47
  innerProps: {};
47
48
  isDisabled: boolean;
48
49
  isInvalid: boolean;
50
+ label: string;
49
51
  name: string;
50
52
  onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
51
53
  onChange: (_value: string) => void;
@@ -78,7 +80,7 @@ declare class TimePicker extends React.Component<TimePickerProps, State> {
78
80
  render(): JSX.Element;
79
81
  }
80
82
  export { TimePicker as TimePickerWithoutAnalytics };
81
- declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "testId" | "placeholder" | "value" | "isOpen" | "formatDisplayLabel" | "timeFormat"> & Partial<Pick<Omit<TimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "times" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "locale" | "autoFocus" | "defaultIsOpen" | "name" | "parseInputValue" | "spacing" | "isInvalid" | "hideIcon" | "timeIsEditable">> & Partial<Pick<{
83
+ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "testId" | "placeholder" | "value" | "isOpen" | "formatDisplayLabel" | "timeFormat"> & Partial<Pick<Omit<TimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "times" | "label" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "locale" | "autoFocus" | "defaultIsOpen" | "name" | "parseInputValue" | "spacing" | "isInvalid" | "hideIcon" | "timeIsEditable">> & Partial<Pick<{
82
84
  appearance: Appearance;
83
85
  autoFocus: boolean;
84
86
  defaultIsOpen: boolean;
@@ -88,6 +90,7 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePicke
88
90
  innerProps: {};
89
91
  isDisabled: boolean;
90
92
  isInvalid: boolean;
93
+ label: string;
91
94
  name: string;
92
95
  onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
93
96
  onChange: (_value: string) => void;
@@ -98,5 +101,5 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePicke
98
101
  times: string[];
99
102
  timeIsEditable: boolean;
100
103
  locale: string;
101
- }, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "times" | "testId" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "locale" | "analyticsContext" | "value" | "autoFocus" | "defaultIsOpen" | "isOpen" | "name" | "parseInputValue" | "formatDisplayLabel" | "spacing" | "isInvalid" | "hideIcon" | "timeIsEditable" | "timeFormat"> & React.RefAttributes<any>>;
104
+ }, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "times" | "testId" | "label" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "locale" | "analyticsContext" | "value" | "autoFocus" | "defaultIsOpen" | "isOpen" | "name" | "parseInputValue" | "formatDisplayLabel" | "spacing" | "isInvalid" | "hideIcon" | "timeIsEditable" | "timeFormat"> & React.RefAttributes<any>>;
102
105
  export default _default;
@@ -34,6 +34,10 @@ export interface DatePickerBaseProps extends WithAnalyticsEventsProps {
34
34
  * The function is called with a date string in the format `YYYY-MM-DD` and should return `true` if the date should be disabled.
35
35
  */
36
36
  disabledDateFilter?: (date: string) => boolean;
37
+ /**
38
+ * Accessible name for the Date Picker Select, rendered as `aria-label`. This will override any other method of providing a label.
39
+ */
40
+ label?: string;
37
41
  /**
38
42
  * The latest enabled date. Dates after this are disabled on the calendar. This does not affect what users can type into the picker.
39
43
  */
@@ -190,6 +194,10 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps {
190
194
  * Set if the dropdown is open. Will be `false` if not provided.
191
195
  */
192
196
  isOpen?: boolean;
197
+ /**
198
+ * Accessible name for the Time Picker Select, rendered as `aria-label`. This will override any other method of providing a label.
199
+ */
200
+ label?: string;
193
201
  /**
194
202
  * The name of the field.
195
203
  */
@@ -1,4 +1,4 @@
1
- import { DatePickerBaseProps } from '../src/components/date-picker';
1
+ import { DatePickerBaseProps } from '../src/types';
2
2
 
3
3
  export default function DatePickerProps(props: DatePickerBaseProps) {
4
4
  return null;
@@ -1,4 +1,4 @@
1
- import { TimePickerBaseProps } from '../src/components/time-picker';
1
+ import { TimePickerBaseProps } from '../src/types';
2
2
 
3
3
  export default function TimePickerProps(props: TimePickerBaseProps) {
4
4
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "13.0.12",
3
+ "version": "13.1.0",
4
4
  "description": "A date time picker allows the user to select an associated date and time.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -46,9 +46,9 @@
46
46
  "@atlaskit/locale": "^2.6.0",
47
47
  "@atlaskit/platform-feature-flags": "^0.2.0",
48
48
  "@atlaskit/popper": "^5.5.0",
49
- "@atlaskit/select": "^17.1.0",
49
+ "@atlaskit/select": "^17.2.0",
50
50
  "@atlaskit/theme": "^12.6.0",
51
- "@atlaskit/tokens": "^1.38.0",
51
+ "@atlaskit/tokens": "^1.39.0",
52
52
  "@babel/runtime": "^7.0.0",
53
53
  "@emotion/react": "^11.7.1",
54
54
  "date-fns": "^2.17.0",
@@ -61,11 +61,12 @@
61
61
  "devDependencies": {
62
62
  "@af/accessibility-testing": "*",
63
63
  "@af/integration-testing": "*",
64
- "@atlaskit/button": "^17.4.0",
64
+ "@af/visual-regression": "*",
65
+ "@atlaskit/button": "^17.7.0",
65
66
  "@atlaskit/docs": "*",
66
67
  "@atlaskit/form": "^9.0.3",
67
68
  "@atlaskit/modal-dialog": "^12.10.0",
68
- "@atlaskit/popup": "^1.12.0",
69
+ "@atlaskit/popup": "^1.13.0",
69
70
  "@atlaskit/range": "^7.1.0",
70
71
  "@atlaskit/section-message": "^6.4.0",
71
72
  "@atlaskit/ssr": "*",