mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 19:01:05 +00:00
feat(structured-list)!: integration StructuredList
with v11 (#1965)
This commit is contained in:
parent
adab556fa2
commit
52adc778ca
19 changed files with 245 additions and 410 deletions
|
@ -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<any>;
|
||||
},
|
||||
{ change: CustomEvent<any> },
|
||||
{ default: {} }
|
||||
> {}
|
||||
|
|
|
@ -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<string, any>,
|
||||
{ default: {} }
|
||||
> {}
|
||||
|
|
|
@ -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<string, any>,
|
||||
{ default: {} }
|
||||
> {}
|
||||
|
|
|
@ -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<string, any>,
|
||||
{ default: {} }
|
||||
> {}
|
||||
|
|
|
@ -40,11 +40,23 @@ export interface StructuredListInputProps extends RestProps {
|
|||
*/
|
||||
ref?: null | HTMLInputElement;
|
||||
|
||||
/**
|
||||
* Specify the icon to render
|
||||
* @default undefined
|
||||
*/
|
||||
icon?: typeof import("svelte").SvelteComponent<any>;
|
||||
|
||||
/**
|
||||
* 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<string, any>,
|
||||
{ change: WindowEventMap["change"] },
|
||||
{}
|
||||
> {}
|
||||
|
|
|
@ -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<string, any>,
|
||||
{ default: {} }
|
||||
> {}
|
||||
|
|
|
@ -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<string, any>,
|
||||
{}
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue