@worldresources/wri-design-systems 2.192.0 → 2.194.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
@@ -660,9 +660,13 @@ type MenuProps = {
660
660
  }[];
661
661
  onSelect?: (value: string) => void;
662
662
  customTrigger?: React.ReactNode;
663
+ /** When set, enables checkable items. 'multiple' allows many items checked at once; 'radio' allows only one. Omit (default) for a non-selectable menu. */
664
+ selectionMode?: 'multiple' | 'radio';
665
+ /** Values that are checked by default on first render. */
666
+ defaultSelectedValues?: string[];
663
667
  };
664
668
 
665
- declare const Menu: ({ theme, label, fontSize, items, groups, onSelect, customTrigger, }: MenuProps) => _emotion_react_jsx_runtime.JSX.Element;
669
+ declare const Menu: ({ theme, label, fontSize, items, groups, onSelect, customTrigger, selectionMode, defaultSelectedValues, }: MenuProps) => _emotion_react_jsx_runtime.JSX.Element;
666
670
 
667
671
  type MultiActionButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children'> & {
668
672
  variant?: 'primary' | 'secondary';
@@ -1220,14 +1224,22 @@ interface ListProps {
1220
1224
 
1221
1225
  declare const List: ({ items, noBorder, highlightedIndex }: ListProps) => _emotion_react_jsx_runtime.JSX.Element;
1222
1226
 
1227
+ type TableColumn = {
1228
+ key: string;
1229
+ label: string;
1230
+ sortable?: boolean;
1231
+ width?: string;
1232
+ /** When true, this column sticks to the left during horizontal scroll. */
1233
+ sticky?: boolean;
1234
+ };
1235
+ type TableRenderRowContext = {
1236
+ className?: string;
1237
+ getCellProps: (columnKey: string) => Record<string, any>;
1238
+ };
1223
1239
  type TableProps = {
1224
- columns: {
1225
- key: string;
1226
- label: string;
1227
- sortable?: boolean;
1228
- }[];
1240
+ columns: TableColumn[];
1229
1241
  data?: any;
1230
- renderRow: any;
1242
+ renderRow: (row: any, context?: TableRenderRowContext) => ReactNode;
1231
1243
  striped?: boolean;
1232
1244
  stickyHeader?: boolean;
1233
1245
  selectable?: boolean;