@algorithm-shift/design-system 1.2.986 → 1.2.987
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/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5053,7 +5053,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
|
|
|
5053
5053
|
var Tabs_default = Tabs;
|
|
5054
5054
|
|
|
5055
5055
|
// src/components/Navigation/Stages/Stages.tsx
|
|
5056
|
-
import React11, { useState as useState13 } from "react";
|
|
5056
|
+
import React11, { useEffect as useEffect26, useState as useState13 } from "react";
|
|
5057
5057
|
import { jsx as jsx60, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5058
5058
|
var StagesComponent = ({
|
|
5059
5059
|
stages,
|
|
@@ -5070,8 +5070,15 @@ var StagesComponent = ({
|
|
|
5070
5070
|
triggerOnClick = false,
|
|
5071
5071
|
canvasMode = "desktop"
|
|
5072
5072
|
}) => {
|
|
5073
|
-
const [activeStage, setActiveStage] = useState13(
|
|
5073
|
+
const [activeStage, setActiveStage] = useState13("");
|
|
5074
5074
|
const [isCompleted, setIsCompleted] = useState13(false);
|
|
5075
|
+
useEffect26(() => {
|
|
5076
|
+
if (currentStage) {
|
|
5077
|
+
setActiveStage(currentStage);
|
|
5078
|
+
} else {
|
|
5079
|
+
setActiveStage(stages && stages.length > 0 ? stages[0][dataKey] : null);
|
|
5080
|
+
}
|
|
5081
|
+
}, [currentStage]);
|
|
5075
5082
|
const updateStage = (stageKey) => {
|
|
5076
5083
|
setActiveStage(stageKey);
|
|
5077
5084
|
onStageChange?.(stageKey);
|
|
@@ -5086,7 +5093,7 @@ var StagesComponent = ({
|
|
|
5086
5093
|
return;
|
|
5087
5094
|
}
|
|
5088
5095
|
if (currentIndex < stages.length - 1) {
|
|
5089
|
-
const nextStageObj = stages[currentIndex
|
|
5096
|
+
const nextStageObj = stages[currentIndex];
|
|
5090
5097
|
updateStage(nextStageObj[dataKey]);
|
|
5091
5098
|
return;
|
|
5092
5099
|
}
|
|
@@ -5207,7 +5214,7 @@ import { jsx as jsx63, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
|
5207
5214
|
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
5208
5215
|
|
|
5209
5216
|
// src/components/Navigation/Navbar/Navbar.tsx
|
|
5210
|
-
import { useCallback as useCallback4, useMemo as useMemo9, useState as useState14, useEffect as
|
|
5217
|
+
import { useCallback as useCallback4, useMemo as useMemo9, useState as useState14, useEffect as useEffect27 } from "react";
|
|
5211
5218
|
import { Bell, Search as Search2, Menu as Menu2 } from "lucide-react";
|
|
5212
5219
|
import Image3 from "next/image";
|
|
5213
5220
|
import Link4 from "next/link";
|
|
@@ -5276,7 +5283,7 @@ function Navbar({
|
|
|
5276
5283
|
const [screenMode, setScreenMode] = useState14(
|
|
5277
5284
|
canvasMode
|
|
5278
5285
|
);
|
|
5279
|
-
|
|
5286
|
+
useEffect27(() => {
|
|
5280
5287
|
const detectMode = () => {
|
|
5281
5288
|
if (window.innerWidth < 640) setScreenMode("mobile");
|
|
5282
5289
|
else if (window.innerWidth < 1024) setScreenMode("tablet");
|
|
@@ -5383,7 +5390,7 @@ function Navbar({
|
|
|
5383
5390
|
}
|
|
5384
5391
|
|
|
5385
5392
|
// src/components/Chart/BarChart.tsx
|
|
5386
|
-
import React13, { useEffect as
|
|
5393
|
+
import React13, { useEffect as useEffect28, useMemo as useMemo10, useState as useState15, useCallback as useCallback5 } from "react";
|
|
5387
5394
|
import axios3 from "axios";
|
|
5388
5395
|
import {
|
|
5389
5396
|
BarChart,
|
|
@@ -5461,7 +5468,7 @@ var ChartComponent = ({
|
|
|
5461
5468
|
const [currentPage, setCurrentPage] = useState15(1);
|
|
5462
5469
|
const effectiveData = apiUrl ? rawData : props.data || [];
|
|
5463
5470
|
const effectiveLoading = apiUrl ? localLoading : externalLoading;
|
|
5464
|
-
|
|
5471
|
+
useEffect28(() => {
|
|
5465
5472
|
if (apiUrl) {
|
|
5466
5473
|
setCurrentPage(1);
|
|
5467
5474
|
}
|
|
@@ -5503,7 +5510,7 @@ var ChartComponent = ({
|
|
|
5503
5510
|
if (!cancelled) setLocalLoading(false);
|
|
5504
5511
|
}
|
|
5505
5512
|
}, [apiUrl, limit]);
|
|
5506
|
-
|
|
5513
|
+
useEffect28(() => {
|
|
5507
5514
|
if (!apiUrl) return;
|
|
5508
5515
|
fetchData(currentPage);
|
|
5509
5516
|
}, [apiUrl, currentPage, fetchData]);
|
|
@@ -5702,7 +5709,7 @@ var ChartComponent = ({
|
|
|
5702
5709
|
var BarChart_default = React13.memo(ChartComponent);
|
|
5703
5710
|
|
|
5704
5711
|
// src/components/Chart/PieChart.tsx
|
|
5705
|
-
import React14, { useEffect as
|
|
5712
|
+
import React14, { useEffect as useEffect29, useMemo as useMemo11, useState as useState16 } from "react";
|
|
5706
5713
|
import axios4 from "axios";
|
|
5707
5714
|
import {
|
|
5708
5715
|
PieChart,
|
|
@@ -5792,7 +5799,7 @@ var DonutChart = ({
|
|
|
5792
5799
|
const [localLoading, setLocalLoading] = useState16(false);
|
|
5793
5800
|
const effectiveData = apiUrl ? rawData : props.data || [];
|
|
5794
5801
|
const effectiveLoading = apiUrl ? localLoading : externalLoading;
|
|
5795
|
-
|
|
5802
|
+
useEffect29(() => {
|
|
5796
5803
|
if (!apiUrl) return;
|
|
5797
5804
|
let cancelled = false;
|
|
5798
5805
|
const fetchData = async () => {
|
|
@@ -5874,7 +5881,7 @@ var DonutChart = ({
|
|
|
5874
5881
|
return { inner: 70, outer: 130 };
|
|
5875
5882
|
};
|
|
5876
5883
|
const [mounted, setMounted] = useState16(false);
|
|
5877
|
-
|
|
5884
|
+
useEffect29(() => {
|
|
5878
5885
|
const timeout = setTimeout(() => setMounted(true), 100);
|
|
5879
5886
|
return () => clearTimeout(timeout);
|
|
5880
5887
|
}, []);
|