@atlaskit/datetime-picker 19.3.1 → 19.4.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.
@@ -1,111 +0,0 @@
1
- /* fixed-layer-menu-top-layer.tsx generated by @compiled/babel-plugin v3.0.2 */
2
- import _extends from "@babel/runtime/helpers/extends";
3
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["className", "clearValue", "cx", "getStyles", "getValue", "hasValue", "innerProps", "innerRef", "isLoading", "isMulti", "isRtl", "maxMenuHeight", "menuPlacement", "menuPosition", "menuShouldScrollIntoView", "minMenuHeight", "options", "placement", "selectOption", "selectProps", "setValue", "children"];
5
- import * as React from 'react';
6
- import { ax, ix } from "@compiled/react/runtime";
7
- import { useRef } from 'react';
8
- import { components } from '@atlaskit/react-select/components';
9
- import { fromLegacyPlacement } from '@atlaskit/top-layer/placement-map/index';
10
- import { PopoverSurface } from '@atlaskit/top-layer/popover-surface';
11
- import { Popover } from '@atlaskit/top-layer/popover/popover';
12
- import { useAnchoredPopover } from '@atlaskit/top-layer/use-anchored-popover';
13
-
14
- /**
15
- * Bottom-start placement: time options menu appears below and aligned to the
16
- * start edge of the trigger (the select input).
17
- */
18
- var popupPlacement = fromLegacyPlacement({
19
- legacy: 'bottom-start'
20
- });
21
-
22
- /**
23
- * Top-layer version of the fixed layer menu used in the time picker.
24
- *
25
- * Uses `Popover` + `useAnchoredPopover` so the time options list renders
26
- * in the browser's top layer via the native Popover API and is positioned
27
- * via CSS Anchor Positioning. This avoids overflow clipping, z-index wars,
28
- * and portal-based layering.
29
- *
30
- * Gated behind the `platform-dst-top-layer` feature flag.
31
- */
32
- var FixedLayerMenuTopLayer = function FixedLayerMenuTopLayer(_ref) {
33
- var _selectProps$fixedLay, _selectProps$fixedLay2;
34
- var className = _ref.className,
35
- clearValue = _ref.clearValue,
36
- cx = _ref.cx,
37
- getStyles = _ref.getStyles,
38
- getValue = _ref.getValue,
39
- hasValue = _ref.hasValue,
40
- innerProps = _ref.innerProps,
41
- innerRef = _ref.innerRef,
42
- isLoading = _ref.isLoading,
43
- isMulti = _ref.isMulti,
44
- isRtl = _ref.isRtl,
45
- maxMenuHeight = _ref.maxMenuHeight,
46
- menuPlacement = _ref.menuPlacement,
47
- menuPosition = _ref.menuPosition,
48
- menuShouldScrollIntoView = _ref.menuShouldScrollIntoView,
49
- minMenuHeight = _ref.minMenuHeight,
50
- options = _ref.options,
51
- placement = _ref.placement,
52
- selectOption = _ref.selectOption,
53
- selectProps = _ref.selectProps,
54
- setValue = _ref.setValue,
55
- children = _ref.children,
56
- rest = _objectWithoutProperties(_ref, _excluded);
57
- // The select's container element is the anchor for the popup.
58
- var triggerRef = useRef((_selectProps$fixedLay = selectProps.fixedLayerRef) !== null && _selectProps$fixedLay !== void 0 ? _selectProps$fixedLay : null);
59
- triggerRef.current = (_selectProps$fixedLay2 = selectProps.fixedLayerRef) !== null && _selectProps$fixedLay2 !== void 0 ? _selectProps$fixedLay2 : null;
60
- var popoverRef = useRef(null);
61
- useAnchoredPopover({
62
- anchorRef: triggerRef,
63
- popoverRef: popoverRef,
64
- placement: popupPlacement,
65
- // The Popover is rendered with `isOpen` always true while this
66
- // component is mounted (react-select conditionally mounts/unmounts
67
- // the menu), so positioning is always active.
68
- isOpen: true
69
- });
70
- return /*#__PURE__*/React.createElement(Popover, {
71
- ref: popoverRef,
72
- role: "listbox",
73
- isOpen: true
74
- // `mode="manual"` opts out of the native popover light-dismiss
75
- // (Esc / click-outside). react-select already owns those: opening
76
- // the menu via a click on the input that lives outside the popover
77
- // element triggers the browser's auto-dismiss as that very click
78
- // bubbles, slamming the menu shut before the user sees it. With
79
- // `manual`, react-select's existing onMenuClose / outside-click
80
- // logic remains the single source of truth.
81
- ,
82
- mode: "manual",
83
- placement: popupPlacement,
84
- shouldAnimate: true,
85
- testId: selectProps.testId && "".concat(selectProps.testId, "--popup")
86
- }, /*#__PURE__*/React.createElement(PopoverSurface, null, /*#__PURE__*/React.createElement(components.Menu, _extends({}, rest, {
87
- // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides, @atlaskit/ui-styling-standard/no-classname-prop
88
- className: className,
89
- clearValue: clearValue,
90
- cx: cx,
91
- getStyles: getStyles,
92
- getValue: getValue,
93
- hasValue: hasValue,
94
- innerProps: innerProps,
95
- innerRef: innerRef,
96
- isLoading: isLoading,
97
- isMulti: isMulti,
98
- isRtl: isRtl,
99
- maxMenuHeight: maxMenuHeight,
100
- menuPlacement: menuPlacement,
101
- menuPosition: menuPosition,
102
- menuShouldScrollIntoView: false || menuShouldScrollIntoView,
103
- minMenuHeight: minMenuHeight,
104
- options: options,
105
- placement: placement,
106
- selectOption: selectOption,
107
- selectProps: selectProps,
108
- setValue: setValue
109
- }), children)));
110
- };
111
- export { FixedLayerMenuTopLayer };
@@ -1,12 +0,0 @@
1
- import type { MenuProps, OptionType } from '@atlaskit/select/types';
2
- /**
3
- * Top-layer version of the fixed layer menu used in the time picker.
4
- *
5
- * Uses `Popover` + `useAnchoredPopover` 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;