@atlaskit/datetime-picker 17.9.5 → 17.9.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 +6 -0
- package/date-picker/package.json +1 -8
- package/date-time-picker/package.json +1 -8
- package/dist/cjs/components/date-picker.js +1 -1
- package/dist/cjs/components/date-time-picker.js +1 -1
- package/dist/cjs/components/time-picker.js +1 -1
- package/dist/es2019/components/date-picker.js +1 -1
- package/dist/es2019/components/date-time-picker.js +1 -1
- package/dist/es2019/components/time-picker.js +1 -1
- package/dist/esm/components/date-picker.js +1 -1
- package/dist/esm/components/date-time-picker.js +1 -1
- package/dist/esm/components/time-picker.js +1 -1
- package/package.json +2 -2
- package/time-picker/package.json +1 -8
- package/types/package.json +1 -8
- package/dist/types-ts4.5/components/date-picker.d.ts +0 -19
- package/dist/types-ts4.5/components/date-time-picker.d.ts +0 -15
- package/dist/types-ts4.5/components/time-picker.d.ts +0 -13
- package/dist/types-ts4.5/entry-points/date-picker.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/date-time-picker.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/time-picker.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -4
- package/dist/types-ts4.5/internal/convert-to24hr-time.d.ts +0 -7
- package/dist/types-ts4.5/internal/date-time-picker-container.d.ts +0 -19
- package/dist/types-ts4.5/internal/default-date-format.d.ts +0 -1
- package/dist/types-ts4.5/internal/default-times.d.ts +0 -1
- package/dist/types-ts4.5/internal/empty-component.d.ts +0 -4
- package/dist/types-ts4.5/internal/ff-component.d.ts +0 -34
- package/dist/types-ts4.5/internal/fixed-layer-menu-top-layer.d.ts +0 -12
- package/dist/types-ts4.5/internal/fixed-layer-menu.d.ts +0 -5
- package/dist/types-ts4.5/internal/fixed-layer.d.ts +0 -37
- package/dist/types-ts4.5/internal/format-date-time-zone-into-iso.d.ts +0 -4
- package/dist/types-ts4.5/internal/format-date.d.ts +0 -23
- package/dist/types-ts4.5/internal/get-parsed-iso.d.ts +0 -20
- package/dist/types-ts4.5/internal/get-placeholder.d.ts +0 -22
- package/dist/types-ts4.5/internal/get-safe-calendar-value.d.ts +0 -1
- package/dist/types-ts4.5/internal/get-short-iso-string.d.ts +0 -1
- package/dist/types-ts4.5/internal/indicators-container.d.ts +0 -8
- package/dist/types-ts4.5/internal/is-date-disabled.d.ts +0 -20
- package/dist/types-ts4.5/internal/is-valid.d.ts +0 -1
- package/dist/types-ts4.5/internal/menu-top-layer.d.ts +0 -16
- package/dist/types-ts4.5/internal/menu.d.ts +0 -9
- package/dist/types-ts4.5/internal/pad-two.d.ts +0 -1
- package/dist/types-ts4.5/internal/parse-date.d.ts +0 -29
- package/dist/types-ts4.5/internal/parse-time.d.ts +0 -1
- package/dist/types-ts4.5/internal/parse-tokens.d.ts +0 -1
- package/dist/types-ts4.5/internal/placeholder-date-time.d.ts +0 -1
- package/dist/types-ts4.5/internal/remove-spacer.d.ts +0 -1
- package/dist/types-ts4.5/internal/single-value.d.ts +0 -10
- package/dist/types-ts4.5/types.d.ts +0 -530
package/CHANGELOG.md
CHANGED
package/date-picker/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/date-picker.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/date-picker.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/date-picker.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/date-time-picker.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/date-time-picker.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/date-time-picker.d.ts"
|
|
17
10
|
}
|
|
@@ -44,7 +44,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
44
44
|
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; }
|
|
45
45
|
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; }
|
|
46
46
|
var packageName = "@atlaskit/datetime-picker";
|
|
47
|
-
var packageVersion = "17.9.
|
|
47
|
+
var packageVersion = "17.9.5";
|
|
48
48
|
var styles = {
|
|
49
49
|
pickerContainerStyle: "_kqswh2mm",
|
|
50
50
|
dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -33,7 +33,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
33
33
|
// for typing `process`
|
|
34
34
|
// oxlint-disable-next-line @atlassian/no-restricted-imports
|
|
35
35
|
var packageName = "@atlaskit/datetime-picker";
|
|
36
|
-
var packageVersion = "17.9.
|
|
36
|
+
var packageVersion = "17.9.5";
|
|
37
37
|
var analyticsAttributes = {
|
|
38
38
|
componentName: 'dateTimePicker',
|
|
39
39
|
packageName: packageName,
|
|
@@ -30,7 +30,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
30
30
|
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; }
|
|
31
31
|
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; } // oxlint-disable-next-line @atlassian/no-restricted-imports
|
|
32
32
|
var packageName = "@atlaskit/datetime-picker";
|
|
33
|
-
var packageVersion = "17.9.
|
|
33
|
+
var packageVersion = "17.9.5";
|
|
34
34
|
var defaultTimeFormat = 'h:mma';
|
|
35
35
|
var menuStyles = {
|
|
36
36
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
@@ -31,7 +31,7 @@ import { MenuTopLayer } from '../internal/menu-top-layer';
|
|
|
31
31
|
import { parseDate } from '../internal/parse-date';
|
|
32
32
|
import { makeSingleValue } from '../internal/single-value';
|
|
33
33
|
const packageName = "@atlaskit/datetime-picker";
|
|
34
|
-
const packageVersion = "17.9.
|
|
34
|
+
const packageVersion = "17.9.5";
|
|
35
35
|
const styles = {
|
|
36
36
|
pickerContainerStyle: "_kqswh2mm",
|
|
37
37
|
dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -20,7 +20,7 @@ import { convertTokens } from '../internal/parse-tokens';
|
|
|
20
20
|
import DatePicker from './date-picker';
|
|
21
21
|
import TimePicker from './time-picker';
|
|
22
22
|
const packageName = "@atlaskit/datetime-picker";
|
|
23
|
-
const packageVersion = "17.9.
|
|
23
|
+
const packageVersion = "17.9.5";
|
|
24
24
|
const analyticsAttributes = {
|
|
25
25
|
componentName: 'dateTimePicker',
|
|
26
26
|
packageName,
|
|
@@ -17,7 +17,7 @@ import { convertTokens } from '../internal/parse-tokens';
|
|
|
17
17
|
import { placeholderDatetime } from '../internal/placeholder-date-time';
|
|
18
18
|
import { makeSingleValue } from '../internal/single-value';
|
|
19
19
|
const packageName = "@atlaskit/datetime-picker";
|
|
20
|
-
const packageVersion = "17.9.
|
|
20
|
+
const packageVersion = "17.9.5";
|
|
21
21
|
const defaultTimeFormat = 'h:mma';
|
|
22
22
|
const menuStyles = {
|
|
23
23
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
@@ -37,7 +37,7 @@ import { MenuTopLayer } from '../internal/menu-top-layer';
|
|
|
37
37
|
import { parseDate } from '../internal/parse-date';
|
|
38
38
|
import { makeSingleValue } from '../internal/single-value';
|
|
39
39
|
var packageName = "@atlaskit/datetime-picker";
|
|
40
|
-
var packageVersion = "17.9.
|
|
40
|
+
var packageVersion = "17.9.5";
|
|
41
41
|
var styles = {
|
|
42
42
|
pickerContainerStyle: "_kqswh2mm",
|
|
43
43
|
dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -27,7 +27,7 @@ import { convertTokens } from '../internal/parse-tokens';
|
|
|
27
27
|
import DatePicker from './date-picker';
|
|
28
28
|
import TimePicker from './time-picker';
|
|
29
29
|
var packageName = "@atlaskit/datetime-picker";
|
|
30
|
-
var packageVersion = "17.9.
|
|
30
|
+
var packageVersion = "17.9.5";
|
|
31
31
|
var analyticsAttributes = {
|
|
32
32
|
componentName: 'dateTimePicker',
|
|
33
33
|
packageName: packageName,
|
|
@@ -23,7 +23,7 @@ import { convertTokens } from '../internal/parse-tokens';
|
|
|
23
23
|
import { placeholderDatetime } from '../internal/placeholder-date-time';
|
|
24
24
|
import { makeSingleValue } from '../internal/single-value';
|
|
25
25
|
var packageName = "@atlaskit/datetime-picker";
|
|
26
|
-
var packageVersion = "17.9.
|
|
26
|
+
var packageVersion = "17.9.5";
|
|
27
27
|
var defaultTimeFormat = 'h:mma';
|
|
28
28
|
var menuStyles = {
|
|
29
29
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "17.9.
|
|
3
|
+
"version": "17.9.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/"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/primitives": "^19.0.0",
|
|
53
53
|
"@atlaskit/select": "^21.12.0",
|
|
54
54
|
"@atlaskit/tokens": "^13.4.0",
|
|
55
|
-
"@atlaskit/top-layer": "^0.
|
|
55
|
+
"@atlaskit/top-layer": "^0.18.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
57
57
|
"@compiled/react": "^0.20.0",
|
|
58
58
|
"date-fns": "^2.17.0"
|
package/time-picker/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/time-picker.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/time-picker.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/time-picker.d.ts"
|
|
17
10
|
}
|
package/types/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/types.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/types.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/types.d.ts"
|
|
17
10
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type DropdownIndicatorProps, type OptionType } from '@atlaskit/select';
|
|
2
|
-
import { type DatePickerBaseProps, type DateTimePickerSelectProps } from '../types';
|
|
3
|
-
export type DatePickerProps = DatePickerBaseProps & {
|
|
4
|
-
icon?: React.ComponentType<DropdownIndicatorProps<OptionType>>;
|
|
5
|
-
selectProps?: DateTimePickerSelectProps & {
|
|
6
|
-
inputValue?: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* __Date picker__
|
|
11
|
-
*
|
|
12
|
-
* A date picker allows the user to select a particular date.
|
|
13
|
-
*
|
|
14
|
-
* - [Examples](https://atlassian.design/components/datetime-picker/date-picker/examples)
|
|
15
|
-
* - [Code](https://atlassian.design/components/datetime-picker/date-picker/code)
|
|
16
|
-
* - [Usage](https://atlassian.design/components/datetime-picker/date-picker/usage)
|
|
17
|
-
*/
|
|
18
|
-
declare const DatePicker: React.ForwardRefExoticComponent<React.PropsWithoutRef<DatePickerProps> & React.RefAttributes<HTMLElement>>;
|
|
19
|
-
export default DatePicker;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type DateTimePickerBaseProps } from '../types';
|
|
3
|
-
export declare const datePickerDefaultAriaLabel = "Date";
|
|
4
|
-
export declare const timePickerDefaultAriaLabel = "Time";
|
|
5
|
-
/**
|
|
6
|
-
* __Date time picker__
|
|
7
|
-
*
|
|
8
|
-
* A date time picker allows the user to select an associated date and time.
|
|
9
|
-
*
|
|
10
|
-
* - [Examples](https://atlassian.design/components/datetime-picker/examples)
|
|
11
|
-
* - [Code](https://atlassian.design/components/datetime-picker/code)
|
|
12
|
-
* - [Usage](https://atlassian.design/components/datetime-picker/usage)
|
|
13
|
-
*/
|
|
14
|
-
declare const DateTimePicker: React.ForwardRefExoticComponent<React.PropsWithoutRef<DateTimePickerBaseProps> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
export default DateTimePicker;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type TimePickerBaseProps } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* __Time picker__
|
|
5
|
-
*
|
|
6
|
-
* A time picker allows the user to select a specific time.
|
|
7
|
-
*
|
|
8
|
-
* - [Examples](https://atlassian.design/components/datetime-picker/time-picker/examples)
|
|
9
|
-
* - [Code](https://atlassian.design/components/datetime-picker/time-picker/code)
|
|
10
|
-
* - [Usage](https://atlassian.design/components/datetime-picker/time-picker/usage)
|
|
11
|
-
*/
|
|
12
|
-
declare const TimePicker: React.ForwardRefExoticComponent<React.PropsWithoutRef<TimePickerBaseProps> & React.RefAttributes<unknown>>;
|
|
13
|
-
export default TimePicker;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../components/date-time-picker';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../components/time-picker';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { Appearance, DatePickerBaseProps, DateTimePickerBaseProps, DateTimePickerSelectProps, Spacing, TimePickerBaseProps, } from '../types';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { default as DatePicker } from './components/date-picker';
|
|
2
|
-
export { default as TimePicker } from './components/time-picker';
|
|
3
|
-
export { default as DateTimePicker } from './components/date-time-picker';
|
|
4
|
-
export type { Appearance, Spacing, DatePickerBaseProps as DatePickerProps, TimePickerBaseProps as TimePickerProps, DateTimePickerBaseProps as DateTimePickerProps, DateTimePickerSelectProps, } from './types';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type Appearance } from '../types';
|
|
6
|
-
type DateTimePickerContainerProps = {
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
isDisabled: boolean;
|
|
9
|
-
isFocused: boolean;
|
|
10
|
-
appearance: Appearance;
|
|
11
|
-
isInvalid: boolean;
|
|
12
|
-
innerProps: React.AllHTMLAttributes<HTMLElement>;
|
|
13
|
-
testId?: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* This is the container for the datetime picker component.
|
|
17
|
-
*/
|
|
18
|
-
export declare const DateTimePickerContainer: React.ForwardRefExoticComponent<React.PropsWithoutRef<DateTimePickerContainerProps> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const defaultDateFormat = "YYYY/MM/DD";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const defaultTimes: string[];
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type ComponentType, type FC, type PropsWithoutRef, type PropsWithRef, type RefAttributes } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Gets all available ref types from two prop sets and returns
|
|
4
|
-
* them in a ref prop
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```
|
|
8
|
-
* type P1 = { ref: Ref(HTMLDivElement), ... };
|
|
9
|
-
* type P2 = { ref: Ref(HTMLSpanElement), ... };
|
|
10
|
-
*
|
|
11
|
-
* GetRefAttributes(P1, P2) // {ref: Ref(HTMLDivElement | HTMLSpanElement)}
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
type GetRefAttributes<A, B> = A extends RefAttributes<infer RefA> ? B extends RefAttributes<infer RefB> ? RefAttributes<RefA | RefB> : RefAttributes<RefA> : B extends RefAttributes<infer OnlyRefB> ? RefAttributes<OnlyRefB> : unknown;
|
|
15
|
-
/**
|
|
16
|
-
* Returns one of components depending on a boolean condition.
|
|
17
|
-
* The result component will be a union of the two props and
|
|
18
|
-
* an or on both ref types.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```
|
|
22
|
-
* const Component = componentWithCondition(
|
|
23
|
-
* isBooleanConditionMet,
|
|
24
|
-
* ComponentWithConditionMet,
|
|
25
|
-
* ComponentWithConditionNotMet,
|
|
26
|
-
* );
|
|
27
|
-
*
|
|
28
|
-
* @param condition Function returning boolean value
|
|
29
|
-
* @param componentTrue Component that will be returned if conditionGetter is "true"
|
|
30
|
-
* @param componentFalse Component that will be returned if conditionGetter is "false"
|
|
31
|
-
* @returns Component Depending on a Condition result
|
|
32
|
-
*/
|
|
33
|
-
export declare function componentWithCondition<A extends {}, B extends {}>(condition: () => boolean, ComponentTrue: ComponentType<A>, ComponentFalse: ComponentType<B>): FC<PropsWithoutRef<A> & PropsWithoutRef<B> & GetRefAttributes<PropsWithRef<A>, PropsWithRef<B>>>;
|
|
34
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type MenuProps, type OptionType } from '@atlaskit/select';
|
|
2
|
-
/**
|
|
3
|
-
* Top-layer version of the fixed layer menu used in the time picker.
|
|
4
|
-
*
|
|
5
|
-
* Uses `Popover` + `useAnchorPosition` so the time options list renders
|
|
6
|
-
* in the browser's top layer via the native Popover API and is positioned
|
|
7
|
-
* via CSS Anchor Positioning. This avoids overflow clipping, z-index wars,
|
|
8
|
-
* and portal-based layering.
|
|
9
|
-
*
|
|
10
|
-
* Gated behind the `platform-dst-top-layer` feature flag.
|
|
11
|
-
*/
|
|
12
|
-
export declare const FixedLayerMenuTopLayer: ({ className, clearValue, cx, getStyles, getValue, hasValue, innerProps, innerRef, isLoading, isMulti, isRtl, maxMenuHeight, menuPlacement, menuPosition, menuShouldScrollIntoView, minMenuHeight, options, placement, selectOption, selectProps, setValue, children, ...rest }: MenuProps<OptionType>) => JSX.Element;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type MenuProps, type OptionType } from '@atlaskit/select';
|
|
2
|
-
/**
|
|
3
|
-
* This is the fixed layer menu used in the time picker.
|
|
4
|
-
*/
|
|
5
|
-
export declare const FixedLayerMenu: ({ className, clearValue, cx, getStyles, getValue, hasValue, innerProps, innerRef, isLoading, isMulti, isRtl, maxMenuHeight, menuPlacement, menuPosition, menuShouldScrollIntoView, minMenuHeight, options, placement, selectOption, selectProps, setValue, children, ...rest }: MenuProps<OptionType>) => JSX.Element;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
interface FixedLayerProps {
|
|
7
|
-
/**
|
|
8
|
-
* A ref to the container that the content should be layered around for height calculation
|
|
9
|
-
* purposes. This must be an ancestor element as component does not attach the layered content around
|
|
10
|
-
* the ref itself.
|
|
11
|
-
*/
|
|
12
|
-
containerRef: HTMLElement | null;
|
|
13
|
-
/**
|
|
14
|
-
* The content to render in the layer.
|
|
15
|
-
*/
|
|
16
|
-
content: React.ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* input value from the menu.
|
|
19
|
-
*/
|
|
20
|
-
inputValue: string;
|
|
21
|
-
/**
|
|
22
|
-
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
23
|
-
* - `{testId}--popper-container` wrapping element of time-picker
|
|
24
|
-
*/
|
|
25
|
-
testId?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* This component renders layered content with fixed positioning.
|
|
29
|
-
* Scroll is locked outside the layer to prevent the layered content from detaching from the
|
|
30
|
-
* container ref.
|
|
31
|
-
*/
|
|
32
|
-
export default class FixedLayer extends React.Component<FixedLayerProps> {
|
|
33
|
-
update: () => void;
|
|
34
|
-
componentDidUpdate(prevProps: any): void;
|
|
35
|
-
render(): JSX.Element;
|
|
36
|
-
}
|
|
37
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Everything in this file is to smooth out the migration of the new date picker
|
|
3
|
-
* (https://product-fabric.atlassian.net/browse/DSP-20682). When that ticket is
|
|
4
|
-
* complete, all of these functions will ilkely be merged back into the date
|
|
5
|
-
* picker. Please do not pre-optimize and put these back into the date picker
|
|
6
|
-
* unless you are working on the DTP Refresh and you have a good reason to do
|
|
7
|
-
* so, thank you!
|
|
8
|
-
*
|
|
9
|
-
* All variables within the `di` objects are dependency injections. They should
|
|
10
|
-
* be read from within the component at the end of the day. But because we are
|
|
11
|
-
* extracting them, we have to inject them in every place manually. When we
|
|
12
|
-
* re-introduce them to the components, we can likely remove the `di` variables
|
|
13
|
-
* and instead use internal variables.
|
|
14
|
-
*
|
|
15
|
-
* If component _only_ has injected variables, it is fully internal and was
|
|
16
|
-
* broken out to be it's own function.
|
|
17
|
-
*/
|
|
18
|
-
import { type LocalizationProvider } from '@atlaskit/locale';
|
|
19
|
-
export declare const formatDate: (value: string, di: {
|
|
20
|
-
formatDisplayLabel: ((value: string, dateFormat: string) => string) | undefined;
|
|
21
|
-
dateFormat: string | undefined;
|
|
22
|
-
l10n: LocalizationProvider;
|
|
23
|
-
}) => string;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Everything in this file is to smooth out the migration of the new date picker
|
|
3
|
-
* (https://product-fabric.atlassian.net/browse/DSP-20682). When that ticket is
|
|
4
|
-
* complete, all of these functions will ilkely be merged back into the date
|
|
5
|
-
* picker. Please do not pre-optimize and put these back into the date picker
|
|
6
|
-
* unless you are working on the DTP Refresh and you have a good reason to do
|
|
7
|
-
* so, thank you!
|
|
8
|
-
*
|
|
9
|
-
* All variables within the `di` objects are dependency injections. They should
|
|
10
|
-
* be read from within the component at the end of the day. But because we are
|
|
11
|
-
* extracting them, we have to inject them in every place manually. When we
|
|
12
|
-
* re-introduce them to the components, we can likely remove the `di` variables
|
|
13
|
-
* and instead use internal variables.
|
|
14
|
-
*
|
|
15
|
-
* If component _only_ has injected variables, it is fully internal and was
|
|
16
|
-
* broken out to be it's own function.
|
|
17
|
-
*/
|
|
18
|
-
export declare const getParsedISO: (di: {
|
|
19
|
-
iso: string;
|
|
20
|
-
}) => string;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Everything in this file is to smooth out the migration of the new date picker
|
|
3
|
-
* (https://product-fabric.atlassian.net/browse/DSP-20682). When that ticket is
|
|
4
|
-
* complete, all of these functions will ilkely be merged back into the date
|
|
5
|
-
* picker. Please do not pre-optimize and put these back into the date picker
|
|
6
|
-
* unless you are working on the DTP Refresh and you have a good reason to do
|
|
7
|
-
* so, thank you!
|
|
8
|
-
*
|
|
9
|
-
* All variables within the `di` objects are dependency injections. They should
|
|
10
|
-
* be read from within the component at the end of the day. But because we are
|
|
11
|
-
* extracting them, we have to inject them in every place manually. When we
|
|
12
|
-
* re-introduce them to the components, we can likely remove the `di` variables
|
|
13
|
-
* and instead use internal variables.
|
|
14
|
-
*
|
|
15
|
-
* If component _only_ has injected variables, it is fully internal and was
|
|
16
|
-
* broken out to be it's own function.
|
|
17
|
-
*/
|
|
18
|
-
import { type LocalizationProvider } from '@atlaskit/locale';
|
|
19
|
-
export declare const getPlaceholder: (di: {
|
|
20
|
-
placeholder: string | undefined;
|
|
21
|
-
l10n: LocalizationProvider;
|
|
22
|
-
}) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getSafeCalendarValue(calendarValue: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getShortISOString(date: Date): string;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type IndicatorsContainerProps } from '@atlaskit/select';
|
|
6
|
-
export declare const IndicatorsContainer: ({ showClearIndicator, ...rest }: IndicatorsContainerProps<any> & {
|
|
7
|
-
showClearIndicator?: boolean;
|
|
8
|
-
}) => JSX.Element;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Everything in this file is to smooth out the migration of the new date picker
|
|
3
|
-
* (https://product-fabric.atlassian.net/browse/DSP-20682). When that ticket is
|
|
4
|
-
* complete, all of these functions will ilkely be merged back into the date
|
|
5
|
-
* picker. Please do not pre-optimize and put these back into the date picker
|
|
6
|
-
* unless you are working on the DTP Refresh and you have a good reason to do
|
|
7
|
-
* so, thank you!
|
|
8
|
-
*
|
|
9
|
-
* All variables within the `di` objects are dependency injections. They should
|
|
10
|
-
* be read from within the component at the end of the day. But because we are
|
|
11
|
-
* extracting them, we have to inject them in every place manually. When we
|
|
12
|
-
* re-introduce them to the components, we can likely remove the `di` variables
|
|
13
|
-
* and instead use internal variables.
|
|
14
|
-
*
|
|
15
|
-
* If component _only_ has injected variables, it is fully internal and was
|
|
16
|
-
* broken out to be it's own function.
|
|
17
|
-
*/
|
|
18
|
-
export declare const isDateDisabled: (date: string, di: {
|
|
19
|
-
disabled: string[];
|
|
20
|
-
}) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isValid(timeString: string): boolean;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type MenuProps, type OptionType } from '@atlaskit/select';
|
|
6
|
-
/**
|
|
7
|
-
* Top-layer version of the date picker menu.
|
|
8
|
-
*
|
|
9
|
-
* Uses `Popover` + `useAnchorPosition` so the calendar renders in the
|
|
10
|
-
* browser's top layer via the native Popover API and is positioned via
|
|
11
|
-
* CSS Anchor Positioning. This avoids overflow clipping, z-index wars,
|
|
12
|
-
* and portal-based layering.
|
|
13
|
-
*
|
|
14
|
-
* Gated behind the `platform-dst-top-layer` feature flag.
|
|
15
|
-
*/
|
|
16
|
-
export declare const MenuTopLayer: ({ selectProps, innerProps }: MenuProps<OptionType>) => JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function padToTwo(number: number): string;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Everything in this file is to smooth out the migration of the new date picker
|
|
3
|
-
* (https://product-fabric.atlassian.net/browse/DSP-20682). When that ticket is
|
|
4
|
-
* complete, all of these functions will ilkely be merged back into the date
|
|
5
|
-
* picker. Please do not pre-optimize and put these back into the date picker
|
|
6
|
-
* unless you are working on the DTP Refresh and you have a good reason to do
|
|
7
|
-
* so, thank you!
|
|
8
|
-
*
|
|
9
|
-
* All variables within the `di` objects are dependency injections. They should
|
|
10
|
-
* be read from within the component at the end of the day. But because we are
|
|
11
|
-
* extracting them, we have to inject them in every place manually. When we
|
|
12
|
-
* re-introduce them to the components, we can likely remove the `di` variables
|
|
13
|
-
* and instead use internal variables.
|
|
14
|
-
*
|
|
15
|
-
* If component _only_ has injected variables, it is fully internal and was
|
|
16
|
-
* broken out to be it's own function.
|
|
17
|
-
*/
|
|
18
|
-
import { type LocalizationProvider } from '@atlaskit/locale';
|
|
19
|
-
/**
|
|
20
|
-
* There are two props that can change how the date is parsed.
|
|
21
|
-
* The priority of props used is:
|
|
22
|
-
* 1. `parseInputValue`
|
|
23
|
-
* 2. `locale`
|
|
24
|
-
*/
|
|
25
|
-
export declare const parseDate: (date: string, di: {
|
|
26
|
-
parseInputValue: ((date: string, dateFormat: string) => Date) | undefined;
|
|
27
|
-
dateFormat: string | undefined;
|
|
28
|
-
l10n: LocalizationProvider;
|
|
29
|
-
}) => Date;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function parseTime(time: string): string | Date;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function convertTokens(format: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const placeholderDatetime: Date;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function removeSpacer(time: string): string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type OptionType, type SingleValueProps } from '@atlaskit/select';
|
|
3
|
-
/**
|
|
4
|
-
* This creates a functional component that `react-select` will use to make the
|
|
5
|
-
* SingleValue part of the different pickers.
|
|
6
|
-
*/
|
|
7
|
-
export declare const makeSingleValue: ({ id, lang }: {
|
|
8
|
-
id?: string;
|
|
9
|
-
lang: string;
|
|
10
|
-
}) => ({ children, className, clearValue, cx, data, getStyles, getValue, hasValue, isDisabled, isMulti, isRtl, options, selectOption, selectProps, setValue, ...rest }: SingleValueProps<OptionType, false>) => React.JSX.Element;
|
|
@@ -1,530 +0,0 @@
|
|
|
1
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
2
|
-
import { type DropdownIndicatorProps, type OptionType, type SelectProps } from '@atlaskit/select';
|
|
3
|
-
export type Appearance = 'default' | 'subtle' | 'none';
|
|
4
|
-
export type Spacing = 'compact' | 'default';
|
|
5
|
-
type Combine<First, Second> = Omit<First, keyof Second> & Second;
|
|
6
|
-
/**
|
|
7
|
-
* Props to apply to the select. These include all of [the props from our
|
|
8
|
-
* `Select` component](/components/select). For the following properties, use
|
|
9
|
-
* the top-level prop alternatives:
|
|
10
|
-
*
|
|
11
|
-
* - `aria-describedby`, use `aria-describedby` prop
|
|
12
|
-
* - `aria-label`, use `label` prop
|
|
13
|
-
* - `inputId`, use `id` prop
|
|
14
|
-
* - `placeholder`, use `placeholder` prop
|
|
15
|
-
*
|
|
16
|
-
* Example:
|
|
17
|
-
*
|
|
18
|
-
* ```tsx
|
|
19
|
-
* // Don't do this
|
|
20
|
-
* <DatePicker selectProps={{
|
|
21
|
-
* 'aria-describedby': 'helper-id'
|
|
22
|
-
* }} />
|
|
23
|
-
*
|
|
24
|
-
* // Do this
|
|
25
|
-
* <DatePicker aria-describedby="helper-id" />
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
export type DateTimePickerSelectProps = Combine<SelectProps<OptionType>, {
|
|
29
|
-
/**
|
|
30
|
-
* Use the `aria-describedby` prop on the picker..
|
|
31
|
-
*/
|
|
32
|
-
'aria-describedby'?: never;
|
|
33
|
-
/**
|
|
34
|
-
* Use the `label` prop on the picker..
|
|
35
|
-
*/
|
|
36
|
-
'aria-label'?: never;
|
|
37
|
-
/**
|
|
38
|
-
* Use the `id` prop on the picker.`.
|
|
39
|
-
*/
|
|
40
|
-
inputId?: never;
|
|
41
|
-
/**
|
|
42
|
-
* Use the `placeholder` prop on the picker.
|
|
43
|
-
*/
|
|
44
|
-
placeholder?: never;
|
|
45
|
-
}>;
|
|
46
|
-
interface PickerSelectProps {
|
|
47
|
-
selectProps?: DateTimePickerSelectProps;
|
|
48
|
-
}
|
|
49
|
-
export interface DatePickerBaseProps extends WithAnalyticsEventsProps, PickerSelectProps {
|
|
50
|
-
/**
|
|
51
|
-
* Set the appearance of the picker.
|
|
52
|
-
* `subtle` will remove the borders, background, and icon.
|
|
53
|
-
* **NOTE:** Appearance values will be ignored if styles are parsed through `selectProps`.
|
|
54
|
-
*
|
|
55
|
-
* @deprecated
|
|
56
|
-
*/
|
|
57
|
-
appearance?: Appearance;
|
|
58
|
-
/**
|
|
59
|
-
* Used to associate accessible descriptions to the date picker.
|
|
60
|
-
*/
|
|
61
|
-
'aria-describedby'?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Set the picker to autofocus on mount.
|
|
64
|
-
*/
|
|
65
|
-
autoFocus?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Set the `aria-label` for the clear button.
|
|
68
|
-
* Add the word "Clear" at the beginning of the clearControlLabel.
|
|
69
|
-
* For instance, for a field to set an appointment, use "Clear appointment date and time".
|
|
70
|
-
*/
|
|
71
|
-
clearControlLabel?: string;
|
|
72
|
-
/**
|
|
73
|
-
* The default for `isOpen`. Will be `false` if not provided.
|
|
74
|
-
*
|
|
75
|
-
* @deprecated
|
|
76
|
-
*/
|
|
77
|
-
defaultIsOpen?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* The default for `value`.
|
|
80
|
-
*/
|
|
81
|
-
defaultValue?: string;
|
|
82
|
-
/**
|
|
83
|
-
* An array of ISO dates that should be disabled on the calendar. This does not affect what users can type into the picker.
|
|
84
|
-
*/
|
|
85
|
-
disabled?: string[];
|
|
86
|
-
/**
|
|
87
|
-
* A filter function for disabling dates on the calendar. This does not affect what users can type into the picker.
|
|
88
|
-
*
|
|
89
|
-
* The function is called with a date string in the format `YYYY-MM-DD` and should return `true` if the date should be disabled.
|
|
90
|
-
*/
|
|
91
|
-
disabledDateFilter?: (date: string) => boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Accessible name for the Date Picker Select, rendered as `aria-label`. This will override any other method of providing a label.
|
|
94
|
-
*/
|
|
95
|
-
label?: string;
|
|
96
|
-
/**
|
|
97
|
-
* The latest enabled date. Dates after this are disabled on the calendar. This does not affect what users can type into the picker.
|
|
98
|
-
*/
|
|
99
|
-
maxDate?: string;
|
|
100
|
-
/**
|
|
101
|
-
* The earliest enabled date. Dates before this are disabled on the calendar. This does not affect what users can type into the picker.
|
|
102
|
-
*/
|
|
103
|
-
minDate?: string;
|
|
104
|
-
/**
|
|
105
|
-
* The icon shown in the picker.
|
|
106
|
-
*
|
|
107
|
-
* @deprecated
|
|
108
|
-
*/
|
|
109
|
-
icon?: React.ComponentType<DropdownIndicatorProps<OptionType>>;
|
|
110
|
-
/**
|
|
111
|
-
* Set the id of the field.
|
|
112
|
-
* Associates a `<label></label>` with the field.
|
|
113
|
-
*/
|
|
114
|
-
id?: string;
|
|
115
|
-
/**
|
|
116
|
-
* Props to apply to the container.
|
|
117
|
-
*
|
|
118
|
-
* @deprecated If you are looking to set your width, use a `Box` from
|
|
119
|
-
* `@atlaskit/primitives` around the picker to achieve the same effect.
|
|
120
|
-
*/
|
|
121
|
-
innerProps?: React.AllHTMLAttributes<HTMLElement>;
|
|
122
|
-
/**
|
|
123
|
-
* Set if the picker is disabled.
|
|
124
|
-
*/
|
|
125
|
-
isDisabled?: boolean;
|
|
126
|
-
/**
|
|
127
|
-
* Set if the picker is open.
|
|
128
|
-
*/
|
|
129
|
-
isOpen?: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Set the field as required.
|
|
132
|
-
*/
|
|
133
|
-
isRequired?: boolean;
|
|
134
|
-
/**
|
|
135
|
-
* The name of the field.
|
|
136
|
-
*/
|
|
137
|
-
name?: string;
|
|
138
|
-
/**
|
|
139
|
-
* The aria-label attribute associated with the next-month arrow.
|
|
140
|
-
*/
|
|
141
|
-
nextMonthLabel?: string;
|
|
142
|
-
/**
|
|
143
|
-
* Called when the field is blurred.
|
|
144
|
-
*/
|
|
145
|
-
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
146
|
-
/**
|
|
147
|
-
* Called when the value changes. The only argument is an ISO time or empty string.
|
|
148
|
-
*/
|
|
149
|
-
onChange?: (value: string) => void;
|
|
150
|
-
/**
|
|
151
|
-
* Called when the field is focused.
|
|
152
|
-
*/
|
|
153
|
-
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
154
|
-
/**
|
|
155
|
-
* The name of the input, used when `shouldShowCalendarButton` is true. See `shouldShowCalendarButton` description for more details.
|
|
156
|
-
*
|
|
157
|
-
* @default 'Date picker'
|
|
158
|
-
*/
|
|
159
|
-
inputLabel?: string;
|
|
160
|
-
/**
|
|
161
|
-
* The ID of the label for the input, used when `shouldShowCalendarButton` is
|
|
162
|
-
* true. See `shouldShowCalendarButton` description for more details.
|
|
163
|
-
*/
|
|
164
|
-
inputLabelId?: string;
|
|
165
|
-
/**
|
|
166
|
-
* The label associated with the button to open the calendar, rendered via the
|
|
167
|
-
* `shouldShowCalendarButton` prop. If a `label` prop is provided, this
|
|
168
|
-
* calendar button label will be prefixed by the value of `label`. If no
|
|
169
|
-
* `label` prop is provided, this prefix should be manually added. For
|
|
170
|
-
* example,
|
|
171
|
-
*
|
|
172
|
-
* ```tsx
|
|
173
|
-
* <label id="label" htmlFor="datepicker">Desired Appointment Date</label>
|
|
174
|
-
* <DatePicker
|
|
175
|
-
* id="datepicker"
|
|
176
|
-
* shouldShowCalendarButton
|
|
177
|
-
* inputLabel="Desired Appointment Date"
|
|
178
|
-
* openCalendarLabel="open calendar"
|
|
179
|
-
* />
|
|
180
|
-
* ```
|
|
181
|
-
*
|
|
182
|
-
* @default 'open calendar'
|
|
183
|
-
*/
|
|
184
|
-
openCalendarLabel?: string;
|
|
185
|
-
/**
|
|
186
|
-
* A function for parsing input characters and transforming them into a Date object.
|
|
187
|
-
* By default parses the date string based off the locale. Note that this does
|
|
188
|
-
* not affect how the resulting value is displayed in the input. Use the
|
|
189
|
-
* `dateFormat` or `formatDisplayLabel` prop to handle how the value is
|
|
190
|
-
* displayed.
|
|
191
|
-
*/
|
|
192
|
-
parseInputValue?: (date: string, dateFormat: string) => Date;
|
|
193
|
-
/**
|
|
194
|
-
* A function for formatting the date displayed in the input. By default composes together [`date-fns`'s parse method](https://date-fns.org/v1.29.0/docs/parse) and [`date-fns`'s format method](https://date-fns.org/v1.29.0/docs/format) to return a correctly formatted date string.
|
|
195
|
-
*
|
|
196
|
-
* Note that this does not affect how the input is parsed. This must be done using the `parseInputValue` prop.
|
|
197
|
-
*/
|
|
198
|
-
formatDisplayLabel?: (value: string, dateFormat: string) => string;
|
|
199
|
-
/**
|
|
200
|
-
* The aria-label attribute associated with the previous-month arrow.
|
|
201
|
-
*/
|
|
202
|
-
previousMonthLabel?: string;
|
|
203
|
-
/**
|
|
204
|
-
* Provides a functional calendar button that opens the calendar picker that
|
|
205
|
-
* lives on the right side of the date picker.
|
|
206
|
-
*
|
|
207
|
-
* The accessible name for this button is caculated using either the `label`,
|
|
208
|
-
* `inputLabel`, or `inputLabelId` props, along with the `openCalendarLabel`
|
|
209
|
-
* prop.
|
|
210
|
-
*
|
|
211
|
-
* @default false
|
|
212
|
-
*/
|
|
213
|
-
shouldShowCalendarButton?: boolean;
|
|
214
|
-
/**
|
|
215
|
-
* The spacing for the select control.
|
|
216
|
-
*
|
|
217
|
-
* Compact is `gridSize() * 4`, default is `gridSize * 5`.
|
|
218
|
-
*/
|
|
219
|
-
spacing?: Spacing;
|
|
220
|
-
/**
|
|
221
|
-
* The ISO time used as the input value.
|
|
222
|
-
*/
|
|
223
|
-
value?: string;
|
|
224
|
-
/**
|
|
225
|
-
* Set if the picker has an invalid value.
|
|
226
|
-
*/
|
|
227
|
-
isInvalid?: boolean;
|
|
228
|
-
/**
|
|
229
|
-
* Hides icon for dropdown indicator.
|
|
230
|
-
*
|
|
231
|
-
* @deprecated
|
|
232
|
-
*/
|
|
233
|
-
hideIcon?: boolean;
|
|
234
|
-
/**
|
|
235
|
-
* Format the date with a string that is accepted by [date-fns's format
|
|
236
|
-
* function](https://date-fns.org/v1.29.0/docs/format). **This does not affect
|
|
237
|
-
* how the input is parsed.** This must be done using the `parseInputValue`
|
|
238
|
-
* prop.
|
|
239
|
-
*
|
|
240
|
-
* Note that though we are using `date-fns` version 2, we use [the tokens from
|
|
241
|
-
* `date-fns` version 1](https://date-fns.org/v1.30.1/docs/format) under the
|
|
242
|
-
* hood.
|
|
243
|
-
*/
|
|
244
|
-
dateFormat?: string;
|
|
245
|
-
/**
|
|
246
|
-
* Placeholder text displayed in input.
|
|
247
|
-
*/
|
|
248
|
-
placeholder?: string;
|
|
249
|
-
/**
|
|
250
|
-
* Locale used to format the date and calendar. See [DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat).
|
|
251
|
-
*/
|
|
252
|
-
locale?: string;
|
|
253
|
-
/**
|
|
254
|
-
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
255
|
-
* - `{testId}--container` wrapping element of date-picker
|
|
256
|
-
* - `{testId}--calendar--container` nested calendar component
|
|
257
|
-
*/
|
|
258
|
-
testId?: string;
|
|
259
|
-
/**
|
|
260
|
-
* Start day of the week for the calendar.
|
|
261
|
-
* - `0` sunday (default value)
|
|
262
|
-
* - `1` monday
|
|
263
|
-
* - `2` tuesday
|
|
264
|
-
* - `3` wednesday
|
|
265
|
-
* - `4` thursday
|
|
266
|
-
* - `5` friday
|
|
267
|
-
* - `6` saturday
|
|
268
|
-
*/
|
|
269
|
-
weekStartDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
270
|
-
/**
|
|
271
|
-
* This overrides the inner wrapper the Calendar.
|
|
272
|
-
* @private Please use this with extreme caution, this API may be changed in the future.
|
|
273
|
-
*/
|
|
274
|
-
menuInnerWrapper?: React.ComponentType<{
|
|
275
|
-
children: React.ReactNode;
|
|
276
|
-
}>;
|
|
277
|
-
}
|
|
278
|
-
export interface TimePickerBaseProps extends WithAnalyticsEventsProps, PickerSelectProps {
|
|
279
|
-
/**
|
|
280
|
-
* Set the appearance of the picker.
|
|
281
|
-
* `subtle` will remove the borders, background, and icon.
|
|
282
|
-
*
|
|
283
|
-
* __NOTE:__ Appearance values will be ignored if styles are parsed through `selectProps`.
|
|
284
|
-
*
|
|
285
|
-
* @deprecated
|
|
286
|
-
*/
|
|
287
|
-
appearance?: Appearance;
|
|
288
|
-
/**
|
|
289
|
-
* Used to associate accessible descriptions to the time picker.
|
|
290
|
-
*/
|
|
291
|
-
'aria-describedby'?: string;
|
|
292
|
-
/**
|
|
293
|
-
* Set the picker to autofocus on mount.
|
|
294
|
-
*/
|
|
295
|
-
autoFocus?: boolean;
|
|
296
|
-
/**
|
|
297
|
-
* Set the `aria-label` for the clear button.
|
|
298
|
-
* Add the word "Clear" at the beginning of the clearControlLabel.
|
|
299
|
-
* For instance, for a field to set an appointment, use "Clear appointment date and time".
|
|
300
|
-
*/
|
|
301
|
-
clearControlLabel?: string;
|
|
302
|
-
/**
|
|
303
|
-
* The default for `isOpen`.
|
|
304
|
-
*
|
|
305
|
-
* @deprecated
|
|
306
|
-
*/
|
|
307
|
-
defaultIsOpen?: boolean;
|
|
308
|
-
/**
|
|
309
|
-
* The default for `value`.
|
|
310
|
-
*/
|
|
311
|
-
defaultValue?: string;
|
|
312
|
-
/**
|
|
313
|
-
* A function for formatting the displayed time value in the input. By default
|
|
314
|
-
* parses with an internal time parser, and formats using the [date-fns format
|
|
315
|
-
* function]((https://date-fns.org/v1.29.0/docs/format)).
|
|
316
|
-
*
|
|
317
|
-
* Note that this does not affect how the input is parsed. This must be done
|
|
318
|
-
* using the `parseInputValue` prop.
|
|
319
|
-
*/
|
|
320
|
-
formatDisplayLabel?: (time: string, timeFormat: string) => string;
|
|
321
|
-
/**
|
|
322
|
-
* Set the id of the field.
|
|
323
|
-
* Associates a `<label></label>` with the field.
|
|
324
|
-
*/
|
|
325
|
-
id?: string;
|
|
326
|
-
/**
|
|
327
|
-
* Props to apply to the container.
|
|
328
|
-
*
|
|
329
|
-
* @deprecated If you are looking to set your width, use a `Box` from
|
|
330
|
-
* `@atlaskit/primitives` around the picker to achieve the same effect.
|
|
331
|
-
*/
|
|
332
|
-
innerProps?: React.AllHTMLAttributes<HTMLElement>;
|
|
333
|
-
/**
|
|
334
|
-
* Set if the field is disabled.
|
|
335
|
-
*/
|
|
336
|
-
isDisabled?: boolean;
|
|
337
|
-
/**
|
|
338
|
-
* Set if the dropdown is open. Will be `false` if not provided.
|
|
339
|
-
*/
|
|
340
|
-
isOpen?: boolean;
|
|
341
|
-
/**
|
|
342
|
-
* Set the field as required.
|
|
343
|
-
*/
|
|
344
|
-
isRequired?: boolean;
|
|
345
|
-
/**
|
|
346
|
-
* Accessible name for the Time Picker Select, rendered as `aria-label`. This will override any other method of providing a label.
|
|
347
|
-
*/
|
|
348
|
-
label?: string;
|
|
349
|
-
/**
|
|
350
|
-
* The name of the field.
|
|
351
|
-
*/
|
|
352
|
-
name?: string;
|
|
353
|
-
/**
|
|
354
|
-
* Called when the field is blurred.
|
|
355
|
-
*/
|
|
356
|
-
onBlur?: React.FocusEventHandler<HTMLElement>;
|
|
357
|
-
/**
|
|
358
|
-
* Called when the value changes. The only argument is an ISO time or empty string.
|
|
359
|
-
*/
|
|
360
|
-
onChange?: (value: string) => void;
|
|
361
|
-
/**
|
|
362
|
-
* Called when the field is focused.
|
|
363
|
-
*/
|
|
364
|
-
onFocus?: React.FocusEventHandler<HTMLElement>;
|
|
365
|
-
/**
|
|
366
|
-
* A function for parsing input characters and transforming them into either a
|
|
367
|
-
* string or a Date object. By default parses the string based off the locale.
|
|
368
|
-
* Note that this does not affect how the resulting value is displayed in the
|
|
369
|
-
* input. To handle this, use either the `timeFormat` or `formatDisplayLabel`
|
|
370
|
-
* prop.
|
|
371
|
-
*/
|
|
372
|
-
parseInputValue?: (time: string, timeFormat: string) => string | Date;
|
|
373
|
-
/**
|
|
374
|
-
* The spacing for the select control.
|
|
375
|
-
*
|
|
376
|
-
* Compact is `gridSize() * 4`, default is `gridSize * 5`.
|
|
377
|
-
*/
|
|
378
|
-
spacing?: Spacing;
|
|
379
|
-
/**
|
|
380
|
-
* The times shown in the dropdown.
|
|
381
|
-
*/
|
|
382
|
-
times?: string[];
|
|
383
|
-
/**
|
|
384
|
-
* Set if users can edit the input, allowing them to add custom times.
|
|
385
|
-
*/
|
|
386
|
-
timeIsEditable?: boolean;
|
|
387
|
-
/**
|
|
388
|
-
* The ISO time that should be used as the input value.
|
|
389
|
-
*/
|
|
390
|
-
value?: string;
|
|
391
|
-
/**
|
|
392
|
-
* Set if the picker has an invalid value.
|
|
393
|
-
*/
|
|
394
|
-
isInvalid?: boolean;
|
|
395
|
-
/**
|
|
396
|
-
* Hides icon for dropdown indicator.
|
|
397
|
-
*/
|
|
398
|
-
hideIcon?: boolean;
|
|
399
|
-
/**
|
|
400
|
-
* Format the time with a string that is accepted by [date-fns's format
|
|
401
|
-
* function](https://date-fns.org/v1.29.0/docs/format). **This does not affect
|
|
402
|
-
* how the input is parsed.** This must be done using the `parseInputValue`
|
|
403
|
-
* prop.
|
|
404
|
-
*
|
|
405
|
-
* Note that though we are using `date-fns` version 2, we use [the tokens from
|
|
406
|
-
* `date-fns` version 1](https://date-fns.org/v1.30.1/docs/format) under the
|
|
407
|
-
* hood.
|
|
408
|
-
*/
|
|
409
|
-
timeFormat?: string;
|
|
410
|
-
/**
|
|
411
|
-
* Placeholder text displayed in input.
|
|
412
|
-
*/
|
|
413
|
-
placeholder?: string;
|
|
414
|
-
/**
|
|
415
|
-
* Locale used to format the time. See [DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat).
|
|
416
|
-
*/
|
|
417
|
-
locale?: string;
|
|
418
|
-
/**
|
|
419
|
-
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests:
|
|
420
|
-
* - `{testId}--container` wrapping element of time-picker
|
|
421
|
-
*/
|
|
422
|
-
testId?: string;
|
|
423
|
-
}
|
|
424
|
-
export interface DateTimePickerBaseProps extends WithAnalyticsEventsProps {
|
|
425
|
-
/**
|
|
426
|
-
* Set the appearance of the picker.
|
|
427
|
-
*
|
|
428
|
-
* `subtle` will remove the borders and background.
|
|
429
|
-
*
|
|
430
|
-
* @deprecated
|
|
431
|
-
*/
|
|
432
|
-
appearance?: Appearance;
|
|
433
|
-
/**
|
|
434
|
-
* Used to associate accessible descriptions to both the date and time
|
|
435
|
-
* picker. If you want to associate individual accessible descriptions, this
|
|
436
|
-
* should be done through the `aria-describedby` props on the
|
|
437
|
-
* `datePickerProps` and `timePickerProps`.
|
|
438
|
-
*/
|
|
439
|
-
'aria-describedby'?: string;
|
|
440
|
-
/**
|
|
441
|
-
* Set the picker to autofocus on mount.
|
|
442
|
-
*/
|
|
443
|
-
autoFocus?: boolean;
|
|
444
|
-
/**
|
|
445
|
-
* Set the `aria-label` for the clear button.
|
|
446
|
-
* Add the word "Clear" at the beginning of the clearControlLabel.
|
|
447
|
-
* For instance, for a field to set an appointment, use "Clear appointment date and time".
|
|
448
|
-
*/
|
|
449
|
-
clearControlLabel?: string;
|
|
450
|
-
/**
|
|
451
|
-
* The default for `value`.
|
|
452
|
-
*/
|
|
453
|
-
defaultValue?: string;
|
|
454
|
-
/**
|
|
455
|
-
* Set the id of the field.
|
|
456
|
-
*/
|
|
457
|
-
id?: string;
|
|
458
|
-
/**
|
|
459
|
-
* Props to apply to the container.
|
|
460
|
-
*
|
|
461
|
-
* @deprecated If you are looking to set your width, use a `Box` from
|
|
462
|
-
* `@atlaskit/primitives` around the picker to achieve the same effect.
|
|
463
|
-
*/
|
|
464
|
-
innerProps?: React.AllHTMLAttributes<HTMLElement>;
|
|
465
|
-
/**
|
|
466
|
-
* Set if the field is disabled.
|
|
467
|
-
*/
|
|
468
|
-
isDisabled?: boolean;
|
|
469
|
-
/**
|
|
470
|
-
* Set the field as required.
|
|
471
|
-
*/
|
|
472
|
-
isRequired?: boolean;
|
|
473
|
-
/**
|
|
474
|
-
* The name of the field.
|
|
475
|
-
*/
|
|
476
|
-
name?: string;
|
|
477
|
-
/**
|
|
478
|
-
* Called when the field is blurred.
|
|
479
|
-
*/
|
|
480
|
-
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
481
|
-
/**
|
|
482
|
-
* Called when the value changes and the date / time is a complete value, or empty. The only value is an ISO string or empty string.
|
|
483
|
-
*/
|
|
484
|
-
onChange?: (value: string) => void;
|
|
485
|
-
/**
|
|
486
|
-
* Called when the field is focused.
|
|
487
|
-
*/
|
|
488
|
-
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
489
|
-
/**
|
|
490
|
-
* The ISO time that should be used as the input value.
|
|
491
|
-
*/
|
|
492
|
-
value?: string;
|
|
493
|
-
/**
|
|
494
|
-
* Set if the picker has an invalid value.
|
|
495
|
-
*/
|
|
496
|
-
isInvalid?: boolean;
|
|
497
|
-
/**
|
|
498
|
-
* Props applied to the `DatePicker`.
|
|
499
|
-
*/
|
|
500
|
-
datePickerProps?: DatePickerBaseProps;
|
|
501
|
-
/**
|
|
502
|
-
* Props applied to the `TimePicker`.
|
|
503
|
-
*/
|
|
504
|
-
timePickerProps?: TimePickerBaseProps;
|
|
505
|
-
/**
|
|
506
|
-
* Function used to parse datetime values into their date, time and timezone sub-values. *
|
|
507
|
-
*/
|
|
508
|
-
parseValue?: (dateTimeValue: string, date: string, time: string, timezone: string) => {
|
|
509
|
-
dateValue: string;
|
|
510
|
-
timeValue: string;
|
|
511
|
-
zoneValue: string;
|
|
512
|
-
};
|
|
513
|
-
/**
|
|
514
|
-
* The spacing for the select control.
|
|
515
|
-
*
|
|
516
|
-
* Compact is `gridSize() * 4`, default is `gridSize() * 5`.
|
|
517
|
-
*/
|
|
518
|
-
spacing?: Spacing;
|
|
519
|
-
/**
|
|
520
|
-
* Locale used for formatting dates and times. See [DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat).
|
|
521
|
-
*/
|
|
522
|
-
locale?: string;
|
|
523
|
-
/**
|
|
524
|
-
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
525
|
-
* - `{testId}--datepicker--container` wrapping element of date-picker
|
|
526
|
-
* - `{testId}--timepicker--container` wrapping element of time-picker
|
|
527
|
-
*/
|
|
528
|
-
testId?: string;
|
|
529
|
-
}
|
|
530
|
-
export {};
|