@atlaskit/datetime-picker 17.9.5 → 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/__tests__/playwright/top-layer-focus.spec.tsx +85 -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 +27 -35
- 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
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 18.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
29
|
+
## 17.9.6
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
|
|
3
35
|
## 17.9.5
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { expect, test } from '@af/integration-testing';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Date picker: focus contract on the top-layer code path.
|
|
5
|
+
*
|
|
6
|
+
* `DatePicker` opens a `role="dialog"` calendar popover anchored to a
|
|
7
|
+
* react-select combobox `<input>`. Because the popover uses the dialog role
|
|
8
|
+
* (not `menu` / `listbox`), the combobox carve-out documented in
|
|
9
|
+
* `top-layer/notes/architecture/focus.md` does NOT apply: dialogs always
|
|
10
|
+
* move focus into the popover (to the first focusable, here the
|
|
11
|
+
* previous-year navigation button).
|
|
12
|
+
*
|
|
13
|
+
* The focus contract is therefore:
|
|
14
|
+
*
|
|
15
|
+
* 1. Open: focus moves to the first focusable inside the calendar dialog
|
|
16
|
+
* (the previous-year navigation button).
|
|
17
|
+
* 2. Escape: the popover closes and focus is restored to the combobox input.
|
|
18
|
+
* 3. Tab inside the open dialog: focus cycles through dialog focusables.
|
|
19
|
+
*
|
|
20
|
+
* See: `platform/packages/design-system/top-layer/notes/architecture/focus.md`.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
const featureFlag = 'platform-dst-top-layer';
|
|
24
|
+
|
|
25
|
+
test.describe('Date picker: top-layer focus contract', () => {
|
|
26
|
+
test('initial focus: focus moves to the first focusable in the calendar dialog on open', async ({
|
|
27
|
+
page,
|
|
28
|
+
}) => {
|
|
29
|
+
await page.visitExample<typeof import('../../examples/testing-top-layer-focus.tsx')>(
|
|
30
|
+
'design-system',
|
|
31
|
+
'datetime-picker',
|
|
32
|
+
'testing-top-layer-focus',
|
|
33
|
+
{ featureFlag },
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
await page.getByTestId('date-picker--container').click();
|
|
37
|
+
|
|
38
|
+
const calendar = page.getByRole('dialog', { name: 'calendar' });
|
|
39
|
+
await expect(calendar).toBeVisible();
|
|
40
|
+
|
|
41
|
+
const previousYearButton = page.getByTestId('date-picker--calendar--previous-year');
|
|
42
|
+
await expect(previousYearButton).toBeFocused();
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test('focus restoration: Escape closes the popover and focus returns to the combobox input', async ({
|
|
46
|
+
page,
|
|
47
|
+
}) => {
|
|
48
|
+
await page.visitExample<typeof import('../../examples/testing-top-layer-focus.tsx')>(
|
|
49
|
+
'design-system',
|
|
50
|
+
'datetime-picker',
|
|
51
|
+
'testing-top-layer-focus',
|
|
52
|
+
{ featureFlag },
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const combobox = page.getByRole('combobox');
|
|
56
|
+
await page.getByTestId('date-picker--container').click();
|
|
57
|
+
|
|
58
|
+
const calendar = page.getByRole('dialog', { name: 'calendar' });
|
|
59
|
+
await expect(calendar).toBeVisible();
|
|
60
|
+
|
|
61
|
+
await page.keyboard.press('Escape');
|
|
62
|
+
await expect(calendar).toBeHidden();
|
|
63
|
+
await expect(combobox).toBeFocused();
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test('focus movement: Tab cycles between focusables inside the calendar dialog', async ({
|
|
67
|
+
page,
|
|
68
|
+
}) => {
|
|
69
|
+
await page.visitExample<typeof import('../../examples/testing-top-layer-focus.tsx')>(
|
|
70
|
+
'design-system',
|
|
71
|
+
'datetime-picker',
|
|
72
|
+
'testing-top-layer-focus',
|
|
73
|
+
{ featureFlag },
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
await page.getByTestId('date-picker--container').click();
|
|
77
|
+
|
|
78
|
+
const previousYearButton = page.getByTestId('date-picker--calendar--previous-year');
|
|
79
|
+
await expect(previousYearButton).toBeFocused();
|
|
80
|
+
|
|
81
|
+
// `useFocusWrap` keeps Tab inside the dialog for role="dialog" popovers.
|
|
82
|
+
await page.keyboard.press('Tab');
|
|
83
|
+
await expect(previousYearButton).not.toBeFocused();
|
|
84
|
+
});
|
|
85
|
+
});
|
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.6";
|
|
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.6";
|
|
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.6";
|
|
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.6";
|
|
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.6";
|
|
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.6";
|
|
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.6";
|
|
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.6";
|
|
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.6";
|
|
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": "
|
|
3
|
+
"version": "18.0.0",
|
|
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/"
|
|
@@ -12,14 +12,6 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.5 <4.9": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.5/*",
|
|
19
|
-
"dist/types-ts4.5/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"sideEffects": [
|
|
24
16
|
"**/*.compiled.css"
|
|
25
17
|
],
|
|
@@ -39,20 +31,20 @@
|
|
|
39
31
|
}
|
|
40
32
|
},
|
|
41
33
|
"dependencies": {
|
|
42
|
-
"@atlaskit/analytics-next": "^
|
|
43
|
-
"@atlaskit/button": "^
|
|
44
|
-
"@atlaskit/calendar": "^
|
|
45
|
-
"@atlaskit/css": "^0.
|
|
46
|
-
"@atlaskit/ds-lib": "^
|
|
47
|
-
"@atlaskit/icon": "^
|
|
48
|
-
"@atlaskit/layering": "^
|
|
49
|
-
"@atlaskit/locale": "^
|
|
50
|
-
"@atlaskit/platform-feature-flags": "^
|
|
51
|
-
"@atlaskit/popper": "^
|
|
52
|
-
"@atlaskit/primitives": "^
|
|
53
|
-
"@atlaskit/select": "^
|
|
54
|
-
"@atlaskit/tokens": "^
|
|
55
|
-
"@atlaskit/top-layer": "^0.
|
|
34
|
+
"@atlaskit/analytics-next": "^12.0.0",
|
|
35
|
+
"@atlaskit/button": "^24.0.0",
|
|
36
|
+
"@atlaskit/calendar": "^18.0.0",
|
|
37
|
+
"@atlaskit/css": "^1.0.0",
|
|
38
|
+
"@atlaskit/ds-lib": "^8.0.0",
|
|
39
|
+
"@atlaskit/icon": "^36.0.0",
|
|
40
|
+
"@atlaskit/layering": "^4.0.0",
|
|
41
|
+
"@atlaskit/locale": "^5.0.0",
|
|
42
|
+
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
43
|
+
"@atlaskit/popper": "^8.0.0",
|
|
44
|
+
"@atlaskit/primitives": "^20.0.0",
|
|
45
|
+
"@atlaskit/select": "^22.0.0",
|
|
46
|
+
"@atlaskit/tokens": "^14.0.0",
|
|
47
|
+
"@atlaskit/top-layer": "^1.0.0",
|
|
56
48
|
"@babel/runtime": "^7.0.0",
|
|
57
49
|
"@compiled/react": "^0.20.0",
|
|
58
50
|
"date-fns": "^2.17.0"
|
|
@@ -64,18 +56,18 @@
|
|
|
64
56
|
"@af/accessibility-testing": "workspace:^",
|
|
65
57
|
"@af/integration-testing": "workspace:^",
|
|
66
58
|
"@af/visual-regression": "workspace:^",
|
|
67
|
-
"@atlaskit/code": "^
|
|
68
|
-
"@atlaskit/codemod-utils": "^
|
|
69
|
-
"@atlaskit/docs": "^
|
|
70
|
-
"@atlaskit/form": "^
|
|
71
|
-
"@atlaskit/heading": "^
|
|
72
|
-
"@atlaskit/link": "^
|
|
73
|
-
"@atlaskit/modal-dialog": "^
|
|
74
|
-
"@atlaskit/popup": "^
|
|
75
|
-
"@atlaskit/range": "^
|
|
76
|
-
"@atlaskit/section-message": "^
|
|
77
|
-
"@atlaskit/textfield": "^
|
|
78
|
-
"@atlaskit/toggle": "^
|
|
59
|
+
"@atlaskit/code": "^18.0.0",
|
|
60
|
+
"@atlaskit/codemod-utils": "^5.0.0",
|
|
61
|
+
"@atlaskit/docs": "^12.0.0",
|
|
62
|
+
"@atlaskit/form": "^16.0.0",
|
|
63
|
+
"@atlaskit/heading": "^6.0.0",
|
|
64
|
+
"@atlaskit/link": "^4.0.0",
|
|
65
|
+
"@atlaskit/modal-dialog": "^16.0.0",
|
|
66
|
+
"@atlaskit/popup": "^5.0.0",
|
|
67
|
+
"@atlaskit/range": "^11.0.0",
|
|
68
|
+
"@atlaskit/section-message": "^9.0.0",
|
|
69
|
+
"@atlaskit/textfield": "^9.0.0",
|
|
70
|
+
"@atlaskit/toggle": "^17.0.0",
|
|
79
71
|
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
80
72
|
"@atlassian/react-compiler-gating": "workspace:^",
|
|
81
73
|
"@atlassian/ssr-tests": "workspace:^",
|
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;
|