@ngrok/mantle 0.93.6 → 0.94.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 (193) hide show
  1. package/dist/accordion.d.ts +13 -1
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +1181 -36
  4. package/dist/alert-CH99Rw-R.js +1 -0
  5. package/dist/{alert-BcSBNR3S.d.ts → alert-HffaioZM.d.ts} +31 -21
  6. package/dist/alert-center.d.ts +15 -3
  7. package/dist/alert-center.js +1 -1
  8. package/dist/alert-dialog.d.ts +15 -2
  9. package/dist/alert-dialog.js +1 -1
  10. package/dist/alert.d.ts +6 -1
  11. package/dist/alert.js +1 -1
  12. package/dist/anchor.d.ts +12 -0
  13. package/dist/app-layout.d.ts +16 -1
  14. package/dist/app-layout.js +1 -1
  15. package/dist/area-chart.d.ts +144 -88
  16. package/dist/area-chart.js +1 -1
  17. package/dist/avatar.d.ts +12 -0
  18. package/dist/badge.d.ts +13 -1
  19. package/dist/bar-chart.d.ts +144 -89
  20. package/dist/bar-chart.js +1 -1
  21. package/dist/breadcrumb.d.ts +11 -0
  22. package/dist/breadcrumb.js +1 -1
  23. package/dist/browser-only.d.ts +8 -0
  24. package/dist/{button-Yxyu1XMd.d.ts → button-BGwOPjGV.d.ts} +7 -1
  25. package/dist/{button-B8k98Pby.js → button-BWGUuWnu.js} +1 -1
  26. package/dist/{button-CPsKGDK0.d.ts → button-Cgf2IcEC.d.ts} +8 -1
  27. package/dist/button-Cu9e3SM7.js +1 -0
  28. package/dist/{button-BX-4lYUn.d.ts → button-K0pKc3GN.d.ts} +3 -3
  29. package/dist/button.d.ts +9 -3
  30. package/dist/button.js +1 -1
  31. package/dist/calendar.d.ts +7 -0
  32. package/dist/calendar.js +1 -1
  33. package/dist/card.d.ts +6 -1
  34. package/dist/centered-layout.d.ts +11 -0
  35. package/dist/chart-BO9EwQ60.js +1 -0
  36. package/dist/chart-CE5Uaqz9.js +1 -0
  37. package/dist/chart-DCTGGlWL.js +1 -0
  38. package/dist/chart-DudCw24t.js +2 -0
  39. package/dist/{chart-BpfbtOUN.d.ts → chart-jitNqimS.d.ts} +99 -103
  40. package/dist/{checkbox-DmSQXs26.js → checkbox-CS504fKk.js} +1 -1
  41. package/dist/checkbox.d.ts +14 -1
  42. package/dist/checkbox.js +1 -1
  43. package/dist/{choice-BLR0_MeB.d.ts → choice-BwfmbepO.d.ts} +7 -1
  44. package/dist/choice-uyYccm0A.js +1 -0
  45. package/dist/choice.d.ts +6 -1
  46. package/dist/choice.js +1 -1
  47. package/dist/code-block.d.ts +13 -2
  48. package/dist/code-block.js +1 -1
  49. package/dist/code-block_highlight-utils.d.ts +5 -0
  50. package/dist/code.d.ts +13 -0
  51. package/dist/color-CHZbU1Ww.js +1 -0
  52. package/dist/color.js +1 -1
  53. package/dist/combobox.d.ts +28 -14
  54. package/dist/combobox.js +1 -1
  55. package/dist/command.d.ts +14 -2
  56. package/dist/command.js +1 -1
  57. package/dist/cx.js +1 -1
  58. package/dist/data-table.d.ts +50 -19
  59. package/dist/data-table.js +1 -1
  60. package/dist/description-list.d.ts +12 -1
  61. package/dist/dialog-B9JAGy_x.d.ts +28 -0
  62. package/dist/{dialog-7TUgiSzX.js → dialog-CsugEt2A.js} +1 -1
  63. package/dist/{dialog-2fRO4ca4.d.ts → dialog-DD5H3EH1.d.ts} +10 -2
  64. package/dist/dialog.d.ts +7 -2
  65. package/dist/dialog.js +1 -1
  66. package/dist/dropdown-menu-DHdgaw4P.js +1 -0
  67. package/dist/{dropdown-menu-CpjRwMWe.d.ts → dropdown-menu-DmDxYPde.d.ts} +34 -26
  68. package/dist/dropdown-menu.d.ts +6 -1
  69. package/dist/dropdown-menu.js +1 -1
  70. package/dist/empty.d.ts +5 -0
  71. package/dist/empty.js +1 -1
  72. package/dist/{field-V_gnkcmN.d.ts → field-BshcNVe_.d.ts} +1 -1
  73. package/dist/field.d.ts +17 -6
  74. package/dist/field.js +1 -1
  75. package/dist/flag.d.ts +8 -0
  76. package/dist/hooks.d.ts +5 -0
  77. package/dist/hooks.js +1 -1
  78. package/dist/hover-card.d.ts +23 -12
  79. package/dist/{icon-ByLVhdYq.d.ts → icon-NYvyyRMG.d.ts} +6 -0
  80. package/dist/icon.d.ts +7 -2
  81. package/dist/icon.js +1 -1
  82. package/dist/{icons-DP3lQw5O.js → icons-4JA-SGfv.js} +1 -1
  83. package/dist/icons.d.ts +13 -1
  84. package/dist/icons.js +1 -1
  85. package/dist/{index-BhfgyurF.d.ts → index-KJ06KK6t.d.ts} +3 -3
  86. package/dist/input-BjCDSOPA.js +1 -0
  87. package/dist/input-DHovzBjS.js +1 -0
  88. package/dist/{input-Dx5owTCc.d.ts → input-q8o5uMhW.d.ts} +11 -1
  89. package/dist/input.d.ts +34 -2
  90. package/dist/input.js +1 -1
  91. package/dist/kbd.d.ts +12 -0
  92. package/dist/{label-nHqqYS7e.js → label-DmDwzPD8.js} +1 -1
  93. package/dist/{label-Dn5CPJUj.d.ts → label-r2sJcSQ4.d.ts} +6 -0
  94. package/dist/label.d.ts +6 -1
  95. package/dist/label.js +1 -1
  96. package/dist/line-chart.d.ts +139 -82
  97. package/dist/line-chart.js +1 -1
  98. package/dist/{list-RFRIQxU2.js → list-CO_yLdln.js} +1 -1
  99. package/dist/list.d.ts +19 -1
  100. package/dist/list.js +1 -1
  101. package/dist/live-region.d.ts +14 -1
  102. package/dist/llms.txt +78 -76
  103. package/dist/main.d.ts +12 -0
  104. package/dist/mantle.css +110 -65
  105. package/dist/media-object.d.ts +12 -0
  106. package/dist/migrations/0014-chart-named-colors.yml +1389 -0
  107. package/dist/migrations/0015-segmented-control.yml +788 -0
  108. package/dist/multi-select.d.ts +15 -2
  109. package/dist/multi-select.js +1 -1
  110. package/dist/otp-input.d.ts +17 -5
  111. package/dist/otp-input.js +1 -1
  112. package/dist/pagination.d.ts +92 -3
  113. package/dist/pagination.js +1 -1
  114. package/dist/popover-BhTFutCz.d.ts +1 -0
  115. package/dist/{popover-BfB2I9G0.d.ts → popover-lwkwWcRW.d.ts} +16 -7
  116. package/dist/popover.d.ts +7 -2
  117. package/dist/progress.d.ts +27 -10
  118. package/dist/progress.js +1 -1
  119. package/dist/qr-code.d.ts +9 -1
  120. package/dist/query.d.ts +2 -2
  121. package/dist/query.js +1 -1
  122. package/dist/radio-group-jj2abc0t.js +1 -0
  123. package/dist/radio-group-sLz5AA9I.d.ts +27 -0
  124. package/dist/radio-group.d.ts +20 -99
  125. package/dist/radio-group.js +1 -1
  126. package/dist/sandbar.d.ts +14 -1
  127. package/dist/sandbar.js +1 -1
  128. package/dist/sandboxed-on-click.d.ts +8 -0
  129. package/dist/scatter-plot.d.ts +126 -64
  130. package/dist/scatter-plot.js +1 -1
  131. package/dist/segmented-control.d.ts +136 -0
  132. package/dist/segmented-control.js +1 -0
  133. package/dist/{select-BkhBxtOT.d.ts → select-BqmpVJJT.d.ts} +29 -21
  134. package/dist/select-C6Su0dU0.js +1 -0
  135. package/dist/select.d.ts +6 -1
  136. package/dist/select.js +1 -1
  137. package/dist/selectable-list.d.ts +13 -2
  138. package/dist/selectable-list.js +1 -1
  139. package/dist/{separator-D9AWEkcJ.d.ts → separator-QfH0ot5K.d.ts} +3 -1
  140. package/dist/separator.d.ts +6 -1
  141. package/dist/{sheet-CSJc_sB4.js → sheet-Bd2LIhzF.js} +1 -1
  142. package/dist/sheet.d.ts +15 -2
  143. package/dist/sheet.js +1 -1
  144. package/dist/sidebar.d.ts +19 -3
  145. package/dist/sidebar.js +1 -1
  146. package/dist/skeleton.d.ts +11 -0
  147. package/dist/skip-to-main-link.d.ts +11 -0
  148. package/dist/skip-to-main-link.js +1 -1
  149. package/dist/slider.d.ts +10 -0
  150. package/dist/{slot-C0OCJjdJ.d.ts → slot-D12N_fZJ.d.ts} +3 -1
  151. package/dist/slot.d.ts +6 -1
  152. package/dist/split-button.d.ts +14 -3
  153. package/dist/split-button.js +1 -1
  154. package/dist/strata.d.ts +13 -0
  155. package/dist/switch.d.ts +13 -1
  156. package/dist/switch.js +1 -1
  157. package/dist/{table-vT6Okwfa.d.ts → table-rWiVWEgB.d.ts} +79 -0
  158. package/dist/table.d.ts +6 -1
  159. package/dist/tabs.d.ts +23 -11
  160. package/dist/tabs.js +1 -1
  161. package/dist/text-area.d.ts +11 -1
  162. package/dist/theme-DdZgLvKH.js +1 -0
  163. package/dist/theme-switcher.d.ts +16 -2
  164. package/dist/theme-switcher.js +1 -1
  165. package/dist/theme.d.ts +12 -0
  166. package/dist/theme.js +1 -1
  167. package/dist/toast.d.ts +14 -1
  168. package/dist/toast.js +1 -1
  169. package/dist/{tooltip-NcLIeBy5.d.ts → tooltip-CpK3XTor.d.ts} +15 -8
  170. package/dist/tooltip.d.ts +6 -1
  171. package/dist/truncated-text.d.ts +27 -13
  172. package/dist/truncated-text.js +1 -1
  173. package/dist/types.d.ts +1 -1
  174. package/dist/types.js +1 -1
  175. package/dist/use-inert-siblings-CNmNuS2h.js +1 -0
  176. package/dist/use-swipe-to-dismiss-i__cTF2v.js +1 -0
  177. package/dist/utils.d.ts +1 -1
  178. package/dist/utils.js +1 -1
  179. package/dist/visually-hidden.d.ts +13 -0
  180. package/dist/well.d.ts +6 -1
  181. package/package.json +7 -7
  182. package/src/components/chart/d3-license.md +25 -0
  183. package/dist/alert-P9lwn25X.js +0 -1
  184. package/dist/button-Dge0D5bl.js +0 -1
  185. package/dist/chart-BpWfQAwf.js +0 -2
  186. package/dist/choice-2Lrv8_nl.js +0 -1
  187. package/dist/dialog-Dp0QGWwo.d.ts +0 -28
  188. package/dist/dropdown-menu-BHBzCDSZ.js +0 -1
  189. package/dist/input-CpQ6jlpI.js +0 -1
  190. package/dist/popover-C96V8SXi.d.ts +0 -1
  191. package/dist/select-CAAYk4Yj.js +0 -1
  192. package/dist/theme-C-glc5Q-.js +0 -1
  193. package/dist/use-swipe-to-dismiss-DceYk1Id.js +0 -1
@@ -1,6 +1,6 @@
1
1
  import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
2
2
  import { ComponentProps, ComponentPropsWithoutRef } from "react";
3
- import { Content, Provider, Root, Trigger } from "@radix-ui/react-tooltip";
3
+ import { Content as Content$1, Provider, Root as Root$1, Trigger as Trigger$1 } from "@radix-ui/react-tooltip";
4
4
  /**
5
5
  * Wraps your app to set shared global behavior for your tooltips, such
6
6
  * as consistent delay and hover settings. Mount exactly one instance, preferably
@@ -57,7 +57,7 @@ declare const TooltipProvider: ({ delayDuration, ...props }: ComponentPropsWitho
57
57
  * </Tooltip.Root>
58
58
  * ```
59
59
  */
60
- declare function Root$1(props: ComponentProps<typeof Root>): import("react").JSX.Element;
60
+ declare function Root(props: ComponentProps<typeof Root$1>): import("react").JSX.Element;
61
61
  /**
62
62
  * The trigger button that opens the tooltip.
63
63
  *
@@ -77,13 +77,13 @@ declare function Root$1(props: ComponentProps<typeof Root>): import("react").JSX
77
77
  * </Tooltip.Root>
78
78
  * ```
79
79
  */
80
- declare function Trigger$1({ "data-slot": dataSlot, ...props }: ComponentProps<typeof Trigger> & WithDataSlot): import("react").JSX.Element;
80
+ declare function Trigger({ "data-slot": dataSlot, ...props }: ComponentProps<typeof Trigger$1> & WithDataSlot): import("react").JSX.Element;
81
81
  /**
82
82
  * Props for `Tooltip.Content`. `asChild` is omitted: the content renders its own
83
83
  * arrow next to `children`, so a slot would receive more than one element and
84
84
  * throw. A `data-slot` from a composing part joins ahead of `tooltip-content`.
85
85
  */
86
- type TooltipContentProps = Omit<ComponentProps<typeof Content>, "asChild"> & WithDataSlot;
86
+ type TooltipContentProps = Omit<ComponentProps<typeof Content$1>, "asChild"> & WithDataSlot;
87
87
  /**
88
88
  * The content to render inside the tooltip.
89
89
  *
@@ -128,7 +128,7 @@ type TooltipContentProps = Omit<ComponentProps<typeof Content>, "asChild"> & Wit
128
128
  * </Tooltip.Root>
129
129
  * ```
130
130
  */
131
- declare const Content$1: ({ children, className, "data-slot": dataSlot, ref, sideOffset, ...props }: TooltipContentProps) => import("react").JSX.Element;
131
+ declare const Content: ({ children, className, "data-slot": dataSlot, ref, sideOffset, ...props }: TooltipContentProps) => import("react").JSX.Element;
132
132
  /**
133
133
  * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
134
134
  *
@@ -151,6 +151,13 @@ declare const Content$1: ({ children, className, "data-slot": dataSlot, ref, sid
151
151
  * (`z-60`). When sibling floats share a container, the most recently mounted
152
152
  * float paints on top.
153
153
  *
154
+ * @useWhen Show a short, non-interactive hint for an element on hover or focus, such as the meaning
155
+ * of an icon button.
156
+ *
157
+ * @siblings
158
+ * - `Popover`: the content is interactive, such as a form or a settings menu.
159
+ * - `HoverCard`: the content is a rich preview of a link.
160
+ *
154
161
  * @see https://mantle.ngrok.com/components/overlays/tooltip
155
162
  * @see https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/
156
163
  *
@@ -206,7 +213,7 @@ declare const Tooltip: {
206
213
  * </Tooltip.Root>
207
214
  * ```
208
215
  */
209
- readonly Root: typeof Root$1;
216
+ readonly Root: typeof Root;
210
217
  /**
211
218
  * The content to render inside the tooltip.
212
219
  *
@@ -251,7 +258,7 @@ declare const Tooltip: {
251
258
  * </Tooltip.Root>
252
259
  * ```
253
260
  */
254
- readonly Content: typeof Content$1;
261
+ readonly Content: typeof Content;
255
262
  /**
256
263
  * The trigger button that opens the tooltip.
257
264
  *
@@ -271,6 +278,6 @@ declare const Tooltip: {
271
278
  * </Tooltip.Root>
272
279
  * ```
273
280
  */
274
- readonly Trigger: typeof Trigger$1;
281
+ readonly Trigger: typeof Trigger;
275
282
  };
276
283
  export { TooltipProvider as n, Tooltip as t };
package/dist/tooltip.d.ts CHANGED
@@ -1,2 +1,7 @@
1
- import { n as TooltipProvider, t as Tooltip } from "./tooltip-NcLIeBy5.js";
1
+ /**
2
+ * Re-exports for the Tooltip component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/overlays/tooltip
5
+ */
6
+ import { n as TooltipProvider, t as Tooltip } from "./tooltip-CpK3XTor.js";
2
7
  export { Tooltip, TooltipProvider };
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Re-exports for the TruncatedText component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/data-display/truncated-text
5
+ */
1
6
  import { t as SelfClosingWithAsChild } from "./as-child-DFxX3U2i.js";
2
7
  import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
8
  import { ComponentProps } from "react";
@@ -71,15 +76,22 @@ type TruncatedTextProps = Omit<ComponentProps<"span">, "children" | "translate">
71
76
  * a token reads left to right on an RTL page too; a `dir` prop wins. CSS draws
72
77
  * the ellipsis, so a selection never contains it. The component sets no font,
73
78
  * but it turns ligatures off, so a `//` or `=>` clips between its two
74
- * characters. In a monospace font the clipped head sits flush against the
75
- * tail; a proportional font leaves a gap smaller than one glyph.
79
+ * characters. The ellipsis sits flush against the tail in any font, and it
80
+ * stays flush while the container resizes.
76
81
  *
77
- * Until the first measurement, the tail reserves one `ch` per grapheme, which
78
- * is exact in a monospace font. In another font the first paint of an
82
+ * The server render reserves one `ch` per grapheme for the tail, which is
83
+ * exact in a monospace font. In another font the server paint of an
79
84
  * overflowing value can be off by the difference: a tail of wide glyphs (CJK,
80
85
  * emoji) can poke past the container, and a value that fits by less than the
81
- * over-reserve of narrow glyphs can clip. The layout effect after mount
82
- * replaces the estimate with the measured width.
86
+ * over-reserve of narrow glyphs can clip. On the client, the measurement runs
87
+ * after the commit and before the browser paints.
88
+ *
89
+ * **Performance.** Each instance renders once on mount. One batch measures
90
+ * every instance that mounted in the commit: it reads all of them, then writes
91
+ * all of them, so the page lays out once for the batch. The tooltip mounts on
92
+ * the first hover or keyboard focus while the value overflows. One
93
+ * `ResizeObserver` serves every instance, and a resize renders no component.
94
+ * A table still lays out each cell it renders, so paginate a long table.
83
95
  *
84
96
  * **Head length.** Pass `head` to show at most that many graphemes before the
85
97
  * ellipsis. A value longer than `head + tail` graphemes then always clips to
@@ -94,7 +106,9 @@ type TruncatedTextProps = Omit<ComponentProps<"span">, "children" | "translate">
94
106
  * the head's color. A value no longer than `tail` has an empty head, so its
95
107
  * tail draws the ellipsis in the tail's color. The two segments render when the
96
108
  * value fits too. To color them only while the value overflows, add the
97
- * `data-truncated:` variant first.
109
+ * `data-truncated:` variant first. Change the color of a segment, not its
110
+ * font: the measurement reads the whole value in the root's font. Set a font
111
+ * on the root.
98
112
  *
99
113
  * **Selection.** The root carries `user-select: all`, so one click selects the
100
114
  * whole value across both segments, and a copy yields the full string. Pass
@@ -103,10 +117,10 @@ type TruncatedTextProps = Omit<ComponentProps<"span">, "children" | "translate">
103
117
  * **Tooltip.** The tooltip shows the full value and opens only while the value
104
118
  * overflows. The tooltip is up to 24rem wide, so a resource ID fits on one
105
119
  * line. A longer value breaks into lines of near-equal length, and the tooltip
106
- * narrows to the longest line. It
107
- * needs a `TooltipProvider` ancestor, like every mantle tooltip, and throws
108
- * without one. The server render and the first client render assume
109
- * no overflow; the measurement after mount adds the tooltip and `data-truncated`.
120
+ * narrows to the longest line. It needs a `TooltipProvider` ancestor, like
121
+ * every mantle tooltip, and throws without one when it first mounts. The
122
+ * server render and the first client render assume no overflow; the
123
+ * measurement after mount adds `data-truncated`.
110
124
  * While the value overflows, the root is focusable, so Tab reaches it, a screen
111
125
  * reader announces the whole value, and the tooltip opens. A value that fits is
112
126
  * not a tab stop. A `tabIndex` prop wins in both states.
@@ -143,7 +157,7 @@ type TruncatedTextProps = Omit<ComponentProps<"span">, "children" | "translate">
143
157
  * | `data-slot` | `"truncated-text-tail"` | On the `<span>` that stays visible. Holds the last `tail` graphemes. |
144
158
  * | `data-slot` | `"truncated-text-value"` | On the visually hidden `<span>` that holds the whole value for assistive technology. |
145
159
  * | `data-truncated` | present while the value overflows | Presence-only. Style with `data-truncated:`. Absent on the server render. |
146
- * | `data-state` | `"closed"` \| `"delayed-open"` \| `"instant-open"` | The tooltip state Radix stamps on the root. Absent inside a control. |
160
+ * | `data-state` | `"closed"` \| `"delayed-open"` \| `"instant-open"` | The tooltip state on the root. `"closed"` until the tooltip mounts. Absent inside a control. |
147
161
  *
148
162
  * @useWhen Show one long opaque value on one line, and keep its end visible when it clips.
149
163
  *
@@ -182,5 +196,5 @@ type TruncatedTextProps = Omit<ComponentProps<"span">, "children" | "translate">
182
196
  * </TruncatedText>
183
197
  * ```
184
198
  */
185
- declare const TruncatedText: ({ "aria-describedby": describedBy, asChild, children, className, "data-slot": dataSlot, onFocus, onPointerMove, ref, head, style, tabIndex, tail, translate, value, ...props }: TruncatedTextProps) => import("react").JSX.Element;
199
+ declare const TruncatedText: ({ "aria-describedby": describedBy, asChild, children, className, "data-slot": dataSlot, onBlur, onClick, onFocus, onPointerDown, onPointerLeave, onPointerMove, ref, head, style, tabIndex, tail, translate, value, ...props }: TruncatedTextProps) => import("react").JSX.Element;
186
200
  export { TruncatedText, type TruncatedTextProps };
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-CLSmHzo4.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./slot-DdYN1L1C.js";import{t as a}from"./css-properties-D85fCNV3.js";import{t as o}from"./tooltip-b6oiTaWq.js";import{c as s}from"react/compiler-runtime";import{Children as c,cloneElement as ee,isValidElement as te,useRef as ne,useState as l}from"react";import u from"tiny-invariant";import{Fragment as re,jsx as d,jsxs as ie}from"react/jsx-runtime";import{Root as ae,Trigger as oe}from"@radix-ui/react-tooltip";let f;function se(e,{head:t,tail:n}){u(Number.isInteger(n)&&n>=0,`TruncatedText: \`tail\` must be a non-negative integer, received ${String(n)}.`),u(t==null||Number.isInteger(t)&&t>=0,`TruncatedText: \`head\` must be a non-negative integer, received ${String(t)}.`),f??=new Intl.Segmenter(void 0,{granularity:`grapheme`});let r=Array.from(f.segment(e),e=>e.segment);if(r.length<=n)return{head:``,lead:null,tail:e,tailGraphemes:r.length};let i=r.length-n,a=t!=null&&r.length>t+n;return{head:r.slice(0,i).join(``),lead:a?r.slice(0,t).join(``):null,tail:r.slice(i).join(``),tailGraphemes:n}}function p(e){let t=document.createRange();return t.selectNodeContents(e),t.getBoundingClientRect().width}function m(e){let t=getComputedStyle(e),n=[t.paddingLeft,t.paddingRight,t.borderLeftWidth,t.borderRightWidth].reduce((e,t)=>e+(Number.parseFloat(t)||0),0);return e.getBoundingClientRect().width-n}function ce({root:e,head:t,tail:n,lead:r}){let i=p(t),a=p(n),o=i+a>m(e)+.5,s=t.firstChild;if(r==null||!(s instanceof Text))return{headCap:null,tailWidth:a,truncated:o};let c=document.createRange();return c.setStart(s,0),c.setEnd(s,Math.min(r.length,s.length)),{headCap:Math.min(c.getBoundingClientRect().width+p(r.ellipsis),i),tailWidth:a,truncated:o}}function le(e){if(e==null)return;e.style.width=``;let t=document.createRange();t.selectNodeContents(e);let n=Math.max(...Array.from(t.getClientRects(),e=>e.width)),r=e.getBoundingClientRect().width/Number.parseFloat(getComputedStyle(e).width);Number.isFinite(n)&&r>0&&(e.style.width=`${Math.ceil(n/r)}px`)}function ue(e){return e.parentElement?.closest(`a[href], button, input, select, textarea, summary, [contenteditable=""], [contenteditable="true"], [role="button"], [role="checkbox"], [role="link"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"], [role="radio"], [role="switch"], [role="tab"], [role="treeitem"]`)!=null}const de=String.raw`inline-block overflow-hidden text-ellipsis whitespace-nowrap align-bottom before:content-['\200B'] max-w-[calc(100%_-_var(--_tail-width)_+_0.5px)] [[data-truncated]>&]:max-w-[max(1ch_+_0.5px,calc(round(down,100%_-_var(--_tail-width),1ch)_+_0.5px))]`,fe=e=>{let t=s(8),n,r,a;if(t[0]!==e){let{"aria-describedby":i,asChild:o,describedBy:s,...c}=e;a=o,n=s,r=c,t[0]=e,t[1]=n,t[2]=r,t[3]=a}else n=t[1],r=t[2],a=t[3];let o=a!==void 0&&a?i:`span`,c;return t[4]!==o||t[5]!==n||t[6]!==r?(c=/* @__PURE__ */ d(o,{"aria-describedby":n,...r}),t[4]=o,t[5]=n,t[6]=r,t[7]=c):c=t[7],c},h=i=>{let f=s(97),p,m,h,g,_,v,y,b,x,S,C,w,T,E,D;f[0]===i?(p=f[1],m=f[2],h=f[3],g=f[4],_=f[5],v=f[6],y=f[7],b=f[8],x=f[9],S=f[10],C=f[11],w=f[12],T=f[13],E=f[14],D=f[15]):({"aria-describedby":g,asChild:C,children:p,className:m,"data-slot":h,onFocus:v,onPointerMove:y,ref:x,head:_,style:S,tabIndex:E,tail:w,translate:T,value:D,...b}=i,f[0]=i,f[1]=p,f[2]=m,f[3]=h,f[4]=g,f[5]=_,f[6]=v,f[7]=y,f[8]=b,f[9]=x,f[10]=S,f[11]=C,f[12]=w,f[13]=T,f[14]=E,f[15]=D);let pe=C!==void 0&&C,O=w===void 0?8:w,k=T===void 0?`no`:T,me;f[16]!==_||f[17]!==O||f[18]!==D?(me=se(D,{head:_,tail:O}),f[16]=_,f[17]=O,f[18]=D,f[19]=me):me=f[19];let{head:he,lead:A,tail:ge,tailGraphemes:_e}=me,[j,ve]=l(null),ye=ne(null),be=ne(null),xe=ne(null),Se=t(x,ve),[M,Ce]=l(null),[we,Te]=l(!1),[N,Ee]=l(!1),P=M?.truncated===!0,De;f[20]===j?De=f[21]:(De=()=>{j?.isConnected&&Ee(ue(j))},f[20]=j,f[21]=De),e(De);let F;f[22]!==A||f[23]!==j?(F=()=>{let e=ye.current,t=be.current;if(j==null||e==null||t==null)return;let n=xe.current,r=()=>{let r=ce({root:j,head:e,tail:t,lead:A==null||n==null?null:{ellipsis:n,length:A.length}});Ce(e=>e!=null&&e.headCap===r.headCap&&e.tailWidth===r.tailWidth&&e.truncated===r.truncated?e:r),r.truncated||Te(!1)};r();let i=new ResizeObserver(r);return i.observe(j),i.observe(t),()=>{i.disconnect()}},f[22]=A,f[23]=j,f[24]=F):F=f[24];let Oe;f[25]!==A||f[26]!==j||f[27]!==O||f[28]!==D?(Oe=[j,A,D,O],f[25]=A,f[26]=j,f[27]=O,f[28]=D,f[29]=Oe):Oe=f[29],e(F,Oe);let ke=M==null?`${_e}ch`:`${M.tailWidth}px`,Ae=M?.headCap==null?`${(_??0)+1}ch`:`${M.headCap}px`,I;f[30]===D?I=f[31]:(I=/* @__PURE__ */ d(`span`,{"data-slot":`truncated-text-value`,className:`sr-only select-none`,children:D}),f[30]=D,f[31]=I);let L;f[32]===A?L=f[33]:(L=A!=null&&/* @__PURE__ */ d(`span`,{ref:xe,"aria-hidden":!0,className:`invisible absolute select-none`,children:`…`}),f[32]=A,f[33]=L);let je=A!=null&&`w-[calc(round(up,var(--_head-cap)-0.5px,1ch)+0.5px)]`,R;f[34]===je?R=f[35]:(R=n(de,je),f[34]=je,f[35]=R);let z;f[36]!==he||f[37]!==R?(z=/* @__PURE__ */ d(`span`,{ref:ye,"aria-hidden":!0,"data-slot":`truncated-text-head`,className:R,children:he}),f[36]=he,f[37]=R,f[38]=z):z=f[38];let B;f[39]===ge?B=f[40]:(B=/* @__PURE__ */ d(`span`,{ref:be,"aria-hidden":!0,"data-slot":`truncated-text-tail`,dir:`rtl`,className:`inline-block overflow-hidden whitespace-nowrap text-left align-bottom min-w-(--_tail-width) [[data-truncated]>&]:min-w-0 [[data-truncated]>&]:max-w-[calc(round(down,100%_-_1ch_-_var(--_tail-width),1ch)_+_var(--_tail-width))] [[data-truncated]>:empty+&]:max-w-[calc(round(down,100%_-_var(--_tail-width),1ch)_+_var(--_tail-width)_+_0.5px)] [[data-truncated]>:empty+&]:text-ellipsis`,children:/* @__PURE__ */ d(`span`,{dir:`ltr`,children:ge})}),f[39]=ge,f[40]=B);let V;f[41]!==z||f[42]!==B||f[43]!==I||f[44]!==L?(V=/* @__PURE__ */ ie(re,{children:[I,L,z,B]}),f[41]=z,f[42]=B,f[43]=I,f[44]=L,f[45]=V):V=f[45];let H=V,U;f[46]===h?U=f[47]:(U=r(h,`truncated-text`),f[46]=h,f[47]=U);let Me=P?``:void 0,W;f[48]===m?W=f[49]:(W=n(`inline-block min-w-0 max-w-full rounded whitespace-nowrap select-all [font-variant-ligatures:none] focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent`,m),f[48]=m,f[49]=W);let G;f[50]!==Ae||f[51]!==A||f[52]!==S||f[53]!==ke?(G=a({"--_tail-width":ke,...A!=null&&{"--_head-cap":Ae},...S}),f[50]=Ae,f[51]=A,f[52]=S,f[53]=ke,f[54]=G):G=f[54];let Ne=P&&!N?E??0:E,K;f[55]!==N||f[56]!==P||f[57]!==y?(K=e=>{y?.(e),!P&&!N&&e.preventDefault()},f[55]=N,f[56]=P,f[57]=y,f[58]=K):K=f[58];let q;f[59]!==N||f[60]!==P||f[61]!==v?(q=e=>{v?.(e),!P&&!N&&e.preventDefault()},f[59]=N,f[60]=P,f[61]=v,f[62]=q):q=f[62];let Pe;f[63]!==Se||f[64]!==b||f[65]!==U||f[66]!==Me||f[67]!==W||f[68]!==G||f[69]!==Ne||f[70]!==K||f[71]!==q||f[72]!==k?(Pe={ref:Se,"data-slot":U,"data-truncated":Me,dir:`ltr`,className:W,style:G,tabIndex:Ne,onPointerMove:K,onFocus:q,translate:k,...b},f[63]=Se,f[64]=b,f[65]=U,f[66]=Me,f[67]=W,f[68]=G,f[69]=Ne,f[70]=K,f[71]=q,f[72]=k,f[73]=Pe):Pe=f[73];let J=Pe,Y;if(pe){let e;if(f[74]!==p||f[75]!==g||f[76]!==J||f[77]!==H){let t=c.only(p);u(te(t),"When using `asChild`, TruncatedText must be passed a single child as a JSX tag."),u(t.props.children==null,"When using `asChild`, the child of TruncatedText must have no children of its own. `value` is the content."),e=/* @__PURE__ */ d(fe,{asChild:!0,describedBy:g,...J,children:ee(t,{},H)}),f[74]=p,f[75]=g,f[76]=J,f[77]=H,f[78]=e}else e=f[78];Y=e}else{let e;f[79]!==g||f[80]!==J||f[81]!==H?(e=/* @__PURE__ */ d(fe,{describedBy:g,...J,children:H}),f[79]=g,f[80]=J,f[81]=H,f[82]=e):e=f[82],Y=e}if(N)return Y;let Fe=P&&we,X;f[83]===P?X=f[84]:(X=e=>Te(P&&e),f[83]=P,f[84]=X);let Z;f[85]===Y?Z=f[86]:(Z=/* @__PURE__ */ d(oe,{asChild:!0,children:Y}),f[85]=Y,f[86]=Z);let Q;f[87]===D?Q=f[88]:(Q=/* @__PURE__ */ d(`span`,{ref:le,className:`block`,children:D},D),f[87]=D,f[88]=Q);let $;f[89]!==Q||f[90]!==k?($=/* @__PURE__ */ d(o.Content,{className:`max-w-[min(24rem,calc(100vw-2rem))] break-all text-balance`,translate:k,children:Q}),f[89]=Q,f[90]=k,f[91]=$):$=f[91];let Ie;return f[92]!==Fe||f[93]!==X||f[94]!==Z||f[95]!==$?(Ie=/* @__PURE__ */ ie(ae,{open:Fe,onOpenChange:X,children:[Z,$]}),f[92]=Fe,f[93]=X,f[94]=Z,f[95]=$,f[96]=Ie):Ie=f[96],Ie};export{h as TruncatedText};
1
+ import{t as e}from"./use-isomorphic-layout-effect-CLSmHzo4.js";import{t}from"./css-properties-D85fCNV3.js";import{n}from"./compose-refs-sFdxsL7k.js";import{t as r}from"./cx-CK7o_rVv.js";import{t as i}from"./data-slot-EM6s2WEU.js";import{t as a}from"./slot-DdYN1L1C.js";import{t as o}from"./tooltip-b6oiTaWq.js";import{c as s}from"react/compiler-runtime";import{Children as c,cloneElement as l,isValidElement as u,useRef as d,useState as f}from"react";import p from"tiny-invariant";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";import{Root as ee,Trigger as te}from"@radix-ui/react-tooltip";let ne;const _=/^[\x20-\x7E]*$/;function re(e,{head:t,tail:n}){if(p(Number.isInteger(n)&&n>=0,`TruncatedText: \`tail\` must be a non-negative integer, received ${String(n)}.`),p(t==null||Number.isInteger(t)&&t>=0,`TruncatedText: \`head\` must be a non-negative integer, received ${String(t)}.`),_.test(e))return v(e.length,(t,n)=>e.slice(t,n),{head:t,tail:n});ne??=new Intl.Segmenter(void 0,{granularity:`grapheme`});let r=Array.from(ne.segment(e),e=>e.segment);return v(r.length,(e,t)=>r.slice(e,t).join(``),{head:t,tail:n})}function v(e,t,{head:n,tail:r}){if(e<=r)return{head:``,lead:null,tail:t(0),tailGraphemes:e};let i=e-r,a=n!=null&&e>n+r;return{head:t(0,i),lead:a?t(0,n):null,tail:t(i),tailGraphemes:r}}function y(e){return Math.round(e.getBoundingClientRect().width*64)/64}let b;function x(e){return b??=document.createRange(),b.selectNodeContents(e),b}function S(){b?.selectNodeContents(document)}function C(e){return y(x(e))}function w(e){return e>0&&Number.isFinite(e)&&Math.abs(e-1)>1e-4?e:1}function T(e){let t=getComputedStyle(e),n=[t.paddingLeft,t.paddingRight,t.borderLeftWidth,t.borderRightWidth].reduce((e,t)=>e+(Number.parseFloat(t)||0),0),r=e.getBoundingClientRect().width,i=w(r/(Number.parseFloat(t.width)+(n>0&&t.boxSizing===`content-box`?n:0)));return{width:r/i-n,scale:i}}function E(e,t=T(e.root)){let{ellipsis:n,leadLength:r}=e,{scale:i}=t,a=t.width*i,o=O(e),{headLength:s,tailLength:c,tailWidth:l,text:u}=o,d=a+.5*i,{headWidth:f}=o;c>0&&f+l<=d&&f+l+l/c>d&&(f=Math.max(f,C(e.head)));let p=f+l>d;if(u==null)return{headCap:null,headFit:null,tailWidth:l/i,truncated:p};if(e.font?.headWidth!==o.headWidth||e.font.tailWidth!==l){let t=C(n);e.font={headWidth:o.headWidth,tailWidth:l,ellipsisWidth:t,monospace:k({...o,ellipsisWidth:t})}}let{ellipsisWidth:m,monospace:h}=e.font,g=null;if(p&&!h){let t=j(u,{length:s,limit:a-l-m,hint:e.fitLength});e.fitLength=t.length,g=(t.width+m)/i}if(r==null)return{headCap:null,headFit:g,tailWidth:l/i,truncated:p};let ee=Math.min(r,s),te=h?ee*m:A(u,ee);return{headCap:Math.min(te+m,f)/i,headFit:g,tailWidth:l/i,truncated:p}}function D(e){return e?.nodeType===Node.TEXT_NODE}function O({copy:e,head:t,tail:n}){let r=t.firstChild,i=D(r)?r.length:0,a=n.textContent?.length??0,o=e.firstChild;if(!D(o)||o.length!==i+a)return{headWidth:C(t),headLength:i,tailWidth:C(n),tailLength:a,text:D(r)?r:null};let s=C(e),c=i===0?s:C(n);return{headWidth:s-c,headLength:i,tailWidth:c,tailLength:a,text:o}}function k({headLength:e,headWidth:t,tailLength:n,tailWidth:r,ellipsisWidth:i}){return[e>0?t/e:i,n>0?r/n:i].every(e=>Math.abs(e-i)<1/32)}function A(e,t){let n=x(e);return n.setEnd(e,t),y(n)}function j(e,{length:t,limit:n,hint:r}){let i=0,a=t;if(r!=null&&r>0&&r<=t){let o=A(e,r);if(o<=n){if(r===t||A(e,r+1)>n)return{length:r,width:o};i=r+1}else{a=r-1;let t=A(e,a);if(t<=n)return{length:a,width:t};--a}}for(;i<a;){let t=Math.ceil((i+a)/2);A(e,t)<=n?i=t:a=t-1}return{length:i,width:A(e,i)}}const ie=/* @__PURE__ */ new WeakSet;function M(e){e.ownsTabStop&&(e.written?.truncated===!0?(e.root.tabIndex=0,ie.add(e.root)):(e.root.removeAttribute(`tabindex`),ie.delete(e.root)))}function N(e,t,{deferWidths:n=!1}={}){let{root:r,head:i,tail:a,written:o}=e,s=o==null||o.tailWidth!==t.tailWidth||o.headCap!==t.headCap;if(s&&n)return`deferred`;if(s){let e=`${t.tailWidth}px`;i.style.setProperty(`--_tail-width`,e),a.style.setProperty(`--_tail-width`,e),t.headCap!=null&&i.style.setProperty(`--_head-cap`,`${t.headCap}px`)}return o?.headFit!==t.headFit&&(t.headFit==null?i.style.removeProperty(`--_head-fit`):i.style.setProperty(`--_head-fit`,`${t.headFit}px`)),o?.truncated!==t.truncated&&r.toggleAttribute(`data-truncated`,t.truncated),e.written=t,M(e),t.truncated||e.onFit(),s?`resized`:`written`}function P(e,{deferWidths:t=!1,settle:n=!0,contentBoxes:r}={}){let i=Array.from(e,e=>[e,E(e,r?.get(e))]);S();let a=[],o=[];for(let[e,n]of i){let r=N(e,n,{deferWidths:t});r===`deferred`?a.push(e):r===`resized`&&e.leadLength!=null&&o.push(e)}n&&o.length>0&&P(o,{deferWidths:t,settle:!1}),a.length>0&&requestAnimationFrame(()=>{P(a.filter(e=>e.root.isConnected&&I.get(e.root)===e))})}function ae(e){let t=e.getRootNode();return`activeElement`in t&&t.activeElement===e}function oe(e){return e.hasAttribute(`data-truncated`)}const F=/* @__PURE__ */ new Set;function se(e){F.size===0&&queueMicrotask(()=>{let e=[...F].filter(e=>e.root.isConnected);F.clear(),P(e)}),F.add(e)}const I=/* @__PURE__ */ new WeakMap;let L;function ce(e){L??=new ResizeObserver(e=>{let t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Map;for(let r of e){let e=I.get(r.target);if(e==null)continue;t.add(e);let i=r.borderBoxSize?.[0]?.inlineSize;r.target===e.root&&i!=null&&n.set(e,{width:r.contentRect.width,scale:w(e.root.getBoundingClientRect().width/i)})}P(t,{deferWidths:!0,contentBoxes:n})}),I.set(e.root,e),I.set(e.tail,e),L.observe(e.root),L.observe(e.tail)}function le(e){F.delete(e);for(let t of[e.root,e.tail])I.get(t)===e&&(I.delete(t),L?.unobserve(t))}function ue(e){if(e==null)return;e.style.width=``;let t=e.getBoundingClientRect().width/Number.parseFloat(getComputedStyle(e).width);if(!(t>0))return;let n=R(e,t);if(n.length>1){let t=n.reduce((e,t)=>e+t,0),r=t/Math.max(e.textContent?.length??1,1);e.style.width=`${Math.ceil(t/n.length+r)}px`}let r=Math.max(...R(e,t));Number.isFinite(r)&&(e.style.width=`${Math.ceil(r)}px`)}function R(e,t){let n=document.createRange();return n.selectNodeContents(e),Array.from(n.getClientRects(),e=>e.width/t)}function de(e){return e.parentElement?.closest(`a[href], button, input, select, textarea, summary, [contenteditable=""], [contenteditable="true"], [role="button"], [role="checkbox"], [role="link"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"], [role="radio"], [role="switch"], [role="tab"], [role="treeitem"]`)!=null}const fe=String.raw`inline-block overflow-hidden text-ellipsis whitespace-nowrap align-bottom before:content-['\200B'] max-w-[calc(100%_-_var(--_tail-width)_+_0.5px)] [[data-truncated]>&]:max-w-[max(1ch_+_0.5px,min(100%_-_var(--_tail-width),var(--_head-fit,round(down,100%_-_var(--_tail-width),1ch)))_+_0.5px)]`;function pe(t){let n=s(10),r,i,a,o;if(n[0]!==t){let{"aria-describedby":e,"data-state":s,onBind:c,ref:l,...u}=t;o=s,i=c,a=l,r=u,n[0]=t,n[1]=r,n[2]=i,n[3]=a,n[4]=o}else r=n[1],i=n[2],a=n[3],o=n[4];let c;return n[5]!==r||n[6]!==i||n[7]!==a||n[8]!==o?(c=()=>{i({ref:a,handlers:r,state:o})},n[5]=r,n[6]=i,n[7]=a,n[8]=o,n[9]=c):c=n[9],e(c),null}function me(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}const z=ne=>{let _=s(112),v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I;_[0]===ne?(v=_[1],y=_[2],b=_[3],x=_[4],S=_[5],C=_[6],w=_[7],T=_[8],E=_[9],D=_[10],O=_[11],k=_[12],A=_[13],j=_[14],M=_[15],N=_[16],P=_[17],F=_[18],I=_[19]):({"aria-describedby":x,asChild:M,children:v,className:y,"data-slot":b,onBlur:C,onClick:w,onFocus:T,onPointerDown:E,onPointerLeave:D,onPointerMove:O,ref:A,head:S,style:j,tabIndex:F,tail:N,translate:P,value:I,...k}=ne,_[0]=ne,_[1]=v,_[2]=y,_[3]=b,_[4]=x,_[5]=S,_[6]=C,_[7]=w,_[8]=T,_[9]=E,_[10]=D,_[11]=O,_[12]=k,_[13]=A,_[14]=j,_[15]=M,_[16]=N,_[17]=P,_[18]=F,_[19]=I);let L=M!==void 0&&M,R=N===void 0?8:N,z=P===void 0?`no`:P,he;_[20]!==S||_[21]!==R||_[22]!==I?(he=re(I,{head:S,tail:R}),_[20]=S,_[21]=R,_[22]=I,_[23]=he):he=_[23];let{head:ge,lead:B,tail:_e,tailGraphemes:ve}=he,ye=d(null),be=d(null),xe=d(null),Se=d(null),V=d(null),H=d(null),Ce=d(null),we=d(!1),[U,Te]=f(!1),[Ee,De]=f(!1),[W,Oe]=f(!1),ke;_[24]!==L||_[25]!==v||_[26]!==F?(ke=F!=null||L&&u(v)&&v.props.tabIndex!=null,_[24]=L,_[25]=v,_[26]=F,_[27]=ke):ke=_[27];let Ae=ke,je=!Ae&&!W,Me;_[28]!==Ae||_[29]!==B?.length||_[30]!==je?(Me=e=>{let t=ye.current,n=be.current,r=xe.current,i=Se.current;if(e==null||t==null||n==null||r==null||i==null)return;!je&&ie.delete(e)&&!Ae&&e.removeAttribute(`tabindex`);let a={root:e,head:t,tail:n,copy:i,ellipsis:r,leadLength:B?.length??null,ownsTabStop:je,written:null,font:null,fitLength:null,onFit:()=>De(!1)};V.current=a,ce(a),se(a);let o=H.current;return o!=null&&me(o.ref,e),()=>{le(a),V.current=null}},_[28]=Ae,_[29]=B?.length,_[30]=je,_[31]=Me):Me=_[31];let Ne=n(A,Me),Pe;_[32]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=()=>{let e=V.current?.root;e?.isConnected&&Oe(de(e))},_[32]=Pe):Pe=_[32],e(Pe);let Fe;_[33]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=()=>{let e=V.current;e!=null&&(e.written=null,e.font=null,e.fitLength=null,se(e))},_[33]=Fe):Fe=_[33];let Ie;_[34]!==R||_[35]!==I?(Ie=[I,R],_[34]=R,_[35]=I,_[36]=Ie):Ie=_[36],e(Fe,Ie);let Le=`${ve}ch`,Re=`${(S??0)+1}ch`,G;_[37]===I?G=_[38]:(G=/* @__PURE__ */ h(`span`,{ref:Se,"data-slot":`truncated-text-value`,className:`sr-only select-none`,children:I}),_[37]=I,_[38]=G);let ze;_[39]===Symbol.for(`react.memo_cache_sentinel`)?(ze=/* @__PURE__ */ h(`span`,{ref:xe,"aria-hidden":!0,translate:`no`,className:`invisible absolute select-none`,children:`…`}),_[39]=ze):ze=_[39];let Be=B!=null&&`w-[calc(round(up,var(--_head-cap)-0.5px,1ch)+0.5px)]`,K;_[40]===Be?K=_[41]:(K=r(fe,Be),_[40]=Be,_[41]=K);let q;_[42]!==ge||_[43]!==K?(q=/* @__PURE__ */ h(`span`,{ref:ye,"aria-hidden":!0,"data-slot":`truncated-text-head`,className:K,children:ge}),_[42]=ge,_[43]=K,_[44]=q):q=_[44];let J;_[45]===_e?J=_[46]:(J=/* @__PURE__ */ h(`span`,{ref:be,"aria-hidden":!0,"data-slot":`truncated-text-tail`,dir:`rtl`,className:`inline-block overflow-hidden whitespace-nowrap text-left align-bottom min-w-(--_tail-width) [[data-truncated]>&]:min-w-0 [[data-truncated]>&]:max-w-[calc(round(down,100%_-_1ch_-_var(--_tail-width),1ch)_+_var(--_tail-width))] [[data-truncated]>:empty+&]:max-w-[calc(round(down,100%_-_var(--_tail-width),1ch)_+_var(--_tail-width)_+_0.5px)] [[data-truncated]>:empty+&]:text-ellipsis`,children:/* @__PURE__ */ h(`span`,{dir:`ltr`,children:_e})}),_[45]=_e,_[46]=J);let Ve;_[47]!==G||_[48]!==q||_[49]!==J?(Ve=/* @__PURE__ */ g(m,{children:[G,ze,q,J]}),_[47]=G,_[48]=q,_[49]=J,_[50]=Ve):Ve=_[50];let Y=Ve,He;_[51]===W?He=_[52]:(He=e=>oe(e)&&!W,_[51]=W,_[52]=He);let X=He,Ue;_[53]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=e=>{Ce.current=e,Te(!0)},_[53]=Ue):Ue=_[53];let We=Ue,Z;_[54]===b?Z=_[55]:(Z=i(b,`truncated-text`),_[54]=b,_[55]=Z);let Ge=W?void 0:`closed`,Q;_[56]===y?Q=_[57]:(Q=r(`inline-block min-w-0 max-w-full rounded whitespace-nowrap select-all [font-variant-ligatures:none] focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent`,y),_[56]=y,_[57]=Q);let Ke;_[58]!==Re||_[59]!==B||_[60]!==j||_[61]!==Le?(Ke=t({"--_tail-width":Le,...B!=null&&{"--_head-cap":Re},...j}),_[58]=Re,_[59]=B,_[60]=j,_[61]=Le,_[62]=Ke):Ke=_[62];let qe;_[63]!==U||_[64]!==X||_[65]!==O?(qe=e=>{O?.(e),e.pointerType!==`touch`&&X(e.currentTarget)&&(U?H.current?.handlers.onPointerMove?.(e):We({type:`pointermove`,event:e}))},_[63]=U,_[64]=X,_[65]=O,_[66]=qe):qe=_[66];let Je;_[67]===D?Je=_[68]:(Je=e=>{D?.(e),Ce.current?.type===`pointermove`&&(Ce.current=null),H.current?.handlers.onPointerLeave?.(e)},_[67]=D,_[68]=Je);let Ye;_[69]!==U||_[70]!==E?(Ye=e=>{if(E?.(e),U){H.current?.handlers.onPointerDown?.(e);return}we.current=!0;let t=e.currentTarget.ownerDocument,n=()=>{we.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)};t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)},_[69]=U,_[70]=E,_[71]=Ye):Ye=_[71];let Xe;_[72]!==U||_[73]!==X||_[74]!==T?(Xe=e=>{T?.(e),X(e.currentTarget)&&(U?H.current?.handlers.onFocus?.(e):we.current||We({type:`focus`,event:e}))},_[72]=U,_[73]=X,_[74]=T,_[75]=Xe):Xe=_[75];let Ze;_[76]===C?Ze=_[77]:(Ze=e=>{C?.(e),H.current?.handlers.onBlur?.(e)},_[76]=C,_[77]=Ze);let Qe;_[78]===w?Qe=_[79]:(Qe=e=>{w?.(e),H.current?.handlers.onClick?.(e)},_[78]=w,_[79]=Qe);let $e;_[80]!==Ne||_[81]!==x||_[82]!==k||_[83]!==Z||_[84]!==Ge||_[85]!==Q||_[86]!==Ke||_[87]!==qe||_[88]!==Je||_[89]!==Ye||_[90]!==Xe||_[91]!==Ze||_[92]!==Qe||_[93]!==F||_[94]!==z?($e={ref:Ne,"aria-describedby":x,"data-slot":Z,"data-state":Ge,dir:`ltr`,className:Q,style:Ke,tabIndex:F,onPointerMove:qe,onPointerLeave:Je,onPointerDown:Ye,onFocus:Xe,onBlur:Ze,onClick:Qe,translate:z,...k},_[80]=Ne,_[81]=x,_[82]=k,_[83]=Z,_[84]=Ge,_[85]=Q,_[86]=Ke,_[87]=qe,_[88]=Je,_[89]=Ye,_[90]=Xe,_[91]=Ze,_[92]=Qe,_[93]=F,_[94]=z,_[95]=$e):$e=_[95];let et=$e,tt;if(L){let e;if(_[96]!==v||_[97]!==et||_[98]!==Y){let t=c.only(v);p(u(t),"When using `asChild`, TruncatedText must be passed a single child as a JSX tag."),p(t.props.children==null,"When using `asChild`, the child of TruncatedText must have no children of its own. `value` is the content."),e=/* @__PURE__ */ h(a,{...et,children:l(t,{},Y)}),_[96]=v,_[97]=et,_[98]=Y,_[99]=e}else e=_[99];tt=e}else{let e;_[100]!==et||_[101]!==Y?(e=/* @__PURE__ */ h(`span`,{...et,children:Y}),_[100]=et,_[101]=Y,_[102]=e):e=_[102],tt=e}let $;_[103]!==U||_[104]!==W||_[105]!==Ee||_[106]!==z||_[107]!==I?($=U&&!W&&/* @__PURE__ */ g(ee,{open:Ee,onOpenChange:e=>{let t=V.current?.root;De(e&&t!=null&&oe(t))},children:[/* @__PURE__ */ h(te,{asChild:!0,children:/* @__PURE__ */ h(pe,{onBind:e=>{let t=H.current;H.current=e;let n=V.current?.root;if(n==null)return;t?.ref!==e.ref&&(me(t?.ref,null),me(e.ref,n)),e.state!=null&&n.setAttribute(`data-state`,e.state);let r=Ce.current;r!=null&&(Ce.current=null,queueMicrotask(()=>{let e=H.current?.handlers;r.type===`pointermove`?e?.onPointerMove?.(r.event):ae(n)&&e?.onFocus?.(r.event)}))}})}),/* @__PURE__ */ h(o.Content,{className:`max-w-[min(24rem,calc(100vw-2rem))] break-all text-balance`,translate:z,children:/* @__PURE__ */ h(`span`,{ref:ue,className:`block`,children:I},I)})]}),_[103]=U,_[104]=W,_[105]=Ee,_[106]=z,_[107]=I,_[108]=$):$=_[108];let nt;return _[109]!==tt||_[110]!==$?(nt=/* @__PURE__ */ g(m,{children:[tt,$]}),_[109]=tt,_[110]=$,_[111]=nt):nt=_[111],nt};export{z as TruncatedText};
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
- import { a as Booleanish, i as DeepNonNullable, n as CssProperties, o as parseBooleanish, r as VariantProps, t as $cssProperties } from "./index-BhfgyurF.js";
2
+ import { a as Booleanish, i as DeepNonNullable, n as CssProperties, o as parseBooleanish, r as VariantProps, t as $cssProperties } from "./index-KJ06KK6t.js";
3
3
  import { t as WithStyleProps } from "./with-style-props-CuT30s0W.js";
4
4
  export { $cssProperties, type Booleanish, type CssProperties, type DeepNonNullable, type VariantProps, type WithAsChild, type WithStyleProps, parseBooleanish };
package/dist/types.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./css-properties-D85fCNV3.js";import{t}from"./booleanish-BfvnW6vy.js";export{e as $cssProperties,t as parseBooleanish};
1
+ import{t as e}from"./booleanish-BfvnW6vy.js";import{t}from"./css-properties-D85fCNV3.js";export{t as $cssProperties,e as parseBooleanish};
@@ -0,0 +1 @@
1
+ import{t as e}from"./alert-DO00UiQe.js";import{c as t}from"react/compiler-runtime";import{useEffect as n,useLayoutEffect as r}from"react";function i({tabStops:e,current:t,backwards:n}){let r=e[0],i=e[e.length-1];if(r==null||i==null)return null;let a=e.findIndex(e=>e===t);if(a!==-1)return n?a===0?i:null:a===e.length-1?r:null;if(t==null)return n?i:r;if(n){let n=e.filter(e=>(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)!==0);return n[n.length-1]??i}return e.find(e=>(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)!==0)??r}function a(r,a){let o=t(6),s;o[0]===a?s=o[1]:(s=a===void 0?{}:a,o[0]=a,o[1]=s);let{active:c}=s,l=c===void 0||c,u,d;o[2]!==l||o[3]!==r?(u=()=>{let t=r.current;if(!l||t==null)return;let n=!t.hasAttribute(`tabindex`);n&&(t.tabIndex=-1);let a=0,o=60,s=()=>{if(t.contains(document.activeElement))return;let[n]=e(t);(n??t).focus(),--o,!t.contains(document.activeElement)&&o>0&&(a=requestAnimationFrame(s))};s();let c=n=>{if(n.key!==`Tab`||n.defaultPrevented||!(n.target instanceof Node)||!t.contains(n.target))return;let r=e(t);if(r.length===0){n.preventDefault();return}let a=i({tabStops:r,current:document.activeElement,backwards:n.shiftKey});a!=null&&(n.preventDefault(),a.focus())};return document.addEventListener(`keydown`,c),()=>{cancelAnimationFrame(a),document.removeEventListener(`keydown`,c),n&&t.removeAttribute(`tabindex`)}},d=[l,r],o[2]=l,o[3]=r,o[4]=u,o[5]=d):(u=o[4],d=o[5]),n(u,d)}function o(e,n){let i=t(6),a;i[0]===n?a=i[1]:(a=n===void 0?{}:n,i[0]=n,i[1]=a);let{active:o}=a,c=o===void 0||o,l,u;i[2]!==c||i[3]!==e?(l=()=>{let t=e.current;if(c&&t!=null)return s(t)},u=[c,e],i[2]=c,i[3]=e,i[4]=l,i[5]=u):(l=i[4],u=i[5]),r(l,u)}function s(e){let t=e.parentElement;if(t==null)return;let n=/* @__PURE__ */ new Set,r=()=>{for(let r of t.children)r!==e&&r instanceof HTMLElement&&!r.inert&&(r.inert=!0,n.add(r))};r();let i=new MutationObserver(r);return i.observe(t,{childList:!0}),()=>{i.disconnect();for(let e of n)e.inert=!1}}export{a as n,o as t};
@@ -0,0 +1 @@
1
+ import{c as e}from"react/compiler-runtime";import{useEffect as t,useLayoutEffect as n,useRef as r}from"react";function i({offset:e,size:t,velocity:n,threshold:r,flickVelocity:i}){return e>0&&(e>=t*r||n>=i)}function a(e,t){return t<=0?0:(1-1/(.55*e/t+1))*t}function o(e,t){switch(t){case`right`:return e.clientX;case`left`:return-e.clientX;case`down`:return e.clientY;case`up`:return-e.clientY}}function s(e,t){return t===`left`||t===`right`?e.clientY:e.clientX}function c(e,t){switch(t){case`right`:return`${e}px`;case`left`:return`${-e}px`;case`down`:return`0 ${e}px`;case`up`:return`0 ${-e}px`}}function l(e,t,n){e.property===`flex-basis`?e.target.style.flexBasis=`${e.size-t}px`:e.target.style.translate=c(t,n)}function u(e){e.target.style.removeProperty(`transition`),e.target.style.removeProperty(e.property===`flex-basis`?`flex-basis`:`translate`)}function d(c,d){let f=e(5),p=r(d),m;f[0]===d?m=f[1]:(m=()=>{p.current=d},f[0]=d,f[1]=m),n(m);let h,g;f[2]===c?(h=f[3],g=f[4]):(h=()=>{let e=c.current;if(e==null)return;let t=null,n=!1,r=()=>{document.removeEventListener(`pointermove`,d),document.removeEventListener(`pointerup`,f),document.removeEventListener(`pointercancel`,f),t=null},d=e=>{let{direction:n}=p.current,i=n===void 0?`right`:n;if(t==null||e.pointerId!==t.pointerId)return;let c=o(e,i),u=c-t.start;if(!t.dragging){let n=Math.abs(s(e,i)-t.crossStart);if(n>=8&&n>Math.abs(u)){r();return}if(Math.abs(u)<8)return;t.dragging=!0,t.target.style.transition=`none`}let d=e.timeStamp-t.lastTime;d>0&&(t.velocity=(c-t.last)/d),t.last=c,t.lastTime=e.timeStamp,t.offset=Math.max(0,u);let f=u>=0?u:-a(-u,t.size);l(t,f,i)},f=e=>{let{onDismiss:a,threshold:o,flickVelocity:s}=p.current,c=o===void 0?.25:o,l=s===void 0?.4:s;if(t==null||e.pointerId!==t.pointerId)return;let d=t;if(r(),!d.dragging||(n=!0,window.setTimeout(()=>{n=!1},0),u(d),e.type===`pointercancel`))return;let f=e.timeStamp-d.lastTime>100?0:d.velocity;i({...d,velocity:f,threshold:c,flickVelocity:l})&&a()},m=n=>{let{active:r,direction:i,property:a,target:c}=p.current,l=r===void 0||r,u=i===void 0?`right`:i,m=a===void 0?`translate`:a;if(!(typeof l==`function`?l():l)||!n.isPrimary||n.button!==0||t!=null)return;let h=c?.current??e,g=h.getBoundingClientRect(),_=o(n,u);t={target:h,property:typeof m==`function`?m():m,pointerId:n.pointerId,start:_,crossStart:s(n,u),size:u===`left`||u===`right`?g.width:g.height,dragging:!1,last:_,lastTime:n.timeStamp,velocity:0,offset:0},document.addEventListener(`pointermove`,d),document.addEventListener(`pointerup`,f),document.addEventListener(`pointercancel`,f)},h=e=>{n&&(n=!1,e.preventDefault(),e.stopPropagation())};return e.addEventListener(`pointerdown`,m),e.addEventListener(`click`,h,!0),()=>{t?.dragging&&u(t),r(),e.removeEventListener(`pointerdown`,m),e.removeEventListener(`click`,h,!0)}},g=[c],f[2]=c,f[3]=h,f[4]=g),t(h,g)}export{d as n,a as t};
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as timeSortingDirections, a as AlphanumericSortingDirection, c as TimeSortingDirection, d as isSortingDirection, f as isSortingMode, g as timeSortingByDirection, h as sortingModes, i as $timeSortingDirection, l as alphanumericSortingDirections, m as sortingDirections, n as $sortingDirection, o as SortingDirection, p as isTimeSortingDirection, r as $sortingMode, s as SortingMode, t as $alphanumericSortingDirection, u as isAlphanumericSortingDirection } from "./direction-CpRzTtZh.js";
2
1
  import { a as composeRefs, i as inView, n as MarginType, r as ViewChangeHandler, s as copyToClipboard, t as InViewOptions } from "./in-view-B3nMAzfE.js";
2
+ import { _ as timeSortingDirections, a as AlphanumericSortingDirection, c as TimeSortingDirection, d as isSortingDirection, f as isSortingMode, g as timeSortingByDirection, h as sortingModes, i as $timeSortingDirection, l as alphanumericSortingDirections, m as sortingDirections, n as $sortingDirection, o as SortingDirection, p as isTimeSortingDirection, r as $sortingMode, s as SortingMode, t as $alphanumericSortingDirection, u as isAlphanumericSortingDirection } from "./direction-CpRzTtZh.js";
3
3
  /**
4
4
  * Compare dates in newest-to-oldest (descending) order.
5
5
  * Used for chronological sorting use cases.
package/dist/utils.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./copy-to-clipboard-DInu78k_.js";import{a as n,c as r,d as i,f as a,i as o,l as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./direction-CvDpql3O.js";import{t as h}from"./in-view-Dxv_GrUU.js";function g(e,t){return Math.sign(t.getTime()-e.getTime())}function _(e,t){return Math.sign(e.getTime()-t.getTime())}export{p as $alphanumericSortingDirection,c as $sortingDirection,d as $sortingMode,o as $timeSortingDirection,n as alphanumericSortingDirections,g as compareDatesNewestToOldest,_ as compareDatesOldestToNewest,e as composeRefs,t as copyToClipboard,h as inView,l as isAlphanumericSortingDirection,f as isSortingDirection,r as isSortingMode,s as isTimeSortingDirection,m as sortingDirections,i as sortingModes,a as timeSortingByDirection,u as timeSortingDirections};
1
+ import{t as e}from"./copy-to-clipboard-DInu78k_.js";import{t}from"./in-view-Dxv_GrUU.js";import{t as n}from"./compose-refs-sFdxsL7k.js";import{a as r,c as i,d as a,f as o,i as s,l as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./direction-CvDpql3O.js";function g(e,t){return Math.sign(t.getTime()-e.getTime())}function _(e,t){return Math.sign(e.getTime()-t.getTime())}export{m as $alphanumericSortingDirection,l as $sortingDirection,f as $sortingMode,s as $timeSortingDirection,r as alphanumericSortingDirections,g as compareDatesNewestToOldest,_ as compareDatesOldestToNewest,n as composeRefs,e as copyToClipboard,t as inView,u as isAlphanumericSortingDirection,p as isSortingDirection,i as isSortingMode,c as isTimeSortingDirection,h as sortingDirections,a as sortingModes,o as timeSortingByDirection,d as timeSortingDirections};
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Re-exports for the VisuallyHidden component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/primitives/visually-hidden
5
+ */
1
6
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
7
  import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
8
  import { ComponentProps } from "react";
@@ -23,6 +28,14 @@ import { ComponentProps } from "react";
23
28
  * | -------------- | ------------------- | ------------------------------------------------------------------------- |
24
29
  * | `data-slot` | `"visually-hidden"` | Stamped on the rendered element, and joined onto the child via `asChild`. |
25
30
  *
31
+ * @useWhen Give screen readers text that sighted users never see, such as "(opens in a new tab)" on
32
+ * an external link.
33
+ *
34
+ * @siblings
35
+ * - `LiveRegion`: screen readers must announce the text when it changes.
36
+ * - `IconButton`: the text names an icon-only button; pass it as the `label` prop.
37
+ * - `SkipToMainLink`: the hidden content is a skip link that shows on focus.
38
+ *
26
39
  * @see https://mantle.ngrok.com/components/primitives/visually-hidden
27
40
  * @see https://webaim.org/techniques/css/invisiblecontent/
28
41
  *
package/dist/well.d.ts CHANGED
@@ -1,6 +1,11 @@
1
+ /**
2
+ * Re-exports for the Well component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/structure/well
5
+ */
1
6
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
7
+ import "./index-KJ06KK6t.js";
2
8
  import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
- import "./index-BhfgyurF.js";
4
9
  import { ComponentProps } from "react";
5
10
  type WellProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
6
11
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngrok/mantle",
3
- "version": "0.93.6",
3
+ "version": "0.94.0",
4
4
  "description": "mantle is ngrok's UI library and design system.",
5
5
  "homepage": "https://mantle.ngrok.com",
6
6
  "license": "MIT",
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "files": [
13
13
  "dist",
14
- "package.json"
14
+ "package.json",
15
+ "src/components/chart/d3-license.md"
15
16
  ],
16
17
  "type": "module",
17
18
  "sideEffects": [
@@ -85,6 +86,7 @@
85
86
  "./sandbar": "./dist/sandbar.js",
86
87
  "./sandboxed-on-click": "./dist/sandboxed-on-click.js",
87
88
  "./scatter-plot": "./dist/scatter-plot.js",
89
+ "./segmented-control": "./dist/segmented-control.js",
88
90
  "./select": "./dist/select.js",
89
91
  "./selectable-list": "./dist/selectable-list.js",
90
92
  "./separator": "./dist/separator.js",
@@ -111,7 +113,7 @@
111
113
  "./well": "./dist/well.js"
112
114
  },
113
115
  "dependencies": {
114
- "@ariakit/react": "0.4.42",
116
+ "@ariakit/react": "0.4.43",
115
117
  "@headlessui/react": "2.2.10",
116
118
  "@radix-ui/react-dialog": "1.3.1",
117
119
  "@radix-ui/react-dropdown-menu": "2.2.1",
@@ -125,11 +127,9 @@
125
127
  "@radix-ui/react-tabs": "1.2.1",
126
128
  "@radix-ui/react-tooltip": "1.4.1",
127
129
  "@tanstack/react-table": "9.3.1",
128
- "@tanstack/react-virtual": "3.14.23",
130
+ "@tanstack/react-virtual": "3.14.26",
129
131
  "class-variance-authority": "0.7.1",
130
132
  "cmdk": "1.1.1",
131
- "d3-scale": "4.0.2",
132
- "d3-shape": "3.2.0",
133
133
  "input-otp": "1.5.0",
134
134
  "react-day-picker": "10.0.2",
135
135
  "sonner": "2.0.8",
@@ -144,6 +144,6 @@
144
144
  "tailwindcss": "^4.3.3"
145
145
  },
146
146
  "engines": {
147
- "node": "^24.0.0"
147
+ "node": "^26.0.0"
148
148
  }
149
149
  }
@@ -0,0 +1,25 @@
1
+ # d3 license
2
+
3
+ These chart modules hold code ported from d3:
4
+
5
+ - `curve.ts`: the line and area generators and three curves of `d3-shape` 3.2.1
6
+ - `time-ticks.ts`: the local time intervals and the tick solver of `d3-time` 3.1.1, the tick label rule of `d3-scale` 4.0.3 with its eight formats of `d3-time-format` 4.1.1, and `tickStep` of `d3-array` 3.2.5
7
+ - `scales.ts`: `ticks`, `tickIncrement`, and `nice` of `d3-array` 3.2.4
8
+
9
+ The five packages share this license:
10
+
11
+ ```
12
+ Copyright 2010-2026 Mike Bostock
13
+
14
+ Permission to use, copy, modify, and/or distribute this software for any purpose
15
+ with or without fee is hereby granted, provided that the above copyright notice
16
+ and this permission notice appear in all copies.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
19
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
20
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
21
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
22
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
23
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
24
+ THIS SOFTWARE.
25
+ ```
@@ -1 +0,0 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-CLSmHzo4.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./icon-BudQMD2S.js";import{t as a}from"./slot-DdYN1L1C.js";import{t as o}from"./css-properties-D85fCNV3.js";import{t as s}from"./button-Dge0D5bl.js";import{t as c}from"./button-B8k98Pby.js";import{n as l,r as u}from"./alert-DO00UiQe.js";import{c as d}from"react/compiler-runtime";import{CaretDownIcon as f}from"@phosphor-icons/react/CaretDown";import{createContext as p,useContext as m,useEffect as h,useRef as g}from"react";import _ from"tiny-invariant";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{CheckCircleIcon as b}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as x}from"@phosphor-icons/react/Info";import{MegaphoneIcon as S}from"@phosphor-icons/react/Megaphone";import{WarningIcon as C}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as w}from"@phosphor-icons/react/WarningDiamond";import{XIcon as T}from"@phosphor-icons/react/X";import{cva as E}from"class-variance-authority";const D=p(null),O=/* @__PURE__ */ v(T,{});function k(){let e=m(D);return _(e,`useAlertContext hook used outside of Alert parent!`),e}const A=e=>{let t=d(6),{children:n,intent:r,redirectDismissFocus:i}=e,a=i===void 0||i,o;t[0]!==r||t[1]!==a?(o={intent:r,redirectDismissFocus:a},t[0]=r,t[1]=a,t[2]=o):o=t[2];let s=o,c;return t[3]!==n||t[4]!==s?(c=/* @__PURE__ */ v(D.Provider,{value:s,children:n}),t[3]=n,t[4]=s,t[5]=c):c=t[5],c},j=E(`relative flex w-full gap-1.5 rounded-md border p-2.5 text-sm font-sans`,{variants:{intent:{danger:`border-danger-500/50 bg-danger-500/10 text-danger-700 [&_code]:bg-danger-500/10 [&_code]:border-danger-500/20 [&_code]:text-danger-900 [&_a:not([data-slot~=button])]:text-danger-700 [&_a:not([data-slot~=button])]:underline`,important:`border-important-500/50 bg-important-500/10 text-important-700 [&_code]:bg-important-500/10 [&_code]:border-important-500/20 [&_code]:text-important-900 [&_a:not([data-slot~=button])]:text-important-700 [&_a:not([data-slot~=button])]:underline`,info:`border-info-500/50 bg-info-500/10 text-info-700 [&_code]:bg-info-500/10 [&_code]:border-info-500/20 [&_code]:text-info-900 [&_a:not([data-slot~=button])]:text-info-700 [&_a:not([data-slot~=button])]:underline`,success:`border-success-500/50 bg-success-500/10 text-success-700 [&_code]:bg-success-500/10 [&_code]:border-success-500/20 [&_code]:text-success-900 [&_a:not([data-slot~=button])]:text-success-700 [&_a:not([data-slot~=button])]:underline`,warning:`border-warning-500/50 bg-warning-500/10 text-warning-700 [&_code]:bg-warning-500/10 [&_code]:border-warning-500/20 [&_code]:text-warning-900 [&_a:not([data-slot~=button])]:text-warning-700 [&_a:not([data-slot~=button])]:underline`},appearance:{banner:`border-x-0 border-t-0 rounded-none z-50 sticky`,default:``}}}),M=e=>{let t=d(26),i,a,s,c,l,u,f;t[0]===e?(i=t[1],a=t[2],s=t[3],c=t[4],l=t[5],u=t[6],f=t[7]):({"data-slot":a,appearance:f,className:i,intent:s,ref:l,style:u,...c}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=s,t[4]=c,t[5]=l,t[6]=u,t[7]=f);let p=f===void 0?`default`:f,m;t[8]===a?m=t[9]:(m=r(a,`alert`),t[8]=a,t[9]=m);let h;t[10]!==p||t[11]!==i||t[12]!==s?(h=n(j({appearance:p,intent:s}),`has-data-alert-dismiss:pr-10`,`has-data-alert-expand:**:data-[slot~=alert-dismiss-icon-button]:right-16`,`md:has-data-alert-expand:**:data-[slot~=alert-dismiss-icon-button]:right-24`,`has-data-alert-expand:**:data-[slot~=alert-content]:pr-12`,`md:has-data-alert-expand:**:data-[slot~=alert-content]:pr-22`,i),t[10]=p,t[11]=i,t[12]=s,t[13]=h):h=t[13];let g;t[14]!==s||t[15]!==u?(g=o({"--alert-control-color":R(s),"--alert-control-hover-color":z(s),"--alert-control-hover-bg":B(s),...u}),t[14]=s,t[15]=u,t[16]=g):g=t[16];let _;t[17]!==c||t[18]!==l||t[19]!==m||t[20]!==h||t[21]!==g?(_=/* @__PURE__ */ v(`div`,{ref:l,"data-slot":m,className:h,style:g,...c}),t[17]=c,t[18]=l,t[19]=m,t[20]=h,t[21]=g,t[22]=_):_=t[22];let y;return t[23]!==s||t[24]!==_?(y=/* @__PURE__ */ v(A,{intent:s,children:_}),t[23]=s,t[24]=_,t[25]=y):y=t[25],y},N={danger:/* @__PURE__ */ v(C,{}),important:/* @__PURE__ */ v(S,{mirrored:!0}),info:/* @__PURE__ */ v(x,{}),success:/* @__PURE__ */ v(b,{}),warning:/* @__PURE__ */ v(w,{})},P=e=>{let t=d(16),a,o,s,c,l;t[0]===e?(a=t[1],o=t[2],s=t[3],c=t[4],l=t[5]):({"data-slot":o,className:a,ref:c,svg:l,...s}=e,t[0]=e,t[1]=a,t[2]=o,t[3]=s,t[4]=c,t[5]=l);let u=k(),f=N[u.intent],p;t[6]===o?p=t[7]:(p=r(o,`alert-icon`),t[6]=o,t[7]=p);let m;t[8]===a?m=t[9]:(m=n(`size-5`,a),t[8]=a,t[9]=m);let h=l??f,g;return t[10]!==s||t[11]!==c||t[12]!==p||t[13]!==m||t[14]!==h?(g=/* @__PURE__ */ v(i,{ref:c,"data-slot":p,className:m,svg:h,...s}),t[10]=s,t[11]=c,t[12]=p,t[13]=m,t[14]=h,t[15]=g):g=t[15],g},F=e=>{let t=d(14),i,a,o,s;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4]):({"data-slot":a,className:i,ref:s,...o}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s);let c;t[5]===a?c=t[6]:(c=r(a,`alert-content`),t[5]=a,t[6]=c);let l;t[7]===i?l=t[8]:(l=n(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,i),t[7]=i,t[8]=l);let u;return t[9]!==o||t[10]!==s||t[11]!==c||t[12]!==l?(u=/* @__PURE__ */ v(`div`,{ref:s,"data-slot":c,className:l,...o}),t[9]=o,t[10]=s,t[11]=c,t[12]=l,t[13]=u):u=t[13],u},I=e=>{let t=d(16),i,o,s,c,l;t[0]===e?(i=t[1],o=t[2],s=t[3],c=t[4],l=t[5]):({"data-slot":o,asChild:l,className:i,ref:c,...s}=e,t[0]=e,t[1]=i,t[2]=o,t[3]=s,t[4]=c,t[5]=l);let u=l!==void 0&&l?a:`h5`,f;t[6]===o?f=t[7]:(f=r(o,`alert-title`),t[6]=o,t[7]=f);let p;t[8]===i?p=t[9]:(p=n(`font-medium`,i),t[8]=i,t[9]=p);let m;return t[10]!==u||t[11]!==s||t[12]!==c||t[13]!==f||t[14]!==p?(m=/* @__PURE__ */ v(u,{ref:c,"data-slot":f,className:p,...s}),t[10]=u,t[11]=s,t[12]=c,t[13]=f,t[14]=p,t[15]=m):m=t[15],m},L=e=>{let t=d(16),i,o,s,c,l;t[0]===e?(i=t[1],o=t[2],s=t[3],c=t[4],l=t[5]):({"data-slot":o,asChild:l,className:i,ref:c,...s}=e,t[0]=e,t[1]=i,t[2]=o,t[3]=s,t[4]=c,t[5]=l);let u=l!==void 0&&l?a:`div`,f;t[6]===o?f=t[7]:(f=r(o,`alert-description`),t[6]=o,t[7]=f);let p;t[8]===i?p=t[9]:(p=n(`text-sm`,i),t[8]=i,t[9]=p);let m;return t[10]!==u||t[11]!==s||t[12]!==c||t[13]!==f||t[14]!==p?(m=/* @__PURE__ */ v(u,{ref:c,"data-slot":f,className:p,...s}),t[10]=u,t[11]=s,t[12]=c,t[13]=f,t[14]=p,t[15]=m):m=t[15],m},R=e=>`var(--color-${e}-700)`,z=e=>`var(--color-${e}-800)`,B=e=>`color-mix(in oklab, var(--color-${e}-500) 10%, transparent)`;function V(t){let n=d(8),{buttonRef:r,enabled:i}=t,a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],n[0]=a):a=n[0];let o=g(a),s,c;n[1]!==r||n[2]!==i?(s=()=>{if(i)return()=>{let e=r.current;if(e==null||document.activeElement!==e)return;let t=e.closest(`[data-slot~="alert"]`)??e;o.current=l(t)}},c=[r,i],n[1]=r,n[2]=i,n[3]=s,n[4]=c):(s=n[3],c=n[4]),e(s,c);let f,p;n[5]===i?(f=n[6],p=n[7]):(f=()=>{if(i)return()=>{let e=o.current;if(o.current=[],e.length===0)return;let{activeElement:t}=document;if(t==null||t===document.body){for(let t of e)if(t.isConnected&&u(t)&&(t.focus(),document.activeElement===t))return}}},p=[i],n[5]=i,n[6]=f,n[7]=p),h(f,p)}const H={Root:M,Content:F,ExpandButton:e=>{let t=d(25),i,a,o,c,l;t[0]===e?(i=t[1],a=t[2],o=t[3],c=t[4],l=t[5]):({"data-slot":o,count:a,expanded:c,className:i,...l}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=c,t[5]=l);let u=c?`Collapse additional alerts`:`Show ${a} more ${a===1?`alert`:`alerts`}`,p;t[6]===o?p=t[7]:(p=r(o,`alert-expand-button`),t[6]=o,t[7]=p);let m=c&&`-rotate-180`,h;t[8]===m?h=t[9]:(h=n(`size-4 transition-transform duration-200 ease-out-strong motion-reduce:transition-none`,m),t[8]=m,t[9]=h);let g;t[10]===h?g=t[11]:(g=/* @__PURE__ */ v(f,{weight:`bold`,className:h}),t[10]=h,t[11]=g);let _;t[12]===i?_=t[13]:(_=n(`right-1.5 top-1.5 absolute gap-1 ps-1.5 pe-1`,`text-(--alert-control-color,currentColor)`,`not-disabled:hover:bg-(--alert-control-hover-bg,transparent) not-disabled:hover:text-(--alert-control-hover-color,currentColor)`,i),t[12]=i,t[13]=_);let b;t[14]===a?b=t[15]:(b=/* @__PURE__ */ y(`span`,{className:`min-w-[2ch] text-center tabular-nums`,children:[`+`,a]}),t[14]=a,t[15]=b);let x;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=/* @__PURE__ */ v(`span`,{className:`hidden md:inline`,children:`more`}),t[16]=x):x=t[16];let S;return t[17]!==c||t[18]!==l||t[19]!==u||t[20]!==p||t[21]!==g||t[22]!==_||t[23]!==b?(S=/* @__PURE__ */ y(s,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"aria-expanded":c,"aria-label":u,"data-slot":p,"data-alert-expand":!0,icon:g,iconPlacement:`end`,className:_,...l,children:[b,x]}),t[17]=c,t[18]=l,t[19]=u,t[20]=p,t[21]=g,t[22]=_,t[23]=b,t[24]=S):S=t[24],S},Description:L,DismissIconButton:e=>{let i=d(26),a,o,s,l,u,f,p,h,_;i[0]===e?(a=i[1],o=i[2],s=i[3],l=i[4],u=i[5],f=i[6],p=i[7],h=i[8],_=i[9]):({"data-slot":o,size:u,type:f,label:p,appearance:h,className:a,icon:_,ref:l,...s}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=l,i[5]=u,i[6]=f,i[7]=p,i[8]=h,i[9]=_);let y=u===void 0?`sm`:u,b=f===void 0?`button`:f,x=p===void 0?`Dismiss Alert`:p,S=h===void 0?`ghost`:h,C=_===void 0?O:_,w=m(D),T=g(null),E=t(T,l),k=w?.redirectDismissFocus??!0,A;i[10]===k?A=i[11]:(A={buttonRef:T,enabled:k},i[10]=k,i[11]=A),V(A);let j;i[12]===o?j=i[13]:(j=r(o,`alert-dismiss-icon-button`),i[12]=o,i[13]=j);let M;i[14]===a?M=i[15]:(M=n(`right-1.5 top-1.5 absolute`,`text-(--alert-control-color,currentColor)`,`not-disabled:hover:bg-(--alert-control-hover-bg,transparent) not-disabled:hover:text-(--alert-control-hover-color,currentColor)`,a),i[14]=a,i[15]=M);let N;return i[16]!==S||i[17]!==E||i[18]!==C||i[19]!==x||i[20]!==s||i[21]!==y||i[22]!==j||i[23]!==M||i[24]!==b?(N=/* @__PURE__ */ v(c,{ref:E,appearance:S,icon:C,intent:`neutral`,label:x,size:y,"data-slot":j,"data-alert-dismiss":!0,className:M,type:b,...s}),i[16]=S,i[17]=E,i[18]=C,i[19]=x,i[20]=s,i[21]=y,i[22]=j,i[23]=M,i[24]=b,i[25]=N):N=i[25],N},Icon:P,Title:I};export{A as n,H as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-kK0c-POG.js";import{t as r}from"./slot-DdYN1L1C.js";import{t as i}from"./booleanish-BfvnW6vy.js";import{t as a}from"./clsx-DUGZgXfJ.js";import{c as o}from"react/compiler-runtime";import{Children as s,cloneElement as c,isValidElement as l}from"react";import u from"tiny-invariant";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import{cva as m}from"class-variance-authority";import{CircleNotchIcon as h}from"@phosphor-icons/react/CircleNotch";const g=r=>{let i=o(20),a,s,c,l,u;i[0]===r?(a=i[1],s=i[2],c=i[3],l=i[4],u=i[5]):({"data-slot":c,active:a,className:s,icons:l,...u}=r,i[0]=r,i[1]=a,i[2]=s,i[3]=c,i[4]=l,i[5]=u);let d;i[6]===c?d=i[7]:(d=t(c,`icon-swap`),i[6]=c,i[7]=d);let p;i[8]===s?p=i[9]:(p=e(`inline-grid shrink-0 place-items-center`,s),i[8]=s,i[9]=p);let m;i[10]===l?m=i[11]:(m=Object.entries(l),i[10]=l,i[11]=m);let h;i[12]!==a||i[13]!==m?(h=m.map(t=>{let[r,i]=t,o=r===a;return/* @__PURE__ */ f(`span`,{"data-slot":`icon-swap-item`,"data-state":o?`active`:`inactive`,"aria-hidden":!o||void 0,className:e(`col-start-1 row-start-1 grid place-items-center`,`motion-safe:transition-[opacity,scale,filter] motion-safe:duration-200 motion-safe:ease-out-strong`,`data-state-inactive:opacity-0 motion-safe:data-state-inactive:scale-50 motion-safe:data-state-inactive:blur-[2px] motion-safe:data-state-inactive:duration-150`,`data-state-inactive:*:paused`),children:/* @__PURE__ */ f(n,{svg:i})},r)}),i[12]=a,i[13]=m,i[14]=h):h=i[14];let g;return i[15]!==u||i[16]!==d||i[17]!==p||i[18]!==h?(g=/* @__PURE__ */ f(`span`,{"data-slot":d,className:p,...u,children:h}),i[15]=u,i[16]=d,i[17]=p,i[18]=h,i[19]=g):g=i[19],g},ee=m(``,{variants:{appearance:{filled:`bg-filled-accent text-white focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover border border-transparent text-sm font-medium`,ghost:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border border-transparent text-sm font-medium`,outlined:`border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border text-sm font-medium`,link:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group/button-link border-transparent`},isLoading:{false:``,true:`opacity-50`},intent:{accent:``,danger:``,neutral:``},size:{xs:``,sm:``,md:``,lg:``,xl:``}},defaultVariants:{isLoading:!1,size:`md`},compoundVariants:[{appearance:[`filled`,`ghost`,`outlined`],size:`xs`,class:`h-6 px-2`},{appearance:[`filled`,`ghost`,`outlined`],size:`sm`,class:`h-7 px-2.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`md`,class:`h-9 px-3`},{appearance:[`filled`,`ghost`,`outlined`],size:`lg`,class:`h-10 px-3.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`xl`,class:`h-12 px-4`},{appearance:`ghost`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 border-transparent`},{appearance:`outlined`,intent:`danger`,class:`border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700`},{appearance:`filled`,intent:`danger`,class:`bg-filled-danger focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover border-transparent`},{appearance:`link`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger`},{appearance:`ghost`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`},{appearance:`outlined`,intent:`neutral`,class:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600 focus-visible:not-disabled:active:border-accent-600`},{appearance:`filled`,intent:`neutral`,class:`bg-filled-neutral not-disabled:hover:bg-filled-neutral-hover border-transparent focus-visible:border-transparent text-neutral-50`},{appearance:`link`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent`}]}),te={xs:`ps-1.5`,sm:`ps-2`,md:`ps-2.5`,lg:`ps-3`,xl:`ps-3.5`},ne={xs:`pe-1.5`,sm:`pe-2`,md:`pe-2.5`,lg:`pe-3`,xl:`pe-3.5`},_=m=>{let _=o(68),v,y,b,x,S,C,w,T,E,D,O,k,A,j,M;_[0]===m?(v=_[1],y=_[2],b=_[3],x=_[4],S=_[5],C=_[6],w=_[7],T=_[8],E=_[9],D=_[10],O=_[11],k=_[12],A=_[13],j=_[14],M=_[15]):({"aria-disabled":v,"data-slot":w,appearance:b,asChild:x,children:S,className:C,disabled:y,icon:E,iconPlacement:k,intent:T,isLoading:A,ref:O,size:j,type:M,...D}=m,_[0]=m,_[1]=v,_[2]=y,_[3]=b,_[4]=x,_[5]=S,_[6]=C,_[7]=w,_[8]=T,_[9]=E,_[10]=D,_[11]=O,_[12]=k,_[13]=A,_[14]=j,_[15]=M);let N=k===void 0?`start`:k,P=A!==void 0&&A,F=j===void 0?`md`:j,I;_[16]!==v||_[17]!==y||_[18]!==P?(I=i(y??P)||i(v),_[16]=v,_[17]=y,_[18]=P,_[19]=I):I=_[19];let L=I,R;_[20]===Symbol.for(`react.memo_cache_sentinel`)?(R=/* @__PURE__ */ f(h,{className:`animate-spin`}),_[20]=R):R=_[20];let ie=R,z=N===`end`&&`order-last`,B;_[21]===z?B=_[22]:(B=a(z),_[21]=z,_[22]=B);let V=B,H;_[23]!==V||_[24]!==P||_[25]!==E?(H=E?/* @__PURE__ */ f(g,{active:P?`loading`:`idle`,icons:{idle:E,loading:ie},className:V}):P&&/* @__PURE__ */ f(n,{svg:ie,className:V}),_[23]=V,_[24]=P,_[25]=E,_[26]=H):H=_[26];let U=H,W=U&&b!==`link`,G;_[27]===w?G=_[28]:(G=t(w,`button`),_[27]=w,_[28]=G);let K;_[29]!==b||_[30]!==C||_[31]!==W||_[32]!==N||_[33]!==T||_[34]!==P||_[35]!==F?(K=e(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`aria-disabled:cursor-default aria-disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`,ee({appearance:b,intent:T,isLoading:P,size:F}),b!==`link`&&`font-sans`,W&&N===`start`&&te[F],W&&N===`end`&&ne[F],C),_[29]=b,_[30]=C,_[31]=W,_[32]=N,_[33]=T,_[34]=P,_[35]=F,_[36]=K):K=_[36];let q=L?``:void 0,J=P?``:void 0,Y=b===`link`?void 0:F,X;_[37]!==b||_[38]!==L||_[39]!==T||_[40]!==D||_[41]!==O||_[42]!==K||_[43]!==q||_[44]!==J||_[45]!==Y||_[46]!==G?(X={"aria-disabled":L,"data-slot":G,className:K,"data-appearance":b,"data-disabled":q,"data-intent":T,"data-loading":J,"data-size":Y,ref:O,...D},_[37]=b,_[38]=L,_[39]=T,_[40]=D,_[41]=O,_[42]=K,_[43]=q,_[44]=J,_[45]=Y,_[46]=G,_[47]=X):X=_[47];let Z=X;if(x){u(l(S)&&s.only(S),"When using `asChild`, Button must be passed a single child as a JSX tag.");let e;if(_[48]!==S||_[49]!==L||_[50]!==U){let t;_[52]===S.props.children?t=_[53]:(t=/* @__PURE__ */ f(`span`,{"data-slot":`button-label`,className:`contents`,children:S.props.children}),_[52]=S.props.children,_[53]=t);let n;_[54]!==U||_[55]!==t?(n=/* @__PURE__ */ p(d,{children:[U,t]}),_[54]=U,_[55]=t,_[56]=n):n=_[56],e=c(S,L?re:{},n),_[48]=S,_[49]=L,_[50]=U,_[51]=e}else e=_[51];let t;return _[57]!==Z||_[58]!==e?(t=/* @__PURE__ */ f(r,{...Z,children:e}),_[57]=Z,_[58]=e,_[59]=t):t=_[59],t}let ae=M??`button`,Q;_[60]===S?Q=_[61]:(Q=/* @__PURE__ */ f(`span`,{"data-slot":`button-label`,className:`contents`,children:S}),_[60]=S,_[61]=Q);let $;return _[62]!==Z||_[63]!==L||_[64]!==U||_[65]!==ae||_[66]!==Q?($=/* @__PURE__ */ p(`button`,{...Z,disabled:L,type:ae,children:[U,Q]}),_[62]=Z,_[63]=L,_[64]=U,_[65]=ae,_[66]=Q,_[67]=$):$=_[67],$},re={tabIndex:-1,onClickCapture:e=>{e.preventDefault(),e.stopPropagation()}};export{re as n,g as r,_ as t};