@eightshift/ui-components 8.3.0 → 8.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/{Autocomplete-Dqkum3dO.js → Autocomplete-DWofaS1k.js} +3 -3
- package/dist/{Button-DHgs_rCq.js → Button-DcI8gSfH.js} +5 -5
- package/dist/{Dialog-CldDJ_4u.js → Dialog-CSqjSLlO.js} +119 -47
- package/dist/{Disclosure-BHNgL5Is.js → Disclosure-CkaUMe7J.js} +5 -5
- package/dist/{FocusScope-CUuL5wjz.js → FocusScope-DLpr7Rq0.js} +1 -1
- package/dist/{ListBox-CZXso3mJ.js → ListBox-D8_U8eBS.js} +8 -8
- package/dist/{NumberFormatter-Bwdv413k.js → NumberFormatter-BbOYa3Kg.js} +0 -34
- package/dist/{RadioGroup-BTByPMrl.js → RadioGroup-BZkgf6tl.js} +8 -8
- package/dist/{SearchField-DkX1vqMN.js → SearchField-N1nXzeWK.js} +5 -5
- package/dist/{Slider-Dw-JjfLx.js → Slider-Dryu0gH7.js} +7 -7
- package/dist/{VisuallyHidden-ZZwHZDro.js → VisuallyHidden-2DfCzdKo.js} +1 -1
- package/dist/animation-COu1iBGW.js +65 -0
- package/dist/assets/fonts/google-sans-flex-latin-ext-full-normal.woff2 +0 -0
- package/dist/{button-ldR_tlvk.js → button-NgEJ1eT2.js} +5 -5
- package/dist/{checkbox-DDyLJRY8.js → checkbox-DfZDR444.js} +7 -7
- package/dist/{color-swatch-DmhdOhe4.js → color-swatch-CEYPwPsn.js} +6 -5
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +1 -1
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.js +3 -3
- package/dist/components/container-panel/container-panel.js +3 -3
- package/dist/components/contextual-help/contextual-help.js +2 -2
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/expandable/expandable.js +2 -2
- package/dist/components/index.js +14 -14
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +1 -1
- package/dist/components/menu/menu.js +2 -2
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.js +2 -2
- package/dist/components/popover/popover.js +3 -3
- package/dist/components/prompt-popover/prompt-popover.js +1 -1
- package/dist/components/radio/radio.js +1 -1
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.js +1 -1
- package/dist/components/responsive/mini-responsive.js +2 -2
- package/dist/components/responsive/responsive-legacy.js +3 -3
- package/dist/components/responsive/responsive.js +3 -3
- package/dist/components/select/async-multi-select.js +8 -8
- package/dist/components/select/async-select.js +8 -8
- package/dist/components/select/multi-select.js +9 -9
- package/dist/components/select/shared.js +1 -1
- package/dist/components/select/single-select.js +9 -9
- package/dist/components/slider/column-config-slider.js +2 -2
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/smart-image/smart-image.js +2 -2
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-oS68xcYX.js → draggable-CE4MJU75.js} +248 -85
- package/dist/{filterDOMProps-CgeMQsGa.js → filterDOMProps-BV6v3Ytq.js} +2 -1
- package/dist/getMetaValue-Cpc6U0mQ.js +18 -0
- package/dist/{gradient-editor-DP8ioFX1.js → gradient-editor-CO1iXPM9.js} +4 -4
- package/dist/icons/icon.d.ts +2 -2
- package/dist/icons/icon.js +6 -10
- package/dist/index.js +14 -14
- package/dist/{input-field-C-XvZeCZ.js → input-field-msAE2llt.js} +5 -5
- package/dist/keyboard-DwWaJveG.js +205 -0
- package/dist/{link-input-DdwuqoMg.js → link-input-D1BWznvA.js} +27 -17
- package/dist/{modal-DZco5MDu.js → modal-DPHjb2V4.js} +81 -33
- package/dist/{number-picker-XqKW0BNi.js → number-picker-Dqwxp_2B.js} +5 -5
- package/dist/{react-O71mlJXS.js → react-c-t8odpE.js} +6723 -5493
- package/dist/{shared-YXMIX2ka.js → shared-s7XUBOVx.js} +12 -12
- package/dist/{solid-color-picker-D5LEdmDM.js → solid-color-picker-CDrcphjC.js} +10 -10
- package/dist/{switch-Bo6nmed_.js → switch-bqIILR_c.js} +6 -6
- package/dist/{tabs-DE-qb7Kt.js → tabs-DvGKX3V7.js} +7 -7
- package/dist/{textSelection-C17LWYmO.js → textSelection-BYhA9uWK.js} +1 -1
- package/dist/{toggle-button-Cb4yCEua.js → toggle-button-g3dLI2F1.js} +6 -6
- package/dist/{tooltip-CT-vzIdz.js → tooltip-Dd1nNj0_.js} +4 -4
- package/dist/{useButton-V65TBDGM.js → useButton-BO_4n6_e.js} +3 -3
- package/dist/{useCollection-DqUS7tjk.js → useCollection-BVUc8URe.js} +17 -7
- package/dist/{useEvent-C9zwSNzZ.js → useEvent-5yhOs2HC.js} +1 -1
- package/dist/{useFilter-C75IzdIZ.js → useFilter-Yp-QyW1S.js} +1 -1
- package/dist/{useFocusRing-JidySWlU.js → useFocusRing-DxPoGWMJ.js} +1 -1
- package/dist/{useFormReset-Sp8-miDa.js → useFormReset-DFy_BhX1.js} +1 -1
- package/dist/{useFormValidation-CpmQEh8J.js → useFormValidation-CZPIMeNw.js} +1 -1
- package/dist/{useHover-CaY3sRjL.js → useHover-DgudzTcf.js} +54 -90
- package/dist/{useListState-CzB3v6M9.js → useListState-DTn91yqB.js} +1 -1
- package/dist/{useNumberFieldState-DC3XY3DQ.js → useNumberFieldState-D-Bsp98Z.js} +10 -10
- package/dist/{useNumberFormatter-DbAt_fC_.js → useNumberFormatter-DNUGdm93.js} +1 -1
- package/dist/{useOverlayTriggerState-BKmSTK_5.js → useOverlayTriggerState-uzs8mam6.js} +2 -2
- package/dist/{usePress-CUCWcP-m.js → usePress-BpGYwCwy.js} +3 -18
- package/dist/{useTextField-C3QIkMON.js → useTextField-C9dxy3po.js} +5 -5
- package/dist/{useToggle-bbGRUbo4.js → useToggle-CudcGIyz.js} +5 -5
- package/dist/{useToggleState-D_rLMrVW.js → useToggleState-CYfSFy4b.js} +1 -1
- package/package.json +21 -20
- package/dist/animation-COc9P6ap.js +0 -60
- package/dist/keyboard-Cdqi5ZQQ.js +0 -55
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
|
-
import { t as SolidColorPicker } from "./solid-color-picker-
|
|
3
|
-
import { t as ColorSwatch } from "./color-swatch-
|
|
4
|
-
import { t as NumberPicker } from "./number-picker-
|
|
5
|
-
import { n as ButtonGroup, t as Button } from "./button-
|
|
2
|
+
import { t as SolidColorPicker } from "./solid-color-picker-CDrcphjC.js";
|
|
3
|
+
import { t as ColorSwatch } from "./color-swatch-CEYPwPsn.js";
|
|
4
|
+
import { t as NumberPicker } from "./number-picker-Dqwxp_2B.js";
|
|
5
|
+
import { n as ButtonGroup, t as Button } from "./button-NgEJ1eT2.js";
|
|
6
6
|
import { BaseControl } from "./components/base-control/base-control.js";
|
|
7
7
|
import { isColorDark } from "./utilities/general.js";
|
|
8
8
|
import { t as sprintf } from "./sprintf-xJRAt4p0.js";
|
package/dist/icons/icon.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ interface IconProps extends IconPresentationProps {
|
|
|
7
7
|
/**
|
|
8
8
|
* Renders an icon by name without eagerly importing the entire icon set.
|
|
9
9
|
*
|
|
10
|
-
* String icons
|
|
11
|
-
*
|
|
10
|
+
* String icons load the catalogue on first use, then the requested icon module,
|
|
11
|
+
* rendering `dummySpacer` while they resolve. Invalid names render `fallback`.
|
|
12
12
|
*
|
|
13
13
|
* @param {IconProps} props - Icon props.
|
|
14
14
|
*
|
package/dist/icons/icon.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { hasIconLoader, loadIconByName } from "./generated-icon-loaders.js";
|
|
2
1
|
import { dummySpacer } from "./ui-icons/dummy-spacer.js";
|
|
3
2
|
import { cloneElement, memo, useEffect, useState } from "react";
|
|
4
3
|
//#region lib/icons/icon.tsx
|
|
@@ -9,7 +8,10 @@ var isStringValue = (value) => Object.prototype.toString.call(value) === "[objec
|
|
|
9
8
|
var loadIcon = (iconName) => {
|
|
10
9
|
if (iconCache.has(iconName)) return Promise.resolve(iconCache.get(iconName) ?? null);
|
|
11
10
|
if (!iconLoads.has(iconName)) {
|
|
12
|
-
const iconLoad =
|
|
11
|
+
const iconLoad = import("./generated-icon-loaders.js").then(({ hasIconLoader, loadIconByName }) => {
|
|
12
|
+
if (!hasIconLoader(iconName)) return null;
|
|
13
|
+
return loadIconByName(iconName);
|
|
14
|
+
}).then((loadedIcon) => {
|
|
13
15
|
iconCache.set(iconName, loadedIcon);
|
|
14
16
|
return loadedIcon;
|
|
15
17
|
}).catch(() => {
|
|
@@ -30,8 +32,8 @@ var renderIcon = (iconToRender, rest) => {
|
|
|
30
32
|
/**
|
|
31
33
|
* Renders an icon by name without eagerly importing the entire icon set.
|
|
32
34
|
*
|
|
33
|
-
* String icons
|
|
34
|
-
*
|
|
35
|
+
* String icons load the catalogue on first use, then the requested icon module,
|
|
36
|
+
* rendering `dummySpacer` while they resolve. Invalid names render `fallback`.
|
|
35
37
|
*
|
|
36
38
|
* @param {IconProps} props - Icon props.
|
|
37
39
|
*
|
|
@@ -59,12 +61,6 @@ var Icon = memo(({ icon, fallback = null, ...rest }) => {
|
|
|
59
61
|
isDisposed = true;
|
|
60
62
|
};
|
|
61
63
|
}
|
|
62
|
-
if (!hasIconLoader(normalizedIconName)) {
|
|
63
|
-
updateLoadedIcon(null);
|
|
64
|
-
return () => {
|
|
65
|
-
isDisposed = true;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
64
|
updateLoadedIcon(void 0);
|
|
69
65
|
loadIcon(normalizedIconName).then((resolvedIcon) => {
|
|
70
66
|
if (!isDisposed) setLoadedIcon(resolvedIcon);
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AnimatedVisibility } from "./components/animated-visibility/animated-visibility.js";
|
|
2
|
-
import { t as LinkInput } from "./link-input-
|
|
3
|
-
import { t as Checkbox } from "./checkbox-
|
|
4
|
-
import { t as SolidColorPicker } from "./solid-color-picker-
|
|
5
|
-
import { t as ColorSwatch } from "./color-swatch-
|
|
6
|
-
import { i as Tabs, n as TabList, r as TabPanel, t as Tab } from "./tabs-
|
|
7
|
-
import { n as Tooltip, t as DecorativeTooltip } from "./tooltip-
|
|
8
|
-
import { t as Modal } from "./modal-
|
|
9
|
-
import { t as NumberPicker } from "./number-picker-
|
|
10
|
-
import { t as Switch } from "./switch-
|
|
11
|
-
import { t as InputField } from "./input-field-
|
|
12
|
-
import { t as ToggleButton } from "./toggle-button-
|
|
13
|
-
import { n as ButtonGroup, t as Button } from "./button-
|
|
2
|
+
import { t as LinkInput } from "./link-input-D1BWznvA.js";
|
|
3
|
+
import { t as Checkbox } from "./checkbox-DfZDR444.js";
|
|
4
|
+
import { t as SolidColorPicker } from "./solid-color-picker-CDrcphjC.js";
|
|
5
|
+
import { t as ColorSwatch } from "./color-swatch-CEYPwPsn.js";
|
|
6
|
+
import { i as Tabs, n as TabList, r as TabPanel, t as Tab } from "./tabs-DvGKX3V7.js";
|
|
7
|
+
import { n as Tooltip, t as DecorativeTooltip } from "./tooltip-Dd1nNj0_.js";
|
|
8
|
+
import { t as Modal } from "./modal-DPHjb2V4.js";
|
|
9
|
+
import { t as NumberPicker } from "./number-picker-Dqwxp_2B.js";
|
|
10
|
+
import { t as Switch } from "./switch-bqIILR_c.js";
|
|
11
|
+
import { t as InputField } from "./input-field-msAE2llt.js";
|
|
12
|
+
import { t as ToggleButton } from "./toggle-button-g3dLI2F1.js";
|
|
13
|
+
import { n as ButtonGroup, t as Button } from "./button-NgEJ1eT2.js";
|
|
14
14
|
import { RichLabel } from "./components/rich-label/rich-label.js";
|
|
15
15
|
import { BaseControl } from "./components/base-control/base-control.js";
|
|
16
16
|
import { BreakpointPreview } from "./components/breakpoint-preview/breakpoint-preview.js";
|
|
@@ -29,12 +29,12 @@ import { ContextualHelp } from "./components/contextual-help/contextual-help.js"
|
|
|
29
29
|
import { DraggableList } from "./components/draggable-list/draggable-list.js";
|
|
30
30
|
import { DraggableListItem, DraggableListItemHandle } from "./components/draggable-list/draggable-list-item.js";
|
|
31
31
|
import { DraggableContext } from "./components/draggable/draggable-context.js";
|
|
32
|
-
import { t as Draggable } from "./draggable-
|
|
32
|
+
import { t as Draggable } from "./draggable-CE4MJU75.js";
|
|
33
33
|
import { DraggableHandle } from "./components/draggable/draggable-handle.js";
|
|
34
34
|
import { SmartImage } from "./components/smart-image/smart-image.js";
|
|
35
35
|
import { FilePickerShell } from "./components/placeholders/file-picker-shell.js";
|
|
36
36
|
import { FilePlaceholder } from "./components/placeholders/file-placeholder.js";
|
|
37
|
-
import { t as GradientEditor } from "./gradient-editor-
|
|
37
|
+
import { t as GradientEditor } from "./gradient-editor-CO1iXPM9.js";
|
|
38
38
|
import { MatrixAlign } from "./components/matrix-align/matrix-align.js";
|
|
39
39
|
import { RadioButton, RadioButtonGroup } from "./components/radio/radio.js";
|
|
40
40
|
import { OptionSelect } from "./components/option-select/option-select.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
2
|
import { c as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, i as $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
3
|
-
import { t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-
|
|
4
|
-
import { n as $4b38b5b75ecc6208$export$698f465ec27e93df } from "./Autocomplete-
|
|
3
|
+
import { t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-DgudzTcf.js";
|
|
4
|
+
import { n as $4b38b5b75ecc6208$export$698f465ec27e93df } from "./Autocomplete-DWofaS1k.js";
|
|
5
5
|
import { t as $d7f64c32b702fe2c$export$86427a43e3e48ebb } from "./Hidden-C4Saxkx9.js";
|
|
6
|
-
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-
|
|
7
|
-
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-
|
|
6
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BV6v3Ytq.js";
|
|
7
|
+
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-DxPoGWMJ.js";
|
|
8
8
|
import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5, t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "./Label-C4bJkVti.js";
|
|
9
9
|
import { n as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "./Text-CA2_mHEB.js";
|
|
10
10
|
import { n as $1f3c3b1a70cec653$export$ff05c3ac10437e03 } from "./useField-B_ibsWst.js";
|
|
11
11
|
import { t as $cdaed739b1139372$export$c24727297075ec6a } from "./Form-BWMVEpwR.js";
|
|
12
|
-
import { a as $3a442827418ebe87$export$f9c6924e160136d1, n as $41fb335299a4a39e$export$37fb8590cf2c088c, r as $41fb335299a4a39e$export$f5b8910cec6cf069, t as $054f71d2330da2e3$export$712718f7aec83d5 } from "./useTextField-
|
|
12
|
+
import { a as $3a442827418ebe87$export$f9c6924e160136d1, n as $41fb335299a4a39e$export$37fb8590cf2c088c, r as $41fb335299a4a39e$export$f5b8910cec6cf069, t as $054f71d2330da2e3$export$712718f7aec83d5 } from "./useTextField-C9dxy3po.js";
|
|
13
13
|
import { BaseControl } from "./components/base-control/base-control.js";
|
|
14
14
|
import { t as cva } from "./dist-DpXluZqJ.js";
|
|
15
15
|
import $3ARPR$react, { createContext, forwardRef, useCallback, useRef, useState } from "react";
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { D as $2add3ce32c6007eb$export$78551043582a6a98, I as $3b8b240c1bf84ab9$export$4c063cf1350e6fed, O as $2add3ce32c6007eb$export$9ac100e40613ea10, U as $23f2114a1b82827e$export$e58f029f0fbfdb29, V as $23f2114a1b82827e$export$cd4e5573fbe2b576, Y as $d447af545b77c9f1$export$f531f92e2a15358f, k as $2add3ce32c6007eb$export$a11b0059900ceec8, q as $d447af545b77c9f1$export$b204af158042fbac } from "./useHover-DgudzTcf.js";
|
|
2
|
+
import { t as $7096878c21af5e66$export$a929f3f93e2cc67e } from "./getMetaValue-Cpc6U0mQ.js";
|
|
3
|
+
//#region node_modules/react-aria/dist/private/utils/constants.mjs
|
|
4
|
+
var $8b2399d051d06d4c$export$447a38995de2c711 = "react-aria-clear-focus";
|
|
5
|
+
var $8b2399d051d06d4c$export$831c820ad60f9d12 = "react-aria-focus";
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region node_modules/react-aria/dist/private/focus/virtualFocus.mjs
|
|
8
|
+
function $b72f3f7b3b5f42c6$export$76e4e37e5339496d(to) {
|
|
9
|
+
let from = $b72f3f7b3b5f42c6$export$759df0d867455a91($d447af545b77c9f1$export$b204af158042fbac(to));
|
|
10
|
+
if (from !== to) {
|
|
11
|
+
if (from) $b72f3f7b3b5f42c6$export$6c5dc7e81d2cc29a(from, to);
|
|
12
|
+
if (to) $b72f3f7b3b5f42c6$export$2b35b76d2e30e129(to, from);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function $b72f3f7b3b5f42c6$export$6c5dc7e81d2cc29a(from, to) {
|
|
16
|
+
from.dispatchEvent(new FocusEvent("blur", { relatedTarget: to }));
|
|
17
|
+
from.dispatchEvent(new FocusEvent("focusout", {
|
|
18
|
+
bubbles: true,
|
|
19
|
+
relatedTarget: to
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
function $b72f3f7b3b5f42c6$export$2b35b76d2e30e129(to, from) {
|
|
23
|
+
to.dispatchEvent(new FocusEvent("focus", { relatedTarget: from }));
|
|
24
|
+
to.dispatchEvent(new FocusEvent("focusin", {
|
|
25
|
+
bubbles: true,
|
|
26
|
+
relatedTarget: from
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
function $b72f3f7b3b5f42c6$export$759df0d867455a91(document) {
|
|
30
|
+
let activeElement = $23f2114a1b82827e$export$cd4e5573fbe2b576(document);
|
|
31
|
+
let activeDescendant = activeElement?.getAttribute("aria-activedescendant");
|
|
32
|
+
if (activeDescendant) return document.getElementById(activeDescendant) || activeElement;
|
|
33
|
+
return activeElement;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region node_modules/react-aria/dist/private/utils/keyboard.mjs
|
|
37
|
+
var $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT = 100;
|
|
38
|
+
var $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT = 600;
|
|
39
|
+
var $bb39c0fc1c19b34c$var$state = {
|
|
40
|
+
isOpen: false,
|
|
41
|
+
screenWidth: 0,
|
|
42
|
+
screenHeight: 0,
|
|
43
|
+
screenAngle: 0,
|
|
44
|
+
screenTimeout: 0,
|
|
45
|
+
startTimeStamp: 0,
|
|
46
|
+
endTimeStamp: 0,
|
|
47
|
+
resizeTimeStamp: 0,
|
|
48
|
+
resizeTimeout: 0
|
|
49
|
+
};
|
|
50
|
+
var $bb39c0fc1c19b34c$var$nonTextInputTypes = new Set([
|
|
51
|
+
"checkbox",
|
|
52
|
+
"radio",
|
|
53
|
+
"range",
|
|
54
|
+
"color",
|
|
55
|
+
"file",
|
|
56
|
+
"image",
|
|
57
|
+
"button",
|
|
58
|
+
"submit",
|
|
59
|
+
"reset"
|
|
60
|
+
]);
|
|
61
|
+
if (process.env.NODE_ENV === "test" && typeof window !== "undefined" && !Reflect.has(window, "visualViewport")) {
|
|
62
|
+
const visualViewport = Object.assign(new EventTarget(), {
|
|
63
|
+
offsetTop: 0,
|
|
64
|
+
offsetLeft: 0,
|
|
65
|
+
pageTop: 0,
|
|
66
|
+
pageLeft: 0,
|
|
67
|
+
scale: 1
|
|
68
|
+
});
|
|
69
|
+
Reflect.defineProperty(visualViewport, "width", {
|
|
70
|
+
get: () => window.innerWidth,
|
|
71
|
+
configurable: true
|
|
72
|
+
});
|
|
73
|
+
Reflect.defineProperty(visualViewport, "height", {
|
|
74
|
+
get: () => window.innerHeight,
|
|
75
|
+
configurable: true
|
|
76
|
+
});
|
|
77
|
+
Reflect.defineProperty(window, "visualViewport", {
|
|
78
|
+
value: visualViewport,
|
|
79
|
+
configurable: true,
|
|
80
|
+
writable: true
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
if (process.env.NODE_ENV === "test" && typeof window !== "undefined" && !Reflect.has(window.screen, "orientation")) {
|
|
84
|
+
const orientation = Object.assign(new EventTarget(), { type: "landscape-primary" });
|
|
85
|
+
Reflect.defineProperty(window.screen, "orientation", {
|
|
86
|
+
value: orientation,
|
|
87
|
+
configurable: true,
|
|
88
|
+
writable: true
|
|
89
|
+
});
|
|
90
|
+
Reflect.defineProperty(window.screen.orientation, "angle", {
|
|
91
|
+
get: () => window.orientation ?? 0,
|
|
92
|
+
configurable: true
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function $bb39c0fc1c19b34c$var$getTouchScreen() {
|
|
96
|
+
let screenWidth = Number(window.visualViewport?.width ?? window.innerWidth);
|
|
97
|
+
let screenHeight = Number(window.visualViewport?.height ?? window.innerHeight);
|
|
98
|
+
let visualScale = Number(window.visualViewport?.scale ?? 1);
|
|
99
|
+
return {
|
|
100
|
+
width: screenWidth * visualScale,
|
|
101
|
+
height: screenHeight * visualScale,
|
|
102
|
+
angle: window.screen.orientation?.angle ?? 0
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function $bb39c0fc1c19b34c$var$onResizeStart(e) {
|
|
106
|
+
if ($bb39c0fc1c19b34c$var$state.resizeTimeStamp <= e.timeStamp + 50) {
|
|
107
|
+
$bb39c0fc1c19b34c$var$state.resizeTimeStamp = e.timeStamp + 150;
|
|
108
|
+
window.clearTimeout($bb39c0fc1c19b34c$var$state.resizeTimeout);
|
|
109
|
+
$bb39c0fc1c19b34c$var$state.resizeTimeout = window.setTimeout($bb39c0fc1c19b34c$var$onResizeEnd, 150);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function $bb39c0fc1c19b34c$var$onResizeEnd() {
|
|
113
|
+
let viewportMeta = $7096878c21af5e66$export$a929f3f93e2cc67e("viewport");
|
|
114
|
+
if ($2add3ce32c6007eb$export$a11b0059900ceec8() && viewportMeta?.includes("overlays-content")) return;
|
|
115
|
+
let time = performance.now();
|
|
116
|
+
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
117
|
+
let elapsed = time - $bb39c0fc1c19b34c$var$state.startTimeStamp;
|
|
118
|
+
let delta = $bb39c0fc1c19b34c$var$state.screenHeight - screen.height;
|
|
119
|
+
let rotation = $bb39c0fc1c19b34c$var$state.screenAngle - screen.angle;
|
|
120
|
+
if (Math.abs(rotation) % 180 && $bb39c0fc1c19b34c$var$state.screenWidth - screen.height < $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT) {
|
|
121
|
+
$bb39c0fc1c19b34c$var$state.screenWidth = screen.width;
|
|
122
|
+
$bb39c0fc1c19b34c$var$state.screenHeight = screen.height;
|
|
123
|
+
$bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
124
|
+
delta = 0;
|
|
125
|
+
}
|
|
126
|
+
if (elapsed > $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT) {
|
|
127
|
+
window.clearTimeout($bb39c0fc1c19b34c$var$state.screenTimeout);
|
|
128
|
+
$bb39c0fc1c19b34c$var$state.screenTimeout = window.setTimeout(() => {
|
|
129
|
+
let willKeyboardOpen = $bb39c0fc1c19b34c$export$c57958e35f31ed73(document.hasFocus() ? $23f2114a1b82827e$export$cd4e5573fbe2b576() : null);
|
|
130
|
+
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
131
|
+
if (Math.abs($bb39c0fc1c19b34c$var$state.screenAngle - screen.angle) % 180) return;
|
|
132
|
+
if ($bb39c0fc1c19b34c$var$state.isOpen && willKeyboardOpen) return;
|
|
133
|
+
$bb39c0fc1c19b34c$var$state.screenWidth = screen.width;
|
|
134
|
+
$bb39c0fc1c19b34c$var$state.screenHeight = screen.height;
|
|
135
|
+
$bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
136
|
+
$bb39c0fc1c19b34c$var$state.isOpen = false;
|
|
137
|
+
}, $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT);
|
|
138
|
+
}
|
|
139
|
+
if (elapsed <= $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT && delta >= $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT) $bb39c0fc1c19b34c$var$state.endTimeStamp = time;
|
|
140
|
+
$bb39c0fc1c19b34c$var$state.isOpen = delta >= $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT;
|
|
141
|
+
}
|
|
142
|
+
function $bb39c0fc1c19b34c$var$onOrientationChange() {
|
|
143
|
+
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
144
|
+
let rotation = $bb39c0fc1c19b34c$var$state.screenAngle - screen.angle;
|
|
145
|
+
if (Math.abs(rotation) % 180 && !$bb39c0fc1c19b34c$var$state.isOpen) {
|
|
146
|
+
let width = $bb39c0fc1c19b34c$var$state.screenWidth;
|
|
147
|
+
let height = $bb39c0fc1c19b34c$var$state.screenHeight;
|
|
148
|
+
$bb39c0fc1c19b34c$var$state.screenWidth = height;
|
|
149
|
+
$bb39c0fc1c19b34c$var$state.screenHeight = width;
|
|
150
|
+
}
|
|
151
|
+
if (!$bb39c0fc1c19b34c$var$state.isOpen) $bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
152
|
+
}
|
|
153
|
+
function $bb39c0fc1c19b34c$var$onFocus(e) {
|
|
154
|
+
let willKeyboardOpen = $bb39c0fc1c19b34c$export$c57958e35f31ed73($23f2114a1b82827e$export$e58f029f0fbfdb29(e));
|
|
155
|
+
let time = performance.now();
|
|
156
|
+
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
157
|
+
let delta = $bb39c0fc1c19b34c$var$state.screenHeight - screen.height;
|
|
158
|
+
if (delta < $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT && willKeyboardOpen) {
|
|
159
|
+
$bb39c0fc1c19b34c$var$state.screenWidth = screen.width;
|
|
160
|
+
$bb39c0fc1c19b34c$var$state.screenHeight = screen.height;
|
|
161
|
+
$bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
162
|
+
$bb39c0fc1c19b34c$var$state.startTimeStamp = time;
|
|
163
|
+
}
|
|
164
|
+
if (willKeyboardOpen) window.clearTimeout($bb39c0fc1c19b34c$var$state.screenTimeout);
|
|
165
|
+
if (delta >= $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT && willKeyboardOpen) $bb39c0fc1c19b34c$var$state.endTimeStamp = time;
|
|
166
|
+
}
|
|
167
|
+
function $bb39c0fc1c19b34c$var$setupGlobalEvents() {
|
|
168
|
+
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
169
|
+
$d447af545b77c9f1$export$f531f92e2a15358f(window.visualViewport, "resize", $2add3ce32c6007eb$export$78551043582a6a98() ? $bb39c0fc1c19b34c$var$onResizeEnd : $bb39c0fc1c19b34c$var$onResizeStart);
|
|
170
|
+
$d447af545b77c9f1$export$f531f92e2a15358f(window.screen.orientation, "change", $bb39c0fc1c19b34c$var$onOrientationChange);
|
|
171
|
+
$d447af545b77c9f1$export$f531f92e2a15358f(window, "focus", $bb39c0fc1c19b34c$var$onFocus, {
|
|
172
|
+
capture: true,
|
|
173
|
+
passive: true
|
|
174
|
+
});
|
|
175
|
+
$bb39c0fc1c19b34c$var$state.screenWidth = screen.width;
|
|
176
|
+
$bb39c0fc1c19b34c$var$state.screenHeight = screen.height;
|
|
177
|
+
$bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
178
|
+
}
|
|
179
|
+
if (typeof document !== "undefined") {
|
|
180
|
+
if (document.readyState !== "loading") $bb39c0fc1c19b34c$var$setupGlobalEvents();
|
|
181
|
+
else $d447af545b77c9f1$export$f531f92e2a15358f(document, "DOMContentLoaded", $bb39c0fc1c19b34c$var$setupGlobalEvents);
|
|
182
|
+
}
|
|
183
|
+
function $bb39c0fc1c19b34c$export$a986ed8aea890397() {
|
|
184
|
+
let viewportMeta = $7096878c21af5e66$export$a929f3f93e2cc67e("viewport");
|
|
185
|
+
if ($2add3ce32c6007eb$export$a11b0059900ceec8() && viewportMeta?.includes("overlays-content")) return false;
|
|
186
|
+
if ($bb39c0fc1c19b34c$var$state.isOpen) return true;
|
|
187
|
+
if (!$bb39c0fc1c19b34c$var$state.startTimeStamp) return window.navigator.maxTouchPoints > 0;
|
|
188
|
+
if ($bb39c0fc1c19b34c$var$state.endTimeStamp >= $bb39c0fc1c19b34c$var$state.startTimeStamp) return true;
|
|
189
|
+
return performance.now() - $bb39c0fc1c19b34c$var$state.startTimeStamp <= $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT ? $bb39c0fc1c19b34c$var$state.endTimeStamp > 0 || window.navigator.maxTouchPoints > 0 : false;
|
|
190
|
+
}
|
|
191
|
+
function $bb39c0fc1c19b34c$export$c57958e35f31ed73(target) {
|
|
192
|
+
if (!(target instanceof Element) || !$3b8b240c1bf84ab9$export$4c063cf1350e6fed(target)) return false;
|
|
193
|
+
let isTextArea = target instanceof HTMLTextAreaElement;
|
|
194
|
+
let isEditable = target instanceof HTMLElement && target.isContentEditable;
|
|
195
|
+
let isTextInput = target instanceof HTMLInputElement && !$bb39c0fc1c19b34c$var$nonTextInputTypes.has(target.type);
|
|
196
|
+
return isTextArea || isEditable || isTextInput;
|
|
197
|
+
}
|
|
198
|
+
function $bb39c0fc1c19b34c$export$16792effe837dba3(event) {
|
|
199
|
+
return $2add3ce32c6007eb$export$9ac100e40613ea10() ? event.metaKey : event.ctrlKey;
|
|
200
|
+
}
|
|
201
|
+
function $bb39c0fc1c19b34c$export$b1f1c83775b8b5f7() {
|
|
202
|
+
return $bb39c0fc1c19b34c$var$state.isOpen;
|
|
203
|
+
}
|
|
204
|
+
//#endregion
|
|
205
|
+
export { $b72f3f7b3b5f42c6$export$2b35b76d2e30e129 as a, $b72f3f7b3b5f42c6$export$76e4e37e5339496d as c, $bb39c0fc1c19b34c$export$c57958e35f31ed73 as i, $8b2399d051d06d4c$export$447a38995de2c711 as l, $bb39c0fc1c19b34c$export$a986ed8aea890397 as n, $b72f3f7b3b5f42c6$export$6c5dc7e81d2cc29a as o, $bb39c0fc1c19b34c$export$b1f1c83775b8b5f7 as r, $b72f3f7b3b5f42c6$export$759df0d867455a91 as s, $bb39c0fc1c19b34c$export$16792effe837dba3 as t, $8b2399d051d06d4c$export$831c820ad60f9d12 as u };
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
2
|
import { AnimatedVisibility } from "./components/animated-visibility/animated-visibility.js";
|
|
3
3
|
import { c as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, g as $a4e76a5424781910$export$e08e3b67e392101e, i as $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
4
|
-
import {
|
|
5
|
-
import { A as $2add3ce32c6007eb$export$e1865c3bedcd822b, S as $caaf0dd3060ed57c$export$9a302a45f65d0572, U as $23f2114a1b82827e$export$e58f029f0fbfdb29, V as $23f2114a1b82827e$export$cd4e5573fbe2b576, d as $3e6197669829fe11$export$40bfa8c7b0832715, f as $fe16bffc7a557bf0$export$7f54fc3180508a52, m as $8f5a2122b0992be3$export$8397ddfc504fdb9a, q as $d447af545b77c9f1$export$b204af158042fbac, s as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, z as $23f2114a1b82827e$export$4282f70798064fe0 } from "./useHover-
|
|
6
|
-
import { n as $4b38b5b75ecc6208$export$698f465ec27e93df } from "./Autocomplete-
|
|
7
|
-
import { t as $600b3cf69ae46262$export$90fc3a17d93f704c } from "./useEvent-
|
|
4
|
+
import { a as $b72f3f7b3b5f42c6$export$2b35b76d2e30e129 } from "./keyboard-DwWaJveG.js";
|
|
5
|
+
import { A as $2add3ce32c6007eb$export$e1865c3bedcd822b, S as $caaf0dd3060ed57c$export$9a302a45f65d0572, U as $23f2114a1b82827e$export$e58f029f0fbfdb29, V as $23f2114a1b82827e$export$cd4e5573fbe2b576, d as $3e6197669829fe11$export$40bfa8c7b0832715, f as $fe16bffc7a557bf0$export$7f54fc3180508a52, m as $8f5a2122b0992be3$export$8397ddfc504fdb9a, q as $d447af545b77c9f1$export$b204af158042fbac, s as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, z as $23f2114a1b82827e$export$4282f70798064fe0 } from "./useHover-DgudzTcf.js";
|
|
6
|
+
import { n as $4b38b5b75ecc6208$export$698f465ec27e93df } from "./Autocomplete-DWofaS1k.js";
|
|
7
|
+
import { t as $600b3cf69ae46262$export$90fc3a17d93f704c } from "./useEvent-5yhOs2HC.js";
|
|
8
8
|
import { t as $e8ac3c3f5d4bae7f$export$d6875122194c7b44 } from "./useLabels-Dcg-cEyM.js";
|
|
9
9
|
import { t as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-CTCqjYu4.js";
|
|
10
|
-
import { _ as $42ceafc619f9c3ba$export$bf788dd355e3a401, a as $cd5ea4b915021f1d$export$1005530eda016c13, c as $d667c2af82d35a98$export$d6daf82dcd84e87c } from "./useCollection-
|
|
10
|
+
import { _ as $42ceafc619f9c3ba$export$bf788dd355e3a401, a as $cd5ea4b915021f1d$export$1005530eda016c13, c as $d667c2af82d35a98$export$d6daf82dcd84e87c } from "./useCollection-BVUc8URe.js";
|
|
11
11
|
import { t as $d7f64c32b702fe2c$export$86427a43e3e48ebb } from "./Hidden-C4Saxkx9.js";
|
|
12
|
-
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-
|
|
12
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BV6v3Ytq.js";
|
|
13
13
|
import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5, t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "./Label-C4bJkVti.js";
|
|
14
|
-
import { n as $7705c033048f6da7$export$353f5b6fc5456de1, r as $a46cf152bb926da5$export$a9b970dcc4ae71a9, t as $7705c033048f6da7$export$24d547caef80ccd1 } from "./Button-
|
|
14
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1, r as $a46cf152bb926da5$export$a9b970dcc4ae71a9, t as $7705c033048f6da7$export$24d547caef80ccd1 } from "./Button-DcI8gSfH.js";
|
|
15
15
|
import { n as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "./Text-CA2_mHEB.js";
|
|
16
|
-
import { S as $ae8f8d98b2b18f2f$export$a05409b8bb224a5a,
|
|
16
|
+
import { S as $2efe10d3f1f9e31e$export$77d5aafae4e095b2, T as $ae8f8d98b2b18f2f$export$a05409b8bb224a5a, b as $58196c8d6a1f38fc$export$1c3ebcada18427bf, d as $542a13ca2fa5b484$export$5b6b19405a83ff9d, f as $542a13ca2fa5b484$export$9b9a0cd73afb7ca4, i as $f2ff30fde7b014be$export$d2f961adcb0afbe, u as $f19b83c1486f45cc$export$dc9c12ed27dd1b49 } from "./Dialog-CSqjSLlO.js";
|
|
17
17
|
import { n as $1f3c3b1a70cec653$export$ff05c3ac10437e03 } from "./useField-B_ibsWst.js";
|
|
18
|
-
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, n as $fd2148440a13ec26$export$a763b9476acd3eb } from "./useFormValidation-
|
|
18
|
+
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, n as $fd2148440a13ec26$export$a763b9476acd3eb } from "./useFormValidation-CZPIMeNw.js";
|
|
19
19
|
import { t as $cdaed739b1139372$export$c24727297075ec6a } from "./Form-BWMVEpwR.js";
|
|
20
|
-
import { t as $3274bf1495747a7b$export$5add1d006293d136 } from "./useFormReset-
|
|
21
|
-
import { a as $3a442827418ebe87$export$f9c6924e160136d1, i as $3a442827418ebe87$export$eb2fcfdbd7ba97d4, n as $41fb335299a4a39e$export$37fb8590cf2c088c, r as $41fb335299a4a39e$export$f5b8910cec6cf069, t as $054f71d2330da2e3$export$712718f7aec83d5 } from "./useTextField-
|
|
22
|
-
import { i as $928221da08ecbc62$export$a11e76429ed99b4, n as $928221da08ecbc62$export$7c5906fe4f1f2af2, o as $cd088b5c0d7b27b4$export$3585ede4d035bf14, r as $928221da08ecbc62$export$7ff8f37d2d81a48d, s as $cd088b5c0d7b27b4$export$9145995848b05025, t as $928221da08ecbc62$export$41f133550aa26f48 } from "./ListBox-
|
|
23
|
-
import { r as $f664a81d022446b5$export$d085fb9e920b5ca7, t as $b14b6f590b50af39$export$2f645645f7bca764 } from "./useListState-
|
|
24
|
-
import { r as $970072cf4b13fde3$export$683480f191c0e3ea, t as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6 } from "./useOverlayTriggerState-
|
|
25
|
-
import { t as $ef182bb9912241d8$export$3274cf84b703fff } from "./useFilter-
|
|
26
|
-
import { n as Tooltip } from "./tooltip-
|
|
20
|
+
import { t as $3274bf1495747a7b$export$5add1d006293d136 } from "./useFormReset-DFy_BhX1.js";
|
|
21
|
+
import { a as $3a442827418ebe87$export$f9c6924e160136d1, i as $3a442827418ebe87$export$eb2fcfdbd7ba97d4, n as $41fb335299a4a39e$export$37fb8590cf2c088c, r as $41fb335299a4a39e$export$f5b8910cec6cf069, t as $054f71d2330da2e3$export$712718f7aec83d5 } from "./useTextField-C9dxy3po.js";
|
|
22
|
+
import { i as $928221da08ecbc62$export$a11e76429ed99b4, n as $928221da08ecbc62$export$7c5906fe4f1f2af2, o as $cd088b5c0d7b27b4$export$3585ede4d035bf14, r as $928221da08ecbc62$export$7ff8f37d2d81a48d, s as $cd088b5c0d7b27b4$export$9145995848b05025, t as $928221da08ecbc62$export$41f133550aa26f48 } from "./ListBox-D8_U8eBS.js";
|
|
23
|
+
import { r as $f664a81d022446b5$export$d085fb9e920b5ca7, t as $b14b6f590b50af39$export$2f645645f7bca764 } from "./useListState-DTn91yqB.js";
|
|
24
|
+
import { r as $970072cf4b13fde3$export$683480f191c0e3ea, t as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6 } from "./useOverlayTriggerState-uzs8mam6.js";
|
|
25
|
+
import { t as $ef182bb9912241d8$export$3274cf84b703fff } from "./useFilter-Yp-QyW1S.js";
|
|
26
|
+
import { n as Tooltip } from "./tooltip-Dd1nNj0_.js";
|
|
27
27
|
import { t as $c73d3f3d5ec90946$export$bc3384a35de93d66 } from "./useAsyncList-CjKVLGN0.js";
|
|
28
28
|
import { RichLabel } from "./components/rich-label/rich-label.js";
|
|
29
29
|
import { BaseControl } from "./components/base-control/base-control.js";
|
|
@@ -1147,6 +1147,7 @@ function $120eca7b9c40f820$export$b453a3bfd4a5fa9e(props) {
|
|
|
1147
1147
|
let [showAllItems, setShowAllItems] = useState(false);
|
|
1148
1148
|
let [isFocused, setFocusedState] = useState(false);
|
|
1149
1149
|
let [focusStrategy, setFocusStrategy] = useState(null);
|
|
1150
|
+
let closedDueToEmpty = useRef(false);
|
|
1150
1151
|
let defaultValue = useMemo(() => {
|
|
1151
1152
|
return props.defaultValue !== void 0 ? props.defaultValue : selectionMode === "single" ? props.defaultSelectedKey ?? null : [];
|
|
1152
1153
|
}, [
|
|
@@ -1265,7 +1266,14 @@ function $120eca7b9c40f820$export$b453a3bfd4a5fa9e(props) {
|
|
|
1265
1266
|
let lastSelectedKeyText = useRef(selectedKey != null ? collection.getItem(selectedKey)?.textValue ?? "" : "");
|
|
1266
1267
|
useEffect(() => {
|
|
1267
1268
|
if (isFocused && (filteredCollection.size > 0 || allowsEmptyCollection) && !triggerState.isOpen && inputValue !== lastValue && menuTrigger !== "manual") open(null, "input");
|
|
1268
|
-
if (!showAllItems && !allowsEmptyCollection && triggerState.isOpen && filteredCollection.size === 0)
|
|
1269
|
+
if (!showAllItems && !allowsEmptyCollection && triggerState.isOpen && filteredCollection.size === 0) {
|
|
1270
|
+
closedDueToEmpty.current = true;
|
|
1271
|
+
closeMenu();
|
|
1272
|
+
}
|
|
1273
|
+
if (isFocused && closedDueToEmpty.current && filteredCollection.size > 0 && !triggerState.isOpen && menuTrigger !== "manual") {
|
|
1274
|
+
closedDueToEmpty.current = false;
|
|
1275
|
+
open(null, "input");
|
|
1276
|
+
}
|
|
1269
1277
|
if (displayValue != null && displayValue !== lastValueRef.current && selectionMode === "single") closeMenu();
|
|
1270
1278
|
if (inputValue !== lastValue) {
|
|
1271
1279
|
selectionManager.setFocusedKey(null);
|
|
@@ -1297,6 +1305,7 @@ function $120eca7b9c40f820$export$b453a3bfd4a5fa9e(props) {
|
|
|
1297
1305
|
])
|
|
1298
1306
|
});
|
|
1299
1307
|
let revert = () => {
|
|
1308
|
+
closedDueToEmpty.current = false;
|
|
1300
1309
|
if (allowsCustomValue && selectedKey == null) commitCustomValue();
|
|
1301
1310
|
else commitSelection();
|
|
1302
1311
|
};
|
|
@@ -1326,6 +1335,7 @@ function $120eca7b9c40f820$export$b453a3bfd4a5fa9e(props) {
|
|
|
1326
1335
|
}
|
|
1327
1336
|
};
|
|
1328
1337
|
const commitValue = () => {
|
|
1338
|
+
closedDueToEmpty.current = false;
|
|
1329
1339
|
if (allowsCustomValue) {
|
|
1330
1340
|
const itemText = selectedKey != null ? collection.getItem(selectedKey)?.textValue ?? "" : "";
|
|
1331
1341
|
inputValue === itemText ? commitSelection() : commitCustomValue();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
|
-
import { d as $4064df0d6f9620e1$export$c9058316764c140e, l as $03e8ab2d84d7657a$export$4338b53315abf666, m as $c7eafbbe1ea5834e$export$535bd6ca7f90a273, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
3
|
-
import {
|
|
4
|
-
import { D as $2add3ce32c6007eb$export$78551043582a6a98, U as $23f2114a1b82827e$export$e58f029f0fbfdb29,
|
|
5
|
-
import { d as $901761b40e390936$export$2bb74740c4e19def } from "./useCollection-
|
|
6
|
-
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-
|
|
2
|
+
import { d as $4064df0d6f9620e1$export$c9058316764c140e, h as $c4867b2f328c2698$export$e5c5a5f917a5871c, l as $03e8ab2d84d7657a$export$4338b53315abf666, m as $c7eafbbe1ea5834e$export$535bd6ca7f90a273, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
3
|
+
import { i as $bb39c0fc1c19b34c$export$c57958e35f31ed73 } from "./keyboard-DwWaJveG.js";
|
|
4
|
+
import { D as $2add3ce32c6007eb$export$78551043582a6a98, U as $23f2114a1b82827e$export$e58f029f0fbfdb29, j as $2add3ce32c6007eb$export$fedb369cb70207f1 } from "./useHover-DgudzTcf.js";
|
|
5
|
+
import { d as $901761b40e390936$export$2bb74740c4e19def } from "./useCollection-BVUc8URe.js";
|
|
6
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BV6v3Ytq.js";
|
|
7
7
|
import { t as $2ec61d1d4f780267$export$a8a3e93435678ff9 } from "./Heading-BQje2nS2.js";
|
|
8
|
-
import { _ as $
|
|
9
|
-
import { t as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6 } from "./useOverlayTriggerState-
|
|
10
|
-
import { n as $fcc7165e876206c6$export$6d3443f2c48bfc20, t as $fcc7165e876206c6$export$45fda7c47f93fd48 } from "./animation-
|
|
11
|
-
import { t as Button } from "./button-
|
|
8
|
+
import { _ as $e0a0e4399f316b76$export$b80f73f72d03c10f, b as $58196c8d6a1f38fc$export$1c3ebcada18427bf, g as $0644e3663365bfe5$export$ee0f7cc6afcd1c18, h as $081058010ef8962e$export$2317d149ed6f78c4, i as $f2ff30fde7b014be$export$d2f961adcb0afbe, m as $d7a937236970dc7f$export$c6fdb837b070b4ff, n as $f2ff30fde7b014be$export$3ddf2d174ce01153, p as $d7a937236970dc7f$export$14c98a7594375490, r as $f2ff30fde7b014be$export$8b93a07348a7730c, t as $f2ff30fde7b014be$export$2e1e1122cf0cba88, v as $77844860df94ba23$export$ea8f71083e90600f, y as $58196c8d6a1f38fc$export$1020fa7f77e17884 } from "./Dialog-CSqjSLlO.js";
|
|
9
|
+
import { t as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6 } from "./useOverlayTriggerState-uzs8mam6.js";
|
|
10
|
+
import { n as $fcc7165e876206c6$export$6d3443f2c48bfc20, t as $fcc7165e876206c6$export$45fda7c47f93fd48 } from "./animation-COu1iBGW.js";
|
|
11
|
+
import { t as Button } from "./button-NgEJ1eT2.js";
|
|
12
12
|
import { t as __ } from "./build-module-BISCoQjQ.js";
|
|
13
13
|
import { clear } from "./icons/ui-icons/clear.js";
|
|
14
14
|
import { HStack } from "./components/layout/hstack.js";
|
|
@@ -21,11 +21,22 @@ function $5698867baeb53f4e$export$dbc0f175b25fb0fb(props, state, ref) {
|
|
|
21
21
|
isOpen: state.isOpen,
|
|
22
22
|
onClose: state.close
|
|
23
23
|
}, ref);
|
|
24
|
-
$0644e3663365bfe5$export$ee0f7cc6afcd1c18({
|
|
24
|
+
$0644e3663365bfe5$export$ee0f7cc6afcd1c18({
|
|
25
|
+
isDisabled: !state.isOpen,
|
|
26
|
+
UNSTABLE_overrideFocus: props.UNSTABLE_overrideFocus
|
|
27
|
+
});
|
|
25
28
|
$d7a937236970dc7f$export$14c98a7594375490();
|
|
29
|
+
let { isEntering } = props;
|
|
26
30
|
useEffect(() => {
|
|
27
|
-
if (state.isOpen && ref.current)
|
|
28
|
-
|
|
31
|
+
if (state.isOpen && ref.current) {
|
|
32
|
+
if (isEntering) return $58196c8d6a1f38fc$export$1020fa7f77e17884(ref.current);
|
|
33
|
+
return $58196c8d6a1f38fc$export$1c3ebcada18427bf([ref.current], { shouldUseInert: true });
|
|
34
|
+
}
|
|
35
|
+
}, [
|
|
36
|
+
state.isOpen,
|
|
37
|
+
isEntering,
|
|
38
|
+
ref
|
|
39
|
+
]);
|
|
29
40
|
return {
|
|
30
41
|
modalProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(overlayProps),
|
|
31
42
|
underlayProps
|
|
@@ -36,6 +47,7 @@ function $5698867baeb53f4e$export$dbc0f175b25fb0fb(props, state, ref) {
|
|
|
36
47
|
var $6066a2c586ade9e1$var$visualViewport = typeof document !== "undefined" && window.visualViewport;
|
|
37
48
|
function $6066a2c586ade9e1$export$d699905dd57c73ca() {
|
|
38
49
|
let isSSR = $c7eafbbe1ea5834e$export$535bd6ca7f90a273();
|
|
50
|
+
let unmountRef = useRef(null);
|
|
39
51
|
let [size, setSize] = useState(() => isSSR ? {
|
|
40
52
|
width: 0,
|
|
41
53
|
height: 0
|
|
@@ -51,12 +63,12 @@ function $6066a2c586ade9e1$export$d699905dd57c73ca() {
|
|
|
51
63
|
if ($6066a2c586ade9e1$var$visualViewport && $6066a2c586ade9e1$var$visualViewport.scale > 1) return;
|
|
52
64
|
updateSize($6066a2c586ade9e1$var$getViewportSize());
|
|
53
65
|
};
|
|
54
|
-
let frame;
|
|
55
66
|
let onBlur = (e) => {
|
|
56
67
|
if ($6066a2c586ade9e1$var$visualViewport && $6066a2c586ade9e1$var$visualViewport.scale > 1) return;
|
|
57
|
-
if (
|
|
58
|
-
|
|
59
|
-
if (
|
|
68
|
+
if (!$bb39c0fc1c19b34c$export$c57958e35f31ed73($23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
|
|
69
|
+
unmountRef.current = $e0a0e4399f316b76$export$b80f73f72d03c10f((isOpen) => {
|
|
70
|
+
if (isOpen) return;
|
|
71
|
+
updateSize({
|
|
60
72
|
width: document.documentElement.clientWidth,
|
|
61
73
|
height: document.documentElement.clientHeight
|
|
62
74
|
});
|
|
@@ -67,7 +79,7 @@ function $6066a2c586ade9e1$export$d699905dd57c73ca() {
|
|
|
67
79
|
if (!$6066a2c586ade9e1$var$visualViewport) window.addEventListener("resize", onResize);
|
|
68
80
|
else $6066a2c586ade9e1$var$visualViewport.addEventListener("resize", onResize);
|
|
69
81
|
return () => {
|
|
70
|
-
|
|
82
|
+
unmountRef.current?.();
|
|
71
83
|
if ($2add3ce32c6007eb$export$fedb369cb70207f1() && $2add3ce32c6007eb$export$78551043582a6a98()) window.removeEventListener("blur", onBlur, true);
|
|
72
84
|
if (!$6066a2c586ade9e1$var$visualViewport) window.removeEventListener("resize", onResize);
|
|
73
85
|
else $6066a2c586ade9e1$var$visualViewport.removeEventListener("resize", onResize);
|
|
@@ -86,9 +98,9 @@ function $6066a2c586ade9e1$export$d699905dd57c73ca() {
|
|
|
86
98
|
//#endregion
|
|
87
99
|
//#region node_modules/react-aria-components/dist/private/Modal.mjs
|
|
88
100
|
var $8b8d26808cb8cb53$export$ab57792b9b6974a6 = createContext(null);
|
|
89
|
-
var $8b8d26808cb8cb53$
|
|
101
|
+
var $8b8d26808cb8cb53$export$6bc057cefccad9c8 = createContext(null);
|
|
90
102
|
var $8b8d26808cb8cb53$export$2b77a92f1a5ad772 = forwardRef(function Modal(props, ref) {
|
|
91
|
-
if (useContext($8b8d26808cb8cb53$
|
|
103
|
+
if (useContext($8b8d26808cb8cb53$export$6bc057cefccad9c8)) {
|
|
92
104
|
if (process.env.NODE_ENV !== "production" && (props.onOpenChange || props.defaultOpen !== void 0 || props.isOpen !== void 0)) {
|
|
93
105
|
const invalidSet = new Set([
|
|
94
106
|
"isDismissable",
|
|
@@ -135,8 +147,9 @@ function $8b8d26808cb8cb53$var$ModalOverlayWithForwardRef(props, ref) {
|
|
|
135
147
|
}
|
|
136
148
|
let objectRef = $03e8ab2d84d7657a$export$4338b53315abf666(ref);
|
|
137
149
|
let modalRef = useRef(null);
|
|
138
|
-
let isOverlayExiting = $fcc7165e876206c6$export$45fda7c47f93fd48(objectRef, state.isOpen);
|
|
139
|
-
let
|
|
150
|
+
let isOverlayExiting = $fcc7165e876206c6$export$45fda7c47f93fd48(objectRef, state.isOpen, props.onExit);
|
|
151
|
+
let onExitRef = useRef(null);
|
|
152
|
+
let isModalExiting = $fcc7165e876206c6$export$45fda7c47f93fd48(modalRef, state.isOpen, (element) => onExitRef.current?.(element));
|
|
140
153
|
let isExiting = isOverlayExiting || isModalExiting || props.isExiting || false;
|
|
141
154
|
let isSSR = $c7eafbbe1ea5834e$export$535bd6ca7f90a273();
|
|
142
155
|
if (!state.isOpen && !isExiting || isSSR) return null;
|
|
@@ -145,15 +158,23 @@ function $8b8d26808cb8cb53$var$ModalOverlayWithForwardRef(props, ref) {
|
|
|
145
158
|
state,
|
|
146
159
|
isExiting,
|
|
147
160
|
overlayRef: objectRef,
|
|
148
|
-
modalRef
|
|
161
|
+
modalRef,
|
|
162
|
+
onExitRef
|
|
149
163
|
});
|
|
150
164
|
}
|
|
151
165
|
var $8b8d26808cb8cb53$export$8948f78d83984c69 = forwardRef($8b8d26808cb8cb53$var$ModalOverlayWithForwardRef);
|
|
152
|
-
function $8b8d26808cb8cb53$var$ModalOverlayInner({ UNSTABLE_portalContainer, ...props }) {
|
|
166
|
+
function $8b8d26808cb8cb53$var$ModalOverlayInner({ UNSTABLE_portalContainer, UNSTABLE_deferUntilEntered, ...props }) {
|
|
153
167
|
let modalRef = props.modalRef;
|
|
154
168
|
let { state } = props;
|
|
155
|
-
let
|
|
156
|
-
let entering = $fcc7165e876206c6$export$6d3443f2c48bfc20(props.overlayRef) || props.isEntering || false;
|
|
169
|
+
let [isOpen, setIsOpen] = useState(false);
|
|
170
|
+
let entering = $fcc7165e876206c6$export$6d3443f2c48bfc20(props.overlayRef, isOpen, props.onEnter) || props.isEntering || false;
|
|
171
|
+
let isDeferred = !!UNSTABLE_deferUntilEntered && (!isOpen || entering);
|
|
172
|
+
let { modalProps, underlayProps } = $5698867baeb53f4e$export$dbc0f175b25fb0fb({
|
|
173
|
+
...props,
|
|
174
|
+
isEntering: isDeferred
|
|
175
|
+
}, state, modalRef);
|
|
176
|
+
let dialogContext = useContext($f2ff30fde7b014be$export$8b93a07348a7730c);
|
|
177
|
+
let mergedDialogContext = UNSTABLE_deferUntilEntered ? $8b8d26808cb8cb53$var$mergeDialogContext(dialogContext, { isEntering: isDeferred }) : dialogContext;
|
|
157
178
|
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
158
179
|
...props,
|
|
159
180
|
defaultClassName: "react-aria-ModalOverlay",
|
|
@@ -180,6 +201,7 @@ function $8b8d26808cb8cb53$var$ModalOverlayInner({ UNSTABLE_portalContainer, ...
|
|
|
180
201
|
"--page-width": pageWidth !== void 0 ? pageWidth + "px" : void 0,
|
|
181
202
|
"--page-height": pageHeight !== void 0 ? pageHeight + "px" : void 0
|
|
182
203
|
};
|
|
204
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => $e0a0e4399f316b76$export$b80f73f72d03c10f(() => setIsOpen(true)), []);
|
|
183
205
|
return $3ARPR$react.createElement($d7a937236970dc7f$export$c6fdb837b070b4ff, {
|
|
184
206
|
isExiting: props.isExiting,
|
|
185
207
|
portalContainer: UNSTABLE_portalContainer
|
|
@@ -190,19 +212,42 @@ function $8b8d26808cb8cb53$var$ModalOverlayInner({ UNSTABLE_portalContainer, ...
|
|
|
190
212
|
ref: props.overlayRef,
|
|
191
213
|
"data-entering": entering || void 0,
|
|
192
214
|
"data-exiting": props.isExiting || void 0
|
|
193
|
-
}, $3ARPR$react.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, { values: [
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
215
|
+
}, $3ARPR$react.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, { values: [
|
|
216
|
+
[$8b8d26808cb8cb53$export$6bc057cefccad9c8, {
|
|
217
|
+
modalProps,
|
|
218
|
+
modalRef,
|
|
219
|
+
isExiting: props.isExiting,
|
|
220
|
+
onExitRef: props.onExitRef,
|
|
221
|
+
isOpen,
|
|
222
|
+
isDismissable: props.isDismissable
|
|
223
|
+
}],
|
|
224
|
+
[$f2ff30fde7b014be$export$d2f961adcb0afbe, state],
|
|
225
|
+
[$f2ff30fde7b014be$export$8b93a07348a7730c, mergedDialogContext]
|
|
226
|
+
] }, renderProps.children)));
|
|
227
|
+
}
|
|
228
|
+
function $8b8d26808cb8cb53$var$mergeDialogContext(context, props) {
|
|
229
|
+
if (context && "slots" in context && context.slots) {
|
|
230
|
+
let slots = {};
|
|
231
|
+
for (let key in context.slots) slots[key] = {
|
|
232
|
+
...context.slots[key],
|
|
233
|
+
...props
|
|
234
|
+
};
|
|
235
|
+
return {
|
|
236
|
+
...context,
|
|
237
|
+
slots
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
...context,
|
|
242
|
+
...props
|
|
243
|
+
};
|
|
199
244
|
}
|
|
200
245
|
function $8b8d26808cb8cb53$var$ModalContent(props) {
|
|
201
|
-
let { modalProps, modalRef, isExiting, isDismissable } = useContext($8b8d26808cb8cb53$
|
|
246
|
+
let { modalProps, modalRef, isExiting, onExitRef, isDismissable, isOpen } = useContext($8b8d26808cb8cb53$export$6bc057cefccad9c8);
|
|
202
247
|
let state = useContext($f2ff30fde7b014be$export$d2f961adcb0afbe);
|
|
203
248
|
let mergedRefs = useMemo(() => $4064df0d6f9620e1$export$c9058316764c140e(props.modalRef, modalRef), [props.modalRef, modalRef]);
|
|
204
249
|
let ref = $03e8ab2d84d7657a$export$4338b53315abf666(mergedRefs);
|
|
205
|
-
let entering = $fcc7165e876206c6$export$6d3443f2c48bfc20(ref);
|
|
250
|
+
let entering = $fcc7165e876206c6$export$6d3443f2c48bfc20(ref, isOpen, props.onEnter);
|
|
206
251
|
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
207
252
|
...props,
|
|
208
253
|
defaultClassName: "react-aria-Modal",
|
|
@@ -212,6 +257,9 @@ function $8b8d26808cb8cb53$var$ModalContent(props) {
|
|
|
212
257
|
state
|
|
213
258
|
}
|
|
214
259
|
});
|
|
260
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
261
|
+
if (onExitRef) onExitRef.current = props.onExit;
|
|
262
|
+
});
|
|
215
263
|
return $3ARPR$react.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
216
264
|
...$bbaa08b3cd72f041$export$9d1611c77c2fe928($8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true }), modalProps),
|
|
217
265
|
...renderProps,
|