@atlaskit/datetime-picker 15.5.1 → 15.6.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 +21 -0
- package/dist/cjs/components/date-picker-class.js +45 -10
- package/dist/cjs/components/date-picker-fc.js +46 -11
- package/dist/cjs/components/date-time-picker-class.js +6 -6
- package/dist/cjs/components/date-time-picker-fc.js +6 -6
- package/dist/cjs/components/time-picker.js +1 -1
- package/dist/es2019/components/date-picker-class.js +43 -11
- package/dist/es2019/components/date-picker-fc.js +43 -11
- package/dist/es2019/components/date-time-picker-class.js +5 -5
- package/dist/es2019/components/date-time-picker-fc.js +5 -5
- package/dist/es2019/components/time-picker.js +1 -1
- package/dist/esm/components/date-picker-class.js +46 -11
- package/dist/esm/components/date-picker-fc.js +47 -12
- package/dist/esm/components/date-time-picker-class.js +5 -5
- package/dist/esm/components/date-time-picker-fc.js +5 -5
- package/dist/esm/components/time-picker.js +1 -1
- package/dist/types/components/date-picker-class.d.ts +2 -2
- package/dist/types/components/date-picker-fc.d.ts +1 -1
- package/dist/types/components/date-picker.d.ts +3 -3
- package/dist/types/types.d.ts +9 -2
- package/dist/types-ts4.5/components/date-picker-class.d.ts +2 -2
- package/dist/types-ts4.5/components/date-picker-fc.d.ts +1 -1
- package/dist/types-ts4.5/components/date-picker.d.ts +3 -3
- package/dist/types-ts4.5/types.d.ts +9 -2
- package/package.json +10 -4
|
@@ -8,7 +8,7 @@ import React, { forwardRef, useCallback, useEffect, useState } from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { format, isValid, parseISO } from 'date-fns';
|
|
10
10
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
11
|
-
import SelectClearIcon from '@atlaskit/icon/
|
|
11
|
+
import SelectClearIcon from '@atlaskit/icon/utility/migration/cross-circle--select-clear';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
13
|
import { mergeStyles } from '@atlaskit/select';
|
|
14
14
|
import { N500, N70 } from '@atlaskit/theme/colors';
|
|
@@ -21,7 +21,7 @@ import DatePickerNew from './date-picker-fc';
|
|
|
21
21
|
import TimePicker from './time-picker';
|
|
22
22
|
const DatePicker = componentWithCondition(() => fg('dst-date-picker-use-functional-component'), DatePickerNew, DatePickerOld);
|
|
23
23
|
const packageName = "@atlaskit/datetime-picker";
|
|
24
|
-
const packageVersion = "15.
|
|
24
|
+
const packageVersion = "15.6.0";
|
|
25
25
|
const analyticsAttributes = {
|
|
26
26
|
componentName: 'dateTimePicker',
|
|
27
27
|
packageName,
|
|
@@ -355,9 +355,9 @@ const DateTimePicker = /*#__PURE__*/forwardRef(({
|
|
|
355
355
|
tabIndex: -1,
|
|
356
356
|
type: "button"
|
|
357
357
|
}, jsx(SelectClearIcon, {
|
|
358
|
-
|
|
359
|
-
|
|
358
|
+
LEGACY_size: "small",
|
|
359
|
+
color: "currentColor",
|
|
360
360
|
label: clearControlLabel
|
|
361
|
-
})) : null);
|
|
361
|
+
}), ' ') : null);
|
|
362
362
|
});
|
|
363
363
|
export default DateTimePicker;
|
|
@@ -11,7 +11,7 @@ import parseTime from '../internal/parse-time';
|
|
|
11
11
|
import { convertTokens } from '../internal/parse-tokens';
|
|
12
12
|
import { makeSingleValue } from '../internal/single-value';
|
|
13
13
|
const packageName = "@atlaskit/datetime-picker";
|
|
14
|
-
const packageVersion = "15.
|
|
14
|
+
const packageVersion = "15.6.0";
|
|
15
15
|
const menuStyles = {
|
|
16
16
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
17
17
|
position: 'static',
|
|
@@ -24,9 +24,11 @@ import { isValid, parseISO } from 'date-fns';
|
|
|
24
24
|
// the horizon
|
|
25
25
|
import { UID } from 'react-uid';
|
|
26
26
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
27
|
-
import
|
|
27
|
+
import CalendarIconNew from '@atlaskit/icon/core/migration/calendar';
|
|
28
|
+
import CalendarIconOld from '@atlaskit/icon/glyph/calendar';
|
|
28
29
|
import { createLocalizationProvider } from '@atlaskit/locale';
|
|
29
|
-
import {
|
|
30
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
31
|
+
import { Box, Pressable, xcss } from '@atlaskit/primitives';
|
|
30
32
|
import Select, { mergeStyles } from '@atlaskit/select';
|
|
31
33
|
import { N500, N70 } from '@atlaskit/theme/colors';
|
|
32
34
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -37,7 +39,17 @@ import { Menu } from '../internal/menu';
|
|
|
37
39
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
38
40
|
import { makeSingleValue } from '../internal/single-value';
|
|
39
41
|
var packageName = "@atlaskit/datetime-picker";
|
|
40
|
-
var packageVersion = "15.
|
|
42
|
+
var packageVersion = "15.6.0";
|
|
43
|
+
var dropdownIndicatorStyles = xcss({
|
|
44
|
+
minWidth: "var(--ds-space-300, 24px)",
|
|
45
|
+
minHeight: "var(--ds-space-300, 24px)",
|
|
46
|
+
display: 'flex',
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
justifyContent: 'center'
|
|
49
|
+
});
|
|
50
|
+
var CalendarIcon = fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
|
|
51
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
52
|
+
CalendarIconOld;
|
|
41
53
|
var datePickerDefaultProps = {
|
|
42
54
|
defaultIsOpen: false,
|
|
43
55
|
defaultValue: '',
|
|
@@ -76,9 +88,16 @@ var iconContainerStyles = css({
|
|
|
76
88
|
var iconSpacingWithClearButtonStyles = css({
|
|
77
89
|
marginInlineEnd: "var(--ds-space-400, 2rem)"
|
|
78
90
|
});
|
|
91
|
+
var iconSpacingWithoutClearButtonStylesNew = css({
|
|
92
|
+
marginInlineEnd: "var(--ds-space-050, 0.25rem)"
|
|
93
|
+
});
|
|
79
94
|
var iconSpacingWithoutClearButtonStyles = css({
|
|
80
95
|
marginInlineEnd: "var(--ds-space-025, 0.125rem)"
|
|
81
96
|
});
|
|
97
|
+
var calendarButtonFixedSizeStyles = xcss({
|
|
98
|
+
width: "".concat(32 / 14, "em"),
|
|
99
|
+
height: "".concat(32 / 14, "em")
|
|
100
|
+
});
|
|
82
101
|
var calendarButtonStyles = xcss({
|
|
83
102
|
borderRadius: 'border.radius',
|
|
84
103
|
':hover': {
|
|
@@ -415,6 +434,8 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
415
434
|
ariaDescribedBy = _this$props['aria-describedby'],
|
|
416
435
|
_this$props$autoFocus = _this$props.autoFocus,
|
|
417
436
|
autoFocus = _this$props$autoFocus === void 0 ? false : _this$props$autoFocus,
|
|
437
|
+
_this$props$clearCont = _this$props.clearControlLabel,
|
|
438
|
+
clearControlLabel = _this$props$clearCont === void 0 ? 'Clear' : _this$props$clearCont,
|
|
418
439
|
_this$props$hideIcon = _this$props.hideIcon,
|
|
419
440
|
hideIcon = _this$props$hideIcon === void 0 ? false : _this$props$hideIcon,
|
|
420
441
|
_this$props$openCalen = _this$props.openCalendarLabel,
|
|
@@ -422,7 +443,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
422
443
|
disabled = _this$props.disabled,
|
|
423
444
|
disabledDateFilter = _this$props.disabledDateFilter,
|
|
424
445
|
_this$props$icon = _this$props.icon,
|
|
425
|
-
|
|
446
|
+
Icon = _this$props$icon === void 0 ? CalendarIcon : _this$props$icon,
|
|
426
447
|
_this$props$id = _this$props.id,
|
|
427
448
|
id = _this$props$id === void 0 ? '' : _this$props$id,
|
|
428
449
|
_this$props$innerProp = _this$props.innerProps,
|
|
@@ -460,7 +481,17 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
460
481
|
actualSelectInputValue = selectInputValue;
|
|
461
482
|
var menuIsOpen = this.getIsOpen() && !isDisabled;
|
|
462
483
|
var showClearIndicator = Boolean((value || selectInputValue) && !hideIcon);
|
|
463
|
-
var
|
|
484
|
+
var clearIndicator = Icon;
|
|
485
|
+
|
|
486
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
487
|
+
if (fg('platform-visual-refresh-icons') && fg('platform-visual-refresh-icon-ads-migration')) {
|
|
488
|
+
clearIndicator = function clearIndicator(props) {
|
|
489
|
+
return jsx(Box, {
|
|
490
|
+
xcss: dropdownIndicatorStyles
|
|
491
|
+
}, jsx(Icon, props));
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
var dropDownIcon = appearance === 'subtle' || hideIcon || showClearIndicator ? null : clearIndicator;
|
|
464
495
|
var SingleValue = makeSingleValue({
|
|
465
496
|
lang: this.props.locale
|
|
466
497
|
});
|
|
@@ -547,6 +578,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
547
578
|
"aria-describedby": ariaDescribedBy,
|
|
548
579
|
"aria-label": label || undefined,
|
|
549
580
|
autoFocus: autoFocus,
|
|
581
|
+
clearControlLabel: clearControlLabel,
|
|
550
582
|
closeMenuOnSelect: true
|
|
551
583
|
// FOr some reason, this and the below `styles` type error _only_ show
|
|
552
584
|
// up when you alter some of the properties in the `selectComponents`
|
|
@@ -603,7 +635,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
603
635
|
}
|
|
604
636
|
}, function (openCalendarLabelId) {
|
|
605
637
|
return jsx("div", {
|
|
606
|
-
css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : iconSpacingWithoutClearButtonStyles]
|
|
638
|
+
css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : fg('platform-visual-refresh-icon-ads-migration') ? iconSpacingWithoutClearButtonStylesNew : iconSpacingWithoutClearButtonStyles]
|
|
607
639
|
}, inputLabelId && jsx(VisuallyHidden, {
|
|
608
640
|
id: openCalendarLabelId
|
|
609
641
|
}, ", ", openCalendarLabel), jsx(Pressable, _extends({}, inputLabelId ? {
|
|
@@ -617,12 +649,15 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
617
649
|
testId: testId && "".concat(testId, "--open-calendar-button"),
|
|
618
650
|
type: "button",
|
|
619
651
|
backgroundColor: "color.background.neutral.subtle",
|
|
620
|
-
padding:
|
|
621
|
-
xcss: calendarButtonStyles
|
|
622
|
-
}), jsx(CalendarIcon, {
|
|
623
|
-
label: ""
|
|
652
|
+
padding: fg('platform-visual-refresh-icon-ads-migration') ? 'space.0' : 'space.050',
|
|
653
|
+
xcss: [calendarButtonStyles, fg('platform-visual-refresh-icon-ads-migration') && calendarButtonFixedSizeStyles]
|
|
654
|
+
}), jsx(CalendarIcon, _extends({
|
|
655
|
+
label: ""
|
|
656
|
+
}, fg('platform-visual-refresh-icon-ads-migration') ? {
|
|
657
|
+
color: "var(--ds-icon, #44546F)"
|
|
658
|
+
} : {
|
|
624
659
|
primaryColor: "var(--ds-icon, #44546F)"
|
|
625
|
-
})));
|
|
660
|
+
}))));
|
|
626
661
|
}) : null)
|
|
627
662
|
);
|
|
628
663
|
}
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["appearance", "autoFocus", "hideIcon", "openCalendarLabel", "defaultIsOpen", "defaultValue", "disabled", "disabledDateFilter", "icon", "id", "innerProps", "inputLabel", "inputLabelId", "isDisabled", "isInvalid", "isRequired", "label", "name", "onBlur", "onChange", "onFocus", "selectProps", "shouldShowCalendarButton", "spacing", "locale", "value", "isOpen", "maxDate", "minDate", "weekStartDay", "formatDisplayLabel", "testId", "aria-describedby", "placeholder", "nextMonthLabel", "previousMonthLabel"];
|
|
5
|
+
var _excluded = ["appearance", "autoFocus", "clearControlLabel", "hideIcon", "openCalendarLabel", "defaultIsOpen", "defaultValue", "disabled", "disabledDateFilter", "icon", "id", "innerProps", "inputLabel", "inputLabelId", "isDisabled", "isInvalid", "isRequired", "label", "name", "onBlur", "onChange", "onFocus", "selectProps", "shouldShowCalendarButton", "spacing", "locale", "value", "isOpen", "maxDate", "minDate", "weekStartDay", "formatDisplayLabel", "testId", "aria-describedby", "placeholder", "nextMonthLabel", "previousMonthLabel"];
|
|
6
6
|
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; }
|
|
7
7
|
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) { _defineProperty(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; }
|
|
8
8
|
/**
|
|
@@ -19,9 +19,11 @@ import { isValid, parseISO } from 'date-fns';
|
|
|
19
19
|
// the horizon
|
|
20
20
|
import { useUID } from 'react-uid';
|
|
21
21
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
22
|
-
import
|
|
22
|
+
import CalendarIconNew from '@atlaskit/icon/core/migration/calendar';
|
|
23
|
+
import CalendarIconOld from '@atlaskit/icon/glyph/calendar';
|
|
23
24
|
import { createLocalizationProvider } from '@atlaskit/locale';
|
|
24
|
-
import {
|
|
25
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
26
|
+
import { Box, Pressable, xcss } from '@atlaskit/primitives';
|
|
25
27
|
import Select, { mergeStyles } from '@atlaskit/select';
|
|
26
28
|
import { N500, N70 } from '@atlaskit/theme/colors';
|
|
27
29
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -32,7 +34,7 @@ import { Menu } from '../internal/menu';
|
|
|
32
34
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
33
35
|
import { makeSingleValue } from '../internal/single-value';
|
|
34
36
|
var packageName = "@atlaskit/datetime-picker";
|
|
35
|
-
var packageVersion = "15.
|
|
37
|
+
var packageVersion = "15.6.0";
|
|
36
38
|
var analyticsAttributes = {
|
|
37
39
|
componentName: 'datePicker',
|
|
38
40
|
packageName: packageName,
|
|
@@ -41,6 +43,16 @@ var analyticsAttributes = {
|
|
|
41
43
|
var pickerContainerStyles = css({
|
|
42
44
|
position: 'relative'
|
|
43
45
|
});
|
|
46
|
+
var dropdownIndicatorStyles = xcss({
|
|
47
|
+
minWidth: "var(--ds-space-300, 24px)",
|
|
48
|
+
minHeight: "var(--ds-space-300, 24px)",
|
|
49
|
+
display: 'flex',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
justifyContent: 'center'
|
|
52
|
+
});
|
|
53
|
+
var CalendarIcon = fg('platform-visual-refresh-icon-ads-migration') ? CalendarIconNew :
|
|
54
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
55
|
+
CalendarIconOld;
|
|
44
56
|
var iconContainerStyles = css({
|
|
45
57
|
display: 'flex',
|
|
46
58
|
height: '100%',
|
|
@@ -58,9 +70,16 @@ var iconContainerStyles = css({
|
|
|
58
70
|
var iconSpacingWithClearButtonStyles = css({
|
|
59
71
|
marginInlineEnd: "var(--ds-space-400, 2rem)"
|
|
60
72
|
});
|
|
73
|
+
var iconSpacingWithoutClearButtonStylesNew = css({
|
|
74
|
+
marginInlineEnd: "var(--ds-space-050, 0.25rem)"
|
|
75
|
+
});
|
|
61
76
|
var iconSpacingWithoutClearButtonStyles = css({
|
|
62
77
|
marginInlineEnd: "var(--ds-space-025, 0.125rem)"
|
|
63
78
|
});
|
|
79
|
+
var calendarButtonFixedSizeStyles = xcss({
|
|
80
|
+
width: "".concat(32 / 14, "em"),
|
|
81
|
+
height: "".concat(32 / 14, "em")
|
|
82
|
+
});
|
|
64
83
|
var calendarButtonStyles = xcss({
|
|
65
84
|
borderRadius: 'border.radius',
|
|
66
85
|
':hover': {
|
|
@@ -87,6 +106,8 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
87
106
|
appearance = _props$appearance === void 0 ? 'default' : _props$appearance,
|
|
88
107
|
_props$autoFocus = props.autoFocus,
|
|
89
108
|
autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,
|
|
109
|
+
_props$clearControlLa = props.clearControlLabel,
|
|
110
|
+
clearControlLabel = _props$clearControlLa === void 0 ? 'Clear' : _props$clearControlLa,
|
|
90
111
|
_props$hideIcon = props.hideIcon,
|
|
91
112
|
hideIcon = _props$hideIcon === void 0 ? false : _props$hideIcon,
|
|
92
113
|
_props$openCalendarLa = props.openCalendarLabel,
|
|
@@ -102,7 +123,7 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
102
123
|
return false;
|
|
103
124
|
} : _props$disabledDateFi,
|
|
104
125
|
_props$icon = props.icon,
|
|
105
|
-
|
|
126
|
+
Icon = _props$icon === void 0 ? CalendarIcon : _props$icon,
|
|
106
127
|
_props$id = props.id,
|
|
107
128
|
id = _props$id === void 0 ? '' : _props$id,
|
|
108
129
|
_props$innerProps = props.innerProps,
|
|
@@ -449,7 +470,17 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
449
470
|
actualSelectInputValue = selectInputValue;
|
|
450
471
|
var menuIsOpen = getIsOpen() && !isDisabled;
|
|
451
472
|
var showClearIndicator = Boolean((getterValue || selectInputValue) && !hideIcon);
|
|
452
|
-
var
|
|
473
|
+
var clearIndicator = Icon;
|
|
474
|
+
|
|
475
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
476
|
+
if (fg('platform-visual-refresh-icons') && fg('platform-visual-refresh-icon-ads-migration')) {
|
|
477
|
+
clearIndicator = function clearIndicator(props) {
|
|
478
|
+
return jsx(Box, {
|
|
479
|
+
xcss: dropdownIndicatorStyles
|
|
480
|
+
}, jsx(Icon, props));
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
var dropDownIcon = appearance === 'subtle' || hideIcon || showClearIndicator ? null : clearIndicator;
|
|
453
484
|
var SingleValue = makeSingleValue({
|
|
454
485
|
lang: propLocale
|
|
455
486
|
});
|
|
@@ -537,6 +568,7 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
537
568
|
"aria-describedby": ariaDescribedBy,
|
|
538
569
|
"aria-label": label || undefined,
|
|
539
570
|
autoFocus: autoFocus,
|
|
571
|
+
clearControlLabel: clearControlLabel,
|
|
540
572
|
closeMenuOnSelect: true
|
|
541
573
|
// For some reason, this and the below `styles` type error _only_ show
|
|
542
574
|
// up when you alter some of the properties in the `selectComponents`
|
|
@@ -588,7 +620,7 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
588
620
|
previousMonthLabel: previousMonthLabel,
|
|
589
621
|
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay
|
|
590
622
|
})), shouldShowCalendarButton && !isDisabled ? jsx("div", {
|
|
591
|
-
css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : iconSpacingWithoutClearButtonStyles]
|
|
623
|
+
css: [iconContainerStyles, value && !hideIcon ? iconSpacingWithClearButtonStyles : fg('platform-visual-refresh-icon-ads-migration') ? iconSpacingWithoutClearButtonStylesNew : iconSpacingWithoutClearButtonStyles]
|
|
592
624
|
}, inputLabelId && jsx(VisuallyHidden, {
|
|
593
625
|
id: openCalendarLabelId
|
|
594
626
|
}, ", ", openCalendarLabel), jsx(Pressable, _extends({}, inputLabelId ? {
|
|
@@ -602,12 +634,15 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
602
634
|
testId: testId && "".concat(testId, "--open-calendar-button"),
|
|
603
635
|
type: "button",
|
|
604
636
|
backgroundColor: "color.background.neutral.subtle",
|
|
605
|
-
padding:
|
|
606
|
-
xcss: calendarButtonStyles
|
|
607
|
-
}), jsx(CalendarIcon, {
|
|
608
|
-
label: ""
|
|
637
|
+
padding: fg('platform-visual-refresh-icon-ads-migration') ? 'space.0' : 'space.050',
|
|
638
|
+
xcss: [calendarButtonStyles, fg('platform-visual-refresh-icon-ads-migration') && calendarButtonFixedSizeStyles]
|
|
639
|
+
}), jsx(CalendarIcon, _extends({
|
|
640
|
+
label: ""
|
|
641
|
+
}, fg('platform-visual-refresh-icon-ads-migration') ? {
|
|
642
|
+
color: "var(--ds-icon, #44546F)"
|
|
643
|
+
} : {
|
|
609
644
|
primaryColor: "var(--ds-icon, #44546F)"
|
|
610
|
-
}))) : null)
|
|
645
|
+
})))) : null)
|
|
611
646
|
);
|
|
612
647
|
});
|
|
613
648
|
export default DatePicker;
|
|
@@ -19,7 +19,7 @@ import React from 'react';
|
|
|
19
19
|
import { css, jsx } from '@emotion/react';
|
|
20
20
|
import { format, isValid, parseISO } from 'date-fns';
|
|
21
21
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
22
|
-
import SelectClearIcon from '@atlaskit/icon/
|
|
22
|
+
import SelectClearIcon from '@atlaskit/icon/utility/migration/cross-circle--select-clear';
|
|
23
23
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
24
24
|
import { mergeStyles } from '@atlaskit/select';
|
|
25
25
|
import { N500, N70 } from '@atlaskit/theme/colors';
|
|
@@ -34,7 +34,7 @@ var DatePicker = componentWithCondition(function () {
|
|
|
34
34
|
return fg('dst-date-picker-use-functional-component');
|
|
35
35
|
}, DatePickerNew, DatePickerOld);
|
|
36
36
|
var packageName = "@atlaskit/datetime-picker";
|
|
37
|
-
var packageVersion = "15.
|
|
37
|
+
var packageVersion = "15.6.0";
|
|
38
38
|
// Make DatePicker 50% the width of DateTimePicker
|
|
39
39
|
// If rendering an icon container, shrink the TimePicker
|
|
40
40
|
var datePickerContainerStyles = css({
|
|
@@ -399,10 +399,10 @@ var DateTimePickerComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
399
399
|
tabIndex: -1,
|
|
400
400
|
type: "button"
|
|
401
401
|
}, jsx(SelectClearIcon, {
|
|
402
|
-
|
|
403
|
-
|
|
402
|
+
LEGACY_size: "small",
|
|
403
|
+
color: "currentColor",
|
|
404
404
|
label: clearControlLabel
|
|
405
|
-
})) : null);
|
|
405
|
+
}), ' ') : null);
|
|
406
406
|
}
|
|
407
407
|
}]);
|
|
408
408
|
return DateTimePickerComponent;
|
|
@@ -15,7 +15,7 @@ import React, { forwardRef, useCallback, useEffect, useState } from 'react';
|
|
|
15
15
|
import { css, jsx } from '@emotion/react';
|
|
16
16
|
import { format, isValid, parseISO } from 'date-fns';
|
|
17
17
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
18
|
-
import SelectClearIcon from '@atlaskit/icon/
|
|
18
|
+
import SelectClearIcon from '@atlaskit/icon/utility/migration/cross-circle--select-clear';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
20
|
import { mergeStyles } from '@atlaskit/select';
|
|
21
21
|
import { N500, N70 } from '@atlaskit/theme/colors';
|
|
@@ -30,7 +30,7 @@ var DatePicker = componentWithCondition(function () {
|
|
|
30
30
|
return fg('dst-date-picker-use-functional-component');
|
|
31
31
|
}, DatePickerNew, DatePickerOld);
|
|
32
32
|
var packageName = "@atlaskit/datetime-picker";
|
|
33
|
-
var packageVersion = "15.
|
|
33
|
+
var packageVersion = "15.6.0";
|
|
34
34
|
var analyticsAttributes = {
|
|
35
35
|
componentName: 'dateTimePicker',
|
|
36
36
|
packageName: packageName,
|
|
@@ -383,9 +383,9 @@ var DateTimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
383
383
|
tabIndex: -1,
|
|
384
384
|
type: "button"
|
|
385
385
|
}, jsx(SelectClearIcon, {
|
|
386
|
-
|
|
387
|
-
|
|
386
|
+
LEGACY_size: "small",
|
|
387
|
+
color: "currentColor",
|
|
388
388
|
label: clearControlLabel
|
|
389
|
-
})) : null);
|
|
389
|
+
}), ' ') : null);
|
|
390
390
|
});
|
|
391
391
|
export default DateTimePicker;
|
|
@@ -17,7 +17,7 @@ import parseTime from '../internal/parse-time';
|
|
|
17
17
|
import { convertTokens } from '../internal/parse-tokens';
|
|
18
18
|
import { makeSingleValue } from '../internal/single-value';
|
|
19
19
|
var packageName = "@atlaskit/datetime-picker";
|
|
20
|
-
var packageVersion = "15.
|
|
20
|
+
var packageVersion = "15.6.0";
|
|
21
21
|
var menuStyles = {
|
|
22
22
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
23
23
|
position: 'static',
|
|
@@ -97,7 +97,7 @@ declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<Pick<Om
|
|
|
97
97
|
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
98
98
|
onChange: (_value: string) => void;
|
|
99
99
|
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
100
|
-
} & DatePickerBaseProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "id" | "aria-describedby" | "value" | "testId" | "icon" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Partial<Pick<Omit<{
|
|
100
|
+
} & DatePickerBaseProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "id" | "aria-describedby" | "value" | "testId" | "icon" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Partial<Pick<Omit<{
|
|
101
101
|
defaultIsOpen: boolean;
|
|
102
102
|
defaultValue: string;
|
|
103
103
|
disabled: string[];
|
|
@@ -115,5 +115,5 @@ declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<Pick<Om
|
|
|
115
115
|
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
116
116
|
onChange: (_value: string) => void;
|
|
117
117
|
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
118
|
-
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>>;
|
|
118
|
+
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>>;
|
|
119
119
|
export default DatePicker;
|
|
@@ -26,5 +26,5 @@ declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<DatePic
|
|
|
26
26
|
} & {
|
|
27
27
|
inputValue?: string | undefined;
|
|
28
28
|
}) | undefined;
|
|
29
|
-
}, "label" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<unknown>>;
|
|
29
|
+
}, "label" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<unknown>>;
|
|
30
30
|
export default DatePicker;
|
|
@@ -9,7 +9,7 @@ declare const DatePicker: import("react").FC<Pick<Pick<import("..").DatePickerPr
|
|
|
9
9
|
} & {
|
|
10
10
|
inputValue?: string | undefined;
|
|
11
11
|
}) | undefined;
|
|
12
|
-
}, "label" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<unknown>, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Pick<Pick<Pick<Omit<{
|
|
12
|
+
}, "label" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<unknown>, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Pick<Pick<Pick<Omit<{
|
|
13
13
|
defaultIsOpen: boolean;
|
|
14
14
|
defaultValue: string;
|
|
15
15
|
disabled: string[];
|
|
@@ -18,7 +18,7 @@ declare const DatePicker: import("react").FC<Pick<Pick<import("..").DatePickerPr
|
|
|
18
18
|
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
19
19
|
onChange: (_value: string) => void;
|
|
20
20
|
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
21
|
-
} & import("..").DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "id" | "aria-describedby" | "value" | "testId" | "icon" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Partial<Pick<Omit<{
|
|
21
|
+
} & import("..").DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "id" | "aria-describedby" | "value" | "testId" | "icon" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Partial<Pick<Omit<{
|
|
22
22
|
defaultIsOpen: boolean;
|
|
23
23
|
defaultValue: string;
|
|
24
24
|
disabled: string[];
|
|
@@ -36,5 +36,5 @@ declare const DatePicker: import("react").FC<Pick<Pick<import("..").DatePickerPr
|
|
|
36
36
|
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
37
37
|
onChange: (_value: string) => void;
|
|
38
38
|
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
39
|
-
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>>;
|
|
39
|
+
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>>;
|
|
40
40
|
export default DatePicker;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -64,6 +64,11 @@ export interface DatePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
|
|
|
64
64
|
* Set the picker to autofocus on mount.
|
|
65
65
|
*/
|
|
66
66
|
autoFocus?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Set the `aria-label` for the clear button.
|
|
69
|
+
* Add the word "Clear" at the beginning of the clearControlLabel.
|
|
70
|
+
*/
|
|
71
|
+
clearControlLabel?: string;
|
|
67
72
|
/**
|
|
68
73
|
* The default for `isOpen`. Will be `false` if not provided.
|
|
69
74
|
*
|
|
@@ -270,7 +275,8 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
|
|
|
270
275
|
*/
|
|
271
276
|
autoFocus?: boolean;
|
|
272
277
|
/**
|
|
273
|
-
* Set the aria-label for the clear button
|
|
278
|
+
* Set the `aria-label` for the clear button.
|
|
279
|
+
* Add the word "Clear" at the beginning of the clearControlLabel.
|
|
274
280
|
*/
|
|
275
281
|
clearControlLabel?: string;
|
|
276
282
|
/**
|
|
@@ -401,7 +407,8 @@ export interface DateTimePickerBaseProps extends WithAnalyticsEventsProps {
|
|
|
401
407
|
*/
|
|
402
408
|
autoFocus?: boolean;
|
|
403
409
|
/**
|
|
404
|
-
* Set the `aria-label` for the clear
|
|
410
|
+
* Set the `aria-label` for the clear button.
|
|
411
|
+
* Add the word "Clear" at the beginning of the clearControlLabel.
|
|
405
412
|
*/
|
|
406
413
|
clearControlLabel?: string;
|
|
407
414
|
/**
|
|
@@ -97,7 +97,7 @@ declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<Pick<Om
|
|
|
97
97
|
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
98
98
|
onChange: (_value: string) => void;
|
|
99
99
|
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
100
|
-
} & DatePickerBaseProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "id" | "aria-describedby" | "value" | "testId" | "icon" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Partial<Pick<Omit<{
|
|
100
|
+
} & DatePickerBaseProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "id" | "aria-describedby" | "value" | "testId" | "icon" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Partial<Pick<Omit<{
|
|
101
101
|
defaultIsOpen: boolean;
|
|
102
102
|
defaultValue: string;
|
|
103
103
|
disabled: string[];
|
|
@@ -115,5 +115,5 @@ declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<Pick<Om
|
|
|
115
115
|
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
116
116
|
onChange: (_value: string) => void;
|
|
117
117
|
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
118
|
-
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>>;
|
|
118
|
+
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>>;
|
|
119
119
|
export default DatePicker;
|
|
@@ -26,5 +26,5 @@ declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<DatePic
|
|
|
26
26
|
} & {
|
|
27
27
|
inputValue?: string | undefined;
|
|
28
28
|
}) | undefined;
|
|
29
|
-
}, "label" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<unknown>>;
|
|
29
|
+
}, "label" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<unknown>>;
|
|
30
30
|
export default DatePicker;
|
|
@@ -9,7 +9,7 @@ declare const DatePicker: import("react").FC<Pick<Pick<import("..").DatePickerPr
|
|
|
9
9
|
} & {
|
|
10
10
|
inputValue?: string | undefined;
|
|
11
11
|
}) | undefined;
|
|
12
|
-
}, "label" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<unknown>, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Pick<Pick<Pick<Omit<{
|
|
12
|
+
}, "label" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<unknown>, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Pick<Pick<Pick<Omit<{
|
|
13
13
|
defaultIsOpen: boolean;
|
|
14
14
|
defaultValue: string;
|
|
15
15
|
disabled: string[];
|
|
@@ -18,7 +18,7 @@ declare const DatePicker: import("react").FC<Pick<Pick<import("..").DatePickerPr
|
|
|
18
18
|
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
19
19
|
onChange: (_value: string) => void;
|
|
20
20
|
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
21
|
-
} & import("..").DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "id" | "aria-describedby" | "value" | "testId" | "icon" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Partial<Pick<Omit<{
|
|
21
|
+
} & import("..").DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "id" | "aria-describedby" | "value" | "testId" | "icon" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Partial<Pick<Omit<{
|
|
22
22
|
defaultIsOpen: boolean;
|
|
23
23
|
defaultValue: string;
|
|
24
24
|
disabled: string[];
|
|
@@ -36,5 +36,5 @@ declare const DatePicker: import("react").FC<Pick<Pick<import("..").DatePickerPr
|
|
|
36
36
|
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
37
37
|
onChange: (_value: string) => void;
|
|
38
38
|
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
39
|
-
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>>;
|
|
39
|
+
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>, "label" | "key" | "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "appearance" | "isDisabled" | "innerProps" | "selectProps" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "value" | "testId" | "icon" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "autoFocus" | "clearControlLabel" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>>;
|
|
40
40
|
export default DatePicker;
|
|
@@ -64,6 +64,11 @@ export interface DatePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
|
|
|
64
64
|
* Set the picker to autofocus on mount.
|
|
65
65
|
*/
|
|
66
66
|
autoFocus?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Set the `aria-label` for the clear button.
|
|
69
|
+
* Add the word "Clear" at the beginning of the clearControlLabel.
|
|
70
|
+
*/
|
|
71
|
+
clearControlLabel?: string;
|
|
67
72
|
/**
|
|
68
73
|
* The default for `isOpen`. Will be `false` if not provided.
|
|
69
74
|
*
|
|
@@ -270,7 +275,8 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
|
|
|
270
275
|
*/
|
|
271
276
|
autoFocus?: boolean;
|
|
272
277
|
/**
|
|
273
|
-
* Set the aria-label for the clear button
|
|
278
|
+
* Set the `aria-label` for the clear button.
|
|
279
|
+
* Add the word "Clear" at the beginning of the clearControlLabel.
|
|
274
280
|
*/
|
|
275
281
|
clearControlLabel?: string;
|
|
276
282
|
/**
|
|
@@ -401,7 +407,8 @@ export interface DateTimePickerBaseProps extends WithAnalyticsEventsProps {
|
|
|
401
407
|
*/
|
|
402
408
|
autoFocus?: boolean;
|
|
403
409
|
/**
|
|
404
|
-
* Set the `aria-label` for the clear
|
|
410
|
+
* Set the `aria-label` for the clear button.
|
|
411
|
+
* Add the word "Clear" at the beginning of the clearControlLabel.
|
|
405
412
|
*/
|
|
406
413
|
clearControlLabel?: string;
|
|
407
414
|
/**
|