@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
144 lines (143 loc) • 3.98 kB
TypeScript
import { NeonSize } from '@/common/enums/NeonSize';
import { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';
import { NeonSwitchStyle } from '@/common/enums/NeonSwitchStyle';
import { NeonHorizontalPosition } from '@/common/enums/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<{
/**
* 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>;
sanitizedAttributes: import("vue").ComputedRef<{
[x: string]: unknown;
}>;
toggleSwitch: () => void;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "indeterminate-change")[], "update:modelValue" | "indeterminate-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, 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;
};
}>> & {
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
"onIndeterminate-change"?: ((...args: any[]) => any) | undefined;
}, {
disabled: boolean;
label: string;
size: NeonSize;
color: NeonFunctionalColor;
indeterminate: boolean;
switchStyle: NeonSwitchStyle;
labelPosition: NeonHorizontalPosition;
}, {}>;
export default _default;