@eightshift/ui-components 5.1.4 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Button-DH22t_SM.js → Button-RTwMSBs-.js} +20 -26
- package/dist/{Collection-BRJOMbOa.js → Collection-D_KhdLDC.js} +40 -23
- package/dist/{Color-CNqKeT8D.js → Color-WxFE7lQB.js} +2 -2
- package/dist/{ColorSwatch-Dt3lRApA.js → ColorSwatch-xVS3rMYS.js} +9 -7
- package/dist/{Dialog-D6EdDPeu.js → Dialog-Xf6AsnV-.js} +86 -62
- package/dist/{FieldError-DHrSdE_Q.js → FieldError-B8BgFmIQ.js} +2 -2
- package/dist/{FocusScope-BEPI2m7u.js → FocusScope-BnwM-e8R.js} +24 -22
- package/dist/{Form-Bnyyv3Im.js → Form-BeMxJA29.js} +13 -3
- package/dist/{Input-DfSBLhDx.js → Group-C4cXobNT.js} +56 -11
- package/dist/{Heading-ba38ScjJ.js → Heading-bh1HU5HH.js} +1 -1
- package/dist/{Label-JS_ob-kh.js → Label-DWVaNd2E.js} +1 -1
- package/dist/{List-BLeHBkfx.js → List-CwJTORxj.js} +1 -1
- package/dist/{ListBox-BY3gwI8c.js → ListBox-BeC97FZ4.js} +62 -38
- package/dist/{OverlayArrow-BUfV-5P3.js → OverlayArrow-EZ0v_ljk.js} +6 -6
- package/dist/{Select-BebwUgKB.js → Select-DEQf8ZWI.js} +96 -58
- package/dist/{Select-aab027f3.esm-BKIJGje-.js → Select-ef7c0426.esm-D6WOCaYm.js} +11 -6
- package/dist/{Separator-CTQWg_HO.js → Separator-Fl7qSeN-.js} +37 -20
- package/dist/{Slider-uOPcIpqS.js → Slider-BQFSEhvk.js} +28 -21
- package/dist/{Text-BuJgePCv.js → Text-AxKZjtFm.js} +1 -1
- package/dist/{TextField-o2U-uBWv.js → TextField-x_eEa_qR.js} +20 -10
- package/dist/{VisuallyHidden-BYi0pekx.js → VisuallyHidden-D9s7FTtC.js} +2 -2
- package/dist/assets/style-admin.css +227 -3
- package/dist/assets/style-editor.css +227 -3
- package/dist/assets/style.css +227 -3
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/button/button.js +11 -10
- package/dist/components/checkbox/checkbox.js +17 -12
- package/dist/components/color-pickers/color-picker.js +1 -1
- package/dist/components/color-pickers/color-swatch.js +3 -3
- package/dist/components/color-pickers/gradient-editor.js +3 -2
- package/dist/components/color-pickers/solid-color-picker.js +85 -49
- package/dist/components/component-toggle/component-toggle.js +2 -1
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +191 -170
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +18 -18
- package/dist/components/index.js +5 -1
- package/dist/components/input-field/input-field.js +3 -3
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +45 -34
- package/dist/components/matrix-align/matrix-align.js +1 -1
- package/dist/components/menu/menu.js +3 -3
- package/dist/components/modal/modal.js +39 -13
- package/dist/components/number-picker/number-picker.js +15 -13
- package/dist/components/option-select/option-select.js +1 -1
- package/dist/components/options-panel/options-panel.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +2 -2
- package/dist/components/radio/radio.js +45 -22
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.js +2 -2
- package/dist/components/responsive/mini-responsive.js +3 -2
- package/dist/components/responsive/responsive-legacy.js +2 -1
- package/dist/components/responsive/responsive.js +2 -1
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/select/async-multi-select.js +3 -3
- package/dist/components/select/async-single-select.js +2 -2
- package/dist/components/select/custom-select-default-components.js +1 -1
- package/dist/components/select/multi-select-components.js +1 -1
- package/dist/components/select/multi-select.js +3 -3
- package/dist/components/select/react-select-component-wrappers.js +1 -1
- package/dist/components/select/shared.js +19 -1
- package/dist/components/select/single-select.js +2 -2
- package/dist/components/select/v2/async-multi-select.js +432 -0
- package/dist/components/select/v2/async-select.js +25 -14
- package/dist/components/select/v2/multi-select.js +403 -0
- package/dist/components/select/v2/shared.js +44 -8
- package/dist/components/select/v2/single-select.js +10 -10
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/slider/utils.js +2 -1
- package/dist/components/tabs/tabs.js +33 -23
- package/dist/components/toggle/switch.js +11 -8
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +14 -8
- package/dist/components/tooltip/tooltip.js +9 -7
- package/dist/{context-BbYZoHvX.js → context-DMOmz986.js} +1 -1
- package/dist/{default-i18n-OFa3zAyB.js → default-i18n-DY6EfUSA.js} +21 -284
- package/dist/filterDOMProps-D2C6R0DK.js +71 -0
- package/dist/icons/icons.js +1 -1
- package/dist/{index-641ee5b8.esm-BPU8rMZr.js → index-641ee5b8.esm-Bu-mgopl.js} +1 -1
- package/dist/{index-CFozsmNS.js → index-CBHA_HDD.js} +3 -1
- package/dist/{index-BljRBEr_.js → index-Dq3gT5pW.js} +1 -1
- package/dist/index.js +4 -0
- package/dist/{multi-select-components-BcKzA24f.js → multi-select-components-rCCyCaKO.js} +1 -1
- package/dist/{number-CHmNj-oR.js → number-7sOvrqo0.js} +7 -2
- package/dist/{react-select-async.esm-D937XTWW.js → react-select-async.esm-XYrsKYb2.js} +3 -3
- package/dist/{react-select.esm-Ciai3aKf.js → react-select.esm-CCSPY6XR.js} +3 -3
- package/dist/sprintf-DmNrJSYG.js +51 -0
- package/dist/{textSelection-8DpK8fJl.js → textSelection-D5tWX1rJ.js} +1 -1
- package/dist/{useAsyncList-fLtZMvJO.js → useAsyncList-ZqaIH2gh.js} +1 -1
- package/dist/{useButton-lRcWnvOB.js → useButton-BtJSiQi3.js} +13 -5
- package/dist/useDragAndDrop-CddFteYC.js +3917 -0
- package/dist/{useEvent-ICdlokG-.js → useEvent-BifIGnVS.js} +1 -1
- package/dist/{useFilter-BR5z1A4Q.js → useFilter-Cl2ggwwq.js} +1 -1
- package/dist/{useFocusRing-Bv0UJQl8.js → useFocusRing-D5BfOWag.js} +3 -3
- package/dist/{useFormReset-D2YaWRIA.js → useFormReset-yV9VVy9R.js} +3 -4
- package/dist/{useHover-C2SkI1Fn.js → useHover-44IApaa2.js} +67 -34
- package/dist/{useLabel-BPCd5c7-.js → useLabel-C8umX0gk.js} +2 -2
- package/dist/{useLabels-B7-lUnAF.js → useLabels-Cdxi6JSa.js} +1 -1
- package/dist/{useListState-BrZ2XvDS.js → useListState-BSkHuB7-.js} +1 -1
- package/dist/{useLocalizedStringFormatter-C9GO0IDB.js → useLocalizedStringFormatter-eaZiN2tE.js} +1 -1
- package/dist/{useNumberField-y0dLc_6m.js → useNumberField-JhWPy1JY.js} +23 -16
- package/dist/{useNumberFormatter-CZ9QUnRt.js → useNumberFormatter-BCmkV-7c.js} +1 -1
- package/dist/{usePress-DWBuejBp.js → usePress-BnrkvZ7e.js} +20 -5
- package/dist/{useSingleSelectListState-Bh46cRXs.js → useSingleSelectListState-CzJFsSHr.js} +2 -2
- package/dist/{useToggle-yGuUBU7q.js → useToggle-OaIBlwRu.js} +21 -8
- package/dist/{useToggleState-ibcBUHnB.js → useToggleState-BF8hvidm.js} +5 -1
- package/dist/{utils-CZt7LCbO.js → utils-cvK1vxO7.js} +9 -7
- package/package.json +18 -18
- package/dist/Group-LBogWgyp.js +0 -48
- package/dist/_commonjsHelpers-CUmg6egw.js +0 -6
- package/dist/filterDOMProps-EDDcM64A.js +0 -28
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-
|
|
2
|
-
import {
|
|
3
|
-
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-
|
|
4
|
-
import { b as $e93e671b31057976$export$b8473d3665f3a75a, a as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-
|
|
5
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-
|
|
6
|
-
import {
|
|
7
|
-
import { o as $168583247155ddda$export$dc9c12ed27dd1b49, l as $de32f1b87079253c$export$d2f961adcb0afbe, p as $07b14b47974efb58$export$9b9a0cd73afb7ca4 } from "./Dialog-
|
|
8
|
-
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-
|
|
9
|
-
import { l as $fb3050f43d946246$export$e32c88dfddc6e1d8, e as $e1995378a142960e$export$bf788dd355e3a401 } from "./Collection-
|
|
10
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-
|
|
11
|
-
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, f as $9daab02d461809db$export$683480f191c0e3ea } from "./OverlayArrow-
|
|
12
|
-
import React__default, { useMemo, useRef, useState, forwardRef, createContext, useContext
|
|
13
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
14
|
-
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "./useSingleSelectListState-
|
|
15
|
-
import {
|
|
16
|
-
import { d as $325a3faab7a68acd$export$a16aca283550c30d, i as $2a25aae57d74318e$export$a05409b8bb224a5a } from "./Separator-
|
|
17
|
-
import {
|
|
18
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-
|
|
19
|
-
import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "./VisuallyHidden-
|
|
1
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-RTwMSBs-.js";
|
|
2
|
+
import { b as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $bdb11010cef70236$export$f680877a34711e37, p as $ff5963eb1fccf552$export$e08e3b67e392101e, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, h as $64fa3d84918910a7$export$4d86445c2cf5e3, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$ef03459518577ad4, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "./utils-cvK1vxO7.js";
|
|
3
|
+
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-B8BgFmIQ.js";
|
|
4
|
+
import { b as $e93e671b31057976$export$b8473d3665f3a75a, a as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-BeMxJA29.js";
|
|
5
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DWVaNd2E.js";
|
|
6
|
+
import { c as $eed445e0843c11d0$export$7ff8f37d2d81a48d, d as $eed445e0843c11d0$export$7c5906fe4f1f2af2 } from "./ListBox-BeC97FZ4.js";
|
|
7
|
+
import { o as $168583247155ddda$export$dc9c12ed27dd1b49, l as $de32f1b87079253c$export$d2f961adcb0afbe, p as $07b14b47974efb58$export$9b9a0cd73afb7ca4 } from "./Dialog-Xf6AsnV-.js";
|
|
8
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-AxKZjtFm.js";
|
|
9
|
+
import { l as $fb3050f43d946246$export$e32c88dfddc6e1d8, e as $e1995378a142960e$export$bf788dd355e3a401 } from "./Collection-D_KhdLDC.js";
|
|
10
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
|
|
11
|
+
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, f as $9daab02d461809db$export$683480f191c0e3ea } from "./OverlayArrow-EZ0v_ljk.js";
|
|
12
|
+
import React__default, { useMemo, useRef, useCallback, useState, forwardRef, createContext, useContext } from "react";
|
|
13
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-eaZiN2tE.js";
|
|
14
|
+
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "./useSingleSelectListState-CzJFsSHr.js";
|
|
15
|
+
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-D5BfOWag.js";
|
|
16
|
+
import { d as $325a3faab7a68acd$export$a16aca283550c30d, i as $2a25aae57d74318e$export$a05409b8bb224a5a } from "./Separator-Fl7qSeN-.js";
|
|
17
|
+
import { x as $507fabe10e71c6fb$export$8397ddfc504fdb9a } from "./useHover-44IApaa2.js";
|
|
18
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-yV9VVy9R.js";
|
|
19
|
+
import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "./VisuallyHidden-D9s7FTtC.js";
|
|
20
20
|
const $58aed456727eb0f3$export$703601b7e90536f8 = /* @__PURE__ */ new WeakMap();
|
|
21
21
|
function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
22
|
-
let { keyboardDelegate, isDisabled, isRequired, name, validationBehavior = "aria" } = props;
|
|
22
|
+
let { keyboardDelegate, isDisabled, isRequired, name, form, validationBehavior = "aria" } = props;
|
|
23
23
|
let collator = $325a3faab7a68acd$export$a16aca283550c30d({
|
|
24
24
|
usage: "search",
|
|
25
25
|
sensitivity: "base"
|
|
@@ -78,6 +78,7 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
|
78
78
|
isDisabled,
|
|
79
79
|
isRequired,
|
|
80
80
|
name,
|
|
81
|
+
form,
|
|
81
82
|
validationBehavior
|
|
82
83
|
});
|
|
83
84
|
return {
|
|
@@ -139,15 +140,30 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
|
139
140
|
errorMessageProps,
|
|
140
141
|
isInvalid,
|
|
141
142
|
validationErrors,
|
|
142
|
-
validationDetails
|
|
143
|
+
validationDetails,
|
|
144
|
+
hiddenSelectProps: {
|
|
145
|
+
isDisabled,
|
|
146
|
+
name,
|
|
147
|
+
label: props.label,
|
|
148
|
+
state,
|
|
149
|
+
triggerRef: ref,
|
|
150
|
+
form
|
|
151
|
+
}
|
|
143
152
|
};
|
|
144
153
|
}
|
|
145
154
|
function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
146
155
|
let data = $58aed456727eb0f3$export$703601b7e90536f8.get(state) || {};
|
|
147
|
-
let { autoComplete, name = data.name, isDisabled = data.isDisabled } = props;
|
|
156
|
+
let { autoComplete, name = data.name, form = data.form, isDisabled = data.isDisabled } = props;
|
|
148
157
|
let { validationBehavior, isRequired } = data;
|
|
149
|
-
let { visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab(
|
|
150
|
-
|
|
158
|
+
let { visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab({
|
|
159
|
+
style: {
|
|
160
|
+
// Prevent page scrolling.
|
|
161
|
+
position: "fixed",
|
|
162
|
+
top: 0,
|
|
163
|
+
left: 0
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
$99facab73266f662$export$5add1d006293d136(props.selectRef, state.defaultSelectedKey, state.setSelectedKey);
|
|
151
167
|
$e93e671b31057976$export$b8473d3665f3a75a({
|
|
152
168
|
validationBehavior,
|
|
153
169
|
focus: () => {
|
|
@@ -155,6 +171,9 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
|
155
171
|
return (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();
|
|
156
172
|
}
|
|
157
173
|
}, state, props.selectRef);
|
|
174
|
+
let onChange = useCallback((e) => state.setSelectedKey(e.currentTarget.value), [
|
|
175
|
+
state.setSelectedKey
|
|
176
|
+
]);
|
|
158
177
|
var _state_selectedKey;
|
|
159
178
|
return {
|
|
160
179
|
containerProps: {
|
|
@@ -176,19 +195,21 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
|
176
195
|
disabled: isDisabled,
|
|
177
196
|
required: validationBehavior === "native" && isRequired,
|
|
178
197
|
name,
|
|
179
|
-
|
|
180
|
-
|
|
198
|
+
form,
|
|
199
|
+
value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey : "",
|
|
200
|
+
onChange,
|
|
201
|
+
onInput: onChange
|
|
181
202
|
}
|
|
182
203
|
};
|
|
183
204
|
}
|
|
184
205
|
function $bdd25dc72710631f$export$cbd84cdb2e668835(props) {
|
|
185
|
-
let { state, triggerRef, label, name, isDisabled } = props;
|
|
206
|
+
let { state, triggerRef, label, name, form, isDisabled } = props;
|
|
186
207
|
let selectRef = useRef(null);
|
|
208
|
+
let inputRef = useRef(null);
|
|
187
209
|
let { containerProps, selectProps } = $bdd25dc72710631f$export$f809e80f58e251d1({
|
|
188
210
|
...props,
|
|
189
|
-
selectRef
|
|
211
|
+
selectRef: state.collection.size <= 300 ? selectRef : inputRef
|
|
190
212
|
}, state, triggerRef);
|
|
191
|
-
var _state_selectedKey;
|
|
192
213
|
if (state.collection.size <= 300) return /* @__PURE__ */ React__default.createElement("div", {
|
|
193
214
|
...containerProps,
|
|
194
215
|
"data-testid": "hidden-select-container"
|
|
@@ -204,13 +225,35 @@ function $bdd25dc72710631f$export$cbd84cdb2e668835(props) {
|
|
|
204
225
|
value: item.key
|
|
205
226
|
}, item.textValue);
|
|
206
227
|
}))));
|
|
207
|
-
else if (name)
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
228
|
+
else if (name) {
|
|
229
|
+
let data = $58aed456727eb0f3$export$703601b7e90536f8.get(state) || {};
|
|
230
|
+
let { validationBehavior } = data;
|
|
231
|
+
var _state_selectedKey;
|
|
232
|
+
let inputProps = {
|
|
233
|
+
type: "hidden",
|
|
234
|
+
autoComplete: selectProps.autoComplete,
|
|
235
|
+
name,
|
|
236
|
+
form,
|
|
237
|
+
disabled: isDisabled,
|
|
238
|
+
value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey : ""
|
|
239
|
+
};
|
|
240
|
+
if (validationBehavior === "native")
|
|
241
|
+
return /* @__PURE__ */ React__default.createElement("input", {
|
|
242
|
+
...inputProps,
|
|
243
|
+
ref: inputRef,
|
|
244
|
+
style: {
|
|
245
|
+
display: "none"
|
|
246
|
+
},
|
|
247
|
+
type: "text",
|
|
248
|
+
required: selectProps.required,
|
|
249
|
+
onChange: () => {
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
return /* @__PURE__ */ React__default.createElement("input", {
|
|
253
|
+
...inputProps,
|
|
254
|
+
ref: inputRef
|
|
255
|
+
});
|
|
256
|
+
}
|
|
214
257
|
return null;
|
|
215
258
|
}
|
|
216
259
|
function $2bc3a590c5373a4e$export$5159ec8b34d4ec12(props) {
|
|
@@ -229,25 +272,22 @@ function $2bc3a590c5373a4e$export$5159ec8b34d4ec12(props) {
|
|
|
229
272
|
value: listState.selectedKey
|
|
230
273
|
});
|
|
231
274
|
let [isFocused, setFocused] = useState(false);
|
|
232
|
-
let
|
|
233
|
-
|
|
234
|
-
return listState.collection.size === 0 || listState.collection.size === 1 && ((_listState_collection_getItem = listState.collection.getItem(listState.collection.getFirstKey())) === null || _listState_collection_getItem === void 0 ? void 0 : _listState_collection_getItem.type) === "loader";
|
|
235
|
-
}, [
|
|
236
|
-
listState.collection
|
|
237
|
-
]);
|
|
275
|
+
let [initialSelectedKey] = useState(listState.selectedKey);
|
|
276
|
+
var _props_defaultSelectedKey;
|
|
238
277
|
return {
|
|
239
278
|
...validationState,
|
|
240
279
|
...listState,
|
|
241
280
|
...triggerState,
|
|
281
|
+
defaultSelectedKey: (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== void 0 ? _props_defaultSelectedKey : initialSelectedKey,
|
|
242
282
|
focusStrategy,
|
|
243
283
|
open(focusStrategy2 = null) {
|
|
244
|
-
if (
|
|
284
|
+
if (listState.collection.size !== 0) {
|
|
245
285
|
setFocusStrategy(focusStrategy2);
|
|
246
286
|
triggerState.open();
|
|
247
287
|
}
|
|
248
288
|
},
|
|
249
289
|
toggle(focusStrategy2 = null) {
|
|
250
|
-
if (
|
|
290
|
+
if (listState.collection.size !== 0) {
|
|
251
291
|
setFocusStrategy(focusStrategy2);
|
|
252
292
|
triggerState.toggle();
|
|
253
293
|
}
|
|
@@ -581,7 +621,7 @@ function $82d7e5349645de74$var$SelectInner({ props, selectRef: ref, collection }
|
|
|
581
621
|
});
|
|
582
622
|
let buttonRef = useRef(null);
|
|
583
623
|
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
584
|
-
let { labelProps, triggerProps, valueProps, menuProps, descriptionProps, errorMessageProps, ...validation } = $58aed456727eb0f3$export$e64b2f635402ca43({
|
|
624
|
+
let { labelProps, triggerProps, valueProps, menuProps, descriptionProps, errorMessageProps, hiddenSelectProps, ...validation } = $58aed456727eb0f3$export$e64b2f635402ca43({
|
|
585
625
|
...$64fa3d84918910a7$export$ef03459518577ad4(props),
|
|
586
626
|
label,
|
|
587
627
|
validationBehavior
|
|
@@ -616,7 +656,9 @@ function $82d7e5349645de74$var$SelectInner({ props, selectRef: ref, collection }
|
|
|
616
656
|
values: renderPropsState,
|
|
617
657
|
defaultClassName: "react-aria-Select"
|
|
618
658
|
});
|
|
619
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props
|
|
659
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
660
|
+
global: true
|
|
661
|
+
});
|
|
620
662
|
delete DOMProps.id;
|
|
621
663
|
let scrollRef = useRef(null);
|
|
622
664
|
return /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
@@ -694,9 +736,7 @@ function $82d7e5349645de74$var$SelectInner({ props, selectRef: ref, collection }
|
|
|
694
736
|
]
|
|
695
737
|
]
|
|
696
738
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
697
|
-
|
|
698
|
-
...renderProps,
|
|
699
|
-
...focusProps,
|
|
739
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, focusProps),
|
|
700
740
|
ref,
|
|
701
741
|
slot: props.slot || void 0,
|
|
702
742
|
"data-focused": state.isFocused || void 0,
|
|
@@ -705,14 +745,10 @@ function $82d7e5349645de74$var$SelectInner({ props, selectRef: ref, collection }
|
|
|
705
745
|
"data-disabled": props.isDisabled || void 0,
|
|
706
746
|
"data-invalid": validation.isInvalid || void 0,
|
|
707
747
|
"data-required": props.isRequired || void 0
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
label,
|
|
713
|
-
name: props.name,
|
|
714
|
-
isDisabled: props.isDisabled
|
|
715
|
-
}));
|
|
748
|
+
}, renderProps.children, /* @__PURE__ */ React__default.createElement($bdd25dc72710631f$export$cbd84cdb2e668835, {
|
|
749
|
+
...hiddenSelectProps,
|
|
750
|
+
autoComplete: props.autoComplete
|
|
751
|
+
})));
|
|
716
752
|
}
|
|
717
753
|
const $82d7e5349645de74$export$f8f745c04421623f = /* @__PURE__ */ createContext(null);
|
|
718
754
|
const $82d7e5349645de74$export$e288731fd71264f0 = /* @__PURE__ */ forwardRef(function SelectValue(props, ref) {
|
|
@@ -747,7 +783,9 @@ const $82d7e5349645de74$export$e288731fd71264f0 = /* @__PURE__ */ forwardRef(fun
|
|
|
747
783
|
isPlaceholder: !selectedItem
|
|
748
784
|
}
|
|
749
785
|
});
|
|
750
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props
|
|
786
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
787
|
+
global: true
|
|
788
|
+
});
|
|
751
789
|
return /* @__PURE__ */ React__default.createElement("span", {
|
|
752
790
|
ref,
|
|
753
791
|
...DOMProps,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as _objectWithoutProperties, b as _slicedToArray, d as _objectSpread2, t as toPropertyKey, f as _typeof, g as _arrayLikeToArray, i as _unsupportedIterableToArray, m as multiValueAsValue, s as singleValueAsValue, v as valueTernary, j as classNames, k as valueContainerCSS, l as css, p as placeholderCSS, o as optionCSS, n as noOptionsMessageCSS, q as multiValueRemoveCSS, r as multiValueLabelCSS, u as multiValueCSS, w as menuPortalCSS, x as menuListCSS, y as menuCSS, z as loadingMessageCSS, A as loadingIndicatorCSS, B as inputCSS, C as indicatorSeparatorCSS, D as indicatorsContainerCSS, E as groupHeadingCSS, F as groupCSS, G as dropdownIndicatorCSS, H as css$1, I as containerCSS, J as clearIndicatorCSS, K as defaultComponents, L as isDocumentElement, M as cleanValue, N as notNullish, O as isMobileDevice, P as isTouchCapable, Q as scrollIntoView, _ as _extends, R as noop, S as MenuPlacer, T as removeProps, U as jsx, V as css$2, W as supportsPassiveEvents } from "./index-641ee5b8.esm-
|
|
1
|
+
import { a as _objectWithoutProperties, b as _slicedToArray, d as _objectSpread2, t as toPropertyKey, f as _typeof, g as _arrayLikeToArray, i as _unsupportedIterableToArray, m as multiValueAsValue, s as singleValueAsValue, v as valueTernary, j as classNames, k as valueContainerCSS, l as css, p as placeholderCSS, o as optionCSS, n as noOptionsMessageCSS, q as multiValueRemoveCSS, r as multiValueLabelCSS, u as multiValueCSS, w as menuPortalCSS, x as menuListCSS, y as menuCSS, z as loadingMessageCSS, A as loadingIndicatorCSS, B as inputCSS, C as indicatorSeparatorCSS, D as indicatorsContainerCSS, E as groupHeadingCSS, F as groupCSS, G as dropdownIndicatorCSS, H as css$1, I as containerCSS, J as clearIndicatorCSS, K as defaultComponents, L as isDocumentElement, M as cleanValue, N as notNullish, O as isMobileDevice, P as isTouchCapable, Q as scrollIntoView, _ as _extends, R as noop, S as MenuPlacer, T as removeProps, U as jsx, V as css$2, W as supportsPassiveEvents } from "./index-641ee5b8.esm-Bu-mgopl.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useState, useCallback, Component, Fragment, useMemo, useRef, useEffect } from "react";
|
|
4
4
|
var _excluded$1 = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
@@ -1200,7 +1200,8 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
1200
1200
|
prevWasFocused: false,
|
|
1201
1201
|
inputIsHiddenAfterUpdate: void 0,
|
|
1202
1202
|
prevProps: void 0,
|
|
1203
|
-
instancePrefix: ""
|
|
1203
|
+
instancePrefix: "",
|
|
1204
|
+
isAppleDevice: false
|
|
1204
1205
|
};
|
|
1205
1206
|
_this.blockOptionHover = false;
|
|
1206
1207
|
_this.isComposing = false;
|
|
@@ -1210,7 +1211,6 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
1210
1211
|
_this.openAfterFocus = false;
|
|
1211
1212
|
_this.scrollToFocusedOptionOnUpdate = false;
|
|
1212
1213
|
_this.userIsDragging = void 0;
|
|
1213
|
-
_this.isAppleDevice = isAppleDevice();
|
|
1214
1214
|
_this.controlRef = null;
|
|
1215
1215
|
_this.getControlRef = function(ref) {
|
|
1216
1216
|
_this.controlRef = ref;
|
|
@@ -1703,6 +1703,11 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
1703
1703
|
if (this.props.menuIsOpen && this.state.focusedOption && this.menuListRef && this.focusedOptionRef) {
|
|
1704
1704
|
scrollIntoView(this.menuListRef, this.focusedOptionRef);
|
|
1705
1705
|
}
|
|
1706
|
+
if (isAppleDevice()) {
|
|
1707
|
+
this.setState({
|
|
1708
|
+
isAppleDevice: true
|
|
1709
|
+
});
|
|
1710
|
+
}
|
|
1706
1711
|
}
|
|
1707
1712
|
}, {
|
|
1708
1713
|
key: "componentDidUpdate",
|
|
@@ -2027,7 +2032,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
2027
2032
|
"aria-labelledby": this.props["aria-labelledby"],
|
|
2028
2033
|
"aria-required": required,
|
|
2029
2034
|
role: "combobox",
|
|
2030
|
-
"aria-activedescendant": this.isAppleDevice ? void 0 : this.state.focusedOptionId || ""
|
|
2035
|
+
"aria-activedescendant": this.state.isAppleDevice ? void 0 : this.state.focusedOptionId || ""
|
|
2031
2036
|
}, menuIsOpen && {
|
|
2032
2037
|
"aria-controls": this.getElementId("listbox")
|
|
2033
2038
|
}), !isSearchable && {
|
|
@@ -2221,7 +2226,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
2221
2226
|
onMouseOver: onHover,
|
|
2222
2227
|
tabIndex: -1,
|
|
2223
2228
|
role: "option",
|
|
2224
|
-
"aria-selected": _this4.isAppleDevice ? void 0 : isSelected
|
|
2229
|
+
"aria-selected": _this4.state.isAppleDevice ? void 0 : isSelected
|
|
2225
2230
|
// is not supported on Apple devices
|
|
2226
2231
|
};
|
|
2227
2232
|
return /* @__PURE__ */ React.createElement(Option, _extends({}, commonProps, {
|
|
@@ -2381,7 +2386,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
2381
2386
|
isFocused,
|
|
2382
2387
|
selectValue,
|
|
2383
2388
|
focusableOptions,
|
|
2384
|
-
isAppleDevice: this.isAppleDevice
|
|
2389
|
+
isAppleDevice: this.state.isAppleDevice
|
|
2385
2390
|
}));
|
|
2386
2391
|
}
|
|
2387
2392
|
}, {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
1
|
+
import { p as $cc38e7bd3fc7b213$export$2bb74740c4e19def, q as $feb5ffebff200149$export$c3d8340acf92597f, i as $ae20dd8cbca75726$export$d6daf82dcd84e87c, m as $c5a24bc478652b5f$export$1005530eda016c13, r as $5671b20cf9b562b2$export$831c820ad60f9d12, s as $55f9b1ae81f22853$export$76e4e37e5339496d, t as $5671b20cf9b562b2$export$447a38995de2c711, u as $55f9b1ae81f22853$export$6c5dc7e81d2cc29a, n as $55f9b1ae81f22853$export$2b35b76d2e30e129, v as $21f1aa98acb08317$export$16792effe837dba3, w as $55f9b1ae81f22853$export$759df0d867455a91, d as $e1995378a142960e$export$18af5c7a9e9b3664 } from "./Collection-D_KhdLDC.js";
|
|
2
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DMOmz986.js";
|
|
3
3
|
import React__default, { useMemo, createContext, useRef, useEffect, useCallback, useState } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { p as $ff5963eb1fccf552$export$e08e3b67e392101e, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e,
|
|
6
|
-
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-
|
|
7
|
-
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-
|
|
8
|
-
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-
|
|
9
|
-
import {
|
|
10
|
-
import { a as $
|
|
11
|
-
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-BuJgePCv.js";
|
|
4
|
+
import { d as $2d73ec29415bd339$export$712718f7aec83d5, b as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $a049562f99e7db0e$export$f9c6924e160136d1 } from "./Group-C4cXobNT.js";
|
|
5
|
+
import { p as $ff5963eb1fccf552$export$e08e3b67e392101e, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$ef03459518577ad4, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, b as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $bdb11010cef70236$export$f680877a34711e37, e as $8ae05eaa5c114e9c$export$7f54fc3180508a52, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e } from "./utils-cvK1vxO7.js";
|
|
6
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-RTwMSBs-.js";
|
|
7
|
+
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-B8BgFmIQ.js";
|
|
8
|
+
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-BeMxJA29.js";
|
|
9
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DWVaNd2E.js";
|
|
10
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-AxKZjtFm.js";
|
|
12
11
|
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "./Hidden-rE6uR-lr.js";
|
|
13
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-
|
|
14
|
-
import {
|
|
15
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
16
|
-
import { b as $bcdf0525bf22703d$export$2129e27b3ef0d483 } from "./TextField-
|
|
17
|
-
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-
|
|
12
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
|
|
13
|
+
import { a as $458b0a5536c1a7cf$export$40bfa8c7b0832715, h as $d4ee10de306f2510$export$cd4e5573fbe2b576, c as $431fbd86ca7dc216$export$b204af158042fbac, v as $507fabe10e71c6fb$export$630ff653c5ada6a9 } from "./useHover-44IApaa2.js";
|
|
14
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-eaZiN2tE.js";
|
|
15
|
+
import { b as $bcdf0525bf22703d$export$2129e27b3ef0d483 } from "./TextField-x_eEa_qR.js";
|
|
16
|
+
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-Cdxi6JSa.js";
|
|
17
|
+
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-BifIGnVS.js";
|
|
18
18
|
function $62d8ded9296f3872$export$cfa2225e87938781(node, checkForOverflow) {
|
|
19
19
|
let scrollableNode = node;
|
|
20
20
|
if ($cc38e7bd3fc7b213$export$2bb74740c4e19def(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
|
|
@@ -570,7 +570,9 @@ const $440f4836bcb56932$export$b94867ecbd698f21 = /* @__PURE__ */ $f39a9eba43920
|
|
|
570
570
|
},
|
|
571
571
|
defaultClassName: "react-aria-SearchField"
|
|
572
572
|
});
|
|
573
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props
|
|
573
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
574
|
+
global: true
|
|
575
|
+
});
|
|
574
576
|
delete DOMProps.id;
|
|
575
577
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
576
578
|
...DOMProps,
|
|
@@ -873,10 +875,17 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
|
|
|
873
875
|
delayNextActiveDescendant.current = false;
|
|
874
876
|
(_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dispatchEvent(clearFocusEvent);
|
|
875
877
|
});
|
|
878
|
+
let lastInputType = useRef("");
|
|
879
|
+
$e9faafb641e167db$export$90fc3a17d93f704c(inputRef, "input", (e) => {
|
|
880
|
+
let { inputType } = e;
|
|
881
|
+
lastInputType.current = inputType;
|
|
882
|
+
});
|
|
876
883
|
let onChange = (value) => {
|
|
877
|
-
if (
|
|
878
|
-
else
|
|
884
|
+
if (lastInputType.current === "insertText" && !disableAutoFocusFirst) focusFirstItem();
|
|
885
|
+
else if (lastInputType.current.includes("insert") || lastInputType.current.includes("delete") || lastInputType.current.includes("history")) {
|
|
879
886
|
clearVirtualFocus(true);
|
|
887
|
+
if ($55f9b1ae81f22853$export$759df0d867455a91(document) === inputRef.current) $55f9b1ae81f22853$export$2b35b76d2e30e129(inputRef.current, null);
|
|
888
|
+
}
|
|
880
889
|
state.setInputValue(value);
|
|
881
890
|
};
|
|
882
891
|
let keyDownTarget = useRef(null);
|
|
@@ -926,6 +935,12 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
|
|
|
926
935
|
case "ArrowRight":
|
|
927
936
|
clearVirtualFocus();
|
|
928
937
|
break;
|
|
938
|
+
case "Enter":
|
|
939
|
+
if (focusedNodeId != null) {
|
|
940
|
+
let item = document.getElementById(focusedNodeId);
|
|
941
|
+
item === null || item === void 0 ? void 0 : item.click();
|
|
942
|
+
}
|
|
943
|
+
break;
|
|
929
944
|
}
|
|
930
945
|
};
|
|
931
946
|
let onKeyUpCapture = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
|
|
@@ -1086,9 +1101,11 @@ const $431f98aba6844401$export$1ff3c3f08ae963c0 = /* @__PURE__ */ $e1995378a1429
|
|
|
1086
1101
|
elementType,
|
|
1087
1102
|
orientation
|
|
1088
1103
|
});
|
|
1104
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
1105
|
+
global: true
|
|
1106
|
+
});
|
|
1089
1107
|
return /* @__PURE__ */ React__default.createElement(Element, {
|
|
1090
|
-
...$
|
|
1091
|
-
...separatorProps,
|
|
1108
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, separatorProps),
|
|
1092
1109
|
style,
|
|
1093
1110
|
className: className !== null && className !== void 0 ? className : "react-aria-Separator",
|
|
1094
1111
|
ref,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-
|
|
3
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-
|
|
1
|
+
import { e as $8ae05eaa5c114e9c$export$7f54fc3180508a52, b as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "./utils-cvK1vxO7.js";
|
|
2
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DWVaNd2E.js";
|
|
3
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
|
|
4
4
|
import React__default, { useRef, useMemo, useCallback, useState, useEffect, forwardRef, createContext, useContext } from "react";
|
|
5
|
-
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-
|
|
6
|
-
import {
|
|
7
|
-
import { a as $9446cca9a3875146$export$cb6e0bb50bc19463, $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./number-
|
|
8
|
-
import { $ as $14c0b72509d70225$export$b0d6fa1ab32e3295, a as $14c0b72509d70225$export$16a4697467175487 } from "./textSelection-
|
|
9
|
-
import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-
|
|
10
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
11
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-
|
|
12
|
-
import {
|
|
13
|
-
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-
|
|
5
|
+
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-BCmkV-7c.js";
|
|
6
|
+
import { f as $03deb23ff14920c4$export$4eaf04e54aa8eed6, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715, x as $507fabe10e71c6fb$export$8397ddfc504fdb9a, z as $7215afc6de606d6b$export$de79e2c695e052f3, A as $46d819fcbaf35654$export$8f71654801c2f7cd, $ as $f645667febf57a63$export$4c014de7c8940b4c, e as $6179b936705e76d3$export$ae780daf29e6d456 } from "./useHover-44IApaa2.js";
|
|
7
|
+
import { a as $9446cca9a3875146$export$cb6e0bb50bc19463, $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./number-7sOvrqo0.js";
|
|
8
|
+
import { $ as $14c0b72509d70225$export$b0d6fa1ab32e3295, a as $14c0b72509d70225$export$16a4697467175487 } from "./textSelection-D5tWX1rJ.js";
|
|
9
|
+
import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-C8umX0gk.js";
|
|
10
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DMOmz986.js";
|
|
11
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-yV9VVy9R.js";
|
|
12
|
+
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-D5BfOWag.js";
|
|
13
|
+
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-D9s7FTtC.js";
|
|
14
14
|
function $e8a7022cf87cba2a$export$36da96379f79f245(props) {
|
|
15
15
|
let { onMoveStart, onMove, onMoveEnd } = props;
|
|
16
16
|
let state = useRef({
|
|
@@ -242,7 +242,8 @@ function $28f99e3e86e6ec45$export$e5fda3247f5d67f9(props) {
|
|
|
242
242
|
step
|
|
243
243
|
]);
|
|
244
244
|
let value = useMemo(() => restrictValues($28f99e3e86e6ec45$var$convertValue(props.value)), [
|
|
245
|
-
props.value
|
|
245
|
+
props.value,
|
|
246
|
+
restrictValues
|
|
246
247
|
]);
|
|
247
248
|
let defaultValue = useMemo(() => {
|
|
248
249
|
var _convertValue;
|
|
@@ -251,11 +252,13 @@ function $28f99e3e86e6ec45$export$e5fda3247f5d67f9(props) {
|
|
|
251
252
|
]);
|
|
252
253
|
}, [
|
|
253
254
|
props.defaultValue,
|
|
254
|
-
minValue
|
|
255
|
+
minValue,
|
|
256
|
+
restrictValues
|
|
255
257
|
]);
|
|
256
258
|
let onChange = $28f99e3e86e6ec45$var$createOnChange(props.value, props.defaultValue, props.onChange);
|
|
257
259
|
let onChangeEnd = $28f99e3e86e6ec45$var$createOnChange(props.value, props.defaultValue, props.onChangeEnd);
|
|
258
260
|
const [values, setValuesState] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange);
|
|
261
|
+
let [initialValues] = useState(values);
|
|
259
262
|
const [isDraggings, setDraggingsState] = useState(new Array(values.length).fill(false));
|
|
260
263
|
const isEditablesRef = useRef(new Array(values.length).fill(true));
|
|
261
264
|
const [focusedIndex, setFocusedIndex] = useState(void 0);
|
|
@@ -323,6 +326,7 @@ function $28f99e3e86e6ec45$export$e5fda3247f5d67f9(props) {
|
|
|
323
326
|
}
|
|
324
327
|
return {
|
|
325
328
|
values,
|
|
329
|
+
defaultValues: props.defaultValue !== void 0 ? defaultValue : initialValues,
|
|
326
330
|
getThumbValue: (index) => values[index],
|
|
327
331
|
setThumbValue: updateValue,
|
|
328
332
|
setThumbPercent,
|
|
@@ -500,7 +504,7 @@ function $bcca50147b47f54d$export$56b2c08e277f365(props, state, trackRef) {
|
|
|
500
504
|
};
|
|
501
505
|
}
|
|
502
506
|
function $47b897dc8cdb026b$export$8d15029008292ae(opts, state) {
|
|
503
|
-
let { index = 0, isRequired, validationState, isInvalid, trackRef, inputRef, orientation = state.orientation, name } = opts;
|
|
507
|
+
let { index = 0, isRequired, validationState, isInvalid, trackRef, inputRef, orientation = state.orientation, name, form } = opts;
|
|
504
508
|
let isDisabled = opts.isDisabled || state.isDisabled;
|
|
505
509
|
let isVertical = orientation === "vertical";
|
|
506
510
|
let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
@@ -619,7 +623,7 @@ function $47b897dc8cdb026b$export$8d15029008292ae(opts, state) {
|
|
|
619
623
|
onDown(e.changedTouches[0].identifier);
|
|
620
624
|
}
|
|
621
625
|
}) : {};
|
|
622
|
-
$99facab73266f662$export$5add1d006293d136(inputRef,
|
|
626
|
+
$99facab73266f662$export$5add1d006293d136(inputRef, state.defaultValues[index], (v) => {
|
|
623
627
|
state.setThumbValue(index, v);
|
|
624
628
|
});
|
|
625
629
|
return {
|
|
@@ -631,6 +635,7 @@ function $47b897dc8cdb026b$export$8d15029008292ae(opts, state) {
|
|
|
631
635
|
step: state.step,
|
|
632
636
|
value,
|
|
633
637
|
name,
|
|
638
|
+
form,
|
|
634
639
|
disabled: isDisabled,
|
|
635
640
|
"aria-orientation": orientation,
|
|
636
641
|
"aria-valuetext": state.getThumbValueLabel(index),
|
|
@@ -690,7 +695,9 @@ const $6f909507e6374d18$export$472062a354075cee = /* @__PURE__ */ forwardRef(fun
|
|
|
690
695
|
},
|
|
691
696
|
defaultClassName: "react-aria-Slider"
|
|
692
697
|
});
|
|
693
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props
|
|
698
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
699
|
+
global: true
|
|
700
|
+
});
|
|
694
701
|
delete DOMProps.id;
|
|
695
702
|
return /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
696
703
|
values: [
|
|
@@ -718,9 +725,7 @@ const $6f909507e6374d18$export$472062a354075cee = /* @__PURE__ */ forwardRef(fun
|
|
|
718
725
|
]
|
|
719
726
|
]
|
|
720
727
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
721
|
-
|
|
722
|
-
...groupProps,
|
|
723
|
-
...renderProps,
|
|
728
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, groupProps),
|
|
724
729
|
ref,
|
|
725
730
|
slot: props.slot || void 0,
|
|
726
731
|
"data-orientation": state.orientation,
|
|
@@ -808,7 +813,9 @@ const $6f909507e6374d18$export$2c1b491743890dec = /* @__PURE__ */ forwardRef(fun
|
|
|
808
813
|
isDisabled
|
|
809
814
|
}
|
|
810
815
|
});
|
|
811
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props
|
|
816
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
817
|
+
global: true
|
|
818
|
+
});
|
|
812
819
|
delete DOMProps.id;
|
|
813
820
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
814
821
|
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, thumbProps, hoverProps),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-
|
|
1
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-cvK1vxO7.js";
|
|
2
2
|
import React__default, { forwardRef, createContext } from "react";
|
|
3
3
|
const $514c0188e459b4c0$export$9afb8bc826b033ea = /* @__PURE__ */ createContext({});
|
|
4
4
|
const $514c0188e459b4c0$export$5f1af8db9871e1d6 = /* @__PURE__ */ forwardRef(function Text(props, ref) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415,
|
|
2
|
-
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-
|
|
3
|
-
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-
|
|
4
|
-
import {
|
|
5
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-
|
|
1
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, h as $64fa3d84918910a7$export$4d86445c2cf5e3, b as $3ef42575df84b30b$export$9d1611c77c2fe928, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$ef03459518577ad4, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "./utils-cvK1vxO7.js";
|
|
2
|
+
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-B8BgFmIQ.js";
|
|
3
|
+
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-BeMxJA29.js";
|
|
4
|
+
import { b as $3985021b0ad6602f$export$37fb8590cf2c088c, d as $2d73ec29415bd339$export$712718f7aec83d5, a as $a049562f99e7db0e$export$f9c6924e160136d1 } from "./Group-C4cXobNT.js";
|
|
5
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DWVaNd2E.js";
|
|
6
6
|
import React__default, { forwardRef, createContext, useRef, useState, useCallback } from "react";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-
|
|
7
|
+
import { e as $6179b936705e76d3$export$ae780daf29e6d456 } from "./useHover-44IApaa2.js";
|
|
8
|
+
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-D5BfOWag.js";
|
|
9
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-AxKZjtFm.js";
|
|
10
10
|
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "./Hidden-rE6uR-lr.js";
|
|
11
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-
|
|
11
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
|
|
12
12
|
const $216918bed6669f72$export$2dc6166a7e65358c = /* @__PURE__ */ createContext({});
|
|
13
13
|
let $216918bed6669f72$var$filterHoverProps = (props) => {
|
|
14
14
|
let { onHoverStart, onHoverChange, onHoverEnd, ...otherProps } = props;
|
|
@@ -76,7 +76,9 @@ const $bcdf0525bf22703d$export$2c73285ae9390cec = /* @__PURE__ */ $f39a9eba43920
|
|
|
76
76
|
},
|
|
77
77
|
defaultClassName: "react-aria-TextField"
|
|
78
78
|
});
|
|
79
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props
|
|
79
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
80
|
+
global: true
|
|
81
|
+
});
|
|
80
82
|
delete DOMProps.id;
|
|
81
83
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
82
84
|
...DOMProps,
|
|
@@ -110,6 +112,14 @@ const $bcdf0525bf22703d$export$2c73285ae9390cec = /* @__PURE__ */ $f39a9eba43920
|
|
|
110
112
|
ref: inputOrTextAreaRef
|
|
111
113
|
}
|
|
112
114
|
],
|
|
115
|
+
[
|
|
116
|
+
$a049562f99e7db0e$export$f9c6924e160136d1,
|
|
117
|
+
{
|
|
118
|
+
role: "presentation",
|
|
119
|
+
isInvalid: validation.isInvalid,
|
|
120
|
+
isDisabled: props.isDisabled || false
|
|
121
|
+
}
|
|
122
|
+
],
|
|
113
123
|
[
|
|
114
124
|
$514c0188e459b4c0$export$9afb8bc826b033ea,
|
|
115
125
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-cvK1vxO7.js";
|
|
2
2
|
import React__default, { useState, useMemo } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { $ as $9ab94262bd0047c7$export$420e68273165f4ec } from "./useFocusRing-D5BfOWag.js";
|
|
4
4
|
const $5c3e21d68f1c4674$var$styles = {
|
|
5
5
|
border: 0,
|
|
6
6
|
clip: "rect(0 0 0 0)",
|