import { KbqSkeletonModule } from '@koobiq/components/skeleton';Placeholder of an accordion whose items have not loaded yet: collapsed items with their icon and title.
@Component({ selector: 'kbq-skeleton-accordion' })
class KbqSkeletonAccordion {
readonly rows = input<number>(this.configuration.accordionRows);
}rowsnumber Number of collapsed items, accordionRows of KBQ_SKELETON_PRESETS_CONFIGURATION by default.
Placeholder of a badge whose data has not loaded yet.
@Component({ selector: 'kbq-skeleton-badge' })
class KbqSkeletonBadge {}Placeholder of a button whose data has not loaded yet.
@Component({ selector: 'kbq-skeleton-button' })
class KbqSkeletonButton {}Placeholder of checkboxes, radio buttons or toggles whose data has not loaded yet: the control, and the label with its hint on demand.
@Component({ selector: 'kbq-skeleton-checkable' })
class KbqSkeletonCheckable {
readonly control = input<KbqSkeletonCheckableControl>('checkbox');
readonly rows = input<number>(this.configuration.checkableRows);
readonly label = input<boolean>(true);
readonly hint = input<boolean>(false);
}controlKbqSkeletonCheckableControl Control the placeholder stands in for.
rowsnumber Number of controls, checkableRows of KBQ_SKELETON_PRESETS_CONFIGURATION by default.
labelboolean Whether a control has a label.
hintboolean Whether the label has a hint below it.
Placeholder of a description list whose data has not loaded yet.
@Component({ selector: 'kbq-skeleton-dl' })
class KbqSkeletonDl {
readonly rows = input<number>(this.configuration.dlRows);
}rowsnumber Number of terms with their descriptions, dlRows of KBQ_SKELETON_PRESETS_CONFIGURATION by default.
Placeholder of a form field whose value has not loaded yet: its label, control and hint.
@Component({ selector: 'kbq-skeleton-form-field' })
class KbqSkeletonFormField {
readonly horizontal = input<boolean>(false);
readonly control = input<KbqSkeletonFormFieldControl>('input');
readonly label = input<boolean>(true);
readonly hint = input<boolean>(false);
readonly labelClass = input<string | string[] | Set<string>>();
readonly contentClass = input<string | string[] | Set<string>>();
}horizontalboolean Whether the label is to the left of the control, as in a horizontal kbq-form-field.
controlKbqSkeletonFormFieldControl Control of the form field.
labelboolean Whether the form field has a label, as a kbq-form-field with kbq-label.
hintboolean Whether the form field has a hint below the control.
labelClassstring | string[] | Set<string> Classes of the label, such as the labelClass of the kbq-form-field the placeholder stands in for.
contentClassstring | string[] | Set<string> Classes of the control and the hint, such as the contentClass of the kbq-form-field.
Row of placeholders of one kind, such as the tags of a tag list.
@Component({ selector: 'kbq-skeleton-group' })
class KbqSkeletonGroup {
readonly preset = input.required<KbqSkeletonGroupPreset>();
readonly count = input<number>(this.configuration.groupCount);
}presetKbqSkeletonGroupPreset Placeholder of every item of the row.
countnumber Number of placeholders, groupCount of KBQ_SKELETON_PRESETS_CONFIGURATION by default.
Placeholder of an icon or an icon button whose data has not loaded yet.
@Component({ selector: 'kbq-skeleton-icon' })
class KbqSkeletonIcon {}Placeholder of a link whose data has not loaded yet.
@Component({ selector: 'kbq-skeleton-link' })
class KbqSkeletonLink {}Placeholder of a table whose data has not loaded yet.
@Component({ selector: 'kbq-skeleton-table' })
class KbqSkeletonTable {
readonly rows = input<number>(this.configuration.tableRows);
readonly columns = input<readonly string[]>(
equalColumns(this.configuration.tableColumns)
);
readonly header = input<boolean>(true);
readonly selectable = input<boolean>(false);
readonly pinnedColumns = input<number>(0);
}rowsnumber Number of rows below the header, tableRows of KBQ_SKELETON_PRESETS_CONFIGURATION by default.
columnsreadonly string[] Number of columns of equal width, tableColumns of KBQ_SKELETON_PRESETS_CONFIGURATION by default, or the
width of every column as a CSS grid track, such as 160px, 1fr or auto, for a table whose columns are known.
headerboolean Whether the table has a header row.
selectableboolean Whether every row starts with a checkbox, as in a grid whose rows can be selected.
pinnedColumnsnumber Number of columns pinned to the start and set apart from the rest by a line, as in a grid.
Placeholder of tabs whose data has not loaded yet: the first tab stands out as the selected one. The content below or beside them is text, or the placeholders projected into the component.
@Component({ selector: 'kbq-skeleton-tabs' })
class KbqSkeletonTabs {
readonly vertical = input<boolean>(false);
readonly count = input<number>(this.configuration.tabsCount);
readonly contentLines = input<number>(
this.configuration.tabsContentLines
);
}verticalboolean Whether the tabs are stacked beside the content, as in a vertical kbq-tab-group.
countnumber Number of tabs, tabsCount of KBQ_SKELETON_PRESETS_CONFIGURATION by default.
contentLinesnumber Number of lines of the text that stands for the content when nothing is projected, tabsContentLines of
KBQ_SKELETON_PRESETS_CONFIGURATION by default.
Placeholder of a tag whose data has not loaded yet.
@Component({ selector: 'kbq-skeleton-tag' })
class KbqSkeletonTag {}Placeholder of a tree whose nodes have not loaded yet, with the second node expanded.
@Component({ selector: 'kbq-skeleton-tree' })
class KbqSkeletonTree {
readonly rows = input<number>(this.configuration.treeRows);
readonly children = input<number>(this.configuration.treeChildren);
}rowsnumber Number of top-level nodes, treeRows of KBQ_SKELETON_PRESETS_CONFIGURATION by default.
childrennumber Number of children of the expanded second node, treeChildren of KBQ_SKELETON_PRESETS_CONFIGURATION by
default.
Placeholder of text that has not loaded yet: lines as tall as the lines of its typography level, a line of body text by default. A single line, such as a heading, is shorter than the lines of a paragraph, which differ in length.
@Component({ selector: 'kbq-skeleton-typography' })
class KbqSkeletonTypography {
readonly level = input<string>('text-normal');
readonly lines = input<number>(this.configuration.typographyLines);
}levelstring Typography level of the text, the name of its class without kbq-, such as title or caps-compact.
linesnumber Number of lines, typographyLines of KBQ_SKELETON_PRESETS_CONFIGURATION by default.
Directive representing a skeleton placeholder.
Paints the host, children included, as one flat shape of the host's own outline with a wave running across it, and makes the host inert: it leaves the tab order and the accessibility tree until the skeleton is disabled.
@Directive({ selector: 'kbq-skeleton, [kbqSkeleton]', exportAs: 'kbqSkeleton' })
class KbqSkeleton {
readonly enabled = input<boolean>(true, { alias: 'kbqSkeleton' });
}kbqSkeletonboolean Whether the skeleton is enabled.
Control a checkable placeholder stands in for.
type KbqSkeletonCheckableControl = 'checkbox' | 'radio' | 'toggle';Control a form field placeholder stands in for.
type KbqSkeletonFormFieldControl = 'input' | 'textarea';Placeholder a group repeats in a row.
type KbqSkeletonGroupPreset = 'button' | 'badge' | 'tag' | 'icon' | 'link';Numbers of items the skeleton presets show until the amount of data is known.
interface KbqSkeletonPresetsConfiguration {
typographyLines: number;
dlRows: number;
tableRows: number;
tableColumns: number;
groupCount: number;
accordionRows: number;
checkableRows: number;
tabsCount: number;
tabsContentLines: number;
treeRows: number;
treeChildren: number;
}typographyLinesnumber Number of lines of kbq-skeleton-typography.
dlRowsnumber Number of rows of kbq-skeleton-dl.
tableRowsnumber Number of rows of kbq-skeleton-table.
tableColumnsnumber Number of columns of kbq-skeleton-table.
groupCountnumber Number of placeholders of kbq-skeleton-group.
accordionRowsnumber Number of collapsed items of kbq-skeleton-accordion.
checkableRowsnumber Number of controls of kbq-skeleton-checkable.
tabsCountnumber Number of tabs of kbq-skeleton-tabs.
tabsContentLinesnumber Number of lines of the text in the content of kbq-skeleton-tabs.
treeRowsnumber Number of top-level nodes of kbq-skeleton-tree.
treeChildrennumber Number of children of the expanded node of kbq-skeleton-tree.
Numbers of items of the skeleton presets.
const KBQ_SKELETON_PRESETS_CONFIGURATION: InjectionToken<KbqSkeletonPresetsConfiguration>;Utility provider for KBQ_SKELETON_PRESETS_CONFIGURATION, for an application or a part of it. The keys it leaves
out keep the values of the closest provider above.
const kbqSkeletonPresetsConfigurationProvider: (
configuration: Partial<KbqSkeletonPresetsConfiguration>
) => Provider;