kaleido-ui 0.1.12 → 0.1.14
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/css/kaleido-ui.css +2 -0
- package/dist/native/index.cjs +1 -0
- package/dist/native/index.d.cts +1 -0
- package/dist/native/index.d.ts +1 -0
- package/dist/native/index.js +1 -0
- package/dist/tokens/index.cjs +1 -0
- package/dist/tokens/index.d.cts +1 -0
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.js +1 -0
- package/dist/web/index.cjs +54 -44
- package/dist/web/index.d.cts +4 -0
- package/dist/web/index.d.ts +4 -0
- package/dist/web/index.js +54 -44
- package/package.json +1 -1
package/dist/css/kaleido-ui.css
CHANGED
|
@@ -171,6 +171,8 @@
|
|
|
171
171
|
--font-sans: 'Satoshi', system-ui, -apple-system, sans-serif;
|
|
172
172
|
--font-display: 'Satoshi', system-ui, -apple-system, sans-serif;
|
|
173
173
|
--font-mono: 'Geist Mono', monospace;
|
|
174
|
+
--text-mini: 9px;
|
|
175
|
+
--text-mini--line-height: 12px;
|
|
174
176
|
--text-xxs: 10px;
|
|
175
177
|
--text-xxs--line-height: 14px;
|
|
176
178
|
--text-tiny: 11px;
|
package/dist/native/index.cjs
CHANGED
package/dist/native/index.d.cts
CHANGED
|
@@ -216,6 +216,7 @@ declare const fontFamily: {
|
|
|
216
216
|
* Type scale — [fontSize, lineHeight]
|
|
217
217
|
*/
|
|
218
218
|
declare const typeScale: {
|
|
219
|
+
readonly mini: readonly ["9px", "12px"];
|
|
219
220
|
readonly xxs: readonly ["10px", "14px"];
|
|
220
221
|
readonly tiny: readonly ["11px", "16px"];
|
|
221
222
|
readonly caption: readonly ["13px", "18px"];
|
package/dist/native/index.d.ts
CHANGED
|
@@ -216,6 +216,7 @@ declare const fontFamily: {
|
|
|
216
216
|
* Type scale — [fontSize, lineHeight]
|
|
217
217
|
*/
|
|
218
218
|
declare const typeScale: {
|
|
219
|
+
readonly mini: readonly ["9px", "12px"];
|
|
219
220
|
readonly xxs: readonly ["10px", "14px"];
|
|
220
221
|
readonly tiny: readonly ["11px", "16px"];
|
|
221
222
|
readonly caption: readonly ["13px", "18px"];
|
package/dist/native/index.js
CHANGED
package/dist/tokens/index.cjs
CHANGED
package/dist/tokens/index.d.cts
CHANGED
|
@@ -142,6 +142,7 @@ declare const fontFamily: {
|
|
|
142
142
|
* Type scale — [fontSize, lineHeight]
|
|
143
143
|
*/
|
|
144
144
|
declare const typeScale: {
|
|
145
|
+
readonly mini: readonly ["9px", "12px"];
|
|
145
146
|
readonly xxs: readonly ["10px", "14px"];
|
|
146
147
|
readonly tiny: readonly ["11px", "16px"];
|
|
147
148
|
readonly caption: readonly ["13px", "18px"];
|
package/dist/tokens/index.d.ts
CHANGED
|
@@ -142,6 +142,7 @@ declare const fontFamily: {
|
|
|
142
142
|
* Type scale — [fontSize, lineHeight]
|
|
143
143
|
*/
|
|
144
144
|
declare const typeScale: {
|
|
145
|
+
readonly mini: readonly ["9px", "12px"];
|
|
145
146
|
readonly xxs: readonly ["10px", "14px"];
|
|
146
147
|
readonly tiny: readonly ["11px", "16px"];
|
|
147
148
|
readonly caption: readonly ["13px", "18px"];
|
package/dist/tokens/index.js
CHANGED
package/dist/web/index.cjs
CHANGED
|
@@ -2062,7 +2062,7 @@ function FilterDropdown({
|
|
|
2062
2062
|
"span",
|
|
2063
2063
|
{
|
|
2064
2064
|
className: cn(
|
|
2065
|
-
"shrink-0 text-
|
|
2065
|
+
"shrink-0 text-mini font-bold uppercase tracking-wider",
|
|
2066
2066
|
isFiltered ? "text-muted-foreground" : "text-white/45"
|
|
2067
2067
|
),
|
|
2068
2068
|
children: label
|
|
@@ -4137,28 +4137,34 @@ function RouteChoiceCard({
|
|
|
4137
4137
|
recommended,
|
|
4138
4138
|
onClick
|
|
4139
4139
|
}) {
|
|
4140
|
+
const { disabled = false, disabledReason } = route;
|
|
4140
4141
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4141
4142
|
"button",
|
|
4142
4143
|
{
|
|
4143
4144
|
type: "button",
|
|
4144
4145
|
"data-testid": `withdraw-route-${route.account.toLowerCase()}`,
|
|
4145
4146
|
onClick,
|
|
4147
|
+
disabled,
|
|
4148
|
+
"aria-disabled": disabled,
|
|
4149
|
+
title: disabled ? disabledReason : void 0,
|
|
4146
4150
|
className: cn(
|
|
4147
4151
|
"w-full rounded-2xl border p-4 text-left transition-all",
|
|
4148
|
-
selected ? "border-primary/30 bg-primary/10" : "border-border bg-white/4 hover:border-white/20 hover:bg-white/6"
|
|
4152
|
+
disabled ? "cursor-not-allowed border-danger/15 bg-danger/5 opacity-60" : selected ? "border-primary/30 bg-primary/10" : "border-border bg-white/4 hover:border-white/20 hover:bg-white/6"
|
|
4149
4153
|
),
|
|
4150
4154
|
children: [
|
|
4151
4155
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
4152
4156
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
|
|
4153
4157
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
4154
4158
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-sm font-bold text-white", children: route.accountTitle }),
|
|
4155
|
-
recommended && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-primary", children: "Recommended" })
|
|
4159
|
+
recommended && !disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-primary", children: "Recommended" }),
|
|
4160
|
+
disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "rounded-full border border-danger/20 bg-danger/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-danger", children: "Insufficient" })
|
|
4156
4161
|
] }),
|
|
4157
4162
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-1 text-xs text-white/45", children: route.methodLabel })
|
|
4158
4163
|
] }),
|
|
4159
4164
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xxs font-bold uppercase tracking-wider text-white/35", children: route.feeHint })
|
|
4160
4165
|
] }),
|
|
4161
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-3 text-xs leading-relaxed text-muted-foreground", children: route.summary })
|
|
4166
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-3 text-xs leading-relaxed text-muted-foreground", children: route.summary }),
|
|
4167
|
+
disabled && disabledReason && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-2 text-xxs leading-relaxed text-danger/80", children: disabledReason })
|
|
4162
4168
|
]
|
|
4163
4169
|
}
|
|
4164
4170
|
);
|
|
@@ -6018,49 +6024,53 @@ function DepositInvoiceGeneration({
|
|
|
6018
6024
|
] })
|
|
6019
6025
|
}
|
|
6020
6026
|
),
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
{
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6027
|
+
(() => {
|
|
6028
|
+
const hideDestinationRail = isNewAsset && (network === "spark" || network === "arkade");
|
|
6029
|
+
if (hideDestinationRail) return null;
|
|
6030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex-shrink-0 border-b border-border bg-background px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "space-y-2", children: [
|
|
6031
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
6032
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/35", children: "Destination Account" }),
|
|
6033
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mt-1.5 flex gap-1.5 overflow-x-auto no-scrollbar", children: availableAccounts.map((account) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6034
|
+
AccountChoiceChip,
|
|
6035
|
+
{
|
|
6036
|
+
account,
|
|
6037
|
+
active: isBtc ? btcSelectedAccount === account : selectedAccount === account,
|
|
6038
|
+
onClick: () => {
|
|
6039
|
+
if (isBtc) {
|
|
6040
|
+
if (account === "SPARK") {
|
|
6041
|
+
setWalletChoice("SPARK");
|
|
6042
|
+
setNetwork("spark");
|
|
6043
|
+
} else if (account === "ARKADE") {
|
|
6044
|
+
setNetwork("arkade");
|
|
6045
|
+
setWalletChoice("RGB");
|
|
6046
|
+
} else {
|
|
6047
|
+
setWalletChoice("RGB");
|
|
6048
|
+
setNetwork("onchain");
|
|
6049
|
+
}
|
|
6037
6050
|
} else {
|
|
6038
|
-
|
|
6039
|
-
setNetwork("onchain");
|
|
6051
|
+
handleAccountSelect(account);
|
|
6040
6052
|
}
|
|
6041
|
-
} else {
|
|
6042
|
-
handleAccountSelect(account);
|
|
6043
6053
|
}
|
|
6044
|
-
}
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
] })
|
|
6063
|
-
|
|
6054
|
+
},
|
|
6055
|
+
account
|
|
6056
|
+
)) })
|
|
6057
|
+
] }),
|
|
6058
|
+
!isBtc && !(isNewAsset && (network === "spark" || network === "arkade")) && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
6059
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/35", children: "Transfer Method" }),
|
|
6060
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mt-1.5 flex gap-1.5 overflow-x-auto no-scrollbar", children: methodOptions.map(({ method, enabled, disabledReason }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6061
|
+
MethodChoiceChip,
|
|
6062
|
+
{
|
|
6063
|
+
method,
|
|
6064
|
+
active: currentMethod === method,
|
|
6065
|
+
enabled,
|
|
6066
|
+
disabledReason,
|
|
6067
|
+
onClick: () => enabled && applyMethodSelection(selectedAccount, method)
|
|
6068
|
+
},
|
|
6069
|
+
method
|
|
6070
|
+
)) })
|
|
6071
|
+
] })
|
|
6072
|
+
] }) });
|
|
6073
|
+
})(),
|
|
6064
6074
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ScrollArea, { className: "flex-1", viewportAs: "main", viewportClassName: "space-y-2.5 px-4 py-2.5", children: isBtc && accountReceiveResult ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6065
6075
|
BtcUnifiedReceive,
|
|
6066
6076
|
{
|
package/dist/web/index.d.cts
CHANGED
|
@@ -804,6 +804,10 @@ interface WithdrawRouteOption<TAccount extends string = string> {
|
|
|
804
804
|
accountTitle: string;
|
|
805
805
|
methodLabel: string;
|
|
806
806
|
feeHint: string;
|
|
807
|
+
/** When true, the route is unavailable (e.g. insufficient liquidity) and not clickable. */
|
|
808
|
+
disabled?: boolean;
|
|
809
|
+
/** Short reason shown under the disabled card. Pair with `disabled`. */
|
|
810
|
+
disabledReason?: string;
|
|
807
811
|
}
|
|
808
812
|
interface WithdrawRouteSummary {
|
|
809
813
|
method: string;
|
package/dist/web/index.d.ts
CHANGED
|
@@ -804,6 +804,10 @@ interface WithdrawRouteOption<TAccount extends string = string> {
|
|
|
804
804
|
accountTitle: string;
|
|
805
805
|
methodLabel: string;
|
|
806
806
|
feeHint: string;
|
|
807
|
+
/** When true, the route is unavailable (e.g. insufficient liquidity) and not clickable. */
|
|
808
|
+
disabled?: boolean;
|
|
809
|
+
/** Short reason shown under the disabled card. Pair with `disabled`. */
|
|
810
|
+
disabledReason?: string;
|
|
807
811
|
}
|
|
808
812
|
interface WithdrawRouteSummary {
|
|
809
813
|
method: string;
|
package/dist/web/index.js
CHANGED
|
@@ -1907,7 +1907,7 @@ function FilterDropdown({
|
|
|
1907
1907
|
"span",
|
|
1908
1908
|
{
|
|
1909
1909
|
className: cn(
|
|
1910
|
-
"shrink-0 text-
|
|
1910
|
+
"shrink-0 text-mini font-bold uppercase tracking-wider",
|
|
1911
1911
|
isFiltered ? "text-muted-foreground" : "text-white/45"
|
|
1912
1912
|
),
|
|
1913
1913
|
children: label
|
|
@@ -3982,28 +3982,34 @@ function RouteChoiceCard({
|
|
|
3982
3982
|
recommended,
|
|
3983
3983
|
onClick
|
|
3984
3984
|
}) {
|
|
3985
|
+
const { disabled = false, disabledReason } = route;
|
|
3985
3986
|
return /* @__PURE__ */ jsxs33(
|
|
3986
3987
|
"button",
|
|
3987
3988
|
{
|
|
3988
3989
|
type: "button",
|
|
3989
3990
|
"data-testid": `withdraw-route-${route.account.toLowerCase()}`,
|
|
3990
3991
|
onClick,
|
|
3992
|
+
disabled,
|
|
3993
|
+
"aria-disabled": disabled,
|
|
3994
|
+
title: disabled ? disabledReason : void 0,
|
|
3991
3995
|
className: cn(
|
|
3992
3996
|
"w-full rounded-2xl border p-4 text-left transition-all",
|
|
3993
|
-
selected ? "border-primary/30 bg-primary/10" : "border-border bg-white/4 hover:border-white/20 hover:bg-white/6"
|
|
3997
|
+
disabled ? "cursor-not-allowed border-danger/15 bg-danger/5 opacity-60" : selected ? "border-primary/30 bg-primary/10" : "border-border bg-white/4 hover:border-white/20 hover:bg-white/6"
|
|
3994
3998
|
),
|
|
3995
3999
|
children: [
|
|
3996
4000
|
/* @__PURE__ */ jsxs33("div", { className: "flex items-start justify-between gap-3", children: [
|
|
3997
4001
|
/* @__PURE__ */ jsxs33("div", { children: [
|
|
3998
4002
|
/* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
|
|
3999
4003
|
/* @__PURE__ */ jsx45("span", { className: "text-sm font-bold text-white", children: route.accountTitle }),
|
|
4000
|
-
recommended && /* @__PURE__ */ jsx45("span", { className: "rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-primary", children: "Recommended" })
|
|
4004
|
+
recommended && !disabled && /* @__PURE__ */ jsx45("span", { className: "rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-primary", children: "Recommended" }),
|
|
4005
|
+
disabled && /* @__PURE__ */ jsx45("span", { className: "rounded-full border border-danger/20 bg-danger/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-danger", children: "Insufficient" })
|
|
4001
4006
|
] }),
|
|
4002
4007
|
/* @__PURE__ */ jsx45("p", { className: "mt-1 text-xs text-white/45", children: route.methodLabel })
|
|
4003
4008
|
] }),
|
|
4004
4009
|
/* @__PURE__ */ jsx45("span", { className: "text-xxs font-bold uppercase tracking-wider text-white/35", children: route.feeHint })
|
|
4005
4010
|
] }),
|
|
4006
|
-
/* @__PURE__ */ jsx45("p", { className: "mt-3 text-xs leading-relaxed text-muted-foreground", children: route.summary })
|
|
4011
|
+
/* @__PURE__ */ jsx45("p", { className: "mt-3 text-xs leading-relaxed text-muted-foreground", children: route.summary }),
|
|
4012
|
+
disabled && disabledReason && /* @__PURE__ */ jsx45("p", { className: "mt-2 text-xxs leading-relaxed text-danger/80", children: disabledReason })
|
|
4007
4013
|
]
|
|
4008
4014
|
}
|
|
4009
4015
|
);
|
|
@@ -5863,49 +5869,53 @@ function DepositInvoiceGeneration({
|
|
|
5863
5869
|
] })
|
|
5864
5870
|
}
|
|
5865
5871
|
),
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
{
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5872
|
+
(() => {
|
|
5873
|
+
const hideDestinationRail = isNewAsset && (network === "spark" || network === "arkade");
|
|
5874
|
+
if (hideDestinationRail) return null;
|
|
5875
|
+
return /* @__PURE__ */ jsx59("div", { className: "flex-shrink-0 border-b border-border bg-background px-4 py-2", children: /* @__PURE__ */ jsxs46("div", { className: "space-y-2", children: [
|
|
5876
|
+
/* @__PURE__ */ jsxs46("div", { children: [
|
|
5877
|
+
/* @__PURE__ */ jsx59("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/35", children: "Destination Account" }),
|
|
5878
|
+
/* @__PURE__ */ jsx59("div", { className: "mt-1.5 flex gap-1.5 overflow-x-auto no-scrollbar", children: availableAccounts.map((account) => /* @__PURE__ */ jsx59(
|
|
5879
|
+
AccountChoiceChip,
|
|
5880
|
+
{
|
|
5881
|
+
account,
|
|
5882
|
+
active: isBtc ? btcSelectedAccount === account : selectedAccount === account,
|
|
5883
|
+
onClick: () => {
|
|
5884
|
+
if (isBtc) {
|
|
5885
|
+
if (account === "SPARK") {
|
|
5886
|
+
setWalletChoice("SPARK");
|
|
5887
|
+
setNetwork("spark");
|
|
5888
|
+
} else if (account === "ARKADE") {
|
|
5889
|
+
setNetwork("arkade");
|
|
5890
|
+
setWalletChoice("RGB");
|
|
5891
|
+
} else {
|
|
5892
|
+
setWalletChoice("RGB");
|
|
5893
|
+
setNetwork("onchain");
|
|
5894
|
+
}
|
|
5882
5895
|
} else {
|
|
5883
|
-
|
|
5884
|
-
setNetwork("onchain");
|
|
5896
|
+
handleAccountSelect(account);
|
|
5885
5897
|
}
|
|
5886
|
-
} else {
|
|
5887
|
-
handleAccountSelect(account);
|
|
5888
5898
|
}
|
|
5889
|
-
}
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
] })
|
|
5908
|
-
|
|
5899
|
+
},
|
|
5900
|
+
account
|
|
5901
|
+
)) })
|
|
5902
|
+
] }),
|
|
5903
|
+
!isBtc && !(isNewAsset && (network === "spark" || network === "arkade")) && /* @__PURE__ */ jsxs46("div", { children: [
|
|
5904
|
+
/* @__PURE__ */ jsx59("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/35", children: "Transfer Method" }),
|
|
5905
|
+
/* @__PURE__ */ jsx59("div", { className: "mt-1.5 flex gap-1.5 overflow-x-auto no-scrollbar", children: methodOptions.map(({ method, enabled, disabledReason }) => /* @__PURE__ */ jsx59(
|
|
5906
|
+
MethodChoiceChip,
|
|
5907
|
+
{
|
|
5908
|
+
method,
|
|
5909
|
+
active: currentMethod === method,
|
|
5910
|
+
enabled,
|
|
5911
|
+
disabledReason,
|
|
5912
|
+
onClick: () => enabled && applyMethodSelection(selectedAccount, method)
|
|
5913
|
+
},
|
|
5914
|
+
method
|
|
5915
|
+
)) })
|
|
5916
|
+
] })
|
|
5917
|
+
] }) });
|
|
5918
|
+
})(),
|
|
5909
5919
|
/* @__PURE__ */ jsx59(ScrollArea, { className: "flex-1", viewportAs: "main", viewportClassName: "space-y-2.5 px-4 py-2.5", children: isBtc && accountReceiveResult ? /* @__PURE__ */ jsx59(
|
|
5910
5920
|
BtcUnifiedReceive,
|
|
5911
5921
|
{
|
package/package.json
CHANGED