@kodiak-finance/orderly-ui-scaffold 2.8.22-beta.0 → 2.8.22-beta.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.js +41 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -1860,6 +1860,16 @@ var AccountIdForCopy = (props) => {
|
|
|
1860
1860
|
};
|
|
1861
1861
|
var AccountItem = (props) => {
|
|
1862
1862
|
const { t } = orderlyI18n.useTranslation();
|
|
1863
|
+
const { isMobile } = orderlyUi.useScreen();
|
|
1864
|
+
const copyAccountId = React6.useCallback(
|
|
1865
|
+
(event) => {
|
|
1866
|
+
event.stopPropagation();
|
|
1867
|
+
event.preventDefault();
|
|
1868
|
+
navigator.clipboard.writeText(props.accountId);
|
|
1869
|
+
orderlyUi.toast.success(t("common.copy.copied"));
|
|
1870
|
+
},
|
|
1871
|
+
[props.accountId, t]
|
|
1872
|
+
);
|
|
1863
1873
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1864
1874
|
orderlyUi.Flex,
|
|
1865
1875
|
{
|
|
@@ -1924,10 +1934,37 @@ var AccountItem = (props) => {
|
|
|
1924
1934
|
]
|
|
1925
1935
|
}
|
|
1926
1936
|
),
|
|
1927
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1937
|
+
isMobile ? /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { itemAlign: "center", gap: 1, className: "oui-group", children: [
|
|
1938
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1939
|
+
orderlyUi.Text,
|
|
1940
|
+
{
|
|
1941
|
+
className: "oui-text-2xs oui-leading-3 oui-text-base-contrast-36 oui-transition-colors group-hover:oui-text-base-contrast",
|
|
1942
|
+
onClick: copyAccountId,
|
|
1943
|
+
children: [
|
|
1944
|
+
"ID: ",
|
|
1945
|
+
orderlyUi.formatAddress(props.accountId)
|
|
1946
|
+
]
|
|
1947
|
+
}
|
|
1948
|
+
),
|
|
1949
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1950
|
+
orderlyUi.CopyIcon,
|
|
1951
|
+
{
|
|
1952
|
+
size: 12,
|
|
1953
|
+
onClick: copyAccountId,
|
|
1954
|
+
className: "oui-cursor-pointer oui-text-base-contrast-36 oui-transition-colors group-hover:oui-text-base-contrast"
|
|
1955
|
+
}
|
|
1956
|
+
)
|
|
1957
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Tooltip, { content: /* @__PURE__ */ jsxRuntime.jsx(AccountIdForCopy, { accountId: props.accountId }), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1958
|
+
orderlyUi.Text,
|
|
1959
|
+
{
|
|
1960
|
+
className: "oui-text-2xs oui-leading-3 oui-text-base-contrast-36 hover:oui-text-base-contrast",
|
|
1961
|
+
onClick: copyAccountId,
|
|
1962
|
+
children: [
|
|
1963
|
+
"ID: ",
|
|
1964
|
+
orderlyUi.formatAddress(props.accountId)
|
|
1965
|
+
]
|
|
1966
|
+
}
|
|
1967
|
+
) })
|
|
1931
1968
|
]
|
|
1932
1969
|
},
|
|
1933
1970
|
props.accountId
|