@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
198 lines (197 loc) • 5.67 kB
TypeScript
import { NeonSize } from '@/model/common/size/NeonSize';
import { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';
import { NeonSwitchStyle } from '@/model/user-input/switch/NeonSwitchStyle';
import { NeonHorizontalPosition } from '@/model/common/position/NeonHorizontalPosition';
/**
* <p>
* A Switch or Checkbox component used to indicate an on/off state. This is equivalent to a checkbox. The switch supports
* both <em>Switch</em> and <em>Checkbox</em> styles which can be used in different scenarios.
* </p>
*/
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* The switch model.
*/
modelValue: {
type: BooleanConstructor;
required: true;
};
/**
* The switch label, the label can be optional only in the case the switch is part of a more complex component.
*/
label: {
type: StringConstructor;
default: null;
};
/**
* The indeterminate state of the checkbox.
*/
indeterminate: {
type: BooleanConstructor;
default: boolean;
};
/**
* The size of the switch.
*/
size: {
type: () => NeonSize;
default: () => NeonSize;
};
/**
* The switch color.
*/
color: {
type: () => NeonFunctionalColor;
default: () => NeonFunctionalColor;
};
/**
* Style the switch as a <em>Switch</em> or a <em>Checkbox</em>.
*/
switchStyle: {
type: () => NeonSwitchStyle;
default: () => NeonSwitchStyle;
};
/**
* The position of the switch label.
*/
labelPosition: {
type: () => NeonHorizontalPosition;
default: () => NeonHorizontalPosition;
};
/**
* Disabled state of the switch.
*/
disabled: {
type: BooleanConstructor;
default: boolean;
};
}>, {
checkbox: import("vue").Ref<HTMLInputElement | null, HTMLInputElement | null>;
sanitizedAttributes: import("vue").ComputedRef<{
[x: string]: unknown;
}>;
toggleSwitch: () => void;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "indeterminate-change")[], "update:modelValue" | "indeterminate-change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* The switch model.
*/
modelValue: {
type: BooleanConstructor;
required: true;
};
/**
* The switch label, the label can be optional only in the case the switch is part of a more complex component.
*/
label: {
type: StringConstructor;
default: null;
};
/**
* The indeterminate state of the checkbox.
*/
indeterminate: {
type: BooleanConstructor;
default: boolean;
};
/**
* The size of the switch.
*/
size: {
type: () => NeonSize;
default: () => NeonSize;
};
/**
* The switch color.
*/
color: {
type: () => NeonFunctionalColor;
default: () => NeonFunctionalColor;
};
/**
* Style the switch as a <em>Switch</em> or a <em>Checkbox</em>.
*/
switchStyle: {
type: () => NeonSwitchStyle;
default: () => NeonSwitchStyle;
};
/**
* The position of the switch label.
*/
labelPosition: {
type: () => NeonHorizontalPosition;
default: () => NeonHorizontalPosition;
};
/**
* Disabled state of the switch.
*/
disabled: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
"onIndeterminate-change"?: ((...args: any[]) => any) | undefined;
}>, {
color: NeonFunctionalColor;
label: string;
disabled: boolean;
size: NeonSize;
indeterminate: boolean;
switchStyle: NeonSwitchStyle;
labelPosition: NeonHorizontalPosition;
}, {}, {
NeonIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
name: {
type: StringConstructor;
required: true;
};
id: {
type: StringConstructor;
default: null;
};
color: {
type: () => NeonFunctionalColor;
default: null;
};
inverse: {
type: BooleanConstructor;
default: boolean;
};
disabled: {
type: BooleanConstructor;
default: boolean;
};
}>, {
sanitizedAttributes: import("vue").ComputedRef<{
[x: string]: unknown;
}>;
icon: import("vue").ComputedRef<string | undefined>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
name: {
type: StringConstructor;
required: true;
};
id: {
type: StringConstructor;
default: null;
};
color: {
type: () => NeonFunctionalColor;
default: null;
};
inverse: {
type: BooleanConstructor;
default: boolean;
};
disabled: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{}>, {
color: NeonFunctionalColor;
id: string;
inverse: boolean;
disabled: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;