@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.
- package/dist/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/graph/series-config.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/table/grid-table.cjs +1 -1
- package/dist/cjs/components/trading-view/constants.cjs +1 -0
- package/dist/cjs/components/trading-view/index.cjs +1 -1
- package/dist/cjs/components/trading-view/price-scale-titles.cjs +1 -0
- package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/graph/graph.js +257 -266
- package/dist/esm/components/graph/series-config.js +10 -1
- package/dist/esm/components/index.js +70 -68
- package/dist/esm/components/table/grid-table.js +94 -90
- package/dist/esm/components/trading-view/constants.js +7 -0
- package/dist/esm/components/trading-view/index.js +4 -2
- package/dist/esm/components/trading-view/price-scale-titles.js +52 -0
- package/dist/esm/components/trading-view/trading-view.js +119 -115
- package/dist/esm/index.js +124 -122
- package/dist/globals.css +1 -1
- package/dist/types/components/graph/graph.d.ts +1 -5
- package/dist/types/components/graph/series-config.d.ts +13 -0
- package/dist/types/components/table/grid-table.d.ts +0 -52
- package/dist/types/components/trading-view/constants.d.ts +4 -0
- package/dist/types/components/trading-view/index.d.ts +1 -0
- package/dist/types/components/trading-view/price-scale-titles.d.ts +16 -0
- package/dist/types/components/trading-view/trading-view.d.ts +1 -1
- package/package.json +1 -1
|
@@ -123,10 +123,6 @@ export interface GraphProps {
|
|
|
123
123
|
dualYAxis?: boolean;
|
|
124
124
|
/** Preferred default price scale when both left and right are visible. */
|
|
125
125
|
defaultVisiblePriceScaleId?: SeriesPriceScaleId;
|
|
126
|
-
/** Optional label for the left Y axis (dualYAxis mode). */
|
|
127
|
-
leftPriceScaleTitle?: string;
|
|
128
|
-
/** Optional label for the right Y axis (dualYAxis mode). */
|
|
129
|
-
rightPriceScaleTitle?: string;
|
|
130
126
|
/**
|
|
131
127
|
* When true (default), shows the current value and date in the top-left corner
|
|
132
128
|
* in single-series mode. Set to false to hide.
|
|
@@ -173,7 +169,7 @@ export interface GraphProps {
|
|
|
173
169
|
* with support for area series, custom tooltips, and vertical line annotations
|
|
174
170
|
* Supports single or multiple series with different colors and legends
|
|
175
171
|
*/
|
|
176
|
-
export declare function Graph({ series, className, showLegend, onUnselectSeries, xMeasureUnit, yMeasureUnit, optionsOverrides, verticalLineOptions, priceLineOptions, zoneOptions, currentValueDecimals, useSharedPriceScale, dualYAxis, defaultVisiblePriceScaleId,
|
|
172
|
+
export declare function Graph({ series, className, showLegend, onUnselectSeries, xMeasureUnit, yMeasureUnit, optionsOverrides, verticalLineOptions, priceLineOptions, zoneOptions, currentValueDecimals, useSharedPriceScale, dualYAxis, defaultVisiblePriceScaleId, showCurrentValue, graphTitle, yScaleMin, yScaleMinMultiple, visibleTimeFrom, disableZoom, hideDefaultTooltip, }: GraphProps): React.ReactElement;
|
|
177
173
|
/**
|
|
178
174
|
* A legend entry that is not a data series — a vertical marker line, say.
|
|
179
175
|
* Such a line is drawn by its own layer and never reaches `series`, so
|
|
@@ -29,3 +29,16 @@ export interface SeriesConfig {
|
|
|
29
29
|
/** Line dash style (line series only). */
|
|
30
30
|
lineStyle?: LineStyle;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* The left/right split the chart draws in `dualYAxis` mode: an explicit
|
|
34
|
+
* `priceScaleId` wins, otherwise the first series takes the left scale and the
|
|
35
|
+
* rest the right one.
|
|
36
|
+
*
|
|
37
|
+
* Only series carrying points advance that count, because a series with none is
|
|
38
|
+
* never added to the chart — counting it would push every series after it onto
|
|
39
|
+
* the wrong axis.
|
|
40
|
+
*/
|
|
41
|
+
export declare function resolvePriceScaleSides(series: ReadonlyArray<SeriesConfig>): Array<{
|
|
42
|
+
series: SeriesConfig;
|
|
43
|
+
side: SeriesPriceScaleId;
|
|
44
|
+
}>;
|
|
@@ -128,58 +128,6 @@ interface GridTableRowProps extends GridProps {
|
|
|
128
128
|
*/
|
|
129
129
|
rel?: string;
|
|
130
130
|
}
|
|
131
|
-
/**
|
|
132
|
-
* GridTableRow — row component of a GridTable.
|
|
133
|
-
*
|
|
134
|
-
* @usage
|
|
135
|
-
* Use GridTableRow to create table rows in grid tables:
|
|
136
|
-
* data rows, table entries with hover effects and borders.
|
|
137
|
-
*
|
|
138
|
-
* Props:
|
|
139
|
-
* - `cols` — number of columns or custom grid template.
|
|
140
|
-
* - `gap` — gap between cells (defaults to 0).
|
|
141
|
-
* - `last` — whether this is the last row (removes bottom border).
|
|
142
|
-
* - `height` — custom height for the row (string or number in pixels).
|
|
143
|
-
* - `hideValue` — whether to hide value cells (for loading states).
|
|
144
|
-
* - `onRowClick` — click handler for the row (makes entire row clickable).
|
|
145
|
-
* - `href` — URL for the row link (renders as `<a>`, supports native link behavior).
|
|
146
|
-
* - `target` — link target (e.g., "_blank"). Only used with `href`.
|
|
147
|
-
* - `rel` — link rel attribute. Only used with `href`.
|
|
148
|
-
*
|
|
149
|
-
* Note: Automatically applies bottom border, hover effects, and selected state styling to all child elements.
|
|
150
|
-
*
|
|
151
|
-
* @example
|
|
152
|
-
* ```tsx
|
|
153
|
-
* <GridTableRow>
|
|
154
|
-
* <GridTableCell>Data</GridTableCell>
|
|
155
|
-
* </GridTableRow>
|
|
156
|
-
*
|
|
157
|
-
* // Last row (no bottom border)
|
|
158
|
-
* <GridTableRow last>
|
|
159
|
-
* <GridTableCell>Last row</GridTableCell>
|
|
160
|
-
* </GridTableRow>
|
|
161
|
-
*
|
|
162
|
-
* // Custom height
|
|
163
|
-
* <GridTableRow height="50px">
|
|
164
|
-
* <GridTableCell>Tall row</GridTableCell>
|
|
165
|
-
* </GridTableRow>
|
|
166
|
-
*
|
|
167
|
-
* // Clickable row
|
|
168
|
-
* <GridTableRow onRowClick={() => navigate('/details/123')}>
|
|
169
|
-
* <GridTableCell>Clickable row</GridTableCell>
|
|
170
|
-
* </GridTableRow>
|
|
171
|
-
*
|
|
172
|
-
* // Link row (native <a> element)
|
|
173
|
-
* <GridTableRow href="/pools/0x1234">
|
|
174
|
-
* <GridTableCell>Linked row</GridTableCell>
|
|
175
|
-
* </GridTableRow>
|
|
176
|
-
*
|
|
177
|
-
* // External link row
|
|
178
|
-
* <GridTableRow href="https://etherscan.io" target="_blank">
|
|
179
|
-
* <GridTableCell>External link row</GridTableCell>
|
|
180
|
-
* </GridTableRow>
|
|
181
|
-
* ```
|
|
182
|
-
*/
|
|
183
131
|
declare const GridTableRow: React.ForwardRefExoticComponent<GridTableRowProps & React.RefAttributes<HTMLDivElement | HTMLAnchorElement>>;
|
|
184
132
|
declare const gridTableHeadVariants: (props?: ({
|
|
185
133
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SeriesConfig } from '../graph/series-config';
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
export interface PriceScaleTitlesProps {
|
|
4
|
+
/** Pass the list the legend is built from, so the two always agree. */
|
|
5
|
+
readonly series: ReadonlyArray<SeriesConfig>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Names the series on each Y axis, above the chart frame.
|
|
9
|
+
*
|
|
10
|
+
* Two scales and nothing on the canvas says which line is read against which,
|
|
11
|
+
* and lightweight-charts has no price-scale title of its own. Sitting above the
|
|
12
|
+
* frame rather than over the plot keeps it off the series, and the wording is
|
|
13
|
+
* the legend label, so the two can never disagree about what a series is
|
|
14
|
+
* called.
|
|
15
|
+
*/
|
|
16
|
+
export declare function PriceScaleTitles({ series, }: PriceScaleTitlesProps): React.ReactElement;
|
|
@@ -189,4 +189,4 @@ export interface TradingViewProps<T extends string = string, TRange extends stri
|
|
|
189
189
|
* />
|
|
190
190
|
* ```
|
|
191
191
|
*/
|
|
192
|
-
export declare function TradingView<T extends string = string, TRange extends string = string>({ data, yMeasureUnit, height, defaultGraph, onGraphSelected, graphs, isMultipleSelect, range, rangeList, setRange, onGraphExpanded, isGraphExpanded, onUnselectSeries, legendMarkers, graphsWithNoData, loadingGraphs, isLoading: isLoadingProp, noDataMessage, currentValueDecimals, containerClassName, useSharedPriceScale, showCurrentValue, yScaleMin, yScaleMinMultiple, seriesColorPersistenceKey, title, trailing, ...restProps }: TradingViewProps<T, TRange>): React.ReactElement;
|
|
192
|
+
export declare function TradingView<T extends string = string, TRange extends string = string>({ data, yMeasureUnit, height, defaultGraph, onGraphSelected, graphs, isMultipleSelect, range, rangeList, setRange, onGraphExpanded, isGraphExpanded, onUnselectSeries, legendMarkers, graphsWithNoData, loadingGraphs, isLoading: isLoadingProp, noDataMessage, currentValueDecimals, containerClassName, useSharedPriceScale, dualYAxis, showCurrentValue, yScaleMin, yScaleMinMultiple, seriesColorPersistenceKey, title, trailing, ...restProps }: TradingViewProps<T, TRange>): React.ReactElement;
|