@molecule/app-ui-react 3.0.3 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-10-29T17:16:41.257Z
6
+ Generated: 2026-11-08T06:24:52.872Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-ui-react
@@ -87,14 +87,17 @@ interface BaseProps {
87
87
  * Additional CSS class name(s).
88
88
  */
89
89
  className?: string
90
+
90
91
  /**
91
92
  * Inline styles.
92
93
  */
93
94
  style?: CSSProperties
95
+
94
96
  /**
95
97
  * Test ID for automated testing.
96
98
  */
97
99
  testId?: string
100
+
98
101
  /**
99
102
  * Automation ID for AI agents and E2E tests. Maps to the `data-mol-id`
100
103
  * HTML attribute. Use `molId()` from `./automation.js` to generate
@@ -102,6 +105,7 @@ interface BaseProps {
102
105
  * attributes; accessible names come from labels/`aria-*`.)
103
106
  */
104
107
  automationId?: string
108
+
105
109
  /**
106
110
  * Whether the component is disabled.
107
111
  */
@@ -250,34 +254,42 @@ interface ButtonProps extends ButtonElementProps {
250
254
  * Button content.
251
255
  */
252
256
  children?: Children
257
+
253
258
  /**
254
259
  * Visual variant.
255
260
  */
256
261
  variant?: ButtonVariant
262
+
257
263
  /**
258
264
  * Color scheme.
259
265
  */
260
266
  color?: ColorVariant
267
+
261
268
  /**
262
269
  * Button size.
263
270
  */
264
271
  size?: ButtonSize
272
+
265
273
  /**
266
274
  * Whether the button is in a loading state.
267
275
  */
268
276
  loading?: boolean
277
+
269
278
  /**
270
279
  * Loading text to display.
271
280
  */
272
281
  loadingText?: string
282
+
273
283
  /**
274
284
  * Whether the button takes full width.
275
285
  */
276
286
  fullWidth?: boolean
287
+
277
288
  /**
278
289
  * Icon to display before the label.
279
290
  */
280
291
  leftIcon?: Children
292
+
281
293
  /**
282
294
  * Icon to display after the label.
283
295
  */
@@ -295,43 +307,53 @@ interface InputProps extends InputElementProps {
295
307
  * Input type.
296
308
  */
297
309
  type?: InputType
310
+
298
311
  /**
299
312
  * Input size.
300
313
  */
301
314
  size?: Size
315
+
302
316
  /**
303
317
  * Horizontal text alignment inside the input (see
304
318
  * {@link InputClassOptions.align}). Defaults to the bond's own style.
305
319
  */
306
320
  align?: 'left' | 'center'
321
+
307
322
  /**
308
323
  * Label text.
309
324
  */
310
325
  label?: string
326
+
311
327
  /**
312
328
  * Error message.
313
329
  */
314
330
  error?: string
331
+
315
332
  /**
316
333
  * Hint/help text.
317
334
  */
318
335
  hint?: string
336
+
319
337
  /**
320
338
  * Element to display on the left.
321
339
  */
322
340
  leftElement?: Children
341
+
323
342
  /**
324
343
  * Element to display on the right.
325
344
  */
326
345
  rightElement?: Children
346
+
327
347
  /**
328
348
  * Whether to show a clear button.
329
349
  */
330
350
  clearable?: boolean
351
+
331
352
  /**
332
353
  * Called when the clear button is clicked.
333
354
  */
334
355
  onClear?: () => void
356
+
335
357
  /**
336
358
  * Accessible label for the clear button.
337
359
  * @default 'Clear'
@@ -351,26 +373,32 @@ interface TextareaProps extends TextareaElementProps {
351
373
  * `size` as a neighboring Input for identical font sizes.
352
374
  */
353
375
  size?: Size
376
+
354
377
  /**
355
378
  * Label text.
356
379
  */
357
380
  label?: string
381
+
358
382
  /**
359
383
  * Error message.
360
384
  */
361
385
  error?: string
386
+
362
387
  /**
363
388
  * Hint/help text.
364
389
  */
365
390
  hint?: string
391
+
366
392
  /**
367
393
  * Whether the textarea auto-resizes.
368
394
  */
369
395
  autoResize?: boolean
396
+
370
397
  /**
371
398
  * Minimum number of rows.
372
399
  */
373
400
  minRows?: number
401
+
374
402
  /**
375
403
  * Maximum number of rows.
376
404
  */
@@ -388,14 +416,17 @@ interface SelectOption<T = string> {
388
416
  * Option value.
389
417
  */
390
418
  value: T
419
+
391
420
  /**
392
421
  * Display label.
393
422
  */
394
423
  label: string
424
+
395
425
  /**
396
426
  * Whether the option is disabled.
397
427
  */
398
428
  disabled?: boolean
429
+
399
430
  /**
400
431
  * Option group (for grouped selects).
401
432
  */
@@ -413,34 +444,42 @@ interface SelectProps<T = string> extends SelectElementProps {
413
444
  * Select options.
414
445
  */
415
446
  options: SelectOption<T>[]
447
+
416
448
  /**
417
449
  * Current value.
418
450
  */
419
451
  value?: T
452
+
420
453
  /**
421
454
  * Change handler (with typed value).
422
455
  */
423
456
  onValueChange?: (value: T) => void
457
+
424
458
  /**
425
459
  * Select size.
426
460
  */
427
461
  size?: Size
462
+
428
463
  /**
429
464
  * Label text.
430
465
  */
431
466
  label?: string
467
+
432
468
  /**
433
469
  * Placeholder text.
434
470
  */
435
471
  placeholder?: string
472
+
436
473
  /**
437
474
  * Error message.
438
475
  */
439
476
  error?: string
477
+
440
478
  /**
441
479
  * Hint/help text.
442
480
  */
443
481
  hint?: string
482
+
444
483
  /**
445
484
  * Whether to allow clearing the selection.
446
485
  */
@@ -458,18 +497,22 @@ interface CheckboxProps extends InputElementProps {
458
497
  * Checkbox label.
459
498
  */
460
499
  label?: Children
500
+
461
501
  /**
462
502
  * Whether the checkbox is checked.
463
503
  */
464
504
  checked?: boolean
505
+
465
506
  /**
466
507
  * Whether the checkbox is in an indeterminate state.
467
508
  */
468
509
  indeterminate?: boolean
510
+
469
511
  /**
470
512
  * Checkbox size.
471
513
  */
472
514
  size?: Size
515
+
473
516
  /**
474
517
  * Error message.
475
518
  */
@@ -487,10 +530,12 @@ interface RadioOption<T = string> {
487
530
  * Option value.
488
531
  */
489
532
  value: T
533
+
490
534
  /**
491
535
  * Display label.
492
536
  */
493
537
  label: Children
538
+
494
539
  /**
495
540
  * Whether the option is disabled.
496
541
  */
@@ -508,22 +553,27 @@ interface RadioGroupProps<T = string> extends BaseProps {
508
553
  * Radio options.
509
554
  */
510
555
  options: RadioOption<T>[]
556
+
511
557
  /**
512
558
  * Current value.
513
559
  */
514
560
  value?: T
561
+
515
562
  /**
516
563
  * Change handler.
517
564
  */
518
565
  onChange?: (value: T) => void
566
+
519
567
  /**
520
568
  * Radio size.
521
569
  */
522
570
  size?: Size
571
+
523
572
  /**
524
573
  * Group label.
525
574
  */
526
575
  label?: string
576
+
527
577
  /**
528
578
  * Shared `name` attribute for the group's radio inputs (used for native
529
579
  * form submission). When omitted, a unique per-instance name is generated
@@ -533,10 +583,12 @@ interface RadioGroupProps<T = string> extends BaseProps {
533
583
  * deselect each other.
534
584
  */
535
585
  name?: string
586
+
536
587
  /**
537
588
  * Layout direction.
538
589
  */
539
590
  direction?: 'horizontal' | 'vertical'
591
+
540
592
  /**
541
593
  * Error message.
542
594
  */
@@ -554,14 +606,17 @@ interface SwitchProps extends InputElementProps {
554
606
  * Switch label.
555
607
  */
556
608
  label?: Children
609
+
557
610
  /**
558
611
  * Whether the switch is on.
559
612
  */
560
613
  checked?: boolean
614
+
561
615
  /**
562
616
  * Switch size.
563
617
  */
564
618
  size?: Size
619
+
565
620
  /**
566
621
  * Color when on.
567
622
  */
@@ -579,46 +634,57 @@ interface ModalProps extends HTMLElementProps {
579
634
  * Whether the modal is open.
580
635
  */
581
636
  open: boolean
637
+
582
638
  /**
583
639
  * Called when the modal should close.
584
640
  */
585
641
  onClose: () => void
642
+
586
643
  /**
587
644
  * Modal title.
588
645
  */
589
646
  title?: string
647
+
590
648
  /**
591
649
  * Modal content.
592
650
  */
593
651
  children?: Children
652
+
594
653
  /**
595
654
  * Modal size.
596
655
  */
597
656
  size?: ModalSize
657
+
598
658
  /**
599
659
  * Whether to show a close button.
600
660
  */
601
661
  showCloseButton?: boolean
662
+
602
663
  /**
603
664
  * Whether clicking the overlay closes the modal.
604
665
  */
605
666
  closeOnOverlayClick?: boolean
667
+
606
668
  /**
607
669
  * Whether pressing Escape closes the modal.
608
670
  */
609
671
  closeOnEscape?: boolean
672
+
610
673
  /**
611
674
  * Footer content (typically action buttons).
612
675
  */
613
676
  footer?: Children
677
+
614
678
  /**
615
679
  * Whether the modal is centered vertically.
616
680
  */
617
681
  centered?: boolean
682
+
618
683
  /**
619
684
  * Whether to prevent body scroll when open.
620
685
  */
621
686
  preventScroll?: boolean
687
+
622
688
  /**
623
689
  * Accessible label for the close button.
624
690
  * @default 'Close'
@@ -637,14 +703,17 @@ interface SpinnerProps extends BaseProps {
637
703
  * Spinner size.
638
704
  */
639
705
  size?: Size
706
+
640
707
  /**
641
708
  * Spinner color.
642
709
  */
643
710
  color?: ColorVariant | string
711
+
644
712
  /**
645
713
  * Loading label (for accessibility).
646
714
  */
647
715
  label?: string
716
+
648
717
  /**
649
718
  * Spinner thickness.
650
719
  */
@@ -662,22 +731,27 @@ interface AvatarProps extends HTMLElementProps {
662
731
  * Image source URL.
663
732
  */
664
733
  src?: string
734
+
665
735
  /**
666
736
  * Alt text for the image.
667
737
  */
668
738
  alt?: string
739
+
669
740
  /**
670
741
  * Name for fallback initials.
671
742
  */
672
743
  name?: string
744
+
673
745
  /**
674
746
  * Avatar size.
675
747
  */
676
748
  size?: Size | number
749
+
677
750
  /**
678
751
  * Whether the avatar is rounded.
679
752
  */
680
753
  rounded?: boolean
754
+
681
755
  /**
682
756
  * Fallback element when no image.
683
757
  */
@@ -695,18 +769,22 @@ interface BadgeProps extends HTMLElementProps {
695
769
  * Badge content.
696
770
  */
697
771
  children?: Children
772
+
698
773
  /**
699
774
  * Badge color.
700
775
  */
701
776
  color?: ColorVariant
777
+
702
778
  /**
703
779
  * Badge variant.
704
780
  */
705
781
  variant?: 'solid' | 'outline' | 'subtle'
782
+
706
783
  /**
707
784
  * Badge size.
708
785
  */
709
786
  size?: Size
787
+
710
788
  /**
711
789
  * Whether the badge is rounded.
712
790
  */
@@ -724,18 +802,22 @@ interface TooltipProps extends HTMLElementProps {
724
802
  * Tooltip content.
725
803
  */
726
804
  content: Children
805
+
727
806
  /**
728
807
  * Element that triggers the tooltip.
729
808
  */
730
809
  children: Children
810
+
731
811
  /**
732
812
  * Tooltip placement.
733
813
  */
734
814
  placement?: TooltipPlacement
815
+
735
816
  /**
736
817
  * Delay before showing (ms).
737
818
  */
738
819
  delay?: number
820
+
739
821
  /**
740
822
  * Whether the tooltip has an arrow.
741
823
  */
@@ -753,14 +835,17 @@ interface CardProps extends HTMLElementProps {
753
835
  * Card content.
754
836
  */
755
837
  children?: Children
838
+
756
839
  /**
757
840
  * Card variant.
758
841
  */
759
842
  variant?: 'elevated' | 'outlined' | 'filled'
843
+
760
844
  /**
761
845
  * Whether the card is interactive (clickable).
762
846
  */
763
847
  interactive?: boolean
848
+
764
849
  /**
765
850
  * Padding size.
766
851
  */
@@ -778,14 +863,17 @@ interface ContainerProps extends HTMLElementProps {
778
863
  * Container content.
779
864
  */
780
865
  children?: Children
866
+
781
867
  /**
782
868
  * Maximum width.
783
869
  */
784
870
  maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | string
871
+
785
872
  /**
786
873
  * Whether to center the container.
787
874
  */
788
875
  centered?: boolean
876
+
789
877
  /**
790
878
  * Horizontal padding.
791
879
  */
@@ -803,22 +891,27 @@ interface FlexProps extends HTMLElementProps {
803
891
  * Flex content.
804
892
  */
805
893
  children?: Children
894
+
806
895
  /**
807
896
  * Flex direction.
808
897
  */
809
898
  direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse'
899
+
810
900
  /**
811
901
  * Justify content.
812
902
  */
813
903
  justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly'
904
+
814
905
  /**
815
906
  * Align items.
816
907
  */
817
908
  align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch'
909
+
818
910
  /**
819
911
  * Flex wrap.
820
912
  */
821
913
  wrap?: 'wrap' | 'nowrap' | 'wrap-reverse'
914
+
822
915
  /**
823
916
  * Gap between items.
824
917
  */
@@ -836,22 +929,27 @@ interface GridProps extends HTMLElementProps {
836
929
  * Grid content.
837
930
  */
838
931
  children?: Children
932
+
839
933
  /**
840
934
  * Number of columns.
841
935
  */
842
936
  columns?: number | string
937
+
843
938
  /**
844
939
  * Number of rows.
845
940
  */
846
941
  rows?: number | string
942
+
847
943
  /**
848
944
  * Gap between items.
849
945
  */
850
946
  gap?: Size | string | number
947
+
851
948
  /**
852
949
  * Column gap.
853
950
  */
854
951
  columnGap?: Size | string | number
952
+
855
953
  /**
856
954
  * Row gap.
857
955
  */
@@ -869,6 +967,7 @@ interface SpacerProps extends BaseProps {
869
967
  * Space size.
870
968
  */
871
969
  size?: Size | string | number
970
+
872
971
  /**
873
972
  * Whether the spacer is horizontal.
874
973
  */
@@ -886,10 +985,12 @@ interface FormProps extends FormElementProps {
886
985
  * Form content.
887
986
  */
888
987
  children?: Children
988
+
889
989
  /**
890
990
  * Submit handler with form data.
891
991
  */
892
992
  onFormSubmit?: (data: Record<string, unknown>) => void | Promise<void>
993
+
893
994
  /**
894
995
  * Whether the form is submitting.
895
996
  */
@@ -907,22 +1008,27 @@ interface FormFieldProps extends HTMLElementProps {
907
1008
  * Field content.
908
1009
  */
909
1010
  children?: Children
1011
+
910
1012
  /**
911
1013
  * Field label.
912
1014
  */
913
1015
  label?: string
1016
+
914
1017
  /**
915
1018
  * Field name.
916
1019
  */
917
1020
  name?: string
1021
+
918
1022
  /**
919
1023
  * Error message.
920
1024
  */
921
1025
  error?: string
1026
+
922
1027
  /**
923
1028
  * Hint/help text.
924
1029
  */
925
1030
  hint?: string
1031
+
926
1032
  /**
927
1033
  * Whether the field is required.
928
1034
  */
@@ -940,30 +1046,37 @@ interface AlertProps extends HTMLElementProps {
940
1046
  * Alert content.
941
1047
  */
942
1048
  children?: Children
1049
+
943
1050
  /**
944
1051
  * Alert title.
945
1052
  */
946
1053
  title?: string
1054
+
947
1055
  /**
948
1056
  * Alert status/type.
949
1057
  */
950
1058
  status?: ColorVariant
1059
+
951
1060
  /**
952
1061
  * Alert variant.
953
1062
  */
954
1063
  variant?: 'solid' | 'subtle' | 'outline' | 'left-accent'
1064
+
955
1065
  /**
956
1066
  * Whether the alert is dismissible.
957
1067
  */
958
1068
  dismissible?: boolean
1069
+
959
1070
  /**
960
1071
  * Called when dismissed.
961
1072
  */
962
1073
  onDismiss?: () => void
1074
+
963
1075
  /**
964
1076
  * Icon to display.
965
1077
  */
966
1078
  icon?: Children
1079
+
967
1080
  /**
968
1081
  * Accessible label for the dismiss button.
969
1082
  * @default 'Dismiss'
@@ -982,34 +1095,42 @@ interface ToastProps extends HTMLElementProps {
982
1095
  * Toast content.
983
1096
  */
984
1097
  children?: Children
1098
+
985
1099
  /**
986
1100
  * Toast title.
987
1101
  */
988
1102
  title?: string
1103
+
989
1104
  /**
990
1105
  * Toast description.
991
1106
  */
992
1107
  description?: string
1108
+
993
1109
  /**
994
1110
  * Toast status/type.
995
1111
  */
996
1112
  status?: ColorVariant
1113
+
997
1114
  /**
998
1115
  * Duration in milliseconds (0 for persistent).
999
1116
  */
1000
1117
  duration?: number
1118
+
1001
1119
  /**
1002
1120
  * Whether the toast is dismissible.
1003
1121
  */
1004
1122
  dismissible?: boolean
1123
+
1005
1124
  /**
1006
1125
  * Called when dismissed.
1007
1126
  */
1008
1127
  onDismiss?: () => void
1128
+
1009
1129
  /**
1010
1130
  * Toast position.
1011
1131
  */
1012
1132
  position?: 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left'
1133
+
1013
1134
  /**
1014
1135
  * Accessible label for the close button.
1015
1136
  * @default 'Close'
@@ -1028,18 +1149,22 @@ interface TabItem<T = string> {
1028
1149
  * Tab value/id.
1029
1150
  */
1030
1151
  value: T
1152
+
1031
1153
  /**
1032
1154
  * Tab label.
1033
1155
  */
1034
1156
  label: Children
1157
+
1035
1158
  /**
1036
1159
  * Tab content.
1037
1160
  */
1038
1161
  content?: Children
1162
+
1039
1163
  /**
1040
1164
  * Whether the tab is disabled.
1041
1165
  */
1042
1166
  disabled?: boolean
1167
+
1043
1168
  /**
1044
1169
  * Icon to display.
1045
1170
  */
@@ -1057,26 +1182,32 @@ interface TabsProps<T = string> extends BaseProps {
1057
1182
  * Tab items.
1058
1183
  */
1059
1184
  items: TabItem<T>[]
1185
+
1060
1186
  /**
1061
1187
  * Current active tab.
1062
1188
  */
1063
1189
  value?: T
1190
+
1064
1191
  /**
1065
1192
  * Default active tab.
1066
1193
  */
1067
1194
  defaultValue?: T
1195
+
1068
1196
  /**
1069
1197
  * Change handler.
1070
1198
  */
1071
1199
  onChange?: (value: T) => void
1200
+
1072
1201
  /**
1073
1202
  * Tab variant.
1074
1203
  */
1075
1204
  variant?: 'line' | 'enclosed' | 'soft-rounded' | 'solid-rounded'
1205
+
1076
1206
  /**
1077
1207
  * Tab size.
1078
1208
  */
1079
1209
  size?: Size
1210
+
1080
1211
  /**
1081
1212
  * Whether tabs are fitted (take full width).
1082
1213
  */
@@ -1094,14 +1225,17 @@ interface AccordionItem<T = string> {
1094
1225
  * Item value/id.
1095
1226
  */
1096
1227
  value: T
1228
+
1097
1229
  /**
1098
1230
  * Item header/trigger.
1099
1231
  */
1100
1232
  header: Children
1233
+
1101
1234
  /**
1102
1235
  * Item content.
1103
1236
  */
1104
1237
  content: Children
1238
+
1105
1239
  /**
1106
1240
  * Whether the item is disabled.
1107
1241
  */
@@ -1119,22 +1253,27 @@ interface AccordionProps<T = string> extends BaseProps {
1119
1253
  * Accordion items.
1120
1254
  */
1121
1255
  items: AccordionItem<T>[]
1256
+
1122
1257
  /**
1123
1258
  * Expanded item(s).
1124
1259
  */
1125
1260
  value?: T | T[]
1261
+
1126
1262
  /**
1127
1263
  * Default expanded item(s).
1128
1264
  */
1129
1265
  defaultValue?: T | T[]
1266
+
1130
1267
  /**
1131
1268
  * Change handler.
1132
1269
  */
1133
1270
  onChange?: (value: T | T[]) => void
1271
+
1134
1272
  /**
1135
1273
  * Whether multiple items can be expanded.
1136
1274
  */
1137
1275
  multiple?: boolean
1276
+
1138
1277
  /**
1139
1278
  * Whether items can be collapsed.
1140
1279
  */
@@ -1152,22 +1291,27 @@ interface TableColumn<T> {
1152
1291
  * Column key (data property).
1153
1292
  */
1154
1293
  key: keyof T | string
1294
+
1155
1295
  /**
1156
1296
  * Column header.
1157
1297
  */
1158
1298
  header: Children
1299
+
1159
1300
  /**
1160
1301
  * Custom cell renderer.
1161
1302
  */
1162
1303
  render?: (value: unknown, row: T, index: number) => Children
1304
+
1163
1305
  /**
1164
1306
  * Column width.
1165
1307
  */
1166
1308
  width?: string | number
1309
+
1167
1310
  /**
1168
1311
  * Whether the column is sortable.
1169
1312
  */
1170
1313
  sortable?: boolean
1314
+
1171
1315
  /**
1172
1316
  * Text alignment.
1173
1317
  */
@@ -1185,49 +1329,57 @@ interface TableProps<T> extends HTMLElementProps {
1185
1329
  * Table data.
1186
1330
  */
1187
1331
  data: T[]
1332
+
1188
1333
  /**
1189
1334
  * Column definitions.
1190
1335
  */
1191
1336
  columns: TableColumn<T>[]
1337
+
1192
1338
  /**
1193
1339
  * Row key extractor.
1194
1340
  */
1195
1341
  rowKey?: keyof T | ((row: T) => string | number)
1342
+
1196
1343
  /**
1197
1344
  * Whether to show borders.
1198
1345
  */
1199
1346
  bordered?: boolean
1347
+
1200
1348
  /**
1201
1349
  * Whether rows are striped.
1202
1350
  */
1203
1351
  striped?: boolean
1352
+
1204
1353
  /**
1205
1354
  * Whether rows are hoverable.
1206
1355
  */
1207
1356
  hoverable?: boolean
1357
+
1208
1358
  /**
1209
1359
  * Table size.
1210
1360
  */
1211
1361
  size?: Size
1362
+
1212
1363
  /**
1213
1364
  * Empty state content.
1214
1365
  */
1215
1366
  emptyContent?: Children
1367
+
1216
1368
  /**
1217
1369
  * Loading state.
1218
1370
  */
1219
1371
  loading?: boolean
1372
+
1220
1373
  /**
1221
1374
  * Sort configuration.
1222
1375
  */
1223
- sort?: {
1224
- key: string
1225
- direction: 'asc' | 'desc'
1226
- }
1376
+ sort?: { key: string; direction: 'asc' | 'desc' }
1377
+
1227
1378
  /**
1228
1379
  * Sort change handler.
1229
1380
  */
1230
1381
  onSort?: (key: string, direction: 'asc' | 'desc') => void
1382
+
1231
1383
  /**
1232
1384
  * Row click handler.
1233
1385
  */
@@ -1245,34 +1397,42 @@ interface PaginationProps extends BaseProps {
1245
1397
  * Current page (1-indexed).
1246
1398
  */
1247
1399
  page: number
1400
+
1248
1401
  /**
1249
1402
  * Total number of pages.
1250
1403
  */
1251
1404
  totalPages: number
1405
+
1252
1406
  /**
1253
1407
  * Page change handler.
1254
1408
  */
1255
1409
  onChange: (page: number) => void
1410
+
1256
1411
  /**
1257
1412
  * Number of sibling pages to show.
1258
1413
  */
1259
1414
  siblings?: number
1415
+
1260
1416
  /**
1261
1417
  * Number of boundary pages to show.
1262
1418
  */
1263
1419
  boundaries?: number
1420
+
1264
1421
  /**
1265
1422
  * Pagination size.
1266
1423
  */
1267
1424
  size?: Size
1425
+
1268
1426
  /**
1269
1427
  * Whether to show first/last buttons.
1270
1428
  */
1271
1429
  showFirstLast?: boolean
1430
+
1272
1431
  /**
1273
1432
  * Whether to show previous/next buttons.
1274
1433
  */
1275
1434
  showPrevNext?: boolean
1435
+
1276
1436
  /**
1277
1437
  * Accessible labels for pagination controls.
1278
1438
  */
@@ -1297,18 +1457,22 @@ interface SkeletonProps extends BaseProps {
1297
1457
  * Skeleton width.
1298
1458
  */
1299
1459
  width?: string | number
1460
+
1300
1461
  /**
1301
1462
  * Skeleton height.
1302
1463
  */
1303
1464
  height?: string | number
1465
+
1304
1466
  /**
1305
1467
  * Whether the skeleton is circular.
1306
1468
  */
1307
1469
  circle?: boolean
1470
+
1308
1471
  /**
1309
1472
  * Border radius.
1310
1473
  */
1311
1474
  borderRadius?: string | number
1475
+
1312
1476
  /**
1313
1477
  * Animation type.
1314
1478
  */
@@ -1346,9 +1510,9 @@ interface AuthGuardProps {
1346
1510
  */
1347
1511
  loadingDefault?: string
1348
1512
  /**
1349
- * Path to redirect to when the user is not authenticated. Defaults to
1350
- * `'/login'`. The current `useLocation()` is preserved as `state.from`
1351
- * for post-login restoration.
1513
+ * Path to redirect to when `useAuth().status` is `'unauthenticated'`.
1514
+ * Defaults to `'/login'`. The current `useLocation()` is preserved as
1515
+ * `state.from` for post-login restoration.
1352
1516
  */
1353
1517
  loginPath?: string
1354
1518
  /**
@@ -2144,15 +2308,18 @@ Route-element guard for authenticated sections of a React Router tree.
2144
2308
 
2145
2309
  - While `useAuth().status` is `'loading'` (no session decision yet), renders the
2146
2310
  `loadingFallback` (or the default `<div data-mol-id="auth-guard-loading">{t('common.loading')}</div>`).
2147
- - If the user is not authenticated, redirects to `loginPath` carrying
2311
+ - If the status is `'unauthenticated'`, redirects to `loginPath` carrying
2148
2312
  the attempted location in `state.from` for post-login restoration.
2149
2313
  - Otherwise renders `children` (or `<Outlet />` if none).
2150
2314
 
2151
2315
  The guard reads `status`, not `initialized`: a stored token AND user make the
2152
2316
  FIRST render `'authenticated'`, so a protected page paints immediately instead
2153
2317
  of waiting for the background verification (`validateSession()`) or a
2154
- current-user round trip. `'unavailable'` (a stored session the server could not
2155
- confirm) counts as signed in — the page renders and the API decides.
2318
+ current-user round trip. `'unavailable'` (a retained candidate the server could
2319
+ not confirm) still renders the page and lets the API decide. It is not a
2320
+ confirmed-session boolean: `isAuthenticated` can be false and `user` can be null
2321
+ while a token/cookie-only candidate is unavailable, so never redirect on the
2322
+ boolean or require a profile in this state.
2156
2323
 
2157
2324
  The default loading tag carries `data-mol-id="auth-guard-loading"`
2158
2325
  so AI agents and e2e tests can target it reliably. When the caller
@@ -2662,7 +2829,7 @@ function UserMenuPopoverSignOut({
2662
2829
  Merge class name strings, filtering out falsy values (undefined, null, false).
2663
2830
 
2664
2831
  ```typescript
2665
- function cn(inputs?: (string | undefined | null | false)[]): string
2832
+ function cn(...inputs: (string | undefined | null | false)[]): string
2666
2833
  ```
2667
2834
 
2668
2835
  - `inputs` — Class name strings or falsy values to be filtered out.
@@ -27,9 +27,9 @@ export interface AuthGuardProps {
27
27
  */
28
28
  loadingDefault?: string;
29
29
  /**
30
- * Path to redirect to when the user is not authenticated. Defaults to
31
- * `'/login'`. The current `useLocation()` is preserved as `state.from`
32
- * for post-login restoration.
30
+ * Path to redirect to when `useAuth().status` is `'unauthenticated'`.
31
+ * Defaults to `'/login'`. The current `useLocation()` is preserved as
32
+ * `state.from` for post-login restoration.
33
33
  */
34
34
  loginPath?: string;
35
35
  /**
@@ -51,15 +51,18 @@ export interface AuthGuardProps {
51
51
  *
52
52
  * - While `useAuth().status` is `'loading'` (no session decision yet), renders the
53
53
  * `loadingFallback` (or the default `<div data-mol-id="auth-guard-loading">{t('common.loading')}</div>`).
54
- * - If the user is not authenticated, redirects to `loginPath` carrying
54
+ * - If the status is `'unauthenticated'`, redirects to `loginPath` carrying
55
55
  * the attempted location in `state.from` for post-login restoration.
56
56
  * - Otherwise renders `children` (or `<Outlet />` if none).
57
57
  *
58
58
  * The guard reads `status`, not `initialized`: a stored token AND user make the
59
59
  * FIRST render `'authenticated'`, so a protected page paints immediately instead
60
60
  * of waiting for the background verification (`validateSession()`) or a
61
- * current-user round trip. `'unavailable'` (a stored session the server could not
62
- * confirm) counts as signed in — the page renders and the API decides.
61
+ * current-user round trip. `'unavailable'` (a retained candidate the server could
62
+ * not confirm) still renders the page and lets the API decide. It is not a
63
+ * confirmed-session boolean: `isAuthenticated` can be false and `user` can be null
64
+ * while a token/cookie-only candidate is unavailable, so never redirect on the
65
+ * boolean or require a profile in this state.
63
66
  *
64
67
  * The default loading tag carries `data-mol-id="auth-guard-loading"`
65
68
  * so AI agents and e2e tests can target it reliably. When the caller
@@ -1 +1 @@
1
- {"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../src/components/AuthGuard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAA;AAKzD;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,SAAS,CAAA;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,EACxB,eAAe,EACf,UAA6B,EAC7B,cAA6B,EAC7B,SAAoB,EACpB,eAAe,EACf,QAAQ,GACT,GAAE,cAAmB,GAAG,SAAS,CA2BjC"}
1
+ {"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../src/components/AuthGuard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAA;AAKzD;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,SAAS,CAAA;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CAAC,EACxB,eAAe,EACf,UAA6B,EAC7B,cAA6B,EAC7B,SAAoB,EACpB,eAAe,EACf,QAAQ,GACT,GAAE,cAAmB,GAAG,SAAS,CA2BjC"}
@@ -7,15 +7,18 @@ import { useAuth, useTranslation } from '@molecule/app-react';
7
7
  *
8
8
  * - While `useAuth().status` is `'loading'` (no session decision yet), renders the
9
9
  * `loadingFallback` (or the default `<div data-mol-id="auth-guard-loading">{t('common.loading')}</div>`).
10
- * - If the user is not authenticated, redirects to `loginPath` carrying
10
+ * - If the status is `'unauthenticated'`, redirects to `loginPath` carrying
11
11
  * the attempted location in `state.from` for post-login restoration.
12
12
  * - Otherwise renders `children` (or `<Outlet />` if none).
13
13
  *
14
14
  * The guard reads `status`, not `initialized`: a stored token AND user make the
15
15
  * FIRST render `'authenticated'`, so a protected page paints immediately instead
16
16
  * of waiting for the background verification (`validateSession()`) or a
17
- * current-user round trip. `'unavailable'` (a stored session the server could not
18
- * confirm) counts as signed in — the page renders and the API decides.
17
+ * current-user round trip. `'unavailable'` (a retained candidate the server could
18
+ * not confirm) still renders the page and lets the API decide. It is not a
19
+ * confirmed-session boolean: `isAuthenticated` can be false and `user` can be null
20
+ * while a token/cookie-only candidate is unavailable, so never redirect on the
21
+ * boolean or require a profile in this state.
19
22
  *
20
23
  * The default loading tag carries `data-mol-id="auth-guard-loading"`
21
24
  * so AI agents and e2e tests can target it reliably. When the caller
@@ -40,7 +43,7 @@ export function AuthGuard({ loadingFallback, loadingKey = 'common.loading', load
40
43
  if (status === 'loading') {
41
44
  return (loadingFallback ?? (_jsx("div", { "data-mol-id": "auth-guard-loading", children: t(loadingKey, {}, { defaultValue: loadingDefault }) })));
42
45
  }
43
- if (!isAuthenticated) {
46
+ if (status === 'unauthenticated') {
44
47
  return _jsx(Navigate, { to: loginPath, state: { from: location }, replace: true });
45
48
  }
46
49
  return _jsx(_Fragment, { children: children ?? _jsx(Outlet, {}) });
@@ -1 +1 @@
1
- {"version":3,"file":"AuthGuard.js","sourceRoot":"","sources":["../../src/components/AuthGuard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE5D,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAkD7D;;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;IACD,OAAO,4BAAG,QAAQ,IAAI,KAAC,MAAM,KAAG,GAAI,CAAA;AACtC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-ui-react",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "React UI components for molecule.dev",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -42,9 +42,9 @@
42
42
  "react-router": "^7.0.0 || ^8.0.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@molecule/app-i18n": "1.1.1",
45
+ "@molecule/app-i18n": "1.1.2",
46
46
  "@molecule/app-icons": "1.0.3",
47
- "@molecule/app-react": "3.0.2",
47
+ "@molecule/app-react": "3.4.4",
48
48
  "@testing-library/react": "16.3.3",
49
49
  "@types/node": "26.6.5",
50
50
  "@types/react": "19.3.0",