@qualtrics/ui-react 2.85.2 → 2.85.5
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 +25 -0
- package/dist/__node_modules/@radix-ui/primitive/dist/index.js +14 -3
- package/dist/__node_modules/@radix-ui/primitive/dist/internal/is-development.false.js +4 -0
- package/dist/__node_modules/@radix-ui/react-arrow/dist/index.js +9 -6
- package/dist/__node_modules/@radix-ui/react-collection/dist/index.js +263 -153
- package/dist/__node_modules/@radix-ui/react-compose-refs/dist/index.js +8 -1
- package/dist/__node_modules/@radix-ui/react-context/dist/index.js +35 -12
- package/dist/__node_modules/@radix-ui/react-direction/dist/index.js +16 -6
- package/dist/__node_modules/@radix-ui/react-dismissable-layer/dist/index.js +172 -43
- package/dist/__node_modules/@radix-ui/react-dropdown-menu/dist/index.js +76 -95
- package/dist/__node_modules/@radix-ui/react-focus-guards/dist/index.js +30 -6
- package/dist/__node_modules/@radix-ui/react-focus-scope/dist/index.js +111 -30
- package/dist/__node_modules/@radix-ui/react-id/dist/index.js +6 -0
- package/dist/__node_modules/@radix-ui/react-menu/dist/index.js +232 -197
- package/dist/__node_modules/@radix-ui/react-popper/dist/index.js +104 -49
- package/dist/__node_modules/@radix-ui/react-portal/dist/index.js +10 -8
- package/dist/__node_modules/@radix-ui/react-presence/dist/index.js +72 -14
- package/dist/__node_modules/@radix-ui/react-primitive/dist/index.js +8 -2
- package/dist/__node_modules/@radix-ui/react-roving-focus/dist/index.js +52 -18
- package/dist/__node_modules/@radix-ui/react-slot/dist/index.js +106 -54
- package/dist/__node_modules/@radix-ui/react-use-callback-ref/dist/index.js +17 -4
- package/dist/__node_modules/@radix-ui/react-use-controllable-state/dist/index.js +14 -4
- package/dist/__node_modules/@radix-ui/react-use-effect-event/dist/index.js +6 -1
- package/dist/__node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +37 -0
- package/dist/__node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
- package/dist/__node_modules/@radix-ui/react-use-size/dist/index.js +28 -15
- package/dist/__shared/cjs/{index-e03dac36.js → index-bd03241f.js} +213 -208
- package/dist/__shared/cjs/{index-507024ee.js → index-ccb5282a.js} +12 -3
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Button/Button.js +52 -6
- package/dist/components/Button/Button2.js +6 -52
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/ColorPicker/ColorPickerFlyout.js +1 -1
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/ConfigPane/ConfigPane.js +6 -2
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +1 -1
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/FilePicker/FilePicker.js +1 -1
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/IconTypes.js +1 -0
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Pagination/PaginationNextButton.js +1 -1
- package/dist/components/Pagination/PaginationPreviousButton.js +1 -1
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch.js +1 -1
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +1 -1
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/design-tokens/less/typography.js +3 -3
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/components/PulseIcon.js +11 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.es.js +1 -0
- package/dist/icons/index.js +2 -1
- package/dist/index.d.ts +72 -71
- package/dist/index.es.js +2 -2
- package/dist/index.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/Chat/Loader.js +1 -1
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Form/FormFields/InputField.js +3 -3
- package/dist/next/Indicator/Indicator2.js +3 -3
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/next/Menu/Hooks/useFlyoutNode.js +48 -0
- package/dist/next/Menu/Menu.js +2 -2
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuButton.js +6 -5
- package/dist/next/Menu/MenuItem.js +5 -4
- package/dist/next/Menu/MenuPane.js +20 -19
- package/dist/next/Menu/PaneChildren.js +15 -10
- package/dist/next/Menu/SubMenu.js +22 -21
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/Select/Select2.js +3 -3
- package/dist/next/SplitButton/SplitButton.js +1 -1
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/ToggleButton/ToggleButton.js +1 -1
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/index.js +1581 -850
- package/dist/translations-en.js +71 -71
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/icons/package.json +4 -4
- package/next/package.json +5 -5
- package/package.json +16 -16
- package/dist/__node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -23
|
@@ -3,11 +3,11 @@ import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
|
3
3
|
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { composeEventHandlers } from '../../primitive/dist/index.js';
|
|
6
|
-
import {
|
|
6
|
+
import { useComposedRefs } from '../../react-compose-refs/dist/index.js';
|
|
7
7
|
import { createContextScope } from '../../react-context/dist/index.js';
|
|
8
8
|
import { useControllableState } from '../../react-use-controllable-state/dist/index.js';
|
|
9
9
|
import { Primitive } from '../../react-primitive/dist/index.js';
|
|
10
|
-
import { createMenuScope,
|
|
10
|
+
import { createMenuScope, Menu, Anchor as MenuAnchor, MenuPortal, Content as MenuContent, Group as MenuGroup, Label as MenuLabel, Item as MenuItem, CheckboxItem as MenuCheckboxItem, MenuRadioGroup, MenuRadioItem, ItemIndicator as MenuItemIndicator, MenuSeparator, Arrow as MenuArrow, MenuSub, MenuSubTrigger, MenuSubContent } from '../../react-menu/dist/index.js';
|
|
11
11
|
import { useId } from '../../react-id/dist/index.js';
|
|
12
12
|
|
|
13
13
|
"use client";
|
|
@@ -25,6 +25,11 @@ const _excluded = ["__scopeDropdownMenu", "disabled"],
|
|
|
25
25
|
_excluded10 = ["__scopeDropdownMenu"],
|
|
26
26
|
_excluded11 = ["__scopeDropdownMenu"],
|
|
27
27
|
_excluded12 = ["__scopeDropdownMenu"];
|
|
28
|
+
var __defProp = Object.defineProperty;
|
|
29
|
+
var __name = (target, value) => __defProp(target, "name", {
|
|
30
|
+
value,
|
|
31
|
+
configurable: true
|
|
32
|
+
});
|
|
28
33
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
29
34
|
var _createContextScope = createContextScope(DROPDOWN_MENU_NAME, [createMenuScope]),
|
|
30
35
|
_createContextScope2 = _slicedToArray(_createContextScope, 2),
|
|
@@ -35,7 +40,7 @@ var _createDropdownMenuCo = createDropdownMenuContext(DROPDOWN_MENU_NAME),
|
|
|
35
40
|
_createDropdownMenuCo2 = _slicedToArray(_createDropdownMenuCo, 2),
|
|
36
41
|
DropdownMenuProvider = _createDropdownMenuCo2[0],
|
|
37
42
|
useDropdownMenuContext = _createDropdownMenuCo2[1];
|
|
38
|
-
var DropdownMenu = props => {
|
|
43
|
+
var DropdownMenu = /* @__PURE__ */__name(props => {
|
|
39
44
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
40
45
|
children = props.children,
|
|
41
46
|
dir = props.dir,
|
|
@@ -64,7 +69,7 @@ var DropdownMenu = props => {
|
|
|
64
69
|
onOpenChange: setOpen,
|
|
65
70
|
onOpenToggle: React.useCallback(() => setOpen(prevOpen => !prevOpen), [setOpen]),
|
|
66
71
|
modal,
|
|
67
|
-
children: /* @__PURE__ */React.createElement(
|
|
72
|
+
children: /* @__PURE__ */React.createElement(Menu, {
|
|
68
73
|
...menuScope,
|
|
69
74
|
open,
|
|
70
75
|
onOpenChange: setOpen,
|
|
@@ -73,17 +78,20 @@ var DropdownMenu = props => {
|
|
|
73
78
|
children
|
|
74
79
|
})
|
|
75
80
|
});
|
|
76
|
-
};
|
|
77
|
-
DropdownMenu.displayName = DROPDOWN_MENU_NAME;
|
|
81
|
+
}, "DropdownMenu");
|
|
78
82
|
var TRIGGER_NAME = "DropdownMenuTrigger";
|
|
79
|
-
var DropdownMenuTrigger =
|
|
83
|
+
var DropdownMenuTrigger = /* @__PURE__ */React.forwardRef(
|
|
84
|
+
// blank line to reduce diff noise
|
|
85
|
+
/* @__PURE__ */
|
|
86
|
+
__name(function DropdownMenuTrigger2(props, forwardedRef) {
|
|
80
87
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
81
88
|
_props$disabled = props.disabled,
|
|
82
89
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
83
90
|
triggerProps = _objectWithoutProperties(props, _excluded);
|
|
84
91
|
const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
|
|
85
92
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
86
|
-
|
|
93
|
+
const composedRefs = useComposedRefs(forwardedRef, context.triggerRef);
|
|
94
|
+
return /* @__PURE__ */React.createElement(MenuAnchor, {
|
|
87
95
|
asChild: true,
|
|
88
96
|
...menuScope,
|
|
89
97
|
children: /* @__PURE__ */React.createElement(Primitive.button, {
|
|
@@ -96,7 +104,7 @@ var DropdownMenuTrigger = /*#__PURE__*/React.forwardRef((props, forwardedRef) =>
|
|
|
96
104
|
"data-disabled": disabled ? "" : void 0,
|
|
97
105
|
disabled,
|
|
98
106
|
...triggerProps,
|
|
99
|
-
ref:
|
|
107
|
+
ref: composedRefs,
|
|
100
108
|
onPointerDown: composeEventHandlers(props.onPointerDown, event => {
|
|
101
109
|
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
102
110
|
context.onOpenToggle();
|
|
@@ -112,27 +120,27 @@ var DropdownMenuTrigger = /*#__PURE__*/React.forwardRef((props, forwardedRef) =>
|
|
|
112
120
|
})
|
|
113
121
|
})
|
|
114
122
|
});
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
var PORTAL_NAME = "DropdownMenuPortal";
|
|
118
|
-
var DropdownMenuPortal = props => {
|
|
123
|
+
}, "DropdownMenuTrigger"));
|
|
124
|
+
var DropdownMenuPortal = /* @__PURE__ */__name(props => {
|
|
119
125
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
120
126
|
portalProps = _objectWithoutProperties(props, _excluded2);
|
|
121
127
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
122
|
-
return /* @__PURE__ */React.createElement(
|
|
128
|
+
return /* @__PURE__ */React.createElement(MenuPortal, {
|
|
123
129
|
...menuScope,
|
|
124
130
|
...portalProps
|
|
125
131
|
});
|
|
126
|
-
};
|
|
127
|
-
DropdownMenuPortal.displayName = PORTAL_NAME;
|
|
132
|
+
}, "DropdownMenuPortal");
|
|
128
133
|
var CONTENT_NAME = "DropdownMenuContent";
|
|
129
|
-
var DropdownMenuContent =
|
|
134
|
+
var DropdownMenuContent = /* @__PURE__ */React.forwardRef(
|
|
135
|
+
// blank line to reduce diff noise
|
|
136
|
+
/* @__PURE__ */
|
|
137
|
+
__name(function DropdownMenuContent2(props, forwardedRef) {
|
|
130
138
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
131
139
|
contentProps = _objectWithoutProperties(props, _excluded3);
|
|
132
140
|
const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
|
|
133
141
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
134
142
|
const hasInteractedOutsideRef = React.useRef(false);
|
|
135
|
-
return /* @__PURE__ */React.createElement(
|
|
143
|
+
return /* @__PURE__ */React.createElement(MenuContent, {
|
|
136
144
|
id: context.contentId,
|
|
137
145
|
"aria-labelledby": context.triggerId,
|
|
138
146
|
...menuScope,
|
|
@@ -162,117 +170,110 @@ var DropdownMenuContent = /*#__PURE__*/React.forwardRef((props, forwardedRef) =>
|
|
|
162
170
|
}
|
|
163
171
|
}
|
|
164
172
|
});
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
173
|
+
}, "DropdownMenuContent"));
|
|
174
|
+
var DropdownMenuGroup = /* @__PURE__ */React.forwardRef(
|
|
175
|
+
// blank line to reduce diff noise
|
|
176
|
+
/* @__PURE__ */
|
|
177
|
+
__name(function DropdownMenuGroup2(props, forwardedRef) {
|
|
169
178
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
170
179
|
groupProps = _objectWithoutProperties(props, _excluded4);
|
|
171
180
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
172
|
-
return /* @__PURE__ */React.createElement(
|
|
181
|
+
return /* @__PURE__ */React.createElement(MenuGroup, {
|
|
173
182
|
...menuScope,
|
|
174
183
|
...groupProps,
|
|
175
184
|
ref: forwardedRef
|
|
176
185
|
});
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
186
|
+
}, "DropdownMenuGroup"));
|
|
187
|
+
var DropdownMenuLabel = /* @__PURE__ */React.forwardRef(
|
|
188
|
+
// blank line to reduce diff noise
|
|
189
|
+
/* @__PURE__ */
|
|
190
|
+
__name(function DropdownMenuLabel2(props, forwardedRef) {
|
|
181
191
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
182
192
|
labelProps = _objectWithoutProperties(props, _excluded5);
|
|
183
193
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
184
|
-
return /* @__PURE__ */React.createElement(
|
|
194
|
+
return /* @__PURE__ */React.createElement(MenuLabel, {
|
|
185
195
|
...menuScope,
|
|
186
196
|
...labelProps,
|
|
187
197
|
ref: forwardedRef
|
|
188
198
|
});
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
199
|
+
}, "DropdownMenuLabel"));
|
|
200
|
+
var DropdownMenuItem = /* @__PURE__ */React.forwardRef(
|
|
201
|
+
// blank line to reduce diff noise
|
|
202
|
+
/* @__PURE__ */
|
|
203
|
+
__name(function DropdownMenuItem2(props, forwardedRef) {
|
|
193
204
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
194
205
|
itemProps = _objectWithoutProperties(props, _excluded6);
|
|
195
206
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
196
|
-
return /* @__PURE__ */React.createElement(
|
|
207
|
+
return /* @__PURE__ */React.createElement(MenuItem, {
|
|
197
208
|
...menuScope,
|
|
198
209
|
...itemProps,
|
|
199
210
|
ref: forwardedRef
|
|
200
211
|
});
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
|
|
204
|
-
var DropdownMenuCheckboxItem = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
212
|
+
}, "DropdownMenuItem"));
|
|
213
|
+
var DropdownMenuCheckboxItem = /* @__PURE__ */React.forwardRef(/* @__PURE__ */__name(function DropdownMenuCheckboxItem2(props, forwardedRef) {
|
|
205
214
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
206
215
|
checkboxItemProps = _objectWithoutProperties(props, _excluded7);
|
|
207
216
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
208
|
-
return /* @__PURE__ */React.createElement(
|
|
217
|
+
return /* @__PURE__ */React.createElement(MenuCheckboxItem, {
|
|
209
218
|
...menuScope,
|
|
210
219
|
...checkboxItemProps,
|
|
211
220
|
ref: forwardedRef
|
|
212
221
|
});
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
|
|
216
|
-
var DropdownMenuRadioGroup = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
222
|
+
}, "DropdownMenuCheckboxItem"));
|
|
223
|
+
var DropdownMenuRadioGroup = /* @__PURE__ */React.forwardRef(/* @__PURE__ */__name(function DropdownMenuRadioGroup2(props, forwardedRef) {
|
|
217
224
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
218
225
|
radioGroupProps = _objectWithoutProperties(props, _excluded8);
|
|
219
226
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
220
|
-
return /* @__PURE__ */React.createElement(
|
|
227
|
+
return /* @__PURE__ */React.createElement(MenuRadioGroup, {
|
|
221
228
|
...menuScope,
|
|
222
229
|
...radioGroupProps,
|
|
223
230
|
ref: forwardedRef
|
|
224
231
|
});
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
|
|
228
|
-
var DropdownMenuRadioItem = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
232
|
+
}, "DropdownMenuRadioGroup"));
|
|
233
|
+
var DropdownMenuRadioItem = /* @__PURE__ */React.forwardRef(/* @__PURE__ */__name(function DropdownMenuRadioItem2(props, forwardedRef) {
|
|
229
234
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
230
235
|
radioItemProps = _objectWithoutProperties(props, _excluded9);
|
|
231
236
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
232
|
-
return /* @__PURE__ */React.createElement(
|
|
237
|
+
return /* @__PURE__ */React.createElement(MenuRadioItem, {
|
|
233
238
|
...menuScope,
|
|
234
239
|
...radioItemProps,
|
|
235
240
|
ref: forwardedRef
|
|
236
241
|
});
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
var INDICATOR_NAME = "DropdownMenuItemIndicator";
|
|
240
|
-
var DropdownMenuItemIndicator = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
242
|
+
}, "DropdownMenuRadioItem"));
|
|
243
|
+
var DropdownMenuItemIndicator = /* @__PURE__ */React.forwardRef(/* @__PURE__ */__name(function DropdownMenuItemIndicator2(props, forwardedRef) {
|
|
241
244
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
242
245
|
itemIndicatorProps = _objectWithoutProperties(props, _excluded0);
|
|
243
246
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
244
|
-
return /* @__PURE__ */React.createElement(
|
|
247
|
+
return /* @__PURE__ */React.createElement(MenuItemIndicator, {
|
|
245
248
|
...menuScope,
|
|
246
249
|
...itemIndicatorProps,
|
|
247
250
|
ref: forwardedRef
|
|
248
251
|
});
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
var SEPARATOR_NAME = "DropdownMenuSeparator";
|
|
252
|
-
var DropdownMenuSeparator = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
252
|
+
}, "DropdownMenuItemIndicator"));
|
|
253
|
+
var DropdownMenuSeparator = /* @__PURE__ */React.forwardRef(/* @__PURE__ */__name(function DropdownMenuSeparator2(props, forwardedRef) {
|
|
253
254
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
254
255
|
separatorProps = _objectWithoutProperties(props, _excluded1);
|
|
255
256
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
256
|
-
return /* @__PURE__ */React.createElement(
|
|
257
|
+
return /* @__PURE__ */React.createElement(MenuSeparator, {
|
|
257
258
|
...menuScope,
|
|
258
259
|
...separatorProps,
|
|
259
260
|
ref: forwardedRef
|
|
260
261
|
});
|
|
261
|
-
});
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
262
|
+
}, "DropdownMenuSeparator"));
|
|
263
|
+
var DropdownMenuArrow = /* @__PURE__ */React.forwardRef(
|
|
264
|
+
// blank line to reduce diff noise
|
|
265
|
+
/* @__PURE__ */
|
|
266
|
+
__name(function DropdownMenuArrow2(props, forwardedRef) {
|
|
265
267
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
266
268
|
arrowProps = _objectWithoutProperties(props, _excluded10);
|
|
267
269
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
268
|
-
return /* @__PURE__ */React.createElement(
|
|
270
|
+
return /* @__PURE__ */React.createElement(MenuArrow, {
|
|
269
271
|
...menuScope,
|
|
270
272
|
...arrowProps,
|
|
271
273
|
ref: forwardedRef
|
|
272
274
|
});
|
|
273
|
-
});
|
|
274
|
-
|
|
275
|
-
var DropdownMenuSub = props => {
|
|
275
|
+
}, "DropdownMenuArrow"));
|
|
276
|
+
var DropdownMenuSub = /* @__PURE__ */__name(props => {
|
|
276
277
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
277
278
|
children = props.children,
|
|
278
279
|
openProp = props.open,
|
|
@@ -288,31 +289,28 @@ var DropdownMenuSub = props => {
|
|
|
288
289
|
_useControllableState4 = _slicedToArray(_useControllableState3, 2),
|
|
289
290
|
open = _useControllableState4[0],
|
|
290
291
|
setOpen = _useControllableState4[1];
|
|
291
|
-
return /* @__PURE__ */React.createElement(
|
|
292
|
+
return /* @__PURE__ */React.createElement(MenuSub, {
|
|
292
293
|
...menuScope,
|
|
293
294
|
open,
|
|
294
295
|
onOpenChange: setOpen,
|
|
295
296
|
children
|
|
296
297
|
});
|
|
297
|
-
};
|
|
298
|
-
var
|
|
299
|
-
var DropdownMenuSubTrigger = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
298
|
+
}, "DropdownMenuSub");
|
|
299
|
+
var DropdownMenuSubTrigger = /* @__PURE__ */React.forwardRef(/* @__PURE__ */__name(function DropdownMenuSubTrigger2(props, forwardedRef) {
|
|
300
300
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
301
301
|
subTriggerProps = _objectWithoutProperties(props, _excluded11);
|
|
302
302
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
303
|
-
return /* @__PURE__ */React.createElement(
|
|
303
|
+
return /* @__PURE__ */React.createElement(MenuSubTrigger, {
|
|
304
304
|
...menuScope,
|
|
305
305
|
...subTriggerProps,
|
|
306
306
|
ref: forwardedRef
|
|
307
307
|
});
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
var SUB_CONTENT_NAME = "DropdownMenuSubContent";
|
|
311
|
-
var DropdownMenuSubContent = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
308
|
+
}, "DropdownMenuSubTrigger"));
|
|
309
|
+
var DropdownMenuSubContent = /* @__PURE__ */React.forwardRef(/* @__PURE__ */__name(function DropdownMenuSubContent2(props, forwardedRef) {
|
|
312
310
|
const __scopeDropdownMenu = props.__scopeDropdownMenu,
|
|
313
311
|
subContentProps = _objectWithoutProperties(props, _excluded12);
|
|
314
312
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
315
|
-
return /* @__PURE__ */React.createElement(
|
|
313
|
+
return /* @__PURE__ */React.createElement(MenuSubContent, {
|
|
316
314
|
...menuScope,
|
|
317
315
|
...subContentProps,
|
|
318
316
|
ref: forwardedRef,
|
|
@@ -328,23 +326,6 @@ var DropdownMenuSubContent = /*#__PURE__*/React.forwardRef((props, forwardedRef)
|
|
|
328
326
|
}
|
|
329
327
|
}
|
|
330
328
|
});
|
|
331
|
-
});
|
|
332
|
-
DropdownMenuSubContent.displayName = SUB_CONTENT_NAME;
|
|
333
|
-
var Root2 = DropdownMenu;
|
|
334
|
-
var Trigger = DropdownMenuTrigger;
|
|
335
|
-
var Portal2 = DropdownMenuPortal;
|
|
336
|
-
var Content2 = DropdownMenuContent;
|
|
337
|
-
var Group2 = DropdownMenuGroup;
|
|
338
|
-
var Label2 = DropdownMenuLabel;
|
|
339
|
-
var Item2 = DropdownMenuItem;
|
|
340
|
-
var CheckboxItem2 = DropdownMenuCheckboxItem;
|
|
341
|
-
var RadioGroup2 = DropdownMenuRadioGroup;
|
|
342
|
-
var RadioItem2 = DropdownMenuRadioItem;
|
|
343
|
-
var ItemIndicator2 = DropdownMenuItemIndicator;
|
|
344
|
-
var Separator2 = DropdownMenuSeparator;
|
|
345
|
-
var Arrow2 = DropdownMenuArrow;
|
|
346
|
-
var Sub2 = DropdownMenuSub;
|
|
347
|
-
var SubTrigger2 = DropdownMenuSubTrigger;
|
|
348
|
-
var SubContent2 = DropdownMenuSubContent;
|
|
329
|
+
}, "DropdownMenuSubContent"));
|
|
349
330
|
|
|
350
|
-
export {
|
|
331
|
+
export { DropdownMenuArrow as Arrow, DropdownMenuCheckboxItem as CheckboxItem, DropdownMenuContent as Content, DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemIndicator, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DropdownMenuGroup as Group, DropdownMenuItem as Item, DropdownMenuItemIndicator as ItemIndicator, DropdownMenuLabel as Label, DropdownMenuPortal as Portal, DropdownMenuRadioGroup as RadioGroup, DropdownMenuRadioItem as RadioItem, DropdownMenu as Root, DropdownMenuSeparator as Separator, DropdownMenuSub as Sub, DropdownMenuSubContent as SubContent, DropdownMenuSubTrigger as SubTrigger, DropdownMenuTrigger as Trigger, createDropdownMenuScope };
|
|
@@ -1,26 +1,49 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
"use client";
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", {
|
|
7
|
+
value,
|
|
8
|
+
configurable: true
|
|
9
|
+
});
|
|
4
10
|
var count = 0;
|
|
11
|
+
var guards = null;
|
|
5
12
|
function FocusGuards(props) {
|
|
6
13
|
useFocusGuards();
|
|
7
14
|
return props.children;
|
|
8
15
|
}
|
|
16
|
+
__name(FocusGuards, "FocusGuards");
|
|
9
17
|
function useFocusGuards() {
|
|
10
18
|
React.useEffect(() => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
if (!guards) {
|
|
20
|
+
guards = {
|
|
21
|
+
start: createFocusGuard(),
|
|
22
|
+
end: createFocusGuard()
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
const _guards = guards,
|
|
26
|
+
start = _guards.start,
|
|
27
|
+
end = _guards.end;
|
|
28
|
+
if (document.body.firstElementChild !== start) {
|
|
29
|
+
document.body.insertAdjacentElement("afterbegin", start);
|
|
30
|
+
}
|
|
31
|
+
if (document.body.lastElementChild !== end) {
|
|
32
|
+
document.body.insertAdjacentElement("beforeend", end);
|
|
33
|
+
}
|
|
15
34
|
count++;
|
|
16
35
|
return () => {
|
|
17
36
|
if (count === 1) {
|
|
18
|
-
|
|
37
|
+
var _guards2, _guards3;
|
|
38
|
+
(_guards2 = guards) === null || _guards2 === void 0 || _guards2.start.remove();
|
|
39
|
+
(_guards3 = guards) === null || _guards3 === void 0 || _guards3.end.remove();
|
|
40
|
+
guards = null;
|
|
19
41
|
}
|
|
20
|
-
count
|
|
42
|
+
count = Math.max(0, count - 1);
|
|
21
43
|
};
|
|
22
44
|
}, []);
|
|
23
45
|
}
|
|
46
|
+
__name(useFocusGuards, "useFocusGuards");
|
|
24
47
|
function createFocusGuard() {
|
|
25
48
|
const element = document.createElement("span");
|
|
26
49
|
element.setAttribute("data-radix-focus-guard", "");
|
|
@@ -31,5 +54,6 @@ function createFocusGuard() {
|
|
|
31
54
|
element.style.pointerEvents = "none";
|
|
32
55
|
return element;
|
|
33
56
|
}
|
|
57
|
+
__name(createFocusGuard, "createFocusGuard");
|
|
34
58
|
|
|
35
59
|
export { FocusGuards, FocusGuards as Root, useFocusGuards };
|