@cronocode/react-box 1.1.4 → 1.1.6
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/box.d.ts +6 -264
- package/box.mjs +12 -9
- package/components/buttonCore.d.ts +3 -3
- package/components/buttonCore.mjs +9 -8
- package/components/{uncontrolledCheckboxCore.d.ts → checkboxCore.d.ts} +5 -5
- package/components/checkboxCore.mjs +25 -0
- package/components/{uncontrolledRadioButtonCore.d.ts → radioButtonCore.d.ts} +5 -5
- package/components/radioButtonCore.mjs +25 -0
- package/components/{uncontrolledTextareaCore.d.ts → textareaCore.d.ts} +6 -5
- package/components/textareaCore.mjs +29 -0
- package/components/{uncontrolledTextboxCore.d.ts → textboxCore.d.ts} +8 -6
- package/components/textboxCore.mjs +28 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/utils/object/objectUtils.d.ts +4 -0
- package/utils/utils.mjs +46 -34
- package/components/uncontrolledCheckboxCore.mjs +0 -27
- package/components/uncontrolledRadioButtonCore.mjs +0 -27
- package/components/uncontrolledTextareaCore.mjs +0 -44
- package/components/uncontrolledTextboxCore.mjs +0 -40
package/box.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { Ref } from 'react';
|
|
2
2
|
import { BoxStyles } from './types';
|
|
3
3
|
import ClassNameUtils from './utils/className/classNameUtils';
|
|
4
|
-
declare type
|
|
4
|
+
declare type AllProps<TTag extends keyof React.ReactHTML> = React.ComponentProps<TTag>;
|
|
5
|
+
declare type TagPropsType<TTag extends keyof React.ReactHTML> = Omit<AllProps<TTag>, 'className' | 'style' | 'ref'>;
|
|
5
6
|
interface Props<TTag extends keyof React.ReactHTML> extends BoxStyles {
|
|
6
7
|
children?: React.ReactNode | ((props: {
|
|
7
8
|
isHover: boolean;
|
|
@@ -10,266 +11,7 @@ interface Props<TTag extends keyof React.ReactHTML> extends BoxStyles {
|
|
|
10
11
|
props?: TagPropsType<TTag>;
|
|
11
12
|
style?: React.ComponentProps<TTag>['style'];
|
|
12
13
|
className?: ClassNameUtils.ClassNameType;
|
|
14
|
+
ref?: Ref<HTMLElement>;
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
className: string;
|
|
17
|
-
slot?: React.ComponentProps<TTag>["slot"] | undefined;
|
|
18
|
-
title?: React.ComponentProps<TTag>["title"] | undefined;
|
|
19
|
-
color?: React.ComponentProps<TTag>["color"] | undefined;
|
|
20
|
-
children?: React.ComponentProps<TTag>["children"] | undefined;
|
|
21
|
-
ref?: React.ComponentProps<TTag>["ref"] | undefined;
|
|
22
|
-
key?: React.ComponentProps<TTag>["key"] | undefined;
|
|
23
|
-
defaultChecked?: React.ComponentProps<TTag>["defaultChecked"] | undefined;
|
|
24
|
-
defaultValue?: React.ComponentProps<TTag>["defaultValue"] | undefined;
|
|
25
|
-
suppressContentEditableWarning?: React.ComponentProps<TTag>["suppressContentEditableWarning"] | undefined;
|
|
26
|
-
suppressHydrationWarning?: React.ComponentProps<TTag>["suppressHydrationWarning"] | undefined;
|
|
27
|
-
accessKey?: React.ComponentProps<TTag>["accessKey"] | undefined;
|
|
28
|
-
contentEditable?: React.ComponentProps<TTag>["contentEditable"] | undefined;
|
|
29
|
-
contextMenu?: React.ComponentProps<TTag>["contextMenu"] | undefined;
|
|
30
|
-
dir?: React.ComponentProps<TTag>["dir"] | undefined;
|
|
31
|
-
draggable?: React.ComponentProps<TTag>["draggable"] | undefined;
|
|
32
|
-
hidden?: React.ComponentProps<TTag>["hidden"] | undefined;
|
|
33
|
-
id?: React.ComponentProps<TTag>["id"] | undefined;
|
|
34
|
-
lang?: React.ComponentProps<TTag>["lang"] | undefined;
|
|
35
|
-
nonce?: React.ComponentProps<TTag>["nonce"] | undefined;
|
|
36
|
-
placeholder?: React.ComponentProps<TTag>["placeholder"] | undefined;
|
|
37
|
-
spellCheck?: React.ComponentProps<TTag>["spellCheck"] | undefined;
|
|
38
|
-
tabIndex?: React.ComponentProps<TTag>["tabIndex"] | undefined;
|
|
39
|
-
translate?: React.ComponentProps<TTag>["translate"] | undefined;
|
|
40
|
-
radioGroup?: React.ComponentProps<TTag>["radioGroup"] | undefined;
|
|
41
|
-
role?: React.ComponentProps<TTag>["role"] | undefined;
|
|
42
|
-
about?: React.ComponentProps<TTag>["about"] | undefined;
|
|
43
|
-
datatype?: React.ComponentProps<TTag>["datatype"] | undefined;
|
|
44
|
-
inlist?: React.ComponentProps<TTag>["inlist"] | undefined;
|
|
45
|
-
prefix?: React.ComponentProps<TTag>["prefix"] | undefined;
|
|
46
|
-
property?: React.ComponentProps<TTag>["property"] | undefined;
|
|
47
|
-
resource?: React.ComponentProps<TTag>["resource"] | undefined;
|
|
48
|
-
typeof?: React.ComponentProps<TTag>["typeof"] | undefined;
|
|
49
|
-
vocab?: React.ComponentProps<TTag>["vocab"] | undefined;
|
|
50
|
-
autoCapitalize?: React.ComponentProps<TTag>["autoCapitalize"] | undefined;
|
|
51
|
-
autoCorrect?: React.ComponentProps<TTag>["autoCorrect"] | undefined;
|
|
52
|
-
autoSave?: React.ComponentProps<TTag>["autoSave"] | undefined;
|
|
53
|
-
itemProp?: React.ComponentProps<TTag>["itemProp"] | undefined;
|
|
54
|
-
itemScope?: React.ComponentProps<TTag>["itemScope"] | undefined;
|
|
55
|
-
itemType?: React.ComponentProps<TTag>["itemType"] | undefined;
|
|
56
|
-
itemID?: React.ComponentProps<TTag>["itemID"] | undefined;
|
|
57
|
-
itemRef?: React.ComponentProps<TTag>["itemRef"] | undefined;
|
|
58
|
-
results?: React.ComponentProps<TTag>["results"] | undefined;
|
|
59
|
-
security?: React.ComponentProps<TTag>["security"] | undefined;
|
|
60
|
-
unselectable?: React.ComponentProps<TTag>["unselectable"] | undefined;
|
|
61
|
-
inputMode?: React.ComponentProps<TTag>["inputMode"] | undefined;
|
|
62
|
-
is?: React.ComponentProps<TTag>["is"] | undefined;
|
|
63
|
-
'aria-activedescendant'?: React.ComponentProps<TTag>["aria-activedescendant"] | undefined;
|
|
64
|
-
'aria-atomic'?: React.ComponentProps<TTag>["aria-atomic"] | undefined;
|
|
65
|
-
'aria-autocomplete'?: React.ComponentProps<TTag>["aria-autocomplete"] | undefined;
|
|
66
|
-
'aria-busy'?: React.ComponentProps<TTag>["aria-busy"] | undefined;
|
|
67
|
-
'aria-checked'?: React.ComponentProps<TTag>["aria-checked"] | undefined;
|
|
68
|
-
'aria-colcount'?: React.ComponentProps<TTag>["aria-colcount"] | undefined;
|
|
69
|
-
'aria-colindex'?: React.ComponentProps<TTag>["aria-colindex"] | undefined;
|
|
70
|
-
'aria-colspan'?: React.ComponentProps<TTag>["aria-colspan"] | undefined;
|
|
71
|
-
'aria-controls'?: React.ComponentProps<TTag>["aria-controls"] | undefined;
|
|
72
|
-
'aria-current'?: React.ComponentProps<TTag>["aria-current"] | undefined;
|
|
73
|
-
'aria-describedby'?: React.ComponentProps<TTag>["aria-describedby"] | undefined;
|
|
74
|
-
'aria-details'?: React.ComponentProps<TTag>["aria-details"] | undefined;
|
|
75
|
-
'aria-disabled'?: React.ComponentProps<TTag>["aria-disabled"] | undefined;
|
|
76
|
-
'aria-dropeffect'?: React.ComponentProps<TTag>["aria-dropeffect"] | undefined;
|
|
77
|
-
'aria-errormessage'?: React.ComponentProps<TTag>["aria-errormessage"] | undefined;
|
|
78
|
-
'aria-expanded'?: React.ComponentProps<TTag>["aria-expanded"] | undefined;
|
|
79
|
-
'aria-flowto'?: React.ComponentProps<TTag>["aria-flowto"] | undefined;
|
|
80
|
-
'aria-grabbed'?: React.ComponentProps<TTag>["aria-grabbed"] | undefined;
|
|
81
|
-
'aria-haspopup'?: React.ComponentProps<TTag>["aria-haspopup"] | undefined;
|
|
82
|
-
'aria-hidden'?: React.ComponentProps<TTag>["aria-hidden"] | undefined;
|
|
83
|
-
'aria-invalid'?: React.ComponentProps<TTag>["aria-invalid"] | undefined;
|
|
84
|
-
'aria-keyshortcuts'?: React.ComponentProps<TTag>["aria-keyshortcuts"] | undefined;
|
|
85
|
-
'aria-label'?: React.ComponentProps<TTag>["aria-label"] | undefined;
|
|
86
|
-
'aria-labelledby'?: React.ComponentProps<TTag>["aria-labelledby"] | undefined;
|
|
87
|
-
'aria-level'?: React.ComponentProps<TTag>["aria-level"] | undefined;
|
|
88
|
-
'aria-live'?: React.ComponentProps<TTag>["aria-live"] | undefined;
|
|
89
|
-
'aria-modal'?: React.ComponentProps<TTag>["aria-modal"] | undefined;
|
|
90
|
-
'aria-multiline'?: React.ComponentProps<TTag>["aria-multiline"] | undefined;
|
|
91
|
-
'aria-multiselectable'?: React.ComponentProps<TTag>["aria-multiselectable"] | undefined;
|
|
92
|
-
'aria-orientation'?: React.ComponentProps<TTag>["aria-orientation"] | undefined;
|
|
93
|
-
'aria-owns'?: React.ComponentProps<TTag>["aria-owns"] | undefined;
|
|
94
|
-
'aria-placeholder'?: React.ComponentProps<TTag>["aria-placeholder"] | undefined;
|
|
95
|
-
'aria-posinset'?: React.ComponentProps<TTag>["aria-posinset"] | undefined;
|
|
96
|
-
'aria-pressed'?: React.ComponentProps<TTag>["aria-pressed"] | undefined;
|
|
97
|
-
'aria-readonly'?: React.ComponentProps<TTag>["aria-readonly"] | undefined;
|
|
98
|
-
'aria-relevant'?: React.ComponentProps<TTag>["aria-relevant"] | undefined;
|
|
99
|
-
'aria-required'?: React.ComponentProps<TTag>["aria-required"] | undefined;
|
|
100
|
-
'aria-roledescription'?: React.ComponentProps<TTag>["aria-roledescription"] | undefined;
|
|
101
|
-
'aria-rowcount'?: React.ComponentProps<TTag>["aria-rowcount"] | undefined;
|
|
102
|
-
'aria-rowindex'?: React.ComponentProps<TTag>["aria-rowindex"] | undefined;
|
|
103
|
-
'aria-rowspan'?: React.ComponentProps<TTag>["aria-rowspan"] | undefined;
|
|
104
|
-
'aria-selected'?: React.ComponentProps<TTag>["aria-selected"] | undefined;
|
|
105
|
-
'aria-setsize'?: React.ComponentProps<TTag>["aria-setsize"] | undefined;
|
|
106
|
-
'aria-sort'?: React.ComponentProps<TTag>["aria-sort"] | undefined;
|
|
107
|
-
'aria-valuemax'?: React.ComponentProps<TTag>["aria-valuemax"] | undefined;
|
|
108
|
-
'aria-valuemin'?: React.ComponentProps<TTag>["aria-valuemin"] | undefined;
|
|
109
|
-
'aria-valuenow'?: React.ComponentProps<TTag>["aria-valuenow"] | undefined;
|
|
110
|
-
'aria-valuetext'?: React.ComponentProps<TTag>["aria-valuetext"] | undefined;
|
|
111
|
-
dangerouslySetInnerHTML?: React.ComponentProps<TTag>["dangerouslySetInnerHTML"] | undefined;
|
|
112
|
-
onCopy?: React.ComponentProps<TTag>["onCopy"] | undefined;
|
|
113
|
-
onCopyCapture?: React.ComponentProps<TTag>["onCopyCapture"] | undefined;
|
|
114
|
-
onCut?: React.ComponentProps<TTag>["onCut"] | undefined;
|
|
115
|
-
onCutCapture?: React.ComponentProps<TTag>["onCutCapture"] | undefined;
|
|
116
|
-
onPaste?: React.ComponentProps<TTag>["onPaste"] | undefined;
|
|
117
|
-
onPasteCapture?: React.ComponentProps<TTag>["onPasteCapture"] | undefined;
|
|
118
|
-
onCompositionEnd?: React.ComponentProps<TTag>["onCompositionEnd"] | undefined;
|
|
119
|
-
onCompositionEndCapture?: React.ComponentProps<TTag>["onCompositionEndCapture"] | undefined;
|
|
120
|
-
onCompositionStart?: React.ComponentProps<TTag>["onCompositionStart"] | undefined;
|
|
121
|
-
onCompositionStartCapture?: React.ComponentProps<TTag>["onCompositionStartCapture"] | undefined;
|
|
122
|
-
onCompositionUpdate?: React.ComponentProps<TTag>["onCompositionUpdate"] | undefined;
|
|
123
|
-
onCompositionUpdateCapture?: React.ComponentProps<TTag>["onCompositionUpdateCapture"] | undefined;
|
|
124
|
-
onFocus?: React.ComponentProps<TTag>["onFocus"] | undefined;
|
|
125
|
-
onFocusCapture?: React.ComponentProps<TTag>["onFocusCapture"] | undefined;
|
|
126
|
-
onBlur?: React.ComponentProps<TTag>["onBlur"] | undefined;
|
|
127
|
-
onBlurCapture?: React.ComponentProps<TTag>["onBlurCapture"] | undefined;
|
|
128
|
-
onChange?: React.ComponentProps<TTag>["onChange"] | undefined;
|
|
129
|
-
onChangeCapture?: React.ComponentProps<TTag>["onChangeCapture"] | undefined;
|
|
130
|
-
onBeforeInput?: React.ComponentProps<TTag>["onBeforeInput"] | undefined;
|
|
131
|
-
onBeforeInputCapture?: React.ComponentProps<TTag>["onBeforeInputCapture"] | undefined;
|
|
132
|
-
onInput?: React.ComponentProps<TTag>["onInput"] | undefined;
|
|
133
|
-
onInputCapture?: React.ComponentProps<TTag>["onInputCapture"] | undefined;
|
|
134
|
-
onReset?: React.ComponentProps<TTag>["onReset"] | undefined;
|
|
135
|
-
onResetCapture?: React.ComponentProps<TTag>["onResetCapture"] | undefined;
|
|
136
|
-
onSubmit?: React.ComponentProps<TTag>["onSubmit"] | undefined;
|
|
137
|
-
onSubmitCapture?: React.ComponentProps<TTag>["onSubmitCapture"] | undefined;
|
|
138
|
-
onInvalid?: React.ComponentProps<TTag>["onInvalid"] | undefined;
|
|
139
|
-
onInvalidCapture?: React.ComponentProps<TTag>["onInvalidCapture"] | undefined;
|
|
140
|
-
onLoad?: React.ComponentProps<TTag>["onLoad"] | undefined;
|
|
141
|
-
onLoadCapture?: React.ComponentProps<TTag>["onLoadCapture"] | undefined;
|
|
142
|
-
onError?: React.ComponentProps<TTag>["onError"] | undefined;
|
|
143
|
-
onErrorCapture?: React.ComponentProps<TTag>["onErrorCapture"] | undefined;
|
|
144
|
-
onKeyDown?: React.ComponentProps<TTag>["onKeyDown"] | undefined;
|
|
145
|
-
onKeyDownCapture?: React.ComponentProps<TTag>["onKeyDownCapture"] | undefined;
|
|
146
|
-
onKeyPress?: React.ComponentProps<TTag>["onKeyPress"] | undefined;
|
|
147
|
-
onKeyPressCapture?: React.ComponentProps<TTag>["onKeyPressCapture"] | undefined;
|
|
148
|
-
onKeyUp?: React.ComponentProps<TTag>["onKeyUp"] | undefined;
|
|
149
|
-
onKeyUpCapture?: React.ComponentProps<TTag>["onKeyUpCapture"] | undefined;
|
|
150
|
-
onAbort?: React.ComponentProps<TTag>["onAbort"] | undefined;
|
|
151
|
-
onAbortCapture?: React.ComponentProps<TTag>["onAbortCapture"] | undefined;
|
|
152
|
-
onCanPlay?: React.ComponentProps<TTag>["onCanPlay"] | undefined;
|
|
153
|
-
onCanPlayCapture?: React.ComponentProps<TTag>["onCanPlayCapture"] | undefined;
|
|
154
|
-
onCanPlayThrough?: React.ComponentProps<TTag>["onCanPlayThrough"] | undefined;
|
|
155
|
-
onCanPlayThroughCapture?: React.ComponentProps<TTag>["onCanPlayThroughCapture"] | undefined;
|
|
156
|
-
onDurationChange?: React.ComponentProps<TTag>["onDurationChange"] | undefined;
|
|
157
|
-
onDurationChangeCapture?: React.ComponentProps<TTag>["onDurationChangeCapture"] | undefined;
|
|
158
|
-
onEmptied?: React.ComponentProps<TTag>["onEmptied"] | undefined;
|
|
159
|
-
onEmptiedCapture?: React.ComponentProps<TTag>["onEmptiedCapture"] | undefined;
|
|
160
|
-
onEncrypted?: React.ComponentProps<TTag>["onEncrypted"] | undefined;
|
|
161
|
-
onEncryptedCapture?: React.ComponentProps<TTag>["onEncryptedCapture"] | undefined;
|
|
162
|
-
onEnded?: React.ComponentProps<TTag>["onEnded"] | undefined;
|
|
163
|
-
onEndedCapture?: React.ComponentProps<TTag>["onEndedCapture"] | undefined;
|
|
164
|
-
onLoadedData?: React.ComponentProps<TTag>["onLoadedData"] | undefined;
|
|
165
|
-
onLoadedDataCapture?: React.ComponentProps<TTag>["onLoadedDataCapture"] | undefined;
|
|
166
|
-
onLoadedMetadata?: React.ComponentProps<TTag>["onLoadedMetadata"] | undefined;
|
|
167
|
-
onLoadedMetadataCapture?: React.ComponentProps<TTag>["onLoadedMetadataCapture"] | undefined;
|
|
168
|
-
onLoadStart?: React.ComponentProps<TTag>["onLoadStart"] | undefined;
|
|
169
|
-
onLoadStartCapture?: React.ComponentProps<TTag>["onLoadStartCapture"] | undefined;
|
|
170
|
-
onPause?: React.ComponentProps<TTag>["onPause"] | undefined;
|
|
171
|
-
onPauseCapture?: React.ComponentProps<TTag>["onPauseCapture"] | undefined;
|
|
172
|
-
onPlay?: React.ComponentProps<TTag>["onPlay"] | undefined;
|
|
173
|
-
onPlayCapture?: React.ComponentProps<TTag>["onPlayCapture"] | undefined;
|
|
174
|
-
onPlaying?: React.ComponentProps<TTag>["onPlaying"] | undefined;
|
|
175
|
-
onPlayingCapture?: React.ComponentProps<TTag>["onPlayingCapture"] | undefined;
|
|
176
|
-
onProgress?: React.ComponentProps<TTag>["onProgress"] | undefined;
|
|
177
|
-
onProgressCapture?: React.ComponentProps<TTag>["onProgressCapture"] | undefined;
|
|
178
|
-
onRateChange?: React.ComponentProps<TTag>["onRateChange"] | undefined;
|
|
179
|
-
onRateChangeCapture?: React.ComponentProps<TTag>["onRateChangeCapture"] | undefined;
|
|
180
|
-
onResize?: React.ComponentProps<TTag>["onResize"] | undefined;
|
|
181
|
-
onResizeCapture?: React.ComponentProps<TTag>["onResizeCapture"] | undefined;
|
|
182
|
-
onSeeked?: React.ComponentProps<TTag>["onSeeked"] | undefined;
|
|
183
|
-
onSeekedCapture?: React.ComponentProps<TTag>["onSeekedCapture"] | undefined;
|
|
184
|
-
onSeeking?: React.ComponentProps<TTag>["onSeeking"] | undefined;
|
|
185
|
-
onSeekingCapture?: React.ComponentProps<TTag>["onSeekingCapture"] | undefined;
|
|
186
|
-
onStalled?: React.ComponentProps<TTag>["onStalled"] | undefined;
|
|
187
|
-
onStalledCapture?: React.ComponentProps<TTag>["onStalledCapture"] | undefined;
|
|
188
|
-
onSuspend?: React.ComponentProps<TTag>["onSuspend"] | undefined;
|
|
189
|
-
onSuspendCapture?: React.ComponentProps<TTag>["onSuspendCapture"] | undefined;
|
|
190
|
-
onTimeUpdate?: React.ComponentProps<TTag>["onTimeUpdate"] | undefined;
|
|
191
|
-
onTimeUpdateCapture?: React.ComponentProps<TTag>["onTimeUpdateCapture"] | undefined;
|
|
192
|
-
onVolumeChange?: React.ComponentProps<TTag>["onVolumeChange"] | undefined;
|
|
193
|
-
onVolumeChangeCapture?: React.ComponentProps<TTag>["onVolumeChangeCapture"] | undefined;
|
|
194
|
-
onWaiting?: React.ComponentProps<TTag>["onWaiting"] | undefined;
|
|
195
|
-
onWaitingCapture?: React.ComponentProps<TTag>["onWaitingCapture"] | undefined;
|
|
196
|
-
onAuxClick?: React.ComponentProps<TTag>["onAuxClick"] | undefined;
|
|
197
|
-
onAuxClickCapture?: React.ComponentProps<TTag>["onAuxClickCapture"] | undefined;
|
|
198
|
-
onClick?: React.ComponentProps<TTag>["onClick"] | undefined;
|
|
199
|
-
onClickCapture?: React.ComponentProps<TTag>["onClickCapture"] | undefined;
|
|
200
|
-
onContextMenu?: React.ComponentProps<TTag>["onContextMenu"] | undefined;
|
|
201
|
-
onContextMenuCapture?: React.ComponentProps<TTag>["onContextMenuCapture"] | undefined;
|
|
202
|
-
onDoubleClick?: React.ComponentProps<TTag>["onDoubleClick"] | undefined;
|
|
203
|
-
onDoubleClickCapture?: React.ComponentProps<TTag>["onDoubleClickCapture"] | undefined;
|
|
204
|
-
onDrag?: React.ComponentProps<TTag>["onDrag"] | undefined;
|
|
205
|
-
onDragCapture?: React.ComponentProps<TTag>["onDragCapture"] | undefined;
|
|
206
|
-
onDragEnd?: React.ComponentProps<TTag>["onDragEnd"] | undefined;
|
|
207
|
-
onDragEndCapture?: React.ComponentProps<TTag>["onDragEndCapture"] | undefined;
|
|
208
|
-
onDragEnter?: React.ComponentProps<TTag>["onDragEnter"] | undefined;
|
|
209
|
-
onDragEnterCapture?: React.ComponentProps<TTag>["onDragEnterCapture"] | undefined;
|
|
210
|
-
onDragExit?: React.ComponentProps<TTag>["onDragExit"] | undefined;
|
|
211
|
-
onDragExitCapture?: React.ComponentProps<TTag>["onDragExitCapture"] | undefined;
|
|
212
|
-
onDragLeave?: React.ComponentProps<TTag>["onDragLeave"] | undefined;
|
|
213
|
-
onDragLeaveCapture?: React.ComponentProps<TTag>["onDragLeaveCapture"] | undefined;
|
|
214
|
-
onDragOver?: React.ComponentProps<TTag>["onDragOver"] | undefined;
|
|
215
|
-
onDragOverCapture?: React.ComponentProps<TTag>["onDragOverCapture"] | undefined;
|
|
216
|
-
onDragStart?: React.ComponentProps<TTag>["onDragStart"] | undefined;
|
|
217
|
-
onDragStartCapture?: React.ComponentProps<TTag>["onDragStartCapture"] | undefined;
|
|
218
|
-
onDrop?: React.ComponentProps<TTag>["onDrop"] | undefined;
|
|
219
|
-
onDropCapture?: React.ComponentProps<TTag>["onDropCapture"] | undefined;
|
|
220
|
-
onMouseDown?: React.ComponentProps<TTag>["onMouseDown"] | undefined;
|
|
221
|
-
onMouseDownCapture?: React.ComponentProps<TTag>["onMouseDownCapture"] | undefined;
|
|
222
|
-
onMouseEnter?: React.ComponentProps<TTag>["onMouseEnter"] | undefined;
|
|
223
|
-
onMouseLeave?: React.ComponentProps<TTag>["onMouseLeave"] | undefined;
|
|
224
|
-
onMouseMove?: React.ComponentProps<TTag>["onMouseMove"] | undefined;
|
|
225
|
-
onMouseMoveCapture?: React.ComponentProps<TTag>["onMouseMoveCapture"] | undefined;
|
|
226
|
-
onMouseOut?: React.ComponentProps<TTag>["onMouseOut"] | undefined;
|
|
227
|
-
onMouseOutCapture?: React.ComponentProps<TTag>["onMouseOutCapture"] | undefined;
|
|
228
|
-
onMouseOver?: React.ComponentProps<TTag>["onMouseOver"] | undefined;
|
|
229
|
-
onMouseOverCapture?: React.ComponentProps<TTag>["onMouseOverCapture"] | undefined;
|
|
230
|
-
onMouseUp?: React.ComponentProps<TTag>["onMouseUp"] | undefined;
|
|
231
|
-
onMouseUpCapture?: React.ComponentProps<TTag>["onMouseUpCapture"] | undefined;
|
|
232
|
-
onSelect?: React.ComponentProps<TTag>["onSelect"] | undefined;
|
|
233
|
-
onSelectCapture?: React.ComponentProps<TTag>["onSelectCapture"] | undefined;
|
|
234
|
-
onTouchCancel?: React.ComponentProps<TTag>["onTouchCancel"] | undefined;
|
|
235
|
-
onTouchCancelCapture?: React.ComponentProps<TTag>["onTouchCancelCapture"] | undefined;
|
|
236
|
-
onTouchEnd?: React.ComponentProps<TTag>["onTouchEnd"] | undefined;
|
|
237
|
-
onTouchEndCapture?: React.ComponentProps<TTag>["onTouchEndCapture"] | undefined;
|
|
238
|
-
onTouchMove?: React.ComponentProps<TTag>["onTouchMove"] | undefined;
|
|
239
|
-
onTouchMoveCapture?: React.ComponentProps<TTag>["onTouchMoveCapture"] | undefined;
|
|
240
|
-
onTouchStart?: React.ComponentProps<TTag>["onTouchStart"] | undefined;
|
|
241
|
-
onTouchStartCapture?: React.ComponentProps<TTag>["onTouchStartCapture"] | undefined;
|
|
242
|
-
onPointerDown?: React.ComponentProps<TTag>["onPointerDown"] | undefined;
|
|
243
|
-
onPointerDownCapture?: React.ComponentProps<TTag>["onPointerDownCapture"] | undefined;
|
|
244
|
-
onPointerMove?: React.ComponentProps<TTag>["onPointerMove"] | undefined;
|
|
245
|
-
onPointerMoveCapture?: React.ComponentProps<TTag>["onPointerMoveCapture"] | undefined;
|
|
246
|
-
onPointerUp?: React.ComponentProps<TTag>["onPointerUp"] | undefined;
|
|
247
|
-
onPointerUpCapture?: React.ComponentProps<TTag>["onPointerUpCapture"] | undefined;
|
|
248
|
-
onPointerCancel?: React.ComponentProps<TTag>["onPointerCancel"] | undefined;
|
|
249
|
-
onPointerCancelCapture?: React.ComponentProps<TTag>["onPointerCancelCapture"] | undefined;
|
|
250
|
-
onPointerEnter?: React.ComponentProps<TTag>["onPointerEnter"] | undefined;
|
|
251
|
-
onPointerEnterCapture?: React.ComponentProps<TTag>["onPointerEnterCapture"] | undefined;
|
|
252
|
-
onPointerLeave?: React.ComponentProps<TTag>["onPointerLeave"] | undefined;
|
|
253
|
-
onPointerLeaveCapture?: React.ComponentProps<TTag>["onPointerLeaveCapture"] | undefined;
|
|
254
|
-
onPointerOver?: React.ComponentProps<TTag>["onPointerOver"] | undefined;
|
|
255
|
-
onPointerOverCapture?: React.ComponentProps<TTag>["onPointerOverCapture"] | undefined;
|
|
256
|
-
onPointerOut?: React.ComponentProps<TTag>["onPointerOut"] | undefined;
|
|
257
|
-
onPointerOutCapture?: React.ComponentProps<TTag>["onPointerOutCapture"] | undefined;
|
|
258
|
-
onGotPointerCapture?: React.ComponentProps<TTag>["onGotPointerCapture"] | undefined;
|
|
259
|
-
onGotPointerCaptureCapture?: React.ComponentProps<TTag>["onGotPointerCaptureCapture"] | undefined;
|
|
260
|
-
onLostPointerCapture?: React.ComponentProps<TTag>["onLostPointerCapture"] | undefined;
|
|
261
|
-
onLostPointerCaptureCapture?: React.ComponentProps<TTag>["onLostPointerCaptureCapture"] | undefined;
|
|
262
|
-
onScroll?: React.ComponentProps<TTag>["onScroll"] | undefined;
|
|
263
|
-
onScrollCapture?: React.ComponentProps<TTag>["onScrollCapture"] | undefined;
|
|
264
|
-
onWheel?: React.ComponentProps<TTag>["onWheel"] | undefined;
|
|
265
|
-
onWheelCapture?: React.ComponentProps<TTag>["onWheelCapture"] | undefined;
|
|
266
|
-
onAnimationStart?: React.ComponentProps<TTag>["onAnimationStart"] | undefined;
|
|
267
|
-
onAnimationStartCapture?: React.ComponentProps<TTag>["onAnimationStartCapture"] | undefined;
|
|
268
|
-
onAnimationEnd?: React.ComponentProps<TTag>["onAnimationEnd"] | undefined;
|
|
269
|
-
onAnimationEndCapture?: React.ComponentProps<TTag>["onAnimationEndCapture"] | undefined;
|
|
270
|
-
onAnimationIteration?: React.ComponentProps<TTag>["onAnimationIteration"] | undefined;
|
|
271
|
-
onAnimationIterationCapture?: React.ComponentProps<TTag>["onAnimationIterationCapture"] | undefined;
|
|
272
|
-
onTransitionEnd?: React.ComponentProps<TTag>["onTransitionEnd"] | undefined;
|
|
273
|
-
onTransitionEndCapture?: React.ComponentProps<TTag>["onTransitionEndCapture"] | undefined;
|
|
274
|
-
}, HTMLWebViewElement>;
|
|
275
|
-
export {};
|
|
16
|
+
declare const _default: <TTag extends keyof React.ReactHTML = "div">(props: Props<TTag>) => JSX.Element;
|
|
17
|
+
export default _default;
|
package/box.mjs
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import x, {
|
|
1
|
+
import x, { forwardRef as N, useState as v } from "react";
|
|
2
2
|
import { c as a } from "./box.module.css.mjs";
|
|
3
3
|
import { C as b, t as g } from "./utils/utils.mjs";
|
|
4
|
-
function
|
|
5
|
-
const { tag:
|
|
6
|
-
Object.entries(c).forEach(([o,
|
|
7
|
-
const
|
|
8
|
-
|
|
4
|
+
function C(c, n) {
|
|
5
|
+
const { tag: p, children: e, props: d, className: r, style: l } = c, t = r ? b.classNames(r, a.box) : [a.box];
|
|
6
|
+
Object.entries(c).forEach(([o, m]) => {
|
|
7
|
+
const u = a[o + m];
|
|
8
|
+
u ? t.push(u) : g.includes(o) && t.push(`${o}${m}`);
|
|
9
9
|
});
|
|
10
|
-
const
|
|
11
|
-
|
|
10
|
+
const s = { ...d, className: t.join(" ") };
|
|
11
|
+
l && (s.style = l), n && (s.ref = n);
|
|
12
|
+
const [h, f] = v(!1), i = typeof e == "function";
|
|
13
|
+
return i && (s.onMouseEnter = () => f(!0), s.onMouseLeave = () => f(!1)), x.createElement(p || "div", s, i ? e({ isHover: h }) : e);
|
|
12
14
|
}
|
|
15
|
+
const j = N(C);
|
|
13
16
|
export {
|
|
14
|
-
|
|
17
|
+
j as default
|
|
15
18
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Box from '../box';
|
|
2
|
-
declare type BoxProps = React.ComponentProps<typeof Box<'button'
|
|
2
|
+
declare type BoxProps = Omit<React.ComponentProps<typeof Box<'button'>>, 'ref' | 'tag'>;
|
|
3
3
|
declare type BoxTagProps = Required<BoxProps>['props'];
|
|
4
4
|
declare type ButtonTagProps = Omit<BoxTagProps, 'type' | 'onClick' | 'disabled'>;
|
|
5
5
|
declare type ButtonType = Required<React.ComponentProps<'button'>>['type'];
|
|
@@ -9,5 +9,5 @@ interface Props extends Omit<BoxProps, 'props'> {
|
|
|
9
9
|
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
export
|
|
12
|
+
declare const _default: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
export default _default;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import "
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import i from "../box.mjs";
|
|
4
|
+
import { O as s } from "../utils/utils.mjs";
|
|
4
5
|
import "../box.module.css.mjs";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return /* @__PURE__ */ s(u, { tag: o || "button", cursor: "pointer", inline: !0, ...t, props: i });
|
|
6
|
+
function m(o, r) {
|
|
7
|
+
const [t, e] = s.moveToTagProps(o, "type", "onClick", "disabled");
|
|
8
|
+
return /* @__PURE__ */ n(i, { ref: r, tag: "button", cursor: "pointer", inline: !0, ...e, props: { ...o.props, ...t } });
|
|
9
9
|
}
|
|
10
|
+
const b = p(m);
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
b as default
|
|
12
13
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Box from '../box';
|
|
3
|
-
declare type BoxProps = React.ComponentProps<typeof Box<'input'
|
|
3
|
+
declare type BoxProps = Omit<React.ComponentProps<typeof Box<'input'>>, 'ref' | 'tag'>;
|
|
4
4
|
declare type BoxTagProps = Required<BoxProps>['props'];
|
|
5
|
-
declare type
|
|
5
|
+
declare type CheckboxCoreTagProps = Omit<BoxTagProps, 'name' | 'onInput' | 'onChange' | 'type' | 'placeholder' | 'disabled' | 'value' | 'autoFocus' | 'readOnly' | 'required' | 'checked' | 'defaultChecked'>;
|
|
6
6
|
interface Props extends Omit<BoxProps, 'props'> {
|
|
7
|
-
name
|
|
8
|
-
props?:
|
|
7
|
+
name?: string;
|
|
8
|
+
props?: CheckboxCoreTagProps;
|
|
9
9
|
onInput?: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
10
10
|
onChange?: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
11
|
-
placeholder?: string;
|
|
12
11
|
disabled?: boolean;
|
|
13
12
|
value?: string | number;
|
|
14
13
|
autoFocus?: boolean;
|
|
15
14
|
readOnly?: boolean;
|
|
16
15
|
required?: boolean;
|
|
16
|
+
checked?: boolean;
|
|
17
17
|
defaultChecked?: boolean;
|
|
18
18
|
}
|
|
19
19
|
declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as a } from "react";
|
|
3
|
+
import p from "../box.mjs";
|
|
4
|
+
import { O as c } from "../utils/utils.mjs";
|
|
5
|
+
import "../box.module.css.mjs";
|
|
6
|
+
function i(o, e) {
|
|
7
|
+
const [r, t] = c.moveToTagProps(
|
|
8
|
+
o,
|
|
9
|
+
"name",
|
|
10
|
+
"onInput",
|
|
11
|
+
"onChange",
|
|
12
|
+
"disabled",
|
|
13
|
+
"value",
|
|
14
|
+
"autoFocus",
|
|
15
|
+
"readOnly",
|
|
16
|
+
"required",
|
|
17
|
+
"checked",
|
|
18
|
+
"defaultChecked"
|
|
19
|
+
);
|
|
20
|
+
return /* @__PURE__ */ n(p, { ref: e, tag: "input", inline: !0, ...t, props: { ...o.props, ...r, type: "checkbox" } });
|
|
21
|
+
}
|
|
22
|
+
const l = a(i);
|
|
23
|
+
export {
|
|
24
|
+
l as default
|
|
25
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Box from '../box';
|
|
3
|
-
declare type BoxProps = React.ComponentProps<typeof Box<'input'
|
|
3
|
+
declare type BoxProps = Omit<React.ComponentProps<typeof Box<'input'>>, 'ref' | 'tag'>;
|
|
4
4
|
declare type BoxTagProps = Required<BoxProps>['props'];
|
|
5
|
-
declare type
|
|
5
|
+
declare type RadioButtonCoreTagProps = Omit<BoxTagProps, 'name' | 'onInput' | 'onChange' | 'type' | 'placeholder' | 'disabled' | 'value' | 'autoFocus' | 'readOnly' | 'required' | 'checked' | 'defaultChecked'>;
|
|
6
6
|
interface Props extends Omit<BoxProps, 'props'> {
|
|
7
|
-
name
|
|
8
|
-
props?:
|
|
7
|
+
name?: string;
|
|
8
|
+
props?: RadioButtonCoreTagProps;
|
|
9
9
|
onInput?: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
10
10
|
onChange?: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
11
|
-
placeholder?: string;
|
|
12
11
|
disabled?: boolean;
|
|
13
12
|
value?: string | number;
|
|
14
13
|
autoFocus?: boolean;
|
|
15
14
|
readOnly?: boolean;
|
|
16
15
|
required?: boolean;
|
|
16
|
+
checked?: boolean;
|
|
17
17
|
defaultChecked?: boolean;
|
|
18
18
|
}
|
|
19
19
|
declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import i from "../box.mjs";
|
|
4
|
+
import { O as p } from "../utils/utils.mjs";
|
|
5
|
+
import "../box.module.css.mjs";
|
|
6
|
+
function u(o, r) {
|
|
7
|
+
const [t, e] = p.moveToTagProps(
|
|
8
|
+
o,
|
|
9
|
+
"name",
|
|
10
|
+
"onInput",
|
|
11
|
+
"onChange",
|
|
12
|
+
"disabled",
|
|
13
|
+
"value",
|
|
14
|
+
"autoFocus",
|
|
15
|
+
"readOnly",
|
|
16
|
+
"required",
|
|
17
|
+
"checked",
|
|
18
|
+
"defaultChecked"
|
|
19
|
+
);
|
|
20
|
+
return /* @__PURE__ */ a(i, { ref: r, tag: "input", inline: !0, ...e, props: { ...o.props, ...t, type: "radio" } });
|
|
21
|
+
}
|
|
22
|
+
const l = n(u);
|
|
23
|
+
export {
|
|
24
|
+
l as default
|
|
25
|
+
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Box from '../box';
|
|
3
|
-
declare type BoxProps = React.ComponentProps<typeof Box<'textarea'
|
|
3
|
+
declare type BoxProps = Omit<React.ComponentProps<typeof Box<'textarea'>>, 'ref' | 'tag'>;
|
|
4
4
|
declare type BoxTagProps = Required<BoxProps>['props'];
|
|
5
|
-
declare type
|
|
5
|
+
declare type TextareaCoreTagProps = Omit<BoxTagProps, 'name' | 'onInput' | 'onChange' | 'placeholder' | 'disabled' | 'value' | 'defaultValue' | 'rows' | 'cols' | 'autoFocus' | 'maxLength' | 'minLength' | 'readOnly' | 'required'>;
|
|
6
6
|
interface Props extends Omit<BoxProps, 'props'> {
|
|
7
|
-
name
|
|
8
|
-
props?:
|
|
7
|
+
name?: string;
|
|
8
|
+
props?: TextareaCoreTagProps;
|
|
9
9
|
onInput?: (e: React.FormEvent<HTMLTextAreaElement>) => void;
|
|
10
10
|
onChange?: (e: React.FormEvent<HTMLTextAreaElement>) => void;
|
|
11
11
|
placeholder?: string;
|
|
12
12
|
disabled?: boolean;
|
|
13
|
-
|
|
13
|
+
value?: string;
|
|
14
|
+
defaultValue?: string;
|
|
14
15
|
rows?: number;
|
|
15
16
|
cols?: number;
|
|
16
17
|
autoFocus?: boolean;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import s from "../box.mjs";
|
|
4
|
+
import { O as m } from "../utils/utils.mjs";
|
|
5
|
+
import "../box.module.css.mjs";
|
|
6
|
+
function p(e, o) {
|
|
7
|
+
const [r, t] = m.moveToTagProps(
|
|
8
|
+
e,
|
|
9
|
+
"name",
|
|
10
|
+
"onInput",
|
|
11
|
+
"onChange",
|
|
12
|
+
"placeholder",
|
|
13
|
+
"disabled",
|
|
14
|
+
"value",
|
|
15
|
+
"defaultValue",
|
|
16
|
+
"rows",
|
|
17
|
+
"cols",
|
|
18
|
+
"autoFocus",
|
|
19
|
+
"maxLength",
|
|
20
|
+
"minLength",
|
|
21
|
+
"readOnly",
|
|
22
|
+
"required"
|
|
23
|
+
);
|
|
24
|
+
return /* @__PURE__ */ a(s, { ref: o, tag: "textarea", inline: !0, ...t, props: { ...e.props, ...r } });
|
|
25
|
+
}
|
|
26
|
+
const c = n(p);
|
|
27
|
+
export {
|
|
28
|
+
c as default
|
|
29
|
+
};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Box from '../box';
|
|
3
|
-
declare type BoxProps = React.ComponentProps<typeof Box<'input'
|
|
3
|
+
declare type BoxProps = Omit<React.ComponentProps<typeof Box<'input'>>, 'ref' | 'tag'>;
|
|
4
4
|
declare type BoxTagProps = Required<BoxProps>['props'];
|
|
5
|
-
declare type
|
|
6
|
-
declare type
|
|
5
|
+
declare type TextboxCoreTagProps = Omit<BoxTagProps, 'name' | 'onInput' | 'onChange' | 'type' | 'placeholder' | 'disabled' | 'defaultValue' | 'autoFocus' | 'readOnly' | 'required' | 'value' | 'pattern'>;
|
|
6
|
+
declare type TextboxCoreType = 'date' | 'datetime-local' | 'email' | 'hidden' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';
|
|
7
7
|
interface Props extends Omit<BoxProps, 'props'> {
|
|
8
|
-
name
|
|
9
|
-
props?:
|
|
8
|
+
name?: string;
|
|
9
|
+
props?: TextboxCoreTagProps;
|
|
10
10
|
onInput?: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
11
11
|
onChange?: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
12
|
-
type?:
|
|
12
|
+
type?: TextboxCoreType;
|
|
13
13
|
placeholder?: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
|
+
value?: string | number;
|
|
15
16
|
defaultValue?: string | number;
|
|
17
|
+
pattern?: string;
|
|
16
18
|
autoFocus?: boolean;
|
|
17
19
|
readOnly?: boolean;
|
|
18
20
|
required?: boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import n from "../box.mjs";
|
|
4
|
+
import { O as s } from "../utils/utils.mjs";
|
|
5
|
+
import "../box.module.css.mjs";
|
|
6
|
+
function i(o, e) {
|
|
7
|
+
const [t, r] = s.moveToTagProps(
|
|
8
|
+
o,
|
|
9
|
+
"name",
|
|
10
|
+
"onInput",
|
|
11
|
+
"onChange",
|
|
12
|
+
"type",
|
|
13
|
+
"placeholder",
|
|
14
|
+
"disabled",
|
|
15
|
+
"value",
|
|
16
|
+
"defaultValue",
|
|
17
|
+
"pattern",
|
|
18
|
+
"autoFocus",
|
|
19
|
+
"readOnly",
|
|
20
|
+
"required",
|
|
21
|
+
"step"
|
|
22
|
+
);
|
|
23
|
+
return /* @__PURE__ */ a(n, { ref: e, tag: "input", inline: !0, ...r, props: { ...o.props, ...t } });
|
|
24
|
+
}
|
|
25
|
+
const x = p(i);
|
|
26
|
+
export {
|
|
27
|
+
x as default
|
|
28
|
+
};
|