@algorithm-shift/design-system 1.2.88 → 1.2.89

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.mjs CHANGED
@@ -30037,7 +30037,7 @@ var Tabs_default = Tabs;
30037
30037
  // src/components/Navigation/Stages/Stages.tsx
30038
30038
  import React10, { useState as useState9 } from "react";
30039
30039
  import { jsx as jsx58, jsxs as jsxs35 } from "react/jsx-runtime";
30040
- var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage, dataKey = "key", dataLabel = "header" }) => {
30040
+ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage, dataKey = "key", dataLabel = "header", loading }) => {
30041
30041
  const [activeStage, setActiveStage] = useState9(currentStage || (stages && stages.length > 0 ? stages[0].key : null));
30042
30042
  const nextStage = () => {
30043
30043
  if (!stages || stages.length === 0) return;
@@ -30057,7 +30057,16 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
30057
30057
  const isAllStagesCompleted = activeStage === lastStage;
30058
30058
  return /* @__PURE__ */ jsx58("div", { className, style, children: /* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between bg-red p-2 rounded-lg border border-gray-200 w-full", children: [
30059
30059
  /* @__PURE__ */ jsx58("div", { className: "flex items-center", children: /* @__PURE__ */ jsx58("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ jsx58("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx58("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
30060
- /* @__PURE__ */ jsx58("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: stages?.length > 0 && stages?.map((stage, index) => {
30060
+ /* @__PURE__ */ jsx58("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ jsx58(
30061
+ "button",
30062
+ {
30063
+ className: `
30064
+ min-w-[80px] min-h-[35px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap
30065
+ text-gray-700 hover:bg-gray-100 border border-gray-200 bg-gray-100 animate-pulse`,
30066
+ disabled: true
30067
+ },
30068
+ index
30069
+ )) : stages?.length > 0 && stages?.map((stage, index) => {
30061
30070
  const currentIndex = stages.findIndex((s) => s[dataKey] === activeStage);
30062
30071
  const isCompleted = isAllStagesCompleted || index < currentIndex;
30063
30072
  const isActive = !isAllStagesCompleted && index === currentIndex;
@@ -30066,7 +30075,7 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
30066
30075
  "button",
30067
30076
  {
30068
30077
  className: `
30069
- min-w-[120px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap
30078
+ min-w-[80px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap
30070
30079
  ${isActive ? "bg-green-700 text-white shadow-md" : isCompleted ? "bg-green-50 text-green-700 border border-green-700" : "bg-white text-gray-700 hover:bg-gray-100 border border-gray-200"}`,
30071
30080
  onClick: () => {
30072
30081
  if (isAllStagesCompleted) return;