@gearbox-protocol/ui-kit 4.2.1 → 4.3.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/cjs/components/base/details-view/details-view.cjs +1 -1
- package/dist/cjs/components/base/details-view/index.cjs +1 -1
- package/dist/cjs/components/base/index.cjs +1 -1
- package/dist/cjs/components/base/tabber/tabber.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/base/details-view/details-view.js +40 -56
- package/dist/esm/components/base/details-view/index.js +8 -7
- package/dist/esm/components/base/index.js +127 -126
- package/dist/esm/components/base/tabber/tabber.js +85 -95
- package/dist/esm/components/index.js +413 -412
- package/dist/esm/index.js +459 -458
- package/dist/types/components/base/details-view/details-view.d.ts +6 -5
- package/dist/types/components/base/tabber/tabber.d.ts +1 -8
- package/package.json +1 -1
- package/dist/cjs/components/base/tabber/is-tabber.cjs +0 -1
- package/dist/esm/components/base/tabber/is-tabber.js +0 -8
- package/dist/types/components/base/tabber/is-tabber.d.ts +0 -6
|
@@ -2,154 +2,155 @@ import { AmountInput as t } from "./amount-input/amount-input.js";
|
|
|
2
2
|
import { BorrowRateBlock as a } from "./borrow-rate-block/borrow-rate-block.js";
|
|
3
3
|
import { BorrowRateBlockTest as p } from "./borrow-rate-block/constants.js";
|
|
4
4
|
import { ChartWithSideCard as f } from "./chart-with-side-card/chart-with-side-card.js";
|
|
5
|
-
import { ChartWithSideCardTest as
|
|
5
|
+
import { ChartWithSideCardTest as s } from "./chart-with-side-card/constants.js";
|
|
6
6
|
import { DetailedPageTitle as T } from "./detailed-page-title/detailed-page-title.js";
|
|
7
7
|
import { AsideAlignAnchor as d } from "./details-view/detail-aside/detail-aside-scope.js";
|
|
8
|
-
import { DetailsView as g, DetailsViewLeftPane as c, DetailsViewManagePane as u } from "./details-view/details-view.js";
|
|
8
|
+
import { DetailsView as g, DetailsViewLeftPane as c, DetailsViewManagePane as u, DetailsViewManagePaneSlot as B } from "./details-view/details-view.js";
|
|
9
9
|
import { HealthFactorBlockTest as k } from "./health-factor-block/constants.js";
|
|
10
|
-
import { HealthFactorBlock as
|
|
11
|
-
import { HistoryChart as
|
|
12
|
-
import { InfoLine as
|
|
13
|
-
import { LeverageInput as
|
|
14
|
-
import { LeveragePresetChipsTest as
|
|
15
|
-
import { LeveragePresetChips as
|
|
16
|
-
import { LiquidationParamsTableTest as
|
|
17
|
-
import { LiquidationParamsTable as
|
|
18
|
-
import { LiquidationPriceBlockTest as
|
|
19
|
-
import { LiquidationPriceBlock as
|
|
20
|
-
import { ManagePane as
|
|
21
|
-
import { MoreAccordionTest as
|
|
22
|
-
import { MoreAccordion as
|
|
23
|
-
import { NestedInfoStackTest as
|
|
24
|
-
import { NestedInfoStack as
|
|
25
|
-
import { PageHeadProvider as
|
|
26
|
-
import { PoolApyBreakdownCardTest as
|
|
27
|
-
import { PoolApyBreakdownCard as
|
|
28
|
-
import { PositionAssetsTest as
|
|
29
|
-
import { PositionAssets as
|
|
30
|
-
import { ReviewButton as
|
|
31
|
-
import { SectionHeading as
|
|
32
|
-
import { SegmentedTabs as
|
|
33
|
-
import { Stack as
|
|
34
|
-
import { StatBadge as
|
|
35
|
-
import { StrategyApyBreakdownCardTest as
|
|
10
|
+
import { HealthFactorBlock as b } from "./health-factor-block/health-factor-block.js";
|
|
11
|
+
import { HistoryChart as h } from "./history-chart/history-chart.js";
|
|
12
|
+
import { InfoLine as V, InfoList as M, PointsInfoLine as y } from "./info-list/info-list.js";
|
|
13
|
+
import { LeverageInput as I } from "./leverage-input/leverage-input.js";
|
|
14
|
+
import { LeveragePresetChipsTest as D } from "./leverage-preset-chips/constants.js";
|
|
15
|
+
import { LeveragePresetChips as q } from "./leverage-preset-chips/leverage-preset-chips.js";
|
|
16
|
+
import { LiquidationParamsTableTest as F } from "./liquidation-params-table/constants.js";
|
|
17
|
+
import { LiquidationParamsTable as U } from "./liquidation-params-table/liquidation-params-table.js";
|
|
18
|
+
import { LiquidationPriceBlockTest as z } from "./liquidation-price-block/constants.js";
|
|
19
|
+
import { LiquidationPriceBlock as j } from "./liquidation-price-block/liquidation-price-block.js";
|
|
20
|
+
import { ManagePane as J, ManagePaneActionTab as K, ManagePaneMessage as O, ManagePaneTab as Q, ManagePaneTabDropdown as X } from "./manage-pane/manage-pane.js";
|
|
21
|
+
import { MoreAccordionTest as Z } from "./more-accordion/constants.js";
|
|
22
|
+
import { MoreAccordion as $ } from "./more-accordion/more-accordion.js";
|
|
23
|
+
import { NestedInfoStackTest as oe } from "./nested-info-stack/constants.js";
|
|
24
|
+
import { NestedInfoStack as re } from "./nested-info-stack/nested-info-stack.js";
|
|
25
|
+
import { PageHeadProvider as ie, PageTitle as pe } from "./page-title/page-title.js";
|
|
26
|
+
import { PoolApyBreakdownCardTest as fe } from "./pool-apy-breakdown-card/constants.js";
|
|
27
|
+
import { PoolApyBreakdownCard as se } from "./pool-apy-breakdown-card/pool-apy-breakdown-card.js";
|
|
28
|
+
import { PositionAssetsTest as Te } from "./position-assets/constants.js";
|
|
29
|
+
import { PositionAssets as de } from "./position-assets/position-assets.js";
|
|
30
|
+
import { ReviewButton as ge } from "./review-button/review-button.js";
|
|
31
|
+
import { SectionHeading as ue } from "./section-heading/section-heading.js";
|
|
32
|
+
import { SegmentedTabs as Se } from "./segmented-tabs/segmented-tabs.js";
|
|
33
|
+
import { Stack as Le } from "./stack/stack.js";
|
|
34
|
+
import { StatBadge as Ae, StatBadgeGrid as he } from "./stat-badge/stat-badge.js";
|
|
35
|
+
import { StrategyApyBreakdownCardTest as Ve } from "./strategy-apy-breakdown-card/constants.js";
|
|
36
36
|
import { StrategyApyBreakdownCard as ye } from "./strategy-apy-breakdown-card/strategy-apy-breakdown-card.js";
|
|
37
|
-
import { Tabber as
|
|
37
|
+
import { Tabber as Ie, TabberSection as ve } from "./tabber/tabber.js";
|
|
38
38
|
import { useTitleText as He } from "./text/use-title-text.js";
|
|
39
|
-
import { TimeToLiquidationBlockTest as
|
|
40
|
-
import { TimeToLiquidationBlock as
|
|
41
|
-
import { TitleMetaTest as
|
|
42
|
-
import { TitleMeta as
|
|
43
|
-
import { TokenAmount as
|
|
44
|
-
import { TokenPairSymbolTest as
|
|
45
|
-
import { TokenPairSymbol as
|
|
46
|
-
import { NoValue as
|
|
47
|
-
import { PositionShortLabelTest as
|
|
48
|
-
import { PnlValue as
|
|
49
|
-
import { PositionShortLabel as
|
|
50
|
-
import { PositionStatusBadge as
|
|
51
|
-
import { PositionTypeBadge as
|
|
52
|
-
import { PriceImpactValue as
|
|
53
|
-
import { ApyValue as xo, HealthFactorValue as
|
|
54
|
-
import { AmountInputTest as
|
|
39
|
+
import { TimeToLiquidationBlockTest as Re } from "./time-to-liquidation-block/constants.js";
|
|
40
|
+
import { TimeToLiquidationBlock as Ne } from "./time-to-liquidation-block/time-to-liquidation-block.js";
|
|
41
|
+
import { TitleMetaTest as We } from "./title-meta/constants.js";
|
|
42
|
+
import { TitleMeta as Ge } from "./title-meta/title-meta.js";
|
|
43
|
+
import { TokenAmount as Ee } from "./token-amount/token-amount.js";
|
|
44
|
+
import { TokenPairSymbolTest as Ke } from "./token-pair-symbol/constants.js";
|
|
45
|
+
import { TokenPairSymbol as Qe } from "./token-pair-symbol/token-pair-symbol.js";
|
|
46
|
+
import { NoValue as Ye } from "../no-value/no-value.js";
|
|
47
|
+
import { PositionShortLabelTest as _e, ValueTest as $e } from "./values/constants.js";
|
|
48
|
+
import { PnlValue as oo } from "./values/pnl-value.js";
|
|
49
|
+
import { PositionShortLabel as ro } from "./values/position-short-label.js";
|
|
50
|
+
import { PositionStatusBadge as io } from "./values/position-status-badge.js";
|
|
51
|
+
import { PositionTypeBadge as mo } from "./values/position-type-badge.js";
|
|
52
|
+
import { PriceImpactValue as no } from "./values/price-impact-value.js";
|
|
53
|
+
import { ApyValue as xo, HealthFactorValue as To, LeverageValue as lo, TokenBigint as Po, UsdValue as go, UtilizationValue as co } from "./values/scalars.js";
|
|
54
|
+
import { AmountInputTest as Bo } from "./amount-input/constants.js";
|
|
55
55
|
import { DetailedPageTitleTest as ko } from "./detailed-page-title/constants.js";
|
|
56
|
-
import { DetailsViewTest as
|
|
57
|
-
import { HistoryChartTest as
|
|
58
|
-
import { InfoListTest as
|
|
56
|
+
import { DetailsViewTest as bo } from "./details-view/constants.js";
|
|
57
|
+
import { HistoryChartTest as ho } from "./history-chart/constants.js";
|
|
58
|
+
import { InfoListTest as Vo } from "./info-list/constants.js";
|
|
59
59
|
import { LeverageInputTest as yo } from "./leverage-input/constants.js";
|
|
60
|
-
import { ManagePaneTest as
|
|
61
|
-
import { PageTitleTest as
|
|
62
|
-
import { ReviewButtonTest as
|
|
63
|
-
import { SectionHeadingTest as
|
|
64
|
-
import { SegmentedTabsTest as
|
|
65
|
-
import { StackTest as
|
|
66
|
-
import { StatBadgeTest as
|
|
67
|
-
import { TabberTest as
|
|
68
|
-
import { TokenAmountTest as
|
|
60
|
+
import { ManagePaneTest as Io } from "./manage-pane/constants.js";
|
|
61
|
+
import { PageTitleTest as Do } from "./page-title/constants.js";
|
|
62
|
+
import { ReviewButtonTest as qo } from "./review-button/constants.js";
|
|
63
|
+
import { SectionHeadingTest as Fo } from "./section-heading/constants.js";
|
|
64
|
+
import { SegmentedTabsTest as Uo } from "./segmented-tabs/constants.js";
|
|
65
|
+
import { StackTest as zo } from "./stack/constants.js";
|
|
66
|
+
import { StatBadgeTest as jo } from "./stat-badge/constants.js";
|
|
67
|
+
import { TabberTest as Jo } from "./tabber/constants.js";
|
|
68
|
+
import { TokenAmountTest as Oo } from "./token-amount/constants.js";
|
|
69
69
|
export {
|
|
70
70
|
t as AmountInput,
|
|
71
|
-
|
|
71
|
+
Bo as AmountInputTest,
|
|
72
72
|
xo as ApyValue,
|
|
73
73
|
d as AsideAlignAnchor,
|
|
74
74
|
a as BorrowRateBlock,
|
|
75
75
|
p as BorrowRateBlockTest,
|
|
76
76
|
f as ChartWithSideCard,
|
|
77
|
-
|
|
77
|
+
s as ChartWithSideCardTest,
|
|
78
78
|
T as DetailedPageTitle,
|
|
79
79
|
ko as DetailedPageTitleTest,
|
|
80
80
|
g as DetailsView,
|
|
81
81
|
c as DetailsViewLeftPane,
|
|
82
82
|
u as DetailsViewManagePane,
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
B as DetailsViewManagePaneSlot,
|
|
84
|
+
bo as DetailsViewTest,
|
|
85
|
+
b as HealthFactorBlock,
|
|
85
86
|
k as HealthFactorBlockTest,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
To as HealthFactorValue,
|
|
88
|
+
h as HistoryChart,
|
|
89
|
+
ho as HistoryChartTest,
|
|
90
|
+
V as InfoLine,
|
|
91
|
+
M as InfoList,
|
|
92
|
+
Vo as InfoListTest,
|
|
93
|
+
I as LeverageInput,
|
|
93
94
|
yo as LeverageInputTest,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
95
|
+
q as LeveragePresetChips,
|
|
96
|
+
D as LeveragePresetChipsTest,
|
|
97
|
+
lo as LeverageValue,
|
|
98
|
+
U as LiquidationParamsTable,
|
|
99
|
+
F as LiquidationParamsTableTest,
|
|
100
|
+
j as LiquidationPriceBlock,
|
|
101
|
+
z as LiquidationPriceBlockTest,
|
|
102
|
+
J as ManagePane,
|
|
103
|
+
K as ManagePaneActionTab,
|
|
104
|
+
O as ManagePaneMessage,
|
|
105
|
+
Q as ManagePaneTab,
|
|
106
|
+
X as ManagePaneTabDropdown,
|
|
107
|
+
Io as ManagePaneTest,
|
|
108
|
+
$ as MoreAccordion,
|
|
109
|
+
Z as MoreAccordionTest,
|
|
110
|
+
re as NestedInfoStack,
|
|
111
|
+
oe as NestedInfoStackTest,
|
|
112
|
+
Ye as NoValue,
|
|
113
|
+
ie as PageHeadProvider,
|
|
114
|
+
pe as PageTitle,
|
|
115
|
+
Do as PageTitleTest,
|
|
116
|
+
oo as PnlValue,
|
|
116
117
|
y as PointsInfoLine,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
118
|
+
se as PoolApyBreakdownCard,
|
|
119
|
+
fe as PoolApyBreakdownCardTest,
|
|
120
|
+
de as PositionAssets,
|
|
121
|
+
Te as PositionAssetsTest,
|
|
122
|
+
ro as PositionShortLabel,
|
|
123
|
+
_e as PositionShortLabelTest,
|
|
124
|
+
io as PositionStatusBadge,
|
|
125
|
+
mo as PositionTypeBadge,
|
|
126
|
+
no as PriceImpactValue,
|
|
127
|
+
ge as ReviewButton,
|
|
128
|
+
qo as ReviewButtonTest,
|
|
129
|
+
ue as SectionHeading,
|
|
130
|
+
Fo as SectionHeadingTest,
|
|
131
|
+
Se as SegmentedTabs,
|
|
132
|
+
Uo as SegmentedTabsTest,
|
|
133
|
+
Le as Stack,
|
|
134
|
+
zo as StackTest,
|
|
135
|
+
Ae as StatBadge,
|
|
136
|
+
he as StatBadgeGrid,
|
|
137
|
+
jo as StatBadgeTest,
|
|
137
138
|
ye as StrategyApyBreakdownCard,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
139
|
+
Ve as StrategyApyBreakdownCardTest,
|
|
140
|
+
Ie as Tabber,
|
|
141
|
+
ve as TabberSection,
|
|
142
|
+
Jo as TabberTest,
|
|
143
|
+
Ne as TimeToLiquidationBlock,
|
|
144
|
+
Re as TimeToLiquidationBlockTest,
|
|
145
|
+
Ge as TitleMeta,
|
|
146
|
+
We as TitleMetaTest,
|
|
147
|
+
Ee as TokenAmount,
|
|
148
|
+
Oo as TokenAmountTest,
|
|
149
|
+
Po as TokenBigint,
|
|
150
|
+
Qe as TokenPairSymbol,
|
|
151
|
+
Ke as TokenPairSymbolTest,
|
|
152
|
+
go as UsdValue,
|
|
153
|
+
co as UtilizationValue,
|
|
154
|
+
$e as ValueTest,
|
|
154
155
|
He as useTitleText
|
|
155
156
|
};
|
|
@@ -1,136 +1,126 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { SectionHeading as
|
|
4
|
-
import { Stack as
|
|
5
|
-
import { useTitleText as
|
|
6
|
-
import { TabControl as
|
|
7
|
-
import { TabItem as
|
|
8
|
-
import { TabberTest as
|
|
9
|
-
import { useDetailScrollSpy as
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
id:
|
|
13
|
-
title:
|
|
14
|
-
heading:
|
|
15
|
-
actions:
|
|
16
|
-
children:
|
|
17
|
-
hideHeading:
|
|
1
|
+
import { jsx as o, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as y, useContext as R, useMemo as b, Children as j, useRef as h, useEffect as I, isValidElement as H } from "react";
|
|
3
|
+
import { SectionHeading as O } from "../section-heading/section-heading.js";
|
|
4
|
+
import { Stack as x } from "../stack/stack.js";
|
|
5
|
+
import { useTitleText as w } from "../text/use-title-text.js";
|
|
6
|
+
import { TabControl as A } from "../../tab-control/tab-control.js";
|
|
7
|
+
import { TabItem as B } from "../../tab-control/tab-item.js";
|
|
8
|
+
import { TabberTest as T } from "./constants.js";
|
|
9
|
+
import { useDetailScrollSpy as E } from "./use-detail-scroll-spy.js";
|
|
10
|
+
const v = y({});
|
|
11
|
+
function k({
|
|
12
|
+
id: e,
|
|
13
|
+
title: r,
|
|
14
|
+
heading: c = r,
|
|
15
|
+
actions: a,
|
|
16
|
+
children: l,
|
|
17
|
+
hideHeading: s = !1
|
|
18
18
|
}) {
|
|
19
|
-
const
|
|
20
|
-
return /* @__PURE__ */
|
|
19
|
+
const n = R(v), d = w(), i = !s;
|
|
20
|
+
return /* @__PURE__ */ o(
|
|
21
21
|
"section",
|
|
22
22
|
{
|
|
23
|
-
ref:
|
|
23
|
+
ref: n[e],
|
|
24
24
|
className: "scroll-mt-28",
|
|
25
|
-
"data-scroll-section":
|
|
26
|
-
"data-testid":
|
|
27
|
-
children: /* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
"data-scroll-section": e,
|
|
26
|
+
"data-testid": T.section,
|
|
27
|
+
children: /* @__PURE__ */ u(x, { gap: "md", children: [
|
|
28
|
+
i || a ? /* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-3", children: [
|
|
29
|
+
i ? /* @__PURE__ */ o(O, { children: d(c) }) : /* @__PURE__ */ o("span", {}),
|
|
30
|
+
a
|
|
31
31
|
] }) : null,
|
|
32
|
-
|
|
32
|
+
l
|
|
33
33
|
] })
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
return
|
|
37
|
+
k.displayName = "TabberSection";
|
|
38
|
+
function q(e) {
|
|
39
|
+
return H(e) && e.type === k;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
item:
|
|
43
|
-
...
|
|
41
|
+
function z({
|
|
42
|
+
item: e,
|
|
43
|
+
...r
|
|
44
44
|
}) {
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
45
|
+
return /* @__PURE__ */ u("div", { className: "flex items-stretch overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:h-0 [scrollbar-width:none]", children: [
|
|
46
|
+
/* @__PURE__ */ o("div", { className: "min-w-0 basis-0 grow pb-px", children: /* @__PURE__ */ o(A, { ...r, showBorder: !0 }) }),
|
|
47
|
+
e && /* @__PURE__ */ o("div", { className: "w-auto shrink-0 grow-0 basis-auto", children: e })
|
|
48
48
|
] });
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
children:
|
|
52
|
-
observeKey:
|
|
53
|
-
initialSection:
|
|
54
|
-
testId:
|
|
55
|
-
mobileManagePane: m
|
|
50
|
+
function U({
|
|
51
|
+
children: e,
|
|
52
|
+
observeKey: r,
|
|
53
|
+
initialSection: c,
|
|
54
|
+
testId: a
|
|
56
55
|
}) {
|
|
57
|
-
const
|
|
58
|
-
() =>
|
|
59
|
-
[
|
|
60
|
-
), l =
|
|
61
|
-
() =>
|
|
62
|
-
[
|
|
63
|
-
),
|
|
64
|
-
() => i === "" ? [] : i.split("|"),
|
|
65
|
-
[i]
|
|
66
|
-
), w = g({}), d = f(() => {
|
|
56
|
+
const l = b(
|
|
57
|
+
() => j.toArray(e).filter(q),
|
|
58
|
+
[e]
|
|
59
|
+
), s = l.map((t) => t.props.id).join("|"), n = b(
|
|
60
|
+
() => s === "" ? [] : s.split("|"),
|
|
61
|
+
[s]
|
|
62
|
+
), d = h({}), i = b(() => {
|
|
67
63
|
const t = {
|
|
68
|
-
...
|
|
64
|
+
...d.current
|
|
69
65
|
};
|
|
70
|
-
for (const
|
|
71
|
-
t[
|
|
72
|
-
return
|
|
73
|
-
}, [n]),
|
|
74
|
-
|
|
66
|
+
for (const S of n)
|
|
67
|
+
t[S] === void 0 && (t[S] = { current: null });
|
|
68
|
+
return d.current = t, t;
|
|
69
|
+
}, [n]), C = w(), { activeSection: m, scrollToSection: f } = E(
|
|
70
|
+
i,
|
|
75
71
|
n,
|
|
76
|
-
|
|
77
|
-
),
|
|
78
|
-
|
|
79
|
-
if (
|
|
80
|
-
const t =
|
|
81
|
-
|
|
82
|
-
|
|
72
|
+
r
|
|
73
|
+
), p = h(!1), g = h(r);
|
|
74
|
+
I(() => {
|
|
75
|
+
if (r !== g.current && (g.current = r, p.current = !1), p.current || !r) return;
|
|
76
|
+
const t = c ?? n[0];
|
|
77
|
+
p.current = !0, !(t === void 0 || t === n[0]) && i[t] !== void 0 && requestAnimationFrame(() => {
|
|
78
|
+
f(t);
|
|
83
79
|
});
|
|
84
|
-
}, [
|
|
85
|
-
const
|
|
80
|
+
}, [r, c, f, n, i]);
|
|
81
|
+
const N = l.map((t) => ({
|
|
86
82
|
id: t.props.id,
|
|
87
|
-
item: /* @__PURE__ */
|
|
88
|
-
|
|
83
|
+
item: /* @__PURE__ */ o(
|
|
84
|
+
B,
|
|
89
85
|
{
|
|
90
|
-
selected:
|
|
91
|
-
label:
|
|
86
|
+
selected: m === t.props.id,
|
|
87
|
+
label: C(t.props.title)
|
|
92
88
|
}
|
|
93
89
|
)
|
|
94
|
-
}))
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
);
|
|
99
|
-
return /* @__PURE__ */ e(u, { gap: "lg", "data-testid": c ?? S.root, children: /* @__PURE__ */ p(R.Provider, { value: d, children: [
|
|
100
|
-
k.length > 0 ? /* @__PURE__ */ e(u, { gap: "xl", children: k }) : null,
|
|
101
|
-
m,
|
|
102
|
-
/* @__PURE__ */ e(W, { testId: S.bar, children: /* @__PURE__ */ e(
|
|
103
|
-
V,
|
|
90
|
+
}));
|
|
91
|
+
return /* @__PURE__ */ o(x, { gap: "lg", "data-testid": a ?? T.root, children: /* @__PURE__ */ u(v.Provider, { value: i, children: [
|
|
92
|
+
/* @__PURE__ */ o(D, { testId: T.bar, children: /* @__PURE__ */ o(
|
|
93
|
+
z,
|
|
104
94
|
{
|
|
105
95
|
state: {
|
|
106
|
-
id:
|
|
107
|
-
index: n.indexOf(
|
|
96
|
+
id: m,
|
|
97
|
+
index: n.indexOf(m),
|
|
108
98
|
handleTabChange: (t) => {
|
|
109
|
-
|
|
99
|
+
f(t);
|
|
110
100
|
}
|
|
111
101
|
},
|
|
112
|
-
tabs:
|
|
102
|
+
tabs: N,
|
|
113
103
|
item: null
|
|
114
104
|
}
|
|
115
105
|
) }),
|
|
116
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ o(x, { gap: "xl", children: e })
|
|
117
107
|
] }) });
|
|
118
108
|
}
|
|
119
|
-
function
|
|
120
|
-
children:
|
|
121
|
-
testId:
|
|
109
|
+
function D({
|
|
110
|
+
children: e,
|
|
111
|
+
testId: r
|
|
122
112
|
}) {
|
|
123
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ o(
|
|
124
114
|
"div",
|
|
125
115
|
{
|
|
126
116
|
className: "sticky top-0 z-20 -mx-1 px-1 pt-3 sm:pt-4 bg-background/75 backdrop-blur-md backdrop-saturate-150",
|
|
127
|
-
"data-testid":
|
|
128
|
-
children:
|
|
117
|
+
"data-testid": r,
|
|
118
|
+
children: e
|
|
129
119
|
}
|
|
130
120
|
);
|
|
131
121
|
}
|
|
132
122
|
export {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
123
|
+
U as Tabber,
|
|
124
|
+
k as TabberSection,
|
|
125
|
+
T as TabberTest
|
|
136
126
|
};
|