@amboss/design-system 3.46.3 → 3.47.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,3 @@
1
+ import type { RefObject } from "react";
2
+ /** Tracks the `clientWidth` of a ref'd element via `ResizeObserver`. */
3
+ export declare function useDataTableScrollContainerWidth(ref: RefObject<HTMLElement>): number | null;
@@ -0,0 +1 @@
1
+ import{useEffect,useState}from"react";export function useDataTableScrollContainerWidth(ref){let[width,setWidth]=useState(null);return useEffect(()=>{if("undefined"==typeof ResizeObserver||!ref.current)return;let elm=ref.current,observer=new ResizeObserver(()=>setWidth(elm.clientWidth));return observer.observe(elm),setWidth(elm.clientWidth),()=>observer.disconnect()},[ref]),width}
@@ -14,6 +14,6 @@ type UseDataTableSelectRowsReturn = {
14
14
  handleRowSelectionChange: DataTableProps["onRowSelectionChange"];
15
15
  setAllRowsSelected: Dispatch<React.SetStateAction<DataTableProps["allRowsSelected"]>>;
16
16
  setSelectedRowIds: Dispatch<React.SetStateAction<DataTableProps["selectedRowIds"]>>;
17
- } & Pick<DataTableProps, "selectedRowIds" | "allRowsSelected">;
17
+ } & Required<Pick<DataTableProps, "selectedRowIds" | "allRowsSelected">>;
18
18
  export declare function useDataTableSelectRows({ rows, getRowProps, initialAllRowsSelected, initialSelectedRowIds, }: UseDataTableSelectRowsArgs): UseDataTableSelectRowsReturn;
19
19
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amboss/design-system",
3
- "version": "3.46.3",
3
+ "version": "3.47.0",
4
4
  "description": "the design system for AMBOSS products",
5
5
  "author": "AMBOSS",
6
6
  "license": "ISC",