@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.d.mts
CHANGED
|
@@ -145,6 +145,7 @@ interface StagesProps extends ElementProps {
|
|
|
145
145
|
currentStage?: string;
|
|
146
146
|
dataKey?: string;
|
|
147
147
|
dataLabel?: string;
|
|
148
|
+
loading?: boolean;
|
|
148
149
|
}
|
|
149
150
|
|
|
150
151
|
type ButtonProps = ElementProps & React.ComponentProps<"button"> & {
|
|
@@ -377,7 +378,7 @@ declare const CustomPagination: ({ totalPages, currentPage, onPageChange, maxVis
|
|
|
377
378
|
|
|
378
379
|
declare const Tabs: ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuilder, source, parentKey, menuNameKey, menuUrlKey, loading }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
379
380
|
|
|
380
|
-
declare const StagesComponent: ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage, dataKey, dataLabel }: StagesProps) => react_jsx_runtime.JSX.Element;
|
|
381
|
+
declare const StagesComponent: ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage, dataKey, dataLabel, loading }: StagesProps) => react_jsx_runtime.JSX.Element;
|
|
381
382
|
|
|
382
383
|
declare const Spacer: ({ className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
|
|
383
384
|
|
package/dist/index.d.ts
CHANGED
|
@@ -145,6 +145,7 @@ interface StagesProps extends ElementProps {
|
|
|
145
145
|
currentStage?: string;
|
|
146
146
|
dataKey?: string;
|
|
147
147
|
dataLabel?: string;
|
|
148
|
+
loading?: boolean;
|
|
148
149
|
}
|
|
149
150
|
|
|
150
151
|
type ButtonProps = ElementProps & React.ComponentProps<"button"> & {
|
|
@@ -377,7 +378,7 @@ declare const CustomPagination: ({ totalPages, currentPage, onPageChange, maxVis
|
|
|
377
378
|
|
|
378
379
|
declare const Tabs: ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuilder, source, parentKey, menuNameKey, menuUrlKey, loading }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
379
380
|
|
|
380
|
-
declare const StagesComponent: ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage, dataKey, dataLabel }: StagesProps) => react_jsx_runtime.JSX.Element;
|
|
381
|
+
declare const StagesComponent: ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage, dataKey, dataLabel, loading }: StagesProps) => react_jsx_runtime.JSX.Element;
|
|
381
382
|
|
|
382
383
|
declare const Spacer: ({ className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
|
|
383
384
|
|
package/dist/index.js
CHANGED
|
@@ -27988,6 +27988,7 @@ function LazySelectDropdown({
|
|
|
27988
27988
|
onMouseDown: (e) => e.stopPropagation(),
|
|
27989
27989
|
className: "absolute z-[900] w-fit mt-1 bg-white border border-gray-300 rounded-lg shadow-lg max-h-60 overflow-y-auto",
|
|
27990
27990
|
style: {
|
|
27991
|
+
zIndex: 900,
|
|
27991
27992
|
width: dropdownRef.current?.offsetWidth,
|
|
27992
27993
|
top: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().bottom + window.scrollY : 0,
|
|
27993
27994
|
left: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().left + window.scrollX : 0
|
|
@@ -30128,7 +30129,7 @@ var Tabs_default = Tabs;
|
|
|
30128
30129
|
// src/components/Navigation/Stages/Stages.tsx
|
|
30129
30130
|
var import_react30 = __toESM(require("react"));
|
|
30130
30131
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
30131
|
-
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage, dataKey = "key", dataLabel = "header" }) => {
|
|
30132
|
+
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage, dataKey = "key", dataLabel = "header", loading }) => {
|
|
30132
30133
|
const [activeStage, setActiveStage] = (0, import_react30.useState)(currentStage || (stages && stages.length > 0 ? stages[0].key : null));
|
|
30133
30134
|
const nextStage = () => {
|
|
30134
30135
|
if (!stages || stages.length === 0) return;
|
|
@@ -30148,7 +30149,16 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
|
|
|
30148
30149
|
const isAllStagesCompleted = activeStage === lastStage;
|
|
30149
30150
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center justify-between bg-red p-2 rounded-lg border border-gray-200 w-full", children: [
|
|
30150
30151
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
|
|
30151
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children:
|
|
30152
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
30153
|
+
"button",
|
|
30154
|
+
{
|
|
30155
|
+
className: `
|
|
30156
|
+
min-w-[80px] min-h-[35px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap
|
|
30157
|
+
text-gray-700 hover:bg-gray-100 border border-gray-200 bg-gray-100 animate-pulse`,
|
|
30158
|
+
disabled: true
|
|
30159
|
+
},
|
|
30160
|
+
index
|
|
30161
|
+
)) : stages?.length > 0 && stages?.map((stage, index) => {
|
|
30152
30162
|
const currentIndex = stages.findIndex((s) => s[dataKey] === activeStage);
|
|
30153
30163
|
const isCompleted = isAllStagesCompleted || index < currentIndex;
|
|
30154
30164
|
const isActive = !isAllStagesCompleted && index === currentIndex;
|
|
@@ -30157,7 +30167,7 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
|
|
|
30157
30167
|
"button",
|
|
30158
30168
|
{
|
|
30159
30169
|
className: `
|
|
30160
|
-
min-w-[
|
|
30170
|
+
min-w-[80px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap
|
|
30161
30171
|
${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"}`,
|
|
30162
30172
|
onClick: () => {
|
|
30163
30173
|
if (isAllStagesCompleted) return;
|