@gearbox-protocol/permissionless-ui 1.22.0-next.30 → 1.22.0-next.32

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.
@@ -1,55 +1,40 @@
1
- export interface EditInputProps {
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { Input } from '../input';
3
+ import { TextButton } from '../text-button';
4
+ import * as React from "react";
5
+ declare const editLabelHeightVariants: (props?: ({
6
+ labelHeight?: "sm" | "lg" | "xs" | "md" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ type Variants = VariantProps<typeof editLabelHeightVariants>;
9
+ export interface EditInputProps extends Omit<React.ComponentProps<typeof Input>, "onChange" | "label" | "size"> {
2
10
  /**
3
- * Current value
11
+ * Label shown when not editing (clickable to enter edit mode)
4
12
  */
5
- value?: string;
13
+ label: React.ReactNode;
6
14
  /**
7
- * Callback when value changes
15
+ * Callback when value changes (matches interface: receives event)
8
16
  */
9
- onChange?: (value: string) => void;
17
+ onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
10
18
  /**
11
- * Placeholder text
19
+ * Callback when submit is triggered (Enter or ending icon click)
12
20
  */
13
- placeholder?: string;
21
+ onSubmit: () => void;
14
22
  /**
15
- * Whether the input is disabled
23
+ * Callback when edit mode is toggled
16
24
  */
17
- disabled?: boolean;
25
+ onEditModeChange?: (active: boolean) => void;
18
26
  /**
19
- * Callback when input loses focus
27
+ * Props passed to the TextButton used in view mode
20
28
  */
21
- onBlur?: () => void;
29
+ textButtonProps?: Partial<React.ComponentProps<typeof TextButton>>;
22
30
  /**
23
- * Callback when enter is pressed
31
+ * Size variant (matches interface InputSize)
24
32
  */
25
- onSubmit?: () => void;
26
- /**
27
- * Callback when edit mode changes
28
- */
29
- onEditModeChange?: (isEditing: boolean) => void;
30
- /**
31
- * Label for the input
32
- */
33
- label?: string;
34
- /**
35
- * Size variant
36
- */
37
- inputSize?: "xs" | "sm" | "md" | "lg";
38
- /**
39
- * Additional CSS class
40
- */
41
- className?: string;
33
+ inputSize?: NonNullable<Variants["labelHeight"]>;
42
34
  }
43
35
  /**
44
- * EditInput — an inline editable input field
45
- *
46
- * @example
47
- * ```tsx
48
- * <EditInput
49
- * value={name}
50
- * onChange={setName}
51
- * placeholder="Enter name"
52
- * />
53
- * ```
36
+ * EditInput — inline editable field: view mode (TextButton + label) or edit mode (Input + arrow submit).
37
+ * Matches interface EditInput structure and styles.
54
38
  */
55
- export declare function EditInput({ value, onChange, placeholder, disabled, onBlur, onSubmit, onEditModeChange, label, inputSize, className, }: EditInputProps): import("react/jsx-runtime").JSX.Element;
39
+ export declare function EditInput({ label, value, onChange, onSubmit, onEditModeChange, textButtonProps, inputSize, colorTheme, placeholder, inputMode, autoComplete, autoCorrect, type, spellCheck, className, onKeyDown: onKeyDownProp, ...restProps }: EditInputProps): import("react/jsx-runtime").JSX.Element;
40
+ export {};
@@ -1,8 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
- export type InputColorTheme = "filledDark" | "filledLight" | "outlined";
4
3
  declare const inputVariants: (props?: ({
5
- size?: "default" | "sm" | "lg" | null | undefined;
4
+ size?: "default" | "sm" | "lg" | "xs" | null | undefined;
6
5
  colorTheme?: "outlined" | "filledDark" | "filledLight" | null | undefined;
7
6
  variant?: "default" | "success" | "error" | null | undefined;
8
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,44 +1,32 @@
1
+ import { VariantProps } from 'class-variance-authority';
1
2
  import * as React from "react";
2
- export interface TextButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
- /**
4
- * Icon element (legacy API with $ prefix)
5
- */
6
- $icon?: React.ReactNode;
3
+ declare const textColorVariants: (props?: ({
4
+ buttonColor?: "empty" | "primaryDashed" | "secondaryDashed" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ declare const layoutVariants: (props?: ({
7
+ size?: "default" | "sm" | "lg" | "md" | null | undefined;
8
+ width?: "compact" | "wide" | null | undefined;
9
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
+ export interface TextButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof layoutVariants>, VariantProps<typeof textColorVariants> {
7
11
  /**
8
12
  * Icon element (new API)
9
13
  */
10
14
  icon?: React.ReactNode;
11
- /**
12
- * Size variant (legacy API with $ prefix)
13
- */
14
- $size?: "sm" | "md" | "lg";
15
- /**
16
- * Size variant (new API)
17
- */
18
- size?: "sm" | "md" | "lg";
19
- /**
20
- * Color variant (legacy API with $ prefix)
21
- */
22
- $color?: "primary" | "secondary" | "muted" | "primaryDashed" | "secondaryDashed" | "empty";
23
- /**
24
- * Color variant (new API)
25
- */
26
- color?: "primary" | "secondary" | "muted" | "primaryDashed" | "secondaryDashed" | "empty";
27
15
  /**
28
16
  * Element type to render as
29
17
  */
30
18
  as?: "button" | "a" | "div" | "span";
31
19
  }
32
20
  /**
33
- * TextButton — text-only button with underline on hover
21
+ * TextButton — text-only button with optional dashed underline (matches interface TextButton)
34
22
  *
35
23
  * @example
36
24
  * ```tsx
37
- * <TextButton onClick={handleClick} color="primary">
25
+ * <TextButton onClick={handleClick} color="primaryDashed">
38
26
  * Click me
39
27
  * </TextButton>
40
28
  *
41
- * <TextButton icon={<Icon />} size="sm" color="muted">
29
+ * <TextButton icon={<Icon />} size="sm" color="secondaryDashed">
42
30
  * Edit
43
31
  * </TextButton>
44
32
  * ```
@@ -46,3 +34,4 @@ export interface TextButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEl
46
34
  export declare const TextButton: React.ForwardRefExoticComponent<TextButtonProps & {
47
35
  children?: React.ReactNode | undefined;
48
36
  } & React.RefAttributes<HTMLButtonElement>>;
37
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/permissionless-ui",
3
- "version": "1.22.0-next.30",
3
+ "version": "1.22.0-next.32",
4
4
  "description": "Internal UI components",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/index.js",