@k8slens/lds 0.51.8 → 0.52.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,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type DefaultOption, type SelectProps } from "./Select";
3
3
  export declare type OptionProps<T> = Pick<SelectProps<T>, "size" | "itemClassName" | "placeholder"> & NonNullable<Pick<SelectProps<T>, "renderContent">> & {
4
- currentValue?: T;
4
+ currentValue?: T | null;
5
5
  option: T;
6
6
  };
7
7
  export default function Option<T extends DefaultOption>({ option, currentValue, size, itemClassName, renderContent, placeholder, }: OptionProps<T>): JSX.Element;
@@ -17,7 +17,7 @@ interface Props<T> {
17
17
  id?: string;
18
18
  "aria-label"?: string;
19
19
  options: Array<T | Group<T>>;
20
- value: T | undefined;
20
+ value: T | undefined | null;
21
21
  onChange(d: T): void;
22
22
  placeholder?: string;
23
23
  name?: string;
@@ -42,7 +42,7 @@ interface Props<T> {
42
42
  * @param state - The state of the current option
43
43
  * @param placeholder - The placeholder text
44
44
  */
45
- renderContent?(d: T | undefined, state: ItemState, placeholder?: string): ReactNode;
45
+ renderContent?(d: T | undefined | null, state: ItemState, placeholder?: string): ReactNode;
46
46
  /**
47
47
  * Loading state of the select element.
48
48
  */
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type DefaultOption, type SelectProps } from "./Select";
3
3
  export declare type OptionProps<T> = Pick<SelectProps<T>, "size" | "itemClassName" | "placeholder"> & NonNullable<Pick<SelectProps<T>, "renderContent">> & {
4
- currentValue?: T;
4
+ currentValue?: T | null;
5
5
  option: T;
6
6
  };
7
7
  export default function Option<T extends DefaultOption>({ option, currentValue, size, itemClassName, renderContent, placeholder, }: OptionProps<T>): JSX.Element;
@@ -17,7 +17,7 @@ interface Props<T> {
17
17
  id?: string;
18
18
  "aria-label"?: string;
19
19
  options: Array<T | Group<T>>;
20
- value: T | undefined;
20
+ value: T | undefined | null;
21
21
  onChange(d: T): void;
22
22
  placeholder?: string;
23
23
  name?: string;
@@ -42,7 +42,7 @@ interface Props<T> {
42
42
  * @param state - The state of the current option
43
43
  * @param placeholder - The placeholder text
44
44
  */
45
- renderContent?(d: T | undefined, state: ItemState, placeholder?: string): ReactNode;
45
+ renderContent?(d: T | undefined | null, state: ItemState, placeholder?: string): ReactNode;
46
46
  /**
47
47
  * Loading state of the select element.
48
48
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k8slens/lds",
3
- "version": "0.51.8",
3
+ "version": "0.52.0",
4
4
  "description": "Lens Design System – Core React Component Library",
5
5
  "author": "Mirantis Inc",
6
6
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  "format": "eslint --fix ."
29
29
  },
30
30
  "devDependencies": {
31
- "@k8slens/lds-tokens": "^0.52.8",
31
+ "@k8slens/lds-tokens": "^0.53.0",
32
32
  "@storybook/react": "6.5.16",
33
33
  "@testing-library/react": "14.0.0",
34
34
  "@types/randomcolor": "0.5.9",
@@ -60,5 +60,5 @@
60
60
  "\\.svg": "<rootDir>/../../__mocks__/SVGStub.js"
61
61
  }
62
62
  },
63
- "gitHead": "36d92d0556b6fefa9c44b41c160dab58415ff15e"
63
+ "gitHead": "6129f120cf2529754557184651e5a95dac307a02"
64
64
  }
File without changes
File without changes