@agilys-system/design-system 1.0.8 → 1.0.9
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/README.md +1 -1
- package/dist/agilys-design-system.cjs +1 -1
- package/dist/agilys-design-system.cjs.map +1 -1
- package/dist/agilys-design-system.js +296 -229
- package/dist/agilys-design-system.js.map +1 -1
- package/dist/index.d.ts +13 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -107,10 +107,10 @@ export declare interface PaginationProps extends Omit<HTMLAttributes<HTMLElement
|
|
|
107
107
|
export declare function Table<T = unknown>({ keys, data, rowKey, loading, loadingMessage, emptyMessage, selectable, selectedRowKeys, onSelectionChange, sortKey, sortDirection, onSortChange, onRowClick, shadow, border, className, ...props }: TableProps<T>): JSX_2.Element;
|
|
108
108
|
|
|
109
109
|
export declare function TableCell({ align, className, children, onClick, }: {
|
|
110
|
-
align?: TableKeys[
|
|
110
|
+
align?: TableKeys["align"];
|
|
111
111
|
className?: string;
|
|
112
112
|
children?: ReactNode;
|
|
113
|
-
onClick?: TdHTMLAttributes<HTMLTableCellElement>[
|
|
113
|
+
onClick?: TdHTMLAttributes<HTMLTableCellElement>["onClick"];
|
|
114
114
|
}): JSX_2.Element;
|
|
115
115
|
|
|
116
116
|
export declare const TableCheckbox: ForwardRefExoticComponent<TableCheckboxProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -121,9 +121,9 @@ export declare interface TableCheckboxProps extends InputHTMLAttributes<HTMLInpu
|
|
|
121
121
|
export declare const TableHeadCell: ForwardRefExoticComponent<TableHeadCellProps & RefAttributes<HTMLTableCellElement>>;
|
|
122
122
|
|
|
123
123
|
export declare interface TableHeadCellProps extends ThHTMLAttributes<HTMLTableCellElement> {
|
|
124
|
-
align?: TableKeys[
|
|
124
|
+
align?: TableKeys["align"];
|
|
125
125
|
sortable?: boolean;
|
|
126
|
-
sorted?:
|
|
126
|
+
sorted?: "asc" | "desc" | false;
|
|
127
127
|
onSort?: () => void;
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -138,11 +138,11 @@ export declare interface TableKeys<T = unknown> {
|
|
|
138
138
|
key?: string;
|
|
139
139
|
label: string;
|
|
140
140
|
callback?: (row: T) => ReactNode;
|
|
141
|
-
align?:
|
|
141
|
+
align?: "left" | "center" | "right";
|
|
142
142
|
className?: string;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
export declare interface TableProps<T = unknown> extends Omit<TableHTMLAttributes<HTMLTableElement>,
|
|
145
|
+
export declare interface TableProps<T = unknown> extends Omit<TableHTMLAttributes<HTMLTableElement>, "border"> {
|
|
146
146
|
keys: TableKeys<T>[];
|
|
147
147
|
data: T[];
|
|
148
148
|
rowKey?: keyof T | ((row: T) => string | number);
|
|
@@ -153,7 +153,7 @@ export declare interface TableProps<T = unknown> extends Omit<TableHTMLAttribute
|
|
|
153
153
|
selectedRowKeys?: Array<string | number>;
|
|
154
154
|
onSelectionChange?: (keys: Array<string | number>) => void;
|
|
155
155
|
sortKey?: string;
|
|
156
|
-
sortDirection?:
|
|
156
|
+
sortDirection?: "asc" | "desc";
|
|
157
157
|
onSortChange?: (key: string) => void;
|
|
158
158
|
onRowClick?: (row: T) => void;
|
|
159
159
|
/** Adds a box-shadow around the table. Defaults to `false`. */
|
|
@@ -162,13 +162,16 @@ export declare interface TableProps<T = unknown> extends Omit<TableHTMLAttribute
|
|
|
162
162
|
border?: boolean;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
declare const Text_2: ForwardRefExoticComponent<TextProps & RefAttributes<HTMLElement>>;
|
|
166
|
+
export { Text_2 as Text }
|
|
166
167
|
|
|
167
|
-
export declare interface
|
|
168
|
+
export declare interface TextProps extends HTMLAttributes<HTMLElement>, VariantProps<typeof textVariants> {
|
|
168
169
|
as?: ElementType;
|
|
170
|
+
/** Only applies when `as="label"`. */
|
|
171
|
+
htmlFor?: string;
|
|
169
172
|
}
|
|
170
173
|
|
|
171
|
-
export declare const
|
|
174
|
+
export declare const textVariants: (props?: ({
|
|
172
175
|
variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "body" | "bodySm" | "caption" | null | undefined;
|
|
173
176
|
weight?: "bold" | "regular" | "medium" | "semibold" | null | undefined;
|
|
174
177
|
} & ClassProp) | undefined) => string;
|
package/package.json
CHANGED