@orderly.network/ui 2.9.1 → 2.10.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +12 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -4
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -8350,6 +8350,7 @@ type TokenIconProps = {
|
|
|
8350
8350
|
name?: string;
|
|
8351
8351
|
symbol?: string;
|
|
8352
8352
|
className?: string;
|
|
8353
|
+
url?: string;
|
|
8353
8354
|
};
|
|
8354
8355
|
declare const TokenIcon: FC<TokenIconProps>;
|
|
8355
8356
|
|
|
@@ -8743,7 +8744,6 @@ type TipsProps = {
|
|
|
8743
8744
|
/** Optional className for the wrapper (button on mobile, or Tooltip trigger on desktop). */
|
|
8744
8745
|
className?: string;
|
|
8745
8746
|
classNames?: {
|
|
8746
|
-
root?: string;
|
|
8747
8747
|
trigger?: string;
|
|
8748
8748
|
};
|
|
8749
8749
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -8350,6 +8350,7 @@ type TokenIconProps = {
|
|
|
8350
8350
|
name?: string;
|
|
8351
8351
|
symbol?: string;
|
|
8352
8352
|
className?: string;
|
|
8353
|
+
url?: string;
|
|
8353
8354
|
};
|
|
8354
8355
|
declare const TokenIcon: FC<TokenIconProps>;
|
|
8355
8356
|
|
|
@@ -8743,7 +8744,6 @@ type TipsProps = {
|
|
|
8743
8744
|
/** Optional className for the wrapper (button on mobile, or Tooltip trigger on desktop). */
|
|
8744
8745
|
className?: string;
|
|
8745
8746
|
classNames?: {
|
|
8746
|
-
root?: string;
|
|
8747
8747
|
trigger?: string;
|
|
8748
8748
|
};
|
|
8749
8749
|
};
|
package/dist/index.js
CHANGED
|
@@ -1308,13 +1308,16 @@ var ChainIcon = (props) => {
|
|
|
1308
1308
|
};
|
|
1309
1309
|
var TokenIcon = (props) => {
|
|
1310
1310
|
const url = React70.useMemo(() => {
|
|
1311
|
+
if (props.url) {
|
|
1312
|
+
return props.url;
|
|
1313
|
+
}
|
|
1311
1314
|
let name = props.name;
|
|
1312
1315
|
if (typeof props.symbol === "string") {
|
|
1313
1316
|
const arr = props.symbol?.split("_");
|
|
1314
1317
|
name = arr[1];
|
|
1315
1318
|
}
|
|
1316
1319
|
return `https://oss.orderly.network/static/symbol_logo/${name}.png`;
|
|
1317
|
-
}, [props.name, props.symbol]);
|
|
1320
|
+
}, [props.name, props.symbol, props.url]);
|
|
1318
1321
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1319
1322
|
Avatar,
|
|
1320
1323
|
{
|
|
@@ -2217,8 +2220,8 @@ var InfoCircleIcon = React70__namespace.default.forwardRef(
|
|
|
2217
2220
|
"svg",
|
|
2218
2221
|
{
|
|
2219
2222
|
width: "16",
|
|
2220
|
-
height: "
|
|
2221
|
-
viewBox: "0 0 16
|
|
2223
|
+
height: "16",
|
|
2224
|
+
viewBox: "0 0 16 16",
|
|
2222
2225
|
fill: "currentColor",
|
|
2223
2226
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2224
2227
|
opacity,
|
|
@@ -2228,7 +2231,7 @@ var InfoCircleIcon = React70__namespace.default.forwardRef(
|
|
|
2228
2231
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2229
2232
|
"path",
|
|
2230
2233
|
{
|
|
2231
|
-
d: "M7.
|
|
2234
|
+
d: "M7.999 1.343a6.667 6.667 0 1 0 0 13.333 6.667 6.667 0 0 0 0-13.333m0 3.333a.667.667 0 1 1 0 1.334.667.667 0 0 1 0-1.334m0 2c.368 0 .666.299.666.667v3.333a.667.667 0 0 1-1.333 0V7.343c0-.368.298-.667.667-.667",
|
|
2232
2235
|
fill: "currentColor"
|
|
2233
2236
|
}
|
|
2234
2237
|
)
|
|
@@ -5490,10 +5493,12 @@ var TokenSelect = (props) => {
|
|
|
5490
5493
|
if (typeof props.valueFormatter === "function") {
|
|
5491
5494
|
return props.valueFormatter(value, {});
|
|
5492
5495
|
}
|
|
5496
|
+
const findItem = options?.find((token) => token.value === value);
|
|
5493
5497
|
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gapX: 1, children: [
|
|
5494
5498
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5495
5499
|
TokenIcon,
|
|
5496
5500
|
{
|
|
5501
|
+
url: findItem?.logo_uri,
|
|
5497
5502
|
name: value,
|
|
5498
5503
|
className: iconSize ? void 0 : icon({ size: props.size }),
|
|
5499
5504
|
size: iconSize
|