@eightshift/ui-components 8.1.0 → 8.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-BUU44AuW.js → Autocomplete-Dqkum3dO.js} +29 -25
- package/dist/{Button-_E2Z5G2l.js → Button-DHgs_rCq.js} +15 -9
- package/dist/{Dialog-3XLIaepk.js → Dialog-CldDJ_4u.js} +390 -189
- package/dist/{Disclosure-Dh0z_DEQ.js → Disclosure-BHNgL5Is.js} +33 -29
- package/dist/{FocusScope-BKGWN6UK.js → FocusScope-CUuL5wjz.js} +13 -8
- package/dist/{Heading-BWTs9ckA.js → Heading-BQje2nS2.js} +1 -1
- package/dist/{I18nProvider-BskRMK8G.js → I18nProvider-R_4IDnf9.js} +1 -1
- package/dist/{Label-UpU4cKPh.js → Label-C4bJkVti.js} +1 -1
- package/dist/{ListBox-DepY-52g.js → ListBox-CZXso3mJ.js} +14 -38
- package/dist/{NumberFormatter-WKBRKiEA.js → NumberFormatter-Bwdv413k.js} +4 -2
- package/dist/{RadioGroup-Br9Mn9QJ.js → RadioGroup-BTByPMrl.js} +35 -35
- package/dist/{SearchField-q2Fj0L9K.js → SearchField-DkX1vqMN.js} +29 -26
- package/dist/{Slider-B8icnyOo.js → Slider-Dw-JjfLx.js} +55 -44
- package/dist/{Text-D4y19vs8.js → Text-CA2_mHEB.js} +4 -3
- package/dist/{VisuallyHidden-B_LZ_kn7.js → VisuallyHidden-ZZwHZDro.js} +2 -2
- package/dist/{animation-DpSgtWyu.js → animation-COc9P6ap.js} +2 -4
- package/dist/assets/{image-analysis-worker-BuHru-CI.js → image-analysis-worker-CBOB71mx.js} +1 -1
- 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/assets/wp-overrides/make-block-messages-nicer.css +1 -1
- package/dist/{build-module-DG6ZK7Ty.js → build-module-BISCoQjQ.js} +4 -4
- package/dist/{button-XSk_8UW7.js → button-ldR_tlvk.js} +64 -13
- package/dist/{checkbox-BYaS9tQ5.js → checkbox-DDyLJRY8.js} +8 -8
- package/dist/{color-swatch-6ZEIXej3.js → color-swatch-DmhdOhe4.js} +15 -16
- package/dist/components/animated-visibility/animated-visibility.js +5 -3
- package/dist/components/base-control/base-control.d.ts +1 -1
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/base-control/container.d.ts +4 -30
- package/dist/components/base-control/container.js +5 -32
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.d.ts +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 +8 -8
- 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.d.ts +1 -1
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +11 -11
- package/dist/components/contextual-help/contextual-help.js +3 -3
- package/dist/components/draggable/draggable.d.ts +3 -3
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list.d.ts +3 -3
- package/dist/components/draggable-list/draggable-list.js +9 -9
- package/dist/components/expandable/expandable.js +4 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +18 -17
- package/dist/components/input-field/input-field.d.ts +1 -1
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.d.ts +3 -28
- package/dist/components/item-collection/item-collection.js +7 -7
- package/dist/components/link-input/link-input.d.ts +0 -2
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +5 -4
- package/dist/components/menu/menu.d.ts +8 -29
- package/dist/components/menu/menu.js +11 -8
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/notice/notice.js +8 -8
- package/dist/components/number-picker/number-picker.d.ts +1 -1
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.d.ts +1 -1
- package/dist/components/option-select/option-select.js +22 -16
- package/dist/components/options-panel/options-panel.js +4 -4
- package/dist/components/placeholders/file-picker-shell.js +4 -3
- package/dist/components/placeholders/file-placeholder.js +3 -2
- package/dist/components/popover/popover.js +5 -5
- package/dist/components/portal-provider/portal-provider.js +2 -1
- package/dist/components/prompt-popover/prompt-popover.d.ts +56 -0
- package/dist/components/prompt-popover/prompt-popover.js +81 -0
- package/dist/components/radio/radio.d.ts +2 -1
- package/dist/components/radio/radio.js +2 -2
- package/dist/components/repeater/repeater-context.d.ts +0 -1
- package/dist/components/repeater/repeater-item.js +2 -2
- package/dist/components/repeater/repeater.d.ts +5 -38
- package/dist/components/repeater/repeater.js +8 -11
- package/dist/components/responsive/mini-responsive.d.ts +0 -1
- package/dist/components/responsive/mini-responsive.js +31 -31
- package/dist/components/responsive/responsive-legacy.d.ts +0 -1
- package/dist/components/responsive/responsive-legacy.js +13 -11
- package/dist/components/responsive/responsive.d.ts +0 -1
- package/dist/components/responsive/responsive.js +29 -29
- package/dist/components/responsive-preview/responsive-preview.js +4 -4
- package/dist/components/rich-label/rich-label.d.ts +1 -1
- package/dist/components/rich-label/rich-label.js +2 -2
- package/dist/components/select/async-multi-select.d.ts +12 -13
- package/dist/components/select/async-multi-select.js +40 -21
- package/dist/components/select/async-select.d.ts +12 -13
- package/dist/components/select/async-select.js +39 -21
- package/dist/components/select/multi-select.d.ts +2 -8
- package/dist/components/select/multi-select.js +20 -20
- package/dist/components/select/shared.d.ts +7 -11
- package/dist/components/select/shared.js +2 -2
- package/dist/components/select/single-select.d.ts +2 -8
- package/dist/components/select/single-select.js +17 -17
- package/dist/components/select/styles.d.ts +2 -2
- package/dist/components/slider/column-config-slider.js +8 -6
- package/dist/components/slider/slider.js +16 -12
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.d.ts +1 -2
- package/dist/components/smart-image/smart-image.js +53 -51
- package/dist/components/tabs/tabs.d.ts +16 -64
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.d.ts +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +2 -2
- package/dist/components/toggle-button/toggle-button.d.ts +2 -2
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-9MfdTVWP.js → draggable-oS68xcYX.js} +130 -125
- package/dist/{es-dash-DunirOmV.js → es-dash-DPtJSRjw.js} +23 -52
- package/dist/{gradient-editor-yqSw0uPA.js → gradient-editor-DP8ioFX1.js} +39 -30
- package/dist/icons/block-icon.js +1 -1
- package/dist/icons/icon.d.ts +3 -3
- package/dist/icons/icon.js +21 -9
- package/dist/icons/icons.d.ts +210 -1
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.d.ts +5 -4
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +18 -17
- package/dist/{input-field-nN6BO0oz.js → input-field-C-XvZeCZ.js} +8 -8
- package/dist/{jsx-svg-BjGQUBLh.js → jsx-svg-DRwJdRpA.js} +171 -129
- package/dist/{keyboard-g5Amam-c.js → keyboard-Cdqi5ZQQ.js} +1 -1
- package/dist/{link-input-BhlPElU8.js → link-input-DdwuqoMg.js} +147 -89
- package/dist/{modal-B5axB0Fc.js → modal-DZco5MDu.js} +15 -14
- package/dist/{number-picker-nnOf0XnN.js → number-picker-XqKW0BNi.js} +9 -9
- package/dist/{react-y40Dt3ab.js → react-O71mlJXS.js} +250 -266
- package/dist/{shared-Ba_bt4s9.js → shared-YXMIX2ka.js} +60 -44
- package/dist/{solid-color-picker-CsosgTVa.js → solid-color-picker-D5LEdmDM.js} +78 -58
- package/dist/{switch-BJ4_OyUm.js → switch-Bo6nmed_.js} +8 -8
- package/dist/{tabs-wAe0AAyu.js → tabs-DE-qb7Kt.js} +35 -30
- package/dist/{text-helpers-2j9DuxP1.js → text-helpers-QrwKKaOh.js} +3 -2
- package/dist/{textSelection-B_Nv6Jz3.js → textSelection-C17LWYmO.js} +3 -3
- package/dist/{toggle-button-BLJdEp8V.js → toggle-button-Cb4yCEua.js} +39 -8
- package/dist/{tooltip-BW9nj5-V.js → tooltip-CT-vzIdz.js} +68 -62
- package/dist/{useAsyncList-B3-uyJgA.js → useAsyncList-CjKVLGN0.js} +8 -4
- package/dist/{useButton-CPMVLXoX.js → useButton-V65TBDGM.js} +3 -3
- package/dist/{useCollection-PzY6FI39.js → useCollection-DqUS7tjk.js} +281 -184
- package/dist/useEvent-C9zwSNzZ.js +18 -0
- package/dist/{useField-DrfR8j9h.js → useField-B_ibsWst.js} +2 -2
- package/dist/{useFilter-CiCjo6Na.js → useFilter-C75IzdIZ.js} +1 -1
- package/dist/{useFocusRing-CrYHpV7C.js → useFocusRing-JidySWlU.js} +1 -1
- package/dist/{useFormReset-U6c35PHq.js → useFormReset-Sp8-miDa.js} +1 -1
- package/dist/{useFormValidation-B2q2MGWN.js → useFormValidation-CpmQEh8J.js} +2 -2
- package/dist/{useHover-CNsbAR0V.js → useHover-CaY3sRjL.js} +250 -46
- package/dist/{useLabel-DuxAjaic.js → useLabel-gfFDE4bn.js} +2 -2
- package/dist/{useLabels-NUsp5IW3.js → useLabels-Dcg-cEyM.js} +1 -1
- package/dist/{useListState-FLxa7R_U.js → useListState-CzB3v6M9.js} +6 -11
- package/dist/{useLocalizedStringFormatter-Ccm8EL_u.js → useLocalizedStringFormatter-CTCqjYu4.js} +6 -1
- package/dist/{useNumberFieldState-DWvm7CXu.js → useNumberFieldState-DC3XY3DQ.js} +79 -62
- package/dist/{useNumberFormatter-B0_D7a_o.js → useNumberFormatter-DbAt_fC_.js} +2 -2
- package/dist/{useOverlayTriggerState-zZ7homyI.js → useOverlayTriggerState-BKmSTK_5.js} +16 -11
- package/dist/{usePress-DRoujMNm.js → usePress-CUCWcP-m.js} +50 -28
- package/dist/{useSlot-pRz-v9kC.js → useSlot-CnQHcvd4.js} +1 -1
- package/dist/{useTextField-e8jIFT3s.js → useTextField-C3QIkMON.js} +6 -6
- package/dist/{useToggle-CR_ZKvr_.js → useToggle-bbGRUbo4.js} +6 -6
- package/dist/{useToggleState-ButQxGrJ.js → useToggleState-D_rLMrVW.js} +1 -1
- package/dist/utilities/array-helpers.d.ts +2 -2
- package/dist/utilities/array-helpers.js +4 -3
- package/dist/utilities/debounce-throttle.d.ts +9 -2
- package/dist/utilities/es-dash.d.ts +11 -8
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +2 -2
- package/dist/utilities/text-helpers.js +1 -1
- package/dist/utilities/web-workers.d.ts +7 -7
- package/dist/utilities/web-workers.js +5 -5
- package/dist/{utils-Czi6q2Ub.js → utils-ClM91CuL.js} +30 -19
- package/package.json +23 -27
- package/dist/useEvent-CzuFZ2HT.js +0 -22
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
2
|
import { AnimatedVisibility } from "./components/animated-visibility/animated-visibility.js";
|
|
3
|
-
import { c as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, g as $a4e76a5424781910$export$e08e3b67e392101e, i as $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-
|
|
4
|
-
import {
|
|
5
|
-
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-
|
|
6
|
-
import { t as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
7
|
-
import {
|
|
3
|
+
import { c as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, g as $a4e76a5424781910$export$e08e3b67e392101e, i as $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
4
|
+
import { U as $23f2114a1b82827e$export$e58f029f0fbfdb29, d as $3e6197669829fe11$export$40bfa8c7b0832715, m as $8f5a2122b0992be3$export$8397ddfc504fdb9a, s as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, z as $23f2114a1b82827e$export$4282f70798064fe0 } from "./useHover-CaY3sRjL.js";
|
|
5
|
+
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-R_4IDnf9.js";
|
|
6
|
+
import { t as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-CTCqjYu4.js";
|
|
7
|
+
import { _ as $42ceafc619f9c3ba$export$bf788dd355e3a401, l as $f5a4a9a3486154da$export$e32c88dfddc6e1d8 } from "./useCollection-DqUS7tjk.js";
|
|
8
8
|
import { t as $d7f64c32b702fe2c$export$86427a43e3e48ebb } from "./Hidden-C4Saxkx9.js";
|
|
9
9
|
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-CgeMQsGa.js";
|
|
10
|
-
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-
|
|
11
|
-
import { t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "./Label-
|
|
12
|
-
import { n as $7705c033048f6da7$export$353f5b6fc5456de1, t as $7705c033048f6da7$export$24d547caef80ccd1 } from "./Button-
|
|
13
|
-
import { n as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "./Text-
|
|
14
|
-
import {
|
|
15
|
-
import { n as $ea3928288112382f$export$a966af930f325cab } from "./VisuallyHidden-
|
|
16
|
-
import { n as $1f3c3b1a70cec653$export$ff05c3ac10437e03, t as $191c9b6d48a0a4e2$export$294aa081a6c6f55d } from "./useField-
|
|
17
|
-
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, t as $860f7da480e22816$export$b8473d3665f3a75a } from "./useFormValidation-
|
|
10
|
+
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-JidySWlU.js";
|
|
11
|
+
import { t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "./Label-C4bJkVti.js";
|
|
12
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1, t as $7705c033048f6da7$export$24d547caef80ccd1 } from "./Button-DHgs_rCq.js";
|
|
13
|
+
import { n as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "./Text-CA2_mHEB.js";
|
|
14
|
+
import { S as $ae8f8d98b2b18f2f$export$a05409b8bb224a5a, d as $542a13ca2fa5b484$export$9b9a0cd73afb7ca4, l as $f19b83c1486f45cc$export$dc9c12ed27dd1b49, r as $f2ff30fde7b014be$export$d2f961adcb0afbe, x as $673d46fce3e5717d$export$a16aca283550c30d } from "./Dialog-CldDJ_4u.js";
|
|
15
|
+
import { n as $ea3928288112382f$export$a966af930f325cab } from "./VisuallyHidden-ZZwHZDro.js";
|
|
16
|
+
import { n as $1f3c3b1a70cec653$export$ff05c3ac10437e03, t as $191c9b6d48a0a4e2$export$294aa081a6c6f55d } from "./useField-B_ibsWst.js";
|
|
17
|
+
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, t as $860f7da480e22816$export$b8473d3665f3a75a } from "./useFormValidation-CpmQEh8J.js";
|
|
18
18
|
import { t as $cdaed739b1139372$export$c24727297075ec6a } from "./Form-BWMVEpwR.js";
|
|
19
|
-
import { t as $3274bf1495747a7b$export$5add1d006293d136 } from "./useFormReset-
|
|
20
|
-
import { i as $928221da08ecbc62$export$a11e76429ed99b4, n as $928221da08ecbc62$export$7c5906fe4f1f2af2, r as $928221da08ecbc62$export$7ff8f37d2d81a48d } from "./ListBox-
|
|
21
|
-
import { t as $b14b6f590b50af39$export$2f645645f7bca764 } from "./useListState-
|
|
22
|
-
import { t as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6 } from "./useOverlayTriggerState-
|
|
23
|
-
import { t as __ } from "./build-module-
|
|
19
|
+
import { t as $3274bf1495747a7b$export$5add1d006293d136 } from "./useFormReset-Sp8-miDa.js";
|
|
20
|
+
import { i as $928221da08ecbc62$export$a11e76429ed99b4, n as $928221da08ecbc62$export$7c5906fe4f1f2af2, r as $928221da08ecbc62$export$7ff8f37d2d81a48d } from "./ListBox-CZXso3mJ.js";
|
|
21
|
+
import { t as $b14b6f590b50af39$export$2f645645f7bca764 } from "./useListState-CzB3v6M9.js";
|
|
22
|
+
import { t as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6 } from "./useOverlayTriggerState-BKmSTK_5.js";
|
|
23
|
+
import { t as __ } from "./build-module-BISCoQjQ.js";
|
|
24
24
|
import { Icon } from "./icons/icon.js";
|
|
25
25
|
import { check } from "./icons/ui-icons/check.js";
|
|
26
26
|
import { clear } from "./icons/ui-icons/clear.js";
|
|
@@ -396,23 +396,23 @@ function $c0a45cd074520508$export$e64b2f635402ca43(props, state, ref) {
|
|
|
396
396
|
isDisabled,
|
|
397
397
|
type: "listbox"
|
|
398
398
|
}, state, ref);
|
|
399
|
-
let
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
e.preventDefault();
|
|
399
|
+
let { keyboardProps } = $8296dad1a4c5e0dc$export$8f71654801c2f7cd({
|
|
400
|
+
shortcuts: {
|
|
401
|
+
ArrowLeft: () => {
|
|
402
|
+
if (state.selectionManager.selectionMode === "multiple") return false;
|
|
404
403
|
let key = state.selectedKey != null ? delegate.getKeyAbove?.(state.selectedKey) : delegate.getFirstKey?.();
|
|
405
404
|
if (key != null) state.setSelectedKey(key);
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
e.preventDefault();
|
|
405
|
+
},
|
|
406
|
+
ArrowRight: () => {
|
|
407
|
+
if (state.selectionManager.selectionMode === "multiple") return false;
|
|
410
408
|
let key = state.selectedKey != null ? delegate.getKeyBelow?.(state.selectedKey) : delegate.getFirstKey?.();
|
|
411
409
|
if (key != null) state.setSelectedKey(key);
|
|
412
|
-
break;
|
|
413
410
|
}
|
|
414
|
-
}
|
|
415
|
-
|
|
411
|
+
},
|
|
412
|
+
allowRepeats: true,
|
|
413
|
+
onKeyDown: props.onKeyDown,
|
|
414
|
+
onKeyUp: props.onKeyUp
|
|
415
|
+
});
|
|
416
416
|
let { typeSelectProps } = $f5a4a9a3486154da$export$e32c88dfddc6e1d8({
|
|
417
417
|
keyboardDelegate: delegate,
|
|
418
418
|
selectionManager: state.selectionManager,
|
|
@@ -451,8 +451,8 @@ function $c0a45cd074520508$export$e64b2f635402ca43(props, state, ref) {
|
|
|
451
451
|
triggerProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, {
|
|
452
452
|
...triggerProps,
|
|
453
453
|
isDisabled,
|
|
454
|
-
onKeyDown: $a4e76a5424781910$export$e08e3b67e392101e(triggerProps.onKeyDown,
|
|
455
|
-
onKeyUp:
|
|
454
|
+
onKeyDown: $a4e76a5424781910$export$e08e3b67e392101e(triggerProps.onKeyDown, keyboardProps.onKeyDown),
|
|
455
|
+
onKeyUp: keyboardProps.onKeyUp,
|
|
456
456
|
"aria-labelledby": [
|
|
457
457
|
valueId,
|
|
458
458
|
triggerProps["aria-labelledby"],
|
|
@@ -620,13 +620,14 @@ function $29256f53a2edafe9$export$5159ec8b34d4ec12(props) {
|
|
|
620
620
|
props.defaultSelectedKey,
|
|
621
621
|
selectionMode
|
|
622
622
|
]);
|
|
623
|
-
let
|
|
623
|
+
let value = useMemo(() => {
|
|
624
624
|
return props.value !== void 0 ? props.value : selectionMode === "single" ? props.selectedKey : void 0;
|
|
625
625
|
}, [
|
|
626
626
|
props.value,
|
|
627
627
|
props.selectedKey,
|
|
628
628
|
selectionMode
|
|
629
|
-
])
|
|
629
|
+
]);
|
|
630
|
+
let [controlledValue, setControlledValue] = $3e6197669829fe11$export$40bfa8c7b0832715(value, defaultValue, props.onChange);
|
|
630
631
|
let displayValue = selectionMode === "single" && Array.isArray(controlledValue) ? controlledValue[0] : controlledValue;
|
|
631
632
|
let setValue = (value) => {
|
|
632
633
|
if (selectionMode === "single") {
|
|
@@ -889,7 +890,20 @@ var $c8bb816105474884$export$e288731fd71264f0 = $d7f64c32b702fe2c$export$86427a4
|
|
|
889
890
|
});
|
|
890
891
|
//#endregion
|
|
891
892
|
//#region lib/components/select/shared.tsx
|
|
892
|
-
var
|
|
893
|
+
var isPrimitive = (value) => {
|
|
894
|
+
const valueTag = Object.prototype.toString.call(value);
|
|
895
|
+
return valueTag === "[object String]" || valueTag === "[object Number]" || valueTag === "[object Boolean]";
|
|
896
|
+
};
|
|
897
|
+
var isStringValue = (value) => Object.prototype.toString.call(value) === "[object String]";
|
|
898
|
+
var getOptionKey = (value) => JSON.stringify([value]);
|
|
899
|
+
var isSelectOption = (value) => value instanceof Object && "value" in value && isPrimitive(value.value);
|
|
900
|
+
var getPropertyValue = (value, key) => {
|
|
901
|
+
return Object.entries(value).find(([entryKey]) => entryKey === key)?.[1];
|
|
902
|
+
};
|
|
903
|
+
var getGroupValue = (mapping, key) => {
|
|
904
|
+
if (!mapping) return;
|
|
905
|
+
return Object.entries(mapping).find(([entryKey]) => entryKey === key)?.[1];
|
|
906
|
+
};
|
|
893
907
|
var OptionItemBase = (props) => jsx($928221da08ecbc62$export$a11e76429ed99b4, {
|
|
894
908
|
...props,
|
|
895
909
|
textValue: props.value?.label,
|
|
@@ -992,14 +1006,16 @@ var SelectClearButton = ({ multi = false }) => {
|
|
|
992
1006
|
*/
|
|
993
1007
|
var getGroupedOptions = (filteredOptions, groupKey, groupValueMapping) => {
|
|
994
1008
|
if (!groupKey || !filteredOptions || filteredOptions.length === 0) return null;
|
|
995
|
-
const groups =
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1009
|
+
const groups = new Map();
|
|
1010
|
+
for (const item of filteredOptions) {
|
|
1011
|
+
const groupValue = getPropertyValue(item, groupKey);
|
|
1012
|
+
const key = isStringValue(groupValue) ? groupValue : "_other";
|
|
1013
|
+
const options = groups.get(key) ?? [];
|
|
1014
|
+
options.push(item);
|
|
1015
|
+
groups.set(key, options);
|
|
1016
|
+
}
|
|
1017
|
+
return [...groups].map(([key, options]) => {
|
|
1018
|
+
const mapping = getGroupValue(groupValueMapping, key);
|
|
1003
1019
|
return {
|
|
1004
1020
|
key,
|
|
1005
1021
|
label: mapping?.label ?? (key === "_other" ? __("Other", "eightshift-ui-components") : key),
|
|
@@ -1011,4 +1027,4 @@ var getGroupedOptions = (filteredOptions, groupKey, groupValueMapping) => {
|
|
|
1011
1027
|
});
|
|
1012
1028
|
};
|
|
1013
1029
|
//#endregion
|
|
1014
|
-
export { getValue as a, $c8bb816105474884$export$ef9b1a59e592288f as
|
|
1030
|
+
export { getValue as a, isStringValue as c, $c8bb816105474884$export$ef9b1a59e592288f as d, getOptionKey as i, moveArrayItem as l, SelectClearButton as n, isPrimitive as o, getGroupedOptions as r, isSelectOption as s, OptionItemBase as t, $c8bb816105474884$export$e288731fd71264f0 as u };
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
|
-
import { i as $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-
|
|
3
|
-
import { R as $1969ac565cfec8d0$export$de79e2c695e052f3, c as $1e74c67db218ce67$export$f8168d8dd8fd66e6, d as $3e6197669829fe11$export$40bfa8c7b0832715, j as $2add3ce32c6007eb$export$fedb369cb70207f1, k as $2add3ce32c6007eb$export$a11b0059900ceec8, n as $48a7d519b337145d$export$4eaf04e54aa8eed6, s as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-
|
|
4
|
-
import { t as $e8ac3c3f5d4bae7f$export$d6875122194c7b44 } from "./useLabels-
|
|
5
|
-
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-
|
|
6
|
-
import { t as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
2
|
+
import { i as $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
3
|
+
import { R as $1969ac565cfec8d0$export$de79e2c695e052f3, c as $1e74c67db218ce67$export$f8168d8dd8fd66e6, d as $3e6197669829fe11$export$40bfa8c7b0832715, j as $2add3ce32c6007eb$export$fedb369cb70207f1, k as $2add3ce32c6007eb$export$a11b0059900ceec8, n as $48a7d519b337145d$export$4eaf04e54aa8eed6, s as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-CaY3sRjL.js";
|
|
4
|
+
import { t as $e8ac3c3f5d4bae7f$export$d6875122194c7b44 } from "./useLabels-Dcg-cEyM.js";
|
|
5
|
+
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-R_4IDnf9.js";
|
|
6
|
+
import { t as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-CTCqjYu4.js";
|
|
7
7
|
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-CgeMQsGa.js";
|
|
8
|
-
import { n as $2c9edc598a03d523$export$420e68273165f4ec, t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-
|
|
9
|
-
import { t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "./Label-
|
|
10
|
-
import { a as $62888b2ec35be488$export$4f384c9210e583c3, i as $14554ba6a2007b17$export$2123ff2b87c81ca, n as $cd2fa56213693c5e$export$23f548e970bdf099, r as $757ec6630f26125c$export$e908e06f4b8e3402, t as $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c } from "./useNumberFieldState-
|
|
8
|
+
import { n as $2c9edc598a03d523$export$420e68273165f4ec, t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-JidySWlU.js";
|
|
9
|
+
import { t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "./Label-C4bJkVti.js";
|
|
10
|
+
import { a as $62888b2ec35be488$export$4f384c9210e583c3, i as $14554ba6a2007b17$export$2123ff2b87c81ca, n as $cd2fa56213693c5e$export$23f548e970bdf099, r as $757ec6630f26125c$export$e908e06f4b8e3402, t as $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c } from "./useNumberFieldState-DC3XY3DQ.js";
|
|
11
11
|
import { r as $240e9101ba2842f5$export$cb6e0bb50bc19463, t as $240e9101ba2842f5$export$7d15b64cf5a3a4c4 } from "./number-BeC0ySe4.js";
|
|
12
|
-
import { n as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "./Text-
|
|
13
|
-
import { n as $ea3928288112382f$export$a966af930f325cab } from "./VisuallyHidden-
|
|
14
|
-
import { n as $1f3c3b1a70cec653$export$ff05c3ac10437e03 } from "./useField-
|
|
15
|
-
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, n as $fd2148440a13ec26$export$a763b9476acd3eb } from "./useFormValidation-
|
|
16
|
-
import { t as $3274bf1495747a7b$export$5add1d006293d136 } from "./useFormReset-
|
|
17
|
-
import { i as $786ce78c8ff38b91$exports, n as $890783418b00a858$export$4cde5df63f53f473, r as $890783418b00a858$export$6e865ea70d7724f, t as ColorSwatch } from "./color-swatch-
|
|
18
|
-
import { a as $806e559d0c2c64a0$export$6189c2744041d8f8, c as $d806310b82f07e9d$export$e5fda3247f5d67f9, d as $1dfdc54e7eb53ba0$export$36da96379f79f245, l as $4a5dd96ecb58ab11$export$8d15029008292ae, n as $806e559d0c2c64a0$export$1e7083018727fa60, s as $806e559d0c2c64a0$export$f1fce0420cc6d8ee, t as $806e559d0c2c64a0$export$105594979f116971, u as $4b964a467b2bc7ea$export$56b2c08e277f365 } from "./Slider-
|
|
19
|
-
import { a as $3a442827418ebe87$export$f9c6924e160136d1, n as $41fb335299a4a39e$export$37fb8590cf2c088c, r as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "./useTextField-
|
|
12
|
+
import { n as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "./Text-CA2_mHEB.js";
|
|
13
|
+
import { n as $ea3928288112382f$export$a966af930f325cab } from "./VisuallyHidden-ZZwHZDro.js";
|
|
14
|
+
import { n as $1f3c3b1a70cec653$export$ff05c3ac10437e03 } from "./useField-B_ibsWst.js";
|
|
15
|
+
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, n as $fd2148440a13ec26$export$a763b9476acd3eb } from "./useFormValidation-CpmQEh8J.js";
|
|
16
|
+
import { t as $3274bf1495747a7b$export$5add1d006293d136 } from "./useFormReset-Sp8-miDa.js";
|
|
17
|
+
import { i as $786ce78c8ff38b91$exports, n as $890783418b00a858$export$4cde5df63f53f473, r as $890783418b00a858$export$6e865ea70d7724f, t as ColorSwatch } from "./color-swatch-DmhdOhe4.js";
|
|
18
|
+
import { a as $806e559d0c2c64a0$export$6189c2744041d8f8, c as $d806310b82f07e9d$export$e5fda3247f5d67f9, d as $1dfdc54e7eb53ba0$export$36da96379f79f245, l as $4a5dd96ecb58ab11$export$8d15029008292ae, n as $806e559d0c2c64a0$export$1e7083018727fa60, s as $806e559d0c2c64a0$export$f1fce0420cc6d8ee, t as $806e559d0c2c64a0$export$105594979f116971, u as $4b964a467b2bc7ea$export$56b2c08e277f365 } from "./Slider-Dw-JjfLx.js";
|
|
19
|
+
import { a as $3a442827418ebe87$export$f9c6924e160136d1, n as $41fb335299a4a39e$export$37fb8590cf2c088c, r as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "./useTextField-C3QIkMON.js";
|
|
20
20
|
import { BaseControl } from "./components/base-control/base-control.js";
|
|
21
|
-
import { t as __ } from "./build-module-
|
|
21
|
+
import { t as __ } from "./build-module-BISCoQjQ.js";
|
|
22
22
|
import { dropdownCaretAlt } from "./icons/ui-icons/dropdown-caret-alt.js";
|
|
23
23
|
import { TriggeredPopover } from "./components/popover/popover.js";
|
|
24
24
|
import $3ARPR$react, { createContext, forwardRef, useCallback, useContext, useMemo, useRef, useState } from "react";
|
|
25
25
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
|
+
import { flushSync } from "react-dom";
|
|
26
27
|
//#region node_modules/react-aria-components/dist/private/ColorThumb.mjs
|
|
27
28
|
var $ceafedee624ffe11$export$c80c0ea2ca5cb846 = createContext(null);
|
|
28
29
|
var $ceafedee624ffe11$export$a3cc47cee1c1ccc = forwardRef(function ColorThumb(props, ref) {
|
|
@@ -171,39 +172,39 @@ function $12db0b624ec2ac09$export$2f92a7a615a014f6(props, state) {
|
|
|
171
172
|
let xChannelStep = state.xChannelStep;
|
|
172
173
|
let yChannelStep = state.yChannelStep;
|
|
173
174
|
let currentPosition = useRef(null);
|
|
174
|
-
let
|
|
175
|
-
if (!/^(PageUp|PageDown|Home|End)$/.test(e.key)) {
|
|
176
|
-
e.continuePropagation();
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
e.preventDefault();
|
|
175
|
+
let keyboardUpdate = (cb, inputRef, input) => {
|
|
180
176
|
state.setDragging(true);
|
|
181
177
|
setValueChangedViaKeyboard(true);
|
|
182
|
-
|
|
183
|
-
switch (e.key) {
|
|
184
|
-
case "PageUp":
|
|
185
|
-
state.incrementY(state.yChannelPageStep);
|
|
186
|
-
dir = "y";
|
|
187
|
-
break;
|
|
188
|
-
case "PageDown":
|
|
189
|
-
state.decrementY(state.yChannelPageStep);
|
|
190
|
-
dir = "y";
|
|
191
|
-
break;
|
|
192
|
-
case "Home":
|
|
193
|
-
direction === "rtl" ? state.incrementX(state.xChannelPageStep) : state.decrementX(state.xChannelPageStep);
|
|
194
|
-
dir = "x";
|
|
195
|
-
break;
|
|
196
|
-
case "End":
|
|
197
|
-
direction === "rtl" ? state.decrementX(state.xChannelPageStep) : state.incrementX(state.xChannelPageStep);
|
|
198
|
-
dir = "x";
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
178
|
+
cb();
|
|
201
179
|
state.setDragging(false);
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
180
|
+
focusInput(inputRef);
|
|
181
|
+
setFocusedInput(input);
|
|
182
|
+
};
|
|
183
|
+
let { keyboardProps } = $8296dad1a4c5e0dc$export$8f71654801c2f7cd({
|
|
184
|
+
shortcuts: {
|
|
185
|
+
PageUp: () => {
|
|
186
|
+
return keyboardUpdate(() => {
|
|
187
|
+
state.incrementY(state.yChannelPageStep);
|
|
188
|
+
}, inputYRef, "y");
|
|
189
|
+
},
|
|
190
|
+
PageDown: () => {
|
|
191
|
+
return keyboardUpdate(() => {
|
|
192
|
+
state.decrementY(state.yChannelPageStep);
|
|
193
|
+
}, inputYRef, "y");
|
|
194
|
+
},
|
|
195
|
+
Home: () => {
|
|
196
|
+
return keyboardUpdate(() => {
|
|
197
|
+
direction === "rtl" ? state.incrementX(state.xChannelPageStep) : state.decrementX(state.xChannelPageStep);
|
|
198
|
+
}, inputXRef, "x");
|
|
199
|
+
},
|
|
200
|
+
End: () => {
|
|
201
|
+
return keyboardUpdate(() => {
|
|
202
|
+
direction === "rtl" ? state.decrementX(state.xChannelPageStep) : state.incrementX(state.xChannelPageStep);
|
|
203
|
+
}, inputXRef, "x");
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
allowRepeats: true
|
|
207
|
+
});
|
|
207
208
|
let moveHandler = {
|
|
208
209
|
onMoveStart() {
|
|
209
210
|
currentPosition.current = null;
|
|
@@ -621,8 +622,8 @@ var $e3bcd4910eec2b11$export$b2103f68a961418e = forwardRef(function ColorArea(pr
|
|
|
621
622
|
//#endregion
|
|
622
623
|
//#region node_modules/react-aria/dist/private/color/useColorField.mjs
|
|
623
624
|
function $3945427e9f7dd37b$export$77e32ca575a28fdf(props, state, ref) {
|
|
624
|
-
let { isDisabled, isReadOnly, isRequired, isWheelDisabled, validationBehavior = "aria" } = props;
|
|
625
|
-
let { colorValue, inputValue, increment, decrement, incrementToMax, decrementToMin, commit } = state;
|
|
625
|
+
let { isDisabled, isReadOnly, isRequired, isWheelDisabled, validationBehavior = "aria", onKeyDown, onKeyUp } = props;
|
|
626
|
+
let { colorValue, inputValue, increment, decrement, incrementToMax, decrementToMin, commit, commitValidation } = state;
|
|
626
627
|
let inputId = $390e54f620492c70$export$f680877a34711e37();
|
|
627
628
|
let { spinButtonProps } = $757ec6630f26125c$export$e908e06f4b8e3402({
|
|
628
629
|
isDisabled,
|
|
@@ -642,14 +643,27 @@ function $3945427e9f7dd37b$export$77e32ca575a28fdf(props, state, ref) {
|
|
|
642
643
|
isDisabled,
|
|
643
644
|
onFocusWithinChange: setFocusWithin
|
|
644
645
|
});
|
|
646
|
+
let onWheel = useCallback((e) => {
|
|
647
|
+
if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) return;
|
|
648
|
+
if (e.deltaY > 0) increment();
|
|
649
|
+
else if (e.deltaY < 0) decrement();
|
|
650
|
+
}, [decrement, increment]);
|
|
645
651
|
$14554ba6a2007b17$export$2123ff2b87c81ca({
|
|
646
|
-
onScroll:
|
|
647
|
-
if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) return;
|
|
648
|
-
if (e.deltaY > 0) increment();
|
|
649
|
-
else if (e.deltaY < 0) decrement();
|
|
650
|
-
}, [decrement, increment]),
|
|
652
|
+
onScroll: onWheel,
|
|
651
653
|
isDisabled: isWheelDisabled || isDisabled || isReadOnly || !focusWithin
|
|
652
654
|
}, ref);
|
|
655
|
+
let { keyboardProps } = $8296dad1a4c5e0dc$export$8f71654801c2f7cd({
|
|
656
|
+
isDisabled: isDisabled || isReadOnly,
|
|
657
|
+
shortcuts: { Enter: () => {
|
|
658
|
+
flushSync(() => {
|
|
659
|
+
commit();
|
|
660
|
+
});
|
|
661
|
+
commitValidation();
|
|
662
|
+
return { shouldPreventDefault: false };
|
|
663
|
+
} },
|
|
664
|
+
onKeyDown,
|
|
665
|
+
onKeyUp
|
|
666
|
+
});
|
|
653
667
|
let onChange = (value) => {
|
|
654
668
|
if (state.validate(value)) state.setInputValue(value);
|
|
655
669
|
};
|
|
@@ -662,10 +676,12 @@ function $3945427e9f7dd37b$export$77e32ca575a28fdf(props, state, ref) {
|
|
|
662
676
|
[$fd2148440a13ec26$export$a763b9476acd3eb]: state,
|
|
663
677
|
type: "text",
|
|
664
678
|
autoComplete: "off",
|
|
665
|
-
onChange
|
|
679
|
+
onChange,
|
|
680
|
+
onKeyDown: void 0,
|
|
681
|
+
onKeyUp: void 0
|
|
666
682
|
}, state, ref);
|
|
667
683
|
$3274bf1495747a7b$export$5add1d006293d136(ref, state.defaultColorValue, state.setColorValue);
|
|
668
|
-
inputProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(inputProps, spinButtonProps, focusWithinProps, {
|
|
684
|
+
inputProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(keyboardProps, inputProps, spinButtonProps, focusWithinProps, {
|
|
669
685
|
role: "textbox",
|
|
670
686
|
"aria-valuemax": null,
|
|
671
687
|
"aria-valuemin": null,
|
|
@@ -798,7 +814,10 @@ function $83c2160a93ad557c$var$addColorValue(color, step) {
|
|
|
798
814
|
let newColor = color ? color : $83c2160a93ad557c$var$MIN_COLOR;
|
|
799
815
|
let colorInt = newColor.toHexInt();
|
|
800
816
|
let clampInt = Math.min(Math.max(colorInt + step, $83c2160a93ad557c$var$MIN_COLOR_INT), $83c2160a93ad557c$var$MAX_COLOR_INT);
|
|
801
|
-
if (clampInt !== colorInt)
|
|
817
|
+
if (clampInt !== colorInt) {
|
|
818
|
+
let newColorString = `#${clampInt.toString(16).padStart(6, "0").toUpperCase()}`;
|
|
819
|
+
newColor = $890783418b00a858$export$6e865ea70d7724f(newColorString);
|
|
820
|
+
}
|
|
802
821
|
return newColor;
|
|
803
822
|
}
|
|
804
823
|
//#endregion
|
|
@@ -1175,7 +1194,8 @@ var SolidColorPicker = (props) => {
|
|
|
1175
1194
|
const { value: rawValue, onChange, disabled, onChangeEnd, allowTransparency = false, outputFormat, hidden, noAdvancedOptions } = props;
|
|
1176
1195
|
const value = rawValue?.replace("transparent", "rgba(0, 0, 0, 0)");
|
|
1177
1196
|
const defaultColor = $890783418b00a858$export$6e865ea70d7724f("#00000000").toFormat(allowTransparency ? "hsla" : "hsl");
|
|
1178
|
-
const
|
|
1197
|
+
const modifiedValue = value && value.length > 1 ? $890783418b00a858$export$6e865ea70d7724f(value) : defaultColor;
|
|
1198
|
+
const [color, setColor] = useState(modifiedValue.toFormat(allowTransparency ? "hsla" : "hsl"));
|
|
1179
1199
|
if (hidden) return null;
|
|
1180
1200
|
const resolvedOutputFormat = outputFormat ?? (allowTransparency ? "hexa" : "hex");
|
|
1181
1201
|
const applyColorChange = (nextColor) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
|
-
import { d as $4064df0d6f9620e1$export$c9058316764c140e, l as $03e8ab2d84d7657a$export$4338b53315abf666, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-
|
|
3
|
-
import { t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-
|
|
2
|
+
import { d as $4064df0d6f9620e1$export$c9058316764c140e, l as $03e8ab2d84d7657a$export$4338b53315abf666, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
3
|
+
import { t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-CaY3sRjL.js";
|
|
4
4
|
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-CgeMQsGa.js";
|
|
5
|
-
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-
|
|
6
|
-
import { t as $ea3928288112382f$export$439d29a4e110a164 } from "./VisuallyHidden-
|
|
7
|
-
import { t as $876b6f32ca5a04c3$export$cbe85ee05b554577 } from "./useToggle-
|
|
8
|
-
import { t as $fd3c5e01e837dc20$export$8042c6c013fd5226 } from "./useToggleState-
|
|
5
|
+
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-JidySWlU.js";
|
|
6
|
+
import { t as $ea3928288112382f$export$439d29a4e110a164 } from "./VisuallyHidden-ZZwHZDro.js";
|
|
7
|
+
import { t as $876b6f32ca5a04c3$export$cbe85ee05b554577 } from "./useToggle-bbGRUbo4.js";
|
|
8
|
+
import { t as $fd3c5e01e837dc20$export$8042c6c013fd5226 } from "./useToggleState-D_rLMrVW.js";
|
|
9
9
|
import { t as cva } from "./dist-DpXluZqJ.js";
|
|
10
|
-
import $3ARPR$react, { createContext, forwardRef, useContext } from "react";
|
|
10
|
+
import $3ARPR$react, { createContext, forwardRef, useContext, useMemo } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region node_modules/react-aria/dist/private/switch/useSwitch.mjs
|
|
13
13
|
function $08312b2089c5b722$export$d853f7095ae95f88(props, state, ref) {
|
|
@@ -30,7 +30,7 @@ var $24585aa46d6ffdff$export$5cc1518e1ec171c = createContext(null);
|
|
|
30
30
|
var $24585aa46d6ffdff$export$b5d5cf8927ab7262 = forwardRef(function Switch(props, ref) {
|
|
31
31
|
let { inputRef: userProvidedInputRef = null, ...otherProps } = props;
|
|
32
32
|
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(otherProps, ref, $24585aa46d6ffdff$export$8699e3b644d5a28a);
|
|
33
|
-
let inputRef = $03e8ab2d84d7657a$export$4338b53315abf666($4064df0d6f9620e1$export$c9058316764c140e(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
|
|
33
|
+
let inputRef = $03e8ab2d84d7657a$export$4338b53315abf666(useMemo(() => $4064df0d6f9620e1$export$c9058316764c140e(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null), [userProvidedInputRef, props.inputRef]));
|
|
34
34
|
let state = $fd3c5e01e837dc20$export$8042c6c013fd5226(props);
|
|
35
35
|
let aria = $08312b2089c5b722$export$d853f7095ae95f88({
|
|
36
36
|
...$7230ffa83bc0c2cf$export$ef03459518577ad4(props),
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
|
-
import { c as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, h as $c4867b2f328c2698$export$e5c5a5f917a5871c, l as $03e8ab2d84d7657a$export$4338b53315abf666, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-
|
|
3
|
-
import { b as $caaf0dd3060ed57c$export$7e924b3091a3bd18, d as $3e6197669829fe11$export$40bfa8c7b0832715, i as $d1116acdf220c2da$export$4c014de7c8940b4c, t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-
|
|
4
|
-
import { t as $e8ac3c3f5d4bae7f$export$d6875122194c7b44 } from "./useLabels-
|
|
5
|
-
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-
|
|
6
|
-
import {
|
|
2
|
+
import { c as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, h as $c4867b2f328c2698$export$e5c5a5f917a5871c, l as $03e8ab2d84d7657a$export$4338b53315abf666, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
3
|
+
import { b as $caaf0dd3060ed57c$export$7e924b3091a3bd18, d as $3e6197669829fe11$export$40bfa8c7b0832715, i as $d1116acdf220c2da$export$4c014de7c8940b4c, t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-CaY3sRjL.js";
|
|
4
|
+
import { t as $e8ac3c3f5d4bae7f$export$d6875122194c7b44 } from "./useLabels-Dcg-cEyM.js";
|
|
5
|
+
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-R_4IDnf9.js";
|
|
6
|
+
import { C as $6f0c29017aeec335$export$d68d59712b04d9d1, _ as $42ceafc619f9c3ba$export$bf788dd355e3a401, c as $d667c2af82d35a98$export$d6daf82dcd84e87c, f as $263ab7fc0f95ccdb$export$4feb769f8ddf26c5, g as $42ceafc619f9c3ba$export$18af5c7a9e9b3664, i as $b24d1bc31a0f941d$export$a9d04c5684123369, m as $263ab7fc0f95ccdb$export$a164736487e3f0ae, o as $f6ba6936bfd098a0$export$ecf600387e221c37, p as $263ab7fc0f95ccdb$export$90e00781bc59d8f9, y as $42ceafc619f9c3ba$export$fb8073518f34e6ec } from "./useCollection-DqUS7tjk.js";
|
|
7
7
|
import { t as $d7f64c32b702fe2c$export$86427a43e3e48ebb } from "./Hidden-C4Saxkx9.js";
|
|
8
8
|
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-CgeMQsGa.js";
|
|
9
|
-
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-
|
|
9
|
+
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-JidySWlU.js";
|
|
10
10
|
import { t as $792f28e438b9ad5f$export$758399f318e6385a } from "./SharedElementTransition-D1LPCrSc.js";
|
|
11
11
|
import { t as $91fe5e721c7f36c1$export$c9549807523555e0 } from "./SelectionIndicator-CyOcB5ps.js";
|
|
12
|
-
import { r as $535772f9d2c1f38d$export$2d6ec8fc375ceafa } from "./FocusScope-
|
|
13
|
-
import {
|
|
14
|
-
import { n as $fcc7165e876206c6$export$6d3443f2c48bfc20, t as $fcc7165e876206c6$export$45fda7c47f93fd48 } from "./animation-
|
|
12
|
+
import { r as $535772f9d2c1f38d$export$2d6ec8fc375ceafa } from "./FocusScope-CUuL5wjz.js";
|
|
13
|
+
import { t as $b14b6f590b50af39$export$2f645645f7bca764 } from "./useListState-CzB3v6M9.js";
|
|
14
|
+
import { n as $fcc7165e876206c6$export$6d3443f2c48bfc20, t as $fcc7165e876206c6$export$45fda7c47f93fd48 } from "./animation-COc9P6ap.js";
|
|
15
15
|
import { RichLabel } from "./components/rich-label/rich-label.js";
|
|
16
16
|
import { t as sprintf } from "./sprintf-xJRAt4p0.js";
|
|
17
|
-
import { t as __ } from "./build-module-
|
|
17
|
+
import { t as __ } from "./build-module-BISCoQjQ.js";
|
|
18
18
|
import { t as cva } from "./dist-DpXluZqJ.js";
|
|
19
19
|
import { Notice } from "./components/notice/notice.js";
|
|
20
20
|
import $3ARPR$react, { Children, cloneElement, createContext, forwardRef, isValidElement, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
@@ -101,11 +101,12 @@ function $1b6fa05bad3d7740$export$fdf4756d5b8ef90a(props, state, ref) {
|
|
|
101
101
|
function $7d951241dadd72e4$export$fae0121b5afe572d(props, state, ref) {
|
|
102
102
|
let tabIndex = $bf14c9739fda2eb3$export$eac1895992b9f3d6(ref) ? void 0 : 0;
|
|
103
103
|
const id = $a251981b23baaa12$export$567fc7097e064344(state, props.id ?? state?.selectedKey, "tabpanel");
|
|
104
|
-
|
|
104
|
+
const tabPanelProps = $e8ac3c3f5d4bae7f$export$d6875122194c7b44({
|
|
105
105
|
...props,
|
|
106
106
|
id,
|
|
107
107
|
"aria-labelledby": $a251981b23baaa12$export$567fc7097e064344(state, state?.selectedKey, "tab")
|
|
108
|
-
})
|
|
108
|
+
});
|
|
109
|
+
return { tabPanelProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(tabPanelProps, {
|
|
109
110
|
tabIndex,
|
|
110
111
|
role: "tabpanel",
|
|
111
112
|
"aria-describedby": props["aria-describedby"],
|
|
@@ -117,7 +118,7 @@ function $7d951241dadd72e4$export$fae0121b5afe572d(props, state, ref) {
|
|
|
117
118
|
var $a226bee26c88efd7$export$15010ca3c1abe90b = class {
|
|
118
119
|
constructor(collection, direction, orientation, disabledKeys = new Set()) {
|
|
119
120
|
this.collection = collection;
|
|
120
|
-
this.flipDirection = direction === "rtl"
|
|
121
|
+
this.flipDirection = direction === "rtl";
|
|
121
122
|
this.disabledKeys = disabledKeys;
|
|
122
123
|
this.tabDirection = orientation === "horizontal";
|
|
123
124
|
}
|
|
@@ -173,15 +174,16 @@ function $83428e53deb13caf$export$773e389e644c5874(props, state, ref) {
|
|
|
173
174
|
let { orientation = "horizontal", keyboardActivation = "automatic" } = props;
|
|
174
175
|
let { collection, selectionManager: manager, disabledKeys } = state;
|
|
175
176
|
let { direction } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
177
|
+
let delegate = useMemo(() => new $a226bee26c88efd7$export$15010ca3c1abe90b(collection, direction, orientation, disabledKeys), [
|
|
178
|
+
collection,
|
|
179
|
+
disabledKeys,
|
|
180
|
+
orientation,
|
|
181
|
+
direction
|
|
182
|
+
]);
|
|
176
183
|
let { collectionProps } = $d667c2af82d35a98$export$d6daf82dcd84e87c({
|
|
177
184
|
ref,
|
|
178
185
|
selectionManager: manager,
|
|
179
|
-
keyboardDelegate:
|
|
180
|
-
collection,
|
|
181
|
-
disabledKeys,
|
|
182
|
-
orientation,
|
|
183
|
-
direction
|
|
184
|
-
]),
|
|
186
|
+
keyboardDelegate: delegate,
|
|
185
187
|
selectOnFocus: keyboardActivation === "automatic",
|
|
186
188
|
disallowEmptySelection: true,
|
|
187
189
|
scrollRef: ref,
|
|
@@ -189,11 +191,12 @@ function $83428e53deb13caf$export$773e389e644c5874(props, state, ref) {
|
|
|
189
191
|
});
|
|
190
192
|
let tabsId = $390e54f620492c70$export$f680877a34711e37();
|
|
191
193
|
$a251981b23baaa12$export$c5f62239608282b6.set(state, tabsId);
|
|
194
|
+
let tabListLabelProps = $e8ac3c3f5d4bae7f$export$d6875122194c7b44({
|
|
195
|
+
...props,
|
|
196
|
+
id: tabsId
|
|
197
|
+
});
|
|
192
198
|
return { tabListProps: {
|
|
193
|
-
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(collectionProps,
|
|
194
|
-
...props,
|
|
195
|
-
id: tabsId
|
|
196
|
-
})),
|
|
199
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(collectionProps, tabListLabelProps),
|
|
197
200
|
role: "tablist",
|
|
198
201
|
"aria-orientation": orientation,
|
|
199
202
|
tabIndex: void 0
|
|
@@ -448,8 +451,9 @@ function $b4f18e3395fe64d7$var$TabPanelInner(props) {
|
|
|
448
451
|
//#endregion
|
|
449
452
|
//#region lib/components/tabs/tabs.tsx
|
|
450
453
|
var isReactElement = (child) => isValidElement(child);
|
|
454
|
+
var isStringValue = (value) => Object.prototype.toString.call(value) === "[object String]";
|
|
451
455
|
var isNamedElement = (child, name) => {
|
|
452
|
-
if (!isValidElement(child) ||
|
|
456
|
+
if (!isValidElement(child) || isStringValue(child.type)) return false;
|
|
453
457
|
return child.type.displayName === name;
|
|
454
458
|
};
|
|
455
459
|
var tabListClasses = cva("es:flex", {
|
|
@@ -898,13 +902,14 @@ var Tabs = (props) => {
|
|
|
898
902
|
if (hidden) return null;
|
|
899
903
|
const preparedChildren = Children.toArray(children);
|
|
900
904
|
const firstTabList = preparedChildren.find((child) => isNamedElement(child, "TabList"));
|
|
901
|
-
const
|
|
902
|
-
|
|
903
|
-
|
|
905
|
+
const tabItems = Children.toArray(firstTabList?.props.children).filter(isReactElement);
|
|
906
|
+
const tabPanelItems = preparedChildren.filter((child) => isNamedElement(child, "TabPanel"));
|
|
907
|
+
const realTabIds = tabItems.map((tab, index) => tab.props.id ?? `tab-${baseId}-${index + 1}`);
|
|
908
|
+
const tabCount = tabItems.length;
|
|
909
|
+
const tabPanelCount = tabPanelItems.length;
|
|
904
910
|
const childrenWithIds = preparedChildren.reduce((accumulator, child, index) => {
|
|
905
911
|
if (isNamedElement(child, "TabList")) {
|
|
906
912
|
const childItems = Children.toArray(child.props.children).filter(isReactElement);
|
|
907
|
-
tabCount = childItems.length;
|
|
908
913
|
if (childItems.length < 1) return accumulator;
|
|
909
914
|
return [...accumulator, cloneElement(child, {
|
|
910
915
|
key: index,
|
|
@@ -919,8 +924,8 @@ var Tabs = (props) => {
|
|
|
919
924
|
})))];
|
|
920
925
|
}
|
|
921
926
|
if (isNamedElement(child, "TabPanel")) {
|
|
922
|
-
const
|
|
923
|
-
|
|
927
|
+
const tabPanelIndex = tabPanelItems.indexOf(child);
|
|
928
|
+
const panelId = realTabIds[tabPanelIndex] ?? `tab-${baseId}-${tabPanelIndex + 1}`;
|
|
924
929
|
return [...accumulator, cloneElement(child, {
|
|
925
930
|
id: panelId,
|
|
926
931
|
key: index,
|
|
@@ -204,8 +204,9 @@ var truncateMiddle = (input, maxLength, separator = "...") => {
|
|
|
204
204
|
* ```
|
|
205
205
|
*/
|
|
206
206
|
var unescapeHTML = (input = "") => {
|
|
207
|
-
if (
|
|
208
|
-
|
|
207
|
+
if ("DOMParser" in globalThis) return new globalThis.DOMParser().parseFromString(input, "text/html").documentElement.textContent;
|
|
208
|
+
const textContent = input.replace(/<!--[\s\S]*?-->|<\/?[a-z][^>]*>|<!doctype[^>]*>/gi, "");
|
|
209
|
+
return decode(textContent, { scope: "body" });
|
|
209
210
|
};
|
|
210
211
|
/**
|
|
211
212
|
* Limits the string to the maximum length and adds the provided separator in case the string is longer.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as $2add3ce32c6007eb$export$78551043582a6a98, j as $2add3ce32c6007eb$export$fedb369cb70207f1, q as $d447af545b77c9f1$export$b204af158042fbac, u as $081cb5757e08788e$export$24490316f764c430 } from "./useHover-CaY3sRjL.js";
|
|
2
2
|
//#region node_modules/react-aria/dist/private/interactions/textSelection.mjs
|
|
3
3
|
var $cbf007e418543821$var$state = "default";
|
|
4
4
|
var $cbf007e418543821$var$savedUserSelect = "";
|
|
5
5
|
var $cbf007e418543821$var$modifiedElementMap = new WeakMap();
|
|
6
6
|
function $cbf007e418543821$export$16a4697467175487(target) {
|
|
7
|
-
if ($2add3ce32c6007eb$export$fedb369cb70207f1()) {
|
|
7
|
+
if ($2add3ce32c6007eb$export$fedb369cb70207f1() && $2add3ce32c6007eb$export$78551043582a6a98()) {
|
|
8
8
|
if ($cbf007e418543821$var$state === "default") {
|
|
9
9
|
const documentObject = $d447af545b77c9f1$export$b204af158042fbac(target);
|
|
10
10
|
$cbf007e418543821$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;
|
|
@@ -18,7 +18,7 @@ function $cbf007e418543821$export$16a4697467175487(target) {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
function $cbf007e418543821$export$b0d6fa1ab32e3295(target) {
|
|
21
|
-
if ($2add3ce32c6007eb$export$fedb369cb70207f1()) {
|
|
21
|
+
if ($2add3ce32c6007eb$export$fedb369cb70207f1() && $2add3ce32c6007eb$export$78551043582a6a98()) {
|
|
22
22
|
if ($cbf007e418543821$var$state !== "disabled") return;
|
|
23
23
|
$cbf007e418543821$var$state = "restoring";
|
|
24
24
|
setTimeout(() => {
|