# @birchui/forms API reference

> Birch UI Forms: JSON-driven form renderer (MIT) and visual Form Builder (commercial)

```bash
npm install @birchui/forms
```

## @birchui/forms

### availableLocales

Kind: function. Import from `@birchui/forms`.

```ts
function availableLocales(): string[]
```

### checkExpression

Kind: function. Import from `@birchui/forms`.

```ts
function checkExpression(source: string, options: CheckExpressionOptions = {}): ExpressionDiagnostic[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `source` | `string` |  |
| `options?` | `CheckExpressionOptions` |  |

### collectFieldNames

Kind: function. Import from `@birchui/forms`.

```ts
function collectFieldNames(schema: NormalizedSchema): string[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `schema` | `NormalizedSchema` |  |

### compileExpression

Kind: function. Import from `@birchui/forms`.

```ts
function compileExpression(source: string): CompiledExpression
```

| Parameter | Type | Description |
| --- | --- | --- |
| `source` | `string` |  |

### createForm

Kind: function. Import from `@birchui/forms`.

```ts
function createForm(container: HTMLElement, options: FormOptions): FormApi
```

| Parameter | Type | Description |
| --- | --- | --- |
| `container` | `HTMLElement` |  |
| `options` | `FormOptions` |  |

### evaluateExpression

Kind: function. Import from `@birchui/forms`.

```ts
function evaluateExpression(source: string, context: EvaluationContext = {}): unknown
```

| Parameter | Type | Description |
| --- | --- | --- |
| `source` | `string` |  |
| `context?` | `EvaluationContext` |  |

### formatMessage

Kind: function. Import from `@birchui/forms`.

```ts
function formatMessage(template: string, params: Record<string, unknown> = {}): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `template` | `string` |  |
| `params?` | `Record<string, unknown>` |  |

### fromJSONSchema

Kind: function. Import from `@birchui/forms`.

```ts
function fromJSONSchema(jsonSchema: JsonSchema, options: FromJsonSchemaOptions = {}): FormSchema
```

| Parameter | Type | Description |
| --- | --- | --- |
| `jsonSchema` | `JsonSchema` |  |
| `options?` | `FromJsonSchemaOptions` |  |

### getMessages

Kind: function. Import from `@birchui/forms`.

```ts
function getMessages(locale: string | undefined, overrides?: Partial<FormMessages>): FormMessages
```

| Parameter | Type | Description |
| --- | --- | --- |
| `locale` | `string \| undefined` |  |
| `overrides?` | `Partial<FormMessages>` |  |

### listFunctionNames

Kind: function. Import from `@birchui/forms`.

```ts
function listFunctionNames(custom?: Readonly<Record<string, ExpressionFunction>>): string[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `custom?` | `Readonly<Record<string, ExpressionFunction>>` |  |

### localize

Kind: function. Import from `@birchui/forms`.

```ts
function localize(text: LocalizedString | undefined | null, locale: string = DEFAULT_LOCALE): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `text` | `LocalizedString \| undefined \| null` |  |
| `locale?` | `string` |  |

### normalizeSchema

Kind: function. Import from `@birchui/forms`.

```ts
function normalizeSchema(schema: FormSchema): NormalizedSchema
```

| Parameter | Type | Description |
| --- | --- | --- |
| `schema` | `FormSchema` |  |

### parseExpression

Kind: function. Import from `@birchui/forms`.

```ts
function parseExpression(source: string): ParseResult
```

| Parameter | Type | Description |
| --- | --- | --- |
| `source` | `string` |  |

### registerLocale

Kind: function. Import from `@birchui/forms`.

```ts
function registerLocale(locale: string, messages: Partial<FormMessages>): void
```

| Parameter | Type | Description |
| --- | --- | --- |
| `locale` | `string` |  |
| `messages` | `Partial<FormMessages>` |  |

### renderMarkdown

Kind: function. Import from `@birchui/forms`.

```ts
function renderMarkdown(source: string, doc: Document): DocumentFragment
```

| Parameter | Type | Description |
| --- | --- | --- |
| `source` | `string` |  |
| `doc` | `Document` |  |

### toJSONSchema

Kind: function. Import from `@birchui/forms`.

```ts
function toJSONSchema(schema: FormSchema, options: ToJsonSchemaOptions = {}): JsonSchema
```

| Parameter | Type | Description |
| --- | --- | --- |
| `schema` | `FormSchema` |  |
| `options?` | `ToJsonSchemaOptions` |  |

### validateSchema

Kind: function. Import from `@birchui/forms`.

```ts
function validateSchema(schema: unknown, options: ValidateSchemaOptions = {}): SchemaIssue[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `schema` | `unknown` |  |
| `options?` | `ValidateSchemaOptions` |  |

### walkSchema

Kind: function. Import from `@birchui/forms`.

```ts
function walkSchema(schema: NormalizedSchema, visit: (element: ElementSchema, info: WalkInfo) => void | boolean): void
```

| Parameter | Type | Description |
| --- | --- | --- |
| `schema` | `NormalizedSchema` |  |
| `visit` | `(element: ElementSchema, info: WalkInfo) => void \| boolean` |  |

### BUILTIN_FUNCTIONS

Kind: const. Import from `@birchui/forms`.

```ts
const BUILTIN_FUNCTIONS: Readonly<Record<string, ExpressionFunction>>
```

### ELEMENT_TYPES

Kind: const. Import from `@birchui/forms`.

```ts
const ELEMENT_TYPES: readonly ElementType[]
```

### FIELD_TYPES

Kind: const. Import from `@birchui/forms`.

```ts
const FIELD_TYPES: readonly FieldType[]
```

### FORM_STYLE_ID

Kind: const. Import from `@birchui/forms`.

```ts
const FORM_STYLE_ID: "lq-form-styles" = 'lq-form-styles'
```

### formDefinition

Kind: const. Import from `@birchui/forms`.

```ts
const formDefinition: WidgetDefinition<FormOptions, FormEvents, FormApi>
```

### formStyles

Kind: const. Import from `@birchui/forms`.

```ts
const formStyles: "\n.lq-theme-light,\n.lq-form,\n.lq-form-builder {\n --lq-font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;\n --lq-font-size: 14px;\n --lq-fg: #1f2328;\n --lq-bg: #ffffff;\n --lq-muted-fg: #59636e;\n --lq-border: #d1d9e0;\n --lq-header-bg: #f6f8fa;\n --lq-header-fg: #1f2328;\n --lq-row-alt: #fafbfc;\n --lq-row-hover: #f0f4f8;\n --lq-accent: #2563eb;\n --lq-accent-fg: #ffffff;\n --lq-selection-bg: rgba(37, 99, 235, 0.1);\n --lq-focus-ring: #2563eb;\n --lq-radius: 6px;\n --lq-form-input-bg: #ffffff;\n --lq-form-input-border: #818b98;\n --lq-form-accent-text: #1d4ed8;\n --lq-form-danger: #b42318;\n --lq-form-danger-bg: #fef3f2;\n --lq-form-success: #1a7f37;\n --lq-form-star: #d97706;\n --lq-form-gap: 16px;\n --lq-form-control-height: 38px;\n --lq-form-padding: 24px;\n --lq-form-max-width: 760px;\n}\n\n.lq-theme-dark,\n.lq-form.lq-theme-dark,\n.lq-theme-dark .lq-form,\n.lq-form-builder.lq-theme-dark,\n.lq-theme-dark .lq-form-builder {\n --lq-fg: #e6edf3;\n --lq-bg: #0d1117;\n --lq-muted-fg: #9198a1;\n --lq-border: #3d444d;\n --lq-header-bg: #161b22;\n --lq-header-fg: #e6edf3;\n --lq-row-alt: #11161d;\n --lq-row-hover: #1b222c;\n --lq-accent: #4c8dff;\n --lq-accent-fg: #0d1117;\n --lq-selection-bg: rgba(76, 141, 255, 0.16);\n --lq-focus-ring: #6ca3ff;\n --lq-form-input-bg: #0d1117;\n --lq-form-input-border: #656c76;\n --lq-form-accent-text: #4c8dff;\n --lq-form-danger: #ff8b82;\n --lq-form-danger-bg: rgba(248, 81, 73, 0.12);\n --lq-form-success: #56d364;\n --lq-form-star: #f2b33d;\n color-scheme: dark;\n}\n\n@media (prefers-color-scheme: dark) {\n .lq-form.lq-theme-auto,\n .lq-form-builder.lq-theme-auto {\n --lq-fg: #e6edf3;\n --lq-bg: #0d1117;\n --lq-muted-fg: #9198a1;\n --lq-border: #3d444d;\n --lq-header-bg: #161b22;\n --lq-header-fg: #e6edf3;\n --lq-row-alt: #11161d;\n --lq-row-hover: #1b222c;\n --lq-accent: #4c8dff;\n --lq-accent-fg: #0d1117;\n --lq-selection-bg: rgba(76, 141, 255, 0.16);\n --lq-focus-ring: #6ca3ff;\n --lq-form-input-bg: #0d1117;\n --lq-form-input-border: #656c76;\n --lq-form-accent-text: #4c8dff;\n --lq-form-danger: #ff8b82;\n --lq-form-danger-bg: rgba(248, 81, 73, 0.12);\n --lq-form-success: #56d364;\n --lq-form-star: #f2b33d;\n color-scheme: dark;\n }\n}\n\n.lq-form--compact {\n --lq-form-gap: 10px;\n --lq-form-control-height: 32px;\n --lq-form-padding: 16px;\n --lq-font-size: 13px;\n}\n\n.lq-form--spacious {\n --lq-form-gap: 22px;\n --lq-form-control-height: 44px;\n --lq-form-padding: 32px;\n --lq-font-size: 15px;\n}\n\n.lq-form [hidden],\n.lq-form-builder [hidden] {\n display: none !important;\n}\n\n.lq-form-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n\n.lq-form {\n container-type: inline-size;\n box-sizing: border-box;\n max-width: var(--lq-form-max-width);\n padding: var(--lq-form-padding);\n font-family: var(--lq-font-family);\n font-size: var(--lq-font-size);\n line-height: 1.5;\n color: var(--lq-fg);\n background: var(--lq-bg);\n border: 1px solid var(--lq-border);\n border-radius: calc(var(--lq-radius) * 1.5);\n}\n\n.lq-form *,\n.lq-form *::before,\n.lq-form *::after {\n box-sizing: border-box;\n}\n\n.lq-form-title {\n margin: 0 0 4px;\n font-size: 1.45em;\n line-height: 1.25;\n}\n\n.lq-form-description,\n.lq-form-page-description,\n.lq-form-panel-description {\n margin: 0 0 var(--lq-form-gap);\n color: var(--lq-muted-fg);\n}\n\n.lq-form-header {\n margin-bottom: var(--lq-form-gap);\n}\n\n.lq-form-progress {\n margin-bottom: var(--lq-form-gap);\n}\n\n.lq-form-progress-label {\n display: flex;\n justify-content: space-between;\n gap: 12px;\n margin-bottom: 6px;\n font-size: 0.9em;\n color: var(--lq-muted-fg);\n}\n\n.lq-form-progress-page {\n font-weight: 600;\n color: var(--lq-fg);\n}\n\n.lq-form-progress-track {\n height: 6px;\n overflow: hidden;\n background: var(--lq-header-bg);\n border: 1px solid var(--lq-border);\n border-radius: 999px;\n}\n\n.lq-form-progress-fill {\n height: 100%;\n background: var(--lq-accent);\n border-radius: inherit;\n transition: width 0.25s ease;\n}\n\n.lq-form-page-title {\n margin: 0 0 6px;\n font-size: 1.15em;\n}\n\n.lq-form-page-title:focus,\n.lq-form-dynamic-title:focus,\n.lq-form-summary:focus,\n.lq-form-completed:focus {\n outline: none;\n}\n\n.lq-form-elements {\n display: grid;\n grid-template-columns: repeat(6, minmax(0, 1fr));\n gap: var(--lq-form-gap);\n align-items: start;\n}\n\n.lq-form-elements > * {\n grid-column: span 6;\n min-width: 0;\n}\n\n.lq-form-w-half {\n grid-column: span 3;\n}\n\n.lq-form-w-third {\n grid-column: span 2;\n}\n\n.lq-form-w-two-thirds {\n grid-column: span 4;\n}\n\n@container (max-width: 540px) {\n .lq-form .lq-form-elements > * {\n grid-column: span 6;\n }\n}\n\n.lq-form-field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n}\n\n.lq-form-label {\n padding: 0;\n font-weight: 600;\n color: var(--lq-fg);\n}\n\n.lq-form-required {\n margin-inline-start: 3px;\n color: var(--lq-form-danger);\n}\n\n.lq-form-hint {\n font-size: 0.9em;\n color: var(--lq-muted-fg);\n}\n\n.lq-form-error {\n display: flex;\n gap: 6px;\n align-items: flex-start;\n font-size: 0.9em;\n font-weight: 500;\n color: var(--lq-form-danger);\n}\n\n.lq-form-error::before {\n content: \"!\";\n display: inline-grid;\n flex: none;\n place-items: center;\n width: 16px;\n height: 16px;\n margin-top: 2px;\n font-size: 11px;\n font-weight: 700;\n color: var(--lq-bg);\n background: var(--lq-form-danger);\n border-radius: 50%;\n}\n\n.lq-form-input {\n width: 100%;\n min-height: var(--lq-form-control-height);\n padding: 6px 10px;\n font: inherit;\n color: var(--lq-fg);\n background: var(--lq-form-input-bg);\n border: 1px solid var(--lq-form-input-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-textarea {\n min-height: calc(var(--lq-form-control-height) * 2.4);\n resize: vertical;\n}\n\n.lq-form-select--multiple {\n padding: 4px;\n}\n\n.lq-form-input::placeholder {\n color: var(--lq-muted-fg);\n opacity: 1;\n}\n\n.lq-form-input:focus-visible,\n.lq-form-radio:focus-visible,\n.lq-form-checkbox:focus-visible,\n.lq-form-switch:focus-visible,\n.lq-form-range:focus-visible,\n.lq-form-file:focus-visible,\n.lq-form-button:focus-visible,\n.lq-form-panel-toggle:focus-visible,\n.lq-form-file-remove:focus-visible,\n.lq-form-summary-link:focus-visible,\n.lq-form-rating-item:has(input:focus-visible) {\n outline: 2px solid var(--lq-focus-ring);\n outline-offset: 2px;\n}\n\n.lq-form-field--invalid .lq-form-input,\n.lq-form-field--invalid .lq-form-signature-pad {\n border-color: var(--lq-form-danger);\n box-shadow: inset 3px 0 0 var(--lq-form-danger);\n}\n\n.lq-form-field--disabled {\n opacity: 0.65;\n}\n\n.lq-form-input:disabled,\n.lq-form-input:read-only:not(select) {\n background: var(--lq-header-bg);\n}\n\n.lq-form-options {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.lq-form-options--inline {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 6px 18px;\n}\n\n.lq-form-choice,\n.lq-form-check {\n display: flex;\n gap: 8px;\n align-items: flex-start;\n}\n\n.lq-form-check-label {\n font-weight: 500;\n}\n\n.lq-form-radio,\n.lq-form-checkbox {\n flex: none;\n width: 18px;\n height: 18px;\n margin: 2px 0 0;\n accent-color: var(--lq-accent);\n}\n\n.lq-form-switch {\n flex: none;\n position: relative;\n width: 38px;\n height: 22px;\n margin: 0;\n appearance: none;\n cursor: pointer;\n background: var(--lq-form-input-border);\n border-radius: 999px;\n transition: background 0.15s ease;\n}\n\n.lq-form-switch::after {\n content: \"\";\n position: absolute;\n top: 3px;\n inset-inline-start: 3px;\n width: 16px;\n height: 16px;\n background: #ffffff;\n border-radius: 50%;\n transition: transform 0.15s ease;\n}\n\n.lq-form-switch:checked {\n background: var(--lq-accent);\n}\n\n.lq-form-switch:checked::after {\n transform: translateX(16px);\n}\n\n[dir=\"rtl\"] .lq-form-switch:checked::after {\n transform: translateX(-16px);\n}\n\n.lq-form-switch-state {\n color: var(--lq-muted-fg);\n}\n\n.lq-form-rating {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n}\n\n.lq-form-rating-item {\n position: relative;\n display: inline-grid;\n place-items: center;\n min-width: var(--lq-form-control-height);\n height: var(--lq-form-control-height);\n cursor: pointer;\n border-radius: var(--lq-radius);\n}\n\n.lq-form-rating--stars .lq-form-rating-symbol {\n font-size: 1.7em;\n line-height: 1;\n color: var(--lq-form-input-border);\n}\n\n.lq-form-rating--stars .is-on .lq-form-rating-symbol {\n color: var(--lq-form-star);\n}\n\n.lq-form-rating--numbers .lq-form-rating-item {\n font-weight: 600;\n border: 1px solid var(--lq-form-input-border);\n}\n\n.lq-form-rating--numbers .is-on {\n color: var(--lq-accent-fg);\n background: var(--lq-accent);\n border-color: var(--lq-accent);\n}\n\n.lq-form-rating-labels,\n.lq-form-slider-bounds {\n display: flex;\n justify-content: space-between;\n font-size: 0.85em;\n color: var(--lq-muted-fg);\n}\n\n.lq-form-slider-row {\n display: flex;\n gap: 12px;\n align-items: center;\n}\n\n.lq-form-range {\n flex: 1;\n accent-color: var(--lq-accent);\n}\n\n.lq-form-slider-value {\n min-width: 64px;\n font-variant-numeric: tabular-nums;\n font-weight: 600;\n text-align: end;\n}\n\n.lq-form-slider--unset .lq-form-slider-value {\n font-weight: 400;\n color: var(--lq-muted-fg);\n}\n\n.lq-form-files {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.lq-form-file-item {\n display: flex;\n gap: 10px;\n align-items: center;\n padding: 4px 8px;\n background: var(--lq-header-bg);\n border: 1px solid var(--lq-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-file-name {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.lq-form-file-size {\n color: var(--lq-muted-fg);\n font-size: 0.85em;\n}\n\n.lq-form-file-remove {\n width: 26px;\n height: 26px;\n font: inherit;\n font-size: 1.2em;\n line-height: 1;\n color: var(--lq-fg);\n cursor: pointer;\n background: transparent;\n border: 0;\n border-radius: var(--lq-radius);\n}\n\n.lq-form-file-remove:hover {\n background: var(--lq-row-hover);\n}\n\n.lq-form-signature-pad {\n position: relative;\n background: var(--lq-form-input-bg);\n border: 1px dashed var(--lq-form-input-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-signature-canvas {\n display: block;\n width: 100%;\n height: auto;\n touch-action: none;\n cursor: crosshair;\n}\n\n.lq-theme-dark .lq-form-signature-canvas,\n.lq-form.lq-theme-dark .lq-form-signature-canvas {\n filter: invert(1) hue-rotate(180deg);\n}\n\n.lq-form-signature--disabled .lq-form-signature-canvas {\n cursor: not-allowed;\n}\n\n.lq-form-signature-status {\n position: absolute;\n inset-inline-end: 8px;\n bottom: 6px;\n font-size: 0.8em;\n color: var(--lq-form-success);\n}\n\n.lq-form-signature-typed {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin-top: 8px;\n}\n\n.lq-form-sublabel {\n font-size: 0.9em;\n color: var(--lq-muted-fg);\n}\n\n.lq-form-signature-actions {\n display: flex;\n gap: 8px;\n margin-top: 6px;\n}\n\n.lq-form-matrix-scroll {\n overflow-x: auto;\n}\n\n.lq-form-matrix-table {\n width: 100%;\n border-collapse: collapse;\n}\n\n.lq-form-matrix-table th,\n.lq-form-matrix-table td {\n padding: 8px;\n text-align: center;\n border-bottom: 1px solid var(--lq-border);\n}\n\n.lq-form-matrix-table thead th {\n font-size: 0.85em;\n font-weight: 600;\n color: var(--lq-muted-fg);\n}\n\n.lq-form-matrix-table tbody th {\n font-weight: 500;\n text-align: start;\n}\n\n.lq-form-matrix-table tbody tr:nth-child(even) {\n background: var(--lq-row-alt);\n}\n\n.lq-form-computed {\n display: block;\n min-height: var(--lq-form-control-height);\n padding: 6px 10px;\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n background: var(--lq-header-bg);\n border: 1px solid var(--lq-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-markdown > :first-child {\n margin-top: 0;\n}\n\n.lq-form-markdown > :last-child {\n margin-bottom: 0;\n}\n\n.lq-form-markdown h3,\n.lq-form-markdown h4,\n.lq-form-markdown h5 {\n margin: 0.6em 0 0.3em;\n}\n\n.lq-form-markdown a {\n color: var(--lq-accent);\n}\n\n.lq-form-markdown code {\n padding: 1px 4px;\n font-size: 0.92em;\n background: var(--lq-header-bg);\n border-radius: 4px;\n}\n\n.lq-form-panel,\n.lq-form-dynamic {\n min-width: 0;\n margin: 0;\n padding: var(--lq-form-gap);\n border: 1px solid var(--lq-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-panel-title {\n padding: 0 6px;\n font-weight: 700;\n}\n\n.lq-form-panel-toggle {\n display: inline-flex;\n gap: 8px;\n align-items: center;\n padding: 2px 4px;\n font: inherit;\n font-weight: 700;\n color: inherit;\n cursor: pointer;\n background: none;\n border: 0;\n border-radius: var(--lq-radius);\n}\n\n.lq-form-panel-toggle::before {\n content: \"\";\n width: 7px;\n height: 7px;\n border-right: 2px solid currentColor;\n border-bottom: 2px solid currentColor;\n transform: rotate(45deg);\n transition: transform 0.15s ease;\n}\n\n.lq-form-panel--collapsed .lq-form-panel-toggle::before {\n transform: rotate(-45deg);\n}\n\n[dir=\"rtl\"] .lq-form-panel--collapsed .lq-form-panel-toggle::before {\n transform: rotate(135deg);\n}\n\n.lq-form-dynamic-list {\n display: flex;\n flex-direction: column;\n gap: var(--lq-form-gap);\n margin-bottom: var(--lq-form-gap);\n}\n\n.lq-form-dynamic-item {\n padding: var(--lq-form-gap);\n background: var(--lq-row-alt);\n border: 1px solid var(--lq-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-dynamic-header {\n display: flex;\n justify-content: space-between;\n gap: 12px;\n align-items: center;\n margin-bottom: 10px;\n}\n\n.lq-form-dynamic-title {\n margin: 0;\n font-size: 1em;\n}\n\n.lq-form-dynamic--invalid {\n border-color: var(--lq-form-danger);\n}\n\n.lq-form-dynamic .lq-form-error {\n margin-top: 8px;\n}\n\n.lq-form-summary {\n margin-bottom: var(--lq-form-gap);\n padding: 12px 16px;\n color: var(--lq-fg);\n background: var(--lq-form-danger-bg);\n border: 1px solid var(--lq-form-danger);\n border-inline-start-width: 4px;\n border-radius: var(--lq-radius);\n}\n\n.lq-form-summary-title {\n margin: 0 0 6px;\n font-size: 1em;\n}\n\n.lq-form-summary-list {\n margin: 0;\n padding-inline-start: 18px;\n}\n\n.lq-form-summary-link {\n color: var(--lq-form-danger);\n font-weight: 500;\n}\n\n.lq-form-nav {\n display: flex;\n gap: 10px;\n align-items: center;\n margin-top: calc(var(--lq-form-gap) * 1.5);\n padding-top: var(--lq-form-gap);\n border-top: 1px solid var(--lq-border);\n}\n\n.lq-form-nav-spacer {\n flex: 1;\n}\n\n.lq-form-button {\n display: inline-flex;\n gap: 6px;\n align-items: center;\n justify-content: center;\n min-height: var(--lq-form-control-height);\n padding: 0 16px;\n font: inherit;\n font-weight: 600;\n color: var(--lq-fg);\n cursor: pointer;\n background: var(--lq-bg);\n border: 1px solid var(--lq-form-input-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-button:hover:not(:disabled) {\n background: var(--lq-row-hover);\n}\n\n.lq-form-button:disabled {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.lq-form-button--primary {\n color: var(--lq-accent-fg);\n background: var(--lq-accent);\n border-color: var(--lq-accent);\n}\n\n.lq-form-button--primary:hover:not(:disabled) {\n background: var(--lq-accent);\n filter: brightness(1.08);\n}\n\n.lq-form-button--quiet {\n min-height: 30px;\n padding: 0 10px;\n font-weight: 500;\n border-color: transparent;\n background: transparent;\n}\n\n.lq-form-dynamic-add {\n align-self: flex-start;\n}\n\n.lq-form-completed {\n padding: 24px;\n font-size: 1.05em;\n text-align: center;\n background: var(--lq-header-bg);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-builder {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n height: 100%;\n min-height: 600px;\n overflow: hidden;\n font-family: var(--lq-font-family);\n font-size: var(--lq-font-size);\n line-height: 1.45;\n color: var(--lq-fg);\n background: var(--lq-header-bg);\n border: 1px solid var(--lq-border);\n border-radius: calc(var(--lq-radius) * 1.5);\n}\n\n.lq-form-builder *,\n.lq-form-builder *::before,\n.lq-form-builder *::after {\n box-sizing: border-box;\n}\n\n.lq-form-builder-header {\n display: flex;\n flex-wrap: wrap;\n gap: 8px 16px;\n align-items: center;\n justify-content: space-between;\n padding: 8px 12px;\n background: var(--lq-bg);\n border-bottom: 1px solid var(--lq-border);\n}\n\n.lq-form-builder-tabs,\n.lq-form-builder-pages {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n align-items: center;\n}\n\n.lq-form-builder-tab,\n.lq-form-builder-page-tab,\n.lq-form-builder-tool,\n.lq-form-builder-icon-button,\n.lq-form-builder-toolbox-item,\n.lq-form-builder-small-button {\n display: inline-flex;\n gap: 6px;\n align-items: center;\n font: inherit;\n color: var(--lq-fg);\n cursor: pointer;\n background: transparent;\n border: 1px solid transparent;\n border-radius: var(--lq-radius);\n}\n\n.lq-form-builder-tab {\n padding: 6px 12px;\n font-weight: 600;\n}\n\n.lq-form-builder-tab[aria-selected=\"true\"] {\n color: var(--lq-form-accent-text);\n background: var(--lq-selection-bg);\n}\n\n.lq-form-builder-toolbar {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n}\n\n.lq-form-builder-tool {\n padding: 6px 10px;\n border-color: var(--lq-border);\n background: var(--lq-bg);\n}\n\n.lq-form-builder-tool:disabled,\n.lq-form-builder-small-button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.lq-form-builder-tool--primary {\n color: var(--lq-accent-fg);\n background: var(--lq-accent);\n border-color: var(--lq-accent);\n}\n\n.lq-form-builder-tab:focus-visible,\n.lq-form-builder-page-tab:focus-visible,\n.lq-form-builder-tool:focus-visible,\n.lq-form-builder-icon-button:focus-visible,\n.lq-form-builder-toolbox-item:focus-visible,\n.lq-form-builder-small-button:focus-visible,\n.lq-form-builder-item:focus-visible,\n.lq-form-builder input:focus-visible,\n.lq-form-builder select:focus-visible,\n.lq-form-builder textarea:focus-visible {\n outline: 2px solid var(--lq-focus-ring);\n outline-offset: 1px;\n}\n\n.lq-form-builder-body {\n flex: 1;\n min-height: 0;\n}\n\n.lq-form-builder-panel {\n height: 100%;\n min-height: 0;\n}\n\n.lq-form-builder-designer {\n display: grid;\n grid-template-columns: 210px minmax(0, 1fr) 300px;\n height: 100%;\n min-height: 0;\n}\n\n.lq-form-builder-toolbox,\n.lq-form-builder-properties {\n min-height: 0;\n overflow: auto;\n background: var(--lq-bg);\n}\n\n.lq-form-builder-toolbox {\n padding: 12px 8px;\n border-inline-end: 1px solid var(--lq-border);\n}\n\n.lq-form-builder-properties {\n padding: 12px;\n border-inline-start: 1px solid var(--lq-border);\n}\n\n.lq-form-builder-section-title {\n margin: 12px 6px 6px;\n font-size: 0.75em;\n font-weight: 700;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--lq-muted-fg);\n}\n\n.lq-form-builder-section-title:first-child {\n margin-top: 0;\n}\n\n.lq-form-builder-toolbox-list {\n display: flex;\n flex-direction: column;\n gap: 2px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.lq-form-builder-toolbox-item {\n width: 100%;\n padding: 6px 8px;\n text-align: start;\n cursor: grab;\n}\n\n.lq-form-builder-toolbox-item:hover {\n background: var(--lq-row-hover);\n border-color: var(--lq-border);\n}\n\n.lq-form-builder-icon {\n display: inline-grid;\n flex: none;\n place-items: center;\n width: 22px;\n height: 22px;\n color: var(--lq-accent);\n background: var(--lq-selection-bg);\n border-radius: 5px;\n}\n\n.lq-form-builder-icon svg {\n width: 14px;\n height: 14px;\n}\n\n.lq-form-builder-canvas-wrap {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n}\n\n.lq-form-builder-pages {\n padding: 8px 12px 0;\n border-bottom: 1px solid var(--lq-border);\n}\n\n.lq-form-builder-page-tab {\n padding: 6px 12px;\n margin-bottom: -1px;\n border-radius: var(--lq-radius) var(--lq-radius) 0 0;\n}\n\n.lq-form-builder-page-tab[aria-selected=\"true\"] {\n font-weight: 600;\n background: var(--lq-bg);\n border-color: var(--lq-border);\n border-bottom-color: var(--lq-bg);\n}\n\n.lq-form-builder-page-tab.is-drop-target {\n background: var(--lq-selection-bg);\n border-color: var(--lq-accent);\n}\n\n.lq-form-builder-canvas {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 16px;\n}\n\n.lq-form-builder-page-header {\n margin: 0 0 12px;\n padding: 10px 12px;\n cursor: pointer;\n background: var(--lq-bg);\n border: 1px solid var(--lq-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-builder-page-header.is-selected {\n border-color: var(--lq-accent);\n box-shadow: 0 0 0 1px var(--lq-accent);\n}\n\n.lq-form-builder-page-header h3 {\n margin: 0;\n font-size: 1.05em;\n}\n\n.lq-form-builder-drop {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-height: 48px;\n}\n\n.lq-form-builder-drop-empty {\n display: grid;\n place-items: center;\n min-height: 72px;\n padding: 12px;\n font-size: 0.9em;\n color: var(--lq-muted-fg);\n border: 2px dashed var(--lq-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-builder-drop-line {\n height: 3px;\n margin: -2px 0;\n background: var(--lq-accent);\n border-radius: 2px;\n}\n\n.lq-form-builder-item {\n position: relative;\n padding: 8px 12px 12px;\n cursor: pointer;\n background: var(--lq-bg);\n border: 1px solid var(--lq-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-builder-item:hover {\n border-color: var(--lq-form-input-border);\n}\n\n.lq-form-builder-item[aria-selected=\"true\"] {\n border-color: var(--lq-accent);\n box-shadow: 0 0 0 1px var(--lq-accent);\n}\n\n.lq-form-builder-item.is-dragging {\n opacity: 0.45;\n}\n\n.lq-form-builder-item-bar {\n display: flex;\n gap: 8px;\n align-items: center;\n margin-bottom: 6px;\n font-size: 0.8em;\n color: var(--lq-muted-fg);\n}\n\n.lq-form-builder-item-type {\n display: inline-flex;\n gap: 6px;\n align-items: center;\n}\n\n.lq-form-builder-item-name {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n}\n\n.lq-form-builder-item-badge {\n padding: 0 6px;\n font-size: 0.95em;\n color: var(--lq-form-accent-text);\n background: var(--lq-selection-bg);\n border-radius: 999px;\n}\n\n.lq-form-builder-item-actions {\n display: flex;\n gap: 2px;\n margin-inline-start: auto;\n opacity: 0;\n}\n\n.lq-form-builder-item:hover > .lq-form-builder-item-bar .lq-form-builder-item-actions,\n.lq-form-builder-item[aria-selected=\"true\"] > .lq-form-builder-item-bar .lq-form-builder-item-actions {\n opacity: 1;\n}\n\n.lq-form-builder-icon-button {\n justify-content: center;\n width: 26px;\n height: 26px;\n}\n\n.lq-form-builder-icon-button:hover {\n background: var(--lq-row-hover);\n border-color: var(--lq-border);\n}\n\n.lq-form-builder-icon-button svg {\n width: 14px;\n height: 14px;\n}\n\n.lq-form-builder-preview {\n pointer-events: none;\n user-select: none;\n}\n\n.lq-form-builder-preview .lq-form-field,\n.lq-form-builder-preview .lq-form-markdown {\n font-size: 0.97em;\n}\n\n.lq-form-builder-item.is-editing .lq-form-builder-preview .lq-form-label,\n.lq-form-builder-item.is-editing .lq-form-builder-preview .lq-form-check-label {\n visibility: hidden;\n height: 0;\n}\n\n.lq-form-builder-inline {\n width: 100%;\n margin-bottom: 6px;\n padding: 4px 8px;\n font: inherit;\n font-weight: 600;\n color: var(--lq-fg);\n background: var(--lq-form-input-bg);\n border: 1px solid var(--lq-accent);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-builder-container-title {\n margin: 0 0 8px;\n font-weight: 700;\n}\n\n.lq-form-builder-children {\n padding: 8px;\n background: var(--lq-header-bg);\n border: 1px dashed var(--lq-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-builder-add-page {\n padding: 6px 10px;\n margin-bottom: 4px;\n color: var(--lq-accent);\n}\n\n.lq-form-builder-prop-group {\n margin: 0 0 14px;\n padding: 0;\n border: 0;\n}\n\n.lq-form-builder-prop-group > legend {\n width: 100%;\n margin-bottom: 8px;\n padding: 0 0 4px;\n font-size: 0.75em;\n font-weight: 700;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--lq-muted-fg);\n border-bottom: 1px solid var(--lq-border);\n}\n\n.lq-form-builder-prop {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin-bottom: 10px;\n}\n\n.lq-form-builder-prop--check {\n flex-direction: row;\n gap: 8px;\n align-items: center;\n}\n\n.lq-form-builder-prop label,\n.lq-form-builder-prop-label {\n font-size: 0.88em;\n font-weight: 600;\n}\n\n.lq-form-builder-prop input[type=\"text\"],\n.lq-form-builder-prop input[type=\"number\"],\n.lq-form-builder-prop select,\n.lq-form-builder-prop textarea,\n.lq-form-builder-list-row input,\n.lq-form-builder-expr-input {\n width: 100%;\n min-height: 30px;\n padding: 4px 8px;\n font: inherit;\n color: var(--lq-fg);\n background: var(--lq-form-input-bg);\n border: 1px solid var(--lq-form-input-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-builder-expr-input {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 0.92em;\n}\n\n.lq-form-builder-prop [aria-invalid=\"true\"] {\n border-color: var(--lq-form-danger);\n}\n\n.lq-form-builder-prop-error {\n font-size: 0.85em;\n color: var(--lq-form-danger);\n}\n\n.lq-form-builder-prop-warning {\n font-size: 0.85em;\n color: var(--lq-muted-fg);\n}\n\n.lq-form-builder-expr {\n position: relative;\n}\n\n.lq-form-builder-suggestions {\n position: absolute;\n z-index: 5;\n top: 100%;\n inset-inline: 0;\n max-height: 200px;\n margin: 2px 0 0;\n padding: 4px;\n overflow: auto;\n list-style: none;\n background: var(--lq-bg);\n border: 1px solid var(--lq-border);\n border-radius: var(--lq-radius);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);\n}\n\n.lq-form-builder-suggestion {\n padding: 4px 8px;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 0.9em;\n cursor: pointer;\n border-radius: 4px;\n}\n\n.lq-form-builder-suggestion[aria-selected=\"true\"],\n.lq-form-builder-suggestion:hover {\n color: var(--lq-accent-fg);\n background: var(--lq-accent);\n}\n\n.lq-form-builder-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.lq-form-builder-list-row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;\n gap: 4px;\n align-items: center;\n}\n\n.lq-form-builder-list-row--rule {\n grid-template-columns: minmax(0, 1fr) auto;\n padding: 6px;\n background: var(--lq-header-bg);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-builder-row-actions {\n display: flex;\n gap: 2px;\n}\n\n.lq-form-builder-small-button {\n padding: 3px 8px;\n font-size: 0.88em;\n border-color: var(--lq-border);\n background: var(--lq-bg);\n}\n\n.lq-form-builder-element-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n margin-bottom: 14px;\n}\n\n.lq-form-builder-props-heading {\n display: flex;\n gap: 8px;\n align-items: center;\n margin: 0 0 12px;\n font-size: 1em;\n}\n\n.lq-form-builder-props-empty {\n color: var(--lq-muted-fg);\n}\n\n.lq-form-builder-json {\n display: flex;\n flex-direction: column;\n gap: 8px;\n height: 100%;\n padding: 12px;\n background: var(--lq-bg);\n}\n\n.lq-form-builder-json-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n}\n\n.lq-form-builder-json-status {\n font-size: 0.9em;\n color: var(--lq-muted-fg);\n}\n\n.lq-form-builder-json-text {\n flex: 1;\n min-height: 320px;\n padding: 10px 12px;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12.5px;\n line-height: 1.5;\n tab-size: 2;\n color: var(--lq-fg);\n background: var(--lq-form-input-bg);\n border: 1px solid var(--lq-form-input-border);\n border-radius: var(--lq-radius);\n resize: none;\n}\n\n.lq-form-builder-issues {\n max-height: 160px;\n margin: 0;\n padding: 0;\n overflow: auto;\n list-style: none;\n}\n\n.lq-form-builder-issue {\n padding: 3px 0;\n font-size: 0.9em;\n}\n\n.lq-form-builder-issue--error {\n color: var(--lq-form-danger);\n}\n\n.lq-form-builder-issue--warning {\n color: var(--lq-muted-fg);\n}\n\n.lq-form-builder-issue code {\n margin-inline-end: 6px;\n font-size: 0.9em;\n}\n\n.lq-form-builder-preview-pane {\n display: grid;\n grid-template-columns: minmax(0, 1fr) 320px;\n gap: 16px;\n height: 100%;\n min-height: 0;\n padding: 16px;\n overflow: auto;\n}\n\n.lq-form-builder-result {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-height: 0;\n}\n\n.lq-form-builder-result pre {\n flex: 1;\n margin: 0;\n padding: 10px 12px;\n overflow: auto;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12px;\n background: var(--lq-bg);\n border: 1px solid var(--lq-border);\n border-radius: var(--lq-radius);\n}\n\n.lq-form-builder-modal-backdrop {\n position: fixed;\n z-index: 1000;\n inset: 0;\n display: grid;\n place-items: center;\n padding: 16px;\n background: rgba(15, 23, 42, 0.45);\n}\n\n.lq-form-builder-modal {\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: min(640px, 100%);\n max-height: 90vh;\n padding: 16px;\n color: var(--lq-fg);\n background: var(--lq-bg);\n border: 1px solid var(--lq-border);\n border-radius: calc(var(--lq-radius) * 1.5);\n box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);\n}\n\n.lq-form-builder-modal h2 {\n margin: 0;\n font-size: 1.1em;\n}\n\n.lq-form-builder-modal textarea {\n min-height: 280px;\n}\n\n.lq-form-builder-modal-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n justify-content: flex-end;\n}\n\n@media (max-width: 960px) {\n .lq-form-builder-designer {\n grid-template-columns: 180px minmax(0, 1fr);\n grid-template-rows: minmax(0, 1fr) auto;\n }\n\n .lq-form-builder-properties {\n grid-column: 1 / -1;\n max-height: 40vh;\n border-top: 1px solid var(--lq-border);\n border-inline-start: 0;\n }\n\n .lq-form-builder-preview-pane {\n grid-template-columns: minmax(0, 1fr);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .lq-form *,\n .lq-form *::before,\n .lq-form *::after,\n .lq-form-builder *,\n .lq-form-builder *::before,\n .lq-form-builder *::after {\n transition: none !important;\n animation: none !important;\n }\n}\n\n@media (forced-colors: active) {\n .lq-form :focus-visible,\n .lq-form-builder :focus-visible,\n .lq-form-rating-item:has(input:focus-visible) {\n outline: 2px solid Highlight;\n }\n .lq-form-builder-tab[aria-selected=\"true\"],\n .lq-form-builder-item[aria-selected=\"true\"] {\n outline: 2px solid Highlight;\n outline-offset: -2px;\n }\n}\n" = ` .lq-theme-light, .lq-form, .lq-form-builder { --lq-font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --lq-font-size: 14px; --lq-fg: #1f2328; --lq-bg: #ffffff; --lq-muted-fg: #59636e; --lq-border: #d1d9e0; --lq-header-bg: #f6f8fa; --lq-header-fg: #1f2328; --lq-row-alt: #fafbfc; --lq-row-hover: #f0f4f8; --lq-accent: #2563eb; --lq-accent-fg: #ffffff; --lq-selection-bg: rgba(37, 99, 235, 0.1); --lq-focus-ring: #2563eb; --lq-radius: 6px; --lq-form-input-bg: #ffffff; --lq-form-input-border: #818b98; --lq-form-accent-text: #1d4ed8; --lq-form-danger: #b42318; --lq-form-danger-bg: #fef3f2; --lq-form-success: #1a7f37; --lq-form-star: #d97706; --lq-form-gap: 16px; --lq-form-control-height: 38px; --lq-form-padding: 24px; --lq-form-max-width: 760px; } .lq-theme-dark, .lq-form.lq-theme-dark, .lq-theme-dark .lq-form, .lq-form-builder.lq-theme-dark, .lq-theme-dark .lq-form-builder { --lq-fg: #e6edf3; --lq-bg: #0d1117; --lq-muted-fg: #9198a1; --lq-border: #3d444d; --lq-header-bg: #161b22; --lq-header-fg: #e6edf3; --lq-row-alt: #11161d; --lq-row-hover: #1b222c; --lq-accent: #4c8dff; --lq-accent-fg: #0d1117; --lq-selection-bg: rgba(76, 141, 255, 0.16); --lq-focus-ring: #6ca3ff; --lq-form-input-bg: #0d1117; --lq-form-input-border: #656c76; --lq-form-accent-text: #4c8dff; --lq-form-danger: #ff8b82; --lq-form-danger-bg: rgba(248, 81, 73, 0.12); --lq-form-success: #56d364; --lq-form-star: #f2b33d; color-scheme: dark; } @media (prefers-color-scheme: dark) { .lq-form.lq-theme-auto, .lq-form-builder.lq-theme-auto { --lq-fg: #e6edf3; --lq-bg: #0d1117; --lq-muted-fg: #9198a1; --lq-border: #3d444d; --lq-header-bg: #161b22; --lq-header-fg: #e6edf3; --lq-row-alt: #11161d; --lq-row-hover: #1b222c; --lq-accent: #4c8dff; --lq-accent-fg: #0d1117; --lq-selection-bg: rgba(76, 141, 255, 0.16); --lq-focus-ring: #6ca3ff; --lq-form-input-bg: #0d1117; --lq-form-input-border: #656c76; --lq-form-accent-text: #4c8dff; --lq-form-danger: #ff8b82; --lq-form-danger-bg: rgba(248, 81, 73, 0.12); --lq-form-success: #56d364; --lq-form-star: #f2b33d; color-scheme: dark; } } .lq-form--compact { --lq-form-gap: 10px; --lq-form-control-height: 32px; --lq-form-padding: 16px; --lq-font-size: 13px; } .lq-form--spacious { --lq-form-gap: 22px; --lq-form-control-height: 44px; --lq-form-padding: 32px; --lq-font-size: 15px; } .lq-form [hidden], .lq-form-builder [hidden] { display: none !important; } .lq-form-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } .lq-form { container-type: inline-size; box-sizing: border-box; max-width: var(--lq-form-max-width); padding: var(--lq-form-padding); font-family: var(--lq-font-family); font-size: var(--lq-font-size); line-height: 1.5; color: var(--lq-fg); background: var(--lq-bg); border: 1px solid var(--lq-border); border-radius: calc(var(--lq-radius) * 1.5); } .lq-form *, .lq-form *::before, .lq-form *::after { box-sizing: border-box; } .lq-form-title { margin: 0 0 4px; font-size: 1.45em; line-height: 1.25; } .lq-form-description, .lq-form-page-description, .lq-form-panel-description { margin: 0 0 var(--lq-form-gap); color: var(--lq-muted-fg); } .lq-form-header { margin-bottom: var(--lq-form-gap); } .lq-form-progress { margin-bottom: var(--lq-form-gap); } .lq-form-progress-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 0.9em; color: var(--lq-muted-fg); } .lq-form-progress-page { font-weight: 600; color: var(--lq-fg); } .lq-form-progress-track { height: 6px; overflow: hidden; background: var(--lq-header-bg); border: 1px solid var(--lq-border); border-radius: 999px; } .lq-form-progress-fill { height: 100%; background: var(--lq-accent); border-radius: inherit; transition: width 0.25s ease; } .lq-form-page-title { margin: 0 0 6px; font-size: 1.15em; } .lq-form-page-title:focus, .lq-form-dynamic-title:focus, .lq-form-summary:focus, .lq-form-completed:focus { outline: none; } .lq-form-elements { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--lq-form-gap); align-items: start; } .lq-form-elements > * { grid-column: span 6; min-width: 0; } .lq-form-w-half { grid-column: span 3; } .lq-form-w-third { grid-column: span 2; } .lq-form-w-two-thirds { grid-column: span 4; } @container (max-width: 540px) { .lq-form .lq-form-elements > * { grid-column: span 6; } } .lq-form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; } .lq-form-label { padding: 0; font-weight: 600; color: var(--lq-fg); } .lq-form-required { margin-inline-start: 3px; color: var(--lq-form-danger); } .lq-form-hint { font-size: 0.9em; color: var(--lq-muted-fg); } .lq-form-error { display: flex; gap: 6px; align-items: flex-start; font-size: 0.9em; font-weight: 500; color: var(--lq-form-danger); } .lq-form-error::before { content: "!"; display: inline-grid; flex: none; place-items: center; width: 16px; height: 16px; margin-top: 2px; font-size: 11px; font-weight: 700; color: var(--lq-bg); background: var(--lq-form-danger); border-radius: 50%; } .lq-form-input { width: 100%; min-height: var(--lq-form-control-height); padding: 6px 10px; font: inherit; color: var(--lq-fg); background: var(--lq-form-input-bg); border: 1px solid var(--lq-form-input-border); border-radius: var(--lq-radius); } .lq-form-textarea { min-height: calc(var(--lq-form-control-height) * 2.4); resize: vertical; } .lq-form-select--multiple { padding: 4px; } .lq-form-input::placeholder { color: var(--lq-muted-fg); opacity: 1; } .lq-form-input:focus-visible, .lq-form-radio:focus-visible, .lq-form-checkbox:focus-visible, .lq-form-switch:focus-visible, .lq-form-range:focus-visible, .lq-form-file:focus-visible, .lq-form-button:focus-visible, .lq-form-panel-toggle:focus-visible, .lq-form-file-remove:focus-visible, .lq-form-summary-link:focus-visible, .lq-form-rating-item:has(input:focus-visible) { outline: 2px solid var(--lq-focus-ring); outline-offset: 2px; } .lq-form-field--invalid .lq-form-input, .lq-form-field--invalid .lq-form-signature-pad { border-color: var(--lq-form-danger); box-shadow: inset 3px 0 0 var(--lq-form-danger); } .lq-form-field--disabled { opacity: 0.65; } .lq-form-input:disabled, .lq-form-input:read-only:not(select) { background: var(--lq-header-bg); } .lq-form-options { display: flex; flex-direction: column; gap: 6px; } .lq-form-options--inline { flex-direction: row; flex-wrap: wrap; gap: 6px 18px; } .lq-form-choice, .lq-form-check { display: flex; gap: 8px; align-items: flex-start; } .lq-form-check-label { font-weight: 500; } .lq-form-radio, .lq-form-checkbox { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--lq-accent); } .lq-form-switch { flex: none; position: relative; width: 38px; height: 22px; margin: 0; appearance: none; cursor: pointer; background: var(--lq-form-input-border); border-radius: 999px; transition: background 0.15s ease; } .lq-form-switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; background: #ffffff; border-radius: 50%; transition: transform 0.15s ease; } .lq-form-switch:checked { background: var(--lq-accent); } .lq-form-switch:checked::after { transform: translateX(16px); } [dir="rtl"] .lq-form-switch:checked::after { transform: translateX(-16px); } .lq-form-switch-state { color: var(--lq-muted-fg); } .lq-form-rating { display: flex; flex-wrap: wrap; gap: 4px; } .lq-form-rating-item { position: relative; display: inline-grid; place-items: center; min-width: var(--lq-form-control-height); height: var(--lq-form-control-height); cursor: pointer; border-radius: var(--lq-radius); } .lq-form-rating--stars .lq-form-rating-symbol { font-size: 1.7em; line-height: 1; color: var(--lq-form-input-border); } .lq-form-rating--stars .is-on .lq-form-rating-symbol { color: var(--lq-form-star); } .lq-form-rating--numbers .lq-form-rating-item { font-weight: 600; border: 1px solid var(--lq-form-input-border); } .lq-form-rating--numbers .is-on { color: var(--lq-accent-fg); background: var(--lq-accent); border-color: var(--lq-accent); } .lq-form-rating-labels, .lq-form-slider-bounds { display: flex; justify-content: space-between; font-size: 0.85em; color: var(--lq-muted-fg); } .lq-form-slider-row { display: flex; gap: 12px; align-items: center; } .lq-form-range { flex: 1; accent-color: var(--lq-accent); } .lq-form-slider-value { min-width: 64px; font-variant-numeric: tabular-nums; font-weight: 600; text-align: end; } .lq-form-slider--unset .lq-form-slider-value { font-weight: 400; color: var(--lq-muted-fg); } .lq-form-files { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; } .lq-form-file-item { display: flex; gap: 10px; align-items: center; padding: 4px 8px; background: var(--lq-header-bg); border: 1px solid var(--lq-border); border-radius: var(--lq-radius); } .lq-form-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lq-form-file-size { color: var(--lq-muted-fg); font-size: 0.85em; } .lq-form-file-remove { width: 26px; height: 26px; font: inherit; font-size: 1.2em; line-height: 1; color: var(--lq-fg); cursor: pointer; background: transparent; border: 0; border-radius: var(--lq-radius); } .lq-form-file-remove:hover { background: var(--lq-row-hover); } .lq-form-signature-pad { position: relative; background: var(--lq-form-input-bg); border: 1px dashed var(--lq-form-input-border); border-radius: var(--lq-radius); } .lq-form-signature-canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; } .lq-theme-dark .lq-form-signature-canvas, .lq-form.lq-theme-dark .lq-form-signature-canvas { filter: invert(1) hue-rotate(180deg); } .lq-form-signature--disabled .lq-form-signature-canvas { cursor: not-allowed; } .lq-form-signature-status { position: absolute; inset-inline-end: 8px; bottom: 6px; font-size: 0.8em; color: var(--lq-form-success); } .lq-form-signature-typed { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; } .lq-form-sublabel { font-size: 0.9em; color: var(--lq-muted-fg); } .lq-form-signature-actions { display: flex; gap: 8px; margin-top: 6px; } .lq-form-matrix-scroll { overflow-x: auto; } .lq-form-matrix-table { width: 100%; border-collapse: collapse; } .lq-form-matrix-table th, .lq-form-matrix-table td { padding: 8px; text-align: center; border-bottom: 1px solid var(--lq-border); } .lq-form-matrix-table thead th { font-size: 0.85em; font-weight: 600; color: var(--lq-muted-fg); } .lq-form-matrix-table tbody th { font-weight: 500; text-align: start; } .lq-form-matrix-table tbody tr:nth-child(even) { background: var(--lq-row-alt); } .lq-form-computed { display: block; min-height: var(--lq-form-control-height); padding: 6px 10px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--lq-header-bg); border: 1px solid var(--lq-border); border-radius: var(--lq-radius); } .lq-form-markdown > :first-child { margin-top: 0; } .lq-form-markdown > :last-child { margin-bottom: 0; } .lq-form-markdown h3, .lq-form-markdown h4, .lq-form-markdown h5 { margin: 0.6em 0 0.3em; } .lq-form-markdown a { color: var(--lq-accent); } .lq-form-markdown code { padding: 1px 4px; font-size: 0.92em; background: var(--lq-header-bg); border-radius: 4px; } .lq-form-panel, .lq-form-dynamic { min-width: 0; margin: 0; padding: var(--lq-form-gap); border: 1px solid var(--lq-border); border-radius: var(--lq-radius); } .lq-form-panel-title { padding: 0 6px; font-weight: 700; } .lq-form-panel-toggle { display: inline-flex; gap: 8px; align-items: center; padding: 2px 4px; font: inherit; font-weight: 700; color: inherit; cursor: pointer; background: none; border: 0; border-radius: var(--lq-radius); } .lq-form-panel-toggle::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s ease; } .lq-form-panel--collapsed .lq-form-panel-toggle::before { transform: rotate(-45deg); } [dir="rtl"] .lq-form-panel--collapsed .lq-form-panel-toggle::before { transform: rotate(135deg); } .lq-form-dynamic-list { display: flex; flex-direction: column; gap: var(--lq-form-gap); margin-bottom: var(--lq-form-gap); } .lq-form-dynamic-item { padding: var(--lq-form-gap); background: var(--lq-row-alt); border: 1px solid var(--lq-border); border-radius: var(--lq-radius); } .lq-form-dynamic-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; } .lq-form-dynamic-title { margin: 0; font-size: 1em; } .lq-form-dynamic--invalid { border-color: var(--lq-form-danger); } .lq-form-dynamic .lq-form-error { margin-top: 8px; } .lq-form-summary { margin-bottom: var(--lq-form-gap); padding: 12px 16px; color: var(--lq-fg); background: var(--lq-form-danger-bg); border: 1px solid var(--lq-form-danger); border-inline-start-width: 4px; border-radius: var(--lq-radius); } .lq-form-summary-title { margin: 0 0 6px; font-size: 1em; } .lq-form-summary-list { margin: 0; padding-inline-start: 18px; } .lq-form-summary-link { color: var(--lq-form-danger); font-weight: 500; } .lq-form-nav { display: flex; gap: 10px; align-items: center; margin-top: calc(var(--lq-form-gap) * 1.5); padding-top: var(--lq-form-gap); border-top: 1px solid var(--lq-border); } .lq-form-nav-spacer { flex: 1; } .lq-form-button { display: inline-flex; gap: 6px; align-items: center; justify-content: center; min-height: var(--lq-form-control-height); padding: 0 16px; font: inherit; font-weight: 600; color: var(--lq-fg); cursor: pointer; background: var(--lq-bg); border: 1px solid var(--lq-form-input-border); border-radius: var(--lq-radius); } .lq-form-button:hover:not(:disabled) { background: var(--lq-row-hover); } .lq-form-button:disabled { cursor: not-allowed; opacity: 0.55; } .lq-form-button--primary { color: var(--lq-accent-fg); background: var(--lq-accent); border-color: var(--lq-accent); } .lq-form-button--primary:hover:not(:disabled) { background: var(--lq-accent); filter: brightness(1.08); } .lq-form-button--quiet { min-height: 30px; padding: 0 10px; font-weight: 500; border-color: transparent; background: transparent; } .lq-form-dynamic-add { align-self: flex-start; } .lq-form-completed { padding: 24px; font-size: 1.05em; text-align: center; background: var(--lq-header-bg); border-radius: var(--lq-radius); } .lq-form-builder { display: flex; flex-direction: column; box-sizing: border-box; height: 100%; min-height: 600px; overflow: hidden; font-family: var(--lq-font-family); font-size: var(--lq-font-size); line-height: 1.45; color: var(--lq-fg); background: var(--lq-header-bg); border: 1px solid var(--lq-border); border-radius: calc(var(--lq-radius) * 1.5); } .lq-form-builder *, .lq-form-builder *::before, .lq-form-builder *::after { box-sizing: border-box; } .lq-form-builder-header { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--lq-bg); border-bottom: 1px solid var(--lq-border); } .lq-form-builder-tabs, .lq-form-builder-pages { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } .lq-form-builder-tab, .lq-form-builder-page-tab, .lq-form-builder-tool, .lq-form-builder-icon-button, .lq-form-builder-toolbox-item, .lq-form-builder-small-button { display: inline-flex; gap: 6px; align-items: center; font: inherit; color: var(--lq-fg); cursor: pointer; background: transparent; border: 1px solid transparent; border-radius: var(--lq-radius); } .lq-form-builder-tab { padding: 6px 12px; font-weight: 600; } .lq-form-builder-tab[aria-selected="true"] { color: var(--lq-form-accent-text); background: var(--lq-selection-bg); } .lq-form-builder-toolbar { display: flex; flex-wrap: wrap; gap: 4px; } .lq-form-builder-tool { padding: 6px 10px; border-color: var(--lq-border); background: var(--lq-bg); } .lq-form-builder-tool:disabled, .lq-form-builder-small-button:disabled { cursor: not-allowed; opacity: 0.5; } .lq-form-builder-tool--primary { color: var(--lq-accent-fg); background: var(--lq-accent); border-color: var(--lq-accent); } .lq-form-builder-tab:focus-visible, .lq-form-builder-page-tab:focus-visible, .lq-form-builder-tool:focus-visible, .lq-form-builder-icon-button:focus-visible, .lq-form-builder-toolbox-item:focus-visible, .lq-form-builder-small-button:focus-visible, .lq-form-builder-item:focus-visible, .lq-form-builder input:focus-visible, .lq-form-builder select:focus-visible, .lq-form-builder textarea:focus-visible { outline: 2px solid var(--lq-focus-ring); outline-offset: 1px; } .lq-form-builder-body { flex: 1; min-height: 0; } .lq-form-builder-panel { height: 100%; min-height: 0; } .lq-form-builder-designer { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; height: 100%; min-height: 0; } .lq-form-builder-toolbox, .lq-form-builder-properties { min-height: 0; overflow: auto; background: var(--lq-bg); } .lq-form-builder-toolbox { padding: 12px 8px; border-inline-end: 1px solid var(--lq-border); } .lq-form-builder-properties { padding: 12px; border-inline-start: 1px solid var(--lq-border); } .lq-form-builder-section-title { margin: 12px 6px 6px; font-size: 0.75em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lq-muted-fg); } .lq-form-builder-section-title:first-child { margin-top: 0; } .lq-form-builder-toolbox-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; } .lq-form-builder-toolbox-item { width: 100%; padding: 6px 8px; text-align: start; cursor: grab; } .lq-form-builder-toolbox-item:hover { background: var(--lq-row-hover); border-color: var(--lq-border); } .lq-form-builder-icon { display: inline-grid; flex: none; place-items: center; width: 22px; height: 22px; color: var(--lq-accent); background: var(--lq-selection-bg); border-radius: 5px; } .lq-form-builder-icon svg { width: 14px; height: 14px; } .lq-form-builder-canvas-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; } .lq-form-builder-pages { padding: 8px 12px 0; border-bottom: 1px solid var(--lq-border); } .lq-form-builder-page-tab { padding: 6px 12px; margin-bottom: -1px; border-radius: var(--lq-radius) var(--lq-radius) 0 0; } .lq-form-builder-page-tab[aria-selected="true"] { font-weight: 600; background: var(--lq-bg); border-color: var(--lq-border); border-bottom-color: var(--lq-bg); } .lq-form-builder-page-tab.is-drop-target { background: var(--lq-selection-bg); border-color: var(--lq-accent); } .lq-form-builder-canvas { flex: 1; min-height: 0; overflow: auto; padding: 16px; } .lq-form-builder-page-header { margin: 0 0 12px; padding: 10px 12px; cursor: pointer; background: var(--lq-bg); border: 1px solid var(--lq-border); border-radius: var(--lq-radius); } .lq-form-builder-page-header.is-selected { border-color: var(--lq-accent); box-shadow: 0 0 0 1px var(--lq-accent); } .lq-form-builder-page-header h3 { margin: 0; font-size: 1.05em; } .lq-form-builder-drop { display: flex; flex-direction: column; gap: 8px; min-height: 48px; } .lq-form-builder-drop-empty { display: grid; place-items: center; min-height: 72px; padding: 12px; font-size: 0.9em; color: var(--lq-muted-fg); border: 2px dashed var(--lq-border); border-radius: var(--lq-radius); } .lq-form-builder-drop-line { height: 3px; margin: -2px 0; background: var(--lq-accent); border-radius: 2px; } .lq-form-builder-item { position: relative; padding: 8px 12px 12px; cursor: pointer; background: var(--lq-bg); border: 1px solid var(--lq-border); border-radius: var(--lq-radius); } .lq-form-builder-item:hover { border-color: var(--lq-form-input-border); } .lq-form-builder-item[aria-selected="true"] { border-color: var(--lq-accent); box-shadow: 0 0 0 1px var(--lq-accent); } .lq-form-builder-item.is-dragging { opacity: 0.45; } .lq-form-builder-item-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 0.8em; color: var(--lq-muted-fg); } .lq-form-builder-item-type { display: inline-flex; gap: 6px; align-items: center; } .lq-form-builder-item-name { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; } .lq-form-builder-item-badge { padding: 0 6px; font-size: 0.95em; color: var(--lq-form-accent-text); background: var(--lq-selection-bg); border-radius: 999px; } .lq-form-builder-item-actions { display: flex; gap: 2px; margin-inline-start: auto; opacity: 0; } .lq-form-builder-item:hover > .lq-form-builder-item-bar .lq-form-builder-item-actions, .lq-form-builder-item[aria-selected="true"] > .lq-form-builder-item-bar .lq-form-builder-item-actions { opacity: 1; } .lq-form-builder-icon-button { justify-content: center; width: 26px; height: 26px; } .lq-form-builder-icon-button:hover { background: var(--lq-row-hover); border-color: var(--lq-border); } .lq-form-builder-icon-button svg { width: 14px; height: 14px; } .lq-form-builder-preview { pointer-events: none; user-select: none; } .lq-form-builder-preview .lq-form-field, .lq-form-builder-preview .lq-form-markdown { font-size: 0.97em; } .lq-form-builder-item.is-editing .lq-form-builder-preview .lq-form-label, .lq-form-builder-item.is-editing .lq-form-builder-preview .lq-form-check-label { visibility: hidden; height: 0; } .lq-form-builder-inline { width: 100%; margin-bottom: 6px; padding: 4px 8px; font: inherit; font-weight: 600; color: var(--lq-fg); background: var(--lq-form-input-bg); border: 1px solid var(--lq-accent); border-radius: var(--lq-radius); } .lq-form-builder-container-title { margin: 0 0 8px; font-weight: 700; } .lq-form-builder-children { padding: 8px; background: var(--lq-header-bg); border: 1px dashed var(--lq-border); border-radius: var(--lq-radius); } .lq-form-builder-add-page { padding: 6px 10px; margin-bottom: 4px; color: var(--lq-accent); } .lq-form-builder-prop-group { margin: 0 0 14px; padding: 0; border: 0; } .lq-form-builder-prop-group > legend { width: 100%; margin-bottom: 8px; padding: 0 0 4px; font-size: 0.75em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lq-muted-fg); border-bottom: 1px solid var(--lq-border); } .lq-form-builder-prop { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; } .lq-form-builder-prop--check { flex-direction: row; gap: 8px; align-items: center; } .lq-form-builder-prop label, .lq-form-builder-prop-label { font-size: 0.88em; font-weight: 600; } .lq-form-builder-prop input[type="text"], .lq-form-builder-prop input[type="number"], .lq-form-builder-prop select, .lq-form-builder-prop textarea, .lq-form-builder-list-row input, .lq-form-builder-expr-input { width: 100%; min-height: 30px; padding: 4px 8px; font: inherit; color: var(--lq-fg); background: var(--lq-form-input-bg); border: 1px solid var(--lq-form-input-border); border-radius: var(--lq-radius); } .lq-form-builder-expr-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; } .lq-form-builder-prop [aria-invalid="true"] { border-color: var(--lq-form-danger); } .lq-form-builder-prop-error { font-size: 0.85em; color: var(--lq-form-danger); } .lq-form-builder-prop-warning { font-size: 0.85em; color: var(--lq-muted-fg); } .lq-form-builder-expr { position: relative; } .lq-form-builder-suggestions { position: absolute; z-index: 5; top: 100%; inset-inline: 0; max-height: 200px; margin: 2px 0 0; padding: 4px; overflow: auto; list-style: none; background: var(--lq-bg); border: 1px solid var(--lq-border); border-radius: var(--lq-radius); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); } .lq-form-builder-suggestion { padding: 4px 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; cursor: pointer; border-radius: 4px; } .lq-form-builder-suggestion[aria-selected="true"], .lq-form-builder-suggestion:hover { color: var(--lq-accent-fg); background: var(--lq-accent); } .lq-form-builder-list { display: flex; flex-direction: column; gap: 4px; } .lq-form-builder-list-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 4px; align-items: center; } .lq-form-builder-list-row--rule { grid-template-columns: minmax(0, 1fr) auto; padding: 6px; background: var(--lq-header-bg); border-radius: var(--lq-radius); } .lq-form-builder-row-actions { display: flex; gap: 2px; } .lq-form-builder-small-button { padding: 3px 8px; font-size: 0.88em; border-color: var(--lq-border); background: var(--lq-bg); } .lq-form-builder-element-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; } .lq-form-builder-props-heading { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; font-size: 1em; } .lq-form-builder-props-empty { color: var(--lq-muted-fg); } .lq-form-builder-json { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 12px; background: var(--lq-bg); } .lq-form-builder-json-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .lq-form-builder-json-status { font-size: 0.9em; color: var(--lq-muted-fg); } .lq-form-builder-json-text { flex: 1; min-height: 320px; padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; tab-size: 2; color: var(--lq-fg); background: var(--lq-form-input-bg); border: 1px solid var(--lq-form-input-border); border-radius: var(--lq-radius); resize: none; } .lq-form-builder-issues { max-height: 160px; margin: 0; padding: 0; overflow: auto; list-style: none; } .lq-form-builder-issue { padding: 3px 0; font-size: 0.9em; } .lq-form-builder-issue--error { color: var(--lq-form-danger); } .lq-form-builder-issue--warning { color: var(--lq-muted-fg); } .lq-form-builder-issue code { margin-inline-end: 6px; font-size: 0.9em; } .lq-form-builder-preview-pane { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; height: 100%; min-height: 0; padding: 16px; overflow: auto; } .lq-form-builder-result { display: flex; flex-direction: column; gap: 8px; min-height: 0; } .lq-form-builder-result pre { flex: 1; margin: 0; padding: 10px 12px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--lq-bg); border: 1px solid var(--lq-border); border-radius: var(--lq-radius); } .lq-form-builder-modal-backdrop { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, 0.45); } .lq-form-builder-modal { display: flex; flex-direction: column; gap: 10px; width: min(640px, 100%); max-height: 90vh; padding: 16px; color: var(--lq-fg); background: var(--lq-bg); border: 1px solid var(--lq-border); border-radius: calc(var(--lq-radius) * 1.5); box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28); } .lq-form-builder-modal h2 { margin: 0; font-size: 1.1em; } .lq-form-builder-modal textarea { min-height: 280px; } .lq-form-builder-modal-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; } @media (max-width: 960px) { .lq-form-builder-designer { grid-template-columns: 180px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; } .lq-form-builder-properties { grid-column: 1 / -1; max-height: 40vh; border-top: 1px solid var(--lq-border); border-inline-start: 0; } .lq-form-builder-preview-pane { grid-template-columns: minmax(0, 1fr); } } @media (prefers-reduced-motion: reduce) { .lq-form *, .lq-form *::before, .lq-form *::after, .lq-form-builder *, .lq-form-builder *::before, .lq-form-builder *::after { transition: none !important; animation: none !important; } } @media (forced-colors: active) { .lq-form :focus-visible, .lq-form-builder :focus-visible, .lq-form-rating-item:has(input:focus-visible) { outline: 2px solid Highlight; } .lq-form-builder-tab[aria-selected="true"], .lq-form-builder-item[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -2px; } } `
```

### JSON_SCHEMA_DRAFT

Kind: const. Import from `@birchui/forms`.

```ts
const JSON_SCHEMA_DRAFT: "https://json-schema.org/draft/2020-12/schema" = 'https://json-schema.org/draft/2020-12/schema'
```

### MAX_EXPRESSION_LENGTH

Kind: const. Import from `@birchui/forms`.

```ts
const MAX_EXPRESSION_LENGTH: 4000 = 4000
```

### NAME_PATTERN

Kind: const. Import from `@birchui/forms`.

```ts
const NAME_PATTERN: RegExp
```

### CheckboxField

Kind: interface. Import from `@birchui/forms`.

```ts
interface CheckboxField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'checkbox'` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### CheckboxGroupField

Kind: interface. Import from `@birchui/forms`.

```ts
interface CheckboxGroupField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'checkboxgroup'` |  |
| `choices` | `Choice[]` |  |
| `inline?` | `boolean` |  |
| `minSelected?` | `number` |  |
| `maxSelected?` | `number` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### CheckExpressionOptions

Kind: interface. Import from `@birchui/forms`.

```ts
interface CheckExpressionOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `fields?` | `readonly string[]` |  |
| `functions?` | `readonly string[]` |  |

### ChoiceItem

Kind: interface. Import from `@birchui/forms`.

```ts
interface ChoiceItem
```

| Property | Type | Description |
| --- | --- | --- |
| `value` | `ChoiceValue` |  |
| `text?` | `LocalizedString` |  |
| `visibleIf?` | `string` |  |

### CompiledExpression

Kind: interface. Import from `@birchui/forms`.

```ts
interface CompiledExpression
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly source` | `string` |  |
| `readonly ok` | `boolean` |  |
| `readonly errors` | `readonly ExpressionDiagnostic[]` |  |
| `readonly variables` | `readonly string[]` |  |
| `readonly functions` | `readonly string[]` |  |
| `evaluate` | `(context?: EvaluationContext) => unknown` |  |

### ComputedField

Kind: interface. Import from `@birchui/forms`.

```ts
interface ComputedField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'computed'` |  |
| `expression` | `string` |  |
| `format?` | `'number' \| 'currency' \| 'percent' \| 'text'` |  |
| `currency?` | `string` |  |
| `decimals?` | `number` |  |
| `display?` | `boolean` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### CustomValidatorContext

Kind: interface. Import from `@birchui/forms`.

```ts
interface CustomValidatorContext
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `data` | `FormValues` |  |
| `field` | `FieldSchema` |  |
| `params?` | `Record<string, unknown>` |  |

### CustomValidatorRef

Kind: interface. Import from `@birchui/forms`.

```ts
interface CustomValidatorRef
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'custom'` |  |
| `name` | `string` |  |
| `message?` | `LocalizedString` |  |
| `params?` | `Record<string, unknown>` |  |

### DateField

Kind: interface. Import from `@birchui/forms`.

```ts
interface DateField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'date'` |  |
| `min?` | `string` |  |
| `max?` | `string` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### DateTimeField

Kind: interface. Import from `@birchui/forms`.

```ts
interface DateTimeField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'datetime'` |  |
| `min?` | `string` |  |
| `max?` | `string` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### DraftMeta

Kind: interface. Import from `@birchui/forms`.

```ts
interface DraftMeta
```

| Property | Type | Description |
| --- | --- | --- |
| `page` | `string` |  |
| `pageIndex` | `number` |  |

### DynamicPanelElement

Kind: interface. Import from `@birchui/forms`.

```ts
interface DynamicPanelElement extends ElementBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'dynamicpanel'` |  |
| `name` | `string` |  |
| `elements` | `ElementSchema[]` |  |
| `templateTitle?` | `LocalizedString` |  |
| `minPanels?` | `number` |  |
| `maxPanels?` | `number` |  |
| `initialPanels?` | `number` |  |
| `addText?` | `LocalizedString` |  |
| `removeText?` | `LocalizedString` |  |
| `required?` | `boolean` |  |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### ElementBase

Kind: interface. Import from `@birchui/forms`.

```ts
interface ElementBase
```

| Property | Type | Description |
| --- | --- | --- |
| `name?` | `string` |  |
| `title?` | `LocalizedString` |  |
| `description?` | `LocalizedString` |  |
| `visibleIf?` | `string` |  |
| `enableIf?` | `string` |  |
| `width?` | `FieldWidth` |  |

### EmailField

Kind: interface. Import from `@birchui/forms`.

```ts
interface EmailField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'email'` |  |
| `autocomplete?` | `string` |  |
| `maxLength?` | `number` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### EvaluationContext

Kind: interface. Import from `@birchui/forms`.

```ts
interface EvaluationContext
```

| Property | Type | Description |
| --- | --- | --- |
| `data?` | `Record<string, unknown>` |  |
| `scope?` | `Record<string, unknown>` |  |
| `functions?` | `Readonly<Record<string, ExpressionFunction>>` |  |
| `onError?` | `(message: string) => void` |  |

### ExpressionDiagnostic

Kind: interface. Import from `@birchui/forms`.

```ts
interface ExpressionDiagnostic
```

| Property | Type | Description |
| --- | --- | --- |
| `message` | `string` |  |
| `start` | `number` |  |
| `end` | `number` |  |
| `severity` | `'error' \| 'warning'` |  |

### ExpressionValidator

Kind: interface. Import from `@birchui/forms`.

```ts
interface ExpressionValidator
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'expression'` |  |
| `expression` | `string` |  |
| `message?` | `LocalizedString` |  |

### FieldBase

Kind: interface. Import from `@birchui/forms`.

```ts
interface FieldBase extends ElementBase
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `placeholder?` | `LocalizedString` |  |
| `defaultValue?` | `unknown` |  |
| `required?` | `boolean` |  |
| `requiredIf?` | `string` |  |
| `requiredMessage?` | `LocalizedString` |  |
| `readOnly?` | `boolean` |  |
| `validators?` | `ValidatorSchema[]` |  |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### FieldError

Kind: interface. Import from `@birchui/forms`.

```ts
interface FieldError
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `message` | `string` |  |
| `label` | `string` |  |
| `page` | `number` |  |

### FileField

Kind: interface. Import from `@birchui/forms`.

```ts
interface FileField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'file'` |  |
| `accept?` | `string` |  |
| `multiple?` | `boolean` |  |
| `maxSize?` | `number` |  |
| `maxFiles?` | `number` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### FormApi

Kind: interface. Import from `@birchui/forms`.

```ts
interface FormApi extends Widget<FormOptions, FormEvents>
```

| Property | Type | Description |
| --- | --- | --- |
| `getData` | `() => FormValues` |  |
| `setData` | `(data: FormValues) => void` |  |
| `getValue` | `(name: string) => unknown` |  |
| `setValue` | `(name: string, value: unknown) => void` |  |
| `validate` | `() => Promise<ValidationResult>` |  |
| `submit` | `() => Promise<SubmitResult>` |  |
| `reset` | `() => void` |  |
| `getSchema` | `() => FormSchema` |  |
| `setSchema` | `(schema: FormSchema) => void` |  |
| `nextPage` | `() => Promise<boolean>` |  |
| `prevPage` | `() => boolean` |  |
| `goToPage` | `(page: string \| number) => boolean` |  |
| `getCurrentPage` | `() => PageInfo` |  |
| `getErrors` | `() => FieldError[]` |  |
| `focusField` | `(name: string) => boolean` |  |
| `addPanel` | `(name: string) => void` |  |
| `removePanel` | `(name: string, index: number) => void` |  |
| `readonly element` | `HTMLElement` | Inherited from Widget. |
| `update` | `(options: Partial<FormOptions>) => void` | Inherited from Widget. |
| `on` | `<K extends keyof TEvents & string>(event: K, listener: Listener<TEvents[K]>) => () => void` | Inherited from Widget. |
| `destroy` | `() => void` | Inherited from Widget. |

### FormEvents

Kind: interface. Import from `@birchui/forms`.

```ts
interface FormEvents
```

| Property | Type | Description |
| --- | --- | --- |
| `ready` | `{ data: FormValues }` |  |
| `valueChange` | `{ name: string; value: unknown; data: FormValues }` |  |
| `formSubmit` | `{ data: FormValues }` |  |
| `validate` | `ValidationResult` |  |
| `pageChange` | `{ from: number; to: number; page: string }` |  |
| `formError` | `{ message: string; source?: string }` |  |

### FormMessages

Kind: interface. Import from `@birchui/forms`.

```ts
interface FormMessages
```

| Property | Type | Description |
| --- | --- | --- |
| `required` | `string` |  |
| `email` | `string` |  |
| `number` | `string` |  |
| `integer` | `string` |  |
| `min` | `string` |  |
| `max` | `string` |  |
| `minLength` | `string` |  |
| `maxLength` | `string` |  |
| `pattern` | `string` |  |
| `minDate` | `string` |  |
| `maxDate` | `string` |  |
| `minSelected` | `string` |  |
| `maxSelected` | `string` |  |
| `fileType` | `string` |  |
| `fileSize` | `string` |  |
| `maxFiles` | `string` |  |
| `matrixRequired` | `string` |  |
| `minPanels` | `string` |  |
| `maxPanels` | `string` |  |
| `invalid` | `string` |  |
| `next` | `string` |  |
| `prev` | `string` |  |
| `submit` | `string` |  |
| `progress` | `string` |  |
| `errorSummary` | `string` |  |
| `addPanel` | `string` |  |
| `removePanel` | `string` |  |
| `selectPlaceholder` | `string` |  |
| `removeFile` | `string` |  |
| `noFiles` | `string` |  |
| `signatureClear` | `string` |  |
| `signatureType` | `string` |  |
| `signatureDraw` | `string` |  |
| `signatureTypedLabel` | `string` |  |
| `signaturePad` | `string` |  |
| `signatureSigned` | `string` |  |
| `ratingValue` | `string` |  |
| `sliderNotSet` | `string` |  |
| `toggleOn` | `string` |  |
| `toggleOff` | `string` |  |
| `completed` | `string` |  |

### FormOptions

Kind: interface. Import from `@birchui/forms`.

```ts
interface FormOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `schema` | `FormSchema` |  |
| `data?` | `FormValues` |  |
| `locale?` | `string` |  |
| `messages?` | `Partial<FormMessages>` |  |
| `localeText?` | `LocaleTextInput` |  |
| `rtl?` | `boolean` |  |
| `validateOn?` | `ValidateOn` |  |
| `readOnly?` | `boolean` |  |
| `density?` | `Density` |  |
| `theme?` | `'light' \| 'dark' \| 'auto'` |  |
| `injectStyles?` | `boolean` |  |
| `functions?` | `Record<string, ExpressionFunction>` |  |
| `customValidators?` | `Record<string, CustomValidator>` |  |
| `clearHiddenValues?` | `ClearHiddenValues` |  |
| `showErrorSummary?` | `boolean` |  |
| `initialPage?` | `string \| number` |  |
| `onDraft?` | `(data: FormValues, meta: DraftMeta) => void` |  |
| `draftDelay?` | `number` |  |

### FormSchema

Kind: interface. Import from `@birchui/forms`.

```ts
interface FormSchema
```

| Property | Type | Description |
| --- | --- | --- |
| `title?` | `LocalizedString` |  |
| `description?` | `LocalizedString` |  |
| `locale?` | `string` |  |
| `pages?` | `PageSchema[]` |  |
| `elements?` | `ElementSchema[]` |  |
| `showProgressBar?` | `boolean` |  |
| `showPageTitles?` | `boolean` |  |
| `nextText?` | `LocalizedString` |  |
| `prevText?` | `LocalizedString` |  |
| `submitText?` | `LocalizedString` |  |
| `completedMessage?` | `LocalizedString` |  |

### FromJsonSchemaOptions

Kind: interface. Import from `@birchui/forms`.

```ts
interface FromJsonSchemaOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `onWarning?` | `(message: string, path: string) => void` |  |

### HiddenField

Kind: interface. Import from `@birchui/forms`.

```ts
interface HiddenField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'hidden'` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### JsonSchema

Kind: interface. Import from `@birchui/forms`.

```ts
interface JsonSchema
[keyword: string]: unknown
```

| Property | Type | Description |
| --- | --- | --- |
| `$schema?` | `string` |  |
| `$id?` | `string` |  |
| `$ref?` | `string` |  |
| `$defs?` | `Record<string, JsonSchema>` |  |
| `definitions?` | `Record<string, JsonSchema>` |  |
| `type?` | `string \| string[]` |  |
| `title?` | `string` |  |
| `description?` | `string` |  |
| `default?` | `unknown` |  |
| `enum?` | `unknown[]` |  |
| `const?` | `unknown` |  |
| `oneOf?` | `JsonSchema[]` |  |
| `anyOf?` | `JsonSchema[]` |  |
| `properties?` | `Record<string, JsonSchema>` |  |
| `required?` | `string[]` |  |
| `additionalProperties?` | `boolean \| JsonSchema` |  |
| `items?` | `JsonSchema` |  |
| `minimum?` | `number` |  |
| `maximum?` | `number` |  |
| `exclusiveMinimum?` | `number` |  |
| `exclusiveMaximum?` | `number` |  |
| `minLength?` | `number` |  |
| `maxLength?` | `number` |  |
| `pattern?` | `string` |  |
| `format?` | `string` |  |
| `minItems?` | `number` |  |
| `maxItems?` | `number` |  |
| `uniqueItems?` | `boolean` |  |
| `readOnly?` | `boolean` |  |
| `contentMediaType?` | `string` |  |
| `contentEncoding?` | `string` |  |
| `x-birchui?` | `Record<string, unknown>` |  |

### MarkdownElement

Kind: interface. Import from `@birchui/forms`.

```ts
interface MarkdownElement extends ElementBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'markdown'` |  |
| `content` | `LocalizedString` |  |
| `name?` | `string \| undefined` | Inherited from ElementBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### MatrixField

Kind: interface. Import from `@birchui/forms`.

```ts
interface MatrixField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'matrix'` |  |
| `rows` | `Choice[]` |  |
| `columns` | `Choice[]` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### MultiSelectField

Kind: interface. Import from `@birchui/forms`.

```ts
interface MultiSelectField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'multiselect'` |  |
| `choices` | `Choice[]` |  |
| `minSelected?` | `number` |  |
| `maxSelected?` | `number` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### NumberField

Kind: interface. Import from `@birchui/forms`.

```ts
interface NumberField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'number'` |  |
| `min?` | `number` |  |
| `max?` | `number` |  |
| `step?` | `number` |  |
| `integer?` | `boolean` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### PageInfo

Kind: interface. Import from `@birchui/forms`.

```ts
interface PageInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `index` | `number` |  |
| `visibleIndex` | `number` |  |
| `visibleCount` | `number` |  |

### PageSchema

Kind: interface. Import from `@birchui/forms`.

```ts
interface PageSchema
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `title?` | `LocalizedString` |  |
| `description?` | `LocalizedString` |  |
| `visibleIf?` | `string` |  |
| `elements` | `ElementSchema[]` |  |

### PanelElement

Kind: interface. Import from `@birchui/forms`.

```ts
interface PanelElement extends ElementBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'panel'` |  |
| `elements` | `ElementSchema[]` |  |
| `collapsible?` | `boolean` |  |
| `collapsed?` | `boolean` |  |
| `name?` | `string \| undefined` | Inherited from ElementBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### ParseResult

Kind: interface. Import from `@birchui/forms`.

```ts
interface ParseResult
```

| Property | Type | Description |
| --- | --- | --- |
| `source` | `string` |  |
| `ast` | `ExpressionNode \| null` |  |
| `errors` | `ExpressionDiagnostic[]` |  |
| `variables` | `string[]` |  |
| `functions` | `string[]` |  |

### RadioField

Kind: interface. Import from `@birchui/forms`.

```ts
interface RadioField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'radio'` |  |
| `choices` | `Choice[]` |  |
| `inline?` | `boolean` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### RatingField

Kind: interface. Import from `@birchui/forms`.

```ts
interface RatingField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'rating'` |  |
| `min?` | `number` |  |
| `max?` | `number` |  |
| `display?` | `'stars' \| 'numbers'` |  |
| `minLabel?` | `LocalizedString` |  |
| `maxLabel?` | `LocalizedString` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### SchemaIssue

Kind: interface. Import from `@birchui/forms`.

```ts
interface SchemaIssue
```

| Property | Type | Description |
| --- | --- | --- |
| `path` | `string` |  |
| `message` | `string` |  |
| `severity` | `'error' \| 'warning'` |  |

### SelectField

Kind: interface. Import from `@birchui/forms`.

```ts
interface SelectField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'select'` |  |
| `choices` | `Choice[]` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### SignatureField

Kind: interface. Import from `@birchui/forms`.

```ts
interface SignatureField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'signature'` |  |
| `height?` | `number` |  |
| `penColor?` | `string` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### SliderField

Kind: interface. Import from `@birchui/forms`.

```ts
interface SliderField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'slider'` |  |
| `min?` | `number` |  |
| `max?` | `number` |  |
| `step?` | `number` |  |
| `unit?` | `string` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### SubmitResult

Kind: interface. Import from `@birchui/forms`.

```ts
interface SubmitResult extends ValidationResult
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `FormValues` |  |
| `valid` | `boolean` | Inherited from ValidationResult. |
| `errors` | `FieldError[]` | Inherited from ValidationResult. |

### TextareaField

Kind: interface. Import from `@birchui/forms`.

```ts
interface TextareaField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'textarea'` |  |
| `rows?` | `number` |  |
| `minLength?` | `number` |  |
| `maxLength?` | `number` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### TextField

Kind: interface. Import from `@birchui/forms`.

```ts
interface TextField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'text'` |  |
| `inputType?` | `'text' \| 'tel' \| 'url' \| 'password' \| 'search'` |  |
| `autocomplete?` | `string` |  |
| `minLength?` | `number` |  |
| `maxLength?` | `number` |  |
| `pattern?` | `string` |  |
| `patternMessage?` | `LocalizedString` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### TimeField

Kind: interface. Import from `@birchui/forms`.

```ts
interface TimeField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'time'` |  |
| `min?` | `string` |  |
| `max?` | `string` |  |
| `step?` | `number` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### ToggleField

Kind: interface. Import from `@birchui/forms`.

```ts
interface ToggleField extends FieldBase
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'toggle'` |  |
| `onText?` | `LocalizedString` |  |
| `offText?` | `LocalizedString` |  |
| `name` | `string` | Inherited from FieldBase. |
| `placeholder?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `defaultValue?` | `unknown` | Inherited from FieldBase. |
| `required?` | `boolean \| undefined` | Inherited from FieldBase. |
| `requiredIf?` | `string \| undefined` | Inherited from FieldBase. |
| `requiredMessage?` | `LocalizedString \| undefined` | Inherited from FieldBase. |
| `readOnly?` | `boolean \| undefined` | Inherited from FieldBase. |
| `validators?` | `ValidatorSchema[] \| undefined` | Inherited from FieldBase. |
| `title?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `description?` | `LocalizedString \| undefined` | Inherited from ElementBase. |
| `visibleIf?` | `string \| undefined` | Inherited from ElementBase. |
| `enableIf?` | `string \| undefined` | Inherited from ElementBase. |
| `width?` | `FieldWidth \| undefined` | Inherited from ElementBase. |

### ToJsonSchemaOptions

Kind: interface. Import from `@birchui/forms`.

```ts
interface ToJsonSchemaOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `locale?` | `string` |  |
| `extensions?` | `boolean` |  |

### ValidateSchemaOptions

Kind: interface. Import from `@birchui/forms`.

```ts
interface ValidateSchemaOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `functions?` | `readonly string[]` |  |

### ValidationResult

Kind: interface. Import from `@birchui/forms`.

```ts
interface ValidationResult
```

| Property | Type | Description |
| --- | --- | --- |
| `valid` | `boolean` |  |
| `errors` | `FieldError[]` |  |

### WalkInfo

Kind: interface. Import from `@birchui/forms`.

```ts
interface WalkInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `path` | `number[]` |  |
| `parent` | `PanelElement \| DynamicPanelElement \| null` |  |
| `dynamic` | `DynamicPanelElement \| null` |  |

### Choice

Kind: type. Import from `@birchui/forms`.

```ts
type Choice = ChoiceValue | ChoiceItem;
```

### ChoiceValue

Kind: type. Import from `@birchui/forms`.

```ts
type ChoiceValue = string | number;
```

### ClearHiddenValues

Kind: type. Import from `@birchui/forms`.

```ts
type ClearHiddenValues = 'onSubmit' | 'onHidden' | 'never';
```

### ContainerType

Kind: type. Import from `@birchui/forms`.

```ts
type ContainerType = 'panel' | 'dynamicpanel';
```

### CustomValidator

Kind: type. Import from `@birchui/forms`.

```ts
type CustomValidator = (
  value: unknown,
  context: CustomValidatorContext,
) => CustomValidatorResult | Promise<CustomValidatorResult>;
```

### CustomValidatorResult

Kind: type. Import from `@birchui/forms`.

```ts
type CustomValidatorResult = boolean | string | null | undefined;
```

### Density

Kind: type. Import from `@birchui/forms`.

```ts
type Density = 'compact' | 'comfortable' | 'spacious';
```

### ElementSchema

Kind: type. Import from `@birchui/forms`.

```ts
type ElementSchema = FieldSchema | MarkdownElement | PanelElement | DynamicPanelElement;
```

### ElementType

Kind: type. Import from `@birchui/forms`.

```ts
type ElementType = FieldType | ContainerType;
```

### ExpressionFunction

Kind: type. Import from `@birchui/forms`.

```ts
type ExpressionFunction = (...args: unknown[]) => unknown;
```

### ExpressionNode

Kind: type. Import from `@birchui/forms`.

```ts
type ExpressionNode =
  | (NodeSpan & { kind: 'literal'; value: string | number | boolean | null })
  | (NodeSpan & { kind: 'variable'; path: PathSegment[]; raw: string })
  | (NodeSpan & { kind: 'list'; items: ExpressionNode[] })
  | (NodeSpan & { kind: 'call'; name: string; args: ExpressionNode[] })
  | (NodeSpan & { kind: 'unary'; op: '-' | '+' | 'not'; operand: ExpressionNode })
  | (NodeSpan & { kind: 'binary'; op: BinaryOperator; left: ExpressionNode; right: ExpressionNode })
  | (NodeSpan & { kind: 'postfix'; op: 'empty' | 'notempty'; operand: ExpressionNode });
```

### FieldSchema

Kind: type. Import from `@birchui/forms`.

```ts
type FieldSchema =
  | TextField
  | EmailField
  | NumberField
  | TextareaField
  | SelectField
  | MultiSelectField
  | RadioField
  | CheckboxField
  | CheckboxGroupField
  | ToggleField
  | DateField
  | TimeField
  | DateTimeField
  | RatingField
  | SliderField
  | FileField
  | SignatureField
  | MatrixField
  | HiddenField
  | ComputedField;
```

### FieldType

Kind: type. Import from `@birchui/forms`.

```ts
type FieldType =
  | 'text'
  | 'email'
  | 'number'
  | 'textarea'
  | 'select'
  | 'multiselect'
  | 'radio'
  | 'checkbox'
  | 'checkboxgroup'
  | 'toggle'
  | 'date'
  | 'time'
  | 'datetime'
  | 'rating'
  | 'slider'
  | 'file'
  | 'signature'
  | 'matrix'
  | 'markdown'
  | 'hidden'
  | 'computed';
```

### FieldWidth

Kind: type. Import from `@birchui/forms`.

```ts
type FieldWidth = 'full' | 'half' | 'third' | 'two-thirds';
```

### FormValues

Kind: type. Import from `@birchui/forms`.

```ts
type FormValues = Record<string, unknown>;
```

### LocalizedString

Kind: type. Import from `@birchui/forms`.

```ts
type LocalizedString = string | Readonly<Record<string, string>>;
```

### NormalizedSchema

Kind: type. Import from `@birchui/forms`.

```ts
type NormalizedSchema = Omit<FormSchema, 'elements' | 'pages'> & { pages: PageSchema[] };
```

### ValidateOn

Kind: type. Import from `@birchui/forms`.

```ts
type ValidateOn = 'blur' | 'change' | 'submit';
```

### ValidatorSchema

Kind: type. Import from `@birchui/forms`.

```ts
type ValidatorSchema = ExpressionValidator | CustomValidatorRef;
```

## @birchui/forms/builder

### createDefaultElement

Kind: function. Import from `@birchui/forms/builder`.

```ts
function createDefaultElement(type: ElementType, nameFor: (base: string) => string, tr: Translate = createTranslator()): ElementSchema
```

| Parameter | Type | Description |
| --- | --- | --- |
| `type` | `ElementType` |  |
| `nameFor` | `(base: string) => string` |  |
| `tr?` | `Translate` |  |

### createFormBuilder

Kind: function. Import from `@birchui/forms/builder`.

```ts
function createFormBuilder(container: HTMLElement, options: FormBuilderOptions = {}): FormBuilderApi
```

| Parameter | Type | Description |
| --- | --- | --- |
| `container` | `HTMLElement` |  |
| `options?` | `FormBuilderOptions` |  |

### typeLabel

Kind: function. Import from `@birchui/forms/builder`.

```ts
function typeLabel(type: string, tr?: Translate): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `type` | `string` |  |
| `tr?` | `Translate` |  |

### formBuilderDefinition

Kind: const. Import from `@birchui/forms/builder`.

```ts
const formBuilderDefinition: WidgetDefinition<FormBuilderOptions, FormBuilderEvents, FormBuilderApi>
```

### TOOLBOX_ITEMS

Kind: const. Import from `@birchui/forms/builder`.

```ts
const TOOLBOX_ITEMS: readonly ToolboxItem[]
```

### BuilderSelection

Kind: interface. Import from `@birchui/forms/builder`.

```ts
interface BuilderSelection
```

| Property | Type | Description |
| --- | --- | --- |
| `kind` | `SelectionKind` |  |
| `path` | `number[] \| null` |  |
| `element` | `ElementSchema \| PageSchema \| null` |  |

### FormBuilderApi

Kind: interface. Import from `@birchui/forms/builder`.

```ts
interface FormBuilderApi extends Widget<FormBuilderOptions, FormBuilderEvents>
```

| Property | Type | Description |
| --- | --- | --- |
| `getSchema` | `() => FormSchema` |  |
| `setSchema` | `(schema: FormSchema) => void` |  |
| `undo` | `() => boolean` |  |
| `redo` | `() => boolean` |  |
| `canUndo` | `() => boolean` |  |
| `canRedo` | `() => boolean` |  |
| `select` | `(ref: ElementRef \| null) => boolean` |  |
| `getSelection` | `() => BuilderSelection` |  |
| `addElement` | `(type: ElementType, at?: ElementPath) => number[] \| null` |  |
| `removeElement` | `(ref: ElementRef) => boolean` |  |
| `moveElement` | `(from: ElementRef, to: ElementPath) => number[] \| null` |  |
| `duplicateElement` | `(ref?: ElementRef) => number[] \| null` |  |
| `updateElement` | `(ref: ElementRef, patch: Record<string, unknown>) => boolean` |  |
| `copy` | `(ref?: ElementRef) => boolean` |  |
| `cut` | `(ref?: ElementRef) => boolean` |  |
| `paste` | `(at?: ElementPath) => number[] \| null` |  |
| `addPage` | `() => number` |  |
| `removePage` | `(index: number) => boolean` |  |
| `setActiveTab` | `(tab: BuilderTab) => void` |  |
| `getActiveTab` | `() => BuilderTab` |  |
| `exportJSONSchema` | `() => JsonSchema` |  |
| `importJSONSchema` | `(jsonSchema: JsonSchema) => void` |  |
| `save` | `() => void` |  |
| `readonly element` | `HTMLElement` | Inherited from Widget. |
| `update` | `(options: Partial<FormBuilderOptions>) => void` | Inherited from Widget. |
| `on` | `<K extends "ready" \| "selectionChange" \| "save" \| "schemaChange">(event: K, listener: Listener<FormBuilderEvents[K]>) => () => void` | Inherited from Widget. |
| `destroy` | `() => void` | Inherited from Widget. |

### FormBuilderEvents

Kind: interface. Import from `@birchui/forms/builder`.

```ts
interface FormBuilderEvents
```

| Property | Type | Description |
| --- | --- | --- |
| `ready` | `{ schema: FormSchema }` |  |
| `schemaChange` | `{ schema: FormSchema; reason: string }` |  |
| `selectionChange` | `BuilderSelection` |  |
| `save` | `{ schema: FormSchema }` |  |

### FormBuilderOptions

Kind: interface. Import from `@birchui/forms/builder`.

```ts
interface FormBuilderOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `schema?` | `FormSchema` |  |
| `licenseKey?` | `string` |  |
| `locale?` | `string` |  |
| `localeText?` | `LocaleTextInput` |  |
| `rtl?` | `boolean` |  |
| `theme?` | `'light' \| 'dark' \| 'auto'` |  |
| `density?` | `Density` |  |
| `injectStyles?` | `boolean` |  |
| `toolbox?` | `readonly ElementType[]` |  |
| `functions?` | `Record<string, ExpressionFunction>` |  |
| `customValidators?` | `Record<string, CustomValidator>` |  |
| `previewData?` | `FormValues` |  |
| `initialTab?` | `BuilderTab` |  |

### ToolboxItem

Kind: interface. Import from `@birchui/forms/builder`.

```ts
interface ToolboxItem
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `ElementType` |  |
| `label` | `string` |  |
| `group` | `ToolboxGroup` |  |

### BuilderTab

Kind: type. Import from `@birchui/forms/builder`.

```ts
type BuilderTab = 'designer' | 'json' | 'preview';
```

### ElementPath

Kind: type. Import from `@birchui/forms/builder`.

```ts
type ElementPath = readonly number[];
```

### ElementRef

Kind: type. Import from `@birchui/forms/builder`.

```ts
type ElementRef = string | ElementPath;
```

### SelectionKind

Kind: type. Import from `@birchui/forms/builder`.

```ts
type SelectionKind = 'form' | 'page' | 'element';
```

### ToolboxGroup

Kind: type. Import from `@birchui/forms/builder`.

```ts
type ToolboxGroup = 'Basic' | 'Choice' | 'Date and time' | 'Advanced' | 'Layout';
```
