@dvcol/neo-svelte
Version:
Neomorphic ui library for svelte 5
86 lines (85 loc) • 2.15 kB
TypeScript
import type { SVGAttributes } from 'svelte/elements';
export type IconProps = {
size?: CSSStyleDeclaration['width'] | CSSStyleDeclaration['height'];
scale?: number | string;
stroke?: number | string;
enter?: boolean;
} & Omit<SVGAttributes<SVGElement>, 'stroke'>;
export declare const IconArrowDirection: {
readonly Left: "left";
readonly Right: "right";
readonly Up: "up";
readonly Down: "down";
};
export type IconArrowDirections = (typeof IconArrowDirection)[keyof typeof IconArrowDirection];
export type IconArrowProps = IconProps & {
expanded?: boolean;
direction?: IconArrowDirections;
};
export type IconFilledProps = IconProps & {
filled?: boolean;
};
export type IconAddressProps = IconFilledProps & {
dot?: CSSStyleDeclaration['color'];
repeat?: SVGAttributes<SVGAnimateTransformElement>['repeatCount'];
};
export type IconBouncingDotsProps = IconProps & {
fill?: CSSStyleDeclaration['color'];
steps?: number[];
};
export type IconCheckboxProps = {
/**
* The stroke width of the border.
*/
box?: number;
/**
* The stroke width of the checkmark.
*/
check?: number;
/**
* The scale of the icon.
*/
scale?: number;
/**
* The size (width and height) of the icon.
*/
size?: string;
/**
* Whether to render the border.
*/
border?: boolean;
/**
* Whether to render a square or circle checkbox.
*/
circle?: boolean;
/**
* Whether to draw the border on enter.
*/
draw?: boolean;
/**
* Whether to animate on enter.
*/
enter?: boolean;
/**
* If the checkbox is checked.
*/
checked?: boolean;
/**
* If the checkbox is indeterminate.
*/
indeterminate?: boolean;
};
export type IconCircleLoadingProps = IconProps & {
animate?: boolean;
speed?: number;
};
export type IconPlayPauseProps = IconProps & {
state?: 'play' | 'pause';
};
export type IconRadioProps = IconProps & {
checked?: boolean;
circle?: boolean;
};
export type IconSunMoonProps = IconProps & {
state?: 'sun' | 'moon';
};