@algorithm-shift/design-system 1.2.998 → 1.3.101
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.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +38 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +37 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4853,6 +4853,34 @@ function showSonnerToast({
|
|
|
4853
4853
|
toast(title, options);
|
|
4854
4854
|
}
|
|
4855
4855
|
}
|
|
4856
|
+
function showConfirmToast({
|
|
4857
|
+
title,
|
|
4858
|
+
description,
|
|
4859
|
+
confirmLabel = "Confirm",
|
|
4860
|
+
cancelLabel = "Cancel"
|
|
4861
|
+
}) {
|
|
4862
|
+
return new Promise((resolve) => {
|
|
4863
|
+
const id = toast(title, {
|
|
4864
|
+
description,
|
|
4865
|
+
duration: Infinity,
|
|
4866
|
+
closeButton: false,
|
|
4867
|
+
action: {
|
|
4868
|
+
label: confirmLabel,
|
|
4869
|
+
onClick: () => {
|
|
4870
|
+
resolve(true);
|
|
4871
|
+
toast.dismiss(id);
|
|
4872
|
+
}
|
|
4873
|
+
},
|
|
4874
|
+
cancel: {
|
|
4875
|
+
label: cancelLabel,
|
|
4876
|
+
onClick: () => {
|
|
4877
|
+
resolve(false);
|
|
4878
|
+
toast.dismiss(id);
|
|
4879
|
+
}
|
|
4880
|
+
}
|
|
4881
|
+
});
|
|
4882
|
+
});
|
|
4883
|
+
}
|
|
4856
4884
|
|
|
4857
4885
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
4858
4886
|
import { Fragment as Fragment22, jsx as jsx59, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
@@ -5272,11 +5300,17 @@ var StagesComponent = ({
|
|
|
5272
5300
|
const currentIndex = stages.findIndex((s) => s[dataKey] === activeStage);
|
|
5273
5301
|
const isCompletedStage = isAllStagesCompleted || index <= currentIndex;
|
|
5274
5302
|
const isActive = !isAllStagesCompleted && index === currentIndex;
|
|
5275
|
-
let stageColor =
|
|
5303
|
+
let stageColor = "bg-green-50 text-green-700 border-2 border-green-700";
|
|
5304
|
+
if (stage.hasOwnProperty("isSuccess") && stage.isSuccess === false) {
|
|
5305
|
+
stageColor = "bg-red-50 text-red-700 border-2 border-red-700";
|
|
5306
|
+
}
|
|
5276
5307
|
let stageLabel = stage[dataLabel];
|
|
5277
5308
|
if (stage[dataKey] !== activeChildStage?.[dataKey] && activeRootStage?.[dataKey] === stage[dataKey]) {
|
|
5278
5309
|
stageLabel = activeChildStage?.[dataLabel] || stageLabel;
|
|
5279
|
-
stageColor =
|
|
5310
|
+
stageColor = "bg-green-50 text-green-700 border-2 border-green-700";
|
|
5311
|
+
if (activeChildStage.hasOwnProperty("isSuccess") && activeChildStage.isSuccess === false) {
|
|
5312
|
+
stageColor = "bg-red-50 text-red-700 border-2 border-red-700";
|
|
5313
|
+
}
|
|
5280
5314
|
}
|
|
5281
5315
|
const stageKey = typeof stage[dataKey] === "string" ? stage[dataKey] : JSON.stringify(stage[dataKey]);
|
|
5282
5316
|
return /* @__PURE__ */ jsx61(React11.Fragment, { children: /* @__PURE__ */ jsxs38(Tooltip, { delayDuration: 500, disableHoverableContent: true, children: [
|
|
@@ -6300,6 +6334,7 @@ export {
|
|
|
6300
6334
|
UrlInput_default as URL,
|
|
6301
6335
|
cn,
|
|
6302
6336
|
getInitials,
|
|
6337
|
+
showConfirmToast,
|
|
6303
6338
|
showSonnerToast
|
|
6304
6339
|
};
|
|
6305
6340
|
//# sourceMappingURL=index.mjs.map
|