@ariakit/react-core 0.1.8 → 0.2.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 +96 -0
- package/cjs/__chunks/{XFZ3MEQZ.cjs → 27JG67F3.cjs} +3 -3
- package/cjs/__chunks/{ASQZCUUA.cjs → 4SZYU2PD.cjs} +2 -2
- package/cjs/__chunks/5P6HRGY6.cjs +21 -0
- package/cjs/__chunks/{YYKQBWQQ.cjs → A6ZSQXNQ.cjs} +2 -2
- package/cjs/__chunks/{OMM6PC3A.cjs → D3EUPD6P.cjs} +15 -4
- package/cjs/__chunks/{IRSBF3C5.cjs → GOXUG4RX.cjs} +23 -18
- package/cjs/__chunks/{RHO5OVPE.cjs → GRL5KGV3.cjs} +2 -2
- package/cjs/__chunks/MHL3EECX.cjs +363 -0
- package/cjs/__chunks/{AUDANYMJ.cjs → W2XKIB23.cjs} +1 -20
- package/cjs/__chunks/{PFD4TS6B.cjs → WWDX5YPG.cjs} +28 -15
- package/cjs/combobox/combobox-item.cjs +1 -1
- package/cjs/combobox/combobox-popover.cjs +9 -8
- package/cjs/combobox/combobox-store.cjs +3 -3
- package/cjs/combobox/combobox-store.d.ts +0 -7
- package/cjs/combobox/combobox.cjs +3 -3
- package/cjs/composite/composite-item.cjs +1 -1
- package/cjs/composite/composite-overflow-disclosure.cjs +5 -5
- package/cjs/composite/composite-overflow-store.cjs +3 -3
- package/cjs/composite/composite-overflow-store.d.ts +1 -13
- package/cjs/composite/composite-overflow.cjs +9 -8
- package/cjs/composite/composite.cjs +3 -3
- package/cjs/dialog/dialog-backdrop.cjs +3 -2
- package/cjs/dialog/dialog-backdrop.d.ts +2 -5
- package/cjs/dialog/dialog-dismiss.cjs +1 -1
- package/cjs/dialog/dialog.cjs +8 -7
- package/cjs/dialog/dialog.d.ts +19 -6
- package/cjs/form/form-radio.cjs +1 -1
- package/cjs/hovercard/hovercard-dismiss.cjs +1 -1
- package/cjs/hovercard/hovercard-store.cjs +3 -3
- package/cjs/hovercard/hovercard-store.d.ts +1 -13
- package/cjs/hovercard/hovercard.cjs +10 -9
- package/cjs/menu/menu-bar.cjs +3 -3
- package/cjs/menu/menu-button.cjs +8 -8
- package/cjs/menu/menu-dismiss.cjs +1 -1
- package/cjs/menu/menu-item-checkbox.cjs +1 -1
- package/cjs/menu/menu-item-radio.cjs +1 -1
- package/cjs/menu/menu-item.cjs +1 -1
- package/cjs/menu/menu-list.cjs +4 -4
- package/cjs/menu/menu-store.cjs +7 -7
- package/cjs/menu/menu-store.d.ts +0 -7
- package/cjs/menu/menu.cjs +18 -17
- package/cjs/popover/popover-disclosure.cjs +4 -4
- package/cjs/popover/popover-dismiss.cjs +1 -1
- package/cjs/popover/popover-store.cjs +2 -2
- package/cjs/popover/popover-store.d.ts +1 -13
- package/cjs/popover/popover.cjs +9 -8
- package/cjs/popover/popover.d.ts +96 -0
- package/cjs/portal/portal.cjs +2 -2
- package/cjs/radio/radio-group.cjs +3 -3
- package/cjs/radio/radio.cjs +1 -1
- package/cjs/role/role.cjs +3 -14
- package/cjs/select/select-item.cjs +1 -1
- package/cjs/select/select-list.cjs +4 -4
- package/cjs/select/select-popover.cjs +18 -17
- package/cjs/select/select-store.cjs +3 -3
- package/cjs/select/select-store.d.ts +0 -7
- package/cjs/select/select.cjs +5 -5
- package/cjs/tab/tab-list.cjs +3 -3
- package/cjs/tab/tab-panel.cjs +3 -3
- package/cjs/tab/tab.cjs +1 -1
- package/cjs/toolbar/toolbar-container.cjs +1 -1
- package/cjs/toolbar/toolbar-input.cjs +1 -1
- package/cjs/toolbar/toolbar-item.cjs +1 -1
- package/cjs/toolbar/toolbar.cjs +3 -3
- package/cjs/tooltip/tooltip-anchor.cjs +58 -28
- package/cjs/tooltip/tooltip-anchor.d.ts +2 -18
- package/cjs/tooltip/tooltip-store.cjs +4 -3
- package/cjs/tooltip/tooltip-store.d.ts +5 -17
- package/cjs/tooltip/tooltip.cjs +66 -67
- package/cjs/tooltip/tooltip.d.ts +6 -25
- package/cjs/tsconfig.build.tsbuildinfo +1 -1
- package/esm/__chunks/{USCWE5QL.js → 2CA5JWPW.js} +28 -15
- package/esm/__chunks/5PIH3SMS.js +35 -0
- package/esm/__chunks/{PZK3B6LX.js → 776K5FXB.js} +1 -1
- package/esm/__chunks/{DQSQP4IL.js → GDDVBILZ.js} +1 -1
- package/esm/__chunks/{CXDKC5CW.js → HJWYYQGA.js} +1 -1
- package/esm/__chunks/{3FKA4P4C.js → K5R24MFH.js} +1 -1
- package/esm/__chunks/MLEIJKSM.js +363 -0
- package/esm/__chunks/{ZFMAA4DD.js → MR75RQGW.js} +16 -5
- package/esm/__chunks/{EMZ4NQG4.js → NAG6UD2X.js} +25 -20
- package/esm/__chunks/XIACQCPS.js +21 -0
- package/esm/combobox/combobox-item.js +1 -1
- package/esm/combobox/combobox-popover.js +8 -7
- package/esm/combobox/combobox-store.d.ts +0 -7
- package/esm/combobox/combobox-store.js +1 -1
- package/esm/combobox/combobox.js +2 -2
- package/esm/composite/composite-item.js +1 -1
- package/esm/composite/composite-overflow-disclosure.js +4 -4
- package/esm/composite/composite-overflow-store.d.ts +1 -13
- package/esm/composite/composite-overflow-store.js +1 -1
- package/esm/composite/composite-overflow.js +8 -7
- package/esm/composite/composite.js +2 -2
- package/esm/dialog/dialog-backdrop.d.ts +2 -5
- package/esm/dialog/dialog-backdrop.js +2 -1
- package/esm/dialog/dialog-dismiss.js +1 -1
- package/esm/dialog/dialog.d.ts +19 -6
- package/esm/dialog/dialog.js +7 -6
- package/esm/form/form-radio.js +1 -1
- package/esm/hovercard/hovercard-dismiss.js +1 -1
- package/esm/hovercard/hovercard-store.d.ts +1 -13
- package/esm/hovercard/hovercard-store.js +2 -2
- package/esm/hovercard/hovercard.js +9 -8
- package/esm/menu/menu-bar.js +2 -2
- package/esm/menu/menu-button.js +7 -7
- package/esm/menu/menu-dismiss.js +1 -1
- package/esm/menu/menu-item-checkbox.js +1 -1
- package/esm/menu/menu-item-radio.js +1 -1
- package/esm/menu/menu-item.js +1 -1
- package/esm/menu/menu-list.js +3 -3
- package/esm/menu/menu-store.d.ts +0 -7
- package/esm/menu/menu-store.js +5 -5
- package/esm/menu/menu.js +17 -16
- package/esm/popover/popover-disclosure.js +3 -3
- package/esm/popover/popover-dismiss.js +1 -1
- package/esm/popover/popover-store.d.ts +1 -13
- package/esm/popover/popover-store.js +1 -1
- package/esm/popover/popover.d.ts +96 -0
- package/esm/popover/popover.js +8 -7
- package/esm/portal/portal.js +1 -1
- package/esm/radio/radio-group.js +2 -2
- package/esm/radio/radio.js +1 -1
- package/esm/role/role.js +4 -15
- package/esm/select/select-item.js +1 -1
- package/esm/select/select-list.js +3 -3
- package/esm/select/select-popover.js +16 -15
- package/esm/select/select-store.d.ts +0 -7
- package/esm/select/select-store.js +1 -1
- package/esm/select/select.js +4 -4
- package/esm/tab/tab-list.js +2 -2
- package/esm/tab/tab-panel.js +3 -3
- package/esm/tab/tab.js +1 -1
- package/esm/toolbar/toolbar-container.js +1 -1
- package/esm/toolbar/toolbar-input.js +1 -1
- package/esm/toolbar/toolbar-item.js +1 -1
- package/esm/toolbar/toolbar.js +2 -2
- package/esm/tooltip/tooltip-anchor.d.ts +2 -18
- package/esm/tooltip/tooltip-anchor.js +59 -29
- package/esm/tooltip/tooltip-store.d.ts +5 -17
- package/esm/tooltip/tooltip-store.js +6 -5
- package/esm/tooltip/tooltip.d.ts +6 -25
- package/esm/tooltip/tooltip.js +67 -68
- package/esm/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/cjs/__chunks/JZRGYPLK.cjs +0 -125
- package/esm/__chunks/JJHXFKMC.js +0 -125
- package/esm/__chunks/SHGWT5HV.js +0 -54
- package/cjs/__chunks/{OV363CW6.cjs → BDJYHP43.cjs} +2 -2
- package/cjs/__chunks/{5I6IQHKQ.cjs → BIPONQXE.cjs} +2 -2
- package/esm/__chunks/{OY5YT7OV.js → RTOWJJVI.js} +3 -3
- package/esm/__chunks/{6O3TZMB4.js → U2KSDJ3W.js} +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,101 @@
|
|
|
1
1
|
# @ariakit/react-core
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **BREAKING**: Moved props from the `usePopoverStore` hook to the `Popover` component: `fixed`, `gutter`, `shift`, `flip`, `slide`, `overlap`, `sameWidth`, `fitViewport`, `arrowPadding`, `overflowPadding`, `getAnchorRect`, `renderCallback` (renamed to `updatePosition`). ([#2279](https://github.com/ariakit/ariakit/pull/2279))
|
|
8
|
+
|
|
9
|
+
The exception is the `placement` prop that should still be passed to the store.
|
|
10
|
+
|
|
11
|
+
**Before**:
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
const popover = usePopoverStore({
|
|
15
|
+
placement: "bottom",
|
|
16
|
+
fixed: true,
|
|
17
|
+
gutter: 8,
|
|
18
|
+
shift: 8,
|
|
19
|
+
flip: true,
|
|
20
|
+
slide: true,
|
|
21
|
+
overlap: true,
|
|
22
|
+
sameWidth: true,
|
|
23
|
+
fitViewport: true,
|
|
24
|
+
arrowPadding: 8,
|
|
25
|
+
overflowPadding: 8,
|
|
26
|
+
getAnchorRect: (anchor) => anchor?.getBoundingClientRect(),
|
|
27
|
+
renderCallback: (props) => props.defaultRenderCallback(),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
<Popover store={popover} />;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**After**:
|
|
34
|
+
|
|
35
|
+
```jsx
|
|
36
|
+
const popover = usePopoverStore({ placement: "bottom" });
|
|
37
|
+
|
|
38
|
+
<Popover
|
|
39
|
+
store={popover}
|
|
40
|
+
fixed
|
|
41
|
+
gutter={8}
|
|
42
|
+
shift={8}
|
|
43
|
+
flip
|
|
44
|
+
slide
|
|
45
|
+
overlap
|
|
46
|
+
sameWidth
|
|
47
|
+
fitViewport
|
|
48
|
+
arrowPadding={8}
|
|
49
|
+
overflowPadding={8}
|
|
50
|
+
getAnchorRect={(anchor) => anchor?.getBoundingClientRect()}
|
|
51
|
+
updatePosition={(props) => props.updatePosition()}
|
|
52
|
+
/>;
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
This change affects all the hooks and components that use `usePopoverStore` and `Popover` underneath: `useComboboxStore`, `ComboboxPopover`, `useHovercardStore`, `Hovercard`, `useMenuStore`, `Menu`, `useSelectStore`, `SelectPopover`, `useTooltipStore`, `Tooltip`.
|
|
56
|
+
|
|
57
|
+
With this change, the underlying `@floating-ui/dom` dependency has been also moved to the `Popover` component, which means it can be lazy loaded. See the [Lazy Popover](https://ariakit.org/examples/popover-lazy) example.
|
|
58
|
+
|
|
59
|
+
- **BREAKING**: The backdrop element on the `Dialog` component is now rendered as a sibling rather than as a parent of the dialog. This should make it easier to animate them separately. ([#2407](https://github.com/ariakit/ariakit/pull/2407))
|
|
60
|
+
|
|
61
|
+
This might be a breaking change if you're relying on their parent/child relationship for styling purposes (for example, to position the dialog in the center of the backdrop). If that's the case, you can apply the following styles to the dialog to achieve the same effect:
|
|
62
|
+
|
|
63
|
+
```css
|
|
64
|
+
.dialog {
|
|
65
|
+
position: fixed;
|
|
66
|
+
inset: 1rem;
|
|
67
|
+
margin: auto;
|
|
68
|
+
height: fit-content;
|
|
69
|
+
max-height: calc(100vh - 2 * 1rem);
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
These styles work even if the dialog is a child of the backdrop, so you can use them regardless of whether you're upgrading to this version or not.
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- Deprecated the `backdropProps` prop on the `Dialog` component. Use the `backdrop` prop instead. ([#2407](https://github.com/ariakit/ariakit/pull/2407))
|
|
78
|
+
|
|
79
|
+
- The `backdrop` prop on the `Dialog` component now accepts a JSX element as its value. ([#2407](https://github.com/ariakit/ariakit/pull/2407))
|
|
80
|
+
|
|
81
|
+
- The `Dialog` component will now wait for being unmounted before restoring the body scroll when the `hidden` prop is set to `false`. This should prevent the body scroll from being restored too early when the dialog is being animated out using third-party libraries like Framer Motion. ([#2407](https://github.com/ariakit/ariakit/pull/2407))
|
|
82
|
+
|
|
83
|
+
- The `Tooltip` component now defaults to use `aria-describedby` instead of `aria-labelledby`. ([#2279](https://github.com/ariakit/ariakit/pull/2279))
|
|
84
|
+
|
|
85
|
+
If you want to use the tooltip as a label for an anchor element, you can use the `type` prop on `useTooltipStore`:
|
|
86
|
+
|
|
87
|
+
```jsx
|
|
88
|
+
useTooltipStore({ type: "label" });
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
- The `Tooltip` component now supports mouse events. ([#2279](https://github.com/ariakit/ariakit/pull/2279))
|
|
92
|
+
|
|
93
|
+
It's now possible to hover over the tooltip without it disappearing, which makes it compliant with [WCAG 1.4.13](https://www.w3.org/WAI/WCAG21/Understanding/content-on-hover-or-focus.html).
|
|
94
|
+
|
|
95
|
+
- Fixed infinite loop on `Portal` with the `preserveTabOrder` prop set to `true` when the portalled element is placed right after its original position in the React tree. ([#2279](https://github.com/ariakit/ariakit/pull/2279))
|
|
96
|
+
|
|
97
|
+
- Updated dependencies: `@ariakit/core@0.2.0`.
|
|
98
|
+
|
|
3
99
|
## 0.1.8
|
|
4
100
|
|
|
5
101
|
### Patch Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _W2XKIB23cjs = require('./W2XKIB23.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _F7HVNVHQcjs = require('./F7HVNVHQ.cjs');
|
|
@@ -12,10 +12,10 @@ var _6455U47Tcjs = require('./6455U47T.cjs');
|
|
|
12
12
|
// src/hovercard/hovercard-store.ts
|
|
13
13
|
var _hovercardstore = require('@ariakit/core/hovercard/hovercard-store'); var Core = _interopRequireWildcard(_hovercardstore);
|
|
14
14
|
function useHovercardStoreOptions(props) {
|
|
15
|
-
return
|
|
15
|
+
return _W2XKIB23cjs.usePopoverStoreOptions.call(void 0, props);
|
|
16
16
|
}
|
|
17
17
|
function useHovercardStoreProps(store, props) {
|
|
18
|
-
return
|
|
18
|
+
return _W2XKIB23cjs.usePopoverStoreProps.call(void 0, store, props);
|
|
19
19
|
}
|
|
20
20
|
function useHovercardStore(props = {}) {
|
|
21
21
|
const options = useHovercardStoreOptions(props);
|
|
@@ -6,7 +6,7 @@ var _HVQRVCAScjs = require('./HVQRVCAS.cjs');
|
|
|
6
6
|
var _RCGSDYWJcjs = require('./RCGSDYWJ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _BIPONQXEcjs = require('./BIPONQXE.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -101,7 +101,7 @@ var useSelectList = _7NAIPZYNcjs.createHook.call(void 0,
|
|
|
101
101
|
const canFocusOnMove = store.useState(
|
|
102
102
|
(state) => state.open && !state.animating && focusOnMove
|
|
103
103
|
);
|
|
104
|
-
props =
|
|
104
|
+
props = _BIPONQXEcjs.useComposite.call(void 0, _6455U47Tcjs.__spreadProps.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, {
|
|
105
105
|
store
|
|
106
106
|
}, props), {
|
|
107
107
|
composite,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _7NAIPZYNcjs = require('./7NAIPZYN.cjs');
|
|
6
|
+
|
|
7
|
+
// src/role/role.ts
|
|
8
|
+
var useRole = _7NAIPZYNcjs.createHook.call(void 0, (props) => {
|
|
9
|
+
return props;
|
|
10
|
+
});
|
|
11
|
+
var Role = _7NAIPZYNcjs.createComponent.call(void 0, (props) => {
|
|
12
|
+
return _7NAIPZYNcjs.createElement.call(void 0, "div", props);
|
|
13
|
+
});
|
|
14
|
+
if (process.env.NODE_ENV !== "production") {
|
|
15
|
+
Role.displayName = "Role";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
exports.useRole = useRole; exports.Role = Role;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
var _OLGMV24Ucjs = require('./OLGMV24U.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _MHL3EECXcjs = require('./MHL3EECX.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -282,7 +282,7 @@ var useHovercard = _7NAIPZYNcjs.createHook.call(void 0,
|
|
|
282
282
|
});
|
|
283
283
|
props = useAutoFocusOnHide(_6455U47Tcjs.__spreadValues.call(void 0, { store }, props));
|
|
284
284
|
props = useAutoFocusOnShow(_6455U47Tcjs.__spreadValues.call(void 0, { store, modal }, props));
|
|
285
|
-
props =
|
|
285
|
+
props = _MHL3EECXcjs.usePopover.call(void 0, _6455U47Tcjs.__spreadProps.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, {
|
|
286
286
|
hideOnEscape,
|
|
287
287
|
store,
|
|
288
288
|
modal,
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
var _CARNFZQTcjs = require('./CARNFZQT.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
var _5P6HRGY6cjs = require('./5P6HRGY6.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
var _EM2PMFEWcjs = require('./EM2PMFEW.cjs');
|
|
7
10
|
|
|
8
11
|
|
|
@@ -21,8 +24,7 @@ function DialogBackdrop({
|
|
|
21
24
|
store,
|
|
22
25
|
backdrop,
|
|
23
26
|
backdropProps,
|
|
24
|
-
hidden
|
|
25
|
-
children
|
|
27
|
+
hidden
|
|
26
28
|
}) {
|
|
27
29
|
const ref = _react.useRef.call(void 0, null);
|
|
28
30
|
store = _react.useMemo.call(void 0,
|
|
@@ -52,11 +54,15 @@ function DialogBackdrop({
|
|
|
52
54
|
return;
|
|
53
55
|
return _CARNFZQTcjs.markAncestor.call(void 0, backdrop2, id);
|
|
54
56
|
}, [contentElement]);
|
|
57
|
+
backdropProps = _react.isValidElement.call(void 0, backdrop) ? _6455U47Tcjs.__spreadValues.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, {
|
|
58
|
+
ref: "ref" in backdrop ? backdrop.ref : void 0
|
|
59
|
+
}, backdrop.props), backdropProps) : backdropProps;
|
|
55
60
|
const props = _EM2PMFEWcjs.useDisclosureContent.call(void 0, _6455U47Tcjs.__spreadProps.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, {
|
|
56
61
|
store,
|
|
57
62
|
id: void 0,
|
|
58
63
|
role: "presentation",
|
|
59
|
-
hidden
|
|
64
|
+
hidden,
|
|
65
|
+
"data-backdrop": (contentElement == null ? void 0 : contentElement.id) || ""
|
|
60
66
|
}, backdropProps), {
|
|
61
67
|
ref: _NREUHWTUcjs.useForkRef.call(void 0, backdropProps == null ? void 0 : backdropProps.ref, ref),
|
|
62
68
|
style: _6455U47Tcjs.__spreadValues.call(void 0, {
|
|
@@ -67,8 +73,13 @@ function DialogBackdrop({
|
|
|
67
73
|
left: 0
|
|
68
74
|
}, backdropProps == null ? void 0 : backdropProps.style)
|
|
69
75
|
}));
|
|
76
|
+
if (!backdrop)
|
|
77
|
+
return null;
|
|
78
|
+
if (_react.isValidElement.call(void 0, backdrop)) {
|
|
79
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _5P6HRGY6cjs.Role, _6455U47Tcjs.__spreadProps.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, {}, props), { children: (props2) => _react.cloneElement.call(void 0, backdrop, props2) }));
|
|
80
|
+
}
|
|
70
81
|
const Component = typeof backdrop !== "boolean" ? backdrop || "div" : "div";
|
|
71
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
82
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _5P6HRGY6cjs.Role, _6455U47Tcjs.__spreadProps.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, {}, props), { as: Component }));
|
|
72
83
|
}
|
|
73
84
|
|
|
74
85
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _D3EUPD6Pcjs = require('./D3EUPD6P.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _O45IXGJWcjs = require('./O45IXGJW.cjs');
|
|
@@ -30,18 +30,18 @@ var _GHWBKA6Hcjs = require('./GHWBKA6H.cjs');
|
|
|
30
30
|
var _SOPRUU56cjs = require('./SOPRUU56.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
var _WWDX5YPGcjs = require('./WWDX5YPG.cjs');
|
|
33
34
|
|
|
34
35
|
|
|
35
|
-
var _N2VCZZLPcjs = require('./N2VCZZLP.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _N2VCZZLPcjs = require('./N2VCZZLP.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _EM2PMFEWcjs = require('./EM2PMFEW.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _NVBNDB5Bcjs = require('./NVBNDB5B.cjs');
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
@@ -152,7 +152,11 @@ var useDialog = _7NAIPZYNcjs.createHook.call(void 0,
|
|
|
152
152
|
const open = store.useState("open");
|
|
153
153
|
const mounted = store.useState("mounted");
|
|
154
154
|
const contentElement = store.useState("contentElement");
|
|
155
|
-
|
|
155
|
+
const hiddenProp = props.hidden;
|
|
156
|
+
_QRAQT522cjs.usePreventBodyScroll.call(void 0,
|
|
157
|
+
store,
|
|
158
|
+
(mounted || hiddenProp === false) && preventBodyScroll
|
|
159
|
+
);
|
|
156
160
|
_E5VOJWDRcjs.useHideOnInteractOutside.call(void 0, store, hideOnInteractOutside);
|
|
157
161
|
const { wrapElement, nestedDialogs } = _NZYGNCZLcjs.useNestedDialogs.call(void 0, store);
|
|
158
162
|
props = _NREUHWTUcjs.useWrapElement.call(void 0, props, wrapElement, [wrapElement]);
|
|
@@ -392,21 +396,22 @@ var useDialog = _7NAIPZYNcjs.createHook.call(void 0,
|
|
|
392
396
|
(element) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _SOPRUU56cjs.HeadingLevel, { level: modal ? 1 : void 0, children: element }),
|
|
393
397
|
[modal]
|
|
394
398
|
);
|
|
395
|
-
const hiddenProp = props.hidden;
|
|
396
399
|
props = _NREUHWTUcjs.useWrapElement.call(void 0,
|
|
397
400
|
props,
|
|
398
401
|
(element) => {
|
|
399
402
|
if (backdrop) {
|
|
400
|
-
return /* @__PURE__ */ _jsxruntime.
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
403
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
404
|
+
backdrop && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
405
|
+
_D3EUPD6Pcjs.DialogBackdrop,
|
|
406
|
+
{
|
|
407
|
+
store,
|
|
408
|
+
backdrop,
|
|
409
|
+
backdropProps,
|
|
410
|
+
hidden: hiddenProp
|
|
411
|
+
}
|
|
412
|
+
),
|
|
413
|
+
element
|
|
414
|
+
] });
|
|
410
415
|
}
|
|
411
416
|
return element;
|
|
412
417
|
},
|
|
@@ -434,7 +439,7 @@ var useDialog = _7NAIPZYNcjs.createHook.call(void 0,
|
|
|
434
439
|
}));
|
|
435
440
|
props = _EM2PMFEWcjs.useDisclosureContent.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, { store }, props));
|
|
436
441
|
props = _NVBNDB5Bcjs.useFocusable.call(void 0, _6455U47Tcjs.__spreadProps.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, {}, props), { focusable }));
|
|
437
|
-
props =
|
|
442
|
+
props = _WWDX5YPGcjs.usePortal.call(void 0, _6455U47Tcjs.__spreadProps.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, { portal }, props), { portalRef, preserveTabOrder }));
|
|
438
443
|
return props;
|
|
439
444
|
}
|
|
440
445
|
);
|
|
@@ -7,7 +7,7 @@ var _MPFAD3UKcjs = require('./MPFAD3UK.cjs');
|
|
|
7
7
|
var _HVQRVCAScjs = require('./HVQRVCAS.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _BIPONQXEcjs = require('./BIPONQXE.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -145,7 +145,7 @@ var useMenuList = _7NAIPZYNcjs.createHook.call(void 0,
|
|
|
145
145
|
"aria-orientation": orientation
|
|
146
146
|
}, props);
|
|
147
147
|
}
|
|
148
|
-
props =
|
|
148
|
+
props = _BIPONQXEcjs.useComposite.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, { store, composite }, props));
|
|
149
149
|
props = _HVQRVCAScjs.useCompositeTypeahead.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, { store }, props));
|
|
150
150
|
return props;
|
|
151
151
|
}
|