@eightshift/ui-components 5.1.4 → 5.2.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.
- package/dist/{Button-DH22t_SM.js → Button-RTwMSBs-.js} +20 -26
- package/dist/{Collection-BRJOMbOa.js → Collection-D_KhdLDC.js} +40 -23
- package/dist/{Color-CNqKeT8D.js → Color-WxFE7lQB.js} +2 -2
- package/dist/{ColorSwatch-Dt3lRApA.js → ColorSwatch-xVS3rMYS.js} +9 -7
- package/dist/{Dialog-D6EdDPeu.js → Dialog-Xf6AsnV-.js} +86 -62
- package/dist/{FieldError-DHrSdE_Q.js → FieldError-B8BgFmIQ.js} +2 -2
- package/dist/{FocusScope-BEPI2m7u.js → FocusScope-BnwM-e8R.js} +24 -22
- package/dist/{Form-Bnyyv3Im.js → Form-BeMxJA29.js} +13 -3
- package/dist/{Input-DfSBLhDx.js → Group-C4cXobNT.js} +56 -11
- package/dist/{Heading-ba38ScjJ.js → Heading-bh1HU5HH.js} +1 -1
- package/dist/{Label-JS_ob-kh.js → Label-DWVaNd2E.js} +1 -1
- package/dist/{List-BLeHBkfx.js → List-CwJTORxj.js} +1 -1
- package/dist/{ListBox-BY3gwI8c.js → ListBox-BeC97FZ4.js} +62 -38
- package/dist/{OverlayArrow-BUfV-5P3.js → OverlayArrow-EZ0v_ljk.js} +6 -6
- package/dist/{Select-BebwUgKB.js → Select-DEQf8ZWI.js} +96 -58
- package/dist/{Select-aab027f3.esm-BKIJGje-.js → Select-ef7c0426.esm-D6WOCaYm.js} +11 -6
- package/dist/{Separator-CTQWg_HO.js → Separator-Fl7qSeN-.js} +37 -20
- package/dist/{Slider-uOPcIpqS.js → Slider-BQFSEhvk.js} +28 -21
- package/dist/{Text-BuJgePCv.js → Text-AxKZjtFm.js} +1 -1
- package/dist/{TextField-o2U-uBWv.js → TextField-x_eEa_qR.js} +20 -10
- package/dist/{VisuallyHidden-BYi0pekx.js → VisuallyHidden-D9s7FTtC.js} +2 -2
- package/dist/assets/style-admin.css +227 -3
- package/dist/assets/style-editor.css +227 -3
- package/dist/assets/style.css +227 -3
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/button/button.js +11 -10
- package/dist/components/checkbox/checkbox.js +17 -12
- package/dist/components/color-pickers/color-picker.js +1 -1
- package/dist/components/color-pickers/color-swatch.js +3 -3
- package/dist/components/color-pickers/gradient-editor.js +3 -2
- package/dist/components/color-pickers/solid-color-picker.js +85 -49
- package/dist/components/component-toggle/component-toggle.js +2 -1
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +191 -170
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +18 -18
- package/dist/components/index.js +5 -1
- package/dist/components/input-field/input-field.js +3 -3
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +45 -34
- package/dist/components/matrix-align/matrix-align.js +1 -1
- package/dist/components/menu/menu.js +3 -3
- package/dist/components/modal/modal.js +39 -13
- package/dist/components/number-picker/number-picker.js +15 -13
- package/dist/components/option-select/option-select.js +1 -1
- package/dist/components/options-panel/options-panel.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +2 -2
- package/dist/components/radio/radio.js +45 -22
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.js +2 -2
- package/dist/components/responsive/mini-responsive.js +3 -2
- package/dist/components/responsive/responsive-legacy.js +2 -1
- package/dist/components/responsive/responsive.js +2 -1
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/select/async-multi-select.js +3 -3
- package/dist/components/select/async-single-select.js +2 -2
- package/dist/components/select/custom-select-default-components.js +1 -1
- package/dist/components/select/multi-select-components.js +1 -1
- package/dist/components/select/multi-select.js +3 -3
- package/dist/components/select/react-select-component-wrappers.js +1 -1
- package/dist/components/select/shared.js +19 -1
- package/dist/components/select/single-select.js +2 -2
- package/dist/components/select/v2/async-multi-select.js +432 -0
- package/dist/components/select/v2/async-select.js +25 -14
- package/dist/components/select/v2/multi-select.js +403 -0
- package/dist/components/select/v2/shared.js +44 -8
- package/dist/components/select/v2/single-select.js +10 -10
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/slider/utils.js +2 -1
- package/dist/components/tabs/tabs.js +33 -23
- package/dist/components/toggle/switch.js +11 -8
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +14 -8
- package/dist/components/tooltip/tooltip.js +9 -7
- package/dist/{context-BbYZoHvX.js → context-DMOmz986.js} +1 -1
- package/dist/{default-i18n-OFa3zAyB.js → default-i18n-DY6EfUSA.js} +21 -284
- package/dist/filterDOMProps-D2C6R0DK.js +71 -0
- package/dist/icons/icons.js +1 -1
- package/dist/{index-641ee5b8.esm-BPU8rMZr.js → index-641ee5b8.esm-Bu-mgopl.js} +1 -1
- package/dist/{index-CFozsmNS.js → index-CBHA_HDD.js} +3 -1
- package/dist/{index-BljRBEr_.js → index-Dq3gT5pW.js} +1 -1
- package/dist/index.js +4 -0
- package/dist/{multi-select-components-BcKzA24f.js → multi-select-components-rCCyCaKO.js} +1 -1
- package/dist/{number-CHmNj-oR.js → number-7sOvrqo0.js} +7 -2
- package/dist/{react-select-async.esm-D937XTWW.js → react-select-async.esm-XYrsKYb2.js} +3 -3
- package/dist/{react-select.esm-Ciai3aKf.js → react-select.esm-CCSPY6XR.js} +3 -3
- package/dist/sprintf-DmNrJSYG.js +51 -0
- package/dist/{textSelection-8DpK8fJl.js → textSelection-D5tWX1rJ.js} +1 -1
- package/dist/{useAsyncList-fLtZMvJO.js → useAsyncList-ZqaIH2gh.js} +1 -1
- package/dist/{useButton-lRcWnvOB.js → useButton-BtJSiQi3.js} +13 -5
- package/dist/useDragAndDrop-CddFteYC.js +3917 -0
- package/dist/{useEvent-ICdlokG-.js → useEvent-BifIGnVS.js} +1 -1
- package/dist/{useFilter-BR5z1A4Q.js → useFilter-Cl2ggwwq.js} +1 -1
- package/dist/{useFocusRing-Bv0UJQl8.js → useFocusRing-D5BfOWag.js} +3 -3
- package/dist/{useFormReset-D2YaWRIA.js → useFormReset-yV9VVy9R.js} +3 -4
- package/dist/{useHover-C2SkI1Fn.js → useHover-44IApaa2.js} +67 -34
- package/dist/{useLabel-BPCd5c7-.js → useLabel-C8umX0gk.js} +2 -2
- package/dist/{useLabels-B7-lUnAF.js → useLabels-Cdxi6JSa.js} +1 -1
- package/dist/{useListState-BrZ2XvDS.js → useListState-BSkHuB7-.js} +1 -1
- package/dist/{useLocalizedStringFormatter-C9GO0IDB.js → useLocalizedStringFormatter-eaZiN2tE.js} +1 -1
- package/dist/{useNumberField-y0dLc_6m.js → useNumberField-JhWPy1JY.js} +23 -16
- package/dist/{useNumberFormatter-CZ9QUnRt.js → useNumberFormatter-BCmkV-7c.js} +1 -1
- package/dist/{usePress-DWBuejBp.js → usePress-BnrkvZ7e.js} +20 -5
- package/dist/{useSingleSelectListState-Bh46cRXs.js → useSingleSelectListState-CzJFsSHr.js} +2 -2
- package/dist/{useToggle-yGuUBU7q.js → useToggle-OaIBlwRu.js} +21 -8
- package/dist/{useToggleState-ibcBUHnB.js → useToggleState-BF8hvidm.js} +5 -1
- package/dist/{utils-CZt7LCbO.js → utils-cvK1vxO7.js} +9 -7
- package/package.json +18 -18
- package/dist/Group-LBogWgyp.js +0 -48
- package/dist/_commonjsHelpers-CUmg6egw.js +0 -6
- package/dist/filterDOMProps-EDDcM64A.js +0 -28
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-
|
|
3
|
-
import { $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./number-
|
|
1
|
+
import { b as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-cvK1vxO7.js";
|
|
2
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DWVaNd2E.js";
|
|
3
|
+
import { $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./number-7sOvrqo0.js";
|
|
4
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
|
|
4
5
|
import React__default, { forwardRef, createContext, useRef, useEffect } from "react";
|
|
5
|
-
import { $ as $
|
|
6
|
-
import { $ as $
|
|
7
|
-
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-CZ9QUnRt.js";
|
|
6
|
+
import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-C8umX0gk.js";
|
|
7
|
+
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-BCmkV-7c.js";
|
|
8
8
|
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "./Hidden-rE6uR-lr.js";
|
|
9
|
-
import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "./useButton-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "./useButton-BtJSiQi3.js";
|
|
10
|
+
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-D5BfOWag.js";
|
|
11
|
+
import { e as $6179b936705e76d3$export$ae780daf29e6d456 } from "./useHover-44IApaa2.js";
|
|
12
12
|
const $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY = 7e3;
|
|
13
13
|
let $319e236875307eab$var$liveAnnouncer = null;
|
|
14
14
|
function $319e236875307eab$export$a9b970dcc4ae71a9(message, assertiveness = "assertive", timeout = $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY) {
|
|
@@ -138,9 +138,11 @@ const $0393f8ab869a0f1a$export$c17561cb55d4db30 = /* @__PURE__ */ forwardRef(fun
|
|
|
138
138
|
isIndeterminate
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
142
|
+
global: true
|
|
143
|
+
});
|
|
141
144
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
142
|
-
|
|
143
|
-
...renderProps,
|
|
145
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, progressBarProps),
|
|
144
146
|
ref,
|
|
145
147
|
slot: props.slot || void 0
|
|
146
148
|
}, /* @__PURE__ */ React__default.createElement($01b77f81d0f07f68$export$75b6ee27786ba447.Provider, {
|
|
@@ -151,16 +153,6 @@ const $0393f8ab869a0f1a$export$c17561cb55d4db30 = /* @__PURE__ */ forwardRef(fun
|
|
|
151
153
|
}
|
|
152
154
|
}, renderProps.children));
|
|
153
155
|
});
|
|
154
|
-
const $d2b4bc8c273e7be6$var$additionalButtonHTMLAttributes = /* @__PURE__ */ new Set([
|
|
155
|
-
"form",
|
|
156
|
-
"formAction",
|
|
157
|
-
"formEncType",
|
|
158
|
-
"formMethod",
|
|
159
|
-
"formNoValidate",
|
|
160
|
-
"formTarget",
|
|
161
|
-
"name",
|
|
162
|
-
"value"
|
|
163
|
-
]);
|
|
164
156
|
const $d2b4bc8c273e7be6$export$24d547caef80ccd1 = /* @__PURE__ */ createContext({});
|
|
165
157
|
const $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /* @__PURE__ */ $f39a9eba43920ace$export$86427a43e3e48ebb(function Button(props, ref) {
|
|
166
158
|
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $d2b4bc8c273e7be6$export$24d547caef80ccd1);
|
|
@@ -207,12 +199,14 @@ const $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /* @__PURE__ */ $f39a9eba43920
|
|
|
207
199
|
ariaLabelledby,
|
|
208
200
|
buttonId
|
|
209
201
|
]);
|
|
202
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
203
|
+
global: true
|
|
204
|
+
});
|
|
205
|
+
delete DOMProps.onClick;
|
|
210
206
|
return /* @__PURE__ */ React__default.createElement("button", {
|
|
211
|
-
...$
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
...$3ef42575df84b30b$export$9d1611c77c2fe928(buttonProps, focusProps, hoverProps),
|
|
215
|
-
...renderProps,
|
|
207
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, buttonProps, focusProps, hoverProps),
|
|
208
|
+
// When the button is in a pending state, we want to stop implicit form submission (ie. when the user presses enter on a text input).
|
|
209
|
+
// We do this by changing the button's type to button.
|
|
216
210
|
type: buttonProps.type === "submit" && isPending ? "button" : buttonProps.type,
|
|
217
211
|
id: buttonId,
|
|
218
212
|
ref,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a as $f39a9eba43920ace$export$8dc98ba7eadeaa56 } from "./Hidden-rE6uR-lr.js";
|
|
2
|
-
import { r as reactDomExports } from "./index-
|
|
3
|
-
import { B as $c87311424ea30a05$export$9ac100e40613ea10,
|
|
2
|
+
import { r as reactDomExports } from "./index-CBHA_HDD.js";
|
|
3
|
+
import { B as $c87311424ea30a05$export$9ac100e40613ea10, f as $03deb23ff14920c4$export$4eaf04e54aa8eed6, c as $431fbd86ca7dc216$export$b204af158042fbac, z as $7215afc6de606d6b$export$de79e2c695e052f3, J as $f645667febf57a63$export$f9762fab77588ecb, h as $d4ee10de306f2510$export$cd4e5573fbe2b576, K as $c87311424ea30a05$export$e1865c3bedcd822b, s as $3ad3f6e1647bc98d$export$80f3e147d781571c, v as $507fabe10e71c6fb$export$630ff653c5ada6a9, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-44IApaa2.js";
|
|
4
4
|
import React__default, { useRef, useState, useMemo, cloneElement, forwardRef, useContext, createContext, useCallback, useEffect, isValidElement } from "react";
|
|
5
|
-
import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c,
|
|
6
|
-
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21, b as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, c as $ea8dcbcb9ea1b556$export$95185d699e05d4d7 } from "./usePress-
|
|
7
|
-
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-
|
|
8
|
-
import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "./FocusScope-
|
|
9
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
5
|
+
import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, b as $3ef42575df84b30b$export$9d1611c77c2fe928, n as $b5e257d569688ac6$export$535bd6ca7f90a273, d as $bdb11010cef70236$export$f680877a34711e37, e as $8ae05eaa5c114e9c$export$7f54fc3180508a52, p as $ff5963eb1fccf552$export$e08e3b67e392101e } from "./utils-cvK1vxO7.js";
|
|
6
|
+
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21, b as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, c as $ea8dcbcb9ea1b556$export$95185d699e05d4d7 } from "./usePress-BnrkvZ7e.js";
|
|
7
|
+
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-BifIGnVS.js";
|
|
8
|
+
import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "./FocusScope-BnwM-e8R.js";
|
|
9
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DMOmz986.js";
|
|
10
10
|
function $ca9b37712f007381$export$72ef708ab07251f1(effect, dependencies) {
|
|
11
11
|
const isInitialMount = useRef(true);
|
|
12
12
|
const lastDeps = useRef(null);
|
|
@@ -188,7 +188,7 @@ class $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
|
|
|
188
188
|
}
|
|
189
189
|
class $23b9f4fcf0fe224b$export$408d25a4e12db025 {
|
|
190
190
|
get size() {
|
|
191
|
-
return this.
|
|
191
|
+
return this.itemCount;
|
|
192
192
|
}
|
|
193
193
|
getKeys() {
|
|
194
194
|
return this.keyMap.keys();
|
|
@@ -257,14 +257,18 @@ class $23b9f4fcf0fe224b$export$408d25a4e12db025 {
|
|
|
257
257
|
collection.keyMap = new Map(this.keyMap);
|
|
258
258
|
collection.firstKey = this.firstKey;
|
|
259
259
|
collection.lastKey = this.lastKey;
|
|
260
|
+
collection.itemCount = this.itemCount;
|
|
260
261
|
return collection;
|
|
261
262
|
}
|
|
262
263
|
addNode(node) {
|
|
263
264
|
if (this.frozen) throw new Error("Cannot add a node to a frozen collection");
|
|
265
|
+
if (node.type === "item" && this.keyMap.get(node.key) == null) this.itemCount++;
|
|
264
266
|
this.keyMap.set(node.key, node);
|
|
265
267
|
}
|
|
266
268
|
removeNode(key) {
|
|
267
269
|
if (this.frozen) throw new Error("Cannot remove a node to a frozen collection");
|
|
270
|
+
let node = this.keyMap.get(key);
|
|
271
|
+
if (node != null && node.type === "item") this.itemCount--;
|
|
268
272
|
this.keyMap.delete(key);
|
|
269
273
|
}
|
|
270
274
|
commit(firstKey, lastKey, isSSR = false) {
|
|
@@ -352,6 +356,7 @@ class $23b9f4fcf0fe224b$export$408d25a4e12db025 {
|
|
|
352
356
|
this.firstKey = null;
|
|
353
357
|
this.lastKey = null;
|
|
354
358
|
this.frozen = false;
|
|
359
|
+
this.itemCount = 0;
|
|
355
360
|
}
|
|
356
361
|
}
|
|
357
362
|
function $23b9f4fcf0fe224b$var$shouldKeepNode(node, filterFn, oldCollection, newCollection) {
|
|
@@ -1146,7 +1151,7 @@ function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
|
|
|
1146
1151
|
}).current;
|
|
1147
1152
|
let onKeyDown = (e) => {
|
|
1148
1153
|
let character = $fb3050f43d946246$var$getStringForKey(e.key);
|
|
1149
|
-
if (!character || e.ctrlKey || e.metaKey || !e.currentTarget.contains(e.target)) return;
|
|
1154
|
+
if (!character || e.ctrlKey || e.metaKey || !e.currentTarget.contains(e.target) || state.search.length === 0 && character === " ") return;
|
|
1150
1155
|
if (character === " " && state.search.trim().length > 0) {
|
|
1151
1156
|
e.preventDefault();
|
|
1152
1157
|
if (!("continuePropagation" in e)) e.stopPropagation();
|
|
@@ -1382,7 +1387,9 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
1382
1387
|
var _delegate_getFirstKey1;
|
|
1383
1388
|
let keyToFocus = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== void 0 ? _delegate_getFirstKey1 : null;
|
|
1384
1389
|
if (keyToFocus == null) {
|
|
1390
|
+
let previousActiveElement = $d4ee10de306f2510$export$cd4e5573fbe2b576();
|
|
1385
1391
|
$55f9b1ae81f22853$export$76e4e37e5339496d(ref.current);
|
|
1392
|
+
$55f9b1ae81f22853$export$2b35b76d2e30e129(previousActiveElement, null);
|
|
1386
1393
|
if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
|
|
1387
1394
|
} else {
|
|
1388
1395
|
manager.setFocusedKey(keyToFocus);
|
|
@@ -1556,12 +1563,10 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
1556
1563
|
let longPressEnabled = hasAction && allowsSelection;
|
|
1557
1564
|
let longPressEnabledOnPressStart = useRef(false);
|
|
1558
1565
|
let hadPrimaryActionOnPressStart = useRef(false);
|
|
1566
|
+
let collectionItemProps = manager.getItemProps(key);
|
|
1559
1567
|
let performAction = (e) => {
|
|
1560
1568
|
if (onAction) onAction();
|
|
1561
|
-
if (hasLinkAction && ref.current)
|
|
1562
|
-
let itemProps2 = manager.getItemProps(key);
|
|
1563
|
-
router.open(ref.current, e, itemProps2.href, itemProps2.routerOptions);
|
|
1564
|
-
}
|
|
1569
|
+
if (hasLinkAction && ref.current) router.open(ref.current, e, collectionItemProps.href, collectionItemProps.routerOptions);
|
|
1565
1570
|
};
|
|
1566
1571
|
let itemPressProps = {
|
|
1567
1572
|
ref
|
|
@@ -1617,6 +1622,16 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
1617
1622
|
}
|
|
1618
1623
|
}
|
|
1619
1624
|
});
|
|
1625
|
+
if (collectionItemProps) {
|
|
1626
|
+
for (let key2 of [
|
|
1627
|
+
"onPressStart",
|
|
1628
|
+
"onPressEnd",
|
|
1629
|
+
"onPressChange",
|
|
1630
|
+
"onPress",
|
|
1631
|
+
"onPressUp",
|
|
1632
|
+
"onClick"
|
|
1633
|
+
]) if (collectionItemProps[key2]) itemPressProps[key2] = $ff5963eb1fccf552$export$e08e3b67e392101e(itemPressProps[key2], collectionItemProps[key2]);
|
|
1634
|
+
}
|
|
1620
1635
|
let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21(itemPressProps);
|
|
1621
1636
|
let onDoubleClick = hasSecondaryAction ? (e) => {
|
|
1622
1637
|
if (modality.current === "mouse") {
|
|
@@ -1637,7 +1652,7 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
1637
1652
|
let onDragStartCapture = (e) => {
|
|
1638
1653
|
if (modality.current === "touch" && longPressEnabledOnPressStart.current) e.preventDefault();
|
|
1639
1654
|
};
|
|
1640
|
-
let onClick = manager.isLink(key) ? (e) => {
|
|
1655
|
+
let onClick = linkBehavior !== "none" && manager.isLink(key) ? (e) => {
|
|
1641
1656
|
if (!$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening) e.preventDefault();
|
|
1642
1657
|
} : void 0;
|
|
1643
1658
|
return {
|
|
@@ -2391,13 +2406,15 @@ export {
|
|
|
2391
2406
|
$fb3050f43d946246$export$e32c88dfddc6e1d8 as l,
|
|
2392
2407
|
$c5a24bc478652b5f$export$1005530eda016c13 as m,
|
|
2393
2408
|
$55f9b1ae81f22853$export$2b35b76d2e30e129 as n,
|
|
2394
|
-
$
|
|
2395
|
-
$
|
|
2396
|
-
$
|
|
2397
|
-
$
|
|
2398
|
-
$
|
|
2399
|
-
$
|
|
2400
|
-
$
|
|
2401
|
-
$
|
|
2402
|
-
$
|
|
2409
|
+
$ef06256079686ba0$export$f8aeda7b10753fa1 as o,
|
|
2410
|
+
$cc38e7bd3fc7b213$export$2bb74740c4e19def as p,
|
|
2411
|
+
$feb5ffebff200149$export$c3d8340acf92597f as q,
|
|
2412
|
+
$5671b20cf9b562b2$export$831c820ad60f9d12 as r,
|
|
2413
|
+
$55f9b1ae81f22853$export$76e4e37e5339496d as s,
|
|
2414
|
+
$5671b20cf9b562b2$export$447a38995de2c711 as t,
|
|
2415
|
+
$55f9b1ae81f22853$export$6c5dc7e81d2cc29a as u,
|
|
2416
|
+
$21f1aa98acb08317$export$16792effe837dba3 as v,
|
|
2417
|
+
$55f9b1ae81f22853$export$759df0d867455a91 as w,
|
|
2418
|
+
$8a26561d2877236e$export$c24ed0104d07eab9 as x,
|
|
2419
|
+
$e1995378a142960e$export$e953bb1cd0f19726 as y
|
|
2403
2420
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4, b as $9446cca9a3875146$export$b6268554fba451f } from "./number-
|
|
2
|
-
import { a as $5b160d28a433310d$export$c17fa47878dc55b6, b as $6db58dc88e78b024$export$2f817fcdc4b89ae0 } from "./useLocalizedStringFormatter-
|
|
1
|
+
import { $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4, b as $9446cca9a3875146$export$b6268554fba451f } from "./number-7sOvrqo0.js";
|
|
2
|
+
import { a as $5b160d28a433310d$export$c17fa47878dc55b6, b as $6db58dc88e78b024$export$2f817fcdc4b89ae0 } from "./useLocalizedStringFormatter-eaZiN2tE.js";
|
|
3
3
|
import { $ as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 } from "./NumberFormatter-DA8u1Ot7.js";
|
|
4
4
|
var $eccab2b0118aef08$exports = {};
|
|
5
5
|
$eccab2b0118aef08$exports = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as $bdb11010cef70236$export$f680877a34711e37, a as $64fa3d84918910a7$export$29f1550f4b0d4415, h as $64fa3d84918910a7$export$4d86445c2cf5e3, b as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-cvK1vxO7.js";
|
|
2
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
|
|
2
3
|
import React__default, { useMemo, forwardRef, createContext } from "react";
|
|
3
|
-
import { $ as $799cddbef784668f$export$6e865ea70d7724f, a as $3493a52097159720$exports } from "./Color-
|
|
4
|
-
import { $ as $
|
|
5
|
-
import { $ as $
|
|
6
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-C9GO0IDB.js";
|
|
4
|
+
import { $ as $799cddbef784668f$export$6e865ea70d7724f, a as $3493a52097159720$exports } from "./Color-WxFE7lQB.js";
|
|
5
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DMOmz986.js";
|
|
6
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-eaZiN2tE.js";
|
|
7
7
|
function $parcel$interopDefault(a) {
|
|
8
8
|
return a && a.__esModule ? a.default : a;
|
|
9
9
|
}
|
|
@@ -52,9 +52,11 @@ const $251c695a52d94a8d$export$cae13e90592f246a = /* @__PURE__ */ forwardRef(fun
|
|
|
52
52
|
color
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
56
|
+
global: true
|
|
57
|
+
});
|
|
55
58
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
56
|
-
|
|
57
|
-
...renderProps,
|
|
59
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, colorSwatchProps, renderProps),
|
|
58
60
|
slot: props.slot || void 0,
|
|
59
61
|
ref
|
|
60
62
|
});
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-
|
|
2
|
-
import { l as $df56164dff5785e2$export$4338b53315abf666,
|
|
1
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-RTwMSBs-.js";
|
|
2
|
+
import { l as $df56164dff5785e2$export$4338b53315abf666, b as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $8ae05eaa5c114e9c$export$7f54fc3180508a52, d as $bdb11010cef70236$export$f680877a34711e37, k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, p as $ff5963eb1fccf552$export$e08e3b67e392101e, n as $b5e257d569688ac6$export$535bd6ca7f90a273, j as $bdb11010cef70236$export$b4cc09c592e8fdb8, a as $64fa3d84918910a7$export$29f1550f4b0d4415, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, o as $64fa3d84918910a7$export$c62b8e45d58ddad9, m as $5dc95899b306f630$export$c9058316764c140e, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 } from "./utils-cvK1vxO7.js";
|
|
3
3
|
import { $ as $4e85f108e88277b8$export$d688439359537581 } from "./RSPContexts-2lR5GG9p.js";
|
|
4
|
-
import { g as $dd149f63282afbbf$export$f6211563215e3b37, c as $2a41e45df1593e64$export$d39e1813b3bdd0e1, f as $9daab02d461809db$export$683480f191c0e3ea, $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $d3f049242431219c$export$45fda7c47f93fd48, b as $d3f049242431219c$export$6d3443f2c48bfc20, d as $44f671af83e7d9e0$export$2de4954e8ae13b9f } from "./OverlayArrow-
|
|
5
|
-
import {
|
|
6
|
-
import { e as $62d8ded9296f3872$export$cfa2225e87938781, f as $982254629710d113$export$b95089534ab7c1fd, g as $453cc9f0df89c0a5$export$77d5aafae4e095b2, h as $d2f53cda644affe3$export$65d2a03b8800d6e3, j as $431f98aba6844401$export$6615d83f6de245ce, k as $72a5793c14baf454$export$e0e4026c12a8bdbb } from "./Separator-
|
|
4
|
+
import { g as $dd149f63282afbbf$export$f6211563215e3b37, c as $2a41e45df1593e64$export$d39e1813b3bdd0e1, f as $9daab02d461809db$export$683480f191c0e3ea, $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $d3f049242431219c$export$45fda7c47f93fd48, b as $d3f049242431219c$export$6d3443f2c48bfc20, d as $44f671af83e7d9e0$export$2de4954e8ae13b9f } from "./OverlayArrow-EZ0v_ljk.js";
|
|
5
|
+
import { x as $8a26561d2877236e$export$c24ed0104d07eab9, c as $880e95eb8b93ba9a$export$ecf600387e221c37, $ as $7af3f5b51489e0b5$export$253fe78d46329472, a as $7613b1592d41b092$export$6cd28814d92fa9c9, b as $d496c0a20b6e58ec$export$6c8a5aaad13c9852, d as $e1995378a142960e$export$18af5c7a9e9b3664, y as $e1995378a142960e$export$e953bb1cd0f19726, e as $e1995378a142960e$export$bf788dd355e3a401, f as $e1995378a142960e$export$fb8073518f34e6ec, g as $7135fc7d473fd974$export$4feb769f8ddf26c5, h as $7135fc7d473fd974$export$d40e14dec8b060a8, k as $7135fc7d473fd974$export$90e00781bc59d8f9 } from "./Collection-D_KhdLDC.js";
|
|
6
|
+
import { e as $62d8ded9296f3872$export$cfa2225e87938781, f as $982254629710d113$export$b95089534ab7c1fd, g as $453cc9f0df89c0a5$export$77d5aafae4e095b2, h as $d2f53cda644affe3$export$65d2a03b8800d6e3, j as $431f98aba6844401$export$6615d83f6de245ce, k as $72a5793c14baf454$export$e0e4026c12a8bdbb } from "./Separator-Fl7qSeN-.js";
|
|
7
7
|
import React__default, { useRef, useContext, useEffect, useMemo, useState, useCallback, forwardRef, createContext } from "react";
|
|
8
|
-
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-
|
|
9
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-
|
|
10
|
-
import { d as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, b as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, $ as $f6c31cce2adf654f$export$45712eceda6fad21, a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "./usePress-
|
|
11
|
-
import { I as $e7801be82b4b2a53$export$4debdb1a3f0fa79e,
|
|
12
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
13
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
14
|
-
import { c as $9bf71ea28793e738$export$1258395f99bf9cbf, b as $9bf71ea28793e738$export$20e40289641fbbb6 } from "./FocusScope-
|
|
8
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-AxKZjtFm.js";
|
|
9
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
|
|
10
|
+
import { d as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, b as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, $ as $f6c31cce2adf654f$export$45712eceda6fad21, a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18, e as $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f } from "./usePress-BnrkvZ7e.js";
|
|
11
|
+
import { I as $e7801be82b4b2a53$export$4debdb1a3f0fa79e, c as $431fbd86ca7dc216$export$b204af158042fbac, b as $c87311424ea30a05$export$fedb369cb70207f1, w as $431fbd86ca7dc216$export$f21a1ffae260145a, z as $7215afc6de606d6b$export$de79e2c695e052f3, e as $6179b936705e76d3$export$ae780daf29e6d456, m as $507fabe10e71c6fb$export$b9b3dfddab17db27, A as $46d819fcbaf35654$export$8f71654801c2f7cd, o as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, L as $507fabe10e71c6fb$export$98e20ec92f614cfe, s as $3ad3f6e1647bc98d$export$80f3e147d781571c, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-44IApaa2.js";
|
|
12
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-eaZiN2tE.js";
|
|
13
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DMOmz986.js";
|
|
14
|
+
import { c as $9bf71ea28793e738$export$1258395f99bf9cbf, b as $9bf71ea28793e738$export$20e40289641fbbb6 } from "./FocusScope-BnwM-e8R.js";
|
|
15
15
|
import { a as $96b38030c423d352$export$9fc1347d4195ccb3 } from "./PortalProvider---wyKpMr.js";
|
|
16
|
-
import { $ as $dbSRa$reactdom } from "./index-
|
|
16
|
+
import { $ as $dbSRa$reactdom } from "./index-CBHA_HDD.js";
|
|
17
17
|
import { b as $f39a9eba43920ace$export$b5d7cc18bb8d2b59 } from "./Hidden-rE6uR-lr.js";
|
|
18
|
-
import {
|
|
19
|
-
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-
|
|
20
|
-
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-
|
|
18
|
+
import { $ as $9ab94262bd0047c7$export$420e68273165f4ec } from "./useFocusRing-D5BfOWag.js";
|
|
19
|
+
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-Cdxi6JSa.js";
|
|
20
|
+
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-D9s7FTtC.js";
|
|
21
21
|
const $f1ab8c75478c6f73$export$3351871ee4b288b8 = /* @__PURE__ */ React__default.forwardRef(({ children, ...props }, ref) => {
|
|
22
22
|
let isRegistered = useRef(false);
|
|
23
23
|
let prevContext = useContext($ae1eeba8b9eafd08$export$5165eccb35aaadb5);
|
|
@@ -534,15 +534,31 @@ function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
|
|
|
534
534
|
}
|
|
535
535
|
}));
|
|
536
536
|
}
|
|
537
|
+
const $5e3802645cc19319$var$supportsInert = typeof HTMLElement !== "undefined" && "inert" in HTMLElement.prototype;
|
|
537
538
|
let $5e3802645cc19319$var$refCountMap = /* @__PURE__ */ new WeakMap();
|
|
538
539
|
let $5e3802645cc19319$var$observerStack = [];
|
|
539
|
-
function $5e3802645cc19319$export$1c3ebcada18427bf(targets,
|
|
540
|
+
function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
|
|
541
|
+
let windowObj = $431fbd86ca7dc216$export$f21a1ffae260145a(targets === null || targets === void 0 ? void 0 : targets[0]);
|
|
542
|
+
let opts = options instanceof windowObj.Element ? {
|
|
543
|
+
root: options
|
|
544
|
+
} : options;
|
|
545
|
+
var _opts_root;
|
|
546
|
+
let root = (_opts_root = opts === null || opts === void 0 ? void 0 : opts.root) !== null && _opts_root !== void 0 ? _opts_root : document.body;
|
|
547
|
+
let shouldUseInert = (opts === null || opts === void 0 ? void 0 : opts.shouldUseInert) && $5e3802645cc19319$var$supportsInert;
|
|
540
548
|
let visibleNodes = new Set(targets);
|
|
541
549
|
let hiddenNodes = /* @__PURE__ */ new Set();
|
|
550
|
+
let getHidden = (element) => {
|
|
551
|
+
return shouldUseInert && element instanceof windowObj.HTMLElement ? element.inert : element.getAttribute("aria-hidden") === "true";
|
|
552
|
+
};
|
|
553
|
+
let setHidden = (element, hidden) => {
|
|
554
|
+
if (shouldUseInert && element instanceof windowObj.HTMLElement) element.inert = hidden;
|
|
555
|
+
else if (hidden) element.setAttribute("aria-hidden", "true");
|
|
556
|
+
else element.removeAttribute("aria-hidden");
|
|
557
|
+
};
|
|
542
558
|
let walk = (root2) => {
|
|
543
559
|
for (let element of root2.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) visibleNodes.add(element);
|
|
544
560
|
let acceptNode = (node) => {
|
|
545
|
-
if (visibleNodes.has(node) || node.parentElement && hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
|
|
561
|
+
if (hiddenNodes.has(node) || visibleNodes.has(node) || node.parentElement && hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
|
|
546
562
|
for (let target of visibleNodes) {
|
|
547
563
|
if (node.contains(target)) return NodeFilter.FILTER_SKIP;
|
|
548
564
|
}
|
|
@@ -564,8 +580,8 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
564
580
|
let hide = (node) => {
|
|
565
581
|
var _refCountMap_get;
|
|
566
582
|
let refCount = (_refCountMap_get = $5e3802645cc19319$var$refCountMap.get(node)) !== null && _refCountMap_get !== void 0 ? _refCountMap_get : 0;
|
|
567
|
-
if (node
|
|
568
|
-
if (refCount === 0) node
|
|
583
|
+
if (getHidden(node) && refCount === 0) return;
|
|
584
|
+
if (refCount === 0) setHidden(node, true);
|
|
569
585
|
hiddenNodes.add(node);
|
|
570
586
|
$5e3802645cc19319$var$refCountMap.set(node, refCount + 1);
|
|
571
587
|
};
|
|
@@ -573,19 +589,13 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
573
589
|
walk(root);
|
|
574
590
|
let observer = new MutationObserver((changes) => {
|
|
575
591
|
for (let change of changes) {
|
|
576
|
-
if (change.type !== "childList"
|
|
592
|
+
if (change.type !== "childList") continue;
|
|
577
593
|
if (![
|
|
578
594
|
...visibleNodes,
|
|
579
595
|
...hiddenNodes
|
|
580
|
-
].some((node) => node.contains(change.target))) {
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
hiddenNodes.delete(node);
|
|
584
|
-
}
|
|
585
|
-
for (let node of change.addedNodes) {
|
|
586
|
-
if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === "true" || node.dataset.reactAriaTopLayer === "true")) visibleNodes.add(node);
|
|
587
|
-
else if (node instanceof Element) walk(node);
|
|
588
|
-
}
|
|
596
|
+
].some((node) => node.contains(change.target))) for (let node of change.addedNodes) {
|
|
597
|
+
if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === "true" || node.dataset.reactAriaTopLayer === "true")) visibleNodes.add(node);
|
|
598
|
+
else if (node instanceof Element) walk(node);
|
|
589
599
|
}
|
|
590
600
|
}
|
|
591
601
|
});
|
|
@@ -613,7 +623,7 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
613
623
|
let count = $5e3802645cc19319$var$refCountMap.get(node);
|
|
614
624
|
if (count == null) continue;
|
|
615
625
|
if (count === 1) {
|
|
616
|
-
node
|
|
626
|
+
setHidden(node, false);
|
|
617
627
|
$5e3802645cc19319$var$refCountMap.delete(node);
|
|
618
628
|
} else $5e3802645cc19319$var$refCountMap.set(node, count - 1);
|
|
619
629
|
}
|
|
@@ -653,13 +663,15 @@ function $f2f8a6077418541e$export$542a6fd13ac93354(props, state) {
|
|
|
653
663
|
$49c51c25361d4cd2$export$ee0f7cc6afcd1c18({
|
|
654
664
|
isDisabled: isNonModal || !state.isOpen
|
|
655
665
|
});
|
|
656
|
-
|
|
666
|
+
useEffect(() => {
|
|
657
667
|
if (state.isOpen && popoverRef.current) {
|
|
658
668
|
var _groupRef_current, _groupRef_current1;
|
|
659
669
|
if (isNonModal) return $5e3802645cc19319$export$1020fa7f77e17884((_groupRef_current = groupRef === null || groupRef === void 0 ? void 0 : groupRef.current) !== null && _groupRef_current !== void 0 ? _groupRef_current : popoverRef.current);
|
|
660
670
|
else return $5e3802645cc19319$export$1c3ebcada18427bf([
|
|
661
671
|
(_groupRef_current1 = groupRef === null || groupRef === void 0 ? void 0 : groupRef.current) !== null && _groupRef_current1 !== void 0 ? _groupRef_current1 : popoverRef.current
|
|
662
|
-
]
|
|
672
|
+
], {
|
|
673
|
+
shouldUseInert: true
|
|
674
|
+
});
|
|
663
675
|
}
|
|
664
676
|
}, [
|
|
665
677
|
isNonModal,
|
|
@@ -896,7 +908,7 @@ function $168583247155ddda$export$dc9c12ed27dd1b49(props, state, ref) {
|
|
|
896
908
|
if (ref && ref.current) switch (e.key) {
|
|
897
909
|
case "Enter":
|
|
898
910
|
case " ":
|
|
899
|
-
if (trigger === "longPress") return;
|
|
911
|
+
if (trigger === "longPress" || e.isDefaultPrevented()) return;
|
|
900
912
|
// fallthrough
|
|
901
913
|
case "ArrowDown":
|
|
902
914
|
if (!("continuePropagation" in e)) e.stopPropagation();
|
|
@@ -991,7 +1003,7 @@ function $d5336fe17ce95402$export$38eaa17faae8f579(props, state, ref) {
|
|
|
991
1003
|
};
|
|
992
1004
|
}
|
|
993
1005
|
function $a2e5df62f93c7633$export$9d32628fc2aea7da(props, state, ref) {
|
|
994
|
-
let { id, key, closeOnSelect, isVirtualized, "aria-haspopup": hasPopup, onPressStart: pressStartProp, onPressUp: pressUpProp, onPress
|
|
1006
|
+
let { id, key, closeOnSelect, isVirtualized, "aria-haspopup": hasPopup, onPressStart: pressStartProp, onPressUp: pressUpProp, onPress, onPressChange: pressChangeProp, onPressEnd, onClick: onClickProp, onHoverStart: hoverStartProp, onHoverChange, onHoverEnd, onKeyDown, onKeyUp, onFocus, onFocusChange, onBlur, selectionManager = state.selectionManager } = props;
|
|
995
1007
|
let isTrigger = !!hasPopup;
|
|
996
1008
|
let isTriggerExpanded = isTrigger && props["aria-expanded"] === "true";
|
|
997
1009
|
var _props_isDisabled;
|
|
@@ -1002,7 +1014,7 @@ function $a2e5df62f93c7633$export$9d32628fc2aea7da(props, state, ref) {
|
|
|
1002
1014
|
let item = state.collection.getItem(key);
|
|
1003
1015
|
let onClose = props.onClose || data.onClose;
|
|
1004
1016
|
let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
|
|
1005
|
-
let performAction = (
|
|
1017
|
+
let performAction = () => {
|
|
1006
1018
|
var _item_props;
|
|
1007
1019
|
if (isTrigger) return;
|
|
1008
1020
|
if (item === null || item === void 0 ? void 0 : (_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.onAction) item.props.onAction();
|
|
@@ -1011,7 +1023,6 @@ function $a2e5df62f93c7633$export$9d32628fc2aea7da(props, state, ref) {
|
|
|
1011
1023
|
let onAction = data.onAction;
|
|
1012
1024
|
onAction(key);
|
|
1013
1025
|
}
|
|
1014
|
-
if (e.target instanceof HTMLAnchorElement && item) router.open(e.target, e, item.props.href, item.props.routerOptions);
|
|
1015
1026
|
};
|
|
1016
1027
|
let role = "menuitem";
|
|
1017
1028
|
if (!isTrigger) {
|
|
@@ -1041,25 +1052,25 @@ function $a2e5df62f93c7633$export$9d32628fc2aea7da(props, state, ref) {
|
|
|
1041
1052
|
ariaProps["aria-setsize"] = $453cc9f0df89c0a5$export$77d5aafae4e095b2(state.collection);
|
|
1042
1053
|
}
|
|
1043
1054
|
let onPressStart = (e) => {
|
|
1044
|
-
if (e.pointerType === "keyboard")
|
|
1055
|
+
if (e.pointerType === "keyboard" && !selectionManager.isLink(key)) e.target.click();
|
|
1045
1056
|
pressStartProp === null || pressStartProp === void 0 ? void 0 : pressStartProp(e);
|
|
1046
1057
|
};
|
|
1047
|
-
let
|
|
1048
|
-
|
|
1058
|
+
let isPressedRef = useRef(false);
|
|
1059
|
+
let onPressChange = (isPressed2) => {
|
|
1060
|
+
pressChangeProp === null || pressChangeProp === void 0 ? void 0 : pressChangeProp(isPressed2);
|
|
1061
|
+
isPressedRef.current = isPressed2;
|
|
1049
1062
|
};
|
|
1050
1063
|
let onPressUp = (e) => {
|
|
1051
1064
|
if (e.pointerType === "mouse") {
|
|
1052
|
-
|
|
1053
|
-
maybeClose();
|
|
1065
|
+
if (!isPressedRef.current) e.target.click();
|
|
1054
1066
|
}
|
|
1067
|
+
if (e.pointerType !== "keyboard" && !isTrigger && onClose && (closeOnSelect !== null && closeOnSelect !== void 0 ? closeOnSelect : selectionManager.selectionMode !== "multiple" || selectionManager.isLink(key))) onClose();
|
|
1055
1068
|
pressUpProp === null || pressUpProp === void 0 ? void 0 : pressUpProp(e);
|
|
1056
1069
|
};
|
|
1057
|
-
let
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
}
|
|
1062
|
-
pressProp === null || pressProp === void 0 ? void 0 : pressProp(e);
|
|
1070
|
+
let onClick = (e) => {
|
|
1071
|
+
onClickProp === null || onClickProp === void 0 ? void 0 : onClickProp(e);
|
|
1072
|
+
performAction();
|
|
1073
|
+
$ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f(e, router, item.props.href, item === null || item === void 0 ? void 0 : item.props.routerOptions);
|
|
1063
1074
|
};
|
|
1064
1075
|
let { itemProps, isFocused } = $880e95eb8b93ba9a$export$ecf600387e221c37({
|
|
1065
1076
|
id,
|
|
@@ -1142,7 +1153,10 @@ function $a2e5df62f93c7633$export$9d32628fc2aea7da(props, state, ref) {
|
|
|
1142
1153
|
// Prevent DOM focus from moving on mouse down when using virtual focus or this is a submenu/subdialog trigger.
|
|
1143
1154
|
data.shouldUseVirtualFocus || isTrigger ? {
|
|
1144
1155
|
onMouseDown: (e) => e.preventDefault()
|
|
1145
|
-
} : void 0
|
|
1156
|
+
} : void 0,
|
|
1157
|
+
isDisabled ? void 0 : {
|
|
1158
|
+
onClick
|
|
1159
|
+
}
|
|
1146
1160
|
),
|
|
1147
1161
|
// If a submenu is expanded, set the tabIndex to -1 so that shift tabbing goes out of the menu instead of the parent menu item.
|
|
1148
1162
|
tabIndex: itemProps.tabIndex != null && isTriggerExpanded && !data.shouldUseVirtualFocus ? -1 : itemProps.tabIndex
|
|
@@ -1453,7 +1467,7 @@ function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
|
1453
1467
|
if (ref.current && !ref.current.contains(document.activeElement)) {
|
|
1454
1468
|
$3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
|
|
1455
1469
|
let timeout = setTimeout(() => {
|
|
1456
|
-
if (document.activeElement === ref.current) {
|
|
1470
|
+
if (document.activeElement === ref.current || document.activeElement === document.body) {
|
|
1457
1471
|
isRefocusing.current = true;
|
|
1458
1472
|
if (ref.current) {
|
|
1459
1473
|
ref.current.blur();
|
|
@@ -1784,7 +1798,9 @@ function $07b14b47974efb58$var$PopoverInner({ state, isExiting, UNSTABLE_portalC
|
|
|
1784
1798
|
...renderProps.style
|
|
1785
1799
|
};
|
|
1786
1800
|
let overlay = /* @__PURE__ */ React__default.createElement("div", {
|
|
1787
|
-
...$3ef42575df84b30b$export$9d1611c77c2fe928($65484d02dcb7eb3e$export$457c3d6518dd4c6f(props
|
|
1801
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928($65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
1802
|
+
global: true
|
|
1803
|
+
}), popoverProps),
|
|
1788
1804
|
...renderProps,
|
|
1789
1805
|
role: isDialog ? "dialog" : void 0,
|
|
1790
1806
|
tabIndex: isDialog ? -1 : void 0,
|
|
@@ -1997,10 +2013,11 @@ function $3674c52c6b3c5bce$var$MenuInner({ props, collection, menuRef: ref }) {
|
|
|
1997
2013
|
display: "contents"
|
|
1998
2014
|
}
|
|
1999
2015
|
}, props.renderEmptyState());
|
|
2016
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
2017
|
+
global: true
|
|
2018
|
+
});
|
|
2000
2019
|
return /* @__PURE__ */ React__default.createElement($9bf71ea28793e738$export$20e40289641fbbb6, null, /* @__PURE__ */ React__default.createElement("div", {
|
|
2001
|
-
...$
|
|
2002
|
-
...menuProps,
|
|
2003
|
-
...renderProps,
|
|
2020
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, menuProps),
|
|
2004
2021
|
ref,
|
|
2005
2022
|
slot: props.slot || void 0,
|
|
2006
2023
|
"data-empty": state.collection.size === 0 || void 0,
|
|
@@ -2097,10 +2114,12 @@ function $3674c52c6b3c5bce$var$MenuSectionInner(props, ref, section, className =
|
|
|
2097
2114
|
let parent = useContext($3674c52c6b3c5bce$var$SelectionManagerContext);
|
|
2098
2115
|
let selectionState = $7af3f5b51489e0b5$export$253fe78d46329472(props);
|
|
2099
2116
|
let manager = props.selectionMode != null ? new $3674c52c6b3c5bce$var$GroupSelectionManager(parent, selectionState) : parent;
|
|
2117
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
2118
|
+
global: true
|
|
2119
|
+
});
|
|
2120
|
+
delete DOMProps.id;
|
|
2100
2121
|
return /* @__PURE__ */ React__default.createElement("section", {
|
|
2101
|
-
...$
|
|
2102
|
-
...groupProps,
|
|
2103
|
-
...renderProps,
|
|
2122
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, groupProps),
|
|
2104
2123
|
ref
|
|
2105
2124
|
}, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
2106
2125
|
values: [
|
|
@@ -2155,9 +2174,13 @@ const $3674c52c6b3c5bce$export$2ce376c2cc3355c8 = /* @__PURE__ */ $e1995378a1429
|
|
|
2155
2174
|
}
|
|
2156
2175
|
});
|
|
2157
2176
|
let ElementType = props.href ? "a" : "div";
|
|
2177
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
2178
|
+
global: true
|
|
2179
|
+
});
|
|
2180
|
+
delete DOMProps.id;
|
|
2181
|
+
delete DOMProps.onClick;
|
|
2158
2182
|
return /* @__PURE__ */ React__default.createElement(ElementType, {
|
|
2159
|
-
...$3ef42575df84b30b$export$9d1611c77c2fe928(menuItemProps, hoverProps),
|
|
2160
|
-
...renderProps,
|
|
2183
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, menuItemProps, hoverProps),
|
|
2161
2184
|
ref,
|
|
2162
2185
|
"data-disabled": states.isDisabled || void 0,
|
|
2163
2186
|
"data-hovered": isHovered || void 0,
|
|
@@ -2263,10 +2286,11 @@ const $de32f1b87079253c$export$3ddf2d174ce01153 = /* @__PURE__ */ forwardRef(fun
|
|
|
2263
2286
|
})
|
|
2264
2287
|
}
|
|
2265
2288
|
});
|
|
2289
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
2290
|
+
global: true
|
|
2291
|
+
});
|
|
2266
2292
|
return /* @__PURE__ */ React__default.createElement("section", {
|
|
2267
|
-
...$
|
|
2268
|
-
...dialogProps,
|
|
2269
|
-
...renderProps,
|
|
2293
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, dialogProps),
|
|
2270
2294
|
ref,
|
|
2271
2295
|
slot: props.slot || void 0
|
|
2272
2296
|
}, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-
|
|
2
|
-
import { j as $bdb11010cef70236$export$b4cc09c592e8fdb8,
|
|
1
|
+
import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-C8umX0gk.js";
|
|
2
|
+
import { j as $bdb11010cef70236$export$b4cc09c592e8fdb8, b as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-cvK1vxO7.js";
|
|
3
3
|
import { createContext } from "react";
|
|
4
4
|
function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
|
|
5
5
|
let { description, errorMessage, isInvalid, validationState } = props;
|