// src/app/piying/page/component/non-field-control/loading/example/all-props/content.ts
import * as v from 'valibot';
import { actions, NFCSchema } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
v.tuple([
v.pipe(
NFCSchema,
safeDefine.setComponent('loading', (actions) => {
return [
actions.inputs.patch({
size: 'lg',
type: 'infinity',
}),
];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4'),
);
// src/app/piying/page/component/non-field-control/loading/example/base/content.ts
import * as v from 'valibot';
import { actions, NFCSchema } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
v.tuple([
v.pipe(
NFCSchema,
safeDefine.setComponent('loading', (actions) => {
return [actions.inputs.patch({})];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4'),
);
// src/app/piying/page/component/non-field-control/loading/example/size/content.ts
import * as v from 'valibot';
import { actions, NFCSchema } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
v.tuple([
v.pipe(
NFCSchema,
safeDefine.setComponent('loading', (actions) => {
return [actions.inputs.patch({ size: 'xs', type: 'spinner' })];
}),
),
v.pipe(
NFCSchema,
safeDefine.setComponent('loading', (actions) => {
return [actions.inputs.patch({ size: 'sm', type: 'spinner' })];
}),
),
v.pipe(
NFCSchema,
safeDefine.setComponent('loading', (actions) => {
return [actions.inputs.patch({ size: 'md', type: 'spinner' })];
}),
),
v.pipe(
NFCSchema,
safeDefine.setComponent('loading', (actions) => {
return [actions.inputs.patch({ size: 'lg', type: 'spinner' })];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4 flex-wrap'),
);
// src/app/piying/page/component/non-field-control/loading/example/type/content.ts
import * as v from 'valibot';
import { actions, NFCSchema } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
v.tuple([
v.pipe(
NFCSchema,
safeDefine.setComponent('loading', (actions) => {
return [actions.inputs.patch({ type: 'spinner' })];
}),
),
v.pipe(
NFCSchema,
safeDefine.setComponent('loading', (actions) => {
return [actions.inputs.patch({ type: 'dots' })];
}),
),
v.pipe(
NFCSchema,
safeDefine.setComponent('loading', (actions) => {
return [actions.inputs.patch({ type: 'ring' })];
}),
),
v.pipe(
NFCSchema,
safeDefine.setComponent('loading', (actions) => {
return [actions.inputs.patch({ type: 'ball' })];
}),
),
v.pipe(
NFCSchema,
safeDefine.setComponent('loading', (actions) => {
return [actions.inputs.patch({ type: 'bars' })];
}),
),
v.pipe(
NFCSchema,
safeDefine.setComponent('loading', (actions) => {
return [actions.inputs.patch({ type: 'infinity' })];
}),
),
]),
actions.wrappers.patch(['div']),
actions.class.top('flex gap-4 flex-wrap flex-row flex-wrap'),
);