@7shifts/sous-chef 3.50.0 → 3.51.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.
@@ -0,0 +1,7 @@
1
+ import React, { ReactNode } from 'react';
2
+ type Props = {
3
+ children: ReactNode;
4
+ testId?: string;
5
+ };
6
+ declare const ActionList: ({ children, testId }: Props) => React.JSX.Element;
7
+ export default ActionList;
@@ -0,0 +1 @@
1
+ export { default } from './ActionList';
@@ -0,0 +1,23 @@
1
+ import React, { ReactNode } from 'react';
2
+ import Button from '../../actions/Button/Button';
3
+ import { ActionListItemTheme } from './type';
4
+ export type MenuAction = {
5
+ action: string;
6
+ label: React.ReactNode;
7
+ onAction: (e: React.MouseEvent | React.KeyboardEvent) => void;
8
+ buttonProps?: Pick<React.ComponentPropsWithoutRef<typeof Button>, 'theme' | 'disabled' | 'loading' | 'title' | 'testId'>;
9
+ showInKebab?: boolean;
10
+ };
11
+ type Props = {
12
+ title: string;
13
+ children?: ReactNode;
14
+ icon: React.ReactElement;
15
+ theme?: ActionListItemTheme;
16
+ onAction?: () => void;
17
+ disabled?: boolean;
18
+ actions?: MenuAction[];
19
+ suffix?: ReactNode;
20
+ testId?: string;
21
+ };
22
+ declare const ActionListItem: ({ title, children, icon, theme, onAction, disabled, actions, suffix, testId }: Props) => React.JSX.Element;
23
+ export default ActionListItem;
@@ -0,0 +1,8 @@
1
+ import { MenuAction } from '../ActionListItem';
2
+ import React from 'react';
3
+ type Props = {
4
+ actions: MenuAction[];
5
+ disabled: boolean;
6
+ };
7
+ declare const ActionListItemActions: ({ actions, disabled }: Props) => React.JSX.Element;
8
+ export default ActionListItemActions;
@@ -0,0 +1 @@
1
+ export { default } from './ActionListItem';
@@ -0,0 +1 @@
1
+ export type ActionListItemTheme = 'info' | 'warning' | 'success' | 'danger' | 'upsell';
@@ -4,6 +4,8 @@ import DataTableEditableCell from './DataTableEditableCell';
4
4
  import DataTableCell from './DataTableCell/DataTableCell';
5
5
  import { useDataTableContext } from './DataTable/DataTableContext';
6
6
  import Accordion from './Accordion';
7
- export { DataTable, DataTableRow, DataTableCell, DataTableEditableCell, useDataTableContext, Accordion };
7
+ import ActionList from './ActionList';
8
+ import ActionListItem from './ActionListItem';
9
+ export { DataTable, DataTableRow, DataTableCell, DataTableEditableCell, useDataTableContext, Accordion, ActionList, ActionListItem };
8
10
  export type { DataTableColumn, DataTableCustomComponent, DataTableSortDirection, DataTableSort, DataTableAction } from './DataTable/types';
9
11
  export type { AccordionItem } from './Accordion/types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7shifts/sous-chef",
3
- "version": "3.50.0",
3
+ "version": "3.51.0",
4
4
  "description": "7shifts component library",
5
5
  "author": "7shifts",
6
6
  "license": "MIT",