Documentation navigation

Published API · 0.1.0-rc.1

themes · components/table

Published themes API declarations for components/table.

./components/table

@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/table'

Exported declarations

Body

Body: {
    Props: Schema.Struct<{}>;
    view: <M>(_props: typeof emptyProps.Type, children: ReadonlyArray<Html | string>, h: HtmlBuilder<M>) => Html;
}

Cell

Cell: {
    Props: Schema.Struct<{
        readonly p: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly px: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly py: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly pt: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly pr: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly pb: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly pl: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly justify: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly width: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly minWidth: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly maxWidth: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
    }>;
    view: <M>(props: typeof cellProps.Type, children: ReadonlyArray<Html | string>, h: HtmlBuilder<M>) => Html;
}

ColumnHeaderCell

ColumnHeaderCell: {
    Props: Schema.Struct<{
        readonly p: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly px: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly py: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly pt: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly pr: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly pb: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly pl: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly justify: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly width: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly minWidth: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly maxWidth: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
    }>;
    view: <M>(props: typeof cellProps.Type, children: ReadonlyArray<Html | string>, h: HtmlBuilder<M>) => Html;
}

Header

Header: {
    Props: Schema.Struct<{}>;
    view: <M>(_props: typeof emptyProps.Type, children: ReadonlyArray<Html | string>, h: HtmlBuilder<M>) => Html;
}

Root

Root: {
    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 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 ["surface", "ghost"]>>;
        readonly layout: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
    }>;
    view: <M>(props: typeof rootProps.Type, children: ReadonlyArray<Html | string>, h: HtmlBuilder<M>) => Html;
}

Row

Row: {
    Props: Schema.Struct<{
        readonly align: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
    }>;
    view: <M>(props: typeof alignProps.Type, children: ReadonlyArray<Html | string>, h: HtmlBuilder<M>) => Html;
}

RowHeaderCell

RowHeaderCell: {
    Props: Schema.Struct<{
        readonly p: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly px: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly py: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly pt: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly pr: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly pb: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly pl: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly justify: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly width: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly minWidth: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
        readonly maxWidth: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly string[]> | Schema.String, Schema.Struct<{
            [k: string]: Schema.optional<Schema.Literals<readonly string[]> | Schema.String>;
        }>]>>;
    }>;
    view: <M>(props: typeof cellProps.Type, children: ReadonlyArray<Html | string>, h: HtmlBuilder<M>) => Html;
}

Body.Props

Props exported by @wsagency/wseffect-themes/components/table · Body.Props · source
NameTypeRequiredChoicesDescription

Cell.Props

Props exported by @wsagency/wseffect-themes/components/table · Cell.Props · source
NameTypeRequiredChoicesDescription
justify"start" | "center" | "end" | Responsive<"start" | "center" | "end">No——
widthstring | Responsive<string>No——
minWidthstring | Responsive<string>No——
maxWidthstring | Responsive<string>No——
pstring | Responsive<string>No——
pxstring | Responsive<string>No——
pystring | Responsive<string>No——
ptstring | Responsive<string>No——
prstring | Responsive<string>No——
pbstring | Responsive<string>No——
plstring | Responsive<string>No——

ColumnHeaderCell.Props

Props exported by @wsagency/wseffect-themes/components/table · ColumnHeaderCell.Props · source
NameTypeRequiredChoicesDescription
justify"start" | "center" | "end" | Responsive<"start" | "center" | "end">No——
widthstring | Responsive<string>No——
minWidthstring | Responsive<string>No——
maxWidthstring | Responsive<string>No——
pstring | Responsive<string>No——
pxstring | Responsive<string>No——
pystring | Responsive<string>No——
ptstring | Responsive<string>No——
prstring | Responsive<string>No——
pbstring | Responsive<string>No——
plstring | Responsive<string>No——

Header.Props

Props exported by @wsagency/wseffect-themes/components/table · Header.Props · source
NameTypeRequiredChoicesDescription

Root.Props

Props exported by @wsagency/wseffect-themes/components/table · Root.Props · source
NameTypeRequiredChoicesDescription
size"1" | "2" | "3" | Responsive<"1" | "2" | "3">No——
variant"surface" | "ghost"No"surface", "ghost"—
layout"auto" | "fixed" | Responsive<"auto" | "fixed">No——
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——

Row.Props

Props exported by @wsagency/wseffect-themes/components/table · Row.Props · source
NameTypeRequiredChoicesDescription
align"start" | "center" | "end" | "baseline" | Responsive<"start" | "center" | "end" | "baseline">No——

RowHeaderCell.Props

Props exported by @wsagency/wseffect-themes/components/table · RowHeaderCell.Props · source
NameTypeRequiredChoicesDescription
justify"start" | "center" | "end" | Responsive<"start" | "center" | "end">No——
widthstring | Responsive<string>No——
minWidthstring | Responsive<string>No——
maxWidthstring | Responsive<string>No——
pstring | Responsive<string>No——
pxstring | Responsive<string>No——
pystring | Responsive<string>No——
ptstring | Responsive<string>No——
prstring | Responsive<string>No——
pbstring | Responsive<string>No——
plstring | Responsive<string>No——

Rendered component example

Table
Name
Jordan Doe
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.Table.Root.view({}, [Themes.Table.Header.view({}, [Themes.Table.Row.view({}, [Themes.Table.ColumnHeaderCell.view({}, ['Name'], h)], h)], h), Themes.Table.Body.view({}, [Themes.Table.Row.view({}, [Themes.Table.Cell.view({}, ['Jordan Doe'], h)], h)], h)], h)