@gearbox-protocol/permissionless-ui 1.12.3 → 1.13.0

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,7 +1,20 @@
1
- interface EditButtonProps {
2
- onClick?: () => void;
1
+ import { ButtonProps } from '../buttons';
2
+ import type * as React from "react";
3
+ interface EditButtonProps extends Omit<ButtonProps, "variant"> {
4
+ /**
5
+ * @deprecated Use children instead
6
+ */
3
7
  customButton?: React.ReactNode;
4
- disabled?: boolean;
8
+ /**
9
+ * Width variant of the button
10
+ * - "default" — compact icon button
11
+ * - "wide" — full width button
12
+ */
13
+ width?: "default" | "wide";
14
+ /**
15
+ * @deprecated Use width="wide" instead
16
+ */
17
+ $width?: "default" | "wide";
5
18
  }
6
19
  /**
7
20
  * EditButton — button component for triggering edit actions.
@@ -12,10 +25,27 @@ interface EditButtonProps {
12
25
  *
13
26
  * Props:
14
27
  * - `onClick` — callback function executed when button is clicked.
15
- * - `customButton` — custom React node to replace default edit icon.
28
+ * - `children` — custom content to replace default edit icon.
29
+ * - `width` — button width: "default" or "wide".
16
30
  * - `disabled` — if true, button is disabled.
17
31
  *
18
- * Note: Uses ghost variant Button with Edit icon by default. Custom button can be provided for different styling.
32
+ * Note: Uses ghost variant Button with Edit icon by default.
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * // Default icon button
37
+ * <EditButton onClick={handleEdit} />
38
+ *
39
+ * // With custom content
40
+ * <EditButton onClick={handleEdit}>
41
+ * Edit Item
42
+ * </EditButton>
43
+ *
44
+ * // Wide button
45
+ * <EditButton width="wide" onClick={handleEdit}>
46
+ * <span>Edit</span>
47
+ * </EditButton>
48
+ * ```
19
49
  */
20
- export declare function EditButton({ onClick, customButton, disabled, }: EditButtonProps): import("react/jsx-runtime").JSX.Element;
50
+ export declare function EditButton({ onClick, customButton, children, disabled, width, $width, className, style, ...props }: EditButtonProps): import("react/jsx-runtime").JSX.Element;
21
51
  export {};
@@ -93,6 +93,18 @@ declare const GridTableFooter: React.ForwardRefExoticComponent<React.HTMLAttribu
93
93
  interface GridTableRowProps extends GridProps {
94
94
  children?: React.ReactNode;
95
95
  className?: string;
96
+ /**
97
+ * Whether this is the last row (removes bottom border)
98
+ */
99
+ last?: boolean;
100
+ /**
101
+ * Custom height for the row
102
+ */
103
+ height?: string | number;
104
+ /**
105
+ * Whether to hide value cells (for loading states)
106
+ */
107
+ hideValue?: boolean;
96
108
  }
97
109
  /**
98
110
  * GridTableRow — row component of a GridTable.
@@ -104,8 +116,28 @@ interface GridTableRowProps extends GridProps {
104
116
  * Props:
105
117
  * - `cols` — number of columns or custom grid template.
106
118
  * - `gap` — gap between cells (defaults to 0).
119
+ * - `last` — whether this is the last row (removes bottom border).
120
+ * - `height` — custom height for the row (string or number in pixels).
121
+ * - `hideValue` — whether to hide value cells (for loading states).
107
122
  *
108
123
  * Note: Automatically applies bottom border, hover effects, and selected state styling to all child elements.
124
+ *
125
+ * @example
126
+ * ```tsx
127
+ * <GridTableRow>
128
+ * <GridTableCell>Data</GridTableCell>
129
+ * </GridTableRow>
130
+ *
131
+ * // Last row (no bottom border)
132
+ * <GridTableRow last>
133
+ * <GridTableCell>Last row</GridTableCell>
134
+ * </GridTableRow>
135
+ *
136
+ * // Custom height
137
+ * <GridTableRow height="50px">
138
+ * <GridTableCell>Tall row</GridTableCell>
139
+ * </GridTableRow>
140
+ * ```
109
141
  */
110
142
  declare const GridTableRow: React.ForwardRefExoticComponent<GridTableRowProps & React.RefAttributes<HTMLDivElement>>;
111
143
  declare const gridTableHeadVariants: (props?: ({
@@ -133,6 +165,7 @@ interface GridTableHeadProps extends ColProps, VariantProps<typeof gridTableHead
133
165
  declare const GridTableHead: React.ForwardRefExoticComponent<GridTableHeadProps & React.RefAttributes<HTMLDivElement>>;
134
166
  declare const gridTableCellVariants: (props?: ({
135
167
  size?: "default" | "sm" | "lg" | null | undefined;
168
+ textAlign?: "left" | "center" | "right" | null | undefined;
136
169
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
137
170
  interface GridTableCellProps extends ColProps, VariantProps<typeof gridTableCellVariants> {
138
171
  children?: React.ReactNode;
@@ -148,8 +181,16 @@ interface GridTableCellProps extends ColProps, VariantProps<typeof gridTableCell
148
181
  * Props:
149
182
  * - `span` — number of columns to span (defaults to 1).
150
183
  * - `size` — cell size variant: "sm", "default", "lg" (defaults to "default").
184
+ * - `textAlign` — text alignment: "left", "center", "right".
151
185
  *
152
186
  * Note: Automatically applies appropriate padding based on size variant.
187
+ *
188
+ * @example
189
+ * ```tsx
190
+ * <GridTableCell>Left aligned (default)</GridTableCell>
191
+ * <GridTableCell textAlign="center">Centered</GridTableCell>
192
+ * <GridTableCell textAlign="right">Right aligned</GridTableCell>
193
+ * ```
153
194
  */
154
195
  declare const GridTableCell: React.ForwardRefExoticComponent<GridTableCellProps & React.RefAttributes<HTMLDivElement>>;
155
196
  /**
@@ -162,5 +203,7 @@ declare const GridTableCell: React.ForwardRefExoticComponent<GridTableCellProps
162
203
  * Note: Spans full width and displays with muted text color below the table.
163
204
  */
164
205
  declare const GridTableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
165
- export { GridTable, GridTableBody, GridTableCaption, GridTableCell, GridTableFooter, GridTableHead, GridTableHeader, GridTableRow, gridTableVariants, gridTableHeadVariants, gridTableCellVariants, };
206
+ declare const Td: React.ForwardRefExoticComponent<GridTableCellProps & React.RefAttributes<HTMLDivElement>>;
207
+ declare const Th: React.ForwardRefExoticComponent<GridTableHeadProps & React.RefAttributes<HTMLDivElement>>;
208
+ export { GridTable, GridTableBody, GridTableCaption, GridTableCell, GridTableFooter, GridTableHead, GridTableHeader, GridTableRow, gridTableVariants, gridTableHeadVariants, gridTableCellVariants, Td, Th, };
166
209
  export type { GridTableProps, GridTableHeadProps, GridTableCellProps, GridTableRowProps, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/permissionless-ui",
3
- "version": "1.12.3",
3
+ "version": "1.13.0",
4
4
  "description": "Internal UI components",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/index.js",