feat: migrate Slider with native range semantics and strict ESM declarations

This commit is contained in:
maoyingjie
2026-10-23 13:12:26 +08:00
parent b1cb00deba
commit 4da45b109e
40 changed files with 2239 additions and 3 deletions
+16
View File
@@ -0,0 +1,16 @@
import {
type SliderProps,
type SliderThumbProps,
type SliderValue,
} from "../../packages/vue/src";
const scalar: SliderProps = { modelValue: 10, orientation: "vertical" };
const range: SliderProps = { modelValue: [10, 90], step: 0.1 };
const thumb: SliderThumbProps = { index: 1, name: "max", isDisabled: true };
// @ts-expect-error Slider does not accept formatted strings
const invalid: SliderProps = { modelValue: "$10" };
// @ts-expect-error invalid orientation
const direction: SliderProps = { orientation: "diagonal" };
// @ts-expect-error input indices are numeric
const badIndex: SliderThumbProps = { index: "1" };
const value: SliderValue = [10, 90];
void [scalar, range, thumb, invalid, direction, badIndex, value];