@oxyhq/bloom 0.72.2 → 0.73.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.
Files changed (150) hide show
  1. package/lib/commonjs/avatar-group/AvatarGroup.web.js +22 -21
  2. package/lib/commonjs/avatar-group/AvatarGroup.web.js.map +1 -1
  3. package/lib/commonjs/bottom-sheet/index.web.js +11 -6
  4. package/lib/commonjs/bottom-sheet/index.web.js.map +1 -1
  5. package/lib/commonjs/context-menu/index.web.js +20 -22
  6. package/lib/commonjs/context-menu/index.web.js.map +1 -1
  7. package/lib/commonjs/dialog/Dialog.js +66 -70
  8. package/lib/commonjs/dialog/Dialog.js.map +1 -1
  9. package/lib/commonjs/dialog/Dialog.web.js +49 -51
  10. package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
  11. package/lib/commonjs/fonts/font-data.web.js +22 -0
  12. package/lib/commonjs/fonts/font-data.web.js.map +1 -0
  13. package/lib/commonjs/menu/index.web.js +15 -11
  14. package/lib/commonjs/menu/index.web.js.map +1 -1
  15. package/lib/commonjs/overlay/index.js +133 -7
  16. package/lib/commonjs/overlay/index.js.map +1 -1
  17. package/lib/commonjs/overlay/stack.js +170 -0
  18. package/lib/commonjs/overlay/stack.js.map +1 -0
  19. package/lib/commonjs/overlay/use-overlay-layer.js +37 -0
  20. package/lib/commonjs/overlay/use-overlay-layer.js.map +1 -0
  21. package/lib/commonjs/popover/index.web.js +31 -34
  22. package/lib/commonjs/popover/index.web.js.map +1 -1
  23. package/lib/commonjs/prompt-input/PromptInput.js +33 -29
  24. package/lib/commonjs/prompt-input/PromptInput.js.map +1 -1
  25. package/lib/commonjs/select/index.web.js +20 -22
  26. package/lib/commonjs/select/index.web.js.map +1 -1
  27. package/lib/commonjs/styles/z-index.js +33 -34
  28. package/lib/commonjs/styles/z-index.js.map +1 -1
  29. package/lib/commonjs/surfaces/SurfaceHost.js +3 -6
  30. package/lib/commonjs/surfaces/SurfaceHost.js.map +1 -1
  31. package/lib/commonjs/toast/ToastHost.js +9 -5
  32. package/lib/commonjs/toast/ToastHost.js.map +1 -1
  33. package/lib/commonjs/tooltip/index.js +9 -6
  34. package/lib/commonjs/tooltip/index.js.map +1 -1
  35. package/lib/commonjs/tooltip/index.web.js +8 -2
  36. package/lib/commonjs/tooltip/index.web.js.map +1 -1
  37. package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js +5 -5
  38. package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
  39. package/lib/module/avatar-group/AvatarGroup.web.js +21 -20
  40. package/lib/module/avatar-group/AvatarGroup.web.js.map +1 -1
  41. package/lib/module/bottom-sheet/index.web.js +11 -6
  42. package/lib/module/bottom-sheet/index.web.js.map +1 -1
  43. package/lib/module/context-menu/index.web.js +21 -23
  44. package/lib/module/context-menu/index.web.js.map +1 -1
  45. package/lib/module/dialog/Dialog.js +67 -71
  46. package/lib/module/dialog/Dialog.js.map +1 -1
  47. package/lib/module/dialog/Dialog.web.js +50 -52
  48. package/lib/module/dialog/Dialog.web.js.map +1 -1
  49. package/lib/module/fonts/font-data.web.js +18 -0
  50. package/lib/module/fonts/font-data.web.js.map +1 -0
  51. package/lib/module/menu/index.web.js +16 -12
  52. package/lib/module/menu/index.web.js.map +1 -1
  53. package/lib/module/overlay/index.js +99 -8
  54. package/lib/module/overlay/index.js.map +1 -1
  55. package/lib/module/overlay/stack.js +161 -0
  56. package/lib/module/overlay/stack.js.map +1 -0
  57. package/lib/module/overlay/use-overlay-layer.js +33 -0
  58. package/lib/module/overlay/use-overlay-layer.js.map +1 -0
  59. package/lib/module/popover/index.web.js +32 -34
  60. package/lib/module/popover/index.web.js.map +1 -1
  61. package/lib/module/prompt-input/PromptInput.js +33 -29
  62. package/lib/module/prompt-input/PromptInput.js.map +1 -1
  63. package/lib/module/select/index.web.js +21 -23
  64. package/lib/module/select/index.web.js.map +1 -1
  65. package/lib/module/styles/z-index.js +32 -30
  66. package/lib/module/styles/z-index.js.map +1 -1
  67. package/lib/module/surfaces/SurfaceHost.js +3 -6
  68. package/lib/module/surfaces/SurfaceHost.js.map +1 -1
  69. package/lib/module/toast/ToastHost.js +10 -6
  70. package/lib/module/toast/ToastHost.js.map +1 -1
  71. package/lib/module/tooltip/index.js +9 -6
  72. package/lib/module/tooltip/index.js.map +1 -1
  73. package/lib/module/tooltip/index.web.js +8 -2
  74. package/lib/module/tooltip/index.web.js.map +1 -1
  75. package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js +5 -5
  76. package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
  77. package/lib/typescript/commonjs/avatar-group/AvatarGroup.web.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/bottom-sheet/index.web.d.ts.map +1 -1
  79. package/lib/typescript/commonjs/context-menu/index.web.d.ts.map +1 -1
  80. package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
  82. package/lib/typescript/commonjs/dialog/types.d.ts +0 -10
  83. package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/fonts/font-data.web.d.ts +5 -0
  85. package/lib/typescript/commonjs/fonts/font-data.web.d.ts.map +1 -0
  86. package/lib/typescript/commonjs/menu/index.web.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/overlay/index.d.ts +31 -6
  88. package/lib/typescript/commonjs/overlay/index.d.ts.map +1 -1
  89. package/lib/typescript/commonjs/overlay/stack.d.ts +122 -0
  90. package/lib/typescript/commonjs/overlay/stack.d.ts.map +1 -0
  91. package/lib/typescript/commonjs/overlay/use-overlay-layer.d.ts +7 -0
  92. package/lib/typescript/commonjs/overlay/use-overlay-layer.d.ts.map +1 -0
  93. package/lib/typescript/commonjs/popover/index.web.d.ts.map +1 -1
  94. package/lib/typescript/commonjs/prompt-input/PromptInput.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/select/index.web.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/styles/z-index.d.ts +42 -29
  97. package/lib/typescript/commonjs/styles/z-index.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/surfaces/SurfaceHost.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/toast/ToastHost.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/tooltip/index.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
  102. package/lib/typescript/module/avatar-group/AvatarGroup.web.d.ts.map +1 -1
  103. package/lib/typescript/module/bottom-sheet/index.web.d.ts.map +1 -1
  104. package/lib/typescript/module/context-menu/index.web.d.ts.map +1 -1
  105. package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
  106. package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
  107. package/lib/typescript/module/dialog/types.d.ts +0 -10
  108. package/lib/typescript/module/dialog/types.d.ts.map +1 -1
  109. package/lib/typescript/module/fonts/font-data.web.d.ts +5 -0
  110. package/lib/typescript/module/fonts/font-data.web.d.ts.map +1 -0
  111. package/lib/typescript/module/menu/index.web.d.ts.map +1 -1
  112. package/lib/typescript/module/overlay/index.d.ts +31 -6
  113. package/lib/typescript/module/overlay/index.d.ts.map +1 -1
  114. package/lib/typescript/module/overlay/stack.d.ts +122 -0
  115. package/lib/typescript/module/overlay/stack.d.ts.map +1 -0
  116. package/lib/typescript/module/overlay/use-overlay-layer.d.ts +7 -0
  117. package/lib/typescript/module/overlay/use-overlay-layer.d.ts.map +1 -0
  118. package/lib/typescript/module/popover/index.web.d.ts.map +1 -1
  119. package/lib/typescript/module/prompt-input/PromptInput.d.ts.map +1 -1
  120. package/lib/typescript/module/select/index.web.d.ts.map +1 -1
  121. package/lib/typescript/module/styles/z-index.d.ts +42 -29
  122. package/lib/typescript/module/styles/z-index.d.ts.map +1 -1
  123. package/lib/typescript/module/surfaces/SurfaceHost.d.ts.map +1 -1
  124. package/lib/typescript/module/toast/ToastHost.d.ts.map +1 -1
  125. package/lib/typescript/module/tooltip/index.d.ts.map +1 -1
  126. package/lib/typescript/module/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
  127. package/package.json +2 -1
  128. package/src/__tests__/ToastHostWebFork.test.ts +11 -3
  129. package/src/__tests__/overlay-stack-order.test.tsx +270 -0
  130. package/src/avatar-group/AvatarGroup.web.tsx +35 -31
  131. package/src/bottom-sheet/index.web.tsx +10 -5
  132. package/src/context-menu/index.web.tsx +33 -30
  133. package/src/dialog/Dialog.tsx +9 -18
  134. package/src/dialog/Dialog.web.tsx +62 -60
  135. package/src/dialog/types.ts +0 -10
  136. package/src/fonts/font-data.web.ts +15 -0
  137. package/src/menu/index.web.tsx +33 -22
  138. package/src/overlay/OverlayStacking.stories.tsx +207 -0
  139. package/src/overlay/index.tsx +114 -9
  140. package/src/overlay/stack.ts +166 -0
  141. package/src/overlay/use-overlay-layer.ts +39 -0
  142. package/src/popover/index.web.tsx +47 -44
  143. package/src/prompt-input/PromptInput.tsx +36 -29
  144. package/src/select/index.web.tsx +35 -32
  145. package/src/styles/z-index.ts +32 -34
  146. package/src/surfaces/SurfaceHost.tsx +3 -10
  147. package/src/toast/ToastHost.tsx +9 -6
  148. package/src/tooltip/index.tsx +14 -7
  149. package/src/tooltip/index.web.tsx +8 -2
  150. package/src/zoomable-image-gallery/ZoomableImageGallery.tsx +4 -4
@@ -26,8 +26,7 @@ import Animated, {
26
26
  } from 'react-native-reanimated';
27
27
 
28
28
  import { BottomSheet, type BottomSheetRef } from '../bottom-sheet';
29
- import { Backdrop } from '../overlay';
30
- import { Z_INDEX, Z_INDEX_LAYER_STEP } from '../styles/z-index';
29
+ import { Backdrop, OverlayRoot } from '../overlay';
31
30
  import { useTheme } from '../theme/use-theme';
32
31
  import { Context, useDialogControl } from './context';
33
32
  import { DialogBody } from './DialogContent';
@@ -117,7 +116,6 @@ function CenteredOrSideDialog({
117
116
  scrollable,
118
117
  morph,
119
118
  placement,
120
- layer,
121
119
  width = DEFAULT_SIDE_WIDTH,
122
120
  inset,
123
121
  dismissOnBackdrop = true,
@@ -297,7 +295,6 @@ function CenteredOrSideDialog({
297
295
  open={sideOpen}
298
296
  onDismiss={handleDismiss}
299
297
  side={placement}
300
- layer={layer}
301
298
  width={width}
302
299
  inset={inset}
303
300
  dismissOnBackdrop={dismissOnBackdrop}
@@ -393,7 +390,6 @@ function SideSheet({
393
390
  open,
394
391
  onDismiss,
395
392
  side,
396
- layer,
397
393
  width,
398
394
  inset,
399
395
  dismissOnBackdrop,
@@ -417,7 +413,6 @@ function SideSheet({
417
413
  open: boolean;
418
414
  onDismiss: () => void;
419
415
  side: 'left' | 'right';
420
- layer?: number;
421
416
  width: number;
422
417
  inset?: DialogInset;
423
418
  dismissOnBackdrop: boolean;
@@ -518,15 +513,10 @@ function SideSheet({
518
513
  if (!mounted) return null;
519
514
 
520
515
  return (
521
- <View
522
- pointerEvents="box-none"
523
- style={[
524
- sideStyles.root,
525
- // Per-layer offset so a side dialog stacked on top of another (surface
526
- // stack) paints above it. Layer 0 → offset 0 → unchanged.
527
- { zIndex: Z_INDEX.fullscreen + Z_INDEX_LAYER_STEP * (layer ?? 0) },
528
- containerStyle,
529
- ]}
516
+ // `OverlayRoot` takes this drawer's place in the open-order overlay stack.
517
+ // It mounts here, past the `mounted` guard, so the rank tracks OPENING.
518
+ <OverlayRoot
519
+ style={[sideStyles.root, containerStyle]}
530
520
  {...(containerClassName ? ({ className: containerClassName } as Record<string, string>) : {})}
531
521
  >
532
522
  <Backdrop
@@ -575,13 +565,14 @@ function SideSheet({
575
565
  <View style={{ padding: contentPadding }}>{children}</View>
576
566
  )}
577
567
  </Animated.View>
578
- </View>
568
+ </OverlayRoot>
579
569
  );
580
570
  }
581
571
 
582
572
  const sideStyles = StyleSheet.create({
583
- // `zIndex` is applied inline (`Z_INDEX.fullscreen + layer offset`) so a side
584
- // dialog stacked on top of another paints above it in the surface stack.
573
+ // No `zIndex` here: the drawer's depth relative to other surfaces is the
574
+ // overlay stack's decision, applied by `OverlayRoot` (see
575
+ // `src/overlay/stack.ts`).
585
576
  root: {
586
577
  ...StyleSheet.absoluteFill,
587
578
  },
@@ -25,7 +25,7 @@ import { RemoveScrollBar } from 'react-remove-scroll-bar';
25
25
 
26
26
  import { Backdrop, OverlayRoot } from '../overlay';
27
27
  import { Portal } from '../portal/index.web';
28
- import { createOverlayZIndex } from '../styles/z-index';
28
+ import { Z_INDEX } from '../styles/z-index';
29
29
  import { WEB_POSITION_FIXED, type WebCssStyle } from '../styles/web-view-style';
30
30
  import { bloomShadowStyle } from '../design-tokens/shadows';
31
31
  import { useTheme } from '../theme/use-theme';
@@ -170,7 +170,6 @@ function CenterOrSideDialog({
170
170
  actions,
171
171
  header,
172
172
  placement,
173
- layer,
174
173
  width = DEFAULT_SIDE_WIDTH,
175
174
  maxWidth = DEFAULT_CENTER_MAX_WIDTH,
176
175
  inset,
@@ -192,11 +191,6 @@ function CenterOrSideDialog({
192
191
  // stylesheet is present by the time the animated surface mounts).
193
192
  useDialogCss();
194
193
 
195
- // Per-layer overlay z-indices, so a dialog presented on top of another (via
196
- // the surface stack) paints above it. Defaults to layer 0 — the offset is 0,
197
- // so a lone dialog's z is byte-for-byte unchanged.
198
- const dialogZIndex = useMemo(() => createOverlayZIndex(layer ?? 0), [layer]);
199
-
200
194
  // Controlled mode is opt-in: when `open` is a boolean the host owns the
201
195
  // visible state; otherwise the legacy imperative `control` path drives it.
202
196
  const isControlled = controlledOpen !== undefined;
@@ -342,46 +336,51 @@ function CenterOrSideDialog({
342
336
  <Context.Provider value={context}>
343
337
  <ClosingContext.Provider value={isClosing}>
344
338
  <RemoveScrollBar />
345
- {/* The press target IS the full-viewport box, so it uses
346
- `Backdrop` (which opts back in from the Portal root's
347
- `pointer-events: none` via the `pointerEvents` PROP — the style
348
- form is dropped before it reaches the DOM, see `src/overlay`)
349
- and lays the panel out inside itself. */}
350
- <Backdrop
351
- onPress={() => close()}
352
- disabled={!dismissOnBackdrop}
353
- accessibilityLabel={label ? `Dismiss ${label}` : 'Dismiss dialog'}
354
- // The fade rides on the LAYERS, never on the press target: an
355
- // opacity animation on the blur's ancestor composites the group in
356
- // isolation and leaves `backdrop-filter` nothing to sample.
357
- progress={backdropFade}
358
- style={{
359
- position: WEB_POSITION_FIXED,
360
- zIndex: dialogZIndex.backdrop,
361
- alignItems: 'center',
362
- justifyContent: 'center',
363
- paddingHorizontal: 20,
364
- }}
365
- >
366
- <DialogPanel
367
- testID={testID}
368
- label={label}
369
- title={title}
370
- description={description}
371
- actions={actions}
372
- header={header}
373
- style={style}
374
- maxWidth={maxWidth}
375
- contentPadding={contentPadding}
376
- maxHeightRatio={maxHeightRatio}
377
- scrollable={scrollable}
378
- morph={morph}
379
- surfaceZIndex={dialogZIndex.surface}
380
- isClosing={isClosing}
339
+ {/* `OverlayRoot` takes this dialog's place in the open-order
340
+ overlay stack. It mounts here, inside the `isOpen` guard, which
341
+ is what makes the rank track OPENING rather than mounting — the
342
+ dialog is declared once at the app root and stays mounted for
343
+ the app's lifetime. */}
344
+ <OverlayRoot>
345
+ {/* The press target IS the full-viewport box, so it uses
346
+ `Backdrop` (which opts back in from the Portal root's
347
+ `pointer-events: none` via the `pointerEvents` PROP the style
348
+ form is dropped before it reaches the DOM, see `src/overlay`)
349
+ and lays the panel out inside itself. */}
350
+ <Backdrop
351
+ onPress={() => close()}
352
+ disabled={!dismissOnBackdrop}
353
+ accessibilityLabel={label ? `Dismiss ${label}` : 'Dismiss dialog'}
354
+ // The fade rides on the LAYERS, never on the press target: an
355
+ // opacity animation on the blur's ancestor composites the group in
356
+ // isolation and leaves `backdrop-filter` nothing to sample.
357
+ progress={backdropFade}
358
+ style={{
359
+ position: WEB_POSITION_FIXED,
360
+ alignItems: 'center',
361
+ justifyContent: 'center',
362
+ paddingHorizontal: 20,
363
+ }}
381
364
  >
382
- {children}
383
- </DialogPanel>
384
- </Backdrop>
365
+ <DialogPanel
366
+ testID={testID}
367
+ label={label}
368
+ title={title}
369
+ description={description}
370
+ actions={actions}
371
+ header={header}
372
+ style={style}
373
+ maxWidth={maxWidth}
374
+ contentPadding={contentPadding}
375
+ maxHeightRatio={maxHeightRatio}
376
+ scrollable={scrollable}
377
+ morph={morph}
378
+ isClosing={isClosing}
379
+ >
380
+ {children}
381
+ </DialogPanel>
382
+ </Backdrop>
383
+ </OverlayRoot>
385
384
  </ClosingContext.Provider>
386
385
  </Context.Provider>
387
386
  </Portal>
@@ -407,8 +406,6 @@ function CenterOrSideDialog({
407
406
  inset={inset}
408
407
  dismissOnBackdrop={dismissOnBackdrop}
409
408
  contentPadding={contentPadding}
410
- backdropZIndex={dialogZIndex.backdrop}
411
- surfaceZIndex={dialogZIndex.surface}
412
409
  onDismiss={close}
413
410
  panelStyle={panelStyle}
414
411
  panelClassName={panelClassName}
@@ -437,7 +434,6 @@ function DialogPanel({
437
434
  maxHeightRatio,
438
435
  scrollable,
439
436
  morph,
440
- surfaceZIndex,
441
437
  isClosing,
442
438
  children,
443
439
  }: {
@@ -453,7 +449,6 @@ function DialogPanel({
453
449
  maxHeightRatio?: number;
454
450
  scrollable?: boolean;
455
451
  morph?: boolean;
456
- surfaceZIndex: number;
457
452
  isClosing: boolean;
458
453
  children?: React.ReactNode;
459
454
  }) {
@@ -518,7 +513,12 @@ function DialogPanel({
518
513
  // Design-system overlay elevation (`shadow-m`) as a `boxShadow` — RN-Web
519
514
  // deprecated the `shadow*` style props.
520
515
  ...bloomShadowStyle('m'),
521
- zIndex: surfaceZIndex,
516
+ // Above this surface's OWN backdrop, and nothing more: `OverlayRoot`
517
+ // sets a z-index and a fixed position, so it is a stacking context and
518
+ // this value is scoped inside it. Where this dialog sits relative to
519
+ // OTHER surfaces is the overlay stack's decision, made once on
520
+ // `OverlayRoot` (see `src/overlay/stack.ts`) — never a number here.
521
+ zIndex: Z_INDEX.raised,
522
522
  },
523
523
  isClosing ? ZOOM_FADE_OUT : ZOOM_FADE_IN,
524
524
  // Drives `height` (and `maxWidth`) only while a morph is in flight; at
@@ -612,8 +612,6 @@ function SheetSurface({
612
612
  inset,
613
613
  dismissOnBackdrop,
614
614
  contentPadding,
615
- backdropZIndex,
616
- surfaceZIndex,
617
615
  onDismiss,
618
616
  panelStyle,
619
617
  panelClassName,
@@ -635,8 +633,6 @@ function SheetSurface({
635
633
  inset?: DialogInset;
636
634
  dismissOnBackdrop: boolean;
637
635
  contentPadding: number;
638
- backdropZIndex: number;
639
- surfaceZIndex: number;
640
636
  onDismiss: () => void;
641
637
  panelStyle?: StyleProp<ViewStyle>;
642
638
  panelClassName?: string;
@@ -714,7 +710,7 @@ function SheetSurface({
714
710
 
715
711
  return (
716
712
  <OverlayRoot
717
- style={[sheetStyles.root, { zIndex: backdropZIndex }, containerStyle]}
713
+ style={[sheetStyles.root, containerStyle]}
718
714
  {...(containerClassName ? ({ className: containerClassName } as Record<string, string>) : {})}
719
715
  >
720
716
  <Backdrop
@@ -744,7 +740,12 @@ function SheetSurface({
744
740
  sheetStyles.panel,
745
741
  {
746
742
  backgroundColor: theme.colors.background,
747
- zIndex: surfaceZIndex,
743
+ // Above this surface's OWN backdrop, and nothing more: `OverlayRoot`
744
+ // sets a z-index and a fixed position, so it is a stacking context and
745
+ // this value is scoped inside it. Where this dialog sits relative to
746
+ // OTHER surfaces is the overlay stack's decision, made once on
747
+ // `OverlayRoot` (see `src/overlay/stack.ts`) — never a number here.
748
+ zIndex: Z_INDEX.raised,
748
749
  pointerEvents: 'auto',
749
750
  // Design-system overlay elevation (`shadow-m`) as a `boxShadow`.
750
751
  ...bloomShadowStyle('m'),
@@ -866,9 +867,10 @@ export function AutoMountedDialog({
866
867
  // The annotation supplies the contextual type instead, so the literals narrow and
867
868
  // a genuine mistake still fails.
868
869
  const sheetStyles: Record<'root' | 'backdrop' | 'panel', ViewStyle> = {
869
- // `zIndex` for the root (backdrop) and panel (surface) is applied inline from
870
- // the per-layer `createOverlayZIndex(layer)` in `SheetSurface`, so a side
871
- // dialog stacked on top of another (surface stack) paints above it.
870
+ // No overlay `zIndex` here: `SheetSurface` renders an `OverlayRoot`, which
871
+ // assigns this drawer's depth from the open-order overlay stack, so a drawer
872
+ // opened on top of another surface paints above it (see
873
+ // `src/overlay/stack.ts`).
872
874
  root: {
873
875
  position: WEB_POSITION_FIXED,
874
876
  top: 0,
@@ -350,16 +350,6 @@ export type DialogProps = React.PropsWithChildren<{
350
350
  containerClassName?: string;
351
351
  /** Accessibility label, applied to the dialog role on web. */
352
352
  label?: string;
353
- /**
354
- * Stacking layer index within a coordinated surface stack. Multiplies
355
- * `Z_INDEX_LAYER_STEP` onto this dialog's overlay z-indices (backdrop +
356
- * panel) so a dialog presented on top of another paints above it. Defaults to
357
- * `0` — the single-dialog case, byte-for-byte unchanged. Set by the shared
358
- * surface stack (`src/surfaces`); direct consumers rarely need it. No-op for
359
- * the `bottom` placement, which already stacks in mount order (native RN
360
- * `<Modal>` / the web portal), so `layer` is harmless there.
361
- */
362
- layer?: number;
363
353
  }>;
364
354
 
365
355
  /**