#

all-props

// src/app/piying/page/component/non-field-control/progress/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('progress', (actions) => {
        return [
          actions.inputs.patch({
            value: 80,
            max: 100,
            color: 'success',
          }),
        ];
      }),
    ),
  ]),
  actions.wrappers.patch(['div']),
  actions.class.top('flex gap-4'),
);
content_copy
#

base

// src/app/piying/page/component/non-field-control/progress/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('progress', (actions) => {
        return [actions.inputs.patch({ value: 50 })];
      }),
    ),
  ]),
  actions.wrappers.patch(['div']),
  actions.class.top('flex gap-4'),
);
content_copy
#

color

// src/app/piying/page/component/non-field-control/progress/example/color/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('progress', (actions) => {
        return [actions.inputs.patch({ value: 70, color: 'primary' })];
      }),
    ),
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('progress', (actions) => {
        return [actions.inputs.patch({ value: 70, color: 'secondary' })];
      }),
    ),
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('progress', (actions) => {
        return [actions.inputs.patch({ value: 70, color: 'accent' })];
      }),
    ),
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('progress', (actions) => {
        return [actions.inputs.patch({ value: 70, color: 'success' })];
      }),
    ),
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('progress', (actions) => {
        return [actions.inputs.patch({ value: 70, color: 'error' })];
      }),
    ),
  ]),
  actions.wrappers.patch(['div']),
  actions.class.top('flex gap-4 flex-wrap'),
);
content_copy
#

value

// src/app/piying/page/component/non-field-control/progress/example/value/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('progress', (actions) => {
        return [actions.inputs.patch({ value: 25, max: 100 })];
      }),
    ),
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('progress', (actions) => {
        return [actions.inputs.patch({ value: 50, max: 100 })];
      }),
    ),
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('progress', (actions) => {
        return [actions.inputs.patch({ value: 75, max: 100 })];
      }),
    ),
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('progress', (actions) => {
        return [actions.inputs.patch({ value: 100, max: 100 })];
      }),
    ),
  ]),
  actions.wrappers.patch(['div']),
  actions.class.top('flex gap-4 flex-wrap'),
);
content_copy