@tinybigui/react 0.21.1 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -6249,12 +6249,13 @@ type ChipVariants = VariantProps<typeof chipVariants>;
6249
6249
  * Structural variant of the MD3 Dialog.
6250
6250
  *
6251
6251
  * - `basic` — Floating dialog with headline, body, and action buttons.
6252
- * Supports scale + fade entry animation. Closes on scrim click or Escape.
6253
- * Max width 560dp per MD3 spec.
6252
+ * Supports scale + fade entry animation (MD3 Expressive, `animate-md-scale-in`).
6253
+ * Closes on scrim click or Escape. Max width 560dp per MD3 spec.
6254
6254
  *
6255
6255
  * - `fullscreen` — Full viewport overlay suited for mobile and complex forms.
6256
6256
  * Replaces headline with a top app bar row (close icon + confirm action).
6257
- * Slide-up entry animation. Does NOT close on scrim click per MD3 spec.
6257
+ * Slide-up entry animation (`animate-md-slide-in-bottom`). Does NOT close on
6258
+ * scrim click per MD3 spec.
6258
6259
  *
6259
6260
  * @default 'basic'
6260
6261
  */
@@ -6262,10 +6263,12 @@ type DialogVariant = "basic" | "fullscreen";
6262
6263
  /**
6263
6264
  * Internal animation state machine for the Dialog.
6264
6265
  *
6265
- * - `entering` — initial mount state before transition fires
6266
- * - `visible` — fully shown, entry animation complete
6267
- * - `exiting` — exit animation in progress
6268
- * - `exited` — removed from DOM
6266
+ * - `entering` — initial mount state; dialog starts invisible before animation fires
6267
+ * - `visible` — entry animation active (`animate-md-scale-in` / `animate-md-slide-in-bottom`)
6268
+ * - `exiting` — exit animation active (`animate-md-scale-out` / `animate-md-slide-out-bottom`)
6269
+ * - `exited` — animation complete; portal removes element from DOM
6270
+ *
6271
+ * The scrim receives the same state for its own fade-in/out animation.
6269
6272
  */
6270
6273
  type DialogAnimationState = "entering" | "visible" | "exiting" | "exited";
6271
6274
  /**
@@ -6302,7 +6305,7 @@ interface DialogContextValue {
6302
6305
  * onOpenChange={setOpen}
6303
6306
  * aria-label="Confirm action"
6304
6307
  * className="bg-surface-container-high rounded-xl shadow-elevation-3"
6305
- * scrimClassName="fixed inset-0 z-40 bg-scrim opacity-32"
6308
+ * scrimClassName="fixed inset-0 z-40 bg-scrim/32"
6306
6309
  * >
6307
6310
  * <DialogHeadline>Confirm deletion?</DialogHeadline>
6308
6311
  * <DialogContent>This action cannot be undone.</DialogContent>
@@ -6337,6 +6340,21 @@ interface DialogHeadlessProps {
6337
6340
  * When `DialogHeadline` is present, `aria-labelledby` is preferred automatically.
6338
6341
  */
6339
6342
  "aria-label"?: string;
6343
+ /**
6344
+ * Optional hero icon rendered centered above the headline per MD3 spec.
6345
+ * When present, sets `data-with-icon` on the panel root so headline and
6346
+ * supporting text center-align via `group-data-[with-icon]/dialog:` selectors.
6347
+ *
6348
+ * Only rendered in the `basic` variant.
6349
+ *
6350
+ * @example
6351
+ * ```tsx
6352
+ * <Dialog icon={<BookmarkIcon />}>
6353
+ * <DialogHeadline>Save bookmark?</DialogHeadline>
6354
+ * </Dialog>
6355
+ * ```
6356
+ */
6357
+ icon?: ReactNode;
6340
6358
  /**
6341
6359
  * Dialog slot content — typically `DialogHeadline`, `DialogContent`, `DialogActions`.
6342
6360
  */
@@ -6346,13 +6364,28 @@ interface DialogHeadlessProps {
6346
6364
  */
6347
6365
  className?: string;
6348
6366
  /**
6349
- * Additional CSS classes applied to the scrim overlay element.
6367
+ * Additional CSS classes applied to the centering/positioning wrapper element.
6368
+ * Consumed from `dialogWrapperVariants` by the styled `Dialog` layer.
6350
6369
  */
6351
- scrimClassName?: string;
6370
+ wrapperClassName?: string;
6371
+ /**
6372
+ * Returns CSS classes for the scrim based on the current animation state.
6373
+ * Called at render time to apply the correct fade-in/out animation.
6374
+ * When `undefined`, falls back to a static base scrim class.
6375
+ *
6376
+ * @example
6377
+ * ```tsx
6378
+ * getScrimClassName={(state) => dialogScrimVariants({ animationState: state })}
6379
+ * ```
6380
+ */
6381
+ getScrimClassName?: (state: DialogAnimationState) => string;
6352
6382
  /**
6353
6383
  * Additional CSS classes injected based on the current animation state.
6354
6384
  * Called at render time to merge CVA animation classes onto the panel.
6355
6385
  *
6386
+ * Returns empty string when `prefers-reduced-motion: reduce` is active
6387
+ * (handled by the styled `Dialog` layer via `useReducedMotion`).
6388
+ *
6356
6389
  * @example
6357
6390
  * ```tsx
6358
6391
  * getAnimationClassName={(state) => dialogAnimationVariants({ animationState: state, variant })}
@@ -6382,6 +6415,16 @@ interface DialogHeadlessProps {
6382
6415
  * </DialogActions>
6383
6416
  * </Dialog>
6384
6417
  *
6418
+ * // With hero icon
6419
+ * <Dialog icon={<BookmarkIcon />} open={open} onOpenChange={setOpen}>
6420
+ * <DialogHeadline>Save bookmark?</DialogHeadline>
6421
+ * <DialogContent>The page will be saved to your bookmarks.</DialogContent>
6422
+ * <DialogActions>
6423
+ * <Button variant="text" onPress={() => setOpen(false)}>Cancel</Button>
6424
+ * <Button variant="filled" onPress={handleSave}>Save</Button>
6425
+ * </DialogActions>
6426
+ * </Dialog>
6427
+ *
6385
6428
  * // Full-screen dialog (controlled)
6386
6429
  * <Dialog variant="fullscreen" open={open} onOpenChange={setOpen}>
6387
6430
  * <DialogHeadline
@@ -6419,6 +6462,19 @@ interface DialogProps {
6419
6462
  * Accessible label for the dialog when no `DialogHeadline` is present.
6420
6463
  */
6421
6464
  "aria-label"?: string;
6465
+ /**
6466
+ * Optional hero icon rendered centered above the headline per MD3 spec.
6467
+ * When present, headline and supporting text center-align automatically.
6468
+ * Only rendered in the `basic` variant.
6469
+ *
6470
+ * @example
6471
+ * ```tsx
6472
+ * <Dialog icon={<BookmarkIcon />}>
6473
+ * <DialogHeadline>Save bookmark?</DialogHeadline>
6474
+ * </Dialog>
6475
+ * ```
6476
+ */
6477
+ icon?: ReactNode;
6422
6478
  /**
6423
6479
  * Dialog slot content — `DialogHeadline`, `DialogContent`, `DialogActions`.
6424
6480
  */
@@ -6477,6 +6533,10 @@ interface DialogHeadlineProps {
6477
6533
  * Renders as a scrollable `<div>` and provides its `id` to `DialogContext`
6478
6534
  * so the parent dialog panel can reference it via `aria-describedby`.
6479
6535
  *
6536
+ * Shows MD3 scroll dividers (`border-outline-variant`) at the top and/or bottom
6537
+ * of the scroll container when content overflows. Dividers are toggled via
6538
+ * `data-scroll-divider-top` and `data-scroll-divider-bottom` attributes.
6539
+ *
6480
6540
  * @example
6481
6541
  * ```tsx
6482
6542
  * <DialogContent>
@@ -6531,17 +6591,24 @@ interface DialogActionsProps {
6531
6591
  * **Basic** (default):
6532
6592
  * - Floating card: `bg-surface-container-high`, `rounded-xl`, `shadow-elevation-3`
6533
6593
  * - Centered in viewport (min 280dp, max 560dp width)
6534
- * - Scale + fade entry animation (`duration-medium4 / ease-emphasized-decelerate`)
6535
- * - Fade exit animation (`duration-short2 / ease-emphasized-accelerate`)
6594
+ * - Scale + fade entry animation (`animate-md-scale-in`, expressive-fast-spatial 350ms)
6595
+ * - Scale + fade exit animation (`animate-md-scale-out`, emphasized-accelerate 200ms)
6596
+ * - Scrim fades in/out (`animate-md-fade-in` / `animate-md-fade-out`)
6536
6597
  * - Closes on scrim click or Escape key
6598
+ * - Optional hero icon above headline (`icon` prop) — centers headline + content text
6537
6599
  *
6538
6600
  * **Full-screen**:
6539
6601
  * - Full viewport coverage — suited for mobile and complex forms
6540
6602
  * - No rounded corners, no elevation shadow
6541
- * - Slide-up entry / slide-down exit animation
6603
+ * - Slide-up entry / slide-down exit animation (`animate-md-slide-in-bottom` / out)
6542
6604
  * - Does NOT close on scrim click per MD3 spec (only via Escape or close button)
6543
6605
  * - Headline replaced by top app bar row (close icon + confirm action)
6544
6606
  *
6607
+ * **Reduced motion**:
6608
+ * - When `prefers-reduced-motion: reduce` is active, all keyframe animations are
6609
+ * suppressed (no animate-md-* class applied). Dialog appears/disappears instantly.
6610
+ * - `transition-none` is appended so any inherited transitions are also disabled.
6611
+ *
6545
6612
  * Both variants:
6546
6613
  * - `role="dialog"` + `aria-modal="true"` (React Aria `useDialog`)
6547
6614
  * - `aria-labelledby` pointing to `DialogHeadline` id
@@ -6576,6 +6643,16 @@ interface DialogActionsProps {
6576
6643
  * );
6577
6644
  * }
6578
6645
  *
6646
+ * // With hero icon
6647
+ * <Dialog icon={<BookmarkIcon />} open={open} onOpenChange={setOpen}>
6648
+ * <DialogHeadline>Save bookmark?</DialogHeadline>
6649
+ * <DialogContent>The page will be saved to your bookmarks.</DialogContent>
6650
+ * <DialogActions>
6651
+ * <Button variant="text" onPress={() => setOpen(false)}>Cancel</Button>
6652
+ * <Button variant="filled" onPress={handleSave}>Save</Button>
6653
+ * </DialogActions>
6654
+ * </Dialog>
6655
+ *
6579
6656
  * // Full-screen dialog — mobile form flow
6580
6657
  * function NewEventDialog() {
6581
6658
  * const [open, setOpen] = useState(false);
@@ -6617,9 +6694,15 @@ declare const Dialog: React$1.ForwardRefExoticComponent<DialogProps & React$1.Re
6617
6694
  * Renders as an `<h2>` element and registers its `id` with the parent
6618
6695
  * `DialogContext` so the dialog panel can wire `aria-labelledby` correctly.
6619
6696
  *
6697
+ * When the parent dialog has a hero `icon` prop, the panel root carries
6698
+ * `data-with-icon` and `group/dialog`, so the `group-data-[with-icon]/dialog:text-center`
6699
+ * selector in `dialogHeadlineVariants` automatically centers the headline text —
6700
+ * no additional props needed here.
6701
+ *
6620
6702
  * For the `fullscreen` variant, the headline renders as a top app bar row
6621
6703
  * containing optional `closeButton` (leading icon button) and `confirmButton`
6622
- * (trailing text action) per MD3 Full-screen Dialog spec.
6704
+ * (trailing text action) per MD3 Full-screen Dialog spec. The fullscreen app bar
6705
+ * always shows a `border-b border-outline-variant` divider below it.
6623
6706
  *
6624
6707
  * Must be rendered inside a `<Dialog>` or `<DialogHeadless>` component.
6625
6708
  *
@@ -6660,6 +6743,13 @@ declare const DialogHeadline: React$1.ForwardRefExoticComponent<DialogHeadlinePr
6660
6743
  * Styled with `text-body-medium` and `text-on-surface-variant` per MD3 spec.
6661
6744
  * Overflows vertically when content exceeds the available height.
6662
6745
  *
6746
+ * **Scroll dividers**: Shows `border-outline-variant` dividers at the top and/or
6747
+ * bottom edge when content overflows and is not scrolled to the respective edge.
6748
+ * Dividers are toggled by setting `data-scroll-divider-top` / `data-scroll-divider-bottom`
6749
+ * presence attributes on the element. The CVA base class uses
6750
+ * `data-[scroll-divider-top]:border-t` and `data-[scroll-divider-bottom]:border-b`
6751
+ * to apply the borders — no style props needed.
6752
+ *
6663
6753
  * Must be rendered inside a `<Dialog>` or `<DialogHeadless>` component.
6664
6754
  *
6665
6755
  * @example
@@ -6739,7 +6829,12 @@ declare function useDialogContext(): DialogContextValue;
6739
6829
  * Basic variant is dismissable (Escape + outside click);
6740
6830
  * Full-screen variant is Escape-dismissable only (no scrim click) per MD3 spec.
6741
6831
  * - **Animation state machine**: `entering → visible → exiting → exited`
6742
- * mirrors the Snackbar animation pattern.
6832
+ * Exit advances on `onAnimationEnd` with `e.target === e.currentTarget` guard
6833
+ * (prevents child animation events from advancing the state machine), plus a
6834
+ * 250ms fallback timer in case the animation event doesn't fire.
6835
+ * - **Scrim animation**: state-driven via `getScrimClassName(animationState)`.
6836
+ * - **Hero icon**: optional `icon` prop renders centered above headline;
6837
+ * sets `data-with-icon` on panel root for group-data centering of headline/content.
6743
6838
  * - **ARIA wiring**: `DialogContext` provides stable IDs for `aria-labelledby`
6744
6839
  * and `aria-describedby`, consumed by slot sub-components.
6745
6840
  *
@@ -6757,8 +6852,9 @@ declare function useDialogContext(): DialogContextValue;
6757
6852
  * variant="basic"
6758
6853
  * open={open}
6759
6854
  * onOpenChange={setOpen}
6760
- * className={cn(dialogWrapperVariants({ variant: 'basic' }), dialogPanelVariants({ variant: 'basic' }))}
6761
- * scrimClassName={dialogScrimVariants()}
6855
+ * className={cn(dialogPanelVariants({ variant: 'basic' }))}
6856
+ * wrapperClassName={dialogWrapperVariants({ variant: 'basic' })}
6857
+ * getScrimClassName={(state) => dialogScrimVariants({ animationState: state })}
6762
6858
  * getAnimationClassName={(state) =>
6763
6859
  * dialogAnimationVariants({ animationState: state, variant: 'basic' })
6764
6860
  * }
package/dist/index.d.ts CHANGED
@@ -6249,12 +6249,13 @@ type ChipVariants = VariantProps<typeof chipVariants>;
6249
6249
  * Structural variant of the MD3 Dialog.
6250
6250
  *
6251
6251
  * - `basic` — Floating dialog with headline, body, and action buttons.
6252
- * Supports scale + fade entry animation. Closes on scrim click or Escape.
6253
- * Max width 560dp per MD3 spec.
6252
+ * Supports scale + fade entry animation (MD3 Expressive, `animate-md-scale-in`).
6253
+ * Closes on scrim click or Escape. Max width 560dp per MD3 spec.
6254
6254
  *
6255
6255
  * - `fullscreen` — Full viewport overlay suited for mobile and complex forms.
6256
6256
  * Replaces headline with a top app bar row (close icon + confirm action).
6257
- * Slide-up entry animation. Does NOT close on scrim click per MD3 spec.
6257
+ * Slide-up entry animation (`animate-md-slide-in-bottom`). Does NOT close on
6258
+ * scrim click per MD3 spec.
6258
6259
  *
6259
6260
  * @default 'basic'
6260
6261
  */
@@ -6262,10 +6263,12 @@ type DialogVariant = "basic" | "fullscreen";
6262
6263
  /**
6263
6264
  * Internal animation state machine for the Dialog.
6264
6265
  *
6265
- * - `entering` — initial mount state before transition fires
6266
- * - `visible` — fully shown, entry animation complete
6267
- * - `exiting` — exit animation in progress
6268
- * - `exited` — removed from DOM
6266
+ * - `entering` — initial mount state; dialog starts invisible before animation fires
6267
+ * - `visible` — entry animation active (`animate-md-scale-in` / `animate-md-slide-in-bottom`)
6268
+ * - `exiting` — exit animation active (`animate-md-scale-out` / `animate-md-slide-out-bottom`)
6269
+ * - `exited` — animation complete; portal removes element from DOM
6270
+ *
6271
+ * The scrim receives the same state for its own fade-in/out animation.
6269
6272
  */
6270
6273
  type DialogAnimationState = "entering" | "visible" | "exiting" | "exited";
6271
6274
  /**
@@ -6302,7 +6305,7 @@ interface DialogContextValue {
6302
6305
  * onOpenChange={setOpen}
6303
6306
  * aria-label="Confirm action"
6304
6307
  * className="bg-surface-container-high rounded-xl shadow-elevation-3"
6305
- * scrimClassName="fixed inset-0 z-40 bg-scrim opacity-32"
6308
+ * scrimClassName="fixed inset-0 z-40 bg-scrim/32"
6306
6309
  * >
6307
6310
  * <DialogHeadline>Confirm deletion?</DialogHeadline>
6308
6311
  * <DialogContent>This action cannot be undone.</DialogContent>
@@ -6337,6 +6340,21 @@ interface DialogHeadlessProps {
6337
6340
  * When `DialogHeadline` is present, `aria-labelledby` is preferred automatically.
6338
6341
  */
6339
6342
  "aria-label"?: string;
6343
+ /**
6344
+ * Optional hero icon rendered centered above the headline per MD3 spec.
6345
+ * When present, sets `data-with-icon` on the panel root so headline and
6346
+ * supporting text center-align via `group-data-[with-icon]/dialog:` selectors.
6347
+ *
6348
+ * Only rendered in the `basic` variant.
6349
+ *
6350
+ * @example
6351
+ * ```tsx
6352
+ * <Dialog icon={<BookmarkIcon />}>
6353
+ * <DialogHeadline>Save bookmark?</DialogHeadline>
6354
+ * </Dialog>
6355
+ * ```
6356
+ */
6357
+ icon?: ReactNode;
6340
6358
  /**
6341
6359
  * Dialog slot content — typically `DialogHeadline`, `DialogContent`, `DialogActions`.
6342
6360
  */
@@ -6346,13 +6364,28 @@ interface DialogHeadlessProps {
6346
6364
  */
6347
6365
  className?: string;
6348
6366
  /**
6349
- * Additional CSS classes applied to the scrim overlay element.
6367
+ * Additional CSS classes applied to the centering/positioning wrapper element.
6368
+ * Consumed from `dialogWrapperVariants` by the styled `Dialog` layer.
6350
6369
  */
6351
- scrimClassName?: string;
6370
+ wrapperClassName?: string;
6371
+ /**
6372
+ * Returns CSS classes for the scrim based on the current animation state.
6373
+ * Called at render time to apply the correct fade-in/out animation.
6374
+ * When `undefined`, falls back to a static base scrim class.
6375
+ *
6376
+ * @example
6377
+ * ```tsx
6378
+ * getScrimClassName={(state) => dialogScrimVariants({ animationState: state })}
6379
+ * ```
6380
+ */
6381
+ getScrimClassName?: (state: DialogAnimationState) => string;
6352
6382
  /**
6353
6383
  * Additional CSS classes injected based on the current animation state.
6354
6384
  * Called at render time to merge CVA animation classes onto the panel.
6355
6385
  *
6386
+ * Returns empty string when `prefers-reduced-motion: reduce` is active
6387
+ * (handled by the styled `Dialog` layer via `useReducedMotion`).
6388
+ *
6356
6389
  * @example
6357
6390
  * ```tsx
6358
6391
  * getAnimationClassName={(state) => dialogAnimationVariants({ animationState: state, variant })}
@@ -6382,6 +6415,16 @@ interface DialogHeadlessProps {
6382
6415
  * </DialogActions>
6383
6416
  * </Dialog>
6384
6417
  *
6418
+ * // With hero icon
6419
+ * <Dialog icon={<BookmarkIcon />} open={open} onOpenChange={setOpen}>
6420
+ * <DialogHeadline>Save bookmark?</DialogHeadline>
6421
+ * <DialogContent>The page will be saved to your bookmarks.</DialogContent>
6422
+ * <DialogActions>
6423
+ * <Button variant="text" onPress={() => setOpen(false)}>Cancel</Button>
6424
+ * <Button variant="filled" onPress={handleSave}>Save</Button>
6425
+ * </DialogActions>
6426
+ * </Dialog>
6427
+ *
6385
6428
  * // Full-screen dialog (controlled)
6386
6429
  * <Dialog variant="fullscreen" open={open} onOpenChange={setOpen}>
6387
6430
  * <DialogHeadline
@@ -6419,6 +6462,19 @@ interface DialogProps {
6419
6462
  * Accessible label for the dialog when no `DialogHeadline` is present.
6420
6463
  */
6421
6464
  "aria-label"?: string;
6465
+ /**
6466
+ * Optional hero icon rendered centered above the headline per MD3 spec.
6467
+ * When present, headline and supporting text center-align automatically.
6468
+ * Only rendered in the `basic` variant.
6469
+ *
6470
+ * @example
6471
+ * ```tsx
6472
+ * <Dialog icon={<BookmarkIcon />}>
6473
+ * <DialogHeadline>Save bookmark?</DialogHeadline>
6474
+ * </Dialog>
6475
+ * ```
6476
+ */
6477
+ icon?: ReactNode;
6422
6478
  /**
6423
6479
  * Dialog slot content — `DialogHeadline`, `DialogContent`, `DialogActions`.
6424
6480
  */
@@ -6477,6 +6533,10 @@ interface DialogHeadlineProps {
6477
6533
  * Renders as a scrollable `<div>` and provides its `id` to `DialogContext`
6478
6534
  * so the parent dialog panel can reference it via `aria-describedby`.
6479
6535
  *
6536
+ * Shows MD3 scroll dividers (`border-outline-variant`) at the top and/or bottom
6537
+ * of the scroll container when content overflows. Dividers are toggled via
6538
+ * `data-scroll-divider-top` and `data-scroll-divider-bottom` attributes.
6539
+ *
6480
6540
  * @example
6481
6541
  * ```tsx
6482
6542
  * <DialogContent>
@@ -6531,17 +6591,24 @@ interface DialogActionsProps {
6531
6591
  * **Basic** (default):
6532
6592
  * - Floating card: `bg-surface-container-high`, `rounded-xl`, `shadow-elevation-3`
6533
6593
  * - Centered in viewport (min 280dp, max 560dp width)
6534
- * - Scale + fade entry animation (`duration-medium4 / ease-emphasized-decelerate`)
6535
- * - Fade exit animation (`duration-short2 / ease-emphasized-accelerate`)
6594
+ * - Scale + fade entry animation (`animate-md-scale-in`, expressive-fast-spatial 350ms)
6595
+ * - Scale + fade exit animation (`animate-md-scale-out`, emphasized-accelerate 200ms)
6596
+ * - Scrim fades in/out (`animate-md-fade-in` / `animate-md-fade-out`)
6536
6597
  * - Closes on scrim click or Escape key
6598
+ * - Optional hero icon above headline (`icon` prop) — centers headline + content text
6537
6599
  *
6538
6600
  * **Full-screen**:
6539
6601
  * - Full viewport coverage — suited for mobile and complex forms
6540
6602
  * - No rounded corners, no elevation shadow
6541
- * - Slide-up entry / slide-down exit animation
6603
+ * - Slide-up entry / slide-down exit animation (`animate-md-slide-in-bottom` / out)
6542
6604
  * - Does NOT close on scrim click per MD3 spec (only via Escape or close button)
6543
6605
  * - Headline replaced by top app bar row (close icon + confirm action)
6544
6606
  *
6607
+ * **Reduced motion**:
6608
+ * - When `prefers-reduced-motion: reduce` is active, all keyframe animations are
6609
+ * suppressed (no animate-md-* class applied). Dialog appears/disappears instantly.
6610
+ * - `transition-none` is appended so any inherited transitions are also disabled.
6611
+ *
6545
6612
  * Both variants:
6546
6613
  * - `role="dialog"` + `aria-modal="true"` (React Aria `useDialog`)
6547
6614
  * - `aria-labelledby` pointing to `DialogHeadline` id
@@ -6576,6 +6643,16 @@ interface DialogActionsProps {
6576
6643
  * );
6577
6644
  * }
6578
6645
  *
6646
+ * // With hero icon
6647
+ * <Dialog icon={<BookmarkIcon />} open={open} onOpenChange={setOpen}>
6648
+ * <DialogHeadline>Save bookmark?</DialogHeadline>
6649
+ * <DialogContent>The page will be saved to your bookmarks.</DialogContent>
6650
+ * <DialogActions>
6651
+ * <Button variant="text" onPress={() => setOpen(false)}>Cancel</Button>
6652
+ * <Button variant="filled" onPress={handleSave}>Save</Button>
6653
+ * </DialogActions>
6654
+ * </Dialog>
6655
+ *
6579
6656
  * // Full-screen dialog — mobile form flow
6580
6657
  * function NewEventDialog() {
6581
6658
  * const [open, setOpen] = useState(false);
@@ -6617,9 +6694,15 @@ declare const Dialog: React$1.ForwardRefExoticComponent<DialogProps & React$1.Re
6617
6694
  * Renders as an `<h2>` element and registers its `id` with the parent
6618
6695
  * `DialogContext` so the dialog panel can wire `aria-labelledby` correctly.
6619
6696
  *
6697
+ * When the parent dialog has a hero `icon` prop, the panel root carries
6698
+ * `data-with-icon` and `group/dialog`, so the `group-data-[with-icon]/dialog:text-center`
6699
+ * selector in `dialogHeadlineVariants` automatically centers the headline text —
6700
+ * no additional props needed here.
6701
+ *
6620
6702
  * For the `fullscreen` variant, the headline renders as a top app bar row
6621
6703
  * containing optional `closeButton` (leading icon button) and `confirmButton`
6622
- * (trailing text action) per MD3 Full-screen Dialog spec.
6704
+ * (trailing text action) per MD3 Full-screen Dialog spec. The fullscreen app bar
6705
+ * always shows a `border-b border-outline-variant` divider below it.
6623
6706
  *
6624
6707
  * Must be rendered inside a `<Dialog>` or `<DialogHeadless>` component.
6625
6708
  *
@@ -6660,6 +6743,13 @@ declare const DialogHeadline: React$1.ForwardRefExoticComponent<DialogHeadlinePr
6660
6743
  * Styled with `text-body-medium` and `text-on-surface-variant` per MD3 spec.
6661
6744
  * Overflows vertically when content exceeds the available height.
6662
6745
  *
6746
+ * **Scroll dividers**: Shows `border-outline-variant` dividers at the top and/or
6747
+ * bottom edge when content overflows and is not scrolled to the respective edge.
6748
+ * Dividers are toggled by setting `data-scroll-divider-top` / `data-scroll-divider-bottom`
6749
+ * presence attributes on the element. The CVA base class uses
6750
+ * `data-[scroll-divider-top]:border-t` and `data-[scroll-divider-bottom]:border-b`
6751
+ * to apply the borders — no style props needed.
6752
+ *
6663
6753
  * Must be rendered inside a `<Dialog>` or `<DialogHeadless>` component.
6664
6754
  *
6665
6755
  * @example
@@ -6739,7 +6829,12 @@ declare function useDialogContext(): DialogContextValue;
6739
6829
  * Basic variant is dismissable (Escape + outside click);
6740
6830
  * Full-screen variant is Escape-dismissable only (no scrim click) per MD3 spec.
6741
6831
  * - **Animation state machine**: `entering → visible → exiting → exited`
6742
- * mirrors the Snackbar animation pattern.
6832
+ * Exit advances on `onAnimationEnd` with `e.target === e.currentTarget` guard
6833
+ * (prevents child animation events from advancing the state machine), plus a
6834
+ * 250ms fallback timer in case the animation event doesn't fire.
6835
+ * - **Scrim animation**: state-driven via `getScrimClassName(animationState)`.
6836
+ * - **Hero icon**: optional `icon` prop renders centered above headline;
6837
+ * sets `data-with-icon` on panel root for group-data centering of headline/content.
6743
6838
  * - **ARIA wiring**: `DialogContext` provides stable IDs for `aria-labelledby`
6744
6839
  * and `aria-describedby`, consumed by slot sub-components.
6745
6840
  *
@@ -6757,8 +6852,9 @@ declare function useDialogContext(): DialogContextValue;
6757
6852
  * variant="basic"
6758
6853
  * open={open}
6759
6854
  * onOpenChange={setOpen}
6760
- * className={cn(dialogWrapperVariants({ variant: 'basic' }), dialogPanelVariants({ variant: 'basic' }))}
6761
- * scrimClassName={dialogScrimVariants()}
6855
+ * className={cn(dialogPanelVariants({ variant: 'basic' }))}
6856
+ * wrapperClassName={dialogWrapperVariants({ variant: 'basic' })}
6857
+ * getScrimClassName={(state) => dialogScrimVariants({ animationState: state })}
6762
6858
  * getAnimationClassName={(state) =>
6763
6859
  * dialogAnimationVariants({ animationState: state, variant: 'basic' })
6764
6860
  * }