@instructure/ui-buttons 8.13.1-snapshot.9 → 8.14.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 +4 -0
- package/es/BaseButton/index.js +64 -43
- package/es/BaseButton/props.js +2 -88
- package/es/BaseButton/theme.js +1 -1
- package/es/Button/index.js +2 -2
- package/es/Button/props.js +3 -65
- package/es/CloseButton/index.js +23 -18
- package/es/CloseButton/props.js +2 -60
- package/es/CondensedButton/index.js +2 -2
- package/es/CondensedButton/props.js +3 -48
- package/es/IconButton/index.js +2 -2
- package/es/IconButton/props.js +3 -68
- package/es/ToggleButton/index.js +4 -5
- package/es/ToggleButton/props.js +1 -58
- package/lib/BaseButton/index.js +67 -43
- package/lib/BaseButton/props.js +2 -88
- package/lib/BaseButton/theme.js +1 -1
- package/lib/Button/index.js +2 -2
- package/lib/Button/props.js +3 -65
- package/lib/CloseButton/index.js +23 -18
- package/lib/CloseButton/props.js +2 -60
- package/lib/CondensedButton/index.js +2 -2
- package/lib/CondensedButton/props.js +3 -48
- package/lib/IconButton/index.js +2 -2
- package/lib/IconButton/props.js +3 -68
- package/lib/ToggleButton/index.js +4 -5
- package/lib/ToggleButton/props.js +1 -58
- package/package.json +21 -22
- package/src/BaseButton/index.tsx +35 -27
- package/src/BaseButton/props.ts +103 -72
- package/src/BaseButton/theme.ts +1 -6
- package/src/Button/index.tsx +4 -8
- package/src/Button/props.ts +74 -48
- package/src/CloseButton/index.tsx +4 -6
- package/src/CloseButton/props.ts +67 -41
- package/src/CondensedButton/index.tsx +3 -7
- package/src/CondensedButton/props.ts +56 -34
- package/src/IconButton/index.tsx +3 -7
- package/src/IconButton/props.ts +77 -50
- package/src/ToggleButton/index.tsx +8 -15
- package/src/ToggleButton/props.ts +65 -39
- package/tsconfig.build.json +25 -2
- package/tsconfig.build.tsbuildinfo +1 -0
- package/types/BaseButton/BaseButtonLocator.d.ts +57 -56
- package/types/BaseButton/BaseButtonLocator.d.ts.map +1 -1
- package/types/BaseButton/index.d.ts +16 -15
- package/types/BaseButton/index.d.ts.map +1 -1
- package/types/BaseButton/props.d.ts +76 -5
- package/types/BaseButton/props.d.ts.map +1 -1
- package/types/BaseButton/theme.d.ts.map +1 -1
- package/types/Button/ButtonLocator.d.ts +57 -56
- package/types/Button/ButtonLocator.d.ts.map +1 -1
- package/types/Button/index.d.ts +10 -7
- package/types/Button/index.d.ts.map +1 -1
- package/types/Button/locator.d.ts +52 -52
- package/types/Button/props.d.ts +57 -3
- package/types/Button/props.d.ts.map +1 -1
- package/types/CloseButton/CloseButtonLocator.d.ts +52 -52
- package/types/CloseButton/index.d.ts +4 -3
- package/types/CloseButton/index.d.ts.map +1 -1
- package/types/CloseButton/props.d.ts +55 -5
- package/types/CloseButton/props.d.ts.map +1 -1
- package/types/CondensedButton/CondensedButtonLocator.d.ts +57 -56
- package/types/CondensedButton/CondensedButtonLocator.d.ts.map +1 -1
- package/types/CondensedButton/index.d.ts +9 -6
- package/types/CondensedButton/index.d.ts.map +1 -1
- package/types/CondensedButton/props.d.ts +44 -3
- package/types/CondensedButton/props.d.ts.map +1 -1
- package/types/IconButton/IconButtonLocator.d.ts +57 -56
- package/types/IconButton/IconButtonLocator.d.ts.map +1 -1
- package/types/IconButton/index.d.ts +11 -8
- package/types/IconButton/index.d.ts.map +1 -1
- package/types/IconButton/props.d.ts +60 -4
- package/types/IconButton/props.d.ts.map +1 -1
- package/types/ToggleButton/ToggleButtonLocator.d.ts +57 -56
- package/types/ToggleButton/ToggleButtonLocator.d.ts.map +1 -1
- package/types/ToggleButton/index.d.ts +12 -13
- package/types/ToggleButton/index.d.ts.map +1 -1
- package/types/ToggleButton/props.d.ts +52 -4
- package/types/ToggleButton/props.d.ts.map +1 -1
- package/LICENSE.md +0 -27
|
@@ -27,25 +27,15 @@ declare const _default: {
|
|
|
27
27
|
toString: (maxLength?: number | undefined, options?: {
|
|
28
28
|
highlight: boolean;
|
|
29
29
|
} | undefined) => string;
|
|
30
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
31
|
-
children: (selector: string) => Element[];
|
|
32
|
-
title: () => string | null | undefined;
|
|
33
|
-
id: () => string;
|
|
34
|
-
tagName: () => string;
|
|
35
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
36
|
-
getBoundingClientRect: () => DOMRect;
|
|
37
|
-
matches: (selector: string | undefined) => boolean;
|
|
38
30
|
visible: () => boolean;
|
|
39
|
-
value: () => string | null;
|
|
40
|
-
disabled: () => string | null;
|
|
41
|
-
role: () => string | null;
|
|
42
|
-
label: () => string | null | undefined;
|
|
43
31
|
getId: () => string;
|
|
44
32
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
45
33
|
getOwnerDocument: () => Document;
|
|
46
34
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
47
35
|
getTagName: () => string;
|
|
36
|
+
tagName: () => string;
|
|
48
37
|
typeIn: (text: string) => Promise<void>;
|
|
38
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
49
39
|
getDOMNode: () => Element;
|
|
50
40
|
node: () => Element;
|
|
51
41
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -55,6 +45,7 @@ declare const _default: {
|
|
|
55
45
|
getTextContent: () => string | null;
|
|
56
46
|
getParentNode: () => ParentNode | null;
|
|
57
47
|
parent: () => ParentNode | null;
|
|
48
|
+
getBoundingClientRect: () => DOMRect;
|
|
58
49
|
rect: () => DOMRect;
|
|
59
50
|
hasClass: (classname: string) => boolean;
|
|
60
51
|
containsFocus: () => boolean;
|
|
@@ -66,17 +57,25 @@ declare const _default: {
|
|
|
66
57
|
exists: () => boolean;
|
|
67
58
|
text: () => string | null;
|
|
68
59
|
empty: () => boolean;
|
|
60
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
69
61
|
descendants: (selector: string) => Element[];
|
|
70
62
|
ancestors: (selector: string) => ParentNode[];
|
|
71
63
|
attribute: (qualifiedName: string) => string | null;
|
|
72
64
|
style: (property: string) => string;
|
|
73
65
|
classNames: () => string[];
|
|
66
|
+
id: () => string;
|
|
67
|
+
matches: (selector: string | undefined) => boolean;
|
|
74
68
|
checked: () => any;
|
|
75
69
|
selected: () => any;
|
|
70
|
+
disabled: () => string | null;
|
|
76
71
|
readonly: () => any;
|
|
72
|
+
role: () => string | null;
|
|
73
|
+
value: () => string | null;
|
|
74
|
+
label: () => string | null | undefined;
|
|
75
|
+
title: () => string | null | undefined;
|
|
76
|
+
children: (selector: string) => Element[];
|
|
77
77
|
parents: (selector: string) => ParentNode[];
|
|
78
78
|
} & {
|
|
79
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
80
79
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
81
80
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
82
81
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -114,6 +113,7 @@ declare const _default: {
|
|
|
114
113
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
115
114
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
116
115
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
116
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
117
117
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
118
118
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
119
119
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -168,25 +168,15 @@ declare const _default: {
|
|
|
168
168
|
toString: (maxLength?: number | undefined, options?: {
|
|
169
169
|
highlight: boolean;
|
|
170
170
|
} | undefined) => string;
|
|
171
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
172
|
-
children: (selector: string) => Element[];
|
|
173
|
-
title: () => string | null | undefined;
|
|
174
|
-
id: () => string;
|
|
175
|
-
tagName: () => string;
|
|
176
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
177
|
-
getBoundingClientRect: () => DOMRect;
|
|
178
|
-
matches: (selector: string | undefined) => boolean;
|
|
179
171
|
visible: () => boolean;
|
|
180
|
-
value: () => string | null;
|
|
181
|
-
disabled: () => string | null;
|
|
182
|
-
role: () => string | null;
|
|
183
|
-
label: () => string | null | undefined;
|
|
184
172
|
getId: () => string;
|
|
185
173
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
186
174
|
getOwnerDocument: () => Document;
|
|
187
175
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
188
176
|
getTagName: () => string;
|
|
177
|
+
tagName: () => string;
|
|
189
178
|
typeIn: (text: string) => Promise<void>;
|
|
179
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
190
180
|
getDOMNode: () => Element;
|
|
191
181
|
node: () => Element;
|
|
192
182
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -196,6 +186,7 @@ declare const _default: {
|
|
|
196
186
|
getTextContent: () => string | null;
|
|
197
187
|
getParentNode: () => ParentNode | null;
|
|
198
188
|
parent: () => ParentNode | null;
|
|
189
|
+
getBoundingClientRect: () => DOMRect;
|
|
199
190
|
rect: () => DOMRect;
|
|
200
191
|
hasClass: (classname: string) => boolean;
|
|
201
192
|
containsFocus: () => boolean;
|
|
@@ -207,17 +198,25 @@ declare const _default: {
|
|
|
207
198
|
exists: () => boolean;
|
|
208
199
|
text: () => string | null;
|
|
209
200
|
empty: () => boolean;
|
|
201
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
210
202
|
descendants: (selector: string) => Element[];
|
|
211
203
|
ancestors: (selector: string) => ParentNode[];
|
|
212
204
|
attribute: (qualifiedName: string) => string | null;
|
|
213
205
|
style: (property: string) => string;
|
|
214
206
|
classNames: () => string[];
|
|
207
|
+
id: () => string;
|
|
208
|
+
matches: (selector: string | undefined) => boolean;
|
|
215
209
|
checked: () => any;
|
|
216
210
|
selected: () => any;
|
|
211
|
+
disabled: () => string | null;
|
|
217
212
|
readonly: () => any;
|
|
213
|
+
role: () => string | null;
|
|
214
|
+
value: () => string | null;
|
|
215
|
+
label: () => string | null | undefined;
|
|
216
|
+
title: () => string | null | undefined;
|
|
217
|
+
children: (selector: string) => Element[];
|
|
218
218
|
parents: (selector: string) => ParentNode[];
|
|
219
219
|
} & {
|
|
220
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
221
220
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
222
221
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
223
222
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -255,6 +254,7 @@ declare const _default: {
|
|
|
255
254
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
256
255
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
257
256
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
257
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
258
258
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
259
259
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
260
260
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -309,25 +309,15 @@ declare const _default: {
|
|
|
309
309
|
toString: (maxLength?: number | undefined, options?: {
|
|
310
310
|
highlight: boolean;
|
|
311
311
|
} | undefined) => string;
|
|
312
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
313
|
-
children: (selector: string) => Element[];
|
|
314
|
-
title: () => string | null | undefined;
|
|
315
|
-
id: () => string;
|
|
316
|
-
tagName: () => string;
|
|
317
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
318
|
-
getBoundingClientRect: () => DOMRect;
|
|
319
|
-
matches: (selector: string | undefined) => boolean;
|
|
320
312
|
visible: () => boolean;
|
|
321
|
-
value: () => string | null;
|
|
322
|
-
disabled: () => string | null;
|
|
323
|
-
role: () => string | null;
|
|
324
|
-
label: () => string | null | undefined;
|
|
325
313
|
getId: () => string;
|
|
326
314
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
327
315
|
getOwnerDocument: () => Document;
|
|
328
316
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
329
317
|
getTagName: () => string;
|
|
318
|
+
tagName: () => string;
|
|
330
319
|
typeIn: (text: string) => Promise<void>;
|
|
320
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
331
321
|
getDOMNode: () => Element;
|
|
332
322
|
node: () => Element;
|
|
333
323
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -337,6 +327,7 @@ declare const _default: {
|
|
|
337
327
|
getTextContent: () => string | null;
|
|
338
328
|
getParentNode: () => ParentNode | null;
|
|
339
329
|
parent: () => ParentNode | null;
|
|
330
|
+
getBoundingClientRect: () => DOMRect;
|
|
340
331
|
rect: () => DOMRect;
|
|
341
332
|
hasClass: (classname: string) => boolean;
|
|
342
333
|
containsFocus: () => boolean;
|
|
@@ -348,17 +339,25 @@ declare const _default: {
|
|
|
348
339
|
exists: () => boolean;
|
|
349
340
|
text: () => string | null;
|
|
350
341
|
empty: () => boolean;
|
|
342
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
351
343
|
descendants: (selector: string) => Element[];
|
|
352
344
|
ancestors: (selector: string) => ParentNode[];
|
|
353
345
|
attribute: (qualifiedName: string) => string | null;
|
|
354
346
|
style: (property: string) => string;
|
|
355
347
|
classNames: () => string[];
|
|
348
|
+
id: () => string;
|
|
349
|
+
matches: (selector: string | undefined) => boolean;
|
|
356
350
|
checked: () => any;
|
|
357
351
|
selected: () => any;
|
|
352
|
+
disabled: () => string | null;
|
|
358
353
|
readonly: () => any;
|
|
354
|
+
role: () => string | null;
|
|
355
|
+
value: () => string | null;
|
|
356
|
+
label: () => string | null | undefined;
|
|
357
|
+
title: () => string | null | undefined;
|
|
358
|
+
children: (selector: string) => Element[];
|
|
359
359
|
parents: (selector: string) => ParentNode[];
|
|
360
360
|
} & {
|
|
361
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
362
361
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
363
362
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
364
363
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -396,6 +395,7 @@ declare const _default: {
|
|
|
396
395
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
397
396
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
398
397
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
398
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
399
399
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
400
400
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
401
401
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -450,25 +450,15 @@ declare const _default: {
|
|
|
450
450
|
toString: (maxLength?: number | undefined, options?: {
|
|
451
451
|
highlight: boolean;
|
|
452
452
|
} | undefined) => string;
|
|
453
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
454
|
-
children: (selector: string) => Element[];
|
|
455
|
-
title: () => string | null | undefined;
|
|
456
|
-
id: () => string;
|
|
457
|
-
tagName: () => string;
|
|
458
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
459
|
-
getBoundingClientRect: () => DOMRect;
|
|
460
|
-
matches: (selector: string | undefined) => boolean;
|
|
461
453
|
visible: () => boolean;
|
|
462
|
-
value: () => string | null;
|
|
463
|
-
disabled: () => string | null;
|
|
464
|
-
role: () => string | null;
|
|
465
|
-
label: () => string | null | undefined;
|
|
466
454
|
getId: () => string;
|
|
467
455
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
468
456
|
getOwnerDocument: () => Document;
|
|
469
457
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
470
458
|
getTagName: () => string;
|
|
459
|
+
tagName: () => string;
|
|
471
460
|
typeIn: (text: string) => Promise<void>;
|
|
461
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
472
462
|
getDOMNode: () => Element;
|
|
473
463
|
node: () => Element;
|
|
474
464
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -478,6 +468,7 @@ declare const _default: {
|
|
|
478
468
|
getTextContent: () => string | null;
|
|
479
469
|
getParentNode: () => ParentNode | null;
|
|
480
470
|
parent: () => ParentNode | null;
|
|
471
|
+
getBoundingClientRect: () => DOMRect;
|
|
481
472
|
rect: () => DOMRect;
|
|
482
473
|
hasClass: (classname: string) => boolean;
|
|
483
474
|
containsFocus: () => boolean;
|
|
@@ -489,17 +480,25 @@ declare const _default: {
|
|
|
489
480
|
exists: () => boolean;
|
|
490
481
|
text: () => string | null;
|
|
491
482
|
empty: () => boolean;
|
|
483
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
492
484
|
descendants: (selector: string) => Element[];
|
|
493
485
|
ancestors: (selector: string) => ParentNode[];
|
|
494
486
|
attribute: (qualifiedName: string) => string | null;
|
|
495
487
|
style: (property: string) => string;
|
|
496
488
|
classNames: () => string[];
|
|
489
|
+
id: () => string;
|
|
490
|
+
matches: (selector: string | undefined) => boolean;
|
|
497
491
|
checked: () => any;
|
|
498
492
|
selected: () => any;
|
|
493
|
+
disabled: () => string | null;
|
|
499
494
|
readonly: () => any;
|
|
495
|
+
role: () => string | null;
|
|
496
|
+
value: () => string | null;
|
|
497
|
+
label: () => string | null | undefined;
|
|
498
|
+
title: () => string | null | undefined;
|
|
499
|
+
children: (selector: string) => Element[];
|
|
500
500
|
parents: (selector: string) => ParentNode[];
|
|
501
501
|
} & {
|
|
502
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
503
502
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
504
503
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
505
504
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -537,6 +536,7 @@ declare const _default: {
|
|
|
537
536
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
538
537
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
539
538
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
539
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
540
540
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
541
541
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
542
542
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
package/types/Button/props.d.ts
CHANGED
|
@@ -1,27 +1,81 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
3
|
-
import type { AsElementType, PropValidators, BaseButtonTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
3
|
+
import type { ToProp, AsElementType, PropValidators, BaseButtonTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
4
4
|
import type { Cursor } from '@instructure/ui-prop-types';
|
|
5
|
+
import type { ViewProps } from '@instructure/ui-view';
|
|
5
6
|
declare type ButtonOwnProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Specifies the `Button` children.
|
|
9
|
+
*/
|
|
6
10
|
children?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Specifies the type of the `Button`'s underlying html element.
|
|
13
|
+
*/
|
|
7
14
|
type?: 'button' | 'submit' | 'reset';
|
|
15
|
+
/**
|
|
16
|
+
* The size of the `Button`
|
|
17
|
+
*/
|
|
8
18
|
size?: 'small' | 'medium' | 'large';
|
|
19
|
+
/**
|
|
20
|
+
* Provides a reference to the `Button`'s underlying html element.
|
|
21
|
+
*/
|
|
9
22
|
elementRef?: (element: Element | null) => void;
|
|
23
|
+
/**
|
|
24
|
+
* The element to render as the component root, `Button` by default.
|
|
25
|
+
*/
|
|
10
26
|
as?: AsElementType;
|
|
27
|
+
/**
|
|
28
|
+
* Specifies if interaction with the `Button` is enabled, disabled, or readonly.
|
|
29
|
+
*/
|
|
11
30
|
interaction?: 'enabled' | 'disabled' | 'readonly';
|
|
31
|
+
/**
|
|
32
|
+
* Specifies the color for the `Button`.
|
|
33
|
+
*/
|
|
12
34
|
color?: 'primary' | 'primary-inverse' | 'secondary' | 'success' | 'danger';
|
|
35
|
+
/**
|
|
36
|
+
* Override the `Button`'s default focus outline color.
|
|
37
|
+
*/
|
|
13
38
|
focusColor?: 'info' | 'inverse';
|
|
39
|
+
/**
|
|
40
|
+
* The `Button` display property. When set to `inline-block`, the `Button` displays inline with other elements.
|
|
41
|
+
* When set to block, the `Button` expands to fill the width of the container.
|
|
42
|
+
*/
|
|
14
43
|
display?: 'inline-block' | 'block';
|
|
44
|
+
/**
|
|
45
|
+
* Sets the alignment of the `Button` children and/or icon.
|
|
46
|
+
*/
|
|
15
47
|
textAlign?: 'start' | 'center';
|
|
48
|
+
/**
|
|
49
|
+
* Specifies if the `Button` should render with a solid background. When false, the background is transparent.
|
|
50
|
+
*/
|
|
16
51
|
withBackground?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
|
|
54
|
+
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
55
|
+
* familiar CSS-like shorthand. For example: `margin="small auto large"`.
|
|
56
|
+
*/
|
|
17
57
|
margin?: Spacing;
|
|
58
|
+
/**
|
|
59
|
+
* Specify a mouse cursor to use when hovering over the button.
|
|
60
|
+
* The `pointer` cursor is used by default.
|
|
61
|
+
*/
|
|
18
62
|
cursor?: Cursor;
|
|
63
|
+
/**
|
|
64
|
+
* Specifies an href attribute for the `Button`'s underlying html element.
|
|
65
|
+
*/
|
|
19
66
|
href?: string;
|
|
20
|
-
|
|
67
|
+
/**
|
|
68
|
+
* An icon, or function that returns an icon.
|
|
69
|
+
*/
|
|
70
|
+
renderIcon?: React.ReactNode | (() => React.ReactNode);
|
|
71
|
+
/**
|
|
72
|
+
* Callback fired when the `Button` is clicked.
|
|
73
|
+
*/
|
|
74
|
+
onClick?: (event: React.KeyboardEvent<ViewProps> | React.MouseEvent<ViewProps>) => void;
|
|
21
75
|
};
|
|
22
76
|
declare type PropKeys = keyof ButtonOwnProps;
|
|
23
77
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
24
|
-
declare type ButtonProps = ButtonOwnProps & WithStyleProps<BaseButtonTheme, null> & OtherHTMLAttributes<ButtonOwnProps
|
|
78
|
+
declare type ButtonProps = ButtonOwnProps & WithStyleProps<BaseButtonTheme, null> & OtherHTMLAttributes<ButtonOwnProps> & ToProp;
|
|
25
79
|
declare const propTypes: PropValidators<PropKeys>;
|
|
26
80
|
declare const allowedProps: AllowedPropKeys;
|
|
27
81
|
export type { ButtonProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Button/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Button/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD,aAAK,cAAc,GAAG;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;IAEpC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAE9C;;OAEG;IACH,EAAE,CAAC,EAAE,aAAa,CAAA;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;IAEjD;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IAE1E;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAE/B;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAA;IAElC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,CAAA;IAEtD;;OAEG;IACH,OAAO,CAAC,EAAE,CACR,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,KAChE,IAAI,CAAA;CACV,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,cAAc,CAAA;AAEpC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,WAAW,GAAG,cAAc,GAC/B,cAAc,CAAC,eAAe,EAAE,IAAI,CAAC,GACrC,mBAAmB,CAAC,cAAc,CAAC,GACnC,MAAM,CAAA;AAER,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAuBvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAiBnB,CAAA;AAED,YAAY,EAAE,WAAW,EAAE,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|