fiboui 2.8.4 → 2.9.0

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.
@@ -1,2 +1,1702 @@
1
- export { Button, TextField, Form, formDataToValues, required, minLength, maxLength, email, pattern, min, max, rule, url, integer, equalTo, Switch, Checkbox, RadioGroup, Textarea, Select, Combobox } from './index.js';
2
- export type { FormErrorMode } from './index.js';
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ import React$1 from 'react';
4
+ import { CSSProperties, FormEvent, ReactElement, ReactNode } from 'react';
5
+
6
+ type Buildable = {
7
+ /** @deprecated Builders are React elements; `.build()` is optional. */
8
+ build(): React$1.ReactNode;
9
+ };
10
+ type FiboChild = React$1.ReactNode | Buildable;
11
+ type FiboChildren = FiboChild | readonly FiboChild[] | (() => FiboChild | readonly FiboChild[]);
12
+ type FiboThemeName = "material" | "cupertino" | "web" | "noir";
13
+ interface ResponsiveStyles {
14
+ mobile?: React$1.CSSProperties;
15
+ tablet?: React$1.CSSProperties;
16
+ desktop?: React$1.CSSProperties;
17
+ }
18
+ type AlignAxis = "start" | "center" | "end" | "stretch" | "baseline" | "between" | "around" | "evenly" | "space-between" | "space-around" | "space-evenly" | "spaceBetween" | "spaceAround" | "spaceEvenly";
19
+ interface TextStyle {
20
+ fontSize?: string | number;
21
+ fontWeight?: string | number;
22
+ fontFamily?: string;
23
+ color?: string;
24
+ lineHeight?: string | number;
25
+ letterSpacing?: string | number;
26
+ }
27
+ type ButtonVariant = "elevated" | "filled" | "outlined" | "text";
28
+ declare const FIBO_BREAKPOINTS: {
29
+ readonly sm: 640;
30
+ readonly md: 768;
31
+ readonly lg: 1024;
32
+ readonly xl: 1280;
33
+ };
34
+ type BreakpointKey = keyof typeof FIBO_BREAKPOINTS;
35
+ type Listener<T> = (value: T) => void;
36
+ type Unsubscribe = () => void;
37
+ interface Subscribable<T> {
38
+ subscribe(listener: Listener<T>): Unsubscribe;
39
+ subscribeEffect(effect: Effect): void;
40
+ unsubscribeEffect(effect: Effect): void;
41
+ }
42
+ interface BindableSignal<T = unknown> {
43
+ readonly value: T;
44
+ subscribe(listener: Listener<T>): Unsubscribe;
45
+ }
46
+ declare class Effect {
47
+ private fn;
48
+ private dependencies;
49
+ private _onDispose?;
50
+ constructor(fn: () => void);
51
+ run(): void;
52
+ track(dep: Subscribable<any>): void;
53
+ trigger(): void;
54
+ cleanup(): void;
55
+ dispose(): void;
56
+ }
57
+ declare class Signal<T> implements Subscribable<T> {
58
+ private _value;
59
+ private listeners;
60
+ private effects;
61
+ private readonly _initial;
62
+ constructor(_value: T);
63
+ get value(): T;
64
+ /** Current value without tracking. Replays use this so a node does not subscribe twice. */
65
+ peek(): T;
66
+ set value(newValue: T);
67
+ /** Replace the value. Same notify path as `.value = next`. */
68
+ set(next: T): this;
69
+ /**
70
+ * Write a value, or an updater `(prev) => next`.
71
+ * Function-valued signals should use `.set()` / `.value =` so the function is stored, not called.
72
+ * Not named `update`: `listSignal.update(id, patch)` is the item patch.
73
+ */
74
+ change(next: T | ((prev: T) => T)): this;
75
+ /** Restore the value passed to `signal(initial)`. */
76
+ reset(): this;
77
+ subscribe(listener: Listener<T>): Unsubscribe;
78
+ subscribeEffect(effect: Effect): void;
79
+ unsubscribeEffect(effect: Effect): void;
80
+ private _notifyDepth;
81
+ private notify;
82
+ }
83
+ declare class Observable<T> implements Subscribable<T> {
84
+ private _value;
85
+ private listeners;
86
+ private effects;
87
+ constructor(_value: T);
88
+ get(): T;
89
+ set(newValue: T): void;
90
+ subscribe(listener: Listener<T>): Unsubscribe;
91
+ subscribeEffect(effect: Effect): void;
92
+ unsubscribeEffect(effect: Effect): void;
93
+ private notify;
94
+ }
95
+ type GestureMask = "all" | "gesture" | "subviews" | "none";
96
+ type TapLocation = {
97
+ x: number;
98
+ y: number;
99
+ };
100
+ declare abstract class GestureBuilder {
101
+ protected _enabled: boolean;
102
+ protected _including: GestureMask;
103
+ /** When true, wrappers must not stopPropagation (simultaneous). */
104
+ protected _bubble: boolean;
105
+ /** @internal Fired when the gesture successfully recognizes (Sequence / Exclusive). */
106
+ protected _onRecognized?: () => void;
107
+ enabled(value?: boolean): this;
108
+ /** SwiftUI `gesture(_:including:)`. */
109
+ including(mask: GestureMask): this;
110
+ /** Internal — set by SimultaneousGesture / `.simultaneousGesture`. */
111
+ bubble(value?: boolean): this;
112
+ /** @internal Used by SequenceGesture / ExclusiveGesture. */
113
+ onRecognized(callback: () => void): this;
114
+ /** @internal */
115
+ protected notifyRecognized(): void;
116
+ abstract wrap(children: React$1.ReactNode): React$1.ReactNode;
117
+ }
118
+ interface AnimationOptions {
119
+ duration?: number;
120
+ curve?: "linear" | "easeIn" | "easeOut" | "easeInOut" | "spring" | string;
121
+ damping?: number;
122
+ stiffness?: number;
123
+ velocity?: number;
124
+ mass?: number;
125
+ onComplete?: () => void;
126
+ }
127
+ interface Signal<T> {
128
+ spring(target: T, options?: Partial<AnimationOptions>): void;
129
+ animate(target: T, options?: Partial<AnimationOptions>): void;
130
+ snapTo(target: T, options?: Partial<AnimationOptions>): void;
131
+ }
132
+ declare const INTERACTION_EFFECTS: readonly [
133
+ "grow",
134
+ "shrink",
135
+ "pulse",
136
+ "pulseGrow",
137
+ "pulseShrink",
138
+ "push",
139
+ "pop",
140
+ "bounceIn",
141
+ "bounceOut",
142
+ "rotate",
143
+ "growRotate",
144
+ "float",
145
+ "sink",
146
+ "bob",
147
+ "hang",
148
+ "skew",
149
+ "skewForward",
150
+ "skewBackward",
151
+ "wobbleHorizontal",
152
+ "wobbleVertical",
153
+ "wobbleToBottomRight",
154
+ "wobbleToTopRight",
155
+ "wobbleTop",
156
+ "wobbleBottom",
157
+ "wobbleSkew",
158
+ "buzz",
159
+ "buzzOut",
160
+ "forward",
161
+ "backward",
162
+ "nudge",
163
+ "fade",
164
+ "backPulse",
165
+ "sweepToRight",
166
+ "sweepToLeft",
167
+ "sweepToBottom",
168
+ "sweepToTop",
169
+ "bounceToRight",
170
+ "bounceToLeft",
171
+ "bounceToBottom",
172
+ "bounceToTop",
173
+ "radialOut",
174
+ "radialIn",
175
+ "rectangleIn",
176
+ "rectangleOut",
177
+ "shutterInHorizontal",
178
+ "shutterOutHorizontal",
179
+ "shutterInVertical",
180
+ "shutterOutVertical",
181
+ "iconBack",
182
+ "iconForward",
183
+ "iconDown",
184
+ "iconUp",
185
+ "iconSpin",
186
+ "iconDrop",
187
+ "iconFade",
188
+ "iconFloatAway",
189
+ "iconSinkAway",
190
+ "iconGrow",
191
+ "iconShrink",
192
+ "iconPulse",
193
+ "iconPulseGrow",
194
+ "iconPulseShrink",
195
+ "iconPush",
196
+ "iconPop",
197
+ "iconBounce",
198
+ "iconRotate",
199
+ "iconGrowRotate",
200
+ "iconFloat",
201
+ "iconSink",
202
+ "iconBob",
203
+ "iconHang",
204
+ "iconWobbleHorizontal",
205
+ "iconWobbleVertical",
206
+ "iconBuzz",
207
+ "iconBuzzOut",
208
+ "borderFade",
209
+ "hollow",
210
+ "trim",
211
+ "rippleOut",
212
+ "rippleIn",
213
+ "outlineOut",
214
+ "outlineIn",
215
+ "roundCorners",
216
+ "underlineFromLeft",
217
+ "underlineFromCenter",
218
+ "underlineFromRight",
219
+ "reveal",
220
+ "underlineReveal",
221
+ "overlineFromLeft",
222
+ "overlineFromCenter",
223
+ "overlineFromRight",
224
+ "overlineReveal",
225
+ "shadowGrow",
226
+ "shadowFloat",
227
+ "shadowGlow",
228
+ "shadowRadial",
229
+ "boxShadowOutset",
230
+ "boxShadowInset",
231
+ "lift",
232
+ "glow",
233
+ "bubbleTop",
234
+ "bubbleRight",
235
+ "bubbleBottom",
236
+ "bubbleLeft",
237
+ "bubbleFloatTop",
238
+ "bubbleFloatRight",
239
+ "bubbleFloatBottom",
240
+ "bubbleFloatLeft",
241
+ "curlTopLeft",
242
+ "curlTopRight",
243
+ "curlBottomRight",
244
+ "curlBottomLeft"
245
+ ];
246
+ type InteractionEffectName = (typeof INTERACTION_EFFECTS)[number];
247
+ interface LogicalAxes {
248
+ paddingHorizontal(value: string | number): this;
249
+ paddingVertical(value: string | number): this;
250
+ paddingX(value: string | number): this;
251
+ paddingY(value: string | number): this;
252
+ px(value: string | number): this;
253
+ py(value: string | number): this;
254
+ marginHorizontal(value: string | number): this;
255
+ marginVertical(value: string | number): this;
256
+ marginX(value: string | number): this;
257
+ marginY(value: string | number): this;
258
+ mx(value: string | number): this;
259
+ my(value: string | number): this;
260
+ borderHorizontal(value: string | number): this;
261
+ borderVertical(value: string | number): this;
262
+ borderX(value: string | number): this;
263
+ borderY(value: string | number): this;
264
+ borderWidthHorizontal(value: string | number): this;
265
+ borderWidthVertical(value: string | number): this;
266
+ borderColorHorizontal(value: string | number): this;
267
+ borderColorVertical(value: string | number): this;
268
+ roundedTop(value: string | number): this;
269
+ roundedBottom(value: string | number): this;
270
+ roundedLeft(value: string | number): this;
271
+ roundedRight(value: string | number): this;
272
+ insetHorizontal(value: string | number): this;
273
+ insetVertical(value: string | number): this;
274
+ insetX(value: string | number): this;
275
+ insetY(value: string | number): this;
276
+ gapX(value: string | number): this;
277
+ gapY(value: string | number): this;
278
+ }
279
+ interface PseudoStateBuilder extends LogicalAxes {
280
+ boxShadow(value: string | number): this;
281
+ }
282
+ declare class PseudoStateBuilder {
283
+ private pseudoState;
284
+ private parentBuilder;
285
+ private isGroup;
286
+ private transitionDuration;
287
+ private transitionEasing;
288
+ private transitionDelay;
289
+ private transitionProperties;
290
+ private transforms;
291
+ private _boxLonghands;
292
+ constructor(pseudoState: string, parentBuilder: FiboBuilder, isGroup?: boolean);
293
+ /**
294
+ * Apply a named interaction effect (full Hover.css–inspired catalog).
295
+ * Works on any pseudo trigger — hover, press/active, focus, groupHover, etc.
296
+ * Stamps CSS classes; sheet is fiboui-owned (not a Hover.css vendor).
297
+ */
298
+ effect(name: InteractionEffectName | string): this;
299
+ bg(color: string): this;
300
+ /** Same longhand as `.bg()` — interpolates against the resting surface. */
301
+ backgroundColor(value: string): this;
302
+ color(value: string): this;
303
+ text(color: string): this;
304
+ opacity(value: number): this;
305
+ borderColor(value: string): this;
306
+ transform(value: string): this;
307
+ scale(value: number): this;
308
+ translateX(value: number | string): this;
309
+ translateY(value: number | string): this;
310
+ rotate(degrees: number): this;
311
+ shadow(value: string | number): this;
312
+ css(property: string, value: string | number): this;
313
+ padding(value: string | number): this;
314
+ p(value: string | number): this;
315
+ margin(value: string | number): this;
316
+ transition(value: string): this;
317
+ transition(properties: string | string[], duration: number, easing?: string, delay?: number): this;
318
+ duration(ms: number): this;
319
+ easing(value: "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "spring" | string): this;
320
+ ease(value: string): this;
321
+ delay(ms: number): this;
322
+ properties(props: string[]): this;
323
+ private applyTransition;
324
+ private flushTransform;
325
+ private set;
326
+ private commit;
327
+ end(): FiboBuilder;
328
+ }
329
+ declare const When: {
330
+ readonly hover: "hover";
331
+ readonly focus: "focus";
332
+ readonly active: "active";
333
+ readonly visited: "visited";
334
+ readonly disabled: "disabled";
335
+ readonly on: "on";
336
+ readonly off: "off";
337
+ readonly checked: "checked";
338
+ readonly unchecked: "unchecked";
339
+ readonly indeterminate: "indeterminate";
340
+ readonly mixed: "mixed";
341
+ };
342
+ type When = (typeof When)[keyof typeof When];
343
+ type WhenStyle = React$1.CSSProperties | string | ((builder: any) => void);
344
+ declare const Size: {
345
+ readonly full: "full";
346
+ readonly screen: "screen";
347
+ readonly fit: "fit";
348
+ readonly min: "min";
349
+ readonly max: "max";
350
+ /** SwiftUI `.infinity` — expand to the space the parent proposes (`100%`). */
351
+ readonly infinity: "infinity";
352
+ };
353
+ type Size = (typeof Size)[keyof typeof Size];
354
+ declare const StackAlign: {
355
+ readonly center: "center";
356
+ readonly top: "top";
357
+ readonly bottom: "bottom";
358
+ readonly left: "left";
359
+ readonly right: "right";
360
+ readonly topLeft: "topLeft";
361
+ readonly topRight: "topRight";
362
+ readonly bottomLeft: "bottomLeft";
363
+ readonly bottomRight: "bottomRight";
364
+ /** SwiftUI `leading` → `left` */
365
+ readonly leading: "left";
366
+ /** SwiftUI `trailing` → `right` */
367
+ readonly trailing: "right";
368
+ /** SwiftUI `topLeading` → `topLeft` */
369
+ readonly topLeading: "topLeft";
370
+ /** SwiftUI `topTrailing` → `topRight` */
371
+ readonly topTrailing: "topRight";
372
+ /** SwiftUI `bottomLeading` → `bottomLeft` */
373
+ readonly bottomLeading: "bottomLeft";
374
+ /** SwiftUI `bottomTrailing` → `bottomRight` */
375
+ readonly bottomTrailing: "bottomRight";
376
+ };
377
+ type StackAlign = (typeof StackAlign)[keyof typeof StackAlign];
378
+ type FrameSize = number | string | Size;
379
+ interface FrameSpec {
380
+ width?: FrameSize;
381
+ height?: FrameSize;
382
+ minWidth?: FrameSize;
383
+ idealWidth?: FrameSize;
384
+ maxWidth?: FrameSize;
385
+ minHeight?: FrameSize;
386
+ idealHeight?: FrameSize;
387
+ maxHeight?: FrameSize;
388
+ alignment?: StackAlign | keyof typeof StackAlign;
389
+ }
390
+ type ClipShapeName = "circle" | "rounded" | "square";
391
+ interface OffsetSpec {
392
+ x?: number;
393
+ y?: number;
394
+ }
395
+ interface FixedSizeSpec {
396
+ horizontal?: boolean;
397
+ vertical?: boolean;
398
+ }
399
+ interface LayerSpec {
400
+ kind: "overlay" | "background";
401
+ child: FiboChild | (() => FiboChild);
402
+ alignment: StackAlign | keyof typeof StackAlign;
403
+ }
404
+ type ContentShapeName = "rectangle" | ClipShapeName;
405
+ type GeometryRect = {
406
+ x: number;
407
+ y: number;
408
+ width: number;
409
+ height: number;
410
+ };
411
+ type ContainerRelativeFrameSpec = {
412
+ axis?: "horizontal" | "vertical" | "both";
413
+ /** Divisions of the container (SwiftUI `count`). Default 1. */
414
+ count?: number;
415
+ /** Spans claimed (SwiftUI `span`). Default 1. */
416
+ span?: number;
417
+ };
418
+ type AlignmentGuideName = "leading" | "trailing" | "top" | "bottom" | "centerX" | "centerY" | string;
419
+ type AlignmentGuideDims = {
420
+ width: number;
421
+ height: number;
422
+ };
423
+ type AlignmentGuideSpec = {
424
+ guide: AlignmentGuideName;
425
+ /** Absolute guide position, or compute from own size (SwiftUI `ViewDimensions`). */
426
+ compute: number | ((dims: AlignmentGuideDims) => number);
427
+ };
428
+ type MatchedGeometrySpec = {
429
+ id: string;
430
+ namespace?: string;
431
+ /** SwiftUI `isSource` — source owns the shared geometry. Default true. */
432
+ isSource?: boolean;
433
+ };
434
+ type PreferenceKeyDef<T> = {
435
+ readonly __preferenceKey: true;
436
+ readonly id: string | symbol;
437
+ readonly defaultValue: T;
438
+ reduce: (value: T, nextValue: T) => T;
439
+ };
440
+ type PreferenceWriteSpec = {
441
+ key: PreferenceKeyDef<any>;
442
+ value: unknown;
443
+ };
444
+ type PreferenceReadSpec = {
445
+ key: PreferenceKeyDef<any>;
446
+ onChange: (value: any) => void;
447
+ };
448
+ declare const Edge: {
449
+ readonly top: "top";
450
+ readonly bottom: "bottom";
451
+ readonly leading: "leading";
452
+ readonly trailing: "trailing";
453
+ };
454
+ type Edge = (typeof Edge)[keyof typeof Edge];
455
+ declare const EdgeSet: {
456
+ readonly top: "top";
457
+ readonly bottom: "bottom";
458
+ readonly leading: "leading";
459
+ readonly trailing: "trailing";
460
+ readonly horizontal: "horizontal";
461
+ readonly vertical: "vertical";
462
+ readonly all: "all";
463
+ };
464
+ type EdgeSet = (typeof EdgeSet)[keyof typeof EdgeSet];
465
+ type EdgeInsetsValue = {
466
+ top?: number | string;
467
+ bottom?: number | string;
468
+ leading?: number | string;
469
+ trailing?: number | string;
470
+ /** CSS left — alias of leading in LTR */
471
+ left?: number | string;
472
+ /** CSS right — alias of trailing in LTR */
473
+ right?: number | string;
474
+ };
475
+ type SafeAreaInsetEdge = Edge | "top" | "bottom" | "leading" | "trailing" | "left" | "right";
476
+ type SafeAreaInsetSpec = {
477
+ edge: SafeAreaInsetEdge;
478
+ content: FiboChild | (() => FiboChild);
479
+ /** Gap between inset bar and content. Default 0. */
480
+ spacing?: number;
481
+ };
482
+ interface SpringOptions {
483
+ stiffness?: number;
484
+ damping?: number;
485
+ mass?: number;
486
+ }
487
+ declare const MOTION_PRESETS: readonly [
488
+ "fadeIn",
489
+ "fadeOut",
490
+ "fade",
491
+ "slideUp",
492
+ "slideDown",
493
+ "slideLeft",
494
+ "slideRight",
495
+ "scaleIn",
496
+ "scaleOut",
497
+ "scale",
498
+ "blurIn",
499
+ "blurOut",
500
+ "blur",
501
+ "pop",
502
+ "bounce"
503
+ ];
504
+ type MotionPreset = (typeof MOTION_PRESETS)[number];
505
+ interface CustomMotion {
506
+ from: Record<string, string | number>;
507
+ to: Record<string, string | number>;
508
+ duration?: number;
509
+ ease?: string;
510
+ delay?: number;
511
+ stiffness?: number;
512
+ damping?: number;
513
+ mass?: number;
514
+ }
515
+ interface ThemeColors {
516
+ primary: string;
517
+ primaryVariant?: string;
518
+ primaryContainer?: string;
519
+ onPrimaryContainer?: string;
520
+ secondary: string;
521
+ secondaryVariant?: string;
522
+ secondaryContainer?: string;
523
+ onSecondaryContainer?: string;
524
+ tertiary?: string;
525
+ onTertiary?: string;
526
+ tertiaryContainer?: string;
527
+ onTertiaryContainer?: string;
528
+ background: string;
529
+ surface: string;
530
+ surfaceVariant?: string;
531
+ onSurfaceVariant?: string;
532
+ error: string;
533
+ errorContainer?: string;
534
+ onErrorContainer?: string;
535
+ success?: string;
536
+ warning?: string;
537
+ info?: string;
538
+ onPrimary: string;
539
+ onSecondary: string;
540
+ onBackground: string;
541
+ onSurface: string;
542
+ onError: string;
543
+ /** Borders / hairlines — maps to `--fibo-outline`. */
544
+ outline?: string;
545
+ outlineVariant?: string;
546
+ /** Maps to `--fibo-surface-container-low` (M3 card surfaces). */
547
+ surfaceContainerLow?: string;
548
+ }
549
+ interface ThemeTypography {
550
+ h1: TextStyle;
551
+ h2: TextStyle;
552
+ h3: TextStyle;
553
+ h4: TextStyle;
554
+ h5: TextStyle;
555
+ h6: TextStyle;
556
+ body: TextStyle;
557
+ caption: TextStyle;
558
+ label: TextStyle;
559
+ }
560
+ interface ThemeSpacing {
561
+ xs: string;
562
+ sm: string;
563
+ md: string;
564
+ lg: string;
565
+ xl: string;
566
+ }
567
+ interface ThemeBorderRadius {
568
+ /** Maps to `--fibo-radius-xs` when set (CSS sheets already define it). */
569
+ xs?: string;
570
+ sm: string;
571
+ md: string;
572
+ lg: string;
573
+ /** Maps to `--fibo-radius-xl` when set (CSS sheets already define it). */
574
+ xl?: string;
575
+ full: string;
576
+ }
577
+ interface ThemeShadows {
578
+ sm: string;
579
+ md: string;
580
+ lg: string;
581
+ }
582
+ interface FiboTheme {
583
+ name: FiboThemeName;
584
+ colors: ThemeColors;
585
+ typography: ThemeTypography;
586
+ spacing: ThemeSpacing;
587
+ borderRadius: ThemeBorderRadius;
588
+ shadows: ThemeShadows;
589
+ fontFamily: string;
590
+ }
591
+ declare const FIBO_THEMES: {
592
+ readonly material: FiboTheme;
593
+ readonly cupertino: FiboTheme;
594
+ readonly web: FiboTheme;
595
+ readonly noir: FiboTheme;
596
+ };
597
+ type FiboThemePreset = keyof typeof FIBO_THEMES;
598
+ type ThemeInput = FiboTheme | FiboThemePreset;
599
+ declare enum Colors {
600
+ Primary = "primary",
601
+ OnPrimary = "on-primary",
602
+ PrimaryContainer = "primary-container",
603
+ OnPrimaryContainer = "on-primary-container",
604
+ Secondary = "secondary",
605
+ OnSecondary = "on-secondary",
606
+ SecondaryContainer = "secondary-container",
607
+ OnSecondaryContainer = "on-secondary-container",
608
+ Tertiary = "tertiary",
609
+ OnTertiary = "on-tertiary",
610
+ TertiaryContainer = "tertiary-container",
611
+ OnTertiaryContainer = "on-tertiary-container",
612
+ Error = "error",
613
+ OnError = "on-error",
614
+ Success = "success",
615
+ Warning = "warning",
616
+ Info = "info",
617
+ Background = "background",
618
+ OnBackground = "on-background",
619
+ Surface = "surface",
620
+ OnSurface = "on-surface",
621
+ SurfaceVariant = "surface-variant",
622
+ OnSurfaceVariant = "on-surface-variant",
623
+ Outline = "outline",
624
+ Transparent = "transparent",
625
+ Black = "black",
626
+ White = "white"
627
+ }
628
+ declare enum ShadowSize {
629
+ Sm = "sm",
630
+ Md = "md",
631
+ Lg = "lg",
632
+ Xl = "xl",
633
+ Xl2 = "2xl"
634
+ }
635
+ declare enum ShadowPreset {
636
+ Card = "card",
637
+ Button = "button",
638
+ Modal = "modal",
639
+ Float = "float",
640
+ Inner = "inner"
641
+ }
642
+ declare enum ShadowDirection {
643
+ Top = "top",
644
+ Bottom = "bottom",
645
+ Left = "left",
646
+ Right = "right",
647
+ TopBottom = "top-bottom",
648
+ LeftRight = "left-right",
649
+ Vertical = "vertical",
650
+ Horizontal = "horizontal",
651
+ All = "all"
652
+ }
653
+ type ShadowConfig = ShadowSize | ShadowPreset | string | 0 | null | [
654
+ string,
655
+ number?
656
+ ] | [
657
+ ShadowDirection | string,
658
+ ShadowSize | string
659
+ ] | [
660
+ ShadowDirection | string,
661
+ string
662
+ ] | [
663
+ ShadowDirection | string,
664
+ string,
665
+ number?
666
+ ] | [
667
+ ShadowDirection | string,
668
+ ShadowSize | string,
669
+ string,
670
+ number?
671
+ ];
672
+ type PseudoStateFn = (builder: PseudoStateBuilder) => void | PseudoStateBuilder;
673
+ declare abstract class FiboBuilder {
674
+ /** @internal Extra DOM props forwarded to the host element. */
675
+ protected _props: Record<string, any>;
676
+ protected _style: React$1.CSSProperties;
677
+ protected _cssStyles: React$1.CSSProperties;
678
+ protected _classNames: string[];
679
+ protected _children: React$1.ReactNode[];
680
+ /** Resolved theme for this subtree (SwiftUI Environment / Flutter Theme). */
681
+ protected _theme?: FiboTheme;
682
+ protected _state: Map<string, any>;
683
+ protected _providers: Map<string, any>;
684
+ protected _observers: Set<Observable<any>>;
685
+ protected _signals: Set<BindableSignal<any>>;
686
+ /** Explicit `.bindSignal()` / `.observer()` owns nested reads. A direct wire does not. */
687
+ protected _ownsReads: boolean;
688
+ /** @internal Direct `method(signal.value)` calls replayed when that signal changes. */
689
+ protected _replays: Array<() => void>;
690
+ protected _isObserver: boolean;
691
+ /** Normal-priority gestures (SwiftUI `.gesture`). Last = outermost. */
692
+ protected _gestures: GestureBuilder[];
693
+ /** SwiftUI `.simultaneousGesture` — bubble / no stopPropagation. */
694
+ protected _simultaneousGestures: GestureBuilder[];
695
+ /** SwiftUI `.highPriorityGesture` — wrapped last (outermost / capture wins). */
696
+ protected _highPriorityGestures: GestureBuilder[];
697
+ protected _offset?: OffsetSpec;
698
+ protected _clipped: boolean;
699
+ protected _clipShape?: ClipShapeName | string;
700
+ protected _contentShape?: ContentShapeName | string;
701
+ protected _fixedSize?: FixedSizeSpec;
702
+ protected _layoutPriority?: number;
703
+ protected _layers: LayerSpec[];
704
+ protected _onGeometryChange?: (rect: GeometryRect) => void;
705
+ protected _compositingGroup: boolean;
706
+ protected _viewMask?: string;
707
+ protected _containerRelativeFrame?: ContainerRelativeFrameSpec;
708
+ protected _alignmentGuide?: AlignmentGuideSpec;
709
+ protected _matchedGeometry?: MatchedGeometrySpec;
710
+ protected _preferences: PreferenceWriteSpec[];
711
+ protected _preferenceReaders: PreferenceReadSpec[];
712
+ protected _safeAreaInsets: SafeAreaInsetSpec[];
713
+ protected _navigationTitle?: string;
714
+ protected _animationConfig?: Partial<AnimationOptions>;
715
+ protected _animatedProps: Map<string, Signal<any>>;
716
+ protected _transforms: string[];
717
+ protected _transitionClass?: string;
718
+ /** True while transition class was auto-managed for hover/effect presets (expandable). */
719
+ protected _autoEffectTransition: boolean;
720
+ protected _effectTransitionProps: string[];
721
+ /**
722
+ * When true, getStyle() promotes background/border shorthands to longhands and
723
+ * (optionally) stamps a resting translate3d so pseudo transforms ease cleanly.
724
+ */
725
+ protected _smoothSurface: boolean;
726
+ protected _smoothNeedsRestTransform: boolean;
727
+ protected _motionClass?: string;
728
+ protected _staggerMs?: number;
729
+ protected _reveal?: {
730
+ preset: string;
731
+ once?: boolean;
732
+ rootMargin?: string;
733
+ threshold?: number;
734
+ };
735
+ protected _scrollProgress: boolean;
736
+ protected _viewTransition?: string;
737
+ protected _reducedMotion: "reduce" | "never";
738
+ protected _usesCssMotion: boolean;
739
+ protected _explicitScrollMargin: boolean;
740
+ /** Shrink-wrap: skip the default `w-full` / `self-stretch` on Row and Column. */
741
+ protected _hug: boolean;
742
+ /**
743
+ * SwiftUI `.frame(...)` wrappers (outer → inner order of application).
744
+ * Applied in `assembleBuilder` so every widget gets the same DX.
745
+ */
746
+ protected _frames: FrameSpec[];
747
+ /**
748
+ * Unset every CSS property on this component and what it renders inside.
749
+ * Chain `.style()`, `.px()`, `.flex()` and the rest after this to put back only what you want.
750
+ */
751
+ protected _resetStyle: boolean;
752
+ /** Kebab box longhands already stamped (`padding-left`, …) so later shorthand cannot clobber them. */
753
+ protected _boxLonghands: Set<string>;
754
+ resetStyle(): this;
755
+ protected isReset(): boolean;
756
+ hug(): this;
757
+ protected isHug(): boolean;
758
+ /**
759
+ * SwiftUI `View.frame` — invisible box around this view.
760
+ *
761
+ * ```ts
762
+ * Image(url).frame({ width: 300, height: 400 })
763
+ * Text('★★★★').frame({
764
+ * maxWidth: Size.infinity,
765
+ * maxHeight: Size.infinity,
766
+ * alignment: StackAlign.topTrailing,
767
+ * })
768
+ * ```
769
+ *
770
+ * Chainable: each `.frame()` wraps the previous (same as SwiftUI).
771
+ */
772
+ frame(spec: FrameSpec): this;
773
+ /**
774
+ * SwiftUI `.offset(x:y:)` — visual translate; layout size stays.
775
+ * `.offset(8)` ≡ `{ x: 8, y: 8 }`; `.offset({ x: 4 })` only horizontal.
776
+ */
777
+ offset(value: number | OffsetSpec): this;
778
+ /** SwiftUI `.clipped()` — overflow hidden to bounds. */
779
+ clipped(): this;
780
+ /**
781
+ * SwiftUI `.clipShape` — `'circle' | 'rounded' | 'square'` or any CSS radius
782
+ * (`'8px'`, `'50%'`). Clips drawing; hit-testing still follows layout unless
783
+ * you also set {@link contentShape}.
784
+ */
785
+ clipShape(shape: ClipShapeName | string): this;
786
+ /**
787
+ * SwiftUI `.contentShape` — region used for hit-testing (tap / long-press).
788
+ * Default `'rectangle'` = full frame box, even over transparent pixels.
789
+ *
790
+ * ```ts
791
+ * ZStack()…frame({ width: 300, height: 400 })
792
+ * .clipShape('8px')
793
+ * .contentShape('rectangle')
794
+ * .onTapGesture(open)
795
+ * ```
796
+ */
797
+ contentShape(shape?: ContentShapeName | string): this;
798
+ /**
799
+ * SwiftUI `.fixedSize(horizontal:vertical:)` — hug content on those axes.
800
+ * Defaults both axes when called with no args.
801
+ */
802
+ fixedSize(spec?: FixedSizeSpec | boolean): this;
803
+ /**
804
+ * SwiftUI `.layoutPriority` — higher resists compression and claims free space.
805
+ * Web: flex-grow / flex-shrink (not a full multi-axis proposal solver).
806
+ */
807
+ layoutPriority(value: number): this;
808
+ /** SwiftUI `.compositingGroup()`. */
809
+ compositingGroup(): this;
810
+ /** SwiftUI `.mask` — shape name or CSS mask-image value. */
811
+ mask(shapeOrCss: ClipShapeName | "rectangle" | string): this;
812
+ /** SwiftUI `containerRelativeFrame`. */
813
+ containerRelativeFrame(axis?: ContainerRelativeFrameSpec["axis"] | ContainerRelativeFrameSpec, count?: number, span?: number): this;
814
+ /**
815
+ * SwiftUI `alignmentGuide` — named guide + absolute value or compute from size.
816
+ * ```ts
817
+ * Text('Hi').alignmentGuide('leading', (d) => d.width / 2)
818
+ * ```
819
+ */
820
+ alignmentGuide(guide: AlignmentGuideName, compute: number | ((dims: {
821
+ width: number;
822
+ height: number;
823
+ }) => number)): this;
824
+ /**
825
+ * SwiftUI `matchedGeometryEffect` — shared view-transition id + measured rect.
826
+ * ```ts
827
+ * Image(url).matchedGeometryEffect('hero', { namespace: 'gallery', isSource: true })
828
+ * ```
829
+ */
830
+ matchedGeometryEffect(id: string, namespaceOrOpts?: string | {
831
+ namespace?: string;
832
+ isSource?: boolean;
833
+ }): this;
834
+ /** SwiftUI `.preference(key:value:)` — contribute upward to `.onPreferenceChange`. */
835
+ preference<T>(key: PreferenceKeyDef<T>, value: T): this;
836
+ /** SwiftUI `.onPreferenceChange` — reduce descendant preferences. */
837
+ onPreferenceChange<T>(key: PreferenceKeyDef<T>, onChange: (value: T) => void): this;
838
+ /**
839
+ * SwiftUI `.safeAreaInset(edge:)` — reserve a bar on one edge; content fills the rest.
840
+ * Distinct from `SafeArea` (notch padding) and `proxy.safeAreaInsets` (read-only).
841
+ */
842
+ safeAreaInset(edge: SafeAreaInsetEdge, content: SafeAreaInsetSpec["content"], spacing?: number): this;
843
+ /**
844
+ * SwiftUI `.navigationTitle` — stores title for Scaffold (see `Scaffold.navigationTitle`).
845
+ * On non-Scaffold builders, sets `aria-label` / data attribute only (no extra chrome bar).
846
+ */
847
+ navigationTitle(title: string): this;
848
+ /**
849
+ * SwiftUI `.overlay(alignment:) { }` — layer above this view.
850
+ * ```ts
851
+ * Image(url).overlay(Text('NEW'), StackAlign.topTrailing)
852
+ * ```
853
+ */
854
+ overlay(child: FiboChild | (() => FiboChild), alignment?: StackAlign | keyof typeof StackAlign): this;
855
+ /**
856
+ * SwiftUI `.background(alignment:) { }` — layer behind this view.
857
+ */
858
+ background(child: FiboChild | (() => FiboChild), alignment?: StackAlign | keyof typeof StackAlign): this;
859
+ /** SwiftUI `onGeometryChange` — fires on mount + resize. */
860
+ onGeometryChange(handler: (rect: GeometryRect) => void): this;
861
+ id(value: string): this;
862
+ /**
863
+ * Scroll target. Same as `.id()`, plus `scroll-margin-top` so the section
864
+ * is not hidden under a sticky header. Pair with `scrollTo('#name')`.
865
+ */
866
+ anchor(value: string): this;
867
+ /**
868
+ * Explicit `scroll-margin-top` on this node (overrides the sticky CSS variable
869
+ * that `.anchor()` applies).
870
+ */
871
+ scrollMargin(value: number | string): this;
872
+ /** Stamp a class onto the host. Used by PseudoStateBuilder (hashed `:hover` etc.). */
873
+ addClassName(name: string): this;
874
+ /**
875
+ * React list key. After this is called, React reads the key as a string
876
+ * on both the builder element and the inner host wrapper.
877
+ * Builders are valid elements — you do not need `.build()`.
878
+ */
879
+ key(value: string | number): this;
880
+ private setBoxLonghand;
881
+ private setBoxShorthand;
882
+ paddingHorizontal(value: string | number): this;
883
+ paddingVertical(value: string | number): this;
884
+ /**
885
+ * SwiftUI `.padding`:
886
+ * - `.padding(8)` — all sides
887
+ * - `.padding(EdgeSet.horizontal, 12)` — Edge.Set + value
888
+ * - `.padding({ top: 8, leading: 12 })` — EdgeInsets
889
+ */
890
+ padding(value: string | number): this;
891
+ padding(edges: EdgeSet, value: string | number): this;
892
+ padding(insets: EdgeInsetsValue): this;
893
+ /** SwiftUI `.padding` with {@link EdgeSet} — alias clarity. */
894
+ /** @deprecated Prefer `.padding(EdgeSet, n)` — same implementation. */
895
+ paddingEdges(edges: EdgeSet, value: string | number): this;
896
+ marginHorizontal(value: string | number): this;
897
+ marginVertical(value: string | number): this;
898
+ margin(value: string | number): this;
899
+ /** Inline layout wins over a host that hardcodes flex on the element (Form, Scaffold). */
900
+ protected layoutStyle(patch: React$1.CSSProperties): this;
901
+ /** Last write of a key lives in one bag so getStyle() does not let earlier `.css()` beat later `.style()`. */
902
+ private dropConflictingKeys;
903
+ private trackBoxLonghandsFrom;
904
+ flexDirection(direction: "row" | "column" | "row-reverse" | "column-reverse"): this;
905
+ /** Flutter `textDirection`. */
906
+ textDirection(direction: "ltr" | "rtl"): this;
907
+ /** Flutter `textBaseline`. Both modes align on the flex baseline. */
908
+ textBaseline(baseline: "alphabetic" | "ideographic"): this;
909
+ /** Flutter `clipBehavior`. `none` shows overflow; the other two clip. */
910
+ clip(behavior: "none" | "hardEdge" | "antiAlias"): this;
911
+ /**
912
+ * Flutter `mainAxisSize`. `min` hugs the current flex direction.
913
+ * `max` stretches along that same axis.
914
+ */
915
+ mainAxisSize(size: "min" | "max"): this;
916
+ zIndex(value: number): this;
917
+ alignItems(alignment: "start" | "center" | "end" | "stretch" | "baseline"): this;
918
+ alignSelf(alignment: "start" | "center" | "end" | "stretch" | "baseline" | "auto"): this;
919
+ flexWrap(wrap: "wrap" | "nowrap" | "wrap-reverse"): this;
920
+ /**
921
+ * Main-axis distribution. Accepts Tailwind shortcuts (`between`) and CSS/Flutter
922
+ * names (`space-between` / `spaceBetween`).
923
+ */
924
+ justifyContent(justify: "start" | "center" | "end" | "between" | "around" | "evenly" | "space-between" | "space-around" | "space-evenly" | "spaceBetween" | "spaceAround" | "spaceEvenly"): this;
925
+ /** True when flexDirection is column / column-reverse (default is row). */
926
+ protected isVerticalFlex(): boolean;
927
+ /**
928
+ * Both screen axes. `.align(Align.center)` and `.align('center')` do the same.
929
+ * `between` packs the main axis and starts the cross axis.
930
+ */
931
+ align(alignment: AlignAxis): this;
932
+ /**
933
+ * Horizontal (screen X) alignment. Same meaning on Row and Column:
934
+ * left / center / right of the container — not “main axis”.
935
+ */
936
+ alignX(alignment: AlignAxis): this;
937
+ /**
938
+ * Vertical (screen Y) alignment. Same meaning on Row and Column:
939
+ * top / center / bottom of the container — not “cross axis”.
940
+ */
941
+ alignY(alignment: AlignAxis): this;
942
+ protected applyMainAlign(alignment: AlignAxis | string): this;
943
+ protected applyCrossAlign(alignment: AlignAxis | string): this;
944
+ flex(value?: number | string): this;
945
+ grid(): this;
946
+ inlineFlex(): this;
947
+ inlineGrid(): this;
948
+ block(): this;
949
+ inlineBlock(): this;
950
+ hidden(): this;
951
+ center(): this;
952
+ /** Center on the horizontal screen axis (uses `.alignX('center')`). */
953
+ centerX(): this;
954
+ /** Center on the vertical screen axis (uses `.alignY('center')`). */
955
+ centerY(): this;
956
+ spaceBetween(): this;
957
+ spaceAround(): this;
958
+ spaceEvenly(): this;
959
+ fill(): this;
960
+ fillWidth(): this;
961
+ fillHeight(): this;
962
+ square(size: number | string): this;
963
+ circle(): this;
964
+ opacity(value: number): this;
965
+ p(value: number | string): this;
966
+ px(value: number | string): this;
967
+ py(value: number | string): this;
968
+ paddingX(value: number | string): this;
969
+ paddingY(value: number | string): this;
970
+ m(value: number | string): this;
971
+ mx(value: number | string): this;
972
+ my(value: number | string): this;
973
+ marginX(value: number | string): this;
974
+ marginY(value: number | string): this;
975
+ bg(color: string | Colors): this;
976
+ text(color: string | Colors): this;
977
+ color(value: string | Colors): this;
978
+ private resolveSemanticColor;
979
+ shadow(config?: ShadowConfig): this;
980
+ /**
981
+ * Breakpoint styles compiled to CSS `@media` (same engine as `.md()`).
982
+ * Tiers stay mutually exclusive: mobile `<768`, tablet `768–1023`, desktop `≥1024`.
983
+ * No `window.innerWidth` — hydrate-safe.
984
+ */
985
+ responsive(styles: ResponsiveStyles): this;
986
+ /**
987
+ * CSS `@media` (min-width or a raw query). Compiles to a class — no resize JS.
988
+ *
989
+ * @example Box().padding(8).media('md', { padding: 16 }).media('(prefers-color-scheme: dark)', { backgroundColor: '#111' })
990
+ */
991
+ media(query: BreakpointKey | string, styles: React$1.CSSProperties): this;
992
+ private registerMediaStyles;
993
+ sm(styles: React$1.CSSProperties): this;
994
+ md(styles: React$1.CSSProperties): this;
995
+ lg(styles: React$1.CSSProperties): this;
996
+ xl(styles: React$1.CSSProperties): this;
997
+ rounded(value: string | number): this;
998
+ borderRadius(value: string | number): this;
999
+ borderColor(value: string): this;
1000
+ /**
1001
+ * A passed size is a lock: `min-*` plus `flex-shrink: 0`, so a flex parent
1002
+ * (the Scaffold body) cannot divide the viewport across these children.
1003
+ * `400`, `'320px'`, `Size.full`, and `Space.md` all count. `flex(1)` afterwards
1004
+ * opts back into sharing space.
1005
+ *
1006
+ * Percentages / `auto` do not lock `min-*` — `minWidth: 100%` on a flex
1007
+ * child fights clamping and lets long text blow past the ZStack box.
1008
+ */
1009
+ private lockAxis;
1010
+ width(value: string | number): this;
1011
+ paint(property: string, value: string): this;
1012
+ height(value: string | number): this;
1013
+ gap(value: string | number): this;
1014
+ clean(): this;
1015
+ borderInput(color?: string, focusColor?: string): this;
1016
+ weight(value: string | number): this;
1017
+ onClick(handler: (event: React$1.MouseEvent<any>) => void): this;
1018
+ state<T>(key: string, initialValue: T): this;
1019
+ getState<T>(key: string): T | undefined;
1020
+ setState<T>(key: string, value: T): this;
1021
+ provide<T>(key: string, value: T): this;
1022
+ consume<T>(key: string): T | undefined;
1023
+ observer(options?: string | number | {
1024
+ key?: string | number;
1025
+ }): this;
1026
+ observe<T>(observable: Observable<T>): this;
1027
+ bindSignal<T>(signal: BindableSignal<T>): this;
1028
+ /**
1029
+ * @internal Wire a direct `method(signal.value)` to this node.
1030
+ * Does not claim reads that happen later in a children function.
1031
+ */
1032
+ adoptWire(signals: Subscribable<unknown>[], replay: () => void): void;
1033
+ /** @internal */
1034
+ runReplays(): void;
1035
+ translateX(value: Signal<number> | number): this;
1036
+ translateY(value: Signal<number> | number): this;
1037
+ scale(value: Signal<number> | number): this;
1038
+ /** SwiftUI `scaleEffect` — alias of {@link scale}. */
1039
+ scaleEffect(value: Signal<number> | number): this;
1040
+ rotate(degrees: Signal<number> | number): this;
1041
+ /** SwiftUI `rotationEffect` — alias of {@link rotate} (degrees). */
1042
+ rotationEffect(degrees: Signal<number> | number): this;
1043
+ /**
1044
+ * SwiftUI `.allowsHitTesting` — when `false`, this view and descendants
1045
+ * ignore pointer hits (`pointer-events: none`).
1046
+ */
1047
+ allowsHitTesting(value?: boolean): this;
1048
+ /**
1049
+ * SwiftUI scroll target id — used by {@link ScrollViewReader} `.scrollTo(id)`.
1050
+ * Sets `data-scroll-id` on the host.
1051
+ */
1052
+ scrollTarget(id: string): this;
1053
+ /**
1054
+ * SwiftUI: taps on *containers* (ZStack / Column / …) only hit drawn content
1055
+ * unless `.contentShape(Rectangle())` is set. We default that shape when the
1056
+ * first gesture is attached and the caller did not set one — same as the
1057
+ * usual SwiftUI fix, without forcing it on chrome-only views.
1058
+ */
1059
+ protected ensureGestureContentShape(): void;
1060
+ /**
1061
+ * SwiftUI `.gesture` — attach Tap / LongPress / Drag / Magnify / Rotate / …
1062
+ * Chainable: each call wraps the previous (outermost = last).
1063
+ */
1064
+ gesture(gesture: GestureBuilder): this;
1065
+ /** SwiftUI `.simultaneousGesture` — runs alongside other gestures (no steal). */
1066
+ simultaneousGesture(gesture: GestureBuilder): this;
1067
+ /** SwiftUI `.highPriorityGesture` — recognized before the view's own gestures. */
1068
+ highPriorityGesture(gesture: GestureBuilder): this;
1069
+ /**
1070
+ * Sugar for {@link TapGesture}`.onEnd(handler)`.
1071
+ * Note: `Button` / `List` / `ListTile` keep domain-specific `.onPress`.
1072
+ */
1073
+ onPress(handler: () => void): this;
1074
+ /** Flutter-style alias of {@link onPress}. */
1075
+ onTap(handler: () => void): this;
1076
+ /**
1077
+ * SwiftUI `onTapGesture(count:perform:)` — default count 1.
1078
+ * Pass a location callback for SpatialTap behavior.
1079
+ */
1080
+ onTapGesture(countOrHandler: number | ((location?: TapLocation) => void) | (() => void), handler?: ((location?: TapLocation) => void) | (() => void)): this;
1081
+ /**
1082
+ * SwiftUI `onLongPressGesture(minimumDuration:perform:onPressingChanged:)`.
1083
+ */
1084
+ onLongPressGesture(handlerOrOpts: (() => void) | {
1085
+ minimumDuration?: number;
1086
+ maximumDistance?: number;
1087
+ perform: () => void;
1088
+ onPressingChanged?: (pressing: boolean) => void;
1089
+ }, onPressingChanged?: (pressing: boolean) => void): this;
1090
+ animation(config: Partial<AnimationOptions>): this;
1091
+ protected hasStateManagement(): boolean;
1092
+ className(className: string): this;
1093
+ classNames(classNames: string[]): this;
1094
+ css(styles: React$1.CSSProperties): this;
1095
+ style(style: React$1.CSSProperties): this;
1096
+ props(props: Record<string, any>): this;
1097
+ protected _transitionDuration: number;
1098
+ protected _transitionEasing: string;
1099
+ protected _transitionDelay: number;
1100
+ protected _transitionProperties: string[];
1101
+ /**
1102
+ * Apply CSS transition
1103
+ *
1104
+ * Overload 1: String syntax
1105
+ * Example: .transition('all 0.2s ease-in-out')
1106
+ *
1107
+ * Overload 2: Shorthand with parameters
1108
+ * Example: .transition('all', 200, 'ease-out')
1109
+ * Example: .transition('all', 200, 'ease-out', 50)
1110
+ */
1111
+ transition(value: string): this;
1112
+ transition(properties: string | string[], duration: number, easing?: string, delay?: number): this;
1113
+ /**
1114
+ * Set transition duration in milliseconds
1115
+ * Example: .duration(200) → 200ms
1116
+ */
1117
+ duration(ms: number): this;
1118
+ /**
1119
+ * Set transition easing function
1120
+ * Example: .easing('ease-in-out')
1121
+ */
1122
+ easing(value: "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "spring" | string): this;
1123
+ /** Alias of `.easing()`. `'spring'` becomes CSS `linear()`. */
1124
+ ease(value: string): this;
1125
+ /**
1126
+ * Set transition delay in milliseconds
1127
+ * Example: .delay(100) → 100ms delay
1128
+ */
1129
+ delay(ms: number): this;
1130
+ /**
1131
+ * Set which properties to transition
1132
+ * Example: .properties(['color', 'transform'])
1133
+ */
1134
+ properties(props: string[]): this;
1135
+ /**
1136
+ * Apply the built transition to the element
1137
+ */
1138
+ protected _applyTransition(): void;
1139
+ private replaceTransitionClass;
1140
+ /**
1141
+ * CSS enter/exit preset. Compiles to `@keyframes` — no rAF.
1142
+ * @example Box().animate('fadeIn').duration(300).ease('spring')
1143
+ */
1144
+ animate(preset: MotionPreset | string, options?: {
1145
+ duration?: number;
1146
+ ease?: string;
1147
+ delay?: number;
1148
+ from?: number | string;
1149
+ stiffness?: number;
1150
+ damping?: number;
1151
+ mass?: number;
1152
+ }): this;
1153
+ animate(custom: CustomMotion): this;
1154
+ /** CSS `linear()` spring. Works on `.animate()` and `.transition()` / `.hover()`. */
1155
+ spring(options?: SpringOptions): this;
1156
+ reducedMotion(mode?: "reduce" | "never"): this;
1157
+ press(callback?: (builder: PseudoStateBuilder) => void | PseudoStateBuilder): this;
1158
+ /**
1159
+ * Shortcut: `.hover(h => h.effect(name))`.
1160
+ * Named interaction effect on `:hover` (forward, float, grow, nudge, …).
1161
+ */
1162
+ hoverEffect(name: string): this;
1163
+ /**
1164
+ * Shortcut: `.press(p => p.effect(name))` (maps to `:active`).
1165
+ */
1166
+ pressEffect(name: string): this;
1167
+ /**
1168
+ * Shortcut: `.focus(f => f.effect(name))`.
1169
+ */
1170
+ focusEffect(name: string): this;
1171
+ /**
1172
+ * Shortcut: `.active(a => a.effect(name))`.
1173
+ */
1174
+ activeEffect(name: string): this;
1175
+ /**
1176
+ * Shortcut: `.groupHover(h => h.effect(name))`.
1177
+ */
1178
+ groupHoverEffect(name: string): this;
1179
+ focusVisible(): PseudoStateBuilder;
1180
+ focusVisible(callback: PseudoStateFn): this;
1181
+ stagger(ms: number): this;
1182
+ /** Scroll-reveal: IntersectionObserver toggles `.fibo-inview`. */
1183
+ reveal(preset?: string | {
1184
+ preset?: string;
1185
+ once?: boolean;
1186
+ rootMargin?: string;
1187
+ threshold?: number;
1188
+ }, options?: {
1189
+ once?: boolean;
1190
+ rootMargin?: string;
1191
+ threshold?: number;
1192
+ }): this;
1193
+ /** Alias of `.reveal()` for scroll-triggered presets. */
1194
+ onScroll(preset?: string): this;
1195
+ /** CSS `animation-timeline: view()` / `scroll()`; IntersectionObserver reveal is the fallback. */
1196
+ scrollTimeline(kind?: "view" | "scroll"): this;
1197
+ scrollProgress(): this;
1198
+ smoothScroll(): this;
1199
+ scrollSnap(axis?: "x" | "y" | "both"): this;
1200
+ scrollSnapAlign(align?: "start" | "center" | "end"): this;
1201
+ sticky(top?: number | string | boolean): this;
1202
+ /**
1203
+ * Publish `--fibo-sticky-offset` on `:root` so `.anchor()` / `html` scroll-padding
1204
+ * clear this bar. Header uses the real bar height.
1205
+ */
1206
+ protected publishStickyOffset(value: number | string): void;
1207
+ viewTransition(name: string): this;
1208
+ /** Default `:focus-visible` ring. Pass a callback to customize. */
1209
+ focusRing(color?: string): this;
1210
+ protected ensureInteractiveTransition(): void;
1211
+ /**
1212
+ * Prepare resting styles + transition so pseudo-state longhands (bg/border/transform)
1213
+ * interpolate instead of snapping. Safe to call repeatedly from PseudoStateBuilder.
1214
+ * @internal
1215
+ */
1216
+ prepareSmoothInteraction(properties: string[]): void;
1217
+ /** @internal Convert inline background/border shorthands → longhands. */
1218
+ promoteSurfaceLonghands(): void;
1219
+ /** @internal Stamp translate3d(0,0,0) when no resting transform exists. */
1220
+ ensureRestTransform(): void;
1221
+ /**
1222
+ * Ensure the base element transitions the properties an interaction effect needs.
1223
+ * Expands an auto-managed transition; no-ops if the caller set `.transition(...)`
1224
+ * explicitly or a motion animation class is present.
1225
+ * @internal Used by PseudoStateBuilder.effect() and hover/press shortcuts.
1226
+ */
1227
+ ensureEffectTransition(properties: string[]): void;
1228
+ /**
1229
+ * Apply a theme to this node and descendants (CSS vars inherit).
1230
+ * Fluent: `.theme("noir")` | `.theme(noirTheme)` | `.theme(extendTheme(webTheme, {…}))`.
1231
+ * SSR-safe: class + inline vars on first paint (no useEffect).
1232
+ */
1233
+ theme(input: ThemeInput): this;
1234
+ /** Prefer dark/light system chrome for native controls under this subtree. */
1235
+ colorScheme(scheme: "light" | "dark" | "light dark"): this;
1236
+ hover(): PseudoStateBuilder;
1237
+ hover(callback: PseudoStateFn): this;
1238
+ /**
1239
+ * Paint for a `When` state. Hover / focus / active / visited / disabled
1240
+ * write a CSS pseudo on this node. `on` / `off` are for Checkbox and Switch.
1241
+ *
1242
+ * ```ts
1243
+ * Row().when(When.hover, (s) => s.bg('#c8ff00'))
1244
+ * ```
1245
+ */
1246
+ when(state: When, style: WhenStyle): this;
1247
+ focus(): PseudoStateBuilder;
1248
+ focus(callback: PseudoStateFn): this;
1249
+ active(): PseudoStateBuilder;
1250
+ active(callback: PseudoStateFn): this;
1251
+ visited(): PseudoStateBuilder;
1252
+ visited(callback: PseudoStateFn): this;
1253
+ disabledState(): PseudoStateBuilder;
1254
+ disabledState(callback: PseudoStateFn): this;
1255
+ focusWithin(): PseudoStateBuilder;
1256
+ focusWithin(callback: PseudoStateFn): this;
1257
+ firstChild(): PseudoStateBuilder;
1258
+ firstChild(callback: PseudoStateFn): this;
1259
+ lastChild(): PseudoStateBuilder;
1260
+ lastChild(callback: PseudoStateFn): this;
1261
+ groupHover(): PseudoStateBuilder;
1262
+ groupHover(callback: PseudoStateFn): this;
1263
+ groupFocus(): PseudoStateBuilder;
1264
+ groupFocus(callback: PseudoStateFn): this;
1265
+ groupActive(): PseudoStateBuilder;
1266
+ groupActive(callback: PseudoStateFn): this;
1267
+ groupFocusWithin(): PseudoStateBuilder;
1268
+ groupFocusWithin(callback: PseudoStateFn): this;
1269
+ group(): this;
1270
+ protected _childFunction?: () => FiboChild | FiboChild[];
1271
+ children(children: FiboChildren): this;
1272
+ protected getClassName(): string;
1273
+ protected getStyle(): React$1.CSSProperties;
1274
+ protected processChildren(): React$1.ReactNode[];
1275
+ protected getChildFunction(): (() => FiboChild | FiboChild[]) | undefined;
1276
+ /**
1277
+ * @deprecated Builders are React elements. Returning or nesting the builder is enough.
1278
+ * `.build()` still assembles the host tree for older call sites.
1279
+ */
1280
+ abstract build(): React$1.ReactElement;
1281
+ }
1282
+ type KnownKeys<T> = {
1283
+ [K in keyof T]: string extends K ? never : number extends K ? never : K;
1284
+ } extends {
1285
+ [_ in keyof T]: infer U;
1286
+ } ? U : never;
1287
+ type StyleBuilder<T> = T & LogicalAxes & {
1288
+ [K in KnownKeys<React$1.CSSProperties>]-?: (value: React$1.CSSProperties[K]) => StyleBuilder<T>;
1289
+ } & React$1.ReactElement;
1290
+ type ExtendedButtonVariant = ButtonVariant | "ghost" | "soft" | "outline" | "text" | "raw" | "solid";
1291
+ type ButtonSize = "xs" | "sm" | "md" | "lg";
1292
+ type ButtonShape = "default" | "pill" | "square" | "rect" | "rounded" | "sharp";
1293
+ type ButtonTone = "default" | "inverse";
1294
+ type ButtonMotion = "default" | "none";
1295
+ declare class ButtonBuilder extends FiboBuilder {
1296
+ private _text;
1297
+ private _live;
1298
+ private _variant;
1299
+ private _size;
1300
+ private _onPress?;
1301
+ private _onHover?;
1302
+ private _disabled;
1303
+ private _icon?;
1304
+ private _shape;
1305
+ private _shadow;
1306
+ private _tone;
1307
+ private _motion;
1308
+ private _expand;
1309
+ private _htmlType;
1310
+ private _htmlTypeExplicit;
1311
+ constructor(text?: string | (() => string));
1312
+ text(value: string | (() => string)): this;
1313
+ children(children: FiboChildren): this;
1314
+ variant(variant: ExtendedButtonVariant): this;
1315
+ clean(): this;
1316
+ size(size: ButtonSize): this;
1317
+ onPress(handler: () => void): this;
1318
+ onHover(handler: () => void): this;
1319
+ disabled(value?: boolean): this;
1320
+ icon(icon: React$1.ReactNode): this;
1321
+ shape(value: ButtonShape): this;
1322
+ shadow(value: "none" | "soft"): this;
1323
+ tone(value: ButtonTone): this;
1324
+ motion(value: ButtonMotion): this;
1325
+ expand(value?: boolean): this;
1326
+ /**
1327
+ * HTML button type. `.type('submit')` is what people write inside a Form.
1328
+ * React still reads `element.type` as the component: a string sets this,
1329
+ * a props object renders the button.
1330
+ */
1331
+ type(value: "button" | "submit" | "reset"): this;
1332
+ htmlType(value: "button" | "submit" | "reset"): this;
1333
+ /** Shortcut for `.htmlType('submit')` inside a `Form`. */
1334
+ submit(): this;
1335
+ /** Shortcut for `.htmlType('reset')`. */
1336
+ reset(): this;
1337
+ private resolvedHtmlType;
1338
+ build(): React$1.ReactElement;
1339
+ }
1340
+ export declare const Button: (text?: string | (() => string) | undefined) => StyleBuilder<ButtonBuilder>;
1341
+ /** Where failed rules are painted. */
1342
+ export type FormErrorMode = "field" | "below" | "manual";
1343
+ type FormValues = Record<string, string | string[]>;
1344
+ type FormControl = {
1345
+ element: HTMLFormElement;
1346
+ /** Reset every field, or one named field back to its default. */
1347
+ reset(name?: string): void;
1348
+ /** Set one named field's current value (uncontrolled inputs). */
1349
+ set(name: string, value: string): void;
1350
+ /** Last validation messages (empty when valid). */
1351
+ errors: FieldErrors;
1352
+ };
1353
+ type FormSubmitHandler = (values: FormValues, form: FormControl, event: React$1.FormEvent<HTMLFormElement>) => unknown | Promise<unknown>;
1354
+ type FormBeforeSubmitHandler = (values: FormValues, form: FormControl, event: React$1.FormEvent<HTMLFormElement>) => unknown | Promise<unknown>;
1355
+ type FormAfterSubmitHandler = (values: FormValues, form: FormControl, event: React$1.FormEvent<HTMLFormElement>) => unknown | Promise<unknown>;
1356
+ /** Flatten FormData into a plain object (multi-value keys → string[]). */
1357
+ export declare function formDataToValues(fd: FormData): FormValues;
1358
+ declare class FormBuilder extends FiboBuilder {
1359
+ private _gap?;
1360
+ private _onSubmit?;
1361
+ private _beforeSubmit?;
1362
+ private _afterSubmit?;
1363
+ private _validation?;
1364
+ private _errorMode;
1365
+ private _onInvalid?;
1366
+ private _action?;
1367
+ private _method;
1368
+ gap(value: number | string): this;
1369
+ spacing(value: number | string): this;
1370
+ onSubmit(handler: FormSubmitHandler): this;
1371
+ beforeSubmit(handler: FormBeforeSubmitHandler): this;
1372
+ afterSubmit(handler: FormAfterSubmitHandler): this;
1373
+ /**
1374
+ * Rules per field name. Combined with `TextField().rules(...)`.
1375
+ * Failed submit skips `before` / `onSubmit` / `after`.
1376
+ *
1377
+ * `.errorMode('field')` — TextField's own error line (default)
1378
+ * `.errorMode('below')` — message under the control
1379
+ * `.errorMode('manual')` — only `.onInvalid(errors)`
1380
+ */
1381
+ validation(schema: FieldSchema): this;
1382
+ errorMode(mode: FormErrorMode): this;
1383
+ /** Custom placement. Still receives errors when mode is `field` or `below`. */
1384
+ onInvalid(handler: (errors: FieldErrors, form: FormControl) => unknown): this;
1385
+ action(url: string): this;
1386
+ method(m: "get" | "post" | string): this;
1387
+ items(children: FiboChildren): this;
1388
+ build(): React$1.ReactElement;
1389
+ }
1390
+ export declare const Form: () => StyleBuilder<FormBuilder>;
1391
+ type FieldRule = {
1392
+ check: (value: string, values: FormValues) => boolean | Promise<boolean>;
1393
+ message: string;
1394
+ };
1395
+ export declare function required(message?: string): FieldRule;
1396
+ export declare function minLength(min: number, message?: string): FieldRule;
1397
+ export declare function maxLength(max: number, message?: string): FieldRule;
1398
+ export declare function email(message?: string): FieldRule;
1399
+ export declare function pattern(re: RegExp, message?: string): FieldRule;
1400
+ export declare function min(n: number, message?: string): FieldRule;
1401
+ export declare function max(n: number, message?: string): FieldRule;
1402
+ /** Escape hatch — return true when the value is valid. Promise false/reject fails. */
1403
+ export declare function rule(check: (value: string, values: FormValues) => boolean | Promise<boolean>, message: string): FieldRule;
1404
+ export declare function url(message?: string): FieldRule;
1405
+ export declare function integer(message?: string): FieldRule;
1406
+ export declare function equalTo(otherFieldName: string, message?: string): FieldRule;
1407
+ type FieldSchema = Record<string, FieldRule | FieldRule[]>;
1408
+ type FieldErrors = Record<string, string>;
1409
+ declare class TextFieldBuilder extends FiboBuilder {
1410
+ private _value;
1411
+ private _label;
1412
+ private _placeholder;
1413
+ private _type;
1414
+ private _name?;
1415
+ private _disabled;
1416
+ private _error?;
1417
+ private _helper?;
1418
+ private _rules?;
1419
+ private _mask?;
1420
+ private _controlled;
1421
+ private _clearable;
1422
+ private _onChange?;
1423
+ /** Fires on blur — prefer this over onChange to avoid work per keystroke. */
1424
+ private _onCommit?;
1425
+ private _leadingIcon?;
1426
+ private _trailingIcon?;
1427
+ constructor(value?: string);
1428
+ value(val: string | Signal<string>): this;
1429
+ /**
1430
+ * Force controlled React `value` (re-renders every key). Default is uncontrolled.
1431
+ * Prefer `.value(signal)` + read signal when needed, or `.onCommit`.
1432
+ */
1433
+ controlled(enabled?: boolean): this;
1434
+ private bindMarked;
1435
+ label(val: string): this;
1436
+ placeholder(val: string): this;
1437
+ /** HTML `name` — required for `Form().onSubmit` FormData collection. */
1438
+ name(val: string): this;
1439
+ type(val: "text" | "password" | "email" | "number" | "tel"): this;
1440
+ /** Native `inputMode` — virtual keyboard hint. */
1441
+ inputMode(val: React$1.HTMLAttributes<HTMLInputElement>["inputMode"]): this;
1442
+ /** Native `enterKeyHint` — mobile action-key label. */
1443
+ enterKeyHint(val: React$1.HTMLAttributes<HTMLInputElement>["enterKeyHint"]): this;
1444
+ mask(format: string): this;
1445
+ disabled(val?: boolean): this;
1446
+ error(val: string): this;
1447
+ /** Muted hint under the field. Hidden while `.error()` (or a painted Form error) is showing. */
1448
+ helper(text: string): this;
1449
+ /** Trailing clear button while the input has a value. Hidden when empty or disabled. */
1450
+ clearable(enabled?: boolean): this;
1451
+ /** Alias of `.clearable()`. */
1452
+ clear(enabled?: boolean): this;
1453
+ /** Rules collected by `Form` on submit (this field's own checks). */
1454
+ rules(...items: FieldRule[]): this;
1455
+ /** Per-keystroke callback — does not re-render the field by itself. */
1456
+ onChange(handler: (value: string) => void): this;
1457
+ /** Fires when the field loses focus — use for validation / form sync. */
1458
+ onCommit(handler: (value: string) => void): this;
1459
+ leadingIcon(icon: React$1.ReactNode): this;
1460
+ trailingIcon(icon: React$1.ReactNode): this;
1461
+ private _variant;
1462
+ variant(val: "filled" | "outlined"): this;
1463
+ build(): React$1.ReactElement;
1464
+ }
1465
+ export declare const TextField: (value?: string | undefined) => StyleBuilder<TextFieldBuilder>;
1466
+ declare class SwitchBuilder extends FiboBuilder {
1467
+ private _checked;
1468
+ private _checkedSignal?;
1469
+ private _controlled;
1470
+ private _onChange?;
1471
+ private _label?;
1472
+ private _disabled;
1473
+ private _name?;
1474
+ private _value;
1475
+ private _rules?;
1476
+ private _error?;
1477
+ private _checkedStyle?;
1478
+ private _uncheckedStyle?;
1479
+ /**
1480
+ * Static boolean, or a signal — then this switch owns that signal and
1481
+ * stays controlled.
1482
+ */
1483
+ checked(value: boolean | BindableSignal<boolean>): this;
1484
+ /**
1485
+ * Force controlled React `checked` (parent must setState). Default is uncontrolled.
1486
+ */
1487
+ controlled(enabled?: boolean): this;
1488
+ /** HTML `name` — required for `Form` FormData collection. */
1489
+ name(val: string): this;
1490
+ /** Submit value when checked (HTML checkbox `value`, default `'on'`). */
1491
+ value(val: string): this;
1492
+ onChange(handler: (checked: boolean) => void): this;
1493
+ /**
1494
+ * Paint for a `When` state. `on` / `off` replace the track fill.
1495
+ * `hover` / `focus` / `active` are CSS pseudos on this node.
1496
+ *
1497
+ * ```ts
1498
+ * Switch()
1499
+ * .when(When.on, (s) => s.bg('#c8ff00'))
1500
+ * .when(When.off, (s) => s.bg('rgba(255,255,255,0.16)'))
1501
+ * ```
1502
+ */
1503
+ when(state: When, style: WhenStyle): this;
1504
+ label(text: string): this;
1505
+ disabled(value?: boolean): this;
1506
+ error(val: string): this;
1507
+ /** Rules collected by `Form` on submit (this field's own checks). */
1508
+ rules(...items: FieldRule[]): this;
1509
+ build(): React$1.ReactElement;
1510
+ }
1511
+ export declare const Switch: () => StyleBuilder<SwitchBuilder>;
1512
+ declare class CheckboxBuilder extends FiboBuilder {
1513
+ private _checked;
1514
+ private _controlled;
1515
+ private _onChange?;
1516
+ private _label?;
1517
+ private _disabled;
1518
+ private _indeterminate;
1519
+ private _name?;
1520
+ private _value;
1521
+ private _rules?;
1522
+ private _error?;
1523
+ private _checkedStyle?;
1524
+ private _uncheckedStyle?;
1525
+ private _indeterminateStyle?;
1526
+ checked(value: boolean): this;
1527
+ /**
1528
+ * Force controlled React `checked` (parent must setState). Default is uncontrolled.
1529
+ */
1530
+ controlled(enabled?: boolean): this;
1531
+ /** HTML `name` — required for `Form` FormData collection. */
1532
+ name(val: string): this;
1533
+ /** Submit value when checked (HTML checkbox `value`, default `'on'`). */
1534
+ value(val: string): this;
1535
+ indeterminate(value: boolean): this;
1536
+ onChange(handler: (checked: boolean) => void): this;
1537
+ /**
1538
+ * Paint for a `When` state. `on` / `off` / `mixed` replace the box fill.
1539
+ * `hover` / `focus` / `active` are CSS pseudos on this node.
1540
+ *
1541
+ * ```ts
1542
+ * Checkbox()
1543
+ * .when(When.on, (s) => s.bg('#c8ff00').borderColor('transparent'))
1544
+ * .when(When.off, (s) => s.bg('transparent').borderColor('rgba(255,255,255,0.16)'))
1545
+ * ```
1546
+ */
1547
+ when(state: When, style: WhenStyle): this;
1548
+ label(text: string): this;
1549
+ disabled(value?: boolean): this;
1550
+ error(val: string): this;
1551
+ /** Rules collected by `Form` on submit (this field's own checks). */
1552
+ rules(...items: FieldRule[]): this;
1553
+ build(): React$1.ReactElement;
1554
+ }
1555
+ export declare const Checkbox: () => StyleBuilder<CheckboxBuilder>;
1556
+ interface RadioOption {
1557
+ label: string;
1558
+ value: string;
1559
+ disabled?: boolean;
1560
+ }
1561
+ declare class RadioGroupBuilder extends FiboBuilder {
1562
+ private _value;
1563
+ private _controlled;
1564
+ private _options;
1565
+ private _onChange?;
1566
+ private _name?;
1567
+ private _direction;
1568
+ private _rules?;
1569
+ private _error?;
1570
+ value(val: string): this;
1571
+ /**
1572
+ * Force controlled React selection (parent must setState). Default is uncontrolled.
1573
+ */
1574
+ controlled(enabled?: boolean): this;
1575
+ options(opts: RadioOption[]): this;
1576
+ onChange(handler: (val: string) => void): this;
1577
+ direction(dir: "vertical" | "horizontal"): this;
1578
+ name(val: string): this;
1579
+ error(val: string): this;
1580
+ /** Rules collected by `Form` on submit (this field's own checks). */
1581
+ rules(...items: FieldRule[]): this;
1582
+ build(): React$1.ReactElement;
1583
+ }
1584
+ export declare const RadioGroup: () => StyleBuilder<RadioGroupBuilder>;
1585
+ declare class TextareaBuilder extends FiboBuilder {
1586
+ private _value;
1587
+ private _label;
1588
+ private _placeholder;
1589
+ private _name?;
1590
+ private _disabled;
1591
+ private _rows;
1592
+ private _error?;
1593
+ private _helper?;
1594
+ private _rules?;
1595
+ private _controlled;
1596
+ private _resize;
1597
+ private _onChange?;
1598
+ /** Fires on blur — prefer this over onChange to avoid work per keystroke. */
1599
+ private _onCommit?;
1600
+ constructor(value?: string);
1601
+ value(val: string | Signal<string>): this;
1602
+ /**
1603
+ * Force controlled React `value` (re-renders every key). Default is uncontrolled.
1604
+ * Prefer `.value(signal)` + read signal when needed, or `.onCommit`.
1605
+ */
1606
+ controlled(enabled?: boolean): this;
1607
+ label(val: string): this;
1608
+ placeholder(val: string): this;
1609
+ /** HTML `name` — required for `Form().onSubmit` FormData collection. */
1610
+ name(val: string): this;
1611
+ disabled(val?: boolean): this;
1612
+ rows(val: number): this;
1613
+ resize(val: "none" | "vertical" | "horizontal" | "both"): this;
1614
+ error(val: string): this;
1615
+ /** Muted hint under the field. Hidden while `.error()` (or a painted Form error) is showing. */
1616
+ helper(text: string): this;
1617
+ /** Rules collected by `Form` on submit (this field's own checks). */
1618
+ rules(...items: FieldRule[]): this;
1619
+ /** Per-keystroke callback — does not re-render the field by itself. */
1620
+ onChange(handler: (value: string) => void): this;
1621
+ /** Fires when the field loses focus — use for validation / form sync. */
1622
+ onCommit(handler: (value: string) => void): this;
1623
+ build(): React$1.ReactElement;
1624
+ }
1625
+ export declare const Textarea: (value?: string | undefined) => StyleBuilder<TextareaBuilder>;
1626
+ interface Option$1 {
1627
+ label: string;
1628
+ value: string;
1629
+ disabled?: boolean;
1630
+ }
1631
+ declare class SelectBuilder extends FiboBuilder {
1632
+ private _value;
1633
+ private _label;
1634
+ private _placeholder;
1635
+ private _disabled;
1636
+ private _error?;
1637
+ private _multiple;
1638
+ private _options;
1639
+ private _onChange?;
1640
+ private _name?;
1641
+ private _controlled;
1642
+ private _rules?;
1643
+ value(val: string | string[]): this;
1644
+ /**
1645
+ * Force controlled selection from `.value()` / parent. Default keeps local
1646
+ * selection state so FormData / display update without a parent re-render.
1647
+ */
1648
+ controlled(enabled?: boolean): this;
1649
+ label(val: string): this;
1650
+ placeholder(val: string): this;
1651
+ /** HTML `name` — renders a hidden input so `Form` FormData includes the selection. */
1652
+ name(val: string): this;
1653
+ options(opts: Option$1[]): this;
1654
+ multiple(val?: boolean): this;
1655
+ disabled(val?: boolean): this;
1656
+ error(val: string): this;
1657
+ /** Rules collected by `Form` on submit (attached to the hidden named input). */
1658
+ rules(...items: FieldRule[]): this;
1659
+ onChange(handler: (value: string | string[]) => void): this;
1660
+ build(): React$1.ReactElement;
1661
+ }
1662
+ export declare const Select: () => StyleBuilder<SelectBuilder>;
1663
+ interface Option$1 {
1664
+ label: string;
1665
+ value: string;
1666
+ }
1667
+ declare class ComboboxBuilder extends FiboBuilder {
1668
+ private _value;
1669
+ private _label;
1670
+ private _placeholder;
1671
+ private _disabled;
1672
+ private _error?;
1673
+ private _multiple;
1674
+ private _options;
1675
+ private _onChange?;
1676
+ private _onAdd?;
1677
+ private _name?;
1678
+ private _controlled;
1679
+ private _rules?;
1680
+ value(val: string | string[]): this;
1681
+ /**
1682
+ * Force controlled committed value from `.value()` / parent. Default keeps
1683
+ * local selection so FormData / tags update without a parent re-render.
1684
+ */
1685
+ controlled(enabled?: boolean): this;
1686
+ label(val: string): this;
1687
+ placeholder(val: string): this;
1688
+ /** HTML `name` — renders a hidden input so `Form` FormData includes the committed value. */
1689
+ name(val: string): this;
1690
+ options(opts: Option$1[]): this;
1691
+ multiple(val?: boolean): this;
1692
+ disabled(val?: boolean): this;
1693
+ error(val: string): this;
1694
+ /** Rules collected by `Form` on submit (attached to the hidden named input). */
1695
+ rules(...items: FieldRule[]): this;
1696
+ onChange(handler: (value: string | string[]) => void): this;
1697
+ onAdd(handler: (newLabel: string) => void): this;
1698
+ build(): React$1.ReactElement;
1699
+ }
1700
+ export declare const Combobox: () => StyleBuilder<ComboboxBuilder>;
1701
+
1702
+ export {};