@birchui/forms
Forms: the MIT JSON form renderer (createForm, expressions, validation, JSON Schema) and the commercial Form Builder.
Key exports: createForm, FormSchema, FormOptions, FormApi, FormEvents, createFormBuilder, FormBuilderApi
Guides: Accessibility, Form Builder API, Form Builder, Repeating sections, Expressions, Field types
@birchui/forms#
availableLocalesfunction#
function availableLocales(): string[]Defined in packages/forms/src/i18n.ts:194
checkExpressionfunction#
function checkExpression(source: string, options: CheckExpressionOptions = {}): ExpressionDiagnostic[]| Parameter | Type | Description |
|---|---|---|
source | string | — |
optionsoptional | CheckExpressionOptions | — |
Defined in packages/forms/src/expression/index.ts:164
collectFieldNamesfunction#
function collectFieldNames(schema: NormalizedSchema): string[]| Parameter | Type | Description |
|---|---|---|
schema | NormalizedSchema | — |
Defined in packages/forms/src/schema.ts:143
compileExpressionfunction#
function compileExpression(source: string): CompiledExpression| Parameter | Type | Description |
|---|---|---|
source | string | — |
Defined in packages/forms/src/expression/index.ts:145
createFormfunction#
function createForm(container: HTMLElement, options: FormOptions): FormApi| Parameter | Type | Description |
|---|---|---|
container | HTMLElement | — |
options | FormOptions | — |
Defined in packages/forms/src/render/form.ts:48
evaluateExpressionfunction#
function evaluateExpression(source: string, context: EvaluationContext = {}): unknown| Parameter | Type | Description |
|---|---|---|
source | string | — |
contextoptional | EvaluationContext | — |
Defined in packages/forms/src/expression/index.ts:155
formatMessagefunction#
function formatMessage(template: string, params: Record<string, unknown> = {}): string| Parameter | Type | Description |
|---|---|---|
template | string | — |
paramsoptional | Record<string, unknown> | — |
Defined in packages/forms/src/i18n.ts:210
fromJSONSchemafunction#
function fromJSONSchema(jsonSchema: JsonSchema, options: FromJsonSchemaOptions = {}): FormSchema| Parameter | Type | Description |
|---|---|---|
jsonSchema | JsonSchema | — |
optionsoptional | FromJsonSchemaOptions | — |
Defined in packages/forms/src/json-schema.ts:452
getMessagesfunction#
function getMessages(locale: string | undefined, overrides?: Partial<FormMessages>): FormMessages| Parameter | Type | Description |
|---|---|---|
locale | string | undefined | — |
overridesoptional | Partial<FormMessages> | — |
Defined in packages/forms/src/i18n.ts:185
listFunctionNamesfunction#
function listFunctionNames(custom?: Readonly<Record<string, ExpressionFunction>>): string[]| Parameter | Type | Description |
|---|---|---|
customoptional | Readonly<Record<string, ExpressionFunction>> | — |
Defined in packages/forms/src/expression/index.ts:210
localizefunction#
function localize(text: LocalizedString | undefined | null, locale: string = DEFAULT_LOCALE): string| Parameter | Type | Description |
|---|---|---|
text | LocalizedString | undefined | null | — |
localeoptional | string | — |
Defined in packages/forms/src/i18n.ts:198
normalizeSchemafunction#
function normalizeSchema(schema: FormSchema): NormalizedSchema| Parameter | Type | Description |
|---|---|---|
schema | FormSchema | — |
Defined in packages/forms/src/schema.ts:76
parseExpressionfunction#
function parseExpression(source: string): ParseResult| Parameter | Type | Description |
|---|---|---|
source | string | — |
Defined in packages/forms/src/expression/parser.ts:463
registerLocalefunction#
function registerLocale(locale: string, messages: Partial<FormMessages>): void| Parameter | Type | Description |
|---|---|---|
locale | string | — |
messages | Partial<FormMessages> | — |
Defined in packages/forms/src/i18n.ts:190
renderMarkdownfunction#
function renderMarkdown(source: string, doc: Document): DocumentFragment| Parameter | Type | Description |
|---|---|---|
source | string | — |
doc | Document | — |
Defined in packages/forms/src/markdown.ts:55
toJSONSchemafunction#
function toJSONSchema(schema: FormSchema, options: ToJsonSchemaOptions = {}): JsonSchema| Parameter | Type | Description |
|---|---|---|
schema | FormSchema | — |
optionsoptional | ToJsonSchemaOptions | — |
Defined in packages/forms/src/json-schema.ts:231
validateSchemafunction#
function validateSchema(schema: unknown, options: ValidateSchemaOptions = {}): SchemaIssue[]| Parameter | Type | Description |
|---|---|---|
schema | unknown | — |
optionsoptional | ValidateSchemaOptions | — |
Defined in packages/forms/src/schema.ts:272
walkSchemafunction#
function walkSchema(schema: NormalizedSchema, visit: (element: ElementSchema, info: WalkInfo) => void | boolean): void| Parameter | Type | Description |
|---|---|---|
schema | NormalizedSchema | — |
visit | (element: ElementSchema, info: WalkInfo) => void | boolean | — |
Defined in packages/forms/src/schema.ts:120
BUILTIN_FUNCTIONSconst#
const BUILTIN_FUNCTIONS: Readonly<Record<string, ExpressionFunction>>Defined in packages/forms/src/expression/functions.ts:75
ELEMENT_TYPESconst#
const ELEMENT_TYPES: readonly ElementType[]Defined in packages/forms/src/schema.ts:40
FIELD_TYPESconst#
const FIELD_TYPES: readonly FieldType[]Defined in packages/forms/src/schema.ts:16
FORM_STYLE_IDconst#
const FORM_STYLE_ID: "lq-form-styles" = 'lq-form-styles'Defined in packages/forms/src/render/form.ts:23
formDefinitionconst#
const formDefinition: WidgetDefinition<FormOptions, FormEvents, FormApi>Defined in packages/forms/src/render/form.ts:787
formStylesconst#
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; } } `Defined in packages/forms/src/styles.ts:1
JSON_SCHEMA_DRAFTconst#
const JSON_SCHEMA_DRAFT: "https://json-schema.org/draft/2020-12/schema" = 'https://json-schema.org/draft/2020-12/schema'Defined in packages/forms/src/json-schema.ts:6
MAX_EXPRESSION_LENGTHconst#
const MAX_EXPRESSION_LENGTH: 4000 = 4000Defined in packages/forms/src/expression/parser.ts:60
NAME_PATTERNconst#
const NAME_PATTERN: RegExpDefined in packages/forms/src/schema.ts:45
CheckboxFieldinterface#
interface CheckboxField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'checkbox' | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:128
CheckboxGroupFieldinterface#
interface CheckboxGroupField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'checkboxgroup' | — |
choices | Choice[] | — |
inlineoptional | boolean | — |
minSelectedoptional | number | — |
maxSelectedoptional | number | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:132
CheckExpressionOptionsinterface#
interface CheckExpressionOptionsDefined in packages/forms/src/expression/index.ts:159
ChoiceIteminterface#
interface ChoiceItem| Property | Type | Description |
|---|---|---|
value | ChoiceValue | — |
textoptional | LocalizedString | — |
visibleIfoptional | string | — |
Defined in packages/forms/src/types.ts:36
CompiledExpressioninterface#
interface CompiledExpression| Property | Type | Description |
|---|---|---|
sourcereadonly | string | — |
okreadonly | boolean | — |
errorsreadonly | readonly ExpressionDiagnostic[] | — |
variablesreadonly | readonly string[] | — |
functionsreadonly | readonly string[] | — |
evaluate() | (context?: EvaluationContext) => unknown | — |
Defined in packages/forms/src/expression/index.ts:19
ComputedFieldinterface#
interface ComputedField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'computed' | — |
expression | string | — |
formatoptional | 'number' | 'currency' | 'percent' | 'text' | — |
currencyoptional | string | — |
decimalsoptional | number | — |
displayoptional | boolean | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:206
CustomValidatorContextinterface#
interface CustomValidatorContext| Property | Type | Description |
|---|---|---|
name | string | — |
data | FormValues | — |
field | FieldSchema | — |
paramsoptional | Record<string, unknown> | — |
Defined in packages/forms/src/types.ts:334
CustomValidatorRefinterface#
interface CustomValidatorRef| Property | Type | Description |
|---|---|---|
type | 'custom' | — |
name | string | — |
messageoptional | LocalizedString | — |
paramsoptional | Record<string, unknown> | — |
Defined in packages/forms/src/types.ts:50
DateFieldinterface#
interface DateField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'date' | — |
minoptional | string | — |
maxoptional | string | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:146
DateTimeFieldinterface#
interface DateTimeField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'datetime' | — |
minoptional | string | — |
maxoptional | string | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:159
DraftMetainterface#
interface DraftMetaDefined in packages/forms/src/types.ts:354
DynamicPanelElementinterface#
interface DynamicPanelElement extends ElementBase| Property | Type | Description |
|---|---|---|
type | 'dynamicpanel' | — |
name | string | — |
elements | ElementSchema[] | — |
templateTitleoptional | LocalizedString | — |
minPanelsoptional | number | — |
maxPanelsoptional | number | — |
initialPanelsoptional | number | — |
addTextoptional | LocalizedString | — |
removeTextoptional | LocalizedString | — |
requiredoptional | boolean | — |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:227
ElementBaseinterface#
interface ElementBase| Property | Type | Description |
|---|---|---|
nameoptional | string | — |
titleoptional | LocalizedString | — |
descriptionoptional | LocalizedString | — |
visibleIfoptional | string | — |
enableIfoptional | string | — |
widthoptional | FieldWidth | — |
Defined in packages/forms/src/types.ts:59
EmailFieldinterface#
interface EmailField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'email' | — |
autocompleteoptional | string | — |
maxLengthoptional | number | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:89
EvaluationContextinterface#
interface EvaluationContext| Property | Type | Description |
|---|---|---|
dataoptional | Record<string, unknown> | — |
scopeoptional | Record<string, unknown> | — |
functionsoptional | Readonly<Record<string, ExpressionFunction>> | — |
onErroroptional | (message: string) => void | — |
Defined in packages/forms/src/expression/index.ts:12
ExpressionDiagnosticinterface#
interface ExpressionDiagnosticDefined in packages/forms/src/expression/parser.ts:37
ExpressionValidatorinterface#
interface ExpressionValidator| Property | Type | Description |
|---|---|---|
type | 'expression' | — |
expression | string | — |
messageoptional | LocalizedString | — |
Defined in packages/forms/src/types.ts:44
FieldBaseinterface#
interface FieldBase extends ElementBase| Property | Type | Description |
|---|---|---|
name | string | — |
placeholderoptional | LocalizedString | — |
defaultValueoptional | unknown | — |
requiredoptional | boolean | — |
requiredIfoptional | string | — |
requiredMessageoptional | LocalizedString | — |
readOnlyoptional | boolean | — |
validatorsoptional | ValidatorSchema[] | — |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:68
FieldErrorinterface#
interface FieldErrorDefined in packages/forms/src/types.ts:380
FileFieldinterface#
interface FileField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'file' | — |
acceptoptional | string | — |
multipleoptional | boolean | — |
maxSizeoptional | number | — |
maxFilesoptional | number | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:182
FormApiinterface#
interface FormApi extends Widget<FormOptions, FormEvents>| Member | 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 | — |
elementreadonly | 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. |
Defined in packages/forms/src/types.ts:412
FormEventsinterface#
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 } | — |
Defined in packages/forms/src/types.ts:403
FormMessagesinterface#
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 | — |
Defined in packages/forms/src/types.ts:288
FormOptionsinterface#
interface FormOptions| Property | Type | Description |
|---|---|---|
schema | FormSchema | — |
dataoptional | FormValues | — |
localeoptional | string | — |
messagesoptional | Partial<FormMessages> | — |
localeTextoptional | LocaleTextInput | — |
rtloptional | boolean | — |
validateOnoptional | ValidateOn | — |
readOnlyoptional | boolean | — |
densityoptional | Density | — |
themeoptional | 'light' | 'dark' | 'auto' | — |
injectStylesoptional | boolean | — |
functionsoptional | Record<string, ExpressionFunction> | — |
customValidatorsoptional | Record<string, CustomValidator> | — |
showErrorSummaryoptional | boolean | — |
initialPageoptional | string | number | — |
onDraftoptional | (data: FormValues, meta: DraftMeta) => void | — |
draftDelayoptional | number | — |
Defined in packages/forms/src/types.ts:359
FormSchemainterface#
interface FormSchema| Property | Type | Description |
|---|---|---|
titleoptional | LocalizedString | — |
descriptionoptional | LocalizedString | — |
localeoptional | string | — |
pagesoptional | PageSchema[] | — |
elementsoptional | ElementSchema[] | — |
showProgressBaroptional | boolean | — |
showPageTitlesoptional | boolean | — |
nextTextoptional | LocalizedString | — |
prevTextoptional | LocalizedString | — |
submitTextoptional | LocalizedString | — |
completedMessageoptional | LocalizedString | — |
Defined in packages/forms/src/types.ts:272
FromJsonSchemaOptionsinterface#
interface FromJsonSchemaOptions| Property | Type | Description |
|---|---|---|
onWarningoptional | (message: string, path: string) => void | — |
Defined in packages/forms/src/json-schema.ts:50
HiddenFieldinterface#
interface HiddenField extends FieldBase| Property | Type | Description |
|---|
Defined in packages/forms/src/types.ts:202
JsonSchemainterface#
interface JsonSchema
[keyword: string]: unknown| Property | Type | Description |
|---|---|---|
$schemaoptional | string | — |
$idoptional | string | — |
$refoptional | string | — |
$defsoptional | Record<string, JsonSchema> | — |
definitionsoptional | Record<string, JsonSchema> | — |
typeoptional | string | string[] | — |
titleoptional | string | — |
descriptionoptional | string | — |
defaultoptional | unknown | — |
enumoptional | unknown[] | — |
constoptional | unknown | — |
oneOfoptional | JsonSchema[] | — |
anyOfoptional | JsonSchema[] | — |
propertiesoptional | Record<string, JsonSchema> | — |
requiredoptional | string[] | — |
additionalPropertiesoptional | boolean | JsonSchema | — |
itemsoptional | JsonSchema | — |
minimumoptional | number | — |
maximumoptional | number | — |
exclusiveMinimumoptional | number | — |
exclusiveMaximumoptional | number | — |
minLengthoptional | number | — |
maxLengthoptional | number | — |
patternoptional | string | — |
formatoptional | string | — |
minItemsoptional | number | — |
maxItemsoptional | number | — |
uniqueItemsoptional | boolean | — |
readOnlyoptional | boolean | — |
contentMediaTypeoptional | string | — |
contentEncodingoptional | string | — |
x-birchuioptional | Record<string, unknown> | — |
Defined in packages/forms/src/json-schema.ts:9
MarkdownElementinterface#
interface MarkdownElement extends ElementBase| Property | Type | Description |
|---|---|---|
type | 'markdown' | — |
content | LocalizedString | — |
nameoptional | string | undefined | Inherited from ElementBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:215
MatrixFieldinterface#
interface MatrixField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'matrix' | — |
rows | Choice[] | — |
columns | Choice[] | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:196
MultiSelectFieldinterface#
interface MultiSelectField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'multiselect' | — |
choices | Choice[] | — |
minSelectedoptional | number | — |
maxSelectedoptional | number | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:115
NumberFieldinterface#
interface NumberField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'number' | — |
minoptional | number | — |
maxoptional | number | — |
stepoptional | number | — |
integeroptional | boolean | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:95
PageInfointerface#
interface PageInfo| Property | Type | Description |
|---|---|---|
name | string | — |
index | number | — |
visibleIndex | number | — |
visibleCount | number | — |
Defined in packages/forms/src/types.ts:396
PageSchemainterface#
interface PageSchema| Property | Type | Description |
|---|---|---|
name | string | — |
titleoptional | LocalizedString | — |
descriptionoptional | LocalizedString | — |
visibleIfoptional | string | — |
elements | ElementSchema[] | — |
Defined in packages/forms/src/types.ts:264
PanelElementinterface#
interface PanelElement extends ElementBase| Property | Type | Description |
|---|---|---|
type | 'panel' | — |
elements | ElementSchema[] | — |
collapsibleoptional | boolean | — |
collapsedoptional | boolean | — |
nameoptional | string | undefined | Inherited from ElementBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:220
ParseResultinterface#
interface ParseResult| Property | Type | Description |
|---|---|---|
source | string | — |
ast | ExpressionNode | null | — |
errors | ExpressionDiagnostic[] | — |
variables | string[] | — |
functions | string[] | — |
Defined in packages/forms/src/expression/parser.ts:44
RadioFieldinterface#
interface RadioField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'radio' | — |
choices | Choice[] | — |
inlineoptional | boolean | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:122
RatingFieldinterface#
interface RatingField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'rating' | — |
minoptional | number | — |
maxoptional | number | — |
displayoptional | 'stars' | 'numbers' | — |
minLabeloptional | LocalizedString | — |
maxLabeloptional | LocalizedString | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:165
SchemaIssueinterface#
interface SchemaIssueDefined in packages/forms/src/schema.ts:147
SelectFieldinterface#
interface SelectField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'select' | — |
choices | Choice[] | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:110
SignatureFieldinterface#
interface SignatureField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'signature' | — |
heightoptional | number | — |
penColoroptional | string | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:190
SliderFieldinterface#
interface SliderField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'slider' | — |
minoptional | number | — |
maxoptional | number | — |
stepoptional | number | — |
unitoptional | string | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:174
SubmitResultinterface#
interface SubmitResult extends ValidationResult| Property | Type | Description |
|---|---|---|
data | FormValues | — |
valid | boolean | Inherited from ValidationResult. |
errors | FieldError[] | Inherited from ValidationResult. |
Defined in packages/forms/src/types.ts:392
TextareaFieldinterface#
interface TextareaField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'textarea' | — |
rowsoptional | number | — |
minLengthoptional | number | — |
maxLengthoptional | number | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:103
TextFieldinterface#
interface TextField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'text' | — |
inputTypeoptional | 'text' | 'tel' | 'url' | 'password' | 'search' | — |
autocompleteoptional | string | — |
minLengthoptional | number | — |
maxLengthoptional | number | — |
patternoptional | string | — |
patternMessageoptional | LocalizedString | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:79
TimeFieldinterface#
interface TimeField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'time' | — |
minoptional | string | — |
maxoptional | string | — |
stepoptional | number | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:152
ToggleFieldinterface#
interface ToggleField extends FieldBase| Property | Type | Description |
|---|---|---|
type | 'toggle' | — |
onTextoptional | LocalizedString | — |
offTextoptional | LocalizedString | — |
name | string | Inherited from FieldBase. |
placeholderoptional | LocalizedString | undefined | Inherited from FieldBase. |
defaultValueoptional | unknown | Inherited from FieldBase. |
requiredoptional | boolean | undefined | Inherited from FieldBase. |
requiredIfoptional | string | undefined | Inherited from FieldBase. |
requiredMessageoptional | LocalizedString | undefined | Inherited from FieldBase. |
readOnlyoptional | boolean | undefined | Inherited from FieldBase. |
validatorsoptional | ValidatorSchema[] | undefined | Inherited from FieldBase. |
titleoptional | LocalizedString | undefined | Inherited from ElementBase. |
descriptionoptional | LocalizedString | undefined | Inherited from ElementBase. |
visibleIfoptional | string | undefined | Inherited from ElementBase. |
enableIfoptional | string | undefined | Inherited from ElementBase. |
widthoptional | FieldWidth | undefined | Inherited from ElementBase. |
Defined in packages/forms/src/types.ts:140
ToJsonSchemaOptionsinterface#
interface ToJsonSchemaOptions| Property | Type | Description |
|---|---|---|
localeoptional | string | — |
extensionsoptional | boolean | — |
Defined in packages/forms/src/json-schema.ts:45
ValidateSchemaOptionsinterface#
interface ValidateSchemaOptions| Property | Type | Description |
|---|---|---|
functionsoptional | readonly string[] | — |
Defined in packages/forms/src/schema.ts:153
ValidationResultinterface#
interface ValidationResult| Property | Type | Description |
|---|---|---|
valid | boolean | — |
errors | FieldError[] | — |
Defined in packages/forms/src/types.ts:387
WalkInfointerface#
interface WalkInfo| Property | Type | Description |
|---|---|---|
pageIndex | number | — |
path | number[] | — |
parent | PanelElement | DynamicPanelElement | null | — |
dynamic | DynamicPanelElement | null | — |
Defined in packages/forms/src/schema.ts:93
Choicetype#
type Choice = ChoiceValue | ChoiceItem;Defined in packages/forms/src/types.ts:42
ChoiceValuetype#
type ChoiceValue = string | number;Defined in packages/forms/src/types.ts:34
ClearHiddenValuestype#
type ClearHiddenValues = 'onSubmit' | 'onHidden' | 'never';Defined in packages/forms/src/types.ts:352
ContainerTypetype#
type ContainerType = 'panel' | 'dynamicpanel';Defined in packages/forms/src/types.ts:28
CustomValidatortype#
type CustomValidator = (
value: unknown,
context: CustomValidatorContext,
) => CustomValidatorResult | Promise<CustomValidatorResult>;Defined in packages/forms/src/types.ts:343
CustomValidatorResulttype#
type CustomValidatorResult = boolean | string | null | undefined;Defined in packages/forms/src/types.ts:341
Densitytype#
type Density = 'compact' | 'comfortable' | 'spacious';Defined in packages/forms/src/types.ts:350
ElementSchematype#
type ElementSchema = FieldSchema | MarkdownElement | PanelElement | DynamicPanelElement;Defined in packages/forms/src/types.ts:262
ElementTypetype#
type ElementType = FieldType | ContainerType;Defined in packages/forms/src/types.ts:30
ExpressionFunctiontype#
type ExpressionFunction = (...args: unknown[]) => unknown;Defined in packages/forms/src/types.ts:332
ExpressionNodetype#
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 });Defined in packages/forms/src/expression/parser.ts:28
FieldSchematype#
type FieldSchema =
| TextField
| EmailField
| NumberField
| TextareaField
| SelectField
| MultiSelectField
| RadioField
| CheckboxField
| CheckboxGroupField
| ToggleField
| DateField
| TimeField
| DateTimeField
| RatingField
| SliderField
| FileField
| SignatureField
| MatrixField
| HiddenField
| ComputedField;Defined in packages/forms/src/types.ts:240
FieldTypetype#
type FieldType =
| 'text'
| 'email'
| 'number'
| 'textarea'
| 'select'
| 'multiselect'
| 'radio'
| 'checkbox'
| 'checkboxgroup'
| 'toggle'
| 'date'
| 'time'
| 'datetime'
| 'rating'
| 'slider'
| 'file'
| 'signature'
| 'matrix'
| 'markdown'
| 'hidden'
| 'computed';Defined in packages/forms/src/types.ts:5
FieldWidthtype#
type FieldWidth = 'full' | 'half' | 'third' | 'two-thirds';Defined in packages/forms/src/types.ts:32
FormValuestype#
type FormValues = Record<string, unknown>;Defined in packages/forms/src/types.ts:286
LocalizedStringtype#
type LocalizedString = string | Readonly<Record<string, string>>;Defined in packages/forms/src/types.ts:3
NormalizedSchematype#
type NormalizedSchema = Omit<FormSchema, 'elements' | 'pages'> & { pages: PageSchema[] };Defined in packages/forms/src/schema.ts:47
ValidateOntype#
type ValidateOn = 'blur' | 'change' | 'submit';Defined in packages/forms/src/types.ts:348
ValidatorSchematype#
type ValidatorSchema = ExpressionValidator | CustomValidatorRef;Defined in packages/forms/src/types.ts:57
@birchui/forms/builder#
createDefaultElementfunction#
function createDefaultElement(type: ElementType, nameFor: (base: string) => string, tr: Translate = createTranslator()): ElementSchema| Parameter | Type | Description |
|---|---|---|
type | ElementType | — |
nameFor | (base: string) => string | — |
troptional | Translate | — |
Defined in packages/forms/src/builder/catalog.ts:92
createFormBuilderfunction#
function createFormBuilder(container: HTMLElement, options: FormBuilderOptions = {}): FormBuilderApi| Parameter | Type | Description |
|---|---|---|
container | HTMLElement | — |
optionsoptional | FormBuilderOptions | — |
Defined in packages/forms/src/builder/form-builder.ts:85
typeLabelfunction#
function typeLabel(type: string, tr?: Translate): string| Parameter | Type | Description |
|---|---|---|
type | string | — |
troptional | Translate | — |
Defined in packages/forms/src/builder/catalog.ts:40
formBuilderDefinitionconst#
const formBuilderDefinition: WidgetDefinition<FormBuilderOptions, FormBuilderEvents, FormBuilderApi>Defined in packages/forms/src/builder/form-builder.ts:1040
TOOLBOX_ITEMSconst#
const TOOLBOX_ITEMS: readonly ToolboxItem[]Defined in packages/forms/src/builder/catalog.ts:12
BuilderSelectioninterface#
interface BuilderSelection| Property | Type | Description |
|---|---|---|
kind | SelectionKind | — |
path | number[] | null | — |
element | ElementSchema | PageSchema | null | — |
Defined in packages/forms/src/builder/types.ts:38
FormBuilderApiinterface#
interface FormBuilderApi extends Widget<FormBuilderOptions, FormBuilderEvents>| Member | 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 | — |
elementreadonly | 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. |
Defined in packages/forms/src/builder/types.ts:51
FormBuilderEventsinterface#
interface FormBuilderEvents| Property | Type | Description |
|---|---|---|
ready | { schema: FormSchema } | — |
schemaChange | { schema: FormSchema; reason: string } | — |
selectionChange | BuilderSelection | — |
save | { schema: FormSchema } | — |
Defined in packages/forms/src/builder/types.ts:44
FormBuilderOptionsinterface#
interface FormBuilderOptions| Property | Type | Description |
|---|---|---|
schemaoptional | FormSchema | — |
licenseKeyoptional | string | — |
localeoptional | string | — |
localeTextoptional | LocaleTextInput | — |
rtloptional | boolean | — |
themeoptional | 'light' | 'dark' | 'auto' | — |
densityoptional | Density | — |
injectStylesoptional | boolean | — |
toolboxoptional | readonly ElementType[] | — |
functionsoptional | Record<string, ExpressionFunction> | — |
customValidatorsoptional | Record<string, CustomValidator> | — |
previewDataoptional | FormValues | — |
initialTaboptional | BuilderTab | — |
Defined in packages/forms/src/builder/types.ts:20
ToolboxIteminterface#
interface ToolboxItem| Property | Type | Description |
|---|---|---|
type | ElementType | — |
label | string | — |
group | ToolboxGroup | — |
Defined in packages/forms/src/builder/catalog.ts:6
BuilderTabtype#
type BuilderTab = 'designer' | 'json' | 'preview';Defined in packages/forms/src/builder/types.ts:14
ElementPathtype#
type ElementPath = readonly number[];Defined in packages/forms/src/builder/types.ts:16
ElementReftype#
type ElementRef = string | ElementPath;Defined in packages/forms/src/builder/types.ts:18
SelectionKindtype#
type SelectionKind = 'form' | 'page' | 'element';Defined in packages/forms/src/builder/types.ts:36
ToolboxGrouptype#
type ToolboxGroup = 'Basic' | 'Choice' | 'Date and time' | 'Advanced' | 'Layout';Defined in packages/forms/src/builder/catalog.ts:4