@orderly.network/markets 3.0.4-alpha.1 → 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 CHANGED
@@ -487,6 +487,7 @@ type SideMarketsProps = SideMarketsScriptReturn & {
487
487
  declare const SideMarkets: react__default.FC<SideMarketsProps>;
488
488
 
489
489
  type SideMarketsWidgetProps = MarketsProviderProps & Partial<Pick<SideMarketsProps, "className">> & {
490
+ panelSize?: "small" | "middle" | "large";
490
491
  collapsed?: boolean;
491
492
  };
492
493
  declare const SideMarketsWidget: react__default.FC<SideMarketsWidgetProps>;
package/dist/index.d.ts CHANGED
@@ -487,6 +487,7 @@ type SideMarketsProps = SideMarketsScriptReturn & {
487
487
  declare const SideMarkets: react__default.FC<SideMarketsProps>;
488
488
 
489
489
  type SideMarketsWidgetProps = MarketsProviderProps & Partial<Pick<SideMarketsProps, "className">> & {
490
+ panelSize?: "small" | "middle" | "large";
490
491
  collapsed?: boolean;
491
492
  };
492
493
  declare const SideMarketsWidget: react__default.FC<SideMarketsWidgetProps>;
package/dist/index.js CHANGED
@@ -500,7 +500,7 @@ var init_marketsHeader_ui = __esm({
500
500
  } = props;
501
501
  const { onSymbolChange } = useMarketsContext();
502
502
  const { t } = i18n.useTranslation();
503
- const cls3 = ui.cn(
503
+ const cls2 = ui.cn(
504
504
  "oui-min-w-0 oui-flex-[0_0_calc((100%_-_32px)_/_3)] 3xl:oui-flex-[0_0_calc((100%_-_48px)_/_4)]",
505
505
  enableScroll && "oui-cursor-pointer oui-select-none"
506
506
  );
@@ -522,7 +522,7 @@ var init_marketsHeader_ui = __esm({
522
522
  total24Amount,
523
523
  totalOpenInterest,
524
524
  tvl,
525
- className: cls3
525
+ className: cls2
526
526
  }
527
527
  ),
528
528
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -530,7 +530,7 @@ var init_marketsHeader_ui = __esm({
530
530
  {
531
531
  data: news,
532
532
  title: /* @__PURE__ */ jsxRuntime.jsx(ui.Text.gradient, { color: "brand", children: t("markets.newListings") }),
533
- className: cls3,
533
+ className: cls2,
534
534
  onSymbol
535
535
  }
536
536
  ),
@@ -539,7 +539,7 @@ var init_marketsHeader_ui = __esm({
539
539
  {
540
540
  data: gainers,
541
541
  title: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { className: "oui-text-success-light", children: t("markets.topGainers") }),
542
- className: cls3,
542
+ className: cls2,
543
543
  onSymbol
544
544
  }
545
545
  ),
@@ -548,7 +548,7 @@ var init_marketsHeader_ui = __esm({
548
548
  {
549
549
  data: losers,
550
550
  title: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { className: "oui-text-danger-light", children: t("markets.topLosers") }),
551
- className: cls3,
551
+ className: cls2,
552
552
  onSymbol
553
553
  }
554
554
  )
@@ -3589,7 +3589,7 @@ var init_marketsDataList = __esm({
3589
3589
  init_marketsDataList_ui();
3590
3590
  }
3591
3591
  });
3592
- var LazySearchInput2, LazyMarketsListWidget, cls; exports.ExpandMarkets = void 0;
3592
+ var LazySearchInput2, LazyMarketsListWidget, expandListTableClassNames, ExpandMarketsListPanel; exports.ExpandMarkets = void 0;
3593
3593
  var init_expandMarkets_ui = __esm({
3594
3594
  "src/components/expandMarkets/expandMarkets.ui.tsx"() {
3595
3595
  init_useCommunityTabs();
@@ -3609,7 +3609,17 @@ var init_expandMarkets_ui = __esm({
3609
3609
  return { default: mod.MarketsListWidget };
3610
3610
  })
3611
3611
  );
3612
- cls = "oui-h-full";
3612
+ expandListTableClassNames = {
3613
+ root: ui.cn(
3614
+ "oui-expandMarkets-list",
3615
+ /** min-w-0: flex/grid descendants may shrink so table-fixed + w-full respect parent width. */
3616
+ "oui-flex oui-min-h-0 oui-w-full oui-min-w-0 oui-max-w-full oui-flex-1 oui-flex-col"
3617
+ ),
3618
+ scroll: ui.cn("oui-min-h-0 oui-w-full oui-min-w-0 oui-max-w-full oui-flex-1")
3619
+ };
3620
+ ExpandMarketsListPanel = ({
3621
+ children
3622
+ }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-flex oui-size-full oui-min-h-0 oui-min-w-0 oui-flex-col", children: /* @__PURE__ */ jsxRuntime.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 }) });
3613
3623
  exports.ExpandMarkets = (props) => {
3614
3624
  const { activeTab, onTabChange, tabSort, onTabSort } = props;
3615
3625
  const { getFavoritesProps, renderEmptyView } = useFavoritesProps();
@@ -3618,15 +3628,16 @@ var init_expandMarkets_ui = __esm({
3618
3628
  const tabDataFilters = useCustomTabDataFilters(tabs);
3619
3629
  const renderBuiltInContent = (type) => {
3620
3630
  const tabType = type;
3621
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls, children: /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
3631
+ return /* @__PURE__ */ jsxRuntime.jsx(ExpandMarketsListPanel, { children: /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
3622
3632
  LazyMarketsListWidget,
3623
3633
  {
3624
3634
  type: tabType,
3625
3635
  initialSort: tabSort[type],
3626
3636
  onSort: onTabSort(tabType),
3627
3637
  tableClassNames: {
3628
- root: "oui-expandMarkets-list",
3638
+ root: expandListTableClassNames.root,
3629
3639
  scroll: ui.cn(
3640
+ expandListTableClassNames.scroll,
3630
3641
  "oui-px-1",
3631
3642
  tabType === "favorites" /* Favorites */ ? "oui-pb-9" : "oui-pb-2"
3632
3643
  )
@@ -3648,19 +3659,27 @@ var init_expandMarkets_ui = __esm({
3648
3659
  storageKey: "orderly_expand_markets_community_sel_sub_tab",
3649
3660
  classNames: {
3650
3661
  tabsList: "oui-px-3 oui-pt-1 oui-pb-2",
3651
- tabsContent: "oui-h-full"
3662
+ tabsListContainer: "oui-shrink-0",
3663
+ tabsContent: "oui-min-h-0 oui-min-w-0 oui-w-full oui-flex-1 oui-overflow-hidden"
3652
3664
  },
3653
- className: ui.cn("oui-expandMarkets-community-tabs", cls),
3665
+ className: ui.cn(
3666
+ "oui-expandMarkets-community-tabs",
3667
+ "oui-flex oui-size-full oui-min-h-0 oui-min-w-0 oui-flex-col"
3668
+ ),
3654
3669
  showScrollIndicator: true,
3655
- renderPanel: (selected) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls, children: /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
3670
+ renderPanel: (selected) => /* @__PURE__ */ jsxRuntime.jsx(ExpandMarketsListPanel, { children: /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
3656
3671
  LazyMarketsListWidget,
3657
3672
  {
3658
3673
  type: "all" /* All */,
3659
3674
  initialSort: tabSort["community" /* Community */],
3660
3675
  onSort: onTabSort("community" /* Community */),
3661
3676
  tableClassNames: {
3662
- root: "oui-expandMarkets-list",
3663
- scroll: ui.cn("oui-px-1", "oui-pb-2")
3677
+ root: expandListTableClassNames.root,
3678
+ scroll: ui.cn(
3679
+ expandListTableClassNames.scroll,
3680
+ "oui-px-1",
3681
+ "oui-pb-2"
3682
+ )
3664
3683
  },
3665
3684
  dataFilter: createCommunityBrokerFilter(selected)
3666
3685
  }
@@ -3669,7 +3688,7 @@ var init_expandMarkets_ui = __esm({
3669
3688
  );
3670
3689
  };
3671
3690
  const renderCustomContent = (key) => {
3672
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls, children: /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
3691
+ return /* @__PURE__ */ jsxRuntime.jsx(ExpandMarketsListPanel, { children: /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
3673
3692
  LazyMarketsListWidget,
3674
3693
  {
3675
3694
  type: "all" /* All */,
@@ -3677,8 +3696,12 @@ var init_expandMarkets_ui = __esm({
3677
3696
  initialSort: tabSort[key],
3678
3697
  onSort: onTabSort(key),
3679
3698
  tableClassNames: {
3680
- root: "oui-expandMarkets-list",
3681
- scroll: ui.cn("oui-px-1", "oui-pb-2")
3699
+ root: expandListTableClassNames.root,
3700
+ scroll: ui.cn(
3701
+ expandListTableClassNames.scroll,
3702
+ "oui-px-1",
3703
+ "oui-pb-2"
3704
+ )
3682
3705
  }
3683
3706
  }
3684
3707
  ) }) });
@@ -3688,7 +3711,8 @@ var init_expandMarkets_ui = __esm({
3688
3711
  {
3689
3712
  className: ui.cn(
3690
3713
  "oui-markets-expandMarkets",
3691
- "oui-overflow-hidden oui-font-semibold"
3714
+ /** Search row + tabs/list: second row minmax(0,1fr) passes a bounded height into Tabs. */
3715
+ "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"
3692
3716
  ),
3693
3717
  height: "100%",
3694
3718
  children: [
@@ -3706,11 +3730,17 @@ var init_expandMarkets_ui = __esm({
3706
3730
  value: activeTab,
3707
3731
  onValueChange: onTabChange,
3708
3732
  classNames: {
3733
+ /** Keep tab row from shrinking when Tabs root is a column flex container. */
3734
+ tabsListContainer: "oui-shrink-0",
3709
3735
  tabsList: ui.cn("oui-my-[6px]"),
3710
- tabsContent: "oui-h-full",
3736
+ /** Occupy remaining height under triggers; inner ExpandMarketsListPanel supplies flex column. */
3737
+ tabsContent: "oui-min-h-0 oui-min-w-0 oui-w-full oui-flex-1 oui-overflow-hidden",
3711
3738
  scrollIndicator: "oui-mx-3"
3712
3739
  },
3713
- className: ui.cn("oui-expandMarkets-tabs", cls),
3740
+ className: ui.cn(
3741
+ "oui-expandMarkets-tabs",
3742
+ "oui-flex oui-size-full oui-min-h-0 oui-min-w-0 oui-flex-col"
3743
+ ),
3714
3744
  showScrollIndicator: true,
3715
3745
  children: tabs?.map((tab, index) => {
3716
3746
  const key = tabKey(tab, index);
@@ -4613,6 +4643,7 @@ var init_sideMarkets_ui = __esm({
4613
4643
  {
4614
4644
  width: "100%",
4615
4645
  height: "100%",
4646
+ className: ui.cn(className, "oui-min-h-0 oui-min-w-0 oui-max-w-full"),
4616
4647
  children: renderContent()
4617
4648
  }
4618
4649
  );
@@ -4771,12 +4802,12 @@ var init_dropDownMarkets_ui = __esm({
4771
4802
  }
4772
4803
  )
4773
4804
  ] });
4774
- const cls3 = "oui-h-[calc(100%_-_36px)]";
4805
+ const cls2 = "oui-h-[calc(100%_-_36px)]";
4775
4806
  const { getFavoritesProps, renderEmptyView } = useFavoritesProps();
4776
4807
  const { tabs } = useMarketsContext();
4777
4808
  const tabDataFilters = useCustomTabDataFilters(tabs);
4778
4809
  const renderBuiltInContent = (tabType) => {
4779
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls3, children: /* @__PURE__ */ jsxRuntime.jsx(
4810
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls2, children: /* @__PURE__ */ jsxRuntime.jsx(
4780
4811
  exports.MarketsListWidget,
4781
4812
  {
4782
4813
  type: tabType,
@@ -4807,9 +4838,9 @@ var init_dropDownMarkets_ui = __esm({
4807
4838
  tabsList: "oui-px-3 oui-pt-1 oui-pb-2",
4808
4839
  tabsContent: "oui-h-full"
4809
4840
  },
4810
- className: ui.cn("oui-dropDownMarkets-community-tabs", cls3),
4841
+ className: ui.cn("oui-dropDownMarkets-community-tabs", cls2),
4811
4842
  showScrollIndicator: true,
4812
- renderPanel: (selected) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls3, children: /* @__PURE__ */ jsxRuntime.jsx(
4843
+ renderPanel: (selected) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls2, children: /* @__PURE__ */ jsxRuntime.jsx(
4813
4844
  exports.MarketsListWidget,
4814
4845
  {
4815
4846
  type: "all" /* All */,
@@ -4828,7 +4859,7 @@ var init_dropDownMarkets_ui = __esm({
4828
4859
  );
4829
4860
  };
4830
4861
  const renderCustomContent = (key) => {
4831
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls3, children: /* @__PURE__ */ jsxRuntime.jsx(
4862
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls2, children: /* @__PURE__ */ jsxRuntime.jsx(
4832
4863
  exports.MarketsListWidget,
4833
4864
  {
4834
4865
  type: "all" /* All */,
@@ -4868,7 +4899,7 @@ var init_dropDownMarkets_ui = __esm({
4868
4899
  tabsContent: "oui-h-full",
4869
4900
  scrollIndicator: "oui-mx-0"
4870
4901
  },
4871
- className: ui.cn("oui-dropDownMarkets-tabs", cls3),
4902
+ className: ui.cn("oui-dropDownMarkets-tabs", cls2),
4872
4903
  showScrollIndicator: true,
4873
4904
  children: tabs?.map((tab, index) => {
4874
4905
  const key = tabKey(tab, index);
@@ -5621,7 +5652,7 @@ var TABLE_CLASSNAMES = {
5621
5652
  var LazySearchInput3 = React6__default.default.lazy(
5622
5653
  () => Promise.resolve().then(() => (init_searchInput(), searchInput_exports)).then((mod) => ({ default: mod.SearchInput }))
5623
5654
  );
5624
- var cls2 = "oui-h-[calc(100%_-_36px)]";
5655
+ var cls = "oui-h-[calc(100%_-_36px)]";
5625
5656
  var MarketTabPanel = ({
5626
5657
  type,
5627
5658
  getColumns,
@@ -5631,7 +5662,7 @@ var MarketTabPanel = ({
5631
5662
  renderHeader,
5632
5663
  emptyView
5633
5664
  }) => {
5634
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls2, children: /* @__PURE__ */ jsxRuntime.jsx(
5665
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls, children: /* @__PURE__ */ jsxRuntime.jsx(
5635
5666
  exports.MarketsListWidget,
5636
5667
  {
5637
5668
  type,
@@ -5707,7 +5738,7 @@ var SubMenuMarkets = (props) => {
5707
5738
  tabsContent: "oui-h-full",
5708
5739
  scrollIndicator: "oui-mx-1"
5709
5740
  },
5710
- className: ui.cn("oui-subMenuMarkets-community-tabs", cls2),
5741
+ className: ui.cn("oui-subMenuMarkets-community-tabs", cls),
5711
5742
  showScrollIndicator: true,
5712
5743
  renderPanel: (selected) => /* @__PURE__ */ jsxRuntime.jsx(
5713
5744
  MarketTabPanel,
@@ -5723,7 +5754,7 @@ var SubMenuMarkets = (props) => {
5723
5754
  );
5724
5755
  };
5725
5756
  const renderCustomContent = (key) => {
5726
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls2, children: /* @__PURE__ */ jsxRuntime.jsx(
5757
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls, children: /* @__PURE__ */ jsxRuntime.jsx(
5727
5758
  exports.MarketsListWidget,
5728
5759
  {
5729
5760
  type: "all" /* All */,
@@ -5758,7 +5789,7 @@ var SubMenuMarkets = (props) => {
5758
5789
  tabsContent: "oui-h-full",
5759
5790
  scrollIndicator: "oui-mx-1"
5760
5791
  },
5761
- className: ui.cn(cls2, "oui-subMenuMarkets-tabs oui-my-1.5"),
5792
+ className: ui.cn(cls, "oui-subMenuMarkets-tabs oui-my-1.5"),
5762
5793
  showScrollIndicator: true,
5763
5794
  children: tabs?.map((tab, index) => {
5764
5795
  const key = tabKey(tab, index);