@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.
- package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/edit-input/edit-input.cjs +1 -1
- package/dist/cjs/components/input/input.cjs +1 -1
- package/dist/cjs/components/text-button/text-button.cjs +1 -1
- package/dist/esm/components/block-sync/block-sync.js +3 -2
- package/dist/esm/components/checkbox/checkbox-labeled.js +1 -0
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -0
- package/dist/esm/components/edit-input/edit-input.js +100 -83
- package/dist/esm/components/input/input.js +26 -26
- package/dist/esm/components/text-button/text-button.js +98 -46
- package/dist/globals.css +1 -1
- package/dist/types/components/edit-input/edit-input.d.ts +25 -40
- package/dist/types/components/input/input.d.ts +1 -2
- package/dist/types/components/text-button/text-button.d.ts +13 -24
- package/package.json +1 -1
|
@@ -1,55 +1,40 @@
|
|
|
1
|
-
|
|
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
|
-
*
|
|
11
|
+
* Label shown when not editing (clickable to enter edit mode)
|
|
4
12
|
*/
|
|
5
|
-
|
|
13
|
+
label: React.ReactNode;
|
|
6
14
|
/**
|
|
7
|
-
* Callback when value changes
|
|
15
|
+
* Callback when value changes (matches interface: receives event)
|
|
8
16
|
*/
|
|
9
|
-
onChange
|
|
17
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
18
|
/**
|
|
11
|
-
*
|
|
19
|
+
* Callback when submit is triggered (Enter or ending icon click)
|
|
12
20
|
*/
|
|
13
|
-
|
|
21
|
+
onSubmit: () => void;
|
|
14
22
|
/**
|
|
15
|
-
*
|
|
23
|
+
* Callback when edit mode is toggled
|
|
16
24
|
*/
|
|
17
|
-
|
|
25
|
+
onEditModeChange?: (active: boolean) => void;
|
|
18
26
|
/**
|
|
19
|
-
*
|
|
27
|
+
* Props passed to the TextButton used in view mode
|
|
20
28
|
*/
|
|
21
|
-
|
|
29
|
+
textButtonProps?: Partial<React.ComponentProps<typeof TextButton>>;
|
|
22
30
|
/**
|
|
23
|
-
*
|
|
31
|
+
* Size variant (matches interface InputSize)
|
|
24
32
|
*/
|
|
25
|
-
|
|
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 —
|
|
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,
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
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="
|
|
25
|
+
* <TextButton onClick={handleClick} color="primaryDashed">
|
|
38
26
|
* Click me
|
|
39
27
|
* </TextButton>
|
|
40
28
|
*
|
|
41
|
-
* <TextButton icon={<Icon />} size="sm" color="
|
|
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 {};
|