@livetiles/reach-plugin-types 0.5.0-preview.1001 → 0.5.0-preview.1003

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.
Files changed (2) hide show
  1. package/lib/index.d.ts +7 -3
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -6448,6 +6448,10 @@ declare module "libs/reach/ui/common/src/reach-2/select/Select" {
6448
6448
  id: string;
6449
6449
  label: string;
6450
6450
  }
6451
+ export interface SelectItemGroupProps<T> {
6452
+ title: string;
6453
+ options: T[];
6454
+ }
6451
6455
  interface SelectProps<T> {
6452
6456
  allowCreation?: boolean;
6453
6457
  className?: string;
@@ -6460,14 +6464,14 @@ declare module "libs/reach/ui/common/src/reach-2/select/Select" {
6460
6464
  onInputChange?: (value: string) => void;
6461
6465
  onItemsChange?: (items: T[]) => void;
6462
6466
  onRemoveItem?: (id: string) => void;
6463
- options: T[];
6467
+ options: T[] | SelectItemGroupProps<T>[];
6464
6468
  placeholder?: string;
6465
6469
  renderItem?: (item: T, isSelected: boolean, onSelect: () => void) => JSX.Element;
6466
6470
  searchable?: boolean;
6467
6471
  showSelectedItems?: boolean;
6468
6472
  values?: T[];
6469
6473
  }
6470
- const Select: <T extends SelectItemProps = SelectItemProps>({ allowCreation, className, disabled, emptyLabel, errorItems, errorLabel, multiple, onAddItem, onInputChange, onItemsChange, onRemoveItem, options, placeholder, renderItem, searchable, showSelectedItems, values, }: SelectProps<T>) => JSX.Element;
6474
+ const Select: <T extends SelectItemProps = SelectItemProps>({ allowCreation, className, disabled, emptyLabel, errorItems, errorLabel, multiple, onAddItem, onInputChange, onItemsChange, onRemoveItem, options: preprocessedOptions, placeholder, renderItem, searchable, showSelectedItems, values, }: SelectProps<T>) => JSX.Element;
6471
6475
  export default Select;
6472
6476
  }
6473
6477
  declare module "libs/reach/ui/common/src/reach-2/select/UserSelect" {
@@ -6655,7 +6659,7 @@ declare module "libs/reach/ui/common/src/reach-2/index" {
6655
6659
  export * from "libs/reach/ui/common/src/reach-2/progress/index";
6656
6660
  export { default as Select } from "libs/reach/ui/common/src/reach-2/select/Select";
6657
6661
  export { default as UserSelect } from "libs/reach/ui/common/src/reach-2/select/UserSelect";
6658
- export type { SelectItemProps } from "libs/reach/ui/common/src/reach-2/select/Select";
6662
+ export type { SelectItemGroupProps, SelectItemProps } from "libs/reach/ui/common/src/reach-2/select/Select";
6659
6663
  export * from "libs/reach/ui/common/src/reach-2/surfaces/index";
6660
6664
  export { default as Card } from "libs/reach/ui/common/src/reach-2/surfaces/Card";
6661
6665
  export { default as TabGroup } from "libs/reach/ui/common/src/reach-2/tabs/TabGroup";
package/package.json CHANGED
@@ -4,6 +4,6 @@
4
4
  "main": "",
5
5
  "types": "./index.d.ts",
6
6
  "license": "ISC",
7
- "version": "0.5.0-preview.1001",
7
+ "version": "0.5.0-preview.1003",
8
8
  "dependencies": {}
9
9
  }