@necto-react/components 1.2.1 → 1.2.3

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
@@ -1,5 +1,5 @@
1
1
  import { HTMLElements } from '@necto/dom';
2
- import { ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, Ref, ReactElement, FC, ReactNode } from 'react';
2
+ import { ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, Ref, ReactElement, FC, ReactNode, RefAttributes } from 'react';
3
3
  import { DOM } from '@necto/constants';
4
4
 
5
5
  /**
@@ -64,7 +64,7 @@ interface IfProps {
64
64
  *
65
65
  */
66
66
 
67
- declare const If: FC<IfProps>;
67
+ declare const If: (props: IfProps) => ReactElement | null;
68
68
 
69
69
  interface ElseProps {
70
70
  children: ReactNode | Array<ReactNode> | (() => ReactNode);
@@ -78,7 +78,7 @@ interface ElseProps {
78
78
  *
79
79
  */
80
80
 
81
- declare const Else: FC<ElseProps>;
81
+ declare const Else: (props: ElseProps) => ReactElement;
82
82
 
83
83
  type AppleButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
84
84
  children?: ReactNode;
@@ -96,7 +96,7 @@ type AppleButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
96
96
  *
97
97
  */
98
98
 
99
- declare const AppleButton: FC<AppleButtonProps>;
99
+ declare const AppleButton: ForwardRefExoticComponent<Omit<AppleButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
100
100
 
101
101
  type AtlassianButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
102
102
  children?: ReactNode;
@@ -114,7 +114,7 @@ type AtlassianButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T>
114
114
  *
115
115
  */
116
116
 
117
- declare const AtlassianButton: FC<AtlassianButtonProps>;
117
+ declare const AtlassianButton: ForwardRefExoticComponent<Omit<AtlassianButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
118
118
 
119
119
  type BitbucketButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
120
120
  children?: ReactNode;
@@ -132,7 +132,7 @@ type BitbucketButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T>
132
132
  *
133
133
  */
134
134
 
135
- declare const BitbucketButton: FC<BitbucketButtonProps>;
135
+ declare const BitbucketButton: ForwardRefExoticComponent<Omit<BitbucketButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
136
136
 
137
137
  type DiscordButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
138
138
  children?: ReactNode;
@@ -150,7 +150,7 @@ type DiscordButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> &
150
150
  *
151
151
  */
152
152
 
153
- declare const DiscordButton: FC<DiscordButtonProps>;
153
+ declare const DiscordButton: ForwardRefExoticComponent<Omit<DiscordButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
154
154
 
155
155
  type DropboxButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
156
156
  children?: ReactNode;
@@ -168,7 +168,7 @@ type DropboxButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> &
168
168
  *
169
169
  */
170
170
 
171
- declare const DropboxButton: FC<DropboxButtonProps>;
171
+ declare const DropboxButton: ForwardRefExoticComponent<Omit<DropboxButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
172
172
 
173
173
  type FacebookButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
174
174
  children?: ReactNode;
@@ -186,7 +186,7 @@ type FacebookButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> &
186
186
  *
187
187
  */
188
188
 
189
- declare const FacebookButton: FC<FacebookButtonProps>;
189
+ declare const FacebookButton: ForwardRefExoticComponent<Omit<FacebookButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
190
190
 
191
191
  type GitHubButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
192
192
  children?: ReactNode;
@@ -204,7 +204,7 @@ type GitHubButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
204
204
  *
205
205
  */
206
206
 
207
- declare const GitHubButton: FC<GitHubButtonProps>;
207
+ declare const GitHubButton: ForwardRefExoticComponent<Omit<GitHubButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
208
208
 
209
209
  type GitLabButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
210
210
  children?: ReactNode;
@@ -222,7 +222,7 @@ type GitLabButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
222
222
  *
223
223
  */
224
224
 
225
- declare const GitLabButton: FC<GitLabButtonProps>;
225
+ declare const GitLabButton: ForwardRefExoticComponent<Omit<GitLabButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
226
226
 
227
227
  type GoogleButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
228
228
  children?: ReactNode;
@@ -240,6 +240,6 @@ type GoogleButtonProps<T extends ElementType = 'button'> = PrimitiveProps<T> & {
240
240
  *
241
241
  */
242
242
 
243
- declare const GoogleButton: FC<GoogleButtonProps>;
243
+ declare const GoogleButton: ForwardRefExoticComponent<Omit<GoogleButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
244
244
 
245
245
  export { AppleButton, type AppleButtonProps, AtlassianButton, type AtlassianButtonProps, BitbucketButton, type BitbucketButtonProps, DiscordButton, type DiscordButtonProps, DropboxButton, type DropboxButtonProps, Else, type ElseProps, FacebookButton, type FacebookButtonProps, GitHubButton, type GitHubButtonProps, GitLabButton, type GitLabButtonProps, GoogleButton, type GoogleButtonProps, If, type IfProps, Primitive };