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