@necto-react/components 1.2.14 → 1.3.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.
- package/README.md +21 -0
- package/dist/index.cjs +237 -174
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +128 -12
- package/dist/index.d.ts +128 -12
- package/dist/index.js +237 -174
- package/dist/index.js.map +1 -1
- package/package.json +18 -14
- package/LICENSE +0 -21
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { HTMLElements } from '@necto/dom';
|
|
2
1
|
import { ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, Ref, ReactElement, FC, ReactNode, RefAttributes } from 'react';
|
|
3
2
|
import { DOM } from '@necto/constants';
|
|
4
3
|
import { Interpolation, Theme } from '@emotion/react';
|
|
4
|
+
import { HTMLElements } from '@necto/dom';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
@@ -53,11 +53,76 @@ declare const Primitive: (<E extends ElementType = (typeof HTMLElements)['Div']>
|
|
|
53
53
|
*
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
type LineStyle = 'solid' | 'dashed';
|
|
57
|
+
type Overflow = 'hidden' | 'scroll' | 'clip';
|
|
58
|
+
type BoxProps<T extends ElementType = 'div'> = PrimitiveProps<T> & {
|
|
59
|
+
/** Background color */
|
|
60
|
+
background?: string;
|
|
61
|
+
/** Border color */
|
|
62
|
+
borderColor?: string;
|
|
63
|
+
/** Border style */
|
|
64
|
+
borderStyle?: LineStyle;
|
|
65
|
+
/** Border width */
|
|
66
|
+
borderWidth?: string;
|
|
67
|
+
/** Vertical start border width */
|
|
68
|
+
borderBlockStartWidth?: string;
|
|
69
|
+
/** Vertical end border width */
|
|
70
|
+
borderBlockEndWidth?: string;
|
|
71
|
+
/** Horizontal start border width */
|
|
72
|
+
borderInlineStartWidth?: string;
|
|
73
|
+
/** Horizontal end border width */
|
|
74
|
+
borderInlineEndWidth?: string;
|
|
75
|
+
/** Border radius */
|
|
76
|
+
borderRadius?: string;
|
|
77
|
+
/** Vertical end horizontal start border radius */
|
|
78
|
+
borderEndStartRadius?: string;
|
|
79
|
+
/** Vertical end horizontal end border radius */
|
|
80
|
+
borderEndEndRadius?: string;
|
|
81
|
+
/** Vertical start horizontal start border radius */
|
|
82
|
+
borderStartStartRadius?: string;
|
|
83
|
+
/** Vertical start horizontal end border radius */
|
|
84
|
+
borderStartEndRadius?: string;
|
|
85
|
+
/** Text color */
|
|
86
|
+
color?: string;
|
|
87
|
+
/** Minimum height */
|
|
88
|
+
minHeight?: string;
|
|
89
|
+
/** Minimum width */
|
|
90
|
+
minWidth?: string;
|
|
91
|
+
/** Maximum width */
|
|
92
|
+
maxWidth?: string;
|
|
93
|
+
/** Width */
|
|
94
|
+
width?: string;
|
|
95
|
+
/** Clip horizontal content */
|
|
96
|
+
overflowX?: Overflow;
|
|
97
|
+
/** Clip vertical content */
|
|
98
|
+
overflowY?: Overflow;
|
|
99
|
+
/** Padding on all sides */
|
|
100
|
+
padding?: number;
|
|
101
|
+
/** Vertical padding */
|
|
102
|
+
paddingBlock?: number;
|
|
103
|
+
/** Vertical start padding */
|
|
104
|
+
paddingBlockStart?: number;
|
|
105
|
+
/** Vertical end padding */
|
|
106
|
+
paddingBlockEnd?: number;
|
|
107
|
+
/** Horizontal padding */
|
|
108
|
+
paddingInline?: number;
|
|
109
|
+
/** Horizontal start padding */
|
|
110
|
+
paddingInlineStart?: number;
|
|
111
|
+
/** Horizontal end padding */
|
|
112
|
+
paddingInlineEnd?: number;
|
|
113
|
+
/** Box shadow */
|
|
114
|
+
shadow?: string;
|
|
115
|
+
/** Outline color */
|
|
116
|
+
outlineColor?: string;
|
|
117
|
+
/** Outline style */
|
|
118
|
+
outlineStyle?: LineStyle;
|
|
119
|
+
/** Outline width */
|
|
120
|
+
outlineWidth?: string;
|
|
121
|
+
/** Opacity */
|
|
122
|
+
opacity?: string;
|
|
123
|
+
/** z-index */
|
|
124
|
+
zIndex?: string;
|
|
125
|
+
};
|
|
61
126
|
|
|
62
127
|
/**
|
|
63
128
|
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
@@ -67,11 +132,27 @@ interface IfProps {
|
|
|
67
132
|
*
|
|
68
133
|
*/
|
|
69
134
|
|
|
70
|
-
declare const
|
|
135
|
+
declare const Box: (<T extends ElementType = 'div'>(props: BoxProps<T> & {
|
|
136
|
+
ref?: Ref<any>;
|
|
137
|
+
}) => ReactElement) & {
|
|
138
|
+
Root: any;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the MIT license found in the
|
|
145
|
+
* LICENSE file in the root directory of this source tree.
|
|
146
|
+
*
|
|
147
|
+
*/
|
|
71
148
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
149
|
+
type ShadowBevelProps = PrimitiveProps<ElementType> & {
|
|
150
|
+
bevel?: boolean;
|
|
151
|
+
boxShadow?: number | string;
|
|
152
|
+
borderRadius?: number | string;
|
|
153
|
+
zIndex?: number;
|
|
154
|
+
padding?: number;
|
|
155
|
+
};
|
|
75
156
|
|
|
76
157
|
/**
|
|
77
158
|
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
@@ -81,7 +162,42 @@ interface ElseProps {
|
|
|
81
162
|
*
|
|
82
163
|
*/
|
|
83
164
|
|
|
84
|
-
declare const
|
|
165
|
+
declare const ShadowBevel: ((props: ShadowBevelProps & {
|
|
166
|
+
ref?: Ref<any>;
|
|
167
|
+
}) => ReactElement) & {
|
|
168
|
+
Root: any;
|
|
169
|
+
} & {
|
|
170
|
+
[k: string]: any;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the MIT license found in the
|
|
177
|
+
* LICENSE file in the root directory of this source tree.
|
|
178
|
+
*
|
|
179
|
+
*/
|
|
180
|
+
|
|
181
|
+
type VisuallyHiddenProps = Omit<PrimitiveProps<ElementType>, 'css'> & {
|
|
182
|
+
/** Whether the element should become visible when focused. */
|
|
183
|
+
isFocusable?: boolean;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the MIT license found in the
|
|
190
|
+
* LICENSE file in the root directory of this source tree.
|
|
191
|
+
*
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
declare const VisuallyHidden: ((props: VisuallyHiddenProps & {
|
|
195
|
+
ref?: Ref<any>;
|
|
196
|
+
}) => ReactElement) & {
|
|
197
|
+
Root: any;
|
|
198
|
+
} & {
|
|
199
|
+
[k: string]: any;
|
|
200
|
+
};
|
|
85
201
|
|
|
86
202
|
/**
|
|
87
203
|
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
@@ -383,4 +499,4 @@ type XButtonProps<T extends ElementType = 'button'> = ButtonProps<T>;
|
|
|
383
499
|
|
|
384
500
|
declare const XButton: ForwardRefExoticComponent<Omit<XButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>>;
|
|
385
501
|
|
|
386
|
-
export { AppleButton, type AppleButtonProps, AtlassianButton, type AtlassianButtonProps, BitbucketButton, type BitbucketButtonProps,
|
|
502
|
+
export { AppleButton, type AppleButtonProps, AtlassianButton, type AtlassianButtonProps, BitbucketButton, type BitbucketButtonProps, Box, type BoxProps, DiscordButton, type DiscordButtonProps, DropboxButton, type DropboxButtonProps, FacebookButton, type FacebookButtonProps, GitHubButton, type GitHubButtonProps, GitLabButton, type GitLabButtonProps, GoogleButton, type GoogleButtonProps, HubSpotButton, type HubSpotButtonProps, HuggingFaceButton, type HuggingFaceButtonProps, LinkedInButton, type LinkedInButtonProps, MetaMaskButton, type MetaMaskButtonProps, MicrosoftButton, type MicrosoftButtonProps, NotionButton, type NotionButtonProps, OKXButton, type OKXButtonProps, Primitive, type PrimitiveProps, SalesforceButton, type SalesforceButtonProps, ShadowBevel, type ShadowBevelProps, SlackButton, type SlackButtonProps, SnapchatButton, type SnapchatButtonProps, SpotifyButton, type SpotifyButtonProps, TikTokButton, type TikTokButtonProps, TwitchButton, type TwitchButtonProps, VisuallyHidden, type VisuallyHiddenProps, XButton, type XButtonProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { HTMLElements } from '@necto/dom';
|
|
2
1
|
import { ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, Ref, ReactElement, FC, ReactNode, RefAttributes } from 'react';
|
|
3
2
|
import { DOM } from '@necto/constants';
|
|
4
3
|
import { Interpolation, Theme } from '@emotion/react';
|
|
4
|
+
import { HTMLElements } from '@necto/dom';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
@@ -53,11 +53,76 @@ declare const Primitive: (<E extends ElementType = (typeof HTMLElements)['Div']>
|
|
|
53
53
|
*
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
type LineStyle = 'solid' | 'dashed';
|
|
57
|
+
type Overflow = 'hidden' | 'scroll' | 'clip';
|
|
58
|
+
type BoxProps<T extends ElementType = 'div'> = PrimitiveProps<T> & {
|
|
59
|
+
/** Background color */
|
|
60
|
+
background?: string;
|
|
61
|
+
/** Border color */
|
|
62
|
+
borderColor?: string;
|
|
63
|
+
/** Border style */
|
|
64
|
+
borderStyle?: LineStyle;
|
|
65
|
+
/** Border width */
|
|
66
|
+
borderWidth?: string;
|
|
67
|
+
/** Vertical start border width */
|
|
68
|
+
borderBlockStartWidth?: string;
|
|
69
|
+
/** Vertical end border width */
|
|
70
|
+
borderBlockEndWidth?: string;
|
|
71
|
+
/** Horizontal start border width */
|
|
72
|
+
borderInlineStartWidth?: string;
|
|
73
|
+
/** Horizontal end border width */
|
|
74
|
+
borderInlineEndWidth?: string;
|
|
75
|
+
/** Border radius */
|
|
76
|
+
borderRadius?: string;
|
|
77
|
+
/** Vertical end horizontal start border radius */
|
|
78
|
+
borderEndStartRadius?: string;
|
|
79
|
+
/** Vertical end horizontal end border radius */
|
|
80
|
+
borderEndEndRadius?: string;
|
|
81
|
+
/** Vertical start horizontal start border radius */
|
|
82
|
+
borderStartStartRadius?: string;
|
|
83
|
+
/** Vertical start horizontal end border radius */
|
|
84
|
+
borderStartEndRadius?: string;
|
|
85
|
+
/** Text color */
|
|
86
|
+
color?: string;
|
|
87
|
+
/** Minimum height */
|
|
88
|
+
minHeight?: string;
|
|
89
|
+
/** Minimum width */
|
|
90
|
+
minWidth?: string;
|
|
91
|
+
/** Maximum width */
|
|
92
|
+
maxWidth?: string;
|
|
93
|
+
/** Width */
|
|
94
|
+
width?: string;
|
|
95
|
+
/** Clip horizontal content */
|
|
96
|
+
overflowX?: Overflow;
|
|
97
|
+
/** Clip vertical content */
|
|
98
|
+
overflowY?: Overflow;
|
|
99
|
+
/** Padding on all sides */
|
|
100
|
+
padding?: number;
|
|
101
|
+
/** Vertical padding */
|
|
102
|
+
paddingBlock?: number;
|
|
103
|
+
/** Vertical start padding */
|
|
104
|
+
paddingBlockStart?: number;
|
|
105
|
+
/** Vertical end padding */
|
|
106
|
+
paddingBlockEnd?: number;
|
|
107
|
+
/** Horizontal padding */
|
|
108
|
+
paddingInline?: number;
|
|
109
|
+
/** Horizontal start padding */
|
|
110
|
+
paddingInlineStart?: number;
|
|
111
|
+
/** Horizontal end padding */
|
|
112
|
+
paddingInlineEnd?: number;
|
|
113
|
+
/** Box shadow */
|
|
114
|
+
shadow?: string;
|
|
115
|
+
/** Outline color */
|
|
116
|
+
outlineColor?: string;
|
|
117
|
+
/** Outline style */
|
|
118
|
+
outlineStyle?: LineStyle;
|
|
119
|
+
/** Outline width */
|
|
120
|
+
outlineWidth?: string;
|
|
121
|
+
/** Opacity */
|
|
122
|
+
opacity?: string;
|
|
123
|
+
/** z-index */
|
|
124
|
+
zIndex?: string;
|
|
125
|
+
};
|
|
61
126
|
|
|
62
127
|
/**
|
|
63
128
|
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
@@ -67,11 +132,27 @@ interface IfProps {
|
|
|
67
132
|
*
|
|
68
133
|
*/
|
|
69
134
|
|
|
70
|
-
declare const
|
|
135
|
+
declare const Box: (<T extends ElementType = 'div'>(props: BoxProps<T> & {
|
|
136
|
+
ref?: Ref<any>;
|
|
137
|
+
}) => ReactElement) & {
|
|
138
|
+
Root: any;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the MIT license found in the
|
|
145
|
+
* LICENSE file in the root directory of this source tree.
|
|
146
|
+
*
|
|
147
|
+
*/
|
|
71
148
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
149
|
+
type ShadowBevelProps = PrimitiveProps<ElementType> & {
|
|
150
|
+
bevel?: boolean;
|
|
151
|
+
boxShadow?: number | string;
|
|
152
|
+
borderRadius?: number | string;
|
|
153
|
+
zIndex?: number;
|
|
154
|
+
padding?: number;
|
|
155
|
+
};
|
|
75
156
|
|
|
76
157
|
/**
|
|
77
158
|
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
@@ -81,7 +162,42 @@ interface ElseProps {
|
|
|
81
162
|
*
|
|
82
163
|
*/
|
|
83
164
|
|
|
84
|
-
declare const
|
|
165
|
+
declare const ShadowBevel: ((props: ShadowBevelProps & {
|
|
166
|
+
ref?: Ref<any>;
|
|
167
|
+
}) => ReactElement) & {
|
|
168
|
+
Root: any;
|
|
169
|
+
} & {
|
|
170
|
+
[k: string]: any;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the MIT license found in the
|
|
177
|
+
* LICENSE file in the root directory of this source tree.
|
|
178
|
+
*
|
|
179
|
+
*/
|
|
180
|
+
|
|
181
|
+
type VisuallyHiddenProps = Omit<PrimitiveProps<ElementType>, 'css'> & {
|
|
182
|
+
/** Whether the element should become visible when focused. */
|
|
183
|
+
isFocusable?: boolean;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the MIT license found in the
|
|
190
|
+
* LICENSE file in the root directory of this source tree.
|
|
191
|
+
*
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
declare const VisuallyHidden: ((props: VisuallyHiddenProps & {
|
|
195
|
+
ref?: Ref<any>;
|
|
196
|
+
}) => ReactElement) & {
|
|
197
|
+
Root: any;
|
|
198
|
+
} & {
|
|
199
|
+
[k: string]: any;
|
|
200
|
+
};
|
|
85
201
|
|
|
86
202
|
/**
|
|
87
203
|
* Copyright (c) Corinvo, LLC. and affiliates.
|
|
@@ -383,4 +499,4 @@ type XButtonProps<T extends ElementType = 'button'> = ButtonProps<T>;
|
|
|
383
499
|
|
|
384
500
|
declare const XButton: ForwardRefExoticComponent<Omit<XButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>>;
|
|
385
501
|
|
|
386
|
-
export { AppleButton, type AppleButtonProps, AtlassianButton, type AtlassianButtonProps, BitbucketButton, type BitbucketButtonProps,
|
|
502
|
+
export { AppleButton, type AppleButtonProps, AtlassianButton, type AtlassianButtonProps, BitbucketButton, type BitbucketButtonProps, Box, type BoxProps, DiscordButton, type DiscordButtonProps, DropboxButton, type DropboxButtonProps, FacebookButton, type FacebookButtonProps, GitHubButton, type GitHubButtonProps, GitLabButton, type GitLabButtonProps, GoogleButton, type GoogleButtonProps, HubSpotButton, type HubSpotButtonProps, HuggingFaceButton, type HuggingFaceButtonProps, LinkedInButton, type LinkedInButtonProps, MetaMaskButton, type MetaMaskButtonProps, MicrosoftButton, type MicrosoftButtonProps, NotionButton, type NotionButtonProps, OKXButton, type OKXButtonProps, Primitive, type PrimitiveProps, SalesforceButton, type SalesforceButtonProps, ShadowBevel, type ShadowBevelProps, SlackButton, type SlackButtonProps, SnapchatButton, type SnapchatButtonProps, SpotifyButton, type SpotifyButtonProps, TikTokButton, type TikTokButtonProps, TwitchButton, type TwitchButtonProps, VisuallyHidden, type VisuallyHiddenProps, XButton, type XButtonProps };
|