@atlaskit/datetime-picker 12.7.7 → 12.7.9
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 +12 -0
- package/dist/cjs/components/date-picker.js +6 -2
- package/dist/cjs/components/date-time-picker.js +1 -1
- package/dist/cjs/components/time-picker.js +1 -1
- package/dist/cjs/internal/fixed-layer.js +11 -12
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/date-picker.js +6 -2
- package/dist/es2019/components/date-time-picker.js +1 -1
- package/dist/es2019/components/time-picker.js +1 -1
- package/dist/es2019/internal/fixed-layer.js +12 -12
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/date-picker.js +6 -2
- package/dist/esm/components/date-time-picker.js +1 -1
- package/dist/esm/components/time-picker.js +1 -1
- package/dist/esm/internal/fixed-layer.js +11 -12
- package/dist/esm/version.json +1 -1
- package/package.json +6 -5
- package/tmp/api-report-tmp.d.ts +274 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 12.7.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6f1daf0e449`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6f1daf0e449) - Prevent calander from overlaying input when at the bottom of viewport
|
|
8
|
+
|
|
9
|
+
## 12.7.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`e8bb91da805`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e8bb91da805) - [ux] Ensure menu doesn't close when focus moves within it. Makes future keyboard accessibility possible.
|
|
14
|
+
|
|
3
15
|
## 12.7.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -37,7 +37,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
37
37
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
38
38
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable @repo/internal/react/use-noop */ /** @jsx jsx */ // eslint-disable-next-line no-restricted-imports
|
|
39
39
|
var packageName = "@atlaskit/datetime-picker";
|
|
40
|
-
var packageVersion = "12.7.
|
|
40
|
+
var packageVersion = "12.7.9";
|
|
41
41
|
|
|
42
42
|
/* eslint-disable react/no-unused-prop-types */
|
|
43
43
|
|
|
@@ -168,12 +168,16 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
170
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onSelectBlur", function (event) {
|
|
171
|
+
var _this$containerRef;
|
|
172
|
+
var newlyFocusedElement = event.relatedTarget;
|
|
171
173
|
if (_this.getSafeState().clearingFromIcon) {
|
|
172
174
|
// Don't close menu if blurring after the user has clicked clear
|
|
173
175
|
_this.setState({
|
|
174
176
|
clearingFromIcon: false
|
|
175
177
|
});
|
|
176
|
-
} else {
|
|
178
|
+
} else if (!((_this$containerRef = _this.containerRef) !== null && _this$containerRef !== void 0 && _this$containerRef.contains(newlyFocusedElement))) {
|
|
179
|
+
// Don't close menu if focus is staying within the date picker's
|
|
180
|
+
// container. Makes keyboard accessibility of calendar possible
|
|
177
181
|
_this.setState({
|
|
178
182
|
isOpen: false,
|
|
179
183
|
isFocused: false
|
|
@@ -31,7 +31,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
31
31
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32
32
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } /* eslint-disable @repo/internal/react/use-noop */ /** @jsx jsx */ // eslint-disable-next-line no-restricted-imports
|
|
33
33
|
var packageName = "@atlaskit/datetime-picker";
|
|
34
|
-
var packageVersion = "12.7.
|
|
34
|
+
var packageVersion = "12.7.9";
|
|
35
35
|
|
|
36
36
|
/* eslint-disable react/no-unused-prop-types */
|
|
37
37
|
|
|
@@ -38,7 +38,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
38
38
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
39
39
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
40
40
|
var packageName = "@atlaskit/datetime-picker";
|
|
41
|
-
var packageVersion = "12.7.
|
|
41
|
+
var packageVersion = "12.7.9";
|
|
42
42
|
|
|
43
43
|
/* eslint-disable react/no-unused-prop-types */
|
|
44
44
|
|
|
@@ -61,6 +61,16 @@ var FixedLayer = /*#__PURE__*/function (_React$Component) {
|
|
|
61
61
|
if (!containerRef) {
|
|
62
62
|
return /*#__PURE__*/_react.default.createElement("div", null);
|
|
63
63
|
}
|
|
64
|
+
var divStyles = _objectSpread({
|
|
65
|
+
background: 'transparent',
|
|
66
|
+
position: 'absolute',
|
|
67
|
+
top: 0,
|
|
68
|
+
height: containerRef.getBoundingClientRect().height,
|
|
69
|
+
// Don't block the clear button
|
|
70
|
+
width: containerRef.getBoundingClientRect().width - parseInt(_icon.sizes.small.slice(0, -2)) - (0, _constants.gridSize)()
|
|
71
|
+
}, (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.date-picker-input-a11y-fix_cbbxs') && {
|
|
72
|
+
pointerEvents: 'none'
|
|
73
|
+
});
|
|
64
74
|
return (
|
|
65
75
|
/*#__PURE__*/
|
|
66
76
|
/* Need to wrap layer in a fixed position div so that it will render its content as fixed
|
|
@@ -71,18 +81,7 @@ var FixedLayer = /*#__PURE__*/function (_React$Component) {
|
|
|
71
81
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
72
82
|
ref: ref,
|
|
73
83
|
"data-layer-child": true,
|
|
74
|
-
style:
|
|
75
|
-
inset: 0,
|
|
76
|
-
pointerEvents: 'none',
|
|
77
|
-
background: 'transparent'
|
|
78
|
-
} : {
|
|
79
|
-
position: 'absolute',
|
|
80
|
-
top: 0,
|
|
81
|
-
height: containerRef.getBoundingClientRect().height,
|
|
82
|
-
// Don't block the clear button
|
|
83
|
-
width: containerRef.getBoundingClientRect().width - parseInt(_icon.sizes.small.slice(0, -2)) - (0, _constants.gridSize)(),
|
|
84
|
-
background: 'transparent'
|
|
85
|
-
}
|
|
84
|
+
style: divStyles
|
|
86
85
|
});
|
|
87
86
|
}), /*#__PURE__*/_react.default.createElement(_popper.Popper, null, function (_ref2) {
|
|
88
87
|
var ref = _ref2.ref,
|
package/dist/cjs/version.json
CHANGED
|
@@ -19,7 +19,7 @@ import { defaultDateFormat, EmptyComponent, padToTwo, placeholderDatetime } from
|
|
|
19
19
|
import FixedLayer from '../internal/fixed-layer';
|
|
20
20
|
import { convertTokens } from './utils';
|
|
21
21
|
const packageName = "@atlaskit/datetime-picker";
|
|
22
|
-
const packageVersion = "12.7.
|
|
22
|
+
const packageVersion = "12.7.9";
|
|
23
23
|
|
|
24
24
|
/* eslint-disable react/no-unused-prop-types */
|
|
25
25
|
|
|
@@ -146,12 +146,16 @@ class DatePicker extends Component {
|
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
148
|
_defineProperty(this, "onSelectBlur", event => {
|
|
149
|
+
var _this$containerRef;
|
|
150
|
+
const newlyFocusedElement = event.relatedTarget;
|
|
149
151
|
if (this.getSafeState().clearingFromIcon) {
|
|
150
152
|
// Don't close menu if blurring after the user has clicked clear
|
|
151
153
|
this.setState({
|
|
152
154
|
clearingFromIcon: false
|
|
153
155
|
});
|
|
154
|
-
} else {
|
|
156
|
+
} else if (!((_this$containerRef = this.containerRef) !== null && _this$containerRef !== void 0 && _this$containerRef.contains(newlyFocusedElement))) {
|
|
157
|
+
// Don't close menu if focus is staying within the date picker's
|
|
158
|
+
// container. Makes keyboard accessibility of calendar possible
|
|
155
159
|
this.setState({
|
|
156
160
|
isOpen: false,
|
|
157
161
|
isFocused: false
|
|
@@ -17,7 +17,7 @@ import DatePicker from './date-picker';
|
|
|
17
17
|
import TimePicker from './time-picker';
|
|
18
18
|
import { convertTokens } from './utils';
|
|
19
19
|
const packageName = "@atlaskit/datetime-picker";
|
|
20
|
-
const packageVersion = "12.7.
|
|
20
|
+
const packageVersion = "12.7.9";
|
|
21
21
|
|
|
22
22
|
/* eslint-disable react/no-unused-prop-types */
|
|
23
23
|
|
|
@@ -16,7 +16,7 @@ import FixedLayer from '../internal/fixed-layer';
|
|
|
16
16
|
import parseTime from '../internal/parse-time';
|
|
17
17
|
import { convertTokens } from './utils';
|
|
18
18
|
const packageName = "@atlaskit/datetime-picker";
|
|
19
|
-
const packageVersion = "12.7.
|
|
19
|
+
const packageVersion = "12.7.9";
|
|
20
20
|
|
|
21
21
|
/* eslint-disable react/no-unused-prop-types */
|
|
22
22
|
|
|
@@ -33,6 +33,17 @@ export default class FixedLayer extends React.Component {
|
|
|
33
33
|
if (!containerRef) {
|
|
34
34
|
return /*#__PURE__*/React.createElement("div", null);
|
|
35
35
|
}
|
|
36
|
+
const divStyles = {
|
|
37
|
+
background: 'transparent',
|
|
38
|
+
position: 'absolute',
|
|
39
|
+
top: 0,
|
|
40
|
+
height: containerRef.getBoundingClientRect().height,
|
|
41
|
+
// Don't block the clear button
|
|
42
|
+
width: containerRef.getBoundingClientRect().width - parseInt(sizes.small.slice(0, -2)) - gridSize(),
|
|
43
|
+
...(getBooleanFF('platform.design-system-team.date-picker-input-a11y-fix_cbbxs') && {
|
|
44
|
+
pointerEvents: 'none'
|
|
45
|
+
})
|
|
46
|
+
};
|
|
36
47
|
return (
|
|
37
48
|
/*#__PURE__*/
|
|
38
49
|
/* Need to wrap layer in a fixed position div so that it will render its content as fixed
|
|
@@ -43,18 +54,7 @@ export default class FixedLayer extends React.Component {
|
|
|
43
54
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
44
55
|
ref: ref,
|
|
45
56
|
"data-layer-child": true,
|
|
46
|
-
style:
|
|
47
|
-
inset: 0,
|
|
48
|
-
pointerEvents: 'none',
|
|
49
|
-
background: 'transparent'
|
|
50
|
-
} : {
|
|
51
|
-
position: 'absolute',
|
|
52
|
-
top: 0,
|
|
53
|
-
height: containerRef.getBoundingClientRect().height,
|
|
54
|
-
// Don't block the clear button
|
|
55
|
-
width: containerRef.getBoundingClientRect().width - parseInt(sizes.small.slice(0, -2)) - gridSize(),
|
|
56
|
-
background: 'transparent'
|
|
57
|
-
}
|
|
57
|
+
style: divStyles
|
|
58
58
|
})), /*#__PURE__*/React.createElement(Popper, null, ({
|
|
59
59
|
ref,
|
|
60
60
|
style,
|
package/dist/es2019/version.json
CHANGED
|
@@ -30,7 +30,7 @@ import { defaultDateFormat, EmptyComponent, padToTwo, placeholderDatetime } from
|
|
|
30
30
|
import FixedLayer from '../internal/fixed-layer';
|
|
31
31
|
import { convertTokens } from './utils';
|
|
32
32
|
var packageName = "@atlaskit/datetime-picker";
|
|
33
|
-
var packageVersion = "12.7.
|
|
33
|
+
var packageVersion = "12.7.9";
|
|
34
34
|
|
|
35
35
|
/* eslint-disable react/no-unused-prop-types */
|
|
36
36
|
|
|
@@ -161,12 +161,16 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
163
|
_defineProperty(_assertThisInitialized(_this), "onSelectBlur", function (event) {
|
|
164
|
+
var _this$containerRef;
|
|
165
|
+
var newlyFocusedElement = event.relatedTarget;
|
|
164
166
|
if (_this.getSafeState().clearingFromIcon) {
|
|
165
167
|
// Don't close menu if blurring after the user has clicked clear
|
|
166
168
|
_this.setState({
|
|
167
169
|
clearingFromIcon: false
|
|
168
170
|
});
|
|
169
|
-
} else {
|
|
171
|
+
} else if (!((_this$containerRef = _this.containerRef) !== null && _this$containerRef !== void 0 && _this$containerRef.contains(newlyFocusedElement))) {
|
|
172
|
+
// Don't close menu if focus is staying within the date picker's
|
|
173
|
+
// container. Makes keyboard accessibility of calendar possible
|
|
170
174
|
_this.setState({
|
|
171
175
|
isOpen: false,
|
|
172
176
|
isFocused: false
|
|
@@ -27,7 +27,7 @@ import DatePicker from './date-picker';
|
|
|
27
27
|
import TimePicker from './time-picker';
|
|
28
28
|
import { convertTokens } from './utils';
|
|
29
29
|
var packageName = "@atlaskit/datetime-picker";
|
|
30
|
-
var packageVersion = "12.7.
|
|
30
|
+
var packageVersion = "12.7.9";
|
|
31
31
|
|
|
32
32
|
/* eslint-disable react/no-unused-prop-types */
|
|
33
33
|
|
|
@@ -29,7 +29,7 @@ import FixedLayer from '../internal/fixed-layer';
|
|
|
29
29
|
import parseTime from '../internal/parse-time';
|
|
30
30
|
import { convertTokens } from './utils';
|
|
31
31
|
var packageName = "@atlaskit/datetime-picker";
|
|
32
|
-
var packageVersion = "12.7.
|
|
32
|
+
var packageVersion = "12.7.9";
|
|
33
33
|
|
|
34
34
|
/* eslint-disable react/no-unused-prop-types */
|
|
35
35
|
|
|
@@ -55,6 +55,16 @@ var FixedLayer = /*#__PURE__*/function (_React$Component) {
|
|
|
55
55
|
if (!containerRef) {
|
|
56
56
|
return /*#__PURE__*/React.createElement("div", null);
|
|
57
57
|
}
|
|
58
|
+
var divStyles = _objectSpread({
|
|
59
|
+
background: 'transparent',
|
|
60
|
+
position: 'absolute',
|
|
61
|
+
top: 0,
|
|
62
|
+
height: containerRef.getBoundingClientRect().height,
|
|
63
|
+
// Don't block the clear button
|
|
64
|
+
width: containerRef.getBoundingClientRect().width - parseInt(sizes.small.slice(0, -2)) - gridSize()
|
|
65
|
+
}, getBooleanFF('platform.design-system-team.date-picker-input-a11y-fix_cbbxs') && {
|
|
66
|
+
pointerEvents: 'none'
|
|
67
|
+
});
|
|
58
68
|
return (
|
|
59
69
|
/*#__PURE__*/
|
|
60
70
|
/* Need to wrap layer in a fixed position div so that it will render its content as fixed
|
|
@@ -65,18 +75,7 @@ var FixedLayer = /*#__PURE__*/function (_React$Component) {
|
|
|
65
75
|
return /*#__PURE__*/React.createElement("div", {
|
|
66
76
|
ref: ref,
|
|
67
77
|
"data-layer-child": true,
|
|
68
|
-
style:
|
|
69
|
-
inset: 0,
|
|
70
|
-
pointerEvents: 'none',
|
|
71
|
-
background: 'transparent'
|
|
72
|
-
} : {
|
|
73
|
-
position: 'absolute',
|
|
74
|
-
top: 0,
|
|
75
|
-
height: containerRef.getBoundingClientRect().height,
|
|
76
|
-
// Don't block the clear button
|
|
77
|
-
width: containerRef.getBoundingClientRect().width - parseInt(sizes.small.slice(0, -2)) - gridSize(),
|
|
78
|
-
background: 'transparent'
|
|
79
|
-
}
|
|
78
|
+
style: divStyles
|
|
80
79
|
});
|
|
81
80
|
}), /*#__PURE__*/React.createElement(Popper, null, function (_ref2) {
|
|
82
81
|
var ref = _ref2.ref,
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "12.7.
|
|
3
|
+
"version": "12.7.9",
|
|
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/"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
36
|
-
"@atlaskit/calendar": "^13.
|
|
36
|
+
"@atlaskit/calendar": "^13.2.0",
|
|
37
37
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
38
38
|
"@atlaskit/icon": "^21.12.0",
|
|
39
39
|
"@atlaskit/locale": "^2.5.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/popper": "^5.5.0",
|
|
42
42
|
"@atlaskit/select": "^16.5.0",
|
|
43
43
|
"@atlaskit/theme": "^12.5.0",
|
|
44
|
-
"@atlaskit/tokens": "^1.
|
|
44
|
+
"@atlaskit/tokens": "^1.14.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@emotion/react": "^11.7.1",
|
|
47
47
|
"date-fns": "^2.17.0",
|
|
@@ -52,11 +52,12 @@
|
|
|
52
52
|
"react": "^16.8.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@
|
|
55
|
+
"@af/accessibility-testing": "*",
|
|
56
|
+
"@atlaskit/button": "^16.9.0",
|
|
56
57
|
"@atlaskit/docs": "*",
|
|
57
58
|
"@atlaskit/form": "^8.11.0",
|
|
58
59
|
"@atlaskit/modal-dialog": "^12.6.0",
|
|
59
|
-
"@atlaskit/popup": "^1.
|
|
60
|
+
"@atlaskit/popup": "^1.9.0",
|
|
60
61
|
"@atlaskit/range": "^7.1.0",
|
|
61
62
|
"@atlaskit/section-message": "^6.4.0",
|
|
62
63
|
"@atlaskit/ssr": "*",
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/datetime-picker"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { ComponentType } from 'react';
|
|
8
|
+
import { DropdownIndicatorProps } from '@atlaskit/select';
|
|
9
|
+
import { FocusEvent as FocusEvent_2 } from 'react';
|
|
10
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
11
|
+
import { GroupType } from '@atlaskit/select';
|
|
12
|
+
import { OptionType } from '@atlaskit/select';
|
|
13
|
+
import { default as React_2 } from 'react';
|
|
14
|
+
import { RefAttributes } from 'react';
|
|
15
|
+
import { SelectProps as SelectProps_2 } from '@atlaskit/select';
|
|
16
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
17
|
+
import { WithContextProps } from '@atlaskit/analytics-next';
|
|
18
|
+
|
|
19
|
+
// @public (undocumented)
|
|
20
|
+
export type Appearance = 'default' | 'none' | 'subtle';
|
|
21
|
+
|
|
22
|
+
// @public (undocumented)
|
|
23
|
+
export const DatePicker: ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps_2, keyof WithAnalyticsEventsProps>, "dateFormat" | "formatDisplayLabel" | "isOpen" | "maxDate" | "minDate" | "nextMonthLabel" | "parseInputValue" | "placeholder" | "previousMonthLabel" | "testId" | "value" | "weekStartDay"> & Partial<Pick<Omit<DatePickerProps_2, keyof WithAnalyticsEventsProps>, "appearance" | "autoFocus" | "defaultIsOpen" | "defaultValue" | "disabled" | "disabledDateFilter" | "hideIcon" | "icon" | "id" | "innerProps" | "isDisabled" | "isInvalid" | "locale" | "name" | "onBlur" | "onChange" | "onFocus" | "selectProps" | "spacing">> & Partial<Pick<{
|
|
24
|
+
appearance: Appearance;
|
|
25
|
+
autoFocus: boolean;
|
|
26
|
+
defaultIsOpen: boolean;
|
|
27
|
+
defaultValue: string;
|
|
28
|
+
disabled: string[];
|
|
29
|
+
disabledDateFilter: (_: string) => boolean;
|
|
30
|
+
hideIcon: boolean;
|
|
31
|
+
icon: ComponentType<DropdownIndicatorProps<OptionType, boolean, GroupType<OptionType>>>;
|
|
32
|
+
id: string;
|
|
33
|
+
innerProps: {};
|
|
34
|
+
isDisabled: boolean;
|
|
35
|
+
isInvalid: boolean;
|
|
36
|
+
name: string;
|
|
37
|
+
onBlur: (event: FocusEvent_2<HTMLInputElement>) => void;
|
|
38
|
+
onChange: (value: string) => void;
|
|
39
|
+
onFocus: (event: FocusEvent_2<HTMLInputElement>) => void;
|
|
40
|
+
selectProps: {};
|
|
41
|
+
spacing: Spacing;
|
|
42
|
+
locale: string;
|
|
43
|
+
}, never>> & RefAttributes<any> & WithContextProps, "analyticsContext" | "appearance" | "autoFocus" | "dateFormat" | "defaultIsOpen" | "defaultValue" | "disabled" | "disabledDateFilter" | "formatDisplayLabel" | "hideIcon" | "icon" | "id" | "innerProps" | "isDisabled" | "isInvalid" | "isOpen" | "key" | "locale" | "maxDate" | "minDate" | "name" | "nextMonthLabel" | "onBlur" | "onChange" | "onFocus" | "parseInputValue" | "placeholder" | "previousMonthLabel" | "selectProps" | "spacing" | "testId" | "value" | "weekStartDay"> & RefAttributes<any>>;
|
|
44
|
+
|
|
45
|
+
// @public (undocumented)
|
|
46
|
+
const datePickerDefaultProps: {
|
|
47
|
+
appearance: Appearance;
|
|
48
|
+
autoFocus: boolean;
|
|
49
|
+
defaultIsOpen: boolean;
|
|
50
|
+
defaultValue: string;
|
|
51
|
+
disabled: string[];
|
|
52
|
+
disabledDateFilter: (_: string) => boolean;
|
|
53
|
+
hideIcon: boolean;
|
|
54
|
+
icon: ComponentType<DropdownIndicatorProps<OptionType, boolean, GroupType<OptionType>>>;
|
|
55
|
+
id: string;
|
|
56
|
+
innerProps: {};
|
|
57
|
+
isDisabled: boolean;
|
|
58
|
+
isInvalid: boolean;
|
|
59
|
+
name: string;
|
|
60
|
+
onBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
61
|
+
onChange: (value: string) => void;
|
|
62
|
+
onFocus: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
63
|
+
selectProps: {};
|
|
64
|
+
spacing: Spacing;
|
|
65
|
+
locale: string;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// @public (undocumented)
|
|
69
|
+
export interface DatePickerProps extends WithAnalyticsEventsProps {
|
|
70
|
+
appearance?: Appearance;
|
|
71
|
+
autoFocus?: boolean;
|
|
72
|
+
dateFormat?: string;
|
|
73
|
+
defaultIsOpen?: boolean;
|
|
74
|
+
defaultValue?: string;
|
|
75
|
+
disabled?: string[];
|
|
76
|
+
disabledDateFilter?: (date: string) => boolean;
|
|
77
|
+
formatDisplayLabel?: (value: string, dateFormat: string) => string;
|
|
78
|
+
hideIcon?: boolean;
|
|
79
|
+
icon?: React.ComponentType<DropdownIndicatorProps<OptionType>>;
|
|
80
|
+
id?: string;
|
|
81
|
+
innerProps?: React.AllHTMLAttributes<HTMLElement>;
|
|
82
|
+
isDisabled?: boolean;
|
|
83
|
+
isInvalid?: boolean;
|
|
84
|
+
isOpen?: boolean;
|
|
85
|
+
locale?: string;
|
|
86
|
+
maxDate?: string;
|
|
87
|
+
minDate?: string;
|
|
88
|
+
name?: string;
|
|
89
|
+
nextMonthLabel?: string;
|
|
90
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
91
|
+
onChange?: (value: string) => void;
|
|
92
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
93
|
+
parseInputValue?: (date: string, dateFormat: string) => Date;
|
|
94
|
+
placeholder?: string;
|
|
95
|
+
previousMonthLabel?: string;
|
|
96
|
+
selectProps?: SelectProps;
|
|
97
|
+
spacing?: Spacing;
|
|
98
|
+
testId?: string;
|
|
99
|
+
value?: string;
|
|
100
|
+
weekStartDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// @public (undocumented)
|
|
104
|
+
type DatePickerProps_2 = typeof datePickerDefaultProps & DatePickerProps;
|
|
105
|
+
|
|
106
|
+
// @public (undocumented)
|
|
107
|
+
export const DateTimePicker: React_2.ForwardRefExoticComponent<Pick<Pick<Omit<DateTimePickerProps_2, keyof WithAnalyticsEventsProps>, "dateFormat" | "parseValue" | "testId" | "timeFormat" | "value"> & Partial<Pick<Omit<DateTimePickerProps_2, keyof WithAnalyticsEventsProps>, "appearance" | "autoFocus" | "datePickerProps" | "datePickerSelectProps" | "defaultValue" | "id" | "innerProps" | "isDisabled" | "isInvalid" | "locale" | "name" | "onBlur" | "onChange" | "onFocus" | "spacing" | "timeIsEditable" | "timePickerProps" | "timePickerSelectProps" | "times">> & Partial<Pick<{
|
|
108
|
+
appearance: string;
|
|
109
|
+
autoFocus: boolean;
|
|
110
|
+
isDisabled: boolean;
|
|
111
|
+
name: string;
|
|
112
|
+
onBlur: (event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
113
|
+
onChange: (value: string) => void;
|
|
114
|
+
onFocus: (event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
115
|
+
innerProps: {};
|
|
116
|
+
id: string;
|
|
117
|
+
defaultValue: string;
|
|
118
|
+
timeIsEditable: boolean;
|
|
119
|
+
isInvalid: boolean;
|
|
120
|
+
datePickerProps: {};
|
|
121
|
+
timePickerProps: {};
|
|
122
|
+
datePickerSelectProps: {};
|
|
123
|
+
timePickerSelectProps: {};
|
|
124
|
+
times: string[];
|
|
125
|
+
spacing: string;
|
|
126
|
+
locale: string;
|
|
127
|
+
}, never>> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "appearance" | "autoFocus" | "dateFormat" | "datePickerProps" | "datePickerSelectProps" | "defaultValue" | "id" | "innerProps" | "isDisabled" | "isInvalid" | "key" | "locale" | "name" | "onBlur" | "onChange" | "onFocus" | "parseValue" | "spacing" | "testId" | "timeFormat" | "timeIsEditable" | "timePickerProps" | "timePickerSelectProps" | "times" | "value"> & React_2.RefAttributes<any>>;
|
|
128
|
+
|
|
129
|
+
// @public (undocumented)
|
|
130
|
+
const dateTimePickerDefaultProps: {
|
|
131
|
+
appearance: string;
|
|
132
|
+
autoFocus: boolean;
|
|
133
|
+
isDisabled: boolean;
|
|
134
|
+
name: string;
|
|
135
|
+
onBlur: (event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
136
|
+
onChange: (value: string) => void;
|
|
137
|
+
onFocus: (event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
138
|
+
innerProps: {};
|
|
139
|
+
id: string;
|
|
140
|
+
defaultValue: string;
|
|
141
|
+
timeIsEditable: boolean;
|
|
142
|
+
isInvalid: boolean;
|
|
143
|
+
datePickerProps: {};
|
|
144
|
+
timePickerProps: {};
|
|
145
|
+
datePickerSelectProps: {};
|
|
146
|
+
timePickerSelectProps: {};
|
|
147
|
+
times: string[];
|
|
148
|
+
spacing: string;
|
|
149
|
+
locale: string;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
// @public (undocumented)
|
|
153
|
+
export interface DateTimePickerProps extends WithAnalyticsEventsProps {
|
|
154
|
+
appearance?: Appearance;
|
|
155
|
+
autoFocus?: boolean;
|
|
156
|
+
dateFormat?: string;
|
|
157
|
+
datePickerProps?: DatePickerProps;
|
|
158
|
+
datePickerSelectProps?: SelectProps_2<any>;
|
|
159
|
+
defaultValue?: string;
|
|
160
|
+
id?: string;
|
|
161
|
+
innerProps?: React_2.AllHTMLAttributes<HTMLElement>;
|
|
162
|
+
isDisabled?: boolean;
|
|
163
|
+
isInvalid?: boolean;
|
|
164
|
+
locale?: string;
|
|
165
|
+
name?: string;
|
|
166
|
+
onBlur?: React_2.FocusEventHandler<HTMLInputElement>;
|
|
167
|
+
onChange?: (value: string) => void;
|
|
168
|
+
onFocus?: React_2.FocusEventHandler<HTMLInputElement>;
|
|
169
|
+
parseValue?: (dateTimeValue: string, date: string, time: string, timezone: string) => {
|
|
170
|
+
dateValue: string;
|
|
171
|
+
timeValue: string;
|
|
172
|
+
zoneValue: string;
|
|
173
|
+
};
|
|
174
|
+
spacing?: Spacing;
|
|
175
|
+
testId?: string;
|
|
176
|
+
timeFormat?: string;
|
|
177
|
+
timeIsEditable?: boolean;
|
|
178
|
+
timePickerProps?: TimePickerProps;
|
|
179
|
+
timePickerSelectProps?: SelectProps_2<any>;
|
|
180
|
+
times?: Array<string>;
|
|
181
|
+
value?: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// @public (undocumented)
|
|
185
|
+
type DateTimePickerProps_2 = typeof dateTimePickerDefaultProps & DateTimePickerProps;
|
|
186
|
+
|
|
187
|
+
// @public (undocumented)
|
|
188
|
+
type SelectProps = any;
|
|
189
|
+
|
|
190
|
+
// @public (undocumented)
|
|
191
|
+
export type Spacing = 'compact' | 'default';
|
|
192
|
+
|
|
193
|
+
// @public (undocumented)
|
|
194
|
+
export const TimePicker: React_2.ForwardRefExoticComponent<Pick<Pick<Omit<TimePickerProps_2, keyof WithAnalyticsEventsProps>, "formatDisplayLabel" | "isOpen" | "placeholder" | "testId" | "timeFormat" | "value"> & Partial<Pick<Omit<TimePickerProps_2, keyof WithAnalyticsEventsProps>, "appearance" | "autoFocus" | "defaultIsOpen" | "defaultValue" | "hideIcon" | "id" | "innerProps" | "isDisabled" | "isInvalid" | "locale" | "name" | "onBlur" | "onChange" | "onFocus" | "parseInputValue" | "selectProps" | "spacing" | "timeIsEditable" | "times">> & Partial<Pick<{
|
|
195
|
+
appearance: Appearance;
|
|
196
|
+
autoFocus: boolean;
|
|
197
|
+
defaultIsOpen: boolean;
|
|
198
|
+
defaultValue: string;
|
|
199
|
+
hideIcon: boolean;
|
|
200
|
+
id: string;
|
|
201
|
+
innerProps: {};
|
|
202
|
+
isDisabled: boolean;
|
|
203
|
+
isInvalid: boolean;
|
|
204
|
+
name: string;
|
|
205
|
+
onBlur: (event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
206
|
+
onChange: (value: string) => void;
|
|
207
|
+
onFocus: (event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
208
|
+
parseInputValue: (time: string, timeFormat: string) => Date | string;
|
|
209
|
+
selectProps: {};
|
|
210
|
+
spacing: Spacing;
|
|
211
|
+
times: string[];
|
|
212
|
+
timeIsEditable: boolean;
|
|
213
|
+
locale: string;
|
|
214
|
+
}, never>> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "appearance" | "autoFocus" | "defaultIsOpen" | "defaultValue" | "formatDisplayLabel" | "hideIcon" | "id" | "innerProps" | "isDisabled" | "isInvalid" | "isOpen" | "key" | "locale" | "name" | "onBlur" | "onChange" | "onFocus" | "parseInputValue" | "placeholder" | "selectProps" | "spacing" | "testId" | "timeFormat" | "timeIsEditable" | "times" | "value"> & React_2.RefAttributes<any>>;
|
|
215
|
+
|
|
216
|
+
// @public (undocumented)
|
|
217
|
+
const timePickerDefaultProps: {
|
|
218
|
+
appearance: Appearance;
|
|
219
|
+
autoFocus: boolean;
|
|
220
|
+
defaultIsOpen: boolean;
|
|
221
|
+
defaultValue: string;
|
|
222
|
+
hideIcon: boolean;
|
|
223
|
+
id: string;
|
|
224
|
+
innerProps: {};
|
|
225
|
+
isDisabled: boolean;
|
|
226
|
+
isInvalid: boolean;
|
|
227
|
+
name: string;
|
|
228
|
+
onBlur: (event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
229
|
+
onChange: (value: string) => void;
|
|
230
|
+
onFocus: (event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
231
|
+
parseInputValue: (time: string, timeFormat: string) => Date | string;
|
|
232
|
+
selectProps: {};
|
|
233
|
+
spacing: Spacing;
|
|
234
|
+
times: string[];
|
|
235
|
+
timeIsEditable: boolean;
|
|
236
|
+
locale: string;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
// @public (undocumented)
|
|
240
|
+
export interface TimePickerProps extends WithAnalyticsEventsProps {
|
|
241
|
+
appearance?: Appearance;
|
|
242
|
+
autoFocus?: boolean;
|
|
243
|
+
defaultIsOpen?: boolean;
|
|
244
|
+
defaultValue?: string;
|
|
245
|
+
formatDisplayLabel?: (time: string, timeFormat: string) => string;
|
|
246
|
+
hideIcon?: boolean;
|
|
247
|
+
id?: string;
|
|
248
|
+
innerProps?: React_2.AllHTMLAttributes<HTMLElement>;
|
|
249
|
+
isDisabled?: boolean;
|
|
250
|
+
isInvalid?: boolean;
|
|
251
|
+
isOpen?: boolean;
|
|
252
|
+
locale?: string;
|
|
253
|
+
name?: string;
|
|
254
|
+
onBlur?: React_2.FocusEventHandler<HTMLElement>;
|
|
255
|
+
onChange?: (value: string) => void;
|
|
256
|
+
onFocus?: React_2.FocusEventHandler<HTMLElement>;
|
|
257
|
+
// (undocumented)
|
|
258
|
+
parseInputValue?: (time: string, timeFormat: string) => Date | string;
|
|
259
|
+
placeholder?: string;
|
|
260
|
+
selectProps?: SelectProps_2<any>;
|
|
261
|
+
spacing?: Spacing;
|
|
262
|
+
testId?: string;
|
|
263
|
+
timeFormat?: string;
|
|
264
|
+
timeIsEditable?: boolean;
|
|
265
|
+
times?: string[];
|
|
266
|
+
value?: string;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// @public (undocumented)
|
|
270
|
+
type TimePickerProps_2 = typeof timePickerDefaultProps & TimePickerProps;
|
|
271
|
+
|
|
272
|
+
// (No @packageDocumentation comment for this package)
|
|
273
|
+
|
|
274
|
+
```
|