@ngrok/mantle 0.83.7 → 0.83.9

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 (87) hide show
  1. package/dist/agent.json +1 -1
  2. package/dist/{alert-BQdon-PF.d.ts → alert-Blmunr_D.d.ts} +1 -1
  3. package/dist/{alert-cszhDIVl.js → alert-DDjzRuGa.js} +1 -1
  4. package/dist/alert-center.d.ts +1 -1
  5. package/dist/alert-center.js +1 -1
  6. package/dist/alert-dialog.d.ts +27 -16
  7. package/dist/alert-dialog.js +1 -1
  8. package/dist/alert.d.ts +1 -1
  9. package/dist/alert.js +1 -1
  10. package/dist/area-chart.d.ts +1 -1
  11. package/dist/area-chart.js +1 -1
  12. package/dist/bar-chart.d.ts +1 -1
  13. package/dist/bar-chart.js +1 -1
  14. package/dist/{button-DkUUma3k.d.ts → button-C39M5h4K.d.ts} +20 -3
  15. package/dist/button-CC10rP6X.js +1 -0
  16. package/dist/{button-BsfLZ42S.d.ts → button-CRCNRnk6.d.ts} +1 -1
  17. package/dist/button.d.ts +2 -2
  18. package/dist/button.js +1 -1
  19. package/dist/{chart-G2pIR4uW.js → chart-BDxpXPfo.js} +1 -1
  20. package/dist/{chart-TWkSYqAs.d.ts → chart-DgaWVBqi.d.ts} +10 -4
  21. package/dist/code-block.d.ts +9 -2
  22. package/dist/code-block.js +1 -1
  23. package/dist/combobox.d.ts +20 -15
  24. package/dist/command.d.ts +1 -1
  25. package/dist/command.js +1 -1
  26. package/dist/data-table.d.ts +1 -1
  27. package/dist/data-table.js +1 -1
  28. package/dist/{dialog-DJ6jSRyj.d.ts → dialog-CEk0L7M7.d.ts} +23 -15
  29. package/dist/dialog-CnlaqHNh.js +1 -0
  30. package/dist/{dialog-BM4wPCft.d.ts → dialog-u8PtHYES.d.ts} +7 -1
  31. package/dist/dialog.d.ts +2 -2
  32. package/dist/dialog.js +1 -1
  33. package/dist/dropdown-menu-CNaaABck.d.ts +1 -0
  34. package/dist/{dropdown-menu-DZOfj6HB.d.ts → dropdown-menu-CpsUJGbn.d.ts} +34 -16
  35. package/dist/dropdown-menu-DJDrRzDU.js +1 -0
  36. package/dist/dropdown-menu.d.ts +2 -2
  37. package/dist/dropdown-menu.js +1 -1
  38. package/dist/field.d.ts +2 -2
  39. package/dist/field.js +1 -1
  40. package/dist/hover-card.d.ts +60 -16
  41. package/dist/hover-card.js +1 -1
  42. package/dist/input.js +1 -1
  43. package/dist/layer-container-CglTh9-6.js +1 -0
  44. package/dist/layer-container.d.ts +57 -0
  45. package/dist/layer-container.js +1 -0
  46. package/dist/line-chart.d.ts +1 -1
  47. package/dist/line-chart.js +1 -1
  48. package/dist/llms.txt +1 -1
  49. package/dist/mantle.css +54 -1
  50. package/dist/multi-select.d.ts +25 -15
  51. package/dist/multi-select.js +1 -1
  52. package/dist/pagination.d.ts +2 -2
  53. package/dist/pagination.js +1 -1
  54. package/dist/popover-D6x6Bq-G.js +1 -0
  55. package/dist/{popover-C9fEVWL1.d.ts → popover-DDuw1UaJ.d.ts} +24 -12
  56. package/dist/popover.d.ts +1 -1
  57. package/dist/popover.js +1 -1
  58. package/dist/primitive-BWyxJnXn.js +1 -0
  59. package/dist/scatter-plot.d.ts +1 -1
  60. package/dist/scatter-plot.js +1 -1
  61. package/dist/select-BK6n6OIK.js +1 -0
  62. package/dist/{select-DVHmgih8.d.ts → select-DkFkSYBP.d.ts} +30 -15
  63. package/dist/select.d.ts +1 -1
  64. package/dist/select.js +1 -1
  65. package/dist/sheet-BcfnKUit.js +1 -0
  66. package/dist/sheet.d.ts +24 -16
  67. package/dist/sheet.js +1 -1
  68. package/dist/sidebar.d.ts +5 -6
  69. package/dist/sidebar.js +1 -1
  70. package/dist/split-button.d.ts +2 -2
  71. package/dist/split-button.js +1 -1
  72. package/dist/theme-switcher.d.ts +8 -8
  73. package/dist/theme-switcher.js +1 -1
  74. package/dist/{tooltip-DuXGxIse.d.ts → tooltip-BKWK5c7_.d.ts} +30 -15
  75. package/dist/tooltip-BZRRJgpm.js +1 -0
  76. package/dist/tooltip.d.ts +1 -1
  77. package/dist/tooltip.js +1 -1
  78. package/package.json +5 -5
  79. package/dist/button-CNg69RsV.js +0 -1
  80. package/dist/dialog-BYILOABg.js +0 -1
  81. package/dist/dropdown-menu-BRH0Wd_z.js +0 -1
  82. package/dist/dropdown-menu-BcALUQMp.d.ts +0 -1
  83. package/dist/popover-B1ZzHCym.js +0 -1
  84. package/dist/primitive-D-9GIFWb.js +0 -1
  85. package/dist/select-LK9NX-vV.js +0 -1
  86. package/dist/sheet-CfFXVAzz.js +0 -1
  87. package/dist/tooltip-Dnu35cjU.js +0 -1
@@ -1,5 +1,5 @@
1
- import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-DkUUma3k.js";
2
- import { a as Root, i as Overlay$1, n as Content$1, o as Title$1, r as Description$1, s as Trigger$1, t as Close$1 } from "./dialog-BM4wPCft.js";
1
+ import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-C39M5h4K.js";
2
+ import { a as Portal, c as Trigger$1, i as Overlay$1, n as Content$1, o as Root, r as Description$1, s as Title$1, t as Close$1 } from "./dialog-u8PtHYES.js";
3
3
  import { ComponentProps } from "react";
4
4
  //#region src/components/dialog/dialog.d.ts
5
5
  /**
@@ -142,9 +142,11 @@ type ContentProps = ComponentProps<typeof Content$1> & ({
142
142
  * The container for the dialog content.
143
143
  * Renders on top of the overlay and is centered in the viewport.
144
144
  *
145
- * `Dialog.Content` renders its floating layer at Tailwind `z-50`, Mantle's
146
- * shared floating z-index. When multiple shared layers are open, the most
147
- * recently mounted layer renders on top.
145
+ * `Dialog.Content` renders its floating layer at Tailwind `z-60`, Mantle's
146
+ * overlay tier, above every float (`z-50`). Floats composed inside the content
147
+ * portal into the positioner (`data-slot="dialog-positioner"`) and paint above
148
+ * the content. When multiple overlays are open, the most recently mounted
149
+ * overlay renders on top.
148
150
  *
149
151
  * `appearance` decides how much of the viewport the dialog claims. `"centered"`
150
152
  * caps it at `preferredWidth`, `"full-page"` fills the 16px-inset box, and
@@ -422,9 +424,11 @@ declare const Description: ({ className, ref, ...props }: ComponentProps<typeof
422
424
  * For side-panel content that slides in from an edge (filter panels, detail
423
425
  * views, navigation drawers), prefer `Sheet`.
424
426
  *
425
- * `Dialog` renders its floating layer at Tailwind `z-50`, Mantle's shared
426
- * floating z-index. When multiple shared layers are open, the most recently
427
- * mounted layer renders on top.
427
+ * `Dialog` renders its floating layer at Tailwind `z-60`, Mantle's overlay
428
+ * tier, above every float (`z-50`). Floats composed inside the content portal
429
+ * into the positioner (`data-slot="dialog-positioner"`) and paint above the
430
+ * content. When multiple overlays are open, the most recently mounted overlay
431
+ * renders on top.
428
432
  *
429
433
  * @see https://mantle.ngrok.com/components/overlays/dialog
430
434
  *
@@ -473,9 +477,11 @@ declare const Dialog: {
473
477
  * A window overlaid on either the primary window or another dialog window.
474
478
  * The root stateful component for the Dialog.
475
479
  *
476
- * `Dialog` renders its floating layer at Tailwind `z-50`, Mantle's shared
477
- * floating z-index. When multiple shared layers are open, the most recently
478
- * mounted layer renders on top.
480
+ * `Dialog` renders its floating layer at Tailwind `z-60`, Mantle's overlay
481
+ * tier, above every float (`z-50`). Floats composed inside the content portal
482
+ * into the positioner (`data-slot="dialog-positioner"`) and paint above the
483
+ * content. When multiple overlays are open, the most recently mounted overlay
484
+ * renders on top.
479
485
  *
480
486
  * @see https://mantle.ngrok.com/components/overlays/dialog#dialogroot
481
487
  *
@@ -602,9 +608,11 @@ declare const Dialog: {
602
608
  * The container for the dialog content.
603
609
  * Renders on top of the overlay and is centered in the viewport.
604
610
  *
605
- * `Dialog.Content` renders its floating layer at Tailwind `z-50`, Mantle's
606
- * shared floating z-index. When multiple shared layers are open, the most
607
- * recently mounted layer renders on top.
611
+ * `Dialog.Content` renders its floating layer at Tailwind `z-60`, Mantle's
612
+ * overlay tier, above every float (`z-50`). Floats composed inside the content
613
+ * portal into the positioner (`data-slot="dialog-positioner"`) and paint above
614
+ * the content. When multiple overlays are open, the most recently mounted
615
+ * overlay renders on top.
608
616
  *
609
617
  * `appearance` decides how much of the viewport the dialog claims. `"centered"`
610
618
  * caps it at `preferredWidth`, `"full-page"` fills the 16px-inset box, and
@@ -827,7 +835,7 @@ declare const Dialog: {
827
835
  * </Dialog.Root>
828
836
  * ```
829
837
  */
830
- readonly Portal: import("react").FC<import("@radix-ui/react-dialog").DialogPortalProps>;
838
+ readonly Portal: typeof Portal;
831
839
  /**
832
840
  * An accessible name to be announced when the dialog is opened.
833
841
  *
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./button-CC10rP6X.js";import{t as n}from"./layer-container-CglTh9-6.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./primitive-BWyxJnXn.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{XIcon as p}from"@phosphor-icons/react/X";const m=s,h=e=>d(i,{"data-slot":`dialog-trigger`,...e}),g=r,_=e=>d(u,{"data-slot":`dialog-close`,...e}),v=({className:t,ref:n,...r})=>d(a,{ref:n,"data-slot":`dialog-overlay`,className:e(`bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-60 backdrop-blur-xs`,t),...r}),y={centered:`inset-4`,"full-page":`inset-4`,"full-bleed":`inset-0`},b={centered:`border-dialog rounded-xl border`,"full-page":`border-dialog h-full max-w-none rounded-xl border`,"full-bleed":`h-full max-w-none`},x={Root:m,Body:({className:t,...n})=>d(`div`,{"data-slot":`dialog-body`,className:e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,t),...n}),Close:_,CloseIconButton:({size:e=`md`,type:n=`button`,label:r=`Close Dialog`,appearance:i=`ghost`,intent:a=`neutral`,...o})=>d(u,{asChild:!0,children:d(t,{appearance:i,"data-slot":`dialog-close-icon-button`,icon:d(p,{}),intent:a,label:r,size:e,type:n,...o})}),Content:({appearance:t=`centered`,children:r,className:i,preferredWidth:a,ref:s,...c})=>f(g,{children:[d(v,{}),d(n,{"data-slot":`dialog-positioner`,className:e(`fixed z-60 flex items-center justify-center`,y[t]),children:d(o,{"data-appearance":t,"data-mantle-modal-content":!0,"data-slot":`dialog-content`,className:e(`flex max-h-full w-full flex-1 flex-col`,`outline-hidden focus-within:outline-hidden`,`bg-dialog shadow-lg transition-transform duration-200`,`data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,b[t],t===`centered`&&(a??`max-w-lg`),i),ref:s,...c,children:r})})]}),Description:({className:t,ref:n,...r})=>d(c,{ref:n,"data-slot":`dialog-description`,className:e(`text-muted`,t),...r}),Footer:({className:t,...n})=>d(`div`,{"data-slot":`dialog-footer`,className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-4`,t),...n}),Header:({className:t,children:n,...r})=>d(`div`,{"data-slot":`dialog-header`,className:e(`border-dialog-muted text-strong relative flex shrink-0 items-center justify-between gap-2 border-b px-6 py-4`,`has-[.icon-button]:pr-4`,t),...r,children:n}),Overlay:v,Portal:g,Title:({className:t,ref:n,...r})=>d(l,{ref:n,"data-slot":`dialog-title`,className:e(`text-strong truncate text-lg font-medium`,t),...r}),Trigger:h};export{x as t};
@@ -4,6 +4,12 @@ import * as DialogPrimitive from "@radix-ui/react-dialog";
4
4
  type DialogPrimitiveContentProps = ComponentProps<typeof DialogPrimitive.Content>;
5
5
  declare function Root(props: ComponentPropsWithoutRef<typeof DialogPrimitive.Root>): import("react").JSX.Element;
6
6
  declare const Trigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
7
+ /**
8
+ * Mounts dialog layers into the nearest layer container — an enclosing
9
+ * overlay's positioner when one is open, else `document.body`. An explicit
10
+ * `container` prop wins over both.
11
+ */
12
+ declare const Portal: ({ container, ...props }: ComponentProps<typeof DialogPrimitive.Portal>) => import("react").JSX.Element;
7
13
  declare const Close: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
8
14
  declare const Overlay: (props: ComponentProps<typeof DialogPrimitive.Overlay>) => import("react").JSX.Element;
9
15
  declare const Content: ({ onEscapeKeyDown, onInteractOutside, onPointerDownOutside, ref, ...props }: DialogPrimitiveContentProps) => import("react").JSX.Element;
@@ -21,4 +27,4 @@ declare const Description: ({ asChild, children, ref, ...props }: ComponentProps
21
27
  */
22
28
  declare function isDialogOverlayTarget(target: EventTarget | null): boolean;
23
29
  //#endregion
24
- export { Root as a, isDialogOverlayTarget as c, Overlay as i, Content as n, Title as o, Description as r, Trigger as s, Close as t };
30
+ export { Portal as a, Trigger as c, Overlay as i, isDialogOverlayTarget as l, Content as n, Root as o, Description as r, Title as s, Close as t };
package/dist/dialog.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { c as isDialogOverlayTarget } from "./dialog-BM4wPCft.js";
2
- import { t as Dialog } from "./dialog-DJ6jSRyj.js";
1
+ import { l as isDialogOverlayTarget } from "./dialog-u8PtHYES.js";
2
+ import { t as Dialog } from "./dialog-CEk0L7M7.js";
3
3
  export { Dialog, isDialogOverlayTarget };
package/dist/dialog.js CHANGED
@@ -1 +1 @@
1
- import{l as e}from"./primitive-D-9GIFWb.js";import{t}from"./dialog-BYILOABg.js";export{t as Dialog,e as isDialogOverlayTarget};
1
+ import{l as e}from"./primitive-BWyxJnXn.js";import{t}from"./dialog-CnlaqHNh.js";export{t as Dialog,e as isDialogOverlayTarget};
@@ -0,0 +1 @@
1
+ import "./dropdown-menu-CpsUJGbn.js";
@@ -89,9 +89,12 @@ declare const SubTrigger: ({ className, inset, children, ...props }: ComponentPr
89
89
  /**
90
90
  * The content container for a dropdown menu sub-menu.
91
91
  *
92
- * `DropdownMenu.SubContent` renders at Tailwind `z-50`, Mantle's shared
93
- * floating z-index. When multiple shared layers are open, the most recently
94
- * mounted layer renders on top.
92
+ * `DropdownMenu.Content` and `DropdownMenu.SubContent` render at Tailwind
93
+ * `z-50`, Mantle's float tier. When composed inside an open `Dialog`,
94
+ * `AlertDialog`, or `Sheet`, they portal into that overlay's positioner and
95
+ * paint above the overlay that owns them. Outside every overlay, they portal to
96
+ * `document.body`, below the overlay tier (`z-60`). When sibling floats share a
97
+ * container, the most recently mounted float paints on top.
95
98
  *
96
99
  * @see https://mantle.ngrok.com/components/overlays/dropdown-menu#dropdownmenusubcontent
97
100
  *
@@ -121,9 +124,12 @@ type DropdownMenuContentProps = ComponentProps<typeof DropdownMenuPrimitive.Cont
121
124
  /**
122
125
  * The container for the dropdown menu content.
123
126
  *
124
- * `DropdownMenu.Content` renders at Tailwind `z-50`, Mantle's shared floating
125
- * z-index. When multiple shared layers are open, the most recently mounted
126
- * layer renders on top.
127
+ * `DropdownMenu.Content` and `DropdownMenu.SubContent` render at Tailwind
128
+ * `z-50`, Mantle's float tier. When composed inside an open `Dialog`,
129
+ * `AlertDialog`, or `Sheet`, they portal into that overlay's positioner and
130
+ * paint above the overlay that owns them. Outside every overlay, they portal to
131
+ * `document.body`, below the overlay tier (`z-60`). When sibling floats share a
132
+ * container, the most recently mounted float paints on top.
127
133
  *
128
134
  * @see https://mantle.ngrok.com/components/overlays/dropdown-menu#dropdownmenucontent
129
135
  *
@@ -271,8 +277,11 @@ declare const Shortcut: ({ className, ...props }: ComponentProps<"span">) => imp
271
277
  * A menu of options or actions, triggered by a button.
272
278
  *
273
279
  * `DropdownMenu.Content` and `DropdownMenu.SubContent` render at Tailwind
274
- * `z-50`, Mantle's shared floating z-index. When multiple shared layers are
275
- * open, the most recently mounted layer renders on top.
280
+ * `z-50`, Mantle's float tier. When composed inside an open `Dialog`,
281
+ * `AlertDialog`, or `Sheet`, they portal into that overlay's positioner and
282
+ * paint above the overlay that owns them. Outside every overlay, they portal to
283
+ * `document.body`, below the overlay tier (`z-60`). When sibling floats share a
284
+ * container, the most recently mounted float paints on top.
276
285
  *
277
286
  * @see https://mantle.ngrok.com/components/overlays/dropdown-menu
278
287
  *
@@ -315,8 +324,11 @@ declare const DropdownMenu: {
315
324
  * The root, stateful component that manages the open/closed state of the dropdown menu.
316
325
  *
317
326
  * `DropdownMenu.Content` and `DropdownMenu.SubContent` render at Tailwind
318
- * `z-50`, Mantle's shared floating z-index. When multiple shared layers are
319
- * open, the most recently mounted layer renders on top.
327
+ * `z-50`, Mantle's float tier. When composed inside an open `Dialog`,
328
+ * `AlertDialog`, or `Sheet`, they portal into that overlay's positioner and
329
+ * paint above the overlay that owns them. Outside every overlay, they portal
330
+ * to `document.body`, below the overlay tier (`z-60`). When sibling floats
331
+ * share a container, the most recently mounted float paints on top.
320
332
  *
321
333
  * @see https://mantle.ngrok.com/components/overlays/dropdown-menu#dropdownmenuroot
322
334
  *
@@ -356,9 +368,12 @@ declare const DropdownMenu: {
356
368
  /**
357
369
  * The container for the dropdown menu content. Appears in a portal with scrolling and animations.
358
370
  *
359
- * `DropdownMenu.Content` renders at Tailwind `z-50`, Mantle's shared
360
- * floating z-index. When multiple shared layers are open, the most recently
361
- * mounted layer renders on top.
371
+ * `DropdownMenu.Content` and `DropdownMenu.SubContent` render at Tailwind
372
+ * `z-50`, Mantle's float tier. When composed inside an open `Dialog`,
373
+ * `AlertDialog`, or `Sheet`, they portal into that overlay's positioner and
374
+ * paint above the overlay that owns them. Outside every overlay, they portal
375
+ * to `document.body`, below the overlay tier (`z-60`). When sibling floats
376
+ * share a container, the most recently mounted float paints on top.
362
377
  *
363
378
  * @see https://mantle.ngrok.com/components/overlays/dropdown-menu#dropdownmenucontent
364
379
  *
@@ -535,9 +550,12 @@ declare const DropdownMenu: {
535
550
  /**
536
551
  * The content container for submenu items.
537
552
  *
538
- * `DropdownMenu.SubContent` renders at Tailwind `z-50`, Mantle's shared
539
- * floating z-index. When multiple shared layers are open, the most recently
540
- * mounted layer renders on top.
553
+ * `DropdownMenu.Content` and `DropdownMenu.SubContent` render at Tailwind
554
+ * `z-50`, Mantle's float tier. When composed inside an open `Dialog`,
555
+ * `AlertDialog`, or `Sheet`, they portal into that overlay's positioner and
556
+ * paint above the overlay that owns them. Outside every overlay, they portal
557
+ * to `document.body`, below the overlay tier (`z-60`). When sibling floats
558
+ * share a container, the most recently mounted float paints on top.
541
559
  *
542
560
  * @see https://mantle.ngrok.com/components/overlays/dropdown-menu#dropdownmenusubcontent
543
561
  *
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{r}from"./layer-container-CglTh9-6.js";import{n as i}from"./separator-D0D6VyyM.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{CheckIcon as s}from"@phosphor-icons/react/Check";import{CaretRightIcon as c}from"@phosphor-icons/react/CaretRight";import*as l from"@radix-ui/react-dropdown-menu";const u=l.Root,d=e=>a(l.Trigger,{"data-slot":`dropdown-menu-trigger`,...e}),f=({className:t,...n})=>a(l.Group,{"data-slot":`dropdown-menu-group`,className:e(`space-y-px`,t),...n}),p=({container:e,...t})=>{let n=r();return a(l.Portal,{container:e??n,...t})},m={Root:u,CheckboxItem:({className:n,children:r,checked:i,...c})=>o(l.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:e(`text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded-md py-1.5 pl-2 pr-9 text-sm font-normal outline-hidden`,`data-highlighted:bg-active-menu-item`,`aria-checked:bg-selected-menu-item`,`data-highlighted:aria-checked:bg-active-selected-menu-item!`,`[&>svg]:size-5 [&_svg]:shrink-0`,n),checked:i,...c,children:[a(`span`,{className:`absolute right-2 flex items-center`,children:a(l.ItemIndicator,{children:a(t,{svg:a(s,{weight:`bold`}),className:`size-4 text-accent-600`})})}),r]}),Content:({className:t,"data-slot":r,onClick:i,loop:o=!0,width:s,...c})=>a(p,{children:a(l.Content,{"data-slot":n(r,`dropdown-menu-content`),className:e(`scrollbar`,`text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-32 overflow-hidden rounded-md border shadow-xl outline-hidden space-y-px font-sans`,`data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,`my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)-16px)] overflow-auto`,s===`trigger`&&`w-(--radix-dropdown-menu-trigger-width)`,t),loop:o,onClick:e=>{e.stopPropagation(),i?.(e)},...c})}),Group:f,Item:({className:t,inset:n,...r})=>a(l.Item,{"data-slot":`dropdown-menu-item`,className:e(`relative flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-strong text-sm font-normal outline-hidden transition-colors`,`data-highlighted:bg-active-menu-item`,`focus:bg-accent focus:text-accent-foreground`,`data-disabled:cursor-default data-disabled:opacity-50`,`[&>svg]:size-5 [&_svg]:shrink-0`,n&&`pl-8`,t),...r}),Label:({className:t,inset:n,...r})=>a(l.Label,{"data-slot":`dropdown-menu-label`,className:e(`px-2 py-1.5 text-sm font-medium`,n&&`pl-8`,t),...r}),RadioGroup:({className:t,...n})=>a(l.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,className:e(`space-y-px`,t),...n}),RadioItem:({className:n,children:r,...i})=>o(l.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:e(`group/dropdown-menu-radio-item`,`text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded-md py-1.5 px-2 text-sm font-normal outline-none`,`data-highlighted:bg-active-menu-item`,`aria-checked:bg-selected-menu-item aria-checked:pr-9`,`data-highlighted:aria-checked:bg-active-selected-menu-item!`,`[&>svg]:size-5 [&_svg]:shrink-0`,n),...i,children:[a(`span`,{className:`absolute right-2 items-center hidden group-aria-checked/dropdown-menu-radio-item:flex`,children:a(l.ItemIndicator,{children:a(t,{svg:a(s,{weight:`bold`}),className:`size-4 text-accent-600`})})}),r]}),Separator:({className:t,...n})=>a(i,{"data-slot":`dropdown-menu-separator`,className:e(`-mx-1.25 my-1 w-auto`,t),...n}),Shortcut:({className:t,...n})=>a(`span`,{"data-slot":`dropdown-menu-shortcut`,className:e(`ml-auto text-xs tracking-widest opacity-60`,t),...n}),Sub:l.Sub,SubContent:({className:t,loop:n=!0,...r})=>a(p,{children:a(l.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:e(`scrollbar`,`text-popover-foreground border-popover bg-popover p-1.25 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border shadow-xl space-y-px font-sans`,`my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)-16px)] overflow-auto`,t),loop:n,...r})}),SubTrigger:({className:n,inset:r,children:i,...s})=>o(l.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,className:e(`focus:bg-accent data-state-open:bg-accent relative flex select-none items-center rounded-md py-1.5 pl-2 pr-9 text-sm outline-hidden`,`data-highlighted:bg-active-menu-item data-state-open:bg-active-menu-item`,`[&>svg]:size-5 [&_svg]:shrink-0`,r&&`pl-8`,n),...s,children:[i,a(`span`,{className:`absolute right-2 flex items-center`,children:a(t,{svg:a(c,{weight:`bold`}),className:`size-4`})})]}),Trigger:d};export{m as t};
@@ -1,3 +1,3 @@
1
- import { t as DropdownMenu } from "./dropdown-menu-DZOfj6HB.js";
2
- import "./dropdown-menu-BcALUQMp.js";
1
+ import { t as DropdownMenu } from "./dropdown-menu-CpsUJGbn.js";
2
+ import "./dropdown-menu-CNaaABck.js";
3
3
  export { DropdownMenu };
@@ -1 +1 @@
1
- import{t as e}from"./dropdown-menu-BRH0Wd_z.js";export{e as DropdownMenu};
1
+ import{t as e}from"./dropdown-menu-DJDrRzDU.js";export{e as DropdownMenu};
package/dist/field.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-DkUUma3k.js";
2
+ import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-C39M5h4K.js";
3
3
  import { a as ValidationState, c as parseValidation, i as ValidationProp, l as resolveValidation, n as ParsedValidation, o as WithValidation, r as Validation, s as isAriaInvalid, t as AriaInvalid } from "./field-7QeiTFwl.js";
4
4
  import { t as Label } from "./label-C6YH9skg.js";
5
5
  import { t as Slot } from "./slot-DdgxmuI5.js";
6
- import { t as Popover } from "./popover-C9fEVWL1.js";
6
+ import { t as Popover } from "./popover-DDuw1UaJ.js";
7
7
  import { ComponentProps, ReactElement, ReactNode } from "react";
8
8
  //#region src/components/field/field-context.d.ts
9
9
  /**
package/dist/field.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./slot-DpNWVci8.js";import{t as r}from"./button-CNg69RsV.js";import{i,n as a,r as o,t as s}from"./field-Bpptk_9t.js";import{n as c,r as l,t as u}from"./field-B1wqeZr4.js";import{t as d}from"./label-D-D11mlp.js";import{t as f}from"./popover-B1ZzHCym.js";import{Children as p,Fragment as m,cloneElement as h,isValidElement as g,useCallback as _,useContext as v,useId as y,useMemo as b,useState as x}from"react";import S from"tiny-invariant";import{jsx as C}from"react/jsx-runtime";import{QuestionIcon as w}from"@phosphor-icons/react/Question";const T=e=>{let t=[],n=new Set;for(let r of e??[]){if(typeof r!=`string`)continue;let e=r.trim();e.length===0||n.has(e)||(n.add(e),t.push(e))}return t},E=e=>!(e==null||typeof e==`boolean`||typeof e==`string`&&e.trim().length===0),D=({children:e,errorItemType:t})=>{let n=!1;return p.forEach(e,e=>{if(!(n||e==null||typeof e==`boolean`)){if(typeof e==`string`){e.trim().length>0&&(n=!0);return}if(!g(e)){n=!0;return}if(e.type===t){n=E(e.props.children);return}if(e.type===m){n=D({children:e.props.children,errorItemType:t});return}n=!0}}),n},O=({className:e,ref:n,...r})=>C(`fieldset`,{ref:n,"data-slot":`field-set`,className:t(`flex w-full min-w-0 flex-col gap-4 border-0 p-0`,e),...r}),k=({className:e,ref:n,...r})=>C(`legend`,{ref:n,"data-slot":`field-legend`,className:t(`text-strong mb-1.5 text-sm font-medium font-sans`,e),...r}),A=({htmlFor:e,ref:t,...n})=>{let r=v(c);return C(d,{ref:t,htmlFor:e??r?.controlId,...n})},j=({asChild:e,className:r,ref:i,...a})=>C(e?n:`p`,{ref:i,"data-slot":`field-label-text`,className:t(`text-strong text-sm font-medium font-sans`,r),...a}),M=({asChild:e,className:r,ref:i,...a})=>C(e?n:`div`,{ref:i,"data-slot":`field-label-row`,className:t(`flex items-center gap-1`,r),...a}),N=f.Root,P=C(w,{}),F=({appearance:e=`ghost`,className:n,icon:i=P,intent:a=`neutral`,label:o,ref:s,size:c=`xs`,type:l=`button`,...u})=>C(f.Trigger,{asChild:!0,children:C(r,{ref:s,appearance:e,className:t(`text-body -my-0.5`,n),icon:i,intent:a,label:o,size:c,type:l,...u})}),I=({ref:e,...t})=>C(f.Content,{ref:e,"data-slot":`field-help-content`,...t}),L=({asChild:e,children:r,className:i,ref:a,...o})=>C(e?n:`span`,{ref:a,"data-slot":`field-optional`,className:t(`text-muted text-sm font-normal font-sans`,i),...o,children:r??`(Optional)`}),R=({asChild:e,className:r,ref:i,...a})=>C(e?n:`div`,{ref:i,"data-slot":`field-group`,className:t(`flex w-full flex-col gap-4`,r),...a}),z=({asChild:e,children:r,className:a,name:o,ref:l,validation:u,...d})=>{let f=e?n:`div`,p=y(),m=y(),h=y(),[g,v]=x(!1),S=i(u??(g?`error`:void 0)),w=_(()=>(v(!0),()=>{v(!1)}),[]),T=b(()=>({controlId:p,descriptionId:m,errorId:h,hasErrors:g,name:o,registerError:w,validation:S}),[p,m,h,g,o,w,S]);return C(c.Provider,{value:T,children:C(s,{validation:S,children:C(f,{ref:l,"data-slot":`field-item`,"data-validation":S,className:t(`flex w-full flex-col gap-1.5`,a),...d,children:r})})})},B=({children:e,ref:t,...r})=>{let i=v(c),a=l({context:i});return typeof e==`function`?C(s,{validation:a.validation,children:C(u.Provider,{value:i?a.ariaProps:null,children:e(a.ariaProps)})}):(S(g(e),`Field.Control expects a single React element child (or a render-prop function). Got a non-element value (string, array, fragment, null, or undefined). Wrap the control in a single element, or use the function child form: <Field.Control>{(props) => <YourControl {...props} />}</Field.Control>.`),C(s,{validation:a.validation,children:C(u.Provider,{value:i?a.ariaProps:null,children:C(n,{ref:t,...r,children:h(e,a.ariaProps)})})}))},V=({asChild:e,className:r,ref:i,...a})=>{let o=e?n:`p`,s=v(c);return C(o,{ref:i,"data-slot":`field-description`,id:s?.descriptionId,className:t(`text-body text-sm leading-4`,`[:where([data-slot=field-error-list]+&)]:-mt-1.5`,r),...a})},H=({children:e,className:n,ref:r,...i})=>E(e)?C(`li`,{ref:r,"data-slot":`field-error`,className:t(`text-danger-600 text-sm leading-4`,n),...i,children:e}):null,U=({messages:e,ref:t,...n})=>C(W,{ref:t,...n,children:T(e).map(e=>C(H,{children:e},e))}),W=({asChild:r,children:i,className:a,ref:o,...s})=>{let l=D({children:i,errorItemType:H}),u=v(c),d=u?.registerError;return e(()=>{if(!(!l||d==null))return d()},[l,d]),l?C(r?n:`ul`,{ref:o,"data-slot":`field-error-list`,id:u?.errorId,role:`list`,className:t(`m-0 flex w-full flex-col list-none p-0`,a),...s,children:i}):null},G={Item:z,Control:B,Group:R,Set:O,Legend:k,Label:A,LabelText:j,LabelRow:M,Help:N,HelpTrigger:F,HelpContent:I,Optional:L,Description:V,Errors:U,ErrorList:W,ErrorItem:H},K=e=>T(e?.map(e=>typeof e==`string`||!e?e:e.message));export{G as Field,a as isAriaInvalid,o as parseValidation,i as resolveValidation,K as toErrorMessages};
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./slot-DpNWVci8.js";import{t as r}from"./button-CC10rP6X.js";import{i,n as a,r as o,t as s}from"./field-Bpptk_9t.js";import{n as c,r as l,t as u}from"./field-B1wqeZr4.js";import{t as d}from"./label-D-D11mlp.js";import{t as f}from"./popover-D6x6Bq-G.js";import{Children as p,Fragment as m,cloneElement as h,isValidElement as g,useCallback as _,useContext as v,useId as y,useMemo as b,useState as x}from"react";import S from"tiny-invariant";import{jsx as C}from"react/jsx-runtime";import{QuestionIcon as w}from"@phosphor-icons/react/Question";const T=e=>{let t=[],n=new Set;for(let r of e??[]){if(typeof r!=`string`)continue;let e=r.trim();e.length===0||n.has(e)||(n.add(e),t.push(e))}return t},E=e=>!(e==null||typeof e==`boolean`||typeof e==`string`&&e.trim().length===0),D=({children:e,errorItemType:t})=>{let n=!1;return p.forEach(e,e=>{if(!(n||e==null||typeof e==`boolean`)){if(typeof e==`string`){e.trim().length>0&&(n=!0);return}if(!g(e)){n=!0;return}if(e.type===t){n=E(e.props.children);return}if(e.type===m){n=D({children:e.props.children,errorItemType:t});return}n=!0}}),n},O=({className:e,ref:n,...r})=>C(`fieldset`,{ref:n,"data-slot":`field-set`,className:t(`flex w-full min-w-0 flex-col gap-4 border-0 p-0`,e),...r}),k=({className:e,ref:n,...r})=>C(`legend`,{ref:n,"data-slot":`field-legend`,className:t(`text-strong mb-1.5 text-sm font-medium font-sans`,e),...r}),A=({htmlFor:e,ref:t,...n})=>{let r=v(c);return C(d,{ref:t,htmlFor:e??r?.controlId,...n})},j=({asChild:e,className:r,ref:i,...a})=>C(e?n:`p`,{ref:i,"data-slot":`field-label-text`,className:t(`text-strong text-sm font-medium font-sans`,r),...a}),M=({asChild:e,className:r,ref:i,...a})=>C(e?n:`div`,{ref:i,"data-slot":`field-label-row`,className:t(`flex items-center gap-1`,r),...a}),N=f.Root,P=C(w,{}),F=({appearance:e=`ghost`,className:n,icon:i=P,intent:a=`neutral`,label:o,ref:s,size:c=`xs`,type:l=`button`,...u})=>C(f.Trigger,{asChild:!0,children:C(r,{ref:s,appearance:e,className:t(`text-body -my-0.5`,n),icon:i,intent:a,label:o,size:c,type:l,...u})}),I=({ref:e,...t})=>C(f.Content,{ref:e,"data-slot":`field-help-content`,...t}),L=({asChild:e,children:r,className:i,ref:a,...o})=>C(e?n:`span`,{ref:a,"data-slot":`field-optional`,className:t(`text-muted text-sm font-normal font-sans`,i),...o,children:r??`(Optional)`}),R=({asChild:e,className:r,ref:i,...a})=>C(e?n:`div`,{ref:i,"data-slot":`field-group`,className:t(`flex w-full flex-col gap-4`,r),...a}),z=({asChild:e,children:r,className:a,name:o,ref:l,validation:u,...d})=>{let f=e?n:`div`,p=y(),m=y(),h=y(),[g,v]=x(!1),S=i(u??(g?`error`:void 0)),w=_(()=>(v(!0),()=>{v(!1)}),[]),T=b(()=>({controlId:p,descriptionId:m,errorId:h,hasErrors:g,name:o,registerError:w,validation:S}),[p,m,h,g,o,w,S]);return C(c.Provider,{value:T,children:C(s,{validation:S,children:C(f,{ref:l,"data-slot":`field-item`,"data-validation":S,className:t(`flex w-full flex-col gap-1.5`,a),...d,children:r})})})},B=({children:e,ref:t,...r})=>{let i=v(c),a=l({context:i});return typeof e==`function`?C(s,{validation:a.validation,children:C(u.Provider,{value:i?a.ariaProps:null,children:e(a.ariaProps)})}):(S(g(e),`Field.Control expects a single React element child (or a render-prop function). Got a non-element value (string, array, fragment, null, or undefined). Wrap the control in a single element, or use the function child form: <Field.Control>{(props) => <YourControl {...props} />}</Field.Control>.`),C(s,{validation:a.validation,children:C(u.Provider,{value:i?a.ariaProps:null,children:C(n,{ref:t,...r,children:h(e,a.ariaProps)})})}))},V=({asChild:e,className:r,ref:i,...a})=>{let o=e?n:`p`,s=v(c);return C(o,{ref:i,"data-slot":`field-description`,id:s?.descriptionId,className:t(`text-body text-sm leading-4`,`[:where([data-slot=field-error-list]+&)]:-mt-1.5`,r),...a})},H=({children:e,className:n,ref:r,...i})=>E(e)?C(`li`,{ref:r,"data-slot":`field-error`,className:t(`text-danger-600 text-sm leading-4`,n),...i,children:e}):null,U=({messages:e,ref:t,...n})=>C(W,{ref:t,...n,children:T(e).map(e=>C(H,{children:e},e))}),W=({asChild:r,children:i,className:a,ref:o,...s})=>{let l=D({children:i,errorItemType:H}),u=v(c),d=u?.registerError;return e(()=>{if(!(!l||d==null))return d()},[l,d]),l?C(r?n:`ul`,{ref:o,"data-slot":`field-error-list`,id:u?.errorId,role:`list`,className:t(`m-0 flex w-full flex-col list-none p-0`,a),...s,children:i}):null},G={Item:z,Control:B,Group:R,Set:O,Legend:k,Label:A,LabelText:j,LabelRow:M,Help:N,HelpTrigger:F,HelpContent:I,Optional:L,Description:V,Errors:U,ErrorList:W,ErrorItem:H},K=e=>T(e?.map(e=>typeof e==`string`||!e?e:e.message));export{G as Field,a as isAriaInvalid,o as parseValidation,i as resolveValidation,K as toErrorMessages};
@@ -5,9 +5,12 @@ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
5
5
  * A floating card that appears when a user hovers over a trigger element.
6
6
  * This is the root, stateful component that manages the open/closed state of the hover card.
7
7
  *
8
- * `HoverCard.Content` renders at Tailwind `z-50`, Mantle's shared floating
9
- * z-index. When multiple shared layers are open, the most recently mounted
10
- * layer renders on top.
8
+ * `HoverCard.Content` renders at Tailwind `z-50`, Mantle's float tier. When
9
+ * composed inside an open `Dialog`, `AlertDialog`, or `Sheet`, it portals into
10
+ * that overlay's positioner and paints above the overlay that owns it. Outside
11
+ * every overlay, it portals to `document.body`, below the overlay tier
12
+ * (`z-60`). When sibling floats share a container, the most recently mounted
13
+ * float paints on top.
11
14
  *
12
15
  * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardroot
13
16
  *
@@ -46,12 +49,44 @@ declare const Root: ({ closeDelay, openDelay, ...props }: ComponentProps<typeof
46
49
  * ```
47
50
  */
48
51
  declare const Trigger: (props: ComponentProps<typeof HoverCardPrimitive.Trigger>) => import("react").JSX.Element;
52
+ /**
53
+ * The portal container for rendering hover card content outside the normal DOM tree.
54
+ * `HoverCard.Content` already renders inside this portal internally, so you typically
55
+ * do not need to use `HoverCard.Portal` directly. Use it only when you need to
56
+ * customize portal placement (e.g., pass a `container` prop) or wrap multiple
57
+ * `HoverCard.Content` instances in a shared portal.
58
+ *
59
+ * When `container` is omitted, content mounts into the nearest layer container —
60
+ * an enclosing overlay's positioner when one is open, else `document.body`.
61
+ *
62
+ * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardportal
63
+ *
64
+ * @example
65
+ * ```tsx
66
+ * <HoverCard.Root>
67
+ * <HoverCard.Trigger asChild>
68
+ * <Button type="button" appearance="outlined" intent="neutral">
69
+ * Hover me
70
+ * </Button>
71
+ * </HoverCard.Trigger>
72
+ * <HoverCard.Portal>
73
+ * <HoverCard.Content>
74
+ * <p>This is the hover card content.</p>
75
+ * </HoverCard.Content>
76
+ * </HoverCard.Portal>
77
+ * </HoverCard.Root>
78
+ * ```
79
+ */
80
+ declare const Portal: ({ container, ...props }: ComponentProps<typeof HoverCardPrimitive.Portal>) => import("react").JSX.Element;
49
81
  /**
50
82
  * The content to render inside the hover card.
51
83
  *
52
- * `HoverCard.Content` renders at Tailwind `z-50`, Mantle's shared floating
53
- * z-index. When multiple shared layers are open, the most recently mounted
54
- * layer renders on top.
84
+ * `HoverCard.Content` renders at Tailwind `z-50`, Mantle's float tier. When
85
+ * composed inside an open `Dialog`, `AlertDialog`, or `Sheet`, it portals into
86
+ * that overlay's positioner and paints above the overlay that owns it. Outside
87
+ * every overlay, it portals to `document.body`, below the overlay tier
88
+ * (`z-60`). When sibling floats share a container, the most recently mounted
89
+ * float paints on top.
55
90
  *
56
91
  * It sets `position: relative`, so `HoverCard.Arrow`'s absolutely-positioned
57
92
  * wrapper keeps one containing block through the open animation. An
@@ -110,9 +145,12 @@ declare const Arrow: ({ className, height, width, ...props }: HoverCardArrowProp
110
145
  * For short, non-interactive labels or hints, use `Tooltip`. For
111
146
  * interactive overlays the user opens deliberately, use `Popover`.
112
147
  *
113
- * `HoverCard.Content` renders at Tailwind `z-50`, Mantle's shared floating
114
- * z-index. When multiple shared layers are open, the most recently mounted
115
- * layer renders on top.
148
+ * `HoverCard.Content` renders at Tailwind `z-50`, Mantle's float tier. When
149
+ * composed inside an open `Dialog`, `AlertDialog`, or `Sheet`, it portals into
150
+ * that overlay's positioner and paints above the overlay that owns it. Outside
151
+ * every overlay, it portals to `document.body`, below the overlay tier
152
+ * (`z-60`). When sibling floats share a container, the most recently mounted
153
+ * float paints on top.
116
154
  *
117
155
  * @see https://mantle.ngrok.com/components/overlays/hover-card
118
156
  *
@@ -143,9 +181,12 @@ declare const HoverCard: {
143
181
  /**
144
182
  * The root, stateful component that manages the open/closed state of the hover card.
145
183
  *
146
- * `HoverCard.Content` renders at Tailwind `z-50`, Mantle's shared floating
147
- * z-index. When multiple shared layers are open, the most recently mounted
148
- * layer renders on top.
184
+ * `HoverCard.Content` renders at Tailwind `z-50`, Mantle's float tier. When
185
+ * composed inside an open `Dialog`, `AlertDialog`, or `Sheet`, it portals into
186
+ * that overlay's positioner and paints above the overlay that owns it. Outside
187
+ * every overlay, it portals to `document.body`, below the overlay tier
188
+ * (`z-60`). When sibling floats share a container, the most recently mounted
189
+ * float paints on top.
149
190
  *
150
191
  * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardroot
151
192
  *
@@ -191,9 +232,12 @@ declare const HoverCard: {
191
232
  /**
192
233
  * The content to render inside the hover card. Appears in a portal with rich styling and animations.
193
234
  *
194
- * `HoverCard.Content` renders at Tailwind `z-50`, Mantle's shared floating
195
- * z-index. When multiple shared layers are open, the most recently mounted
196
- * layer renders on top.
235
+ * `HoverCard.Content` renders at Tailwind `z-50`, Mantle's float tier. When
236
+ * composed inside an open `Dialog`, `AlertDialog`, or `Sheet`, it portals into
237
+ * that overlay's positioner and paints above the overlay that owns it. Outside
238
+ * every overlay, it portals to `document.body`, below the overlay tier
239
+ * (`z-60`). When sibling floats share a container, the most recently mounted
240
+ * float paints on top.
197
241
  *
198
242
  * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardcontent
199
243
  *
@@ -238,7 +282,7 @@ declare const HoverCard: {
238
282
  * </HoverCard.Root>
239
283
  * ```
240
284
  */
241
- readonly Portal: import("react").FC<HoverCardPrimitive.HoverCardPortalProps>;
285
+ readonly Portal: typeof Portal;
242
286
  /**
243
287
  * The trigger element that opens the hover card when hovered.
244
288
  *
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import*as r from"@radix-ui/react-hover-card";const i=({closeDelay:e=300,openDelay:n=100,...i})=>t(r.Root,{closeDelay:e,openDelay:n,...i}),a=e=>t(r.Trigger,{"data-slot":`hover-card-trigger`,...e}),o=r.Portal,s={Root:i,Arrow:({className:i,height:a=7,width:o=14,...s})=>t(r.Arrow,{"aria-hidden":`true`,asChild:!0,"data-slot":`hover-card-arrow`,height:a,width:o,...s,children:n(`svg`,{className:e(`fill-[var(--background-color-popover)]`,`[clip-path:inset(0_-200%_-200%_-200%)]`,`[filter:drop-shadow(0_0_4px_color-mix(in_oklab,var(--shadow-color)_var(--shadow-first-opacity),transparent))]`,i),children:[t(`polygon`,{points:`0,0 30,0 15,10`}),t(`polyline`,{className:`stroke-[color:var(--border-color-popover)]`,fill:`none`,points:`0,0 15,10 30,0`,strokeWidth:1.5,vectorEffect:`non-scaling-stroke`})]})}),Content:({className:n,onClick:i,align:a=`center`,sideOffset:s=4,...c})=>t(o,{children:t(r.Content,{"data-slot":`hover-card-content`,align:a,sideOffset:s,className:e(`relative`,`bg-popover border-popover z-50 w-64 rounded-md border p-4 shadow-md outline-hidden`,`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 data-state-closed:zoom-out-95 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2`,n),onClick:e=>{e.stopPropagation(),i?.(e)},...c})}),Portal:o,Trigger:a};export{s as HoverCard};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{n as t,r as n}from"./layer-container-CglTh9-6.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";import*as a from"@radix-ui/react-hover-card";const o=({closeDelay:e=300,openDelay:t=100,...n})=>r(a.Root,{closeDelay:e,openDelay:t,...n}),s=e=>r(a.Trigger,{"data-slot":`hover-card-trigger`,...e}),c=({container:e,...i})=>{let o=n(),s=e??o;return r(t.Provider,{value:s,children:r(a.Portal,{container:s,...i})})},l={Root:o,Arrow:({className:t,height:n=7,width:o=14,...s})=>r(a.Arrow,{"aria-hidden":`true`,asChild:!0,"data-slot":`hover-card-arrow`,height:n,width:o,...s,children:i(`svg`,{className:e(`fill-[var(--background-color-popover)]`,`[clip-path:inset(0_-200%_-200%_-200%)]`,`[filter:drop-shadow(0_0_4px_color-mix(in_oklab,var(--shadow-color)_var(--shadow-first-opacity),transparent))]`,t),children:[r(`polygon`,{points:`0,0 30,0 15,10`}),r(`polyline`,{className:`stroke-[color:var(--border-color-popover)]`,fill:`none`,points:`0,0 15,10 30,0`,strokeWidth:1.5,vectorEffect:`non-scaling-stroke`})]})}),Content:({className:t,onClick:n,align:i=`center`,sideOffset:o=4,...s})=>r(c,{children:r(a.Content,{"data-slot":`hover-card-content`,align:i,sideOffset:o,className:e(`relative`,`bg-popover border-popover z-50 w-64 rounded-md border p-4 shadow-md outline-hidden`,`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 data-state-closed:zoom-out-95 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2`,t),onClick:e=>{e.stopPropagation(),n?.(e)},...s})}),Portal:c,Trigger:s};export{l as HoverCard};
package/dist/input.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./icon-lZ48P8Nn.js";import{n as t,t as n}from"./input-BnlpQF0c.js";import{t as r}from"./use-prefers-reduced-motion-Bk5zAfHY.js";import{t as i}from"./input-CXmS0OFN.js";import{useEffect as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{flushSync as u}from"react-dom";import{EyeIcon as d}from"@phosphor-icons/react/Eye";import{EyeClosedIcon as f}from"@phosphor-icons/react/EyeClosed";const p=({onValueVisibilityChange:i,ref:p,showValue:m=!1,...h})=>{let[g,_]=s(m),v=g?`text`:`password`,y=g?d:f,b=o(null),x=o(null);return a(()=>{_(m)},[m]),l(n,{"data-slot":`password-input`,type:v,ref:p,...h,children:[c(t,{}),l(`button`,{type:`button`,tabIndex:-1,className:`text-body hover:text-strong ml-1 cursor-pointer bg-inherit p-0`,onClick:()=>{x.current&&=(x.current.cancel(),null);let e=!g;u(()=>{_(e)}),i?.(e);let t=b.current;t&&!r()&&(x.current=t.animate([{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:200,easing:`ease-out`}),x.current.onfinish=()=>{x.current=null})},children:[l(`span`,{className:`sr-only`,children:[`Turn password visibility `,g?`off`:`on`]}),c(e,{ref:b,svg:c(y,{"aria-hidden":!0})})]})]})};export{n as Input,t as InputCapture,p as PasswordInput,i as isInput};
1
+ import{t as e}from"./icon-lZ48P8Nn.js";import{n as t,t as n}from"./input-BnlpQF0c.js";import{t as r}from"./use-prefers-reduced-motion-Bk5zAfHY.js";import{t as i}from"./input-CXmS0OFN.js";import{useEffect as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{flushSync as u}from"react-dom";import{EyeIcon as d}from"@phosphor-icons/react/Eye";import{EyeClosedIcon as f}from"@phosphor-icons/react/EyeClosed";const p=({onValueVisibilityChange:i,ref:p,showValue:m=!1,...h})=>{let[g,_]=s(m),v=g?`text`:`password`,y=g?d:f,b=o(null),x=o(null);return a(()=>{_(m)},[m]),l(n,{"data-slot":`password-input`,type:v,ref:p,...h,children:[c(t,{}),c(`button`,{type:`button`,tabIndex:-1,"aria-label":`Turn password visibility ${g?`off`:`on`}`,className:`text-body hover:text-strong ml-1 cursor-pointer bg-inherit p-0`,onClick:()=>{x.current&&=(x.current.cancel(),null);let e=!g;u(()=>{_(e)}),i?.(e);let t=b.current;t&&!r()&&(x.current=t.animate([{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:200,easing:`ease-out`}),x.current.onfinish=()=>{x.current=null})},children:c(e,{ref:b,svg:c(y,{"aria-hidden":!0})})})]})};export{n as Input,t as InputCapture,p as PasswordInput,i as isInput};
@@ -0,0 +1 @@
1
+ import{t as e}from"./compose-refs-BdBMM9ga.js";import{createContext as t,useContext as n,useState as r}from"react";import{jsx as i}from"react/jsx-runtime";const a=t(null);function o(){return n(a)}function s({children:t,ref:n,...o}){let[s,c]=r(null);return i(`div`,{ref:e(n,c),...o,children:i(a.Provider,{value:s,children:t})})}export{a as n,o as r,s as t};
@@ -0,0 +1,57 @@
1
+ import { ComponentProps } from "react";
2
+ //#region src/utils/layer-container/layer-container.d.ts
3
+ /**
4
+ * The portal target for floating layers composed inside an overlay.
5
+ *
6
+ * Mantle stacks floating UI in two tiers: overlays (`Dialog`, `AlertDialog`,
7
+ * `Sheet`) render at `z-60`, floats (`Popover`, `Tooltip`, `Select`,
8
+ * `DropdownMenu`, `HoverCard`) at `z-50`. An overlay's content provides its
9
+ * positioner element through this context. A float composed inside the overlay
10
+ * portals into that positioner instead of `document.body`, so it paints above
11
+ * the overlay that owns it. A float outside every overlay reads `null`,
12
+ * portals to `document.body`, and stays below the overlay tier no matter when
13
+ * it opens.
14
+ *
15
+ * Why the positioner and not a sibling element: Radix marks the portal's
16
+ * other children `aria-hidden` when a modal overlay opens, so a float portaled
17
+ * into a sibling would be hidden from screen readers. The positioner is on the
18
+ * overlay content's ancestor chain, which the marking skips.
19
+ */
20
+ declare const LayerContainerContext: import("react").Context<DocumentFragment | Element | null>;
21
+ /**
22
+ * The nearest overlay's layer container, or `null` outside every overlay.
23
+ * Pass the result to a portal's `container` prop — `null` falls back to
24
+ * `document.body`.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * const layerContainer = useLayerContainer();
29
+ * return (
30
+ * <PopoverPrimitive.Portal container={layerContainer}>
31
+ * <PopoverPrimitive.Content>…</PopoverPrimitive.Content>
32
+ * </PopoverPrimitive.Portal>
33
+ * );
34
+ * ```
35
+ */
36
+ declare function useLayerContainer(): Element | DocumentFragment | null;
37
+ /**
38
+ * The provider half of {@link LayerContainerContext}: a `div` that registers
39
+ * itself as the layer container for every float composed inside it. An overlay
40
+ * renders it as its positioner — the fixed element that lays out its content —
41
+ * so floats portaled into it later land on the content's ancestor chain and
42
+ * paint above the content. The caller passes the positioning classes and the
43
+ * `data-slot`; this component carries none of its own.
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * <Portal>
48
+ * <Overlay />
49
+ * <LayerContainer data-slot="dialog-positioner" className="fixed inset-4 z-60 flex items-center justify-center">
50
+ * <DialogPrimitive.Content>…</DialogPrimitive.Content>
51
+ * </LayerContainer>
52
+ * </Portal>
53
+ * ```
54
+ */
55
+ declare function LayerContainer({ children, ref, ...props }: ComponentProps<"div">): import("react").JSX.Element;
56
+ //#endregion
57
+ export { LayerContainer, LayerContainerContext, useLayerContainer };
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./layer-container-CglTh9-6.js";export{n as LayerContainer,e as LayerContainerContext,t as useLayerContainer};
@@ -1,4 +1,4 @@
1
- import { _ as PointShape, a as LegendPrimitiveProps, c as XAxisPrimitiveProps, f as ChartDatum, g as CurveKind, h as ContinuousXScale, i as GridPrimitiveProps, l as YAxisPrimitiveProps, m as ChartSeriesSlot, n as ChartRootBaseProps, o as ReferenceLinePrimitiveProps, p as ChartDatumEvent, r as CopyButtonPrimitiveProps, s as TooltipPrimitiveProps, t as ChartAccessibilityProps, v as SeriesColor } from "./chart-TWkSYqAs.js";
1
+ import { _ as PointShape, a as LegendPrimitiveProps, c as XAxisPrimitiveProps, f as ChartDatum, g as CurveKind, h as ContinuousXScale, i as GridPrimitiveProps, l as YAxisPrimitiveProps, m as ChartSeriesSlot, n as ChartRootBaseProps, o as ReferenceLinePrimitiveProps, p as ChartDatumEvent, r as CopyButtonPrimitiveProps, s as TooltipPrimitiveProps, t as ChartAccessibilityProps, v as SeriesColor } from "./chart-DgaWVBqi.js";
2
2
  //#region src/components/line-chart/line-chart.d.ts
3
3
  /**
4
4
  * Props for {@link LineChart.Root}. Lines encode value by vertical position,
@@ -1 +1 @@
1
- import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-G2pIR4uW.js";import{jsx as l}from"react/jsx-runtime";const u={Root:e=>l(o,{kind:`line`,componentName:`LineChart`,slotName:`line-chart`,...e}),Line:e=>a(`LineChart.Line`,`line`,e),Grid:e=>n(`LineChart.Grid`,e),XAxis:e=>t(`LineChart.XAxis`,e),YAxis:e=>r(`LineChart.YAxis`,e),ReferenceLine:t=>e(`LineChart.ReferenceLine`,t),Tooltip:e=>s(`LineChart.Tooltip`,e),Legend:e=>l(i,{partName:`LineChart.Legend`,slotName:`line-chart`,...e}),CopyButton:e=>l(c,{partName:`LineChart.CopyButton`,slotName:`line-chart`,...e})};export{u as LineChart};
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-BDxpXPfo.js";import{jsx as l}from"react/jsx-runtime";const u={Root:e=>l(o,{kind:`line`,componentName:`LineChart`,slotName:`line-chart`,...e}),Line:e=>a(`LineChart.Line`,`line`,e),Grid:e=>n(`LineChart.Grid`,e),XAxis:e=>t(`LineChart.XAxis`,e),YAxis:e=>r(`LineChart.YAxis`,e),ReferenceLine:t=>e(`LineChart.ReferenceLine`,t),Tooltip:e=>s(`LineChart.Tooltip`,e),Legend:e=>l(i,{partName:`LineChart.Legend`,slotName:`line-chart`,...e}),CopyButton:e=>l(c,{partName:`LineChart.CopyButton`,slotName:`line-chart`,...e})};export{u as LineChart};
package/dist/llms.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @ngrok/mantle (0.83.7)
1
+ # @ngrok/mantle (0.83.9)
2
2
 
3
3
  > Offline discovery hint shipped inside the @ngrok/mantle npm package. Authoritative metadata lives at https://mantle.ngrok.com/for-ai-agents.
4
4
 
package/dist/mantle.css CHANGED
@@ -1284,7 +1284,6 @@ at `:root` (same reason as the palette-alias rule in MARK: INVERT THEME).
1284
1284
  align-items: flex-start;
1285
1285
  min-width: 100%;
1286
1286
  box-sizing: border-box;
1287
- padding-right: 3.5rem; /* space for the copy button overlay */
1288
1287
  }
1289
1288
 
1290
1289
  .mantle-code-line[data-fold-hidden="true"] {
@@ -1295,7 +1294,16 @@ at `:root` (same reason as the palette-alias rule in MARK: INVERT THEME).
1295
1294
  background-color: var(--mantle-code-line-highlight-bg);
1296
1295
  }
1297
1296
 
1297
+ /*
1298
+ * Why sticky: only the code scrolls; the line numbers stay pinned to the
1299
+ * inline-start edge of the scrollport. `z-index: 1` also scopes the
1300
+ * backdrop pseudo-element below, so its `z-index: -1` stays inside this
1301
+ * stacking context instead of dropping under the code text.
1302
+ */
1298
1303
  .mantle-code-line-number {
1304
+ position: sticky;
1305
+ left: 0;
1306
+ z-index: 1;
1299
1307
  display: block;
1300
1308
  flex-shrink: 0;
1301
1309
  width: var(--mantle-code-line-number-width);
@@ -1305,6 +1313,51 @@ at `:root` (same reason as the palette-alias rule in MARK: INVERT THEME).
1305
1313
  color: var(--mantle-code-line-number-color);
1306
1314
  }
1307
1315
 
1316
+ /*
1317
+ * The opaque gutter backdrop. Scrolled code slides under the pinned numbers,
1318
+ * so this masks it across the whole gutter band — the number column plus its
1319
+ * gap, and the fold gutter on fold-enabled blocks (`--_gutter-overhang`).
1320
+ */
1321
+ .mantle-code-line-number::before {
1322
+ content: "";
1323
+ position: absolute;
1324
+ inset: 0 calc(-1 * var(--_gutter-overhang, var(--mantle-code-line-number-gap))) 0 0;
1325
+ z-index: -1;
1326
+ background-color: var(--background-color-base);
1327
+ }
1328
+
1329
+ pre[data-slot="code-block-code"]:has(.mantle-code-fold-toggle) .mantle-code-line-number::before {
1330
+ --_gutter-overhang: calc(
1331
+ var(--mantle-code-line-number-gap) + var(--mantle-code-fold-gutter-width) +
1332
+ var(--mantle-code-fold-gutter-gap)
1333
+ );
1334
+ }
1335
+
1336
+ /*
1337
+ * Re-add the line-highlight tint over the opaque backdrop, so a highlighted
1338
+ * line's gutter matches its content — the same look the translucent line
1339
+ * background painted before the backdrop covered it.
1340
+ */
1341
+ .mantle-code-line-highlighted .mantle-code-line-number::before {
1342
+ background-image: linear-gradient(
1343
+ var(--mantle-code-line-highlight-bg),
1344
+ var(--mantle-code-line-highlight-bg)
1345
+ );
1346
+ }
1347
+
1348
+ /*
1349
+ * Why sticky only with line numbers: the toggle is gutter furniture and pins
1350
+ * with the numbers, whose backdrop masks the code scrolling under it. With
1351
+ * numbers off there is no backdrop, so the toggle scrolls with the code.
1352
+ * `left` matches the toggle's resting offset after the number column, and
1353
+ * `z-index: 1` paints this later sibling above the numbers' backdrop.
1354
+ */
1355
+ pre[data-mantle-line-numbers="true"] .mantle-code-fold-toggle {
1356
+ position: sticky;
1357
+ left: calc(var(--mantle-code-line-number-width) + var(--mantle-code-line-number-gap));
1358
+ z-index: 1;
1359
+ }
1360
+
1308
1361
  .mantle-code-fold-toggle {
1309
1362
  flex-shrink: 0;
1310
1363
  display: inline-flex;