@molecule/app-ui 1.3.4 → 1.3.6

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/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-09-28T12:35:38.435Z
6
+ Generated: 2026-10-16T00:52:21.894Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-ui
@@ -44,421 +44,600 @@ npm install @molecule/app-ui @molecule/app-bond @molecule/app-i18n
44
44
 
45
45
  ### Interfaces
46
46
 
47
- #### `AccordionClassOptions`
47
+ #### `UIProvider`
48
48
 
49
- Options for resolving accordion CSS classes via UIClassMap.
49
+ Identifies the bonded UI styling library. Providers set `name`
50
+ to indicate which library is active (e.g. `"tailwind"`, `"bootstrap"`).
50
51
 
51
52
  ```typescript
52
- interface AccordionClassOptions {
53
- variant?: string
53
+ interface UIProvider {
54
+ /**
55
+ * Identifier for the styling library (e.g. `"tailwind"`, `"ionic"`).
56
+ */
57
+ name: string
54
58
  }
55
59
  ```
56
60
 
57
- #### `AccordionItem`
61
+ #### `MoleculeSpinnerTimings`
58
62
 
59
- A single item in an Accordion component.
63
+ The mark's timings, in CSS duration strings. Swap cycle → glint cycle.
60
64
 
61
65
  ```typescript
62
- interface AccordionItem<T = string> {
63
- /**
64
- * Item value/id.
65
- */
66
- value: T
66
+ interface MoleculeSpinnerTimings {
67
+ /** One full 3-phase atom-swap cycle (also drives bond fades + glints). */
68
+ dur: string
69
+ /** Whole-figure rotation. Keep at two swap cycles for the intended feel. */
70
+ spin: string
71
+ /** Bond gradient flow period (one full translate across the figure). */
72
+ flow: string
73
+ }
74
+ ```
67
75
 
68
- /**
69
- * Item header/trigger.
70
- */
71
- header: Children
76
+ #### `MoleculeSpinnerColors`
72
77
 
73
- /**
74
- * Item content.
75
- */
76
- content: Children
78
+ Gradient-mode colors. Any CSS color string, including `var()` forms.
77
79
 
80
+ ```typescript
81
+ interface MoleculeSpinnerColors {
82
+ /** Bond base / glint tail color. */
83
+ blue?: string
84
+ /** Flow highlight / glint head color at rest. */
85
+ light?: string
86
+ /** Glint ignition color while an atom is in flight. */
87
+ peach?: string
88
+ }
89
+ ```
90
+
91
+ #### `MoleculeSpinnerMarkOptions`
92
+
93
+ Options for {@link moleculeSpinnerMarkSvg}.
94
+
95
+ ```typescript
96
+ interface MoleculeSpinnerMarkOptions {
97
+ /** Motion timings; defaults to the shipped design (2.5s / 5s / 3s). */
98
+ timings?: Partial<MoleculeSpinnerTimings>
99
+ /** `gradient` (default) or `mono` — plain `currentColor` outline, no defs. */
100
+ paint?: 'gradient' | 'mono'
101
+ /** Gradient-mode colors; default the `var(--mol-spin-*, fallback)` set. */
102
+ colors?: MoleculeSpinnerColors
78
103
  /**
79
- * Whether the item is disabled.
104
+ * Gradient id for url() references. Must be unique per rendered instance
105
+ * on a page. Defaults to `mol-spinner-gradient`.
80
106
  */
81
- disabled?: boolean
107
+ gradientId?: string
108
+ /** Pixel size baked into width/height; omit when CSS sizes the svg. */
109
+ size?: number
110
+ /** Class attribute for the svg element. */
111
+ className?: string
112
+ /** Inline style attribute (already serialized, e.g. `color:re$d`). */
113
+ style?: string
114
+ /** Announce as `role="status"` with this label; omit for `aria-hidden`. */
115
+ ariaLabel?: string
82
116
  }
83
117
  ```
84
118
 
85
- #### `AccordionProps`
119
+ #### `CSSProperties`
86
120
 
87
- Props for the Accordion component.
121
+ Framework-agnostic CSS properties.
122
+ Mirrors React.CSSProperties but without React dependency.
88
123
 
89
124
  ```typescript
90
- interface AccordionProps<T = string> extends BaseProps {
125
+ interface CSSProperties {
126
+ [key: string]: string | number | undefined
127
+ }
128
+ ```
129
+
130
+ #### `BaseProps`
131
+
132
+ Base props shared by all components.
133
+
134
+ ```typescript
135
+ interface BaseProps {
91
136
  /**
92
- * Accordion items.
137
+ * Additional CSS class name(s).
93
138
  */
94
- items: AccordionItem<T>[]
139
+ className?: string
95
140
 
96
141
  /**
97
- * Expanded item(s).
142
+ * Inline styles.
98
143
  */
99
- value?: T | T[]
144
+ style?: CSSProperties
100
145
 
101
146
  /**
102
- * Default expanded item(s).
147
+ * Test ID for automated testing.
103
148
  */
104
- defaultValue?: T | T[]
149
+ testId?: string
105
150
 
106
151
  /**
107
- * Change handler.
152
+ * Automation ID for AI agents and E2E tests. Maps to the `data-mol-id`
153
+ * HTML attribute. Use `molId()` from `./automation.js` to generate
154
+ * semantic IDs. (Tooling only — screen readers do not expose `data-*`
155
+ * attributes; accessible names come from labels/`aria-*`.)
108
156
  */
109
- onChange?: (value: T | T[]) => void
157
+ automationId?: string
110
158
 
111
159
  /**
112
- * Whether multiple items can be expanded.
160
+ * Whether the component is disabled.
113
161
  */
114
- multiple?: boolean
162
+ disabled?: boolean
163
+ }
164
+ ```
165
+
166
+ #### `HTMLElementProps`
167
+
168
+ Base props for HTML elements.
169
+ Framework bindings should extend this with framework-specific attributes.
115
170
 
171
+ ```typescript
172
+ interface HTMLElementProps extends BaseProps {
173
+ id?: string
174
+ title?: string
175
+ tabIndex?: number
176
+ role?: string
177
+ 'aria-label'?: string
178
+ 'aria-labelledby'?: string
179
+ 'aria-describedby'?: string
180
+ 'aria-hidden'?: boolean
181
+ 'aria-disabled'?: boolean
182
+ 'aria-expanded'?: boolean
183
+ 'aria-selected'?: boolean
184
+ 'aria-checked'?: boolean | 'mixed'
185
+ 'aria-pressed'?: boolean | 'mixed'
186
+ 'aria-invalid'?: boolean
187
+ 'aria-required'?: boolean
188
+ 'aria-readonly'?: boolean
189
+ 'aria-busy'?: boolean
190
+ 'aria-live'?: 'off' | 'polite' | 'assertive'
191
+ onClick?: MouseEventHandler
192
+ onDoubleClick?: MouseEventHandler
193
+ onMouseEnter?: MouseEventHandler
194
+ onMouseLeave?: MouseEventHandler
195
+ onFocus?: FocusEventHandler
196
+ onBlur?: FocusEventHandler
197
+ onKeyDown?: KeyboardEventHandler
198
+ onKeyUp?: KeyboardEventHandler
199
+ onKeyPress?: KeyboardEventHandler
200
+ }
201
+ ```
202
+
203
+ #### `InputElementProps`
204
+
205
+ Base props for input elements.
206
+
207
+ ```typescript
208
+ interface InputElementProps extends HTMLElementProps {
209
+ name?: string
210
+ value?: string | number | readonly string[]
211
+ defaultValue?: string | number | readonly string[]
212
+ placeholder?: string
213
+ required?: boolean
214
+ readOnly?: boolean
215
+ autoFocus?: boolean
216
+ autoComplete?: string
217
+ maxLength?: number
218
+ minLength?: number
219
+ pattern?: string
220
+ onChange?: ChangeEventHandler
221
+ onInput?: FormEventHandler
222
+ }
223
+ ```
224
+
225
+ #### `ButtonElementProps`
226
+
227
+ Base props for button elements.
228
+
229
+ ```typescript
230
+ interface ButtonElementProps extends HTMLElementProps {
116
231
  /**
117
- * Whether items can be collapsed.
232
+ * Defaults to `'button'` in every framework binding, so a button never submits a
233
+ * form by accident. A form's primary action must set `type="submit"`: Enter then
234
+ * submits the form, and tests that select `button[type="submit"]` find it.
118
235
  */
119
- collapsible?: boolean
236
+ type?: 'button' | 'submit' | 'reset'
237
+ name?: string
238
+ value?: string
239
+ form?: string
120
240
  }
121
241
  ```
122
242
 
123
- #### `AlertClassOptions`
243
+ #### `TextareaElementProps`
124
244
 
125
- Options for resolving alert CSS classes via UIClassMap.
245
+ Base props for textarea elements.
126
246
 
127
247
  ```typescript
128
- interface AlertClassOptions {
129
- variant?: 'default' | 'info' | 'success' | 'warning' | 'error'
248
+ interface TextareaElementProps extends HTMLElementProps {
249
+ name?: string
250
+ value?: string
251
+ defaultValue?: string
252
+ placeholder?: string
253
+ required?: boolean
254
+ readOnly?: boolean
255
+ autoFocus?: boolean
256
+ rows?: number
257
+ cols?: number
258
+ maxLength?: number
259
+ minLength?: number
260
+ wrap?: 'hard' | 'soft' | 'off'
261
+ onChange?: ChangeEventHandler
262
+ onInput?: FormEventHandler
130
263
  }
131
264
  ```
132
265
 
133
- #### `AlertProps`
266
+ #### `SelectElementProps`
134
267
 
135
- Props for the Alert component.
268
+ Base props for select elements.
136
269
 
137
270
  ```typescript
138
- interface AlertProps extends HTMLElementProps {
271
+ interface SelectElementProps extends HTMLElementProps {
272
+ name?: string
273
+ required?: boolean
274
+ autoFocus?: boolean
275
+ multiple?: boolean
276
+ onChange?: ChangeEventHandler
277
+ }
278
+ ```
279
+
280
+ #### `FormElementProps`
281
+
282
+ Base props for form elements.
283
+
284
+ ```typescript
285
+ interface FormElementProps extends HTMLElementProps {
286
+ action?: string
287
+ method?: 'get' | 'post'
288
+ encType?: string
289
+ target?: string
290
+ noValidate?: boolean
291
+ autoComplete?: 'on' | 'off'
292
+ onSubmit?: FormEventHandler
293
+ onReset?: FormEventHandler
294
+ }
295
+ ```
296
+
297
+ #### `ButtonProps`
298
+
299
+ Props for the Button component.
300
+
301
+ ```typescript
302
+ interface ButtonProps extends ButtonElementProps {
139
303
  /**
140
- * Alert content.
304
+ * Button content.
141
305
  */
142
306
  children?: Children
143
307
 
144
308
  /**
145
- * Alert title.
309
+ * Visual variant.
146
310
  */
147
- title?: string
311
+ variant?: ButtonVariant
148
312
 
149
313
  /**
150
- * Alert status/type.
314
+ * Color scheme.
151
315
  */
152
- status?: ColorVariant
316
+ color?: ColorVariant
153
317
 
154
318
  /**
155
- * Alert variant.
319
+ * Button size.
156
320
  */
157
- variant?: 'solid' | 'subtle' | 'outline' | 'left-accent'
321
+ size?: ButtonSize
158
322
 
159
323
  /**
160
- * Whether the alert is dismissible.
324
+ * Whether the button is in a loading state.
161
325
  */
162
- dismissible?: boolean
326
+ loading?: boolean
163
327
 
164
328
  /**
165
- * Called when dismissed.
329
+ * Loading text to display.
166
330
  */
167
- onDismiss?: () => void
331
+ loadingText?: string
168
332
 
169
333
  /**
170
- * Icon to display.
334
+ * Whether the button takes full width.
171
335
  */
172
- icon?: Children
336
+ fullWidth?: boolean
173
337
 
174
338
  /**
175
- * Accessible label for the dismiss button.
176
- * @default 'Dismiss'
339
+ * Icon to display before the label.
177
340
  */
178
- dismissLabel?: string
341
+ leftIcon?: Children
342
+
343
+ /**
344
+ * Icon to display after the label.
345
+ */
346
+ rightIcon?: Children
179
347
  }
180
348
  ```
181
349
 
182
- #### `AvatarClassOptions`
350
+ #### `InputProps`
183
351
 
184
- Options for resolving avatar CSS classes via UIClassMap.
352
+ Props for the Input component (text field, email, password, etc.).
185
353
 
186
354
  ```typescript
187
- interface AvatarClassOptions {
355
+ interface InputProps extends InputElementProps {
356
+ /**
357
+ * Input type.
358
+ */
359
+ type?: InputType
360
+
361
+ /**
362
+ * Input size.
363
+ */
188
364
  size?: Size
189
- }
190
- ```
191
365
 
192
- #### `AvatarProps`
366
+ /**
367
+ * Horizontal text alignment inside the input (see
368
+ * {@link InputClassOptions.align}). Defaults to the bond's own style.
369
+ */
370
+ align?: 'left' | 'center'
371
+
372
+ /**
373
+ * Label text.
374
+ */
375
+ label?: string
193
376
 
194
- Props for the Avatar component.
377
+ /**
378
+ * Error message.
379
+ */
380
+ error?: string
195
381
 
196
- ```typescript
197
- interface AvatarProps extends HTMLElementProps {
198
382
  /**
199
- * Image source URL.
383
+ * Hint/help text.
200
384
  */
201
- src?: string
385
+ hint?: string
202
386
 
203
387
  /**
204
- * Alt text for the image.
388
+ * Element to display on the left.
205
389
  */
206
- alt?: string
390
+ leftElement?: Children
207
391
 
208
392
  /**
209
- * Name for fallback initials.
393
+ * Element to display on the right.
210
394
  */
211
- name?: string
395
+ rightElement?: Children
212
396
 
213
397
  /**
214
- * Avatar size.
398
+ * Whether to show a clear button.
215
399
  */
216
- size?: Size | number
400
+ clearable?: boolean
217
401
 
218
402
  /**
219
- * Whether the avatar is rounded.
403
+ * Called when the clear button is clicked.
220
404
  */
221
- rounded?: boolean
405
+ onClear?: () => void
222
406
 
223
407
  /**
224
- * Fallback element when no image.
408
+ * Accessible label for the clear button.
409
+ * @default 'Clear'
225
410
  */
226
- fallback?: Children
411
+ clearLabel?: string
227
412
  }
228
413
  ```
229
414
 
230
- #### `BadgeClassOptions`
415
+ #### `TextareaProps`
231
416
 
232
- Options for resolving badge CSS classes via UIClassMap.
417
+ Props for the Textarea component.
233
418
 
234
419
  ```typescript
235
- interface BadgeClassOptions {
236
- variant?: ColorVariant
420
+ interface TextareaProps extends TextareaElementProps {
421
+ /**
422
+ * Text size tier (see {@link TextareaClassOptions.size}) — pass the same
423
+ * `size` as a neighboring Input for identical font sizes.
424
+ */
237
425
  size?: Size
238
- }
239
- ```
240
426
 
241
- #### `BadgeProps`
242
-
243
- Props for the Badge component (status labels, counts, tags).
427
+ /**
428
+ * Label text.
429
+ */
430
+ label?: string
244
431
 
245
- ```typescript
246
- interface BadgeProps extends HTMLElementProps {
247
432
  /**
248
- * Badge content.
433
+ * Error message.
249
434
  */
250
- children?: Children
435
+ error?: string
251
436
 
252
437
  /**
253
- * Badge color.
438
+ * Hint/help text.
254
439
  */
255
- color?: ColorVariant
440
+ hint?: string
256
441
 
257
442
  /**
258
- * Badge variant.
443
+ * Whether the textarea auto-resizes.
259
444
  */
260
- variant?: 'solid' | 'outline' | 'subtle'
445
+ autoResize?: boolean
261
446
 
262
447
  /**
263
- * Badge size.
448
+ * Minimum number of rows.
264
449
  */
265
- size?: Size
450
+ minRows?: number
266
451
 
267
452
  /**
268
- * Whether the badge is rounded.
453
+ * Maximum number of rows.
269
454
  */
270
- rounded?: boolean
455
+ maxRows?: number
271
456
  }
272
457
  ```
273
458
 
274
- #### `BaseProps`
459
+ #### `SelectOption`
275
460
 
276
- Base props shared by all components.
461
+ A single option in a Select dropdown.
277
462
 
278
463
  ```typescript
279
- interface BaseProps {
280
- /**
281
- * Additional CSS class name(s).
282
- */
283
- className?: string
284
-
464
+ interface SelectOption<T = string> {
285
465
  /**
286
- * Inline styles.
466
+ * Option value.
287
467
  */
288
- style?: CSSProperties
468
+ value: T
289
469
 
290
470
  /**
291
- * Test ID for automated testing.
471
+ * Display label.
292
472
  */
293
- testId?: string
473
+ label: string
294
474
 
295
475
  /**
296
- * Automation ID for AI agents and E2E tests. Maps to the `data-mol-id`
297
- * HTML attribute. Use `molId()` from `./automation.js` to generate
298
- * semantic IDs. (Tooling only — screen readers do not expose `data-*`
299
- * attributes; accessible names come from labels/`aria-*`.)
476
+ * Whether the option is disabled.
300
477
  */
301
- automationId?: string
478
+ disabled?: boolean
302
479
 
303
480
  /**
304
- * Whether the component is disabled.
481
+ * Option group (for grouped selects).
305
482
  */
306
- disabled?: boolean
307
- }
308
- ```
309
-
310
- #### `ButtonClassOptions`
311
-
312
- Options for resolving button CSS classes via UIClassMap.
313
-
314
- ```typescript
315
- interface ButtonClassOptions {
316
- variant?: ButtonVariant
317
- color?: ColorVariant
318
- size?: ButtonSize
319
- fullWidth?: boolean
320
- }
321
- ```
322
-
323
- #### `ButtonElementProps`
324
-
325
- Base props for button elements.
326
-
327
- ```typescript
328
- interface ButtonElementProps extends HTMLElementProps {
329
- type?: 'button' | 'submit' | 'reset'
330
- name?: string
331
- value?: string
332
- form?: string
483
+ group?: string
333
484
  }
334
485
  ```
335
486
 
336
- #### `ButtonProps`
487
+ #### `SelectProps`
337
488
 
338
- Props for the Button component.
489
+ Props for the Select dropdown component (single or multi-select).
339
490
 
340
491
  ```typescript
341
- interface ButtonProps extends ButtonElementProps {
492
+ interface SelectProps<T = string> extends SelectElementProps {
342
493
  /**
343
- * Button content.
494
+ * Select options.
344
495
  */
345
- children?: Children
496
+ options: SelectOption<T>[]
346
497
 
347
498
  /**
348
- * Visual variant.
499
+ * Current value.
349
500
  */
350
- variant?: ButtonVariant
501
+ value?: T
351
502
 
352
503
  /**
353
- * Color scheme.
504
+ * Change handler (with typed value).
354
505
  */
355
- color?: ColorVariant
506
+ onValueChange?: (value: T) => void
356
507
 
357
508
  /**
358
- * Button size.
509
+ * Select size.
359
510
  */
360
- size?: ButtonSize
511
+ size?: Size
361
512
 
362
513
  /**
363
- * Whether the button is in a loading state.
514
+ * Label text.
364
515
  */
365
- loading?: boolean
516
+ label?: string
366
517
 
367
518
  /**
368
- * Loading text to display.
519
+ * Placeholder text.
369
520
  */
370
- loadingText?: string
521
+ placeholder?: string
371
522
 
372
523
  /**
373
- * Whether the button takes full width.
524
+ * Error message.
374
525
  */
375
- fullWidth?: boolean
526
+ error?: string
376
527
 
377
528
  /**
378
- * Icon to display before the label.
529
+ * Hint/help text.
379
530
  */
380
- leftIcon?: Children
531
+ hint?: string
381
532
 
382
533
  /**
383
- * Icon to display after the label.
534
+ * Whether to allow clearing the selection.
384
535
  */
385
- rightIcon?: Children
536
+ clearable?: boolean
386
537
  }
387
538
  ```
388
539
 
389
- #### `CardClassOptions`
540
+ #### `CheckboxProps`
390
541
 
391
- Options for resolving card CSS classes via UIClassMap.
542
+ Props for the Checkbox component.
392
543
 
393
544
  ```typescript
394
- interface CardClassOptions {
395
- variant?: 'default' | 'elevated' | 'outline' | 'ghost'
396
- }
397
- ```
398
-
399
- #### `CardProps`
400
-
401
- Props for the Card container component (elevated, outlined, or filled surface).
545
+ interface CheckboxProps extends InputElementProps {
546
+ /**
547
+ * Checkbox label.
548
+ */
549
+ label?: Children
402
550
 
403
- ```typescript
404
- interface CardProps extends HTMLElementProps {
405
551
  /**
406
- * Card content.
552
+ * Whether the checkbox is checked.
407
553
  */
408
- children?: Children
554
+ checked?: boolean
409
555
 
410
556
  /**
411
- * Card variant.
557
+ * Whether the checkbox is in an indeterminate state.
412
558
  */
413
- variant?: 'elevated' | 'outlined' | 'filled'
559
+ indeterminate?: boolean
414
560
 
415
561
  /**
416
- * Whether the card is interactive (clickable).
562
+ * Checkbox size.
417
563
  */
418
- interactive?: boolean
564
+ size?: Size
419
565
 
420
566
  /**
421
- * Padding size.
567
+ * Error message.
422
568
  */
423
- padding?: Size | 'none'
569
+ error?: string
424
570
  }
425
571
  ```
426
572
 
427
- #### `CheckboxClassOptions`
573
+ #### `RadioOption`
428
574
 
429
- Options for resolving checkbox CSS classes via UIClassMap.
575
+ A single option in a RadioGroup.
430
576
 
431
577
  ```typescript
432
- interface CheckboxClassOptions {
433
- error?: boolean
578
+ interface RadioOption<T = string> {
579
+ /**
580
+ * Option value.
581
+ */
582
+ value: T
583
+
584
+ /**
585
+ * Display label.
586
+ */
587
+ label: Children
588
+
589
+ /**
590
+ * Whether the option is disabled.
591
+ */
592
+ disabled?: boolean
434
593
  }
435
594
  ```
436
595
 
437
- #### `CheckboxProps`
596
+ #### `RadioGroupProps`
438
597
 
439
- Props for the Checkbox component.
598
+ Props for the RadioGroup component.
440
599
 
441
600
  ```typescript
442
- interface CheckboxProps extends InputElementProps {
601
+ interface RadioGroupProps<T = string> extends BaseProps {
443
602
  /**
444
- * Checkbox label.
603
+ * Radio options.
445
604
  */
446
- label?: Children
605
+ options: RadioOption<T>[]
606
+
607
+ /**
608
+ * Current value.
609
+ */
610
+ value?: T
611
+
612
+ /**
613
+ * Change handler.
614
+ */
615
+ onChange?: (value: T) => void
616
+
617
+ /**
618
+ * Radio size.
619
+ */
620
+ size?: Size
447
621
 
448
622
  /**
449
- * Whether the checkbox is checked.
623
+ * Group label.
450
624
  */
451
- checked?: boolean
625
+ label?: string
452
626
 
453
627
  /**
454
- * Whether the checkbox is in an indeterminate state.
628
+ * Shared `name` attribute for the group's radio inputs (used for native
629
+ * form submission). When omitted, a unique per-instance name is generated
630
+ * so separate groups never merge — the visible `label` is deliberately
631
+ * NOT used as the name, because two groups with the same label (e.g. two
632
+ * "Size" pickers) would otherwise form ONE native radio group and
633
+ * deselect each other.
455
634
  */
456
- indeterminate?: boolean
635
+ name?: string
457
636
 
458
637
  /**
459
- * Checkbox size.
638
+ * Layout direction.
460
639
  */
461
- size?: Size
640
+ direction?: 'horizontal' | 'vertical'
462
641
 
463
642
  /**
464
643
  * Error message.
@@ -467,967 +646,854 @@ interface CheckboxProps extends InputElementProps {
467
646
  }
468
647
  ```
469
648
 
470
- #### `ContainerClassOptions`
471
-
472
- Options for container class resolution.
473
-
474
- ```typescript
475
- interface ContainerClassOptions {
476
- size?: Size | '2xl' | 'full'
477
- }
478
- ```
479
-
480
- #### `ContainerProps`
649
+ #### `SwitchProps`
481
650
 
482
- Props for the Container layout component.
651
+ Props for the Switch/Toggle component.
483
652
 
484
653
  ```typescript
485
- interface ContainerProps extends HTMLElementProps {
654
+ interface SwitchProps extends InputElementProps {
486
655
  /**
487
- * Container content.
656
+ * Switch label.
488
657
  */
489
- children?: Children
658
+ label?: Children
490
659
 
491
660
  /**
492
- * Maximum width.
661
+ * Whether the switch is on.
493
662
  */
494
- maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | string
663
+ checked?: boolean
495
664
 
496
665
  /**
497
- * Whether to center the container.
666
+ * Switch size.
498
667
  */
499
- centered?: boolean
668
+ size?: Size
500
669
 
501
670
  /**
502
- * Horizontal padding.
671
+ * Color when on.
503
672
  */
504
- paddingX?: Size | string
505
- }
506
- ```
507
-
508
- #### `CSSProperties`
509
-
510
- Framework-agnostic CSS properties.
511
- Mirrors React.CSSProperties but without React dependency.
512
-
513
- ```typescript
514
- interface CSSProperties {
515
- [key: string]: string | number | undefined
673
+ color?: ColorVariant
516
674
  }
517
675
  ```
518
676
 
519
- #### `DropdownItem`
677
+ #### `ModalProps`
520
678
 
521
- Dropdown menu item.
679
+ Props for the Modal/Dialog component.
522
680
 
523
681
  ```typescript
524
- interface DropdownItem<T = string> {
682
+ interface ModalProps extends HTMLElementProps {
525
683
  /**
526
- * Item value/id.
684
+ * Whether the modal is open.
527
685
  */
528
- value: T
686
+ open: boolean
529
687
 
530
688
  /**
531
- * Display label.
689
+ * Called when the modal should close.
532
690
  */
533
- label: Children
691
+ onClose: () => void
534
692
 
535
693
  /**
536
- * Whether the item is disabled.
694
+ * Modal title.
537
695
  */
538
- disabled?: boolean
696
+ title?: string
539
697
 
540
698
  /**
541
- * Icon to display.
699
+ * Modal content.
542
700
  */
543
- icon?: Children
701
+ children?: Children
544
702
 
545
703
  /**
546
- * Keyboard shortcut display.
704
+ * Modal size.
547
705
  */
548
- shortcut?: string
706
+ size?: ModalSize
549
707
 
550
708
  /**
551
- * Whether this is a separator.
709
+ * Whether to show a close button.
552
710
  */
553
- separator?: boolean
711
+ showCloseButton?: boolean
554
712
 
555
713
  /**
556
- * Nested items (for submenus).
714
+ * Whether clicking the overlay closes the modal.
557
715
  */
558
- items?: DropdownItem<T>[]
559
- }
560
- ```
561
-
562
- #### `DropdownProps`
716
+ closeOnOverlayClick?: boolean
563
717
 
564
- Props for the Dropdown menu component.
718
+ /**
719
+ * Whether pressing Escape closes the modal.
720
+ */
721
+ closeOnEscape?: boolean
565
722
 
566
- ```typescript
567
- interface DropdownProps<T = string> extends BaseProps {
568
723
  /**
569
- * Dropdown trigger element.
724
+ * Footer content (typically action buttons).
570
725
  */
571
- trigger: Children
726
+ footer?: Children
572
727
 
573
728
  /**
574
- * Dropdown items.
729
+ * Whether the modal is centered vertically.
575
730
  */
576
- items: DropdownItem<T>[]
731
+ centered?: boolean
577
732
 
578
733
  /**
579
- * Called when an item is selected.
734
+ * Whether to prevent body scroll when open.
580
735
  */
581
- onSelect?: (value: T) => void
736
+ preventScroll?: boolean
582
737
 
583
738
  /**
584
- * Dropdown placement.
739
+ * Accessible label for the close button.
740
+ * @default 'Close'
585
741
  */
586
- placement?:
587
- 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'right'
742
+ closeLabel?: string
743
+ }
744
+ ```
745
+
746
+ #### `SpinnerProps`
747
+
748
+ Props for the Spinner/loading indicator component.
588
749
 
750
+ ```typescript
751
+ interface SpinnerProps extends BaseProps {
589
752
  /**
590
- * Whether the dropdown is open (controlled).
753
+ * Spinner size.
591
754
  */
592
- open?: boolean
755
+ size?: Size
593
756
 
594
757
  /**
595
- * Called when open state changes.
758
+ * Spinner color.
596
759
  */
597
- onOpenChange?: (open: boolean) => void
760
+ color?: ColorVariant | string
598
761
 
599
762
  /**
600
- * Menu alignment.
763
+ * Loading label (for accessibility).
601
764
  */
602
- align?: 'start' | 'center' | 'end'
765
+ label?: string
603
766
 
604
767
  /**
605
- * Menu width.
768
+ * Spinner thickness.
606
769
  */
607
- width?: 'trigger' | 'auto' | number | string
770
+ thickness?: number
608
771
  }
609
772
  ```
610
773
 
611
- #### `EmptyStateProps`
774
+ #### `AvatarProps`
612
775
 
613
- Props for the EmptyState component — shown when a list or section has no data.
776
+ Props for the Avatar component.
614
777
 
615
778
  ```typescript
616
- interface EmptyStateProps extends BaseProps {
617
- /** Icon or illustration to display. */
618
- icon?: Children
619
- /** Main heading text. */
620
- title: string
621
- /** Description text. */
622
- description?: string
623
- /** Primary action button (e.g., "Create first item"). */
624
- action?: Children
625
- }
626
- ```
779
+ interface AvatarProps extends HTMLElementProps {
780
+ /**
781
+ * Image source URL.
782
+ */
783
+ src?: string
627
784
 
628
- #### `FlexClassOptions`
785
+ /**
786
+ * Alt text for the image.
787
+ */
788
+ alt?: string
629
789
 
630
- Options for flex class resolution.
790
+ /**
791
+ * Name for fallback initials.
792
+ */
793
+ name?: string
631
794
 
632
- ```typescript
633
- interface FlexClassOptions {
634
- direction?: 'row' | 'col' | 'row-reverse' | 'col-reverse'
635
- align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline'
636
- justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'
637
- wrap?: 'wrap' | 'nowrap' | 'wrap-reverse'
638
- /** Named tokens or Tailwind spacing scale index (e.g. `3` → `gap-3`). */
639
- gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number
795
+ /**
796
+ * Avatar size.
797
+ */
798
+ size?: Size | number
799
+
800
+ /**
801
+ * Whether the avatar is rounded.
802
+ */
803
+ rounded?: boolean
804
+
805
+ /**
806
+ * Fallback element when no image.
807
+ */
808
+ fallback?: Children
640
809
  }
641
810
  ```
642
811
 
643
- #### `FlexProps`
812
+ #### `BadgeProps`
644
813
 
645
- Flex container props.
814
+ Props for the Badge component (status labels, counts, tags).
646
815
 
647
816
  ```typescript
648
- interface FlexProps extends HTMLElementProps {
817
+ interface BadgeProps extends HTMLElementProps {
649
818
  /**
650
- * Flex content.
819
+ * Badge content.
651
820
  */
652
821
  children?: Children
653
822
 
654
823
  /**
655
- * Flex direction.
656
- */
657
- direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse'
658
-
659
- /**
660
- * Justify content.
824
+ * Badge color.
661
825
  */
662
- justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly'
826
+ color?: ColorVariant
663
827
 
664
828
  /**
665
- * Align items.
829
+ * Badge variant.
666
830
  */
667
- align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch'
831
+ variant?: 'solid' | 'outline' | 'subtle'
668
832
 
669
833
  /**
670
- * Flex wrap.
834
+ * Badge size.
671
835
  */
672
- wrap?: 'wrap' | 'nowrap' | 'wrap-reverse'
836
+ size?: Size
673
837
 
674
838
  /**
675
- * Gap between items.
839
+ * Whether the badge is rounded.
676
840
  */
677
- gap?: Size | string | number
678
- }
679
- ```
680
-
681
- #### `FormElementProps`
682
-
683
- Base props for form elements.
684
-
685
- ```typescript
686
- interface FormElementProps extends HTMLElementProps {
687
- action?: string
688
- method?: 'get' | 'post'
689
- encType?: string
690
- target?: string
691
- noValidate?: boolean
692
- autoComplete?: 'on' | 'off'
693
- onSubmit?: FormEventHandler
694
- onReset?: FormEventHandler
841
+ rounded?: boolean
695
842
  }
696
843
  ```
697
844
 
698
- #### `FormFieldProps`
845
+ #### `TooltipProps`
699
846
 
700
- Form field wrapper props.
847
+ Props for the Tooltip component (hover/focus popover with informational text).
701
848
 
702
849
  ```typescript
703
- interface FormFieldProps extends HTMLElementProps {
704
- /**
705
- * Field content.
706
- */
707
- children?: Children
708
-
850
+ interface TooltipProps extends HTMLElementProps {
709
851
  /**
710
- * Field label.
852
+ * Tooltip content.
711
853
  */
712
- label?: string
854
+ content: Children
713
855
 
714
856
  /**
715
- * Field name.
857
+ * Element that triggers the tooltip.
716
858
  */
717
- name?: string
859
+ children: Children
718
860
 
719
861
  /**
720
- * Error message.
862
+ * Tooltip placement.
721
863
  */
722
- error?: string
864
+ placement?: TooltipPlacement
723
865
 
724
866
  /**
725
- * Hint/help text.
867
+ * Delay before showing (ms).
726
868
  */
727
- hint?: string
869
+ delay?: number
728
870
 
729
871
  /**
730
- * Whether the field is required.
872
+ * Whether the tooltip has an arrow.
731
873
  */
732
- required?: boolean
874
+ hasArrow?: boolean
733
875
  }
734
876
  ```
735
877
 
736
- #### `FormProps`
878
+ #### `CardProps`
737
879
 
738
- Props for the Form component (wraps inputs with submission handling and validation).
880
+ Props for the Card container component (elevated, outlined, or filled surface).
739
881
 
740
882
  ```typescript
741
- interface FormProps extends FormElementProps {
883
+ interface CardProps extends HTMLElementProps {
742
884
  /**
743
- * Form content.
885
+ * Card content.
744
886
  */
745
887
  children?: Children
746
888
 
747
889
  /**
748
- * Submit handler with form data.
890
+ * Card variant.
749
891
  */
750
- onFormSubmit?: (data: Record<string, unknown>) => void | Promise<void>
892
+ variant?: 'elevated' | 'outlined' | 'filled'
751
893
 
752
894
  /**
753
- * Whether the form is submitting.
895
+ * Whether the card is interactive (clickable).
754
896
  */
755
- submitting?: boolean
756
- }
757
- ```
758
-
759
- #### `GridClassOptions`
760
-
761
- Options for grid class resolution.
897
+ interactive?: boolean
762
898
 
763
- ```typescript
764
- interface GridClassOptions {
765
- cols?: number
766
- /** Named tokens or Tailwind spacing scale index (e.g. `10` → `gap-10`). */
767
- gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number
768
899
  /**
769
- * Mobile-first responsive collapse. When omitted (the default), a grid of
770
- * `cols >= 2` starts at a single column on small screens and steps up to
771
- * `cols` at larger breakpoints, so cards don't overflow on mobile. Pass
772
- * `false` for a FIXED `cols`-column grid at every viewport width. Ignored
773
- * for `cols <= 1` (always single-column) and by ClassMap bonds without a
774
- * breakpoint system (e.g. NativeWind).
900
+ * Padding size.
775
901
  */
776
- responsive?: boolean
902
+ padding?: Size | 'none'
777
903
  }
778
904
  ```
779
905
 
780
- #### `GridProps`
906
+ #### `ContainerProps`
781
907
 
782
- Grid container props.
908
+ Props for the Container layout component.
783
909
 
784
910
  ```typescript
785
- interface GridProps extends HTMLElementProps {
911
+ interface ContainerProps extends HTMLElementProps {
786
912
  /**
787
- * Grid content.
913
+ * Container content.
788
914
  */
789
915
  children?: Children
790
916
 
791
917
  /**
792
- * Number of columns.
793
- */
794
- columns?: number | string
795
-
796
- /**
797
- * Number of rows.
798
- */
799
- rows?: number | string
800
-
801
- /**
802
- * Gap between items.
918
+ * Maximum width.
803
919
  */
804
- gap?: Size | string | number
920
+ maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | string
805
921
 
806
922
  /**
807
- * Column gap.
923
+ * Whether to center the container.
808
924
  */
809
- columnGap?: Size | string | number
925
+ centered?: boolean
810
926
 
811
927
  /**
812
- * Row gap.
928
+ * Horizontal padding.
813
929
  */
814
- rowGap?: Size | string | number
815
- }
816
- ```
817
-
818
- #### `HTMLElementProps`
819
-
820
- Base props for HTML elements.
821
- Framework bindings should extend this with framework-specific attributes.
822
-
823
- ```typescript
824
- interface HTMLElementProps extends BaseProps {
825
- id?: string
826
- title?: string
827
- tabIndex?: number
828
- role?: string
829
- 'aria-label'?: string
830
- 'aria-labelledby'?: string
831
- 'aria-describedby'?: string
832
- 'aria-hidden'?: boolean
833
- 'aria-disabled'?: boolean
834
- 'aria-expanded'?: boolean
835
- 'aria-selected'?: boolean
836
- 'aria-checked'?: boolean | 'mixed'
837
- 'aria-pressed'?: boolean | 'mixed'
838
- 'aria-invalid'?: boolean
839
- 'aria-required'?: boolean
840
- 'aria-readonly'?: boolean
841
- 'aria-busy'?: boolean
842
- 'aria-live'?: 'off' | 'polite' | 'assertive'
843
- onClick?: MouseEventHandler
844
- onDoubleClick?: MouseEventHandler
845
- onMouseEnter?: MouseEventHandler
846
- onMouseLeave?: MouseEventHandler
847
- onFocus?: FocusEventHandler
848
- onBlur?: FocusEventHandler
849
- onKeyDown?: KeyboardEventHandler
850
- onKeyUp?: KeyboardEventHandler
851
- onKeyPress?: KeyboardEventHandler
930
+ paddingX?: Size | string
852
931
  }
853
932
  ```
854
933
 
855
- #### `InputClassOptions`
934
+ #### `FlexProps`
856
935
 
857
- Options for resolving input CSS classes via UIClassMap.
936
+ Flex container props.
858
937
 
859
938
  ```typescript
860
- interface InputClassOptions {
861
- error?: boolean
862
- size?: Size
939
+ interface FlexProps extends HTMLElementProps {
863
940
  /**
864
- * Horizontal text alignment inside the input. Bonds may default to a
865
- * centered aesthetic (e.g. the Tailwind bond's floating-label style);
866
- * `'left'` opts a specific field out — e.g. a form field sitting next to
867
- * left-aligned textareas.
941
+ * Flex content.
868
942
  */
869
- align?: 'left' | 'center'
870
- }
871
- ```
872
-
873
- #### `InputElementProps`
874
-
875
- Base props for input elements.
876
-
877
- ```typescript
878
- interface InputElementProps extends HTMLElementProps {
879
- name?: string
880
- value?: string | number | readonly string[]
881
- defaultValue?: string | number | readonly string[]
882
- placeholder?: string
883
- required?: boolean
884
- readOnly?: boolean
885
- autoFocus?: boolean
886
- autoComplete?: string
887
- maxLength?: number
888
- minLength?: number
889
- pattern?: string
890
- onChange?: ChangeEventHandler
891
- onInput?: FormEventHandler
892
- }
893
- ```
894
-
895
- #### `InputProps`
896
-
897
- Props for the Input component (text field, email, password, etc.).
943
+ children?: Children
898
944
 
899
- ```typescript
900
- interface InputProps extends InputElementProps {
901
945
  /**
902
- * Input type.
946
+ * Flex direction.
903
947
  */
904
- type?: InputType
948
+ direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse'
905
949
 
906
950
  /**
907
- * Input size.
951
+ * Justify content.
908
952
  */
909
- size?: Size
953
+ justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly'
910
954
 
911
955
  /**
912
- * Horizontal text alignment inside the input (see
913
- * {@link InputClassOptions.align}). Defaults to the bond's own style.
956
+ * Align items.
914
957
  */
915
- align?: 'left' | 'center'
958
+ align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch'
916
959
 
917
960
  /**
918
- * Label text.
961
+ * Flex wrap.
919
962
  */
920
- label?: string
963
+ wrap?: 'wrap' | 'nowrap' | 'wrap-reverse'
921
964
 
922
965
  /**
923
- * Error message.
966
+ * Gap between items.
924
967
  */
925
- error?: string
968
+ gap?: Size | string | number
969
+ }
970
+ ```
971
+
972
+ #### `GridProps`
973
+
974
+ Grid container props.
926
975
 
976
+ ```typescript
977
+ interface GridProps extends HTMLElementProps {
927
978
  /**
928
- * Hint/help text.
979
+ * Grid content.
929
980
  */
930
- hint?: string
981
+ children?: Children
931
982
 
932
983
  /**
933
- * Element to display on the left.
984
+ * Number of columns.
934
985
  */
935
- leftElement?: Children
986
+ columns?: number | string
936
987
 
937
988
  /**
938
- * Element to display on the right.
989
+ * Number of rows.
939
990
  */
940
- rightElement?: Children
991
+ rows?: number | string
941
992
 
942
993
  /**
943
- * Whether to show a clear button.
994
+ * Gap between items.
944
995
  */
945
- clearable?: boolean
996
+ gap?: Size | string | number
946
997
 
947
998
  /**
948
- * Called when the clear button is clicked.
999
+ * Column gap.
949
1000
  */
950
- onClear?: () => void
1001
+ columnGap?: Size | string | number
951
1002
 
952
1003
  /**
953
- * Accessible label for the clear button.
954
- * @default 'Clear'
1004
+ * Row gap.
955
1005
  */
956
- clearLabel?: string
957
- }
958
- ```
959
-
960
- #### `LabelClassOptions`
961
-
962
- Options for label class resolution.
963
-
964
- ```typescript
965
- interface LabelClassOptions {
966
- required?: boolean
967
- }
968
- ```
969
-
970
- #### `ModalClassOptions`
971
-
972
- Options for resolving modal/dialog CSS classes via UIClassMap.
973
-
974
- ```typescript
975
- interface ModalClassOptions {
976
- size?: ModalSize
1006
+ rowGap?: Size | string | number
977
1007
  }
978
1008
  ```
979
1009
 
980
- #### `ModalProps`
1010
+ #### `SpacerProps`
981
1011
 
982
- Props for the Modal/Dialog component.
1012
+ Props for the Spacer layout component (adds whitespace between elements).
983
1013
 
984
1014
  ```typescript
985
- interface ModalProps extends HTMLElementProps {
986
- /**
987
- * Whether the modal is open.
988
- */
989
- open: boolean
990
-
1015
+ interface SpacerProps extends BaseProps {
991
1016
  /**
992
- * Called when the modal should close.
1017
+ * Space size.
993
1018
  */
994
- onClose: () => void
1019
+ size?: Size | string | number
995
1020
 
996
1021
  /**
997
- * Modal title.
1022
+ * Whether the spacer is horizontal.
998
1023
  */
999
- title?: string
1024
+ horizontal?: boolean
1025
+ }
1026
+ ```
1027
+
1028
+ #### `FormProps`
1029
+
1030
+ Props for the Form component (wraps inputs with submission handling and validation).
1000
1031
 
1032
+ ```typescript
1033
+ interface FormProps extends FormElementProps {
1001
1034
  /**
1002
- * Modal content.
1035
+ * Form content.
1003
1036
  */
1004
1037
  children?: Children
1005
1038
 
1006
1039
  /**
1007
- * Modal size.
1040
+ * Submit handler with form data.
1008
1041
  */
1009
- size?: ModalSize
1042
+ onFormSubmit?: (data: Record<string, unknown>) => void | Promise<void>
1010
1043
 
1011
1044
  /**
1012
- * Whether to show a close button.
1045
+ * Whether the form is submitting.
1013
1046
  */
1014
- showCloseButton?: boolean
1047
+ submitting?: boolean
1048
+ }
1049
+ ```
1050
+
1051
+ #### `FormFieldProps`
1052
+
1053
+ Form field wrapper props.
1015
1054
 
1055
+ ```typescript
1056
+ interface FormFieldProps extends HTMLElementProps {
1016
1057
  /**
1017
- * Whether clicking the overlay closes the modal.
1058
+ * Field content.
1018
1059
  */
1019
- closeOnOverlayClick?: boolean
1060
+ children?: Children
1020
1061
 
1021
1062
  /**
1022
- * Whether pressing Escape closes the modal.
1063
+ * Field label.
1023
1064
  */
1024
- closeOnEscape?: boolean
1065
+ label?: string
1025
1066
 
1026
1067
  /**
1027
- * Footer content (typically action buttons).
1068
+ * Field name.
1028
1069
  */
1029
- footer?: Children
1070
+ name?: string
1030
1071
 
1031
1072
  /**
1032
- * Whether the modal is centered vertically.
1073
+ * Error message.
1033
1074
  */
1034
- centered?: boolean
1075
+ error?: string
1035
1076
 
1036
1077
  /**
1037
- * Whether to prevent body scroll when open.
1078
+ * Hint/help text.
1038
1079
  */
1039
- preventScroll?: boolean
1080
+ hint?: string
1040
1081
 
1041
1082
  /**
1042
- * Accessible label for the close button.
1043
- * @default 'Close'
1083
+ * Whether the field is required.
1044
1084
  */
1045
- closeLabel?: string
1046
- }
1047
- ```
1048
-
1049
- #### `MoleculeSpinnerColors`
1050
-
1051
- Gradient-mode colors. Any CSS color string, including `var()` forms.
1052
-
1053
- ```typescript
1054
- interface MoleculeSpinnerColors {
1055
- /** Bond base / glint tail color. */
1056
- blue?: string
1057
- /** Flow highlight / glint head color at rest. */
1058
- light?: string
1059
- /** Glint ignition color while an atom is in flight. */
1060
- peach?: string
1085
+ required?: boolean
1061
1086
  }
1062
1087
  ```
1063
1088
 
1064
- #### `MoleculeSpinnerMarkOptions`
1089
+ #### `AlertProps`
1065
1090
 
1066
- Options for {@link moleculeSpinnerMarkSvg}.
1091
+ Props for the Alert component.
1067
1092
 
1068
1093
  ```typescript
1069
- interface MoleculeSpinnerMarkOptions {
1070
- /** Motion timings; defaults to the shipped design (2.5s / 5s / 3s). */
1071
- timings?: Partial<MoleculeSpinnerTimings>
1072
- /** `gradient` (default) or `mono` — plain `currentColor` outline, no defs. */
1073
- paint?: 'gradient' | 'mono'
1074
- /** Gradient-mode colors; default the `var(--mol-spin-*, fallback)` set. */
1075
- colors?: MoleculeSpinnerColors
1094
+ interface AlertProps extends HTMLElementProps {
1076
1095
  /**
1077
- * Gradient id for url() references. Must be unique per rendered instance
1078
- * on a page. Defaults to `mol-spinner-gradient`.
1096
+ * Alert content.
1079
1097
  */
1080
- gradientId?: string
1081
- /** Pixel size baked into width/height; omit when CSS sizes the svg. */
1082
- size?: number
1083
- /** Class attribute for the svg element. */
1084
- className?: string
1085
- /** Inline style attribute (already serialized, e.g. `color:re$d`). */
1086
- style?: string
1087
- /** Announce as `role="status"` with this label; omit for `aria-hidden`. */
1088
- ariaLabel?: string
1089
- }
1090
- ```
1091
-
1092
- #### `MoleculeSpinnerTimings`
1093
-
1094
- The mark's timings, in CSS duration strings. Swap cycle → glint cycle.
1095
-
1096
- ```typescript
1097
- interface MoleculeSpinnerTimings {
1098
- /** One full 3-phase atom-swap cycle (also drives bond fades + glints). */
1099
- dur: string
1100
- /** Whole-figure rotation. Keep at two swap cycles for the intended feel. */
1101
- spin: string
1102
- /** Bond gradient flow period (one full translate across the figure). */
1103
- flow: string
1104
- }
1105
- ```
1106
-
1107
- #### `PageHeaderProps`
1108
-
1109
- Props for the PageHeader component — consistent page title area.
1098
+ children?: Children
1110
1099
 
1111
- ```typescript
1112
- interface PageHeaderProps extends BaseProps {
1113
- /** Page title. */
1114
- title: string
1115
- /** Page description. */
1116
- description?: string
1117
- /** Action buttons (e.g., "Create", "Export"). */
1118
- actions?: Children
1119
- /** Breadcrumb trail. */
1120
- breadcrumbs?: Array<{ label: string; href?: string }>
1121
- }
1122
- ```
1100
+ /**
1101
+ * Alert title.
1102
+ */
1103
+ title?: string
1123
1104
 
1124
- #### `PageShellProps`
1105
+ /**
1106
+ * Alert status/type.
1107
+ */
1108
+ status?: ColorVariant
1125
1109
 
1126
- Props for the PageShell component — authenticated page wrapper with navigation.
1110
+ /**
1111
+ * Alert variant.
1112
+ */
1113
+ variant?: 'solid' | 'subtle' | 'outline' | 'left-accent'
1127
1114
 
1128
- ```typescript
1129
- interface PageShellProps extends BaseProps {
1130
- /** Sidebar content (navigation links). */
1131
- sidebar?: Children
1132
- /** Top bar content (breadcrumbs, user menu). */
1133
- topbar?: Children
1134
- /** Whether the sidebar is collapsed. */
1135
- sidebarCollapsed?: boolean
1136
- /** Callback when sidebar toggle is clicked. */
1137
- onSidebarToggle?: () => void
1138
- /** Main content. */
1139
- children?: Children
1140
- }
1141
- ```
1115
+ /**
1116
+ * Whether the alert is dismissible.
1117
+ */
1118
+ dismissible?: boolean
1142
1119
 
1143
- #### `PaginationClassOptions`
1120
+ /**
1121
+ * Called when dismissed.
1122
+ */
1123
+ onDismiss?: () => void
1144
1124
 
1145
- Options for pagination item class resolution.
1125
+ /**
1126
+ * Icon to display.
1127
+ */
1128
+ icon?: Children
1146
1129
 
1147
- ```typescript
1148
- interface PaginationClassOptions {
1149
- active?: boolean
1150
- size?: Size
1130
+ /**
1131
+ * Accessible label for the dismiss button.
1132
+ * @default 'Dismiss'
1133
+ */
1134
+ dismissLabel?: string
1151
1135
  }
1152
1136
  ```
1153
1137
 
1154
- #### `PaginationProps`
1138
+ #### `ToastProps`
1155
1139
 
1156
- Props for the Pagination component (page navigation with current page, total, page size, and change callbacks).
1140
+ Props for the Toast/notification component.
1157
1141
 
1158
1142
  ```typescript
1159
- interface PaginationProps extends BaseProps {
1143
+ interface ToastProps extends HTMLElementProps {
1160
1144
  /**
1161
- * Current page (1-indexed).
1145
+ * Toast content.
1162
1146
  */
1163
- page: number
1147
+ children?: Children
1164
1148
 
1165
1149
  /**
1166
- * Total number of pages.
1150
+ * Toast title.
1167
1151
  */
1168
- totalPages: number
1152
+ title?: string
1169
1153
 
1170
1154
  /**
1171
- * Page change handler.
1155
+ * Toast description.
1172
1156
  */
1173
- onChange: (page: number) => void
1157
+ description?: string
1174
1158
 
1175
1159
  /**
1176
- * Number of sibling pages to show.
1160
+ * Toast status/type.
1177
1161
  */
1178
- siblings?: number
1162
+ status?: ColorVariant
1179
1163
 
1180
1164
  /**
1181
- * Number of boundary pages to show.
1165
+ * Duration in milliseconds (0 for persistent).
1182
1166
  */
1183
- boundaries?: number
1167
+ duration?: number
1184
1168
 
1185
1169
  /**
1186
- * Pagination size.
1170
+ * Whether the toast is dismissible.
1187
1171
  */
1188
- size?: Size
1172
+ dismissible?: boolean
1189
1173
 
1190
1174
  /**
1191
- * Whether to show first/last buttons.
1175
+ * Called when dismissed.
1192
1176
  */
1193
- showFirstLast?: boolean
1177
+ onDismiss?: () => void
1194
1178
 
1195
1179
  /**
1196
- * Whether to show previous/next buttons.
1180
+ * Toast position.
1197
1181
  */
1198
- showPrevNext?: boolean
1182
+ position?: 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left'
1199
1183
 
1200
1184
  /**
1201
- * Accessible labels for pagination controls.
1185
+ * Accessible label for the close button.
1186
+ * @default 'Close'
1202
1187
  */
1203
- labels?: {
1204
- nav?: string
1205
- first?: string
1206
- previous?: string
1207
- next?: string
1208
- last?: string
1209
- goToPage?: (page: number) => string
1210
- }
1188
+ closeLabel?: string
1211
1189
  }
1212
1190
  ```
1213
1191
 
1214
- #### `RadioClassOptions`
1192
+ #### `TabItem`
1215
1193
 
1216
- Options for resolving radio CSS classes via UIClassMap.
1194
+ A single tab in a Tabs component.
1217
1195
 
1218
1196
  ```typescript
1219
- interface RadioClassOptions {
1220
- error?: boolean
1197
+ interface TabItem<T = string> {
1198
+ /**
1199
+ * Tab value/id.
1200
+ */
1201
+ value: T
1202
+
1203
+ /**
1204
+ * Tab label.
1205
+ */
1206
+ label: Children
1207
+
1208
+ /**
1209
+ * Tab content.
1210
+ */
1211
+ content?: Children
1212
+
1213
+ /**
1214
+ * Whether the tab is disabled.
1215
+ */
1216
+ disabled?: boolean
1217
+
1218
+ /**
1219
+ * Icon to display.
1220
+ */
1221
+ icon?: Children
1221
1222
  }
1222
1223
  ```
1223
1224
 
1224
- #### `RadioGroupProps`
1225
+ #### `TabsProps`
1225
1226
 
1226
- Props for the RadioGroup component.
1227
+ Props for the Tabs component (switchable tabbed content panels).
1227
1228
 
1228
1229
  ```typescript
1229
- interface RadioGroupProps<T = string> extends BaseProps {
1230
+ interface TabsProps<T = string> extends BaseProps {
1230
1231
  /**
1231
- * Radio options.
1232
+ * Tab items.
1232
1233
  */
1233
- options: RadioOption<T>[]
1234
+ items: TabItem<T>[]
1234
1235
 
1235
1236
  /**
1236
- * Current value.
1237
+ * Current active tab.
1237
1238
  */
1238
1239
  value?: T
1239
1240
 
1240
1241
  /**
1241
- * Change handler.
1242
- */
1243
- onChange?: (value: T) => void
1244
-
1245
- /**
1246
- * Radio size.
1242
+ * Default active tab.
1247
1243
  */
1248
- size?: Size
1244
+ defaultValue?: T
1249
1245
 
1250
1246
  /**
1251
- * Group label.
1247
+ * Change handler.
1252
1248
  */
1253
- label?: string
1249
+ onChange?: (value: T) => void
1254
1250
 
1255
1251
  /**
1256
- * Shared `name` attribute for the group's radio inputs (used for native
1257
- * form submission). When omitted, a unique per-instance name is generated
1258
- * so separate groups never merge — the visible `label` is deliberately
1259
- * NOT used as the name, because two groups with the same label (e.g. two
1260
- * "Size" pickers) would otherwise form ONE native radio group and
1261
- * deselect each other.
1252
+ * Tab variant.
1262
1253
  */
1263
- name?: string
1254
+ variant?: 'line' | 'enclosed' | 'soft-rounded' | 'solid-rounded'
1264
1255
 
1265
1256
  /**
1266
- * Layout direction.
1257
+ * Tab size.
1267
1258
  */
1268
- direction?: 'horizontal' | 'vertical'
1259
+ size?: Size
1269
1260
 
1270
1261
  /**
1271
- * Error message.
1262
+ * Whether tabs are fitted (take full width).
1272
1263
  */
1273
- error?: string
1264
+ fitted?: boolean
1274
1265
  }
1275
1266
  ```
1276
1267
 
1277
- #### `RadioOption`
1268
+ #### `AccordionItem`
1278
1269
 
1279
- A single option in a RadioGroup.
1270
+ A single item in an Accordion component.
1280
1271
 
1281
1272
  ```typescript
1282
- interface RadioOption<T = string> {
1273
+ interface AccordionItem<T = string> {
1283
1274
  /**
1284
- * Option value.
1275
+ * Item value/id.
1285
1276
  */
1286
1277
  value: T
1287
1278
 
1288
1279
  /**
1289
- * Display label.
1280
+ * Item header/trigger.
1290
1281
  */
1291
- label: Children
1282
+ header: Children
1292
1283
 
1293
1284
  /**
1294
- * Whether the option is disabled.
1285
+ * Item content.
1286
+ */
1287
+ content: Children
1288
+
1289
+ /**
1290
+ * Whether the item is disabled.
1295
1291
  */
1296
1292
  disabled?: boolean
1297
1293
  }
1298
1294
  ```
1299
1295
 
1300
- #### `SelectClassOptions`
1296
+ #### `AccordionProps`
1301
1297
 
1302
- Options for resolving select CSS classes via UIClassMap.
1298
+ Props for the Accordion component.
1303
1299
 
1304
1300
  ```typescript
1305
- interface SelectClassOptions {
1306
- error?: boolean
1307
- size?: Size
1308
- }
1309
- ```
1301
+ interface AccordionProps<T = string> extends BaseProps {
1302
+ /**
1303
+ * Accordion items.
1304
+ */
1305
+ items: AccordionItem<T>[]
1310
1306
 
1311
- #### `SelectElementProps`
1307
+ /**
1308
+ * Expanded item(s).
1309
+ */
1310
+ value?: T | T[]
1312
1311
 
1313
- Base props for select elements.
1312
+ /**
1313
+ * Default expanded item(s).
1314
+ */
1315
+ defaultValue?: T | T[]
1314
1316
 
1315
- ```typescript
1316
- interface SelectElementProps extends HTMLElementProps {
1317
- name?: string
1318
- required?: boolean
1319
- autoFocus?: boolean
1317
+ /**
1318
+ * Change handler.
1319
+ */
1320
+ onChange?: (value: T | T[]) => void
1321
+
1322
+ /**
1323
+ * Whether multiple items can be expanded.
1324
+ */
1320
1325
  multiple?: boolean
1321
- onChange?: ChangeEventHandler
1326
+
1327
+ /**
1328
+ * Whether items can be collapsed.
1329
+ */
1330
+ collapsible?: boolean
1322
1331
  }
1323
1332
  ```
1324
1333
 
1325
- #### `SelectOption`
1334
+ #### `TableColumn`
1326
1335
 
1327
- A single option in a Select dropdown.
1336
+ Table column definition.
1328
1337
 
1329
1338
  ```typescript
1330
- interface SelectOption<T = string> {
1339
+ interface TableColumn<T> {
1331
1340
  /**
1332
- * Option value.
1341
+ * Column key (data property).
1333
1342
  */
1334
- value: T
1343
+ key: keyof T | string
1335
1344
 
1336
1345
  /**
1337
- * Display label.
1346
+ * Column header.
1338
1347
  */
1339
- label: string
1348
+ header: Children
1340
1349
 
1341
1350
  /**
1342
- * Whether the option is disabled.
1351
+ * Custom cell renderer.
1343
1352
  */
1344
- disabled?: boolean
1353
+ render?: (value: unknown, row: T, index: number) => Children
1345
1354
 
1346
1355
  /**
1347
- * Option group (for grouped selects).
1356
+ * Column width.
1348
1357
  */
1349
- group?: string
1358
+ width?: string | number
1359
+
1360
+ /**
1361
+ * Whether the column is sortable.
1362
+ */
1363
+ sortable?: boolean
1364
+
1365
+ /**
1366
+ * Text alignment.
1367
+ */
1368
+ align?: 'left' | 'center' | 'right'
1350
1369
  }
1351
1370
  ```
1352
1371
 
1353
- #### `SelectProps`
1372
+ #### `TableProps`
1354
1373
 
1355
- Props for the Select dropdown component (single or multi-select).
1374
+ Props for the Table component.
1356
1375
 
1357
1376
  ```typescript
1358
- interface SelectProps<T = string> extends SelectElementProps {
1377
+ interface TableProps<T> extends HTMLElementProps {
1359
1378
  /**
1360
- * Select options.
1379
+ * Table data.
1361
1380
  */
1362
- options: SelectOption<T>[]
1381
+ data: T[]
1363
1382
 
1364
1383
  /**
1365
- * Current value.
1384
+ * Column definitions.
1366
1385
  */
1367
- value?: T
1386
+ columns: TableColumn<T>[]
1368
1387
 
1369
1388
  /**
1370
- * Change handler (with typed value).
1389
+ * Row key extractor.
1371
1390
  */
1372
- onValueChange?: (value: T) => void
1391
+ rowKey?: keyof T | ((row: T) => string | number)
1373
1392
 
1374
1393
  /**
1375
- * Select size.
1394
+ * Whether to show borders.
1395
+ */
1396
+ bordered?: boolean
1397
+
1398
+ /**
1399
+ * Whether rows are striped.
1400
+ */
1401
+ striped?: boolean
1402
+
1403
+ /**
1404
+ * Whether rows are hoverable.
1405
+ */
1406
+ hoverable?: boolean
1407
+
1408
+ /**
1409
+ * Table size.
1376
1410
  */
1377
1411
  size?: Size
1378
1412
 
1379
1413
  /**
1380
- * Label text.
1414
+ * Empty state content.
1381
1415
  */
1382
- label?: string
1416
+ emptyContent?: Children
1383
1417
 
1384
1418
  /**
1385
- * Placeholder text.
1419
+ * Loading state.
1386
1420
  */
1387
- placeholder?: string
1421
+ loading?: boolean
1388
1422
 
1389
1423
  /**
1390
- * Error message.
1424
+ * Sort configuration.
1391
1425
  */
1392
- error?: string
1426
+ sort?: { key: string; direction: 'asc' | 'desc' }
1393
1427
 
1394
1428
  /**
1395
- * Hint/help text.
1429
+ * Sort change handler.
1396
1430
  */
1397
- hint?: string
1431
+ onSort?: (key: string, direction: 'asc' | 'desc') => void
1398
1432
 
1399
1433
  /**
1400
- * Whether to allow clearing the selection.
1434
+ * Row click handler.
1401
1435
  */
1402
- clearable?: boolean
1436
+ onRowClick?: (row: T, index: number) => void
1403
1437
  }
1404
1438
  ```
1405
1439
 
1406
- #### `SeparatorClassOptions`
1440
+ #### `PaginationProps`
1407
1441
 
1408
- Options for resolving separator CSS classes via UIClassMap.
1442
+ Props for the Pagination component (page navigation with current page, total, page size, and change callbacks).
1409
1443
 
1410
1444
  ```typescript
1411
- interface SeparatorClassOptions {
1412
- orientation?: 'horizontal' | 'vertical'
1413
- }
1414
- ```
1445
+ interface PaginationProps extends BaseProps {
1446
+ /**
1447
+ * Current page (1-indexed).
1448
+ */
1449
+ page: number
1415
1450
 
1416
- #### `SeparatorProps`
1451
+ /**
1452
+ * Total number of pages.
1453
+ */
1454
+ totalPages: number
1417
1455
 
1418
- Props for the Separator/Divider component.
1456
+ /**
1457
+ * Page change handler.
1458
+ */
1459
+ onChange: (page: number) => void
1419
1460
 
1420
- ```typescript
1421
- interface SeparatorProps extends BaseProps {
1422
1461
  /**
1423
- * Separator orientation.
1462
+ * Number of sibling pages to show.
1424
1463
  */
1425
- orientation?: 'horizontal' | 'vertical'
1464
+ siblings?: number
1426
1465
 
1427
1466
  /**
1428
- * Whether the separator is decorative only.
1467
+ * Number of boundary pages to show.
1429
1468
  */
1430
- decorative?: boolean
1469
+ boundaries?: number
1470
+
1471
+ /**
1472
+ * Pagination size.
1473
+ */
1474
+ size?: Size
1475
+
1476
+ /**
1477
+ * Whether to show first/last buttons.
1478
+ */
1479
+ showFirstLast?: boolean
1480
+
1481
+ /**
1482
+ * Whether to show previous/next buttons.
1483
+ */
1484
+ showPrevNext?: boolean
1485
+
1486
+ /**
1487
+ * Accessible labels for pagination controls.
1488
+ */
1489
+ labels?: {
1490
+ nav?: string
1491
+ first?: string
1492
+ previous?: string
1493
+ next?: string
1494
+ last?: string
1495
+ goToPage?: (page: number) => string
1496
+ }
1431
1497
  }
1432
1498
  ```
1433
1499
 
@@ -1464,388 +1530,331 @@ interface SkeletonProps extends BaseProps {
1464
1530
  }
1465
1531
  ```
1466
1532
 
1467
- #### `SpacerProps`
1533
+ #### `SeparatorProps`
1468
1534
 
1469
- Props for the Spacer layout component (adds whitespace between elements).
1535
+ Props for the Separator/Divider component.
1470
1536
 
1471
1537
  ```typescript
1472
- interface SpacerProps extends BaseProps {
1538
+ interface SeparatorProps extends BaseProps {
1473
1539
  /**
1474
- * Space size.
1540
+ * Separator orientation.
1475
1541
  */
1476
- size?: Size | string | number
1542
+ orientation?: 'horizontal' | 'vertical'
1477
1543
 
1478
1544
  /**
1479
- * Whether the spacer is horizontal.
1545
+ * Whether the separator is decorative only.
1480
1546
  */
1481
- horizontal?: boolean
1482
- }
1483
- ```
1484
-
1485
- #### `SpinnerClassOptions`
1486
-
1487
- Options for resolving spinner CSS classes via UIClassMap.
1488
-
1489
- ```typescript
1490
- interface SpinnerClassOptions {
1491
- size?: Size
1547
+ decorative?: boolean
1492
1548
  }
1493
1549
  ```
1494
1550
 
1495
- #### `SpinnerProps`
1551
+ #### `DropdownItem`
1496
1552
 
1497
- Props for the Spinner/loading indicator component.
1553
+ Dropdown menu item.
1498
1554
 
1499
1555
  ```typescript
1500
- interface SpinnerProps extends BaseProps {
1556
+ interface DropdownItem<T = string> {
1501
1557
  /**
1502
- * Spinner size.
1558
+ * Item value/id.
1503
1559
  */
1504
- size?: Size
1560
+ value: T
1505
1561
 
1506
1562
  /**
1507
- * Spinner color.
1563
+ * Display label.
1508
1564
  */
1509
- color?: ColorVariant | string
1565
+ label: Children
1510
1566
 
1511
1567
  /**
1512
- * Loading label (for accessibility).
1568
+ * Whether the item is disabled.
1513
1569
  */
1514
- label?: string
1570
+ disabled?: boolean
1515
1571
 
1516
1572
  /**
1517
- * Spinner thickness.
1573
+ * Icon to display.
1518
1574
  */
1519
- thickness?: number
1520
- }
1521
- ```
1575
+ icon?: Children
1522
1576
 
1523
- #### `SwitchClassOptions`
1577
+ /**
1578
+ * Keyboard shortcut display.
1579
+ */
1580
+ shortcut?: string
1524
1581
 
1525
- Options for switch class resolution.
1582
+ /**
1583
+ * Whether this is a separator.
1584
+ */
1585
+ separator?: boolean
1526
1586
 
1527
- ```typescript
1528
- interface SwitchClassOptions {
1529
- size?: Size
1530
1587
  /**
1531
- * Color used for the checked/on track. Reuses the same semantic color
1532
- * scale as `ButtonClassOptions.color`/`BadgeClassOptions.variant`.
1533
- * @default 'primary'
1588
+ * Nested items (for submenus).
1534
1589
  */
1535
- color?: ColorVariant
1590
+ items?: DropdownItem<T>[]
1536
1591
  }
1537
1592
  ```
1538
1593
 
1539
- #### `SwitchProps`
1594
+ #### `DropdownProps`
1540
1595
 
1541
- Props for the Switch/Toggle component.
1596
+ Props for the Dropdown menu component.
1542
1597
 
1543
1598
  ```typescript
1544
- interface SwitchProps extends InputElementProps {
1545
- /**
1546
- * Switch label.
1547
- */
1548
- label?: Children
1549
-
1599
+ interface DropdownProps<T = string> extends BaseProps {
1550
1600
  /**
1551
- * Whether the switch is on.
1601
+ * Dropdown trigger element.
1552
1602
  */
1553
- checked?: boolean
1603
+ trigger: Children
1554
1604
 
1555
1605
  /**
1556
- * Switch size.
1606
+ * Dropdown items.
1557
1607
  */
1558
- size?: Size
1608
+ items: DropdownItem<T>[]
1559
1609
 
1560
1610
  /**
1561
- * Color when on.
1611
+ * Called when an item is selected.
1562
1612
  */
1563
- color?: ColorVariant
1564
- }
1565
- ```
1566
-
1567
- #### `TabItem`
1568
-
1569
- A single tab in a Tabs component.
1613
+ onSelect?: (value: T) => void
1570
1614
 
1571
- ```typescript
1572
- interface TabItem<T = string> {
1573
1615
  /**
1574
- * Tab value/id.
1616
+ * Dropdown placement.
1575
1617
  */
1576
- value: T
1618
+ placement?:
1619
+ 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'right'
1577
1620
 
1578
1621
  /**
1579
- * Tab label.
1622
+ * Whether the dropdown is open (controlled).
1580
1623
  */
1581
- label: Children
1624
+ open?: boolean
1582
1625
 
1583
1626
  /**
1584
- * Tab content.
1627
+ * Called when open state changes.
1585
1628
  */
1586
- content?: Children
1629
+ onOpenChange?: (open: boolean) => void
1587
1630
 
1588
1631
  /**
1589
- * Whether the tab is disabled.
1632
+ * Menu alignment.
1590
1633
  */
1591
- disabled?: boolean
1634
+ align?: 'start' | 'center' | 'end'
1592
1635
 
1593
1636
  /**
1594
- * Icon to display.
1637
+ * Menu width.
1595
1638
  */
1596
- icon?: Children
1639
+ width?: 'trigger' | 'auto' | number | string
1597
1640
  }
1598
1641
  ```
1599
1642
 
1600
- #### `TableColumn`
1643
+ #### `PageShellProps`
1601
1644
 
1602
- Table column definition.
1645
+ Props for the PageShell component — authenticated page wrapper with navigation.
1603
1646
 
1604
1647
  ```typescript
1605
- interface TableColumn<T> {
1606
- /**
1607
- * Column key (data property).
1608
- */
1609
- key: keyof T | string
1648
+ interface PageShellProps extends BaseProps {
1649
+ /** Sidebar content (navigation links). */
1650
+ sidebar?: Children
1651
+ /** Top bar content (breadcrumbs, user menu). */
1652
+ topbar?: Children
1653
+ /** Whether the sidebar is collapsed. */
1654
+ sidebarCollapsed?: boolean
1655
+ /** Callback when sidebar toggle is clicked. */
1656
+ onSidebarToggle?: () => void
1657
+ /** Main content. */
1658
+ children?: Children
1659
+ }
1660
+ ```
1610
1661
 
1611
- /**
1612
- * Column header.
1613
- */
1614
- header: Children
1662
+ #### `EmptyStateProps`
1615
1663
 
1616
- /**
1617
- * Custom cell renderer.
1618
- */
1619
- render?: (value: unknown, row: T, index: number) => Children
1664
+ Props for the EmptyState component — shown when a list or section has no data.
1620
1665
 
1621
- /**
1622
- * Column width.
1623
- */
1624
- width?: string | number
1666
+ ```typescript
1667
+ interface EmptyStateProps extends BaseProps {
1668
+ /** Icon or illustration to display. */
1669
+ icon?: Children
1670
+ /** Main heading text. */
1671
+ title: string
1672
+ /** Description text. */
1673
+ description?: string
1674
+ /** Primary action button (e.g., "Create first item"). */
1675
+ action?: Children
1676
+ }
1677
+ ```
1625
1678
 
1626
- /**
1627
- * Whether the column is sortable.
1628
- */
1629
- sortable?: boolean
1679
+ #### `PageHeaderProps`
1630
1680
 
1631
- /**
1632
- * Text alignment.
1633
- */
1634
- align?: 'left' | 'center' | 'right'
1681
+ Props for the PageHeader component — consistent page title area.
1682
+
1683
+ ```typescript
1684
+ interface PageHeaderProps extends BaseProps {
1685
+ /** Page title. */
1686
+ title: string
1687
+ /** Page description. */
1688
+ description?: string
1689
+ /** Action buttons (e.g., "Create", "Export"). */
1690
+ actions?: Children
1691
+ /** Breadcrumb trail. */
1692
+ breadcrumbs?: Array<{ label: string; href?: string }>
1635
1693
  }
1636
1694
  ```
1637
1695
 
1638
- #### `TableProps`
1696
+ #### `ButtonClassOptions`
1639
1697
 
1640
- Props for the Table component.
1698
+ Options for resolving button CSS classes via UIClassMap.
1641
1699
 
1642
1700
  ```typescript
1643
- interface TableProps<T> extends HTMLElementProps {
1644
- /**
1645
- * Table data.
1646
- */
1647
- data: T[]
1701
+ interface ButtonClassOptions {
1702
+ variant?: ButtonVariant
1703
+ color?: ColorVariant
1704
+ size?: ButtonSize
1705
+ fullWidth?: boolean
1706
+ }
1707
+ ```
1648
1708
 
1649
- /**
1650
- * Column definitions.
1651
- */
1652
- columns: TableColumn<T>[]
1709
+ #### `InputClassOptions`
1653
1710
 
1654
- /**
1655
- * Row key extractor.
1656
- */
1657
- rowKey?: keyof T | ((row: T) => string | number)
1711
+ Options for resolving input CSS classes via UIClassMap.
1658
1712
 
1713
+ ```typescript
1714
+ interface InputClassOptions {
1715
+ error?: boolean
1716
+ size?: Size
1659
1717
  /**
1660
- * Whether to show borders.
1718
+ * Horizontal text alignment inside the input. Bonds may default to a
1719
+ * centered aesthetic (e.g. the Tailwind bond's floating-label style);
1720
+ * `'left'` opts a specific field out — e.g. a form field sitting next to
1721
+ * left-aligned textareas.
1661
1722
  */
1662
- bordered?: boolean
1723
+ align?: 'left' | 'center'
1724
+ }
1725
+ ```
1663
1726
 
1664
- /**
1665
- * Whether rows are striped.
1666
- */
1667
- striped?: boolean
1727
+ #### `TextareaClassOptions`
1668
1728
 
1669
- /**
1670
- * Whether rows are hoverable.
1671
- */
1672
- hoverable?: boolean
1729
+ Options for textarea class resolution.
1673
1730
 
1731
+ ```typescript
1732
+ interface TextareaClassOptions {
1733
+ error?: boolean
1674
1734
  /**
1675
- * Table size.
1735
+ * Text size tier, matching {@link InputClassOptions.size} — a same-`size`
1736
+ * input + textarea pair renders identical font sizes. Bonds default to
1737
+ * their historic textarea size when omitted.
1676
1738
  */
1677
1739
  size?: Size
1740
+ }
1741
+ ```
1678
1742
 
1679
- /**
1680
- * Empty state content.
1681
- */
1682
- emptyContent?: Children
1743
+ #### `SelectClassOptions`
1683
1744
 
1684
- /**
1685
- * Loading state.
1686
- */
1687
- loading?: boolean
1745
+ Options for resolving select CSS classes via UIClassMap.
1688
1746
 
1689
- /**
1690
- * Sort configuration.
1691
- */
1692
- sort?: { key: string; direction: 'asc' | 'desc' }
1747
+ ```typescript
1748
+ interface SelectClassOptions {
1749
+ error?: boolean
1750
+ size?: Size
1751
+ }
1752
+ ```
1693
1753
 
1694
- /**
1695
- * Sort change handler.
1696
- */
1697
- onSort?: (key: string, direction: 'asc' | 'desc') => void
1754
+ #### `CheckboxClassOptions`
1698
1755
 
1699
- /**
1700
- * Row click handler.
1701
- */
1702
- onRowClick?: (row: T, index: number) => void
1756
+ Options for resolving checkbox CSS classes via UIClassMap.
1757
+
1758
+ ```typescript
1759
+ interface CheckboxClassOptions {
1760
+ error?: boolean
1703
1761
  }
1704
1762
  ```
1705
1763
 
1706
- #### `TabsClassOptions`
1764
+ #### `RadioClassOptions`
1707
1765
 
1708
- Options for resolving tabs (`tabsList`/`tabsTrigger`/`tabsContent`) CSS
1709
- classes via UIClassMap. Active vs inactive trigger styling is NOT one of
1710
- these options — it is expressed as `data-[state=active]` CSS attribute
1711
- selectors baked into the returned class string, driven by the
1712
- `data-state="active"|"inactive"` attribute the framework binding already
1713
- sets on the trigger element (see `@molecule/app-ui-react`'s `Tabs`).
1766
+ Options for resolving radio CSS classes via UIClassMap.
1714
1767
 
1715
1768
  ```typescript
1716
- interface TabsClassOptions {
1717
- /**
1718
- * Visual style: underline indicator, bordered/filled boxes, a soft-bg
1719
- * pill, or a solid-bg pill.
1720
- */
1721
- variant?: 'line' | 'enclosed' | 'soft-rounded' | 'solid-rounded'
1722
- size?: Size
1769
+ interface RadioClassOptions {
1770
+ error?: boolean
1723
1771
  }
1724
1772
  ```
1725
1773
 
1726
- #### `TabsProps`
1774
+ #### `SwitchClassOptions`
1727
1775
 
1728
- Props for the Tabs component (switchable tabbed content panels).
1776
+ Options for switch class resolution.
1729
1777
 
1730
1778
  ```typescript
1731
- interface TabsProps<T = string> extends BaseProps {
1779
+ interface SwitchClassOptions {
1780
+ size?: Size
1732
1781
  /**
1733
- * Tab items.
1782
+ * Color used for the checked/on track. Reuses the same semantic color
1783
+ * scale as `ButtonClassOptions.color`/`BadgeClassOptions.variant`.
1784
+ * @default 'primary'
1734
1785
  */
1735
- items: TabItem<T>[]
1786
+ color?: ColorVariant
1787
+ }
1788
+ ```
1736
1789
 
1737
- /**
1738
- * Current active tab.
1739
- */
1740
- value?: T
1790
+ #### `LabelClassOptions`
1741
1791
 
1742
- /**
1743
- * Default active tab.
1744
- */
1745
- defaultValue?: T
1792
+ Options for label class resolution.
1746
1793
 
1747
- /**
1748
- * Change handler.
1749
- */
1750
- onChange?: (value: T) => void
1794
+ ```typescript
1795
+ interface LabelClassOptions {
1796
+ required?: boolean
1797
+ }
1798
+ ```
1751
1799
 
1752
- /**
1753
- * Tab variant.
1754
- */
1755
- variant?: 'line' | 'enclosed' | 'soft-rounded' | 'solid-rounded'
1800
+ #### `CardClassOptions`
1756
1801
 
1757
- /**
1758
- * Tab size.
1759
- */
1760
- size?: Size
1802
+ Options for resolving card CSS classes via UIClassMap.
1761
1803
 
1762
- /**
1763
- * Whether tabs are fitted (take full width).
1764
- */
1765
- fitted?: boolean
1804
+ ```typescript
1805
+ interface CardClassOptions {
1806
+ variant?: 'default' | 'elevated' | 'outline' | 'ghost'
1766
1807
  }
1767
1808
  ```
1768
1809
 
1769
- #### `TextareaClassOptions`
1810
+ #### `BadgeClassOptions`
1770
1811
 
1771
- Options for textarea class resolution.
1812
+ Options for resolving badge CSS classes via UIClassMap.
1772
1813
 
1773
1814
  ```typescript
1774
- interface TextareaClassOptions {
1775
- error?: boolean
1776
- /**
1777
- * Text size tier, matching {@link InputClassOptions.size} — a same-`size`
1778
- * input + textarea pair renders identical font sizes. Bonds default to
1779
- * their historic textarea size when omitted.
1780
- */
1815
+ interface BadgeClassOptions {
1816
+ variant?: ColorVariant
1781
1817
  size?: Size
1782
1818
  }
1783
1819
  ```
1784
1820
 
1785
- #### `TextareaElementProps`
1821
+ #### `AlertClassOptions`
1786
1822
 
1787
- Base props for textarea elements.
1823
+ Options for resolving alert CSS classes via UIClassMap.
1788
1824
 
1789
1825
  ```typescript
1790
- interface TextareaElementProps extends HTMLElementProps {
1791
- name?: string
1792
- value?: string
1793
- defaultValue?: string
1794
- placeholder?: string
1795
- required?: boolean
1796
- readOnly?: boolean
1797
- autoFocus?: boolean
1798
- rows?: number
1799
- cols?: number
1800
- maxLength?: number
1801
- minLength?: number
1802
- wrap?: 'hard' | 'soft' | 'off'
1803
- onChange?: ChangeEventHandler
1804
- onInput?: FormEventHandler
1826
+ interface AlertClassOptions {
1827
+ variant?: 'default' | 'info' | 'success' | 'warning' | 'error'
1805
1828
  }
1806
1829
  ```
1807
1830
 
1808
- #### `TextareaProps`
1831
+ #### `AvatarClassOptions`
1809
1832
 
1810
- Props for the Textarea component.
1833
+ Options for resolving avatar CSS classes via UIClassMap.
1811
1834
 
1812
1835
  ```typescript
1813
- interface TextareaProps extends TextareaElementProps {
1814
- /**
1815
- * Text size tier (see {@link TextareaClassOptions.size}) — pass the same
1816
- * `size` as a neighboring Input for identical font sizes.
1817
- */
1836
+ interface AvatarClassOptions {
1818
1837
  size?: Size
1838
+ }
1839
+ ```
1819
1840
 
1820
- /**
1821
- * Label text.
1822
- */
1823
- label?: string
1841
+ #### `ModalClassOptions`
1824
1842
 
1825
- /**
1826
- * Error message.
1827
- */
1828
- error?: string
1843
+ Options for resolving modal/dialog CSS classes via UIClassMap.
1829
1844
 
1830
- /**
1831
- * Hint/help text.
1832
- */
1833
- hint?: string
1845
+ ```typescript
1846
+ interface ModalClassOptions {
1847
+ size?: ModalSize
1848
+ }
1849
+ ```
1834
1850
 
1835
- /**
1836
- * Whether the textarea auto-resizes.
1837
- */
1838
- autoResize?: boolean
1851
+ #### `SpinnerClassOptions`
1839
1852
 
1840
- /**
1841
- * Minimum number of rows.
1842
- */
1843
- minRows?: number
1853
+ Options for resolving spinner CSS classes via UIClassMap.
1844
1854
 
1845
- /**
1846
- * Maximum number of rows.
1847
- */
1848
- maxRows?: number
1855
+ ```typescript
1856
+ interface SpinnerClassOptions {
1857
+ size?: Size
1849
1858
  }
1850
1859
  ```
1851
1860
 
@@ -1859,90 +1868,100 @@ interface ToastClassOptions {
1859
1868
  }
1860
1869
  ```
1861
1870
 
1862
- #### `ToastProps`
1871
+ #### `SeparatorClassOptions`
1863
1872
 
1864
- Props for the Toast/notification component.
1873
+ Options for resolving separator CSS classes via UIClassMap.
1865
1874
 
1866
1875
  ```typescript
1867
- interface ToastProps extends HTMLElementProps {
1868
- /**
1869
- * Toast content.
1870
- */
1871
- children?: Children
1876
+ interface SeparatorClassOptions {
1877
+ orientation?: 'horizontal' | 'vertical'
1878
+ }
1879
+ ```
1872
1880
 
1873
- /**
1874
- * Toast title.
1875
- */
1876
- title?: string
1881
+ #### `AccordionClassOptions`
1877
1882
 
1878
- /**
1879
- * Toast description.
1880
- */
1881
- description?: string
1883
+ Options for resolving accordion CSS classes via UIClassMap.
1882
1884
 
1883
- /**
1884
- * Toast status/type.
1885
- */
1886
- status?: ColorVariant
1885
+ ```typescript
1886
+ interface AccordionClassOptions {
1887
+ variant?: string
1888
+ }
1889
+ ```
1887
1890
 
1888
- /**
1889
- * Duration in milliseconds (0 for persistent).
1890
- */
1891
- duration?: number
1891
+ #### `TabsClassOptions`
1892
1892
 
1893
- /**
1894
- * Whether the toast is dismissible.
1895
- */
1896
- dismissible?: boolean
1893
+ Options for resolving tabs (`tabsList`/`tabsTrigger`/`tabsContent`) CSS
1894
+ classes via UIClassMap. Active vs inactive trigger styling is NOT one of
1895
+ these options — it is expressed as `data-[state=active]` CSS attribute
1896
+ selectors baked into the returned class string, driven by the
1897
+ `data-state="active"|"inactive"` attribute the framework binding already
1898
+ sets on the trigger element (see `@molecule/app-ui-react`'s `Tabs`).
1897
1899
 
1900
+ ```typescript
1901
+ interface TabsClassOptions {
1898
1902
  /**
1899
- * Called when dismissed.
1903
+ * Visual style: underline indicator, bordered/filled boxes, a soft-bg
1904
+ * pill, or a solid-bg pill.
1900
1905
  */
1901
- onDismiss?: () => void
1906
+ variant?: 'line' | 'enclosed' | 'soft-rounded' | 'solid-rounded'
1907
+ size?: Size
1908
+ }
1909
+ ```
1902
1910
 
1903
- /**
1904
- * Toast position.
1905
- */
1906
- position?: 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left'
1911
+ #### `PaginationClassOptions`
1907
1912
 
1908
- /**
1909
- * Accessible label for the close button.
1910
- * @default 'Close'
1911
- */
1912
- closeLabel?: string
1913
+ Options for pagination item class resolution.
1914
+
1915
+ ```typescript
1916
+ interface PaginationClassOptions {
1917
+ active?: boolean
1918
+ size?: Size
1919
+ }
1920
+ ```
1921
+
1922
+ #### `ContainerClassOptions`
1923
+
1924
+ Options for container class resolution.
1925
+
1926
+ ```typescript
1927
+ interface ContainerClassOptions {
1928
+ size?: Size | '2xl' | 'full'
1913
1929
  }
1914
1930
  ```
1915
1931
 
1916
- #### `TooltipProps`
1932
+ #### `FlexClassOptions`
1917
1933
 
1918
- Props for the Tooltip component (hover/focus popover with informational text).
1934
+ Options for flex class resolution.
1919
1935
 
1920
1936
  ```typescript
1921
- interface TooltipProps extends HTMLElementProps {
1922
- /**
1923
- * Tooltip content.
1924
- */
1925
- content: Children
1926
-
1927
- /**
1928
- * Element that triggers the tooltip.
1929
- */
1930
- children: Children
1937
+ interface FlexClassOptions {
1938
+ direction?: 'row' | 'col' | 'row-reverse' | 'col-reverse'
1939
+ align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline'
1940
+ justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'
1941
+ wrap?: 'wrap' | 'nowrap' | 'wrap-reverse'
1942
+ /** Named tokens or Tailwind spacing scale index (e.g. `3` → `gap-3`). */
1943
+ gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number
1944
+ }
1945
+ ```
1931
1946
 
1932
- /**
1933
- * Tooltip placement.
1934
- */
1935
- placement?: TooltipPlacement
1947
+ #### `GridClassOptions`
1936
1948
 
1937
- /**
1938
- * Delay before showing (ms).
1939
- */
1940
- delay?: number
1949
+ Options for grid class resolution.
1941
1950
 
1951
+ ```typescript
1952
+ interface GridClassOptions {
1953
+ cols?: number
1954
+ /** Named tokens or Tailwind spacing scale index (e.g. `10` → `gap-10`). */
1955
+ gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number
1942
1956
  /**
1943
- * Whether the tooltip has an arrow.
1957
+ * Mobile-first responsive collapse. When omitted (the default), a grid of
1958
+ * `cols >= 2` starts at a single column on small screens and steps up to
1959
+ * `cols` at larger breakpoints, so cards don't overflow on mobile. Pass
1960
+ * `false` for a FIXED `cols`-column grid at every viewport width. Ignored
1961
+ * for `cols <= 1` (always single-column) and by ClassMap bonds without a
1962
+ * breakpoint system (e.g. NativeWind).
1944
1963
  */
1945
- hasArrow?: boolean
1964
+ responsive?: boolean
1946
1965
  }
1947
1966
  ```
1948
1967
 
@@ -2200,590 +2219,11 @@ interface UIClassMap {
2200
2219
 
2201
2220
  /** Native select arrow area. */
2202
2221
  selectNative: string
2203
-
2204
- // ---- Label/Form sub-element tokens ----
2205
-
2206
- /** Block label with bottom margin (for use above inputs). */
2207
- labelBlock: string
2208
- /** Form fieldset wrapper. */
2209
- formFieldset: string
2210
- /** Fieldset with display:contents — invisible wrapper for disabled state. */
2211
- formFieldsetContents: string
2212
- /** Form field group wrapper. */
2213
- formField: string
2214
- /** Flex column wrapper around control + error message. */
2215
- formFieldWrapper: string
2216
-
2217
- // ---- Control (Checkbox/Switch/Radio) shared tokens ----
2218
-
2219
- /** Control wrapper label (flex + gap + cursor). */
2220
- controlLabel: string
2221
- /** Inner control container (for checkbox/radio indicator). */
2222
- controlContainer: string
2223
- /** Control label text styling (font size, color, etc.). */
2224
- controlText: string
2225
- /** Disabled state for control wrappers. */
2226
- controlDisabled: string
2227
-
2228
- // ---- Radio group tokens ----
2229
-
2230
- /** Radio group label/legend. */
2231
- radioGroupLabel: string
2232
-
2233
- // ---- Accordion sub-element tokens ----
2234
-
2235
- /** Accordion trigger chevron icon (animated rotation). */
2236
- accordionChevron: string
2237
- /** Accordion trigger base (full-width, left-aligned). */
2238
- accordionTriggerBase: string
2239
-
2240
- // ---- Tabs sub-element tokens ----
2241
-
2242
- /** Tabs list fitted variant (full-width). */
2243
- tabsFitted: string
2244
- /** Tab trigger fitted variant (flex-1). */
2245
- tabTriggerFitted: string
2246
- /** Tab trigger icon spacing. */
2247
- tabTriggerIcon: string
2248
-
2249
- // ---- Pagination tokens ----
2250
-
2251
- /** Pagination button interactive classes (cursor). */
2252
- paginationInteractive: string
2253
-
2254
- // ---- Progress sub-element tokens ----
2255
-
2256
- /** Progress outer wrapper (full-width). */
2257
- progressWrapper: string
2258
- /** Progress label container (flex between). */
2259
- progressLabelContainer: string
2260
- /** Progress label text styling. */
2261
- progressLabelText: string
2262
- /** Progress indeterminate animation. */
2263
- progressIndeterminate: string
2264
-
2265
- // ---- Table sub-element tokens ----
2266
-
2267
- /** Table scrollable wrapper. */
2268
- tableWrapper: string
2269
- /** Table loading overlay. */
2270
- tableLoadingOverlay: string
2271
- /** Table empty state cell. */
2272
- tableEmptyCell: string
2273
- /** Table sort indicator wrapper. */
2274
- tableSortWrapper: string
2275
- /** Table sort icon spacing. */
2276
- tableSortIcon: string
2277
- /** Table striped row. */
2278
- tableRowStriped: string
2279
- /** Table hoverable row. */
2280
- tableRowHoverable: string
2281
- /** Table clickable row. */
2282
- tableRowClickable: string
2283
- /** Table sortable header. */
2284
- tableHeadSortable: string
2285
- /** Table bordered variant. */
2286
- tableBordered: string
2287
-
2288
- // ---- Toast sub-element tokens ----
2289
-
2290
- /** Toast icon wrapper (prevents shrinking). */
2291
- toastIconWrapper: string
2292
- /** Toast content wrapper (fills remaining space). */
2293
- toastContentWrapper: string
2294
-
2295
- // ---- Dropdown sub-element tokens ----
2296
-
2297
- /** Dropdown trigger wrapper. */
2298
- dropdownTrigger: string
2299
- /** Dropdown item icon spacing. */
2300
- dropdownItemIcon: string
2301
- /** Dropdown item label (fills remaining space). */
2302
- dropdownItemLabel: string
2303
- /** Dropdown item shortcut text. */
2304
- dropdownItemShortcut: string
2305
- /** Dropdown item disabled state. */
2306
- dropdownItemDisabled: string
2307
-
2308
- // ---- Tooltip tokens ----
2309
-
2310
- /** Tooltip trigger wrapper. */
2311
- tooltipTrigger: string
2312
-
2313
- // ---- Avatar sub-element tokens ----
2314
-
2315
- /** Avatar initials text styling. */
2316
- avatarInitials: string
2317
- /** Avatar fallback icon sizing. */
2318
- avatarFallbackIcon: string
2319
- /** Avatar square (non-rounded) variant. */
2320
- avatarSquare: string
2321
-
2322
- // ---- Badge tokens ----
2323
-
2324
- /** Badge square (non-rounded) variant. */
2325
- badgeSquare: string
2326
-
2327
- // ---- Skeleton sub-element tokens ----
2328
-
2329
- /** Skeleton text line container. */
2330
- skeletonTextContainer: string
2331
- /** Skeleton circle shape. */
2332
- skeletonCircle: string
2333
- /** Skeleton wave animation variant. */
2334
- skeletonWave: string
2335
- /** Skeleton no-animation variant. */
2336
- skeletonNone: string
2337
-
2338
- // ---- Typography utility tokens ----
2339
-
2340
- /** Right-aligned text. */
2341
- textRight: string
2342
-
2343
- // ---- Theme surface tokens ----
2344
-
2345
- /** Full-page background with default text color (light/dark aware). */
2346
- page: string
2347
- /** Card/panel surface background (light/dark aware). */
2348
- surface: string
2349
- /** Recessed/secondary surface background (e.g. tab bars, inputs, sidebars). */
2350
- surfaceSecondary: string
2351
- /** App header bar: surface + bottom border + subtle shadow. */
2352
- headerBar: string
2353
- /** Right-side drawer panel: fixed, full-height, scrollable. */
2354
- drawer: string
2355
-
2356
- // ---- Text color tokens ----
2357
-
2358
- /** De-emphasized text (e.g. labels, secondary info). */
2359
- textMuted: string
2360
- /** Very subtle text (e.g. footer, icon color). */
2361
- textSubtle: string
2362
- /** Primary brand color text (e.g. links, active labels). */
2363
- textPrimary: string
2364
- /**
2365
- * Readable text colour for content sitting on {@link bgPrimaryContainer}.
2366
- *
2367
- * The counterpart the theme guarantees contrast against — see the note on
2368
- * `bgPrimaryContainer`. Note it is NOT interchangeable with `textPrimary`:
2369
- * some themes build a dark primary container and give this a light value, so
2370
- * pairing it with a light tint inverts the problem (measured at 1.07:1 in one
2371
- * flagship). Always use the two together.
2372
- */
2373
- textOnPrimaryContainer: string
2374
- /** Success state text color. */
2375
- textSuccess: string
2376
- /** Warning state text color. */
2377
- textWarning: string
2378
- /** Error-state text color. */
2379
- textError: string
2380
-
2381
- // ---- Border tokens ----
2382
-
2383
- /** Bottom border in theme border color. */
2384
- borderB: string
2385
- /** Top border in theme border color. */
2386
- borderT: string
2387
- /** Right border in theme border color. */
2388
- borderR: string
2389
- /** Left border in theme border color. */
2390
- borderL: string
2391
- /** All-sides border in theme border color. */
2392
- borderAll: string
2393
- /** Primary-colored bottom border (e.g. active tab indicator). */
2394
- borderBPrimary: string
2395
- /** Primary-colored top border accent (e.g. highlighted pricing card). */
2396
- borderTPrimary: string
2397
-
2398
- // ---- Background utility tokens ----
2399
-
2400
- /** Subtle error background for banners/notifications. */
2401
- bgErrorSubtle: string
2402
- /** Border color used as element background (e.g. resize handles, separators). */
2403
- bgBorder: string
2404
- /** Subtle primary-tinted background (e.g. icon halo, callout banner). */
2405
- bgPrimarySubtle: string
2406
- /**
2407
- * Primary-tinted container background, paired with {@link textOnPrimaryContainer}.
2408
- *
2409
- * Use this pair — never `bgPrimarySubtle` + `textPrimary` — whenever TEXT sits
2410
- * on a primary tint. The brand colour as text on a 10% tint of itself is only
2411
- * legible when the brand is already dark: measured across the flagship themes,
2412
- * an amber brand scores 1.98:1 there and no shade of the hue fixes it, because
2413
- * darkening enough for the tint breaks the button fill it also has to serve.
2414
- * The container pair is defined per theme precisely so both sides move
2415
- * together, and it clears 4.5:1 in 130 of 133 flagship themes.
2416
- */
2417
- bgPrimaryContainer: string
2418
- /** Solid primary background (e.g. CTA fill). */
2419
- bgPrimary: string
2420
- /** Pure white background (uses `--color-surface-container-lowest` if defined). */
2421
- bgWhite: string
2422
-
2423
- // ---- Premium typography utilities ----
2424
-
2425
- /** Italic style for emphasized headlines (e.g. tier name in pricing card). */
2426
- italic: string
2427
- /** ALL CAPS letter transform for eyebrow labels. */
2428
- uppercase: string
2429
- /** Wide letter-spacing for caps eyebrow / button labels. */
2430
- trackingWide: string
2431
-
2432
- // ---- Premium decoration tokens ----
2433
-
2434
- /** Linear gradient using the app's primary color (e.g. hero CTAs). */
2435
- gradientPrimary: string
2436
- /** Soft elevation suitable for "lifted" cards (e.g. popular pricing tier). */
2437
- shadowLifted: string
2438
-
2439
- // ---- Composite style tokens ----
2440
-
2441
- /** Settings section heading (small, muted). */
2442
- sectionHeading: string
2443
- /** Standard form label (block, small, medium weight, bottom margin). */
2444
- formLabel: string
2445
- /** Small form label variant (extra-small, muted). */
2446
- formLabelSmall: string
2447
- /** Inline text link appearance (hover effect). */
2448
- link: string
2449
- /** Rich text / long-form prose content. */
2450
- prose: string
2451
- /** Thin horizontal divider line. */
2452
- dividerLine: string
2453
- /** Modal overlay backdrop. */
2454
- overlay: string
2455
- /** Fixed bottom footer bar. */
2456
- footerBar: string
2457
- /** Footer link styling (muted, hover highlight). */
2458
- footerLink: string
2459
- /** Footer button styling (borderless, muted, hover highlight). */
2460
- footerButton: string
2461
-
2462
- // ---- Language selector tokens ----
2463
-
2464
- /** Language selector grid container (responsive columns, scrollable). */
2465
- languageGrid: string
2466
- /** Language option item (default/inactive state). */
2467
- languageOption: string
2468
- /** Language option item (active/selected state). */
2469
- languageActive: string
2470
- /** Trigger button for `<LanguagePicker />` (globe icon + current locale name). */
2471
- languagePickerTrigger: string
2472
-
2473
- // ---- Spacing utilities ----
2474
-
2475
- /**
2476
- * Returns a spacing class for the given property and scale.
2477
- */
2478
- sp(property: SpacingProperty, scale: SpacingScale): string
2479
- /**
2480
- * Returns a style object resolved from a compound spacing spec.
2481
- * Use on the `style` prop — avoids CSS class ordering conflicts entirely.
2482
- * More specific properties override less specific ones (e.g. `pr` overrides `px` overrides `p`).
2483
- */
2484
- sp(overrides: SpacingOverrides): Record<string, string>
2485
- /**
2486
- * Returns vertical space-between class (e.g. `space-y-*` in Tailwind).
2487
- */
2488
- stack(scale: SpacingScale): string
2489
-
2490
- // ---- Typography utilities ----
2491
-
2492
- /**
2493
- * Returns font size class for the given scale.
2494
- */
2495
- textSize(size: TextScale): string
2496
- /**
2497
- * Returns font weight class for the given weight.
2498
- */
2499
- fontWeight(weight: FontWeightScale): string
2500
- /** Center-aligned text. */
2501
- textCenter: string
2502
-
2503
- // ---- Sizing utilities ----
2504
-
2505
- /**
2506
- * Returns width class — fractional (`'1/2'`), keyword (`'full'`), or numeric.
2507
- */
2508
- w(value: WidthValue | number): string
2509
- /**
2510
- * Returns height class — keyword (`'full'`, `'screen'`) or numeric.
2511
- */
2512
- h(value: HeightValue | number): string
2513
- /**
2514
- * Returns minimum height class.
2515
- */
2516
- minH(value: HeightValue): string
2517
- /**
2518
- * Returns maximum width constraint class.
2519
- */
2520
- maxW(value: MaxWidthScale): string
2521
- /** Prevent flex shrinking. */
2522
- shrink0: string
2523
-
2524
- // ---- Touch / pointer utilities ----
2525
-
2526
- /**
2527
- * Minimum interactive hit-area for touch (coarse-pointer) devices — WCAG 2.5.5
2528
- * "Target Size". Resolves to a `>=44x44px` minimum that applies ONLY on
2529
- * coarse-pointer devices, so fine-pointer (mouse) layouts keep their compact
2530
- * control sizing. Compose onto small icon buttons/controls that would otherwise
2531
- * be too small to tap reliably on phones/tablets (e.g. the preview toolbar's
2532
- * back/forward/refresh/open and device-frame buttons). On React Native (touch
2533
- * by definition) the bond applies the minimum unconditionally.
2534
- */
2535
- touchTarget: string
2536
-
2537
- /**
2538
- * Compact coarse-pointer hit-area floor (`>=36x36px`) for inline CTAs inside
2539
- * dense surfaces — banner/notice-card action buttons, chat-card actions —
2540
- * where the full 44px {@link touchTarget} visibly overwhelms the strip or
2541
- * card that hosts them. 36px is still comfortably tappable; reserve the full
2542
- * 44px floor for standalone controls. Like {@link touchTarget} it applies
2543
- * only on coarse-pointer devices (unconditionally on React Native).
2544
- */
2545
- touchTargetCompact: string
2546
-
2547
- // ---- Position utilities ----
2548
-
2549
- // ---- Display utilities ----
2550
-
2551
- /** Block display. */
2552
- displayBlock: string
2553
- /** Inline-block display. */
2554
- displayInlineBlock: string
2555
- /** Contents display (invisible wrapper). */
2556
- displayContents: string
2557
- /**
2558
- * Hidden on viewports NARROWER than the breakpoint; the element keeps its
2559
- * own display from the breakpoint up. Pair with {@link UIClassMap.hiddenFrom}
2560
- * to swap a desktop surface (a side column) for a phone one (a bottom bar)
2561
- * in CSS alone — correct in server-rendered HTML before any JavaScript runs.
2562
- */
2563
- hiddenBelow(breakpoint: ResponsiveBreakpoint): string
2564
- /** Hidden on viewports AT OR WIDER than the breakpoint (the phone-only half of the pair). */
2565
- hiddenFrom(breakpoint: ResponsiveBreakpoint): string
2566
-
2567
- // ---- Layout utilities ----
2568
-
2569
- /** Horizontal auto margin (centering). */
2570
- mxAuto: string
2571
- /** Pointer cursor. */
2572
- cursorPointer: string
2573
- /** Full border radius (circle). */
2574
- roundedFull: string
2575
-
2576
- // ---- Grid utilities ----
2577
-
2578
- /**
2579
- * Returns grid-template-rows class for the given row count.
2580
- */
2581
- gridRows(rows: number): string
2582
-
2583
- // ---- Position utilities ----
2584
-
2585
- /**
2586
- * Returns CSS position class for the given value.
2587
- */
2588
- position(value: 'relative' | 'absolute' | 'fixed' | 'sticky'): string
2589
- /** Full inset (inset: 0). */
2590
- inset0: string
2591
-
2592
- // ---- Logo / brand identity tokens ----
2593
-
2594
- /** Logo wordmark text styling (size, tracking, case). */
2595
- logoText: string
2596
- /** Logo icon color (primary brand color). */
2597
- logoIcon: string
2598
-
2599
- // ---- Header layout tokens ----
2600
-
2601
- /** Fixed header positioning (fixed, full-width, high z-index). */
2602
- headerFixed: string
2603
- /** Main header inner container (max-width, height, padding). */
2604
- headerInner: string
2605
-
2606
- // ---- Auth page layout tokens ----
2607
-
2608
- /** Auth page header inner container (full-width, no max-width). */
2609
- authHeaderInner: string
2610
- /** Auth page body: centered content area. */
2611
- authPageBody: string
2612
- /** Auth form narrow container (max-width, centered). */
2613
- authFormWrapper: string
2614
- /** Auth form field spacing (bottom margin). */
2615
- authField: string
2616
- /** Spacing after auth submit area (top margin). */
2617
- authAfterSubmit: string
2618
-
2619
- // ---- Auth button layout tokens ----
2620
-
2621
- /** Flex row container for auth form buttons. */
2622
- authButtonRow: string
2623
- /** Back button sizing in auth forms. */
2624
- authBackButton: string
2625
- /** Submit button sizing next to back button. */
2626
- authSubmitButton: string
2627
- /** Login page signup button (half-width, left). */
2628
- authLoginSignup: string
2629
- /** Login page submit button (half-width, right). */
2630
- authLoginSubmit: string
2631
- /** Login submit full-width (when logging in). */
2632
- authLoginSubmitFull: string
2633
- /** Hidden state for login signup button. */
2634
- authHidden: string
2635
- /** Forward arrow icon spacing. */
2636
- authArrowIcon: string
2637
-
2638
- // ---- App layout tokens ----
2639
-
2640
- /** Main app content padding (header/footer offsets). */
2641
- appLayout: string
2642
-
2643
- /** Flex grow to fill available space (`flex: 1`). */
2644
- flex1: string
2645
-
2646
- // ---- OAuth tokens ----
2647
-
2648
- /** OAuth provider name label (fallback when no icon). */
2649
- oauthProviderLabel: string
2650
-
2651
- // ---- Layout pattern tokens ----
2652
-
2653
- /** PageShell root container (flex, full screen). */
2654
- pageShell: string
2655
- /** PageShell sidebar panel. */
2656
- pageShellSidebar: string
2657
- /** PageShell sidebar collapsed state (narrow width). */
2658
- pageShellSidebarCollapsed: string
2659
- /** PageShell top bar strip. */
2660
- pageShellTopbar: string
2661
- /** PageShell main content area (scrollable). */
2662
- pageShellContent: string
2663
- /** PageShell sidebar toggle button. */
2664
- pageShellSidebarToggle: string
2665
- /** EmptyState root container (centered column). */
2666
- emptyState: string
2667
- /** EmptyState icon/illustration wrapper. */
2668
- emptyStateIcon: string
2669
- /** EmptyState heading text. */
2670
- emptyStateTitle: string
2671
- /** EmptyState description text. */
2672
- emptyStateDescription: string
2673
- /** EmptyState action slot. */
2674
- emptyStateAction: string
2675
- /** PageHeader root container. */
2676
- pageHeader: string
2677
- /** PageHeader title text. */
2678
- pageHeaderTitle: string
2679
- /** PageHeader description text. */
2680
- pageHeaderDescription: string
2681
- /** PageHeader action buttons container. */
2682
- pageHeaderActions: string
2683
- /** PageHeader breadcrumb trail container. */
2684
- pageHeaderBreadcrumbs: string
2685
- /** PageHeader breadcrumb item link/text. */
2686
- pageHeaderBreadcrumbItem: string
2687
- /** PageHeader breadcrumb separator character. */
2688
- pageHeaderBreadcrumbSeparator: string
2689
-
2690
- // ---- Search UI tokens (SearchBox, SearchResults, QuickSearch) ----
2691
-
2692
- /** SearchBox field: the bordered bar holding the icon, the input and its actions; focus ring via focus-within. */
2693
- searchField: string
2694
- /** SearchBox leading icon slot. */
2695
- searchFieldIcon: string
2696
- /** SearchBox text input: borderless, fills the bar, left-aligned, visible placeholder. */
2697
- searchFieldInput: string
2698
- /** SearchBox trailing slot: the clear button and the shortcut hint. */
2699
- searchFieldActions: string
2700
- /** SearchBox icon-only clear button. */
2701
- searchFieldClear: string
2702
- /** SearchBox status row under the field: filter chips at the left, the count and tips at the right. */
2703
- searchStatusRow: string
2704
- /** SearchBox syntax tips line. */
2705
- searchTips: string
2706
- /** A key cap (`/`, `↵`). */
2707
- kbd: string
2708
- /** A removable filter chip (`category: auth ×`). */
2709
- filterChip: string
2710
- /** Added to a filter chip that EXCLUDES its value. */
2711
- filterChipNegated: string
2712
- /** The × inside a filter chip. */
2713
- filterChipRemove: string
2714
- /** SearchResults list container: bordered, rows divided. */
2715
- resultList: string
2716
- /** One result row. */
2717
- resultItem: string
2718
- /** Added to the keyboard- or pointer-active result row. */
2719
- resultItemActive: string
2720
- /** A result row's body: the link that fills the row. */
2721
- resultBody: string
2722
- /** A result row's title. */
2723
- resultTitle: string
2724
- /** Added to a result title that is code (a package name). */
2725
- resultTitleMono: string
2726
- /** A result row's meta line (type · category · related). */
2727
- resultMeta: string
2728
- /** A result row's description, clamped to two lines. */
2729
- resultDescription: string
2730
- /** A matched term inside a result. */
2731
- resultMark: string
2732
- /** A result row's trailing action slot. */
2733
- resultAction: string
2734
- /** A results empty state. */
2735
- resultEmpty: string
2736
- }
2737
- ```
2738
-
2739
- #### `UIProvider`
2740
-
2741
- Identifies the bonded UI styling library. Providers set `name`
2742
- to indicate which library is active (e.g. `"tailwind"`, `"bootstrap"`).
2743
-
2744
- ```typescript
2745
- interface UIProvider {
2746
- /**
2747
- * Identifier for the styling library (e.g. `"tailwind"`, `"ionic"`).
2748
- */
2749
- name: string
2750
- }
2222
+ // … truncated — the full declaration is in node_modules/@molecule/app-ui/dist/types.d.ts
2751
2223
  ```
2752
2224
 
2753
2225
  ### Types
2754
2226
 
2755
- #### `AccentTone`
2756
-
2757
- Tones of an accent bar: the semantic colors, the brand primary, or `custom` (the `--mol-accent` variable).
2758
-
2759
- ```typescript
2760
- type AccentTone = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'error' | 'custom'
2761
- ```
2762
-
2763
- #### `ButtonSize`
2764
-
2765
- Button size variants (extends Size with 'icon' for square icon-only buttons).
2766
-
2767
- ```typescript
2768
- type ButtonSize = Size | 'icon'
2769
- ```
2770
-
2771
- #### `ButtonVariant`
2772
-
2773
- Button visual variant styles.
2774
-
2775
- ```typescript
2776
- type ButtonVariant = 'solid' | 'outline' | 'ghost' | 'link'
2777
- ```
2778
-
2779
- #### `ChangeEventHandler`
2780
-
2781
- Framework-agnostic change event handler.
2782
-
2783
- ```typescript
2784
- type ChangeEventHandler = EventHandler<Event>
2785
- ```
2786
-
2787
2227
  #### `Children`
2788
2228
 
2789
2229
  Framework-agnostic child content.
@@ -2793,48 +2233,30 @@ Use `unknown` to allow any framework's node type (ReactNode, VNode, etc.).
2793
2233
  type Children = unknown
2794
2234
  ```
2795
2235
 
2796
- #### `ClassMapOverrides`
2797
-
2798
- Overrides for extending a UIClassMap.
2236
+ #### `EventHandler`
2799
2237
 
2800
- Can be a partial map of token replacements, or a function that receives
2801
- the base ClassMap and returns overrides (useful for extending resolver
2802
- functions while preserving the base behavior).
2238
+ Framework-agnostic event handler.
2803
2239
 
2804
2240
  ```typescript
2805
- type ClassMapOverrides = Partial<UIClassMap> | ((base: UIClassMap) => Partial<UIClassMap>)
2241
+ type EventHandler<E = Event> = (event: E) => void
2806
2242
  ```
2807
2243
 
2808
- #### `ClassMapValue`
2809
-
2810
- Class value types accepted by the UIClassMap `cn()` function.
2811
- Supports strings, booleans, arrays, and conditional objects.
2812
-
2813
- ```typescript
2814
- type ClassMapValue =
2815
- | string
2816
- | number
2817
- | boolean
2818
- | undefined
2819
- | null
2820
- | ClassMapValue[]
2821
- | Record<string, boolean | undefined | null>
2822
- ```
2244
+ - `event` — The DOM event object.
2823
2245
 
2824
- #### `ColorVariant`
2246
+ #### `MouseEventHandler`
2825
2247
 
2826
- Semantic color variants used across components for status indication.
2248
+ Framework-agnostic mouse event handler.
2827
2249
 
2828
2250
  ```typescript
2829
- type ColorVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info'
2251
+ type MouseEventHandler = EventHandler<MouseEvent>
2830
2252
  ```
2831
2253
 
2832
- #### `EventHandler`
2254
+ #### `KeyboardEventHandler`
2833
2255
 
2834
- Framework-agnostic event handler.
2256
+ Framework-agnostic keyboard event handler.
2835
2257
 
2836
2258
  ```typescript
2837
- type EventHandler<E = Event> = (event: E) => void
2259
+ type KeyboardEventHandler = EventHandler<KeyboardEvent>
2838
2260
  ```
2839
2261
 
2840
2262
  #### `FocusEventHandler`
@@ -2845,12 +2267,12 @@ Framework-agnostic focus event handler.
2845
2267
  type FocusEventHandler = EventHandler<FocusEvent>
2846
2268
  ```
2847
2269
 
2848
- #### `FontWeightScale`
2270
+ #### `ChangeEventHandler`
2849
2271
 
2850
- Font weight scale.
2272
+ Framework-agnostic change event handler.
2851
2273
 
2852
2274
  ```typescript
2853
- type FontWeightScale = 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold'
2275
+ type ChangeEventHandler = EventHandler<Event>
2854
2276
  ```
2855
2277
 
2856
2278
  #### `FormEventHandler`
@@ -2861,62 +2283,54 @@ Framework-agnostic form event handler.
2861
2283
  type FormEventHandler = EventHandler<Event>
2862
2284
  ```
2863
2285
 
2864
- #### `HeightValue`
2286
+ #### `Size`
2865
2287
 
2866
- Height value — fractional, keyword, or numeric (mapped to spacing scale).
2288
+ Standard size scale used across all molecule UI components (buttons, inputs, badges, etc.).
2867
2289
 
2868
2290
  ```typescript
2869
- type HeightValue =
2870
- 'full' | 'screen' | 'auto' | '1/2' | '1/3' | '2/3' | '1/4' | '3/4' | TailwindArbitraryBracket
2291
+ type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
2871
2292
  ```
2872
2293
 
2873
- #### `InputType`
2294
+ #### `ButtonSize`
2874
2295
 
2875
- Allowed HTML input type attribute values for the Input component.
2296
+ Button size variants (extends Size with 'icon' for square icon-only buttons).
2876
2297
 
2877
2298
  ```typescript
2878
- type InputType =
2879
- | 'text'
2880
- | 'email'
2881
- | 'password'
2882
- | 'number'
2883
- | 'tel'
2884
- | 'url'
2885
- | 'search'
2886
- | 'date'
2887
- | 'time'
2888
- | 'datetime-local'
2299
+ type ButtonSize = Size | 'icon'
2889
2300
  ```
2890
2301
 
2891
- #### `KeyboardEventHandler`
2302
+ #### `ColorVariant`
2892
2303
 
2893
- Framework-agnostic keyboard event handler.
2304
+ Semantic color variants used across components for status indication.
2894
2305
 
2895
2306
  ```typescript
2896
- type KeyboardEventHandler = EventHandler<KeyboardEvent>
2307
+ type ColorVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info'
2897
2308
  ```
2898
2309
 
2899
- #### `MaxWidthScale`
2310
+ #### `ButtonVariant`
2900
2311
 
2901
- Max-width scale for constraining content.
2312
+ Button visual variant styles.
2902
2313
 
2903
2314
  ```typescript
2904
- type MaxWidthScale =
2905
- | 'none'
2906
- | 'xs'
2907
- | 'sm'
2908
- | 'md'
2909
- | 'lg'
2910
- | 'xl'
2911
- | '2xl'
2912
- | '3xl'
2913
- | '4xl'
2914
- | '5xl'
2915
- | '6xl'
2916
- | '7xl'
2917
- | 'full'
2918
- | 'screen-2xl'
2919
- | TailwindArbitraryBracket
2315
+ type ButtonVariant = 'solid' | 'outline' | 'ghost' | 'link'
2316
+ ```
2317
+
2318
+ #### `InputType`
2319
+
2320
+ Allowed HTML input type attribute values for the Input component.
2321
+
2322
+ ```typescript
2323
+ type InputType =
2324
+ | 'text'
2325
+ | 'email'
2326
+ | 'password'
2327
+ | 'number'
2328
+ | 'tel'
2329
+ | 'url'
2330
+ | 'search'
2331
+ | 'date'
2332
+ | 'time'
2333
+ | 'datetime-local'
2920
2334
  ```
2921
2335
 
2922
2336
  #### `ModalSize`
@@ -2927,45 +2341,46 @@ Modal size variants including full-screen.
2927
2341
  type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'full'
2928
2342
  ```
2929
2343
 
2930
- #### `MouseEventHandler`
2344
+ #### `TooltipPlacement`
2931
2345
 
2932
- Framework-agnostic mouse event handler.
2346
+ Position where a tooltip renders relative to its trigger element (top, bottom, left, right, and corner variants).
2933
2347
 
2934
2348
  ```typescript
2935
- type MouseEventHandler = EventHandler<MouseEvent>
2349
+ type TooltipPlacement =
2350
+ 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end'
2936
2351
  ```
2937
2352
 
2938
- #### `ResponsiveBreakpoint`
2353
+ #### `ClassMapValue`
2939
2354
 
2940
- Viewport breakpoints for responsive visibility (`hiddenBelow`/`hiddenFrom`):
2941
- `sm` ≈ 640px, `md` ≈ 768px, `lg` ≈ 1024px, `xl` ≈ 1280px (each ClassMap
2942
- bond maps them to its own breakpoints).
2355
+ Class value types accepted by the UIClassMap `cn()` function.
2356
+ Supports strings, booleans, arrays, and conditional objects.
2943
2357
 
2944
2358
  ```typescript
2945
- type ResponsiveBreakpoint = 'sm' | 'md' | 'lg' | 'xl'
2359
+ type ClassMapValue =
2360
+ | string
2361
+ | number
2362
+ | boolean
2363
+ | undefined
2364
+ | null
2365
+ | ClassMapValue[]
2366
+ | Record<string, boolean | undefined | null>
2946
2367
  ```
2947
2368
 
2948
- #### `Size`
2369
+ #### `SpacingScale`
2949
2370
 
2950
- Standard size scale used across all molecule UI components (buttons, inputs, badges, etc.).
2371
+ Abstract spacing scale. Each styling library maps these to its own units.
2372
+ For Tailwind: 0 → 0, 1 → 0.25rem, 4 → 1rem, 8 → 2rem, etc.
2951
2373
 
2952
2374
  ```typescript
2953
- type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
2375
+ type SpacingScale = 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24
2954
2376
  ```
2955
2377
 
2956
- #### `SpacingOverrides`
2957
-
2958
- Compound spacing specification for conflict-free overrides.
2959
-
2960
- Pass to `sp()` to get a style object (for use on the `style` prop).
2961
- More specific properties override less specific ones:
2962
- `pr` overrides `px` overrides `p` (same cascade as CSS shorthand).
2378
+ #### `TailwindArbitraryBracket`
2963
2379
 
2964
- Returns `Record<string, string>` so it is compatible with any framework's
2965
- inline style API without requiring a React-specific import.
2380
+ Tailwind arbitrary value in bracket notation (e.g. `[440px]`, `[65%]`).
2966
2381
 
2967
2382
  ```typescript
2968
- type SpacingOverrides = Partial<Record<SpacingProperty, SpacingScale>>
2383
+ type TailwindArbitraryBracket = `[${string}]`
2969
2384
  ```
2970
2385
 
2971
2386
  #### `SpacingProperty`
@@ -2977,21 +2392,29 @@ type SpacingProperty =
2977
2392
  'p' | 'px' | 'py' | 'pt' | 'pb' | 'pl' | 'pr' | 'm' | 'mx' | 'my' | 'mt' | 'mb' | 'ml' | 'mr'
2978
2393
  ```
2979
2394
 
2980
- #### `SpacingScale`
2395
+ #### `SpacingOverrides`
2981
2396
 
2982
- Abstract spacing scale. Each styling library maps these to its own units.
2983
- For Tailwind: 0 → 0, 1 → 0.25rem, 4 → 1rem, 8 → 2rem, etc.
2397
+ Compound spacing specification for conflict-free overrides.
2398
+
2399
+ Pass to `sp()` to get a style object (for use on the `style` prop).
2400
+ More specific properties override less specific ones:
2401
+ `pr` overrides `px` overrides `p` (same cascade as CSS shorthand).
2402
+
2403
+ Returns `Record<string, string>` so it is compatible with any framework's
2404
+ inline style API without requiring a React-specific import.
2984
2405
 
2985
2406
  ```typescript
2986
- type SpacingScale = 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24
2407
+ type SpacingOverrides = Partial<Record<SpacingProperty, SpacingScale>>
2987
2408
  ```
2988
2409
 
2989
- #### `TailwindArbitraryBracket`
2410
+ #### `ResponsiveBreakpoint`
2990
2411
 
2991
- Tailwind arbitrary value in bracket notation (e.g. `[440px]`, `[65%]`).
2412
+ Viewport breakpoints for responsive visibility (`hiddenBelow`/`hiddenFrom`):
2413
+ `sm` ≈ 640px, `md` ≈ 768px, `lg` ≈ 1024px, `xl` ≈ 1280px (each ClassMap
2414
+ bond maps them to its own breakpoints).
2992
2415
 
2993
2416
  ```typescript
2994
- type TailwindArbitraryBracket = `[${string}]`
2417
+ type ResponsiveBreakpoint = 'sm' | 'md' | 'lg' | 'xl'
2995
2418
  ```
2996
2419
 
2997
2420
  #### `TextScale`
@@ -3002,21 +2425,35 @@ Text size scale from extra-small to 4xl.
3002
2425
  type TextScale = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl'
3003
2426
  ```
3004
2427
 
3005
- #### `ToastPosition`
2428
+ #### `FontWeightScale`
3006
2429
 
3007
- Toast position values for screen placement.
2430
+ Font weight scale.
3008
2431
 
3009
2432
  ```typescript
3010
- type ToastPosition = 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left'
2433
+ type FontWeightScale = 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold'
3011
2434
  ```
3012
2435
 
3013
- #### `TooltipPlacement`
2436
+ #### `MaxWidthScale`
3014
2437
 
3015
- Position where a tooltip renders relative to its trigger element (top, bottom, left, right, and corner variants).
2438
+ Max-width scale for constraining content.
3016
2439
 
3017
2440
  ```typescript
3018
- type TooltipPlacement =
3019
- 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end'
2441
+ type MaxWidthScale =
2442
+ | 'none'
2443
+ | 'xs'
2444
+ | 'sm'
2445
+ | 'md'
2446
+ | 'lg'
2447
+ | 'xl'
2448
+ | '2xl'
2449
+ | '3xl'
2450
+ | '4xl'
2451
+ | '5xl'
2452
+ | '6xl'
2453
+ | '7xl'
2454
+ | 'full'
2455
+ | 'screen-2xl'
2456
+ | TailwindArbitraryBracket
3020
2457
  ```
3021
2458
 
3022
2459
  #### `WidthValue`
@@ -3037,78 +2474,44 @@ type WidthValue =
3037
2474
  | TailwindArbitraryBracket
3038
2475
  ```
3039
2476
 
3040
- ### Functions
3041
-
3042
- #### `extendClassMap(base, overrides)`
3043
-
3044
- Creates a new UIClassMap by extending a base ClassMap with overrides.
3045
-
3046
- Overrides can be a plain object (for replacing specific tokens/resolvers)
3047
- or a function that receives the base map (for extending resolvers while
3048
- preserving base behavior).
3049
-
3050
- ```typescript
3051
- function extendClassMap(base: UIClassMap, overrides: ClassMapOverrides): UIClassMap
3052
- ```
3053
-
3054
- - `base` — The base UIClassMap to extend
3055
- - `overrides` — Token overrides (object or function returning object)
3056
-
3057
- **Returns:** A new UIClassMap with overrides applied
3058
-
3059
- #### `getClassMap()`
3060
-
3061
- Retrieves the bonded UIClassMap, throwing if none is configured.
3062
- Use this to resolve styling-agnostic class names in components.
3063
-
3064
- ```typescript
3065
- function getClassMap(): UIClassMap
3066
- ```
3067
-
3068
- **Returns:** The bonded UIClassMap implementation.
3069
-
3070
- #### `getProvider()`
2477
+ #### `HeightValue`
3071
2478
 
3072
- Retrieves the bonded UI provider, or `undefined` if none is configured.
2479
+ Height value — fractional, keyword, or numeric (mapped to spacing scale).
3073
2480
 
3074
2481
  ```typescript
3075
- function getProvider(): UIProvider | undefined
2482
+ type HeightValue =
2483
+ 'full' | 'screen' | 'auto' | '1/2' | '1/3' | '2/3' | '1/4' | '3/4' | TailwindArbitraryBracket
3076
2484
  ```
3077
2485
 
3078
- **Returns:** The bonded UI provider, or `undefined`.
3079
-
3080
- #### `hasClassMap()`
2486
+ #### `ToastPosition`
3081
2487
 
3082
- Checks whether a UIClassMap is currently bonded.
2488
+ Toast position values for screen placement.
3083
2489
 
3084
2490
  ```typescript
3085
- function hasClassMap(): boolean
2491
+ type ToastPosition = 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left'
3086
2492
  ```
3087
2493
 
3088
- **Returns:** `true` if a UIClassMap is bonded.
3089
-
3090
- #### `hasProvider()`
2494
+ #### `AccentTone`
3091
2495
 
3092
- Checks whether a UI provider is currently bonded.
2496
+ Tones of an accent bar: the semantic colors, the brand primary, or `custom` (the `--mol-accent` variable).
3093
2497
 
3094
2498
  ```typescript
3095
- function hasProvider(): boolean
2499
+ type AccentTone = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'error' | 'custom'
3096
2500
  ```
3097
2501
 
3098
- **Returns:** `true` if a UI provider is bonded.
2502
+ #### `ClassMapOverrides`
3099
2503
 
3100
- #### `moleculeSpinnerMarkSvg(options)`
2504
+ Overrides for extending a UIClassMap.
3101
2505
 
3102
- The molecule spinner mark as a complete SVG element string (SMIL-animated,
3103
- framework-agnostic). See the module docblock for usage and gotchas.
2506
+ Can be a partial map of token replacements, or a function that receives
2507
+ the base ClassMap and returns overrides (useful for extending resolver
2508
+ functions while preserving the base behavior).
3104
2509
 
3105
2510
  ```typescript
3106
- function moleculeSpinnerMarkSvg(options?: MoleculeSpinnerMarkOptions): string
2511
+ type ClassMapOverrides = Partial<UIClassMap> | ((base: UIClassMap) => Partial<UIClassMap>)
3107
2512
  ```
3108
2513
 
3109
- - `options` — Paint, timings, size, gradient id and a11y shape.
3110
-
3111
- **Returns:** A `<svg>…</svg>` markup string.
2514
+ ### Functions
3112
2515
 
3113
2516
  #### `molId(component, context, qualifier)`
3114
2517
 
@@ -3161,6 +2564,36 @@ function molSelectorPrefix(prefix: string): string
3161
2564
 
3162
2565
  **Returns:** A CSS attribute prefix selector string.
3163
2566
 
2567
+ #### `setProvider(provider)`
2568
+
2569
+ Registers a UI provider as the active singleton.
2570
+
2571
+ ```typescript
2572
+ function setProvider(provider: UIProvider): void
2573
+ ```
2574
+
2575
+ - `provider` — The UI provider implementation to bond.
2576
+
2577
+ #### `getProvider()`
2578
+
2579
+ Retrieves the bonded UI provider, or `undefined` if none is configured.
2580
+
2581
+ ```typescript
2582
+ function getProvider(): UIProvider | undefined
2583
+ ```
2584
+
2585
+ **Returns:** The bonded UI provider, or `undefined`.
2586
+
2587
+ #### `hasProvider()`
2588
+
2589
+ Checks whether a UI provider is currently bonded.
2590
+
2591
+ ```typescript
2592
+ function hasProvider(): boolean
2593
+ ```
2594
+
2595
+ **Returns:** `true` if a UI provider is bonded.
2596
+
3164
2597
  #### `setClassMap(classMap)`
3165
2598
 
3166
2599
  Registers a UIClassMap as the active styling resolver. Called at
@@ -3172,15 +2605,56 @@ function setClassMap(classMap: UIClassMap): void
3172
2605
 
3173
2606
  - `classMap` — The UIClassMap implementation to bond.
3174
2607
 
3175
- #### `setProvider(provider)`
2608
+ #### `getClassMap()`
3176
2609
 
3177
- Registers a UI provider as the active singleton.
2610
+ Retrieves the bonded UIClassMap, throwing if none is configured.
2611
+ Use this to resolve styling-agnostic class names in components.
3178
2612
 
3179
2613
  ```typescript
3180
- function setProvider(provider: UIProvider): void
2614
+ function getClassMap(): UIClassMap
3181
2615
  ```
3182
2616
 
3183
- - `provider` — The UI provider implementation to bond.
2617
+ **Returns:** The bonded UIClassMap implementation.
2618
+
2619
+ #### `hasClassMap()`
2620
+
2621
+ Checks whether a UIClassMap is currently bonded.
2622
+
2623
+ ```typescript
2624
+ function hasClassMap(): boolean
2625
+ ```
2626
+
2627
+ **Returns:** `true` if a UIClassMap is bonded.
2628
+
2629
+ #### `moleculeSpinnerMarkSvg(options)`
2630
+
2631
+ The molecule spinner mark as a complete SVG element string (SMIL-animated,
2632
+ framework-agnostic). See the module docblock for usage and gotchas.
2633
+
2634
+ ```typescript
2635
+ function moleculeSpinnerMarkSvg(options?: MoleculeSpinnerMarkOptions): string
2636
+ ```
2637
+
2638
+ - `options` — Paint, timings, size, gradient id and a11y shape.
2639
+
2640
+ **Returns:** A `<svg>…</svg>` markup string.
2641
+
2642
+ #### `extendClassMap(base, overrides)`
2643
+
2644
+ Creates a new UIClassMap by extending a base ClassMap with overrides.
2645
+
2646
+ Overrides can be a plain object (for replacing specific tokens/resolvers)
2647
+ or a function that receives the base map (for extending resolvers while
2648
+ preserving base behavior).
2649
+
2650
+ ```typescript
2651
+ function extendClassMap(base: UIClassMap, overrides: ClassMapOverrides): UIClassMap
2652
+ ```
2653
+
2654
+ - `base` — The base UIClassMap to extend
2655
+ - `overrides` — Token overrides (object or function returning object)
2656
+
2657
+ **Returns:** A new UIClassMap with overrides applied
3184
2658
 
3185
2659
  ### Constants
3186
2660
 
@@ -3228,6 +2702,9 @@ the ClassMap bond (`@molecule/app-ui-tailwind`), so swapping the styling library
3228
2702
  only the bond — a literal `"flex p-4"` in a component defeats that and is the #1 styling
3229
2703
  mistake.
3230
2704
 
2705
+ - **`Button` defaults to `type="button"`.** A form's primary action needs
2706
+ `type="submit"`, or Enter does nothing and tests that select `button[type="submit"]`
2707
+ miss it (X1 RealWorld runs failed 15 browser tests on one Settings button).
3231
2708
  - **Inline styles must not fight ClassMap.** An inline `style` has higher specificity and
3232
2709
  SILENTLY overrides the class controlling the same property (e.g. `style={{ background }}`
3233
2710
  kills `cm.surface`). Use inline only for what ClassMap can't express (a specific pixel