@orderly.network/markets 3.0.4-alpha.2 → 3.0.4-alpha.3
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +62 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +62 -31
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -494,7 +494,7 @@ var init_marketsHeader_ui = __esm({
|
|
|
494
494
|
} = props;
|
|
495
495
|
const { onSymbolChange } = useMarketsContext();
|
|
496
496
|
const { t } = useTranslation();
|
|
497
|
-
const
|
|
497
|
+
const cls2 = cn(
|
|
498
498
|
"oui-min-w-0 oui-flex-[0_0_calc((100%_-_32px)_/_3)] 3xl:oui-flex-[0_0_calc((100%_-_48px)_/_4)]",
|
|
499
499
|
enableScroll && "oui-cursor-pointer oui-select-none"
|
|
500
500
|
);
|
|
@@ -516,7 +516,7 @@ var init_marketsHeader_ui = __esm({
|
|
|
516
516
|
total24Amount,
|
|
517
517
|
totalOpenInterest,
|
|
518
518
|
tvl,
|
|
519
|
-
className:
|
|
519
|
+
className: cls2
|
|
520
520
|
}
|
|
521
521
|
),
|
|
522
522
|
/* @__PURE__ */ jsx(
|
|
@@ -524,7 +524,7 @@ var init_marketsHeader_ui = __esm({
|
|
|
524
524
|
{
|
|
525
525
|
data: news,
|
|
526
526
|
title: /* @__PURE__ */ jsx(Text.gradient, { color: "brand", children: t("markets.newListings") }),
|
|
527
|
-
className:
|
|
527
|
+
className: cls2,
|
|
528
528
|
onSymbol
|
|
529
529
|
}
|
|
530
530
|
),
|
|
@@ -533,7 +533,7 @@ var init_marketsHeader_ui = __esm({
|
|
|
533
533
|
{
|
|
534
534
|
data: gainers,
|
|
535
535
|
title: /* @__PURE__ */ jsx(Text, { className: "oui-text-success-light", children: t("markets.topGainers") }),
|
|
536
|
-
className:
|
|
536
|
+
className: cls2,
|
|
537
537
|
onSymbol
|
|
538
538
|
}
|
|
539
539
|
),
|
|
@@ -542,7 +542,7 @@ var init_marketsHeader_ui = __esm({
|
|
|
542
542
|
{
|
|
543
543
|
data: losers,
|
|
544
544
|
title: /* @__PURE__ */ jsx(Text, { className: "oui-text-danger-light", children: t("markets.topLosers") }),
|
|
545
|
-
className:
|
|
545
|
+
className: cls2,
|
|
546
546
|
onSymbol
|
|
547
547
|
}
|
|
548
548
|
)
|
|
@@ -3583,7 +3583,7 @@ var init_marketsDataList = __esm({
|
|
|
3583
3583
|
init_marketsDataList_ui();
|
|
3584
3584
|
}
|
|
3585
3585
|
});
|
|
3586
|
-
var LazySearchInput2, LazyMarketsListWidget,
|
|
3586
|
+
var LazySearchInput2, LazyMarketsListWidget, expandListTableClassNames, ExpandMarketsListPanel, ExpandMarkets;
|
|
3587
3587
|
var init_expandMarkets_ui = __esm({
|
|
3588
3588
|
"src/components/expandMarkets/expandMarkets.ui.tsx"() {
|
|
3589
3589
|
init_useCommunityTabs();
|
|
@@ -3603,7 +3603,17 @@ var init_expandMarkets_ui = __esm({
|
|
|
3603
3603
|
return { default: mod.MarketsListWidget };
|
|
3604
3604
|
})
|
|
3605
3605
|
);
|
|
3606
|
-
|
|
3606
|
+
expandListTableClassNames = {
|
|
3607
|
+
root: cn(
|
|
3608
|
+
"oui-expandMarkets-list",
|
|
3609
|
+
/** min-w-0: flex/grid descendants may shrink so table-fixed + w-full respect parent width. */
|
|
3610
|
+
"oui-flex oui-min-h-0 oui-w-full oui-min-w-0 oui-max-w-full oui-flex-1 oui-flex-col"
|
|
3611
|
+
),
|
|
3612
|
+
scroll: cn("oui-min-h-0 oui-w-full oui-min-w-0 oui-max-w-full oui-flex-1")
|
|
3613
|
+
};
|
|
3614
|
+
ExpandMarketsListPanel = ({
|
|
3615
|
+
children
|
|
3616
|
+
}) => /* @__PURE__ */ jsx("div", { className: "oui-flex oui-size-full oui-min-h-0 oui-min-w-0 oui-flex-col", children: /* @__PURE__ */ jsx("div", { className: "oui-flex oui-min-h-0 oui-w-full oui-min-w-0 oui-flex-1 oui-flex-col oui-overflow-hidden", children }) });
|
|
3607
3617
|
ExpandMarkets = (props) => {
|
|
3608
3618
|
const { activeTab, onTabChange, tabSort, onTabSort } = props;
|
|
3609
3619
|
const { getFavoritesProps, renderEmptyView } = useFavoritesProps();
|
|
@@ -3612,15 +3622,16 @@ var init_expandMarkets_ui = __esm({
|
|
|
3612
3622
|
const tabDataFilters = useCustomTabDataFilters(tabs);
|
|
3613
3623
|
const renderBuiltInContent = (type) => {
|
|
3614
3624
|
const tabType = type;
|
|
3615
|
-
return /* @__PURE__ */ jsx(
|
|
3625
|
+
return /* @__PURE__ */ jsx(ExpandMarketsListPanel, { children: /* @__PURE__ */ jsx(React6.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3616
3626
|
LazyMarketsListWidget,
|
|
3617
3627
|
{
|
|
3618
3628
|
type: tabType,
|
|
3619
3629
|
initialSort: tabSort[type],
|
|
3620
3630
|
onSort: onTabSort(tabType),
|
|
3621
3631
|
tableClassNames: {
|
|
3622
|
-
root:
|
|
3632
|
+
root: expandListTableClassNames.root,
|
|
3623
3633
|
scroll: cn(
|
|
3634
|
+
expandListTableClassNames.scroll,
|
|
3624
3635
|
"oui-px-1",
|
|
3625
3636
|
tabType === "favorites" /* Favorites */ ? "oui-pb-9" : "oui-pb-2"
|
|
3626
3637
|
)
|
|
@@ -3642,19 +3653,27 @@ var init_expandMarkets_ui = __esm({
|
|
|
3642
3653
|
storageKey: "orderly_expand_markets_community_sel_sub_tab",
|
|
3643
3654
|
classNames: {
|
|
3644
3655
|
tabsList: "oui-px-3 oui-pt-1 oui-pb-2",
|
|
3645
|
-
|
|
3656
|
+
tabsListContainer: "oui-shrink-0",
|
|
3657
|
+
tabsContent: "oui-min-h-0 oui-min-w-0 oui-w-full oui-flex-1 oui-overflow-hidden"
|
|
3646
3658
|
},
|
|
3647
|
-
className: cn(
|
|
3659
|
+
className: cn(
|
|
3660
|
+
"oui-expandMarkets-community-tabs",
|
|
3661
|
+
"oui-flex oui-size-full oui-min-h-0 oui-min-w-0 oui-flex-col"
|
|
3662
|
+
),
|
|
3648
3663
|
showScrollIndicator: true,
|
|
3649
|
-
renderPanel: (selected) => /* @__PURE__ */ jsx(
|
|
3664
|
+
renderPanel: (selected) => /* @__PURE__ */ jsx(ExpandMarketsListPanel, { children: /* @__PURE__ */ jsx(React6.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3650
3665
|
LazyMarketsListWidget,
|
|
3651
3666
|
{
|
|
3652
3667
|
type: "all" /* All */,
|
|
3653
3668
|
initialSort: tabSort["community" /* Community */],
|
|
3654
3669
|
onSort: onTabSort("community" /* Community */),
|
|
3655
3670
|
tableClassNames: {
|
|
3656
|
-
root:
|
|
3657
|
-
scroll: cn(
|
|
3671
|
+
root: expandListTableClassNames.root,
|
|
3672
|
+
scroll: cn(
|
|
3673
|
+
expandListTableClassNames.scroll,
|
|
3674
|
+
"oui-px-1",
|
|
3675
|
+
"oui-pb-2"
|
|
3676
|
+
)
|
|
3658
3677
|
},
|
|
3659
3678
|
dataFilter: createCommunityBrokerFilter(selected)
|
|
3660
3679
|
}
|
|
@@ -3663,7 +3682,7 @@ var init_expandMarkets_ui = __esm({
|
|
|
3663
3682
|
);
|
|
3664
3683
|
};
|
|
3665
3684
|
const renderCustomContent = (key) => {
|
|
3666
|
-
return /* @__PURE__ */ jsx(
|
|
3685
|
+
return /* @__PURE__ */ jsx(ExpandMarketsListPanel, { children: /* @__PURE__ */ jsx(React6.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3667
3686
|
LazyMarketsListWidget,
|
|
3668
3687
|
{
|
|
3669
3688
|
type: "all" /* All */,
|
|
@@ -3671,8 +3690,12 @@ var init_expandMarkets_ui = __esm({
|
|
|
3671
3690
|
initialSort: tabSort[key],
|
|
3672
3691
|
onSort: onTabSort(key),
|
|
3673
3692
|
tableClassNames: {
|
|
3674
|
-
root:
|
|
3675
|
-
scroll: cn(
|
|
3693
|
+
root: expandListTableClassNames.root,
|
|
3694
|
+
scroll: cn(
|
|
3695
|
+
expandListTableClassNames.scroll,
|
|
3696
|
+
"oui-px-1",
|
|
3697
|
+
"oui-pb-2"
|
|
3698
|
+
)
|
|
3676
3699
|
}
|
|
3677
3700
|
}
|
|
3678
3701
|
) }) });
|
|
@@ -3682,7 +3705,8 @@ var init_expandMarkets_ui = __esm({
|
|
|
3682
3705
|
{
|
|
3683
3706
|
className: cn(
|
|
3684
3707
|
"oui-markets-expandMarkets",
|
|
3685
|
-
|
|
3708
|
+
/** Search row + tabs/list: second row minmax(0,1fr) passes a bounded height into Tabs. */
|
|
3709
|
+
"oui-grid oui-size-full oui-min-h-0 oui-min-w-0 oui-grid-rows-[auto_minmax(0,1fr)] oui-overflow-hidden oui-font-semibold"
|
|
3686
3710
|
),
|
|
3687
3711
|
height: "100%",
|
|
3688
3712
|
children: [
|
|
@@ -3700,11 +3724,17 @@ var init_expandMarkets_ui = __esm({
|
|
|
3700
3724
|
value: activeTab,
|
|
3701
3725
|
onValueChange: onTabChange,
|
|
3702
3726
|
classNames: {
|
|
3727
|
+
/** Keep tab row from shrinking when Tabs root is a column flex container. */
|
|
3728
|
+
tabsListContainer: "oui-shrink-0",
|
|
3703
3729
|
tabsList: cn("oui-my-[6px]"),
|
|
3704
|
-
|
|
3730
|
+
/** Occupy remaining height under triggers; inner ExpandMarketsListPanel supplies flex column. */
|
|
3731
|
+
tabsContent: "oui-min-h-0 oui-min-w-0 oui-w-full oui-flex-1 oui-overflow-hidden",
|
|
3705
3732
|
scrollIndicator: "oui-mx-3"
|
|
3706
3733
|
},
|
|
3707
|
-
className: cn(
|
|
3734
|
+
className: cn(
|
|
3735
|
+
"oui-expandMarkets-tabs",
|
|
3736
|
+
"oui-flex oui-size-full oui-min-h-0 oui-min-w-0 oui-flex-col"
|
|
3737
|
+
),
|
|
3708
3738
|
showScrollIndicator: true,
|
|
3709
3739
|
children: tabs?.map((tab, index) => {
|
|
3710
3740
|
const key = tabKey(tab, index);
|
|
@@ -4607,6 +4637,7 @@ var init_sideMarkets_ui = __esm({
|
|
|
4607
4637
|
{
|
|
4608
4638
|
width: "100%",
|
|
4609
4639
|
height: "100%",
|
|
4640
|
+
className: cn(className, "oui-min-h-0 oui-min-w-0 oui-max-w-full"),
|
|
4610
4641
|
children: renderContent()
|
|
4611
4642
|
}
|
|
4612
4643
|
);
|
|
@@ -4765,12 +4796,12 @@ var init_dropDownMarkets_ui = __esm({
|
|
|
4765
4796
|
}
|
|
4766
4797
|
)
|
|
4767
4798
|
] });
|
|
4768
|
-
const
|
|
4799
|
+
const cls2 = "oui-h-[calc(100%_-_36px)]";
|
|
4769
4800
|
const { getFavoritesProps, renderEmptyView } = useFavoritesProps();
|
|
4770
4801
|
const { tabs } = useMarketsContext();
|
|
4771
4802
|
const tabDataFilters = useCustomTabDataFilters(tabs);
|
|
4772
4803
|
const renderBuiltInContent = (tabType) => {
|
|
4773
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
4804
|
+
return /* @__PURE__ */ jsx("div", { className: cls2, children: /* @__PURE__ */ jsx(
|
|
4774
4805
|
MarketsListWidget,
|
|
4775
4806
|
{
|
|
4776
4807
|
type: tabType,
|
|
@@ -4801,9 +4832,9 @@ var init_dropDownMarkets_ui = __esm({
|
|
|
4801
4832
|
tabsList: "oui-px-3 oui-pt-1 oui-pb-2",
|
|
4802
4833
|
tabsContent: "oui-h-full"
|
|
4803
4834
|
},
|
|
4804
|
-
className: cn("oui-dropDownMarkets-community-tabs",
|
|
4835
|
+
className: cn("oui-dropDownMarkets-community-tabs", cls2),
|
|
4805
4836
|
showScrollIndicator: true,
|
|
4806
|
-
renderPanel: (selected) => /* @__PURE__ */ jsx("div", { className:
|
|
4837
|
+
renderPanel: (selected) => /* @__PURE__ */ jsx("div", { className: cls2, children: /* @__PURE__ */ jsx(
|
|
4807
4838
|
MarketsListWidget,
|
|
4808
4839
|
{
|
|
4809
4840
|
type: "all" /* All */,
|
|
@@ -4822,7 +4853,7 @@ var init_dropDownMarkets_ui = __esm({
|
|
|
4822
4853
|
);
|
|
4823
4854
|
};
|
|
4824
4855
|
const renderCustomContent = (key) => {
|
|
4825
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
4856
|
+
return /* @__PURE__ */ jsx("div", { className: cls2, children: /* @__PURE__ */ jsx(
|
|
4826
4857
|
MarketsListWidget,
|
|
4827
4858
|
{
|
|
4828
4859
|
type: "all" /* All */,
|
|
@@ -4862,7 +4893,7 @@ var init_dropDownMarkets_ui = __esm({
|
|
|
4862
4893
|
tabsContent: "oui-h-full",
|
|
4863
4894
|
scrollIndicator: "oui-mx-0"
|
|
4864
4895
|
},
|
|
4865
|
-
className: cn("oui-dropDownMarkets-tabs",
|
|
4896
|
+
className: cn("oui-dropDownMarkets-tabs", cls2),
|
|
4866
4897
|
showScrollIndicator: true,
|
|
4867
4898
|
children: tabs?.map((tab, index) => {
|
|
4868
4899
|
const key = tabKey(tab, index);
|
|
@@ -5615,7 +5646,7 @@ var TABLE_CLASSNAMES = {
|
|
|
5615
5646
|
var LazySearchInput3 = React6.lazy(
|
|
5616
5647
|
() => Promise.resolve().then(() => (init_searchInput(), searchInput_exports)).then((mod) => ({ default: mod.SearchInput }))
|
|
5617
5648
|
);
|
|
5618
|
-
var
|
|
5649
|
+
var cls = "oui-h-[calc(100%_-_36px)]";
|
|
5619
5650
|
var MarketTabPanel = ({
|
|
5620
5651
|
type,
|
|
5621
5652
|
getColumns,
|
|
@@ -5625,7 +5656,7 @@ var MarketTabPanel = ({
|
|
|
5625
5656
|
renderHeader,
|
|
5626
5657
|
emptyView
|
|
5627
5658
|
}) => {
|
|
5628
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
5659
|
+
return /* @__PURE__ */ jsx("div", { className: cls, children: /* @__PURE__ */ jsx(
|
|
5629
5660
|
MarketsListWidget,
|
|
5630
5661
|
{
|
|
5631
5662
|
type,
|
|
@@ -5701,7 +5732,7 @@ var SubMenuMarkets = (props) => {
|
|
|
5701
5732
|
tabsContent: "oui-h-full",
|
|
5702
5733
|
scrollIndicator: "oui-mx-1"
|
|
5703
5734
|
},
|
|
5704
|
-
className: cn("oui-subMenuMarkets-community-tabs",
|
|
5735
|
+
className: cn("oui-subMenuMarkets-community-tabs", cls),
|
|
5705
5736
|
showScrollIndicator: true,
|
|
5706
5737
|
renderPanel: (selected) => /* @__PURE__ */ jsx(
|
|
5707
5738
|
MarketTabPanel,
|
|
@@ -5717,7 +5748,7 @@ var SubMenuMarkets = (props) => {
|
|
|
5717
5748
|
);
|
|
5718
5749
|
};
|
|
5719
5750
|
const renderCustomContent = (key) => {
|
|
5720
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
5751
|
+
return /* @__PURE__ */ jsx("div", { className: cls, children: /* @__PURE__ */ jsx(
|
|
5721
5752
|
MarketsListWidget,
|
|
5722
5753
|
{
|
|
5723
5754
|
type: "all" /* All */,
|
|
@@ -5752,7 +5783,7 @@ var SubMenuMarkets = (props) => {
|
|
|
5752
5783
|
tabsContent: "oui-h-full",
|
|
5753
5784
|
scrollIndicator: "oui-mx-1"
|
|
5754
5785
|
},
|
|
5755
|
-
className: cn(
|
|
5786
|
+
className: cn(cls, "oui-subMenuMarkets-tabs oui-my-1.5"),
|
|
5756
5787
|
showScrollIndicator: true,
|
|
5757
5788
|
children: tabs?.map((tab, index) => {
|
|
5758
5789
|
const key = tabKey(tab, index);
|