@eightshift/ui-components 4.0.0 → 5.0.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-CvzGKGCo.js → Button-wERNNG0T.js} +4 -4
- package/dist/{Collection-ddre1L5v.js → Collection-CKsHTyhc.js} +129 -98
- package/dist/{Color-MV5kBVXr.js → Color-BhgbJF5x.js} +1 -1
- package/dist/{ColorSwatch-BqQfVu4L.js → ColorSwatch-Bcn6oRSg.js} +4 -4
- package/dist/{ComboBox-jQ-dk95U.js → ComboBox-D1LPUwWP.js} +19 -19
- package/dist/{Dialog-DX1aiYyE.js → Dialog-D190gMbE.js} +28 -30
- package/dist/{FieldError-52GVSGgC.js → FieldError-DeUh5Wkw.js} +2 -2
- package/dist/{FocusScope-Cri5BFRz.js → FocusScope-C-plSxbS.js} +2 -2
- package/dist/{Group-_emcIVxI.js → Group-C5iZpSAM.js} +3 -3
- package/dist/{Heading-B2153VXe.js → Heading-D-Pboe4p.js} +1 -1
- package/dist/{Input-BxpFEIXV.js → Input--mF4XVE1.js} +6 -6
- package/dist/{Label-icmbmNdI.js → Label-Fp6AwSRn.js} +1 -1
- package/dist/{List-BYNHbol3.js → List-CZMUbkFU.js} +1 -1
- package/dist/{ListBox-mJ4nQaL7.js → ListBox-4oW9kh3R.js} +13 -12
- package/dist/{OverlayArrow-BB0CWwdq.js → OverlayArrow-BpB9uB_I.js} +19 -11
- package/dist/{Select-aab027f3.esm--EmXjiL3.js → Select-aab027f3.esm-BKIJGje-.js} +1 -1
- package/dist/{Separator-D9moUgP8.js → Separator-B88tj5YD.js} +6 -5
- package/dist/{Slider-rz2XRMGm.js → Slider-CyJzC1bp.js} +11 -11
- package/dist/{Text-DVSAPY-K.js → Text-DRpwWot2.js} +1 -1
- package/dist/{VisuallyHidden-f9zX67a_.js → VisuallyHidden-DsKYcRQ_.js} +2 -2
- package/dist/assets/index.css +21 -1
- package/dist/assets/style-admin.css +891 -282
- package/dist/assets/style-editor.css +891 -282
- package/dist/assets/style.css +891 -282
- package/dist/assets/wp-font-enhancements.css +1 -1
- package/dist/assets/wp-ui-enhancements.css +91 -13
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/button/button.js +5 -5
- package/dist/components/checkbox/checkbox.js +9 -9
- package/dist/components/color-pickers/color-swatch.js +8 -7
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +16 -16
- package/dist/components/component-toggle/component-toggle.js +5 -2
- package/dist/components/draggable/draggable.js +2049 -1277
- package/dist/components/draggable-list/draggable-list.js +1 -1
- package/dist/components/expandable/expandable.js +7 -7
- package/dist/components/input-field/input-field.js +7 -7
- package/dist/components/link-input/link-input.js +16 -18
- package/dist/components/menu/menu.js +2 -2
- package/dist/components/modal/modal.js +5 -5
- package/dist/components/number-picker/number-picker.js +9 -9
- package/dist/components/options-panel/options-panel.js +1 -1
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/radio/radio.js +13 -13
- package/dist/components/repeater/repeater.js +1 -1
- package/dist/components/responsive/mini-responsive.js +3 -3
- package/dist/components/responsive/responsive-legacy.js +3 -3
- package/dist/components/responsive/responsive.js +6 -3
- 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/single-select.js +2 -2
- package/dist/components/select/v2/async-select.js +8 -8
- package/dist/components/select/v2/shared.js +2 -2
- package/dist/components/select/v2/single-select.js +19 -18
- package/dist/components/slider/column-config-slider.js +2 -2
- package/dist/components/slider/slider.js +6 -4
- package/dist/components/slider/utils.js +11 -1
- package/dist/components/tabs/tabs.js +16 -14
- package/dist/components/toggle/switch.js +8 -7
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +27 -8
- package/dist/components/tooltip/tooltip.js +6 -4
- package/dist/{context-D2KUdwNL.js → context-BYWrbm1z.js} +1 -1
- package/dist/{index-641ee5b8.esm-BPz6U6sJ.js → index-641ee5b8.esm-BPU8rMZr.js} +5 -5
- package/dist/index-CFozsmNS.js +28321 -0
- package/dist/{index-BKGQ6jGS.js → index-wl5606BX.js} +1 -1
- package/dist/{multi-select-components-BlZZoNXC.js → multi-select-components-Sp-JEFEX.js} +1 -1
- package/dist/{react-select-async.esm-CwUoej5h.js → react-select-async.esm-D937XTWW.js} +3 -3
- package/dist/{react-select.esm-DcwYxadV.js → react-select.esm-Ciai3aKf.js} +3 -3
- package/dist/{textSelection-0UUS8Yfg.js → textSelection-CCcyjiRP.js} +1 -1
- package/dist/{useButton-BpOKDWEN.js → useButton-BOHxkGQF.js} +6 -27
- package/dist/{useEvent-B0b-6KBr.js → useEvent-D5o_CqDH.js} +1 -1
- package/dist/{useFocusRing-CV5l3lf6.js → useFocusRing-nMG2uzxS.js} +5 -5
- package/dist/{useFormReset-C5OggHsw.js → useFormReset-DlmRL87g.js} +1 -1
- package/dist/{useFormValidation-DhDNSjws.js → useFormValidation-D0_aaK-e.js} +2 -2
- package/dist/{useHover-DwDr6ozG.js → useHover-VO5tcIli.js} +58 -68
- package/dist/{useLabel-D7HkNEHT.js → useLabel-BKH4fVA4.js} +3 -3
- package/dist/{useLabels-D8cxd1Z8.js → useLabels-ntF3rFY0.js} +1 -1
- package/dist/{useListState-UGlN5-7P.js → useListState-Cq2Nvr-v.js} +1 -1
- package/dist/{useLocalizedStringFormatter-CFP1YZWQ.js → useLocalizedStringFormatter-CGzwx1a0.js} +1 -1
- package/dist/{useNumberField-CEAj7Mrj.js → useNumberField-C9dmERhP.js} +14 -11
- package/dist/{useNumberFormatter-321rAb4J.js → useNumberFormatter-MrRLgvhj.js} +1 -1
- package/dist/{usePress-DNW8qpY6.js → usePress-DjNo5790.js} +36 -23
- package/dist/{useSingleSelectListState-DC0wWTUM.js → useSingleSelectListState--r3AAhRj.js} +2 -2
- package/dist/{useToggle-BrpmSOB-.js → useToggle-CQaXLe-O.js} +5 -5
- package/dist/{useToggleState-CmQX3SoX.js → useToggleState-C3DLdez5.js} +1 -1
- package/dist/utilities/es-dash.js +6 -0
- package/dist/{utils-DkCSC521.js → utils-B94NDG0v.js} +1 -1
- package/package.json +101 -101
- package/dist/index-BYHhzLf-.js +0 -444
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useLayoutEffect, useEffect, useRef, useMemo, useCallback, useState, createContext, memo, useReducer, useContext } from "react";
|
|
3
|
-
import { r as reactDomExports } from "./index-
|
|
3
|
+
import { r as reactDomExports } from "./index-CFozsmNS.js";
|
|
4
4
|
import { c as clsx } from "./lite-DVmmD_-j.js";
|
|
5
5
|
function useCombinedRefs() {
|
|
6
6
|
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as _objectWithoutProperties, b as _slicedToArray, h as handleInputChange, d as _objectSpread2, e as _defineProperty, _ as _extends } from "./index-641ee5b8.esm-
|
|
1
|
+
import { a as _objectWithoutProperties, b as _slicedToArray, h as handleInputChange, d as _objectSpread2, e as _defineProperty, _ as _extends } from "./index-641ee5b8.esm-BPU8rMZr.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useRef, useState, useEffect, useCallback, forwardRef } from "react";
|
|
4
|
-
import { u as useStateManager, S as Select } from "./Select-aab027f3.esm
|
|
5
|
-
import "./index-
|
|
4
|
+
import { u as useStateManager, S as Select } from "./Select-aab027f3.esm-BKIJGje-.js";
|
|
5
|
+
import "./index-CFozsmNS.js";
|
|
6
6
|
var _excluded = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
|
|
7
7
|
function useAsync(_ref) {
|
|
8
8
|
var _ref$defaultOptions = _ref.defaultOptions, propsDefaultOptions = _ref$defaultOptions === void 0 ? false : _ref$defaultOptions, _ref$cacheOptions = _ref.cacheOptions, cacheOptions = _ref$cacheOptions === void 0 ? false : _ref$cacheOptions, propsLoadOptions = _ref.loadOptions;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { u as useStateManager, S as Select } from "./Select-aab027f3.esm
|
|
2
|
-
import { _ as _extends } from "./index-641ee5b8.esm-
|
|
1
|
+
import { u as useStateManager, S as Select } from "./Select-aab027f3.esm-BKIJGje-.js";
|
|
2
|
+
import { _ as _extends } from "./index-641ee5b8.esm-BPU8rMZr.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-CFozsmNS.js";
|
|
6
6
|
var StateManagedSelect = /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
7
7
|
var baseSelectProps = useStateManager(props);
|
|
8
8
|
return /* @__PURE__ */ React.createElement(Select, _extends({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as $c87311424ea30a05$export$fedb369cb70207f1, d as $431fbd86ca7dc216$export$b204af158042fbac, e as $bbed8b41f857bcc0$export$24490316f764c430 } from "./useHover-
|
|
1
|
+
import { c as $c87311424ea30a05$export$fedb369cb70207f1, d as $431fbd86ca7dc216$export$b204af158042fbac, e as $bbed8b41f857bcc0$export$24490316f764c430 } from "./useHover-VO5tcIli.js";
|
|
2
2
|
let $14c0b72509d70225$var$state = "default";
|
|
3
3
|
let $14c0b72509d70225$var$savedUserSelect = "";
|
|
4
4
|
let $14c0b72509d70225$var$modifiedElementMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,25 +1,9 @@
|
|
|
1
|
-
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-
|
|
1
|
+
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-B94NDG0v.js";
|
|
2
2
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
3
|
-
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-
|
|
4
|
-
import { a as $f645667febf57a63$export$4c014de7c8940b4c } from "./useHover-
|
|
3
|
+
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-DjNo5790.js";
|
|
4
|
+
import { a as $f645667febf57a63$export$4c014de7c8940b4c } from "./useHover-VO5tcIli.js";
|
|
5
5
|
function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
|
|
6
|
-
let {
|
|
7
|
-
elementType = "button",
|
|
8
|
-
isDisabled,
|
|
9
|
-
onPress,
|
|
10
|
-
onPressStart,
|
|
11
|
-
onPressEnd,
|
|
12
|
-
onPressUp,
|
|
13
|
-
onPressChange,
|
|
14
|
-
preventFocusOnPress,
|
|
15
|
-
allowFocusWhenDisabled,
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
onClick: deprecatedOnClick,
|
|
18
|
-
href,
|
|
19
|
-
target,
|
|
20
|
-
rel,
|
|
21
|
-
type = "button"
|
|
22
|
-
} = props;
|
|
6
|
+
let { elementType = "button", isDisabled, onPress, onPressStart, onPressEnd, onPressUp, onPressChange, preventFocusOnPress, allowFocusWhenDisabled, onClick, href, target, rel, type = "button" } = props;
|
|
23
7
|
let additionalProps;
|
|
24
8
|
if (elementType === "button") additionalProps = {
|
|
25
9
|
type,
|
|
@@ -40,6 +24,7 @@ function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
|
|
|
40
24
|
onPressChange,
|
|
41
25
|
onPress,
|
|
42
26
|
onPressUp,
|
|
27
|
+
onClick,
|
|
43
28
|
isDisabled,
|
|
44
29
|
preventFocusOnPress,
|
|
45
30
|
ref
|
|
@@ -56,13 +41,7 @@ function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
|
|
|
56
41
|
"aria-expanded": props["aria-expanded"],
|
|
57
42
|
"aria-controls": props["aria-controls"],
|
|
58
43
|
"aria-pressed": props["aria-pressed"],
|
|
59
|
-
"aria-current": props["aria-current"]
|
|
60
|
-
onClick: (e) => {
|
|
61
|
-
if (deprecatedOnClick) {
|
|
62
|
-
deprecatedOnClick(e);
|
|
63
|
-
console.warn("onClick is deprecated, please use onPress");
|
|
64
|
-
}
|
|
65
|
-
}
|
|
44
|
+
"aria-current": props["aria-current"]
|
|
66
45
|
})
|
|
67
46
|
};
|
|
68
47
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-
|
|
1
|
+
import { f as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-B94NDG0v.js";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options) {
|
|
4
4
|
let handleEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(handler);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as $03deb23ff14920c4$export$4eaf04e54aa8eed6, h as $8a9cb279dc87e130$export$715c682d09d639cc, d as $431fbd86ca7dc216$export$b204af158042fbac, i as $d4ee10de306f2510$export$cd4e5573fbe2b576, j as $d4ee10de306f2510$export$e58f029f0fbfdb29, k as $d4ee10de306f2510$export$4282f70798064fe0, l as $8a9cb279dc87e130$export$
|
|
1
|
+
import { g as $03deb23ff14920c4$export$4eaf04e54aa8eed6, h as $8a9cb279dc87e130$export$715c682d09d639cc, d as $431fbd86ca7dc216$export$b204af158042fbac, i as $d4ee10de306f2510$export$cd4e5573fbe2b576, j as $d4ee10de306f2510$export$e58f029f0fbfdb29, k as $d4ee10de306f2510$export$4282f70798064fe0, l as $8a9cb279dc87e130$export$c2b7abe5d61ec696, m as $8a9cb279dc87e130$export$525bc4921d56d4a, n as $507fabe10e71c6fb$export$b9b3dfddab17db27, o as $507fabe10e71c6fb$export$ec71b4b83ac08ec3, p as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 } from "./useHover-VO5tcIli.js";
|
|
2
2
|
import { useRef, useCallback, useState } from "react";
|
|
3
3
|
function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
4
4
|
let { isDisabled, onBlurWithin, onFocusWithin, onFocusWithinChange } = props;
|
|
@@ -33,11 +33,11 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
33
33
|
let currentTarget = e.currentTarget;
|
|
34
34
|
addGlobalListener(ownerDocument, "focus", (e2) => {
|
|
35
35
|
if (state.current.isFocusWithin && !$d4ee10de306f2510$export$4282f70798064fe0(currentTarget, e2.target)) {
|
|
36
|
-
let
|
|
36
|
+
let nativeEvent = new ownerDocument.defaultView.FocusEvent("blur", {
|
|
37
37
|
relatedTarget: e2.target
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
event
|
|
38
|
+
});
|
|
39
|
+
$8a9cb279dc87e130$export$c2b7abe5d61ec696(nativeEvent, currentTarget);
|
|
40
|
+
let event = $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent);
|
|
41
41
|
onBlur(event);
|
|
42
42
|
}
|
|
43
43
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-
|
|
1
|
+
import { f as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-B94NDG0v.js";
|
|
2
2
|
import { useRef, useEffect } from "react";
|
|
3
3
|
function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
|
|
4
4
|
let resetValue = useRef(initialValue);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo, useContext, createContext, useState, useRef, useEffect } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, f as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-
|
|
2
|
+
import { q as $507fabe10e71c6fb$export$8397ddfc504fdb9a } from "./useHover-VO5tcIli.js";
|
|
3
|
+
import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, f as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-B94NDG0v.js";
|
|
4
4
|
const $e5be200c675c3b3a$export$aca958c65c314e6c = {
|
|
5
5
|
badInput: false,
|
|
6
6
|
customError: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { useRef, useCallback, useEffect, useState, useContext, useMemo } from "react";
|
|
2
|
-
import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, n as $b5e257d569688ac6$export$535bd6ca7f90a273, l as $df56164dff5785e2$export$4338b53315abf666, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-
|
|
2
|
+
import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, n as $b5e257d569688ac6$export$535bd6ca7f90a273, l as $df56164dff5785e2$export$4338b53315abf666, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-B94NDG0v.js";
|
|
3
3
|
const $431fbd86ca7dc216$export$b204af158042fbac = (el) => {
|
|
4
4
|
var _el_ownerDocument;
|
|
5
5
|
return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
|
|
@@ -108,6 +108,7 @@ function $c87311424ea30a05$var$testPlatform(re) {
|
|
|
108
108
|
return typeof window !== "undefined" && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
|
|
109
109
|
}
|
|
110
110
|
function $c87311424ea30a05$var$cached(fn) {
|
|
111
|
+
if (process.env.NODE_ENV === "test") return fn;
|
|
111
112
|
let res = null;
|
|
112
113
|
return () => {
|
|
113
114
|
if (res == null) res = fn();
|
|
@@ -275,7 +276,7 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
275
276
|
let isControlled = value !== void 0;
|
|
276
277
|
useEffect(() => {
|
|
277
278
|
let wasControlled = isControlledRef.current;
|
|
278
|
-
if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
|
|
279
|
+
if (wasControlled !== isControlled && process.env.NODE_ENV !== "production") console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
|
|
279
280
|
isControlledRef.current = isControlled;
|
|
280
281
|
}, [
|
|
281
282
|
isControlled
|
|
@@ -290,7 +291,7 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
290
291
|
currentValue = value3;
|
|
291
292
|
};
|
|
292
293
|
if (typeof value2 === "function") {
|
|
293
|
-
console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320");
|
|
294
|
+
if (process.env.NODE_ENV !== "production") console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320");
|
|
294
295
|
let updateFunction = (oldValue, ...functionArgs) => {
|
|
295
296
|
let interceptedValue = value2(isControlled ? currentValue : oldValue, ...functionArgs);
|
|
296
297
|
onChangeCaller(interceptedValue, ...args);
|
|
@@ -312,36 +313,22 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
312
313
|
setValue
|
|
313
314
|
];
|
|
314
315
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
constructor(type, nativeEvent) {
|
|
333
|
-
this.nativeEvent = nativeEvent;
|
|
334
|
-
this.target = nativeEvent.target;
|
|
335
|
-
this.currentTarget = nativeEvent.currentTarget;
|
|
336
|
-
this.relatedTarget = nativeEvent.relatedTarget;
|
|
337
|
-
this.bubbles = nativeEvent.bubbles;
|
|
338
|
-
this.cancelable = nativeEvent.cancelable;
|
|
339
|
-
this.defaultPrevented = nativeEvent.defaultPrevented;
|
|
340
|
-
this.eventPhase = nativeEvent.eventPhase;
|
|
341
|
-
this.isTrusted = nativeEvent.isTrusted;
|
|
342
|
-
this.timeStamp = nativeEvent.timeStamp;
|
|
343
|
-
this.type = type;
|
|
344
|
-
}
|
|
316
|
+
function $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent) {
|
|
317
|
+
let event = nativeEvent;
|
|
318
|
+
event.nativeEvent = nativeEvent;
|
|
319
|
+
event.isDefaultPrevented = () => event.defaultPrevented;
|
|
320
|
+
event.isPropagationStopped = () => event.cancelBubble;
|
|
321
|
+
event.persist = () => {
|
|
322
|
+
};
|
|
323
|
+
return event;
|
|
324
|
+
}
|
|
325
|
+
function $8a9cb279dc87e130$export$c2b7abe5d61ec696(event, target) {
|
|
326
|
+
Object.defineProperty(event, "target", {
|
|
327
|
+
value: target
|
|
328
|
+
});
|
|
329
|
+
Object.defineProperty(event, "currentTarget", {
|
|
330
|
+
value: target
|
|
331
|
+
});
|
|
345
332
|
}
|
|
346
333
|
function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
347
334
|
let stateRef = useRef({
|
|
@@ -366,8 +353,10 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
366
353
|
let target = e.target;
|
|
367
354
|
let onBlurHandler = (e2) => {
|
|
368
355
|
stateRef.current.isFocused = false;
|
|
369
|
-
if (target.disabled)
|
|
370
|
-
|
|
356
|
+
if (target.disabled) {
|
|
357
|
+
let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e2);
|
|
358
|
+
dispatchBlur(event);
|
|
359
|
+
}
|
|
371
360
|
if (stateRef.current.observer) {
|
|
372
361
|
stateRef.current.observer.disconnect();
|
|
373
362
|
stateRef.current.observer = null;
|
|
@@ -518,7 +507,7 @@ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {
|
|
|
518
507
|
documentObject.addEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
519
508
|
documentObject.addEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
520
509
|
documentObject.addEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
521
|
-
} else {
|
|
510
|
+
} else if (process.env.NODE_ENV === "test") {
|
|
522
511
|
documentObject.addEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
523
512
|
documentObject.addEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
524
513
|
documentObject.addEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
@@ -547,7 +536,7 @@ const $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener
|
|
|
547
536
|
documentObject.removeEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
548
537
|
documentObject.removeEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
549
538
|
documentObject.removeEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
550
|
-
} else {
|
|
539
|
+
} else if (process.env.NODE_ENV === "test") {
|
|
551
540
|
documentObject.removeEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
552
541
|
documentObject.removeEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
553
542
|
documentObject.removeEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
@@ -680,7 +669,7 @@ function $93925083ecbb358c$export$48d1ea6320830260(handler) {
|
|
|
680
669
|
return e.isDefaultPrevented();
|
|
681
670
|
},
|
|
682
671
|
stopPropagation() {
|
|
683
|
-
if (shouldStopPropagation) console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");
|
|
672
|
+
if (shouldStopPropagation && process.env.NODE_ENV !== "production") console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");
|
|
684
673
|
else shouldStopPropagation = true;
|
|
685
674
|
},
|
|
686
675
|
continuePropagation() {
|
|
@@ -756,13 +745,13 @@ function $6179b936705e76d3$var$handleGlobalPointerEvent(e) {
|
|
|
756
745
|
function $6179b936705e76d3$var$setupGlobalTouchEvents() {
|
|
757
746
|
if (typeof document === "undefined") return;
|
|
758
747
|
if (typeof PointerEvent !== "undefined") document.addEventListener("pointerup", $6179b936705e76d3$var$handleGlobalPointerEvent);
|
|
759
|
-
else document.addEventListener("touchend", $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents);
|
|
748
|
+
else if (process.env.NODE_ENV === "test") document.addEventListener("touchend", $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents);
|
|
760
749
|
$6179b936705e76d3$var$hoverCount++;
|
|
761
750
|
return () => {
|
|
762
751
|
$6179b936705e76d3$var$hoverCount--;
|
|
763
752
|
if ($6179b936705e76d3$var$hoverCount > 0) return;
|
|
764
753
|
if (typeof PointerEvent !== "undefined") document.removeEventListener("pointerup", $6179b936705e76d3$var$handleGlobalPointerEvent);
|
|
765
|
-
else document.removeEventListener("touchend", $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents);
|
|
754
|
+
else if (process.env.NODE_ENV === "test") document.removeEventListener("touchend", $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents);
|
|
766
755
|
};
|
|
767
756
|
}
|
|
768
757
|
function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
@@ -820,7 +809,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
820
809
|
hoverProps2.onPointerLeave = (e) => {
|
|
821
810
|
if (!isDisabled && e.currentTarget.contains(e.target)) triggerHoverEnd2(e, e.pointerType);
|
|
822
811
|
};
|
|
823
|
-
} else {
|
|
812
|
+
} else if (process.env.NODE_ENV === "test") {
|
|
824
813
|
hoverProps2.onTouchStart = () => {
|
|
825
814
|
state.ignoreEmulatedMouseEvents = true;
|
|
826
815
|
};
|
|
@@ -859,18 +848,19 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
859
848
|
}
|
|
860
849
|
export {
|
|
861
850
|
$6179b936705e76d3$export$ae780daf29e6d456 as $,
|
|
862
|
-
$
|
|
863
|
-
$c87311424ea30a05$export$
|
|
864
|
-
$c87311424ea30a05$export$
|
|
865
|
-
$c87311424ea30a05$export$
|
|
866
|
-
$
|
|
867
|
-
$
|
|
868
|
-
$
|
|
869
|
-
$
|
|
870
|
-
$
|
|
871
|
-
$
|
|
872
|
-
$c87311424ea30a05$export$
|
|
873
|
-
$
|
|
851
|
+
$46d819fcbaf35654$export$8f71654801c2f7cd as A,
|
|
852
|
+
$c87311424ea30a05$export$9ac100e40613ea10 as B,
|
|
853
|
+
$c87311424ea30a05$export$78551043582a6a98 as C,
|
|
854
|
+
$c87311424ea30a05$export$b7d78993b74f766d as D,
|
|
855
|
+
$c87311424ea30a05$export$7bef049ce92e4224 as E,
|
|
856
|
+
$6a7db85432448f7f$export$29bf1b5f2c56cf63 as F,
|
|
857
|
+
$8a9cb279dc87e130$export$cabe61c495ee3649 as G,
|
|
858
|
+
$6a7db85432448f7f$export$60278871457622de as H,
|
|
859
|
+
$e7801be82b4b2a53$export$4debdb1a3f0fa79e as I,
|
|
860
|
+
$f645667febf57a63$export$f9762fab77588ecb as J,
|
|
861
|
+
$c87311424ea30a05$export$e1865c3bedcd822b as K,
|
|
862
|
+
$c87311424ea30a05$export$186c6964ca17d99 as L,
|
|
863
|
+
$507fabe10e71c6fb$export$98e20ec92f614cfe as M,
|
|
874
864
|
$f645667febf57a63$export$4c014de7c8940b4c as a,
|
|
875
865
|
$458b0a5536c1a7cf$export$40bfa8c7b0832715 as b,
|
|
876
866
|
$c87311424ea30a05$export$fedb369cb70207f1 as c,
|
|
@@ -882,19 +872,19 @@ export {
|
|
|
882
872
|
$d4ee10de306f2510$export$cd4e5573fbe2b576 as i,
|
|
883
873
|
$d4ee10de306f2510$export$e58f029f0fbfdb29 as j,
|
|
884
874
|
$d4ee10de306f2510$export$4282f70798064fe0 as k,
|
|
885
|
-
$8a9cb279dc87e130$export$
|
|
886
|
-
$
|
|
887
|
-
$507fabe10e71c6fb$export$
|
|
888
|
-
$
|
|
889
|
-
$
|
|
890
|
-
$
|
|
891
|
-
$
|
|
892
|
-
$b4b717babfbb907b$export$
|
|
893
|
-
$
|
|
894
|
-
$
|
|
895
|
-
$c87311424ea30a05$export$
|
|
896
|
-
$
|
|
897
|
-
$
|
|
898
|
-
$
|
|
899
|
-
$
|
|
875
|
+
$8a9cb279dc87e130$export$c2b7abe5d61ec696 as l,
|
|
876
|
+
$8a9cb279dc87e130$export$525bc4921d56d4a as m,
|
|
877
|
+
$507fabe10e71c6fb$export$b9b3dfddab17db27 as n,
|
|
878
|
+
$507fabe10e71c6fb$export$ec71b4b83ac08ec3 as o,
|
|
879
|
+
$a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as p,
|
|
880
|
+
$507fabe10e71c6fb$export$8397ddfc504fdb9a as q,
|
|
881
|
+
$f4e2df6bd15f8569$export$98658e8c59125e6a as r,
|
|
882
|
+
$b4b717babfbb907b$export$bebd5a1431fec25d as s,
|
|
883
|
+
$b4b717babfbb907b$export$4c063cf1350e6fed as t,
|
|
884
|
+
$3ad3f6e1647bc98d$export$80f3e147d781571c as u,
|
|
885
|
+
$c87311424ea30a05$export$a11b0059900ceec8 as v,
|
|
886
|
+
$c87311424ea30a05$export$6446a186d09e379e as w,
|
|
887
|
+
$507fabe10e71c6fb$export$630ff653c5ada6a9 as x,
|
|
888
|
+
$f645667febf57a63$export$13f3202a3e5ddd5 as y,
|
|
889
|
+
$7215afc6de606d6b$export$de79e2c695e052f3 as z
|
|
900
890
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-
|
|
2
|
-
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-
|
|
1
|
+
import { e as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-B94NDG0v.js";
|
|
2
|
+
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-ntF3rFY0.js";
|
|
3
3
|
function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
4
4
|
let { id, label, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, labelElementType = "label" } = props;
|
|
5
5
|
id = $bdb11010cef70236$export$f680877a34711e37(id);
|
|
@@ -11,7 +11,7 @@ function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
|
11
11
|
id: labelId,
|
|
12
12
|
htmlFor: labelElementType === "label" ? id : void 0
|
|
13
13
|
};
|
|
14
|
-
} else if (!ariaLabelledby && !ariaLabel) console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");
|
|
14
|
+
} else if (!ariaLabelledby && !ariaLabel && process.env.NODE_ENV !== "production") console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");
|
|
15
15
|
let fieldProps = $313b98861ee5dd6c$export$d6875122194c7b44({
|
|
16
16
|
id,
|
|
17
17
|
"aria-label": ariaLabel,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-
|
|
1
|
+
import { e as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-B94NDG0v.js";
|
|
2
2
|
function $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) {
|
|
3
3
|
let { id, "aria-label": label, "aria-labelledby": labelledBy } = props;
|
|
4
4
|
id = $bdb11010cef70236$export$f680877a34711e37(id);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as $7af3f5b51489e0b5$export$253fe78d46329472, a as $7613b1592d41b092$export$6cd28814d92fa9c9, b as $d496c0a20b6e58ec$export$6c8a5aaad13c9852 } from "./Collection-
|
|
1
|
+
import { $ as $7af3f5b51489e0b5$export$253fe78d46329472, a as $7613b1592d41b092$export$6cd28814d92fa9c9, b as $d496c0a20b6e58ec$export$6c8a5aaad13c9852 } from "./Collection-CKsHTyhc.js";
|
|
2
2
|
import { useMemo, useCallback, useRef, useEffect } from "react";
|
|
3
3
|
class $a02d57049d202695$export$d085fb9e920b5ca7 {
|
|
4
4
|
*[Symbol.iterator]() {
|
package/dist/{useLocalizedStringFormatter-CFP1YZWQ.js → useLocalizedStringFormatter-CGzwx1a0.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
1
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BYWrbm1z.js";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
const $5b160d28a433310d$var$localeSymbol = Symbol.for("react-aria.i18n.locale");
|
|
4
4
|
const $5b160d28a433310d$var$stringsSymbol = Symbol.for("react-aria.i18n.strings");
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { b as $458b0a5536c1a7cf$export$40bfa8c7b0832715, g as $03deb23ff14920c4$export$4eaf04e54aa8eed6,
|
|
1
|
+
import { b as $458b0a5536c1a7cf$export$40bfa8c7b0832715, g as $03deb23ff14920c4$export$4eaf04e54aa8eed6, p as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, L as $c87311424ea30a05$export$186c6964ca17d99, v as $c87311424ea30a05$export$a11b0059900ceec8, c as $c87311424ea30a05$export$fedb369cb70207f1 } from "./useHover-VO5tcIli.js";
|
|
2
2
|
import { $ as $9446cca9a3875146$export$cb6e0bb50bc19463, a as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./number-GajL10e1.js";
|
|
3
|
-
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, b as $e5be200c675c3b3a$export$a763b9476acd3eb } from "./useFormValidation-
|
|
3
|
+
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, b as $e5be200c675c3b3a$export$a763b9476acd3eb } from "./useFormValidation-D0_aaK-e.js";
|
|
4
4
|
import { $ as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 } from "./NumberFormatter-DA8u1Ot7.js";
|
|
5
5
|
import { useCallback, useState, useMemo, useEffect, useRef } from "react";
|
|
6
|
-
import { f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, p as $ff5963eb1fccf552$export$e08e3b67e392101e } from "./utils-
|
|
6
|
+
import { f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, p as $ff5963eb1fccf552$export$e08e3b67e392101e } from "./utils-B94NDG0v.js";
|
|
7
7
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
8
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-
|
|
9
|
-
import { a as $9ab94262bd0047c7$export$420e68273165f4ec } from "./useFocusRing-
|
|
10
|
-
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-
|
|
11
|
-
import { b as $2d73ec29415bd339$export$712718f7aec83d5 } from "./Input
|
|
12
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
13
|
-
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-
|
|
14
|
-
import { c as $319e236875307eab$export$d10ae4f68404609a, b as $319e236875307eab$export$a9b970dcc4ae71a9 } from "./Button-
|
|
8
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-DlmRL87g.js";
|
|
9
|
+
import { a as $9ab94262bd0047c7$export$420e68273165f4ec } from "./useFocusRing-nMG2uzxS.js";
|
|
10
|
+
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-D5o_CqDH.js";
|
|
11
|
+
import { b as $2d73ec29415bd339$export$712718f7aec83d5 } from "./Input--mF4XVE1.js";
|
|
12
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-CGzwx1a0.js";
|
|
13
|
+
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-MrRLgvhj.js";
|
|
14
|
+
import { c as $319e236875307eab$export$d10ae4f68404609a, b as $319e236875307eab$export$a9b970dcc4ae71a9 } from "./Button-wERNNG0T.js";
|
|
15
15
|
function $7d0a636d7a4dcefd$export$2123ff2b87c81ca(props, ref) {
|
|
16
16
|
let { onScroll, isDisabled } = props;
|
|
17
17
|
let onScrollHandler = useCallback((e) => {
|
|
@@ -128,7 +128,10 @@ class $6c7bd7858deea686$var$NumberParserImpl {
|
|
|
128
128
|
}
|
|
129
129
|
if (this.symbols.group) value = $6c7bd7858deea686$var$replaceAll(value, ".", this.symbols.group);
|
|
130
130
|
}
|
|
131
|
-
if (this.options.locale === "fr-FR"
|
|
131
|
+
if (this.options.locale === "fr-FR" && this.symbols.group) {
|
|
132
|
+
value = $6c7bd7858deea686$var$replaceAll(value, " ", this.symbols.group);
|
|
133
|
+
value = $6c7bd7858deea686$var$replaceAll(value, /\u00A0/g, this.symbols.group);
|
|
134
|
+
}
|
|
132
135
|
return value;
|
|
133
136
|
}
|
|
134
137
|
isValidPartialNumber(value, minValue = -Infinity, maxValue = Infinity) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
1
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BYWrbm1z.js";
|
|
2
2
|
import { $ as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 } from "./NumberFormatter-DA8u1Ot7.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
function $a916eb452884faea$export$b7a616150fdb9f44(options = {}) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as $
|
|
1
|
+
import { D as $c87311424ea30a05$export$b7d78993b74f766d, C as $c87311424ea30a05$export$78551043582a6a98, B as $c87311424ea30a05$export$9ac100e40613ea10, E as $c87311424ea30a05$export$7bef049ce92e4224, z as $7215afc6de606d6b$export$de79e2c695e052f3, g as $03deb23ff14920c4$export$4eaf04e54aa8eed6, l as $8a9cb279dc87e130$export$c2b7abe5d61ec696, m as $8a9cb279dc87e130$export$525bc4921d56d4a, k as $d4ee10de306f2510$export$4282f70798064fe0, j as $d4ee10de306f2510$export$e58f029f0fbfdb29, F as $6a7db85432448f7f$export$29bf1b5f2c56cf63, d as $431fbd86ca7dc216$export$b204af158042fbac, G as $8a9cb279dc87e130$export$cabe61c495ee3649, H as $6a7db85432448f7f$export$60278871457622de, f as $431fbd86ca7dc216$export$f21a1ffae260145a, I as $e7801be82b4b2a53$export$4debdb1a3f0fa79e } from "./useHover-VO5tcIli.js";
|
|
2
|
+
import { $ as $14c0b72509d70225$export$b0d6fa1ab32e3295, a as $14c0b72509d70225$export$16a4697467175487 } from "./textSelection-CCcyjiRP.js";
|
|
2
3
|
import React__default, { useContext, createContext, useState, useRef, useMemo, useEffect } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { r as reactDomExports } from "./index-BYHhzLf-.js";
|
|
4
|
+
import { f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, d as $3ef42575df84b30b$export$9d1611c77c2fe928, p as $ff5963eb1fccf552$export$e08e3b67e392101e } from "./utils-B94NDG0v.js";
|
|
5
|
+
import { r as reactDomExports } from "./index-CFozsmNS.js";
|
|
6
6
|
const $ea8dcbcb9ea1b556$var$RouterContext = /* @__PURE__ */ createContext({
|
|
7
7
|
isNative: true,
|
|
8
8
|
open: $ea8dcbcb9ea1b556$var$openSyntheticLink,
|
|
@@ -18,7 +18,7 @@ function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening
|
|
|
18
18
|
if ($c87311424ea30a05$export$9ac100e40613ea10()) metaKey = true;
|
|
19
19
|
else ctrlKey = true;
|
|
20
20
|
}
|
|
21
|
-
let event = $c87311424ea30a05$export$78551043582a6a98() && $c87311424ea30a05$export$9ac100e40613ea10() && !$c87311424ea30a05$export$7bef049ce92e4224() &&
|
|
21
|
+
let event = $c87311424ea30a05$export$78551043582a6a98() && $c87311424ea30a05$export$9ac100e40613ea10() && !$c87311424ea30a05$export$7bef049ce92e4224() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
|
|
22
22
|
keyIdentifier: "Enter",
|
|
23
23
|
metaKey,
|
|
24
24
|
ctrlKey,
|
|
@@ -164,21 +164,7 @@ class $f6c31cce2adf654f$var$PressEvent {
|
|
|
164
164
|
}
|
|
165
165
|
const $f6c31cce2adf654f$var$LINK_CLICKED = Symbol("linkClicked");
|
|
166
166
|
function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
167
|
-
let {
|
|
168
|
-
onPress,
|
|
169
|
-
onPressChange,
|
|
170
|
-
onPressStart,
|
|
171
|
-
onPressEnd,
|
|
172
|
-
onPressUp,
|
|
173
|
-
isDisabled,
|
|
174
|
-
isPressed: isPressedProp,
|
|
175
|
-
preventFocusOnPress,
|
|
176
|
-
shouldCancelOnPointerExit,
|
|
177
|
-
allowTextSelectionOnPress,
|
|
178
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
179
|
-
ref: _,
|
|
180
|
-
...domProps
|
|
181
|
-
} = $f6c31cce2adf654f$var$usePressResponderContext(props);
|
|
167
|
+
let { onPress, onPressChange, onPressStart, onPressEnd, onPressUp, onClick, isDisabled, isPressed: isPressedProp, preventFocusOnPress, shouldCancelOnPointerExit, allowTextSelectionOnPress, ref: domRef, ...domProps } = $f6c31cce2adf654f$var$usePressResponderContext(props);
|
|
182
168
|
let [isPressed, setPressed] = useState(false);
|
|
183
169
|
let ref = useRef({
|
|
184
170
|
isPressed: false,
|
|
@@ -258,6 +244,16 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
258
244
|
let cancelOnPointerExit = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
|
|
259
245
|
if (shouldCancelOnPointerExit) cancel(e);
|
|
260
246
|
});
|
|
247
|
+
let triggerClick = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
|
|
248
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
249
|
+
});
|
|
250
|
+
let triggerSyntheticClick = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e, target) => {
|
|
251
|
+
if (onClick) {
|
|
252
|
+
let event = new MouseEvent("click", e);
|
|
253
|
+
$8a9cb279dc87e130$export$c2b7abe5d61ec696(event, target);
|
|
254
|
+
onClick($8a9cb279dc87e130$export$525bc4921d56d4a(event));
|
|
255
|
+
}
|
|
256
|
+
});
|
|
261
257
|
let pressProps = useMemo(() => {
|
|
262
258
|
let state = ref.current;
|
|
263
259
|
let pressProps2 = {
|
|
@@ -290,11 +286,13 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
290
286
|
let stopPressStart = triggerPressStart(e, "virtual");
|
|
291
287
|
let stopPressUp = triggerPressUp(e, "virtual");
|
|
292
288
|
let stopPressEnd = triggerPressEnd(e, "virtual");
|
|
289
|
+
triggerClick(e);
|
|
293
290
|
shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;
|
|
294
291
|
} else if (state.isPressed && state.pointerType !== "keyboard") {
|
|
295
292
|
let pointerType = state.pointerType || e.nativeEvent.pointerType || "virtual";
|
|
296
293
|
shouldStopPropagation = triggerPressEnd($f6c31cce2adf654f$var$createEvent(e.currentTarget, e), pointerType, true);
|
|
297
294
|
state.isOverTarget = false;
|
|
295
|
+
triggerClick(e);
|
|
298
296
|
cancel(e);
|
|
299
297
|
}
|
|
300
298
|
state.ignoreEmulatedMouseEvents = false;
|
|
@@ -308,7 +306,9 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
308
306
|
var _state_metaKeyEvents1;
|
|
309
307
|
if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard($d4ee10de306f2510$export$e58f029f0fbfdb29(e), e.key)) e.preventDefault();
|
|
310
308
|
let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
|
|
311
|
-
|
|
309
|
+
let wasPressed = $d4ee10de306f2510$export$4282f70798064fe0(state.target, $d4ee10de306f2510$export$e58f029f0fbfdb29(e));
|
|
310
|
+
triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), "keyboard", wasPressed);
|
|
311
|
+
if (wasPressed) triggerSyntheticClick(e, state.target);
|
|
312
312
|
removeAllGlobalListeners();
|
|
313
313
|
if (e.key !== "Enter" && $f6c31cce2adf654f$var$isHTMLAnchorLink(state.target) && $d4ee10de306f2510$export$4282f70798064fe0(state.target, target) && !e[$f6c31cce2adf654f$var$LINK_CLICKED]) {
|
|
314
314
|
e[$f6c31cce2adf654f$var$LINK_CLICKED] = true;
|
|
@@ -399,7 +399,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
399
399
|
if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent))) return;
|
|
400
400
|
cancel(e);
|
|
401
401
|
};
|
|
402
|
-
} else {
|
|
402
|
+
} else if (process.env.NODE_ENV === "test") {
|
|
403
403
|
pressProps2.onMouseDown = (e) => {
|
|
404
404
|
if (e.button !== 0 || !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent))) return;
|
|
405
405
|
if (state.ignoreEmulatedMouseEvents) {
|
|
@@ -497,6 +497,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
497
497
|
if (touch && $f6c31cce2adf654f$var$isOverTarget(touch, e.currentTarget) && state.pointerType != null) {
|
|
498
498
|
triggerPressUp($f6c31cce2adf654f$var$createTouchEvent(state.target, e), state.pointerType);
|
|
499
499
|
shouldStopPropagation = triggerPressEnd($f6c31cce2adf654f$var$createTouchEvent(state.target, e), state.pointerType);
|
|
500
|
+
triggerSyntheticClick(e.nativeEvent, state.target);
|
|
500
501
|
} else if (state.isOverTarget && state.pointerType != null) shouldStopPropagation = triggerPressEnd($f6c31cce2adf654f$var$createTouchEvent(state.target, e), state.pointerType, false);
|
|
501
502
|
if (shouldStopPropagation) e.stopPropagation();
|
|
502
503
|
state.isPressed = false;
|
|
@@ -536,7 +537,19 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
536
537
|
cancelOnPointerExit,
|
|
537
538
|
triggerPressEnd,
|
|
538
539
|
triggerPressStart,
|
|
539
|
-
triggerPressUp
|
|
540
|
+
triggerPressUp,
|
|
541
|
+
triggerClick,
|
|
542
|
+
triggerSyntheticClick
|
|
543
|
+
]);
|
|
544
|
+
useEffect(() => {
|
|
545
|
+
let element = domRef === null || domRef === void 0 ? void 0 : domRef.current;
|
|
546
|
+
if (element && element instanceof $431fbd86ca7dc216$export$f21a1ffae260145a(element).Element) {
|
|
547
|
+
let style = $431fbd86ca7dc216$export$f21a1ffae260145a(element).getComputedStyle(element);
|
|
548
|
+
if (style.touchAction === "auto")
|
|
549
|
+
element.style.touchAction = "pan-x pan-y pinch-zoom";
|
|
550
|
+
}
|
|
551
|
+
}, [
|
|
552
|
+
domRef
|
|
540
553
|
]);
|
|
541
554
|
useEffect(() => {
|
|
542
555
|
let state = ref.current;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as $e72dd72e1c76a225$export$2f645645f7bca764 } from "./useListState-
|
|
2
|
-
import { b as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-
|
|
1
|
+
import { $ as $e72dd72e1c76a225$export$2f645645f7bca764 } from "./useListState-Cq2Nvr-v.js";
|
|
2
|
+
import { b as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-VO5tcIli.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
function $a0d645289fe9b86b$export$e7f05e985daf4b5f(props) {
|
|
5
5
|
var _props_defaultSelectedKey;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-
|
|
1
|
+
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-B94NDG0v.js";
|
|
2
2
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
3
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-
|
|
4
|
-
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-
|
|
5
|
-
import { a as $f645667febf57a63$export$4c014de7c8940b4c } from "./useHover-
|
|
3
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-DlmRL87g.js";
|
|
4
|
+
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-DjNo5790.js";
|
|
5
|
+
import { a as $f645667febf57a63$export$4c014de7c8940b4c } from "./useHover-VO5tcIli.js";
|
|
6
6
|
function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
|
|
7
7
|
let { isDisabled = false, isReadOnly = false, value, name, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, validationState = "valid", isInvalid } = props;
|
|
8
8
|
let onChange = (e) => {
|
|
@@ -11,7 +11,7 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
|
|
|
11
11
|
};
|
|
12
12
|
let hasChildren = children != null;
|
|
13
13
|
let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
|
|
14
|
-
if (!hasChildren && !hasAriaLabel) console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
14
|
+
if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== "production") console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
15
15
|
let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
|
|
16
16
|
isDisabled
|
|
17
17
|
});
|