@gearbox-protocol/permissionless-ui 1.22.0-next.44 → 1.22.0-next.46

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.
@@ -5,7 +5,7 @@ declare const searchLineVariants: (props?: ({
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  declare const searchLineInputVariants: (props?: ({
7
7
  active?: boolean | null | undefined;
8
- theme?: "dark" | "light" | null | undefined;
8
+ theme?: "dark" | "light" | "deep-light" | null | undefined;
9
9
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
10
  export interface SearchLineState {
11
11
  value: string;
@@ -25,9 +25,9 @@ export interface SearchLineProps extends Omit<React.HTMLAttributes<HTMLDivElemen
25
25
  */
26
26
  placeholder?: string;
27
27
  /**
28
- * Theme variant
28
+ * Theme variant (deep-light / deep-dark match interface SearchLine colors)
29
29
  */
30
- theme?: "light" | "dark";
30
+ theme?: "light" | "dark" | "deep-light";
31
31
  /**
32
32
  * Whether to show the search icon on the left
33
33
  */
@@ -88,9 +88,9 @@ export interface WithSearchLineProps {
88
88
  */
89
89
  placeholder?: string;
90
90
  /**
91
- * Theme variant
91
+ * Theme variant (deep-light / deep-dark match interface SearchLine colors)
92
92
  */
93
- theme?: "light" | "dark";
93
+ theme?: "light" | "dark" | "deep-light";
94
94
  /**
95
95
  * Content to display alongside the search line
96
96
  */
@@ -1,93 +1,50 @@
1
- import { VariantProps } from 'class-variance-authority';
2
1
  import * as React from "react";
3
- declare const segmentedControlVariants: (props?: ({
4
- size?: "default" | "xs" | "sm" | "lg" | "md" | null | undefined;
5
- fullWidth?: boolean | null | undefined;
2
+ /** Size variant matching A (SegmentedControlSize). */
3
+ export type SegmentedControlSize = "md" | "sm";
4
+ declare const rootVariants: (props?: ({
5
+ size?: "sm" | "md" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  /**
8
- * Item props for SegmentedControl (matching original interface API)
8
+ * Item props for SegmentedControl (matches A SegmentedControlItemProps).
9
9
  */
10
10
  export interface SegmentedControlItemProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
11
- /**
12
- * Label to display for this item (alias: label is also supported for convenience)
13
- */
11
+ /** Label to display for this item (A: switchLabel). */
14
12
  switchLabel?: React.ReactNode;
15
- /**
16
- * Alternative label prop for convenience
17
- */
13
+ /** Convenience alias for switchLabel. */
18
14
  label?: React.ReactNode;
19
- /**
20
- * Whether this item is currently selected
21
- */
15
+ /** Whether this item is selected. */
22
16
  checked?: boolean;
23
- /**
24
- * Callback when this item is selected
25
- */
26
- onChange?: () => void;
27
- /**
28
- * Alternative callback prop for convenience
29
- */
17
+ /** Callback when this item is selected (A: native onChange). */
18
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
19
+ /** Convenience callback (no event). */
30
20
  onSelect?: () => void;
31
21
  }
32
- export type SegmentedControlSize = "xs" | "sm" | "md" | "default" | "lg";
33
- export interface SegmentedControlProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">, VariantProps<typeof segmentedControlVariants> {
34
- /**
35
- * Name for the radio group
36
- */
22
+ export interface SegmentedControlProps {
23
+ /** Name for the radio group. */
37
24
  name: string;
38
- /**
39
- * Array of items to display.
40
- * Each item should have:
41
- * - switchLabel or label: ReactNode to display
42
- * - checked: boolean indicating if selected
43
- * - onChange or onSelect: callback when selected
44
- * - disabled?: boolean
45
- * - value?: string for the radio input
46
- */
47
- items: Array<SegmentedControlItemProps>;
48
- /**
49
- * Minimum width for each item (useful when scrollable)
50
- * @example "80px" or "5rem"
51
- */
52
- minItemWidth?: string;
25
+ /** Array of items (A: Omit<SegmentedControlItemProps, "name">). */
26
+ items: Array<Omit<SegmentedControlItemProps, "name">>;
27
+ /** Size variant. @default "md" */
28
+ size?: SegmentedControlSize;
29
+ /** Extra class name. */
30
+ className?: string;
53
31
  }
54
32
  /**
55
- * SegmentedControl — toggle component for selecting between multiple options
56
- *
57
- * API matches the original @gearbox-protocol/interface implementation.
33
+ * SegmentedControl — toggle for mutually exclusive options (matches interface).
58
34
  *
59
35
  * @usage
60
- * Use SegmentedControl for mutually exclusive options:
61
- * view modes, time periods, filter options, toggle states.
62
- *
63
- * Sizes (size):
64
- * - `xs` — extra small (24px height, 10px text) — for very compact UIs.
65
- * - `sm` — small (28px height, text-xs).
66
- * - `md` — medium (40px height, text-sm) — default, matches original interface.
67
- * - `default` — responsive: 32px/xs on mobile, 40px/sm on desktop.
68
- * - `lg` — responsive: 40px/sm on mobile, 48px/base on desktop.
36
+ * Use for view modes, time periods, filter options.
69
37
  *
70
38
  * @example
71
39
  * ```tsx
72
- * // Basic usage (original API style)
73
40
  * <SegmentedControl
74
- * name="view-mode"
41
+ * name="view"
75
42
  * items={[
76
43
  * { switchLabel: "List", checked: view === "list", onChange: () => setView("list") },
77
44
  * { switchLabel: "Grid", checked: view === "grid", onChange: () => setView("grid") },
78
45
  * ]}
79
46
  * />
80
- *
81
- * // Using label/onSelect aliases
82
- * <SegmentedControl
83
- * name="view-mode"
84
- * items={options.map(opt => ({
85
- * label: opt.label,
86
- * checked: value === opt.value,
87
- * onSelect: () => setValue(opt.value),
88
- * }))}
89
- * />
90
47
  * ```
91
48
  */
92
49
  declare const SegmentedControl: React.ForwardRefExoticComponent<SegmentedControlProps & React.RefAttributes<HTMLDivElement>>;
93
- export { SegmentedControl, segmentedControlVariants };
50
+ export { SegmentedControl, rootVariants as segmentedControlVariants };
@@ -1,37 +1,32 @@
1
1
  import * as React from "react";
2
- type ColSize = boolean | number | "auto";
2
+ /** Column size: true = equal flex, "auto" = auto width. */
3
+ type ColSize = boolean | "auto";
3
4
  export interface SplitListProps {
4
- /**
5
- * Size for each column (can be function for dynamic sizing)
6
- */
5
+ /** Size for each column (or function for per-index). @default true */
7
6
  colSize?: ColSize | ((index: number) => ColSize);
8
- /**
9
- * Children content
10
- */
7
+ /** List items. */
11
8
  children?: React.ReactNode;
12
- /**
13
- * Additional CSS class
14
- */
9
+ /** Extra class name for the root. */
15
10
  className?: string;
16
11
  }
17
12
  /**
18
- * SplitList — horizontal list with dividers between items
13
+ * SplitList — horizontal list with vertical dividers between items (matches interface).
14
+ *
15
+ * @usage
16
+ * Use for a row of columns with centered vertical separators.
19
17
  *
20
18
  * @example
21
19
  * ```tsx
22
20
  * <SplitList colSize={true}>
23
- * <div>Item 1</div>
24
- * <div>Item 2</div>
25
- * <div>Item 3</div>
21
+ * <span>Item 1</span>
22
+ * <span>Item 2</span>
26
23
  * </SplitList>
27
24
  *
28
- * // Custom sizes
29
- * <SplitList colSize={(index) => index === 0 ? 6 : 3}>
30
- * <div>Wide</div>
31
- * <div>Narrow</div>
32
- * <div>Narrow</div>
25
+ * <SplitList colSize={(i) => (i === 0 ? true : "auto")}>
26
+ * <span>Flex</span>
27
+ * <span>Auto</span>
33
28
  * </SplitList>
34
29
  * ```
35
30
  */
36
- export declare function SplitList({ children, colSize, className, }: SplitListProps): import("react/jsx-runtime").JSX.Element;
37
- export {};
31
+ declare const SplitList: React.ForwardRefExoticComponent<SplitListProps & React.RefAttributes<HTMLDivElement>>;
32
+ export { SplitList };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/permissionless-ui",
3
- "version": "1.22.0-next.44",
3
+ "version": "1.22.0-next.46",
4
4
  "description": "Internal UI components",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/index.js",