@abdellatifui/react 3.2.85 → 3.2.87
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/nextgen.js +25 -26
- package/package.json +1 -1
package/dist/nextgen.js
CHANGED
|
@@ -6377,7 +6377,7 @@ const useRandomId = (length = 8) => {
|
|
|
6377
6377
|
const GetRandomStr = () => {
|
|
6378
6378
|
return useRandomId();
|
|
6379
6379
|
};
|
|
6380
|
-
const useGeneratedId
|
|
6380
|
+
const useGeneratedId = (length = 8, beginstr = true, forcss = false) => {
|
|
6381
6381
|
const [r2, setR] = useState("");
|
|
6382
6382
|
useEffect(() => {
|
|
6383
6383
|
if (length && forcss) {
|
|
@@ -6438,7 +6438,7 @@ const vrs$h = cva("flex items-center justify-center z-1 css-iuur1", {
|
|
|
6438
6438
|
});
|
|
6439
6439
|
const ModelComponent = forwardRef((props, ref) => {
|
|
6440
6440
|
const [open, setOpen] = useState(false);
|
|
6441
|
-
const id = useGeneratedId
|
|
6441
|
+
const id = useGeneratedId();
|
|
6442
6442
|
const ref3 = useRef();
|
|
6443
6443
|
const [_children, setChildren] = useState(null);
|
|
6444
6444
|
const {
|
|
@@ -19238,7 +19238,7 @@ const Toast = (props) => {
|
|
|
19238
19238
|
duration: duration2 = 6e3,
|
|
19239
19239
|
ref
|
|
19240
19240
|
} = props;
|
|
19241
|
-
const id = useGeneratedId
|
|
19241
|
+
const id = useGeneratedId();
|
|
19242
19242
|
useEffect(() => {
|
|
19243
19243
|
if (item.type && id) {
|
|
19244
19244
|
if (!item.header) {
|
|
@@ -19851,7 +19851,7 @@ const vrs$e = cva(
|
|
|
19851
19851
|
const Sidebar = forwardRef((props, ref) => {
|
|
19852
19852
|
const [isOpen, setIsOpen] = useState(false);
|
|
19853
19853
|
const ref2 = useRef(null);
|
|
19854
|
-
const id = useGeneratedId
|
|
19854
|
+
const id = useGeneratedId(9, true, true);
|
|
19855
19855
|
const modelRef = useRef(null);
|
|
19856
19856
|
const [_content, setContent] = useState(null);
|
|
19857
19857
|
const {
|
|
@@ -22947,7 +22947,7 @@ const Switch = (props) => {
|
|
|
22947
22947
|
className,
|
|
22948
22948
|
ref = useRef(),
|
|
22949
22949
|
inputRef = useRef(),
|
|
22950
|
-
id = useGeneratedId
|
|
22950
|
+
id = useGeneratedId(9, false, true),
|
|
22951
22951
|
inputProps = {}
|
|
22952
22952
|
} = props;
|
|
22953
22953
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref, className: cn(
|
|
@@ -23320,7 +23320,7 @@ const NetworkMapComponent = (props) => {
|
|
|
23320
23320
|
pathThikness = 5
|
|
23321
23321
|
} = props;
|
|
23322
23322
|
useRef();
|
|
23323
|
-
const mapId = useGeneratedId
|
|
23323
|
+
const mapId = useGeneratedId(4, true, false);
|
|
23324
23324
|
const mapApi = useRef({});
|
|
23325
23325
|
useRef();
|
|
23326
23326
|
const lngLatBoxRef = useRef();
|
|
@@ -24047,7 +24047,7 @@ const vrs$c = cva("px-1", {
|
|
|
24047
24047
|
}
|
|
24048
24048
|
});
|
|
24049
24049
|
const AccordionItem = (props) => {
|
|
24050
|
-
const key = useGeneratedId
|
|
24050
|
+
const key = useGeneratedId(5, false, false);
|
|
24051
24051
|
const ref = useRef();
|
|
24052
24052
|
const refTrigger = useRef();
|
|
24053
24053
|
const {
|
|
@@ -24063,7 +24063,7 @@ const AccordionItem = (props) => {
|
|
|
24063
24063
|
disabled = false
|
|
24064
24064
|
} = props;
|
|
24065
24065
|
const { updateApi, options: options2 } = useContext(AccordionContext);
|
|
24066
|
-
const id = useGeneratedId
|
|
24066
|
+
const id = useGeneratedId(5, true, false);
|
|
24067
24067
|
function handleClick() {
|
|
24068
24068
|
const isOpen = ref.current.dataset.state == "open" ? false : true;
|
|
24069
24069
|
const form = { ...props, open: isOpen, ref, refTrigger };
|
|
@@ -24120,7 +24120,7 @@ const HorizontalDiv = (props) => {
|
|
|
24120
24120
|
item,
|
|
24121
24121
|
skipRowsCount = false
|
|
24122
24122
|
} = props;
|
|
24123
|
-
const id = useGeneratedId
|
|
24123
|
+
const id = useGeneratedId();
|
|
24124
24124
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id, tabIndex: index, className: "z-40 hover:[&_.css-fj1j20]:opacity-100 flex items-center px-1 select-text focus:ring-[1.5px] focus:ring-blue-600", children: [
|
|
24125
24125
|
!skipRowsCount && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-Roboto text-[12px] select-text bg-blue-600 text-white rounded-full w-[15px] h-[15px] aspect-square text-center mr-2 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "p-1", children: index + 1 }) }),
|
|
24126
24126
|
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "z-0 font-Roboto text-[14px] select-text text-black", children: item }),
|
|
@@ -25336,7 +25336,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
25336
25336
|
const ContextMenuComponent = (props) => {
|
|
25337
25337
|
const modelRef = useRef({});
|
|
25338
25338
|
const mainMenuRef = useRef();
|
|
25339
|
-
const id = useGeneratedId
|
|
25339
|
+
const id = useGeneratedId();
|
|
25340
25340
|
const [documentEvent, setDocumentEvent] = useState(null);
|
|
25341
25341
|
const [location] = useMouseLocation(documentEvent, mainMenuRef);
|
|
25342
25342
|
const {
|
|
@@ -25600,8 +25600,8 @@ const AllInputComponent = (props) => {
|
|
|
25600
25600
|
const [ttype, setTtype] = useState(type);
|
|
25601
25601
|
const [extraInfo, setExtraInfo] = useState(description);
|
|
25602
25602
|
const [timeout, setITimeout] = useState();
|
|
25603
|
-
const id = useGeneratedId
|
|
25604
|
-
const id2 = useGeneratedId
|
|
25603
|
+
const id = useGeneratedId();
|
|
25604
|
+
const id2 = useGeneratedId();
|
|
25605
25605
|
const [inputValue, setValue] = useState("");
|
|
25606
25606
|
const ref2 = useRef();
|
|
25607
25607
|
const descriptionRef = useRef();
|
|
@@ -28450,7 +28450,7 @@ const ShadcnTabs = forwardRef((props, ref) => {
|
|
|
28450
28450
|
const itemsContainerRef = useRef();
|
|
28451
28451
|
const [sliderStyle, setSliderStyle] = useState({ left: 0, top: 0, width: 0, opacity: 0 });
|
|
28452
28452
|
const boxSize = useBoxSize(itemsContainerRef);
|
|
28453
|
-
const key =
|
|
28453
|
+
const key = useRandomId();
|
|
28454
28454
|
const {
|
|
28455
28455
|
tabs = [],
|
|
28456
28456
|
onChange = () => {
|
|
@@ -28475,6 +28475,7 @@ const ShadcnTabs = forwardRef((props, ref) => {
|
|
|
28475
28475
|
useEffect(() => {
|
|
28476
28476
|
if (tabs?.length > 0) {
|
|
28477
28477
|
tabs.map((tab) => {
|
|
28478
|
+
if (!tab.value) tab.value = useRandomId();
|
|
28478
28479
|
if (tab?.default) {
|
|
28479
28480
|
setDefaultTab(tab?.value);
|
|
28480
28481
|
onChange({ event: null, ...tab, currentTab: defaultTab, props, ref }, tab.value);
|
|
@@ -28566,17 +28567,15 @@ const ShadcnTabs = forwardRef((props, ref) => {
|
|
|
28566
28567
|
]
|
|
28567
28568
|
}
|
|
28568
28569
|
) }),
|
|
28569
|
-
body && _tabs?.length > 0 &&
|
|
28570
|
-
"w-full h-full relative",
|
|
28571
|
-
theme === "modern" ? "border border-gray-200/60 rounded-md bg-white/50 backdrop-blur-sm p-4 mt-3 shadow-sm" : "border-solid border border-gray-200 p-1 my-1 rounded bg-[#fafafa]",
|
|
28572
|
-
bodyClassName
|
|
28573
|
-
), children: _tabs?.map?.((tab) => {
|
|
28570
|
+
body && _tabs?.length > 0 && _tabs?.map((tab) => {
|
|
28574
28571
|
const id2 = useRandomId();
|
|
28575
28572
|
tab.tabs = _tabs;
|
|
28576
28573
|
tab.props = props;
|
|
28577
|
-
|
|
28578
|
-
|
|
28579
|
-
|
|
28574
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Activity, { mode: tab?.value == defaultTab ? "visible" : "hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn(
|
|
28575
|
+
"w-full p-0 m-0",
|
|
28576
|
+
bodyClassName
|
|
28577
|
+
), children: tab?.content }) }, id2);
|
|
28578
|
+
})
|
|
28580
28579
|
] });
|
|
28581
28580
|
});
|
|
28582
28581
|
const TTextArea = forwardRef((props, ref) => {
|
|
@@ -28933,7 +28932,7 @@ const ToggleGroup = (props) => {
|
|
|
28933
28932
|
},
|
|
28934
28933
|
onContextMenu
|
|
28935
28934
|
} = props;
|
|
28936
|
-
const id = useGeneratedId
|
|
28935
|
+
const id = useGeneratedId(8, false, true);
|
|
28937
28936
|
const ref2 = useRef({ items: [] });
|
|
28938
28937
|
const itemsRef = useRef({ items: [] });
|
|
28939
28938
|
const {
|
|
@@ -28980,7 +28979,7 @@ const vars$1 = cva("css-toggle-item-abdellatifui w-fit h-fit py-1 px-2 rounded-n
|
|
|
28980
28979
|
});
|
|
28981
28980
|
const ToggleItem = (props) => {
|
|
28982
28981
|
const ref2 = useRef({});
|
|
28983
|
-
const id = useGeneratedId
|
|
28982
|
+
const id = useGeneratedId(8, false, true);
|
|
28984
28983
|
const {
|
|
28985
28984
|
rootref,
|
|
28986
28985
|
api_groupChange,
|
|
@@ -29077,7 +29076,7 @@ const CheckboxGroup = (props) => {
|
|
|
29077
29076
|
children,
|
|
29078
29077
|
className
|
|
29079
29078
|
} = props;
|
|
29080
|
-
const id = useGeneratedId
|
|
29079
|
+
const id = useGeneratedId(8, false, true);
|
|
29081
29080
|
const ref2 = useRef({ items: [] });
|
|
29082
29081
|
const itemsRef = useRef({ items: [] });
|
|
29083
29082
|
const api_groupChange = (api) => {
|
|
@@ -29114,7 +29113,7 @@ const vars = cva("css-checkbox-item-abdellatifui flex items-center space-x-3 w-f
|
|
|
29114
29113
|
});
|
|
29115
29114
|
const CheckboxItem = (props) => {
|
|
29116
29115
|
const ref2 = useRef({});
|
|
29117
|
-
const id = useGeneratedId
|
|
29116
|
+
const id = useGeneratedId(8, false, true);
|
|
29118
29117
|
const {
|
|
29119
29118
|
api_groupChange,
|
|
29120
29119
|
itemsRef
|
|
@@ -29292,7 +29291,7 @@ export {
|
|
|
29292
29291
|
useApi,
|
|
29293
29292
|
useBoxSize,
|
|
29294
29293
|
useBoxSizeByDOM,
|
|
29295
|
-
useGeneratedId
|
|
29294
|
+
useGeneratedId,
|
|
29296
29295
|
useRandomId,
|
|
29297
29296
|
useStore,
|
|
29298
29297
|
useVariable
|