@atlaskit/datetime-picker 17.1.4 → 17.1.6
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 +14 -0
- package/dist/cjs/components/date-picker-class.js +4 -71
- package/dist/cjs/components/date-picker-fc.js +3 -5
- package/dist/cjs/components/date-time-picker-class.js +1 -1
- package/dist/cjs/components/date-time-picker-fc.js +3 -7
- package/dist/cjs/components/time-picker.js +10 -4
- package/dist/cjs/internal/single-value.js +3 -8
- package/dist/es2019/components/date-picker-class.js +4 -72
- package/dist/es2019/components/date-picker-fc.js +3 -5
- package/dist/es2019/components/date-time-picker-class.js +1 -1
- package/dist/es2019/components/date-time-picker-fc.js +3 -7
- package/dist/es2019/components/time-picker.js +10 -4
- package/dist/es2019/internal/single-value.js +1 -4
- package/dist/esm/components/date-picker-class.js +4 -71
- package/dist/esm/components/date-picker-fc.js +3 -5
- package/dist/esm/components/date-time-picker-class.js +1 -1
- package/dist/esm/components/date-time-picker-fc.js +3 -7
- package/dist/esm/components/time-picker.js +10 -4
- package/dist/esm/internal/single-value.js +3 -8
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 17.1.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a8247416bb21a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a8247416bb21a) -
|
|
8
|
+
Improve accessible description of date picker.
|
|
9
|
+
|
|
10
|
+
## 17.1.5
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`f5f621a43f60a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f5f621a43f60a) -
|
|
15
|
+
ts-ignore added as a workaround for help-center typecheck
|
|
16
|
+
|
|
3
17
|
## 17.1.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -40,7 +40,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
40
40
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
41
41
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /// <reference types="node" />
|
|
42
42
|
var packageName = "@atlaskit/datetime-picker";
|
|
43
|
-
var packageVersion = "
|
|
43
|
+
var packageVersion = "0.0.0-development";
|
|
44
44
|
var datePickerDefaultProps = {
|
|
45
45
|
defaultIsOpen: false,
|
|
46
46
|
defaultValue: '',
|
|
@@ -530,14 +530,12 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
530
530
|
type: "hidden",
|
|
531
531
|
value: value,
|
|
532
532
|
"data-testid": testId && "".concat(testId, "--input")
|
|
533
|
-
}),
|
|
533
|
+
}), /*#__PURE__*/React.createElement(_useId.IdProvider, null, function (_ref3) {
|
|
534
534
|
var valueId = _ref3.id;
|
|
535
535
|
return /*#__PURE__*/React.createElement(_select.default, (0, _extends2.default)({
|
|
536
536
|
appearance: _this2.props.appearance,
|
|
537
537
|
"aria-describedby": ariaDescribedBy ? "".concat(ariaDescribedBy, " ").concat(valueId) : valueId,
|
|
538
|
-
label: label || undefined
|
|
539
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
540
|
-
,
|
|
538
|
+
label: label || undefined,
|
|
541
539
|
autoFocus: autoFocus,
|
|
542
540
|
clearControlLabel: clearControlLabel,
|
|
543
541
|
closeMenuOnSelect: true,
|
|
@@ -599,72 +597,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
599
597
|
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
|
|
600
598
|
menuInnerWrapper: calendarProps.menuInnerWrapper
|
|
601
599
|
}));
|
|
602
|
-
})
|
|
603
|
-
appearance: this.props.appearance,
|
|
604
|
-
"aria-describedby": ariaDescribedBy,
|
|
605
|
-
label: label || undefined
|
|
606
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
607
|
-
,
|
|
608
|
-
autoFocus: autoFocus,
|
|
609
|
-
clearControlLabel: clearControlLabel,
|
|
610
|
-
closeMenuOnSelect: true,
|
|
611
|
-
enableAnimation: false,
|
|
612
|
-
inputId: id,
|
|
613
|
-
inputValue: actualSelectInputValue,
|
|
614
|
-
isDisabled: isDisabled,
|
|
615
|
-
isRequired: isRequired,
|
|
616
|
-
menuIsOpen: menuIsOpen,
|
|
617
|
-
onBlur: this.onSelectBlur,
|
|
618
|
-
onChange: this.onSelectChange,
|
|
619
|
-
onFocus: this.onSelectFocus,
|
|
620
|
-
onInputChange: this.handleSelectInputChange,
|
|
621
|
-
placeholder: (0, _datePickerMigration.getPlaceholder)({
|
|
622
|
-
placeholder: this.props.placeholder,
|
|
623
|
-
l10n: this.state.l10n
|
|
624
|
-
})
|
|
625
|
-
// @ts-ignore -- Argument of type 'StylesConfig<OptionType, false, GroupBase<OptionType>>' is not assignable to parameter of type 'StylesConfig<OptionType, boolean, GroupBase<OptionType>>'
|
|
626
|
-
,
|
|
627
|
-
styles: mergedStyles,
|
|
628
|
-
value: initialValue
|
|
629
|
-
}, selectProps, {
|
|
630
|
-
// For some reason, this and the below `styles` type error _only_ show
|
|
631
|
-
// up when you alter some of the properties in the `selectComponents`
|
|
632
|
-
// object. These errors are still present, and I suspect have always
|
|
633
|
-
// been present, without changing the unrelated code. Ignoring as the
|
|
634
|
-
// component still works as expected despite this error. And also
|
|
635
|
-
// because the select refresh team may solve it later.
|
|
636
|
-
components: _objectSpread(_objectSpread({}, selectComponents), {}, {
|
|
637
|
-
SingleValue: (0, _singleValue.makeSingleValue)({
|
|
638
|
-
lang: this.props.locale
|
|
639
|
-
})
|
|
640
|
-
})
|
|
641
|
-
// These are below the spread because I don't know what is in
|
|
642
|
-
// selectProps or not and what wil be overwritten
|
|
643
|
-
,
|
|
644
|
-
isClearable: true,
|
|
645
|
-
isInvalid: isInvalid,
|
|
646
|
-
spacing: spacing,
|
|
647
|
-
testId: testId
|
|
648
|
-
// These aren't part of `Select`'s API, but we're using them here.
|
|
649
|
-
// @ts-ignore -- Property 'calendarContainerRef' does not exist on type 'IntrinsicAttributes & LibraryManagedAttributes<(<Option extends unknown = OptionType, IsMulti extends boolean = false>(props: AtlaskitSelectProps<Option, IsMulti> & { ...; }) => Element), AtlaskitSelectProps<...> & { ...; }>'.
|
|
650
|
-
,
|
|
651
|
-
calendarContainerRef: calendarProps.calendarContainerRef,
|
|
652
|
-
calendarDisabled: calendarProps.calendarDisabled,
|
|
653
|
-
calendarDisabledDateFilter: calendarProps.calendarDisabledDateFilter,
|
|
654
|
-
calendarLocale: calendarProps.calendarLocale,
|
|
655
|
-
calendarMaxDate: calendarProps.calendarMaxDate,
|
|
656
|
-
calendarMinDate: calendarProps.calendarMinDate,
|
|
657
|
-
calendarRef: calendarProps.calendarRef,
|
|
658
|
-
calendarValue: calendarProps.calendarValue,
|
|
659
|
-
calendarView: calendarProps.calendarView,
|
|
660
|
-
calendarWeekStartDay: calendarProps.calendarWeekStartDay,
|
|
661
|
-
nextMonthLabel: nextMonthLabel,
|
|
662
|
-
onCalendarChange: calendarProps.onCalendarChange,
|
|
663
|
-
onCalendarSelect: calendarProps.onCalendarSelect,
|
|
664
|
-
previousMonthLabel: previousMonthLabel,
|
|
665
|
-
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
|
|
666
|
-
menuInnerWrapper: calendarProps.menuInnerWrapper
|
|
667
|
-
})), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(_useId.IdProvider, {
|
|
600
|
+
}), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(_useId.IdProvider, {
|
|
668
601
|
prefix: "open-calendar-label--"
|
|
669
602
|
}, function (_ref4) {
|
|
670
603
|
var openCalendarLabelId = _ref4.id;
|
|
@@ -37,7 +37,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
37
37
|
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; }
|
|
38
38
|
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; }
|
|
39
39
|
var packageName = "@atlaskit/datetime-picker";
|
|
40
|
-
var packageVersion = "
|
|
40
|
+
var packageVersion = "0.0.0-development";
|
|
41
41
|
var styles = {
|
|
42
42
|
pickerContainerStyle: "_kqswh2mm",
|
|
43
43
|
dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -547,10 +547,8 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
|
|
|
547
547
|
"data-testid": testId && "".concat(testId, "--input")
|
|
548
548
|
}), /*#__PURE__*/React.createElement(_select.default, (0, _extends2.default)({
|
|
549
549
|
appearance: appearance,
|
|
550
|
-
"aria-describedby":
|
|
551
|
-
label: label || undefined
|
|
552
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
553
|
-
,
|
|
550
|
+
"aria-describedby": ariaDescribedBy ? "".concat(ariaDescribedBy, " ").concat(valueId) : valueId,
|
|
551
|
+
label: label || undefined,
|
|
554
552
|
autoFocus: autoFocus,
|
|
555
553
|
clearControlLabel: clearControlLabel,
|
|
556
554
|
closeMenuOnSelect: true,
|
|
@@ -35,7 +35,7 @@ var DatePicker = (0, _ffComponent.componentWithCondition)(function () {
|
|
|
35
35
|
return (0, _platformFeatureFlags.fg)('dst-date-picker-use-functional-component');
|
|
36
36
|
}, _datePickerFc.default, _datePickerClass.default);
|
|
37
37
|
var packageName = "@atlaskit/datetime-picker";
|
|
38
|
-
var packageVersion = "
|
|
38
|
+
var packageVersion = "0.0.0-development";
|
|
39
39
|
var compiledStyles = {
|
|
40
40
|
datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
|
|
41
41
|
timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
|
|
@@ -38,7 +38,7 @@ var DatePicker = (0, _ffComponent.componentWithCondition)(function () {
|
|
|
38
38
|
return (0, _platformFeatureFlags.fg)('dst-date-picker-use-functional-component');
|
|
39
39
|
}, _datePickerFc.default, _datePickerClass.default);
|
|
40
40
|
var packageName = "@atlaskit/datetime-picker";
|
|
41
|
-
var packageVersion = "
|
|
41
|
+
var packageVersion = "0.0.0-development";
|
|
42
42
|
var analyticsAttributes = {
|
|
43
43
|
componentName: 'dateTimePicker',
|
|
44
44
|
packageName: packageName,
|
|
@@ -296,9 +296,7 @@ var DateTimePicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
296
296
|
xcss: compiledStyles.datePickerContainerStyles
|
|
297
297
|
}, /*#__PURE__*/_react.default.createElement(DatePicker, {
|
|
298
298
|
appearance: appearance,
|
|
299
|
-
"aria-describedby": datePickerAriaDescribedBy
|
|
300
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
301
|
-
,
|
|
299
|
+
"aria-describedby": datePickerAriaDescribedBy,
|
|
302
300
|
autoFocus: datePickerProps.autoFocus || autoFocus,
|
|
303
301
|
dateFormat: datePickerProps.dateFormat,
|
|
304
302
|
defaultIsOpen: datePickerProps.defaultIsOpen,
|
|
@@ -339,9 +337,7 @@ var DateTimePicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
339
337
|
xcss: compiledStyles.timePickerContainerStyles
|
|
340
338
|
}, /*#__PURE__*/_react.default.createElement(_timePicker.default, {
|
|
341
339
|
appearance: timePickerProps.appearance || appearance,
|
|
342
|
-
"aria-describedby": timePickerAriaDescribedBy
|
|
343
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
344
|
-
,
|
|
340
|
+
"aria-describedby": timePickerAriaDescribedBy,
|
|
345
341
|
autoFocus: timePickerProps.autoFocus,
|
|
346
342
|
defaultIsOpen: timePickerProps.defaultIsOpen,
|
|
347
343
|
defaultValue: timePickerProps.defaultValue,
|
|
@@ -26,7 +26,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
26
26
|
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; }
|
|
27
27
|
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; }
|
|
28
28
|
var packageName = "@atlaskit/datetime-picker";
|
|
29
|
-
var packageVersion = "
|
|
29
|
+
var packageVersion = "0.0.0-development";
|
|
30
30
|
var menuStyles = {
|
|
31
31
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
32
32
|
position: 'static',
|
|
@@ -318,7 +318,9 @@ var TimePicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
318
318
|
"aria-label": label || undefined,
|
|
319
319
|
appearance: appearance,
|
|
320
320
|
autoFocus: autoFocus,
|
|
321
|
-
clearControlLabel: clearControlLabel
|
|
321
|
+
clearControlLabel: clearControlLabel
|
|
322
|
+
// @ts-ignore - Type mismatch with components - workaround for help-center local consumption
|
|
323
|
+
,
|
|
322
324
|
components: selectComponents,
|
|
323
325
|
inputId: id,
|
|
324
326
|
isClearable: true,
|
|
@@ -328,13 +330,17 @@ var TimePicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
328
330
|
menuPlacement: "auto",
|
|
329
331
|
openMenuOnFocus: true,
|
|
330
332
|
onBlur: onBlur,
|
|
331
|
-
onCreateOption: onCreateOption
|
|
333
|
+
onCreateOption: onCreateOption
|
|
334
|
+
// @ts-ignore - Type mismatch with onChange handler - workaround for help-center local consumption
|
|
335
|
+
,
|
|
332
336
|
onChange: onChange,
|
|
333
337
|
options: options,
|
|
334
338
|
onFocus: onFocus,
|
|
335
339
|
onMenuOpen: onMenuOpen,
|
|
336
340
|
onMenuClose: onMenuClose,
|
|
337
|
-
placeholder: placeholder || l10n.formatTime(_internal.placeholderDatetime)
|
|
341
|
+
placeholder: placeholder || l10n.formatTime(_internal.placeholderDatetime)
|
|
342
|
+
// @ts-ignore - Type mismatch with styles config - workaround for help-center local consumption
|
|
343
|
+
,
|
|
338
344
|
styles: mergedStyles,
|
|
339
345
|
value: initialValue,
|
|
340
346
|
spacing: spacing
|
|
@@ -6,14 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.makeSingleValue = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
10
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
11
|
var _select = require("@atlaskit/select");
|
|
14
12
|
var _excluded = ["children", "className", "clearValue", "cx", "data", "getStyles", "getValue", "hasValue", "isDisabled", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue"];
|
|
15
|
-
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; }
|
|
16
|
-
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; }
|
|
17
13
|
/**
|
|
18
14
|
* This creates a functional component that `react-select` will use to make the
|
|
19
15
|
* SingleValue part of the different pickers.
|
|
@@ -49,11 +45,10 @@ function makeSingleValue(_ref) {
|
|
|
49
45
|
getStyles: getStyles,
|
|
50
46
|
getValue: getValue,
|
|
51
47
|
hasValue: hasValue,
|
|
52
|
-
innerProps:
|
|
53
|
-
id: id
|
|
54
|
-
} : {}), {}, {
|
|
48
|
+
innerProps: {
|
|
49
|
+
id: id,
|
|
55
50
|
lang: lang
|
|
56
|
-
}
|
|
51
|
+
},
|
|
57
52
|
isDisabled: isDisabled,
|
|
58
53
|
isMulti: isMulti,
|
|
59
54
|
isRtl: isRtl,
|
|
@@ -23,7 +23,7 @@ import { Menu } from '../internal/menu';
|
|
|
23
23
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
24
24
|
import { makeSingleValue } from '../internal/single-value';
|
|
25
25
|
const packageName = "@atlaskit/datetime-picker";
|
|
26
|
-
const packageVersion = "
|
|
26
|
+
const packageVersion = "0.0.0-development";
|
|
27
27
|
const datePickerDefaultProps = {
|
|
28
28
|
defaultIsOpen: false,
|
|
29
29
|
defaultValue: '',
|
|
@@ -509,14 +509,12 @@ class DatePickerComponent extends Component {
|
|
|
509
509
|
type: "hidden",
|
|
510
510
|
value: value,
|
|
511
511
|
"data-testid": testId && `${testId}--input`
|
|
512
|
-
}),
|
|
512
|
+
}), /*#__PURE__*/React.createElement(IdProvider, null, ({
|
|
513
513
|
id: valueId
|
|
514
514
|
}) => /*#__PURE__*/React.createElement(Select, _extends({
|
|
515
515
|
appearance: this.props.appearance,
|
|
516
516
|
"aria-describedby": ariaDescribedBy ? `${ariaDescribedBy} ${valueId}` : valueId,
|
|
517
|
-
label: label || undefined
|
|
518
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
519
|
-
,
|
|
517
|
+
label: label || undefined,
|
|
520
518
|
autoFocus: autoFocus,
|
|
521
519
|
clearControlLabel: clearControlLabel,
|
|
522
520
|
closeMenuOnSelect: true,
|
|
@@ -578,73 +576,7 @@ class DatePickerComponent extends Component {
|
|
|
578
576
|
previousMonthLabel: previousMonthLabel,
|
|
579
577
|
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
|
|
580
578
|
menuInnerWrapper: calendarProps.menuInnerWrapper
|
|
581
|
-
})))
|
|
582
|
-
appearance: this.props.appearance,
|
|
583
|
-
"aria-describedby": ariaDescribedBy,
|
|
584
|
-
label: label || undefined
|
|
585
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
586
|
-
,
|
|
587
|
-
autoFocus: autoFocus,
|
|
588
|
-
clearControlLabel: clearControlLabel,
|
|
589
|
-
closeMenuOnSelect: true,
|
|
590
|
-
enableAnimation: false,
|
|
591
|
-
inputId: id,
|
|
592
|
-
inputValue: actualSelectInputValue,
|
|
593
|
-
isDisabled: isDisabled,
|
|
594
|
-
isRequired: isRequired,
|
|
595
|
-
menuIsOpen: menuIsOpen,
|
|
596
|
-
onBlur: this.onSelectBlur,
|
|
597
|
-
onChange: this.onSelectChange,
|
|
598
|
-
onFocus: this.onSelectFocus,
|
|
599
|
-
onInputChange: this.handleSelectInputChange,
|
|
600
|
-
placeholder: getPlaceholder({
|
|
601
|
-
placeholder: this.props.placeholder,
|
|
602
|
-
l10n: this.state.l10n
|
|
603
|
-
})
|
|
604
|
-
// @ts-ignore -- Argument of type 'StylesConfig<OptionType, false, GroupBase<OptionType>>' is not assignable to parameter of type 'StylesConfig<OptionType, boolean, GroupBase<OptionType>>'
|
|
605
|
-
,
|
|
606
|
-
styles: mergedStyles,
|
|
607
|
-
value: initialValue
|
|
608
|
-
}, selectProps, {
|
|
609
|
-
// For some reason, this and the below `styles` type error _only_ show
|
|
610
|
-
// up when you alter some of the properties in the `selectComponents`
|
|
611
|
-
// object. These errors are still present, and I suspect have always
|
|
612
|
-
// been present, without changing the unrelated code. Ignoring as the
|
|
613
|
-
// component still works as expected despite this error. And also
|
|
614
|
-
// because the select refresh team may solve it later.
|
|
615
|
-
components: {
|
|
616
|
-
...selectComponents,
|
|
617
|
-
SingleValue: makeSingleValue({
|
|
618
|
-
lang: this.props.locale
|
|
619
|
-
})
|
|
620
|
-
}
|
|
621
|
-
// These are below the spread because I don't know what is in
|
|
622
|
-
// selectProps or not and what wil be overwritten
|
|
623
|
-
,
|
|
624
|
-
isClearable: true,
|
|
625
|
-
isInvalid: isInvalid,
|
|
626
|
-
spacing: spacing,
|
|
627
|
-
testId: testId
|
|
628
|
-
// These aren't part of `Select`'s API, but we're using them here.
|
|
629
|
-
// @ts-ignore -- Property 'calendarContainerRef' does not exist on type 'IntrinsicAttributes & LibraryManagedAttributes<(<Option extends unknown = OptionType, IsMulti extends boolean = false>(props: AtlaskitSelectProps<Option, IsMulti> & { ...; }) => Element), AtlaskitSelectProps<...> & { ...; }>'.
|
|
630
|
-
,
|
|
631
|
-
calendarContainerRef: calendarProps.calendarContainerRef,
|
|
632
|
-
calendarDisabled: calendarProps.calendarDisabled,
|
|
633
|
-
calendarDisabledDateFilter: calendarProps.calendarDisabledDateFilter,
|
|
634
|
-
calendarLocale: calendarProps.calendarLocale,
|
|
635
|
-
calendarMaxDate: calendarProps.calendarMaxDate,
|
|
636
|
-
calendarMinDate: calendarProps.calendarMinDate,
|
|
637
|
-
calendarRef: calendarProps.calendarRef,
|
|
638
|
-
calendarValue: calendarProps.calendarValue,
|
|
639
|
-
calendarView: calendarProps.calendarView,
|
|
640
|
-
calendarWeekStartDay: calendarProps.calendarWeekStartDay,
|
|
641
|
-
nextMonthLabel: nextMonthLabel,
|
|
642
|
-
onCalendarChange: calendarProps.onCalendarChange,
|
|
643
|
-
onCalendarSelect: calendarProps.onCalendarSelect,
|
|
644
|
-
previousMonthLabel: previousMonthLabel,
|
|
645
|
-
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
|
|
646
|
-
menuInnerWrapper: calendarProps.menuInnerWrapper
|
|
647
|
-
})), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(IdProvider, {
|
|
579
|
+
}))), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(IdProvider, {
|
|
648
580
|
prefix: "open-calendar-label--"
|
|
649
581
|
}, ({
|
|
650
582
|
id: openCalendarLabelId
|
|
@@ -23,7 +23,7 @@ import { Menu } from '../internal/menu';
|
|
|
23
23
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
24
24
|
import { makeSingleValue } from '../internal/single-value';
|
|
25
25
|
const packageName = "@atlaskit/datetime-picker";
|
|
26
|
-
const packageVersion = "
|
|
26
|
+
const packageVersion = "0.0.0-development";
|
|
27
27
|
const styles = {
|
|
28
28
|
pickerContainerStyle: "_kqswh2mm",
|
|
29
29
|
dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -474,10 +474,8 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
474
474
|
"data-testid": testId && `${testId}--input`
|
|
475
475
|
}), /*#__PURE__*/React.createElement(Select, _extends({
|
|
476
476
|
appearance: appearance,
|
|
477
|
-
"aria-describedby":
|
|
478
|
-
label: label || undefined
|
|
479
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
480
|
-
,
|
|
477
|
+
"aria-describedby": ariaDescribedBy ? `${ariaDescribedBy} ${valueId}` : valueId,
|
|
478
|
+
label: label || undefined,
|
|
481
479
|
autoFocus: autoFocus,
|
|
482
480
|
clearControlLabel: clearControlLabel,
|
|
483
481
|
closeMenuOnSelect: true,
|
|
@@ -19,7 +19,7 @@ import DatePickerNew from './date-picker-fc';
|
|
|
19
19
|
import TimePicker from './time-picker';
|
|
20
20
|
const DatePicker = componentWithCondition(() => fg('dst-date-picker-use-functional-component'), DatePickerNew, DatePickerOld);
|
|
21
21
|
const packageName = "@atlaskit/datetime-picker";
|
|
22
|
-
const packageVersion = "
|
|
22
|
+
const packageVersion = "0.0.0-development";
|
|
23
23
|
const compiledStyles = {
|
|
24
24
|
datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
|
|
25
25
|
timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
|
|
@@ -22,7 +22,7 @@ import DatePickerNew from './date-picker-fc';
|
|
|
22
22
|
import TimePicker from './time-picker';
|
|
23
23
|
const DatePicker = componentWithCondition(() => fg('dst-date-picker-use-functional-component'), DatePickerNew, DatePickerOld);
|
|
24
24
|
const packageName = "@atlaskit/datetime-picker";
|
|
25
|
-
const packageVersion = "
|
|
25
|
+
const packageVersion = "0.0.0-development";
|
|
26
26
|
const analyticsAttributes = {
|
|
27
27
|
componentName: 'dateTimePicker',
|
|
28
28
|
packageName,
|
|
@@ -261,9 +261,7 @@ const DateTimePicker = /*#__PURE__*/forwardRef(({
|
|
|
261
261
|
xcss: compiledStyles.datePickerContainerStyles
|
|
262
262
|
}, /*#__PURE__*/React.createElement(DatePicker, {
|
|
263
263
|
appearance: appearance,
|
|
264
|
-
"aria-describedby": datePickerAriaDescribedBy
|
|
265
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
266
|
-
,
|
|
264
|
+
"aria-describedby": datePickerAriaDescribedBy,
|
|
267
265
|
autoFocus: datePickerProps.autoFocus || autoFocus,
|
|
268
266
|
dateFormat: datePickerProps.dateFormat,
|
|
269
267
|
defaultIsOpen: datePickerProps.defaultIsOpen,
|
|
@@ -304,9 +302,7 @@ const DateTimePicker = /*#__PURE__*/forwardRef(({
|
|
|
304
302
|
xcss: compiledStyles.timePickerContainerStyles
|
|
305
303
|
}, /*#__PURE__*/React.createElement(TimePicker, {
|
|
306
304
|
appearance: timePickerProps.appearance || appearance,
|
|
307
|
-
"aria-describedby": timePickerAriaDescribedBy
|
|
308
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
309
|
-
,
|
|
305
|
+
"aria-describedby": timePickerAriaDescribedBy,
|
|
310
306
|
autoFocus: timePickerProps.autoFocus,
|
|
311
307
|
defaultIsOpen: timePickerProps.defaultIsOpen,
|
|
312
308
|
defaultValue: timePickerProps.defaultValue,
|
|
@@ -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 = "
|
|
14
|
+
const packageVersion = "0.0.0-development";
|
|
15
15
|
const menuStyles = {
|
|
16
16
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
17
17
|
position: 'static',
|
|
@@ -265,7 +265,9 @@ const TimePicker = /*#__PURE__*/forwardRef(({
|
|
|
265
265
|
"aria-label": label || undefined,
|
|
266
266
|
appearance: appearance,
|
|
267
267
|
autoFocus: autoFocus,
|
|
268
|
-
clearControlLabel: clearControlLabel
|
|
268
|
+
clearControlLabel: clearControlLabel
|
|
269
|
+
// @ts-ignore - Type mismatch with components - workaround for help-center local consumption
|
|
270
|
+
,
|
|
269
271
|
components: selectComponents,
|
|
270
272
|
inputId: id,
|
|
271
273
|
isClearable: true,
|
|
@@ -275,13 +277,17 @@ const TimePicker = /*#__PURE__*/forwardRef(({
|
|
|
275
277
|
menuPlacement: "auto",
|
|
276
278
|
openMenuOnFocus: true,
|
|
277
279
|
onBlur: onBlur,
|
|
278
|
-
onCreateOption: onCreateOption
|
|
280
|
+
onCreateOption: onCreateOption
|
|
281
|
+
// @ts-ignore - Type mismatch with onChange handler - workaround for help-center local consumption
|
|
282
|
+
,
|
|
279
283
|
onChange: onChange,
|
|
280
284
|
options: options,
|
|
281
285
|
onFocus: onFocus,
|
|
282
286
|
onMenuOpen: onMenuOpen,
|
|
283
287
|
onMenuClose: onMenuClose,
|
|
284
|
-
placeholder: placeholder || l10n.formatTime(placeholderDatetime)
|
|
288
|
+
placeholder: placeholder || l10n.formatTime(placeholderDatetime)
|
|
289
|
+
// @ts-ignore - Type mismatch with styles config - workaround for help-center local consumption
|
|
290
|
+
,
|
|
285
291
|
styles: mergedStyles,
|
|
286
292
|
value: initialValue,
|
|
287
293
|
spacing: spacing
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { components } from '@atlaskit/select';
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -40,9 +39,7 @@ export const makeSingleValue =
|
|
|
40
39
|
getValue: getValue,
|
|
41
40
|
hasValue: hasValue,
|
|
42
41
|
innerProps: {
|
|
43
|
-
|
|
44
|
-
id
|
|
45
|
-
} : {}),
|
|
42
|
+
id,
|
|
46
43
|
lang
|
|
47
44
|
},
|
|
48
45
|
isDisabled: isDisabled,
|
|
@@ -32,7 +32,7 @@ import { Menu } from '../internal/menu';
|
|
|
32
32
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
33
33
|
import { makeSingleValue } from '../internal/single-value';
|
|
34
34
|
var packageName = "@atlaskit/datetime-picker";
|
|
35
|
-
var packageVersion = "
|
|
35
|
+
var packageVersion = "0.0.0-development";
|
|
36
36
|
var datePickerDefaultProps = {
|
|
37
37
|
defaultIsOpen: false,
|
|
38
38
|
defaultValue: '',
|
|
@@ -522,14 +522,12 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
522
522
|
type: "hidden",
|
|
523
523
|
value: value,
|
|
524
524
|
"data-testid": testId && "".concat(testId, "--input")
|
|
525
|
-
}),
|
|
525
|
+
}), /*#__PURE__*/React.createElement(IdProvider, null, function (_ref3) {
|
|
526
526
|
var valueId = _ref3.id;
|
|
527
527
|
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
528
528
|
appearance: _this2.props.appearance,
|
|
529
529
|
"aria-describedby": ariaDescribedBy ? "".concat(ariaDescribedBy, " ").concat(valueId) : valueId,
|
|
530
|
-
label: label || undefined
|
|
531
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
532
|
-
,
|
|
530
|
+
label: label || undefined,
|
|
533
531
|
autoFocus: autoFocus,
|
|
534
532
|
clearControlLabel: clearControlLabel,
|
|
535
533
|
closeMenuOnSelect: true,
|
|
@@ -591,72 +589,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
591
589
|
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
|
|
592
590
|
menuInnerWrapper: calendarProps.menuInnerWrapper
|
|
593
591
|
}));
|
|
594
|
-
})
|
|
595
|
-
appearance: this.props.appearance,
|
|
596
|
-
"aria-describedby": ariaDescribedBy,
|
|
597
|
-
label: label || undefined
|
|
598
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
599
|
-
,
|
|
600
|
-
autoFocus: autoFocus,
|
|
601
|
-
clearControlLabel: clearControlLabel,
|
|
602
|
-
closeMenuOnSelect: true,
|
|
603
|
-
enableAnimation: false,
|
|
604
|
-
inputId: id,
|
|
605
|
-
inputValue: actualSelectInputValue,
|
|
606
|
-
isDisabled: isDisabled,
|
|
607
|
-
isRequired: isRequired,
|
|
608
|
-
menuIsOpen: menuIsOpen,
|
|
609
|
-
onBlur: this.onSelectBlur,
|
|
610
|
-
onChange: this.onSelectChange,
|
|
611
|
-
onFocus: this.onSelectFocus,
|
|
612
|
-
onInputChange: this.handleSelectInputChange,
|
|
613
|
-
placeholder: getPlaceholder({
|
|
614
|
-
placeholder: this.props.placeholder,
|
|
615
|
-
l10n: this.state.l10n
|
|
616
|
-
})
|
|
617
|
-
// @ts-ignore -- Argument of type 'StylesConfig<OptionType, false, GroupBase<OptionType>>' is not assignable to parameter of type 'StylesConfig<OptionType, boolean, GroupBase<OptionType>>'
|
|
618
|
-
,
|
|
619
|
-
styles: mergedStyles,
|
|
620
|
-
value: initialValue
|
|
621
|
-
}, selectProps, {
|
|
622
|
-
// For some reason, this and the below `styles` type error _only_ show
|
|
623
|
-
// up when you alter some of the properties in the `selectComponents`
|
|
624
|
-
// object. These errors are still present, and I suspect have always
|
|
625
|
-
// been present, without changing the unrelated code. Ignoring as the
|
|
626
|
-
// component still works as expected despite this error. And also
|
|
627
|
-
// because the select refresh team may solve it later.
|
|
628
|
-
components: _objectSpread(_objectSpread({}, selectComponents), {}, {
|
|
629
|
-
SingleValue: makeSingleValue({
|
|
630
|
-
lang: this.props.locale
|
|
631
|
-
})
|
|
632
|
-
})
|
|
633
|
-
// These are below the spread because I don't know what is in
|
|
634
|
-
// selectProps or not and what wil be overwritten
|
|
635
|
-
,
|
|
636
|
-
isClearable: true,
|
|
637
|
-
isInvalid: isInvalid,
|
|
638
|
-
spacing: spacing,
|
|
639
|
-
testId: testId
|
|
640
|
-
// These aren't part of `Select`'s API, but we're using them here.
|
|
641
|
-
// @ts-ignore -- Property 'calendarContainerRef' does not exist on type 'IntrinsicAttributes & LibraryManagedAttributes<(<Option extends unknown = OptionType, IsMulti extends boolean = false>(props: AtlaskitSelectProps<Option, IsMulti> & { ...; }) => Element), AtlaskitSelectProps<...> & { ...; }>'.
|
|
642
|
-
,
|
|
643
|
-
calendarContainerRef: calendarProps.calendarContainerRef,
|
|
644
|
-
calendarDisabled: calendarProps.calendarDisabled,
|
|
645
|
-
calendarDisabledDateFilter: calendarProps.calendarDisabledDateFilter,
|
|
646
|
-
calendarLocale: calendarProps.calendarLocale,
|
|
647
|
-
calendarMaxDate: calendarProps.calendarMaxDate,
|
|
648
|
-
calendarMinDate: calendarProps.calendarMinDate,
|
|
649
|
-
calendarRef: calendarProps.calendarRef,
|
|
650
|
-
calendarValue: calendarProps.calendarValue,
|
|
651
|
-
calendarView: calendarProps.calendarView,
|
|
652
|
-
calendarWeekStartDay: calendarProps.calendarWeekStartDay,
|
|
653
|
-
nextMonthLabel: nextMonthLabel,
|
|
654
|
-
onCalendarChange: calendarProps.onCalendarChange,
|
|
655
|
-
onCalendarSelect: calendarProps.onCalendarSelect,
|
|
656
|
-
previousMonthLabel: previousMonthLabel,
|
|
657
|
-
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
|
|
658
|
-
menuInnerWrapper: calendarProps.menuInnerWrapper
|
|
659
|
-
})), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(IdProvider, {
|
|
592
|
+
}), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(IdProvider, {
|
|
660
593
|
prefix: "open-calendar-label--"
|
|
661
594
|
}, function (_ref4) {
|
|
662
595
|
var openCalendarLabelId = _ref4.id;
|
|
@@ -29,7 +29,7 @@ import { Menu } from '../internal/menu';
|
|
|
29
29
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
30
30
|
import { makeSingleValue } from '../internal/single-value';
|
|
31
31
|
var packageName = "@atlaskit/datetime-picker";
|
|
32
|
-
var packageVersion = "
|
|
32
|
+
var packageVersion = "0.0.0-development";
|
|
33
33
|
var styles = {
|
|
34
34
|
pickerContainerStyle: "_kqswh2mm",
|
|
35
35
|
dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -539,10 +539,8 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
539
539
|
"data-testid": testId && "".concat(testId, "--input")
|
|
540
540
|
}), /*#__PURE__*/React.createElement(Select, _extends({
|
|
541
541
|
appearance: appearance,
|
|
542
|
-
"aria-describedby":
|
|
543
|
-
label: label || undefined
|
|
544
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
545
|
-
,
|
|
542
|
+
"aria-describedby": ariaDescribedBy ? "".concat(ariaDescribedBy, " ").concat(valueId) : valueId,
|
|
543
|
+
label: label || undefined,
|
|
546
544
|
autoFocus: autoFocus,
|
|
547
545
|
clearControlLabel: clearControlLabel,
|
|
548
546
|
closeMenuOnSelect: true,
|
|
@@ -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 = "
|
|
33
|
+
var packageVersion = "0.0.0-development";
|
|
34
34
|
var compiledStyles = {
|
|
35
35
|
datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
|
|
36
36
|
timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
|
|
@@ -31,7 +31,7 @@ var DatePicker = componentWithCondition(function () {
|
|
|
31
31
|
return fg('dst-date-picker-use-functional-component');
|
|
32
32
|
}, DatePickerNew, DatePickerOld);
|
|
33
33
|
var packageName = "@atlaskit/datetime-picker";
|
|
34
|
-
var packageVersion = "
|
|
34
|
+
var packageVersion = "0.0.0-development";
|
|
35
35
|
var analyticsAttributes = {
|
|
36
36
|
componentName: 'dateTimePicker',
|
|
37
37
|
packageName: packageName,
|
|
@@ -289,9 +289,7 @@ var DateTimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
289
289
|
xcss: compiledStyles.datePickerContainerStyles
|
|
290
290
|
}, /*#__PURE__*/React.createElement(DatePicker, {
|
|
291
291
|
appearance: appearance,
|
|
292
|
-
"aria-describedby": datePickerAriaDescribedBy
|
|
293
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
294
|
-
,
|
|
292
|
+
"aria-describedby": datePickerAriaDescribedBy,
|
|
295
293
|
autoFocus: datePickerProps.autoFocus || autoFocus,
|
|
296
294
|
dateFormat: datePickerProps.dateFormat,
|
|
297
295
|
defaultIsOpen: datePickerProps.defaultIsOpen,
|
|
@@ -332,9 +330,7 @@ var DateTimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
332
330
|
xcss: compiledStyles.timePickerContainerStyles
|
|
333
331
|
}, /*#__PURE__*/React.createElement(TimePicker, {
|
|
334
332
|
appearance: timePickerProps.appearance || appearance,
|
|
335
|
-
"aria-describedby": timePickerAriaDescribedBy
|
|
336
|
-
// eslint-disable-next-line @atlassian/a11y/no-autofocus
|
|
337
|
-
,
|
|
333
|
+
"aria-describedby": timePickerAriaDescribedBy,
|
|
338
334
|
autoFocus: timePickerProps.autoFocus,
|
|
339
335
|
defaultIsOpen: timePickerProps.defaultIsOpen,
|
|
340
336
|
defaultValue: timePickerProps.defaultValue,
|
|
@@ -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 = "
|
|
20
|
+
var packageVersion = "0.0.0-development";
|
|
21
21
|
var menuStyles = {
|
|
22
22
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
23
23
|
position: 'static',
|
|
@@ -309,7 +309,9 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
309
309
|
"aria-label": label || undefined,
|
|
310
310
|
appearance: appearance,
|
|
311
311
|
autoFocus: autoFocus,
|
|
312
|
-
clearControlLabel: clearControlLabel
|
|
312
|
+
clearControlLabel: clearControlLabel
|
|
313
|
+
// @ts-ignore - Type mismatch with components - workaround for help-center local consumption
|
|
314
|
+
,
|
|
313
315
|
components: selectComponents,
|
|
314
316
|
inputId: id,
|
|
315
317
|
isClearable: true,
|
|
@@ -319,13 +321,17 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
319
321
|
menuPlacement: "auto",
|
|
320
322
|
openMenuOnFocus: true,
|
|
321
323
|
onBlur: onBlur,
|
|
322
|
-
onCreateOption: onCreateOption
|
|
324
|
+
onCreateOption: onCreateOption
|
|
325
|
+
// @ts-ignore - Type mismatch with onChange handler - workaround for help-center local consumption
|
|
326
|
+
,
|
|
323
327
|
onChange: onChange,
|
|
324
328
|
options: options,
|
|
325
329
|
onFocus: onFocus,
|
|
326
330
|
onMenuOpen: onMenuOpen,
|
|
327
331
|
onMenuClose: onMenuClose,
|
|
328
|
-
placeholder: placeholder || l10n.formatTime(placeholderDatetime)
|
|
332
|
+
placeholder: placeholder || l10n.formatTime(placeholderDatetime)
|
|
333
|
+
// @ts-ignore - Type mismatch with styles config - workaround for help-center local consumption
|
|
334
|
+
,
|
|
329
335
|
styles: mergedStyles,
|
|
330
336
|
value: initialValue,
|
|
331
337
|
spacing: spacing
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
3
|
var _excluded = ["children", "className", "clearValue", "cx", "data", "getStyles", "getValue", "hasValue", "isDisabled", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue"];
|
|
5
|
-
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; }
|
|
6
|
-
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; }
|
|
7
4
|
import React from 'react';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
5
|
import { components } from '@atlaskit/select';
|
|
10
6
|
|
|
11
7
|
/**
|
|
@@ -43,11 +39,10 @@ function makeSingleValue(_ref) {
|
|
|
43
39
|
getStyles: getStyles,
|
|
44
40
|
getValue: getValue,
|
|
45
41
|
hasValue: hasValue,
|
|
46
|
-
innerProps:
|
|
47
|
-
id: id
|
|
48
|
-
} : {}), {}, {
|
|
42
|
+
innerProps: {
|
|
43
|
+
id: id,
|
|
49
44
|
lang: lang
|
|
50
|
-
}
|
|
45
|
+
},
|
|
51
46
|
isDisabled: isDisabled,
|
|
52
47
|
isMulti: isMulti,
|
|
53
48
|
isRtl: isRtl,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "17.1.
|
|
3
|
+
"version": "17.1.6",
|
|
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,15 +36,15 @@
|
|
|
36
36
|
"@atlaskit/button": "^23.5.0",
|
|
37
37
|
"@atlaskit/calendar": "^17.1.0",
|
|
38
38
|
"@atlaskit/css": "^0.15.0",
|
|
39
|
-
"@atlaskit/ds-lib": "^5.
|
|
39
|
+
"@atlaskit/ds-lib": "^5.2.0",
|
|
40
40
|
"@atlaskit/icon": "^28.5.0",
|
|
41
41
|
"@atlaskit/layering": "^3.2.0",
|
|
42
42
|
"@atlaskit/locale": "^3.0.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
44
|
"@atlaskit/popper": "^7.1.0",
|
|
45
|
-
"@atlaskit/primitives": "^16.
|
|
45
|
+
"@atlaskit/primitives": "^16.1.0",
|
|
46
46
|
"@atlaskit/select": "^21.3.0",
|
|
47
|
-
"@atlaskit/tokens": "^7.
|
|
47
|
+
"@atlaskit/tokens": "^7.1.0",
|
|
48
48
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"@compiled/react": "^0.18.6",
|
|
@@ -57,16 +57,16 @@
|
|
|
57
57
|
"@af/accessibility-testing": "workspace:^",
|
|
58
58
|
"@af/integration-testing": "workspace:^",
|
|
59
59
|
"@af/visual-regression": "workspace:^",
|
|
60
|
-
"@atlaskit/code": "^17.
|
|
60
|
+
"@atlaskit/code": "^17.3.0",
|
|
61
61
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
62
62
|
"@atlaskit/docs": "^11.2.0",
|
|
63
63
|
"@atlaskit/form": "^14.2.0",
|
|
64
64
|
"@atlaskit/heading": "^5.2.0",
|
|
65
65
|
"@atlaskit/link": "^3.2.0",
|
|
66
66
|
"@atlaskit/modal-dialog": "^14.6.0",
|
|
67
|
-
"@atlaskit/popup": "^4.
|
|
67
|
+
"@atlaskit/popup": "^4.6.0",
|
|
68
68
|
"@atlaskit/range": "^9.2.0",
|
|
69
|
-
"@atlaskit/section-message": "^8.
|
|
69
|
+
"@atlaskit/section-message": "^8.9.0",
|
|
70
70
|
"@atlaskit/ssr": "workspace:^",
|
|
71
71
|
"@atlaskit/textfield": "^8.0.0",
|
|
72
72
|
"@atlaskit/toggle": "^15.1.0",
|
|
@@ -113,9 +113,6 @@
|
|
|
113
113
|
},
|
|
114
114
|
"platform-visual-refresh-icons": {
|
|
115
115
|
"type": "boolean"
|
|
116
|
-
},
|
|
117
|
-
"platform-dtp_a11y_fix-dsp-23950": {
|
|
118
|
-
"type": "boolean"
|
|
119
116
|
}
|
|
120
117
|
},
|
|
121
118
|
"homepage": "https://atlassian.design/components/datetime-picker/"
|