jclib-ui 1.0.172 → 1.0.173
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/jclib-ui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from "react";
|
|
2
|
-
import t__default, { createContext, useState, useCallback, useEffect, useContext, useRef, useLayoutEffect, useMemo } from "react";
|
|
2
|
+
import t__default, { createContext, useState, useCallback, useEffect, useContext, useRef, useLayoutEffect, useImperativeHandle, useMemo } from "react";
|
|
3
3
|
import { isDarkMode, random, isMobile, formatData, formatDataHora, formatValor, isDesktop, getDateTimeStr, getHash, validarCNPJ, validarCPF } from "jcinfo-utils";
|
|
4
4
|
import { useDragControls, motion } from "framer-motion";
|
|
5
5
|
import styled from "styled-components";
|
|
@@ -19945,6 +19945,7 @@ function TabControl({
|
|
|
19945
19945
|
isMultine = false,
|
|
19946
19946
|
className = "",
|
|
19947
19947
|
classNameContent = "",
|
|
19948
|
+
innerRef,
|
|
19948
19949
|
...rest
|
|
19949
19950
|
}) {
|
|
19950
19951
|
const [tabs, setTabs] = useState([]);
|
|
@@ -20005,6 +20006,18 @@ function TabControl({
|
|
|
20005
20006
|
window.removeEventListener("resize", onResize, null);
|
|
20006
20007
|
};
|
|
20007
20008
|
}, [reCalcOpenTabs]);
|
|
20009
|
+
useImperativeHandle(
|
|
20010
|
+
innerRef,
|
|
20011
|
+
() => ({
|
|
20012
|
+
open(tabId) {
|
|
20013
|
+
const tab = findTab(tabId);
|
|
20014
|
+
if (tab && (tab == null ? void 0 : tab.isVisible)) {
|
|
20015
|
+
selectTab(tabId);
|
|
20016
|
+
}
|
|
20017
|
+
}
|
|
20018
|
+
}),
|
|
20019
|
+
[selectTab, findTab]
|
|
20020
|
+
);
|
|
20008
20021
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20009
20022
|
TabContext.Provider,
|
|
20010
20023
|
{
|