@atlaskit/datetime-picker 15.3.1 → 15.4.1
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 +15 -0
- package/dist/cjs/components/date-picker-class.js +668 -0
- package/dist/cjs/components/date-picker-fc.js +614 -0
- package/dist/cjs/components/date-picker.js +6 -661
- package/dist/cjs/components/date-time-picker.js +6 -3
- package/dist/cjs/components/time-picker.js +1 -1
- package/dist/es2019/components/date-picker-class.js +631 -0
- package/dist/es2019/components/date-picker-fc.js +543 -0
- package/dist/es2019/components/date-picker.js +5 -630
- package/dist/es2019/components/date-time-picker.js +5 -2
- package/dist/es2019/components/time-picker.js +1 -1
- package/dist/esm/components/date-picker-class.js +663 -0
- package/dist/esm/components/date-picker-fc.js +605 -0
- package/dist/esm/components/date-picker.js +5 -662
- package/dist/esm/components/date-time-picker.js +5 -2
- package/dist/esm/components/time-picker.js +1 -1
- package/dist/types/components/date-picker-class.d.ts +119 -0
- package/dist/types/components/date-picker-fc.d.ts +30 -0
- package/dist/types/components/date-picker.d.ts +20 -99
- package/dist/types/types.d.ts +3 -3
- package/dist/types-ts4.5/components/date-picker-class.d.ts +119 -0
- package/dist/types-ts4.5/components/date-picker-fc.d.ts +30 -0
- package/dist/types-ts4.5/components/date-picker.d.ts +20 -99
- package/dist/types-ts4.5/types.d.ts +3 -3
- package/package.json +8 -2
|
@@ -1,119 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { Component } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { type LocalizationProvider } from '@atlaskit/locale';
|
|
8
|
-
import { type ActionMeta, type InputActionMeta } from '@atlaskit/select';
|
|
9
|
-
import { type DatePickerBaseProps } from '../types';
|
|
10
|
-
type DatePickerProps = typeof datePickerDefaultProps & DatePickerBaseProps;
|
|
11
|
-
interface State {
|
|
12
|
-
isKeyDown: boolean;
|
|
13
|
-
isOpen: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* When being cleared from the icon the DatePicker is blurred.
|
|
16
|
-
* This variable defines whether the default onSelectBlur or onSelectFocus
|
|
17
|
-
* events should behave as normal.
|
|
18
|
-
*/
|
|
19
|
-
isFocused: boolean;
|
|
20
|
-
clearingFromIcon: boolean;
|
|
21
|
-
value: string;
|
|
22
|
-
calendarValue: string;
|
|
23
|
-
selectInputValue: string;
|
|
24
|
-
l10n: LocalizationProvider;
|
|
25
|
-
locale: string;
|
|
26
|
-
shouldSetFocusOnCurrentDay: boolean;
|
|
27
|
-
wasOpenedFromCalendarButton: boolean;
|
|
28
|
-
}
|
|
29
|
-
declare const datePickerDefaultProps: {
|
|
30
|
-
defaultIsOpen: boolean;
|
|
31
|
-
defaultValue: string;
|
|
32
|
-
disabled: string[];
|
|
33
|
-
disabledDateFilter: (_: string) => boolean;
|
|
34
|
-
locale: string;
|
|
35
|
-
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
36
|
-
onChange: (_value: string) => void;
|
|
37
|
-
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
38
|
-
};
|
|
39
|
-
declare class DatePickerComponent extends Component<DatePickerProps, State> {
|
|
40
|
-
static defaultProps: {
|
|
41
|
-
defaultIsOpen: boolean;
|
|
42
|
-
defaultValue: string;
|
|
43
|
-
disabled: string[];
|
|
44
|
-
disabledDateFilter: (_: string) => boolean;
|
|
45
|
-
locale: string;
|
|
46
|
-
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
47
|
-
onChange: (_value: string) => void;
|
|
48
|
-
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
49
|
-
};
|
|
50
|
-
containerRef: HTMLElement | null;
|
|
51
|
-
calendarRef: React.RefObject<HTMLDivElement | null>;
|
|
52
|
-
calendarButtonRef: React.RefObject<HTMLButtonElement>;
|
|
53
|
-
constructor(props: any);
|
|
54
|
-
static getDerivedStateFromProps(nextProps: Readonly<DatePickerProps>, prevState: State): {
|
|
55
|
-
l10n: LocalizationProvider;
|
|
56
|
-
locale: string;
|
|
57
|
-
} | null;
|
|
58
|
-
getValue: () => string;
|
|
59
|
-
getIsOpen: () => boolean;
|
|
60
|
-
onCalendarChange: ({ iso }: {
|
|
61
|
-
iso: string;
|
|
62
|
-
}) => void;
|
|
63
|
-
onCalendarSelect: ({ iso }: {
|
|
64
|
-
iso: string;
|
|
65
|
-
}) => void;
|
|
66
|
-
onInputClick: () => void;
|
|
67
|
-
onContainerBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
68
|
-
onContainerFocus: () => void;
|
|
69
|
-
onSelectBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
70
|
-
onSelectFocus: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
71
|
-
onTextInput: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
72
|
-
onInputKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
73
|
-
onCalendarButtonKeyDown: (e: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
74
|
-
onCalendarButtonClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
75
|
-
onClear: () => void;
|
|
76
|
-
onSelectChange: (_value: unknown, action: ActionMeta) => void;
|
|
77
|
-
handleSelectInputChange: (selectInputValue: string, actionMeta: InputActionMeta) => void;
|
|
78
|
-
getContainerRef: (ref: HTMLElement | null) => void;
|
|
79
|
-
render(): jsx.JSX.Element;
|
|
80
|
-
}
|
|
81
|
-
export { DatePickerComponent as DatePickerWithoutAnalytics };
|
|
82
|
-
/**
|
|
83
|
-
* __Date picker__
|
|
84
|
-
*
|
|
85
|
-
* A date picker allows the user to select a particular date.
|
|
86
|
-
*
|
|
87
|
-
* - [Examples](https://atlassian.design/components/datetime-picker/date-picker/examples)
|
|
88
|
-
* - [Code](https://atlassian.design/components/datetime-picker/date-picker/code)
|
|
89
|
-
* - [Usage](https://atlassian.design/components/datetime-picker/date-picker/usage)
|
|
90
|
-
*/
|
|
1
|
+
/// <reference types="react" />
|
|
91
2
|
declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<Pick<Omit<{
|
|
92
3
|
defaultIsOpen: boolean;
|
|
93
4
|
defaultValue: string;
|
|
94
5
|
disabled: string[];
|
|
95
6
|
disabledDateFilter: (_: string) => boolean;
|
|
96
7
|
locale: string;
|
|
97
|
-
onBlur: (_event:
|
|
8
|
+
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
98
9
|
onChange: (_value: string) => void;
|
|
99
|
-
onFocus: (_event:
|
|
100
|
-
} &
|
|
10
|
+
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
11
|
+
} & import("..").DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "testId" | "label" | "icon" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "id" | "aria-describedby" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "value" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & Partial<Pick<Omit<{
|
|
101
12
|
defaultIsOpen: boolean;
|
|
102
13
|
defaultValue: string;
|
|
103
14
|
disabled: string[];
|
|
104
15
|
disabledDateFilter: (_: string) => boolean;
|
|
105
16
|
locale: string;
|
|
106
|
-
onBlur: (_event:
|
|
17
|
+
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
107
18
|
onChange: (_value: string) => void;
|
|
108
|
-
onFocus: (_event:
|
|
109
|
-
} &
|
|
19
|
+
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
20
|
+
} & import("..").DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "disabled" | "defaultValue" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "locale" | "defaultIsOpen">> & Partial<Pick<{
|
|
110
21
|
defaultIsOpen: boolean;
|
|
111
22
|
defaultValue: string;
|
|
112
23
|
disabled: string[];
|
|
113
24
|
disabledDateFilter: (_: string) => boolean;
|
|
114
25
|
locale: string;
|
|
115
|
-
onBlur: (_event:
|
|
26
|
+
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
116
27
|
onChange: (_value: string) => void;
|
|
117
|
-
onFocus: (_event:
|
|
118
|
-
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "testId" | "label" | "icon" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "value" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any
|
|
28
|
+
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
29
|
+
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "testId" | "label" | "icon" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "value" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<any>> | import("react").ForwardRefExoticComponent<Pick<import("..").DatePickerProps & {
|
|
30
|
+
icon?: import("react").ComponentType<import("@atlaskit/react-select").DropdownIndicatorProps<import("@atlaskit/select").OptionType, boolean, import("@atlaskit/react-select").GroupBase<import("@atlaskit/select").OptionType>>> | undefined;
|
|
31
|
+
selectProps?: (Omit<import("@atlaskit/select").SelectProps<import("@atlaskit/select").OptionType, false>, "placeholder" | "aria-describedby" | "aria-label" | "inputId"> & {
|
|
32
|
+
'aria-describedby'?: undefined;
|
|
33
|
+
'aria-label'?: undefined;
|
|
34
|
+
inputId?: undefined;
|
|
35
|
+
placeholder?: undefined;
|
|
36
|
+
} & {
|
|
37
|
+
inputValue?: string | undefined;
|
|
38
|
+
}) | undefined;
|
|
39
|
+
}, "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "testId" | "label" | "icon" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "weekStartDay" | "createAnalyticsEvent" | "value" | "autoFocus" | "isInvalid" | "isRequired" | "name" | "spacing" | "defaultIsOpen" | "isOpen" | "inputLabel" | "inputLabelId" | "openCalendarLabel" | "shouldShowCalendarButton" | "hideIcon"> & import("react").RefAttributes<unknown>>;
|
|
119
40
|
export default DatePicker;
|
|
@@ -123,7 +123,7 @@ export interface DatePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
|
|
|
123
123
|
*/
|
|
124
124
|
isOpen?: boolean;
|
|
125
125
|
/**
|
|
126
|
-
*
|
|
126
|
+
* Set the field as required.
|
|
127
127
|
*/
|
|
128
128
|
isRequired?: boolean;
|
|
129
129
|
/**
|
|
@@ -304,7 +304,7 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
|
|
|
304
304
|
*/
|
|
305
305
|
isOpen?: boolean;
|
|
306
306
|
/**
|
|
307
|
-
*
|
|
307
|
+
* Set the field as required.
|
|
308
308
|
*/
|
|
309
309
|
isRequired?: boolean;
|
|
310
310
|
/**
|
|
@@ -420,7 +420,7 @@ export interface DateTimePickerBaseProps extends WithAnalyticsEventsProps {
|
|
|
420
420
|
*/
|
|
421
421
|
isDisabled?: boolean;
|
|
422
422
|
/**
|
|
423
|
-
*
|
|
423
|
+
* Set the field as required.
|
|
424
424
|
*/
|
|
425
425
|
isRequired?: boolean;
|
|
426
426
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.4.1",
|
|
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/"
|
|
@@ -41,10 +41,11 @@
|
|
|
41
41
|
"@atlaskit/icon": "^22.22.0",
|
|
42
42
|
"@atlaskit/layering": "^0.6.0",
|
|
43
43
|
"@atlaskit/locale": "^2.8.0",
|
|
44
|
+
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
44
45
|
"@atlaskit/popper": "^6.3.0",
|
|
45
46
|
"@atlaskit/primitives": "^12.2.0",
|
|
46
47
|
"@atlaskit/select": "^18.1.0",
|
|
47
|
-
"@atlaskit/theme": "^13.
|
|
48
|
+
"@atlaskit/theme": "^13.1.0",
|
|
48
49
|
"@atlaskit/tokens": "^2.0.0",
|
|
49
50
|
"@babel/runtime": "^7.0.0",
|
|
50
51
|
"@emotion/react": "^11.7.1",
|
|
@@ -99,5 +100,10 @@
|
|
|
99
100
|
"deprecation": "no-deprecated-imports"
|
|
100
101
|
}
|
|
101
102
|
},
|
|
103
|
+
"platform-feature-flags": {
|
|
104
|
+
"dst-date-picker-use-functional-component": {
|
|
105
|
+
"type": "boolean"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
102
108
|
"homepage": "https://atlassian.design/components/datetime-picker/"
|
|
103
109
|
}
|