kaleido-ui 0.1.104 → 0.1.106
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 +160 -72
- package/dist/web/index.d.cts +34 -3
- package/dist/web/index.d.ts +34 -3
- package/dist/web/index.js +160 -72
- package/package.json +1 -1
package/dist/web/index.cjs
CHANGED
|
@@ -3807,6 +3807,8 @@ function AssetSelector({
|
|
|
3807
3807
|
options,
|
|
3808
3808
|
categories = [],
|
|
3809
3809
|
defaultActiveCategories,
|
|
3810
|
+
networks = [],
|
|
3811
|
+
quickAssets = [],
|
|
3810
3812
|
networkFilter,
|
|
3811
3813
|
venueFilter,
|
|
3812
3814
|
disabled,
|
|
@@ -3821,16 +3823,25 @@ function AssetSelector({
|
|
|
3821
3823
|
const [activeCategories, setActiveCategories] = (0, import_react11.useState)(
|
|
3822
3824
|
defaultActiveCategories ?? categories.map((category) => category.id)
|
|
3823
3825
|
);
|
|
3826
|
+
const [activeNetwork, setActiveNetwork] = (0, import_react11.useState)(null);
|
|
3827
|
+
const [networkMenuOpen, setNetworkMenuOpen] = (0, import_react11.useState)(false);
|
|
3828
|
+
const [activeQuickAsset, setActiveQuickAsset] = (0, import_react11.useState)(null);
|
|
3824
3829
|
const selectedKey = selectedId ?? selectedTicker;
|
|
3825
3830
|
const selected = options.find((option) => option.id === selectedKey) ?? options.find((option) => option.ticker === selectedTicker);
|
|
3826
3831
|
const selectedOptionId = selected?.id ?? selectedKey;
|
|
3827
3832
|
const hasCategoryFilters = categories.length > 0;
|
|
3833
|
+
const hasNetworkFilter = networks.length > 0;
|
|
3834
|
+
const hasQuickAssets = quickAssets.length > 0;
|
|
3835
|
+
const activeNetworkOption = networks.find((network) => network.id === activeNetwork) ?? null;
|
|
3828
3836
|
const filtered = options.filter((option) => {
|
|
3829
3837
|
const category = option.category ?? null;
|
|
3830
3838
|
const matchesCategory = !hasCategoryFilters || category === null || activeCategories.includes(category);
|
|
3831
3839
|
const matchesNetwork = !networkFilter || option.network === networkFilter;
|
|
3840
|
+
const matchesNetworkFilter = !activeNetwork || option.networkId == null || option.networkId === activeNetwork;
|
|
3841
|
+
const matchesQuickAsset = !activeQuickAsset || option.ticker.toUpperCase() === activeQuickAsset;
|
|
3832
3842
|
const matchesVenue = !venueFilter || option.venue === venueFilter;
|
|
3833
|
-
if (!matchesCategory || !matchesNetwork || !matchesVenue)
|
|
3843
|
+
if (!matchesCategory || !matchesNetwork || !matchesNetworkFilter || !matchesQuickAsset || !matchesVenue)
|
|
3844
|
+
return false;
|
|
3834
3845
|
if (!search) return true;
|
|
3835
3846
|
const searchValue = search.toLowerCase();
|
|
3836
3847
|
const matchesSearch = option.ticker.toLowerCase().includes(searchValue) || (option.name?.toLowerCase().includes(searchValue) ?? false) || (option.assetId?.toLowerCase().includes(searchValue) ?? false) || (option.network?.toLowerCase().includes(searchValue) ?? false) || (option.networkTag?.label.toLowerCase().includes(searchValue) ?? false) || (option.category?.toLowerCase().includes(searchValue) ?? false);
|
|
@@ -3847,6 +3858,140 @@ function AssetSelector({
|
|
|
3847
3858
|
disabled: option.id === disabledId || option.ticker === disabledTicker
|
|
3848
3859
|
}));
|
|
3849
3860
|
const categoryLabelById = new Map(categories.map((category) => [category.id, category.label]));
|
|
3861
|
+
const chipBaseClass = "shrink-0 rounded-full text-tiny font-bold uppercase tracking-wide shadow-inner transition-colors";
|
|
3862
|
+
const chipActiveClass = "bg-primary/[0.14] text-primary";
|
|
3863
|
+
const chipIdleClass = "bg-surface-card text-text-dimmed hover:text-white/75";
|
|
3864
|
+
const networkMark = (network) => network.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src: network.iconUrl, alt: "", className: "size-4 shrink-0 rounded-full" }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-muted text-xxs font-bold uppercase leading-none text-muted-foreground", children: network.label.charAt(0) });
|
|
3865
|
+
const networkFilterButton = hasNetworkFilter && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "relative shrink-0", children: [
|
|
3866
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3867
|
+
"button",
|
|
3868
|
+
{
|
|
3869
|
+
type: "button",
|
|
3870
|
+
onClick: () => setNetworkMenuOpen((value) => !value),
|
|
3871
|
+
className: cn(
|
|
3872
|
+
chipBaseClass,
|
|
3873
|
+
"flex items-center gap-1.5 py-1.5 pl-2 pr-2.5",
|
|
3874
|
+
activeNetworkOption || networkMenuOpen ? chipActiveClass : chipIdleClass
|
|
3875
|
+
),
|
|
3876
|
+
children: [
|
|
3877
|
+
activeNetworkOption ? networkMark(activeNetworkOption) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { name: "hub", size: "xs", className: "shrink-0" }),
|
|
3878
|
+
activeNetworkOption ? activeNetworkOption.label : "All",
|
|
3879
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3880
|
+
Icon,
|
|
3881
|
+
{
|
|
3882
|
+
name: "expand_more",
|
|
3883
|
+
size: "xs",
|
|
3884
|
+
className: cn(
|
|
3885
|
+
"shrink-0 transition-transform duration-200",
|
|
3886
|
+
networkMenuOpen && "rotate-180"
|
|
3887
|
+
)
|
|
3888
|
+
}
|
|
3889
|
+
)
|
|
3890
|
+
]
|
|
3891
|
+
}
|
|
3892
|
+
),
|
|
3893
|
+
networkMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "absolute right-0 top-full z-10 mt-1.5 w-48 overflow-hidden rounded-xl border border-white/[0.08] bg-popover shadow-popover", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "max-h-60 overflow-y-auto p-1", children: [
|
|
3894
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3895
|
+
"button",
|
|
3896
|
+
{
|
|
3897
|
+
type: "button",
|
|
3898
|
+
onClick: () => {
|
|
3899
|
+
setActiveNetwork(null);
|
|
3900
|
+
setNetworkMenuOpen(false);
|
|
3901
|
+
},
|
|
3902
|
+
className: cn(
|
|
3903
|
+
"flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-xs font-semibold transition-colors",
|
|
3904
|
+
activeNetwork === null ? "bg-primary/[0.14] text-primary" : "text-white/75 hover:bg-accent hover:text-white"
|
|
3905
|
+
),
|
|
3906
|
+
children: [
|
|
3907
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { name: "hub", size: "xs", className: "shrink-0" }),
|
|
3908
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children: "All networks" }),
|
|
3909
|
+
activeNetwork === null && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { name: "check", size: "xs", className: "shrink-0 text-primary" })
|
|
3910
|
+
]
|
|
3911
|
+
}
|
|
3912
|
+
),
|
|
3913
|
+
networks.map((network) => {
|
|
3914
|
+
const isActive = activeNetwork === network.id;
|
|
3915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3916
|
+
"button",
|
|
3917
|
+
{
|
|
3918
|
+
type: "button",
|
|
3919
|
+
onClick: () => {
|
|
3920
|
+
setActiveNetwork(network.id);
|
|
3921
|
+
setNetworkMenuOpen(false);
|
|
3922
|
+
},
|
|
3923
|
+
className: cn(
|
|
3924
|
+
"flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-xs font-semibold transition-colors",
|
|
3925
|
+
isActive ? "bg-primary/[0.14] text-primary" : "text-white/75 hover:bg-accent hover:text-white"
|
|
3926
|
+
),
|
|
3927
|
+
children: [
|
|
3928
|
+
networkMark(network),
|
|
3929
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children: network.label }),
|
|
3930
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { name: "check", size: "xs", className: "shrink-0 text-primary" })
|
|
3931
|
+
]
|
|
3932
|
+
},
|
|
3933
|
+
network.id
|
|
3934
|
+
);
|
|
3935
|
+
})
|
|
3936
|
+
] }) })
|
|
3937
|
+
] });
|
|
3938
|
+
const filterControls = (hasQuickAssets || hasCategoryFilters) && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
3939
|
+
hasQuickAssets && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "mt-3 flex flex-wrap items-center gap-1.5", children: quickAssets.map((quick) => {
|
|
3940
|
+
const tickerKey = quick.ticker.toUpperCase();
|
|
3941
|
+
const isActive = activeQuickAsset === tickerKey;
|
|
3942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3943
|
+
"button",
|
|
3944
|
+
{
|
|
3945
|
+
type: "button",
|
|
3946
|
+
onClick: () => setActiveQuickAsset(isActive ? null : tickerKey),
|
|
3947
|
+
className: cn(
|
|
3948
|
+
chipBaseClass,
|
|
3949
|
+
"flex items-center gap-1.5 py-1 pl-1.5 pr-2.5",
|
|
3950
|
+
isActive ? chipActiveClass : chipIdleClass
|
|
3951
|
+
),
|
|
3952
|
+
children: [
|
|
3953
|
+
quick.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src: quick.iconUrl, alt: "", className: "size-4 shrink-0 rounded-full" }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AssetIcon, { ticker: quick.ticker, size: 16, className: "shrink-0" }),
|
|
3954
|
+
quick.ticker
|
|
3955
|
+
]
|
|
3956
|
+
},
|
|
3957
|
+
tickerKey
|
|
3958
|
+
);
|
|
3959
|
+
}) }),
|
|
3960
|
+
hasCategoryFilters && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "mt-3 flex flex-wrap items-center gap-1.5", children: [
|
|
3961
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3962
|
+
"button",
|
|
3963
|
+
{
|
|
3964
|
+
type: "button",
|
|
3965
|
+
onClick: () => setActiveCategories(categories.map((category) => category.id)),
|
|
3966
|
+
className: cn(
|
|
3967
|
+
chipBaseClass,
|
|
3968
|
+
"px-2.5 py-1",
|
|
3969
|
+
activeCategories.length === categories.length ? chipActiveClass : chipIdleClass
|
|
3970
|
+
),
|
|
3971
|
+
children: "All"
|
|
3972
|
+
}
|
|
3973
|
+
),
|
|
3974
|
+
categories.map((category) => {
|
|
3975
|
+
const isActive = activeCategories.includes(category.id);
|
|
3976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3977
|
+
"button",
|
|
3978
|
+
{
|
|
3979
|
+
type: "button",
|
|
3980
|
+
onClick: () => setActiveCategories(
|
|
3981
|
+
(current) => current.includes(category.id) ? current.filter((value) => value !== category.id) : [...current, category.id]
|
|
3982
|
+
),
|
|
3983
|
+
className: cn(
|
|
3984
|
+
chipBaseClass,
|
|
3985
|
+
"px-2.5 py-1",
|
|
3986
|
+
isActive ? chipActiveClass : chipIdleClass
|
|
3987
|
+
),
|
|
3988
|
+
children: category.label
|
|
3989
|
+
},
|
|
3990
|
+
category.id
|
|
3991
|
+
);
|
|
3992
|
+
})
|
|
3993
|
+
] })
|
|
3994
|
+
] });
|
|
3850
3995
|
const renderAssetOption = (option, optionSelected, optionDisabled) => {
|
|
3851
3996
|
const optionCategoryLabel = option.categoryLabel || (option.category ? categoryLabelById.get(option.category) : void 0);
|
|
3852
3997
|
const hasNetworkBadge = Boolean(option.networkIconUrl || option.networkTag);
|
|
@@ -3915,6 +4060,7 @@ function AssetSelector({
|
|
|
3915
4060
|
const closePanel = () => {
|
|
3916
4061
|
setOpen(false);
|
|
3917
4062
|
setSearch("");
|
|
4063
|
+
setNetworkMenuOpen(false);
|
|
3918
4064
|
};
|
|
3919
4065
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "relative w-36 flex-shrink-0", children: [
|
|
3920
4066
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
@@ -3974,7 +4120,7 @@ function AssetSelector({
|
|
|
3974
4120
|
" available"
|
|
3975
4121
|
] })
|
|
3976
4122
|
] }),
|
|
3977
|
-
selected && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2 rounded-full bg-white/5 px-2.5 py-1", children: [
|
|
4123
|
+
networkFilterButton || selected && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2 rounded-full bg-white/5 px-2.5 py-1", children: [
|
|
3978
4124
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 18 }),
|
|
3979
4125
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-tiny font-semibold text-white", children: selected.ticker })
|
|
3980
4126
|
] })
|
|
@@ -4001,38 +4147,7 @@ function AssetSelector({
|
|
|
4001
4147
|
}
|
|
4002
4148
|
)
|
|
4003
4149
|
] }),
|
|
4004
|
-
|
|
4005
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4006
|
-
"button",
|
|
4007
|
-
{
|
|
4008
|
-
type: "button",
|
|
4009
|
-
onClick: () => setActiveCategories(categories.map((category) => category.id)),
|
|
4010
|
-
className: cn(
|
|
4011
|
-
"rounded-full px-2.5 py-1 text-tiny font-bold uppercase tracking-wide shadow-inner transition-colors",
|
|
4012
|
-
activeCategories.length === categories.length ? "bg-primary/[0.14] text-primary" : "bg-surface-card text-text-dimmed hover:text-white/75"
|
|
4013
|
-
),
|
|
4014
|
-
children: "All"
|
|
4015
|
-
}
|
|
4016
|
-
),
|
|
4017
|
-
categories.map((category) => {
|
|
4018
|
-
const isActive = activeCategories.includes(category.id);
|
|
4019
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4020
|
-
"button",
|
|
4021
|
-
{
|
|
4022
|
-
type: "button",
|
|
4023
|
-
onClick: () => setActiveCategories(
|
|
4024
|
-
(current) => current.includes(category.id) ? current.filter((value) => value !== category.id) : [...current, category.id]
|
|
4025
|
-
),
|
|
4026
|
-
className: cn(
|
|
4027
|
-
"rounded-full px-2.5 py-1 text-tiny font-bold uppercase tracking-wide shadow-inner transition-colors",
|
|
4028
|
-
isActive ? "bg-primary/[0.14] text-primary" : "bg-surface-card text-text-dimmed hover:text-white/75"
|
|
4029
|
-
),
|
|
4030
|
-
children: category.label
|
|
4031
|
-
},
|
|
4032
|
-
category.id
|
|
4033
|
-
);
|
|
4034
|
-
})
|
|
4035
|
-
] })
|
|
4150
|
+
filterControls
|
|
4036
4151
|
] }),
|
|
4037
4152
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "mx-4 h-px bg-white/[0.06]" }),
|
|
4038
4153
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ScrollArea, { className: "min-h-0 flex-1", viewportClassName: "max-h-[56vh] px-2 py-2 pb-6", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-col items-center gap-2 px-4 py-10 text-center text-sm text-white/30", children: [
|
|
@@ -4125,7 +4240,7 @@ function AssetSelector({
|
|
|
4125
4240
|
" available"
|
|
4126
4241
|
] })
|
|
4127
4242
|
] }),
|
|
4128
|
-
selected && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2 rounded-full bg-white/5 px-2.5 py-1", children: [
|
|
4243
|
+
networkFilterButton || selected && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2 rounded-full bg-white/5 px-2.5 py-1", children: [
|
|
4129
4244
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 18 }),
|
|
4130
4245
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-tiny font-semibold text-white", children: selected.ticker })
|
|
4131
4246
|
] })
|
|
@@ -4152,38 +4267,7 @@ function AssetSelector({
|
|
|
4152
4267
|
}
|
|
4153
4268
|
)
|
|
4154
4269
|
] }),
|
|
4155
|
-
|
|
4156
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4157
|
-
"button",
|
|
4158
|
-
{
|
|
4159
|
-
type: "button",
|
|
4160
|
-
onClick: () => setActiveCategories(categories.map((category) => category.id)),
|
|
4161
|
-
className: cn(
|
|
4162
|
-
"rounded-full px-2.5 py-1 text-tiny font-bold uppercase tracking-wide shadow-inner transition-colors",
|
|
4163
|
-
activeCategories.length === categories.length ? "bg-primary/[0.14] text-primary" : "bg-surface-card text-text-dimmed hover:text-white/75"
|
|
4164
|
-
),
|
|
4165
|
-
children: "All"
|
|
4166
|
-
}
|
|
4167
|
-
),
|
|
4168
|
-
categories.map((category) => {
|
|
4169
|
-
const isActive = activeCategories.includes(category.id);
|
|
4170
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4171
|
-
"button",
|
|
4172
|
-
{
|
|
4173
|
-
type: "button",
|
|
4174
|
-
onClick: () => setActiveCategories(
|
|
4175
|
-
(current) => current.includes(category.id) ? current.filter((value) => value !== category.id) : [...current, category.id]
|
|
4176
|
-
),
|
|
4177
|
-
className: cn(
|
|
4178
|
-
"rounded-full px-2.5 py-1 text-tiny font-bold uppercase tracking-wide shadow-inner transition-colors",
|
|
4179
|
-
isActive ? "bg-primary/[0.14] text-primary" : "bg-surface-card text-text-dimmed hover:text-white/75"
|
|
4180
|
-
),
|
|
4181
|
-
children: category.label
|
|
4182
|
-
},
|
|
4183
|
-
category.id
|
|
4184
|
-
);
|
|
4185
|
-
})
|
|
4186
|
-
] })
|
|
4270
|
+
filterControls
|
|
4187
4271
|
] })
|
|
4188
4272
|
] }),
|
|
4189
4273
|
renderOption: ({ option, selected: optionSelected, disabled: optionDisabled }) => {
|
|
@@ -4206,6 +4290,8 @@ function SwapInputCard({
|
|
|
4206
4290
|
toOptions,
|
|
4207
4291
|
categories,
|
|
4208
4292
|
defaultActiveCategories,
|
|
4293
|
+
fromNetworks,
|
|
4294
|
+
fromQuickAssets,
|
|
4209
4295
|
availableText,
|
|
4210
4296
|
showMaxText = false,
|
|
4211
4297
|
maxText,
|
|
@@ -4283,6 +4369,8 @@ function SwapInputCard({
|
|
|
4283
4369
|
options: fromOptions,
|
|
4284
4370
|
categories,
|
|
4285
4371
|
defaultActiveCategories,
|
|
4372
|
+
networks: fromNetworks,
|
|
4373
|
+
quickAssets: fromQuickAssets,
|
|
4286
4374
|
disabledId: toSelectedId,
|
|
4287
4375
|
onChange: onFromTickerChange
|
|
4288
4376
|
}
|
|
@@ -4733,12 +4821,12 @@ function ActivityNetworkFilters({
|
|
|
4733
4821
|
// src/web/components/activity-type-tabs.tsx
|
|
4734
4822
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
4735
4823
|
function ActivityTypeTabs({ counts = {} }) {
|
|
4736
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(TabsList, { className: "grid h-12 w-full grid-cols-4 gap-1 rounded-
|
|
4824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(TabsList, { className: "grid h-12 w-full grid-cols-4 gap-1 rounded-2xl bg-surface-card p-1 backdrop-blur-xl", children: [
|
|
4737
4825
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4738
4826
|
TabsTrigger,
|
|
4739
4827
|
{
|
|
4740
4828
|
value: "all",
|
|
4741
|
-
className: "h-full rounded-
|
|
4829
|
+
className: "h-full rounded-xl px-2 text-xs font-bold tracking-wide transition-all data-[state=active]:bg-surface-elevated data-[state=active]:text-white",
|
|
4742
4830
|
children: [
|
|
4743
4831
|
"All",
|
|
4744
4832
|
counts.all ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "ml-1 opacity-60", children: [
|
|
@@ -4753,7 +4841,7 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
4753
4841
|
TabsTrigger,
|
|
4754
4842
|
{
|
|
4755
4843
|
value: "received",
|
|
4756
|
-
className: "group h-full rounded-
|
|
4844
|
+
className: "group h-full rounded-xl px-1.5 text-xs font-bold tracking-wide transition-all hover:text-tx-receive data-[state=active]:bg-tx-receive/15 data-[state=active]:text-tx-receive data-[state=active]:hover:bg-tx-receive/20 data-[state=active]:hover:text-tx-receive",
|
|
4757
4845
|
children: [
|
|
4758
4846
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4759
4847
|
AppIcon,
|
|
@@ -4771,7 +4859,7 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
4771
4859
|
TabsTrigger,
|
|
4772
4860
|
{
|
|
4773
4861
|
value: "sent",
|
|
4774
|
-
className: "group h-full rounded-
|
|
4862
|
+
className: "group h-full rounded-xl px-1.5 text-xs font-bold tracking-wide transition-all hover:text-tx-sent data-[state=active]:bg-tx-sent/15 data-[state=active]:text-tx-sent data-[state=active]:hover:bg-tx-sent/20 data-[state=active]:hover:text-tx-sent",
|
|
4775
4863
|
children: [
|
|
4776
4864
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4777
4865
|
AppIcon,
|
|
@@ -4789,7 +4877,7 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
4789
4877
|
TabsTrigger,
|
|
4790
4878
|
{
|
|
4791
4879
|
value: "swaps",
|
|
4792
|
-
className: "group h-full rounded-
|
|
4880
|
+
className: "group h-full rounded-xl px-1.5 text-xs font-bold tracking-wide transition-all hover:text-network-arkade data-[state=active]:bg-network-arkade/15 data-[state=active]:text-network-arkade data-[state=active]:hover:bg-network-arkade/20 data-[state=active]:hover:text-network-arkade",
|
|
4793
4881
|
children: [
|
|
4794
4882
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4795
4883
|
AppIcon,
|
package/dist/web/index.d.cts
CHANGED
|
@@ -726,6 +726,8 @@ interface AssetSelectorOption {
|
|
|
726
726
|
assetId?: string;
|
|
727
727
|
category?: string | null;
|
|
728
728
|
categoryLabel?: string;
|
|
729
|
+
/** Network id matched against the network filter slider; options without one always pass. */
|
|
730
|
+
networkId?: string;
|
|
729
731
|
/** URL of the network mark rendered as a mini-badge over the asset icon. */
|
|
730
732
|
networkIconUrl?: string;
|
|
731
733
|
/** Right-aligned network tag: label pill tinted with `color`, ticker beneath. */
|
|
@@ -738,6 +740,19 @@ interface AssetSelectorCategory {
|
|
|
738
740
|
id: string;
|
|
739
741
|
label: string;
|
|
740
742
|
}
|
|
743
|
+
/** One entry of the single-select network filter slider inside the picker panel. */
|
|
744
|
+
interface AssetSelectorNetworkOption {
|
|
745
|
+
id: string;
|
|
746
|
+
label: string;
|
|
747
|
+
/** Network mark rendered inside the chip; falls back to a lettered dot. */
|
|
748
|
+
iconUrl?: string;
|
|
749
|
+
}
|
|
750
|
+
/** One entry of the quick-asset filter chips (e.g. BTC / USDT / USDC). */
|
|
751
|
+
interface AssetSelectorQuickAsset {
|
|
752
|
+
ticker: string;
|
|
753
|
+
/** Icon URL for the chip; falls back to AssetIcon's local/CDN resolution. */
|
|
754
|
+
iconUrl?: string;
|
|
755
|
+
}
|
|
741
756
|
interface AssetSelectorProps {
|
|
742
757
|
label: string;
|
|
743
758
|
selectedTicker: string;
|
|
@@ -745,6 +760,18 @@ interface AssetSelectorProps {
|
|
|
745
760
|
options: AssetSelectorOption[];
|
|
746
761
|
categories?: AssetSelectorCategory[];
|
|
747
762
|
defaultActiveCategories?: string[];
|
|
763
|
+
/**
|
|
764
|
+
* Single-select network filter rendered as a dropdown button in the panel's
|
|
765
|
+
* top-right corner ("All" by default). Selecting a network keeps only
|
|
766
|
+
* options whose `networkId` matches (options without a `networkId` always
|
|
767
|
+
* pass, mirroring the category convention).
|
|
768
|
+
*/
|
|
769
|
+
networks?: AssetSelectorNetworkOption[];
|
|
770
|
+
/**
|
|
771
|
+
* Quick-asset chips rendered under the search input. Pressing one narrows
|
|
772
|
+
* the list to that ticker; pressing it again clears the filter.
|
|
773
|
+
*/
|
|
774
|
+
quickAssets?: AssetSelectorQuickAsset[];
|
|
748
775
|
networkFilter?: NetworkType | null;
|
|
749
776
|
venueFilter?: string | null;
|
|
750
777
|
disabled?: boolean;
|
|
@@ -754,7 +781,7 @@ interface AssetSelectorProps {
|
|
|
754
781
|
onOpenPanelHeightChange?: (height: number) => void;
|
|
755
782
|
onChange: (id: string) => void;
|
|
756
783
|
}
|
|
757
|
-
declare function AssetSelector({ label, selectedTicker, selectedId, options, categories, defaultActiveCategories, networkFilter, venueFilter, disabled, disabledTicker, disabledId, compact, onOpenPanelHeightChange, onChange, }: AssetSelectorProps): react_jsx_runtime.JSX.Element;
|
|
784
|
+
declare function AssetSelector({ label, selectedTicker, selectedId, options, categories, defaultActiveCategories, networks, quickAssets, networkFilter, venueFilter, disabled, disabledTicker, disabledId, compact, onOpenPanelHeightChange, onChange, }: AssetSelectorProps): react_jsx_runtime.JSX.Element;
|
|
758
785
|
|
|
759
786
|
interface SwapInputCardProps {
|
|
760
787
|
fromTicker: string;
|
|
@@ -766,6 +793,10 @@ interface SwapInputCardProps {
|
|
|
766
793
|
toOptions: AssetSelectorOption[];
|
|
767
794
|
categories?: AssetSelectorCategory[];
|
|
768
795
|
defaultActiveCategories?: string[];
|
|
796
|
+
/** Network filter slider rendered inside the "You Pay" asset picker. */
|
|
797
|
+
fromNetworks?: AssetSelectorNetworkOption[];
|
|
798
|
+
/** Quick-asset chips rendered inside the "You Pay" asset picker. */
|
|
799
|
+
fromQuickAssets?: AssetSelectorQuickAsset[];
|
|
769
800
|
availableText: string;
|
|
770
801
|
showMaxText?: boolean;
|
|
771
802
|
maxText?: string;
|
|
@@ -804,7 +835,7 @@ interface SwapInputCardProps {
|
|
|
804
835
|
onFlip: () => void;
|
|
805
836
|
onSubmit: () => void;
|
|
806
837
|
}
|
|
807
|
-
declare function SwapInputCard({ fromTicker, toTicker, fromSelectedId, toSelectedId, fromInput, fromOptions, toOptions, categories, defaultActiveCategories, availableText, showMaxText, maxText, selectedPercentage, percentageDisabled, hidePercentages, oneWay, fromUnitLabel, fromDisplayUnit, fromUnitIsToggle, receiveAmount, receiveUnitLabel, receiveDisplayUnit, isLoadingQuote, quoteError, quoteRateText, quoteVenueText, quoteVenueTone, quoteFeeText, quoteExpiresText, quoteExpiresUrgent, warning, submitLabel, submitIcon, submitVariant, submitDisabled, onFromTickerChange, onToTickerChange, onFromInputChange, onPercentageClick, onToggleFromUnit, onFlip, onSubmit, }: SwapInputCardProps): react_jsx_runtime.JSX.Element;
|
|
838
|
+
declare function SwapInputCard({ fromTicker, toTicker, fromSelectedId, toSelectedId, fromInput, fromOptions, toOptions, categories, defaultActiveCategories, fromNetworks, fromQuickAssets, availableText, showMaxText, maxText, selectedPercentage, percentageDisabled, hidePercentages, oneWay, fromUnitLabel, fromDisplayUnit, fromUnitIsToggle, receiveAmount, receiveUnitLabel, receiveDisplayUnit, isLoadingQuote, quoteError, quoteRateText, quoteVenueText, quoteVenueTone, quoteFeeText, quoteExpiresText, quoteExpiresUrgent, warning, submitLabel, submitIcon, submitVariant, submitDisabled, onFromTickerChange, onToTickerChange, onFromInputChange, onPercentageClick, onToggleFromUnit, onFlip, onSubmit, }: SwapInputCardProps): react_jsx_runtime.JSX.Element;
|
|
808
839
|
|
|
809
840
|
interface ActivityListItem<TData = unknown> {
|
|
810
841
|
id: string;
|
|
@@ -1806,4 +1837,4 @@ declare function getFallbackAssetIconUrl(seed: string): string;
|
|
|
1806
1837
|
*/
|
|
1807
1838
|
declare function useAssetIcon(ticker: string, cdnBaseUrl?: string): string;
|
|
1808
1839
|
|
|
1809
|
-
export { AccountCapabilitiesCard, type AccountCapabilitiesCardProps, AccountChoiceChip, AccountHeaderIcons, AccountInfoGrid, AccountNetworkNotice, AccountNetworkPicker, AccountNetworkSelector, AccountNotice, type AccountSettingsNetwork, type AccountSettingsProtocol, AccountSettingsRow, AccountSettingsShell, AccountStatusPills, type AccountStatusTabItem, AccountStatusTabs, type AccountStatusTabsProps, ActionTile, type ActionTileProps, ActivityDetailRow, type ActivityDetailRowProps, ActivityFilterBar, type ActivityFilterBarProps, ActivityList, type ActivityListItem, type ActivityListProps, type ActivityNetworkFilterOption, type ActivityNetworkFilterValue, ActivityNetworkFilters, type ActivityNetworkFiltersProps, ActivityRow, type ActivityRowProps, type ActivityStatusOption, type ActivityTypeTabCounts, type ActivityTypeTabValue, ActivityTypeTabs, AlertBanner, type AmountDisplayOptions, type AmountDisplayUnit, AppIcon, type AppIconName, type AppIconProps, ArkadeNetworkIcon, AssetCard, type AssetCardProps, AssetIcon, AssetSelector, type AssetSelectorCategory, type AssetSelectorOption, type AssetSelectorProps, BalanceBreakdown, type BalanceBreakdownAccounts, type BalanceBreakdownAsset, type BalanceBreakdownNodeInfo, type BalanceBreakdownProps, BottomNav, type BottomNavItem, type BottomNavProps, BottomSheet, type BottomSheetAction, type BottomSheetProps, BtcUnifiedReceive, type BtcUnifiedReceiveAddress, type BtcUnifiedReceiveProps, type BtcUnifiedReceiveResult, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CopyIcon, type DepositAccountId, DepositAssetSelection, type DepositAssetSelectionProps, type DepositGeneratedAsset, DepositGeneratedView, type DepositGeneratedViewProps, type DepositGenerationController, type DepositInvoiceAsset, DepositInvoiceGeneration, type DepositInvoiceGenerationProps, type DepositNetworkConfigEntry, DepositNetworkDefaultModal, type DepositNetworkDefaultModalProps, type DepositNetworkKey, type DepositNetworkOption, DepositPreGeneration, type DepositPreGenerationAsset, type DepositPreGenerationProps, type DepositSelectionAsset, DepositSuccessScreen, type DepositSuccessScreenProps, type DepositTransferMethod, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisclosureCard, type DisclosureCardProps, DotPagination, type DotPaginationProps, type DotTone, ErrorBoundary, ErrorCard, type ErrorCardProps, ExpandIcon, ExtensionPageFrame, type ExtensionPageFrameProps, FadeOverlay, type FadeOverlayProps, FilterChipGroup, type FilterChipGroupProps, type FilterChipOption, FilterDropdown, type FilterDropdownOption, type FilterDropdownProps, HeadlineGradient, type HeadlineGradientProps, Icon, type IconName, type IconProps, Icons, InfoPanel, type InfoPanelProps, InlineAction, InlineSelector, type InlineSelectorOption, type InlineSelectorProps, Input, type InputProps, InvoiceStatusBanner, KaleidoScopeHeroAnimation, type KaleidoScopeHeroAnimationProps, Label, LightningNetworkIcon, LiquidNetworkIcon, ListSkeletonRows, type ListSkeletonRowsProps, LoadingCard, type LoadingCardProps, MethodChoiceChip, MetricCard, type MetricCardProps, MobileHeroAnimation, type MobileHeroAnimationProps, NETWORK_CONFIG, NetworkBadge, type NetworkBadgeProps, type NetworkIconProps, NetworkInfoDisclosure, NetworkStatusChip, type NetworkStatusChipProps, type NetworkType, NostrNetworkIcon, NumberInput, type NumberInputProps, OptionSelector, type OptionSelectorOption, type OptionSelectorProps, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, PaidOverlay, QrCode, type QrCodeProps, RecoveryPhraseCard, type RecoveryPhraseCardProps, RgbNetworkIcon, ScrollArea, type ScrollAreaProps, SecretRevealCard, type SecretRevealCardProps, SectionHeader, type SectionHeaderProps, SectionLabel, SectionTitle, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, type SelectableCardProps, SettingItem, SettingsActionButton, SettingsSectionCard, type SettingsSectionCardProps, SettingsSelectorRow, type SettingsSelectorRowProps, SettingsStatusPanel, SettingsTile, type SettingsTileProps, Skeleton, type SkeletonProps, type SkeletonTone, SparkNetworkIcon, StatusBadge, StatusIconBadge, type StatusIconBadgeProps, type StatusType, StepperNumberInput, type StepperNumberInputProps, SwapInputCard, type SwapInputCardProps, Switch, SwitchRow, type SwitchRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, ToneBadge, type ToneBadgeProps, TransactionCard, type TransactionCardProps, TransferRouteCard, WalletAssetList, type WalletAssetListEmptyState, type WalletAssetListItem, type WalletAssetListProps, type WithdrawAddressType, WithdrawAmountInput, type WithdrawAmountInputProps, WithdrawConfirmation, type WithdrawConfirmationProps, type WithdrawConfirmationRgbInvoice, type WithdrawDecodedLnInvoice, type WithdrawDecodedRgbInvoice, WithdrawDestinationInput, type WithdrawDestinationInputProps, type WithdrawInvoiceAsset, WithdrawInvoiceInfo, type WithdrawInvoiceInfoLnInvoice, type WithdrawInvoiceInfoProps, type WithdrawInvoiceInfoRgbInvoice, type WithdrawLnurlPayData, type WithdrawRouteOption, WithdrawRouteSelector, type WithdrawRouteSelectorProps, type WithdrawRouteSummary, WithdrawSuccess, type WithdrawSuccessProps, buttonVariants, cn, formatDisplayAmountText, getAccountNetworkLabel, getAccountNetworkUi, getAccountStatusUi, getActivityNetworkFilterIcon, getAssetIconUrl, getFallbackAssetIconUrl, toast, useAssetIcon, useToast };
|
|
1840
|
+
export { AccountCapabilitiesCard, type AccountCapabilitiesCardProps, AccountChoiceChip, AccountHeaderIcons, AccountInfoGrid, AccountNetworkNotice, AccountNetworkPicker, AccountNetworkSelector, AccountNotice, type AccountSettingsNetwork, type AccountSettingsProtocol, AccountSettingsRow, AccountSettingsShell, AccountStatusPills, type AccountStatusTabItem, AccountStatusTabs, type AccountStatusTabsProps, ActionTile, type ActionTileProps, ActivityDetailRow, type ActivityDetailRowProps, ActivityFilterBar, type ActivityFilterBarProps, ActivityList, type ActivityListItem, type ActivityListProps, type ActivityNetworkFilterOption, type ActivityNetworkFilterValue, ActivityNetworkFilters, type ActivityNetworkFiltersProps, ActivityRow, type ActivityRowProps, type ActivityStatusOption, type ActivityTypeTabCounts, type ActivityTypeTabValue, ActivityTypeTabs, AlertBanner, type AmountDisplayOptions, type AmountDisplayUnit, AppIcon, type AppIconName, type AppIconProps, ArkadeNetworkIcon, AssetCard, type AssetCardProps, AssetIcon, AssetSelector, type AssetSelectorCategory, type AssetSelectorNetworkOption, type AssetSelectorOption, type AssetSelectorProps, type AssetSelectorQuickAsset, BalanceBreakdown, type BalanceBreakdownAccounts, type BalanceBreakdownAsset, type BalanceBreakdownNodeInfo, type BalanceBreakdownProps, BottomNav, type BottomNavItem, type BottomNavProps, BottomSheet, type BottomSheetAction, type BottomSheetProps, BtcUnifiedReceive, type BtcUnifiedReceiveAddress, type BtcUnifiedReceiveProps, type BtcUnifiedReceiveResult, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CopyIcon, type DepositAccountId, DepositAssetSelection, type DepositAssetSelectionProps, type DepositGeneratedAsset, DepositGeneratedView, type DepositGeneratedViewProps, type DepositGenerationController, type DepositInvoiceAsset, DepositInvoiceGeneration, type DepositInvoiceGenerationProps, type DepositNetworkConfigEntry, DepositNetworkDefaultModal, type DepositNetworkDefaultModalProps, type DepositNetworkKey, type DepositNetworkOption, DepositPreGeneration, type DepositPreGenerationAsset, type DepositPreGenerationProps, type DepositSelectionAsset, DepositSuccessScreen, type DepositSuccessScreenProps, type DepositTransferMethod, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisclosureCard, type DisclosureCardProps, DotPagination, type DotPaginationProps, type DotTone, ErrorBoundary, ErrorCard, type ErrorCardProps, ExpandIcon, ExtensionPageFrame, type ExtensionPageFrameProps, FadeOverlay, type FadeOverlayProps, FilterChipGroup, type FilterChipGroupProps, type FilterChipOption, FilterDropdown, type FilterDropdownOption, type FilterDropdownProps, HeadlineGradient, type HeadlineGradientProps, Icon, type IconName, type IconProps, Icons, InfoPanel, type InfoPanelProps, InlineAction, InlineSelector, type InlineSelectorOption, type InlineSelectorProps, Input, type InputProps, InvoiceStatusBanner, KaleidoScopeHeroAnimation, type KaleidoScopeHeroAnimationProps, Label, LightningNetworkIcon, LiquidNetworkIcon, ListSkeletonRows, type ListSkeletonRowsProps, LoadingCard, type LoadingCardProps, MethodChoiceChip, MetricCard, type MetricCardProps, MobileHeroAnimation, type MobileHeroAnimationProps, NETWORK_CONFIG, NetworkBadge, type NetworkBadgeProps, type NetworkIconProps, NetworkInfoDisclosure, NetworkStatusChip, type NetworkStatusChipProps, type NetworkType, NostrNetworkIcon, NumberInput, type NumberInputProps, OptionSelector, type OptionSelectorOption, type OptionSelectorProps, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, PaidOverlay, QrCode, type QrCodeProps, RecoveryPhraseCard, type RecoveryPhraseCardProps, RgbNetworkIcon, ScrollArea, type ScrollAreaProps, SecretRevealCard, type SecretRevealCardProps, SectionHeader, type SectionHeaderProps, SectionLabel, SectionTitle, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, type SelectableCardProps, SettingItem, SettingsActionButton, SettingsSectionCard, type SettingsSectionCardProps, SettingsSelectorRow, type SettingsSelectorRowProps, SettingsStatusPanel, SettingsTile, type SettingsTileProps, Skeleton, type SkeletonProps, type SkeletonTone, SparkNetworkIcon, StatusBadge, StatusIconBadge, type StatusIconBadgeProps, type StatusType, StepperNumberInput, type StepperNumberInputProps, SwapInputCard, type SwapInputCardProps, Switch, SwitchRow, type SwitchRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, ToneBadge, type ToneBadgeProps, TransactionCard, type TransactionCardProps, TransferRouteCard, WalletAssetList, type WalletAssetListEmptyState, type WalletAssetListItem, type WalletAssetListProps, type WithdrawAddressType, WithdrawAmountInput, type WithdrawAmountInputProps, WithdrawConfirmation, type WithdrawConfirmationProps, type WithdrawConfirmationRgbInvoice, type WithdrawDecodedLnInvoice, type WithdrawDecodedRgbInvoice, WithdrawDestinationInput, type WithdrawDestinationInputProps, type WithdrawInvoiceAsset, WithdrawInvoiceInfo, type WithdrawInvoiceInfoLnInvoice, type WithdrawInvoiceInfoProps, type WithdrawInvoiceInfoRgbInvoice, type WithdrawLnurlPayData, type WithdrawRouteOption, WithdrawRouteSelector, type WithdrawRouteSelectorProps, type WithdrawRouteSummary, WithdrawSuccess, type WithdrawSuccessProps, buttonVariants, cn, formatDisplayAmountText, getAccountNetworkLabel, getAccountNetworkUi, getAccountStatusUi, getActivityNetworkFilterIcon, getAssetIconUrl, getFallbackAssetIconUrl, toast, useAssetIcon, useToast };
|
package/dist/web/index.d.ts
CHANGED
|
@@ -726,6 +726,8 @@ interface AssetSelectorOption {
|
|
|
726
726
|
assetId?: string;
|
|
727
727
|
category?: string | null;
|
|
728
728
|
categoryLabel?: string;
|
|
729
|
+
/** Network id matched against the network filter slider; options without one always pass. */
|
|
730
|
+
networkId?: string;
|
|
729
731
|
/** URL of the network mark rendered as a mini-badge over the asset icon. */
|
|
730
732
|
networkIconUrl?: string;
|
|
731
733
|
/** Right-aligned network tag: label pill tinted with `color`, ticker beneath. */
|
|
@@ -738,6 +740,19 @@ interface AssetSelectorCategory {
|
|
|
738
740
|
id: string;
|
|
739
741
|
label: string;
|
|
740
742
|
}
|
|
743
|
+
/** One entry of the single-select network filter slider inside the picker panel. */
|
|
744
|
+
interface AssetSelectorNetworkOption {
|
|
745
|
+
id: string;
|
|
746
|
+
label: string;
|
|
747
|
+
/** Network mark rendered inside the chip; falls back to a lettered dot. */
|
|
748
|
+
iconUrl?: string;
|
|
749
|
+
}
|
|
750
|
+
/** One entry of the quick-asset filter chips (e.g. BTC / USDT / USDC). */
|
|
751
|
+
interface AssetSelectorQuickAsset {
|
|
752
|
+
ticker: string;
|
|
753
|
+
/** Icon URL for the chip; falls back to AssetIcon's local/CDN resolution. */
|
|
754
|
+
iconUrl?: string;
|
|
755
|
+
}
|
|
741
756
|
interface AssetSelectorProps {
|
|
742
757
|
label: string;
|
|
743
758
|
selectedTicker: string;
|
|
@@ -745,6 +760,18 @@ interface AssetSelectorProps {
|
|
|
745
760
|
options: AssetSelectorOption[];
|
|
746
761
|
categories?: AssetSelectorCategory[];
|
|
747
762
|
defaultActiveCategories?: string[];
|
|
763
|
+
/**
|
|
764
|
+
* Single-select network filter rendered as a dropdown button in the panel's
|
|
765
|
+
* top-right corner ("All" by default). Selecting a network keeps only
|
|
766
|
+
* options whose `networkId` matches (options without a `networkId` always
|
|
767
|
+
* pass, mirroring the category convention).
|
|
768
|
+
*/
|
|
769
|
+
networks?: AssetSelectorNetworkOption[];
|
|
770
|
+
/**
|
|
771
|
+
* Quick-asset chips rendered under the search input. Pressing one narrows
|
|
772
|
+
* the list to that ticker; pressing it again clears the filter.
|
|
773
|
+
*/
|
|
774
|
+
quickAssets?: AssetSelectorQuickAsset[];
|
|
748
775
|
networkFilter?: NetworkType | null;
|
|
749
776
|
venueFilter?: string | null;
|
|
750
777
|
disabled?: boolean;
|
|
@@ -754,7 +781,7 @@ interface AssetSelectorProps {
|
|
|
754
781
|
onOpenPanelHeightChange?: (height: number) => void;
|
|
755
782
|
onChange: (id: string) => void;
|
|
756
783
|
}
|
|
757
|
-
declare function AssetSelector({ label, selectedTicker, selectedId, options, categories, defaultActiveCategories, networkFilter, venueFilter, disabled, disabledTicker, disabledId, compact, onOpenPanelHeightChange, onChange, }: AssetSelectorProps): react_jsx_runtime.JSX.Element;
|
|
784
|
+
declare function AssetSelector({ label, selectedTicker, selectedId, options, categories, defaultActiveCategories, networks, quickAssets, networkFilter, venueFilter, disabled, disabledTicker, disabledId, compact, onOpenPanelHeightChange, onChange, }: AssetSelectorProps): react_jsx_runtime.JSX.Element;
|
|
758
785
|
|
|
759
786
|
interface SwapInputCardProps {
|
|
760
787
|
fromTicker: string;
|
|
@@ -766,6 +793,10 @@ interface SwapInputCardProps {
|
|
|
766
793
|
toOptions: AssetSelectorOption[];
|
|
767
794
|
categories?: AssetSelectorCategory[];
|
|
768
795
|
defaultActiveCategories?: string[];
|
|
796
|
+
/** Network filter slider rendered inside the "You Pay" asset picker. */
|
|
797
|
+
fromNetworks?: AssetSelectorNetworkOption[];
|
|
798
|
+
/** Quick-asset chips rendered inside the "You Pay" asset picker. */
|
|
799
|
+
fromQuickAssets?: AssetSelectorQuickAsset[];
|
|
769
800
|
availableText: string;
|
|
770
801
|
showMaxText?: boolean;
|
|
771
802
|
maxText?: string;
|
|
@@ -804,7 +835,7 @@ interface SwapInputCardProps {
|
|
|
804
835
|
onFlip: () => void;
|
|
805
836
|
onSubmit: () => void;
|
|
806
837
|
}
|
|
807
|
-
declare function SwapInputCard({ fromTicker, toTicker, fromSelectedId, toSelectedId, fromInput, fromOptions, toOptions, categories, defaultActiveCategories, availableText, showMaxText, maxText, selectedPercentage, percentageDisabled, hidePercentages, oneWay, fromUnitLabel, fromDisplayUnit, fromUnitIsToggle, receiveAmount, receiveUnitLabel, receiveDisplayUnit, isLoadingQuote, quoteError, quoteRateText, quoteVenueText, quoteVenueTone, quoteFeeText, quoteExpiresText, quoteExpiresUrgent, warning, submitLabel, submitIcon, submitVariant, submitDisabled, onFromTickerChange, onToTickerChange, onFromInputChange, onPercentageClick, onToggleFromUnit, onFlip, onSubmit, }: SwapInputCardProps): react_jsx_runtime.JSX.Element;
|
|
838
|
+
declare function SwapInputCard({ fromTicker, toTicker, fromSelectedId, toSelectedId, fromInput, fromOptions, toOptions, categories, defaultActiveCategories, fromNetworks, fromQuickAssets, availableText, showMaxText, maxText, selectedPercentage, percentageDisabled, hidePercentages, oneWay, fromUnitLabel, fromDisplayUnit, fromUnitIsToggle, receiveAmount, receiveUnitLabel, receiveDisplayUnit, isLoadingQuote, quoteError, quoteRateText, quoteVenueText, quoteVenueTone, quoteFeeText, quoteExpiresText, quoteExpiresUrgent, warning, submitLabel, submitIcon, submitVariant, submitDisabled, onFromTickerChange, onToTickerChange, onFromInputChange, onPercentageClick, onToggleFromUnit, onFlip, onSubmit, }: SwapInputCardProps): react_jsx_runtime.JSX.Element;
|
|
808
839
|
|
|
809
840
|
interface ActivityListItem<TData = unknown> {
|
|
810
841
|
id: string;
|
|
@@ -1806,4 +1837,4 @@ declare function getFallbackAssetIconUrl(seed: string): string;
|
|
|
1806
1837
|
*/
|
|
1807
1838
|
declare function useAssetIcon(ticker: string, cdnBaseUrl?: string): string;
|
|
1808
1839
|
|
|
1809
|
-
export { AccountCapabilitiesCard, type AccountCapabilitiesCardProps, AccountChoiceChip, AccountHeaderIcons, AccountInfoGrid, AccountNetworkNotice, AccountNetworkPicker, AccountNetworkSelector, AccountNotice, type AccountSettingsNetwork, type AccountSettingsProtocol, AccountSettingsRow, AccountSettingsShell, AccountStatusPills, type AccountStatusTabItem, AccountStatusTabs, type AccountStatusTabsProps, ActionTile, type ActionTileProps, ActivityDetailRow, type ActivityDetailRowProps, ActivityFilterBar, type ActivityFilterBarProps, ActivityList, type ActivityListItem, type ActivityListProps, type ActivityNetworkFilterOption, type ActivityNetworkFilterValue, ActivityNetworkFilters, type ActivityNetworkFiltersProps, ActivityRow, type ActivityRowProps, type ActivityStatusOption, type ActivityTypeTabCounts, type ActivityTypeTabValue, ActivityTypeTabs, AlertBanner, type AmountDisplayOptions, type AmountDisplayUnit, AppIcon, type AppIconName, type AppIconProps, ArkadeNetworkIcon, AssetCard, type AssetCardProps, AssetIcon, AssetSelector, type AssetSelectorCategory, type AssetSelectorOption, type AssetSelectorProps, BalanceBreakdown, type BalanceBreakdownAccounts, type BalanceBreakdownAsset, type BalanceBreakdownNodeInfo, type BalanceBreakdownProps, BottomNav, type BottomNavItem, type BottomNavProps, BottomSheet, type BottomSheetAction, type BottomSheetProps, BtcUnifiedReceive, type BtcUnifiedReceiveAddress, type BtcUnifiedReceiveProps, type BtcUnifiedReceiveResult, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CopyIcon, type DepositAccountId, DepositAssetSelection, type DepositAssetSelectionProps, type DepositGeneratedAsset, DepositGeneratedView, type DepositGeneratedViewProps, type DepositGenerationController, type DepositInvoiceAsset, DepositInvoiceGeneration, type DepositInvoiceGenerationProps, type DepositNetworkConfigEntry, DepositNetworkDefaultModal, type DepositNetworkDefaultModalProps, type DepositNetworkKey, type DepositNetworkOption, DepositPreGeneration, type DepositPreGenerationAsset, type DepositPreGenerationProps, type DepositSelectionAsset, DepositSuccessScreen, type DepositSuccessScreenProps, type DepositTransferMethod, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisclosureCard, type DisclosureCardProps, DotPagination, type DotPaginationProps, type DotTone, ErrorBoundary, ErrorCard, type ErrorCardProps, ExpandIcon, ExtensionPageFrame, type ExtensionPageFrameProps, FadeOverlay, type FadeOverlayProps, FilterChipGroup, type FilterChipGroupProps, type FilterChipOption, FilterDropdown, type FilterDropdownOption, type FilterDropdownProps, HeadlineGradient, type HeadlineGradientProps, Icon, type IconName, type IconProps, Icons, InfoPanel, type InfoPanelProps, InlineAction, InlineSelector, type InlineSelectorOption, type InlineSelectorProps, Input, type InputProps, InvoiceStatusBanner, KaleidoScopeHeroAnimation, type KaleidoScopeHeroAnimationProps, Label, LightningNetworkIcon, LiquidNetworkIcon, ListSkeletonRows, type ListSkeletonRowsProps, LoadingCard, type LoadingCardProps, MethodChoiceChip, MetricCard, type MetricCardProps, MobileHeroAnimation, type MobileHeroAnimationProps, NETWORK_CONFIG, NetworkBadge, type NetworkBadgeProps, type NetworkIconProps, NetworkInfoDisclosure, NetworkStatusChip, type NetworkStatusChipProps, type NetworkType, NostrNetworkIcon, NumberInput, type NumberInputProps, OptionSelector, type OptionSelectorOption, type OptionSelectorProps, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, PaidOverlay, QrCode, type QrCodeProps, RecoveryPhraseCard, type RecoveryPhraseCardProps, RgbNetworkIcon, ScrollArea, type ScrollAreaProps, SecretRevealCard, type SecretRevealCardProps, SectionHeader, type SectionHeaderProps, SectionLabel, SectionTitle, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, type SelectableCardProps, SettingItem, SettingsActionButton, SettingsSectionCard, type SettingsSectionCardProps, SettingsSelectorRow, type SettingsSelectorRowProps, SettingsStatusPanel, SettingsTile, type SettingsTileProps, Skeleton, type SkeletonProps, type SkeletonTone, SparkNetworkIcon, StatusBadge, StatusIconBadge, type StatusIconBadgeProps, type StatusType, StepperNumberInput, type StepperNumberInputProps, SwapInputCard, type SwapInputCardProps, Switch, SwitchRow, type SwitchRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, ToneBadge, type ToneBadgeProps, TransactionCard, type TransactionCardProps, TransferRouteCard, WalletAssetList, type WalletAssetListEmptyState, type WalletAssetListItem, type WalletAssetListProps, type WithdrawAddressType, WithdrawAmountInput, type WithdrawAmountInputProps, WithdrawConfirmation, type WithdrawConfirmationProps, type WithdrawConfirmationRgbInvoice, type WithdrawDecodedLnInvoice, type WithdrawDecodedRgbInvoice, WithdrawDestinationInput, type WithdrawDestinationInputProps, type WithdrawInvoiceAsset, WithdrawInvoiceInfo, type WithdrawInvoiceInfoLnInvoice, type WithdrawInvoiceInfoProps, type WithdrawInvoiceInfoRgbInvoice, type WithdrawLnurlPayData, type WithdrawRouteOption, WithdrawRouteSelector, type WithdrawRouteSelectorProps, type WithdrawRouteSummary, WithdrawSuccess, type WithdrawSuccessProps, buttonVariants, cn, formatDisplayAmountText, getAccountNetworkLabel, getAccountNetworkUi, getAccountStatusUi, getActivityNetworkFilterIcon, getAssetIconUrl, getFallbackAssetIconUrl, toast, useAssetIcon, useToast };
|
|
1840
|
+
export { AccountCapabilitiesCard, type AccountCapabilitiesCardProps, AccountChoiceChip, AccountHeaderIcons, AccountInfoGrid, AccountNetworkNotice, AccountNetworkPicker, AccountNetworkSelector, AccountNotice, type AccountSettingsNetwork, type AccountSettingsProtocol, AccountSettingsRow, AccountSettingsShell, AccountStatusPills, type AccountStatusTabItem, AccountStatusTabs, type AccountStatusTabsProps, ActionTile, type ActionTileProps, ActivityDetailRow, type ActivityDetailRowProps, ActivityFilterBar, type ActivityFilterBarProps, ActivityList, type ActivityListItem, type ActivityListProps, type ActivityNetworkFilterOption, type ActivityNetworkFilterValue, ActivityNetworkFilters, type ActivityNetworkFiltersProps, ActivityRow, type ActivityRowProps, type ActivityStatusOption, type ActivityTypeTabCounts, type ActivityTypeTabValue, ActivityTypeTabs, AlertBanner, type AmountDisplayOptions, type AmountDisplayUnit, AppIcon, type AppIconName, type AppIconProps, ArkadeNetworkIcon, AssetCard, type AssetCardProps, AssetIcon, AssetSelector, type AssetSelectorCategory, type AssetSelectorNetworkOption, type AssetSelectorOption, type AssetSelectorProps, type AssetSelectorQuickAsset, BalanceBreakdown, type BalanceBreakdownAccounts, type BalanceBreakdownAsset, type BalanceBreakdownNodeInfo, type BalanceBreakdownProps, BottomNav, type BottomNavItem, type BottomNavProps, BottomSheet, type BottomSheetAction, type BottomSheetProps, BtcUnifiedReceive, type BtcUnifiedReceiveAddress, type BtcUnifiedReceiveProps, type BtcUnifiedReceiveResult, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CopyIcon, type DepositAccountId, DepositAssetSelection, type DepositAssetSelectionProps, type DepositGeneratedAsset, DepositGeneratedView, type DepositGeneratedViewProps, type DepositGenerationController, type DepositInvoiceAsset, DepositInvoiceGeneration, type DepositInvoiceGenerationProps, type DepositNetworkConfigEntry, DepositNetworkDefaultModal, type DepositNetworkDefaultModalProps, type DepositNetworkKey, type DepositNetworkOption, DepositPreGeneration, type DepositPreGenerationAsset, type DepositPreGenerationProps, type DepositSelectionAsset, DepositSuccessScreen, type DepositSuccessScreenProps, type DepositTransferMethod, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisclosureCard, type DisclosureCardProps, DotPagination, type DotPaginationProps, type DotTone, ErrorBoundary, ErrorCard, type ErrorCardProps, ExpandIcon, ExtensionPageFrame, type ExtensionPageFrameProps, FadeOverlay, type FadeOverlayProps, FilterChipGroup, type FilterChipGroupProps, type FilterChipOption, FilterDropdown, type FilterDropdownOption, type FilterDropdownProps, HeadlineGradient, type HeadlineGradientProps, Icon, type IconName, type IconProps, Icons, InfoPanel, type InfoPanelProps, InlineAction, InlineSelector, type InlineSelectorOption, type InlineSelectorProps, Input, type InputProps, InvoiceStatusBanner, KaleidoScopeHeroAnimation, type KaleidoScopeHeroAnimationProps, Label, LightningNetworkIcon, LiquidNetworkIcon, ListSkeletonRows, type ListSkeletonRowsProps, LoadingCard, type LoadingCardProps, MethodChoiceChip, MetricCard, type MetricCardProps, MobileHeroAnimation, type MobileHeroAnimationProps, NETWORK_CONFIG, NetworkBadge, type NetworkBadgeProps, type NetworkIconProps, NetworkInfoDisclosure, NetworkStatusChip, type NetworkStatusChipProps, type NetworkType, NostrNetworkIcon, NumberInput, type NumberInputProps, OptionSelector, type OptionSelectorOption, type OptionSelectorProps, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, PaidOverlay, QrCode, type QrCodeProps, RecoveryPhraseCard, type RecoveryPhraseCardProps, RgbNetworkIcon, ScrollArea, type ScrollAreaProps, SecretRevealCard, type SecretRevealCardProps, SectionHeader, type SectionHeaderProps, SectionLabel, SectionTitle, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, type SelectableCardProps, SettingItem, SettingsActionButton, SettingsSectionCard, type SettingsSectionCardProps, SettingsSelectorRow, type SettingsSelectorRowProps, SettingsStatusPanel, SettingsTile, type SettingsTileProps, Skeleton, type SkeletonProps, type SkeletonTone, SparkNetworkIcon, StatusBadge, StatusIconBadge, type StatusIconBadgeProps, type StatusType, StepperNumberInput, type StepperNumberInputProps, SwapInputCard, type SwapInputCardProps, Switch, SwitchRow, type SwitchRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, ToneBadge, type ToneBadgeProps, TransactionCard, type TransactionCardProps, TransferRouteCard, WalletAssetList, type WalletAssetListEmptyState, type WalletAssetListItem, type WalletAssetListProps, type WithdrawAddressType, WithdrawAmountInput, type WithdrawAmountInputProps, WithdrawConfirmation, type WithdrawConfirmationProps, type WithdrawConfirmationRgbInvoice, type WithdrawDecodedLnInvoice, type WithdrawDecodedRgbInvoice, WithdrawDestinationInput, type WithdrawDestinationInputProps, type WithdrawInvoiceAsset, WithdrawInvoiceInfo, type WithdrawInvoiceInfoLnInvoice, type WithdrawInvoiceInfoProps, type WithdrawInvoiceInfoRgbInvoice, type WithdrawLnurlPayData, type WithdrawRouteOption, WithdrawRouteSelector, type WithdrawRouteSelectorProps, type WithdrawRouteSummary, WithdrawSuccess, type WithdrawSuccessProps, buttonVariants, cn, formatDisplayAmountText, getAccountNetworkLabel, getAccountNetworkUi, getAccountStatusUi, getActivityNetworkFilterIcon, getAssetIconUrl, getFallbackAssetIconUrl, toast, useAssetIcon, useToast };
|
package/dist/web/index.js
CHANGED
|
@@ -3625,6 +3625,8 @@ function AssetSelector({
|
|
|
3625
3625
|
options,
|
|
3626
3626
|
categories = [],
|
|
3627
3627
|
defaultActiveCategories,
|
|
3628
|
+
networks = [],
|
|
3629
|
+
quickAssets = [],
|
|
3628
3630
|
networkFilter,
|
|
3629
3631
|
venueFilter,
|
|
3630
3632
|
disabled,
|
|
@@ -3639,16 +3641,25 @@ function AssetSelector({
|
|
|
3639
3641
|
const [activeCategories, setActiveCategories] = useState11(
|
|
3640
3642
|
defaultActiveCategories ?? categories.map((category) => category.id)
|
|
3641
3643
|
);
|
|
3644
|
+
const [activeNetwork, setActiveNetwork] = useState11(null);
|
|
3645
|
+
const [networkMenuOpen, setNetworkMenuOpen] = useState11(false);
|
|
3646
|
+
const [activeQuickAsset, setActiveQuickAsset] = useState11(null);
|
|
3642
3647
|
const selectedKey = selectedId ?? selectedTicker;
|
|
3643
3648
|
const selected = options.find((option) => option.id === selectedKey) ?? options.find((option) => option.ticker === selectedTicker);
|
|
3644
3649
|
const selectedOptionId = selected?.id ?? selectedKey;
|
|
3645
3650
|
const hasCategoryFilters = categories.length > 0;
|
|
3651
|
+
const hasNetworkFilter = networks.length > 0;
|
|
3652
|
+
const hasQuickAssets = quickAssets.length > 0;
|
|
3653
|
+
const activeNetworkOption = networks.find((network) => network.id === activeNetwork) ?? null;
|
|
3646
3654
|
const filtered = options.filter((option) => {
|
|
3647
3655
|
const category = option.category ?? null;
|
|
3648
3656
|
const matchesCategory = !hasCategoryFilters || category === null || activeCategories.includes(category);
|
|
3649
3657
|
const matchesNetwork = !networkFilter || option.network === networkFilter;
|
|
3658
|
+
const matchesNetworkFilter = !activeNetwork || option.networkId == null || option.networkId === activeNetwork;
|
|
3659
|
+
const matchesQuickAsset = !activeQuickAsset || option.ticker.toUpperCase() === activeQuickAsset;
|
|
3650
3660
|
const matchesVenue = !venueFilter || option.venue === venueFilter;
|
|
3651
|
-
if (!matchesCategory || !matchesNetwork || !matchesVenue)
|
|
3661
|
+
if (!matchesCategory || !matchesNetwork || !matchesNetworkFilter || !matchesQuickAsset || !matchesVenue)
|
|
3662
|
+
return false;
|
|
3652
3663
|
if (!search) return true;
|
|
3653
3664
|
const searchValue = search.toLowerCase();
|
|
3654
3665
|
const matchesSearch = option.ticker.toLowerCase().includes(searchValue) || (option.name?.toLowerCase().includes(searchValue) ?? false) || (option.assetId?.toLowerCase().includes(searchValue) ?? false) || (option.network?.toLowerCase().includes(searchValue) ?? false) || (option.networkTag?.label.toLowerCase().includes(searchValue) ?? false) || (option.category?.toLowerCase().includes(searchValue) ?? false);
|
|
@@ -3665,6 +3676,140 @@ function AssetSelector({
|
|
|
3665
3676
|
disabled: option.id === disabledId || option.ticker === disabledTicker
|
|
3666
3677
|
}));
|
|
3667
3678
|
const categoryLabelById = new Map(categories.map((category) => [category.id, category.label]));
|
|
3679
|
+
const chipBaseClass = "shrink-0 rounded-full text-tiny font-bold uppercase tracking-wide shadow-inner transition-colors";
|
|
3680
|
+
const chipActiveClass = "bg-primary/[0.14] text-primary";
|
|
3681
|
+
const chipIdleClass = "bg-surface-card text-text-dimmed hover:text-white/75";
|
|
3682
|
+
const networkMark = (network) => network.iconUrl ? /* @__PURE__ */ jsx38("img", { src: network.iconUrl, alt: "", className: "size-4 shrink-0 rounded-full" }) : /* @__PURE__ */ jsx38("span", { className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-muted text-xxs font-bold uppercase leading-none text-muted-foreground", children: network.label.charAt(0) });
|
|
3683
|
+
const networkFilterButton = hasNetworkFilter && /* @__PURE__ */ jsxs25("div", { className: "relative shrink-0", children: [
|
|
3684
|
+
/* @__PURE__ */ jsxs25(
|
|
3685
|
+
"button",
|
|
3686
|
+
{
|
|
3687
|
+
type: "button",
|
|
3688
|
+
onClick: () => setNetworkMenuOpen((value) => !value),
|
|
3689
|
+
className: cn(
|
|
3690
|
+
chipBaseClass,
|
|
3691
|
+
"flex items-center gap-1.5 py-1.5 pl-2 pr-2.5",
|
|
3692
|
+
activeNetworkOption || networkMenuOpen ? chipActiveClass : chipIdleClass
|
|
3693
|
+
),
|
|
3694
|
+
children: [
|
|
3695
|
+
activeNetworkOption ? networkMark(activeNetworkOption) : /* @__PURE__ */ jsx38(Icon, { name: "hub", size: "xs", className: "shrink-0" }),
|
|
3696
|
+
activeNetworkOption ? activeNetworkOption.label : "All",
|
|
3697
|
+
/* @__PURE__ */ jsx38(
|
|
3698
|
+
Icon,
|
|
3699
|
+
{
|
|
3700
|
+
name: "expand_more",
|
|
3701
|
+
size: "xs",
|
|
3702
|
+
className: cn(
|
|
3703
|
+
"shrink-0 transition-transform duration-200",
|
|
3704
|
+
networkMenuOpen && "rotate-180"
|
|
3705
|
+
)
|
|
3706
|
+
}
|
|
3707
|
+
)
|
|
3708
|
+
]
|
|
3709
|
+
}
|
|
3710
|
+
),
|
|
3711
|
+
networkMenuOpen && /* @__PURE__ */ jsx38("div", { className: "absolute right-0 top-full z-10 mt-1.5 w-48 overflow-hidden rounded-xl border border-white/[0.08] bg-popover shadow-popover", children: /* @__PURE__ */ jsxs25("div", { className: "max-h-60 overflow-y-auto p-1", children: [
|
|
3712
|
+
/* @__PURE__ */ jsxs25(
|
|
3713
|
+
"button",
|
|
3714
|
+
{
|
|
3715
|
+
type: "button",
|
|
3716
|
+
onClick: () => {
|
|
3717
|
+
setActiveNetwork(null);
|
|
3718
|
+
setNetworkMenuOpen(false);
|
|
3719
|
+
},
|
|
3720
|
+
className: cn(
|
|
3721
|
+
"flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-xs font-semibold transition-colors",
|
|
3722
|
+
activeNetwork === null ? "bg-primary/[0.14] text-primary" : "text-white/75 hover:bg-accent hover:text-white"
|
|
3723
|
+
),
|
|
3724
|
+
children: [
|
|
3725
|
+
/* @__PURE__ */ jsx38(Icon, { name: "hub", size: "xs", className: "shrink-0" }),
|
|
3726
|
+
/* @__PURE__ */ jsx38("span", { className: "min-w-0 flex-1 truncate text-left", children: "All networks" }),
|
|
3727
|
+
activeNetwork === null && /* @__PURE__ */ jsx38(Icon, { name: "check", size: "xs", className: "shrink-0 text-primary" })
|
|
3728
|
+
]
|
|
3729
|
+
}
|
|
3730
|
+
),
|
|
3731
|
+
networks.map((network) => {
|
|
3732
|
+
const isActive = activeNetwork === network.id;
|
|
3733
|
+
return /* @__PURE__ */ jsxs25(
|
|
3734
|
+
"button",
|
|
3735
|
+
{
|
|
3736
|
+
type: "button",
|
|
3737
|
+
onClick: () => {
|
|
3738
|
+
setActiveNetwork(network.id);
|
|
3739
|
+
setNetworkMenuOpen(false);
|
|
3740
|
+
},
|
|
3741
|
+
className: cn(
|
|
3742
|
+
"flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-xs font-semibold transition-colors",
|
|
3743
|
+
isActive ? "bg-primary/[0.14] text-primary" : "text-white/75 hover:bg-accent hover:text-white"
|
|
3744
|
+
),
|
|
3745
|
+
children: [
|
|
3746
|
+
networkMark(network),
|
|
3747
|
+
/* @__PURE__ */ jsx38("span", { className: "min-w-0 flex-1 truncate text-left", children: network.label }),
|
|
3748
|
+
isActive && /* @__PURE__ */ jsx38(Icon, { name: "check", size: "xs", className: "shrink-0 text-primary" })
|
|
3749
|
+
]
|
|
3750
|
+
},
|
|
3751
|
+
network.id
|
|
3752
|
+
);
|
|
3753
|
+
})
|
|
3754
|
+
] }) })
|
|
3755
|
+
] });
|
|
3756
|
+
const filterControls = (hasQuickAssets || hasCategoryFilters) && /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
3757
|
+
hasQuickAssets && /* @__PURE__ */ jsx38("div", { className: "mt-3 flex flex-wrap items-center gap-1.5", children: quickAssets.map((quick) => {
|
|
3758
|
+
const tickerKey = quick.ticker.toUpperCase();
|
|
3759
|
+
const isActive = activeQuickAsset === tickerKey;
|
|
3760
|
+
return /* @__PURE__ */ jsxs25(
|
|
3761
|
+
"button",
|
|
3762
|
+
{
|
|
3763
|
+
type: "button",
|
|
3764
|
+
onClick: () => setActiveQuickAsset(isActive ? null : tickerKey),
|
|
3765
|
+
className: cn(
|
|
3766
|
+
chipBaseClass,
|
|
3767
|
+
"flex items-center gap-1.5 py-1 pl-1.5 pr-2.5",
|
|
3768
|
+
isActive ? chipActiveClass : chipIdleClass
|
|
3769
|
+
),
|
|
3770
|
+
children: [
|
|
3771
|
+
quick.iconUrl ? /* @__PURE__ */ jsx38("img", { src: quick.iconUrl, alt: "", className: "size-4 shrink-0 rounded-full" }) : /* @__PURE__ */ jsx38(AssetIcon, { ticker: quick.ticker, size: 16, className: "shrink-0" }),
|
|
3772
|
+
quick.ticker
|
|
3773
|
+
]
|
|
3774
|
+
},
|
|
3775
|
+
tickerKey
|
|
3776
|
+
);
|
|
3777
|
+
}) }),
|
|
3778
|
+
hasCategoryFilters && /* @__PURE__ */ jsxs25("div", { className: "mt-3 flex flex-wrap items-center gap-1.5", children: [
|
|
3779
|
+
/* @__PURE__ */ jsx38(
|
|
3780
|
+
"button",
|
|
3781
|
+
{
|
|
3782
|
+
type: "button",
|
|
3783
|
+
onClick: () => setActiveCategories(categories.map((category) => category.id)),
|
|
3784
|
+
className: cn(
|
|
3785
|
+
chipBaseClass,
|
|
3786
|
+
"px-2.5 py-1",
|
|
3787
|
+
activeCategories.length === categories.length ? chipActiveClass : chipIdleClass
|
|
3788
|
+
),
|
|
3789
|
+
children: "All"
|
|
3790
|
+
}
|
|
3791
|
+
),
|
|
3792
|
+
categories.map((category) => {
|
|
3793
|
+
const isActive = activeCategories.includes(category.id);
|
|
3794
|
+
return /* @__PURE__ */ jsx38(
|
|
3795
|
+
"button",
|
|
3796
|
+
{
|
|
3797
|
+
type: "button",
|
|
3798
|
+
onClick: () => setActiveCategories(
|
|
3799
|
+
(current) => current.includes(category.id) ? current.filter((value) => value !== category.id) : [...current, category.id]
|
|
3800
|
+
),
|
|
3801
|
+
className: cn(
|
|
3802
|
+
chipBaseClass,
|
|
3803
|
+
"px-2.5 py-1",
|
|
3804
|
+
isActive ? chipActiveClass : chipIdleClass
|
|
3805
|
+
),
|
|
3806
|
+
children: category.label
|
|
3807
|
+
},
|
|
3808
|
+
category.id
|
|
3809
|
+
);
|
|
3810
|
+
})
|
|
3811
|
+
] })
|
|
3812
|
+
] });
|
|
3668
3813
|
const renderAssetOption = (option, optionSelected, optionDisabled) => {
|
|
3669
3814
|
const optionCategoryLabel = option.categoryLabel || (option.category ? categoryLabelById.get(option.category) : void 0);
|
|
3670
3815
|
const hasNetworkBadge = Boolean(option.networkIconUrl || option.networkTag);
|
|
@@ -3733,6 +3878,7 @@ function AssetSelector({
|
|
|
3733
3878
|
const closePanel = () => {
|
|
3734
3879
|
setOpen(false);
|
|
3735
3880
|
setSearch("");
|
|
3881
|
+
setNetworkMenuOpen(false);
|
|
3736
3882
|
};
|
|
3737
3883
|
return /* @__PURE__ */ jsxs25("div", { className: "relative w-36 flex-shrink-0", children: [
|
|
3738
3884
|
/* @__PURE__ */ jsx38(
|
|
@@ -3792,7 +3938,7 @@ function AssetSelector({
|
|
|
3792
3938
|
" available"
|
|
3793
3939
|
] })
|
|
3794
3940
|
] }),
|
|
3795
|
-
selected && /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 rounded-full bg-white/5 px-2.5 py-1", children: [
|
|
3941
|
+
networkFilterButton || selected && /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 rounded-full bg-white/5 px-2.5 py-1", children: [
|
|
3796
3942
|
/* @__PURE__ */ jsx38(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 18 }),
|
|
3797
3943
|
/* @__PURE__ */ jsx38("span", { className: "text-tiny font-semibold text-white", children: selected.ticker })
|
|
3798
3944
|
] })
|
|
@@ -3819,38 +3965,7 @@ function AssetSelector({
|
|
|
3819
3965
|
}
|
|
3820
3966
|
)
|
|
3821
3967
|
] }),
|
|
3822
|
-
|
|
3823
|
-
/* @__PURE__ */ jsx38(
|
|
3824
|
-
"button",
|
|
3825
|
-
{
|
|
3826
|
-
type: "button",
|
|
3827
|
-
onClick: () => setActiveCategories(categories.map((category) => category.id)),
|
|
3828
|
-
className: cn(
|
|
3829
|
-
"rounded-full px-2.5 py-1 text-tiny font-bold uppercase tracking-wide shadow-inner transition-colors",
|
|
3830
|
-
activeCategories.length === categories.length ? "bg-primary/[0.14] text-primary" : "bg-surface-card text-text-dimmed hover:text-white/75"
|
|
3831
|
-
),
|
|
3832
|
-
children: "All"
|
|
3833
|
-
}
|
|
3834
|
-
),
|
|
3835
|
-
categories.map((category) => {
|
|
3836
|
-
const isActive = activeCategories.includes(category.id);
|
|
3837
|
-
return /* @__PURE__ */ jsx38(
|
|
3838
|
-
"button",
|
|
3839
|
-
{
|
|
3840
|
-
type: "button",
|
|
3841
|
-
onClick: () => setActiveCategories(
|
|
3842
|
-
(current) => current.includes(category.id) ? current.filter((value) => value !== category.id) : [...current, category.id]
|
|
3843
|
-
),
|
|
3844
|
-
className: cn(
|
|
3845
|
-
"rounded-full px-2.5 py-1 text-tiny font-bold uppercase tracking-wide shadow-inner transition-colors",
|
|
3846
|
-
isActive ? "bg-primary/[0.14] text-primary" : "bg-surface-card text-text-dimmed hover:text-white/75"
|
|
3847
|
-
),
|
|
3848
|
-
children: category.label
|
|
3849
|
-
},
|
|
3850
|
-
category.id
|
|
3851
|
-
);
|
|
3852
|
-
})
|
|
3853
|
-
] })
|
|
3968
|
+
filterControls
|
|
3854
3969
|
] }),
|
|
3855
3970
|
/* @__PURE__ */ jsx38("div", { className: "mx-4 h-px bg-white/[0.06]" }),
|
|
3856
3971
|
/* @__PURE__ */ jsx38(ScrollArea, { className: "min-h-0 flex-1", viewportClassName: "max-h-[56vh] px-2 py-2 pb-6", children: filtered.length === 0 ? /* @__PURE__ */ jsxs25("div", { className: "flex flex-col items-center gap-2 px-4 py-10 text-center text-sm text-white/30", children: [
|
|
@@ -3943,7 +4058,7 @@ function AssetSelector({
|
|
|
3943
4058
|
" available"
|
|
3944
4059
|
] })
|
|
3945
4060
|
] }),
|
|
3946
|
-
selected && /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 rounded-full bg-white/5 px-2.5 py-1", children: [
|
|
4061
|
+
networkFilterButton || selected && /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 rounded-full bg-white/5 px-2.5 py-1", children: [
|
|
3947
4062
|
/* @__PURE__ */ jsx38(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 18 }),
|
|
3948
4063
|
/* @__PURE__ */ jsx38("span", { className: "text-tiny font-semibold text-white", children: selected.ticker })
|
|
3949
4064
|
] })
|
|
@@ -3970,38 +4085,7 @@ function AssetSelector({
|
|
|
3970
4085
|
}
|
|
3971
4086
|
)
|
|
3972
4087
|
] }),
|
|
3973
|
-
|
|
3974
|
-
/* @__PURE__ */ jsx38(
|
|
3975
|
-
"button",
|
|
3976
|
-
{
|
|
3977
|
-
type: "button",
|
|
3978
|
-
onClick: () => setActiveCategories(categories.map((category) => category.id)),
|
|
3979
|
-
className: cn(
|
|
3980
|
-
"rounded-full px-2.5 py-1 text-tiny font-bold uppercase tracking-wide shadow-inner transition-colors",
|
|
3981
|
-
activeCategories.length === categories.length ? "bg-primary/[0.14] text-primary" : "bg-surface-card text-text-dimmed hover:text-white/75"
|
|
3982
|
-
),
|
|
3983
|
-
children: "All"
|
|
3984
|
-
}
|
|
3985
|
-
),
|
|
3986
|
-
categories.map((category) => {
|
|
3987
|
-
const isActive = activeCategories.includes(category.id);
|
|
3988
|
-
return /* @__PURE__ */ jsx38(
|
|
3989
|
-
"button",
|
|
3990
|
-
{
|
|
3991
|
-
type: "button",
|
|
3992
|
-
onClick: () => setActiveCategories(
|
|
3993
|
-
(current) => current.includes(category.id) ? current.filter((value) => value !== category.id) : [...current, category.id]
|
|
3994
|
-
),
|
|
3995
|
-
className: cn(
|
|
3996
|
-
"rounded-full px-2.5 py-1 text-tiny font-bold uppercase tracking-wide shadow-inner transition-colors",
|
|
3997
|
-
isActive ? "bg-primary/[0.14] text-primary" : "bg-surface-card text-text-dimmed hover:text-white/75"
|
|
3998
|
-
),
|
|
3999
|
-
children: category.label
|
|
4000
|
-
},
|
|
4001
|
-
category.id
|
|
4002
|
-
);
|
|
4003
|
-
})
|
|
4004
|
-
] })
|
|
4088
|
+
filterControls
|
|
4005
4089
|
] })
|
|
4006
4090
|
] }),
|
|
4007
4091
|
renderOption: ({ option, selected: optionSelected, disabled: optionDisabled }) => {
|
|
@@ -4024,6 +4108,8 @@ function SwapInputCard({
|
|
|
4024
4108
|
toOptions,
|
|
4025
4109
|
categories,
|
|
4026
4110
|
defaultActiveCategories,
|
|
4111
|
+
fromNetworks,
|
|
4112
|
+
fromQuickAssets,
|
|
4027
4113
|
availableText,
|
|
4028
4114
|
showMaxText = false,
|
|
4029
4115
|
maxText,
|
|
@@ -4101,6 +4187,8 @@ function SwapInputCard({
|
|
|
4101
4187
|
options: fromOptions,
|
|
4102
4188
|
categories,
|
|
4103
4189
|
defaultActiveCategories,
|
|
4190
|
+
networks: fromNetworks,
|
|
4191
|
+
quickAssets: fromQuickAssets,
|
|
4104
4192
|
disabledId: toSelectedId,
|
|
4105
4193
|
onChange: onFromTickerChange
|
|
4106
4194
|
}
|
|
@@ -4551,12 +4639,12 @@ function ActivityNetworkFilters({
|
|
|
4551
4639
|
// src/web/components/activity-type-tabs.tsx
|
|
4552
4640
|
import { jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4553
4641
|
function ActivityTypeTabs({ counts = {} }) {
|
|
4554
|
-
return /* @__PURE__ */ jsxs31(TabsList, { className: "grid h-12 w-full grid-cols-4 gap-1 rounded-
|
|
4642
|
+
return /* @__PURE__ */ jsxs31(TabsList, { className: "grid h-12 w-full grid-cols-4 gap-1 rounded-2xl bg-surface-card p-1 backdrop-blur-xl", children: [
|
|
4555
4643
|
/* @__PURE__ */ jsxs31(
|
|
4556
4644
|
TabsTrigger,
|
|
4557
4645
|
{
|
|
4558
4646
|
value: "all",
|
|
4559
|
-
className: "h-full rounded-
|
|
4647
|
+
className: "h-full rounded-xl px-2 text-xs font-bold tracking-wide transition-all data-[state=active]:bg-surface-elevated data-[state=active]:text-white",
|
|
4560
4648
|
children: [
|
|
4561
4649
|
"All",
|
|
4562
4650
|
counts.all ? /* @__PURE__ */ jsxs31("span", { className: "ml-1 opacity-60", children: [
|
|
@@ -4571,7 +4659,7 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
4571
4659
|
TabsTrigger,
|
|
4572
4660
|
{
|
|
4573
4661
|
value: "received",
|
|
4574
|
-
className: "group h-full rounded-
|
|
4662
|
+
className: "group h-full rounded-xl px-1.5 text-xs font-bold tracking-wide transition-all hover:text-tx-receive data-[state=active]:bg-tx-receive/15 data-[state=active]:text-tx-receive data-[state=active]:hover:bg-tx-receive/20 data-[state=active]:hover:text-tx-receive",
|
|
4575
4663
|
children: [
|
|
4576
4664
|
/* @__PURE__ */ jsx44(
|
|
4577
4665
|
AppIcon,
|
|
@@ -4589,7 +4677,7 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
4589
4677
|
TabsTrigger,
|
|
4590
4678
|
{
|
|
4591
4679
|
value: "sent",
|
|
4592
|
-
className: "group h-full rounded-
|
|
4680
|
+
className: "group h-full rounded-xl px-1.5 text-xs font-bold tracking-wide transition-all hover:text-tx-sent data-[state=active]:bg-tx-sent/15 data-[state=active]:text-tx-sent data-[state=active]:hover:bg-tx-sent/20 data-[state=active]:hover:text-tx-sent",
|
|
4593
4681
|
children: [
|
|
4594
4682
|
/* @__PURE__ */ jsx44(
|
|
4595
4683
|
AppIcon,
|
|
@@ -4607,7 +4695,7 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
4607
4695
|
TabsTrigger,
|
|
4608
4696
|
{
|
|
4609
4697
|
value: "swaps",
|
|
4610
|
-
className: "group h-full rounded-
|
|
4698
|
+
className: "group h-full rounded-xl px-1.5 text-xs font-bold tracking-wide transition-all hover:text-network-arkade data-[state=active]:bg-network-arkade/15 data-[state=active]:text-network-arkade data-[state=active]:hover:bg-network-arkade/20 data-[state=active]:hover:text-network-arkade",
|
|
4611
4699
|
children: [
|
|
4612
4700
|
/* @__PURE__ */ jsx44(
|
|
4613
4701
|
AppIcon,
|
package/package.json
CHANGED