@algorithm-shift/design-system 1.2.88 → 1.2.90
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/client.js +42 -9
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +42 -9
- package/dist/client.mjs.map +1 -1
- package/dist/index.css +6 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -27891,6 +27891,7 @@ function LazySelectDropdown({
|
|
|
27891
27891
|
onMouseDown: (e) => e.stopPropagation(),
|
|
27892
27892
|
className: "absolute z-[900] w-fit mt-1 bg-white border border-gray-300 rounded-lg shadow-lg max-h-60 overflow-y-auto",
|
|
27893
27893
|
style: {
|
|
27894
|
+
zIndex: 900,
|
|
27894
27895
|
width: dropdownRef.current?.offsetWidth,
|
|
27895
27896
|
top: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().bottom + window.scrollY : 0,
|
|
27896
27897
|
left: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().left + window.scrollX : 0
|
|
@@ -30037,7 +30038,7 @@ var Tabs_default = Tabs;
|
|
|
30037
30038
|
// src/components/Navigation/Stages/Stages.tsx
|
|
30038
30039
|
import React10, { useState as useState9 } from "react";
|
|
30039
30040
|
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" }) => {
|
|
30041
|
+
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage, dataKey = "key", dataLabel = "header", loading }) => {
|
|
30041
30042
|
const [activeStage, setActiveStage] = useState9(currentStage || (stages && stages.length > 0 ? stages[0].key : null));
|
|
30042
30043
|
const nextStage = () => {
|
|
30043
30044
|
if (!stages || stages.length === 0) return;
|
|
@@ -30057,7 +30058,16 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
|
|
|
30057
30058
|
const isAllStagesCompleted = activeStage === lastStage;
|
|
30058
30059
|
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
30060
|
/* @__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:
|
|
30061
|
+
/* @__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(
|
|
30062
|
+
"button",
|
|
30063
|
+
{
|
|
30064
|
+
className: `
|
|
30065
|
+
min-w-[80px] min-h-[35px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap
|
|
30066
|
+
text-gray-700 hover:bg-gray-100 border border-gray-200 bg-gray-100 animate-pulse`,
|
|
30067
|
+
disabled: true
|
|
30068
|
+
},
|
|
30069
|
+
index
|
|
30070
|
+
)) : stages?.length > 0 && stages?.map((stage, index) => {
|
|
30061
30071
|
const currentIndex = stages.findIndex((s) => s[dataKey] === activeStage);
|
|
30062
30072
|
const isCompleted = isAllStagesCompleted || index < currentIndex;
|
|
30063
30073
|
const isActive = !isAllStagesCompleted && index === currentIndex;
|
|
@@ -30066,7 +30076,7 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
|
|
|
30066
30076
|
"button",
|
|
30067
30077
|
{
|
|
30068
30078
|
className: `
|
|
30069
|
-
min-w-[
|
|
30079
|
+
min-w-[80px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap
|
|
30070
30080
|
${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
30081
|
onClick: () => {
|
|
30072
30082
|
if (isAllStagesCompleted) return;
|