// src/app/piying/page/component/field-control/range/example/all-props/content.ts
import * as v from 'valibot';
import { actions } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
v.tuple([
v.pipe(
v.number(),
safeDefine.setComponent('range', (actions) => {
return [
actions.inputs.set({
min: 0,
max: 100,
step: 1,
color: 'primary',
}),
];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4'),
);
// src/app/piying/page/component/field-control/range/example/base/content.ts
import * as v from 'valibot';
import { actions } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
v.tuple([
v.pipe(
v.number(),
safeDefine.setComponent('range', (actions) => {
return [actions.inputs.set({})];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4'),
);
// src/app/piying/page/component/field-control/range/example/color/content.ts
import * as v from 'valibot';
import { actions } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
v.tuple([
v.pipe(
v.number(),
safeDefine.setComponent('range', (actions) => {
return [actions.inputs.set({ min: 0, max: 100, color: 'primary' })];
}),
),
v.pipe(
v.number(),
safeDefine.setComponent('range', (actions) => {
return [actions.inputs.set({ min: 0, max: 100, color: 'secondary' })];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4 flex-wrap'),
);
// src/app/piying/page/component/field-control/range/example/max/content.ts
import * as v from 'valibot';
import { actions } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
v.tuple([
v.pipe(
v.number(),
safeDefine.setComponent('range', (actions) => {
return [actions.inputs.set({ min: 0, max: 50 })];
}),
),
v.pipe(
v.number(),
safeDefine.setComponent('range', (actions) => {
return [actions.inputs.set({ min: 0, max: 1000 })];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4 flex-wrap'),
);
// src/app/piying/page/component/field-control/range/example/min/content.ts
import * as v from 'valibot';
import { actions } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
v.tuple([
v.pipe(
v.number(),
safeDefine.setComponent('range', (actions) => {
return [actions.inputs.set({ min: 0, max: 100 })];
}),
),
v.pipe(
v.number(),
safeDefine.setComponent('range', (actions) => {
return [actions.inputs.set({ min: -100, max: 100 })];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4 flex-wrap'),
);
// src/app/piying/page/component/field-control/range/example/step/content.ts
import * as v from 'valibot';
import { actions } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
v.tuple([
v.pipe(
v.number(),
safeDefine.setComponent('range', (actions) => {
return [actions.inputs.set({ min: 0, max: 10, step: 1 })];
}),
),
v.pipe(
v.number(),
safeDefine.setComponent('range', (actions) => {
return [actions.inputs.set({ min: 0, max: 10, step: 0.1 })];
}),
),
v.pipe(
v.number(),
safeDefine.setComponent('range', (actions) => {
return [actions.inputs.set({ min: 0, max: 100, step: 10 })];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4 flex-wrap'),
);