@ngrok/mantle 0.94.0 → 0.94.1

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 (299) hide show
  1. package/README.md +11 -2
  2. package/dist/accordion.d.ts +61 -21
  3. package/dist/accordion.js +1 -1
  4. package/dist/agent.json +61 -56
  5. package/dist/alert-BkJHDx9X.js +1 -0
  6. package/dist/{alert-HffaioZM.d.ts → alert-D0zRRUHV.d.ts} +6 -6
  7. package/dist/alert-center.d.ts +53 -53
  8. package/dist/alert-center.js +1 -1
  9. package/dist/alert-dialog.d.ts +22 -10
  10. package/dist/alert-dialog.js +1 -1
  11. package/dist/alert.d.ts +1 -1
  12. package/dist/alert.js +1 -1
  13. package/dist/anchor-Dc6IgvXV.js +1 -0
  14. package/dist/anchor.d.ts +5 -5
  15. package/dist/anchor.js +1 -1
  16. package/dist/app-layout.d.ts +18 -18
  17. package/dist/app-layout.js +1 -1
  18. package/dist/area-chart.d.ts +13 -13
  19. package/dist/area-chart.js +1 -1
  20. package/dist/avatar.d.ts +24 -24
  21. package/dist/avatar.js +1 -1
  22. package/dist/badge.d.ts +7 -7
  23. package/dist/badge.js +1 -1
  24. package/dist/bar-chart.d.ts +12 -12
  25. package/dist/bar-chart.js +1 -1
  26. package/dist/breadcrumb.d.ts +36 -36
  27. package/dist/breadcrumb.js +1 -1
  28. package/dist/browser-only-CZfkNw5A.js +1 -0
  29. package/dist/browser-only-ymFoM3Ya.js +1 -0
  30. package/dist/browser-only.js +1 -1
  31. package/dist/{button-K0pKc3GN.d.ts → button-5Pc7Mby_.d.ts} +3 -3
  32. package/dist/button-B9bChDgl.js +1 -0
  33. package/dist/button-D8jixIbH.js +1 -0
  34. package/dist/button-DNLTJ32M.js +1 -0
  35. package/dist/{button-Cgf2IcEC.d.ts → button-Ddj6yr10.d.ts} +26 -26
  36. package/dist/{button-BGwOPjGV.d.ts → button-DnYv7IOT.d.ts} +22 -21
  37. package/dist/button.d.ts +3 -3
  38. package/dist/button.js +1 -1
  39. package/dist/calendar.d.ts +1 -1
  40. package/dist/calendar.js +1 -1
  41. package/dist/card.d.ts +1 -1
  42. package/dist/card.js +1 -1
  43. package/dist/centered-layout.d.ts +23 -23
  44. package/dist/centered-layout.js +1 -1
  45. package/dist/{chart-CE5Uaqz9.js → chart-BLCqzt56.js} +1 -1
  46. package/dist/{chart-DCTGGlWL.js → chart-CChZiCrt.js} +1 -1
  47. package/dist/{chart-BO9EwQ60.js → chart-CUmSu9d7.js} +1 -1
  48. package/dist/{chart-jitNqimS.d.ts → chart-Dl8gFo_D.d.ts} +22 -22
  49. package/dist/chart-DtgZBAas.js +2 -0
  50. package/dist/checkbox-Cu5cgZmk.js +1 -0
  51. package/dist/checkbox.d.ts +1 -1
  52. package/dist/checkbox.js +1 -1
  53. package/dist/choice-CCVG2hb9.js +1 -0
  54. package/dist/{choice-BwfmbepO.d.ts → choice-CNiOSzqV.d.ts} +20 -20
  55. package/dist/choice.d.ts +1 -1
  56. package/dist/choice.js +1 -1
  57. package/dist/code-BPKNY1_w.js +1 -0
  58. package/dist/{code-block-BGdV4Yty.d.ts → code-block-BDw6MEwH.d.ts} +9 -9
  59. package/dist/{code-block-W3kWPxCJ.js → code-block-CKzsAMzj.js} +3 -3
  60. package/dist/code-block.d.ts +15 -17
  61. package/dist/code-block.js +1 -1
  62. package/dist/code-block_highlight-utils.d.ts +1 -1
  63. package/dist/code-block_highlight-utils.js +1 -1
  64. package/dist/code.d.ts +3 -3
  65. package/dist/code.js +1 -1
  66. package/dist/combobox.d.ts +15 -15
  67. package/dist/combobox.js +1 -1
  68. package/dist/command.d.ts +47 -47
  69. package/dist/command.js +1 -1
  70. package/dist/compose-refs-BdRUneoc.js +1 -0
  71. package/dist/{copy-to-clipboard-DInu78k_.js → copy-to-clipboard-Dd83caRw.js} +1 -1
  72. package/dist/cx.d.ts +4 -4
  73. package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
  74. package/dist/data-table.d.ts +36 -36
  75. package/dist/data-table.js +1 -1
  76. package/dist/description-list.d.ts +1 -1
  77. package/dist/description-list.js +1 -1
  78. package/dist/{dialog-DD5H3EH1.d.ts → dialog-CIEuwNys.d.ts} +24 -8
  79. package/dist/{dialog-B9JAGy_x.d.ts → dialog-CbEEA0fl.d.ts} +7 -3
  80. package/dist/dialog-DmzoDfY3.js +1 -0
  81. package/dist/dialog.d.ts +2 -2
  82. package/dist/dialog.js +1 -1
  83. package/dist/{dropdown-menu-DmDxYPde.d.ts → dropdown-menu-CeY498yk.d.ts} +10 -10
  84. package/dist/dropdown-menu-uheL0prz.js +1 -0
  85. package/dist/dropdown-menu.d.ts +1 -1
  86. package/dist/dropdown-menu.js +1 -1
  87. package/dist/empty.d.ts +2 -2
  88. package/dist/empty.js +1 -1
  89. package/dist/field-Bpvn4tQp.js +1 -0
  90. package/dist/field-Cai_4c1l.js +1 -0
  91. package/dist/field.d.ts +41 -41
  92. package/dist/field.js +1 -1
  93. package/dist/flag.d.ts +3 -3
  94. package/dist/flag.js +1 -1
  95. package/dist/hooks.d.ts +30 -10
  96. package/dist/hooks.js +1 -1
  97. package/dist/hover-card.d.ts +3 -3
  98. package/dist/hover-card.js +1 -1
  99. package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
  100. package/dist/{icon-NYvyyRMG.d.ts → icon-DuIYoyft.d.ts} +2 -2
  101. package/dist/{icon-DXDyhy2N.d.ts → icon-QCm1ui29.d.ts} +2 -2
  102. package/dist/icon-xb7d9M7X.js +1 -0
  103. package/dist/icon.d.ts +3 -3
  104. package/dist/icon.js +1 -1
  105. package/dist/icons-DEDCLZ8B.js +1 -0
  106. package/dist/icons-DXadFwpo.js +1 -0
  107. package/dist/icons-DcesO4Ng.js +1 -0
  108. package/dist/icons.d.ts +2 -2
  109. package/dist/icons.js +1 -1
  110. package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
  111. package/dist/{input-q8o5uMhW.d.ts → input-DC4nW0Sr.d.ts} +1 -1
  112. package/dist/input-fW8QSZEO.js +1 -0
  113. package/dist/input.d.ts +4 -4
  114. package/dist/input.js +1 -1
  115. package/dist/kbd-P1nQshWo.js +1 -0
  116. package/dist/kbd.d.ts +5 -5
  117. package/dist/kbd.js +1 -1
  118. package/dist/label-DO1RlMKl.js +1 -0
  119. package/dist/{label-r2sJcSQ4.d.ts → label-epgtywRz.d.ts} +8 -8
  120. package/dist/label.d.ts +1 -1
  121. package/dist/label.js +1 -1
  122. package/dist/layer-container-DL4yclOu.js +1 -0
  123. package/dist/layer-container.d.ts +2 -2
  124. package/dist/layer-container.js +1 -1
  125. package/dist/line-chart.d.ts +12 -12
  126. package/dist/line-chart.js +1 -1
  127. package/dist/list-cQZPSjfz.js +1 -0
  128. package/dist/list.d.ts +17 -17
  129. package/dist/list.js +1 -1
  130. package/dist/live-region-Dhapu8a5.js +1 -0
  131. package/dist/live-region.d.ts +1 -1
  132. package/dist/live-region.js +1 -1
  133. package/dist/llms.txt +23 -22
  134. package/dist/main-CHyWYDak.js +1 -0
  135. package/dist/main.d.ts +1 -1
  136. package/dist/main.js +1 -1
  137. package/dist/mantle.css +25 -25
  138. package/dist/media-object.d.ts +4 -4
  139. package/dist/media-object.js +1 -1
  140. package/dist/multi-select.d.ts +28 -28
  141. package/dist/multi-select.js +1 -1
  142. package/dist/otp-input.d.ts +3 -3
  143. package/dist/otp-input.js +1 -1
  144. package/dist/pagination.d.ts +4 -4
  145. package/dist/pagination.js +1 -1
  146. package/dist/{popover-lwkwWcRW.d.ts → popover-Bei0jyfH.d.ts} +73 -7
  147. package/dist/popover-DhgunktK.js +1 -0
  148. package/dist/popover-T2EyaqGK.d.ts +1 -0
  149. package/dist/popover.d.ts +2 -2
  150. package/dist/popover.js +1 -1
  151. package/dist/primitive-D8CzV_Ft.js +1 -0
  152. package/dist/progress.d.ts +1 -1
  153. package/dist/progress.js +1 -1
  154. package/dist/qr-code.d.ts +3 -3
  155. package/dist/qr-code.js +1 -1
  156. package/dist/query-filter.d.ts +6 -6
  157. package/dist/query.d.ts +8 -3
  158. package/dist/query.js +1 -1
  159. package/dist/{radio-group-sLz5AA9I.d.ts → radio-group-BJQ6EOqh.d.ts} +1 -1
  160. package/dist/radio-group-BliblUqe.js +1 -0
  161. package/dist/radio-group-ggEkCi0V.js +1 -0
  162. package/dist/radio-group.d.ts +2 -2
  163. package/dist/radio-group.js +1 -1
  164. package/dist/sandbar.d.ts +30 -30
  165. package/dist/sandbar.js +1 -1
  166. package/dist/sandboxed-on-click-D4PL5_GR.js +1 -0
  167. package/dist/sandboxed-on-click.js +1 -1
  168. package/dist/scatter-plot.d.ts +13 -14
  169. package/dist/scatter-plot.js +1 -1
  170. package/dist/segmented-control.d.ts +1 -1
  171. package/dist/segmented-control.js +1 -1
  172. package/dist/select-1xuUx_os.js +1 -0
  173. package/dist/{select-BqmpVJJT.d.ts → select-BpaXHxJm.d.ts} +6 -6
  174. package/dist/select.d.ts +1 -1
  175. package/dist/select.js +1 -1
  176. package/dist/selectable-list.d.ts +18 -18
  177. package/dist/selectable-list.js +1 -1
  178. package/dist/{separator-QfH0ot5K.d.ts → separator-Ck4sPrdN.d.ts} +1 -1
  179. package/dist/separator-DnvhwY2J.js +1 -0
  180. package/dist/separator.d.ts +1 -1
  181. package/dist/separator.js +1 -1
  182. package/dist/{shake-DL6WhMXM.js → shake-CAUpKBHe.js} +1 -1
  183. package/dist/sheet-DHy_vlme.js +1 -0
  184. package/dist/sheet.d.ts +23 -7
  185. package/dist/sheet.js +1 -1
  186. package/dist/sidebar.d.ts +37 -37
  187. package/dist/sidebar.js +1 -1
  188. package/dist/skeleton-DHfyjuQi.js +1 -0
  189. package/dist/skeleton.d.ts +4 -4
  190. package/dist/skeleton.js +1 -1
  191. package/dist/skip-to-main-link.d.ts +1 -1
  192. package/dist/skip-to-main-link.js +1 -1
  193. package/dist/slider.d.ts +1 -1
  194. package/dist/slider.js +1 -1
  195. package/dist/slot-B7rwscwd.js +1 -0
  196. package/dist/{slot-D12N_fZJ.d.ts → slot-BEMQMbk3.d.ts} +4 -4
  197. package/dist/slot.d.ts +1 -1
  198. package/dist/slot.js +1 -1
  199. package/dist/source-all.css +5 -1
  200. package/dist/split-button.d.ts +9 -9
  201. package/dist/split-button.js +1 -1
  202. package/dist/strata.d.ts +22 -22
  203. package/dist/strata.js +1 -1
  204. package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
  205. package/dist/switch.d.ts +1 -1
  206. package/dist/switch.js +1 -1
  207. package/dist/table-BnLdXUai.js +1 -0
  208. package/dist/{table-rWiVWEgB.d.ts → table-Ii9hHUWN.d.ts} +5 -5
  209. package/dist/table.d.ts +1 -1
  210. package/dist/table.js +1 -1
  211. package/dist/tabs.d.ts +2 -2
  212. package/dist/tabs.js +1 -1
  213. package/dist/text-area.d.ts +1 -1
  214. package/dist/text-area.js +1 -1
  215. package/dist/theme-BNdZl352.js +1 -0
  216. package/dist/theme-switcher.d.ts +4 -4
  217. package/dist/theme-switcher.js +1 -1
  218. package/dist/theme.d.ts +14 -12
  219. package/dist/theme.js +1 -1
  220. package/dist/toast.d.ts +2 -2
  221. package/dist/toast.js +1 -1
  222. package/dist/tokens.dark.json +3261 -0
  223. package/dist/tokens.json +4933 -0
  224. package/dist/tokens.resolver.json +37 -0
  225. package/dist/{tooltip-CpK3XTor.d.ts → tooltip-CstGDKwy.d.ts} +4 -4
  226. package/dist/tooltip-DQO40Mrq.js +1 -0
  227. package/dist/tooltip.d.ts +1 -1
  228. package/dist/tooltip.js +1 -1
  229. package/dist/truncated-text.d.ts +1 -1
  230. package/dist/truncated-text.js +1 -1
  231. package/dist/use-breakpoint-B4Kh0xE6.js +1 -0
  232. package/dist/use-callback-ref-DiOXFQzM.js +1 -0
  233. package/dist/use-composed-refs-DPYmLDSe.js +1 -0
  234. package/dist/use-copy-to-clipboard-hBL6_65i.js +1 -0
  235. package/dist/use-inert-siblings-C4RHXrZc.js +1 -0
  236. package/dist/use-is-apple-platform-Bq6_KbVX.js +1 -0
  237. package/dist/use-is-hydrated-BeLOGKwE.js +1 -0
  238. package/dist/use-is-hydrated-after-paint-CrHt3OHw.js +1 -0
  239. package/dist/use-isomorphic-layout-effect-CL6iq0Bj.js +1 -0
  240. package/dist/use-matches-media-query-FfvtNKQe.js +1 -0
  241. package/dist/use-prefers-reduced-motion-Ck6dnOM9.js +1 -0
  242. package/dist/use-swipe-to-dismiss-BYdlca8r.js +1 -0
  243. package/dist/utils.d.ts +1 -1
  244. package/dist/utils.js +1 -1
  245. package/dist/visually-hidden.d.ts +1 -1
  246. package/dist/visually-hidden.js +1 -1
  247. package/dist/well.d.ts +1 -1
  248. package/dist/well.js +1 -1
  249. package/package.json +16 -2
  250. package/dist/alert-CH99Rw-R.js +0 -1
  251. package/dist/anchor-CgcbWEUs.js +0 -1
  252. package/dist/browser-only-BTSrYWLj.js +0 -1
  253. package/dist/button-69InNC_m.js +0 -1
  254. package/dist/button-BWGUuWnu.js +0 -1
  255. package/dist/button-Cu9e3SM7.js +0 -1
  256. package/dist/chart-DudCw24t.js +0 -2
  257. package/dist/checkbox-CS504fKk.js +0 -1
  258. package/dist/choice-uyYccm0A.js +0 -1
  259. package/dist/code-DUJzSl4K.js +0 -1
  260. package/dist/compose-refs-sFdxsL7k.js +0 -1
  261. package/dist/dialog-CsugEt2A.js +0 -1
  262. package/dist/dropdown-menu-DHdgaw4P.js +0 -1
  263. package/dist/field-Bihblt8U.js +0 -1
  264. package/dist/field-CPvjazWN.js +0 -1
  265. package/dist/icon-kK0c-POG.js +0 -1
  266. package/dist/icons-4JA-SGfv.js +0 -1
  267. package/dist/icons-CDLz5lpI.js +0 -1
  268. package/dist/icons-CSwTVV2m.js +0 -1
  269. package/dist/input-DHovzBjS.js +0 -1
  270. package/dist/kbd-CLHsJ99p.js +0 -1
  271. package/dist/label-DmDwzPD8.js +0 -1
  272. package/dist/layer-container-kEQiE4zV.js +0 -1
  273. package/dist/list-CO_yLdln.js +0 -1
  274. package/dist/live-region-DQ1QLv3L.js +0 -1
  275. package/dist/main-CC1L9IsH.js +0 -1
  276. package/dist/popover-BhTFutCz.d.ts +0 -1
  277. package/dist/popover-DxOqLKxy.js +0 -1
  278. package/dist/primitive-Dz9Al-us.js +0 -1
  279. package/dist/radio-group-HDVxTNPi.js +0 -1
  280. package/dist/radio-group-jj2abc0t.js +0 -1
  281. package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
  282. package/dist/select-C6Su0dU0.js +0 -1
  283. package/dist/separator-DfzxVutO.js +0 -1
  284. package/dist/sheet-Bd2LIhzF.js +0 -1
  285. package/dist/skeleton-DBpI-ko5.js +0 -1
  286. package/dist/slot-DdYN1L1C.js +0 -1
  287. package/dist/table-CFHiDBW8.js +0 -1
  288. package/dist/theme-DdZgLvKH.js +0 -1
  289. package/dist/tooltip-b6oiTaWq.js +0 -1
  290. package/dist/use-breakpoint--mo7kr9d.js +0 -1
  291. package/dist/use-callback-ref-BvVyI5K1.js +0 -1
  292. package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
  293. package/dist/use-inert-siblings-CNmNuS2h.js +0 -1
  294. package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
  295. package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
  296. package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
  297. package/dist/use-matches-media-query-m860lols.js +0 -1
  298. package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
  299. package/dist/use-swipe-to-dismiss-i__cTF2v.js +0 -1
@@ -3,11 +3,11 @@
3
3
  *
4
4
  * @see https://mantle.ngrok.com/components/data-display/data-table
5
5
  */
6
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
6
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
7
7
  import { s as SortingMode } from "./direction-CpRzTtZh.js";
8
- import { i as ButtonIntent, n as ButtonAppearance, t as Button } from "./button-Cgf2IcEC.js";
9
- import { i as IconButtonIntent, r as IconButtonAppearance, t as IconButton } from "./button-BGwOPjGV.js";
10
- import { t as Table$1 } from "./table-rWiVWEgB.js";
8
+ import { i as ButtonIntent, n as ButtonAppearance, t as Button } from "./button-Ddj6yr10.js";
9
+ import { i as IconButtonIntent, r as IconButtonAppearance, t as IconButton } from "./button-DnYv7IOT.js";
10
+ import { t as Table$1 } from "./table-Ii9hHUWN.js";
11
11
  import { ComponentProps, ReactNode } from "react";
12
12
  import { CellData, Column, Column_RowSorting, Row as Row$1, RowData, Row_RowExpanding, StockFeatures, Table, TableFeatures } from "@tanstack/react-table";
13
13
  export * from "@tanstack/react-table";
@@ -77,7 +77,7 @@ type DataTableProps<TFeatures extends TableFeatures, TData extends RowData> = Co
77
77
  * REQUIRED: Construct a TanStack Table instance via `useTable` (from
78
78
  * `@tanstack/react-table`, also re-exported from `@ngrok/mantle/data-table`)
79
79
  * and pass it through the `table` prop. The instance owns columns, data, and
80
- * any sorting / filtering / pagination state — the wrapper components read
80
+ * any sorting / filtering / pagination state. The wrapper components read
81
81
  * from it.
82
82
  *
83
83
  * @see https://mantle.ngrok.com/components/data-display/data-table#datatableroot
@@ -127,13 +127,13 @@ type DataTableHeaderSortButtonProps<TFeatures extends SortableTableFeatures, TDa
127
127
  */
128
128
  column: SortableColumn<TFeatures, TData, TValue>;
129
129
  /**
130
- * The visual style of the sort button. Optional — the header sort button's
130
+ * The visual style of the sort button. Optional: the header sort button's
131
131
  * design is a ghost button, so the wrapper defaults it.
132
132
  * @default "ghost"
133
133
  */
134
134
  appearance?: ButtonAppearance;
135
135
  /**
136
- * The tone of the sort button. Optional — the header sort button's design
136
+ * The tone of the sort button. Optional: the header sort button's design
137
137
  * is neutral-toned, so the wrapper defaults it.
138
138
  * @default "neutral"
139
139
  */
@@ -323,8 +323,8 @@ declare const Body: ({ "data-slot": dataSlot, ...props }: ComponentProps<typeof
323
323
  type DataTableHeadProps = Omit<ComponentProps<typeof Table$1.Head>, "children"> & WithDataSlot;
324
324
  /**
325
325
  * The `<thead>` container that renders column headers automatically from
326
- * `table.getHeaderGroups()`. Does not accept children — headers come from each
327
- * column's `header` definition on the TanStack Table column config.
326
+ * `table.getHeaderGroups()`. Does not accept children: the headers come from
327
+ * each column's `header` definition on the TanStack Table column config.
328
328
  *
329
329
  * @see https://mantle.ngrok.com/components/data-display/data-table#datatablehead
330
330
  *
@@ -349,8 +349,8 @@ type DataTableRowProps<TFeatures extends TableFeatures, TData extends RowData> =
349
349
  row: Row$1<TFeatures, TData>;
350
350
  /**
351
351
  * Renders an inline detail panel beneath the row. Called only while the row is
352
- * expanded (`row.getIsExpanded()`), so the panel — and any expensive work it
353
- * does — stays lazy. Mantle wraps the returned content in a sibling
352
+ * expanded (`row.getIsExpanded()`), so the panel (and any expensive work it
353
+ * does) stays lazy. Mantle wraps the returned content in a sibling
354
354
  * `DataTable.ExpandedRow` spanning every visible column, so return the
355
355
  * panel content (not a `<tr>`). Requires the table to register
356
356
  * `rowExpandingFeature`, plus `getRowCanExpand` for detail panels; pair it
@@ -363,7 +363,7 @@ type DataTableRowProps<TFeatures extends TableFeatures, TData extends RowData> =
363
363
  } & WithDataSlot;
364
364
  /**
365
365
  * A single data table body row rendered from a TanStack Table row instance.
366
- * Does not accept children — cells come from each column's `cell` definition.
366
+ * Does not accept children: cells come from each column's `cell` definition.
367
367
  *
368
368
  * When `onClick` is set, the row receives `cursor-pointer` and `data-clickable`.
369
369
  * Pass a different `cursor-*` class via `className` (e.g. `cursor-default`,
@@ -423,7 +423,7 @@ type DataTableRowProps<TFeatures extends TableFeatures, TData extends RowData> =
423
423
  * ```
424
424
  *
425
425
  * @example
426
- * Expandable row with an inline JSON detail panel (lazy — only built when open):
426
+ * Expandable row with an inline JSON detail panel (lazy: built only when open):
427
427
  * ```tsx
428
428
  * import { CodeBlock, jsonCodeBlockValue } from "@ngrok/mantle/code-block";
429
429
  *
@@ -469,7 +469,7 @@ type DataTableEmptyRowProps = ComponentProps<typeof Table$1.Row> & WithDataSlot;
469
469
  * const rows = table.getRowModel().rows;
470
470
  * const isFiltered = (table.state.globalFilter ?? "") !== "";
471
471
  *
472
- * // EmptyRow already spans every column and Empty.Root centers itself — drop a
472
+ * // EmptyRow already spans every column and Empty.Root centers itself. Drop a
473
473
  * // single Empty.Root in as the child; don't hand-roll a <td> or any centering.
474
474
  * <DataTable.Body>
475
475
  * {rows.length > 0 ? (
@@ -632,12 +632,12 @@ declare function ControlCell({ "data-slot": dataSlot, children, className, onCli
632
632
  * Compute the stable DOM `id` for a row's expanded detail row. Shared by
633
633
  * `DataTable.RowExpandButton` (as its `aria-controls` target) and
634
634
  * `DataTable.ExpandedRow` (as its `id`) so the accessibility association is
635
- * _derived_ from the row — never synchronized state — and stays correct whether
635
+ * _derived_ from the row (never synchronized state) and stays correct whether
636
636
  * or not the detail panel is currently rendered.
637
637
  *
638
638
  * REQUIRED: configure the table with a stable `getRowId` so `row.id` (and thus
639
639
  * this id) is stable across sorting/filtering/pagination. Any `row.id` value is
640
- * safe — it is URL-encoded into a valid, whitespace-free HTML id token (and thus
640
+ * safe: it is URL-encoded into a valid, whitespace-free HTML id token (and thus
641
641
  * a valid `aria-controls` IDREF), so display names with spaces, URLs, and emails
642
642
  * all work; `getRowId` controls the value.
643
643
  *
@@ -646,13 +646,13 @@ declare function ControlCell({ "data-slot": dataSlot, children, className, onCli
646
646
  * <DataTable.RowExpandButton row={row} label={row.original.name} />
647
647
  * // ...renders aria-controls={expandedRowId(row)} while expanded, and
648
648
  * <DataTable.ExpandedRow row={row}>...</DataTable.ExpandedRow>
649
- * // ...renders id={expandedRowId(row)} — the same value, so they stay associated.
649
+ * // ...renders id={expandedRowId(row)}, the same value, so they stay associated.
650
650
  * ```
651
651
  */
652
652
  declare function expandedRowId<TFeatures extends TableFeatures, TData extends RowData>(row: Row$1<TFeatures, TData>): string;
653
653
  type DataTableExpandHeaderProps = Omit<ComponentProps<typeof Table$1.Header>, "children"> & {
654
654
  /**
655
- * Optional header content — e.g. an "expand all" toggle wired to
655
+ * Optional header content, e.g. an "expand all" toggle wired to
656
656
  * `table.getToggleAllRowsExpandedHandler()`. Defaults to a screen-reader-only
657
657
  * label so the column is announced while staying visually empty.
658
658
  */
@@ -682,13 +682,13 @@ type DataTableExpandHeaderProps = Omit<ComponentProps<typeof Table$1.Header>, "c
682
682
  declare function ExpandHeader({ "data-slot": dataSlot, children, className, ...props }: DataTableExpandHeaderProps): import("react").JSX.Element;
683
683
  type DataTableRowExpandButtonProps<TFeatures extends ExpandableTableFeatures, TData extends RowData> = Omit<ComponentProps<typeof IconButton>, "appearance" | "aria-controls" | "aria-expanded" | "icon" | "intent" | "label"> & {
684
684
  /**
685
- * The visual style of the expand toggle. Optional — the row expand button's
685
+ * The visual style of the expand toggle. Optional: the row expand button's
686
686
  * design is a ghost button, so the wrapper defaults it.
687
687
  * @default "ghost"
688
688
  */
689
689
  appearance?: IconButtonAppearance;
690
690
  /**
691
- * The tone of the expand toggle. Optional — the row expand button's design
691
+ * The tone of the expand toggle. Optional: the row expand button's design
692
692
  * is neutral-toned, so the wrapper defaults it, and it is the only tone
693
693
  * `IconButton` draws.
694
694
  * @default "neutral"
@@ -774,10 +774,10 @@ type DataTableExpandedRowProps<TFeatures extends TableFeatures, TData extends Ro
774
774
  /**
775
775
  * The sibling `<tr>` that renders a row's expanded detail panel. For the common
776
776
  * case, prefer `DataTable.Row`'s `renderExpanded` prop, which renders this for
777
- * you. Reach for `ExpandedRow` directly when you need full control — a custom
777
+ * you. Reach for `ExpandedRow` directly when you need full control: a custom
778
778
  * `colSpan`, multiple panels, or bespoke markup. Render it directly after the
779
- * parent `DataTable.Row` — wrapped in a `Fragment`, never a DOM element (a node
780
- * between `<tbody>` and `<tr>` is invalid HTML) — and only when
779
+ * parent `DataTable.Row`, wrapped in a `Fragment` and never a DOM element (a node
780
+ * between `<tbody>` and `<tr>` is invalid HTML). Render it only when
781
781
  * `row.getIsExpanded()` is true.
782
782
  *
783
783
  * The single cell spans every visible column (override with `colSpan`), carries
@@ -793,8 +793,8 @@ type DataTableExpandedRowProps<TFeatures extends TableFeatures, TData extends Ro
793
793
  *
794
794
  * @example
795
795
  * Render the row's underlying object as JSON (a common detail-panel use case).
796
- * `jsonCodeBlockValue` highlights the JSON entirely on the client — no Shiki
797
- * runtime, no build-time plugin, no server roundtrip — so it works for runtime
796
+ * `jsonCodeBlockValue` highlights the JSON entirely on the client (no Shiki
797
+ * runtime, no build-time plugin, no server roundtrip), so it works for runtime
798
798
  * data and matches server/build-time highlighting:
799
799
  * ```tsx
800
800
  * import { CodeBlock, jsonCodeBlockValue } from "@ngrok/mantle/code-block";
@@ -819,7 +819,7 @@ type DataTableExpandedRowProps<TFeatures extends TableFeatures, TData extends Ro
819
819
  */
820
820
  declare function ExpandedRow<TFeatures extends TableFeatures, TData extends RowData>({ "data-slot": dataSlot, children, className, colSpan, row, ...props }: DataTableExpandedRowProps<TFeatures, TData>): import("react").JSX.Element;
821
821
  /**
822
- * Use `DataTable` for INTERACTIVE tabular data — sorting, filtering, pagination,
822
+ * Use `DataTable` for INTERACTIVE tabular data: sorting, filtering, pagination,
823
823
  * row selection, and server-side or client-side data. Built on TanStack Table;
824
824
  * the consumer MUST construct a `useTable` instance from
825
825
  * `@tanstack/react-table` and pass it to `DataTable.Root` via the `table` prop.
@@ -872,7 +872,7 @@ declare function ExpandedRow<TFeatures extends TableFeatures, TData extends RowD
872
872
  * ```
873
873
  *
874
874
  * @example
875
- * Minimal — read-only table with a single sortable column:
875
+ * A minimal, read-only table with a single sortable column:
876
876
  * ```tsx
877
877
  * import {
878
878
  * DataTable,
@@ -933,7 +933,7 @@ declare function ExpandedRow<TFeatures extends TableFeatures, TData extends RowD
933
933
  * ```
934
934
  *
935
935
  * @example
936
- * Sortable, filterable, paginated, with both empty states — a global text
936
+ * Sortable, filterable, paginated, with both empty states: a global text
937
937
  * filter, the no-data vs. no-results-for-filter empty states (an `Empty`
938
938
  * dropped into `DataTable.EmptyRow`), and `CursorPagination` with a page-size
939
939
  * dropdown:
@@ -1057,7 +1057,7 @@ declare function ExpandedRow<TFeatures extends TableFeatures, TData extends RowD
1057
1057
  * {rows.length > 0 ? (
1058
1058
  * rows.map((row) => <DataTable.Row key={row.id} row={row} />)
1059
1059
  * ) : isFiltered ? (
1060
- * // No results for the active filter — give the user a way out.
1060
+ * // No results for the active filter: give the user a way out.
1061
1061
  * <DataTable.EmptyRow>
1062
1062
  * <Empty.Root>
1063
1063
  * <Empty.Icon svg={<MagnifyingGlassIcon />} />
@@ -1078,7 +1078,7 @@ declare function ExpandedRow<TFeatures extends TableFeatures, TData extends RowD
1078
1078
  * </Empty.Root>
1079
1079
  * </DataTable.EmptyRow>
1080
1080
  * ) : (
1081
- * // No data yet — informational, optionally a primary "create" action.
1081
+ * // No data yet: informational, optionally a primary "create" action.
1082
1082
  * <DataTable.EmptyRow>
1083
1083
  * <Empty.Root>
1084
1084
  * <Empty.Icon svg={<TrayIcon />} />
@@ -1121,7 +1121,7 @@ declare function ExpandedRow<TFeatures extends TableFeatures, TData extends RowD
1121
1121
  * ```
1122
1122
  *
1123
1123
  * @example
1124
- * Row action column — a sticky right-edge cell with a dropdown menu of actions.
1124
+ * Row action column: a sticky right-edge cell with a dropdown menu of actions.
1125
1125
  * The cell stops its own clicks, so the menu opens without a clickable row
1126
1126
  * navigating:
1127
1127
  * ```tsx
@@ -1208,7 +1208,7 @@ declare const DataTable: {
1208
1208
  /**
1209
1209
  * The root container of the data table component. REQUIRED: pass a
1210
1210
  * `useTable` instance (from `@tanstack/react-table`, also re-exported
1211
- * from `@ngrok/mantle/data-table`) via the `table` prop — every other
1211
+ * from `@ngrok/mantle/data-table`) via the `table` prop. Every other
1212
1212
  * `DataTable.*` part reads from it through context.
1213
1213
  *
1214
1214
  * @see https://mantle.ngrok.com/components/data-display/data-table#datatableroot
@@ -1352,7 +1352,7 @@ declare const DataTable: {
1352
1352
  * branch when `rows.length === 0` to keep the table's frame intact instead
1353
1353
  * of collapsing to an empty `<tbody>`.
1354
1354
  *
1355
- * Drop an `Empty` in as the child for a real empty state — `EmptyRow` spans
1355
+ * Drop an `Empty` in as the child for a real empty state: `EmptyRow` spans
1356
1356
  * every column and `Empty.Root` centers itself, so no `<td>` or centering
1357
1357
  * markup is needed.
1358
1358
  *
@@ -1376,7 +1376,7 @@ declare const DataTable: {
1376
1376
  readonly EmptyRow: typeof EmptyRow;
1377
1377
  /**
1378
1378
  * The `<thead>` container that renders column headers automatically from
1379
- * `table.getHeaderGroups()`. Does not accept children — headers come from
1379
+ * `table.getHeaderGroups()`. Does not accept children: the headers come from
1380
1380
  * each column's `header` definition.
1381
1381
  *
1382
1382
  * @see https://mantle.ngrok.com/components/data-display/data-table#datatablehead
@@ -1480,7 +1480,7 @@ declare const DataTable: {
1480
1480
  readonly HeaderSortButton: typeof HeaderSortButton;
1481
1481
  /**
1482
1482
  * A single data table body row rendered from a TanStack Table row instance.
1483
- * Does not accept children — cells come from each column's `cell` definition.
1483
+ * Does not accept children: cells come from each column's `cell` definition.
1484
1484
  *
1485
1485
  * When `onClick` is set, the row receives `cursor-pointer` and `data-clickable`.
1486
1486
  * It runs the handler only for a plain primary click: a modified click, a
@@ -1489,7 +1489,7 @@ declare const DataTable: {
1489
1489
  * cursor. A `<tr>` is not focusable, so also render a `<Link>` inside the
1490
1490
  * primary cell as the keyboard and screen-reader path.
1491
1491
  *
1492
- * Pass `renderExpanded` to give the row an inline detail panel — the row then
1492
+ * Pass `renderExpanded` to give the row an inline detail panel: the row then
1493
1493
  * renders a sibling `DataTable.ExpandedRow` (only while expanded) holding the
1494
1494
  * returned content. Pair with `DataTable.RowExpandButton`.
1495
1495
  *
@@ -1 +1 @@
1
- import{t as e}from"./use-prefers-reduced-motion-CU6mWmOe.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./button-Cu9e3SM7.js";import{t as i}from"./button-BWGUuWnu.js";import{t as a}from"./icons-CDLz5lpI.js";import{n as o}from"./sandboxed-on-click-C7pPu-2M.js";import{t as s}from"./table-CFHiDBW8.js";import{c}from"react/compiler-runtime";import{Fragment as l,createContext as u,useContext as d,useEffect as f,useRef as p,useState as m}from"react";import h from"tiny-invariant";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";import{Subscribe as y,callMemoOrStaticFn as b,flexRender as x}from"@tanstack/react-table";import{MinusIcon as S}from"@phosphor-icons/react/Minus";import{PlusIcon as C}from"@phosphor-icons/react/Plus";import{column_getIsSorted as w,row_getIsExpanded as T,row_getVisibleCells as E,table_getVisibleLeafColumns as D}from"@tanstack/react-table/static-functions";export*from"@tanstack/react-table";const O=[`unsorted`,`asc`,`desc`],k=[`unsorted`,`desc`,`asc`];function A(e,t){return j(t===`alphanumeric`?O:k,e)??`unsorted`}function j(e,t,n){if(e.length===0)return n;let r=e.findIndex(e=>e===t);if(r===-1)return n;let i=(r+1)%e.length;return e.at(i)??n}function M(e){if(typeof e==`object`&&e&&`width`in e)return e.width===`fit`?`fit`:void 0}const N=u(null);function P(){return d(N)?.table.options}function F(){let e=d(N);return h(e,`useDataTableContext should only be used within a DataTable child component`),e}const I=u(null),L=/* @__PURE__ */ new Set;function R(e){return[...e.querySelectorAll(`:scope > tr`)]}function ee(e){let[,t=`0px`]=getComputedStyle(e).translate.split(` `);return e.offsetTop+(Number.parseFloat(t)||0)}function te(e,t,n){let r=/* @__PURE__ */ new Map,i=0,a=0;for(let o of R(e)){o.hasAttribute(`data-closing`)?a+=o.offsetHeight:(i+=a,a=0);let e=-i,s=t.get(o),c=s==null||Math.abs(s-o.offsetTop-e)<.5?e:s-o.offsetTop;r.set(o,o.offsetTop+e);let l=n.get(o);if(c!==e||(l?.to??0)!==e){if(n.delete(o),c!==e||e!==0){let t=o.animate([{translate:`0 ${c}px`},{translate:`0 ${e}px`}],{duration:c===e?0:200,easing:`cubic-bezier(0.23, 1, 0.32, 1)`,fill:e===0?`none`:`forwards`});n.set(o,{animation:t,to:e})}l?.animation.cancel()}}return r}function ne(){let t=c(14),[n,r]=m(L),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=/* @__PURE__ */ new Map,t[0]=i):i=t[0];let a=p(i),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=/* @__PURE__ */ new Map,t[1]=o):o=t[1];let s=p(o),l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=/* @__PURE__ */ new WeakMap,t[2]=l):l=t[2];let u=p(l),d,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{let e=a.current,t=s.current;return()=>{for(let{timer:t}of e.values())clearTimeout(t);for(let{observer:e}of t.values())e.disconnect()}},h=[],t[3]=d,t[4]=h):(d=t[3],h=t[4]),f(d,h);let g;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>{r(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},t[5]=g):g=t[5];let _=g,v;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{let t=s.current.get(e);if(t!=null&&t.before==null){for(let t of a.current.values())if(t.body===e)return;t.observer.disconnect(),s.current.delete(e)}},t[6]=v):v=t[6];let y=v,b;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(b=(e,t)=>{let n=s.current.get(e),r=t.filter(t=>t.type===`childList`?t.target===e:t.target.parentNode===e);if(n==null||r.length===0)return;let i=n.awaiting==null?null:a.current.get(n.awaiting);for(let e of r){let{target:t}=e;i!=null&&e.type===`attributes`&&t instanceof Element&&t.hasAttribute(`data-closing`)&&i.rows.add(t)}i!=null&&i.rows.size>0&&(n.awaiting=null);for(let[t,n]of a.current)n.body===e&&n.rows.size>0&&![...n.rows].some(ie)&&(clearTimeout(n.timer),a.current.delete(t),_(t));let o=n.before??n.rest;n.before=null,n.rest=te(e,o,u.current),y(e)},t[7]=b):b=t[7];let x=b,S;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>{let t=s.current.get(e);if(t==null){let n=new MutationObserver(t=>x(e,t));n.observe(e,{attributeFilter:[`data-closing`],childList:!0,subtree:!0}),t={observer:n,before:null,rest:/* @__PURE__ */ new Map,awaiting:null},s.current.set(e,t)}if(t.before==null){let n=new Map(R(e).map(re));t.before=n;let r=t;requestAnimationFrame(()=>{r.before===n&&(r.before=null,y(e))})}return t},t[8]=S):S=t[8];let C=S,w;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(w=(t,n)=>{t!=null&&!e()&&C(t),n()},t[9]=w):w=t[9];let T=w,E;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{let t=a.current.get(e);t!=null&&(clearTimeout(t.timer),a.current.delete(e),C(t.body)),_(e)},t[10]=E):E=t[10];let D=E,O;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(O=(t,n,i)=>{n==null||e()?i():(D(t),C(n).awaiting=t,a.current.set(t,{body:n,rows:/* @__PURE__ */ new Set,timer:setTimeout(()=>{a.current.delete(t),C(n),_(t),i()},200)}),r(e=>new Set(e).add(t)))},t[11]=O):O=t[11];let k=O,A;return t[12]===n?A=t[13]:(A={closingRowIds:n,startExpand:T,startCollapse:k,cancelCollapse:D},t[12]=n,t[13]=A),A}function re(e){return[e,ee(e)]}function ie(e){return e.isConnected}function ae(e){let t=c(21),r,i,a,o;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4]):({"data-slot":i,children:r,table:o,...a}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o);let l;t[5]===o?l=t[6]:(l={table:o},t[5]=o,t[6]=l);let u=l,d=ne(),f;t[7]===i?f=t[8]:(f=n(i,`data-table`),t[7]=i,t[8]=f);let p;t[9]===r?p=t[10]:(p=/* @__PURE__ */ _(s.Element,{children:r}),t[9]=r,t[10]=p);let m;t[11]!==a||t[12]!==f||t[13]!==p?(m=/* @__PURE__ */ _(s.Root,{"data-slot":f,...a,children:p}),t[11]=a,t[12]=f,t[13]=p,t[14]=m):m=t[14];let h;t[15]!==d||t[16]!==m?(h=/* @__PURE__ */ _(I.Provider,{value:d,children:m}),t[15]=d,t[16]=m,t[17]=h):h=t[17];let g;return t[18]!==u||t[19]!==h?(g=/* @__PURE__ */ _(N.Provider,{value:u,children:h}),t[18]=u,t[19]=h,t[20]=g):g=t[20],g}function oe(e){let i=c(33),a,o,s,l,u,d,f,p,m,h,g,v;i[0]===e?(a=i[1],o=i[2],s=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9],h=i[10],g=i[11],v=i[12]):({"data-slot":l,appearance:m,children:a,className:o,column:s,disableSorting:h,iconPlacement:g,intent:v,sortingMode:p,sortIcon:d,onClick:u,...f}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=l,i[5]=u,i[6]=d,i[7]=f,i[8]=p,i[9]=m,i[10]=h,i[11]=g,i[12]=v);let b=m===void 0?`ghost`:m,x=h!==void 0&&h,S=g===void 0?`end`:g,C=v===void 0?`neutral`:v,w;i[13]!==b||i[14]!==a||i[15]!==o||i[16]!==s||i[17]!==l||i[18]!==x||i[19]!==S||i[20]!==C||i[21]!==u||i[22]!==d||i[23]!==f||i[24]!==p?(w=()=>{let e=s.getIsSorted(),i=!x&&s.getCanSort(),c=i&&typeof e==`string`?e:`unsorted`;if(!i)return/* @__PURE__ */ _(`span`,{"data-slot":n(l,`data-table-header-sort-button`),"data-sort-direction":`unsorted`,className:t(`flex w-full items-center justify-start`,b===`ghost`&&C===`neutral`&&`text-muted`,o),...f,children:a});let m=d?.(c)??/* @__PURE__ */ _(ye,{mode:p,direction:c});return/* @__PURE__ */ _(r,{appearance:b,"data-slot":n(l,`data-table-header-sort-button`),className:t(`flex justify-start w-full h-full rounded-none not-disabled:active:scale-none`,b===`ghost`&&C===`neutral`&&`text-muted`,o),"data-sort-direction":c,"data-table-header-action":!0,icon:m,iconPlacement:S,onClick:e=>{u?.(e),e.defaultPrevented||p!==void 0&&be(s,p)},intent:C,type:`button`,...f,children:a})},i[13]=b,i[14]=a,i[15]=o,i[16]=s,i[17]=l,i[18]=x,i[19]=S,i[20]=C,i[21]=u,i[22]=d,i[23]=f,i[24]=p,i[25]=w):w=i[25];let T=w,E=P(),D;i[26]!==s||i[27]!==E?(D=()=>({sorted:s.getIsSorted(),options:E}),i[26]=s,i[27]=E,i[28]=D):D=i[28];let O;return i[29]!==s.table.store||i[30]!==T||i[31]!==D?(O=/* @__PURE__ */ _(y,{source:s.table.store,selector:D,children:T}),i[29]=s.table.store,i[30]=T,i[31]=D,i[32]=O):O=i[32],O}const z=`w-px whitespace-nowrap`;function B(e){if(e==null)return;let t=b(e,`getIsSorted`,w);if(t===`asc`)return`ascending`;if(t===`desc`)return`descending`}function V(e){let r=c(21),i,a,o,l,u;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4],u=r[5]):({"data-slot":l,children:i,className:a,column:o,...u}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l,r[5]=u);let d;r[6]!==i||r[7]!==a||r[8]!==o||r[9]!==l||r[10]!==u?(d=()=>{let e=M(o?.columnDef.meta);return/* @__PURE__ */ _(s.Header,{"aria-sort":B(o),"data-column-width":e,"data-slot":n(l,`data-table-header`),className:t(`has-data-table-header-action:px-0`,e===`fit`&&z,a),...u,children:i})},r[6]=i,r[7]=a,r[8]=o,r[9]=l,r[10]=u,r[11]=d):d=r[11];let f=d,p=P();if(o==null){let e;return r[12]===f?e=r[13]:(e=f(),r[12]=f,r[13]=e),e}let m;r[14]!==o||r[15]!==p?(m=()=>({ariaSort:B(o),options:p}),r[14]=o,r[15]=p,r[16]=m):m=r[16];let h;return r[17]!==o.table.store||r[18]!==f||r[19]!==m?(h=/* @__PURE__ */ _(y,{source:o.table.store,selector:m,children:f}),r[17]=o.table.store,r[18]=f,r[19]=m,r[20]=h):h=r[20],h}function H(e){let r=c(17),i,a,o,l;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4]):({"data-slot":o,className:i,column:a,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l);let u=a?.columnDef.meta,d;r[5]===u?d=r[6]:(d=M(u),r[5]=u,r[6]=d);let f=d,p;r[7]===o?p=r[8]:(p=n(o,`data-table-cell`),r[7]=o,r[8]=p);let m=f===`fit`&&z,h;r[9]!==i||r[10]!==m?(h=t(m,i),r[9]=i,r[10]=m,r[11]=h):h=r[11];let g;return r[12]!==l||r[13]!==p||r[14]!==h||r[15]!==f?(g=/* @__PURE__ */ _(s.Cell,{"data-column-width":f,"data-slot":p,className:h,...l}),r[12]=l,r[13]=p,r[14]=h,r[15]=f,r[16]=g):g=r[16],g}const U=e=>{let t=c(8),r,i;t[0]===e?(r=t[1],i=t[2]):({"data-slot":r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(r,`data-table-body`),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=/* @__PURE__ */ _(s.Body,{"data-slot":a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o};function W(e){let t=c(11),r,i;t[0]===e?(r=t[1],i=t[2]):({"data-slot":r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let{table:a}=F(),o;t[3]===r?o=t[4]:(o=n(r,`data-table-head`),t[3]=r,t[4]=o);let l;t[5]===a?l=t[6]:(l=a.getHeaderGroups().map(G),t[5]=a,t[6]=l);let u;return t[7]!==i||t[8]!==o||t[9]!==l?(u=/* @__PURE__ */ _(s.Head,{"data-slot":o,...i,children:l}),t[7]=i,t[8]=o,t[9]=l,t[10]=u):u=t[10],u}function G(e){return/* @__PURE__ */ _(s.Row,{children:e.headers.map(K)},e.id)}function K(e){return/* @__PURE__ */ _(l,{children:e.isPlaceholder?/* @__PURE__ */ _(s.Header,{}):x(e.column.columnDef.header,e.getContext())},e.id)}const q=t(`starting:-translate-y-1 starting:opacity-0`,`motion-safe:transition-[opacity,translate] motion-safe:duration-200 motion-safe:ease-out-strong`,`data-closing:pointer-events-none data-closing:opacity-0 motion-safe:data-closing:duration-150`);function J(e,t){return t.size===0||e.depth===0?!1:e.getParentRows().some(e=>t.has(e.id))}const Y=u(!1);function se(e){if(e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;let t=e.currentTarget.ownerDocument.getSelection();return t==null||t.isCollapsed?!0:!e.currentTarget.contains(t.anchorNode)}function ce(e){let r=c(21),i,a,o,l,u,f;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4],u=r[5],f=r[6]):({"data-slot":a,className:i,onClick:o,renderExpanded:u,row:f,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l,r[5]=u,r[6]=f);let p=d(I)?.closingRowIds??L,m;r[7]!==i||r[8]!==p||r[9]!==a||r[10]!==o||r[11]!==l||r[12]!==u||r[13]!==f?(m=()=>{let e=J(f,p),r=b(f,`getIsExpanded`,T),c=b(f,`getVisibleCells`,E),d=/* @__PURE__ */ _(s.Row,{"data-slot":n(a,`data-table-row`),"data-expanded":r||void 0,"data-closing":e||void 0,inert:e||void 0,"data-clickable":o==null?void 0:``,className:t(f.depth>0&&q,o!=null&&`cursor-pointer`,i),onClick:o&&(e=>{se(e)&&o(e)}),...l,children:/* @__PURE__ */ _(Y.Provider,{value:u!=null,children:c.map(le)})});return u==null?d:/* @__PURE__ */ v(g,{children:[d,r&&/* @__PURE__ */ _($,{row:f,children:u(f)})]})},r[7]=i,r[8]=p,r[9]=a,r[10]=o,r[11]=l,r[12]=u,r[13]=f,r[14]=m):m=r[14];let h=m,x=P(),S;r[15]===x?S=r[16]:(S=e=>({state:e,options:x}),r[15]=x,r[16]=S);let C;return r[17]!==h||r[18]!==f.table.store||r[19]!==S?(C=/* @__PURE__ */ _(y,{source:f.table.store,selector:S,children:h}),r[17]=h,r[18]=f.table.store,r[19]=S,r[20]=C):C=r[20],C}function le(e){return/* @__PURE__ */ _(l,{children:x(e.column.columnDef.cell,e.getContext())},e.id)}function ue(e){let t=c(15),r,i,a;t[0]===e?(r=t[1],i=t[2],a=t[3]):({"data-slot":i,children:r,...a}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a);let{table:o}=F(),l;t[4]===o?l=t[5]:(l=b(o,`getVisibleLeafColumns`,D),t[4]=o,t[5]=l);let u=l.length,d;t[6]===i?d=t[7]:(d=n(i,`data-table-empty-row`),t[6]=i,t[7]=d);let f;t[8]!==r||t[9]!==u?(f=/* @__PURE__ */ _(s.Cell,{colSpan:u,children:r}),t[8]=r,t[9]=u,t[10]=f):f=t[10];let p;return t[11]!==a||t[12]!==d||t[13]!==f?(p=/* @__PURE__ */ _(s.Row,{"data-slot":d,...a,children:f}),t[11]=a,t[12]=d,t[13]=f,t[14]=p):p=t[14],p}function X(){let e=c(1),n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=/* @__PURE__ */ _(`span`,{"aria-hidden":!0,className:t(`pointer-events-none absolute -inset-y-px -left-1.5 w-1.5`,`opacity-0 transition-opacity group-data-sticky-active/table:opacity-100`,`shadow-[1px_0_0_0_var(--border-color-card-muted)]`,`bg-linear-to-l to-transparent`,`from-[color-mix(in_oklab,var(--shadow-color)_var(--shadow-second-opacity),transparent)]`)}),e[0]=n):n=e[0],n}function de(e){let r=c(21),i,a,l,u,d;r[0]===e?(i=r[1],a=r[2],l=r[3],u=r[4],d=r[5]):({"data-slot":l,children:i,className:a,onClick:u,...d}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=l,r[4]=u,r[5]=d);let f;r[6]===u?f=r[7]:(f=o({allowClickEventDefault:!0,onClick:u}),r[6]=u,r[7]=f);let{onClick:p}=f,m;r[8]===l?m=r[9]:(m=n(l,`data-table-action-cell`),r[8]=l,r[9]=m);let h;r[10]===a?h=r[11]:(h=t(`sticky z-10 right-0 text-end align-middle bg-inherit p-2`,a),r[10]=a,r[11]=h);let g;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=/* @__PURE__ */ _(X,{}),r[12]=g):g=r[12];let y;r[13]===i?y=r[14]:(y=/* @__PURE__ */ _(`span`,{"data-slot":`data-table-action-cell-label`,className:`contents`,children:i}),r[13]=i,r[14]=y);let b;return r[15]!==d||r[16]!==p||r[17]!==m||r[18]!==h||r[19]!==y?(b=/* @__PURE__ */ v(s.Cell,{"data-mantle-table-sticky-right":!0,"data-slot":m,className:h,onClick:p,...d,children:[g,y]}),r[15]=d,r[16]=p,r[17]=m,r[18]=h,r[19]=y,r[20]=b):b=r[20],b}function fe(e){let r=c(27),i,a,o,l;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4]):({"data-slot":o,children:i,className:a,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l);let{table:u}=F(),d;r[5]===u?d=r[6]:(d=u.getRowModel(),r[5]=u,r[6]=d);let f=d.rows.length>0,p;r[7]===f?p=r[8]:(p=f?{"data-mantle-table-sticky-right":!0}:{},r[7]=f,r[8]=p);let m;r[9]===o?m=r[10]:(m=n(o,`data-table-action-header`),r[9]=o,r[10]=m);let h=f&&`sticky z-10 right-0 bg-inherit`,g;r[11]!==a||r[12]!==h?(g=t(h,a),r[11]=a,r[12]=h,r[13]=g):g=r[13];let y;r[14]===i?y=r[15]:(y=i??/* @__PURE__ */ _(`span`,{className:`sr-only`,children:`Actions`}),r[14]=i,r[15]=y);let b;r[16]===y?b=r[17]:(b=/* @__PURE__ */ _(`span`,{"data-slot":`data-table-action-header-label`,className:`contents`,children:y}),r[16]=y,r[17]=b);let x;r[18]===f?x=r[19]:(x=f&&/* @__PURE__ */ _(X,{}),r[18]=f,r[19]=x);let S;return r[20]!==l||r[21]!==p||r[22]!==m||r[23]!==g||r[24]!==b||r[25]!==x?(S=/* @__PURE__ */ v(s.Header,{...p,"data-slot":m,className:g,...l,children:[b,x]}),r[20]=l,r[21]=p,r[22]=m,r[23]=g,r[24]=b,r[25]=x,r[26]=S):S=r[26],S}function pe(e){return e!=null&&`nodeType`in e}function me(e){let r=c(20),i,a,o,l,u;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4],u=r[5]):({"data-slot":o,children:i,className:a,onClick:l,...u}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l,r[5]=u);let d=p(!1),f;r[6]===o?f=r[7]:(f=n(o,`data-table-control-cell`),r[6]=o,r[7]=f);let m;r[8]===a?m=r[9]:(m=t(`w-9 px-0 align-top has-[button:enabled,input:enabled]:cursor-pointer`,a),r[8]=a,r[9]=m);let h;r[10]===l?h=r[11]:(h=e=>{if(d.current){e.stopPropagation();return}l?.(e);let t=e.currentTarget.querySelector(`button:not(:disabled), input:not(:disabled)`);t!=null&&(e.stopPropagation(),!e.defaultPrevented&&pe(e.target)&&!t.contains(e.target)&&(t.focus({preventScroll:!0}),d.current=!0,t.click(),d.current=!1))},r[10]=l,r[11]=h);let g;r[12]===i?g=r[13]:(g=/* @__PURE__ */ _(`span`,{"data-slot":`data-table-control-cell-label`,className:`flex h-lh items-center justify-center`,children:i}),r[12]=i,r[13]=g);let v;return r[14]!==u||r[15]!==f||r[16]!==m||r[17]!==h||r[18]!==g?(v=/* @__PURE__ */ _(s.Cell,{"data-slot":f,className:m,onClick:h,...u,children:g}),r[14]=u,r[15]=f,r[16]=m,r[17]=h,r[18]=g,r[19]=v):v=r[19],v}function Z(e){return`data-table-expanded-row-${encodeURIComponent(e.id)}`}function Q(e){let r=c(16),i,a,o,l;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4]):({"data-slot":o,children:i,className:a,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l);let u;r[5]===o?u=r[6]:(u=n(o,`data-table-expand-header`),r[5]=o,r[6]=u);let d;r[7]===a?d=r[8]:(d=t(`w-9 px-0 text-center`,a),r[7]=a,r[8]=d);let f;r[9]===i?f=r[10]:(f=i??/* @__PURE__ */ _(`span`,{className:`sr-only`,children:`Row details`}),r[9]=i,r[10]=f);let p;return r[11]!==l||r[12]!==u||r[13]!==d||r[14]!==f?(p=/* @__PURE__ */ _(s.Header,{"data-slot":u,className:d,...l,children:f}),r[11]=l,r[12]=u,r[13]=d,r[14]=f,r[15]=p):p=r[15],p}const he=/* @__PURE__ */ _(C,{weight:`bold`,className:`size-3.5`}),ge=/* @__PURE__ */ _(S,{weight:`bold`,className:`size-3.5`});function _e(e){let r=c(21),a,o,s,l,u,f,p,m,h,g,v;r[0]===e?(a=r[1],o=r[2],s=r[3],l=r[4],u=r[5],f=r[6],p=r[7],m=r[8],h=r[9],g=r[10],v=r[11]):({"data-slot":o,appearance:p,className:a,collapseIcon:m,expandIcon:h,intent:g,label:s,onClick:l,row:f,size:v,...u}=e,r[0]=e,r[1]=a,r[2]=o,r[3]=s,r[4]=l,r[5]=u,r[6]=f,r[7]=p,r[8]=m,r[9]=h,r[10]=g,r[11]=v);let b=p===void 0?`ghost`:p,x=m===void 0?ge:m,S=h===void 0?he:h,C=g===void 0?`neutral`:g,w=v===void 0?`sm`:v,T=()=>{if(!f.getCanExpand())return null;let e=f.getIsExpanded()&&!k,r=f.getToggleExpandedHandler(),c=f.subRows.length>0,d=D||!c;return/* @__PURE__ */ _(i,{type:`button`,"data-slot":n(o,`data-table-row-expand-button`),appearance:b,intent:C,size:w,className:t(`rounded`,a),"aria-expanded":e,"aria-controls":e&&d?Z(f):void 0,icon:e?x:S,label:c?`${e?`Collapse`:`Expand`} ${s}`:`${e?`Hide`:`Show`} details for ${s}`,onClick:t=>{if(t.stopPropagation(),l?.(t),t.defaultPrevented)return;let n=t.currentTarget.closest(`tbody`);O==null?r():k?O.cancelCollapse(f.id):e?O.startCollapse(f.id,n,()=>f.toggleExpanded(!1)):O.startExpand(n,r)},...u})},E=P(),D=d(Y),O=d(I),k=O?.closingRowIds.has(f.id)??!1,A;r[12]!==D||r[13]!==k||r[14]!==E||r[15]!==f?(A=()=>({isExpanded:f.getIsExpanded(),hasDetailPanel:D,isClosing:k,options:E}),r[12]=D,r[13]=k,r[14]=E,r[15]=f,r[16]=A):A=r[16];let j;return r[17]!==T||r[18]!==f.table.store||r[19]!==A?(j=/* @__PURE__ */ _(y,{source:f.table.store,selector:A,children:T}),r[17]=T,r[18]=f.table.store,r[19]=A,r[20]=j):j=r[20],j}function $(e){let r=c(29),i,a,o,l,u,f;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4],u=r[5],f=r[6]):({"data-slot":l,children:i,className:a,colSpan:o,row:f,...u}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l,r[5]=u,r[6]=f);let p;r[7]===f?p=r[8]:(p=()=>b(f,`getVisibleCells`,E).length,r[7]=f,r[8]=p);let m=p,h=d(I)?.closingRowIds??L,g;r[9]!==h||r[10]!==f?(g=h.has(f.id)||J(f,h),r[9]=h,r[10]=f,r[11]=g):g=r[11];let v=g,x;r[12]!==i||r[13]!==a||r[14]!==l||r[15]!==v||r[16]!==u||r[17]!==f?(x=e=>{let{numberOfColumns:r}=e;return/* @__PURE__ */ _(s.Row,{"data-slot":n(l,`data-table-expanded-row`),"data-expanded-content":!0,"data-closing":v||void 0,inert:v||void 0,className:t(`[&>td]:border-t-0`,q,a),...u,children:/* @__PURE__ */ _(s.Cell,{id:Z(f),colSpan:r,className:`bg-card font-sans text-body`,children:i})})},r[12]=i,r[13]=a,r[14]=l,r[15]=v,r[16]=u,r[17]=f,r[18]=x):x=r[18];let S=x,C=P();if(o!=null){let e;return r[19]!==o||r[20]!==S?(e=S({numberOfColumns:o}),r[19]=o,r[20]=S,r[21]=e):e=r[21],e}let w;r[22]!==m||r[23]!==C?(w=()=>({numberOfColumns:m(),options:C}),r[22]=m,r[23]=C,r[24]=w):w=r[24];let T;return r[25]!==S||r[26]!==f.table.store||r[27]!==w?(T=/* @__PURE__ */ _(y,{source:f.table.store,selector:w,children:S}),r[25]=S,r[26]=f.table.store,r[27]=w,r[28]=T):T=r[28],T}const ve={Root:ae,ActionCell:de,ActionHeader:fe,Cell:H,Body:U,EmptyRow:ue,Head:W,Header:V,HeaderSortButton:oe,Row:ce,ExpandHeader:Q,ControlCell:me,RowExpandButton:_e,ExpandedRow:$};function ye(e){let t=c(10),n,r,i;if(t[0]===e?(n=t[1],r=t[2],i=t[3]):({direction:n,mode:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i),n===`unsorted`||!r||!n){let e;return t[4]===i?e=t[5]:(e=/* @__PURE__ */ _(`svg`,{"aria-hidden":!0,...i}),t[4]=i,t[5]=e),e}let o;return t[6]!==n||t[7]!==r||t[8]!==i?(o=/* @__PURE__ */ _(a,{mode:r,direction:n,...i}),t[6]=n,t[7]=r,t[8]=i,t[9]=o):o=t[9],o}function be(e,t){if(!e.getCanSort())return;let n=e.getIsSorted();switch(A(typeof n==`string`?n:`unsorted`,t)){case`unsorted`:e.clearSorting();return;case`asc`:e.toggleSorting(!1);return;case`desc`:e.toggleSorting(!0);return;default:return}}export{ve as DataTable,Z as expandedRowId};
1
+ "use client";import{t as e}from"./use-prefers-reduced-motion-Ck6dnOM9.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./button-DNLTJ32M.js";import{t as i}from"./button-B9bChDgl.js";import{t as a}from"./icons-DEDCLZ8B.js";import{n as o}from"./sandboxed-on-click-D4PL5_GR.js";import{t as s}from"./table-BnLdXUai.js";import{c}from"react/compiler-runtime";import{Fragment as l,createContext as u,useContext as d,useEffect as f,useRef as p,useState as m}from"react";import h from"tiny-invariant";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";import{Subscribe as y,callMemoOrStaticFn as b,flexRender as x}from"@tanstack/react-table";import{MinusIcon as S}from"@phosphor-icons/react/Minus";import{PlusIcon as C}from"@phosphor-icons/react/Plus";import{column_getIsSorted as w,row_getIsExpanded as T,row_getVisibleCells as E,table_getVisibleLeafColumns as D}from"@tanstack/react-table/static-functions";export*from"@tanstack/react-table";const O=[`unsorted`,`asc`,`desc`],k=[`unsorted`,`desc`,`asc`];function A(e,t){return j(t===`alphanumeric`?O:k,e)??`unsorted`}function j(e,t,n){if(e.length===0)return n;let r=e.findIndex(e=>e===t);if(r===-1)return n;let i=(r+1)%e.length;return e.at(i)??n}function M(e){if(typeof e==`object`&&e&&`width`in e)return e.width===`fit`?`fit`:void 0}const N=u(null);function P(){return d(N)?.table.options}function F(){let e=d(N);return h(e,`DataTable parts must be rendered inside DataTable.Root.`),e}const I=u(null),L=/* @__PURE__ */ new Set;function R(e){return[...e.querySelectorAll(`:scope > tr`)]}function ee(e){let[,t=`0px`]=getComputedStyle(e).translate.split(` `);return e.offsetTop+(Number.parseFloat(t)||0)}function te(e,t,n){let r=/* @__PURE__ */ new Map,i=0,a=0;for(let o of R(e)){o.hasAttribute(`data-closing`)?a+=o.offsetHeight:(i+=a,a=0);let e=-i,s=t.get(o),c=s==null||Math.abs(s-o.offsetTop-e)<.5?e:s-o.offsetTop;r.set(o,o.offsetTop+e);let l=n.get(o);if(c!==e||(l?.to??0)!==e){if(n.delete(o),c!==e||e!==0){let t=o.animate([{translate:`0 ${c}px`},{translate:`0 ${e}px`}],{duration:c===e?0:200,easing:`cubic-bezier(0.23, 1, 0.32, 1)`,fill:e===0?`none`:`forwards`});n.set(o,{animation:t,to:e})}l?.animation.cancel()}}return r}function ne(){let t=c(14),[n,r]=m(L),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=/* @__PURE__ */ new Map,t[0]=i):i=t[0];let a=p(i),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=/* @__PURE__ */ new Map,t[1]=o):o=t[1];let s=p(o),l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=/* @__PURE__ */ new WeakMap,t[2]=l):l=t[2];let u=p(l),d,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{let e=a.current,t=s.current;return()=>{for(let{timer:t}of e.values())clearTimeout(t);for(let{observer:e}of t.values())e.disconnect()}},h=[],t[3]=d,t[4]=h):(d=t[3],h=t[4]),f(d,h);let g;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>{r(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},t[5]=g):g=t[5];let _=g,v;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{let t=s.current.get(e);if(t!=null&&t.before==null){for(let t of a.current.values())if(t.body===e)return;t.observer.disconnect(),s.current.delete(e)}},t[6]=v):v=t[6];let y=v,b;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(b=(e,t)=>{let n=s.current.get(e),r=t.filter(t=>t.type===`childList`?t.target===e:t.target.parentNode===e);if(n==null||r.length===0)return;let i=n.awaiting==null?null:a.current.get(n.awaiting);for(let e of r){let{target:t}=e;i!=null&&e.type===`attributes`&&t instanceof Element&&t.hasAttribute(`data-closing`)&&i.rows.add(t)}i!=null&&i.rows.size>0&&(n.awaiting=null);for(let[t,n]of a.current)n.body===e&&n.rows.size>0&&![...n.rows].some(ie)&&(clearTimeout(n.timer),a.current.delete(t),_(t));let o=n.before??n.rest;n.before=null,n.rest=te(e,o,u.current),y(e)},t[7]=b):b=t[7];let x=b,S;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>{let t=s.current.get(e);if(t==null){let n=new MutationObserver(t=>x(e,t));n.observe(e,{attributeFilter:[`data-closing`],childList:!0,subtree:!0}),t={observer:n,before:null,rest:/* @__PURE__ */ new Map,awaiting:null},s.current.set(e,t)}if(t.before==null){let n=new Map(R(e).map(re));t.before=n;let r=t;requestAnimationFrame(()=>{r.before===n&&(r.before=null,y(e))})}return t},t[8]=S):S=t[8];let C=S,w;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(w=(t,n)=>{t!=null&&!e()&&C(t),n()},t[9]=w):w=t[9];let T=w,E;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{let t=a.current.get(e);t!=null&&(clearTimeout(t.timer),a.current.delete(e),C(t.body)),_(e)},t[10]=E):E=t[10];let D=E,O;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(O=(t,n,i)=>{n==null||e()?i():(D(t),C(n).awaiting=t,a.current.set(t,{body:n,rows:/* @__PURE__ */ new Set,timer:setTimeout(()=>{a.current.delete(t),C(n),_(t),i()},200)}),r(e=>new Set(e).add(t)))},t[11]=O):O=t[11];let k=O,A;return t[12]===n?A=t[13]:(A={closingRowIds:n,startExpand:T,startCollapse:k,cancelCollapse:D},t[12]=n,t[13]=A),A}function re(e){return[e,ee(e)]}function ie(e){return e.isConnected}function ae(e){let t=c(21),r,i,a,o;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4]):({"data-slot":i,children:r,table:o,...a}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o);let l;t[5]===o?l=t[6]:(l={table:o},t[5]=o,t[6]=l);let u=l,d=ne(),f;t[7]===i?f=t[8]:(f=n(i,`data-table`),t[7]=i,t[8]=f);let p;t[9]===r?p=t[10]:(p=/* @__PURE__ */ _(s.Element,{children:r}),t[9]=r,t[10]=p);let m;t[11]!==a||t[12]!==f||t[13]!==p?(m=/* @__PURE__ */ _(s.Root,{"data-slot":f,...a,children:p}),t[11]=a,t[12]=f,t[13]=p,t[14]=m):m=t[14];let h;t[15]!==d||t[16]!==m?(h=/* @__PURE__ */ _(I.Provider,{value:d,children:m}),t[15]=d,t[16]=m,t[17]=h):h=t[17];let g;return t[18]!==u||t[19]!==h?(g=/* @__PURE__ */ _(N.Provider,{value:u,children:h}),t[18]=u,t[19]=h,t[20]=g):g=t[20],g}function oe(e){let i=c(33),a,o,s,l,u,d,f,p,m,h,g,v;i[0]===e?(a=i[1],o=i[2],s=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9],h=i[10],g=i[11],v=i[12]):({"data-slot":l,appearance:m,children:a,className:o,column:s,disableSorting:h,iconPlacement:g,intent:v,sortingMode:p,sortIcon:d,onClick:u,...f}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=l,i[5]=u,i[6]=d,i[7]=f,i[8]=p,i[9]=m,i[10]=h,i[11]=g,i[12]=v);let b=m===void 0?`ghost`:m,x=h!==void 0&&h,S=g===void 0?`end`:g,C=v===void 0?`neutral`:v,w;i[13]!==b||i[14]!==a||i[15]!==o||i[16]!==s||i[17]!==l||i[18]!==x||i[19]!==S||i[20]!==C||i[21]!==u||i[22]!==d||i[23]!==f||i[24]!==p?(w=()=>{let e=s.getIsSorted(),i=!x&&s.getCanSort(),c=i&&typeof e==`string`?e:`unsorted`;if(!i)return/* @__PURE__ */ _(`span`,{"data-slot":n(l,`data-table-header-sort-button`),"data-sort-direction":`unsorted`,className:t(`flex w-full items-center justify-start`,b===`ghost`&&C===`neutral`&&`text-muted`,o),...f,children:a});let m=d?.(c)??/* @__PURE__ */ _(ye,{mode:p,direction:c});return/* @__PURE__ */ _(r,{appearance:b,"data-slot":n(l,`data-table-header-sort-button`),className:t(`flex justify-start w-full h-full rounded-none not-disabled:active:scale-none`,b===`ghost`&&C===`neutral`&&`text-muted`,o),"data-sort-direction":c,"data-table-header-action":!0,icon:m,iconPlacement:S,onClick:e=>{u?.(e),e.defaultPrevented||p!==void 0&&be(s,p)},intent:C,type:`button`,...f,children:a})},i[13]=b,i[14]=a,i[15]=o,i[16]=s,i[17]=l,i[18]=x,i[19]=S,i[20]=C,i[21]=u,i[22]=d,i[23]=f,i[24]=p,i[25]=w):w=i[25];let T=w,E=P(),D;i[26]!==s||i[27]!==E?(D=()=>({sorted:s.getIsSorted(),options:E}),i[26]=s,i[27]=E,i[28]=D):D=i[28];let O;return i[29]!==s.table.store||i[30]!==T||i[31]!==D?(O=/* @__PURE__ */ _(y,{source:s.table.store,selector:D,children:T}),i[29]=s.table.store,i[30]=T,i[31]=D,i[32]=O):O=i[32],O}const z=`w-px whitespace-nowrap`;function B(e){if(e==null)return;let t=b(e,`getIsSorted`,w);if(t===`asc`)return`ascending`;if(t===`desc`)return`descending`}function V(e){let r=c(21),i,a,o,l,u;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4],u=r[5]):({"data-slot":l,children:i,className:a,column:o,...u}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l,r[5]=u);let d;r[6]!==i||r[7]!==a||r[8]!==o||r[9]!==l||r[10]!==u?(d=()=>{let e=M(o?.columnDef.meta);return/* @__PURE__ */ _(s.Header,{"aria-sort":B(o),"data-column-width":e,"data-slot":n(l,`data-table-header`),className:t(`has-data-table-header-action:px-0`,e===`fit`&&z,a),...u,children:i})},r[6]=i,r[7]=a,r[8]=o,r[9]=l,r[10]=u,r[11]=d):d=r[11];let f=d,p=P();if(o==null){let e;return r[12]===f?e=r[13]:(e=f(),r[12]=f,r[13]=e),e}let m;r[14]!==o||r[15]!==p?(m=()=>({ariaSort:B(o),options:p}),r[14]=o,r[15]=p,r[16]=m):m=r[16];let h;return r[17]!==o.table.store||r[18]!==f||r[19]!==m?(h=/* @__PURE__ */ _(y,{source:o.table.store,selector:m,children:f}),r[17]=o.table.store,r[18]=f,r[19]=m,r[20]=h):h=r[20],h}function H(e){let r=c(17),i,a,o,l;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4]):({"data-slot":o,className:i,column:a,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l);let u=a?.columnDef.meta,d;r[5]===u?d=r[6]:(d=M(u),r[5]=u,r[6]=d);let f=d,p;r[7]===o?p=r[8]:(p=n(o,`data-table-cell`),r[7]=o,r[8]=p);let m=f===`fit`&&z,h;r[9]!==i||r[10]!==m?(h=t(m,i),r[9]=i,r[10]=m,r[11]=h):h=r[11];let g;return r[12]!==l||r[13]!==p||r[14]!==h||r[15]!==f?(g=/* @__PURE__ */ _(s.Cell,{"data-column-width":f,"data-slot":p,className:h,...l}),r[12]=l,r[13]=p,r[14]=h,r[15]=f,r[16]=g):g=r[16],g}const U=e=>{let t=c(8),r,i;t[0]===e?(r=t[1],i=t[2]):({"data-slot":r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(r,`data-table-body`),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=/* @__PURE__ */ _(s.Body,{"data-slot":a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o};function W(e){let t=c(11),r,i;t[0]===e?(r=t[1],i=t[2]):({"data-slot":r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let{table:a}=F(),o;t[3]===r?o=t[4]:(o=n(r,`data-table-head`),t[3]=r,t[4]=o);let l;t[5]===a?l=t[6]:(l=a.getHeaderGroups().map(G),t[5]=a,t[6]=l);let u;return t[7]!==i||t[8]!==o||t[9]!==l?(u=/* @__PURE__ */ _(s.Head,{"data-slot":o,...i,children:l}),t[7]=i,t[8]=o,t[9]=l,t[10]=u):u=t[10],u}function G(e){return/* @__PURE__ */ _(s.Row,{children:e.headers.map(K)},e.id)}function K(e){return/* @__PURE__ */ _(l,{children:e.isPlaceholder?/* @__PURE__ */ _(s.Header,{}):x(e.column.columnDef.header,e.getContext())},e.id)}const q=t(`starting:-translate-y-1 starting:opacity-0`,`motion-safe:transition-[opacity,translate] motion-safe:duration-200 motion-safe:ease-out-strong`,`data-closing:pointer-events-none data-closing:opacity-0 motion-safe:data-closing:duration-150`);function J(e,t){return t.size===0||e.depth===0?!1:e.getParentRows().some(e=>t.has(e.id))}const Y=u(!1);function se(e){if(e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;let t=e.currentTarget.ownerDocument.getSelection();return t==null||t.isCollapsed?!0:!e.currentTarget.contains(t.anchorNode)}function ce(e){let r=c(21),i,a,o,l,u,f;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4],u=r[5],f=r[6]):({"data-slot":a,className:i,onClick:o,renderExpanded:u,row:f,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l,r[5]=u,r[6]=f);let p=d(I)?.closingRowIds??L,m;r[7]!==i||r[8]!==p||r[9]!==a||r[10]!==o||r[11]!==l||r[12]!==u||r[13]!==f?(m=()=>{let e=J(f,p),r=b(f,`getIsExpanded`,T),c=b(f,`getVisibleCells`,E),d=/* @__PURE__ */ _(s.Row,{"data-slot":n(a,`data-table-row`),"data-expanded":r||void 0,"data-closing":e||void 0,inert:e||void 0,"data-clickable":o==null?void 0:``,className:t(f.depth>0&&q,o!=null&&`cursor-pointer`,i),onClick:o&&(e=>{se(e)&&o(e)}),...l,children:/* @__PURE__ */ _(Y.Provider,{value:u!=null,children:c.map(le)})});return u==null?d:/* @__PURE__ */ v(g,{children:[d,r&&/* @__PURE__ */ _($,{row:f,children:u(f)})]})},r[7]=i,r[8]=p,r[9]=a,r[10]=o,r[11]=l,r[12]=u,r[13]=f,r[14]=m):m=r[14];let h=m,x=P(),S;r[15]===x?S=r[16]:(S=e=>({state:e,options:x}),r[15]=x,r[16]=S);let C;return r[17]!==h||r[18]!==f.table.store||r[19]!==S?(C=/* @__PURE__ */ _(y,{source:f.table.store,selector:S,children:h}),r[17]=h,r[18]=f.table.store,r[19]=S,r[20]=C):C=r[20],C}function le(e){return/* @__PURE__ */ _(l,{children:x(e.column.columnDef.cell,e.getContext())},e.id)}function ue(e){let t=c(15),r,i,a;t[0]===e?(r=t[1],i=t[2],a=t[3]):({"data-slot":i,children:r,...a}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a);let{table:o}=F(),l;t[4]===o?l=t[5]:(l=b(o,`getVisibleLeafColumns`,D),t[4]=o,t[5]=l);let u=l.length,d;t[6]===i?d=t[7]:(d=n(i,`data-table-empty-row`),t[6]=i,t[7]=d);let f;t[8]!==r||t[9]!==u?(f=/* @__PURE__ */ _(s.Cell,{colSpan:u,children:r}),t[8]=r,t[9]=u,t[10]=f):f=t[10];let p;return t[11]!==a||t[12]!==d||t[13]!==f?(p=/* @__PURE__ */ _(s.Row,{"data-slot":d,...a,children:f}),t[11]=a,t[12]=d,t[13]=f,t[14]=p):p=t[14],p}function X(){let e=c(1),n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=/* @__PURE__ */ _(`span`,{"aria-hidden":!0,className:t(`pointer-events-none absolute -inset-y-px -left-1.5 w-1.5`,`opacity-0 transition-opacity group-data-sticky-active/table:opacity-100`,`shadow-[1px_0_0_0_var(--border-color-card-muted)]`,`bg-linear-to-l to-transparent`,`from-[color-mix(in_oklab,var(--shadow-color)_var(--shadow-second-opacity),transparent)]`)}),e[0]=n):n=e[0],n}function de(e){let r=c(21),i,a,l,u,d;r[0]===e?(i=r[1],a=r[2],l=r[3],u=r[4],d=r[5]):({"data-slot":l,children:i,className:a,onClick:u,...d}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=l,r[4]=u,r[5]=d);let f;r[6]===u?f=r[7]:(f=o({allowClickEventDefault:!0,onClick:u}),r[6]=u,r[7]=f);let{onClick:p}=f,m;r[8]===l?m=r[9]:(m=n(l,`data-table-action-cell`),r[8]=l,r[9]=m);let h;r[10]===a?h=r[11]:(h=t(`sticky z-10 right-0 text-end align-middle bg-inherit p-2`,a),r[10]=a,r[11]=h);let g;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=/* @__PURE__ */ _(X,{}),r[12]=g):g=r[12];let y;r[13]===i?y=r[14]:(y=/* @__PURE__ */ _(`span`,{"data-slot":`data-table-action-cell-label`,className:`contents`,children:i}),r[13]=i,r[14]=y);let b;return r[15]!==d||r[16]!==p||r[17]!==m||r[18]!==h||r[19]!==y?(b=/* @__PURE__ */ v(s.Cell,{"data-mantle-table-sticky-right":!0,"data-slot":m,className:h,onClick:p,...d,children:[g,y]}),r[15]=d,r[16]=p,r[17]=m,r[18]=h,r[19]=y,r[20]=b):b=r[20],b}function fe(e){let r=c(27),i,a,o,l;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4]):({"data-slot":o,children:i,className:a,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l);let{table:u}=F(),d;r[5]===u?d=r[6]:(d=u.getRowModel(),r[5]=u,r[6]=d);let f=d.rows.length>0,p;r[7]===f?p=r[8]:(p=f?{"data-mantle-table-sticky-right":!0}:{},r[7]=f,r[8]=p);let m;r[9]===o?m=r[10]:(m=n(o,`data-table-action-header`),r[9]=o,r[10]=m);let h=f&&`sticky z-10 right-0 bg-inherit`,g;r[11]!==a||r[12]!==h?(g=t(h,a),r[11]=a,r[12]=h,r[13]=g):g=r[13];let y;r[14]===i?y=r[15]:(y=i??/* @__PURE__ */ _(`span`,{className:`sr-only`,children:`Actions`}),r[14]=i,r[15]=y);let b;r[16]===y?b=r[17]:(b=/* @__PURE__ */ _(`span`,{"data-slot":`data-table-action-header-label`,className:`contents`,children:y}),r[16]=y,r[17]=b);let x;r[18]===f?x=r[19]:(x=f&&/* @__PURE__ */ _(X,{}),r[18]=f,r[19]=x);let S;return r[20]!==l||r[21]!==p||r[22]!==m||r[23]!==g||r[24]!==b||r[25]!==x?(S=/* @__PURE__ */ v(s.Header,{...p,"data-slot":m,className:g,...l,children:[b,x]}),r[20]=l,r[21]=p,r[22]=m,r[23]=g,r[24]=b,r[25]=x,r[26]=S):S=r[26],S}function pe(e){return e!=null&&`nodeType`in e}function me(e){let r=c(20),i,a,o,l,u;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4],u=r[5]):({"data-slot":o,children:i,className:a,onClick:l,...u}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l,r[5]=u);let d=p(!1),f;r[6]===o?f=r[7]:(f=n(o,`data-table-control-cell`),r[6]=o,r[7]=f);let m;r[8]===a?m=r[9]:(m=t(`w-9 px-0 align-top has-[button:enabled,input:enabled]:cursor-pointer`,a),r[8]=a,r[9]=m);let h;r[10]===l?h=r[11]:(h=e=>{if(d.current){e.stopPropagation();return}l?.(e);let t=e.currentTarget.querySelector(`button:not(:disabled), input:not(:disabled)`);t!=null&&(e.stopPropagation(),!e.defaultPrevented&&pe(e.target)&&!t.contains(e.target)&&(t.focus({preventScroll:!0}),d.current=!0,t.click(),d.current=!1))},r[10]=l,r[11]=h);let g;r[12]===i?g=r[13]:(g=/* @__PURE__ */ _(`span`,{"data-slot":`data-table-control-cell-label`,className:`flex h-lh items-center justify-center`,children:i}),r[12]=i,r[13]=g);let v;return r[14]!==u||r[15]!==f||r[16]!==m||r[17]!==h||r[18]!==g?(v=/* @__PURE__ */ _(s.Cell,{"data-slot":f,className:m,onClick:h,...u,children:g}),r[14]=u,r[15]=f,r[16]=m,r[17]=h,r[18]=g,r[19]=v):v=r[19],v}function Z(e){return`data-table-expanded-row-${encodeURIComponent(e.id)}`}function Q(e){let r=c(16),i,a,o,l;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4]):({"data-slot":o,children:i,className:a,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l);let u;r[5]===o?u=r[6]:(u=n(o,`data-table-expand-header`),r[5]=o,r[6]=u);let d;r[7]===a?d=r[8]:(d=t(`w-9 px-0 text-center`,a),r[7]=a,r[8]=d);let f;r[9]===i?f=r[10]:(f=i??/* @__PURE__ */ _(`span`,{className:`sr-only`,children:`Row details`}),r[9]=i,r[10]=f);let p;return r[11]!==l||r[12]!==u||r[13]!==d||r[14]!==f?(p=/* @__PURE__ */ _(s.Header,{"data-slot":u,className:d,...l,children:f}),r[11]=l,r[12]=u,r[13]=d,r[14]=f,r[15]=p):p=r[15],p}const he=/* @__PURE__ */ _(C,{weight:`bold`,className:`size-3.5`}),ge=/* @__PURE__ */ _(S,{weight:`bold`,className:`size-3.5`});function _e(e){let r=c(21),a,o,s,l,u,f,p,m,h,g,v;r[0]===e?(a=r[1],o=r[2],s=r[3],l=r[4],u=r[5],f=r[6],p=r[7],m=r[8],h=r[9],g=r[10],v=r[11]):({"data-slot":o,appearance:p,className:a,collapseIcon:m,expandIcon:h,intent:g,label:s,onClick:l,row:f,size:v,...u}=e,r[0]=e,r[1]=a,r[2]=o,r[3]=s,r[4]=l,r[5]=u,r[6]=f,r[7]=p,r[8]=m,r[9]=h,r[10]=g,r[11]=v);let b=p===void 0?`ghost`:p,x=m===void 0?ge:m,S=h===void 0?he:h,C=g===void 0?`neutral`:g,w=v===void 0?`sm`:v,T=()=>{if(!f.getCanExpand())return null;let e=f.getIsExpanded()&&!k,r=f.getToggleExpandedHandler(),c=f.subRows.length>0,d=D||!c;return/* @__PURE__ */ _(i,{type:`button`,"data-slot":n(o,`data-table-row-expand-button`),appearance:b,intent:C,size:w,className:t(`rounded`,a),"aria-expanded":e,"aria-controls":e&&d?Z(f):void 0,icon:e?x:S,label:c?`${e?`Collapse`:`Expand`} ${s}`:`${e?`Hide`:`Show`} details for ${s}`,onClick:t=>{if(t.stopPropagation(),l?.(t),t.defaultPrevented)return;let n=t.currentTarget.closest(`tbody`);O==null?r():k?O.cancelCollapse(f.id):e?O.startCollapse(f.id,n,()=>f.toggleExpanded(!1)):O.startExpand(n,r)},...u})},E=P(),D=d(Y),O=d(I),k=O?.closingRowIds.has(f.id)??!1,A;r[12]!==D||r[13]!==k||r[14]!==E||r[15]!==f?(A=()=>({isExpanded:f.getIsExpanded(),hasDetailPanel:D,isClosing:k,options:E}),r[12]=D,r[13]=k,r[14]=E,r[15]=f,r[16]=A):A=r[16];let j;return r[17]!==T||r[18]!==f.table.store||r[19]!==A?(j=/* @__PURE__ */ _(y,{source:f.table.store,selector:A,children:T}),r[17]=T,r[18]=f.table.store,r[19]=A,r[20]=j):j=r[20],j}function $(e){let r=c(29),i,a,o,l,u,f;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4],u=r[5],f=r[6]):({"data-slot":l,children:i,className:a,colSpan:o,row:f,...u}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l,r[5]=u,r[6]=f);let p;r[7]===f?p=r[8]:(p=()=>b(f,`getVisibleCells`,E).length,r[7]=f,r[8]=p);let m=p,h=d(I)?.closingRowIds??L,g;r[9]!==h||r[10]!==f?(g=h.has(f.id)||J(f,h),r[9]=h,r[10]=f,r[11]=g):g=r[11];let v=g,x;r[12]!==i||r[13]!==a||r[14]!==l||r[15]!==v||r[16]!==u||r[17]!==f?(x=e=>{let{numberOfColumns:r}=e;return/* @__PURE__ */ _(s.Row,{"data-slot":n(l,`data-table-expanded-row`),"data-expanded-content":!0,"data-closing":v||void 0,inert:v||void 0,className:t(`[&>td]:border-t-0`,q,a),...u,children:/* @__PURE__ */ _(s.Cell,{id:Z(f),colSpan:r,className:`bg-card font-sans text-body`,children:i})})},r[12]=i,r[13]=a,r[14]=l,r[15]=v,r[16]=u,r[17]=f,r[18]=x):x=r[18];let S=x,C=P();if(o!=null){let e;return r[19]!==o||r[20]!==S?(e=S({numberOfColumns:o}),r[19]=o,r[20]=S,r[21]=e):e=r[21],e}let w;r[22]!==m||r[23]!==C?(w=()=>({numberOfColumns:m(),options:C}),r[22]=m,r[23]=C,r[24]=w):w=r[24];let T;return r[25]!==S||r[26]!==f.table.store||r[27]!==w?(T=/* @__PURE__ */ _(y,{source:f.table.store,selector:w,children:S}),r[25]=S,r[26]=f.table.store,r[27]=w,r[28]=T):T=r[28],T}const ve={Root:ae,ActionCell:de,ActionHeader:fe,Cell:H,Body:U,EmptyRow:ue,Head:W,Header:V,HeaderSortButton:oe,Row:ce,ExpandHeader:Q,ControlCell:me,RowExpandButton:_e,ExpandedRow:$};function ye(e){let t=c(10),n,r,i;if(t[0]===e?(n=t[1],r=t[2],i=t[3]):({direction:n,mode:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i),n===`unsorted`||!r||!n){let e;return t[4]===i?e=t[5]:(e=/* @__PURE__ */ _(`svg`,{"aria-hidden":!0,...i}),t[4]=i,t[5]=e),e}let o;return t[6]!==n||t[7]!==r||t[8]!==i?(o=/* @__PURE__ */ _(a,{mode:r,direction:n,...i}),t[6]=n,t[7]=r,t[8]=i,t[9]=o):o=t[9],o}function be(e,t){if(!e.getCanSort())return;let n=e.getIsSorted();switch(A(typeof n==`string`?n:`unsorted`,t)){case`unsorted`:e.clearSorting();return;case`asc`:e.toggleSorting(!1);return;case`desc`:e.toggleSorting(!0);return;default:return}}export{ve as DataTable,Z as expandedRowId};
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
7
7
  import "./index-KJ06KK6t.js";
8
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
8
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
9
9
  import { ComponentProps } from "react";
10
10
  /**
11
11
  * Props for `DescriptionList.Root`.
@@ -1 +1 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a={Root:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({asChild:f,className:c,children:s,"data-slot":l,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`dl`,m;o[7]===l?m=o[8]:(m=t(l,`description-list`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`relative scrollbar overflow-x-auto overscroll-x-none rounded-lg border border-card grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 [&>*:nth-child(odd)]:bg-neutral-500/5 p-1`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Item:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`description-list-item`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`rounded-sm col-span-full grid grid-cols-subgrid items-center`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Label:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`dt`,m;o[7]===l?m=o[8]:(m=t(l,`description-list-label`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`text-muted text-sm font-sans font-medium min-w-36 p-2`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Value:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`dd`,m;o[7]===l?m=o[8]:(m=t(l,`description-list-value`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`text-body font-mono text-mono py-2 px-3`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g}};export{a as DescriptionList};
1
+ "use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-B7rwscwd.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a={Root:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({asChild:f,className:c,children:s,"data-slot":l,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`dl`,m;o[7]===l?m=o[8]:(m=t(l,`description-list`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`relative scrollbar overflow-x-auto overscroll-x-none rounded-lg border border-card grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 [&>*:nth-child(odd)]:bg-neutral-500/5 p-1`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Item:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`description-list-item`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`rounded-sm col-span-full grid grid-cols-subgrid items-center`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Label:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`dt`,m;o[7]===l?m=o[8]:(m=t(l,`description-list-label`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`text-muted text-sm font-sans font-medium min-w-36 p-2`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Value:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`dd`,m;o[7]===l?m=o[8]:(m=t(l,`description-list-value`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`text-body font-mono text-mono py-2 px-3`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g}};export{a as DescriptionList};
@@ -1,6 +1,6 @@
1
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
2
- import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-BGwOPjGV.js";
3
- import { a as Portal, c as Trigger$1, i as Overlay$1, n as Content$1, r as Description$1, s as Title$1, t as Close$1 } from "./dialog-B9JAGy_x.js";
1
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
2
+ import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-DnYv7IOT.js";
3
+ 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-CbEEA0fl.js";
4
4
  import { ComponentProps } from "react";
5
5
  /**
6
6
  * A button that opens the dialog.
@@ -69,7 +69,7 @@ declare const Close: ({ "data-slot": dataSlot, ...props }: ComponentProps<typeof
69
69
  * The backdrop overlay for the dialog. Sits between the page and the dialog
70
70
  * content and applies a blur and dim effect.
71
71
  *
72
- * Most consumers should not need to use this directly — `Dialog.Content`
72
+ * Most consumers should not need to use this directly. `Dialog.Content`
73
73
  * renders an overlay automatically. Use this only when composing a custom
74
74
  * `Dialog.Portal` tree.
75
75
  *
@@ -134,7 +134,7 @@ type ContentProps = ComponentProps<typeof Content$1> & ({
134
134
  appearance: "full-page" | "full-bleed";
135
135
  /**
136
136
  * Never set here. A `"full-page"` or `"full-bleed"` dialog fills its box,
137
- * so it has no width to cap — pass `appearance="centered"` to cap it.
137
+ * so it has no width to cap. Pass `appearance="centered"` to cap it.
138
138
  */
139
139
  preferredWidth?: never;
140
140
  }) & WithDataSlot;
@@ -166,6 +166,14 @@ type ContentProps = ComponentProps<typeof Content$1> & ({
166
166
  * focus and hides outside content from assistive technology. Put a control that
167
167
  * every user must reach inside the content.
168
168
  *
169
+ * A script can show its own popup in a frame on `<body>`, above the dialog,
170
+ * such as the 3-D Secure challenge of a payment script. While that frame is
171
+ * on top at the center of the viewport, the dialog yields to the popup:
172
+ *
173
+ * - Focus that a script moves into the popup stays there.
174
+ * - Escape moves focus into the popup and does not close the dialog.
175
+ * - A click in the popup is not an outside click.
176
+ *
169
177
  * @see https://mantle.ngrok.com/components/overlays/dialog#dialogcontent
170
178
  *
171
179
  * @example
@@ -257,7 +265,7 @@ declare const Content: ({ "data-slot": dataSlot, appearance, children, className
257
265
  declare const Header: ({ "data-slot": dataSlot, className, children, ...props }: ComponentProps<"div"> & WithDataSlot) => import("react").JSX.Element;
258
266
  type CloseIconButtonProps = Partial<Omit<IconButtonProps, "appearance" | "icon" | "intent">> & {
259
267
  /**
260
- * The visual style of the close icon button. Optional here —
268
+ * The visual style of the close icon button. Optional here:
261
269
  * `Dialog.CloseIconButton` defaults to `"ghost"` so the close affordance
262
270
  * stays visually quiet in the dialog header.
263
271
  *
@@ -265,7 +273,7 @@ type CloseIconButtonProps = Partial<Omit<IconButtonProps, "appearance" | "icon"
265
273
  */
266
274
  appearance?: IconButtonAppearance;
267
275
  /**
268
- * The tone of the close icon button. Optional here —
276
+ * The tone of the close icon button. Optional here:
269
277
  * `Dialog.CloseIconButton` defaults to `"neutral"`, the workhorse tone for
270
278
  * routine actions like dismissing a dialog, and the only tone `IconButton`
271
279
  * draws.
@@ -533,7 +541,7 @@ declare const Dialog: {
533
541
  * </Dialog.Root>
534
542
  * ```
535
543
  */
536
- readonly Root: import("react").FC<import("@radix-ui/react-dialog").DialogProps>;
544
+ readonly Root: typeof Root;
537
545
  /**
538
546
  * Contains the main content of the dialog.
539
547
  *
@@ -655,6 +663,14 @@ declare const Dialog: {
655
663
  * focus and hides outside content from assistive technology. Put a control that
656
664
  * every user must reach inside the content.
657
665
  *
666
+ * A script can show its own popup in a frame on `<body>`, above the dialog,
667
+ * such as the 3-D Secure challenge of a payment script. While that frame is
668
+ * on top at the center of the viewport, the dialog yields to the popup:
669
+ *
670
+ * - Focus that a script moves into the popup stays there.
671
+ * - Escape moves focus into the popup and does not close the dialog.
672
+ * - A click in the popup is not an outside click.
673
+ *
658
674
  * @see https://mantle.ngrok.com/components/overlays/dialog#dialogcontent
659
675
  *
660
676
  * @example
@@ -1,10 +1,14 @@
1
1
  import { ComponentProps, ComponentPropsWithoutRef, Ref } from "react";
2
- import { Content as Content$1, Description as Description$1, Overlay as Overlay$1, Portal as Portal$1 } from "@radix-ui/react-dialog";
2
+ import { Content as Content$1, Description as Description$1, Overlay as Overlay$1, Portal as Portal$1, Root as Root$1 } from "@radix-ui/react-dialog";
3
3
  type DialogPrimitiveContentProps = ComponentProps<typeof Content$1>;
4
- declare const Root: import("react").FC<import("@radix-ui/react-dialog").DialogProps>;
4
+ /**
5
+ * The Radix dialog root, with the open state kept here so that mantle can
6
+ * close the dialog from outside Radix. It is controlled when `open` is set.
7
+ */
8
+ declare const Root: ({ defaultOpen, onOpenChange, open: openProp, ...props }: ComponentProps<typeof Root$1>) => import("react").JSX.Element;
5
9
  declare const Trigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
6
10
  /**
7
- * Mounts dialog layers into the nearest layer container — an enclosing
11
+ * Mounts dialog layers into the nearest layer container: an enclosing
8
12
  * overlay's positioner when one is open, else `document.body`. An explicit
9
13
  * `container` prop wins over both.
10
14
  */
@@ -0,0 +1 @@
1
+ "use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./layer-container-DL4yclOu.js";import{t as r}from"./button-B9bChDgl.js";import{a as i,c as a,i as o,n as s,o as c,r as l,s as u,t as d}from"./primitive-D8CzV_Ft.js";import{c as f}from"react/compiler-runtime";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{XIcon as h}from"@phosphor-icons/react/X";const g=c,_=e=>{let n=f(8),r,i;n[0]===e?(r=n[1],i=n[2]):({"data-slot":r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let o;n[3]===r?o=n[4]:(o=t(r,`dialog-trigger`),n[3]=r,n[4]=o);let s;return n[5]!==i||n[6]!==o?(s=/* @__PURE__ */ p(a,{"data-slot":o,...i}),n[5]=i,n[6]=o,n[7]=s):s=n[7],s},v=i,y=e=>{let n=f(8),r,i;n[0]===e?(r=n[1],i=n[2]):({"data-slot":r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=t(r,`dialog-close`),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=/* @__PURE__ */ p(d,{"data-slot":a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o},b=n=>{let r=f(14),i,a,s,c;r[0]===n?(i=r[1],a=r[2],s=r[3],c=r[4]):({"data-slot":a,className:i,ref:c,...s}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=s,r[4]=c);let l;r[5]===a?l=r[6]:(l=t(a,`dialog-overlay`),r[5]=a,r[6]=l);let u;r[7]===i?u=r[8]:(u=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 duration-200 ease-out-strong data-state-closed:duration-150 fixed inset-0 z-60 backdrop-blur-xs`,i),r[7]=i,r[8]=u);let d;return r[9]!==s||r[10]!==c||r[11]!==l||r[12]!==u?(d=/* @__PURE__ */ p(o,{ref:c,"data-slot":l,className:u,...s}),r[9]=s,r[10]=c,r[11]=l,r[12]=u,r[13]=d):d=r[13],d},x={centered:`inset-4`,"full-page":`inset-4`,"full-bleed":`inset-0`},S={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`},C={Root:g,Body:n=>{let r=f(12),i,a,o;r[0]===n?(i=r[1],a=r[2],o=r[3]):({"data-slot":a,className:i,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o);let s;r[4]===a?s=r[5]:(s=t(a,`dialog-body`),r[4]=a,r[5]=s);let c;r[6]===i?c=r[7]:(c=e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,i),r[6]=i,r[7]=c);let l;return r[8]!==o||r[9]!==s||r[10]!==c?(l=/* @__PURE__ */ p(`div`,{"data-slot":s,className:c,...o}),r[8]=o,r[9]=s,r[10]=c,r[11]=l):l=r[11],l},Close:y,CloseIconButton:e=>{let n=f(19),i,a,o,s,c,l,u;n[0]===e?(i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7]):({"data-slot":i,size:o,type:s,label:c,appearance:l,intent:u,...a}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o,n[4]=s,n[5]=c,n[6]=l,n[7]=u);let m=o===void 0?`md`:o,g=s===void 0?`button`:s,_=c===void 0?`Close Dialog`:c,v=l===void 0?`ghost`:l,y=u===void 0?`neutral`:u,b;n[8]===i?b=n[9]:(b=t(i,`dialog-close-icon-button`),n[8]=i,n[9]=b);let x;n[10]===Symbol.for(`react.memo_cache_sentinel`)?(x=/* @__PURE__ */ p(h,{}),n[10]=x):x=n[10];let S;return n[11]!==v||n[12]!==y||n[13]!==_||n[14]!==a||n[15]!==m||n[16]!==b||n[17]!==g?(S=/* @__PURE__ */ p(d,{asChild:!0,children:/* @__PURE__ */ p(r,{appearance:v,"data-slot":b,icon:x,intent:y,label:_,size:m,type:g,...a})}),n[11]=v,n[12]=y,n[13]=_,n[14]=a,n[15]=m,n[16]=b,n[17]=g,n[18]=S):S=n[18],S},Content:r=>{let i=f(27),a,o,c,l,u,d,h;i[0]===r?(a=i[1],o=i[2],c=i[3],l=i[4],u=i[5],d=i[6],h=i[7]):({"data-slot":c,appearance:h,children:a,className:o,preferredWidth:l,ref:d,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=c,i[4]=l,i[5]=u,i[6]=d,i[7]=h);let g=h===void 0?`centered`:h,_;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(_=/* @__PURE__ */ p(b,{}),i[8]=_):_=i[8];let y=x[g],C;i[9]===y?C=i[10]:(C=e(`fixed z-60 flex items-center justify-center motion-safe:not-has-[>[data-mantle-modal-content][data-state=open]]:animate-exit-hold`,y),i[9]=y,i[10]=C);let w;i[11]===c?w=i[12]:(w=t(c,`dialog-content`),i[11]=c,i[12]=w);let T=S[g],E=g===`centered`&&(l??`max-w-lg`),D;i[13]!==o||i[14]!==T||i[15]!==E?(D=e(`flex max-h-full w-full flex-1 flex-col`,`outline-hidden focus-within:outline-hidden`,`bg-dialog shadow-lg duration-200 ease-out-strong data-state-closed:duration-150 motion-reduce:animate-none!`,`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`,T,E,o),i[13]=o,i[14]=T,i[15]=E,i[16]=D):D=i[16];let O;i[17]!==g||i[18]!==a||i[19]!==u||i[20]!==d||i[21]!==w||i[22]!==D?(O=/* @__PURE__ */ p(s,{"data-appearance":g,"data-mantle-modal-content":!0,"data-slot":w,className:D,ref:d,...u,children:a}),i[17]=g,i[18]=a,i[19]=u,i[20]=d,i[21]=w,i[22]=D,i[23]=O):O=i[23];let k;return i[24]!==C||i[25]!==O?(k=/* @__PURE__ */ m(v,{children:[_,/* @__PURE__ */ p(n,{"data-slot":`dialog-positioner`,className:C,children:O})]}),i[24]=C,i[25]=O,i[26]=k):k=i[26],k},Description:n=>{let r=f(14),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=t(a,`dialog-description`),r[5]=a,r[6]=c);let u;r[7]===i?u=r[8]:(u=e(`text-muted`,i),r[7]=i,r[8]=u);let d;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==u?(d=/* @__PURE__ */ p(l,{ref:s,"data-slot":c,className:u,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=u,r[13]=d):d=r[13],d},Footer:n=>{let r=f(12),i,a,o;r[0]===n?(i=r[1],a=r[2],o=r[3]):({"data-slot":a,className:i,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o);let s;r[4]===a?s=r[5]:(s=t(a,`dialog-footer`),r[4]=a,r[5]=s);let c;r[6]===i?c=r[7]:(c=e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-4`,i),r[6]=i,r[7]=c);let l;return r[8]!==o||r[9]!==s||r[10]!==c?(l=/* @__PURE__ */ p(`div`,{"data-slot":s,className:c,...o}),r[8]=o,r[9]=s,r[10]=c,r[11]=l):l=r[11],l},Header:n=>{let r=f(14),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":o,className:a,children:i,...s}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===o?c=r[6]:(c=t(o,`dialog-header`),r[5]=o,r[6]=c);let l;r[7]===a?l=r[8]:(l=e(`border-dialog-muted text-strong relative flex shrink-0 flex-wrap items-center justify-between gap-2 border-b px-6 py-4`,`*:data-[slot~=dialog-title]:flex-1`,`*:data-[slot~=dialog-description]:order-last *:data-[slot~=dialog-description]:basis-full`,`has-[.icon-button]:pr-4`,a),r[7]=a,r[8]=l);let u;return r[9]!==i||r[10]!==s||r[11]!==c||r[12]!==l?(u=/* @__PURE__ */ p(`div`,{"data-slot":c,className:l,...s,children:i}),r[9]=i,r[10]=s,r[11]=c,r[12]=l,r[13]=u):u=r[13],u},Overlay:b,Portal:v,Title:n=>{let r=f(14),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=t(a,`dialog-title`),r[5]=a,r[6]=c);let l;r[7]===i?l=r[8]:(l=e(`text-strong truncate text-lg font-medium`,i),r[7]=i,r[8]=l);let d;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l?(d=/* @__PURE__ */ p(u,{ref:s,"data-slot":c,className:l,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=d):d=r[13],d},Trigger:_};export{C as t};
package/dist/dialog.d.ts CHANGED
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * @see https://mantle.ngrok.com/components/overlays/dialog
5
5
  */
6
- import { t as Dialog } from "./dialog-DD5H3EH1.js";
7
- import { l as isDialogOverlayTarget } from "./dialog-B9JAGy_x.js";
6
+ import { t as Dialog } from "./dialog-CIEuwNys.js";
7
+ import { l as isDialogOverlayTarget } from "./dialog-CbEEA0fl.js";
8
8
  export { Dialog, isDialogOverlayTarget };
package/dist/dialog.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./dialog-CsugEt2A.js";import{d as t}from"./primitive-Dz9Al-us.js";export{e as Dialog,t as isDialogOverlayTarget};
1
+ import{t as e}from"./dialog-DmzoDfY3.js";import{d as t}from"./primitive-D8CzV_Ft.js";export{e as Dialog,t as isDialogOverlayTarget};
@@ -1,5 +1,5 @@
1
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
2
- import { n as Separator } from "./separator-QfH0ot5K.js";
1
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
2
+ import { n as Separator } from "./separator-Ck4sPrdN.js";
3
3
  import { ComponentProps } from "react";
4
4
  import { CheckboxItem as CheckboxItem$1, Content as Content$1, Group as Group$1, Item as Item$1, Label as Label$1, RadioGroup as RadioGroup$1, RadioItem as RadioItem$1, SubContent as SubContent$1, SubTrigger as SubTrigger$1, Trigger as Trigger$1 } from "@radix-ui/react-dropdown-menu";
5
5
  /**
@@ -79,7 +79,7 @@ type DropdownMenuSubTriggerProps = ComponentProps<typeof SubTrigger$1> & {
79
79
  * `display: contents`, so an icon and its label stay flex items of the item and
80
80
  * keep its `gap`. An icon you pass as a child is now a grandchild, so a
81
81
  * `[&>svg]` class of your own no longer reaches it. Match the part's own
82
- * variant instead — `[&>[data-slot=dropdown-menu-sub-trigger-label]>svg]:size-4`.
82
+ * variant instead: `[&>[data-slot=dropdown-menu-sub-trigger-label]>svg]:size-4`.
83
83
  * A `[&_svg]` class or a class on the icon loses to the default, which is more
84
84
  * specific.
85
85
  *
@@ -140,7 +140,7 @@ declare const SubTrigger: ({ "data-slot": dataSlot, className, inset, children,
140
140
  * </DropdownMenu.Root>
141
141
  * ```
142
142
  */
143
- declare const SubContent: ({ "data-slot": dataSlot, className, loop, ...props }: ComponentProps<typeof SubContent$1> & WithDataSlot) => import("react").JSX.Element;
143
+ declare const SubContent: ({ "data-slot": dataSlot, className, loop, onEscapeKeyDown, ...props }: ComponentProps<typeof SubContent$1> & WithDataSlot) => import("react").JSX.Element;
144
144
  type DropdownMenuContentProps = ComponentProps<typeof Content$1> & WithDataSlot & {
145
145
  /**
146
146
  * Whether the DropdownMenuContent should match the width of the trigger or use the intrinsic content width.
@@ -174,7 +174,7 @@ type DropdownMenuContentProps = ComponentProps<typeof Content$1> & WithDataSlot
174
174
  * </DropdownMenu.Root>
175
175
  * ```
176
176
  */
177
- declare const Content: ({ className, "data-slot": dataSlot, onClick, loop, width, ...props }: DropdownMenuContentProps) => import("react").JSX.Element;
177
+ declare const Content: ({ className, "data-slot": dataSlot, onClick, onEscapeKeyDown, loop, width, ...props }: DropdownMenuContentProps) => import("react").JSX.Element;
178
178
  /**
179
179
  * An item in the dropdown menu.
180
180
  *
@@ -213,7 +213,7 @@ type DropdownMenuCheckboxItemProps = ComponentProps<typeof CheckboxItem$1> & Wit
213
213
  * `display: contents`, so an icon and its label stay flex items of the item and
214
214
  * keep its `gap`. An icon you pass as a child is now a grandchild, so a
215
215
  * `[&>svg]` class of your own no longer reaches it. Match the part's own
216
- * variant instead — `[&>[data-slot=dropdown-menu-checkbox-item-label]>svg]:size-4`.
216
+ * variant instead: `[&>[data-slot=dropdown-menu-checkbox-item-label]>svg]:size-4`.
217
217
  * A `[&_svg]` class or a class on the icon loses to the default, which is more
218
218
  * specific.
219
219
  *
@@ -261,7 +261,7 @@ type DropdownMenuRadioItemProps = ComponentProps<typeof RadioItem$1> & {
261
261
  * `display: contents`, so an icon and its label stay flex items of the item and
262
262
  * keep its `gap`. An icon you pass as a child is now a grandchild, so a
263
263
  * `[&>svg]` class of your own no longer reaches it. Match the part's own
264
- * variant instead — `[&>[data-slot=dropdown-menu-radio-item-label]>svg]:size-4`.
264
+ * variant instead: `[&>[data-slot=dropdown-menu-radio-item-label]>svg]:size-4`.
265
265
  * A `[&_svg]` class or a class on the icon loses to the default, which is more
266
266
  * specific.
267
267
  *
@@ -444,7 +444,7 @@ declare const DropdownMenu: {
444
444
  * `display: contents`, so an icon and its label stay flex items of the item and
445
445
  * keep its `gap`. An icon you pass as a child is now a grandchild, so a
446
446
  * `[&>svg]` class of your own no longer reaches it. Match the part's own
447
- * variant instead — `[&>[data-slot=dropdown-menu-checkbox-item-label]>svg]:size-4`.
447
+ * variant instead: `[&>[data-slot=dropdown-menu-checkbox-item-label]>svg]:size-4`.
448
448
  * A `[&_svg]` class or a class on the icon loses to the default, which is more
449
449
  * specific.
450
450
  *
@@ -586,7 +586,7 @@ declare const DropdownMenu: {
586
586
  * `display: contents`, so an icon and its label stay flex items of the item and
587
587
  * keep its `gap`. An icon you pass as a child is now a grandchild, so a
588
588
  * `[&>svg]` class of your own no longer reaches it. Match the part's own
589
- * variant instead — `[&>[data-slot=dropdown-menu-radio-item-label]>svg]:size-4`.
589
+ * variant instead: `[&>[data-slot=dropdown-menu-radio-item-label]>svg]:size-4`.
590
590
  * A `[&_svg]` class or a class on the icon loses to the default, which is more
591
591
  * specific.
592
592
  *
@@ -718,7 +718,7 @@ declare const DropdownMenu: {
718
718
  * `display: contents`, so an icon and its label stay flex items of the item and
719
719
  * keep its `gap`. An icon you pass as a child is now a grandchild, so a
720
720
  * `[&>svg]` class of your own no longer reaches it. Match the part's own
721
- * variant instead — `[&>[data-slot=dropdown-menu-sub-trigger-label]>svg]:size-4`.
721
+ * variant instead: `[&>[data-slot=dropdown-menu-sub-trigger-label]>svg]:size-4`.
722
722
  * A `[&_svg]` class or a class on the icon loses to the default, which is more
723
723
  * specific.
724
724
  *