- {#each Array.from({ length: rows }, (_, i) => i) as row, i (row)}
+ {#each Array.from({ length: count }) as row}
diff --git a/tests/StructuredList.test.svelte b/tests/StructuredList.test.svelte
index e5cbdbc8..83d233ce 100644
--- a/tests/StructuredList.test.svelte
+++ b/tests/StructuredList.test.svelte
@@ -13,82 +13,33 @@
-
- Column A
- Column B
- Column C
+
+ Column A
+ Column B
+ Column C
Row 1
Row 1
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dui magna,
- finibus id tortor sed, aliquet bibendum augue. Aenean posuere sem vel
- euismod dignissim. Nulla ut cursus dolor. Pellentesque vulputate nisl a
- porttitor interdum.
-
+ Row 1.
-
- Row 2
- Row 2
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dui magna,
- finibus id tortor sed, aliquet bibendum augue. Aenean posuere sem vel
- euismod dignissim. Nulla ut cursus dolor. Pellentesque vulputate nisl a
- porttitor interdum.
-
-
-
- Row 3
- Row 3
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dui magna,
- finibus id tortor sed, aliquet bibendum augue. Aenean posuere sem vel
- euismod dignissim. Nulla ut cursus dolor. Pellentesque vulputate nisl a
- porttitor interdum.
-
-
-
-
-
-
-
-
- ColumnA
- ColumnB
- ColumnC
- {""}
-
-
-
{#each [1, 2, 3] as item}
-
+
+ Row {item}
Row {item}
Row {item}
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dui
- magna, finibus id tortor sed, aliquet bibendum augue. Aenean posuere
- sem vel euismod dignissim. Nulla ut cursus dolor. Pellentesque
- vulputate nisl a porttitor interdum.
-
-
-
-
{/each}
-
+
diff --git a/types/StructuredList/StructuredList.svelte.d.ts b/types/StructuredList/StructuredList.svelte.d.ts
index b8172b44..597a4d70 100644
--- a/types/StructuredList/StructuredList.svelte.d.ts
+++ b/types/StructuredList/StructuredList.svelte.d.ts
@@ -33,12 +33,6 @@ export interface StructuredListProps extends RestProps {
export default class StructuredList extends SvelteComponentTyped<
StructuredListProps,
- {
- click: WindowEventMap["click"];
- mouseover: WindowEventMap["mouseover"];
- mouseenter: WindowEventMap["mouseenter"];
- mouseleave: WindowEventMap["mouseleave"];
- change: CustomEvent
;
- },
+ { change: CustomEvent },
{ default: {} }
> {}
diff --git a/types/StructuredList/StructuredListBody.svelte.d.ts b/types/StructuredList/StructuredListBody.svelte.d.ts
index b865022a..dcc17dcb 100644
--- a/types/StructuredList/StructuredListBody.svelte.d.ts
+++ b/types/StructuredList/StructuredListBody.svelte.d.ts
@@ -9,11 +9,6 @@ export interface StructuredListBodyProps extends RestProps {
export default class StructuredListBody extends SvelteComponentTyped<
StructuredListBodyProps,
- {
- click: WindowEventMap["click"];
- mouseover: WindowEventMap["mouseover"];
- mouseenter: WindowEventMap["mouseenter"];
- mouseleave: WindowEventMap["mouseleave"];
- },
+ Record,
{ default: {} }
> {}
diff --git a/types/StructuredList/StructuredListCell.svelte.d.ts b/types/StructuredList/StructuredListCell.svelte.d.ts
index 101ee103..40f3d5d5 100644
--- a/types/StructuredList/StructuredListCell.svelte.d.ts
+++ b/types/StructuredList/StructuredListCell.svelte.d.ts
@@ -4,12 +4,6 @@ import type { SvelteHTMLElements } from "svelte/elements";
type RestProps = SvelteHTMLElements["div"];
export interface StructuredListCellProps extends RestProps {
- /**
- * Set to `true` to use as a header
- * @default false
- */
- head?: boolean;
-
/**
* Set to `true` to prevent wrapping
* @default false
@@ -21,11 +15,6 @@ export interface StructuredListCellProps extends RestProps {
export default class StructuredListCell extends SvelteComponentTyped<
StructuredListCellProps,
- {
- click: WindowEventMap["click"];
- mouseover: WindowEventMap["mouseover"];
- mouseenter: WindowEventMap["mouseenter"];
- mouseleave: WindowEventMap["mouseleave"];
- },
+ Record,
{ default: {} }
> {}
diff --git a/types/StructuredList/StructuredListHead.svelte.d.ts b/types/StructuredList/StructuredListHead.svelte.d.ts
index 3b0a2890..55323f4e 100644
--- a/types/StructuredList/StructuredListHead.svelte.d.ts
+++ b/types/StructuredList/StructuredListHead.svelte.d.ts
@@ -9,11 +9,6 @@ export interface StructuredListHeadProps extends RestProps {
export default class StructuredListHead extends SvelteComponentTyped<
StructuredListHeadProps,
- {
- click: WindowEventMap["click"];
- mouseover: WindowEventMap["mouseover"];
- mouseenter: WindowEventMap["mouseenter"];
- mouseleave: WindowEventMap["mouseleave"];
- },
+ Record,
{ default: {} }
> {}
diff --git a/types/StructuredList/StructuredListInput.svelte.d.ts b/types/StructuredList/StructuredListInput.svelte.d.ts
index 95282fbb..a7237366 100644
--- a/types/StructuredList/StructuredListInput.svelte.d.ts
+++ b/types/StructuredList/StructuredListInput.svelte.d.ts
@@ -40,11 +40,23 @@ export interface StructuredListInputProps extends RestProps {
*/
ref?: null | HTMLInputElement;
+ /**
+ * Specify the icon to render
+ * @default undefined
+ */
+ icon?: typeof import("svelte").SvelteComponent;
+
+ /**
+ * Specify the ARIA label for the accordion item chevron icon.
+ * @default "Select an option"
+ */
+ iconDescription?: string;
+
[key: `data-${string}`]: any;
}
export default class StructuredListInput extends SvelteComponentTyped<
StructuredListInputProps,
- Record,
+ { change: WindowEventMap["change"] },
{}
> {}
diff --git a/types/StructuredList/StructuredListRow.svelte.d.ts b/types/StructuredList/StructuredListRow.svelte.d.ts
index a7a7c8f8..484bc8b2 100644
--- a/types/StructuredList/StructuredListRow.svelte.d.ts
+++ b/types/StructuredList/StructuredListRow.svelte.d.ts
@@ -1,38 +1,26 @@
import type { SvelteComponentTyped } from "svelte";
import type { SvelteHTMLElements } from "svelte/elements";
-type RestProps = SvelteHTMLElements["label"];
+type RestProps = SvelteHTMLElements["svelte:element"];
export interface StructuredListRowProps extends RestProps {
/**
- * Set to `true` to use as a header
- * @default false
+ * Specify the tag name
+ * @default "div"
*/
- head?: boolean;
+ tag?: keyof HTMLElementTagNameMap;
/**
- * Set to `true` to render a label slot
+ * Set to `true` to use the selected state
* @default false
*/
- label?: boolean;
-
- /**
- * Specify the tabindex
- * @default "0"
- */
- tabindex?: string;
+ selected?: boolean;
[key: `data-${string}`]: any;
}
export default class StructuredListRow extends SvelteComponentTyped<
StructuredListRowProps,
- {
- click: WindowEventMap["click"];
- mouseover: WindowEventMap["mouseover"];
- mouseenter: WindowEventMap["mouseenter"];
- mouseleave: WindowEventMap["mouseleave"];
- keydown: WindowEventMap["keydown"];
- },
+ Record,
{ default: {} }
> {}
diff --git a/types/StructuredList/StructuredListSkeleton.svelte.d.ts b/types/StructuredList/StructuredListSkeleton.svelte.d.ts
index 555a201f..fa6d00aa 100644
--- a/types/StructuredList/StructuredListSkeleton.svelte.d.ts
+++ b/types/StructuredList/StructuredListSkeleton.svelte.d.ts
@@ -1,25 +1,15 @@
import type { SvelteComponentTyped } from "svelte";
-import type { SvelteHTMLElements } from "svelte/elements";
-type RestProps = SvelteHTMLElements["div"];
-
-export interface StructuredListSkeletonProps extends RestProps {
+export interface StructuredListSkeletonProps {
/**
* Specify the number of rows
* @default 5
*/
- rows?: number;
-
- [key: `data-${string}`]: any;
+ count?: number;
}
export default class StructuredListSkeleton extends SvelteComponentTyped<
StructuredListSkeletonProps,
- {
- click: WindowEventMap["click"];
- mouseover: WindowEventMap["mouseover"];
- mouseenter: WindowEventMap["mouseenter"];
- mouseleave: WindowEventMap["mouseleave"];
- },
+ Record,
{}
> {}