mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
refactor(types): shorten ref, id JSDocs, use CarbonIcon type, export component props
This commit is contained in:
parent
d38e6d8be6
commit
75d4b4cf03
219 changed files with 5168 additions and 5259 deletions
115
types/Grid/Column.d.ts
vendored
115
types/Grid/Column.d.ts
vendored
|
@ -9,64 +9,65 @@ interface ColumnSizeDescriptor {
|
|||
|
||||
type ColumnBreakpoint = ColumnSize | ColumnSizeDescriptor;
|
||||
|
||||
export interface ColumnProps {
|
||||
/**
|
||||
* Set to `true` to render a custom HTML element
|
||||
* Props are destructured as `props` in the default slot (e.g. <Column let:props><article {...props}>...</article></Column>)
|
||||
* @default false
|
||||
*/
|
||||
as?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutter?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the left gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutterLeft?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the right gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutterRight?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the aspect ratio of the column
|
||||
*/
|
||||
aspectRatio?: "2x1" | "16x9" | "9x16" | "1x2" | "4x3" | "3x4" | "1x1";
|
||||
|
||||
/**
|
||||
* Set the small breakpoint
|
||||
*/
|
||||
sm?: ColumnBreakpoint;
|
||||
|
||||
/**
|
||||
* Set the medium breakpoint
|
||||
*/
|
||||
md?: ColumnBreakpoint;
|
||||
|
||||
/**
|
||||
* Set the large breakpoint
|
||||
*/
|
||||
lg?: ColumnBreakpoint;
|
||||
|
||||
/**
|
||||
* Set the extra large breakpoint
|
||||
*/
|
||||
xlg?: ColumnBreakpoint;
|
||||
|
||||
/**
|
||||
* Set the maximum breakpoint
|
||||
*/
|
||||
max?: ColumnBreakpoint;
|
||||
}
|
||||
|
||||
export default class Column {
|
||||
$$prop_def: {
|
||||
/**
|
||||
* Set to `true` to render a custom HTML element
|
||||
* Props are destructured as `props` in the default slot (e.g. <Column let:props><article {...props}>...</article></Column>)
|
||||
* @default false
|
||||
*/
|
||||
as?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutter?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the left gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutterLeft?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the right gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutterRight?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the aspect ratio of the column
|
||||
*/
|
||||
aspectRatio?: "2x1" | "16x9" | "9x16" | "1x2" | "4x3" | "3x4" | "1x1";
|
||||
|
||||
/**
|
||||
* Set the small breakpoint
|
||||
*/
|
||||
sm?: ColumnBreakpoint;
|
||||
|
||||
/**
|
||||
* Set the medium breakpoint
|
||||
*/
|
||||
md?: ColumnBreakpoint;
|
||||
|
||||
/**
|
||||
* Set the large breakpoint
|
||||
*/
|
||||
lg?: ColumnBreakpoint;
|
||||
|
||||
/**
|
||||
* Set the extra large breakpoint
|
||||
*/
|
||||
xlg?: ColumnBreakpoint;
|
||||
|
||||
/**
|
||||
* Set the maximum breakpoint
|
||||
*/
|
||||
max?: ColumnBreakpoint;
|
||||
};
|
||||
|
||||
$$prop_def: ColumnProps;
|
||||
$$slot_def: {
|
||||
default: { props?: { class: string } };
|
||||
};
|
||||
|
|
91
types/Grid/Grid.d.ts
vendored
91
types/Grid/Grid.d.ts
vendored
|
@ -1,51 +1,52 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export interface GridProps {
|
||||
/**
|
||||
* Set to `true` to render a custom HTML element
|
||||
* Props are destructured as `props` in the default slot (e.g. <Grid let:props><header {...props}>...</header></Grid>)
|
||||
* @default false
|
||||
*/
|
||||
as?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the condensed variant
|
||||
* @default false
|
||||
*/
|
||||
condensed?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the narrow variant
|
||||
* @default false
|
||||
*/
|
||||
narrow?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the fullWidth variant
|
||||
* @default false
|
||||
*/
|
||||
fullWidth?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutter?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the left gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutterLeft?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the right gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutterRight?: boolean;
|
||||
}
|
||||
|
||||
export default class Grid {
|
||||
$$prop_def: {
|
||||
/**
|
||||
* Set to `true` to render a custom HTML element
|
||||
* Props are destructured as `props` in the default slot (e.g. <Grid let:props><header {...props}>...</header></Grid>)
|
||||
* @default false
|
||||
*/
|
||||
as?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the condensed variant
|
||||
* @default false
|
||||
*/
|
||||
condensed?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the narrow variant
|
||||
* @default false
|
||||
*/
|
||||
narrow?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the fullWidth variant
|
||||
* @default false
|
||||
*/
|
||||
fullWidth?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutter?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the left gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutterLeft?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the right gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutterRight?: boolean;
|
||||
};
|
||||
|
||||
$$prop_def: GridProps;
|
||||
$$slot_def: {
|
||||
default: { props?: { class: string } };
|
||||
};
|
||||
|
|
79
types/Grid/Row.d.ts
vendored
79
types/Grid/Row.d.ts
vendored
|
@ -1,45 +1,46 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export interface RowProps {
|
||||
/**
|
||||
* Set to `true` to render a custom HTML element
|
||||
* Props are destructured as `props` in the default slot (e.g. <Row let:props><section {...props}>...</section></Row>)
|
||||
* @default false
|
||||
*/
|
||||
as?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the condensed variant
|
||||
* @default false
|
||||
*/
|
||||
condensed?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the narrow variant
|
||||
* @default false
|
||||
*/
|
||||
narrow?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutter?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the left gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutterLeft?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the right gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutterRight?: boolean;
|
||||
}
|
||||
|
||||
export default class Row {
|
||||
$$prop_def: {
|
||||
/**
|
||||
* Set to `true` to render a custom HTML element
|
||||
* Props are destructured as `props` in the default slot (e.g. <Row let:props><section {...props}>...</section></Row>)
|
||||
* @default false
|
||||
*/
|
||||
as?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the condensed variant
|
||||
* @default false
|
||||
*/
|
||||
condensed?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the narrow variant
|
||||
* @default false
|
||||
*/
|
||||
narrow?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutter?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the left gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutterLeft?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the right gutter
|
||||
* @default false
|
||||
*/
|
||||
noGutterRight?: boolean;
|
||||
};
|
||||
|
||||
$$prop_def: RowProps;
|
||||
$$slot_def: {
|
||||
default: { props?: { class: string } };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue