@cloudflare/component-button 4.0.0 → 5.1.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/CHANGELOG.md +14 -0
- package/dist/Button.d.ts +18 -11
- package/dist/ButtonGroup.d.ts +9 -2
- package/dist/TextButton.d.ts +68 -61
- package/dist/UnstyledButton.d.ts +69 -61
- package/es/UnstyledButton.js +21 -9
- package/lib/UnstyledButton.js +11 -3
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 5.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 46c2fbb47e: Add focus option
|
|
8
|
+
|
|
9
|
+
## 5.0.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [77059b4a95]
|
|
14
|
+
- @cloudflare/style-container@7.10.0
|
|
15
|
+
- @cloudflare/component-icon@9.0.0
|
|
16
|
+
|
|
3
17
|
## 4.0.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/Button.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export declare const buttonStyles: (props: PropsWithTheme) => {
|
|
|
74
74
|
animationIterationCount: string;
|
|
75
75
|
animationTimingFunction: string;
|
|
76
76
|
} | undefined;
|
|
77
|
-
readonly opacity: "inherit"
|
|
77
|
+
readonly opacity: 0.5 | "inherit";
|
|
78
78
|
readonly mt: number;
|
|
79
79
|
readonly mr: 0;
|
|
80
80
|
readonly mb: 0;
|
|
@@ -113,30 +113,31 @@ declare type Props = {
|
|
|
113
113
|
} & Pick<JSX.IntrinsicElements['button'], 'onClick' | 'disabled' | 'form' | 'tabIndex' | 'className'>;
|
|
114
114
|
declare type PropsWithTheme = Props & ThemeProp;
|
|
115
115
|
declare const _default: React.ComponentType<{
|
|
116
|
+
space?: number | undefined;
|
|
117
|
+
disabled?: boolean | undefined;
|
|
118
|
+
submit?: boolean | undefined;
|
|
116
119
|
form?: string | undefined;
|
|
117
|
-
type?: "default" | "success" | "warning" | "primary" | "danger" | undefined;
|
|
118
|
-
key?: React.Key | null | undefined;
|
|
119
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement> | undefined;
|
|
120
120
|
className?: string | undefined;
|
|
121
121
|
tabIndex?: number | undefined;
|
|
122
|
+
type?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
|
|
122
123
|
direction?: "column" | "row" | undefined;
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
key?: React.Key | null | undefined;
|
|
125
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement> | undefined;
|
|
125
126
|
loading?: boolean | undefined;
|
|
126
127
|
stretch?: boolean | undefined;
|
|
127
|
-
submit?: boolean | undefined;
|
|
128
|
-
ariaLabel?: string | undefined;
|
|
129
|
-
testId?: string | undefined;
|
|
130
128
|
inverted?: boolean | undefined;
|
|
131
129
|
spaced?: boolean | undefined;
|
|
132
130
|
group?: "first" | "last" | "inbetween" | undefined;
|
|
131
|
+
testId?: string | undefined;
|
|
133
132
|
iconType?: IconType | undefined;
|
|
134
133
|
iconLabel?: string | undefined;
|
|
135
134
|
iconSize?: number | undefined;
|
|
136
135
|
iconPosition?: "right" | "left" | undefined;
|
|
136
|
+
ariaLabel?: string | undefined;
|
|
137
137
|
noWrapText?: boolean | undefined;
|
|
138
|
-
p?: import("csstype").PaddingProperty<string | number> | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | undefined;
|
|
139
138
|
color?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
139
|
+
borderColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
140
|
+
p?: import("csstype").PaddingProperty<string | number> | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | undefined;
|
|
140
141
|
height?: import("csstype").HeightProperty<string | number> | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | undefined;
|
|
141
142
|
width?: import("csstype").WidthProperty<string | number> | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | undefined;
|
|
142
143
|
cursor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
@@ -144,7 +145,6 @@ declare const _default: React.ComponentType<{
|
|
|
144
145
|
fontSize?: import("csstype").FontSizeProperty<string | number> | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | undefined;
|
|
145
146
|
fontWeight?: import("csstype").FontWeightProperty | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | undefined;
|
|
146
147
|
textDecoration?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
147
|
-
borderColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
148
148
|
margin?: import("csstype").MarginProperty<string | number> | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | undefined;
|
|
149
149
|
marginLeft?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
150
150
|
marginRight?: import("csstype").MarginRightProperty<string | number> | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | undefined;
|
|
@@ -203,6 +203,13 @@ declare const _default: React.ComponentType<{
|
|
|
203
203
|
flexDirection?: import("csstype").FlexDirectionProperty | [import("csstype").FlexDirectionProperty | undefined, import("csstype").FlexDirectionProperty | undefined] | [import("csstype").FlexDirectionProperty | undefined, import("csstype").FlexDirectionProperty | undefined, import("csstype").FlexDirectionProperty | undefined] | undefined;
|
|
204
204
|
flexBasis?: import("csstype").FlexBasisProperty<string | number> | [import("csstype").FlexBasisProperty<string | number> | undefined, import("csstype").FlexBasisProperty<string | number> | undefined] | [import("csstype").FlexBasisProperty<string | number> | undefined, import("csstype").FlexBasisProperty<string | number> | undefined, import("csstype").FlexBasisProperty<string | number> | undefined] | undefined;
|
|
205
205
|
flexGrow?: import("csstype").GlobalsNumber | [import("csstype").GlobalsNumber | undefined, import("csstype").GlobalsNumber | undefined] | [import("csstype").GlobalsNumber | undefined, import("csstype").GlobalsNumber | undefined, import("csstype").GlobalsNumber | undefined] | undefined;
|
|
206
|
+
gridTemplateColumns?: import("csstype").GridTemplateColumnsProperty<string | number> | [import("csstype").GridTemplateColumnsProperty<string | number> | undefined, import("csstype").GridTemplateColumnsProperty<string | number> | undefined] | [import("csstype").GridTemplateColumnsProperty<string | number> | undefined, import("csstype").GridTemplateColumnsProperty<string | number> | undefined, import("csstype").GridTemplateColumnsProperty<string | number> | undefined] | undefined;
|
|
206
207
|
innerRef?: React.Ref<HTMLButtonElement> | undefined;
|
|
208
|
+
gridColumnSpan?: number | number[] | "end" | "all" | undefined;
|
|
209
|
+
gridColumnPad?: number | number[] | undefined;
|
|
210
|
+
gridRowSpan?: number | number[] | undefined;
|
|
211
|
+
gridRowPad?: number | number[] | undefined;
|
|
212
|
+
gridAlign?: ("start" | "end" | "center" | "stretch") | undefined;
|
|
213
|
+
gridJustify?: ("start" | "end" | "center" | "stretch") | undefined;
|
|
207
214
|
}>;
|
|
208
215
|
export default _default;
|
package/dist/ButtonGroup.d.ts
CHANGED
|
@@ -5,8 +5,9 @@ declare const _default: React.ComponentType<{
|
|
|
5
5
|
space?: number | undefined;
|
|
6
6
|
direction?: "column" | "row" | undefined;
|
|
7
7
|
stretch?: boolean | undefined;
|
|
8
|
-
p?: import("csstype").PaddingProperty<string | number> | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | undefined;
|
|
9
8
|
color?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
9
|
+
borderColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
10
|
+
p?: import("csstype").PaddingProperty<string | number> | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | undefined;
|
|
10
11
|
height?: import("csstype").HeightProperty<string | number> | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | undefined;
|
|
11
12
|
width?: import("csstype").WidthProperty<string | number> | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | undefined;
|
|
12
13
|
cursor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
@@ -14,7 +15,6 @@ declare const _default: React.ComponentType<{
|
|
|
14
15
|
fontSize?: import("csstype").FontSizeProperty<string | number> | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | undefined;
|
|
15
16
|
fontWeight?: import("csstype").FontWeightProperty | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | undefined;
|
|
16
17
|
textDecoration?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
17
|
-
borderColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
18
18
|
margin?: import("csstype").MarginProperty<string | number> | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | undefined;
|
|
19
19
|
marginLeft?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
20
20
|
marginRight?: import("csstype").MarginRightProperty<string | number> | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | undefined;
|
|
@@ -73,6 +73,13 @@ declare const _default: React.ComponentType<{
|
|
|
73
73
|
flexDirection?: import("csstype").FlexDirectionProperty | [import("csstype").FlexDirectionProperty | undefined, import("csstype").FlexDirectionProperty | undefined] | [import("csstype").FlexDirectionProperty | undefined, import("csstype").FlexDirectionProperty | undefined, import("csstype").FlexDirectionProperty | undefined] | undefined;
|
|
74
74
|
flexBasis?: import("csstype").FlexBasisProperty<string | number> | [import("csstype").FlexBasisProperty<string | number> | undefined, import("csstype").FlexBasisProperty<string | number> | undefined] | [import("csstype").FlexBasisProperty<string | number> | undefined, import("csstype").FlexBasisProperty<string | number> | undefined, import("csstype").FlexBasisProperty<string | number> | undefined] | undefined;
|
|
75
75
|
flexGrow?: import("csstype").GlobalsNumber | [import("csstype").GlobalsNumber | undefined, import("csstype").GlobalsNumber | undefined] | [import("csstype").GlobalsNumber | undefined, import("csstype").GlobalsNumber | undefined, import("csstype").GlobalsNumber | undefined] | undefined;
|
|
76
|
+
gridTemplateColumns?: import("csstype").GridTemplateColumnsProperty<string | number> | [import("csstype").GridTemplateColumnsProperty<string | number> | undefined, import("csstype").GridTemplateColumnsProperty<string | number> | undefined] | [import("csstype").GridTemplateColumnsProperty<string | number> | undefined, import("csstype").GridTemplateColumnsProperty<string | number> | undefined, import("csstype").GridTemplateColumnsProperty<string | number> | undefined] | undefined;
|
|
76
77
|
innerRef?: React.Ref<never> | undefined;
|
|
78
|
+
gridColumnSpan?: number | number[] | "end" | "all" | undefined;
|
|
79
|
+
gridColumnPad?: number | number[] | undefined;
|
|
80
|
+
gridRowSpan?: number | number[] | undefined;
|
|
81
|
+
gridRowPad?: number | number[] | undefined;
|
|
82
|
+
gridAlign?: ("start" | "end" | "center" | "stretch") | undefined;
|
|
83
|
+
gridJustify?: ("start" | "end" | "center" | "stretch") | undefined;
|
|
77
84
|
}>;
|
|
78
85
|
export default _default;
|
package/dist/TextButton.d.ts
CHANGED
|
@@ -1,26 +1,55 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const TextButton: import("react").ComponentType<{
|
|
3
|
+
is?: string | undefined;
|
|
4
|
+
name?: string | undefined;
|
|
5
|
+
disabled?: boolean | undefined;
|
|
6
|
+
color?: (string & (string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined])) | undefined;
|
|
7
|
+
children?: import("react").ReactNode;
|
|
3
8
|
form?: string | undefined;
|
|
4
9
|
slot?: string | undefined;
|
|
5
10
|
style?: import("react").CSSProperties | undefined;
|
|
6
11
|
title?: string | undefined;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
onDrag?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
17
|
-
onDragEnd?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
12
|
+
value?: string | number | readonly string[] | undefined;
|
|
13
|
+
defaultChecked?: boolean | undefined;
|
|
14
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
15
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
16
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
17
|
+
dangerouslySetInnerHTML?: {
|
|
18
|
+
__html: string;
|
|
19
|
+
} | undefined;
|
|
20
|
+
accessKey?: string | undefined;
|
|
18
21
|
className?: string | undefined;
|
|
19
|
-
|
|
22
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
|
|
23
|
+
contextMenu?: string | undefined;
|
|
24
|
+
dir?: string | undefined;
|
|
25
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
26
|
+
id?: string | undefined;
|
|
20
27
|
lang?: string | undefined;
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
placeholder?: string | undefined;
|
|
29
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
23
30
|
tabIndex?: number | undefined;
|
|
31
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
32
|
+
radioGroup?: string | undefined;
|
|
33
|
+
role?: string | undefined;
|
|
34
|
+
about?: string | undefined;
|
|
35
|
+
datatype?: string | undefined;
|
|
36
|
+
inlist?: any;
|
|
37
|
+
prefix?: string | undefined;
|
|
38
|
+
property?: string | undefined;
|
|
39
|
+
resource?: string | undefined;
|
|
40
|
+
typeof?: string | undefined;
|
|
41
|
+
vocab?: string | undefined;
|
|
42
|
+
autoCapitalize?: string | undefined;
|
|
43
|
+
autoCorrect?: string | undefined;
|
|
44
|
+
autoSave?: string | undefined;
|
|
45
|
+
itemProp?: string | undefined;
|
|
46
|
+
itemScope?: boolean | undefined;
|
|
47
|
+
itemType?: string | undefined;
|
|
48
|
+
itemID?: string | undefined;
|
|
49
|
+
itemRef?: string | undefined;
|
|
50
|
+
results?: number | undefined;
|
|
51
|
+
security?: string | undefined;
|
|
52
|
+
unselectable?: "on" | "off" | undefined;
|
|
24
53
|
'aria-activedescendant'?: string | undefined;
|
|
25
54
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
|
26
55
|
'aria-autocomplete'?: "none" | "list" | "both" | "inline" | undefined;
|
|
@@ -39,7 +68,7 @@ declare const TextButton: import("react").ComponentType<{
|
|
|
39
68
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
|
40
69
|
'aria-flowto'?: string | undefined;
|
|
41
70
|
'aria-grabbed'?: boolean | "true" | "false" | undefined;
|
|
42
|
-
'aria-haspopup'?: boolean | "
|
|
71
|
+
'aria-haspopup'?: boolean | "menu" | "dialog" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
43
72
|
'aria-hidden'?: boolean | "true" | "false" | undefined;
|
|
44
73
|
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
45
74
|
'aria-keyshortcuts'?: string | undefined;
|
|
@@ -69,9 +98,16 @@ declare const TextButton: import("react").ComponentType<{
|
|
|
69
98
|
'aria-valuemin'?: number | undefined;
|
|
70
99
|
'aria-valuenow'?: number | undefined;
|
|
71
100
|
'aria-valuetext'?: string | undefined;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
101
|
+
type?: "reset" | "submit" | "button" | undefined;
|
|
102
|
+
autoFocus?: boolean | undefined;
|
|
103
|
+
formAction?: string | undefined;
|
|
104
|
+
formEncType?: string | undefined;
|
|
105
|
+
formMethod?: string | undefined;
|
|
106
|
+
formNoValidate?: boolean | undefined;
|
|
107
|
+
formTarget?: string | undefined;
|
|
108
|
+
key?: import("react").Key | null | undefined;
|
|
109
|
+
hidden?: boolean | undefined;
|
|
110
|
+
translate?: "yes" | "no" | undefined;
|
|
75
111
|
onCopy?: import("react").ClipboardEventHandler<HTMLButtonElement> | undefined;
|
|
76
112
|
onCopyCapture?: import("react").ClipboardEventHandler<HTMLButtonElement> | undefined;
|
|
77
113
|
onCut?: import("react").ClipboardEventHandler<HTMLButtonElement> | undefined;
|
|
@@ -156,12 +192,15 @@ declare const TextButton: import("react").ComponentType<{
|
|
|
156
192
|
onWaitingCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
|
|
157
193
|
onAuxClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
158
194
|
onAuxClickCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
195
|
+
onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
159
196
|
onClickCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
160
197
|
onContextMenu?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
161
198
|
onContextMenuCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
162
199
|
onDoubleClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
163
200
|
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
201
|
+
onDrag?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
164
202
|
onDragCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
203
|
+
onDragEnd?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
165
204
|
onDragEndCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
166
205
|
onDragEnter?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
167
206
|
onDragEnterCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
@@ -171,11 +210,14 @@ declare const TextButton: import("react").ComponentType<{
|
|
|
171
210
|
onDragLeaveCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
172
211
|
onDragOver?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
173
212
|
onDragOverCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
213
|
+
onDragStart?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
174
214
|
onDragStartCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
175
215
|
onDrop?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
176
216
|
onDropCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
177
217
|
onMouseDown?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
178
218
|
onMouseDownCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
219
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
220
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
179
221
|
onMouseMove?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
180
222
|
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
181
223
|
onMouseOut?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
@@ -226,48 +268,7 @@ declare const TextButton: import("react").ComponentType<{
|
|
|
226
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
227
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
228
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
229
|
-
|
|
230
|
-
is?: string | undefined;
|
|
231
|
-
disabled?: boolean | undefined;
|
|
232
|
-
value?: string | number | readonly string[] | undefined;
|
|
233
|
-
defaultChecked?: boolean | undefined;
|
|
234
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
|
235
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
236
|
-
suppressHydrationWarning?: boolean | undefined;
|
|
237
|
-
accessKey?: string | undefined;
|
|
238
|
-
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
239
|
-
contextMenu?: string | undefined;
|
|
240
|
-
placeholder?: string | undefined;
|
|
241
|
-
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
242
|
-
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
243
|
-
radioGroup?: string | undefined;
|
|
244
|
-
about?: string | undefined;
|
|
245
|
-
datatype?: string | undefined;
|
|
246
|
-
inlist?: any;
|
|
247
|
-
prefix?: string | undefined;
|
|
248
|
-
property?: string | undefined;
|
|
249
|
-
resource?: string | undefined;
|
|
250
|
-
typeof?: string | undefined;
|
|
251
|
-
vocab?: string | undefined;
|
|
252
|
-
autoCapitalize?: string | undefined;
|
|
253
|
-
autoCorrect?: string | undefined;
|
|
254
|
-
autoSave?: string | undefined;
|
|
255
|
-
itemProp?: string | undefined;
|
|
256
|
-
itemScope?: boolean | undefined;
|
|
257
|
-
itemType?: string | undefined;
|
|
258
|
-
itemID?: string | undefined;
|
|
259
|
-
itemRef?: string | undefined;
|
|
260
|
-
results?: number | undefined;
|
|
261
|
-
security?: string | undefined;
|
|
262
|
-
unselectable?: "on" | "off" | undefined;
|
|
263
|
-
autoFocus?: boolean | undefined;
|
|
264
|
-
formAction?: string | undefined;
|
|
265
|
-
formEncType?: string | undefined;
|
|
266
|
-
formMethod?: string | undefined;
|
|
267
|
-
formNoValidate?: boolean | undefined;
|
|
268
|
-
formTarget?: string | undefined;
|
|
269
|
-
hidden?: boolean | undefined;
|
|
270
|
-
translate?: "no" | "yes" | undefined;
|
|
271
|
+
borderColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
271
272
|
p?: import("csstype").PaddingProperty<string | number> | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | undefined;
|
|
272
273
|
height?: import("csstype").HeightProperty<string | number> | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | undefined;
|
|
273
274
|
width?: import("csstype").WidthProperty<string | number> | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | undefined;
|
|
@@ -276,7 +277,6 @@ declare const TextButton: import("react").ComponentType<{
|
|
|
276
277
|
fontSize?: import("csstype").FontSizeProperty<string | number> | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | undefined;
|
|
277
278
|
fontWeight?: import("csstype").FontWeightProperty | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | undefined;
|
|
278
279
|
textDecoration?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
279
|
-
borderColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
280
280
|
margin?: import("csstype").MarginProperty<string | number> | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | undefined;
|
|
281
281
|
marginLeft?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
282
282
|
marginRight?: import("csstype").MarginRightProperty<string | number> | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | undefined;
|
|
@@ -335,7 +335,14 @@ declare const TextButton: import("react").ComponentType<{
|
|
|
335
335
|
flexDirection?: import("csstype").FlexDirectionProperty | [import("csstype").FlexDirectionProperty | undefined, import("csstype").FlexDirectionProperty | undefined] | [import("csstype").FlexDirectionProperty | undefined, import("csstype").FlexDirectionProperty | undefined, import("csstype").FlexDirectionProperty | undefined] | undefined;
|
|
336
336
|
flexBasis?: import("csstype").FlexBasisProperty<string | number> | [import("csstype").FlexBasisProperty<string | number> | undefined, import("csstype").FlexBasisProperty<string | number> | undefined] | [import("csstype").FlexBasisProperty<string | number> | undefined, import("csstype").FlexBasisProperty<string | number> | undefined, import("csstype").FlexBasisProperty<string | number> | undefined] | undefined;
|
|
337
337
|
flexGrow?: import("csstype").GlobalsNumber | [import("csstype").GlobalsNumber | undefined, import("csstype").GlobalsNumber | undefined] | [import("csstype").GlobalsNumber | undefined, import("csstype").GlobalsNumber | undefined, import("csstype").GlobalsNumber | undefined] | undefined;
|
|
338
|
+
gridTemplateColumns?: import("csstype").GridTemplateColumnsProperty<string | number> | [import("csstype").GridTemplateColumnsProperty<string | number> | undefined, import("csstype").GridTemplateColumnsProperty<string | number> | undefined] | [import("csstype").GridTemplateColumnsProperty<string | number> | undefined, import("csstype").GridTemplateColumnsProperty<string | number> | undefined, import("csstype").GridTemplateColumnsProperty<string | number> | undefined] | undefined;
|
|
338
339
|
'data-testid'?: string | undefined;
|
|
339
340
|
innerRef?: import("react").Ref<HTMLButtonElement> | undefined;
|
|
341
|
+
gridColumnSpan?: number | number[] | "end" | "all" | undefined;
|
|
342
|
+
gridColumnPad?: number | number[] | undefined;
|
|
343
|
+
gridRowSpan?: number | number[] | undefined;
|
|
344
|
+
gridRowPad?: number | number[] | undefined;
|
|
345
|
+
gridAlign?: ("start" | "end" | "center" | "stretch") | undefined;
|
|
346
|
+
gridJustify?: ("start" | "end" | "center" | "stretch") | undefined;
|
|
340
347
|
}>;
|
|
341
348
|
export default TextButton;
|
package/dist/UnstyledButton.d.ts
CHANGED
|
@@ -1,26 +1,55 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const UnstyledButton: import("react").ComponentType<{
|
|
3
|
+
is?: string | undefined;
|
|
4
|
+
name?: string | undefined;
|
|
5
|
+
disabled?: boolean | undefined;
|
|
6
|
+
color?: (string & (string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined])) | undefined;
|
|
7
|
+
children?: import("react").ReactNode;
|
|
3
8
|
form?: string | undefined;
|
|
4
9
|
slot?: string | undefined;
|
|
5
10
|
style?: import("react").CSSProperties | undefined;
|
|
6
11
|
title?: string | undefined;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
onDrag?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
17
|
-
onDragEnd?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
12
|
+
value?: string | number | readonly string[] | undefined;
|
|
13
|
+
defaultChecked?: boolean | undefined;
|
|
14
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
15
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
16
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
17
|
+
dangerouslySetInnerHTML?: {
|
|
18
|
+
__html: string;
|
|
19
|
+
} | undefined;
|
|
20
|
+
accessKey?: string | undefined;
|
|
18
21
|
className?: string | undefined;
|
|
19
|
-
|
|
22
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
|
|
23
|
+
contextMenu?: string | undefined;
|
|
24
|
+
dir?: string | undefined;
|
|
25
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
26
|
+
id?: string | undefined;
|
|
20
27
|
lang?: string | undefined;
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
placeholder?: string | undefined;
|
|
29
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
23
30
|
tabIndex?: number | undefined;
|
|
31
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
32
|
+
radioGroup?: string | undefined;
|
|
33
|
+
role?: string | undefined;
|
|
34
|
+
about?: string | undefined;
|
|
35
|
+
datatype?: string | undefined;
|
|
36
|
+
inlist?: any;
|
|
37
|
+
prefix?: string | undefined;
|
|
38
|
+
property?: string | undefined;
|
|
39
|
+
resource?: string | undefined;
|
|
40
|
+
typeof?: string | undefined;
|
|
41
|
+
vocab?: string | undefined;
|
|
42
|
+
autoCapitalize?: string | undefined;
|
|
43
|
+
autoCorrect?: string | undefined;
|
|
44
|
+
autoSave?: string | undefined;
|
|
45
|
+
itemProp?: string | undefined;
|
|
46
|
+
itemScope?: boolean | undefined;
|
|
47
|
+
itemType?: string | undefined;
|
|
48
|
+
itemID?: string | undefined;
|
|
49
|
+
itemRef?: string | undefined;
|
|
50
|
+
results?: number | undefined;
|
|
51
|
+
security?: string | undefined;
|
|
52
|
+
unselectable?: "on" | "off" | undefined;
|
|
24
53
|
'aria-activedescendant'?: string | undefined;
|
|
25
54
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
|
26
55
|
'aria-autocomplete'?: "none" | "list" | "both" | "inline" | undefined;
|
|
@@ -39,7 +68,7 @@ declare const UnstyledButton: import("react").ComponentType<{
|
|
|
39
68
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
|
40
69
|
'aria-flowto'?: string | undefined;
|
|
41
70
|
'aria-grabbed'?: boolean | "true" | "false" | undefined;
|
|
42
|
-
'aria-haspopup'?: boolean | "
|
|
71
|
+
'aria-haspopup'?: boolean | "menu" | "dialog" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
43
72
|
'aria-hidden'?: boolean | "true" | "false" | undefined;
|
|
44
73
|
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
45
74
|
'aria-keyshortcuts'?: string | undefined;
|
|
@@ -69,9 +98,16 @@ declare const UnstyledButton: import("react").ComponentType<{
|
|
|
69
98
|
'aria-valuemin'?: number | undefined;
|
|
70
99
|
'aria-valuenow'?: number | undefined;
|
|
71
100
|
'aria-valuetext'?: string | undefined;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
101
|
+
type?: "reset" | "submit" | "button" | undefined;
|
|
102
|
+
autoFocus?: boolean | undefined;
|
|
103
|
+
formAction?: string | undefined;
|
|
104
|
+
formEncType?: string | undefined;
|
|
105
|
+
formMethod?: string | undefined;
|
|
106
|
+
formNoValidate?: boolean | undefined;
|
|
107
|
+
formTarget?: string | undefined;
|
|
108
|
+
key?: import("react").Key | null | undefined;
|
|
109
|
+
hidden?: boolean | undefined;
|
|
110
|
+
translate?: "yes" | "no" | undefined;
|
|
75
111
|
onCopy?: import("react").ClipboardEventHandler<HTMLButtonElement> | undefined;
|
|
76
112
|
onCopyCapture?: import("react").ClipboardEventHandler<HTMLButtonElement> | undefined;
|
|
77
113
|
onCut?: import("react").ClipboardEventHandler<HTMLButtonElement> | undefined;
|
|
@@ -156,12 +192,15 @@ declare const UnstyledButton: import("react").ComponentType<{
|
|
|
156
192
|
onWaitingCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
|
|
157
193
|
onAuxClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
158
194
|
onAuxClickCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
195
|
+
onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
159
196
|
onClickCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
160
197
|
onContextMenu?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
161
198
|
onContextMenuCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
162
199
|
onDoubleClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
163
200
|
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
201
|
+
onDrag?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
164
202
|
onDragCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
203
|
+
onDragEnd?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
165
204
|
onDragEndCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
166
205
|
onDragEnter?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
167
206
|
onDragEnterCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
@@ -171,11 +210,14 @@ declare const UnstyledButton: import("react").ComponentType<{
|
|
|
171
210
|
onDragLeaveCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
172
211
|
onDragOver?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
173
212
|
onDragOverCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
213
|
+
onDragStart?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
174
214
|
onDragStartCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
175
215
|
onDrop?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
176
216
|
onDropCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
|
|
177
217
|
onMouseDown?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
178
218
|
onMouseDownCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
219
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
220
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
179
221
|
onMouseMove?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
180
222
|
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
181
223
|
onMouseOut?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
@@ -226,48 +268,7 @@ declare const UnstyledButton: import("react").ComponentType<{
|
|
|
226
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
227
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
228
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
229
|
-
|
|
230
|
-
is?: string | undefined;
|
|
231
|
-
disabled?: boolean | undefined;
|
|
232
|
-
value?: string | number | readonly string[] | undefined;
|
|
233
|
-
defaultChecked?: boolean | undefined;
|
|
234
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
|
235
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
236
|
-
suppressHydrationWarning?: boolean | undefined;
|
|
237
|
-
accessKey?: string | undefined;
|
|
238
|
-
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
239
|
-
contextMenu?: string | undefined;
|
|
240
|
-
placeholder?: string | undefined;
|
|
241
|
-
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
242
|
-
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
243
|
-
radioGroup?: string | undefined;
|
|
244
|
-
about?: string | undefined;
|
|
245
|
-
datatype?: string | undefined;
|
|
246
|
-
inlist?: any;
|
|
247
|
-
prefix?: string | undefined;
|
|
248
|
-
property?: string | undefined;
|
|
249
|
-
resource?: string | undefined;
|
|
250
|
-
typeof?: string | undefined;
|
|
251
|
-
vocab?: string | undefined;
|
|
252
|
-
autoCapitalize?: string | undefined;
|
|
253
|
-
autoCorrect?: string | undefined;
|
|
254
|
-
autoSave?: string | undefined;
|
|
255
|
-
itemProp?: string | undefined;
|
|
256
|
-
itemScope?: boolean | undefined;
|
|
257
|
-
itemType?: string | undefined;
|
|
258
|
-
itemID?: string | undefined;
|
|
259
|
-
itemRef?: string | undefined;
|
|
260
|
-
results?: number | undefined;
|
|
261
|
-
security?: string | undefined;
|
|
262
|
-
unselectable?: "on" | "off" | undefined;
|
|
263
|
-
autoFocus?: boolean | undefined;
|
|
264
|
-
formAction?: string | undefined;
|
|
265
|
-
formEncType?: string | undefined;
|
|
266
|
-
formMethod?: string | undefined;
|
|
267
|
-
formNoValidate?: boolean | undefined;
|
|
268
|
-
formTarget?: string | undefined;
|
|
269
|
-
hidden?: boolean | undefined;
|
|
270
|
-
translate?: "no" | "yes" | undefined;
|
|
271
|
+
borderColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
271
272
|
p?: import("csstype").PaddingProperty<string | number> | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | undefined;
|
|
272
273
|
height?: import("csstype").HeightProperty<string | number> | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | undefined;
|
|
273
274
|
width?: import("csstype").WidthProperty<string | number> | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | undefined;
|
|
@@ -276,7 +277,6 @@ declare const UnstyledButton: import("react").ComponentType<{
|
|
|
276
277
|
fontSize?: import("csstype").FontSizeProperty<string | number> | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | undefined;
|
|
277
278
|
fontWeight?: import("csstype").FontWeightProperty | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | undefined;
|
|
278
279
|
textDecoration?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
279
|
-
borderColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
280
280
|
margin?: import("csstype").MarginProperty<string | number> | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | undefined;
|
|
281
281
|
marginLeft?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
282
282
|
marginRight?: import("csstype").MarginRightProperty<string | number> | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | undefined;
|
|
@@ -335,6 +335,14 @@ declare const UnstyledButton: import("react").ComponentType<{
|
|
|
335
335
|
flexDirection?: import("csstype").FlexDirectionProperty | [import("csstype").FlexDirectionProperty | undefined, import("csstype").FlexDirectionProperty | undefined] | [import("csstype").FlexDirectionProperty | undefined, import("csstype").FlexDirectionProperty | undefined, import("csstype").FlexDirectionProperty | undefined] | undefined;
|
|
336
336
|
flexBasis?: import("csstype").FlexBasisProperty<string | number> | [import("csstype").FlexBasisProperty<string | number> | undefined, import("csstype").FlexBasisProperty<string | number> | undefined] | [import("csstype").FlexBasisProperty<string | number> | undefined, import("csstype").FlexBasisProperty<string | number> | undefined, import("csstype").FlexBasisProperty<string | number> | undefined] | undefined;
|
|
337
337
|
flexGrow?: import("csstype").GlobalsNumber | [import("csstype").GlobalsNumber | undefined, import("csstype").GlobalsNumber | undefined] | [import("csstype").GlobalsNumber | undefined, import("csstype").GlobalsNumber | undefined, import("csstype").GlobalsNumber | undefined] | undefined;
|
|
338
|
+
gridTemplateColumns?: import("csstype").GridTemplateColumnsProperty<string | number> | [import("csstype").GridTemplateColumnsProperty<string | number> | undefined, import("csstype").GridTemplateColumnsProperty<string | number> | undefined] | [import("csstype").GridTemplateColumnsProperty<string | number> | undefined, import("csstype").GridTemplateColumnsProperty<string | number> | undefined, import("csstype").GridTemplateColumnsProperty<string | number> | undefined] | undefined;
|
|
339
|
+
focus?: boolean | undefined;
|
|
338
340
|
innerRef?: import("react").Ref<HTMLButtonElement> | undefined;
|
|
341
|
+
gridColumnSpan?: number | number[] | "end" | "all" | undefined;
|
|
342
|
+
gridColumnPad?: number | number[] | undefined;
|
|
343
|
+
gridRowSpan?: number | number[] | undefined;
|
|
344
|
+
gridRowPad?: number | number[] | undefined;
|
|
345
|
+
gridAlign?: ("start" | "end" | "center" | "stretch") | undefined;
|
|
346
|
+
gridJustify?: ("start" | "end" | "center" | "stretch") | undefined;
|
|
339
347
|
}>;
|
|
340
348
|
export default UnstyledButton;
|
package/es/UnstyledButton.js
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
1
7
|
import { createStyledComponent } from '@cloudflare/style-container';
|
|
2
|
-
var UnstyledButton = createStyledComponent(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
var UnstyledButton = createStyledComponent(_ref => {
|
|
9
|
+
var {
|
|
10
|
+
theme,
|
|
11
|
+
focus
|
|
12
|
+
} = _ref;
|
|
13
|
+
return _objectSpread({
|
|
14
|
+
background: 'none',
|
|
15
|
+
color: 'inherit',
|
|
16
|
+
border: 'none',
|
|
17
|
+
padding: 0,
|
|
18
|
+
font: 'inherit',
|
|
19
|
+
cursor: 'pointer',
|
|
20
|
+
outline: 'inherit'
|
|
21
|
+
}, focus ? theme.mixins.focus() : {});
|
|
22
|
+
}, 'button');
|
|
11
23
|
export default UnstyledButton;
|
package/lib/UnstyledButton.js
CHANGED
|
@@ -7,8 +7,16 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _styleContainer = require("@cloudflare/style-container");
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
+
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
+
|
|
14
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
|
|
16
|
+
var UnstyledButton = (0, _styleContainer.createStyledComponent)(function (_ref) {
|
|
17
|
+
var theme = _ref.theme,
|
|
18
|
+
focus = _ref.focus;
|
|
19
|
+
return _objectSpread({
|
|
12
20
|
background: 'none',
|
|
13
21
|
color: 'inherit',
|
|
14
22
|
border: 'none',
|
|
@@ -16,7 +24,7 @@ var UnstyledButton = (0, _styleContainer.createStyledComponent)(function () {
|
|
|
16
24
|
font: 'inherit',
|
|
17
25
|
cursor: 'pointer',
|
|
18
26
|
outline: 'inherit'
|
|
19
|
-
};
|
|
27
|
+
}, focus ? theme.mixins.focus() : {});
|
|
20
28
|
}, 'button');
|
|
21
29
|
var _default = UnstyledButton;
|
|
22
30
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/component-button",
|
|
3
3
|
"description": "Cloudflare Button Component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.1.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
7
7
|
"author": "James Kyle <jkyle@cloudflare.com>",
|
|
8
8
|
"license": "BSD-3-Clause",
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
9
|
"publishConfig": {
|
|
11
10
|
"access": "public",
|
|
12
11
|
"main": "lib/index.js",
|
|
13
|
-
"module": "es/index.js"
|
|
12
|
+
"module": "es/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@cloudflare/component-icon": "^
|
|
16
|
+
"@cloudflare/component-icon": "^9.0.0",
|
|
17
17
|
"polished": "^4.1.4",
|
|
18
18
|
"prop-types": "^15.6.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@cloudflare/style-const": "^5.3.9",
|
|
22
|
-
"@cloudflare/style-container": "^7.
|
|
22
|
+
"@cloudflare/style-container": "^7.10.0",
|
|
23
23
|
"react": "^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"
|
|
24
24
|
},
|
|
25
25
|
"stratus": {
|
|
@@ -32,5 +32,6 @@
|
|
|
32
32
|
"test": "stratus test",
|
|
33
33
|
"test-coverage": "stratus test --coverage",
|
|
34
34
|
"test-watch": "stratus test --watch"
|
|
35
|
-
}
|
|
35
|
+
},
|
|
36
|
+
"types": "./dist/index.d.ts"
|
|
36
37
|
}
|