@delightui/components 0.1.135 → 0.1.137

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.
@@ -288,6 +288,6 @@ declare const usePresenter: (props: SelectProps) => {
288
288
  };
289
289
  onOptionsOpen: () => void;
290
290
  onOptionsClose: () => void;
291
- displayValue: import("react").ReactNode;
291
+ displayValue: string | number | true | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | undefined;
292
292
  };
293
293
  export default usePresenter;
@@ -20,10 +20,6 @@ export type SelectContextType = {
20
20
  * Function to reset the selected value to its default state.
21
21
  */
22
22
  resetSelectedValue: () => void;
23
- /**
24
- * Function to register a value-label pair from Option components.
25
- */
26
- registerOption: (value: FieldValue, label: React.ReactNode) => void;
27
23
  /**
28
24
  * Function to get the display label for a value.
29
25
  */
@@ -33,3 +33,10 @@ export declare const handleSelectionChange: (newValue: string | number, selected
33
33
  * @returns Whether the option is selected or not.
34
34
  */
35
35
  export declare const checkIsSelected: (optionValue?: string, selectedValue?: FieldValue) => boolean;
36
+ /**
37
+ * Utility to recursively find Option components and extract their props
38
+ */
39
+ export declare const extractOptionProps: (children: React.ReactNode, OptionComponent: React.ComponentType<any>) => Array<{
40
+ value: FieldValue;
41
+ label: React.ReactNode;
42
+ }>;