@orderly.network/ui 2.9.1 → 2.10.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -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: "17",
2221
- viewBox: "0 0 16 17",
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.99925 1.84277C4.31738 1.84277 1.33258 4.82744 1.33258 8.50944C1.33258 12.1914 4.31738 15.1761 7.99925 15.1761C11.6811 15.1761 14.6659 12.1914 14.6659 8.50944C14.6659 4.82744 11.6811 1.84277 7.99925 1.84277ZM7.99925 5.17611C8.36745 5.17611 8.66591 5.47477 8.66591 5.84277C8.66591 6.21077 8.36745 6.50944 7.99925 6.50944C7.63105 6.50944 7.33258 6.21077 7.33258 5.84277C7.33258 5.47477 7.63105 5.17611 7.99925 5.17611ZM7.99925 7.17611C8.36745 7.17611 8.66591 7.47477 8.66591 7.84277V11.1761C8.66591 11.5441 8.36745 11.8428 7.99925 11.8428C7.63105 11.8428 7.33258 11.5441 7.33258 11.1761V7.84277C7.33258 7.47477 7.63105 7.17611 7.99925 7.17611Z",
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