@economic/taco 2.65.0-alpha.0 → 2.65.0-alt-tab-popover-focus.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/taco.cjs +29 -3
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.js +29 -3
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
package/dist/taco.cjs
CHANGED
@@ -9863,8 +9863,25 @@ function isElementTriggeredFromContainer(element, container) {
|
|
9863
9863
|
}
|
9864
9864
|
return false;
|
9865
9865
|
}
|
9866
|
+
const isDialogOpenedFromContainer = (element, container) => {
|
9867
|
+
if (!container) {
|
9868
|
+
return false;
|
9869
|
+
}
|
9870
|
+
let currentDialog = element == null ? void 0 : element.closest('[role="dialog"]');
|
9871
|
+
while (currentDialog == null ? void 0 : currentDialog.id) {
|
9872
|
+
const opener = document.querySelector(`[aria-controls="${currentDialog.id}"]`);
|
9873
|
+
if (!opener) {
|
9874
|
+
return false;
|
9875
|
+
}
|
9876
|
+
if (container.contains(opener)) {
|
9877
|
+
return true;
|
9878
|
+
}
|
9879
|
+
currentDialog = opener.closest('[role="dialog"]');
|
9880
|
+
}
|
9881
|
+
return false;
|
9882
|
+
};
|
9866
9883
|
function isElementInsideOrTriggeredFromContainer(element, container) {
|
9867
|
-
return isElementTriggeredFromContainer(element, container) || !!(container == null ? void 0 : container.contains(element));
|
9884
|
+
return isElementTriggeredFromContainer(element, container) || !!(container == null ? void 0 : container.contains(element)) || isDialogOpenedFromContainer(element, container);
|
9868
9885
|
}
|
9869
9886
|
function isElementInsideOverlay(element) {
|
9870
9887
|
return !!(element == null ? void 0 : element.closest("[role=dialog],[role=menu]"));
|
@@ -18485,7 +18502,7 @@ const useCombobox = (props, ref) => {
|
|
18485
18502
|
React__namespace.useEffect(() => {
|
18486
18503
|
const isCurrentValue = value !== void 0 && value !== null && inputValue === String(value);
|
18487
18504
|
if (inputValue && data.length && !isCurrentValue) {
|
18488
|
-
setCurrentIndex(0);
|
18505
|
+
setCurrentIndex(getIndexFromValue(data, inputValue) || 0);
|
18489
18506
|
if (!open) {
|
18490
18507
|
setOpen(true);
|
18491
18508
|
}
|
@@ -25749,6 +25766,13 @@ const Dialog = React__namespace.forwardRef(function Dialog2(props, ref) {
|
|
25749
25766
|
}),
|
25750
25767
|
[closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]
|
25751
25768
|
);
|
25769
|
+
React__namespace.useEffect(() => {
|
25770
|
+
const onFocusOut = (event) => {
|
25771
|
+
event.stopImmediatePropagation();
|
25772
|
+
};
|
25773
|
+
document.addEventListener("focusout", onFocusOut);
|
25774
|
+
return () => document.removeEventListener("focusout", onFocusOut);
|
25775
|
+
}, []);
|
25752
25776
|
return /* @__PURE__ */ React__namespace.createElement(DialogContext.Provider, { value: context }, /* @__PURE__ */ React__namespace.createElement($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, { defaultOpen, open, onOpenChange: onChange }, trigger && /* @__PURE__ */ React__namespace.createElement(Trigger$4, null, trigger), children));
|
25753
25777
|
});
|
25754
25778
|
Dialog.Trigger = Trigger$4;
|
@@ -55452,7 +55476,9 @@ function usePendingChangesState(handleSave, handleChange, handleDiscard, rowIden
|
|
55452
55476
|
return completed;
|
55453
55477
|
}
|
55454
55478
|
async function discardChanges(rowId, table) {
|
55455
|
-
|
55479
|
+
if (rowId.startsWith(TEMPORARY_ROW_ID_PREFIX)) {
|
55480
|
+
table.resetRowPinning(true);
|
55481
|
+
}
|
55456
55482
|
dispatch({
|
55457
55483
|
type: "removeRow",
|
55458
55484
|
rowId,
|