@hyperbridge/ui 0.0.39 → 0.0.40
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 +2 -1
- package/dist/index.mjs +32 -29
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -445,8 +445,9 @@ declare function SwapReviewRoot(props: {
|
|
|
445
445
|
declare function SwapReviewSeperator(props: {
|
|
446
446
|
children: React__default.ReactNode;
|
|
447
447
|
}): react_jsx_runtime.JSX.Element;
|
|
448
|
+
type SwapSeperatorMode = "idle" | "processing" | "complete" | "refunding" | "refunded" | "expired" | "error";
|
|
448
449
|
declare function SwapReviewSeperatorStatus(props: {
|
|
449
|
-
mode:
|
|
450
|
+
mode: SwapSeperatorMode;
|
|
450
451
|
}): react_jsx_runtime.JSX.Element;
|
|
451
452
|
|
|
452
453
|
declare function Dialog({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
package/dist/index.mjs
CHANGED
|
@@ -3118,7 +3118,7 @@ var ReviewItemCopyAddressButton = React11.forwardRef((props, ref) => {
|
|
|
3118
3118
|
});
|
|
3119
3119
|
|
|
3120
3120
|
// src/components/molecules/swap-review-item.tsx
|
|
3121
|
-
import { Loader2Icon } from "lucide-react";
|
|
3121
|
+
import { CircleAlert, Loader2Icon } from "lucide-react";
|
|
3122
3122
|
import React12 from "react";
|
|
3123
3123
|
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3124
3124
|
function SwapReviewItem(props) {
|
|
@@ -3223,47 +3223,50 @@ function SwapReviewSeperator(props) {
|
|
|
3223
3223
|
}
|
|
3224
3224
|
function SwapReviewSeperatorStatus(props) {
|
|
3225
3225
|
const { mode } = props;
|
|
3226
|
-
const
|
|
3227
|
-
|
|
3226
|
+
const config = {
|
|
3227
|
+
idle: { label: "Swapped", tone: "default", icon: "none" },
|
|
3228
|
+
processing: { label: "Swapping", tone: "default", icon: "spinner" },
|
|
3229
|
+
complete: { label: "Swapped", tone: "success", icon: "check" },
|
|
3230
|
+
refunding: { label: "Refunding", tone: "default", icon: "spinner" },
|
|
3231
|
+
refunded: { label: "Refunded", tone: "success", icon: "check" },
|
|
3232
|
+
expired: { label: "Order expired", tone: "warning", icon: "alert" },
|
|
3233
|
+
error: { label: "Failed", tone: "error", icon: "alert" }
|
|
3234
|
+
};
|
|
3235
|
+
const state = config[mode];
|
|
3236
|
+
const hasIcon = state.icon !== "none";
|
|
3228
3237
|
return /* @__PURE__ */ jsxs22(
|
|
3229
3238
|
"span",
|
|
3230
3239
|
{
|
|
3231
3240
|
className: cn(
|
|
3232
|
-
"bg-[#1E2227] z-30
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3241
|
+
"bg-[#1E2227] z-30 relative flex items-center overflow-hidden rounded-full px-2.5 py-1.5 transition-all duration-[400ms] ease-fluid",
|
|
3242
|
+
hasIcon && "pr-6",
|
|
3243
|
+
state.tone === "warning" && "bg-brand-warning-500/15",
|
|
3244
|
+
state.tone === "error" && "bg-brand-danger-500/15"
|
|
3236
3245
|
),
|
|
3237
3246
|
children: [
|
|
3238
3247
|
/* @__PURE__ */ jsx32(
|
|
3239
3248
|
"span",
|
|
3240
3249
|
{
|
|
3241
|
-
className: cn(
|
|
3242
|
-
"text-
|
|
3243
|
-
|
|
3244
|
-
|
|
3250
|
+
className: cn(
|
|
3251
|
+
"text-xs",
|
|
3252
|
+
state.tone === "success" && "text-white",
|
|
3253
|
+
state.tone === "warning" && "text-brand-warning-500",
|
|
3254
|
+
state.tone === "error" && "text-brand-danger-500",
|
|
3255
|
+
(state.tone === "default" || mode === "idle") && "text-brand-black-100"
|
|
3256
|
+
),
|
|
3257
|
+
children: state.label
|
|
3245
3258
|
}
|
|
3246
3259
|
),
|
|
3247
|
-
/* @__PURE__ */ jsx32("span", { role: "presentation", className: "absolute end-2.5", children: /* @__PURE__ */ jsxs22("span", { className: "
|
|
3248
|
-
/* @__PURE__ */ jsx32(
|
|
3249
|
-
|
|
3260
|
+
hasIcon && /* @__PURE__ */ jsx32("span", { role: "presentation", className: "absolute end-2.5", children: /* @__PURE__ */ jsxs22("span", { className: "relative flex size-[1em] items-center justify-center text-[0.65625rem]", children: [
|
|
3261
|
+
state.icon === "spinner" && /* @__PURE__ */ jsx32(Loader2Icon, { className: "size-[1em] animate-spin" }),
|
|
3262
|
+
state.icon === "check" && /* @__PURE__ */ jsx32(Check_default, { className: "size-[1em] text-brand-success-400" }),
|
|
3263
|
+
state.icon === "alert" && /* @__PURE__ */ jsx32(
|
|
3264
|
+
CircleAlert,
|
|
3250
3265
|
{
|
|
3251
3266
|
className: cn(
|
|
3252
|
-
"
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
}
|
|
3256
|
-
)
|
|
3257
|
-
}
|
|
3258
|
-
),
|
|
3259
|
-
/* @__PURE__ */ jsx32(
|
|
3260
|
-
Check_default,
|
|
3261
|
-
{
|
|
3262
|
-
className: cn(
|
|
3263
|
-
"text-brand-success-400 opacity-0 transition-default -rotate-45 transform",
|
|
3264
|
-
{
|
|
3265
|
-
"opacity-100 rotate-0": mode === "complete"
|
|
3266
|
-
}
|
|
3267
|
+
"size-[1em]",
|
|
3268
|
+
state.tone === "warning" && "text-brand-warning-500",
|
|
3269
|
+
state.tone === "error" && "text-brand-danger-500"
|
|
3267
3270
|
)
|
|
3268
3271
|
}
|
|
3269
3272
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperbridge/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.40",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"typescript": "5.8.3",
|
|
34
34
|
"vite": "^6.3.4",
|
|
35
35
|
"vitest": "^3.1.2",
|
|
36
|
-
"@repo/
|
|
37
|
-
"@repo/
|
|
36
|
+
"@repo/typescript-config": "0.0.0",
|
|
37
|
+
"@repo/eslint-config": "0.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@radix-ui/react-dialog": "^1.1.14",
|