@atlaskit/datetime-picker 18.3.1 → 18.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/__tests__/playwright/top-layer-focus.spec.tsx +34 -37
  3. package/codemods/14.0.0-remove-duplicate-and-unused-props.tsx +0 -1
  4. package/dist/cjs/components/date-picker.js +38 -31
  5. package/dist/cjs/components/date-time-picker.js +6 -6
  6. package/dist/cjs/components/time-picker.js +15 -22
  7. package/dist/cjs/internal/date-time-picker-container.js +2 -2
  8. package/dist/cjs/internal/fixed-layer-menu-top-layer.js +3 -7
  9. package/dist/cjs/internal/fixed-layer-menu.js +4 -8
  10. package/dist/cjs/internal/fixed-layer.js +7 -5
  11. package/dist/cjs/internal/indicators-container.js +2 -2
  12. package/dist/cjs/internal/menu-top-layer.compiled.css +5 -0
  13. package/dist/cjs/internal/menu-top-layer.js +11 -51
  14. package/dist/cjs/internal/menu.js +3 -3
  15. package/dist/cjs/internal/single-value.js +3 -2
  16. package/dist/es2019/components/date-picker.js +31 -24
  17. package/dist/es2019/components/date-time-picker.js +3 -3
  18. package/dist/es2019/components/time-picker.js +10 -17
  19. package/dist/es2019/internal/date-time-picker-container.js +1 -1
  20. package/dist/es2019/internal/fixed-layer-menu-top-layer.js +2 -6
  21. package/dist/es2019/internal/fixed-layer-menu.js +3 -7
  22. package/dist/es2019/internal/fixed-layer.js +4 -2
  23. package/dist/es2019/internal/indicators-container.js +1 -1
  24. package/dist/es2019/internal/menu-top-layer.compiled.css +5 -0
  25. package/dist/es2019/internal/menu-top-layer.js +12 -53
  26. package/dist/es2019/internal/menu.js +2 -2
  27. package/dist/es2019/internal/single-value.js +2 -2
  28. package/dist/esm/components/date-picker.js +31 -24
  29. package/dist/esm/components/date-time-picker.js +3 -3
  30. package/dist/esm/components/time-picker.js +10 -17
  31. package/dist/esm/internal/date-time-picker-container.js +1 -1
  32. package/dist/esm/internal/fixed-layer-menu-top-layer.js +2 -6
  33. package/dist/esm/internal/fixed-layer-menu.js +3 -7
  34. package/dist/esm/internal/fixed-layer.js +4 -2
  35. package/dist/esm/internal/indicators-container.js +1 -1
  36. package/dist/esm/internal/menu-top-layer.compiled.css +5 -0
  37. package/dist/esm/internal/menu-top-layer.js +12 -53
  38. package/dist/esm/internal/menu.js +2 -2
  39. package/dist/esm/internal/single-value.js +2 -2
  40. package/dist/types/components/date-picker.d.ts +1 -1
  41. package/dist/types/internal/fixed-layer-menu-top-layer.d.ts +1 -1
  42. package/dist/types/internal/fixed-layer-menu.d.ts +1 -1
  43. package/dist/types/internal/format-date.d.ts +1 -1
  44. package/dist/types/internal/get-placeholder.d.ts +1 -1
  45. package/dist/types/internal/indicators-container.d.ts +1 -1
  46. package/dist/types/internal/menu-top-layer.d.ts +3 -5
  47. package/dist/types/internal/menu.d.ts +1 -1
  48. package/dist/types/internal/parse-date.d.ts +1 -1
  49. package/dist/types/internal/single-value.d.ts +1 -1
  50. package/dist/types/types.d.ts +2 -2
  51. package/package.json +22 -21
  52. package/datetime-picker.docs.tsx +0 -132
@@ -15,7 +15,7 @@
15
15
  * If component _only_ has injected variables, it is fully internal and was
16
16
  * broken out to be it's own function.
17
17
  */
18
- import { type LocalizationProvider } from '@atlaskit/locale';
18
+ import type { LocalizationProvider } from '@atlaskit/locale/localization-provider';
19
19
  export declare const formatDate: (value: string, di: {
20
20
  formatDisplayLabel: ((value: string, dateFormat: string) => string) | undefined;
21
21
  dateFormat: string | undefined;
@@ -15,7 +15,7 @@
15
15
  * If component _only_ has injected variables, it is fully internal and was
16
16
  * broken out to be it's own function.
17
17
  */
18
- import { type LocalizationProvider } from '@atlaskit/locale';
18
+ import type { LocalizationProvider } from '@atlaskit/locale/localization-provider';
19
19
  export declare const getPlaceholder: (di: {
20
20
  placeholder: string | undefined;
21
21
  l10n: LocalizationProvider;
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { type IndicatorsContainerProps } from '@atlaskit/select';
5
+ import type { IndicatorsContainerProps } from '@atlaskit/select/types';
6
6
  export declare const IndicatorsContainer: ({ showClearIndicator, ...rest }: IndicatorsContainerProps<any> & {
7
7
  showClearIndicator?: boolean;
8
8
  }) => JSX.Element;
@@ -2,14 +2,12 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { type MenuProps, type OptionType } from '@atlaskit/select';
5
+ import type { MenuProps, OptionType } from '@atlaskit/select/types';
6
6
  /**
7
7
  * Top-layer version of the date picker menu.
8
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.
9
+ * The surrounding react-select menu portal owns the native popover and
10
+ * positioning. This component only supplies the calendar dialog content.
13
11
  *
14
12
  * Gated behind the `platform-dst-top-layer` feature flag.
15
13
  */
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { type MenuProps } from '@atlaskit/select';
5
+ import type { MenuProps } from '@atlaskit/select/types';
6
6
  /**
7
7
  * This is the menu used in the select of the date picker.
8
8
  */
@@ -1,4 +1,4 @@
1
- import { type LocalizationProvider } from '@atlaskit/locale';
1
+ import type { LocalizationProvider } from '@atlaskit/locale/localization-provider';
2
2
  /**
3
3
  * There are props that can change how the date is parsed.
4
4
  * The priority of props used is:
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type OptionType, type SingleValueProps } from '@atlaskit/select';
2
+ import type { OptionType, SingleValueProps } from '@atlaskit/select/types';
3
3
  /**
4
4
  * This creates a functional component that `react-select` will use to make the
5
5
  * SingleValue part of the different pickers.
@@ -1,5 +1,5 @@
1
- import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
2
- import { type DropdownIndicatorProps, type OptionType, type SelectProps } from '@atlaskit/select';
1
+ import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
2
+ import type { DropdownIndicatorProps, OptionType, SelectProps } from '@atlaskit/select/types';
3
3
  export type Appearance = 'default' | 'subtle' | 'none';
4
4
  export type Spacing = 'compact' | 'default';
5
5
  type Combine<First, Second> = Omit<First, keyof Second> & Second;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "18.3.1",
3
+ "version": "18.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/"
@@ -32,20 +32,21 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/analytics-next": "^12.3.0",
35
- "@atlaskit/button": "^25.0.0",
36
- "@atlaskit/calendar": "^19.0.0",
35
+ "@atlaskit/button": "^25.2.0",
36
+ "@atlaskit/calendar": "^19.1.0",
37
37
  "@atlaskit/css": "^1.0.0",
38
38
  "@atlaskit/ds-lib": "^8.0.0",
39
- "@atlaskit/icon": "^37.3.0",
40
- "@atlaskit/layering": "^5.0.0",
41
- "@atlaskit/locale": "^5.0.0",
39
+ "@atlaskit/icon": "^37.5.0",
40
+ "@atlaskit/layering": "^5.1.0",
41
+ "@atlaskit/locale": "^5.1.0",
42
42
  "@atlaskit/platform-feature-flags": "^2.1.0",
43
- "@atlaskit/popper": "^9.1.0",
44
- "@atlaskit/primitives": "^22.2.0",
43
+ "@atlaskit/popper": "^9.3.0",
44
+ "@atlaskit/primitives": "^22.4.0",
45
45
  "@atlaskit/react-compiler-gating": "^0.2.0",
46
- "@atlaskit/select": "^22.6.0",
47
- "@atlaskit/tokens": "^16.7.0",
48
- "@atlaskit/top-layer": "^4.0.0",
46
+ "@atlaskit/react-select": "^4.8.0",
47
+ "@atlaskit/select": "^22.8.0",
48
+ "@atlaskit/tokens": "^16.8.0",
49
+ "@atlaskit/top-layer": "^4.4.0",
49
50
  "@babel/runtime": "^7.0.0",
50
51
  "@compiled/react": "^1.0.2",
51
52
  "date-fns": "^2.17.0"
@@ -57,18 +58,18 @@
57
58
  "@af/accessibility-testing": "workspace:^",
58
59
  "@af/integration-testing": "workspace:^",
59
60
  "@af/visual-regression": "workspace:^",
60
- "@atlaskit/code": "^19.0.0",
61
+ "@atlaskit/code": "^19.1.0",
61
62
  "@atlaskit/codemod-utils": "^5.0.0",
62
63
  "@atlaskit/docs": "^12.2.0",
63
- "@atlaskit/form": "^17.0.0",
64
- "@atlaskit/heading": "^7.0.0",
65
- "@atlaskit/link": "^5.0.0",
66
- "@atlaskit/modal-dialog": "^16.3.0",
67
- "@atlaskit/popup": "^6.0.0",
68
- "@atlaskit/range": "^12.0.0",
69
- "@atlaskit/section-message": "^10.0.0",
70
- "@atlaskit/textfield": "^10.0.0",
71
- "@atlaskit/toggle": "^17.1.0",
64
+ "@atlaskit/form": "^17.1.0",
65
+ "@atlaskit/heading": "^7.1.0",
66
+ "@atlaskit/link": "^5.1.0",
67
+ "@atlaskit/modal-dialog": "^16.5.0",
68
+ "@atlaskit/popup": "^6.2.0",
69
+ "@atlaskit/range": "^12.1.0",
70
+ "@atlaskit/section-message": "^10.1.0",
71
+ "@atlaskit/textfield": "^10.1.0",
72
+ "@atlaskit/toggle": "^17.2.0",
72
73
  "@atlassian/feature-flags-test-utils": "^1.2.0",
73
74
  "@atlassian/ssr-tests": "workspace:^",
74
75
  "@atlassian/structured-docs-types": "workspace:^",
@@ -1,132 +0,0 @@
1
- import path from 'path';
2
-
3
- import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
4
-
5
- const documentation: StructuredContentSource = {
6
- components: [
7
- {
8
- name: 'DatePicker',
9
- description: 'A component for selecting date values with calendar support.',
10
- status: 'general-availability',
11
- designSource: {
12
- figmaUrl: 'https://go.atlassian.com/figma-library-ads-13285-45993',
13
- },
14
- import: {
15
- name: 'DatePicker',
16
- package: '@atlaskit/datetime-picker/date-picker',
17
- type: 'default',
18
- packagePath: path.resolve(__dirname),
19
- packageJson: require('./package.json'),
20
- },
21
- usageGuidelines: [
22
- 'Use for date selection only',
23
- 'Provide clear date formats',
24
- 'Handle date validation appropriately',
25
- 'Consider calendar button visibility',
26
- ],
27
- contentGuidelines: [
28
- 'Use clear, descriptive labels',
29
- 'Provide helpful placeholder text',
30
- 'Keep labels concise but descriptive',
31
- 'Use locale prop for date format localization',
32
- ],
33
- accessibilityGuidelines: [
34
- 'Ensure proper keyboard navigation',
35
- 'Use appropriate date formats',
36
- 'Provide clear date labels',
37
- 'Consider screen reader announcements',
38
- ],
39
- examples: [
40
- {
41
- name: 'Date Picker',
42
- description: 'Date Picker example',
43
- source: path.resolve(__dirname, './examples/ai/date-picker.tsx'),
44
- },
45
- ],
46
- keywords: ['date', 'picker', 'calendar', 'selection', 'form'],
47
- categories: ['form'],
48
- },
49
- {
50
- name: 'TimePicker',
51
- description: 'A component for selecting time values with clock interface.',
52
- status: 'general-availability',
53
- import: {
54
- name: 'TimePicker',
55
- package: '@atlaskit/datetime-picker/time-picker',
56
- type: 'default',
57
- packagePath: path.resolve(__dirname),
58
- packageJson: require('./package.json'),
59
- },
60
- usageGuidelines: [
61
- 'Use for time selection only',
62
- 'Provide clear time formats',
63
- 'Handle time validation appropriately',
64
- 'Consider editable time input',
65
- ],
66
- contentGuidelines: [
67
- 'Use clear, descriptive labels',
68
- 'Provide helpful placeholder text',
69
- 'Use appropriate time formats',
70
- 'Keep labels concise but descriptive',
71
- 'Use locale prop for time format localization (e.g. 12h vs 24h)',
72
- ],
73
- accessibilityGuidelines: [
74
- 'Ensure proper keyboard navigation',
75
- 'Use appropriate time formats',
76
- 'Provide clear time labels',
77
- 'Consider screen reader announcements',
78
- ],
79
- examples: [
80
- {
81
- name: 'Time Picker',
82
- description: 'Time Picker example',
83
- source: path.resolve(__dirname, './examples/ai/time-picker.tsx'),
84
- },
85
- ],
86
- keywords: ['time', 'picker', 'clock', 'selection', 'form'],
87
- categories: ['form'],
88
- },
89
- {
90
- name: 'DateTimePicker',
91
- description: 'A component for selecting both date and time values.',
92
- status: 'general-availability',
93
- import: {
94
- name: 'DateTimePicker',
95
- package: '@atlaskit/datetime-picker/date-time-picker',
96
- type: 'default',
97
- packagePath: path.resolve(__dirname),
98
- packageJson: require('./package.json'),
99
- },
100
- usageGuidelines: [
101
- 'Use for combined date and time selection',
102
- 'Provide clear date/time formats',
103
- 'Handle timezone considerations',
104
- 'Consider validation requirements',
105
- ],
106
- contentGuidelines: [
107
- 'Use clear, descriptive labels',
108
- 'Provide helpful placeholder text',
109
- 'Use appropriate date/time formats',
110
- 'Keep labels concise but descriptive',
111
- 'Use locale prop for date and time format localization',
112
- ],
113
- accessibilityGuidelines: [
114
- 'Ensure proper keyboard navigation',
115
- 'Use appropriate date/time formats',
116
- 'Provide clear date/time labels',
117
- 'Consider screen reader announcements',
118
- ],
119
- examples: [
120
- {
121
- name: 'Datetime Picker',
122
- description: 'Datetime Picker example',
123
- source: path.resolve(__dirname, './examples/ai/datetime-picker.tsx'),
124
- },
125
- ],
126
- keywords: ['datetime', 'picker', 'date', 'time', 'calendar'],
127
- categories: ['form'],
128
- },
129
- ],
130
- };
131
-
132
- export default documentation;