@navette-js/schemas 0.0.0-stage → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 NavetteJS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
- # Temporary Holding Version
1
+ # @navette-js/schemas
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Layout components and schemas for Navette admin panels.
4
+
5
+ Part of [Navette](https://github.com/NavetteJS/navette), admin panels for Node.js. Start a project with `npm create navette@latest`, or install the framework with `npm install @navette-js/panels`.
6
+
7
+ **Beta:** the API may still change between beta releases.
8
+
9
+ License: MIT. Third-party notices: see `THIRD-PARTY-NOTICES.md` where present.
package/lib/index.d.ts ADDED
@@ -0,0 +1,517 @@
1
+ import { HtmlString, type ColorManager, type Lazy } from '@navette-js/support';
2
+ /** What a schema expects from the stateful component hosting it. */
3
+ export interface SchemaHost {
4
+ readonly id: string;
5
+ _errors: Record<string, string[]>;
6
+ getSchema(name: string): Schema | Promise<Schema>;
7
+ }
8
+ export type ComponentContext = {
9
+ livewire: SchemaHost;
10
+ component: Component;
11
+ operation: string | null;
12
+ record: unknown;
13
+ get: (path: string) => unknown;
14
+ state: unknown;
15
+ };
16
+ type SpanValue = number | string | ((ctx: ComponentContext) => number | string | Promise<number | string>);
17
+ type ColumnSpan = Record<string, SpanValue> | number | string;
18
+ export declare abstract class Component {
19
+ private _grow;
20
+ /** Inside a Flex: `false` keeps the natural width instead of filling the available space. */
21
+ grow(condition?: boolean): this;
22
+ canGrow(): boolean;
23
+ /** Default configuration for every instance later created by `make()`: `TextInput.configureUsing((input) => input.maxLength(255))`. */
24
+ static configureUsing<T>(this: abstract new (...args: any[]) => T, configure: (instance: T) => void): void;
25
+ protected _name: string | null;
26
+ protected _keyName: string | null;
27
+ protected _hidden: Lazy<boolean, ComponentContext>;
28
+ protected _visible: Lazy<boolean, ComponentContext>;
29
+ protected _columnSpan: ColumnSpan;
30
+ protected _extraAttributes: Record<string, string>;
31
+ protected _columnStart: number | null;
32
+ container: Schema;
33
+ hidden(condition?: Lazy<boolean, ComponentContext>): this;
34
+ visible(condition?: Lazy<boolean, ComponentContext>): this;
35
+ key(key: string | null): this;
36
+ /** Hidden for the given operation(s) (`'create'`, `'edit'`…). */
37
+ hiddenOn(operations: string | string[]): this;
38
+ /** Visible only for the given operation(s). */
39
+ visibleOn(operations: string | string[]): this;
40
+ /** A number applies from the `lg` breakpoint; an object replaces the default entirely. Values may be closures. */
41
+ columnSpan(span: ColumnSpan): this;
42
+ /** Starting grid column, from the `lg` breakpoint. */
43
+ columnStart(start: number | null): this;
44
+ extraAttributes(attributes: Record<string, string>): this;
45
+ get livewire(): SchemaHost;
46
+ isLiberatedFromContainerGrid(): boolean;
47
+ /** Server methods the component's JavaScript may call (announced to the browser). */
48
+ getExposedMethods(): string[];
49
+ /** False for an exposed method after which the host must re-render (e.g. next wizard step, to show validation errors). */
50
+ isRenderlessMethod(_method: string): boolean;
51
+ hasStatePath(): boolean;
52
+ /** Absolute component key: `<schema key>.<key or name>`, or null. */
53
+ getKey(): string | null;
54
+ getLivewireKey(): string | null;
55
+ getStatePath(): string;
56
+ getAlpineScopeConfiguration(): Record<string, unknown>;
57
+ context(): ComponentContext;
58
+ isVisible(): Promise<boolean>;
59
+ /** The component's own HTML, without its grid wrapper. */
60
+ abstract toHtml(): Promise<string>;
61
+ /** Grid column wrapper, rendered even when the component is hidden. */
62
+ toSchemaHtml(isVisible: boolean): Promise<string>;
63
+ }
64
+ export declare class Schema {
65
+ livewire: SchemaHost;
66
+ private _key;
67
+ private _components;
68
+ private _statePath;
69
+ private _columns;
70
+ private _root;
71
+ private _inline;
72
+ private _operation;
73
+ private _record;
74
+ private _extraClass;
75
+ private _partial;
76
+ private _dense;
77
+ constructor(livewire: SchemaHost);
78
+ static make(livewire: SchemaHost): Schema;
79
+ key(key: string): this;
80
+ components(components: Component[]): this;
81
+ schema(components: Component[]): this;
82
+ statePath(path: string | null): this;
83
+ columns(columns: Record<string, number> | number | null): this;
84
+ root(isRoot?: boolean): this;
85
+ inline(isInline?: boolean): this;
86
+ operation(operation: string | null): this;
87
+ record(record: unknown): this;
88
+ /** Class placed before the grid classes (e.g. `fi-section-content`). */
89
+ extraClass(name: string | null): this;
90
+ /** Tighter spacing between components (`fi-sc-dense`). */
91
+ dense(condition?: boolean): this;
92
+ /** Partially rendered schema: its root carries `wire:partial="schema.<key>"`. */
93
+ partiallyRendered(condition?: boolean): this;
94
+ private _partialName;
95
+ /** Root `wire:partial` name when it differs from the schema key (filters form: `table-filters-form`). */
96
+ partialName(name: string | null): this;
97
+ private _gap;
98
+ /** `false`: components touch, with no gap (no `fi-sc-has-gap`), as in a FusedGroup. */
99
+ gap(condition?: boolean): this;
100
+ private _fieldWrapperView;
101
+ /**
102
+ * Field wrapper for this schema: `'filament-forms::plain-field-wrapper'` keeps only a screen-reader label
103
+ * (FusedGroup fields). `null`: the usual wrapper.
104
+ */
105
+ fieldWrapperView(view: string | null): this;
106
+ getFieldWrapperView(): string | null;
107
+ getKey(): string;
108
+ getStatePath(): string;
109
+ getComponents(): Component[];
110
+ getOperation(): string | null;
111
+ getRecord(): unknown;
112
+ isInline(): boolean;
113
+ isRoot(): boolean;
114
+ /** All components, depth-first. */
115
+ getFlatComponents(): Component[];
116
+ /** Same, without hidden components or their descendants: a field inside a hidden section is neither validated nor saved. */
117
+ getVisibleFlatComponents(): Promise<Component[]>;
118
+ toHtml(): Promise<string>;
119
+ }
120
+ /** Child schema of a layout component: shares the parent's key and state path, without being a root. */
121
+ export declare function childSchema(parent: Component, components: Component[]): Schema;
122
+ /** Stateful group: its children live under `<container path>.<name>` (used by filter forms). */
123
+ export declare class StatefulGroup extends Component {
124
+ private children;
125
+ constructor(name: string, children: Component[]);
126
+ static make(name: string, children: Component[]): StatefulGroup;
127
+ hasStatePath(): boolean;
128
+ getChildSchemas(): Schema[];
129
+ toHtml(): Promise<string>;
130
+ }
131
+ /** Groups components in a grid, without any chrome. */
132
+ export declare class Group extends Component {
133
+ protected children: Component[];
134
+ protected _columns: Record<string, number> | number | null;
135
+ constructor(children?: Component[]);
136
+ static make(children?: Component[]): Group;
137
+ schema(components: Component[]): this;
138
+ columns(columns: Record<string, number> | number | null): this;
139
+ getChildSchemas(): Schema[];
140
+ toHtml(): Promise<string>;
141
+ }
142
+ /** Column grid: two columns from `lg` by default. */
143
+ export declare class Grid extends Group {
144
+ constructor(columns?: Record<string, number> | number);
145
+ static make(columns?: Record<string, number> | number | Component[]): Grid;
146
+ }
147
+ /**
148
+ * Components side by side from a breakpoint: each fills the available space,
149
+ * except those marked `grow(false)`, which keep their natural width.
150
+ */
151
+ export declare class Flex extends Component {
152
+ private children;
153
+ private _from;
154
+ constructor(children?: Component[]);
155
+ static make(children?: Component[]): Flex;
156
+ schema(components: Component[]): this;
157
+ from(breakpoint: 'sm' | 'md' | 'lg' | 'xl' | '2xl'): this;
158
+ getChildSchemas(): Schema[];
159
+ toHtml(): Promise<string>;
160
+ }
161
+ export declare const slug: (text: string) => string;
162
+ /** Card grouping components, with an optional header (heading, actions). */
163
+ export declare class Section extends Component {
164
+ private children;
165
+ private _columns;
166
+ private _heading;
167
+ private _afterHeader;
168
+ constructor(heading?: string | null);
169
+ static make(heading?: string | null): Section;
170
+ schema(components: Component[]): this;
171
+ columns(columns: Record<string, number> | number | null): this;
172
+ private _collapsible;
173
+ private _collapsed;
174
+ /** Collapsible by clicking its header; `collapsed()` starts it collapsed. */
175
+ collapsible(condition?: boolean): this;
176
+ collapsed(condition?: boolean): this;
177
+ /** Actions shown to the right of the heading. */
178
+ afterHeader(actions: Renderable[]): this;
179
+ /** Actions the section exposes for mounting. */
180
+ getActions(): Renderable[];
181
+ getChildSchemas(): Schema[];
182
+ toHtml(): Promise<string>;
183
+ }
184
+ /**
185
+ * Raw markup in a schema. The content is inserted AS IS: never put a user- or database-supplied value in it
186
+ * without escaping it with `e()` from `@navette-js/support`.
187
+ */
188
+ export declare class Html extends Component {
189
+ private content;
190
+ constructor(content: string | ((ctx: ComponentContext) => string | Promise<string>));
191
+ static make(content: string | ((ctx: ComponentContext) => string | Promise<string>)): Html;
192
+ toHtml(): Promise<string>;
193
+ }
194
+ /** A tab of a Tabs component: a label, an optional icon and its own schema. */
195
+ export declare class Tab extends Component {
196
+ private children;
197
+ private _columns;
198
+ private _icon;
199
+ private label;
200
+ constructor(label: string);
201
+ static make(label: string): Tab;
202
+ schema(components: Component[]): this;
203
+ columns(columns: Record<string, number> | number | null): this;
204
+ icon(name: string | null): this;
205
+ getLabel(): string;
206
+ getIcon(): string | null;
207
+ /** Browser-side tab key (no schema prefix): `::data::` follows the schema state path, and is dropped in infolists. */
208
+ getTabKey(): string;
209
+ getChildSchemas(): Schema[];
210
+ toHtml(): Promise<string>;
211
+ }
212
+ /** Layout tabs: every panel is rendered, the browser only shows the active one. */
213
+ export declare class Tabs extends Component {
214
+ private tabs;
215
+ private label;
216
+ constructor(label: string);
217
+ static make(label: string): Tabs;
218
+ schema(tabs: Tab[]): this;
219
+ getExposedMethods(): string[];
220
+ getLazyLoadedTabBadges(): Record<string, unknown>;
221
+ getDeferredTabBadges(): Record<string, unknown>;
222
+ getChildSchemas(): Schema[];
223
+ toHtml(): Promise<string>;
224
+ }
225
+ /** Render hook injection point, using the host's scopes. Liberated from the container grid. */
226
+ export declare class RenderHook extends Component {
227
+ private hook;
228
+ constructor(hook: string);
229
+ static make(hook: string): RenderHook;
230
+ isLiberatedFromContainerGrid(): boolean;
231
+ toHtml(): Promise<string>;
232
+ }
233
+ /** Embeds another schema of the host (`form`, `infolist`…) as a root schema. */
234
+ export declare class EmbeddedSchema extends Component {
235
+ private schemaName;
236
+ constructor(name: string);
237
+ static make(name: string): EmbeddedSchema;
238
+ toHtml(): Promise<string>;
239
+ }
240
+ /** `<form>` element: content and footer (actions), submitted to a host method. */
241
+ export declare class Form extends Component {
242
+ private children;
243
+ private _footer;
244
+ private _id;
245
+ private _submit;
246
+ constructor(children: Component[]);
247
+ static make(children?: Component[]): Form;
248
+ id(id: string): this;
249
+ livewireSubmitHandler(method: string): this;
250
+ footer(components: Component[]): this;
251
+ getChildSchemas(): Schema[];
252
+ toHtml(): Promise<string>;
253
+ }
254
+ /** Item rendered in an actions container: in practice an Action (actions package). */
255
+ export interface Renderable {
256
+ isVisible(ctx: ComponentContext): Promise<boolean>;
257
+ toHtml(ctx: ComponentContext): Promise<string>;
258
+ }
259
+ /** Row of actions in a schema. */
260
+ export declare class Actions extends Component {
261
+ private actions;
262
+ private _fullWidth;
263
+ private _alignment;
264
+ constructor(actions: Renderable[]);
265
+ static make(actions: Renderable[]): Actions;
266
+ fullWidth(condition?: boolean): this;
267
+ alignment(alignment: string | null): this;
268
+ toHtml(): Promise<string>;
269
+ }
270
+ /** Color manager used outside a panel; inside a panel, the host panel's manager takes precedence. */
271
+ export declare const useColorManager: (manager: ColorManager) => void;
272
+ /** Item in an inline row: a schema component or an action. */
273
+ export type InlineItem = Component | Renderable;
274
+ /**
275
+ * Inline row mixing components and actions (footers, controls, after a label).
276
+ * Actions are mounted with `schemaComponent: mountKey` (the root schema by default, which finds them through the parent's `getActions()`).
277
+ * `actionView`: `'button'` (full button), `'link'` (link, or icon button for an `iconButton()` action), `'auto'` (icon button if `iconButton()`, button otherwise).
278
+ * `scope` overrides keys of the components' Alpine configuration (`path`, `containerPath`).
279
+ */
280
+ export declare function renderInlineItems(parent: Component, items: InlineItem[], options?: {
281
+ alignment?: string | null;
282
+ scope?: Record<string, unknown>;
283
+ mountKey?: string | null;
284
+ actionView?: 'button' | 'link' | 'auto';
285
+ }): Promise<string>;
286
+ /**
287
+ * Titled frame grouping fields: a legend and a two-column grid by default.
288
+ * With `statePath()`, the fields live under that path and the fieldset gets a key (and an `id`).
289
+ */
290
+ export declare class Fieldset extends Component {
291
+ private children;
292
+ private _columns;
293
+ private _label;
294
+ private _hiddenLabel;
295
+ private _contained;
296
+ private _markedAsRequired;
297
+ constructor(label?: Lazy<string | null, ComponentContext>);
298
+ static make(label?: Lazy<string | null, ComponentContext>): Fieldset;
299
+ schema(components: Component[]): this;
300
+ columns(columns: Record<string, number> | number | null): this;
301
+ label(label: Lazy<string | null, ComponentContext>): this;
302
+ /** Keeps the legend for screen readers only. */
303
+ hiddenLabel(condition?: boolean): this;
304
+ /** `false`: no border or padding. */
305
+ contained(condition?: boolean): this;
306
+ /** Asterisk after the legend (the fieldset itself is never validated). */
307
+ markAsRequired(condition?: boolean): this;
308
+ /** State path of the fields, relative to the container. */
309
+ statePath(path: string | null): this;
310
+ hasStatePath(): boolean;
311
+ getChildSchemas(): Schema[];
312
+ toHtml(): Promise<string>;
313
+ }
314
+ /**
315
+ * Text in a schema: a plain `<span>`, or a badge with `badge()`. The content is escaped;
316
+ * an `HtmlString` (from `@navette-js/support`) is inserted as is, so build it only from escaped values.
317
+ */
318
+ export declare class Text extends Component {
319
+ private _content;
320
+ private _badge;
321
+ private _color;
322
+ private _size;
323
+ private _weight;
324
+ private _fontFamily;
325
+ private _icon;
326
+ private _iconPosition;
327
+ private _iconSize;
328
+ private _tooltip;
329
+ private _copyable;
330
+ private _copyableState;
331
+ private _copyMessage;
332
+ private _copyMessageDuration;
333
+ constructor(content: Lazy<string | HtmlString | null, ComponentContext>);
334
+ static make(content: Lazy<string | HtmlString | null, ComponentContext>): Text;
335
+ content(content: Lazy<string | HtmlString | null, ComponentContext>): this;
336
+ /** Renders as a badge. */
337
+ badge(condition?: Lazy<boolean, ComponentContext>): this;
338
+ /** Color (`gray` by default; `primary`, `danger`…). */
339
+ color(color: Lazy<string | null, ComponentContext>): this;
340
+ /** Text or badge size (`xs`, `sm`, `md`, `lg`). */
341
+ size(size: string | null): this;
342
+ /** Font weight (`bold`, `semibold`, `medium`…). */
343
+ weight(weight: string | null): this;
344
+ /** Font family (`sans`, `serif`, `mono`). */
345
+ fontFamily(family: string | null): this;
346
+ /** Badge icon. */
347
+ icon(name: string | null): this;
348
+ iconPosition(position: 'before' | 'after'): this;
349
+ iconSize(size: string | null): this;
350
+ tooltip(text: Lazy<string | null, ComponentContext>): this;
351
+ /** Clicking copies the text (or `copyableState()`) to the clipboard. */
352
+ copyable(condition?: Lazy<boolean, ComponentContext>): this;
353
+ copyableState(state: Lazy<string | null, ComponentContext>): this;
354
+ copyMessage(message: string | null): this;
355
+ copyMessageDuration(milliseconds: number): this;
356
+ getContent(): Promise<string | HtmlString | null>;
357
+ toHtml(): Promise<string>;
358
+ }
359
+ /** Heroicon in a schema: decorative, unless a tooltip or an `aria-label` (extra attribute) describes it. */
360
+ export declare class Icon extends Component {
361
+ private _icon;
362
+ private _color;
363
+ private _size;
364
+ private _tooltip;
365
+ constructor(name: Lazy<string | null, ComponentContext>);
366
+ static make(name: Lazy<string | null, ComponentContext>): Icon;
367
+ icon(name: Lazy<string | null, ComponentContext>): this;
368
+ /** Color (`primary` by default). */
369
+ color(color: Lazy<string | null, ComponentContext>): this;
370
+ /** Size (`xs` … `2xl`); `base` resets to the default size. */
371
+ size(size: string | null): this;
372
+ tooltip(text: Lazy<string | null, ComponentContext>): this;
373
+ toHtml(): Promise<string>;
374
+ }
375
+ /** Image in a schema. Only same-site (`/…`) or http(s) URLs are rendered. */
376
+ export declare class Image extends Component {
377
+ private _url;
378
+ private _alt;
379
+ private _height;
380
+ private _width;
381
+ private _alignment;
382
+ private _tooltip;
383
+ constructor(url: Lazy<string, ComponentContext>, alt: Lazy<string, ComponentContext>);
384
+ static make(url: Lazy<string, ComponentContext>, alt: Lazy<string, ComponentContext>): Image;
385
+ url(url: Lazy<string, ComponentContext>): this;
386
+ alt(alt: Lazy<string, ComponentContext>): this;
387
+ private static dimension;
388
+ /** Height (`8rem` by default); a number is in pixels. */
389
+ imageHeight(height: number | string | null): this;
390
+ imageWidth(width: number | string | null): this;
391
+ imageSize(size: number | string): this;
392
+ /** Alignment (`start`, `center`, `end`). */
393
+ alignment(alignment: string | null): this;
394
+ alignStart(): this;
395
+ alignCenter(): this;
396
+ alignEnd(): this;
397
+ tooltip(text: Lazy<string | null, ComponentContext>): this;
398
+ toHtml(): Promise<string>;
399
+ }
400
+ /** Bulleted list: each item is a component; a string becomes a `Text`. Two columns from `sm`. */
401
+ export declare class UnorderedList extends Component {
402
+ private children;
403
+ private _columns;
404
+ private _size;
405
+ constructor(items?: (Component | string | HtmlString)[]);
406
+ static make(items?: (Component | string | HtmlString)[]): UnorderedList;
407
+ private static normalize;
408
+ schema(items: (Component | string | HtmlString)[]): this;
409
+ columns(columns: Record<string, number> | number | null): this;
410
+ /** Text size (`xs`, `sm`, `md`, `lg`). */
411
+ size(size: string | null): this;
412
+ getChildSchemas(): Schema[];
413
+ toHtml(): Promise<string>;
414
+ }
415
+ /** Empty state: icon, heading, description and a footer (actions, components). */
416
+ export declare class EmptyState extends Component {
417
+ private _heading;
418
+ private _description;
419
+ private _icon;
420
+ private _iconColor;
421
+ private _iconSize;
422
+ private _compact;
423
+ private _contained;
424
+ private _headingTag;
425
+ private _footer;
426
+ constructor(heading: Lazy<string, ComponentContext>);
427
+ static make(heading: Lazy<string, ComponentContext>): EmptyState;
428
+ heading(heading: Lazy<string, ComponentContext>): this;
429
+ description(description: Lazy<string | null, ComponentContext>): this;
430
+ icon(name: string | null): this;
431
+ /** Icon color (`primary` by default). */
432
+ iconColor(color: string | null): this;
433
+ iconSize(size: string | null): this;
434
+ /** Compact variant. */
435
+ compact(condition?: boolean): this;
436
+ /** `false`: no surrounding card. */
437
+ contained(condition?: boolean): this;
438
+ /** Heading tag (`h2` by default). */
439
+ headingTag(tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'): this;
440
+ /** Footer: inline actions and components. */
441
+ footer(items: InlineItem[]): this;
442
+ /** Footer actions, mounted on the root schema. */
443
+ getActions(): Renderable[];
444
+ toHtml(): Promise<string>;
445
+ }
446
+ /**
447
+ * Information box: a status (`info()`, `success()`, `warning()`, `danger()`) setting color and icon,
448
+ * heading, description, footer actions (as links) and control actions (on the right).
449
+ */
450
+ export declare class Callout extends Component {
451
+ private _heading;
452
+ private _description;
453
+ private _status;
454
+ private _color;
455
+ private _hasColor;
456
+ private _icon;
457
+ private _iconColor;
458
+ private _iconSize;
459
+ private _footerActions;
460
+ private _footerActionsAlignment;
461
+ private _footer;
462
+ private _controlActions;
463
+ constructor(heading?: Lazy<string | null, ComponentContext>);
464
+ static make(heading?: Lazy<string | null, ComponentContext>): Callout;
465
+ heading(heading: Lazy<string | null, ComponentContext>): this;
466
+ description(description: Lazy<string | null, ComponentContext>): this;
467
+ /** Status: sets color, icon and a screen-reader prefix ("Note:"…). */
468
+ status(status: string | null): this;
469
+ danger(): this;
470
+ info(): this;
471
+ success(): this;
472
+ warning(): this;
473
+ /** Background color; `null` removes the status color (the icon keeps it). */
474
+ color(color: string | null): this;
475
+ icon(name: string | null): this;
476
+ iconColor(color: string | null): this;
477
+ /** Icon size (`lg` by default). */
478
+ iconSize(size: string | null): this;
479
+ /** Footer actions, rendered as links. */
480
+ actions(actions: Renderable[]): this;
481
+ footerActions(actions: Renderable[]): this;
482
+ /** Footer actions alignment (`start`, `center`, `end`, `between`). */
483
+ footerActionsAlignment(alignment: string): this;
484
+ /** Free-form footer (components and actions), replacing the footer actions. */
485
+ footer(items: InlineItem[] | null): this;
486
+ /** Small actions on the right of the callout (dismiss…). */
487
+ controlActions(actions: Renderable[]): this;
488
+ getColor(): string | null;
489
+ getIcon(): string | null;
490
+ /** Callout actions, mounted on the root schema. */
491
+ getActions(): Renderable[];
492
+ toHtml(): Promise<string>;
493
+ }
494
+ /**
495
+ * Fields joined under a single label: each field keeps only a screen-reader label,
496
+ * and the first validation error among the fields is shown under the group.
497
+ */
498
+ export declare class FusedGroup extends Component {
499
+ private children;
500
+ private _columns;
501
+ private _label;
502
+ private _hiddenLabel;
503
+ private _markedAsRequired;
504
+ constructor(children?: Component[]);
505
+ static make(children?: Component[]): FusedGroup;
506
+ schema(components: Component[]): this;
507
+ columns(columns: Record<string, number> | number | null): this;
508
+ label(label: Lazy<string | null, ComponentContext>): this;
509
+ hiddenLabel(condition?: boolean): this;
510
+ /** Asterisk after the label (validation stays per field). */
511
+ markAsRequired(condition?: boolean): this;
512
+ getChildSchemas(): Schema[];
513
+ /** First error among the group's fields (including one on an item of a multi-valued field). */
514
+ private firstError;
515
+ toHtml(): Promise<string>;
516
+ }
517
+ export {};