@7shifts/sous-chef 3.42.0 → 3.43.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,12 +1,8 @@
1
- import React, { ReactNode } from 'react';
2
- import AccordionItem from './AccordionItem';
3
- type AccordionItem = {
4
- title: string;
5
- content: ReactNode;
6
- id?: string;
7
- };
1
+ import React from 'react';
2
+ import { AccordionItem as AccordionItemType } from './types';
8
3
  type Props = {
9
- items: AccordionItem[];
4
+ items: AccordionItemType[];
5
+ onExpand?: (item: AccordionItemType) => void;
10
6
  };
11
7
  declare const Accordion: (props: Props) => React.JSX.Element | null;
12
8
  export default Accordion;
@@ -1,11 +1,9 @@
1
1
  import React from 'react';
2
- import { ReactNode } from 'react';
2
+ import { AccordionItem as AccordionItemType } from '../types';
3
3
  type Props = {
4
- title: string;
5
- content: ReactNode;
6
- id: string;
4
+ item: AccordionItemType;
7
5
  isOpen: boolean;
8
- handleAccordionItemOpen: (id: string | null) => void;
6
+ handleAccordionItemOpen: (item: AccordionItemType | null) => void;
9
7
  };
10
8
  declare const AccordionItem: (props: Props) => React.JSX.Element;
11
9
  export default AccordionItem;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ export type AccordionItem = {
3
+ title: string;
4
+ content: ReactNode;
5
+ id?: string;
6
+ };
@@ -3,5 +3,7 @@ import DataTableRow from './DataTableRow';
3
3
  import DataTableEditableCell from './DataTableEditableCell';
4
4
  import DataTableCell from './DataTableCell/DataTableCell';
5
5
  import { useDataTableContext } from './DataTable/DataTableContext';
6
- export { DataTable, DataTableRow, DataTableCell, DataTableEditableCell, useDataTableContext };
6
+ import Accordion from './Accordion';
7
+ export { DataTable, DataTableRow, DataTableCell, DataTableEditableCell, useDataTableContext, Accordion };
7
8
  export type { DataTableColumn, DataTableCustomComponent, DataTableSortDirection, DataTableSort, DataTableAction } from './DataTable/types';
9
+ export type { AccordionItem } from './Accordion/types';
@@ -17,6 +17,7 @@ type Props = {
17
17
  onVisibleChange?: (isVisible: boolean) => void;
18
18
  children: React.ReactElement;
19
19
  testId?: string;
20
+ maxHeight?: string | number;
20
21
  };
21
22
  declare const Tooltip: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
22
23
  export default Tooltip;
@@ -11,6 +11,7 @@ type Props = {
11
11
  onFocusOut: () => void;
12
12
  extraClass?: string;
13
13
  testId?: string;
14
+ maxHeight?: string | number;
14
15
  };
15
16
  declare const TooltipOverlay: React.FC<Props>;
16
17
  export default TooltipOverlay;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7shifts/sous-chef",
3
- "version": "3.42.0",
3
+ "version": "3.43.0",
4
4
  "description": "7shifts component library",
5
5
  "author": "7shifts",
6
6
  "license": "MIT",