@hyperbridge/ui 0.0.17 → 0.0.18

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 CHANGED
@@ -508,51 +508,61 @@ declare function ScrollAwareSeparator(props: React__default.ComponentProps<"div"
508
508
  }): react_jsx_runtime.JSX.Element;
509
509
 
510
510
  declare function Summary(props: {
511
- children: React.ReactNode;
511
+ children: React__default.ReactNode;
512
512
  }): react_jsx_runtime.JSX.Element;
513
513
  type SummaryEntryItem = {
514
514
  name: string;
515
515
  icon: ({ size }: {
516
516
  size: string | number;
517
- }) => React.ReactNode;
518
- children: React.ReactNode;
517
+ }) => React__default.ReactNode;
518
+ children: React__default.ReactNode;
519
+ tooltip?: React__default.ReactNode | string;
519
520
  };
520
- declare function makeEntry({ name, icon, }: Pick<SummaryEntryItem, "name" | "icon">): ({ children }: {
521
- children: React.ReactNode;
521
+ declare function makeEntry({ name, icon, tooltip, }: Pick<SummaryEntryItem, "name" | "icon" | "tooltip">): ({ children, tooltip: overwriteTooltip, }: {
522
+ tooltip: SummaryEntryItem["tooltip"];
523
+ children: React__default.ReactNode;
522
524
  }) => react_jsx_runtime.JSX.Element;
523
525
  declare const SummaryValues: {
524
526
  Key: {
525
- Bridge: ({ children }: {
526
- children: React.ReactNode;
527
+ Bridge: ({ children, tooltip: overwriteTooltip, }: {
528
+ tooltip: SummaryEntryItem["tooltip"];
529
+ children: React__default.ReactNode;
527
530
  }) => react_jsx_runtime.JSX.Element;
528
- GasEntry: ({ children }: {
529
- children: React.ReactNode;
531
+ GasEntry: ({ children, tooltip: overwriteTooltip, }: {
532
+ tooltip: SummaryEntryItem["tooltip"];
533
+ children: React__default.ReactNode;
530
534
  }) => react_jsx_runtime.JSX.Element;
531
- Rate: ({ children }: {
532
- children: React.ReactNode;
535
+ Rate: ({ children, tooltip: overwriteTooltip, }: {
536
+ tooltip: SummaryEntryItem["tooltip"];
537
+ children: React__default.ReactNode;
533
538
  }) => react_jsx_runtime.JSX.Element;
534
- SpillageTolerance: ({ children }: {
535
- children: React.ReactNode;
539
+ SpillageTolerance: ({ children, tooltip: overwriteTooltip, }: {
540
+ tooltip: SummaryEntryItem["tooltip"];
541
+ children: React__default.ReactNode;
536
542
  }) => react_jsx_runtime.JSX.Element;
537
- Route: ({ children }: {
538
- children: React.ReactNode;
543
+ Route: ({ children, tooltip: overwriteTooltip, }: {
544
+ tooltip: SummaryEntryItem["tooltip"];
545
+ children: React__default.ReactNode;
539
546
  }) => react_jsx_runtime.JSX.Element;
540
- ETA: ({ children }: {
541
- children: React.ReactNode;
547
+ ETA: ({ children, tooltip: overwriteTooltip, }: {
548
+ tooltip: SummaryEntryItem["tooltip"];
549
+ children: React__default.ReactNode;
542
550
  }) => react_jsx_runtime.JSX.Element;
543
- RecipientAddress: ({ children }: {
544
- children: React.ReactNode;
551
+ RecipientAddress: ({ children, tooltip: overwriteTooltip, }: {
552
+ tooltip: SummaryEntryItem["tooltip"];
553
+ children: React__default.ReactNode;
545
554
  }) => react_jsx_runtime.JSX.Element;
546
- Fee: ({ children }: {
547
- children: React.ReactNode;
555
+ Fee: ({ children, tooltip: overwriteTooltip, }: {
556
+ tooltip: SummaryEntryItem["tooltip"];
557
+ children: React__default.ReactNode;
548
558
  }) => react_jsx_runtime.JSX.Element;
549
559
  };
550
560
  Values: {
551
561
  Highlight: ({ children }: {
552
- children: React.ReactNode;
562
+ children: React__default.ReactNode;
553
563
  }) => react_jsx_runtime.JSX.Element;
554
564
  Soft: ({ children }: {
555
- children: React.ReactNode;
565
+ children: React__default.ReactNode;
556
566
  }) => react_jsx_runtime.JSX.Element;
557
567
  };
558
568
  };
package/dist/index.mjs CHANGED
@@ -3131,58 +3131,133 @@ function WalletManagerUIContent({
3131
3131
  }
3132
3132
 
3133
3133
  // src/components/molecules/summary.tsx
3134
+ import { InfoIcon } from "lucide-react";
3135
+
3136
+ // src/@/ui/tooltip.tsx
3137
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3134
3138
  import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
3139
+ function TooltipProvider(_a) {
3140
+ var _b = _a, {
3141
+ delayDuration = 0
3142
+ } = _b, props = __objRest(_b, [
3143
+ "delayDuration"
3144
+ ]);
3145
+ return /* @__PURE__ */ jsx33(
3146
+ TooltipPrimitive.Provider,
3147
+ __spreadValues({
3148
+ "data-slot": "tooltip-provider",
3149
+ delayDuration
3150
+ }, props)
3151
+ );
3152
+ }
3153
+ function Tooltip(_a) {
3154
+ var props = __objRest(_a, []);
3155
+ return /* @__PURE__ */ jsx33(TooltipProvider, { children: /* @__PURE__ */ jsx33(TooltipPrimitive.Root, __spreadValues({ "data-slot": "tooltip" }, props)) });
3156
+ }
3157
+ function TooltipTrigger(_a) {
3158
+ var props = __objRest(_a, []);
3159
+ return /* @__PURE__ */ jsx33(TooltipPrimitive.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
3160
+ }
3161
+ function TooltipContent(_a) {
3162
+ var _b = _a, {
3163
+ className,
3164
+ sideOffset = 0,
3165
+ children
3166
+ } = _b, props = __objRest(_b, [
3167
+ "className",
3168
+ "sideOffset",
3169
+ "children"
3170
+ ]);
3171
+ return /* @__PURE__ */ jsx33(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs23(
3172
+ TooltipPrimitive.Content,
3173
+ __spreadProps(__spreadValues({
3174
+ "data-slot": "tooltip-content",
3175
+ sideOffset,
3176
+ className: cn(
3177
+ "bg-brand-black-600 text-brand-black-100 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
3178
+ className
3179
+ )
3180
+ }, props), {
3181
+ children: [
3182
+ children,
3183
+ /* @__PURE__ */ jsx33(TooltipPrimitive.Arrow, { className: "bg-brand-black-600 fill-brand-black-600 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
3184
+ ]
3185
+ })
3186
+ ) });
3187
+ }
3188
+
3189
+ // src/components/molecules/summary.tsx
3190
+ import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
3135
3191
  function Summary(props) {
3136
- return /* @__PURE__ */ jsx33("div", { className: "flex flex-col gap-2 text-brand-black-100", children: props.children });
3192
+ return /* @__PURE__ */ jsx34("div", { className: "flex flex-col gap-2 text-brand-black-100", children: props.children });
3137
3193
  }
3138
3194
  function SummaryEntry(props) {
3195
+ var _a;
3139
3196
  const Icon = props.icon;
3140
- return /* @__PURE__ */ jsxs23("div", { className: "flex select-none items-center text-[calc(12rem/16)] font-medium", children: [
3141
- /* @__PURE__ */ jsxs23("dt", { className: "flex-1 gap-1 flex items-center", children: [
3142
- /* @__PURE__ */ jsx33(Icon, { size: "1.16em" }),
3143
- /* @__PURE__ */ jsx33("span", { className: "text-[1em] leading-[1rem]", children: props.name })
3197
+ const tooltip = typeof props.tooltip === "string" ? /* @__PURE__ */ jsxs24(Tooltip, { children: [
3198
+ /* @__PURE__ */ jsx34(TooltipTrigger, { children: /* @__PURE__ */ jsx34(InfoIcon, { size: "1em" }) }),
3199
+ /* @__PURE__ */ jsx34(TooltipContent, { children: props.tooltip })
3200
+ ] }) : (_a = props.tooltip) != null ? _a : null;
3201
+ return /* @__PURE__ */ jsxs24("div", { className: "flex select-none items-center text-[calc(12rem/16)] font-medium", children: [
3202
+ /* @__PURE__ */ jsxs24("dt", { className: "flex-1 gap-1 flex items-center", children: [
3203
+ /* @__PURE__ */ jsx34(Icon, { size: "1.16em" }),
3204
+ /* @__PURE__ */ jsx34("span", { className: "text-[1em] leading-[1rem]", children: props.name }),
3205
+ tooltip
3144
3206
  ] }),
3145
- /* @__PURE__ */ jsx33("dd", { children: props.children })
3207
+ /* @__PURE__ */ jsx34("dd", { children: props.children })
3146
3208
  ] });
3147
3209
  }
3148
3210
  function makeEntry({
3149
3211
  name,
3150
- icon
3212
+ icon,
3213
+ tooltip
3151
3214
  }) {
3152
- return function Entry({ children }) {
3153
- return /* @__PURE__ */ jsx33(SummaryEntry, { icon, name, children }, name);
3215
+ return function Entry({
3216
+ children,
3217
+ tooltip: overwriteTooltip
3218
+ }) {
3219
+ return /* @__PURE__ */ jsx34(
3220
+ SummaryEntry,
3221
+ {
3222
+ icon,
3223
+ name,
3224
+ tooltip: overwriteTooltip || tooltip,
3225
+ children
3226
+ },
3227
+ name
3228
+ );
3154
3229
  };
3155
3230
  }
3156
3231
  var Bridge = makeEntry({
3157
- icon: ({ size }) => /* @__PURE__ */ jsx33(Percent_default, { width: size }),
3232
+ icon: ({ size }) => /* @__PURE__ */ jsx34(Percent_default, { width: size }),
3158
3233
  name: "Bridge fee"
3159
3234
  });
3160
3235
  var RecipientAddress = makeEntry({
3161
- icon: ({ size }) => /* @__PURE__ */ jsx33(Wallet_default, { width: size }),
3236
+ icon: ({ size }) => /* @__PURE__ */ jsx34(Wallet_default, { width: size }),
3162
3237
  name: "Recipient Address"
3163
3238
  });
3164
3239
  var GasEntry = makeEntry({
3165
- icon: ({ size }) => /* @__PURE__ */ jsx33(Gas_default, { width: size }),
3240
+ icon: ({ size }) => /* @__PURE__ */ jsx34(Gas_default, { width: size }),
3166
3241
  name: "Gas costs"
3167
3242
  });
3168
3243
  var SpillageTolerance = makeEntry({
3169
- icon: ({ size }) => /* @__PURE__ */ jsx33(ArrowBottomTop_default, { width: size }),
3244
+ icon: ({ size }) => /* @__PURE__ */ jsx34(ArrowBottomTop_default, { width: size }),
3170
3245
  name: "Spillage tolerance"
3171
3246
  });
3172
3247
  var Route = makeEntry({
3173
- icon: ({ size }) => /* @__PURE__ */ jsx33(ArrowSplit_default, { width: size }),
3248
+ icon: ({ size }) => /* @__PURE__ */ jsx34(ArrowSplit_default, { width: size }),
3174
3249
  name: "Route"
3175
3250
  });
3176
3251
  var Rate = makeEntry({
3177
- icon: ({ size }) => /* @__PURE__ */ jsx33(ArrowBottomTop_default, { width: size }),
3252
+ icon: ({ size }) => /* @__PURE__ */ jsx34(ArrowBottomTop_default, { width: size }),
3178
3253
  name: "Rate"
3179
3254
  });
3180
3255
  var Fee = makeEntry({
3181
- icon: ({ size }) => /* @__PURE__ */ jsx33(Gas_default, { width: size }),
3256
+ icon: ({ size }) => /* @__PURE__ */ jsx34(Gas_default, { width: size }),
3182
3257
  name: "Fee"
3183
3258
  });
3184
3259
  var ETA = makeEntry({
3185
- icon: ({ size }) => /* @__PURE__ */ jsx33(Clock_default, { width: size }),
3260
+ icon: ({ size }) => /* @__PURE__ */ jsx34(Clock_default, { width: size }),
3186
3261
  name: "Estimated time"
3187
3262
  });
3188
3263
  var SummaryValues = {
@@ -3198,10 +3273,10 @@ var SummaryValues = {
3198
3273
  },
3199
3274
  Values: {
3200
3275
  Highlight: ({ children }) => {
3201
- return /* @__PURE__ */ jsx33("span", { className: "text-[inherit] text-brand-white-500", children });
3276
+ return /* @__PURE__ */ jsx34("span", { className: "text-[inherit] text-brand-white-500", children });
3202
3277
  },
3203
3278
  Soft: ({ children }) => {
3204
- return /* @__PURE__ */ jsx33("span", { className: "text-[inherit]text-brand-black-50", children });
3279
+ return /* @__PURE__ */ jsx34("span", { className: "text-[inherit]text-brand-black-50", children });
3205
3280
  }
3206
3281
  }
3207
3282
  };
@@ -3214,7 +3289,7 @@ import React13 from "react";
3214
3289
 
3215
3290
  // src/@/ui/progress.tsx
3216
3291
  import * as ProgressPrimitive from "@radix-ui/react-progress";
3217
- import { jsx as jsx34 } from "react/jsx-runtime";
3292
+ import { jsx as jsx35 } from "react/jsx-runtime";
3218
3293
  function Progress(_a) {
3219
3294
  var _b = _a, {
3220
3295
  className,
@@ -3223,7 +3298,7 @@ function Progress(_a) {
3223
3298
  "className",
3224
3299
  "value"
3225
3300
  ]);
3226
- return /* @__PURE__ */ jsx34(
3301
+ return /* @__PURE__ */ jsx35(
3227
3302
  ProgressPrimitive.Root,
3228
3303
  __spreadProps(__spreadValues({
3229
3304
  "data-slot": "progress",
@@ -3232,7 +3307,7 @@ function Progress(_a) {
3232
3307
  className
3233
3308
  )
3234
3309
  }, props), {
3235
- children: /* @__PURE__ */ jsx34(
3310
+ children: /* @__PURE__ */ jsx35(
3236
3311
  ProgressPrimitive.Indicator,
3237
3312
  {
3238
3313
  "data-slot": "progress-indicator",
@@ -3244,59 +3319,6 @@ function Progress(_a) {
3244
3319
  );
3245
3320
  }
3246
3321
 
3247
- // src/@/ui/tooltip.tsx
3248
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3249
- import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
3250
- function TooltipProvider(_a) {
3251
- var _b = _a, {
3252
- delayDuration = 0
3253
- } = _b, props = __objRest(_b, [
3254
- "delayDuration"
3255
- ]);
3256
- return /* @__PURE__ */ jsx35(
3257
- TooltipPrimitive.Provider,
3258
- __spreadValues({
3259
- "data-slot": "tooltip-provider",
3260
- delayDuration
3261
- }, props)
3262
- );
3263
- }
3264
- function Tooltip(_a) {
3265
- var props = __objRest(_a, []);
3266
- return /* @__PURE__ */ jsx35(TooltipProvider, { children: /* @__PURE__ */ jsx35(TooltipPrimitive.Root, __spreadValues({ "data-slot": "tooltip" }, props)) });
3267
- }
3268
- function TooltipTrigger(_a) {
3269
- var props = __objRest(_a, []);
3270
- return /* @__PURE__ */ jsx35(TooltipPrimitive.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
3271
- }
3272
- function TooltipContent(_a) {
3273
- var _b = _a, {
3274
- className,
3275
- sideOffset = 0,
3276
- children
3277
- } = _b, props = __objRest(_b, [
3278
- "className",
3279
- "sideOffset",
3280
- "children"
3281
- ]);
3282
- return /* @__PURE__ */ jsx35(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs24(
3283
- TooltipPrimitive.Content,
3284
- __spreadProps(__spreadValues({
3285
- "data-slot": "tooltip-content",
3286
- sideOffset,
3287
- className: cn(
3288
- "bg-brand-black-600 text-brand-black-100 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
3289
- className
3290
- )
3291
- }, props), {
3292
- children: [
3293
- children,
3294
- /* @__PURE__ */ jsx35(TooltipPrimitive.Arrow, { className: "bg-brand-black-600 fill-brand-black-600 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
3295
- ]
3296
- })
3297
- ) });
3298
- }
3299
-
3300
3322
  // src/components/molecules/timeline.tsx
3301
3323
  import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
3302
3324
  var StatusTextMap = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperbridge/ui",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
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/eslint-config": "0.0.0",
37
- "@repo/typescript-config": "0.0.0"
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",