Skip to content

Commit

Permalink
test: update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Oct 25, 2024
1 parent 8420962 commit d01f219
Show file tree
Hide file tree
Showing 154 changed files with 517 additions and 522 deletions.
16 changes: 8 additions & 8 deletions tests/__snapshots__/fixtures.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1254,9 +1254,9 @@ import type { SvelteHTMLElements } from "svelte/elements";
type RestProps = SvelteHTMLElements["svg"];
export interface SvgPropsProps extends RestProps {
export type SvgPropsProps = RestProps & {
[key: \`data-${string}\`]: any;
}
};
export default class SvgProps extends SvelteComponentTyped<SvgPropsProps, Record<string, any>, {}> {}
"
Expand Down Expand Up @@ -1706,14 +1706,14 @@ import type { SvelteHTMLElements } from "svelte/elements";
type RestProps = SvelteHTMLElements["ul"] & SvelteHTMLElements["ol"];
export interface RestPropsMultipleProps extends RestProps {
export type RestPropsMultipleProps = RestProps & {
/**
* @default "ordered"
*/
type?: "ordered" | "unordered";
[key: \`data-${string}\`]: any;
}
};
export default class RestPropsMultiple extends SvelteComponentTyped<RestPropsMultipleProps, Record<string, any>, {}> {}
"
Expand Down Expand Up @@ -1794,9 +1794,9 @@ import type { SvelteHTMLElements } from "svelte/elements";
type RestProps = SvelteHTMLElements["h1"];
export interface RestPropsSimpleProps extends RestProps {
export type RestPropsSimpleProps = RestProps & {
[key: \`data-${string}\`]: any;
}
};
export default class RestPropsSimple extends SvelteComponentTyped<RestPropsSimpleProps, Record<string, any>, {}> {}
"
Expand All @@ -1808,9 +1808,9 @@ import type { SvelteHTMLElements } from "svelte/elements";
type RestProps = SvelteHTMLElements["a"];
export interface AnchorPropsProps extends RestProps {
export type AnchorPropsProps = RestProps & {
[key: \`data-${string}\`]: any;
}
};
export default class AnchorProps extends SvelteComponentTyped<AnchorPropsProps, Record<string, any>, { default: {} }> {}
"
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/carbon/types/Accordion/AccordionItem.svelte.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements";

type RestProps = SvelteHTMLElements["li"];

export interface AccordionItemProps extends RestProps {
export type AccordionItemProps = RestProps & {
/**
* Specify the title of the accordion item heading
* Alternatively, use the "title" slot (e.g., <div slot="title">...</div>)
Expand All @@ -30,7 +30,7 @@ export interface AccordionItemProps extends RestProps {
iconDescription?: string;

[key: `data-${string}`]: any;
}
};

/** `AccordionItem` is slottable */
export default class AccordionItem extends SvelteComponentTyped<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements";

type RestProps = SvelteHTMLElements["ul"];

export interface AccordionSkeletonProps extends RestProps {
export type AccordionSkeletonProps = RestProps & {
/**
* Specify the number of accordion items to render
* @default 4
Expand All @@ -29,7 +29,7 @@ export interface AccordionSkeletonProps extends RestProps {
open?: boolean;

[key: `data-${string}`]: any;
}
};

export default class AccordionSkeleton extends SvelteComponentTyped<
AccordionSkeletonProps,
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/carbon/types/AspectRatio/AspectRatio.svelte.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import type { SvelteHTMLElements } from "svelte/elements";

type RestProps = SvelteHTMLElements["div"];

export interface AspectRatioProps extends RestProps {
export type AspectRatioProps = RestProps & {
/**
* Specify the aspect ratio
* @default "2x1"
*/
ratio?: "2x1" | "16x9" | "4x3" | "1x1" | "3x4" | "9x16" | "1x2";

[key: `data-${string}`]: any;
}
};

export default class AspectRatio extends SvelteComponentTyped<
AspectRatioProps,
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/carbon/types/Breadcrumb/BreadcrumbItem.svelte.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements";

type RestProps = SvelteHTMLElements["li"];

export interface BreadcrumbItemProps extends RestProps {
export type BreadcrumbItemProps = RestProps & {
/**
* Set the `href` to use an anchor link
* @default undefined
Expand All @@ -17,7 +17,7 @@ export interface BreadcrumbItemProps extends RestProps {
isCurrentPage?: boolean;

[key: `data-${string}`]: any;
}
};

export default class BreadcrumbItem extends SvelteComponentTyped<
BreadcrumbItemProps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { SvelteHTMLElements } from "svelte/elements";

type RestProps = SvelteHTMLElements["div"];

export interface BreadcrumbSkeletonProps extends RestProps {
export type BreadcrumbSkeletonProps = RestProps & {
/**
* Set to `true` to hide the breadcrumb trailing slash
* @default false
Expand All @@ -17,7 +17,7 @@ export interface BreadcrumbSkeletonProps extends RestProps {
count?: number;

[key: `data-${string}`]: any;
}
};

export default class BreadcrumbSkeleton extends SvelteComponentTyped<
BreadcrumbSkeletonProps,
Expand Down
243 changes: 114 additions & 129 deletions tests/e2e/carbon/types/Button/Button.svelte.d.ts
Original file line number Diff line number Diff line change
@@ -1,129 +1,114 @@
import type { SvelteComponentTyped } from "svelte";
import type { SvelteHTMLElements } from "svelte/elements";

import type { ButtonSkeletonProps } from "./ButtonSkeleton.svelte";

type RestProps = SvelteHTMLElements["button"] &
SvelteHTMLElements["a"] &
SvelteHTMLElements["div"];

export interface ButtonProps extends ButtonSkeletonProps, RestProps {
/**
* Specify the kind of button
* @default "primary"
*/
kind?:
| "primary"
| "secondary"
| "tertiary"
| "ghost"
| "danger"
| "danger-tertiary"
| "danger-ghost";

/**
* Specify the size of button
* @default "default"
*/
size?: "default" | "field" | "small";

/**
* Set to `true` for the icon-only variant
* @deprecated inferred using the $$slots API
* @default false
*/
hasIconOnly?: boolean;

/**
* Specify the icon from `carbon-icons-svelte` to render
* @default undefined
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;

/**
* Specify the ARIA label for the button icon
* @default undefined
*/
iconDescription?: string;

/**
* Set the alignment of the tooltip relative to the icon
* `hasIconOnly` must be set to `true`
* @default "center"
*/
tooltipAlignment?: "start" | "center" | "end";

/**
* Set the position of the tooltip relative to the icon
* @default "bottom"
*/
tooltipPosition?: "top" | "right" | "bottom" | "left";

/**
* Set to `true` to render a custom HTML element
* Props are destructured as `props` in the default slot (e.g., <Button let:props><div {...props}>...</div></Button>)
* @default false
*/
as?: boolean;

/**
* Set to `true` to display the skeleton state
* @default false
*/
skeleton?: boolean;

/**
* Set to `true` to disable the button
* @default false
*/
disabled?: boolean;

/**
* Set the `href` to use an anchor link
* @default undefined
*/
href?: string;

/**
* Specify the tabindex
* @default "0"
*/
tabindex?: string;

/**
* Specify the `type` attribute for the button element
* @default "button"
*/
type?: string;

/**
* Obtain a reference to the HTML element
* @default null
*/
ref?: null | HTMLAnchorElement | HTMLButtonElement;

[key: `data-${string}`]: any;
}

export default class Button extends SvelteComponentTyped<
ButtonProps,
{
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
},
{
default: {
props: {
role: "button";
type?: string;
tabindex: any;
disabled: boolean;
href?: string;
class: string;
[key: string]: any;
};
};
}
> {}

import type { SvelteComponentTyped } from "svelte";import type { SvelteHTMLElements } from "svelte/elements";

import type { ButtonSkeletonProps } from "./ButtonSkeleton.svelte";



type RestProps = SvelteHTMLElements["button"]&SvelteHTMLElements["a"]&SvelteHTMLElements["div"];

export type ButtonProps = ButtonSkeletonProps, RestProps & {

/**
* Specify the kind of button
* @default "primary"
*/
kind?: "primary" | "secondary" | "tertiary" | "ghost" | "danger" | "danger-tertiary" | "danger-ghost";

/**
* Specify the size of button
* @default "default"
*/
size?: "default" | "field" | "small";

/**
* Set to `true` for the icon-only variant
* @deprecated inferred using the $$slots API
* @default false
*/
hasIconOnly?: boolean;

/**
* Specify the icon from `carbon-icons-svelte` to render
* @default undefined
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;

/**
* Specify the ARIA label for the button icon
* @default undefined
*/
iconDescription?: string;

/**
* Set the alignment of the tooltip relative to the icon
* `hasIconOnly` must be set to `true`
* @default "center"
*/
tooltipAlignment?: "start" | "center" | "end";

/**
* Set the position of the tooltip relative to the icon
* @default "bottom"
*/
tooltipPosition?: "top" | "right" | "bottom" | "left";

/**
* Set to `true` to render a custom HTML element
* Props are destructured as `props` in the default slot (e.g., <Button let:props><div {...props}>...</div></Button>)
* @default false
*/
as?: boolean;

/**
* Set to `true` to display the skeleton state
* @default false
*/
skeleton?: boolean;

/**
* Set to `true` to disable the button
* @default false
*/
disabled?: boolean;

/**
* Set the `href` to use an anchor link
* @default undefined
*/
href?: string;

/**
* Specify the tabindex
* @default "0"
*/
tabindex?: string;

/**
* Specify the `type` attribute for the button element
* @default "button"
*/
type?: string;

/**
* Obtain a reference to the HTML element
* @default null
*/
ref?: null | HTMLAnchorElement | HTMLButtonElement;

[key: `data-${string}`]: any;
}


export default class Button extends SvelteComponentTyped<
ButtonProps,
{click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
},
{default: { props: { role: "button"; type?: string; tabindex: any; disabled: boolean; href?: string; class: string; [key: string]: any; } }
;}
> {

}
Loading

0 comments on commit d01f219

Please sign in to comment.