kaleido-ui 0.1.23 → 0.1.25
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/web/index.cjs +36 -43
- package/dist/web/index.d.cts +5 -1
- package/dist/web/index.d.ts +5 -1
- package/dist/web/index.js +36 -43
- package/package.json +1 -1
package/dist/web/index.cjs
CHANGED
|
@@ -1146,56 +1146,29 @@ function NetworkBadge({
|
|
|
1146
1146
|
const content = children ?? (shouldShowLabel ? label : null);
|
|
1147
1147
|
const chipSize = size === "sm" ? "size-6" : "size-8";
|
|
1148
1148
|
const imageSize = size === "sm" ? "size-3.5" : "size-icon-lg";
|
|
1149
|
-
const renderGlyph = (className2) =>
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
"aria-hidden": true,
|
|
1157
|
-
children: "link"
|
|
1158
|
-
}
|
|
1159
|
-
);
|
|
1149
|
+
const renderGlyph = (className2) => network === "L1" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1150
|
+
"span",
|
|
1151
|
+
{
|
|
1152
|
+
className: cn("material-symbols-outlined leading-none", color, className2),
|
|
1153
|
+
style: { fontSize: size === "sm" ? 12 : 16 },
|
|
1154
|
+
"aria-hidden": true,
|
|
1155
|
+
children: "link"
|
|
1160
1156
|
}
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
src: `${iconBasePath}/rgb/rgb-logo.svg`,
|
|
1168
|
-
alt: "RGB",
|
|
1169
|
-
className: cn(innerGlyph, "object-contain", defaultIconClassName, iconClassName)
|
|
1170
|
-
}
|
|
1171
|
-
),
|
|
1172
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1173
|
-
"img",
|
|
1174
|
-
{
|
|
1175
|
-
src: `${iconBasePath}/lightning/lightning.svg`,
|
|
1176
|
-
alt: "Lightning",
|
|
1177
|
-
className: cn(innerGlyph, "object-contain", iconClassName)
|
|
1178
|
-
}
|
|
1179
|
-
)
|
|
1180
|
-
] });
|
|
1157
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1158
|
+
"img",
|
|
1159
|
+
{
|
|
1160
|
+
src: icon,
|
|
1161
|
+
alt: network,
|
|
1162
|
+
className: cn(className2, "object-contain", defaultIconClassName, iconClassName)
|
|
1181
1163
|
}
|
|
1182
|
-
|
|
1183
|
-
"img",
|
|
1184
|
-
{
|
|
1185
|
-
src: icon,
|
|
1186
|
-
alt: network,
|
|
1187
|
-
className: cn(className2, "object-contain", defaultIconClassName, iconClassName)
|
|
1188
|
-
}
|
|
1189
|
-
);
|
|
1190
|
-
};
|
|
1164
|
+
);
|
|
1191
1165
|
if (!content) {
|
|
1192
|
-
const isDualGlyph = network === "RGB-LN";
|
|
1193
1166
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1194
1167
|
"span",
|
|
1195
1168
|
{
|
|
1196
1169
|
className: cn(
|
|
1197
1170
|
"flex items-center justify-center rounded-full shadow-inner",
|
|
1198
|
-
|
|
1171
|
+
chipSize,
|
|
1199
1172
|
iconBg,
|
|
1200
1173
|
className
|
|
1201
1174
|
),
|
|
@@ -3323,6 +3296,8 @@ function SwapInputCard({
|
|
|
3323
3296
|
quoteFeeText,
|
|
3324
3297
|
quoteExpiresText,
|
|
3325
3298
|
quoteExpiresUrgent = false,
|
|
3299
|
+
quoteVenueText,
|
|
3300
|
+
quoteVenueTone = "primary",
|
|
3326
3301
|
warning,
|
|
3327
3302
|
submitLabel,
|
|
3328
3303
|
submitIcon,
|
|
@@ -3432,7 +3407,25 @@ function SwapInputCard({
|
|
|
3432
3407
|
] })
|
|
3433
3408
|
] })
|
|
3434
3409
|
] }),
|
|
3435
|
-
(quoteError || quoteRateText || quoteFeeText || quoteExpiresText) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "rounded-xl bg-card/60 p-3", children: quoteError ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-center text-xs text-danger", children: quoteError }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "space-y-1.5", children: [
|
|
3410
|
+
(quoteError || quoteRateText || quoteFeeText || quoteExpiresText || quoteVenueText) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "rounded-xl bg-card/60 p-3", children: quoteError ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-center text-xs text-danger", children: quoteError }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "space-y-1.5", children: [
|
|
3411
|
+
quoteVenueText && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-between text-xs", children: [
|
|
3412
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-white/40", children: "Provider" }),
|
|
3413
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "inline-flex items-center gap-1.5 font-medium text-white/65", children: [
|
|
3414
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3415
|
+
"span",
|
|
3416
|
+
{
|
|
3417
|
+
className: cn(
|
|
3418
|
+
"size-1.5 rounded-full",
|
|
3419
|
+
quoteVenueTone === "spark" && "bg-network-spark",
|
|
3420
|
+
quoteVenueTone === "info" && "bg-info",
|
|
3421
|
+
quoteVenueTone === "primary" && "bg-primary"
|
|
3422
|
+
),
|
|
3423
|
+
"aria-hidden": true
|
|
3424
|
+
}
|
|
3425
|
+
),
|
|
3426
|
+
quoteVenueText
|
|
3427
|
+
] })
|
|
3428
|
+
] }),
|
|
3436
3429
|
quoteRateText && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-between text-xs", children: [
|
|
3437
3430
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-white/40", children: "Rate" }),
|
|
3438
3431
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-medium text-white/65", children: quoteRateText })
|
package/dist/web/index.d.cts
CHANGED
|
@@ -616,6 +616,10 @@ interface SwapInputCardProps {
|
|
|
616
616
|
quoteFeeText?: string | null;
|
|
617
617
|
quoteExpiresText?: string | null;
|
|
618
618
|
quoteExpiresUrgent?: boolean;
|
|
619
|
+
/** Routing venue label shown next to the rate row (e.g. "KaleidoSwap"). */
|
|
620
|
+
quoteVenueText?: string | null;
|
|
621
|
+
/** Tone of the venue dot — primary for KaleidoSwap, info/spark for Flashnet. */
|
|
622
|
+
quoteVenueTone?: 'primary' | 'spark' | 'info';
|
|
619
623
|
warning?: string | null;
|
|
620
624
|
submitLabel: string;
|
|
621
625
|
/** Optional leading icon for the submit CTA (e.g. a Material-Symbols glyph). */
|
|
@@ -630,7 +634,7 @@ interface SwapInputCardProps {
|
|
|
630
634
|
onFlip: () => void;
|
|
631
635
|
onSubmit: () => void;
|
|
632
636
|
}
|
|
633
|
-
declare function SwapInputCard({ fromTicker, toTicker, fromInput, fromOptions, toOptions, categories, defaultActiveCategories, availableText, showMaxText, maxText, selectedPercentage, percentageDisabled, fromUnitLabel, fromUnitIsToggle, receiveAmount, receiveUnitLabel, isLoadingQuote, quoteError, quoteRateText, quoteFeeText, quoteExpiresText, quoteExpiresUrgent, warning, submitLabel, submitIcon, submitVariant, submitDisabled, onFromTickerChange, onToTickerChange, onFromInputChange, onPercentageClick, onToggleFromUnit, onFlip, onSubmit, }: SwapInputCardProps): react_jsx_runtime.JSX.Element;
|
|
637
|
+
declare function SwapInputCard({ fromTicker, toTicker, fromInput, fromOptions, toOptions, categories, defaultActiveCategories, availableText, showMaxText, maxText, selectedPercentage, percentageDisabled, fromUnitLabel, fromUnitIsToggle, receiveAmount, receiveUnitLabel, isLoadingQuote, quoteError, quoteRateText, quoteFeeText, quoteExpiresText, quoteExpiresUrgent, quoteVenueText, quoteVenueTone, warning, submitLabel, submitIcon, submitVariant, submitDisabled, onFromTickerChange, onToTickerChange, onFromInputChange, onPercentageClick, onToggleFromUnit, onFlip, onSubmit, }: SwapInputCardProps): react_jsx_runtime.JSX.Element;
|
|
634
638
|
|
|
635
639
|
interface ActivityListItem<TData = unknown> {
|
|
636
640
|
id: string;
|
package/dist/web/index.d.ts
CHANGED
|
@@ -616,6 +616,10 @@ interface SwapInputCardProps {
|
|
|
616
616
|
quoteFeeText?: string | null;
|
|
617
617
|
quoteExpiresText?: string | null;
|
|
618
618
|
quoteExpiresUrgent?: boolean;
|
|
619
|
+
/** Routing venue label shown next to the rate row (e.g. "KaleidoSwap"). */
|
|
620
|
+
quoteVenueText?: string | null;
|
|
621
|
+
/** Tone of the venue dot — primary for KaleidoSwap, info/spark for Flashnet. */
|
|
622
|
+
quoteVenueTone?: 'primary' | 'spark' | 'info';
|
|
619
623
|
warning?: string | null;
|
|
620
624
|
submitLabel: string;
|
|
621
625
|
/** Optional leading icon for the submit CTA (e.g. a Material-Symbols glyph). */
|
|
@@ -630,7 +634,7 @@ interface SwapInputCardProps {
|
|
|
630
634
|
onFlip: () => void;
|
|
631
635
|
onSubmit: () => void;
|
|
632
636
|
}
|
|
633
|
-
declare function SwapInputCard({ fromTicker, toTicker, fromInput, fromOptions, toOptions, categories, defaultActiveCategories, availableText, showMaxText, maxText, selectedPercentage, percentageDisabled, fromUnitLabel, fromUnitIsToggle, receiveAmount, receiveUnitLabel, isLoadingQuote, quoteError, quoteRateText, quoteFeeText, quoteExpiresText, quoteExpiresUrgent, warning, submitLabel, submitIcon, submitVariant, submitDisabled, onFromTickerChange, onToTickerChange, onFromInputChange, onPercentageClick, onToggleFromUnit, onFlip, onSubmit, }: SwapInputCardProps): react_jsx_runtime.JSX.Element;
|
|
637
|
+
declare function SwapInputCard({ fromTicker, toTicker, fromInput, fromOptions, toOptions, categories, defaultActiveCategories, availableText, showMaxText, maxText, selectedPercentage, percentageDisabled, fromUnitLabel, fromUnitIsToggle, receiveAmount, receiveUnitLabel, isLoadingQuote, quoteError, quoteRateText, quoteFeeText, quoteExpiresText, quoteExpiresUrgent, quoteVenueText, quoteVenueTone, warning, submitLabel, submitIcon, submitVariant, submitDisabled, onFromTickerChange, onToTickerChange, onFromInputChange, onPercentageClick, onToggleFromUnit, onFlip, onSubmit, }: SwapInputCardProps): react_jsx_runtime.JSX.Element;
|
|
634
638
|
|
|
635
639
|
interface ActivityListItem<TData = unknown> {
|
|
636
640
|
id: string;
|
package/dist/web/index.js
CHANGED
|
@@ -985,56 +985,29 @@ function NetworkBadge({
|
|
|
985
985
|
const content = children ?? (shouldShowLabel ? label : null);
|
|
986
986
|
const chipSize = size === "sm" ? "size-6" : "size-8";
|
|
987
987
|
const imageSize = size === "sm" ? "size-3.5" : "size-icon-lg";
|
|
988
|
-
const renderGlyph = (className2) =>
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
"aria-hidden": true,
|
|
996
|
-
children: "link"
|
|
997
|
-
}
|
|
998
|
-
);
|
|
988
|
+
const renderGlyph = (className2) => network === "L1" ? /* @__PURE__ */ jsx15(
|
|
989
|
+
"span",
|
|
990
|
+
{
|
|
991
|
+
className: cn("material-symbols-outlined leading-none", color, className2),
|
|
992
|
+
style: { fontSize: size === "sm" ? 12 : 16 },
|
|
993
|
+
"aria-hidden": true,
|
|
994
|
+
children: "link"
|
|
999
995
|
}
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
src: `${iconBasePath}/rgb/rgb-logo.svg`,
|
|
1007
|
-
alt: "RGB",
|
|
1008
|
-
className: cn(innerGlyph, "object-contain", defaultIconClassName, iconClassName)
|
|
1009
|
-
}
|
|
1010
|
-
),
|
|
1011
|
-
/* @__PURE__ */ jsx15(
|
|
1012
|
-
"img",
|
|
1013
|
-
{
|
|
1014
|
-
src: `${iconBasePath}/lightning/lightning.svg`,
|
|
1015
|
-
alt: "Lightning",
|
|
1016
|
-
className: cn(innerGlyph, "object-contain", iconClassName)
|
|
1017
|
-
}
|
|
1018
|
-
)
|
|
1019
|
-
] });
|
|
996
|
+
) : /* @__PURE__ */ jsx15(
|
|
997
|
+
"img",
|
|
998
|
+
{
|
|
999
|
+
src: icon,
|
|
1000
|
+
alt: network,
|
|
1001
|
+
className: cn(className2, "object-contain", defaultIconClassName, iconClassName)
|
|
1020
1002
|
}
|
|
1021
|
-
|
|
1022
|
-
"img",
|
|
1023
|
-
{
|
|
1024
|
-
src: icon,
|
|
1025
|
-
alt: network,
|
|
1026
|
-
className: cn(className2, "object-contain", defaultIconClassName, iconClassName)
|
|
1027
|
-
}
|
|
1028
|
-
);
|
|
1029
|
-
};
|
|
1003
|
+
);
|
|
1030
1004
|
if (!content) {
|
|
1031
|
-
const isDualGlyph = network === "RGB-LN";
|
|
1032
1005
|
return /* @__PURE__ */ jsx15(
|
|
1033
1006
|
"span",
|
|
1034
1007
|
{
|
|
1035
1008
|
className: cn(
|
|
1036
1009
|
"flex items-center justify-center rounded-full shadow-inner",
|
|
1037
|
-
|
|
1010
|
+
chipSize,
|
|
1038
1011
|
iconBg,
|
|
1039
1012
|
className
|
|
1040
1013
|
),
|
|
@@ -3168,6 +3141,8 @@ function SwapInputCard({
|
|
|
3168
3141
|
quoteFeeText,
|
|
3169
3142
|
quoteExpiresText,
|
|
3170
3143
|
quoteExpiresUrgent = false,
|
|
3144
|
+
quoteVenueText,
|
|
3145
|
+
quoteVenueTone = "primary",
|
|
3171
3146
|
warning,
|
|
3172
3147
|
submitLabel,
|
|
3173
3148
|
submitIcon,
|
|
@@ -3277,7 +3252,25 @@ function SwapInputCard({
|
|
|
3277
3252
|
] })
|
|
3278
3253
|
] })
|
|
3279
3254
|
] }),
|
|
3280
|
-
(quoteError || quoteRateText || quoteFeeText || quoteExpiresText) && /* @__PURE__ */ jsx35("div", { className: "rounded-xl bg-card/60 p-3", children: quoteError ? /* @__PURE__ */ jsx35("p", { className: "text-center text-xs text-danger", children: quoteError }) : /* @__PURE__ */ jsxs23("div", { className: "space-y-1.5", children: [
|
|
3255
|
+
(quoteError || quoteRateText || quoteFeeText || quoteExpiresText || quoteVenueText) && /* @__PURE__ */ jsx35("div", { className: "rounded-xl bg-card/60 p-3", children: quoteError ? /* @__PURE__ */ jsx35("p", { className: "text-center text-xs text-danger", children: quoteError }) : /* @__PURE__ */ jsxs23("div", { className: "space-y-1.5", children: [
|
|
3256
|
+
quoteVenueText && /* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between text-xs", children: [
|
|
3257
|
+
/* @__PURE__ */ jsx35("span", { className: "text-white/40", children: "Provider" }),
|
|
3258
|
+
/* @__PURE__ */ jsxs23("span", { className: "inline-flex items-center gap-1.5 font-medium text-white/65", children: [
|
|
3259
|
+
/* @__PURE__ */ jsx35(
|
|
3260
|
+
"span",
|
|
3261
|
+
{
|
|
3262
|
+
className: cn(
|
|
3263
|
+
"size-1.5 rounded-full",
|
|
3264
|
+
quoteVenueTone === "spark" && "bg-network-spark",
|
|
3265
|
+
quoteVenueTone === "info" && "bg-info",
|
|
3266
|
+
quoteVenueTone === "primary" && "bg-primary"
|
|
3267
|
+
),
|
|
3268
|
+
"aria-hidden": true
|
|
3269
|
+
}
|
|
3270
|
+
),
|
|
3271
|
+
quoteVenueText
|
|
3272
|
+
] })
|
|
3273
|
+
] }),
|
|
3281
3274
|
quoteRateText && /* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between text-xs", children: [
|
|
3282
3275
|
/* @__PURE__ */ jsx35("span", { className: "text-white/40", children: "Rate" }),
|
|
3283
3276
|
/* @__PURE__ */ jsx35("span", { className: "font-medium text-white/65", children: quoteRateText })
|
package/package.json
CHANGED