@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.
- package/dist/cjs/components/buttons/button/button.cjs +1 -1
- package/dist/cjs/components/cards/danger-zone/danger-zone.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-container.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/skeleton/skeleton.cjs +1 -1
- package/dist/cjs/components/table/edit-button.cjs +1 -1
- package/dist/cjs/components/table/grid-table.cjs +1 -1
- package/dist/cjs/components/table/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/buttons/button/button.js +30 -19
- package/dist/esm/components/cards/danger-zone/danger-zone.js +8 -8
- package/dist/esm/components/dialog/dialog-container.js +65 -26
- package/dist/esm/components/index.js +101 -99
- package/dist/esm/components/skeleton/skeleton.js +33 -16
- package/dist/esm/components/table/edit-button.js +27 -15
- package/dist/esm/components/table/grid-table.js +91 -77
- package/dist/esm/components/table/index.js +35 -33
- package/dist/esm/index.js +194 -192
- package/dist/globals.css +1 -1
- package/dist/types/components/buttons/button/button.d.ts +5 -0
- package/dist/types/components/dialog/dialog-container.d.ts +25 -0
- package/dist/types/components/skeleton/skeleton.d.ts +41 -4
- package/dist/types/components/table/edit-button.d.ts +36 -6
- package/dist/types/components/table/grid-table.d.ts +44 -1
- package/package.json +1 -1
|
@@ -1,7 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
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
|
-
* - `
|
|
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.
|
|
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
|
-
|
|
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, };
|