@eightshift/ui-components 1.6.0 → 1.7.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/Button-VbCAu4hd.js +185 -0
- package/dist/{intlStrings-BxJIrC6b.js → Color-BpLubxWI.js} +2394 -2394
- package/dist/{ColorSwatch-BNX2quma.js → ColorSwatch-CinC14s3.js} +4 -4
- package/dist/{Dialog-BdtBguys.js → Dialog-BN5EE7UH.js} +9 -9
- package/dist/{FieldError-ClB3-XvF.js → FieldError-BttM1Nxd.js} +2 -2
- package/dist/{FocusScope-B5L3qI3N.js → FocusScope-CtCX0OGo.js} +2 -2
- package/dist/{Group-ubPTwji_.js → Group-XzWUooix.js} +3 -3
- package/dist/{Heading-DGnF6JDc.js → Heading-DZelepHV.js} +1 -1
- package/dist/{Hidden-CupIZhlF.js → Hidden-CcFqOzrp.js} +1 -1
- package/dist/{Input-BoNEjaXM.js → Input-CV1qVS6t.js} +8 -8
- package/dist/{Label-BqW0M3HN.js → Label-BwqMVkuV.js} +2 -2
- package/dist/{ListBox-civ86c_v.js → ListBox-DuZPdnkk.js} +16 -12
- package/dist/{SelectionManager-Ctbzoj1E.js → SelectionManager-x27KqnAT.js} +67 -34
- package/dist/{Separator-CDhAddZc.js → Separator-BM58t3PP.js} +24 -26
- package/dist/{Slider-Dkj8Slw3.js → Slider-D9Cs6yKr.js} +162 -162
- package/dist/{Text-CdwRBXol.js → Text-BVIXT8qq.js} +1 -1
- package/dist/{VisuallyHidden-DsMLX-RC.js → VisuallyHidden-WhC7vZaL.js} +2 -2
- package/dist/assets/style.css +1 -1
- package/dist/assets/wp-ui-enhancements.css +1 -1
- package/dist/components/animated-visibility/animated-visibility.js +92 -129
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/button/button.js +6 -6
- package/dist/components/checkbox/checkbox.js +7 -7
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +3 -3
- package/dist/components/color-pickers/gradient-editor.js +2 -2
- package/dist/components/color-pickers/solid-color-picker.js +64 -64
- package/dist/components/component-toggle/component-toggle.js +1 -1
- package/dist/components/draggable/draggable-handle.js +2 -2
- package/dist/components/draggable/draggable.js +7 -4
- package/dist/components/draggable-list/draggable-list-item.js +2 -2
- package/dist/components/draggable-list/draggable-list.js +6 -3
- package/dist/components/expandable/expandable.js +3 -3
- package/dist/components/index.js +3 -1
- package/dist/components/input-field/input-field.js +7 -7
- package/dist/components/item-collection/item-collection.js +6 -1
- package/dist/components/link-input/link-input.js +40 -36
- package/dist/components/list-box/list-box.js +2 -2
- package/dist/components/matrix-align/matrix-align.js +2 -2
- package/dist/components/menu/menu.js +15 -15
- package/dist/components/modal/modal.js +6 -6
- package/dist/components/number-picker/number-picker.js +10 -10
- package/dist/components/option-select/option-select.js +1 -1
- package/dist/components/options-panel/options-panel.js +17 -5
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/placeholders/media-placeholder.js +6 -5
- package/dist/components/popover/popover.js +2 -2
- package/dist/components/radio/radio.js +13 -13
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.js +6 -3
- package/dist/components/responsive/mini-responsive.js +495 -0
- package/dist/components/responsive/responsive-legacy.js +2 -2
- package/dist/components/responsive/responsive.js +7 -3
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/select/async-multi-select.js +1 -0
- package/dist/components/select/async-single-select.js +4 -1
- package/dist/components/select/multi-select.js +1 -0
- package/dist/components/select/single-select.js +4 -1
- package/dist/components/select/styles.js +1 -1
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/spacer/spacer.js +3 -4
- package/dist/components/tabs/tabs.js +23 -18
- package/dist/components/toggle/switch.js +6 -6
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +6 -6
- package/dist/components/tooltip/tooltip.js +3 -3
- package/dist/{context-kCEA3M_y.js → context-Cs-ZD1nu.js} +1 -1
- package/dist/{default-i18n-BqWys-1G.js → default-i18n-DRnM8y4w.js} +45 -21
- package/dist/{focusSafely-xMzk3syC.js → focusSafely-CgFLw4FA.js} +1 -1
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +3 -1
- package/dist/{number-CHmNj-oR.js → number-GajL10e1.js} +2 -2
- package/dist/{react-jsx-parser.min-sPC96O_U.js → react-jsx-parser.min-B5HVwW_W.js} +103 -53
- package/dist/{textSelection-D5Bit8i8.js → textSelection-CvK0YHTZ.js} +1 -1
- package/dist/{tooltip-srrt1p-b.js → tooltip-eKaARDoV.js} +5 -5
- package/dist/{useButton-6H5k2W5N.js → useButton-Cy9eEev7.js} +3 -3
- package/dist/{useEvent-BY-3vfxa.js → useEvent-LZebwyrb.js} +1 -1
- package/dist/{useFocusRing-rz8eyzby.js → useFocusRing-BMOTWmOx.js} +1 -1
- package/dist/{useFocusable-Bu2Ovohk.js → useFocusable-ByyKSVQv.js} +2 -2
- package/dist/{useFormReset-fUHUaaR6.js → useFormReset-B8m1uz1J.js} +1 -1
- package/dist/{useFormValidationState-DAan_XbC.js → useFormValidationState-BjMhz_VI.js} +2 -2
- package/dist/{useLabel-Bk7iP__W.js → useLabel-B6uO0wVK.js} +2 -2
- package/dist/{useLabels-DmsOywGg.js → useLabels-5dFkeiXx.js} +1 -1
- package/dist/{useListState-GXSJsAgz.js → useListState-eKxv7HPC.js} +28 -16
- package/dist/{useLocalizedStringFormatter-m03yY3xi.js → useLocalizedStringFormatter-BaKmjFNp.js} +1 -1
- package/dist/{useMenuTrigger-CT2-BFLo.js → useMenuTrigger-4fwEmto8.js} +4 -4
- package/dist/{useNumberFieldState-CpmU88xz.js → useNumberField-DMMUTZ-h.js} +169 -169
- package/dist/{useNumberFormatter-B-20GQ2u.js → useNumberFormatter-Cyx5Dxkf.js} +1 -1
- package/dist/{usePress-Cs8K7gKw.js → usePress-D8nPoIQm.js} +22 -10
- package/dist/{useSingleSelectListState-C1ddMCq3.js → useSingleSelectListState-CABciySJ.js} +3 -2
- package/dist/{useToggle-Cn2nQUNS.js → useToggle-BmltE9Zr.js} +4 -4
- package/dist/{useToggleState-Dj0JhD9W.js → useToggleState-DZXLEnA_.js} +1 -1
- package/dist/{utils-Du2x3YVu.js → utils-BCJajCwh.js} +15 -7
- package/package.json +18 -18
- package/dist/Button-CYX0D6At.js +0 -55
- package/dist/LiveAnnouncer-D8h-3GrG.js +0 -63
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __, s as sprintf, a as _n } from "../../default-i18n-
|
|
1
|
+
import { _ as __, s as sprintf, a as _n } from "../../default-i18n-DRnM8y4w.js";
|
|
2
2
|
/**
|
|
3
3
|
* Generates an array of markers based on the provided minimum and maximum values and step.
|
|
4
4
|
* If the step is less than 10, only markers divisible by 5 and 10 are included.
|
|
@@ -67,8 +67,7 @@ const Spacer = (props) => {
|
|
|
67
67
|
!vertical && !border && sizes[size].sizeHorizontal,
|
|
68
68
|
!vertical && border && sizes[size].sizeHorizontalBorder,
|
|
69
69
|
vertical && !border && sizes[size].sizeVertical,
|
|
70
|
-
vertical && border && sizes[size].sizeVerticalBorder
|
|
71
|
-
className
|
|
70
|
+
vertical && border && sizes[size].sizeVerticalBorder
|
|
72
71
|
);
|
|
73
72
|
if (text || icon) {
|
|
74
73
|
return /* @__PURE__ */ jsxs("div", { className: clsx("es-uic-flex es-uic-items-center es-uic-gap-1.5", className), children: [
|
|
@@ -85,13 +84,13 @@ const Spacer = (props) => {
|
|
|
85
84
|
] });
|
|
86
85
|
}
|
|
87
86
|
if (border) {
|
|
88
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
87
|
+
return /* @__PURE__ */ jsxs("div", { className, children: [
|
|
89
88
|
size !== "px" && /* @__PURE__ */ jsx("div", { className: spaceClass }),
|
|
90
89
|
/* @__PURE__ */ jsx("div", { className: clsx("es-uic-bg-gray-300", vertical ? "es-uic-h-full es-uic-w-px" : "es-uic-h-px es-uic-w-full") }),
|
|
91
90
|
size !== "px" && /* @__PURE__ */ jsx("div", { className: spaceClass })
|
|
92
91
|
] });
|
|
93
92
|
}
|
|
94
|
-
return /* @__PURE__ */ jsx("div", { className: spaceClass });
|
|
93
|
+
return /* @__PURE__ */ jsx("div", { className: clsx(spaceClass, className) });
|
|
95
94
|
};
|
|
96
95
|
export {
|
|
97
96
|
Spacer
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { c as $880e95eb8b93ba9a$export$ecf600387e221c37, i as $ae20dd8cbca75726$export$d6daf82dcd84e87c, d as $e1995378a142960e$export$18af5c7a9e9b3664, e as $e1995378a142960e$export$bf788dd355e3a401, f as $e1995378a142960e$export$fb8073518f34e6ec, g as $7135fc7d473fd974$export$4feb769f8ddf26c5, k as $7135fc7d473fd974$export$90e00781bc59d8f9 } from "../../SelectionManager-
|
|
3
|
-
import { j as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, c as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, l as $df56164dff5785e2$export$4338b53315abf666, b as $64fa3d84918910a7$export$4d86445c2cf5e3, a as $64fa3d84918910a7$export$29f1550f4b0d4415, i as $64fa3d84918910a7$export$2881499e37b75b9a, $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../../utils-
|
|
4
|
-
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "../../Hidden-
|
|
2
|
+
import { c as $880e95eb8b93ba9a$export$ecf600387e221c37, i as $ae20dd8cbca75726$export$d6daf82dcd84e87c, d as $e1995378a142960e$export$18af5c7a9e9b3664, e as $e1995378a142960e$export$bf788dd355e3a401, f as $e1995378a142960e$export$fb8073518f34e6ec, g as $7135fc7d473fd974$export$4feb769f8ddf26c5, k as $7135fc7d473fd974$export$90e00781bc59d8f9 } from "../../SelectionManager-x27KqnAT.js";
|
|
3
|
+
import { j as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, c as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, l as $df56164dff5785e2$export$4338b53315abf666, b as $64fa3d84918910a7$export$4d86445c2cf5e3, a as $64fa3d84918910a7$export$29f1550f4b0d4415, i as $64fa3d84918910a7$export$2881499e37b75b9a, $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../../utils-BCJajCwh.js";
|
|
4
|
+
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "../../Hidden-CcFqOzrp.js";
|
|
5
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
6
6
|
import React__default, { useState, useMemo, useRef, useEffect, forwardRef, useContext, createContext, useId, cloneElement } from "react";
|
|
7
|
-
import { a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "../../usePress-
|
|
8
|
-
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-
|
|
9
|
-
import { b as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-
|
|
10
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-
|
|
11
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
12
|
-
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-
|
|
13
|
-
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../useSingleSelectListState-
|
|
14
|
-
import { _ as __, s as sprintf } from "../../default-i18n-
|
|
7
|
+
import { a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "../../usePress-D8nPoIQm.js";
|
|
8
|
+
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-5dFkeiXx.js";
|
|
9
|
+
import { b as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-CtCX0OGo.js";
|
|
10
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-Cs-ZD1nu.js";
|
|
11
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-BMOTWmOx.js";
|
|
12
|
+
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-CgFLw4FA.js";
|
|
13
|
+
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../useSingleSelectListState-CABciySJ.js";
|
|
14
|
+
import { _ as __, s as sprintf } from "../../default-i18n-DRnM8y4w.js";
|
|
15
15
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
16
16
|
import { Notice } from "../notice/notice.js";
|
|
17
17
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
@@ -48,6 +48,8 @@ function $83013635b024ae3d$export$eac1895992b9f3d6(ref, options) {
|
|
|
48
48
|
}
|
|
49
49
|
const $99b62ae3ff97ec45$export$c5f62239608282b6 = /* @__PURE__ */ new WeakMap();
|
|
50
50
|
function $99b62ae3ff97ec45$export$567fc7097e064344(state, key, role) {
|
|
51
|
+
if (!state)
|
|
52
|
+
return "";
|
|
51
53
|
if (typeof key === "string") key = key.replace(/\s+/g, "");
|
|
52
54
|
let baseId = $99b62ae3ff97ec45$export$c5f62239608282b6.get(state);
|
|
53
55
|
return `${baseId}-${role}-${key}`;
|
|
@@ -115,12 +117,6 @@ class $bfc6f2d60b8a4c40$export$15010ca3c1abe90b {
|
|
|
115
117
|
if (this.flipDirection) return this.getPreviousKey(key);
|
|
116
118
|
return this.getNextKey(key);
|
|
117
119
|
}
|
|
118
|
-
getKeyAbove(key) {
|
|
119
|
-
return this.getPreviousKey(key);
|
|
120
|
-
}
|
|
121
|
-
getKeyBelow(key) {
|
|
122
|
-
return this.getNextKey(key);
|
|
123
|
-
}
|
|
124
120
|
isDisabled(key) {
|
|
125
121
|
var _this_collection_getItem_props, _this_collection_getItem;
|
|
126
122
|
return this.disabledKeys.has(key) || !!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === void 0 ? void 0 : _this_collection_getItem_props.isDisabled);
|
|
@@ -135,6 +131,14 @@ class $bfc6f2d60b8a4c40$export$15010ca3c1abe90b {
|
|
|
135
131
|
if (key != null && this.isDisabled(key)) key = this.getPreviousKey(key);
|
|
136
132
|
return key;
|
|
137
133
|
}
|
|
134
|
+
getKeyAbove(key) {
|
|
135
|
+
if (this.tabDirection) return null;
|
|
136
|
+
return this.getPreviousKey(key);
|
|
137
|
+
}
|
|
138
|
+
getKeyBelow(key) {
|
|
139
|
+
if (this.tabDirection) return null;
|
|
140
|
+
return this.getNextKey(key);
|
|
141
|
+
}
|
|
138
142
|
getNextKey(key) {
|
|
139
143
|
do {
|
|
140
144
|
key = this.collection.getKeyAfter(key);
|
|
@@ -153,6 +157,7 @@ class $bfc6f2d60b8a4c40$export$15010ca3c1abe90b {
|
|
|
153
157
|
this.collection = collection;
|
|
154
158
|
this.flipDirection = direction === "rtl" && orientation === "horizontal";
|
|
155
159
|
this.disabledKeys = disabledKeys;
|
|
160
|
+
this.tabDirection = orientation === "horizontal";
|
|
156
161
|
}
|
|
157
162
|
}
|
|
158
163
|
function $58d314389b21fa3f$export$773e389e644c5874(props, state, ref) {
|
|
@@ -531,7 +536,7 @@ const TabList = (props) => {
|
|
|
531
536
|
className: ({ orientation }) => clsx(
|
|
532
537
|
"es-uic-flex",
|
|
533
538
|
orientation === "vertical" && "es-uic-h-full es-uic-flex-col es-uic-gap-px es-uic-pr-1.5",
|
|
534
|
-
orientation === "horizontal" && "es-uic-w-full es-uic-items-
|
|
539
|
+
orientation === "horizontal" && "es-uic-w-full es-uic-items-stretch es-uic-gap-1 es-uic-border-b es-uic-border-b-gray-300",
|
|
535
540
|
className
|
|
536
541
|
),
|
|
537
542
|
...other,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, c as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "../../utils-
|
|
2
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, c as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "../../utils-BCJajCwh.js";
|
|
3
3
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
4
4
|
import React__default, { forwardRef, createContext } from "react";
|
|
5
|
-
import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-
|
|
6
|
-
import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-
|
|
7
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
8
|
-
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-
|
|
9
|
-
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-
|
|
5
|
+
import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-DZXLEnA_.js";
|
|
6
|
+
import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-BmltE9Zr.js";
|
|
7
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-BMOTWmOx.js";
|
|
8
|
+
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-CgFLw4FA.js";
|
|
9
|
+
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-WhC7vZaL.js";
|
|
10
10
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
11
11
|
function $b418ec0c85c52f27$export$d853f7095ae95f88(props, state, ref) {
|
|
12
12
|
let { labelProps, inputProps, isSelected, isPressed, isDisabled, isReadOnly } = $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
2
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BwqMVkuV.js";
|
|
3
3
|
import { Switch } from "./switch.js";
|
|
4
4
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
5
5
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { n as $ff5963eb1fccf552$export$e08e3b67e392101e, c as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, b as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-
|
|
2
|
+
import { n as $ff5963eb1fccf552$export$e08e3b67e392101e, c as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, b as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-BCJajCwh.js";
|
|
3
3
|
import React__default, { forwardRef, createContext } from "react";
|
|
4
|
-
import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-
|
|
5
|
-
import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "../../useButton-
|
|
6
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
7
|
-
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-
|
|
4
|
+
import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-DZXLEnA_.js";
|
|
5
|
+
import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "../../useButton-Cy9eEev7.js";
|
|
6
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-BMOTWmOx.js";
|
|
7
|
+
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-CgFLw4FA.js";
|
|
8
8
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
9
|
-
import { T as Tooltip } from "../../tooltip-
|
|
9
|
+
import { T as Tooltip } from "../../tooltip-eKaARDoV.js";
|
|
10
10
|
function $55f54f7887471b58$export$51e84d46ca0bc451(props, state, ref) {
|
|
11
11
|
const { isSelected } = state;
|
|
12
12
|
const { isPressed, buttonProps } = $701a24aa0da5b062$export$ea18c227d4417cc3({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { D, T } from "../../tooltip-
|
|
2
|
+
import { D, T } from "../../tooltip-eKaARDoV.js";
|
|
3
3
|
import "../../lite-DVmmD_-j.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "../../focusSafely-
|
|
6
|
-
import "../../utils-
|
|
5
|
+
import "../../focusSafely-CgFLw4FA.js";
|
|
6
|
+
import "../../utils-BCJajCwh.js";
|
|
7
7
|
export {
|
|
8
8
|
D as DecorativeTooltip,
|
|
9
9
|
T as Tooltip
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { useState, useEffect, useContext } from "react";
|
|
2
|
-
import { d as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-
|
|
2
|
+
import { d as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-BCJajCwh.js";
|
|
3
3
|
const $148a7a147e38ea7f$var$RTL_SCRIPTS = /* @__PURE__ */ new Set([
|
|
4
4
|
"Arab",
|
|
5
5
|
"Syrc",
|
|
@@ -761,8 +761,8 @@ function createHasHook(hooks, storeKey) {
|
|
|
761
761
|
return hookName in hooksStore;
|
|
762
762
|
};
|
|
763
763
|
}
|
|
764
|
-
function createRunHook(hooks, storeKey, returnFirstArg
|
|
765
|
-
return function
|
|
764
|
+
function createRunHook(hooks, storeKey, returnFirstArg, async) {
|
|
765
|
+
return function runHook(hookName, ...args) {
|
|
766
766
|
const hooksStore = hooks[storeKey];
|
|
767
767
|
if (!hooksStore[hookName]) {
|
|
768
768
|
hooksStore[hookName] = {
|
|
@@ -784,37 +784,59 @@ function createRunHook(hooks, storeKey, returnFirstArg = false) {
|
|
|
784
784
|
name: hookName,
|
|
785
785
|
currentIndex: 0
|
|
786
786
|
};
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
787
|
+
async function asyncRunner() {
|
|
788
|
+
try {
|
|
789
|
+
hooksStore.__current.add(hookInfo);
|
|
790
|
+
let result = returnFirstArg ? args[0] : void 0;
|
|
791
|
+
while (hookInfo.currentIndex < handlers.length) {
|
|
792
|
+
const handler = handlers[hookInfo.currentIndex];
|
|
793
|
+
result = await handler.callback.apply(null, args);
|
|
794
|
+
if (returnFirstArg) {
|
|
795
|
+
args[0] = result;
|
|
796
|
+
}
|
|
797
|
+
hookInfo.currentIndex++;
|
|
798
|
+
}
|
|
799
|
+
return returnFirstArg ? result : void 0;
|
|
800
|
+
} finally {
|
|
801
|
+
hooksStore.__current.delete(hookInfo);
|
|
793
802
|
}
|
|
794
|
-
hookInfo.currentIndex++;
|
|
795
803
|
}
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
804
|
+
function syncRunner() {
|
|
805
|
+
try {
|
|
806
|
+
hooksStore.__current.add(hookInfo);
|
|
807
|
+
let result = returnFirstArg ? args[0] : void 0;
|
|
808
|
+
while (hookInfo.currentIndex < handlers.length) {
|
|
809
|
+
const handler = handlers[hookInfo.currentIndex];
|
|
810
|
+
result = handler.callback.apply(null, args);
|
|
811
|
+
if (returnFirstArg) {
|
|
812
|
+
args[0] = result;
|
|
813
|
+
}
|
|
814
|
+
hookInfo.currentIndex++;
|
|
815
|
+
}
|
|
816
|
+
return returnFirstArg ? result : void 0;
|
|
817
|
+
} finally {
|
|
818
|
+
hooksStore.__current.delete(hookInfo);
|
|
819
|
+
}
|
|
799
820
|
}
|
|
800
|
-
return
|
|
821
|
+
return (async ? asyncRunner : syncRunner)();
|
|
801
822
|
};
|
|
802
823
|
}
|
|
803
824
|
function createCurrentHook(hooks, storeKey) {
|
|
804
825
|
return function currentHook() {
|
|
805
826
|
var _a;
|
|
806
|
-
var
|
|
827
|
+
var _currentArray$at$name;
|
|
807
828
|
const hooksStore = hooks[storeKey];
|
|
808
|
-
|
|
829
|
+
const currentArray = Array.from(hooksStore.__current);
|
|
830
|
+
return (_currentArray$at$name = (_a = currentArray.at(-1)) == null ? void 0 : _a.name) !== null && _currentArray$at$name !== void 0 ? _currentArray$at$name : null;
|
|
809
831
|
};
|
|
810
832
|
}
|
|
811
833
|
function createDoingHook(hooks, storeKey) {
|
|
812
834
|
return function doingHook(hookName) {
|
|
813
835
|
const hooksStore = hooks[storeKey];
|
|
814
836
|
if ("undefined" === typeof hookName) {
|
|
815
|
-
return
|
|
837
|
+
return hooksStore.__current.size > 0;
|
|
816
838
|
}
|
|
817
|
-
return hooksStore.__current
|
|
839
|
+
return Array.from(hooksStore.__current).some((hook) => hook.name === hookName);
|
|
818
840
|
};
|
|
819
841
|
}
|
|
820
842
|
function createDidHook(hooks, storeKey) {
|
|
@@ -829,9 +851,9 @@ function createDidHook(hooks, storeKey) {
|
|
|
829
851
|
class _Hooks {
|
|
830
852
|
constructor() {
|
|
831
853
|
this.actions = /* @__PURE__ */ Object.create(null);
|
|
832
|
-
this.actions.__current =
|
|
854
|
+
this.actions.__current = /* @__PURE__ */ new Set();
|
|
833
855
|
this.filters = /* @__PURE__ */ Object.create(null);
|
|
834
|
-
this.filters.__current =
|
|
856
|
+
this.filters.__current = /* @__PURE__ */ new Set();
|
|
835
857
|
this.addAction = createAddHook(this, "actions");
|
|
836
858
|
this.addFilter = createAddHook(this, "filters");
|
|
837
859
|
this.removeAction = createRemoveHook(this, "actions");
|
|
@@ -840,8 +862,10 @@ class _Hooks {
|
|
|
840
862
|
this.hasFilter = createHasHook(this, "filters");
|
|
841
863
|
this.removeAllActions = createRemoveHook(this, "actions", true);
|
|
842
864
|
this.removeAllFilters = createRemoveHook(this, "filters", true);
|
|
843
|
-
this.doAction = createRunHook(this, "actions");
|
|
844
|
-
this.
|
|
865
|
+
this.doAction = createRunHook(this, "actions", false, false);
|
|
866
|
+
this.doActionAsync = createRunHook(this, "actions", false, true);
|
|
867
|
+
this.applyFilters = createRunHook(this, "filters", true, false);
|
|
868
|
+
this.applyFiltersAsync = createRunHook(this, "filters", true, true);
|
|
845
869
|
this.currentAction = createCurrentHook(this, "actions");
|
|
846
870
|
this.currentFilter = createCurrentHook(this, "filters");
|
|
847
871
|
this.doingAction = createDoingHook(this, "actions");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, d as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-
|
|
1
|
+
import { j as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, d as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-BCJajCwh.js";
|
|
2
2
|
import { useState, useRef, useEffect, useCallback, useMemo } from "react";
|
|
3
3
|
const $431fbd86ca7dc216$export$b204af158042fbac = (el) => {
|
|
4
4
|
var _el_ownerDocument;
|
package/dist/icons/jsx-svg.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { s as svgToJsxString, a as source_default } from "../react-jsx-parser.min-
|
|
2
|
+
import { s as svgToJsxString, a as source_default } from "../react-jsx-parser.min-B5HVwW_W.js";
|
|
3
3
|
/**
|
|
4
4
|
* Renders SVG string as JSX SVGs.
|
|
5
5
|
*
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,7 @@ import { ListBox } from "./components/list-box/list-box.js";
|
|
|
26
26
|
import { MatrixAlign } from "./components/matrix-align/matrix-align.js";
|
|
27
27
|
import { MediaPlaceholder } from "./components/placeholders/media-placeholder.js";
|
|
28
28
|
import { Menu, MenuItem, MenuSection, MenuSeparator, SubMenuItem } from "./components/menu/menu.js";
|
|
29
|
+
import { MiniResponsive } from "./components/responsive/mini-responsive.js";
|
|
29
30
|
import { Notice } from "./components/notice/notice.js";
|
|
30
31
|
import { NumberPicker } from "./components/number-picker/number-picker.js";
|
|
31
32
|
import { Popover, TriggeredPopover } from "./components/popover/popover.js";
|
|
@@ -50,7 +51,7 @@ import { Tab, TabList, TabPanel, Tabs } from "./components/tabs/tabs.js";
|
|
|
50
51
|
import { Toggle } from "./components/toggle/toggle.js";
|
|
51
52
|
import { Switch } from "./components/toggle/switch.js";
|
|
52
53
|
import { ToggleButton } from "./components/toggle-button/toggle-button.js";
|
|
53
|
-
import { D, T } from "./tooltip-
|
|
54
|
+
import { D, T } from "./tooltip-eKaARDoV.js";
|
|
54
55
|
import { VStack } from "./components/layout/vstack.js";
|
|
55
56
|
import { getColumnConfigOutputText } from "./components/slider/utils.js";
|
|
56
57
|
export {
|
|
@@ -90,6 +91,7 @@ export {
|
|
|
90
91
|
MenuItem,
|
|
91
92
|
MenuSection,
|
|
92
93
|
MenuSeparator,
|
|
94
|
+
MiniResponsive,
|
|
93
95
|
Modal,
|
|
94
96
|
MultiSelect,
|
|
95
97
|
Notice,
|
|
@@ -30,7 +30,7 @@ function $9446cca9a3875146$export$b6268554fba451f(value, digits, base = 10) {
|
|
|
30
30
|
return Math.round(value * pow) / pow;
|
|
31
31
|
}
|
|
32
32
|
export {
|
|
33
|
-
$9446cca9a3875146$export$
|
|
34
|
-
$9446cca9a3875146$export$
|
|
33
|
+
$9446cca9a3875146$export$cb6e0bb50bc19463 as $,
|
|
34
|
+
$9446cca9a3875146$export$7d15b64cf5a3a4c4 as a,
|
|
35
35
|
$9446cca9a3875146$export$b6268554fba451f as b
|
|
36
36
|
};
|
|
@@ -7,7 +7,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
7
7
|
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
8
8
|
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
|
-
var _parseJSX, _parseExpression, _parseMemberExpression, _parseName, _parseElement;
|
|
10
|
+
var _parseJSX, _parseExpression, _parseChainExpression, _parseMemberExpression, _parseName, _parseElement;
|
|
11
11
|
function getLocator(source, options) {
|
|
12
12
|
if (options === void 0) {
|
|
13
13
|
options = {};
|
|
@@ -13129,6 +13129,12 @@ var NO_WHITESPACE = [
|
|
|
13129
13129
|
"thead",
|
|
13130
13130
|
"tr"
|
|
13131
13131
|
];
|
|
13132
|
+
class NullishShortCircuit extends Error {
|
|
13133
|
+
constructor(message = "Nullish value encountered") {
|
|
13134
|
+
super(message);
|
|
13135
|
+
this.name = "NullishShortCircuit";
|
|
13136
|
+
}
|
|
13137
|
+
}
|
|
13132
13138
|
var hash = (value = "", radix = 16) => {
|
|
13133
13139
|
const string = String(value);
|
|
13134
13140
|
let h = 0;
|
|
@@ -13170,6 +13176,9 @@ var resolveArrayPath = (object, path) => {
|
|
|
13170
13176
|
return subPath.length === 0 ? object[property] : resolveArrayPath(object[property], subPath);
|
|
13171
13177
|
};
|
|
13172
13178
|
var resolvePath = (object, path) => resolveArrayPath(object, pathToArrayPath(path));
|
|
13179
|
+
function handleNaN(child) {
|
|
13180
|
+
return Number.isNaN(child) ? "NaN" : child;
|
|
13181
|
+
}
|
|
13173
13182
|
class JsxParser extends import_react.default.Component {
|
|
13174
13183
|
constructor() {
|
|
13175
13184
|
super(...arguments);
|
|
@@ -13215,69 +13224,100 @@ class JsxParser extends import_react.default.Component {
|
|
|
13215
13224
|
case "ArrayExpression":
|
|
13216
13225
|
return expression.elements.map((ele) => __privateGet(this, _parseExpression).call(this, ele, scope));
|
|
13217
13226
|
case "BinaryExpression":
|
|
13227
|
+
const binaryLeft = __privateGet(this, _parseExpression).call(this, expression.left, scope);
|
|
13228
|
+
const binaryRight = __privateGet(this, _parseExpression).call(this, expression.right, scope);
|
|
13229
|
+
let binaryResult;
|
|
13218
13230
|
switch (expression.operator) {
|
|
13219
13231
|
case "-":
|
|
13220
|
-
|
|
13232
|
+
binaryResult = binaryLeft - binaryRight;
|
|
13233
|
+
break;
|
|
13221
13234
|
case "!=":
|
|
13222
|
-
|
|
13235
|
+
binaryResult = binaryLeft != binaryRight;
|
|
13236
|
+
break;
|
|
13223
13237
|
case "!==":
|
|
13224
|
-
|
|
13238
|
+
binaryResult = binaryLeft !== binaryRight;
|
|
13239
|
+
break;
|
|
13225
13240
|
case "*":
|
|
13226
|
-
|
|
13241
|
+
binaryResult = binaryLeft * binaryRight;
|
|
13242
|
+
break;
|
|
13227
13243
|
case "**":
|
|
13228
|
-
|
|
13244
|
+
binaryResult = binaryLeft ** binaryRight;
|
|
13245
|
+
break;
|
|
13229
13246
|
case "/":
|
|
13230
|
-
|
|
13247
|
+
binaryResult = binaryLeft / binaryRight;
|
|
13248
|
+
break;
|
|
13231
13249
|
case "%":
|
|
13232
|
-
|
|
13250
|
+
binaryResult = binaryLeft % binaryRight;
|
|
13251
|
+
break;
|
|
13233
13252
|
case "+":
|
|
13234
|
-
|
|
13253
|
+
binaryResult = binaryLeft + binaryRight;
|
|
13254
|
+
break;
|
|
13235
13255
|
case "<":
|
|
13236
|
-
|
|
13256
|
+
binaryResult = binaryLeft < binaryRight;
|
|
13257
|
+
break;
|
|
13237
13258
|
case "<=":
|
|
13238
|
-
|
|
13259
|
+
binaryResult = binaryLeft <= binaryRight;
|
|
13260
|
+
break;
|
|
13239
13261
|
case "==":
|
|
13240
|
-
|
|
13262
|
+
binaryResult = binaryLeft == binaryRight;
|
|
13263
|
+
break;
|
|
13241
13264
|
case "===":
|
|
13242
|
-
|
|
13265
|
+
binaryResult = binaryLeft === binaryRight;
|
|
13266
|
+
break;
|
|
13243
13267
|
case ">":
|
|
13244
|
-
|
|
13268
|
+
binaryResult = binaryLeft > binaryRight;
|
|
13269
|
+
break;
|
|
13245
13270
|
case ">=":
|
|
13246
|
-
|
|
13271
|
+
binaryResult = binaryLeft >= binaryRight;
|
|
13272
|
+
break;
|
|
13273
|
+
default:
|
|
13274
|
+
this.props.onError(new Error(`Unsupported binary operator: ${expression.operator}`));
|
|
13275
|
+
return;
|
|
13247
13276
|
}
|
|
13248
|
-
return;
|
|
13277
|
+
return handleNaN(binaryResult);
|
|
13249
13278
|
case "CallExpression":
|
|
13250
|
-
const parsedCallee = __privateGet(this, _parseExpression).call(this, expression.callee);
|
|
13279
|
+
const parsedCallee = __privateGet(this, _parseExpression).call(this, expression.callee, scope);
|
|
13251
13280
|
if (parsedCallee === void 0) {
|
|
13281
|
+
if (expression.optional) {
|
|
13282
|
+
throw new NullishShortCircuit();
|
|
13283
|
+
}
|
|
13252
13284
|
this.props.onError(new Error(`The expression '${expression.callee}' could not be resolved, resulting in an undefined return value.`));
|
|
13253
13285
|
return;
|
|
13254
13286
|
}
|
|
13255
13287
|
return parsedCallee(...expression.arguments.map((arg) => __privateGet(this, _parseExpression).call(this, arg, expression.callee)));
|
|
13256
13288
|
case "ConditionalExpression":
|
|
13257
|
-
return __privateGet(this, _parseExpression).call(this, expression.test) ? __privateGet(this, _parseExpression).call(this, expression.consequent) : __privateGet(this, _parseExpression).call(this, expression.alternate);
|
|
13289
|
+
return __privateGet(this, _parseExpression).call(this, expression.test, scope) ? __privateGet(this, _parseExpression).call(this, expression.consequent, scope) : __privateGet(this, _parseExpression).call(this, expression.alternate, scope);
|
|
13258
13290
|
case "ExpressionStatement":
|
|
13259
|
-
return __privateGet(this, _parseExpression).call(this, expression.expression);
|
|
13291
|
+
return __privateGet(this, _parseExpression).call(this, expression.expression, scope);
|
|
13260
13292
|
case "Identifier":
|
|
13293
|
+
if (expression.name === "Infinity")
|
|
13294
|
+
return Infinity;
|
|
13295
|
+
if (expression.name === "-Infinity")
|
|
13296
|
+
return -Infinity;
|
|
13297
|
+
if (expression.name === "NaN")
|
|
13298
|
+
return NaN;
|
|
13261
13299
|
if (scope && expression.name in scope) {
|
|
13262
|
-
return scope[expression.name];
|
|
13300
|
+
return handleNaN(scope[expression.name]);
|
|
13263
13301
|
}
|
|
13264
|
-
return (this.props.bindings || {})[expression.name];
|
|
13302
|
+
return handleNaN((this.props.bindings || {})[expression.name]);
|
|
13265
13303
|
case "Literal":
|
|
13266
13304
|
return expression.value;
|
|
13267
13305
|
case "LogicalExpression":
|
|
13268
|
-
const left = __privateGet(this, _parseExpression).call(this, expression.left);
|
|
13306
|
+
const left = __privateGet(this, _parseExpression).call(this, expression.left, scope);
|
|
13269
13307
|
if (expression.operator === "||" && left)
|
|
13270
13308
|
return left;
|
|
13271
13309
|
if (expression.operator === "&&" && left || expression.operator === "||" && !left) {
|
|
13272
|
-
return __privateGet(this, _parseExpression).call(this, expression.right);
|
|
13310
|
+
return __privateGet(this, _parseExpression).call(this, expression.right, scope);
|
|
13273
13311
|
}
|
|
13274
13312
|
return false;
|
|
13275
13313
|
case "MemberExpression":
|
|
13276
13314
|
return __privateGet(this, _parseMemberExpression).call(this, expression, scope);
|
|
13315
|
+
case "ChainExpression":
|
|
13316
|
+
return __privateGet(this, _parseChainExpression).call(this, expression, scope);
|
|
13277
13317
|
case "ObjectExpression":
|
|
13278
13318
|
const object = {};
|
|
13279
13319
|
expression.properties.forEach((prop) => {
|
|
13280
|
-
object[prop.key.name || prop.key.value] = __privateGet(this, _parseExpression).call(this, prop.value);
|
|
13320
|
+
object[prop.key.name || prop.key.value] = __privateGet(this, _parseExpression).call(this, prop.value, scope);
|
|
13281
13321
|
});
|
|
13282
13322
|
return object;
|
|
13283
13323
|
case "TemplateElement":
|
|
@@ -13287,15 +13327,16 @@ class JsxParser extends import_react.default.Component {
|
|
|
13287
13327
|
if (a.start < b.start)
|
|
13288
13328
|
return -1;
|
|
13289
13329
|
return 1;
|
|
13290
|
-
}).map((item) => __privateGet(this, _parseExpression).call(this, item)).join("");
|
|
13330
|
+
}).map((item) => __privateGet(this, _parseExpression).call(this, item, scope)).join("");
|
|
13291
13331
|
case "UnaryExpression":
|
|
13332
|
+
const unaryValue = __privateGet(this, _parseExpression).call(this, expression.argument, scope);
|
|
13292
13333
|
switch (expression.operator) {
|
|
13293
13334
|
case "+":
|
|
13294
|
-
return
|
|
13335
|
+
return +unaryValue;
|
|
13295
13336
|
case "-":
|
|
13296
|
-
return -
|
|
13337
|
+
return -unaryValue;
|
|
13297
13338
|
case "!":
|
|
13298
|
-
return !
|
|
13339
|
+
return !unaryValue;
|
|
13299
13340
|
}
|
|
13300
13341
|
return;
|
|
13301
13342
|
case "ArrowFunctionExpression":
|
|
@@ -13309,37 +13350,45 @@ class JsxParser extends import_react.default.Component {
|
|
|
13309
13350
|
});
|
|
13310
13351
|
return __privateGet(this, _parseExpression).call(this, expression.body, functionScope);
|
|
13311
13352
|
};
|
|
13353
|
+
default:
|
|
13354
|
+
this.props.onError(new Error(`The expression type '${expression.type}' is not supported.`));
|
|
13355
|
+
return;
|
|
13356
|
+
}
|
|
13357
|
+
});
|
|
13358
|
+
__privateAdd(this, _parseChainExpression, (expression, scope) => {
|
|
13359
|
+
try {
|
|
13360
|
+
return __privateGet(this, _parseExpression).call(this, expression.expression, scope);
|
|
13361
|
+
} catch (error) {
|
|
13362
|
+
if (error instanceof NullishShortCircuit)
|
|
13363
|
+
return;
|
|
13364
|
+
throw error;
|
|
13312
13365
|
}
|
|
13313
13366
|
});
|
|
13314
13367
|
__privateAdd(this, _parseMemberExpression, (expression, scope) => {
|
|
13315
|
-
|
|
13316
|
-
let
|
|
13317
|
-
|
|
13318
|
-
|
|
13319
|
-
|
|
13320
|
-
|
|
13321
|
-
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13325
|
-
|
|
13326
|
-
|
|
13327
|
-
|
|
13368
|
+
const object = __privateGet(this, _parseExpression).call(this, expression.object, scope);
|
|
13369
|
+
let property;
|
|
13370
|
+
if (expression.computed) {
|
|
13371
|
+
property = __privateGet(this, _parseExpression).call(this, expression.property, scope);
|
|
13372
|
+
} else if (expression.property.type === "Identifier") {
|
|
13373
|
+
property = expression.property.name;
|
|
13374
|
+
} else {
|
|
13375
|
+
this.props.onError(new Error("Only simple MemberExpressions are supported."));
|
|
13376
|
+
return;
|
|
13377
|
+
}
|
|
13378
|
+
if (object === null || object === void 0) {
|
|
13379
|
+
if (expression.optional)
|
|
13380
|
+
throw new NullishShortCircuit();
|
|
13328
13381
|
}
|
|
13329
|
-
|
|
13382
|
+
let member;
|
|
13330
13383
|
try {
|
|
13331
|
-
|
|
13332
|
-
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
}, target);
|
|
13336
|
-
if (typeof member === "function")
|
|
13337
|
-
return member.bind(parent);
|
|
13338
|
-
return member;
|
|
13339
|
-
} catch {
|
|
13340
|
-
const name = (object == null ? void 0 : object.name) || "unknown";
|
|
13341
|
-
this.props.onError(new Error(`Unable to parse ${name}["${path.join('"]["')}"]}`));
|
|
13384
|
+
member = object[property];
|
|
13385
|
+
} catch (error) {
|
|
13386
|
+
this.props.onError(new Error(`The property '${property}' could not be resolved on the object '${object}'.`));
|
|
13387
|
+
return;
|
|
13342
13388
|
}
|
|
13389
|
+
if (typeof member === "function")
|
|
13390
|
+
return member.bind(object);
|
|
13391
|
+
return member;
|
|
13343
13392
|
});
|
|
13344
13393
|
__privateAdd(this, _parseName, (element) => {
|
|
13345
13394
|
if (element.type === "JSXIdentifier") {
|
|
@@ -13434,6 +13483,7 @@ class JsxParser extends import_react.default.Component {
|
|
|
13434
13483
|
}
|
|
13435
13484
|
_parseJSX = new WeakMap();
|
|
13436
13485
|
_parseExpression = new WeakMap();
|
|
13486
|
+
_parseChainExpression = new WeakMap();
|
|
13437
13487
|
_parseMemberExpression = new WeakMap();
|
|
13438
13488
|
_parseName = new WeakMap();
|
|
13439
13489
|
_parseElement = new WeakMap();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef, useCallback, useEffect } from "react";
|
|
2
|
-
import { j as $c87311424ea30a05$export$fedb369cb70207f1, g as $431fbd86ca7dc216$export$b204af158042fbac, k as $bbed8b41f857bcc0$export$24490316f764c430 } from "./focusSafely-
|
|
2
|
+
import { j as $c87311424ea30a05$export$fedb369cb70207f1, g as $431fbd86ca7dc216$export$b204af158042fbac, k as $bbed8b41f857bcc0$export$24490316f764c430 } from "./focusSafely-CgFLw4FA.js";
|
|
3
3
|
function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
|
|
4
4
|
let globalListeners = useRef(/* @__PURE__ */ new Map());
|
|
5
5
|
let addGlobalListener = useCallback((eventTarget, type, listener, options) => {
|