@eightshift/ui-components 7.2.1 → 7.3.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/dist/Autocomplete-pLMPWMFq.js +451 -0
- package/dist/Button-Biwg7zwt.js +223 -0
- package/dist/Dialog-C1sh8jbh.js +2474 -0
- package/dist/{Disclosure-NYWFw9RJ.js → Disclosure-B_SHgiUz.js} +50 -51
- package/dist/FocusScope-lGkM8AO8.js +734 -0
- package/dist/Form-BxIJCHYd.js +5 -0
- package/dist/Heading-B2EsUuu6.js +16 -0
- package/dist/{Hidden-8TB37dpK.js → Hidden-DYY00jLm.js} +10 -10
- package/dist/I18nProvider-Cm6dj5jY.js +93 -0
- package/dist/Label-B1TkoVOG.js +17 -0
- package/dist/ListBox-BquE0m8z.js +584 -0
- package/dist/{NumberFormatter-m5VW6MTK.js → NumberFormatter-JHF0Tadk.js} +24 -26
- package/dist/PortalProvider-BYcv24il.js +13 -0
- package/dist/RadioGroup-BxjLooWU.js +324 -0
- package/dist/SearchField-BkAU0HLm.js +322 -0
- package/dist/SelectionIndicator-Bx_EYBXD.js +13 -0
- package/dist/{Slider-DW1RuMVp.js → Slider-DSv6fyZ6.js} +321 -363
- package/dist/Text-C8pfwn0W.js +16 -0
- package/dist/{VisuallyHidden-CfsnJHZb.js → VisuallyHidden-KcXlGa5p.js} +12 -12
- package/dist/{animation-Bd2peown.js → animation-BJ-2VKdB.js} +12 -12
- package/dist/assets/style-admin.css +1 -1
- package/dist/assets/style-editor.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/{button-D9cbyHeZ.js → button-CawAzlko.js} +21 -73
- package/dist/{checkbox-BO5RZmO8.js → checkbox-t7VrqXv2.js} +59 -62
- package/dist/{color-swatch-D2ZBkuTt.js → color-swatch-gU09x9Ga.js} +417 -414
- package/dist/components/base-control/base-control.js +2 -2
- package/dist/components/base-control/container.js +1 -1
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +2 -2
- 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 +4 -4
- package/dist/components/container-panel/container-panel.js +5 -5
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +7 -7
- package/dist/components/index.js +15 -15
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +5 -5
- package/dist/components/menu/menu.js +11 -11
- 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 +3 -3
- package/dist/components/options-panel/options-panel.js +3 -3
- package/dist/components/placeholders/file-picker-shell.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +6 -6
- package/dist/components/portal-provider/portal-provider.js +2 -2
- package/dist/components/radio/radio.js +9 -9
- package/dist/components/repeater/repeater-item.js +2 -2
- package/dist/components/repeater/repeater.js +3 -3
- package/dist/components/responsive/mini-responsive.js +6 -6
- package/dist/components/responsive/responsive-legacy.js +5 -5
- package/dist/components/responsive/responsive.js +5 -5
- package/dist/components/responsive-preview/responsive-preview.js +2 -2
- package/dist/components/select/async-multi-select.js +27 -26
- package/dist/components/select/async-select.js +27 -26
- package/dist/components/select/multi-select.js +33 -32
- package/dist/components/select/shared.js +1 -1
- package/dist/components/select/single-select.js +33 -32
- package/dist/components/select/styles.js +1 -1
- package/dist/components/slider/column-config-slider.js +8 -8
- package/dist/components/slider/slider.js +8 -8
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.js +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +3 -3
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-CTDVJ4zd.js → draggable-Cxv-OueQ.js} +1 -1
- package/dist/filterDOMProps-BfW758QC.js +69 -0
- package/dist/{gradient-editor-CD5Sho6A.js → gradient-editor-CInqVF8v.js} +6 -6
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +15 -15
- package/dist/{input-field-_OCWbftf.js → input-field-BdFrxQ-R.js} +46 -47
- package/dist/keyboard-CT41mQzR.js +55 -0
- package/dist/{link-input-BnjtzMbF.js → link-input-BDFhSSvH.js} +324 -356
- package/dist/{modal-snrElwty.js → modal-CJDaBdPh.js} +100 -92
- package/dist/{number-ZZIxJukn.js → number-MWRvGfyE.js} +10 -10
- package/dist/{number-picker-Dhtx4409.js → number-picker-BrxrB-xq.js} +43 -42
- package/dist/{shared-BpAYSi3F.js → shared-CI4kcnm8.js} +482 -502
- package/dist/{smart-image-CBNbxJ57.js → smart-image-eGdMu9s9.js} +2 -2
- package/dist/{solid-color-picker-DukArNH-.js → solid-color-picker-DXgX-OAm.js} +926 -935
- package/dist/{switch-DmsvyQPa.js → switch-DNHFoCCx.js} +28 -28
- package/dist/{tabs-Cy6gB0RL.js → tabs-C2tPOEYr.js} +145 -149
- package/dist/textSelection-BhX_2zV9.js +45 -0
- package/dist/{toggle-button-BlzUGfGy.js → toggle-button-DYDp11rq.js} +35 -35
- package/dist/{tooltip-BzJzYlcc.js → tooltip-C-hT6tN9.js} +162 -162
- package/dist/{useAsyncList-BNzwKoX4.js → useAsyncList-DsOh1xIx.js} +54 -74
- package/dist/{useButton-ra1ZSZ4z.js → useButton-BMZc4fTX.js} +11 -11
- package/dist/{SelectionManager-B8lLv6Ue.js → useCollection-CBVYSuGz.js} +1689 -1777
- package/dist/{useEvent-DkZVfgsS.js → useEvent-ypAU33vv.js} +5 -5
- package/dist/useField-BXf__jxy.js +32 -0
- package/dist/{useFilter-OiMnf6sb.js → useFilter-CfKEbIwL.js} +5 -5
- package/dist/{useFocusRing-DuYL4cdO.js → useFocusRing-BgYY-7ko.js} +23 -23
- package/dist/useFormReset-BuMc_O4y.js +17 -0
- package/dist/{FieldError-BWDbP5Db.js → useFormValidation-BcME9D0E.js} +63 -66
- package/dist/useHover-lyApu3ba.js +975 -0
- package/dist/{useLabel-2EohW5l6.js → useLabel-Rv8cIIKk.js} +8 -8
- package/dist/{useLabels-B2p7RXi5.js → useLabels-xOYtkA8o.js} +5 -5
- package/dist/useListState-u6DfeXHi.js +135 -0
- package/dist/{useLocalizedStringFormatter-Dv2diN3k.js → useLocalizedStringFormatter-CR-bmorj.js} +45 -45
- package/dist/{useNumberField-2xbi3jRV.js → useNumberFieldState-xL-ecwNz.js} +665 -619
- package/dist/useNumberFormatter-CR1PAFPG.js +10 -0
- package/dist/useOverlayTriggerState-AeCx45Gv.js +551 -0
- package/dist/usePress-Dnx5rBoD.js +593 -0
- package/dist/useTextField-BW3ZwGyz.js +159 -0
- package/dist/{useToggle-ecIirvIM.js → useToggle-BF5wptMP.js} +19 -20
- package/dist/useToggleState-D5P01lch.js +22 -0
- package/dist/useToolbar-BT25-MJg.js +55 -0
- package/dist/utilities/debounce-throttle.js +1 -1
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +3 -3
- package/dist/{utils-B_uiqNa4.js → utils-JFcCNFzy.js} +121 -122
- package/package.json +13 -13
- package/dist/Button-h6xF_WrP.js +0 -225
- package/dist/Dialog-i5VLQw1o.js +0 -2488
- package/dist/FocusScope-CgwbGOBB.js +0 -746
- package/dist/Form-DTMkbrQY.js +0 -5
- package/dist/Heading-Hol-wS_B.js +0 -16
- package/dist/Input-BURqyJXW.js +0 -161
- package/dist/Label-DFXXxMKY.js +0 -17
- package/dist/ListBox-BHUJxpwh.js +0 -600
- package/dist/OverlayArrow-BoloUPQM.js +0 -573
- package/dist/PortalProvider-DinZZCKX.js +0 -14
- package/dist/RSPContexts-C_z0bI8W.js +0 -12
- package/dist/RadioGroup-BwlGtCja.js +0 -329
- package/dist/SearchField-Cm1i5mLj.js +0 -764
- package/dist/SelectionIndicator-31L6EI9F.js +0 -13
- package/dist/Text-O6VBBDlP.js +0 -16
- package/dist/context-C-XNeJ_l.js +0 -93
- package/dist/filterDOMProps-_2_3GD-K.js +0 -69
- package/dist/textSelection-Dv6WPj0Z.js +0 -45
- package/dist/useField-D0WrzR2F.js +0 -32
- package/dist/useFormReset-DdkykzAn.js +0 -18
- package/dist/useHover-qaMm3XFO.js +0 -982
- package/dist/useListState-CD_5vfyy.js +0 -147
- package/dist/useNumberFormatter-C2Cm2mNj.js +0 -10
- package/dist/usePress-ZP1TjkFf.js +0 -678
- package/dist/useToggleState-IIDbiKPl.js +0 -23
- /package/dist/{List-DWlgW2Ex.js → List---tsVJlI.js} +0 -0
- /package/dist/{build-module-Bsx62nlm.js → build-module-K6vi4xE0.js} +0 -0
- /package/dist/{debounce-throttle-DXxSAKpq.js → debounce-throttle-LSPAPFtq.js} +0 -0
- /package/dist/{dist-2gkv7_1U.js → dist-jw8wvxoG.js} +0 -0
- /package/dist/{es-dash-HqXWZZ3_.js → es-dash-BuShf_ht.js} +0 -0
- /package/dist/{jsx-svg-DgKbriN1.js → jsx-svg-DT1SBWuP.js} +0 -0
- /package/dist/{utilities-lwX686oD.js → utilities-DV0KKJNR.js} +0 -0
|
@@ -1,26 +1,45 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-BUU5J41u.js";
|
|
2
|
-
import { d as $
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { n as $
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as $
|
|
11
|
-
import { t as
|
|
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-JFcCNFzy.js";
|
|
3
|
+
import { n as $bb39c0fc1c19b34c$export$c57958e35f31ed73 } from "./keyboard-CT41mQzR.js";
|
|
4
|
+
import { H as $23f2114a1b82827e$export$e58f029f0fbfdb29, V as $23f2114a1b82827e$export$cd4e5573fbe2b576, j as $2add3ce32c6007eb$export$fedb369cb70207f1 } from "./useHover-lyApu3ba.js";
|
|
5
|
+
import { u as $901761b40e390936$export$2bb74740c4e19def } from "./useCollection-CBVYSuGz.js";
|
|
6
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BfW758QC.js";
|
|
7
|
+
import { t as $2ec61d1d4f780267$export$a8a3e93435678ff9 } from "./Heading-B2EsUuu6.js";
|
|
8
|
+
import { _ as $58196c8d6a1f38fc$export$1c3ebcada18427bf, f as $d7a937236970dc7f$export$14c98a7594375490, g as $77844860df94ba23$export$ea8f71083e90600f, h as $0644e3663365bfe5$export$ee0f7cc6afcd1c18, m as $081058010ef8962e$export$2317d149ed6f78c4, n as $f2ff30fde7b014be$export$3ddf2d174ce01153, p as $d7a937236970dc7f$export$c6fdb837b070b4ff, r as $f2ff30fde7b014be$export$d2f961adcb0afbe, t as $f2ff30fde7b014be$export$2e1e1122cf0cba88 } from "./Dialog-C1sh8jbh.js";
|
|
9
|
+
import { t as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6 } from "./useOverlayTriggerState-AeCx45Gv.js";
|
|
10
|
+
import { n as $fcc7165e876206c6$export$6d3443f2c48bfc20, t as $fcc7165e876206c6$export$45fda7c47f93fd48 } from "./animation-BJ-2VKdB.js";
|
|
11
|
+
import { t as Button } from "./button-CawAzlko.js";
|
|
12
|
+
import { t as __ } from "./build-module-K6vi4xE0.js";
|
|
12
13
|
import { clear } from "./icons/ui-icons/clear.js";
|
|
13
14
|
import { HStack } from "./components/layout/hstack.js";
|
|
14
15
|
import React, { createContext, forwardRef, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
15
16
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
//#region node_modules
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
//#region node_modules/react-aria/dist/private/overlays/useModalOverlay.mjs
|
|
18
|
+
function $5698867baeb53f4e$export$dbc0f175b25fb0fb(props, state, ref) {
|
|
19
|
+
let { overlayProps, underlayProps } = $77844860df94ba23$export$ea8f71083e90600f({
|
|
20
|
+
...props,
|
|
21
|
+
isOpen: state.isOpen,
|
|
22
|
+
onClose: state.close
|
|
23
|
+
}, ref);
|
|
24
|
+
$0644e3663365bfe5$export$ee0f7cc6afcd1c18({ isDisabled: !state.isOpen });
|
|
25
|
+
$d7a937236970dc7f$export$14c98a7594375490();
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (state.isOpen && ref.current) return $58196c8d6a1f38fc$export$1c3ebcada18427bf([ref.current], { shouldUseInert: true });
|
|
28
|
+
}, [state.isOpen, ref]);
|
|
29
|
+
return {
|
|
30
|
+
modalProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(overlayProps),
|
|
31
|
+
underlayProps
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region node_modules/react-aria/dist/private/utils/useViewportSize.mjs
|
|
36
|
+
var $6066a2c586ade9e1$var$visualViewport = typeof document !== "undefined" && window.visualViewport;
|
|
37
|
+
function $6066a2c586ade9e1$export$d699905dd57c73ca() {
|
|
38
|
+
let isSSR = $c7eafbbe1ea5834e$export$535bd6ca7f90a273();
|
|
20
39
|
let [size, setSize] = useState(() => isSSR ? {
|
|
21
40
|
width: 0,
|
|
22
41
|
height: 0
|
|
23
|
-
} : $
|
|
42
|
+
} : $6066a2c586ade9e1$var$getViewportSize());
|
|
24
43
|
useEffect(() => {
|
|
25
44
|
let updateSize = (newSize) => {
|
|
26
45
|
setSize((size) => {
|
|
@@ -29,63 +48,47 @@ function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
|
29
48
|
});
|
|
30
49
|
};
|
|
31
50
|
let onResize = () => {
|
|
32
|
-
if ($
|
|
33
|
-
updateSize($
|
|
51
|
+
if ($6066a2c586ade9e1$var$visualViewport && $6066a2c586ade9e1$var$visualViewport.scale > 1) return;
|
|
52
|
+
updateSize($6066a2c586ade9e1$var$getViewportSize());
|
|
34
53
|
};
|
|
35
54
|
let frame;
|
|
36
55
|
let onBlur = (e) => {
|
|
37
|
-
if ($
|
|
38
|
-
if ($
|
|
39
|
-
let activeElement = $
|
|
40
|
-
if (!activeElement || !$
|
|
56
|
+
if ($6066a2c586ade9e1$var$visualViewport && $6066a2c586ade9e1$var$visualViewport.scale > 1) return;
|
|
57
|
+
if ($bb39c0fc1c19b34c$export$c57958e35f31ed73($23f2114a1b82827e$export$e58f029f0fbfdb29(e))) frame = requestAnimationFrame(() => {
|
|
58
|
+
let activeElement = $23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
59
|
+
if (!activeElement || !$bb39c0fc1c19b34c$export$c57958e35f31ed73(activeElement)) updateSize({
|
|
41
60
|
width: document.documentElement.clientWidth,
|
|
42
61
|
height: document.documentElement.clientHeight
|
|
43
62
|
});
|
|
44
63
|
});
|
|
45
64
|
};
|
|
46
|
-
updateSize($
|
|
47
|
-
if ($
|
|
48
|
-
if (!$
|
|
49
|
-
else $
|
|
65
|
+
updateSize($6066a2c586ade9e1$var$getViewportSize());
|
|
66
|
+
if ($2add3ce32c6007eb$export$fedb369cb70207f1()) window.addEventListener("blur", onBlur, true);
|
|
67
|
+
if (!$6066a2c586ade9e1$var$visualViewport) window.addEventListener("resize", onResize);
|
|
68
|
+
else $6066a2c586ade9e1$var$visualViewport.addEventListener("resize", onResize);
|
|
50
69
|
return () => {
|
|
51
70
|
cancelAnimationFrame(frame);
|
|
52
|
-
if ($
|
|
53
|
-
if (!$
|
|
54
|
-
else $
|
|
71
|
+
if ($2add3ce32c6007eb$export$fedb369cb70207f1()) window.removeEventListener("blur", onBlur, true);
|
|
72
|
+
if (!$6066a2c586ade9e1$var$visualViewport) window.removeEventListener("resize", onResize);
|
|
73
|
+
else $6066a2c586ade9e1$var$visualViewport.removeEventListener("resize", onResize);
|
|
55
74
|
};
|
|
56
75
|
}, []);
|
|
57
76
|
return size;
|
|
58
77
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
height: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.height * $5df64b3807dc15ee$var$visualViewport.scale : document.documentElement.clientHeight
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region node_modules/@react-aria/overlays/dist/useModalOverlay.mjs
|
|
67
|
-
function $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state, ref) {
|
|
68
|
-
let { overlayProps, underlayProps } = $a11501f3d1d39e6c$export$ea8f71083e90600f({
|
|
69
|
-
...props,
|
|
70
|
-
isOpen: state.isOpen,
|
|
71
|
-
onClose: state.close
|
|
72
|
-
}, ref);
|
|
73
|
-
$49c51c25361d4cd2$export$ee0f7cc6afcd1c18({ isDisabled: !state.isOpen });
|
|
74
|
-
$337b884510726a0d$export$14c98a7594375490();
|
|
75
|
-
useEffect(() => {
|
|
76
|
-
if (state.isOpen && ref.current) return $5e3802645cc19319$export$1c3ebcada18427bf([ref.current], { shouldUseInert: true });
|
|
77
|
-
}, [state.isOpen, ref]);
|
|
78
|
+
/**
|
|
79
|
+
* Get the viewport size without the scrollbar.
|
|
80
|
+
*/ function $6066a2c586ade9e1$var$getViewportSize() {
|
|
78
81
|
return {
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
width: $6066a2c586ade9e1$var$visualViewport ? Math.min($6066a2c586ade9e1$var$visualViewport.width * $6066a2c586ade9e1$var$visualViewport.scale, document.documentElement.clientWidth) : document.documentElement.clientWidth,
|
|
83
|
+
height: $6066a2c586ade9e1$var$visualViewport ? $6066a2c586ade9e1$var$visualViewport.height * $6066a2c586ade9e1$var$visualViewport.scale : document.documentElement.clientHeight
|
|
81
84
|
};
|
|
82
85
|
}
|
|
83
86
|
//#endregion
|
|
84
|
-
//#region node_modules/react-aria-components/dist/Modal.mjs
|
|
85
|
-
var $
|
|
86
|
-
var $
|
|
87
|
-
var $
|
|
88
|
-
if (useContext($
|
|
87
|
+
//#region node_modules/react-aria-components/dist/private/Modal.mjs
|
|
88
|
+
var $8b8d26808cb8cb53$export$ab57792b9b6974a6 = createContext(null);
|
|
89
|
+
var $8b8d26808cb8cb53$var$InternalModalContext = createContext(null);
|
|
90
|
+
var $8b8d26808cb8cb53$export$2b77a92f1a5ad772 = forwardRef(function Modal(props, ref) {
|
|
91
|
+
if (useContext($8b8d26808cb8cb53$var$InternalModalContext)) {
|
|
89
92
|
if (process.env.NODE_ENV !== "production" && (props.onOpenChange || props.defaultOpen !== void 0 || props.isOpen !== void 0)) {
|
|
90
93
|
const invalidSet = new Set([
|
|
91
94
|
"isDismissable",
|
|
@@ -101,13 +104,13 @@ var $f3f84453ead64de5$export$2b77a92f1a5ad772 = forwardRef(function Modal(props,
|
|
|
101
104
|
const invalidProps = Object.keys(props).filter((key) => invalidSet.has(key));
|
|
102
105
|
console.warn(`This modal is already wrapped in a ModalOverlay, props [${invalidProps.join(", ")}] should be placed on the ModalOverlay instead.`);
|
|
103
106
|
}
|
|
104
|
-
return React.createElement($
|
|
107
|
+
return React.createElement($8b8d26808cb8cb53$var$ModalContent, {
|
|
105
108
|
...props,
|
|
106
109
|
modalRef: ref
|
|
107
110
|
}, props.children);
|
|
108
111
|
}
|
|
109
112
|
let { isDismissable, isKeyboardDismissDisabled, isOpen, defaultOpen, onOpenChange, children, isEntering, isExiting, UNSTABLE_portalContainer, shouldCloseOnInteractOutside, ...otherProps } = props;
|
|
110
|
-
return React.createElement($
|
|
113
|
+
return React.createElement($8b8d26808cb8cb53$export$8948f78d83984c69, {
|
|
111
114
|
isDismissable,
|
|
112
115
|
isKeyboardDismissDisabled,
|
|
113
116
|
isOpen,
|
|
@@ -117,27 +120,27 @@ var $f3f84453ead64de5$export$2b77a92f1a5ad772 = forwardRef(function Modal(props,
|
|
|
117
120
|
isExiting,
|
|
118
121
|
UNSTABLE_portalContainer,
|
|
119
122
|
shouldCloseOnInteractOutside
|
|
120
|
-
}, React.createElement($
|
|
123
|
+
}, React.createElement($8b8d26808cb8cb53$var$ModalContent, {
|
|
121
124
|
...otherProps,
|
|
122
125
|
modalRef: ref
|
|
123
126
|
}, children));
|
|
124
127
|
});
|
|
125
|
-
function $
|
|
126
|
-
[props, ref] = $
|
|
127
|
-
let contextState = useContext($
|
|
128
|
-
let localState = $
|
|
128
|
+
function $8b8d26808cb8cb53$var$ModalOverlayWithForwardRef(props, ref) {
|
|
129
|
+
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $8b8d26808cb8cb53$export$ab57792b9b6974a6);
|
|
130
|
+
let contextState = useContext($f2ff30fde7b014be$export$d2f961adcb0afbe);
|
|
131
|
+
let localState = $f11fb0bcf1b2687a$export$61c6a8c84e605fb6(props);
|
|
129
132
|
let state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;
|
|
130
133
|
if (state === contextState) {
|
|
131
134
|
if (process.env.NODE_ENV !== "production" && (props.onOpenChange || props.defaultOpen !== void 0 || props.isOpen !== void 0)) console.warn("This modals state is controlled by a trigger, place onOpenChange on the trigger instead.");
|
|
132
135
|
}
|
|
133
|
-
let objectRef = $
|
|
136
|
+
let objectRef = $03e8ab2d84d7657a$export$4338b53315abf666(ref);
|
|
134
137
|
let modalRef = useRef(null);
|
|
135
|
-
let isOverlayExiting = $
|
|
136
|
-
let isModalExiting = $
|
|
138
|
+
let isOverlayExiting = $fcc7165e876206c6$export$45fda7c47f93fd48(objectRef, state.isOpen);
|
|
139
|
+
let isModalExiting = $fcc7165e876206c6$export$45fda7c47f93fd48(modalRef, state.isOpen);
|
|
137
140
|
let isExiting = isOverlayExiting || isModalExiting || props.isExiting || false;
|
|
138
|
-
let isSSR = $
|
|
141
|
+
let isSSR = $c7eafbbe1ea5834e$export$535bd6ca7f90a273();
|
|
139
142
|
if (!state.isOpen && !isExiting || isSSR) return null;
|
|
140
|
-
return React.createElement($
|
|
143
|
+
return React.createElement($8b8d26808cb8cb53$var$ModalOverlayInner, {
|
|
141
144
|
...props,
|
|
142
145
|
state,
|
|
143
146
|
isExiting,
|
|
@@ -145,13 +148,13 @@ function $f3f84453ead64de5$var$ModalOverlayWithForwardRef(props, ref) {
|
|
|
145
148
|
modalRef
|
|
146
149
|
});
|
|
147
150
|
}
|
|
148
|
-
var $
|
|
149
|
-
function $
|
|
151
|
+
var $8b8d26808cb8cb53$export$8948f78d83984c69 = forwardRef($8b8d26808cb8cb53$var$ModalOverlayWithForwardRef);
|
|
152
|
+
function $8b8d26808cb8cb53$var$ModalOverlayInner({ UNSTABLE_portalContainer, ...props }) {
|
|
150
153
|
let modalRef = props.modalRef;
|
|
151
154
|
let { state } = props;
|
|
152
|
-
let { modalProps, underlayProps } = $
|
|
153
|
-
let entering = $
|
|
154
|
-
let renderProps = $
|
|
155
|
+
let { modalProps, underlayProps } = $5698867baeb53f4e$export$dbc0f175b25fb0fb(props, state, modalRef);
|
|
156
|
+
let entering = $fcc7165e876206c6$export$6d3443f2c48bfc20(props.overlayRef) || props.isEntering || false;
|
|
157
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
155
158
|
...props,
|
|
156
159
|
defaultClassName: "react-aria-ModalOverlay",
|
|
157
160
|
values: {
|
|
@@ -160,41 +163,46 @@ function $f3f84453ead64de5$var$ModalOverlayInner({ UNSTABLE_portalContainer, ...
|
|
|
160
163
|
state
|
|
161
164
|
}
|
|
162
165
|
});
|
|
163
|
-
let viewport = $
|
|
166
|
+
let viewport = $6066a2c586ade9e1$export$d699905dd57c73ca();
|
|
167
|
+
let pageWidth = void 0;
|
|
164
168
|
let pageHeight = void 0;
|
|
165
169
|
if (typeof document !== "undefined") {
|
|
166
|
-
let scrollingElement = $
|
|
170
|
+
let scrollingElement = $901761b40e390936$export$2bb74740c4e19def(document.body) ? document.body : document.scrollingElement || document.documentElement;
|
|
171
|
+
let fractionalWidthDifference = scrollingElement.getBoundingClientRect().width % 1;
|
|
167
172
|
let fractionalHeightDifference = scrollingElement.getBoundingClientRect().height % 1;
|
|
173
|
+
pageWidth = scrollingElement.scrollWidth - fractionalWidthDifference;
|
|
168
174
|
pageHeight = scrollingElement.scrollHeight - fractionalHeightDifference;
|
|
169
175
|
}
|
|
170
176
|
let style = {
|
|
171
177
|
...renderProps.style,
|
|
178
|
+
"--visual-viewport-width": viewport.width + "px",
|
|
172
179
|
"--visual-viewport-height": viewport.height + "px",
|
|
180
|
+
"--page-width": pageWidth !== void 0 ? pageWidth + "px" : void 0,
|
|
173
181
|
"--page-height": pageHeight !== void 0 ? pageHeight + "px" : void 0
|
|
174
182
|
};
|
|
175
|
-
return React.createElement($
|
|
183
|
+
return React.createElement($d7a937236970dc7f$export$c6fdb837b070b4ff, {
|
|
176
184
|
isExiting: props.isExiting,
|
|
177
185
|
portalContainer: UNSTABLE_portalContainer
|
|
178
|
-
}, React.createElement($
|
|
179
|
-
...$
|
|
186
|
+
}, React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
187
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928($8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true }), underlayProps),
|
|
180
188
|
...renderProps,
|
|
181
189
|
style,
|
|
182
190
|
ref: props.overlayRef,
|
|
183
191
|
"data-entering": entering || void 0,
|
|
184
192
|
"data-exiting": props.isExiting || void 0
|
|
185
|
-
}, React.createElement($
|
|
193
|
+
}, React.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, { values: [[$8b8d26808cb8cb53$var$InternalModalContext, {
|
|
186
194
|
modalProps,
|
|
187
195
|
modalRef,
|
|
188
196
|
isExiting: props.isExiting,
|
|
189
197
|
isDismissable: props.isDismissable
|
|
190
|
-
}], [$
|
|
198
|
+
}], [$f2ff30fde7b014be$export$d2f961adcb0afbe, state]] }, renderProps.children)));
|
|
191
199
|
}
|
|
192
|
-
function $
|
|
193
|
-
let { modalProps, modalRef, isExiting, isDismissable } = useContext($
|
|
194
|
-
let state = useContext($
|
|
195
|
-
let ref = $
|
|
196
|
-
let entering = $
|
|
197
|
-
let renderProps = $
|
|
200
|
+
function $8b8d26808cb8cb53$var$ModalContent(props) {
|
|
201
|
+
let { modalProps, modalRef, isExiting, isDismissable } = useContext($8b8d26808cb8cb53$var$InternalModalContext);
|
|
202
|
+
let state = useContext($f2ff30fde7b014be$export$d2f961adcb0afbe);
|
|
203
|
+
let ref = $03e8ab2d84d7657a$export$4338b53315abf666(useMemo(() => $4064df0d6f9620e1$export$c9058316764c140e(props.modalRef, modalRef), [props.modalRef, modalRef]));
|
|
204
|
+
let entering = $fcc7165e876206c6$export$6d3443f2c48bfc20(ref);
|
|
205
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
198
206
|
...props,
|
|
199
207
|
defaultClassName: "react-aria-Modal",
|
|
200
208
|
values: {
|
|
@@ -203,13 +211,13 @@ function $f3f84453ead64de5$var$ModalContent(props) {
|
|
|
203
211
|
state
|
|
204
212
|
}
|
|
205
213
|
});
|
|
206
|
-
return React.createElement($
|
|
207
|
-
...$
|
|
214
|
+
return React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
215
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928($8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true }), modalProps),
|
|
208
216
|
...renderProps,
|
|
209
217
|
ref,
|
|
210
218
|
"data-entering": entering || void 0,
|
|
211
219
|
"data-exiting": isExiting || void 0
|
|
212
|
-
}, isDismissable && React.createElement($
|
|
220
|
+
}, isDismissable && React.createElement($081058010ef8962e$export$2317d149ed6f78c4, { onDismiss: state.close }), renderProps.children);
|
|
213
221
|
}
|
|
214
222
|
//#endregion
|
|
215
223
|
//#region lib/components/modal/modal.jsx
|
|
@@ -255,7 +263,7 @@ function $f3f84453ead64de5$var$ModalContent(props) {
|
|
|
255
263
|
var Modal = (props) => {
|
|
256
264
|
const { triggerLabel, triggerIcon, triggerProps, customTrigger, open } = props;
|
|
257
265
|
if (typeof open !== "undefined") return jsx(ModalInternal, { ...props });
|
|
258
|
-
return jsxs($
|
|
266
|
+
return jsxs($f2ff30fde7b014be$export$2e1e1122cf0cba88, { children: [
|
|
259
267
|
!customTrigger && jsx(Button, {
|
|
260
268
|
icon: triggerIcon,
|
|
261
269
|
...triggerProps,
|
|
@@ -267,7 +275,7 @@ var Modal = (props) => {
|
|
|
267
275
|
};
|
|
268
276
|
var ModalInternal = (props) => {
|
|
269
277
|
const { children, shouldCloseOnInteractOutside, open, defaultOpen, onOpenChange, title, actions, headerActions, noCloseButton, noClickToDismiss, noKeyboardDismiss, noBackdrop, "aria-label": ariaLabel, className, headerClassName, actionsClassName, overlayClassName, contentContainerClassName, width = "default", ...rest } = props;
|
|
270
|
-
return jsx($
|
|
278
|
+
return jsx($8b8d26808cb8cb53$export$8948f78d83984c69, {
|
|
271
279
|
isDismissable: !noClickToDismiss,
|
|
272
280
|
defaultOpen,
|
|
273
281
|
isOpen: open,
|
|
@@ -276,15 +284,15 @@ var ModalInternal = (props) => {
|
|
|
276
284
|
isKeyboardDismissDisabled: noKeyboardDismiss,
|
|
277
285
|
className: ({ isEntering, isExiting }) => clsx("es:font-sans", "es:fixed es:inset-0 es:z-9999 es:flex es:min-h-full es:items-center es:justify-center es:overflow-hidden es:p-4", !noBackdrop && "es:bg-accent-950/20 es:backdrop-blur-xs", isEntering && "es:motion-opacity-in es:motion-duration-150", isExiting && "es:motion-opacity-out es:motion-duration-150", overlayClassName),
|
|
278
286
|
...rest,
|
|
279
|
-
children: jsx($
|
|
287
|
+
children: jsx($8b8d26808cb8cb53$export$2b77a92f1a5ad772, {
|
|
280
288
|
className: ({ isEntering, isExiting }) => clsx("es:w-full es:overflow-y-hidden es:rounded-3xl es:inset-ring es:inset-ring-surface-400/30 es:bg-white es:bg-linear-to-b es:from-accent-300/3 es:to-accent-300/1 es:text-left es:align-middle es:shadow-xl es:text-surface-900", width === "default" && "es:max-w-lg", width === "wide" && "es:max-w-[80vw]", isEntering && "es:motion-scale-in-95 es:motion-fade-in es:motion-translate-y-in-[2rem] es:motion-duration-300 es:motion-ease-spring-smooth/scale", isExiting && "es:motion-scale-out-95 es:motion-fade-out es:motion-translate-y-out-[2rem] es:motion-duration-250 es:motion-ease-spring-smooth/scale", className),
|
|
281
|
-
children: jsx($
|
|
289
|
+
children: jsx($f2ff30fde7b014be$export$3ddf2d174ce01153, {
|
|
282
290
|
className: clsx("es:relative es:text-sm es:outline-hidden", (!title || headerActions) && "es:pt-8"),
|
|
283
291
|
"aria-label": ariaLabel,
|
|
284
292
|
children: ({ close }) => jsxs(Fragment$1, { children: [
|
|
285
293
|
jsxs(HStack, {
|
|
286
294
|
className: clsx(title && "es:p-6 es:pb-3 es:justify-between", headerClassName),
|
|
287
|
-
children: [title && jsx($
|
|
295
|
+
children: [title && jsx($2ec61d1d4f780267$export$a8a3e93435678ff9, {
|
|
288
296
|
className: "es:text-balance es:text-3xl! es:my-0! es:text-accent-800 es:font-variation-[\"wdth\"_40,\"wght\"_425,\"slnt\"_-3,\"ROND\"_100]",
|
|
289
297
|
slot: "title",
|
|
290
298
|
children: title
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
//#region node_modules
|
|
1
|
+
//#region node_modules/react-stately/dist/private/utils/number.mjs
|
|
2
2
|
/**
|
|
3
3
|
* Takes a value and forces it to the closest min/max if it's outside. Also forces it to the closest valid step.
|
|
4
|
-
*/ function $
|
|
4
|
+
*/ function $240e9101ba2842f5$export$7d15b64cf5a3a4c4(value, min = -Infinity, max = Infinity) {
|
|
5
5
|
return Math.min(Math.max(value, min), max);
|
|
6
6
|
}
|
|
7
|
-
function $
|
|
7
|
+
function $240e9101ba2842f5$export$e1a7b8e69ef6c52f(value, step) {
|
|
8
8
|
let roundedValue = value;
|
|
9
9
|
let precision = 0;
|
|
10
10
|
let stepString = step.toString();
|
|
@@ -20,21 +20,21 @@ function $9446cca9a3875146$export$e1a7b8e69ef6c52f(value, step) {
|
|
|
20
20
|
}
|
|
21
21
|
return roundedValue;
|
|
22
22
|
}
|
|
23
|
-
function $
|
|
23
|
+
function $240e9101ba2842f5$export$cb6e0bb50bc19463(value, min, max, step) {
|
|
24
24
|
min = Number(min);
|
|
25
25
|
max = Number(max);
|
|
26
26
|
let remainder = (value - (isNaN(min) ? 0 : min)) % step;
|
|
27
|
-
let snappedValue = $
|
|
27
|
+
let snappedValue = $240e9101ba2842f5$export$e1a7b8e69ef6c52f(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);
|
|
28
28
|
if (!isNaN(min)) {
|
|
29
29
|
if (snappedValue < min) snappedValue = min;
|
|
30
|
-
else if (!isNaN(max) && snappedValue > max) snappedValue = min + Math.floor($
|
|
31
|
-
} else if (!isNaN(max) && snappedValue > max) snappedValue = Math.floor($
|
|
32
|
-
snappedValue = $
|
|
30
|
+
else if (!isNaN(max) && snappedValue > max) snappedValue = min + Math.floor($240e9101ba2842f5$export$e1a7b8e69ef6c52f((max - min) / step, step)) * step;
|
|
31
|
+
} else if (!isNaN(max) && snappedValue > max) snappedValue = Math.floor($240e9101ba2842f5$export$e1a7b8e69ef6c52f(max / step, step)) * step;
|
|
32
|
+
snappedValue = $240e9101ba2842f5$export$e1a7b8e69ef6c52f(snappedValue, step);
|
|
33
33
|
return snappedValue;
|
|
34
34
|
}
|
|
35
|
-
function $
|
|
35
|
+
function $240e9101ba2842f5$export$b6268554fba451f(value, digits, base = 10) {
|
|
36
36
|
const pow = Math.pow(base, digits);
|
|
37
37
|
return Math.round(value * pow) / pow;
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
|
-
export { $
|
|
40
|
+
export { $240e9101ba2842f5$export$b6268554fba451f as n, $240e9101ba2842f5$export$cb6e0bb50bc19463 as r, $240e9101ba2842f5$export$7d15b64cf5a3a4c4 as t };
|
|
@@ -1,81 +1,82 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-BUU5J41u.js";
|
|
2
|
-
import { c as $
|
|
3
|
-
import { t as $
|
|
4
|
-
import { t as $
|
|
5
|
-
import { t as $
|
|
6
|
-
import {
|
|
7
|
-
import { t as $
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { n as $
|
|
12
|
-
import { t as
|
|
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 } from "./utils-JFcCNFzy.js";
|
|
3
|
+
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-Cm6dj5jY.js";
|
|
4
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BfW758QC.js";
|
|
5
|
+
import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5, t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "./Label-B1TkoVOG.js";
|
|
6
|
+
import { n as $cd2fa56213693c5e$export$23f548e970bdf099, t as $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c } from "./useNumberFieldState-xL-ecwNz.js";
|
|
7
|
+
import { t as $7705c033048f6da7$export$24d547caef80ccd1 } from "./Button-Biwg7zwt.js";
|
|
8
|
+
import { n as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "./Text-C8pfwn0W.js";
|
|
9
|
+
import { a as $1f3c3b1a70cec653$export$ff05c3ac10437e03 } from "./useFormValidation-BcME9D0E.js";
|
|
10
|
+
import { t as $cdaed739b1139372$export$c24727297075ec6a } from "./Form-BxIJCHYd.js";
|
|
11
|
+
import { a as $3a442827418ebe87$export$f9c6924e160136d1, i as $3a442827418ebe87$export$eb2fcfdbd7ba97d4, n as $41fb335299a4a39e$export$37fb8590cf2c088c, r as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "./useTextField-BW3ZwGyz.js";
|
|
12
|
+
import { n as ButtonGroup, t as Button } from "./button-CawAzlko.js";
|
|
13
13
|
import { BaseControl } from "./components/base-control/base-control.js";
|
|
14
|
-
import { t as cva } from "./dist-
|
|
15
|
-
import "./build-module-
|
|
14
|
+
import { t as cva } from "./dist-jw8wvxoG.js";
|
|
15
|
+
import "./build-module-K6vi4xE0.js";
|
|
16
16
|
import { chevronDown } from "./icons/ui-icons/chevron-down.js";
|
|
17
17
|
import { chevronUp } from "./icons/ui-icons/chevron-up.js";
|
|
18
18
|
import React, { createContext, forwardRef, useRef } from "react";
|
|
19
19
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
-
//#region node_modules/react-aria-components/dist/NumberField.mjs
|
|
21
|
-
var $
|
|
22
|
-
var $
|
|
23
|
-
var $
|
|
24
|
-
[props, ref] = $
|
|
25
|
-
let { validationBehavior: formValidationBehavior } = $
|
|
26
|
-
|
|
27
|
-
let
|
|
28
|
-
let
|
|
29
|
-
let state = $de67e98908f0c6ee$export$7f629e9dc1ecf37c({
|
|
20
|
+
//#region node_modules/react-aria-components/dist/private/NumberField.mjs
|
|
21
|
+
var $10076bcc592bc574$export$b414a48cf5dcbc11 = createContext(null);
|
|
22
|
+
var $10076bcc592bc574$export$6cc906c6cff9bec5 = createContext(null);
|
|
23
|
+
var $10076bcc592bc574$export$63c5fa0b2fdccd2e = forwardRef(function NumberField(props, ref) {
|
|
24
|
+
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $10076bcc592bc574$export$b414a48cf5dcbc11);
|
|
25
|
+
let { validationBehavior: formValidationBehavior } = $7230ffa83bc0c2cf$export$fabf2dc03a41866e($cdaed739b1139372$export$c24727297075ec6a) || {};
|
|
26
|
+
let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? "native";
|
|
27
|
+
let { locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
28
|
+
let state = $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c({
|
|
30
29
|
...props,
|
|
31
30
|
locale,
|
|
32
31
|
validationBehavior
|
|
33
32
|
});
|
|
34
33
|
let inputRef = useRef(null);
|
|
35
|
-
let [labelRef, label] = $
|
|
36
|
-
let { labelProps, groupProps, inputProps, incrementButtonProps, decrementButtonProps, descriptionProps, errorMessageProps, ...validation } = $
|
|
37
|
-
...$
|
|
34
|
+
let [labelRef, label] = $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
35
|
+
let { labelProps, groupProps, inputProps, incrementButtonProps, decrementButtonProps, descriptionProps, errorMessageProps, ...validation } = $cd2fa56213693c5e$export$23f548e970bdf099({
|
|
36
|
+
...$7230ffa83bc0c2cf$export$ef03459518577ad4(props),
|
|
38
37
|
label,
|
|
39
38
|
validationBehavior
|
|
40
39
|
}, state, inputRef);
|
|
41
|
-
let renderProps = $
|
|
40
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
42
41
|
...props,
|
|
43
42
|
values: {
|
|
44
43
|
state,
|
|
45
44
|
isDisabled: props.isDisabled || false,
|
|
46
45
|
isInvalid: validation.isInvalid || false,
|
|
47
|
-
isRequired: props.isRequired || false
|
|
46
|
+
isRequired: props.isRequired || false,
|
|
47
|
+
isReadOnly: props.isReadOnly || false
|
|
48
48
|
},
|
|
49
49
|
defaultClassName: "react-aria-NumberField"
|
|
50
50
|
});
|
|
51
|
-
let DOMProps = $
|
|
51
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true });
|
|
52
52
|
delete DOMProps.id;
|
|
53
|
-
return React.createElement($
|
|
54
|
-
[$
|
|
55
|
-
[$
|
|
56
|
-
[$
|
|
53
|
+
return React.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, { values: [
|
|
54
|
+
[$10076bcc592bc574$export$6cc906c6cff9bec5, state],
|
|
55
|
+
[$3a442827418ebe87$export$f9c6924e160136d1, groupProps],
|
|
56
|
+
[$41fb335299a4a39e$export$37fb8590cf2c088c, {
|
|
57
57
|
...inputProps,
|
|
58
58
|
ref: inputRef
|
|
59
59
|
}],
|
|
60
|
-
[$
|
|
60
|
+
[$43a3b93638fe5db9$export$75b6ee27786ba447, {
|
|
61
61
|
...labelProps,
|
|
62
62
|
ref: labelRef
|
|
63
63
|
}],
|
|
64
|
-
[$
|
|
64
|
+
[$7705c033048f6da7$export$24d547caef80ccd1, { slots: {
|
|
65
65
|
increment: incrementButtonProps,
|
|
66
66
|
decrement: decrementButtonProps
|
|
67
67
|
} }],
|
|
68
|
-
[$
|
|
68
|
+
[$efe09c6d1c304b50$export$9afb8bc826b033ea, { slots: {
|
|
69
69
|
description: descriptionProps,
|
|
70
70
|
errorMessage: errorMessageProps
|
|
71
71
|
} }],
|
|
72
|
-
[$
|
|
73
|
-
] }, React.createElement($
|
|
72
|
+
[$1f3c3b1a70cec653$export$ff05c3ac10437e03, validation]
|
|
73
|
+
] }, React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
74
74
|
...DOMProps,
|
|
75
75
|
...renderProps,
|
|
76
76
|
ref,
|
|
77
77
|
slot: props.slot || void 0,
|
|
78
78
|
"data-disabled": props.isDisabled || void 0,
|
|
79
|
+
"data-readonly": props.isReadOnly || void 0,
|
|
79
80
|
"data-required": props.isRequired || void 0,
|
|
80
81
|
"data-invalid": validation.isInvalid || void 0
|
|
81
82
|
}), props.name && React.createElement("input", {
|
|
@@ -202,7 +203,7 @@ var inputClass = cva([
|
|
|
202
203
|
*/
|
|
203
204
|
var NumberPicker = ({ value, onChange, min = 0, max, step = 1, label, icon, subtitle, help, readOnly, disabled, placeholder, prefix, fixedWidth = null, suffix, children, inline, noScrollToChange = false, size = "default", flat, className, hidden, ...props }) => {
|
|
204
205
|
if (hidden) return null;
|
|
205
|
-
return jsx($
|
|
206
|
+
return jsx($10076bcc592bc574$export$63c5fa0b2fdccd2e, {
|
|
206
207
|
value,
|
|
207
208
|
onChange,
|
|
208
209
|
isDisabled: disabled,
|
|
@@ -213,7 +214,7 @@ var NumberPicker = ({ value, onChange, min = 0, max, step = 1, label, icon, subt
|
|
|
213
214
|
isWheelDisabled: noScrollToChange,
|
|
214
215
|
...props,
|
|
215
216
|
children: jsx(BaseControl, {
|
|
216
|
-
labelAs: $
|
|
217
|
+
labelAs: $43a3b93638fe5db9$export$b04be29aa201d4f5,
|
|
217
218
|
icon,
|
|
218
219
|
label,
|
|
219
220
|
subtitle,
|
|
@@ -221,7 +222,7 @@ var NumberPicker = ({ value, onChange, min = 0, max, step = 1, label, icon, subt
|
|
|
221
222
|
inline,
|
|
222
223
|
children: jsxs("div", {
|
|
223
224
|
className: "es:flex es:gap-1",
|
|
224
|
-
children: [jsxs($
|
|
225
|
+
children: [jsxs($3a442827418ebe87$export$eb2fcfdbd7ba97d4, {
|
|
225
226
|
className: clsx(inputClass({
|
|
226
227
|
disabled,
|
|
227
228
|
flat,
|
|
@@ -234,7 +235,7 @@ var NumberPicker = ({ value, onChange, min = 0, max, step = 1, label, icon, subt
|
|
|
234
235
|
className: "es:mr-1 es:-translate-y-px es:select-none es:leading-none es:text-current/65 es:font-variation-[\"wdth\"_76,\"wght\"_325,\"slnt\"_-2,\"ROND\"_100] es:group-focus-within:text-surface-500",
|
|
235
236
|
children: prefix
|
|
236
237
|
}),
|
|
237
|
-
jsx($
|
|
238
|
+
jsx($41fb335299a4a39e$export$f5b8910cec6cf069, {
|
|
238
239
|
className: "es:font-variation-[\"wdth\"_80,\"wght\"_325,\"slnt\"_0,\"ROND\"_100] es:placeholder-shown:font-variation-[\"wdth\"_60,\"wght\"_300,\"slnt\"_-10,\"ROND\"_0] es:any-focus:outline-hidden! es:p-px! es:border-none! es:shadow-none! es:bg-transparent es:text-13!",
|
|
239
240
|
placeholder,
|
|
240
241
|
style: { width: fixedWidth ? `calc(${fixedWidth}ch + 2px)` : `calc(${min < 0 ? "1ch + " : "0.75ch + "}${Math.max((max ?? 1e3)?.toString()?.length, (placeholder ?? "")?.length)} * 1ch)` }
|