@nimbus-ds/patterns 1.28.1 → 1.29.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/index.d.ts CHANGED
@@ -201,6 +201,60 @@ export type DataTableBulkActionsProps = DataTableBulkActionsProperties & {
201
201
  checkbox: Omit<CheckboxProps, "label" | "id">;
202
202
  } & Omit<HTMLAttributes<HTMLElement>, "color">;
203
203
  declare const DataTableBulkActions: React.FC<DataTableBulkActionsProps>;
204
+ export interface DataTableCellProperties {
205
+ /**
206
+ * Content of the List component.
207
+ * @TJS-type React.ReactNode
208
+ */
209
+ children: ReactNode;
210
+ }
211
+ export type DataTableCellProps = DataTableCellProperties & Omit<HTMLAttributes<HTMLElement>, "color"> & TableCellProps;
212
+ declare const DataTableCell: React.FC<DataTableCellProps>;
213
+ export interface DataTableDropdownProperties {
214
+ /**
215
+ * Placeholder text displayed in the dropdown trigger button.
216
+ */
217
+ placeholder: string;
218
+ /**
219
+ * Content to be rendered inside the dropdown popover.
220
+ * Typically DataTable.DropdownAction and DataTable.DropdownDivider components.
221
+ * @TJS-type React.ReactNode
222
+ */
223
+ children: ReactNode;
224
+ }
225
+ export type DataTableDropdownProps = DataTableDropdownProperties & Omit<BoxProperties, "as" | "type" | "width" | "cursor" | "backgroundColor" | "boxShadow" | "borderWidth" | "borderStyle" | "borderColor" | "borderRadius" | "display" | "alignItems" | "justifyContent" | "gap" | "py" | "px">;
226
+ declare const DataTableDropdown: React.FC<DataTableDropdownProps>;
227
+ export interface DataTableDropdownActionProperties {
228
+ /**
229
+ * Icon element to be displayed before the label.
230
+ * @TJS-type React.ReactNode
231
+ */
232
+ icon?: ReactNode;
233
+ /**
234
+ * Text label for the action item.
235
+ */
236
+ label: string;
237
+ /**
238
+ * Click handler for the action.
239
+ */
240
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
241
+ /**
242
+ * Whether the action is disabled.
243
+ */
244
+ disabled?: boolean;
245
+ }
246
+ export type DataTableDropdownActionProps = DataTableDropdownActionProperties & Omit<BoxProperties, "children" | "as" | "type" | "width" | "cursor" | "backgroundColor" | "boxShadow" | "borderWidth" | "borderStyle" | "borderColor" | "borderRadius" | "display" | "alignItems" | "justifyContent" | "gap" | "py" | "px" | "onClick">;
247
+ declare const DataTableDropdownAction: React.FC<DataTableDropdownActionProps>;
248
+ declare const DataTableDropdownDivider: React.FC;
249
+ export interface DataTableDropdownSectionProperties {
250
+ /**
251
+ * Content of the section body.
252
+ * @TJS-type React.ReactNode
253
+ */
254
+ children: ReactNode;
255
+ }
256
+ export type DataTableDropdownSectionProps = DataTableDropdownSectionProperties & Omit<BoxProperties, "children" | "as" | "type" | "width" | "cursor" | "backgroundColor" | "boxShadow" | "borderWidth" | "borderStyle" | "borderColor" | "borderRadius" | "display" | "alignItems" | "justifyContent" | "gap" | "py" | "px">;
257
+ declare const DataTableDropdownSection: React.FC<DataTableDropdownSectionProps>;
204
258
  export interface DataTableFooterProperties {
205
259
  /**
206
260
  * Left-hand side text intended for displaying an item count.
@@ -245,21 +299,16 @@ export type DataTableRowProps = DataTableRowProperties & {
245
299
  checkbox: CheckboxProps;
246
300
  } & TableRowProperties & HTMLAttributes<HTMLElement>;
247
301
  declare const DataTableRow: React.FC<DataTableRowProps>;
248
- export interface DataTableCellProperties {
249
- /**
250
- * Content of the List component.
251
- * @TJS-type React.ReactNode
252
- */
253
- children: ReactNode;
254
- }
255
- export type DataTableCellProps = DataTableCellProperties & Omit<HTMLAttributes<HTMLElement>, "color"> & TableCellProps;
256
- declare const DataTableCell: React.FC<DataTableCellProps>;
257
302
  export interface DataTableComponents {
258
303
  BulkActions: typeof DataTableBulkActions;
259
- Header: typeof DataTableHeader;
304
+ Cell: typeof DataTableCell;
305
+ Dropdown: typeof DataTableDropdown;
306
+ DropdownAction: typeof DataTableDropdownAction;
307
+ DropdownDivider: typeof DataTableDropdownDivider;
308
+ DropdownSection: typeof DataTableDropdownSection;
260
309
  Footer: typeof DataTableFooter;
310
+ Header: typeof DataTableHeader;
261
311
  Row: typeof DataTableRow;
262
- Cell: typeof DataTableCell;
263
312
  }
264
313
  export interface DataTableProperties {
265
314
  /**