@gearbox-protocol/ui-kit 4.0.0-next.62 → 4.0.0-next.64

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.
Files changed (27) hide show
  1. package/dist/cjs/components/graph/graph.cjs +1 -1
  2. package/dist/cjs/components/graph/series-config.cjs +1 -1
  3. package/dist/cjs/components/index.cjs +1 -1
  4. package/dist/cjs/components/table/grid-table.cjs +1 -1
  5. package/dist/cjs/components/trading-view/constants.cjs +1 -0
  6. package/dist/cjs/components/trading-view/index.cjs +1 -1
  7. package/dist/cjs/components/trading-view/price-scale-titles.cjs +1 -0
  8. package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
  9. package/dist/cjs/index.cjs +1 -1
  10. package/dist/esm/components/graph/graph.js +257 -266
  11. package/dist/esm/components/graph/series-config.js +10 -1
  12. package/dist/esm/components/index.js +70 -68
  13. package/dist/esm/components/table/grid-table.js +94 -90
  14. package/dist/esm/components/trading-view/constants.js +7 -0
  15. package/dist/esm/components/trading-view/index.js +4 -2
  16. package/dist/esm/components/trading-view/price-scale-titles.js +52 -0
  17. package/dist/esm/components/trading-view/trading-view.js +119 -115
  18. package/dist/esm/index.js +124 -122
  19. package/dist/globals.css +1 -1
  20. package/dist/types/components/graph/graph.d.ts +1 -5
  21. package/dist/types/components/graph/series-config.d.ts +13 -0
  22. package/dist/types/components/table/grid-table.d.ts +0 -52
  23. package/dist/types/components/trading-view/constants.d.ts +4 -0
  24. package/dist/types/components/trading-view/index.d.ts +1 -0
  25. package/dist/types/components/trading-view/price-scale-titles.d.ts +16 -0
  26. package/dist/types/components/trading-view/trading-view.d.ts +1 -1
  27. package/package.json +1 -1
@@ -1 +1,10 @@
1
-
1
+ function c(t) {
2
+ let r = 0;
3
+ return t.map((e) => {
4
+ const l = e.priceScaleId ?? (r === 0 ? "left" : "right");
5
+ return e.data.length > 0 && r++, { series: e, side: l };
6
+ });
7
+ }
8
+ export {
9
+ c as resolvePriceScaleSides
10
+ };
@@ -9,7 +9,7 @@ import { BorrowRateBlock as h } from "./base/borrow-rate-block/borrow-rate-block
9
9
  import { BorrowRateBlockTest as I } from "./base/borrow-rate-block/constants.js";
10
10
  import { ChartWithSideCard as y } from "./base/chart-with-side-card/chart-with-side-card.js";
11
11
  import { ChartWithSideCardTest as H } from "./base/chart-with-side-card/constants.js";
12
- import { DetailedPageTitle as V } from "./base/detailed-page-title/detailed-page-title.js";
12
+ import { DetailedPageTitle as R } from "./base/detailed-page-title/detailed-page-title.js";
13
13
  import { AsideAlignAnchor as E } from "./base/details-view/detail-aside/detail-aside-scope.js";
14
14
  import { DetailsView as W, DetailsViewLeftPane as q, DetailsViewManagePane as G } from "./base/details-view/details-view.js";
15
15
  import { HealthFactorBlockTest as U } from "./base/health-factor-block/constants.js";
@@ -31,7 +31,7 @@ import { NestedInfoStack as ko } from "./base/nested-info-stack/nested-info-stac
31
31
  import { PageHeadProvider as wo, PageTitle as Io } from "./base/page-title/page-title.js";
32
32
  import { PoolApyBreakdownCardTest as yo } from "./base/pool-apy-breakdown-card/constants.js";
33
33
  import { PoolApyBreakdownCard as Ho } from "./base/pool-apy-breakdown-card/pool-apy-breakdown-card.js";
34
- import { PositionAssetsTest as Vo } from "./base/position-assets/constants.js";
34
+ import { PositionAssetsTest as Ro } from "./base/position-assets/constants.js";
35
35
  import { PositionAssets as Eo } from "./base/position-assets/position-assets.js";
36
36
  import { ReviewButton as Wo } from "./base/review-button/review-button.js";
37
37
  import { SectionHeading as Go } from "./base/section-heading/section-heading.js";
@@ -56,7 +56,7 @@ import { PositionShortLabel as ke } from "./base/values/position-short-label.js"
56
56
  import { PositionStatusBadge as we } from "./base/values/position-status-badge.js";
57
57
  import { PositionTypeBadge as Me } from "./base/values/position-type-badge.js";
58
58
  import { PriceImpactValue as Fe } from "./base/values/price-impact-value.js";
59
- import { ApyValue as Re, HealthFactorValue as Ve, LeverageValue as ve, TokenBigint as Ee, UsdValue as Ne, UtilizationValue as We } from "./base/values/scalars.js";
59
+ import { ApyValue as Ve, HealthFactorValue as Re, LeverageValue as ve, TokenBigint as Ee, UsdValue as Ne, UtilizationValue as We } from "./base/values/scalars.js";
60
60
  import { BaseLink as Ge } from "./base-link/base-link.js";
61
61
  import { BaseTable as Ue } from "./base-table/base-table.js";
62
62
  import { BaseTableLine as ze } from "./base-table/base-table-line.js";
@@ -78,7 +78,7 @@ import { AllocationWheelTest as Lr, CollateralAllocationTooltipTest as kr } from
78
78
  import { NotificationCenter as wr } from "./composites/notification-center/notification-center.js";
79
79
  import { PoolAssetsTableTest as Mr } from "./composites/pool-assets-table/constants.js";
80
80
  import { PoolAssetsTable as Fr } from "./composites/pool-assets-table/pool-assets-table.js";
81
- import { TransactionConfirmAmountFieldTest as Rr } from "./composites/tx-preview/confirm/amounts/constants.js";
81
+ import { TransactionConfirmAmountFieldTest as Vr } from "./composites/tx-preview/confirm/amounts/constants.js";
82
82
  import { TransactionConfirmAmountField as vr } from "./composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js";
83
83
  import { TransactionConfirmDialogTest as Nr } from "./composites/tx-preview/confirm/dialog/constants.js";
84
84
  import { TransactionConfirmShell as qr } from "./composites/tx-preview/confirm/dialog/TransactionConfirmShell.js";
@@ -103,7 +103,7 @@ import { DialogHeader as kt } from "./dialog/dialog-header.js";
103
103
  import { DialogModalContainer as wt } from "./dialog/dialog-modal-container.js";
104
104
  import { DialogTitle as Mt } from "./dialog/dialog-title.js";
105
105
  import { OneFieldDialog as Ft } from "./dialog/one-field-dialog.js";
106
- import { DisabledWrap as Rt } from "./disabled-wrap/disabled-wrap.js";
106
+ import { DisabledWrap as Vt } from "./disabled-wrap/disabled-wrap.js";
107
107
  import { DropdownMenu as vt, DropdownMenuPortal as Et, DropdownMenuTrigger as Nt } from "./dropdown-menu/dropdown-menu.js";
108
108
  import { DropdownMenuContent as qt } from "./dropdown-menu/dropdown-menu-content.js";
109
109
  import { DropdownMenuItem as Ot } from "./dropdown-menu/dropdown-menu-item.js";
@@ -129,7 +129,7 @@ import { Col as ka } from "./layout/col/col.js";
129
129
  import { Container as wa } from "./layout/container/container.js";
130
130
  import { Grid as Ma } from "./layout/grid/grid.js";
131
131
  import { Layout as Fa } from "./layout/layout/layout.js";
132
- import { BlockedRegionDialog as Ra, LegalAgreementDialog as Va } from "./legal-agreement/legal-agreement-dialog.js";
132
+ import { BlockedRegionDialog as Va, LegalAgreementDialog as Ra } from "./legal-agreement/legal-agreement-dialog.js";
133
133
  import { LegalAgreementLink as Ea } from "./legal-agreement/legal-agreement-link.js";
134
134
  import { Link as Wa } from "./link/link.js";
135
135
  import { Loader as Ga } from "./loader/loader.js";
@@ -153,7 +153,7 @@ import { SimpleDropdown as kp } from "./simple-dropdown/simple-dropdown.js";
153
153
  import { SimpleDropdownMenuItem as wp } from "./simple-dropdown/simple-dropdown-menu-item.js";
154
154
  import { Skeleton as Mp } from "./skeleton/skeleton.js";
155
155
  import { SkeletonStack as Fp } from "./skeleton/skeleton-stack.js";
156
- import { SliderTest as Rp } from "./slider/constants.js";
156
+ import { SliderTest as Vp } from "./slider/constants.js";
157
157
  import { Spinner as vp } from "./spinner/spinner.js";
158
158
  import { SpinnerLoader as Np } from "./spinner-loader/spinner-loader.js";
159
159
  import { SplitList as qp } from "./split-list/split-list.js";
@@ -170,31 +170,32 @@ import { TokenSymbol as dm } from "./token-symbol/token-symbol.js";
170
170
  import { TokenTemplate as cm } from "./token-template/token-template.js";
171
171
  import { SimpleTooltip as Cm } from "./tooltip/simple-tooltip.js";
172
172
  import { Tooltip as Pm, TooltipContent as Dm, TooltipProvider as Bm, TooltipTrigger as bm } from "./tooltip/tooltip.js";
173
- import { TradingView as Lm } from "./trading-view/trading-view.js";
174
- import { TruncatedText as hm } from "./truncated-text/truncated-text.js";
175
- import { FormattedMessageTyped as Im, useIntlTyped as Mm } from "./typed-intl/index.js";
176
- import { Typography as Fm } from "./typography/typography.js";
177
- import { VerticalIndicator as Rm } from "./vertical-indicator/vertical-indicator.js";
178
- import { VSpace as vm } from "./vspace/vspace.js";
179
- import { WithCopy as Nm } from "./with-copy/with-copy.js";
180
- import { ApyBreakdownTooltip as qm } from "./yield-breakdown-tooltip/yield-breakdown-tooltip.js";
181
- import { AmountInputTest as Om } from "./base/amount-input/constants.js";
182
- import { DetailedPageTitleTest as _m } from "./base/detailed-page-title/constants.js";
183
- import { DetailsViewTest as Ym } from "./base/details-view/constants.js";
184
- import { HistoryChartTest as jm } from "./base/history-chart/constants.js";
185
- import { InfoListTest as Km } from "./base/info-list/constants.js";
186
- import { LeverageInputTest as Xm } from "./base/leverage-input/constants.js";
187
- import { ManagePaneTest as oi } from "./base/manage-pane/constants.js";
188
- import { PageTitleTest as ri } from "./base/page-title/constants.js";
189
- import { ReviewButtonTest as ai } from "./base/review-button/constants.js";
190
- import { SectionHeadingTest as mi } from "./base/section-heading/constants.js";
191
- import { SegmentedTabsTest as ni } from "./base/segmented-tabs/constants.js";
192
- import { StackTest as xi } from "./base/stack/constants.js";
193
- import { StatBadgeTest as si } from "./base/stat-badge/constants.js";
194
- import { TabberTest as di } from "./base/tabber/constants.js";
195
- import { TokenAmountTest as ci } from "./base/token-amount/constants.js";
196
- import { BaseTableLineTest as Ci, BaseTableTest as Si } from "./base-table/constants.js";
197
- import { tokenTemplateString as Di } from "../utils/templates.js";
173
+ import { TradingViewTest as Lm } from "./trading-view/constants.js";
174
+ import { TradingView as hm } from "./trading-view/trading-view.js";
175
+ import { TruncatedText as Im } from "./truncated-text/truncated-text.js";
176
+ import { FormattedMessageTyped as ym, useIntlTyped as Fm } from "./typed-intl/index.js";
177
+ import { Typography as Vm } from "./typography/typography.js";
178
+ import { VerticalIndicator as vm } from "./vertical-indicator/vertical-indicator.js";
179
+ import { VSpace as Nm } from "./vspace/vspace.js";
180
+ import { WithCopy as qm } from "./with-copy/with-copy.js";
181
+ import { ApyBreakdownTooltip as Om } from "./yield-breakdown-tooltip/yield-breakdown-tooltip.js";
182
+ import { AmountInputTest as _m } from "./base/amount-input/constants.js";
183
+ import { DetailedPageTitleTest as Ym } from "./base/detailed-page-title/constants.js";
184
+ import { DetailsViewTest as jm } from "./base/details-view/constants.js";
185
+ import { HistoryChartTest as Km } from "./base/history-chart/constants.js";
186
+ import { InfoListTest as Xm } from "./base/info-list/constants.js";
187
+ import { LeverageInputTest as oi } from "./base/leverage-input/constants.js";
188
+ import { ManagePaneTest as ri } from "./base/manage-pane/constants.js";
189
+ import { PageTitleTest as ai } from "./base/page-title/constants.js";
190
+ import { ReviewButtonTest as mi } from "./base/review-button/constants.js";
191
+ import { SectionHeadingTest as ni } from "./base/section-heading/constants.js";
192
+ import { SegmentedTabsTest as xi } from "./base/segmented-tabs/constants.js";
193
+ import { StackTest as si } from "./base/stack/constants.js";
194
+ import { StatBadgeTest as di } from "./base/stat-badge/constants.js";
195
+ import { TabberTest as ci } from "./base/tabber/constants.js";
196
+ import { TokenAmountTest as Ci } from "./base/token-amount/constants.js";
197
+ import { BaseTableLineTest as Pi, BaseTableTest as Di } from "./base-table/constants.js";
198
+ import { tokenTemplateString as bi } from "../utils/templates.js";
198
199
  export {
199
200
  r as AlertBadge,
200
201
  a as AlertDialog,
@@ -209,11 +210,11 @@ export {
209
210
  d as AlertModal,
210
211
  Lr as AllocationWheelTest,
211
212
  L as AmountInput,
212
- Om as AmountInputTest,
213
+ _m as AmountInputTest,
213
214
  Ba as AppFooter,
214
215
  Aa as AppHeader,
215
- qm as ApyBreakdownTooltip,
216
- Re as ApyValue,
216
+ Om as ApyBreakdownTooltip,
217
+ Ve as ApyValue,
217
218
  E as AsideAlignAnchor,
218
219
  c as AssetsListCell,
219
220
  Qe as BackButton,
@@ -221,9 +222,9 @@ export {
221
222
  Ge as BaseLink,
222
223
  Ue as BaseTable,
223
224
  ze as BaseTableLine,
224
- Ci as BaseTableLineTest,
225
- Si as BaseTableTest,
226
- Ra as BlockedRegionDialog,
225
+ Pi as BaseTableLineTest,
226
+ Di as BaseTableTest,
227
+ Va as BlockedRegionDialog,
227
228
  h as BorrowRateBlock,
228
229
  I as BorrowRateBlockTest,
229
230
  Ze as BreadCrumbs,
@@ -250,13 +251,13 @@ export {
250
251
  er as CopyButton,
251
252
  oa as DEFAULT_SERIES_COLORS,
252
253
  Tr as DangerZone,
253
- V as DetailedPageTitle,
254
+ R as DetailedPageTitle,
254
255
  ft as DetailedPageTitleExplorerDropdown,
255
- _m as DetailedPageTitleTest,
256
+ Ym as DetailedPageTitleTest,
256
257
  W as DetailsView,
257
258
  q as DetailsViewLeftPane,
258
259
  G as DetailsViewManagePane,
259
- Ym as DetailsViewTest,
260
+ jm as DetailsViewTest,
260
261
  Tt as Dialog,
261
262
  ct as DialogContainer,
262
263
  Ct as DialogContent,
@@ -267,7 +268,7 @@ export {
267
268
  wt as DialogModalContainer,
268
269
  Mt as DialogTitle,
269
270
  dt as DialogTrigger,
270
- Rt as DisabledWrap,
271
+ Vt as DisabledWrap,
271
272
  vt as DropdownMenu,
272
273
  qt as DropdownMenuContent,
273
274
  Ot as DropdownMenuItem,
@@ -280,7 +281,7 @@ export {
280
281
  tr as ExternalButton,
281
282
  da as FaIcon,
282
283
  Kt as FadeoutLoading,
283
- Im as FormattedMessageTyped,
284
+ ym as FormattedMessageTyped,
284
285
  Xt as FormattedNumberString,
285
286
  Ma as Grid,
286
287
  _p as GridErrorLine,
@@ -290,22 +291,22 @@ export {
290
291
  ma as HealthFactor,
291
292
  z as HealthFactorBlock,
292
293
  U as HealthFactorBlockTest,
293
- Ve as HealthFactorValue,
294
+ Re as HealthFactorValue,
294
295
  na as HelpTip,
295
296
  Z as HistoryChart,
296
- jm as HistoryChartTest,
297
+ Km as HistoryChartTest,
297
298
  sa as IconButton,
298
299
  ca as InfiniteScrollWrapper,
299
300
  J as InfoLine,
300
301
  K as InfoList,
301
- Km as InfoListTest,
302
+ Xm as InfoListTest,
302
303
  Ca as Input,
303
304
  Pa as Label,
304
305
  Fa as Layout,
305
- Va as LegalAgreementDialog,
306
+ Ra as LegalAgreementDialog,
306
307
  Ea as LegalAgreementLink,
307
308
  $ as LeverageInput,
308
- Xm as LeverageInputTest,
309
+ oi as LeverageInputTest,
309
310
  to as LeveragePresetChips,
310
311
  eo as LeveragePresetChipsTest,
311
312
  ve as LeverageValue,
@@ -321,7 +322,7 @@ export {
321
322
  co as ManagePaneMessage,
322
323
  uo as ManagePaneTab,
323
324
  Co as ManagePaneTabDropdown,
324
- oi as ManagePaneTest,
325
+ ri as ManagePaneTest,
325
326
  za as MarkdownText,
326
327
  lt as Modal,
327
328
  Bo as MoreAccordion,
@@ -336,7 +337,7 @@ export {
336
337
  Ft as OneFieldDialog,
337
338
  wo as PageHeadProvider,
338
339
  Io as PageTitle,
339
- ri as PageTitleTest,
340
+ ai as PageTitleTest,
340
341
  Ae as PnlValue,
341
342
  $a as PointsIcon,
342
343
  Q as PointsInfoLine,
@@ -346,7 +347,7 @@ export {
346
347
  Mr as PoolAssetsTableTest,
347
348
  ep as PoolPointsIndicator,
348
349
  Eo as PositionAssets,
349
- Vo as PositionAssetsTest,
350
+ Ro as PositionAssetsTest,
350
351
  ke as PositionShortLabel,
351
352
  De as PositionShortLabelTest,
352
353
  we as PositionStatusBadge,
@@ -358,15 +359,15 @@ export {
358
359
  tp as RadioGroup,
359
360
  ap as RadioGroupItem,
360
361
  Wo as ReviewButton,
361
- ai as ReviewButtonTest,
362
+ mi as ReviewButtonTest,
362
363
  xp as SdkStatusPill,
363
364
  np as SdkStatusPillTest,
364
365
  sp as SearchLine,
365
366
  Go as SectionHeading,
366
- mi as SectionHeadingTest,
367
+ ni as SectionHeadingTest,
367
368
  dp as SegmentedControl,
368
369
  Uo as SegmentedTabs,
369
- ni as SegmentedTabsTest,
370
+ xi as SegmentedTabsTest,
370
371
  cp as Select,
371
372
  up as SelectContent,
372
373
  Cp as SelectItem,
@@ -379,15 +380,15 @@ export {
379
380
  Cm as SimpleTooltip,
380
381
  Mp as Skeleton,
381
382
  Fp as SkeletonStack,
382
- Rp as SliderTest,
383
+ Vp as SliderTest,
383
384
  vp as Spinner,
384
385
  Np as SpinnerLoader,
385
386
  qp as SplitList,
386
387
  zo as Stack,
387
- xi as StackTest,
388
+ si as StackTest,
388
389
  Zo as StatBadge,
389
390
  jo as StatBadgeGrid,
390
- si as StatBadgeTest,
391
+ di as StatBadgeTest,
391
392
  Xo as StrategyApyBreakdownCard,
392
393
  Ko as StrategyApyBreakdownCardTest,
393
394
  Dr as StyledButton,
@@ -396,7 +397,7 @@ export {
396
397
  Op as TabControl,
397
398
  oe as Tabber,
398
399
  ee as TabberSection,
399
- di as TabberTest,
400
+ ci as TabberTest,
400
401
  Yp as Table,
401
402
  Zp as TableBody,
402
403
  jp as TableCell,
@@ -416,7 +417,7 @@ export {
416
417
  le as TitleMeta,
417
418
  fe as TitleMetaTest,
418
419
  Te as TokenAmount,
419
- ci as TokenAmountTest,
420
+ Ci as TokenAmountTest,
420
421
  Ee as TokenBigint,
421
422
  sm as TokenIcon,
422
423
  ue as TokenPairSymbol,
@@ -427,9 +428,10 @@ export {
427
428
  Dm as TooltipContent,
428
429
  Bm as TooltipProvider,
429
430
  bm as TooltipTrigger,
430
- Lm as TradingView,
431
+ hm as TradingView,
432
+ Lm as TradingViewTest,
431
433
  vr as TransactionConfirmAmountField,
432
- Rr as TransactionConfirmAmountFieldTest,
434
+ Vr as TransactionConfirmAmountFieldTest,
433
435
  Nr as TransactionConfirmDialogTest,
434
436
  Or as TransactionConfirmExecuteButton,
435
437
  _r as TransactionConfirmExecuteButtonTest,
@@ -440,15 +442,15 @@ export {
440
442
  Yr as TransactionConfirmSuccessResultTest,
441
443
  $r as TransactionConfirmTxHashRow,
442
444
  Zr as TransactionConfirmTxHashRowTest,
443
- hm as TruncatedText,
444
- Fm as Typography,
445
+ Im as TruncatedText,
446
+ Vm as Typography,
445
447
  Ne as UsdValue,
446
448
  We as UtilizationValue,
447
- vm as VSpace,
449
+ Nm as VSpace,
448
450
  Be as ValueTest,
449
- Rm as VerticalIndicator,
450
- Nm as WithCopy,
451
- Di as tokenTemplateString,
452
- Mm as useIntlTyped,
451
+ vm as VerticalIndicator,
452
+ qm as WithCopy,
453
+ bi as tokenTemplateString,
454
+ Fm as useIntlTyped,
453
455
  te as useTitleText
454
456
  };
@@ -1,10 +1,10 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import { cva as g } from "class-variance-authority";
3
3
  import * as n from "react";
4
4
  import { BaseLink as H } from "../base-link/base-link.js";
5
- import { Col as j } from "../layout/col/col.js";
6
- import { Grid as k } from "../layout/grid/grid.js";
7
- import { cn as r } from "../../utils/cn.js";
5
+ import { Col as z } from "../layout/col/col.js";
6
+ import { Grid as C } from "../layout/grid/grid.js";
7
+ import { cn as a } from "../../utils/cn.js";
8
8
  const D = g("w-full", {
9
9
  variants: {
10
10
  size: {
@@ -16,24 +16,24 @@ const D = g("w-full", {
16
16
  defaultVariants: {
17
17
  size: "default"
18
18
  }
19
- }), C = n.forwardRef(
20
- ({ className: e, size: t, cols: a = 12, gap: d = 0, wrapperClassName: s, ...f }, c) => /* @__PURE__ */ i("div", { className: r("relative w-full overflow-auto", s), children: /* @__PURE__ */ i(
21
- k,
19
+ }), K = n.forwardRef(
20
+ ({ className: e, size: t, cols: r = 12, gap: d = 0, wrapperClassName: s, ...f }, u) => /* @__PURE__ */ o("div", { className: a("relative w-full overflow-auto", s), children: /* @__PURE__ */ o(
21
+ C,
22
22
  {
23
- ref: c,
24
- cols: a,
23
+ ref: u,
24
+ cols: r,
25
25
  gap: d,
26
- className: r(D({ size: t, className: e })),
26
+ className: a(D({ size: t, className: e })),
27
27
  ...f
28
28
  }
29
29
  ) })
30
30
  );
31
- C.displayName = "GridTable";
32
- const K = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ i(
31
+ K.displayName = "GridTable";
32
+ const A = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ o(
33
33
  "div",
34
34
  {
35
- ref: a,
36
- className: r(
35
+ ref: r,
36
+ className: a(
37
37
  "contents",
38
38
  // Full-width border for header (no insets)
39
39
  "[&>*>*]:after:absolute [&>*>*]:after:bottom-0 [&>*>*]:after:inset-x-0 [&>*>*]:after:h-px [&>*>*]:after:bg-border",
@@ -44,126 +44,130 @@ const K = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ i(
44
44
  ...t
45
45
  }
46
46
  ));
47
- K.displayName = "GridTableHeader";
48
- const A = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ i(
47
+ A.displayName = "GridTableHeader";
48
+ const E = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ o(
49
49
  "div",
50
50
  {
51
- ref: a,
52
- className: r("contents [&>*:last-child>*]:after:hidden", e),
51
+ ref: r,
52
+ className: a("contents [&>*:last-child>*]:after:hidden", e),
53
53
  ...t
54
54
  }
55
55
  ));
56
- A.displayName = "GridTableBody";
56
+ E.displayName = "GridTableBody";
57
+ function j(e) {
58
+ const t = e.target.closest(
59
+ "a, button, input, select, textarea, [role='button']"
60
+ );
61
+ return t !== null && t !== e.currentTarget;
62
+ }
57
63
  const S = n.forwardRef(
58
64
  ({
59
65
  className: e,
60
66
  cols: t,
61
- gap: a = 0,
67
+ gap: r = 0,
62
68
  last: d,
63
69
  height: s,
64
70
  hideValue: f,
65
- noHover: c,
66
- noRound: y,
71
+ noHover: u,
72
+ noRound: x,
67
73
  onRowClick: l,
68
- href: x,
69
- target: z,
70
- rel: w,
71
- style: B,
72
- children: u,
73
- ...m
74
- }, b) => {
75
- const T = typeof s == "number" ? `${s}px` : s, v = n.useCallback(
76
- (o) => {
77
- !l || o.target.closest(
78
- "a, button, input, select, textarea, [role='button']"
79
- ) || l(o);
74
+ href: c,
75
+ target: w,
76
+ rel: B,
77
+ style: V,
78
+ children: m,
79
+ ...b
80
+ }, p) => {
81
+ const v = typeof s == "number" ? `${s}px` : s, T = n.useCallback(
82
+ (i) => {
83
+ l && (j(i) || l(i));
80
84
  },
81
85
  [l]
82
86
  ), h = n.useCallback(
83
- (o) => {
84
- if (l && (o.key === "Enter" || o.key === " ")) {
85
- if (o.preventDefault(), o.target.closest(
86
- "a, button, input, select, textarea, [role='button']"
87
- ))
88
- return;
89
- l(o);
87
+ (i) => {
88
+ if (l && !(i.key !== "Enter" && i.key !== " ") && !j(i)) {
89
+ if (c) {
90
+ if (i.key !== "Enter") return;
91
+ } else
92
+ i.preventDefault();
93
+ l(i);
90
94
  }
91
95
  },
92
- [l]
93
- ), N = r(
96
+ [l, c]
97
+ ), N = a(
94
98
  "[&>*]:relative [&>*]:transition-colors data-[state=selected]:[&>*]:bg-muted",
95
99
  "[&>*]:after:absolute [&>*]:after:bottom-0 [&>*]:after:inset-x-0 [&>*]:after:h-px [&>*]:after:bg-border",
96
- !y && [
100
+ !x && [
97
101
  "[&>*:first-child]:after:left-3",
98
102
  "[&>*:last-child]:after:right-3"
99
103
  ],
100
- !c && [
104
+ !u && [
101
105
  "[&>*]:z-0",
102
106
  "[&>*]:before:absolute [&>*]:before:inset-x-0 [&>*]:before:top-0 [&>*]:before:bottom-px [&>*]:before:-z-10 [&>*]:before:bg-muted/50 [&>*]:before:opacity-0 [&>*]:before:transition-opacity",
103
107
  "hover:[&>*]:before:opacity-100",
104
- !y && "[&>*:first-child]:before:rounded-l-lg [&>*:last-child]:before:rounded-r-lg"
108
+ !x && "[&>*:first-child]:before:rounded-l-lg [&>*:last-child]:before:rounded-r-lg"
105
109
  ],
106
110
  d && "[&>*]:after:hidden",
107
111
  f && "[&>*]:opacity-0"
108
- ), G = r(
112
+ ), G = a(
109
113
  "grid grid-cols-subgrid col-span-full",
110
114
  N,
111
115
  "cursor-pointer",
112
116
  e
113
- ), p = {
114
- ...B,
115
- ...T ? { height: T } : {}
117
+ ), y = {
118
+ ...V,
119
+ ...v ? { height: v } : {}
116
120
  };
117
- return x ? /* @__PURE__ */ i(
121
+ return c ? /* @__PURE__ */ o(
118
122
  H,
119
123
  {
120
- ref: b,
121
- href: x,
122
- target: z,
123
- rel: w,
124
+ ref: p,
125
+ href: c,
126
+ target: w,
127
+ rel: B,
124
128
  size: "unset",
125
129
  variant: "unset",
126
- className: r("no-underline text-foreground!", G),
127
- style: p,
128
- onClick: l ? v : void 0,
130
+ className: a("no-underline text-foreground!", G),
131
+ style: y,
132
+ onClick: l ? T : void 0,
129
133
  onKeyDown: l ? h : void 0,
130
- ...m,
131
- children: u
134
+ ...b,
135
+ children: m
132
136
  }
133
137
  ) : l ? (
134
138
  // biome-ignore lint/a11y/useSemanticElements: Using div with subgrid layout, not a semantic table
135
- /* @__PURE__ */ i(
139
+ /* @__PURE__ */ o(
136
140
  "div",
137
141
  {
138
- ref: b,
142
+ ref: p,
139
143
  role: "row",
140
144
  tabIndex: 0,
141
145
  className: G,
142
- style: p,
143
- onClick: v,
146
+ style: y,
147
+ onClick: T,
144
148
  onKeyDown: h,
145
- ...m,
146
- children: u
149
+ ...b,
150
+ children: m
147
151
  }
148
152
  )
149
- ) : /* @__PURE__ */ i(
153
+ ) : /* @__PURE__ */ o(
150
154
  "div",
151
155
  {
152
- ref: b,
153
- className: r(
156
+ ref: p,
157
+ className: a(
154
158
  "grid grid-cols-subgrid col-span-full",
155
159
  N,
156
160
  e
157
161
  ),
158
- style: p,
159
- ...m,
160
- children: u
162
+ style: y,
163
+ ...b,
164
+ children: m
161
165
  }
162
166
  );
163
167
  }
164
168
  );
165
169
  S.displayName = "GridTableRow";
166
- const E = g(
170
+ const k = g(
167
171
  "flex items-center justify-start text-left align-middle font-medium text-muted-foreground !bg-transparent",
168
172
  {
169
173
  variants: {
@@ -190,13 +194,13 @@ const E = g(
190
194
  }
191
195
  }
192
196
  ), I = n.forwardRef(
193
- ({ className: e, size: t, span: a = 1, justify: d = "start", gapBefore: s, ...f }, c) => /* @__PURE__ */ i(
194
- j,
197
+ ({ className: e, size: t, span: r = 1, justify: d = "start", gapBefore: s, ...f }, u) => /* @__PURE__ */ o(
198
+ z,
195
199
  {
196
- ref: c,
197
- span: a,
198
- className: r(
199
- E({ size: t, justify: d, gapBefore: s, className: e })
200
+ ref: u,
201
+ span: r,
202
+ className: a(
203
+ k({ size: t, justify: d, gapBefore: s, className: e })
200
204
  ),
201
205
  ...f
202
206
  }
@@ -226,25 +230,25 @@ const L = g("flex items-center align-middle", {
226
230
  textAlign: "left",
227
231
  gapBefore: "none"
228
232
  }
229
- }), $ = n.forwardRef(
230
- ({ className: e, size: t, span: a = 1, textAlign: d, gapBefore: s, ...f }, c) => /* @__PURE__ */ i(
231
- j,
233
+ }), O = n.forwardRef(
234
+ ({ className: e, size: t, span: r = 1, textAlign: d, gapBefore: s, ...f }, u) => /* @__PURE__ */ o(
235
+ z,
232
236
  {
233
- ref: c,
234
- span: a,
235
- className: r(
237
+ ref: u,
238
+ span: r,
239
+ className: a(
236
240
  L({ size: t, textAlign: d, gapBefore: s, className: e })
237
241
  ),
238
242
  ...f
239
243
  }
240
244
  )
241
245
  );
242
- $.displayName = "GridTableCell";
246
+ O.displayName = "GridTableCell";
243
247
  export {
244
- C as GridTable,
245
- A as GridTableBody,
246
- $ as GridTableCell,
248
+ K as GridTable,
249
+ E as GridTableBody,
250
+ O as GridTableCell,
247
251
  I as GridTableHead,
248
- K as GridTableHeader,
252
+ A as GridTableHeader,
249
253
  S as GridTableRow
250
254
  };
@@ -0,0 +1,7 @@
1
+ class t {
2
+ static priceScaleTitles = "trading-view-price-scale-titles";
3
+ static priceScaleTitle = (e) => `trading-view-price-scale-title-${e}`;
4
+ }
5
+ export {
6
+ t as TradingViewTest
7
+ };
@@ -1,4 +1,6 @@
1
- import { TradingView as i } from "./trading-view.js";
1
+ import { TradingViewTest as i } from "./constants.js";
2
+ import { TradingView as t } from "./trading-view.js";
2
3
  export {
3
- i as TradingView
4
+ t as TradingView,
5
+ i as TradingViewTest
4
6
  };