indicator-ui 1.0.28 → 1.0.29

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.
@@ -28,4 +28,9 @@ export type Merge<A extends Record<any, any>, B extends Record<any, any>> = Omit
28
28
  export type AsProps<T extends ElementType, P extends Record<string, any> = {}> = Merge<React.ComponentPropsWithoutRef<T>, {
29
29
  as?: T;
30
30
  } & P>;
31
+ export type InstanceRefAttributes<T extends ElementType> = {
32
+ instanceRef?: React.LegacyRef<T>;
33
+ };
34
+ export type ComponentPropsWithoutInstanceRef<T extends ElementType> = Omit<React.ComponentProps<T>, keyof InstanceRefAttributes<T>>;
35
+ export type ComponentInstanceRef<T extends ElementType> = React.ComponentProps<T> extends InstanceRefAttributes<infer Method> ? Method : never;
31
36
  export {};
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
- import { AsProps } from '../../../types';
3
- type PropsType<T extends React.ElementType> = AsProps<T, {
2
+ import { AsProps, InstanceRefAttributes } from '../../../types';
3
+ type PropsType<T extends React.ElementType> = AsProps<T, InstanceRefAttributes<T> & {
4
4
  selected?: boolean;
5
5
  disabled?: boolean;
6
6
  title?: React.ReactNode;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "react-components",
12
12
  "ui-kit"
13
13
  ],
14
- "version": "1.0.28",
14
+ "version": "1.0.29",
15
15
  "exports": {
16
16
  ".": {
17
17
  "types": "./dist/types/index.d.ts",