Skip to content

Commit c12dd0e

Browse files
author
cchaos
committed
Moar snaps
1 parent 7060b3f commit c12dd0e

File tree

25 files changed

+425
-431
lines changed

25 files changed

+425
-431
lines changed

src/components/accordion/__snapshots__/accordion.test.tsx.snap

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ exports[`EuiAccordion behavior closes when clicked twice 1`] = `
1111
aria-controls="18"
1212
aria-expanded="false"
1313
aria-labelledby="generated-id"
14-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
14+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
1515
tabindex="-1"
1616
type="button"
1717
>
@@ -65,7 +65,7 @@ exports[`EuiAccordion behavior opens when clicked once 1`] = `
6565
aria-controls="16"
6666
aria-expanded="true"
6767
aria-labelledby="generated-id"
68-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen css-gxj9fi-empty-text-EuiButtonIcon-euiAccordion__iconButton-isOpen"
68+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen css-gxj9fi-empty-text-EuiButtonIcon-euiAccordion__iconButton-isOpen"
6969
tabindex="-1"
7070
type="button"
7171
>
@@ -119,7 +119,7 @@ exports[`EuiAccordion behavior opens when div is clicked if element is a div 1`]
119119
aria-controls="17"
120120
aria-expanded="true"
121121
aria-labelledby="generated-id"
122-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen css-gxj9fi-empty-text-EuiButtonIcon-euiAccordion__iconButton-isOpen"
122+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen css-gxj9fi-empty-text-EuiButtonIcon-euiAccordion__iconButton-isOpen"
123123
tabindex="-1"
124124
type="button"
125125
>
@@ -175,7 +175,7 @@ exports[`EuiAccordion is rendered 1`] = `
175175
aria-controls="0"
176176
aria-expanded="false"
177177
aria-labelledby="generated-id"
178-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
178+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
179179
tabindex="-1"
180180
type="button"
181181
>
@@ -271,7 +271,7 @@ exports[`EuiAccordion props arrowDisplay right is rendered 1`] = `
271271
aria-controls="8"
272272
aria-expanded="false"
273273
aria-labelledby="generated-id"
274-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton--right css-1p093ei-empty-text-EuiButtonIcon-euiAccordion__iconButton-arrowRight"
274+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton--right css-1p093ei-empty-text-EuiButtonIcon-euiAccordion__iconButton-arrowRight"
275275
tabindex="-1"
276276
type="button"
277277
>
@@ -311,7 +311,7 @@ exports[`EuiAccordion props arrowProps is rendered 1`] = `
311311
aria-expanded="false"
312312
aria-label="aria-label"
313313
aria-labelledby="generated-id"
314-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton testClass1 testClass2 css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
314+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton testClass1 testClass2 css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
315315
data-test-subj="test subject string"
316316
tabindex="-1"
317317
type="button"
@@ -362,7 +362,7 @@ exports[`EuiAccordion props buttonContent is rendered 1`] = `
362362
aria-controls="3"
363363
aria-expanded="false"
364364
aria-labelledby="generated-id"
365-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
365+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
366366
tabindex="-1"
367367
type="button"
368368
>
@@ -416,7 +416,7 @@ exports[`EuiAccordion props buttonContentClassName is rendered 1`] = `
416416
aria-controls="2"
417417
aria-expanded="false"
418418
aria-labelledby="generated-id"
419-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
419+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
420420
tabindex="-1"
421421
type="button"
422422
>
@@ -466,7 +466,7 @@ exports[`EuiAccordion props buttonElement is rendered 1`] = `
466466
aria-controls="5"
467467
aria-expanded="false"
468468
aria-labelledby="generated-id"
469-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
469+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
470470
tabindex="0"
471471
type="button"
472472
>
@@ -515,7 +515,7 @@ exports[`EuiAccordion props buttonProps is rendered 1`] = `
515515
aria-controls="4"
516516
aria-expanded="false"
517517
aria-labelledby="generated-id"
518-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
518+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
519519
tabindex="-1"
520520
type="button"
521521
>
@@ -567,7 +567,7 @@ exports[`EuiAccordion props element is rendered 1`] = `
567567
aria-controls="1"
568568
aria-expanded="false"
569569
aria-labelledby="generated-id"
570-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
570+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
571571
tabindex="0"
572572
type="button"
573573
>
@@ -616,7 +616,7 @@ exports[`EuiAccordion props extraAction is rendered 1`] = `
616616
aria-controls="6"
617617
aria-expanded="false"
618618
aria-labelledby="generated-id"
619-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
619+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
620620
tabindex="-1"
621621
type="button"
622622
>
@@ -673,7 +673,7 @@ exports[`EuiAccordion props forceState closed is rendered 1`] = `
673673
aria-controls="11"
674674
aria-expanded="false"
675675
aria-labelledby="generated-id"
676-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
676+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
677677
tabindex="-1"
678678
type="button"
679679
>
@@ -727,7 +727,7 @@ exports[`EuiAccordion props forceState open is rendered 1`] = `
727727
aria-controls="12"
728728
aria-expanded="true"
729729
aria-labelledby="generated-id"
730-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen css-gxj9fi-empty-text-EuiButtonIcon-euiAccordion__iconButton-isOpen"
730+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen css-gxj9fi-empty-text-EuiButtonIcon-euiAccordion__iconButton-isOpen"
731731
tabindex="-1"
732732
type="button"
733733
>
@@ -781,7 +781,7 @@ exports[`EuiAccordion props initialIsOpen is rendered 1`] = `
781781
aria-controls="7"
782782
aria-expanded="true"
783783
aria-labelledby="generated-id"
784-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen css-gxj9fi-empty-text-EuiButtonIcon-euiAccordion__iconButton-isOpen"
784+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen css-gxj9fi-empty-text-EuiButtonIcon-euiAccordion__iconButton-isOpen"
785785
tabindex="-1"
786786
type="button"
787787
>
@@ -835,7 +835,7 @@ exports[`EuiAccordion props isLoading is rendered 1`] = `
835835
aria-controls="14"
836836
aria-expanded="false"
837837
aria-labelledby="generated-id"
838-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
838+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
839839
tabindex="-1"
840840
type="button"
841841
>
@@ -894,7 +894,7 @@ exports[`EuiAccordion props isLoadingMessage is rendered 1`] = `
894894
aria-controls="15"
895895
aria-expanded="false"
896896
aria-labelledby="generated-id"
897-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
897+
class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton css-ikukms-empty-text-EuiButtonIcon-euiAccordion__iconButton"
898898
tabindex="-1"
899899
type="button"
900900
>

src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exports[`CollapsedItemActions render 1`] = `
1313
>
1414
<button
1515
aria-label="All actions"
16-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall css-19g5rpb-empty-text-EuiButtonIcon"
16+
class="euiButtonIcon euiButtonIcon--xSmall css-19g5rpb-empty-text-EuiButtonIcon"
1717
data-test-subj="euiCollapsedItemActionsButton"
1818
type="button"
1919
>

src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
160160
<a
161161
aria-controls="__table_generated-id"
162162
aria-label="Previous page"
163-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiPaginationArrowButton css-19g5rpb-empty-text-EuiButtonIcon"
163+
class="euiButtonIcon euiButtonIcon--xSmall euiPaginationArrowButton css-19g5rpb-empty-text-EuiButtonIcon"
164164
data-test-subj="pagination-button-previous"
165165
href="#__table_generated-id"
166166
rel="noreferrer"
@@ -225,7 +225,7 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
225225
</ul>
226226
<button
227227
aria-label="Next page"
228-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiPaginationArrowButton css-1w4v2zr-empty-disabled-EuiButtonIcon"
228+
class="euiButtonIcon euiButtonIcon--xSmall euiPaginationArrowButton css-1w4v2zr-empty-disabled-EuiButtonIcon"
229229
data-test-subj="pagination-button-next"
230230
disabled=""
231231
type="button"

src/components/basic_table/action_types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
import { ReactElement, ReactNode } from 'react';
1010
import { EuiIconType } from '../icon/icon';
11-
import { EuiButtonIconColor } from '../button/button_icon/button_icon';
12-
import { EuiButtonEmptyColor } from '../button/button_empty';
11+
import { EuiButtonIconProps } from '../button/button_icon/button_icon';
12+
import { EuiButtonEmptyProps } from '../button/button_empty';
1313
import { ExclusiveUnion } from '../common';
1414

1515
type IconFunction<T> = (item: T) => EuiIconType;
16-
type ButtonColor = EuiButtonIconColor | EuiButtonEmptyColor;
16+
type ButtonColor = EuiButtonIconProps['color'] | EuiButtonEmptyProps['color'];
1717
type EuiButtonIconColorFunction<T> = (item: T) => ButtonColor;
1818

1919
export interface DefaultItemActionBase<T> {
@@ -49,7 +49,7 @@ export interface DefaultItemEmptyButtonAction<T>
4949
* The type of action
5050
*/
5151
type?: 'button';
52-
color?: EuiButtonEmptyColor | EuiButtonIconColorFunction<T>;
52+
color?: EuiButtonEmptyProps['color'] | EuiButtonIconColorFunction<T>;
5353
}
5454

5555
export interface DefaultItemIconButtonAction<T>
@@ -62,7 +62,7 @@ export interface DefaultItemIconButtonAction<T>
6262
/**
6363
* Defines the color of the button
6464
*/
65-
color?: EuiButtonIconColor | EuiButtonIconColorFunction<T>;
65+
color?: EuiButtonIconProps['color'] | EuiButtonIconColorFunction<T>;
6666
}
6767

6868
export type DefaultItemAction<T> = ExclusiveUnion<

src/components/basic_table/default_item_action.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { isString } from '../../services/predicate';
1111
import {
1212
EuiButtonEmpty,
1313
EuiButtonIcon,
14-
EuiButtonEmptyColor,
15-
EuiButtonIconColor,
14+
EuiButtonEmptyProps,
15+
EuiButtonIconProps,
1616
} from '../button';
1717
import { EuiToolTip } from '../tool_tip';
1818
import { DefaultItemAction as Action } from './action_types';
@@ -43,7 +43,7 @@ export const DefaultItemAction = <T extends {}>({
4343
const onClick = action.onClick ? () => action.onClick!(item) : undefined;
4444

4545
const buttonColor = action.color;
46-
let color: EuiButtonIconColor = 'primary';
46+
let color: EuiButtonIconProps['color'] = 'primary';
4747
if (buttonColor) {
4848
color = isString(buttonColor) ? buttonColor : buttonColor(item);
4949
}
@@ -88,7 +88,7 @@ export const DefaultItemAction = <T extends {}>({
8888
className={className}
8989
size="s"
9090
isDisabled={!enabled}
91-
color={color as EuiButtonEmptyColor}
91+
color={color as EuiButtonEmptyProps['color']}
9292
iconType={icon}
9393
onClick={onClick}
9494
href={action.href}

src/components/button/button_icon/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
export type {
10-
EuiButtonIconColor,
1110
EuiButtonIconProps,
1211
EuiButtonIconPropsForButton,
1312
EuiButtonIconPropsForAnchor,

src/components/button/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,10 @@
99
export type { EuiButtonColor, EuiButtonSize, EuiButtonProps } from './button';
1010
export { COLORS, EuiButton } from './button';
1111

12-
export type {
13-
EuiButtonEmptyColor,
14-
EuiButtonEmptyProps,
15-
EuiButtonEmptySizes,
16-
} from './button_empty';
12+
export type { EuiButtonEmptyProps, EuiButtonEmptySizes } from './button_empty';
1713
export { EuiButtonEmpty } from './button_empty';
1814

1915
export type {
20-
EuiButtonIconColor,
2116
EuiButtonIconProps,
2217
EuiButtonIconPropsForButton,
2318
} from './button_icon';

src/components/card/card_select.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
import React, { FunctionComponent, ReactNode } from 'react';
1010
import classNames from 'classnames';
1111

12-
import {
13-
EuiButtonEmpty,
14-
EuiButtonEmptyColor,
15-
EuiButtonEmptyProps,
16-
} from '../button/button_empty';
12+
import { EuiButtonEmpty, EuiButtonEmptyProps } from '../button/button_empty';
1713

1814
import { EuiI18n } from '../i18n';
1915

@@ -80,7 +76,7 @@ function euiCardSelectableText(
8076
}
8177

8278
export function euiCardSelectableColor(
83-
color: EuiButtonEmptyColor | undefined,
79+
color: EuiButtonEmptyProps['color'] | undefined,
8480
isSelected: boolean | undefined
8581
): string {
8682
let calculatedColor;

src/components/code/__snapshots__/code_block.test.tsx.snap

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ exports[`EuiCodeBlock fullscreen displays content in fullscreen mode 1`] = `
110110
<button
111111
aria-label="Collapse"
112112
css="unknown styles"
113+
disabled={false}
113114
onClick={[Function]}
114115
type="button"
115116
>
@@ -198,7 +199,8 @@ exports[`EuiCodeBlock fullscreen displays content in fullscreen mode 1`] = `
198199
/>
199200
<button
200201
aria-label="Collapse"
201-
className="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiCodeBlock__fullScreenButton css-19g5rpb-empty-text-EuiButtonIcon"
202+
className="euiButtonIcon euiButtonIcon--xSmall euiCodeBlock__fullScreenButton css-19g5rpb-empty-text-EuiButtonIcon"
203+
disabled={false}
202204
onClick={[Function]}
203205
type="button"
204206
>
@@ -538,6 +540,7 @@ console.log(some);"
538540
<button
539541
aria-label="Copy"
540542
css="unknown styles"
543+
disabled={false}
541544
onBlur={[Function]}
542545
onClick={[Function]}
543546
onFocus={[Function]}
@@ -619,7 +622,8 @@ console.log(some);"
619622
/>
620623
<button
621624
aria-label="Copy"
622-
className="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall css-19g5rpb-empty-text-EuiButtonIcon"
625+
className="euiButtonIcon euiButtonIcon--xSmall css-19g5rpb-empty-text-EuiButtonIcon"
626+
disabled={false}
623627
onBlur={[Function]}
624628
onClick={[Function]}
625629
onFocus={[Function]}
@@ -717,7 +721,7 @@ exports[`EuiCodeBlock props overflowHeight is rendered 1`] = `
717721
>
718722
<button
719723
aria-label="Expand"
720-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiCodeBlock__fullScreenButton css-19g5rpb-empty-text-EuiButtonIcon"
724+
class="euiButtonIcon euiButtonIcon--xSmall euiCodeBlock__fullScreenButton css-19g5rpb-empty-text-EuiButtonIcon"
721725
type="button"
722726
>
723727
<span
@@ -972,7 +976,7 @@ exports[`EuiCodeBlock virtualization renders a virtualized code block 1`] = `
972976
>
973977
<button
974978
aria-label="Expand"
975-
class="euiButtonIcon euiButtonIcon--empty euiButtonIcon--xSmall euiCodeBlock__fullScreenButton css-19g5rpb-empty-text-EuiButtonIcon"
979+
class="euiButtonIcon euiButtonIcon--xSmall euiCodeBlock__fullScreenButton css-19g5rpb-empty-text-EuiButtonIcon"
976980
type="button"
977981
>
978982
<span

0 commit comments

Comments
 (0)