@eightshift/ui-components 1.9.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -7
- package/dist/{Button-BMFbEXg1.js → Button-OQ5EIPvt.js} +8 -8
- package/dist/{SelectionManager-D-89MUJW.js → Collection-CJM_asJz.js} +345 -197
- package/dist/{Color-B-cqXgPz.js → Color-B0HgM8f4.js} +1 -1
- package/dist/{ColorSwatch-B6s54Jb3.js → ColorSwatch-Dv3Wxdl_.js} +6 -7
- package/dist/{ComboBox-VR9-vNZv.js → ComboBox-BnlZjJ3T.js} +21 -22
- package/dist/{Dialog-BlYTPzgB.js → Dialog-CIh-hX93.js} +77 -65
- package/dist/{FieldError-DKicm3R0.js → FieldError-D7A6s7O5.js} +2 -2
- package/dist/{FocusScope-EoLYfbMp.js → FocusScope-Cs5_OoeA.js} +6 -4
- package/dist/{Group-D96edUPC.js → Group-D6tr3U_n.js} +5 -6
- package/dist/{Heading-GytTjUsy.js → Heading-DiYTXoIW.js} +3 -4
- package/dist/{Hidden-D3hHnmPI.js → Hidden-DnOd_jPX.js} +2 -2
- package/dist/{Input-BXSxJ_44.js → Input-Se0m3ubj.js} +13 -11
- package/dist/{Label-BtoiUpt8.js → Label-Ca9uelsn.js} +4 -5
- package/dist/{List-Ct3nzFZG.js → List-Br274SP1.js} +16 -8
- package/dist/{ListBox-BMpo-Cem.js → ListBox-D9dFEh5A.js} +36 -23
- package/dist/{OverlayArrow-4epQ99-E.js → OverlayArrow-1jx-ZyCR.js} +75 -13
- package/dist/{Select-aab027f3.esm-C7BxKjSc.js → Select-aab027f3.esm-HFNIFFya.js} +4 -4
- package/dist/{Separator-DUhFmbD-.js → Separator-BhZycTUp.js} +9 -7
- package/dist/{Slider-QNPrj4N9.js → Slider-BZNaJylD.js} +20 -24
- package/dist/{Text-DNDWaukZ.js → Text-aOUPPvTO.js} +3 -4
- package/dist/{VisuallyHidden-BHNhi-ls.js → VisuallyHidden-ClTQo25k.js} +2 -2
- package/dist/assets/index.css +37 -0
- package/dist/assets/style-editor.css +5287 -0
- package/dist/assets/style.css +5293 -1
- package/dist/assets/wp-font-enhancements.css +8 -1
- package/dist/assets/wp-ui-enhancements.css +299 -1
- package/dist/components/animated-visibility/animated-visibility.js +17 -21
- package/dist/components/base-control/base-control.js +7 -7
- package/dist/components/breakpoint-preview/breakpoint-preview.js +50 -50
- package/dist/components/button/button.js +190 -86
- package/dist/components/checkbox/checkbox.js +44 -27
- package/dist/components/color-pickers/color-picker.js +13 -9
- package/dist/components/color-pickers/color-swatch.js +4 -4
- package/dist/components/color-pickers/gradient-editor.js +25 -24
- package/dist/components/color-pickers/solid-color-picker.js +197 -229
- package/dist/components/component-toggle/component-toggle.js +3 -3
- package/dist/components/container-panel/container-panel.js +17 -17
- package/dist/components/draggable/draggable-handle.js +6 -6
- package/dist/components/draggable/draggable.js +1414 -699
- package/dist/components/draggable-list/draggable-list-item.js +3 -3
- package/dist/components/draggable-list/draggable-list.js +12 -12
- package/dist/components/expandable/expandable.js +66 -78
- package/dist/components/index.js +2 -3
- package/dist/components/input-field/input-field.js +35 -22
- package/dist/components/layout/hstack.js +1 -1
- package/dist/components/layout/vstack.js +1 -1
- package/dist/components/link-input/link-input.js +69 -57
- package/dist/components/matrix-align/matrix-align.js +34 -86
- package/dist/components/menu/menu.js +22 -23
- package/dist/components/modal/modal.js +24 -25
- package/dist/components/notice/notice.js +32 -32
- package/dist/components/number-picker/number-picker.js +41 -40
- package/dist/components/option-select/option-select.js +9 -4
- package/dist/components/options-panel/options-panel.js +63 -28
- package/dist/components/placeholders/file-placeholder.js +6 -17
- package/dist/components/placeholders/image-placeholder.js +17 -17
- package/dist/components/placeholders/media-placeholder.js +12 -12
- package/dist/components/popover/popover.js +6 -5
- package/dist/components/radio/radio.js +60 -43
- package/dist/components/repeater/repeater-item.js +10 -10
- package/dist/components/repeater/repeater.js +8 -8
- package/dist/components/responsive/mini-responsive.js +41 -41
- package/dist/components/responsive/responsive-legacy.js +33 -33
- package/dist/components/responsive/responsive.js +48 -48
- package/dist/components/responsive-preview/responsive-preview.js +4 -4
- package/dist/components/rich-label/rich-label.js +13 -11
- 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 +3 -3
- 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/styles.js +21 -21
- package/dist/components/select/v2/async-select.js +37 -47
- package/dist/components/select/v2/shared.js +8 -8
- package/dist/components/select/v2/single-select.js +44 -48
- package/dist/components/slider/column-config-slider.js +25 -25
- package/dist/components/slider/slider.js +173 -182
- package/dist/components/spacer/spacer.js +21 -21
- package/dist/components/tabs/tabs.js +111 -63
- package/dist/components/toggle/switch.js +27 -21
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +160 -83
- package/dist/components/tooltip/tooltip.js +25 -28
- package/dist/{context-KeRYAbEi.js → context-CDOs-GuR.js} +1 -1
- package/dist/{focusSafely-CZY36ssv.js → focusSafely-CiqTTjWy.js} +18 -17
- package/dist/icons/icons.js +52 -0
- package/dist/{index-641ee5b8.esm-DEB-c58F.js → index-641ee5b8.esm-DbdaYaxR.js} +45 -45
- package/dist/index-BRp93Yfa.js +28318 -0
- package/dist/index-CcCn9HWX.js +44 -0
- package/dist/index.js +2 -3
- package/dist/{multi-select-components-DM3GsNfb.js → multi-select-components-CkF3LyTF.js} +4 -4
- package/dist/{react-select-async.esm-Bq3N1-Wi.js → react-select-async.esm-DcVLw9X5.js} +3 -3
- package/dist/{react-select.esm-B38nY7_U.js → react-select.esm-OZ0cmTjg.js} +3 -3
- package/dist/style-editor.js +1 -0
- package/dist/style.js +1 -1
- package/dist/{textSelection-G2G-nukT.js → textSelection-BlTDSskG.js} +2 -2
- package/dist/{useButton-CFtcz1T6.js → useButton-CmLbE5vg.js} +3 -3
- package/dist/{useEvent-B0yfN_Zu.js → useEvent-cLDJlznQ.js} +1 -1
- package/dist/{useFocusRing-DMAlRYjX.js → useFocusRing-CGp3guTX.js} +1 -1
- package/dist/{useFocusable-BlkOMLma.js → useFocusable-087cO5Ct.js} +9 -6
- package/dist/{useFormReset-BAEM0o25.js → useFormReset-NpLM2e3G.js} +1 -1
- package/dist/{useFormValidation-BNzOc2t9.js → useFormValidation-BWwmZQE2.js} +3 -3
- package/dist/{useLabel-D6FSp5_M.js → useLabel-C85N3Hzw.js} +2 -2
- package/dist/{useLabels-CraZ2Sej.js → useLabels-C_2wWraB.js} +1 -1
- package/dist/{useListState-C3dnPq2F.js → useListState-Z7FB_NzO.js} +1 -1
- package/dist/{useLocalizedStringFormatter-B73fhEA7.js → useLocalizedStringFormatter-BQ4TF72x.js} +1 -1
- package/dist/{useNumberField-CQP9-nH5.js → useNumberField-Bm6_BVl9.js} +10 -10
- package/dist/{useNumberFormatter-Cdctl6fg.js → useNumberFormatter-DlUVKkO7.js} +1 -1
- package/dist/{usePress-xTkcGUkt.js → usePress-rg_OQIGW.js} +15 -14
- package/dist/{useSingleSelectListState-BGXQSTy7.js → useSingleSelectListState-Cu3xtEJS.js} +2 -2
- package/dist/{useToggle-Dpw3WpSw.js → useToggle-DzlgBLAJ.js} +4 -4
- package/dist/{useToggleState-BSKwCUIW.js → useToggleState-DhSBQxkp.js} +1 -1
- package/dist/{utils-BSLBwuuO.js → utils-39D0mStj.js} +41 -93
- package/package.json +43 -41
- package/dist/GeistMonoVF.woff2 +0 -0
- package/dist/GeistVF.woff2 +0 -0
- package/dist/assets/fonts.css +0 -1
- package/dist/components/list-box/list-box.js +0 -157
- package/dist/fonts.js +0 -1
- package/dist/index-BYHhzLf-.js +0 -444
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { c as clsx } from "./utils-39D0mStj.js";
|
|
2
|
+
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
3
|
+
const cx = clsx;
|
|
4
|
+
const cva = (base, config) => (props) => {
|
|
5
|
+
var _config_compoundVariants;
|
|
6
|
+
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
7
|
+
const { variants, defaultVariants } = config;
|
|
8
|
+
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
9
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
10
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
11
|
+
if (variantProp === null) return null;
|
|
12
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
13
|
+
return variants[variant][variantKey];
|
|
14
|
+
});
|
|
15
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
|
16
|
+
let [key, value] = param;
|
|
17
|
+
if (value === void 0) {
|
|
18
|
+
return acc;
|
|
19
|
+
}
|
|
20
|
+
acc[key] = value;
|
|
21
|
+
return acc;
|
|
22
|
+
}, {});
|
|
23
|
+
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
|
|
24
|
+
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
|
|
25
|
+
return Object.entries(compoundVariantOptions).every((param2) => {
|
|
26
|
+
let [key, value] = param2;
|
|
27
|
+
return Array.isArray(value) ? value.includes({
|
|
28
|
+
...defaultVariants,
|
|
29
|
+
...propsWithoutUndefined
|
|
30
|
+
}[key]) : {
|
|
31
|
+
...defaultVariants,
|
|
32
|
+
...propsWithoutUndefined
|
|
33
|
+
}[key] === value;
|
|
34
|
+
}) ? [
|
|
35
|
+
...acc,
|
|
36
|
+
cvClass,
|
|
37
|
+
cvClassName
|
|
38
|
+
] : acc;
|
|
39
|
+
}, []);
|
|
40
|
+
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
cva as c
|
|
44
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,6 @@ import { InputField } from "./components/input-field/input-field.js";
|
|
|
22
22
|
import { ImagePlaceholder } from "./components/placeholders/image-placeholder.js";
|
|
23
23
|
import { ItemCollection } from "./components/item-collection/item-collection.js";
|
|
24
24
|
import { LinkInput } from "./components/link-input/link-input.js";
|
|
25
|
-
import { ListBox } from "./components/list-box/list-box.js";
|
|
26
25
|
import { MatrixAlign } from "./components/matrix-align/matrix-align.js";
|
|
27
26
|
import { MediaPlaceholder } from "./components/placeholders/media-placeholder.js";
|
|
28
27
|
import { Menu, MenuItem, MenuSection, MenuSeparator, SubMenuItem } from "./components/menu/menu.js";
|
|
@@ -44,7 +43,7 @@ import { Modal } from "./components/modal/modal.js";
|
|
|
44
43
|
import { MultiSelect } from "./components/select/multi-select.js";
|
|
45
44
|
import { RSClearIndicator, RSDropdownIndicator, RSMultiValue, RSMultiValueContainer, RSMultiValueLabel, RSMultiValueRemove, RSOption, RSSingleValue } from "./components/select/react-select-component-wrappers.js";
|
|
46
45
|
import { OptionSelect } from "./components/option-select/option-select.js";
|
|
47
|
-
import { OptionsPanel, OptionsPanelHeader, OptionsPanelSection } from "./components/options-panel/options-panel.js";
|
|
46
|
+
import { OptionsPanel, OptionsPanelHeader, OptionsPanelIntro, OptionsPanelSection } from "./components/options-panel/options-panel.js";
|
|
48
47
|
import { Select } from "./components/select/single-select.js";
|
|
49
48
|
import { Slider } from "./components/slider/slider.js";
|
|
50
49
|
import { SolidColorPicker } from "./components/color-pickers/solid-color-picker.js";
|
|
@@ -86,7 +85,6 @@ export {
|
|
|
86
85
|
InputField,
|
|
87
86
|
ItemCollection,
|
|
88
87
|
LinkInput,
|
|
89
|
-
ListBox,
|
|
90
88
|
MatrixAlign,
|
|
91
89
|
MediaPlaceholder,
|
|
92
90
|
Menu,
|
|
@@ -101,6 +99,7 @@ export {
|
|
|
101
99
|
OptionSelect,
|
|
102
100
|
OptionsPanel,
|
|
103
101
|
OptionsPanelHeader,
|
|
102
|
+
OptionsPanelIntro,
|
|
104
103
|
OptionsPanelSection,
|
|
105
104
|
Popover,
|
|
106
105
|
RSClearIndicator,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useMemo, useLayoutEffect, useEffect, useRef, useCallback, useState, createContext, memo, useReducer, useContext } from "react";
|
|
3
|
-
import { r as reactDomExports } from "./index-
|
|
3
|
+
import { r as reactDomExports } from "./index-BRp93Yfa.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++) {
|
|
@@ -3704,11 +3704,11 @@ const getMultiValue = (ComponentToRender) => {
|
|
|
3704
3704
|
style,
|
|
3705
3705
|
ref: setNodeRef,
|
|
3706
3706
|
className: clsx(
|
|
3707
|
-
"focus:
|
|
3707
|
+
"es:focus:outline-hidden",
|
|
3708
3708
|
// Make non-dragged tiles have no pointer events, so you don't see hover styles on things like the remove button.
|
|
3709
|
-
CSS.Translate.toString(transform) && "[&_>_div]:
|
|
3709
|
+
CSS.Translate.toString(transform) && "es:[&_>_div]:pointer-events-none",
|
|
3710
3710
|
// Make the currently grabbed item into a fancy holo-like thing.
|
|
3711
|
-
isDragging && "es
|
|
3711
|
+
isDragging && "es:z-50 es:blur-[0.5px] es:[&_>_div]:border! es:[&_>_div]:border-dotted es:[&_>_div]:border-accent-500! es:[&_>_div]:bg-accent-100/20! es:[&_>_div]:text-accent-900/15! es:[&_>_div_[role=button]]:opacity-0"
|
|
3712
3712
|
),
|
|
3713
3713
|
...attributes,
|
|
3714
3714
|
...listeners,
|
|
@@ -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-DbdaYaxR.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-HFNIFFya.js";
|
|
5
|
+
import "./index-BRp93Yfa.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-HFNIFFya.js";
|
|
2
|
+
import { _ as _extends } from "./index-641ee5b8.esm-DbdaYaxR.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-BRp93Yfa.js";
|
|
6
6
|
var StateManagedSelect = /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
7
7
|
var baseSelectProps = useStateManager(props);
|
|
8
8
|
return /* @__PURE__ */ React.createElement(Select, _extends({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './assets/index.css';import './assets/style-editor.css';/* empty css */
|
package/dist/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import './assets/style.css'
|
|
1
|
+
import './assets/index.css';import './assets/style.css';/* empty css */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef, useCallback, useEffect } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { m as $c87311424ea30a05$export$fedb369cb70207f1, g as $431fbd86ca7dc216$export$b204af158042fbac, n as $bbed8b41f857bcc0$export$24490316f764c430 } from "./focusSafely-CiqTTjWy.js";
|
|
3
3
|
function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
|
|
4
4
|
let globalListeners = useRef(/* @__PURE__ */ new Map());
|
|
5
5
|
let addGlobalListener = useCallback((eventTarget, type, listener, options) => {
|
|
@@ -13,7 +13,7 @@ function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
|
|
|
13
13
|
fn,
|
|
14
14
|
options
|
|
15
15
|
});
|
|
16
|
-
eventTarget.addEventListener(type,
|
|
16
|
+
eventTarget.addEventListener(type, fn, options);
|
|
17
17
|
}, []);
|
|
18
18
|
let removeGlobalListener = useCallback((eventTarget, type, listener, options) => {
|
|
19
19
|
var _globalListeners_current_get;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-
|
|
1
|
+
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-39D0mStj.js";
|
|
2
2
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
3
|
-
import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-
|
|
4
|
-
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-
|
|
3
|
+
import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-087cO5Ct.js";
|
|
4
|
+
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-rg_OQIGW.js";
|
|
5
5
|
function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
|
|
6
6
|
let {
|
|
7
7
|
elementType = "button",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-
|
|
1
|
+
import { g as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-39D0mStj.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 { a as $507fabe10e71c6fb$export$b9b3dfddab17db27, b as $507fabe10e71c6fb$export$ec71b4b83ac08ec3, c as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, d as $9ab94262bd0047c7$export$420e68273165f4ec } from "./focusSafely-
|
|
1
|
+
import { a as $507fabe10e71c6fb$export$b9b3dfddab17db27, b as $507fabe10e71c6fb$export$ec71b4b83ac08ec3, c as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, d as $9ab94262bd0047c7$export$420e68273165f4ec } from "./focusSafely-CiqTTjWy.js";
|
|
2
2
|
import { useRef, useState, useCallback } from "react";
|
|
3
3
|
function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
|
|
4
4
|
let { autoFocus = false, isTextInput, within } = props;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, h as $6a99195332edec8b$export$80f3e147d781571c,
|
|
2
|
-
import { m as $df56164dff5785e2$export$4338b53315abf666, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-
|
|
1
|
+
import { c as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, h as $6a99195332edec8b$export$80f3e147d781571c, o as $e7801be82b4b2a53$export$4debdb1a3f0fa79e } from "./focusSafely-CiqTTjWy.js";
|
|
2
|
+
import { m as $df56164dff5785e2$export$4338b53315abf666, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-39D0mStj.js";
|
|
3
3
|
import React__default, { useRef, useEffect, useContext } from "react";
|
|
4
4
|
function $93925083ecbb358c$export$48d1ea6320830260(handler) {
|
|
5
5
|
if (!handler) return void 0;
|
|
@@ -14,10 +14,14 @@ function $93925083ecbb358c$export$48d1ea6320830260(handler) {
|
|
|
14
14
|
return e.isDefaultPrevented();
|
|
15
15
|
},
|
|
16
16
|
stopPropagation() {
|
|
17
|
-
console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");
|
|
17
|
+
if (shouldStopPropagation) console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");
|
|
18
|
+
else shouldStopPropagation = true;
|
|
18
19
|
},
|
|
19
20
|
continuePropagation() {
|
|
20
21
|
shouldStopPropagation = false;
|
|
22
|
+
},
|
|
23
|
+
isPropagationStopped() {
|
|
24
|
+
return shouldStopPropagation;
|
|
21
25
|
}
|
|
22
26
|
};
|
|
23
27
|
handler(event);
|
|
@@ -39,7 +43,7 @@ function $e6afbd83fe6ebbd2$var$useFocusableContext(ref) {
|
|
|
39
43
|
let { ref: _, ...otherProps } = context;
|
|
40
44
|
return otherProps;
|
|
41
45
|
}
|
|
42
|
-
|
|
46
|
+
const $e6afbd83fe6ebbd2$export$13f3202a3e5ddd5 = /* @__PURE__ */ React__default.forwardRef(function FocusableProvider(props, ref) {
|
|
43
47
|
let { children, ...otherProps } = props;
|
|
44
48
|
let objRef = $df56164dff5785e2$export$4338b53315abf666(ref);
|
|
45
49
|
let context = {
|
|
@@ -49,8 +53,7 @@ function $e6afbd83fe6ebbd2$var$FocusableProvider(props, ref) {
|
|
|
49
53
|
return /* @__PURE__ */ React__default.createElement($e6afbd83fe6ebbd2$var$FocusableContext.Provider, {
|
|
50
54
|
value: context
|
|
51
55
|
}, children);
|
|
52
|
-
}
|
|
53
|
-
let $e6afbd83fe6ebbd2$export$13f3202a3e5ddd5 = /* @__PURE__ */ React__default.forwardRef($e6afbd83fe6ebbd2$var$FocusableProvider);
|
|
56
|
+
});
|
|
54
57
|
function $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, domRef) {
|
|
55
58
|
let { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props);
|
|
56
59
|
let { keyboardProps } = $46d819fcbaf35654$export$8f71654801c2f7cd(props);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-
|
|
1
|
+
import { g as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-39D0mStj.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 { createContext, useMemo, useContext, useState, useRef, useEffect } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { l as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, g as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-
|
|
2
|
+
import { l as $507fabe10e71c6fb$export$8397ddfc504fdb9a } from "./focusSafely-CiqTTjWy.js";
|
|
3
|
+
import { l as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, g as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-39D0mStj.js";
|
|
4
4
|
const $e5be200c675c3b3a$export$aca958c65c314e6c = {
|
|
5
5
|
badInput: false,
|
|
6
6
|
customError: false,
|
|
@@ -139,7 +139,7 @@ function $e5be200c675c3b3a$var$isEqualValidation(a, b) {
|
|
|
139
139
|
function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
|
|
140
140
|
let { validationBehavior, focus } = props;
|
|
141
141
|
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
142
|
-
if (validationBehavior === "native" && (ref === null || ref === void 0 ? void 0 : ref.current)) {
|
|
142
|
+
if (validationBehavior === "native" && (ref === null || ref === void 0 ? void 0 : ref.current) && !ref.current.disabled) {
|
|
143
143
|
let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(" ") || "Invalid value." : "";
|
|
144
144
|
ref.current.setCustomValidity(errorMessage);
|
|
145
145
|
if (!ref.current.hasAttribute("title")) ref.current.title = "";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-
|
|
2
|
-
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-
|
|
1
|
+
import { f as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-39D0mStj.js";
|
|
2
|
+
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-C_2wWraB.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);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-
|
|
1
|
+
import { f as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-39D0mStj.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 {
|
|
1
|
+
import { $ as $7af3f5b51489e0b5$export$253fe78d46329472, a as $7613b1592d41b092$export$6cd28814d92fa9c9, b as $d496c0a20b6e58ec$export$6c8a5aaad13c9852 } from "./Collection-CJM_asJz.js";
|
|
2
2
|
import { useMemo, useCallback, useRef, useEffect } from "react";
|
|
3
3
|
class $a02d57049d202695$export$d085fb9e920b5ca7 {
|
|
4
4
|
*[Symbol.iterator]() {
|
package/dist/{useLocalizedStringFormatter-B73fhEA7.js → useLocalizedStringFormatter-BQ4TF72x.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
1
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-CDOs-GuR.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 { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, c as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, d as $9ab94262bd0047c7$export$420e68273165f4ec,
|
|
1
|
+
import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, c as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, d as $9ab94262bd0047c7$export$420e68273165f4ec, x as $c87311424ea30a05$export$186c6964ca17d99, i as $c87311424ea30a05$export$a11b0059900ceec8, m as $c87311424ea30a05$export$fedb369cb70207f1 } from "./focusSafely-CiqTTjWy.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-BWwmZQE2.js";
|
|
4
4
|
import { $ as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 } from "./NumberFormatter-DA8u1Ot7.js";
|
|
5
5
|
import { useCallback, useState, useMemo, useEffect, useRef } from "react";
|
|
6
|
-
import { g as $8ae05eaa5c114e9c$export$7f54fc3180508a52, d as $3ef42575df84b30b$export$9d1611c77c2fe928, f as $bdb11010cef70236$export$f680877a34711e37,
|
|
6
|
+
import { g as $8ae05eaa5c114e9c$export$7f54fc3180508a52, d as $3ef42575df84b30b$export$9d1611c77c2fe928, f as $bdb11010cef70236$export$f680877a34711e37, p as $ff5963eb1fccf552$export$e08e3b67e392101e } from "./utils-39D0mStj.js";
|
|
7
7
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
8
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-
|
|
9
|
-
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-
|
|
10
|
-
import { b as $2d73ec29415bd339$export$712718f7aec83d5 } from "./Input-
|
|
11
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
12
|
-
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-
|
|
13
|
-
import { c as $319e236875307eab$export$d10ae4f68404609a, b as $319e236875307eab$export$a9b970dcc4ae71a9 } from "./Button-
|
|
14
|
-
import { $ as $03deb23ff14920c4$export$4eaf04e54aa8eed6 } from "./textSelection-
|
|
8
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-NpLM2e3G.js";
|
|
9
|
+
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-cLDJlznQ.js";
|
|
10
|
+
import { b as $2d73ec29415bd339$export$712718f7aec83d5 } from "./Input-Se0m3ubj.js";
|
|
11
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-BQ4TF72x.js";
|
|
12
|
+
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-DlUVKkO7.js";
|
|
13
|
+
import { c as $319e236875307eab$export$d10ae4f68404609a, b as $319e236875307eab$export$a9b970dcc4ae71a9 } from "./Button-OQ5EIPvt.js";
|
|
14
|
+
import { $ as $03deb23ff14920c4$export$4eaf04e54aa8eed6 } from "./textSelection-BlTDSskG.js";
|
|
15
15
|
function $7d0a636d7a4dcefd$export$2123ff2b87c81ca(props, ref) {
|
|
16
16
|
let { onScroll, isDisabled } = props;
|
|
17
17
|
let onScrollHandler = useCallback((e) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
1
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-CDOs-GuR.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,7 +1,7 @@
|
|
|
1
|
-
import { $ as $03deb23ff14920c4$export$4eaf04e54aa8eed6, a as $14c0b72509d70225$export$b0d6fa1ab32e3295, b as $14c0b72509d70225$export$16a4697467175487 } from "./textSelection-
|
|
1
|
+
import { $ as $03deb23ff14920c4$export$4eaf04e54aa8eed6, a as $14c0b72509d70225$export$b0d6fa1ab32e3295, b as $14c0b72509d70225$export$16a4697467175487 } from "./textSelection-BlTDSskG.js";
|
|
2
2
|
import React__default, { useContext, createContext, useState, useRef, useMemo, useEffect } from "react";
|
|
3
|
-
import { g as $8ae05eaa5c114e9c$export$7f54fc3180508a52, d as $3ef42575df84b30b$export$9d1611c77c2fe928,
|
|
4
|
-
import {
|
|
3
|
+
import { g as $8ae05eaa5c114e9c$export$7f54fc3180508a52, d as $3ef42575df84b30b$export$9d1611c77c2fe928, p as $ff5963eb1fccf552$export$e08e3b67e392101e } from "./utils-39D0mStj.js";
|
|
4
|
+
import { s as $c87311424ea30a05$export$b7d78993b74f766d, r as $c87311424ea30a05$export$78551043582a6a98, q as $c87311424ea30a05$export$9ac100e40613ea10, t as $c87311424ea30a05$export$7bef049ce92e4224, p as $7215afc6de606d6b$export$de79e2c695e052f3, u as $6a7db85432448f7f$export$29bf1b5f2c56cf63, g as $431fbd86ca7dc216$export$b204af158042fbac, v as $6a7db85432448f7f$export$60278871457622de, f as $431fbd86ca7dc216$export$f21a1ffae260145a, o as $e7801be82b4b2a53$export$4debdb1a3f0fa79e } from "./focusSafely-CiqTTjWy.js";
|
|
5
5
|
const $ea8dcbcb9ea1b556$var$RouterContext = /* @__PURE__ */ createContext({
|
|
6
6
|
isNative: true,
|
|
7
7
|
open: $ea8dcbcb9ea1b556$var$openSyntheticLink,
|
|
@@ -335,7 +335,8 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
335
335
|
if (!isDisabled && !preventFocusOnPress) $7215afc6de606d6b$export$de79e2c695e052f3(e.currentTarget);
|
|
336
336
|
if (!allowTextSelectionOnPress) $14c0b72509d70225$export$16a4697467175487(state.target);
|
|
337
337
|
shouldStopPropagation = triggerPressStart(e, state.pointerType);
|
|
338
|
-
|
|
338
|
+
let target = e.target;
|
|
339
|
+
if ("releasePointerCapture" in target) target.releasePointerCapture(e.pointerId);
|
|
339
340
|
addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(e.currentTarget), "pointerup", onPointerUp, false);
|
|
340
341
|
addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(e.currentTarget), "pointercancel", onPointerCancel, false);
|
|
341
342
|
}
|
|
@@ -350,16 +351,16 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
350
351
|
};
|
|
351
352
|
pressProps2.onPointerUp = (e) => {
|
|
352
353
|
if (!e.currentTarget.contains(e.target) || state.pointerType === "virtual") return;
|
|
353
|
-
if (e.button === 0
|
|
354
|
+
if (e.button === 0) triggerPressUp(e, state.pointerType || e.pointerType);
|
|
354
355
|
};
|
|
355
|
-
|
|
356
|
-
if (e.pointerId
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
356
|
+
pressProps2.onPointerEnter = (e) => {
|
|
357
|
+
if (e.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType != null) {
|
|
358
|
+
state.isOverTarget = true;
|
|
359
|
+
triggerPressStart($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType);
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
pressProps2.onPointerLeave = (e) => {
|
|
363
|
+
if (e.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType != null) {
|
|
363
364
|
state.isOverTarget = false;
|
|
364
365
|
triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType, false);
|
|
365
366
|
cancelOnPointerExit(e);
|
|
@@ -367,7 +368,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
367
368
|
};
|
|
368
369
|
let onPointerUp = (e) => {
|
|
369
370
|
if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {
|
|
370
|
-
if (
|
|
371
|
+
if (state.target.contains(e.target) && state.pointerType != null) triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType);
|
|
371
372
|
else if (state.isOverTarget && state.pointerType != null) triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType, false);
|
|
372
373
|
state.isPressed = false;
|
|
373
374
|
state.isOverTarget = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as $e72dd72e1c76a225$export$2f645645f7bca764 } from "./useListState-
|
|
2
|
-
import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./focusSafely-
|
|
1
|
+
import { $ as $e72dd72e1c76a225$export$2f645645f7bca764 } from "./useListState-Z7FB_NzO.js";
|
|
2
|
+
import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./focusSafely-CiqTTjWy.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-39D0mStj.js";
|
|
2
2
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
3
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-
|
|
4
|
-
import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-
|
|
5
|
-
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-
|
|
3
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-NpLM2e3G.js";
|
|
4
|
+
import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-087cO5Ct.js";
|
|
5
|
+
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-rg_OQIGW.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) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./focusSafely-
|
|
1
|
+
import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./focusSafely-CiqTTjWy.js";
|
|
2
2
|
function $3017fa7ffdddec74$export$8042c6c013fd5226(props = {}) {
|
|
3
3
|
let { isReadOnly } = props;
|
|
4
4
|
let [isSelected, setSelected] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.isSelected, props.defaultSelected || false, props.onChange);
|
|
@@ -1,5 +1,43 @@
|
|
|
1
|
-
import React__default, {
|
|
2
|
-
|
|
1
|
+
import React__default, { useRef, useCallback, useState, useContext, useEffect, useMemo } from "react";
|
|
2
|
+
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React__default.useLayoutEffect : () => {
|
|
3
|
+
};
|
|
4
|
+
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
|
|
5
|
+
const ref = useRef(null);
|
|
6
|
+
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
7
|
+
ref.current = fn;
|
|
8
|
+
}, [
|
|
9
|
+
fn
|
|
10
|
+
]);
|
|
11
|
+
return useCallback((...args) => {
|
|
12
|
+
const f = ref.current;
|
|
13
|
+
return f === null || f === void 0 ? void 0 : f(...args);
|
|
14
|
+
}, []);
|
|
15
|
+
}
|
|
16
|
+
function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
|
|
17
|
+
let [value, setValue] = useState(defaultValue);
|
|
18
|
+
let effect = useRef(null);
|
|
19
|
+
let nextRef = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
|
|
20
|
+
if (!effect.current) return;
|
|
21
|
+
let newValue = effect.current.next();
|
|
22
|
+
if (newValue.done) {
|
|
23
|
+
effect.current = null;
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (value === newValue.value) nextRef();
|
|
27
|
+
else setValue(newValue.value);
|
|
28
|
+
});
|
|
29
|
+
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
30
|
+
if (effect.current) nextRef();
|
|
31
|
+
});
|
|
32
|
+
let queue = $8ae05eaa5c114e9c$export$7f54fc3180508a52((fn) => {
|
|
33
|
+
effect.current = fn(value);
|
|
34
|
+
nextRef();
|
|
35
|
+
});
|
|
36
|
+
return [
|
|
37
|
+
value,
|
|
38
|
+
queue
|
|
39
|
+
];
|
|
40
|
+
}
|
|
3
41
|
const $b5e257d569688ac6$var$defaultContext = {
|
|
4
42
|
prefix: String(Math.round(Math.random() * 1e10)),
|
|
5
43
|
current: 0
|
|
@@ -58,45 +96,6 @@ function $b5e257d569688ac6$export$535bd6ca7f90a273() {
|
|
|
58
96
|
if (typeof React__default["useSyncExternalStore"] === "function") return React__default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
|
|
59
97
|
return useContext($b5e257d569688ac6$var$IsSSRContext);
|
|
60
98
|
}
|
|
61
|
-
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React__default.useLayoutEffect : () => {
|
|
62
|
-
};
|
|
63
|
-
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
|
|
64
|
-
const ref = useRef(null);
|
|
65
|
-
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
66
|
-
ref.current = fn;
|
|
67
|
-
}, [
|
|
68
|
-
fn
|
|
69
|
-
]);
|
|
70
|
-
return useCallback((...args) => {
|
|
71
|
-
const f = ref.current;
|
|
72
|
-
return f === null || f === void 0 ? void 0 : f(...args);
|
|
73
|
-
}, []);
|
|
74
|
-
}
|
|
75
|
-
function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
|
|
76
|
-
let [value, setValue] = useState(defaultValue);
|
|
77
|
-
let effect = useRef(null);
|
|
78
|
-
let nextRef = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
|
|
79
|
-
if (!effect.current) return;
|
|
80
|
-
let newValue = effect.current.next();
|
|
81
|
-
if (newValue.done) {
|
|
82
|
-
effect.current = null;
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
if (value === newValue.value) nextRef();
|
|
86
|
-
else setValue(newValue.value);
|
|
87
|
-
});
|
|
88
|
-
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
89
|
-
if (effect.current) nextRef();
|
|
90
|
-
});
|
|
91
|
-
let queue = $8ae05eaa5c114e9c$export$7f54fc3180508a52((fn) => {
|
|
92
|
-
effect.current = fn(value);
|
|
93
|
-
nextRef();
|
|
94
|
-
});
|
|
95
|
-
return [
|
|
96
|
-
value,
|
|
97
|
-
queue
|
|
98
|
-
];
|
|
99
|
-
}
|
|
100
99
|
let $bdb11010cef70236$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
101
100
|
let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
|
|
102
101
|
function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
|
|
@@ -341,55 +340,6 @@ function $64fa3d84918910a7$export$9d4c57ee4c6ffdd8() {
|
|
|
341
340
|
hasSlot
|
|
342
341
|
];
|
|
343
342
|
}
|
|
344
|
-
function $64fa3d84918910a7$export$6d3443f2c48bfc20(ref, isReady = true) {
|
|
345
|
-
let [isEntering, setEntering] = useState(true);
|
|
346
|
-
$64fa3d84918910a7$var$useAnimation(ref, isEntering && isReady, useCallback(() => setEntering(false), []));
|
|
347
|
-
return isEntering && isReady;
|
|
348
|
-
}
|
|
349
|
-
function $64fa3d84918910a7$export$45fda7c47f93fd48(ref, isOpen) {
|
|
350
|
-
let [isExiting, setExiting] = useState(false);
|
|
351
|
-
let [exitState, setExitState] = useState("idle");
|
|
352
|
-
if (!isOpen && ref.current && exitState === "idle") {
|
|
353
|
-
isExiting = true;
|
|
354
|
-
setExiting(true);
|
|
355
|
-
setExitState("exiting");
|
|
356
|
-
}
|
|
357
|
-
if (!ref.current && exitState === "exited") setExitState("idle");
|
|
358
|
-
$64fa3d84918910a7$var$useAnimation(ref, isExiting, useCallback(() => {
|
|
359
|
-
setExitState("exited");
|
|
360
|
-
setExiting(false);
|
|
361
|
-
}, []));
|
|
362
|
-
return isExiting;
|
|
363
|
-
}
|
|
364
|
-
function $64fa3d84918910a7$var$useAnimation(ref, isActive, onEnd) {
|
|
365
|
-
let prevAnimation = useRef(null);
|
|
366
|
-
if (isActive && ref.current)
|
|
367
|
-
prevAnimation.current = window.getComputedStyle(ref.current).animation;
|
|
368
|
-
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
369
|
-
if (isActive && ref.current) {
|
|
370
|
-
let computedStyle = window.getComputedStyle(ref.current);
|
|
371
|
-
if (computedStyle.animationName && computedStyle.animationName !== "none" && computedStyle.animation !== prevAnimation.current) {
|
|
372
|
-
let onAnimationEnd = (e) => {
|
|
373
|
-
if (e.target === ref.current) {
|
|
374
|
-
element.removeEventListener("animationend", onAnimationEnd);
|
|
375
|
-
$dbSRa$reactdom.flushSync(() => {
|
|
376
|
-
onEnd();
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
let element = ref.current;
|
|
381
|
-
element.addEventListener("animationend", onAnimationEnd);
|
|
382
|
-
return () => {
|
|
383
|
-
element.removeEventListener("animationend", onAnimationEnd);
|
|
384
|
-
};
|
|
385
|
-
} else onEnd();
|
|
386
|
-
}
|
|
387
|
-
}, [
|
|
388
|
-
ref,
|
|
389
|
-
isActive,
|
|
390
|
-
onEnd
|
|
391
|
-
]);
|
|
392
|
-
}
|
|
393
343
|
function $64fa3d84918910a7$export$ef03459518577ad4(props) {
|
|
394
344
|
const prefix = /^(data-.*)$/;
|
|
395
345
|
let filteredProps = {};
|
|
@@ -413,7 +363,5 @@ export {
|
|
|
413
363
|
$df56164dff5785e2$export$4338b53315abf666 as m,
|
|
414
364
|
$5dc95899b306f630$export$c9058316764c140e as n,
|
|
415
365
|
$64fa3d84918910a7$export$c62b8e45d58ddad9 as o,
|
|
416
|
-
$
|
|
417
|
-
$64fa3d84918910a7$export$6d3443f2c48bfc20 as q,
|
|
418
|
-
$ff5963eb1fccf552$export$e08e3b67e392101e as r
|
|
366
|
+
$ff5963eb1fccf552$export$e08e3b67e392101e as p
|
|
419
367
|
};
|