mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
* feat(code-snippet): add copy functionality - docs: add custom feedback copy text example * feat(tile): support disabled state for SelectableTile, RadioTile Closes #539 * build(rollup): add clipboard-copy to globals * feat(copy-button): add copy functionality * feat(content-switcher): deprecate the light prop - docs: remove the light variant example * fix(toolbar-search): remove outer div * feat(search): add searchClass prop * fix(composed-modal): set hasScrollingContent class on ModalBody * docs(data-table): add expandable size examples * feat(tooltip): add TooltipFooter component * fix(time-picker): correctly display invalidText * feat(breadcrumb): support overflow menu * feat(multi-select): export inputRef prop * chore(deps-dev): upgrade carbon-components to v10.32.0 * feat(form): add noMargin prop to FormGroup * docs(tooltip): document TooltipFooter * feat(context-menu): support danger kind for ContextMenuOption * feat(data-table): support rendering empty table header in skeleton * refactor(types): use shorter import path in DataTableSkeleton * feat(data-table): allow sorting to be disabled for a specific header * docs(data-table): update example to desort the Protocol header As an example, it makes more sense because all the values ("http") are the same. * fix(context-menu): set initial y offset of context menu based on window height #577 * fix(context-menu): render submenu based on viewport constraints #577
61 lines
1.3 KiB
TypeScript
61 lines
1.3 KiB
TypeScript
/// <reference types="svelte" />
|
|
import { SvelteComponentTyped } from "svelte";
|
|
import { DataTableHeader } from "./DataTable";
|
|
|
|
export interface DataTableSkeletonProps
|
|
extends DataTableHeader,
|
|
svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
|
/**
|
|
* Specify the number of columns
|
|
* Superseded by `headers` if `headers` is a non-empty array
|
|
* @default 5
|
|
*/
|
|
columns?: number;
|
|
|
|
/**
|
|
* Specify the number of rows
|
|
* @default 5
|
|
*/
|
|
rows?: number;
|
|
|
|
/**
|
|
* Set the size of the data table
|
|
*/
|
|
size?: "compact" | "short" | "tall";
|
|
|
|
/**
|
|
* Set to `true` to apply zebra styles to the datatable rows
|
|
* @default false
|
|
*/
|
|
zebra?: boolean;
|
|
|
|
/**
|
|
* Set to `false` to hide the header
|
|
* @default true
|
|
*/
|
|
showHeader?: boolean;
|
|
|
|
/**
|
|
* Set the column headers
|
|
* Supersedes `columns` if value is a non-empty array
|
|
* @default []
|
|
*/
|
|
headers?: string[] | Partial<DataTableHeader>[];
|
|
|
|
/**
|
|
* Set to `false` to hide the toolbar
|
|
* @default true
|
|
*/
|
|
showToolbar?: boolean;
|
|
}
|
|
|
|
export default class DataTableSkeleton extends SvelteComponentTyped<
|
|
DataTableSkeletonProps,
|
|
{
|
|
click: WindowEventMap["click"];
|
|
mouseover: WindowEventMap["mouseover"];
|
|
mouseenter: WindowEventMap["mouseenter"];
|
|
mouseleave: WindowEventMap["mouseleave"];
|
|
},
|
|
{}
|
|
> {}
|