@gearbox-protocol/ui-kit 4.0.0-next.67 → 4.0.0-next.68
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.
|
@@ -719,7 +719,12 @@ function to({
|
|
|
719
719
|
...p.options || {}
|
|
720
720
|
};
|
|
721
721
|
m.color && (m.color = re(m.color, m.color));
|
|
722
|
-
const y = new _t(
|
|
722
|
+
const y = new _t(
|
|
723
|
+
t,
|
|
724
|
+
a,
|
|
725
|
+
p.xCoordinate,
|
|
726
|
+
m
|
|
727
|
+
);
|
|
723
728
|
a.attachPrimitive(y), r.push(y);
|
|
724
729
|
}
|
|
725
730
|
}
|
|
@@ -2,15 +2,15 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { TitleText } from '../text';
|
|
3
3
|
import { ManagePaneTest } from './constants';
|
|
4
4
|
export { ManagePaneTest };
|
|
5
|
-
export interface ManagePaneTabProps {
|
|
6
|
-
readonly id:
|
|
5
|
+
export interface ManagePaneTabProps<T extends string = string> {
|
|
6
|
+
readonly id: T;
|
|
7
7
|
readonly title: TitleText;
|
|
8
8
|
readonly disabled?: boolean;
|
|
9
9
|
/** Content is selectable (e.g. from the dropdown) but not shown in the segment. */
|
|
10
10
|
readonly hidden?: boolean;
|
|
11
11
|
readonly children?: React.ReactNode;
|
|
12
12
|
}
|
|
13
|
-
export declare function ManagePaneTab(_props: ManagePaneTabProps): null;
|
|
13
|
+
export declare function ManagePaneTab<T extends string>(_props: ManagePaneTabProps<T>): null;
|
|
14
14
|
export interface ManagePaneTabDropdownItem {
|
|
15
15
|
readonly id: string;
|
|
16
16
|
readonly title: React.ReactNode;
|
|
@@ -20,20 +20,20 @@ export interface ManagePaneTabDropdownProps {
|
|
|
20
20
|
readonly items: ReadonlyArray<ManagePaneTabDropdownItem>;
|
|
21
21
|
}
|
|
22
22
|
export declare function ManagePaneTabDropdown(_props: ManagePaneTabDropdownProps): null;
|
|
23
|
-
export interface ManagePaneActionTabProps {
|
|
24
|
-
readonly id:
|
|
23
|
+
export interface ManagePaneActionTabProps<T extends string = string> {
|
|
24
|
+
readonly id: T;
|
|
25
25
|
readonly title: TitleText;
|
|
26
26
|
/** Fires without changing the active tab (e.g. "My positions"). */
|
|
27
27
|
readonly onClick?: () => void;
|
|
28
28
|
/** When set, a click opens this content in a dialog instead of switching tabs. */
|
|
29
29
|
readonly children?: React.ReactNode;
|
|
30
30
|
}
|
|
31
|
-
export declare function ManagePaneActionTab(_props: ManagePaneActionTabProps): null;
|
|
32
|
-
export interface ManagePaneProps {
|
|
31
|
+
export declare function ManagePaneActionTab<T extends string>(_props: ManagePaneActionTabProps<T>): null;
|
|
32
|
+
export interface ManagePaneProps<T extends string> {
|
|
33
33
|
readonly children: React.ReactNode;
|
|
34
34
|
/** Controlled active tab — the screen owns it (usually `?operation=`). */
|
|
35
|
-
readonly activeTab:
|
|
36
|
-
readonly onTabChange: (id:
|
|
35
|
+
readonly activeTab: T;
|
|
36
|
+
readonly onTabChange: (id: T) => void;
|
|
37
37
|
readonly header?: React.ReactNode;
|
|
38
38
|
readonly footer?: React.ReactNode;
|
|
39
39
|
/** Rendered to the right of the tabs (e.g. the settings button). */
|
|
@@ -45,7 +45,7 @@ export interface ManagePaneProps {
|
|
|
45
45
|
* dropdown and actions) above one card that shows the active tab's content.
|
|
46
46
|
* Controlled only — no hash state of its own.
|
|
47
47
|
*/
|
|
48
|
-
export declare function ManagePane({ children, activeTab, onTabChange, header, footer, actions, testId, }: ManagePaneProps): React.ReactElement;
|
|
48
|
+
export declare function ManagePane<T extends string>({ children, activeTab, onTabChange, header, footer, actions, testId, }: ManagePaneProps<T>): React.ReactElement;
|
|
49
49
|
/** Body shown in place of a dialog when the tab has nothing to act on (no position, no wallet). */
|
|
50
50
|
export declare function ManagePaneMessage({ children, }: {
|
|
51
51
|
readonly children: React.ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartOptions, DeepPartial
|
|
1
|
+
import { ChartOptions, DeepPartial } from 'lightweight-charts';
|
|
2
2
|
import { Point, YMeasureUnits } from './formatters';
|
|
3
3
|
import { GraphTooltipProps } from './graph-tooltip';
|
|
4
4
|
import { PriceLineConfig, PriceZoneConfig } from './graph-vocabulary';
|
|
@@ -90,7 +90,8 @@ export interface GraphProps {
|
|
|
90
90
|
xMeasureUnit?: GraphTooltipProps["xMeasureUnit"];
|
|
91
91
|
optionsOverrides?: DeepPartial<ChartOptions>;
|
|
92
92
|
verticalLineOptions?: Array<{
|
|
93
|
-
|
|
93
|
+
/** Same scale as `GraphPoint.timestamp`; branded for the chart internally. */
|
|
94
|
+
xCoordinate: number;
|
|
94
95
|
options?: VerticalLineOptions;
|
|
95
96
|
}>;
|
|
96
97
|
/**
|