Documentation navigation

Published API · 0.1.0-rc.1

themes · components/progress

Published themes API declarations for components/progress.

./components/progress

@wsagency/wseffect-themes · MIT · source · MIT license · WS-AGENCY-NOTICE

This entry point is published in @wsagency/wseffect-themes@0.1.0-rc.1. Import it from the package subpath shown below; the signatures and documentation are read from the installed package declarations.

import * as Wseffect from '@wsagency/wseffect-themes/components/progress'

Exported declarations

Props

Props: Schema.Struct<{
    readonly m: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
        [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
    }>]>>;
    readonly mx: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
        [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
    }>]>>;
    readonly my: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
        [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
    }>]>>;
    readonly mt: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
        [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
    }>]>>;
    readonly mr: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
        [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
    }>]>>;
    readonly mb: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
        [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
    }>]>>;
    readonly ml: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
        [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
    }>]>>;
    readonly id: Schema.optional<Schema.String>;
    readonly ariaLabel: Schema.optional<Schema.String>;
    readonly ariaLabelledBy: Schema.optional<Schema.String>;
    readonly size: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
        [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
    }>]>>;
    readonly variant: Schema.optional<Schema.Literals<readonly ["classic", "surface", "soft"]>>;
    readonly color: Schema.optional<Schema.Literals<readonly ["gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", "sky", "custom"]>>;
    readonly highContrast: Schema.optional<Schema.Boolean>;
    readonly radius: Schema.optional<Schema.Literals<readonly ["none", "small", "medium", "large", "full"]>>;
    readonly value: Schema.optional<Schema.NullOr<Schema.Number>>;
    readonly min: Schema.optional<Schema.Number>;
    readonly max: Schema.optional<Schema.Number>;
    readonly valueText: Schema.optional<Schema.String>;
    readonly getValueLabel: Schema.optional<Schema.Unknown>;
    readonly duration: Schema.optional<Schema.String>;
}>

view

view: <Message>(props: ViewProps, _children: ReadonlyArray<Html | string>, h: HtmlBuilder<Message>) => Html

ViewProps

export type ViewProps = typeof Props.Type & Readonly<{
    getValueLabel?: (value: number, max: number) => string;
}>;

Props

Props exported by @wsagency/wseffect-themes/components/progress · Props · source
NameTypeRequiredChoicesDescription
idstringNo——
ariaLabelstringNo——
ariaLabelledBystringNo——
size"1" | "2" | "3" | Responsive<"1" | "2" | "3">No——
variant"classic" | "surface" | "soft"No"classic", "surface", "soft"—
color"gray" | "gold" | "bronze" | "brown" | "yellow" | "amber" | "orange" | "tomato" | "red" | "ruby" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "indigo" | "blue" | "cyan" | "teal" | "jade" | "green" | "grass" | "lime" | "mint" | "sky" | "custom"No"gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", "sky", "custom"—
highContrastbooleanNo——
radius"none" | "small" | "medium" | "large" | "full"No"none", "small", "medium", "large", "full"—
valuenumber | nullNo——
minnumberNo——
maxnumberNo——
valueTextstringNo——
getValueLabelunknownNo——
durationstringNo——
mstring | Responsive<string>No——
mxstring | Responsive<string>No——
mystring | Responsive<string>No——
mtstring | Responsive<string>No——
mrstring | Responsive<string>No——
mbstring | Responsive<string>No——
mlstring | Responsive<string>No——

Rendered component example

Progress
Example usage
import * as Themes from '@wsagency/wseffect-themes'
import * as SliderRange from '@wsagency/wseffect-themes/components/slider/range'
import * as Option from 'effect/Option'
import { defineView } from '@wsagency/wseffect-foldkit/submodel'
import { inertHtml, type HtmlBuilder } from '@wsagency/wseffect-foldkit/html'

const example = (h: HtmlBuilder<unknown>) => Themes.Progress.view({ value: 68, max: 100, ariaLabel: 'Upload progress' }, [], h)