// src/app/piying/page/component/field-group/steps/example/activatedIndex/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.object({
l1: v.pipe(v.string(), v.title('l1-title')),
l2: v.pipe(v.boolean(), v.title('l2-title')),
}),
safeDefine.setComponent('steps', (actions) => {
return [
actions.inputs.patch({
activatedIndex: 1,
}),
];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4'),
);
// src/app/piying/page/component/field-group/steps/example/customAction/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.object({
l1: v.pipe(v.string(), v.title('l1-title')),
l2: v.pipe(v.boolean(), v.title('l2-title')),
}),
safeDefine.setComponent('steps', (actions) => {
return [
actions.inputs.patch({
customAction: '自定义操作',
}),
];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4'),
);
// src/app/piying/page/component/field-group/steps/example/direction/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.object({
l1: v.pipe(v.string(), v.title('l1-title')),
l2: v.pipe(v.boolean(), v.title('l2-title')),
}),
safeDefine.setComponent('steps', (actions) => {
return [
actions.inputs.patch({
direction: 'vertical',
}),
];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4'),
);
// src/app/piying/page/component/field-group/steps/example/next/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.object({
l1: v.pipe(v.string(), v.title('l1-title')),
l2: v.pipe(v.boolean(), v.title('l2-title')),
}),
safeDefine.setComponent('steps', (actions) => {
return [
actions.inputs.patch({
next: '下一步',
}),
];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4'),
);
// src/app/piying/page/component/field-group/steps/example/prev/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.object({
l1: v.pipe(v.string(), v.title('l1-title')),
l2: v.pipe(v.boolean(), v.title('l2-title')),
}),
safeDefine.setComponent('steps', (actions) => {
return [
actions.inputs.patch({
prev: '上一步',
}),
];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4'),
);
// src/app/piying/page/component/field-group/steps/example/stepColor/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.object({
l1: v.pipe(v.string(), v.title('l1-title')),
l2: v.pipe(v.boolean(), v.title('l2-title')),
}),
safeDefine.setComponent('steps', (actions) => {
return [
actions.inputs.patch({
stepColor: 'secondary',
}),
];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4'),
);