@ngrok/mantle 0.93.7 → 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 (311) hide show
  1. package/README.md +11 -2
  2. package/dist/accordion.d.ts +73 -21
  3. package/dist/accordion.js +1 -1
  4. package/dist/agent.json +1234 -84
  5. package/dist/alert-BkJHDx9X.js +1 -0
  6. package/dist/{alert-BcSBNR3S.d.ts → alert-D0zRRUHV.d.ts} +35 -25
  7. package/dist/alert-center.d.ts +67 -55
  8. package/dist/alert-center.js +1 -1
  9. package/dist/alert-dialog.d.ts +35 -10
  10. package/dist/alert-dialog.js +1 -1
  11. package/dist/alert.d.ts +6 -1
  12. package/dist/alert.js +1 -1
  13. package/dist/anchor-Dc6IgvXV.js +1 -0
  14. package/dist/anchor.d.ts +17 -5
  15. package/dist/anchor.js +1 -1
  16. package/dist/app-layout.d.ts +33 -18
  17. package/dist/app-layout.js +1 -1
  18. package/dist/area-chart.d.ts +153 -97
  19. package/dist/area-chart.js +1 -1
  20. package/dist/avatar.d.ts +36 -24
  21. package/dist/avatar.js +1 -1
  22. package/dist/badge.d.ts +19 -7
  23. package/dist/badge.js +1 -1
  24. package/dist/bar-chart.d.ts +155 -100
  25. package/dist/bar-chart.js +1 -1
  26. package/dist/breadcrumb.d.ts +47 -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.d.ts +8 -0
  31. package/dist/browser-only.js +1 -1
  32. package/dist/{button-BX-4lYUn.d.ts → button-5Pc7Mby_.d.ts} +4 -4
  33. package/dist/button-B9bChDgl.js +1 -0
  34. package/dist/button-D8jixIbH.js +1 -0
  35. package/dist/button-DNLTJ32M.js +1 -0
  36. package/dist/{button-CPsKGDK0.d.ts → button-Ddj6yr10.d.ts} +34 -27
  37. package/dist/{button-Yxyu1XMd.d.ts → button-DnYv7IOT.d.ts} +29 -22
  38. package/dist/button.d.ts +9 -3
  39. package/dist/button.js +1 -1
  40. package/dist/calendar.d.ts +8 -1
  41. package/dist/calendar.js +1 -1
  42. package/dist/card.d.ts +7 -2
  43. package/dist/card.js +1 -1
  44. package/dist/centered-layout.d.ts +34 -23
  45. package/dist/centered-layout.js +1 -1
  46. package/dist/chart-BLCqzt56.js +1 -0
  47. package/dist/chart-CChZiCrt.js +1 -0
  48. package/dist/chart-CUmSu9d7.js +1 -0
  49. package/dist/{chart-BpfbtOUN.d.ts → chart-Dl8gFo_D.d.ts} +117 -121
  50. package/dist/chart-DtgZBAas.js +2 -0
  51. package/dist/checkbox-Cu5cgZmk.js +1 -0
  52. package/dist/checkbox.d.ts +15 -2
  53. package/dist/checkbox.js +1 -1
  54. package/dist/choice-CCVG2hb9.js +1 -0
  55. package/dist/{choice-BLR0_MeB.d.ts → choice-CNiOSzqV.d.ts} +26 -20
  56. package/dist/choice.d.ts +6 -1
  57. package/dist/choice.js +1 -1
  58. package/dist/code-BPKNY1_w.js +1 -0
  59. package/dist/{code-block-BGdV4Yty.d.ts → code-block-BDw6MEwH.d.ts} +9 -9
  60. package/dist/{code-block-W3kWPxCJ.js → code-block-CKzsAMzj.js} +3 -3
  61. package/dist/code-block.d.ts +28 -19
  62. package/dist/code-block.js +1 -1
  63. package/dist/code-block_highlight-utils.d.ts +6 -1
  64. package/dist/code-block_highlight-utils.js +1 -1
  65. package/dist/code.d.ts +16 -3
  66. package/dist/code.js +1 -1
  67. package/dist/color-CHZbU1Ww.js +1 -0
  68. package/dist/color.js +1 -1
  69. package/dist/combobox.d.ts +42 -28
  70. package/dist/combobox.js +1 -1
  71. package/dist/command.d.ts +59 -47
  72. package/dist/command.js +1 -1
  73. package/dist/compose-refs-BdRUneoc.js +1 -0
  74. package/dist/{copy-to-clipboard-DInu78k_.js → copy-to-clipboard-Dd83caRw.js} +1 -1
  75. package/dist/cx.d.ts +4 -4
  76. package/dist/cx.js +1 -1
  77. package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
  78. package/dist/data-table.d.ts +83 -52
  79. package/dist/data-table.js +1 -1
  80. package/dist/description-list.d.ts +13 -2
  81. package/dist/description-list.js +1 -1
  82. package/dist/{dialog-2fRO4ca4.d.ts → dialog-CIEuwNys.d.ts} +32 -8
  83. package/dist/dialog-CbEEA0fl.d.ts +32 -0
  84. package/dist/dialog-DmzoDfY3.js +1 -0
  85. package/dist/dialog.d.ts +7 -2
  86. package/dist/dialog.js +1 -1
  87. package/dist/{dropdown-menu-CpjRwMWe.d.ts → dropdown-menu-CeY498yk.d.ts} +41 -33
  88. package/dist/dropdown-menu-uheL0prz.js +1 -0
  89. package/dist/dropdown-menu.d.ts +6 -1
  90. package/dist/dropdown-menu.js +1 -1
  91. package/dist/empty.d.ts +7 -2
  92. package/dist/empty.js +1 -1
  93. package/dist/field-Bpvn4tQp.js +1 -0
  94. package/dist/{field-V_gnkcmN.d.ts → field-BshcNVe_.d.ts} +1 -1
  95. package/dist/field-Cai_4c1l.js +1 -0
  96. package/dist/field.d.ts +53 -42
  97. package/dist/field.js +1 -1
  98. package/dist/flag.d.ts +11 -3
  99. package/dist/flag.js +1 -1
  100. package/dist/hooks.d.ts +35 -10
  101. package/dist/hooks.js +1 -1
  102. package/dist/hover-card.d.ts +25 -14
  103. package/dist/hover-card.js +1 -1
  104. package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
  105. package/dist/{icon-ByLVhdYq.d.ts → icon-DuIYoyft.d.ts} +8 -2
  106. package/dist/{icon-DXDyhy2N.d.ts → icon-QCm1ui29.d.ts} +2 -2
  107. package/dist/icon-xb7d9M7X.js +1 -0
  108. package/dist/icon.d.ts +8 -3
  109. package/dist/icon.js +1 -1
  110. package/dist/icons-DEDCLZ8B.js +1 -0
  111. package/dist/icons-DXadFwpo.js +1 -0
  112. package/dist/icons-DcesO4Ng.js +1 -0
  113. package/dist/icons.d.ts +13 -1
  114. package/dist/icons.js +1 -1
  115. package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
  116. package/dist/{index-BhfgyurF.d.ts → index-KJ06KK6t.d.ts} +3 -3
  117. package/dist/input-BjCDSOPA.js +1 -0
  118. package/dist/{input-Dx5owTCc.d.ts → input-DC4nW0Sr.d.ts} +12 -2
  119. package/dist/input-fW8QSZEO.js +1 -0
  120. package/dist/input.d.ts +37 -5
  121. package/dist/input.js +1 -1
  122. package/dist/kbd-P1nQshWo.js +1 -0
  123. package/dist/kbd.d.ts +17 -5
  124. package/dist/kbd.js +1 -1
  125. package/dist/label-DO1RlMKl.js +1 -0
  126. package/dist/{label-Dn5CPJUj.d.ts → label-epgtywRz.d.ts} +14 -8
  127. package/dist/label.d.ts +6 -1
  128. package/dist/label.js +1 -1
  129. package/dist/layer-container-DL4yclOu.js +1 -0
  130. package/dist/layer-container.d.ts +2 -2
  131. package/dist/layer-container.js +1 -1
  132. package/dist/line-chart.d.ts +147 -90
  133. package/dist/line-chart.js +1 -1
  134. package/dist/list-cQZPSjfz.js +1 -0
  135. package/dist/list.d.ts +34 -16
  136. package/dist/list.js +1 -1
  137. package/dist/live-region-Dhapu8a5.js +1 -0
  138. package/dist/live-region.d.ts +15 -2
  139. package/dist/live-region.js +1 -1
  140. package/dist/llms.txt +82 -79
  141. package/dist/main-CHyWYDak.js +1 -0
  142. package/dist/main.d.ts +13 -1
  143. package/dist/main.js +1 -1
  144. package/dist/mantle.css +133 -88
  145. package/dist/media-object.d.ts +16 -4
  146. package/dist/media-object.js +1 -1
  147. package/dist/migrations/0014-chart-named-colors.yml +1389 -0
  148. package/dist/migrations/0015-segmented-control.yml +788 -0
  149. package/dist/multi-select.d.ts +42 -29
  150. package/dist/multi-select.js +1 -1
  151. package/dist/otp-input.d.ts +20 -8
  152. package/dist/otp-input.js +1 -1
  153. package/dist/pagination.d.ts +93 -4
  154. package/dist/pagination.js +1 -1
  155. package/dist/{popover-BfB2I9G0.d.ts → popover-Bei0jyfH.d.ts} +87 -12
  156. package/dist/popover-DhgunktK.js +1 -0
  157. package/dist/popover-T2EyaqGK.d.ts +1 -0
  158. package/dist/popover.d.ts +7 -2
  159. package/dist/popover.js +1 -1
  160. package/dist/primitive-D8CzV_Ft.js +1 -0
  161. package/dist/progress.d.ts +28 -11
  162. package/dist/progress.js +1 -1
  163. package/dist/qr-code.d.ts +11 -3
  164. package/dist/qr-code.js +1 -1
  165. package/dist/query-filter.d.ts +6 -6
  166. package/dist/query.d.ts +9 -4
  167. package/dist/query.js +1 -1
  168. package/dist/radio-group-BJQ6EOqh.d.ts +27 -0
  169. package/dist/radio-group-BliblUqe.js +1 -0
  170. package/dist/radio-group-ggEkCi0V.js +1 -0
  171. package/dist/radio-group.d.ts +21 -100
  172. package/dist/radio-group.js +1 -1
  173. package/dist/sandbar.d.ts +43 -30
  174. package/dist/sandbar.js +1 -1
  175. package/dist/sandboxed-on-click-D4PL5_GR.js +1 -0
  176. package/dist/sandboxed-on-click.d.ts +8 -0
  177. package/dist/sandboxed-on-click.js +1 -1
  178. package/dist/scatter-plot.d.ts +137 -76
  179. package/dist/scatter-plot.js +1 -1
  180. package/dist/segmented-control.d.ts +136 -0
  181. package/dist/segmented-control.js +1 -0
  182. package/dist/select-1xuUx_os.js +1 -0
  183. package/dist/{select-BkhBxtOT.d.ts → select-BpaXHxJm.d.ts} +33 -25
  184. package/dist/select.d.ts +6 -1
  185. package/dist/select.js +1 -1
  186. package/dist/selectable-list.d.ts +29 -18
  187. package/dist/selectable-list.js +1 -1
  188. package/dist/{separator-D9AWEkcJ.d.ts → separator-Ck4sPrdN.d.ts} +4 -2
  189. package/dist/separator-DnvhwY2J.js +1 -0
  190. package/dist/separator.d.ts +6 -1
  191. package/dist/separator.js +1 -1
  192. package/dist/{shake-DL6WhMXM.js → shake-CAUpKBHe.js} +1 -1
  193. package/dist/sheet-DHy_vlme.js +1 -0
  194. package/dist/sheet.d.ts +36 -7
  195. package/dist/sheet.js +1 -1
  196. package/dist/sidebar.d.ts +53 -37
  197. package/dist/sidebar.js +1 -1
  198. package/dist/skeleton-DHfyjuQi.js +1 -0
  199. package/dist/skeleton.d.ts +15 -4
  200. package/dist/skeleton.js +1 -1
  201. package/dist/skip-to-main-link.d.ts +12 -1
  202. package/dist/skip-to-main-link.js +1 -1
  203. package/dist/slider.d.ts +11 -1
  204. package/dist/slider.js +1 -1
  205. package/dist/slot-B7rwscwd.js +1 -0
  206. package/dist/{slot-C0OCJjdJ.d.ts → slot-BEMQMbk3.d.ts} +6 -4
  207. package/dist/slot.d.ts +6 -1
  208. package/dist/slot.js +1 -1
  209. package/dist/source-all.css +5 -1
  210. package/dist/split-button.d.ts +20 -9
  211. package/dist/split-button.js +1 -1
  212. package/dist/strata.d.ts +35 -22
  213. package/dist/strata.js +1 -1
  214. package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
  215. package/dist/switch.d.ts +14 -2
  216. package/dist/switch.js +1 -1
  217. package/dist/table-BnLdXUai.js +1 -0
  218. package/dist/{table-vT6Okwfa.d.ts → table-Ii9hHUWN.d.ts} +84 -5
  219. package/dist/table.d.ts +6 -1
  220. package/dist/table.js +1 -1
  221. package/dist/tabs.d.ts +24 -12
  222. package/dist/tabs.js +1 -1
  223. package/dist/text-area.d.ts +12 -2
  224. package/dist/text-area.js +1 -1
  225. package/dist/theme-BNdZl352.js +1 -0
  226. package/dist/theme-switcher.d.ts +18 -4
  227. package/dist/theme-switcher.js +1 -1
  228. package/dist/theme.d.ts +25 -11
  229. package/dist/theme.js +1 -1
  230. package/dist/toast.d.ts +15 -2
  231. package/dist/toast.js +1 -1
  232. package/dist/tokens.dark.json +3261 -0
  233. package/dist/tokens.json +4933 -0
  234. package/dist/tokens.resolver.json +37 -0
  235. package/dist/{tooltip-NcLIeBy5.d.ts → tooltip-CstGDKwy.d.ts} +18 -11
  236. package/dist/tooltip-DQO40Mrq.js +1 -0
  237. package/dist/tooltip.d.ts +6 -1
  238. package/dist/tooltip.js +1 -1
  239. package/dist/truncated-text.d.ts +28 -14
  240. package/dist/truncated-text.js +1 -1
  241. package/dist/types.d.ts +1 -1
  242. package/dist/types.js +1 -1
  243. package/dist/use-breakpoint-B4Kh0xE6.js +1 -0
  244. package/dist/use-callback-ref-DiOXFQzM.js +1 -0
  245. package/dist/use-composed-refs-DPYmLDSe.js +1 -0
  246. package/dist/use-copy-to-clipboard-hBL6_65i.js +1 -0
  247. package/dist/use-inert-siblings-C4RHXrZc.js +1 -0
  248. package/dist/use-is-apple-platform-Bq6_KbVX.js +1 -0
  249. package/dist/use-is-hydrated-BeLOGKwE.js +1 -0
  250. package/dist/use-is-hydrated-after-paint-CrHt3OHw.js +1 -0
  251. package/dist/use-isomorphic-layout-effect-CL6iq0Bj.js +1 -0
  252. package/dist/use-matches-media-query-FfvtNKQe.js +1 -0
  253. package/dist/use-prefers-reduced-motion-Ck6dnOM9.js +1 -0
  254. package/dist/use-swipe-to-dismiss-BYdlca8r.js +1 -0
  255. package/dist/utils.d.ts +1 -1
  256. package/dist/utils.js +1 -1
  257. package/dist/visually-hidden.d.ts +14 -1
  258. package/dist/visually-hidden.js +1 -1
  259. package/dist/well.d.ts +7 -2
  260. package/dist/well.js +1 -1
  261. package/package.json +21 -7
  262. package/src/components/chart/d3-license.md +25 -0
  263. package/dist/alert-P9lwn25X.js +0 -1
  264. package/dist/anchor-CgcbWEUs.js +0 -1
  265. package/dist/browser-only-BTSrYWLj.js +0 -1
  266. package/dist/button-69InNC_m.js +0 -1
  267. package/dist/button-B8k98Pby.js +0 -1
  268. package/dist/button-Dge0D5bl.js +0 -1
  269. package/dist/chart-BpWfQAwf.js +0 -2
  270. package/dist/checkbox-DmSQXs26.js +0 -1
  271. package/dist/choice-2Lrv8_nl.js +0 -1
  272. package/dist/code-DUJzSl4K.js +0 -1
  273. package/dist/compose-refs-sFdxsL7k.js +0 -1
  274. package/dist/dialog-7TUgiSzX.js +0 -1
  275. package/dist/dialog-Dp0QGWwo.d.ts +0 -28
  276. package/dist/dropdown-menu-BHBzCDSZ.js +0 -1
  277. package/dist/field-Bihblt8U.js +0 -1
  278. package/dist/field-CPvjazWN.js +0 -1
  279. package/dist/icon-kK0c-POG.js +0 -1
  280. package/dist/icons-CDLz5lpI.js +0 -1
  281. package/dist/icons-CSwTVV2m.js +0 -1
  282. package/dist/icons-DP3lQw5O.js +0 -1
  283. package/dist/input-CpQ6jlpI.js +0 -1
  284. package/dist/kbd-CLHsJ99p.js +0 -1
  285. package/dist/label-nHqqYS7e.js +0 -1
  286. package/dist/layer-container-kEQiE4zV.js +0 -1
  287. package/dist/list-RFRIQxU2.js +0 -1
  288. package/dist/live-region-DQ1QLv3L.js +0 -1
  289. package/dist/main-CC1L9IsH.js +0 -1
  290. package/dist/popover-C96V8SXi.d.ts +0 -1
  291. package/dist/popover-DxOqLKxy.js +0 -1
  292. package/dist/primitive-Dz9Al-us.js +0 -1
  293. package/dist/radio-group-HDVxTNPi.js +0 -1
  294. package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
  295. package/dist/select-CAAYk4Yj.js +0 -1
  296. package/dist/separator-DfzxVutO.js +0 -1
  297. package/dist/sheet-CSJc_sB4.js +0 -1
  298. package/dist/skeleton-DBpI-ko5.js +0 -1
  299. package/dist/slot-DdYN1L1C.js +0 -1
  300. package/dist/table-CFHiDBW8.js +0 -1
  301. package/dist/theme-C-glc5Q-.js +0 -1
  302. package/dist/tooltip-b6oiTaWq.js +0 -1
  303. package/dist/use-breakpoint--mo7kr9d.js +0 -1
  304. package/dist/use-callback-ref-BvVyI5K1.js +0 -1
  305. package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
  306. package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
  307. package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
  308. package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
  309. package/dist/use-matches-media-query-m860lols.js +0 -1
  310. package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
  311. package/dist/use-swipe-to-dismiss-DceYk1Id.js +0 -1
package/dist/sidebar.d.ts CHANGED
@@ -1,8 +1,16 @@
1
+ /**
2
+ * Re-exports for the Sidebar compound component: a composable, collapsible
3
+ * app-navigation sidebar with a desktop panel that collapses to an icon rail,
4
+ * a mobile `Sheet` presentation, and a toggle trigger that composes into any
5
+ * app shell.
6
+ *
7
+ * @see https://mantle.ngrok.com/components/navigation/sidebar
8
+ */
1
9
  import { n as WithAsChild, t as SelfClosingWithAsChild } from "./as-child-DFxX3U2i.js";
2
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
- import { n as IconButtonProps } from "./button-Yxyu1XMd.js";
4
- import { n as Separator } from "./separator-D9AWEkcJ.js";
5
- import { t as Tooltip } from "./tooltip-NcLIeBy5.js";
10
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
11
+ import { n as IconButtonProps } from "./button-DnYv7IOT.js";
12
+ import { n as Separator } from "./separator-Ck4sPrdN.js";
13
+ import { t as Tooltip } from "./tooltip-CstGDKwy.js";
6
14
  import { ComponentProps, ReactElement, ReactNode } from "react";
7
15
  /**
8
16
  * The breakpoints below which `Sidebar.Nav` swaps from the inline desktop
@@ -109,7 +117,7 @@ type SidebarState = {
109
117
  declare function useSidebar(): SidebarState;
110
118
  type SidebarRootProps = {
111
119
  /**
112
- * The sidebar's parts — a `Sidebar.Nav` and anything that reads the state,
120
+ * The sidebar's parts: a `Sidebar.Nav` and anything that reads the state,
113
121
  * including a `Sidebar.Trigger` rendered anywhere below (an
114
122
  * `AppLayout.Header`, for example). `Root` renders no DOM of its own.
115
123
  */
@@ -146,14 +154,14 @@ type SidebarRootProps = {
146
154
  /**
147
155
  * Toggle the sidebar with `⌘B` (macOS) / `Ctrl+B` (Windows/Linux). The
148
156
  * shortcut requires exactly the platform modifier + `b`: `⌘` on Apple
149
- * platforms and `Ctrl` everywhere else, resolved per host — the two never
157
+ * platforms and `Ctrl` everywhere else, resolved per host. The two never
150
158
  * substitute for each other, so macOS's native `Ctrl+B` ("move the caret
151
159
  * back one character") is left alone. Combinations with `Shift`/`Alt` (e.g.
152
160
  * the browser's own `⌘⇧B`) pass through too.
153
161
  *
154
162
  * The shortcut is also ignored while focus is in a text-editing or form
155
- * control — an `<input>`, `<textarea>`, `<select>`, or any `contenteditable`
156
- * host — because the chord is usually already bound there (`⌘B` is "bold")
163
+ * control (an `<input>`, `<textarea>`, `<select>`, or any `contenteditable`
164
+ * host), because the chord is usually already bound there (`⌘B` is "bold")
157
165
  * and this is a `window` listener that calls `preventDefault()`. That covers
158
166
  * embedded editors like Monaco and CodeMirror, which attach to exactly those
159
167
  * elements. Set `false` to opt out entirely.
@@ -173,7 +181,7 @@ type SidebarRootProps = {
173
181
  };
174
182
  /**
175
183
  * The state owner for a sidebar. Renders no DOM of its own (like
176
- * `Tooltip.Root`) — it carries the expanded/collapsed and mobile-sheet state
184
+ * `Tooltip.Root`). It carries the expanded/collapsed and mobile-sheet state
177
185
  * to every part below it, so `Sidebar.Trigger` can live anywhere in the tree
178
186
  * (for example inside an `AppLayout.Header`) without coupling the app shell
179
187
  * to the sidebar.
@@ -370,12 +378,12 @@ type SidebarTriggerProps = Omit<IconButtonProps, "appearance" | "asChild" | "chi
370
378
  label?: string;
371
379
  /**
372
380
  * The keyboard chord that also toggles the sidebar, rendered after the label
373
- * in the tooltip — usually `<><MetaKey /><Kbd>B</Kbd></>`.
381
+ * in the tooltip, usually `<><MetaKey /><Kbd>B</Kbd></>`.
374
382
  *
375
383
  * Ignored under `Sidebar.Root keyboardShortcut={false}`, so the tooltip can
376
384
  * never name a binding that is not bound. Passed rather than built in so the
377
385
  * sidebar does not have to reach into another component for the platform
378
- * modifier glyph — `aria-keyshortcuts` is stamped either way, which is also
386
+ * modifier glyph. `aria-keyshortcuts` is stamped either way, which is also
379
387
  * why the chips render `aria-hidden`.
380
388
  */
381
389
  shortcut?: ReactNode;
@@ -392,13 +400,13 @@ type SidebarTriggerProps = Omit<IconButtonProps, "appearance" | "asChild" | "chi
392
400
  * `mobileBreakpoint`, the desktop expanded state otherwise. Renders a small
393
401
  * ghost neutral `IconButton` with `aria-expanded` and `aria-controls` wired to
394
402
  * the sidebar's `<nav>`. Place it in your app shell's header (for example
395
- * `AppLayout.Header`) — it must stay visible at every breakpoint where the
403
+ * `AppLayout.Header`). It must stay visible at every breakpoint where the
396
404
  * sidebar can collapse, or users have no way to reopen it.
397
405
  *
398
406
  * The button is icon-only at every breakpoint, so it always renders a tooltip
399
407
  * showing `label` (plus the optional `shortcut` chips). **That means it requires
400
408
  * a `TooltipProvider` ancestor, like any `Tooltip.Root`, and throws without
401
- * one** — mount a single provider at your app root, decoupled from the sidebar,
409
+ * one.** Mount a single provider at your app root, decoupled from the sidebar,
402
410
  * so the app-wide delay and hover settings stay app-wide.
403
411
  *
404
412
  * It also stamps `aria-keyshortcuts` for the `⌘B` / `Ctrl+B` chord the root
@@ -506,7 +514,7 @@ type SidebarHeaderProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
506
514
  * construction.
507
515
  *
508
516
  * Every child after the first stacks flush below the band in its own row, the
509
- * way rows stack in `Sidebar.Footer` — the band's own lower half is the space
517
+ * way rows stack in `Sidebar.Footer`: the band's own lower half is the space
510
518
  * between them. The header grows to fit them. The band, and with it the toolbar,
511
519
  * stays the height of the switcher row alone, so a search row pinned under the
512
520
  * switcher (`Sidebar.SearchTrigger`) needs no override and no hand-copied
@@ -514,13 +522,13 @@ type SidebarHeaderProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
514
522
  *
515
523
  * The alignment is positional: keep the aligned row as the header's first direct
516
524
  * child. A wrapper around both rows takes the band itself. A first row taller
517
- * than the band overflows it — raise the variable instead.
525
+ * than the band overflows it. Raise the variable instead.
518
526
  *
519
527
  * **CSS variables (public API):**
520
528
  *
521
529
  * | CSS Variable | Default | Description |
522
530
  * | --- | --- | --- |
523
- * | `--sidebar-header-height` | `4.5rem` | The first child's band (72px) — the height an `AppLayout.Header` toolbar matches, not a cap on the header, which grows for every row after the first. Set it on a common ancestor of the sidebar and `AppLayout.Header`, not on `Sidebar.Nav`, so both rows read one value. |
531
+ * | `--sidebar-header-height` | `4.5rem` | The first child's band (72px): the height an `AppLayout.Header` toolbar matches, not a cap on the header, which grows for every row after the first. Set it on a common ancestor of the sidebar and `AppLayout.Header`, not on `Sidebar.Nav`, so both rows read one value. |
524
532
  *
525
533
  * @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarheader
526
534
  *
@@ -878,7 +886,7 @@ type SidebarListProps = ComponentProps<"ul"> & WithAsChild & WithDataSlot;
878
886
  declare const List: ({ "aria-labelledby": ariaLabelledBy, asChild, children, className, "data-slot": dataSlot, ...props }: SidebarListProps) => import("react").JSX.Element;
879
887
  type SidebarItemProps = ComponentProps<"li"> & WithAsChild & WithDataSlot;
880
888
  /**
881
- * A single `<li>` row of a `Sidebar.List`. A plain wrapper — the interactive
889
+ * A single `<li>` row of a `Sidebar.List`. A plain wrapper: the interactive
882
890
  * element is the `Sidebar.ItemButton` child, so props, `ref`, and `className`
883
891
  * all target the list item itself.
884
892
  *
@@ -1040,7 +1048,7 @@ declare const ItemButton: ({ asChild, children, className, current, "data-slot":
1040
1048
  type SidebarSearchTriggerProps = ComponentProps<"button"> & WithDataSlot & ({
1041
1049
  /**
1042
1050
  * Compose the search row's styling onto your own element. Then the
1043
- * row's entire content is yours — including any shortcut hint, which
1051
+ * row's entire content is yours, including any shortcut hint, which
1044
1052
  * `shortcut` cannot add to a cloned child.
1045
1053
  */
1046
1054
  asChild: true;
@@ -1048,12 +1056,12 @@ type SidebarSearchTriggerProps = ComponentProps<"button"> & WithDataSlot & ({
1048
1056
  } | {
1049
1057
  /**
1050
1058
  * Compose the search row's styling onto your own element. Then the
1051
- * row's entire content is yours — including any shortcut hint, which
1059
+ * row's entire content is yours, including any shortcut hint, which
1052
1060
  * `shortcut` cannot add to a cloned child.
1053
1061
  */
1054
1062
  asChild?: false;
1055
1063
  /**
1056
- * The keyboard hint for the chord that opens the same palette — usually
1064
+ * The keyboard hint for the chord that opens the same palette, usually
1057
1065
  * `<><MetaKey /><Kbd>K</Kbd></>`.
1058
1066
  *
1059
1067
  * Rendered pinned to the end of the row and **revealed only on hover or
@@ -1069,7 +1077,7 @@ type SidebarSearchTriggerProps = ComponentProps<"button"> & WithDataSlot & ({
1069
1077
  shortcut?: ReactNode;
1070
1078
  });
1071
1079
  /**
1072
- * The search row — the row that opens a search or command palette.
1080
+ * The search row: the row that opens a search or command palette.
1073
1081
  *
1074
1082
  * Put it at the top of `Sidebar.Body`, above the first `Sidebar.Group`: it lands
1075
1083
  * in the same `px-3` gutter as the navigation rows, so it shares their column in
@@ -1078,19 +1086,19 @@ type SidebarSearchTriggerProps = ComponentProps<"button"> & WithDataSlot & ({
1078
1086
  * `Sidebar.Header`, under the switcher, also works, and pins the row above the
1079
1087
  * scrolling body instead. The switcher stays the header's first child, so it
1080
1088
  * keeps the `--sidebar-header-height` band an `AppLayout.Header` toolbar
1081
- * matches, and this row takes the next row down — the header grows for it, so
1089
+ * matches, and this row takes the next row down. The header grows for it, so
1082
1090
  * nothing needs a token override. The header reserves no scrollbar gutter, so on
1083
1091
  * a platform whose scrollbars take space the row runs wider than the navigation
1084
1092
  * rows below it, which sit inside `Sidebar.Body`'s reserved gutter.
1085
1093
  *
1086
1094
  * It is deliberately a navigation row and not a text field. The row is the same
1087
- * chrome as a `Sidebar.ItemButton` — same height, padding, radius, hover, and
1088
- * the same 28px chip in the collapsed icon rail — because a search entry point
1095
+ * chrome as a `Sidebar.ItemButton` (same height, padding, radius, hover, and
1096
+ * the same 28px chip in the collapsed icon rail), because a search entry point
1089
1097
  * in a sidebar is one of the rows, not a form control wedged among them. The
1090
1098
  * `shortcut` hint appears on hover or focus and is otherwise invisible, which
1091
1099
  * keeps the resting panel quiet.
1092
1100
  *
1093
- * A styled button only — it is not wired to any state. Compose it with
1101
+ * A styled button only. It is not wired to any state. Compose it with
1094
1102
  * [`Command.SearchTrigger`](https://mantle.ngrok.com/components/navigation/command#commandsearchtrigger),
1095
1103
  * which supplies the dialog wiring, `aria-keyshortcuts`, and the behavior that
1096
1104
  * makes typing or pasting into the row open the palette with that text already
@@ -1258,12 +1266,12 @@ declare const SwitcherTrigger: ({ asChild, children, className, "data-slot": dat
1258
1266
  */
1259
1267
  type SidebarTooltipProps = Omit<ComponentProps<typeof Tooltip.Content>, "children" | "side"> & WithDataSlot & {
1260
1268
  /**
1261
- * The row this labels — a `Sidebar.ItemButton` or `Sidebar.SwitcherTrigger`,
1269
+ * The row this labels: a `Sidebar.ItemButton` or `Sidebar.SwitcherTrigger`,
1262
1270
  * optionally already wrapped in a `DropdownMenu.Trigger asChild`.
1263
1271
  *
1264
1272
  * A single element, required: `Tooltip.Trigger asChild` clones its child, so
1265
1273
  * text renders nothing a pointer can hover and no children renders no row at
1266
- * all — both silently.
1274
+ * all. Both fail silently.
1267
1275
  */
1268
1276
  children: ReactElement;
1269
1277
  /**
@@ -1274,7 +1282,7 @@ type SidebarTooltipProps = Omit<ComponentProps<typeof Tooltip.Content>, "childre
1274
1282
  */
1275
1283
  label: ReactNode;
1276
1284
  /**
1277
- * The keyboard chord that reaches the same row, rendered after the label —
1285
+ * The keyboard chord that reaches the same row, rendered after the label,
1278
1286
  * usually `<><MetaKey /><Kbd>K</Kbd></>`. The rail hides the row's own
1279
1287
  * shortcut hint along with its label, so the tooltip is where a pointer user
1280
1288
  * can still learn the chord. The chips are `aria-hidden`: a tooltip is wired
@@ -1294,7 +1302,7 @@ type SidebarTooltipProps = Omit<ComponentProps<typeof Tooltip.Content>, "childre
1294
1302
  side?: ComponentProps<typeof Tooltip.Content>["side"];
1295
1303
  };
1296
1304
  /**
1297
- * Labels a sidebar row while — and only while — the desktop panel is collapsed
1305
+ * Labels a sidebar row only while the desktop panel is collapsed
1298
1306
  * to the icon rail. Wrap it around a `Sidebar.ItemButton` or
1299
1307
  * `Sidebar.SwitcherTrigger`.
1300
1308
  *
@@ -1305,13 +1313,13 @@ type SidebarTooltipProps = Omit<ComponentProps<typeof Tooltip.Content>, "childre
1305
1313
  * the mobile sheet shows full labels, so the collapsed desktop rail is the only
1306
1314
  * state that shows a label at all.
1307
1315
  *
1308
- * It opens the way any tooltip does — the pointer entering the row, or focus
1309
- * reaching it — and the rail state vetoes it: the expanded panel and the mobile
1316
+ * It opens the way any tooltip does (the pointer entering the row, or focus
1317
+ * reaching it), and the rail state vetoes it: the expanded panel and the mobile
1310
1318
  * sheet keep the row at `data-state="closed"` with no `aria-describedby`, and
1311
1319
  * toggling the rail dismisses whatever was showing, so collapsing the panel
1312
1320
  * cannot pop a label under a pointer that has already moved on.
1313
1321
  *
1314
- * **Requires a `TooltipProvider` ancestor**, like any `Tooltip.Root` — mount one
1322
+ * **Requires a `TooltipProvider` ancestor**, like any `Tooltip.Root`. Mount one
1315
1323
  * at your app root. This part deliberately does not mount its own, so the
1316
1324
  * app-wide tooltip delay stays app-wide rather than being overridden per row.
1317
1325
  * The one provider setting it does override is hoverable content: a rail label
@@ -1320,7 +1328,7 @@ type SidebarTooltipProps = Omit<ComponentProps<typeof Tooltip.Content>, "childre
1320
1328
  * It composes with a menu trigger: nest `DropdownMenu.Root >
1321
1329
  * Sidebar.Tooltip > DropdownMenu.Trigger asChild > Sidebar.ItemButton` for a
1322
1330
  * row that opens a menu *and* labels itself in the rail. `DropdownMenu.Root` must
1323
- * stay **outside** the tooltip — it is renderless, and `Tooltip.Trigger asChild`
1331
+ * stay **outside** the tooltip: it is renderless, and `Tooltip.Trigger asChild`
1324
1332
  * needs a real element to clone.
1325
1333
  *
1326
1334
  * `children` is the row; `label` is what the tooltip says. Every other prop is
@@ -1472,9 +1480,9 @@ type SidebarSeparatorProps = Omit<ComponentProps<typeof Separator>, "asChild" |
1472
1480
  declare const SidebarSeparator: ({ className, "data-slot": dataSlot, ...props }: SidebarSeparatorProps) => import("react").JSX.Element;
1473
1481
  /**
1474
1482
  * A composable, collapsible app-navigation sidebar. `Sidebar.Root` owns the
1475
- * state (no DOM); `Sidebar.Nav` renders the panel — inline on desktop,
1483
+ * state (no DOM). `Sidebar.Nav` renders the panel: inline on desktop,
1476
1484
  * collapsing to a skinny icon rail, and a left-side `Sheet` below the root's
1477
- * `mobileBreakpoint`; and `Sidebar.Trigger` toggles it from anywhere under the
1485
+ * `mobileBreakpoint`. `Sidebar.Trigger` toggles it from anywhere under the
1478
1486
  * root (typically an `AppLayout.Header`). Navigation is grouped with
1479
1487
  * `Sidebar.Group`/`Sidebar.GroupLabel`/`Sidebar.List`, and the switcher rows
1480
1488
  * (app switcher up top, account/user down bottom) compose
@@ -1488,6 +1496,14 @@ declare const SidebarSeparator: ({ className, "data-slot": dataSlot, ...props }:
1488
1496
  * details pane is `AppLayout.SidePanel`; a modal drawer is `Sheet`; switching
1489
1497
  * sections inside one page is `Tabs`.
1490
1498
  *
1499
+ * @useWhen Show the main navigation of an app, with its app and account switchers, in a column that
1500
+ * collapses to an icon rail, and to a sheet on small screens.
1501
+ *
1502
+ * @siblings
1503
+ * - `Tabs`: the user switches between views inside one page.
1504
+ * - `Sheet`: a panel opens over the page for a task, not for navigation.
1505
+ * - `Breadcrumb`: the page shows where it sits in a hierarchy.
1506
+ *
1491
1507
  * @see https://mantle.ngrok.com/components/navigation/sidebar
1492
1508
  *
1493
1509
  * @example
@@ -1564,7 +1580,7 @@ declare const SidebarSeparator: ({ className, "data-slot": dataSlot, ...props }:
1564
1580
  */
1565
1581
  declare const Sidebar: {
1566
1582
  /**
1567
- * The state owner for a sidebar. Renders no DOM — carries expanded /
1583
+ * The state owner for a sidebar. Renders no DOM. It carries expanded /
1568
1584
  * mobile-sheet state to every part below it so the trigger can live in the
1569
1585
  * app shell without coupling it to the sidebar.
1570
1586
  *
@@ -2228,7 +2244,7 @@ declare const Sidebar: {
2228
2244
  * The search row: an item-shaped row whose `shortcut` hint appears on hover or
2229
2245
  * focus, and the same chip as any other row in the collapsed icon rail. Goes
2230
2246
  * in `Sidebar.Body` to scroll with the navigation, or in `Sidebar.Header` to
2231
- * stay pinned above it. Not state-wired — compose with
2247
+ * stay pinned above it. Not state-wired: compose with
2232
2248
  * `Command.SearchTrigger`.
2233
2249
  *
2234
2250
  * **Data attributes:**
package/dist/sidebar.js CHANGED
@@ -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{t as r}from"./button-B8k98Pby.js";import{t as i}from"./use-is-hydrated-after-paint-r9Cl2mGp.js";import{t as a}from"./tooltip-b6oiTaWq.js";import{n as o}from"./cookie-ca4g5CKp.js";import{n as s}from"./separator-DfzxVutO.js";import{n as c,t as l}from"./use-is-apple-platform-D4nifHMx.js";import{t as u}from"./use-callback-ref-BvVyI5K1.js";import{t as d}from"./sheet-CSJc_sB4.js";import{r as f}from"./use-breakpoint--mo7kr9d.js";import{c as p}from"react/compiler-runtime";import{createContext as m,useContext as h,useEffect as g,useId as _,useLayoutEffect as v,useRef as y,useState as b}from"react";import x from"tiny-invariant";import{Fragment as S,jsx as C,jsxs as w}from"react/jsx-runtime";import{SidebarSimpleIcon as T}from"@phosphor-icons/react/SidebarSimple";const E={sm:`max-sm:not-data-hydrated:hidden`,md:`max-md:not-data-hydrated:hidden`,lg:`max-lg:not-data-hydrated:hidden`},D=`duration-200 ease-out-strong motion-reduce:transition-none group-not-data-hydrated/sidebar-nav:transition-none`,O=m(null);function k(){let e=h(O);return x(e,`useSidebar must be used within Sidebar.Root.`),e}function A(e){let t=h(O);return x(t,`Sidebar.${e} must be rendered inside Sidebar.Root.`),t}const j=[];function M(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.tagName===`SELECT`:!1}function N(){let e=Symbol(`sidebar-keyboard-shortcut`);return j.push(e),{isOwner:()=>j[0]===e,release:()=>{let t=j.indexOf(e);t!==-1&&j.splice(t,1)}}}const P=e=>{let t=p(35),{children:n,defaultOpen:r,keyboardShortcut:i,mobileBreakpoint:a,onOpenChange:o,onOpenMobileChange:s,open:l,openMobile:d}=e,m=r===void 0||r,h=i===void 0||i,x=a===void 0?`lg`:a,S=f(x),w=_(),T=y(o),E=y(s),D;t[0]!==o||t[1]!==s?(D=()=>{T.current=o,E.current=s},t[0]=o,t[1]=s,t[2]=D):D=t[2],v(D);let k=l!=null,[A,j]=b(m),P=k?l:A,F;t[3]===k?F=t[4]:(F=e=>{k||j(e),T.current?.(e)},t[3]=k,t[4]=F);let I=F,L=d!=null,[R,z]=b(!1),B=L?d:R,V;t[5]===L?V=t[6]:(V=e=>{L||z(e),E.current?.(e)},t[5]=L,t[6]=V);let H=V,U=y(S),W,G;t[7]!==S||t[8]!==B||t[9]!==H?(W=()=>{let e=U.current&&!S;U.current=S,e&&B&&H(!1)},G=[S,B,H],t[7]=S,t[8]=B,t[9]=H,t[10]=W,t[11]=G):(W=t[10],G=t[11]),g(W,G);let K;t[12]!==S||t[13]!==P||t[14]!==B||t[15]!==I||t[16]!==H?(K=()=>{S?H(!B):I(!P)},t[12]=S,t[13]=P,t[14]=B,t[15]=I,t[16]=H,t[17]=K):K=t[17];let q=K,J=u(q),Y,X;t[18]!==h||t[19]!==J?(Y=()=>{if(!h)return;let e=N(),t=c(),n=n=>{if(!e.isOwner()||n.defaultPrevented||M(n.target))return;let r=t?n.metaKey:n.ctrlKey,i=t?n.ctrlKey:n.metaKey;n.key?.toLowerCase()===`b`&&r&&!i&&!n.altKey&&!n.shiftKey&&(n.preventDefault(),J())};return window.addEventListener(`keydown`,n),()=>{window.removeEventListener(`keydown`,n),e.release()}},X=[h,J],t[18]=h,t[19]=J,t[20]=Y,t[21]=X):(Y=t[20],X=t[21]),g(Y,X);let Z;t[22]!==S||t[23]!==h||t[24]!==x||t[25]!==w||t[26]!==P||t[27]!==B||t[28]!==I||t[29]!==H||t[30]!==q?(Z={isMobile:S,keyboardShortcut:h,mobileBreakpoint:x,navId:w,open:P,openMobile:B,setOpen:I,setOpenMobile:H,toggle:q},t[22]=S,t[23]=h,t[24]=x,t[25]=w,t[26]=P,t[27]=B,t[28]=I,t[29]=H,t[30]=q,t[31]=Z):Z=t[31];let Q=Z,$;return t[32]!==n||t[33]!==Q?($=/* @__PURE__ */ C(O.Provider,{value:Q,children:n}),t[32]=n,t[33]=Q,t[34]=$):$=t[34],$},F=n=>{let r=p(48),a,o,s,c,l,u;r[0]===n?(a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],u=r[6]):({"aria-label":a,"aria-labelledby":o,children:s,className:c,"data-slot":l,...u}=n,r[0]=n,r[1]=a,r[2]=o,r[3]=s,r[4]=c,r[5]=l,r[6]=u);let{isMobile:f,mobileBreakpoint:m,navId:h,open:g,openMobile:_,setOpenMobile:v}=A(`Nav`),y=i(),b=a??(o==null?`Main`:void 0);if(f){let n;r[7]===l?n=r[8]:(n=t(l,`sidebar-nav`),r[7]=l,r[8]=n);let i;r[9]===o?i=r[10]:(i=o==null?null:{"aria-labelledby":o},r[9]=o,r[10]=i);let a;r[11]===c?a=r[12]:(a=e(`bg-base w-(--sidebar-width-mobile,18rem) max-w-full p-0`,c),r[11]=c,r[12]=a);let f=b??`Sidebar`,p;r[13]===f?p=r[14]:(p=/* @__PURE__ */ C(d.Title,{className:`sr-only`,children:f}),r[13]=f,r[14]=p);let m;r[15]!==b||r[16]!==o||r[17]!==s||r[18]!==h?(m=/* @__PURE__ */ C(`nav`,{id:h,"aria-label":b,"aria-labelledby":o,className:`flex h-full w-full min-w-0 flex-col text-sm`,children:s}),r[15]=b,r[16]=o,r[17]=s,r[18]=h,r[19]=m):m=r[19];let g;r[20]!==u||r[21]!==n||r[22]!==i||r[23]!==a||r[24]!==p||r[25]!==m?(g=/* @__PURE__ */ w(d.Content,{side:`left`,preferredWidth:`sm:max-w-(--sidebar-width-mobile,18rem)`,"data-slot":n,"data-mobile":``,...i,className:a,...u,children:[p,m]}),r[20]=u,r[21]=n,r[22]=i,r[23]=a,r[24]=p,r[25]=m,r[26]=g):g=r[26];let y;return r[27]!==_||r[28]!==v||r[29]!==g?(y=/* @__PURE__ */ C(d.Root,{open:_,onOpenChange:v,children:g}),r[27]=_,r[28]=v,r[29]=g,r[30]=y):y=r[30],y}let x;r[31]===l?x=r[32]:(x=t(l,`sidebar-nav`),r[31]=l,r[32]=x);let S=E[m],T;r[33]!==c||r[34]!==S?(T=e(`group/sidebar-nav bg-base relative h-full w-(--sidebar-width,13rem) shrink-0 overflow-hidden`,`data-[state=collapsed]:w-(--sidebar-width-icon,3.25rem)`,S,`transition-[width] duration-200 ease-out-strong motion-reduce:transition-none not-data-hydrated:transition-none`,c),r[33]=c,r[34]=S,r[35]=T):T=r[35];let D=g?`expanded`:`collapsed`,O=y?``:void 0,k;r[36]!==b||r[37]!==o||r[38]!==s||r[39]!==h?(k=/* @__PURE__ */ C(`nav`,{id:h,"aria-label":b,"aria-labelledby":o,className:`absolute inset-y-0 left-0 flex w-full min-w-0 flex-col text-sm`,children:s}),r[36]=b,r[37]=o,r[38]=s,r[39]=h,r[40]=k):k=r[40];let j;return r[41]!==u||r[42]!==x||r[43]!==T||r[44]!==D||r[45]!==O||r[46]!==k?(j=/* @__PURE__ */ C(`div`,{"data-slot":x,className:T,...u,"data-state":D,"data-hydrated":O,children:k}),r[41]=u,r[42]=x,r[43]=T,r[44]=D,r[45]=O,r[46]=k,r[47]=j):j=r[47],j},I=/* @__PURE__ */ C(T,{}),L=e=>{let t=p(7),{label:n,shortcut:r}=e,i;t[0]===n?i=t[1]:(i=/* @__PURE__ */ C(`span`,{"data-slot":`sidebar-tooltip-label`,className:`contents`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r!=null&&/* @__PURE__ */ C(`span`,{"aria-hidden":!0,"data-slot":`sidebar-tooltip-shortcut`,className:`inline-flex shrink-0 items-center gap-0.5 [&_kbd]:h-4 [&_kbd]:min-w-4 [&_kbd]:bg-neutral-500/25 [&_kbd]:px-0.5 [&_kbd]:text-xs`,translate:`no`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=/* @__PURE__ */ w(`span`,{"data-slot":`sidebar-tooltip-row`,className:`flex items-center gap-1.5`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o},R=e=>{let n=p(34),i,o,s,c,u,d,f,m,h;n[0]===e?(i=n[1],o=n[2],s=n[3],c=n[4],u=n[5],d=n[6],f=n[7],m=n[8],h=n[9]):({appearance:u,"data-slot":i,icon:d,intent:f,label:m,onClick:o,shortcut:c,size:h,...s}=e,n[0]=e,n[1]=i,n[2]=o,n[3]=s,n[4]=c,n[5]=u,n[6]=d,n[7]=f,n[8]=m,n[9]=h);let g=u===void 0?`ghost`:u,_=d===void 0?I:d,v=f===void 0?`neutral`:f,y=m===void 0?`Toggle Sidebar`:m,b=h===void 0?`sm`:h,{isMobile:x,keyboardShortcut:S,navId:T,open:E,openMobile:D,toggle:O}=A(`Trigger`),k=l(),j=x?D:E,M=!x||D,N=S?c:void 0,P=k?`Meta+B`:`Control+B`,F=M?T:void 0,R=S?P:void 0,z;n[10]===i?z=n[11]:(z=t(i,`sidebar-trigger`),n[10]=i,n[11]=z);let B=j?`expanded`:`collapsed`,V;n[12]!==o||n[13]!==O?(V=e=>{o?.(e),e.defaultPrevented||O()},n[12]=o,n[13]=O,n[14]=V):V=n[14];let H;n[15]!==g||n[16]!==j||n[17]!==_||n[18]!==v||n[19]!==y||n[20]!==s||n[21]!==b||n[22]!==V||n[23]!==F||n[24]!==R||n[25]!==z||n[26]!==B?(H=/* @__PURE__ */ C(a.Trigger,{asChild:!0,children:/* @__PURE__ */ C(r,{appearance:g,"aria-controls":F,"aria-expanded":j,"aria-keyshortcuts":R,"data-slot":z,"data-state":B,icon:_,intent:v,label:y,onClick:V,size:b,...s})}),n[15]=g,n[16]=j,n[17]=_,n[18]=v,n[19]=y,n[20]=s,n[21]=b,n[22]=V,n[23]=F,n[24]=R,n[25]=z,n[26]=B,n[27]=H):H=n[27];let U;n[28]!==N||n[29]!==y?(U=/* @__PURE__ */ C(a.Content,{"data-slot":`sidebar-trigger-tooltip`,children:/* @__PURE__ */ C(L,{label:y,shortcut:N})}),n[28]=N,n[29]=y,n[30]=U):U=n[30];let W;return n[31]!==H||n[32]!==U?(W=/* @__PURE__ */ w(a.Root,{children:[H,U]}),n[31]=H,n[32]=U,n[33]=W):W=n[33],W},z=r=>{let i=p(16),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?n:`div`,d;i[6]===c?d=i[7]:(d=t(c,`sidebar-header`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=e(`grid grid-cols-1 grid-rows-(--sidebar-header-height,4.5rem) shrink-0 items-center px-3`,`group-data-[state=expanded]/sidebar-nav:pr-1`,s),i[8]=s,i[9]=f);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(m=/* @__PURE__ */ C(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=m):m=i[15],m},B=r=>{let i=p(16),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?n:`div`,d;i[6]===c?d=i[7]:(d=t(c,`sidebar-body`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=e(`scrollbar scrollbar-gutter-stable scroll-fade-y flex-1 scroll-py-6 space-y-2 overflow-y-auto overflow-x-hidden px-3 pt-1.5 pb-4`,`group-data-[state=expanded]/sidebar-nav:pr-1`,`transition-[padding]`,D,`group-data-[state=collapsed]/sidebar-nav:scrollbar-none`,`group-data-[state=collapsed]/sidebar-nav:scrollbar-gutter-auto`,`group-data-[state=collapsed]/sidebar-nav:[&::-webkit-scrollbar]:hidden`,s),i[8]=s,i[9]=f);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(m=/* @__PURE__ */ C(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=m):m=i[15],m},V=r=>{let i=p(16),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?n:`div`,d;i[6]===c?d=i[7]:(d=t(c,`sidebar-footer`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=e(`shrink-0 px-3 pt-3 pb-3.5`,`group-data-[state=expanded]/sidebar-nav:pr-1`,s),i[8]=s,i[9]=f);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(m=/* @__PURE__ */ C(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=m):m=i[15],m},H=m(null),U=r=>{let i=p(21),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let[u,d]=b(null),f;i[6]===u?f=i[7]:(f={mountedLabelId:u,setMountedLabelId:d},i[6]=u,i[7]=f);let m=f,h=a?n:`div`,g;i[8]===c?g=i[9]:(g=t(c,`sidebar-group`),i[8]=c,i[9]=g);let _;i[10]===s?_=i[11]:(_=e(`pt-0.5`,s),i[10]=s,i[11]=_);let v;i[12]!==h||i[13]!==o||i[14]!==l||i[15]!==g||i[16]!==_?(v=/* @__PURE__ */ C(h,{"data-slot":g,className:_,...l,children:o}),i[12]=h,i[13]=o,i[14]=l,i[15]=g,i[16]=_,i[17]=v):v=i[17];let y;return i[18]!==m||i[19]!==v?(y=/* @__PURE__ */ C(H.Provider,{value:m,children:v}),i[18]=m,i[19]=v,i[20]=y):y=i[20],y},W=r=>{let i=p(22),a,o,s,c,l,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6]):({asChild:a,children:o,className:s,"data-slot":c,id:l,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u);let d=h(H),f=_(),m=l??(d==null?void 0:f),v=d?.setMountedLabelId,y,b;i[7]!==m||i[8]!==v?(y=()=>{if(v!=null&&m!=null)return v(m),()=>{v(null)}},b=[v,m],i[7]=m,i[8]=v,i[9]=y,i[10]=b):(y=i[9],b=i[10]),g(y,b);let x=a?n:`div`,S;i[11]===c?S=i[12]:(S=t(c,`sidebar-group-label`),i[11]=c,i[12]=S);let w;i[13]===s?w=i[14]:(w=e(`text-muted flex min-w-0 items-center gap-2 truncate px-2 py-1 text-xs font-medium`,`group-data-[state=collapsed]/sidebar-nav:opacity-0`,`group-data-[state=collapsed]/sidebar-nav:pointer-events-none`,`transition-opacity`,D,s),i[13]=s,i[14]=w);let T;return i[15]!==x||i[16]!==o||i[17]!==m||i[18]!==u||i[19]!==S||i[20]!==w?(T=/* @__PURE__ */ C(x,{id:m,"data-slot":S,className:w,...u,children:o}),i[15]=x,i[16]=o,i[17]=m,i[18]=u,i[19]=S,i[20]=w,i[21]=T):T=i[21],T},G=r=>{let i=p(18),a,o,s,c,l,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6]):({"aria-labelledby":a,asChild:o,children:s,className:c,"data-slot":l,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u);let d=h(H),f=o?n:`ul`,m=a??d?.mountedLabelId??void 0,g;i[7]===l?g=i[8]:(g=t(l,`sidebar-list`),i[7]=l,i[8]=g);let _;i[9]===c?_=i[10]:(_=e(`mb-2 space-y-px`,c),i[9]=c,i[10]=_);let v;return i[11]!==f||i[12]!==s||i[13]!==u||i[14]!==m||i[15]!==g||i[16]!==_?(v=/* @__PURE__ */ C(f,{"aria-labelledby":m,"data-slot":g,className:_,...u,children:s}),i[11]=f,i[12]=s,i[13]=u,i[14]=m,i[15]=g,i[16]=_,i[17]=v):v=i[17],v},K=r=>{let i=p(16),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?n:`li`,d;i[6]===c?d=i[7]:(d=t(c,`sidebar-item`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=e(`list-none`,s),i[8]=s,i[9]=f);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(m=/* @__PURE__ */ C(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=m):m=i[15],m},q=[`ring-focus-accent flex w-full min-w-0 items-center gap-2 truncate rounded-md px-2 py-1 text-left font-normal focus:outline-hidden focus-visible:ring-4`,`text-body hover:text-strong hover:bg-neutral-500/10`,`data-state-open:bg-neutral-500/15 data-state-open:text-strong`,`aria-expanded:bg-neutral-500/15 aria-expanded:text-strong`,`group-data-[state=collapsed]/sidebar-nav:ml-1`,`group-data-[state=collapsed]/sidebar-nav:w-7`,`group-data-[state=collapsed]/sidebar-nav:p-1`,`group-data-[state=collapsed]/sidebar-nav:text-clip`,`transition-[width,padding,margin] ${D}`].join(` `),J={Root:P,Nav:F,Trigger:R,Header:z,Body:B,Footer:V,Group:U,GroupLabel:W,List:G,Item:K,ItemButton:r=>{let i=p(21),a,o,s,c,l,u,d;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],d=i[7]):({asChild:a,children:o,className:s,current:c,"data-slot":l,type:d,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u,i[7]=d);let f=a?n:`button`,m;i[8]===l?m=i[9]:(m=t(l,`sidebar-item-button`),i[8]=l,i[9]=m);let h=c?``:void 0,g=c?`page`:void 0,_=a?d:d??`button`,v;i[10]===s?v=i[11]:(v=e(q,`data-current:bg-neutral-500/15 data-current:text-strong`,`aria-[current=page]:bg-neutral-500/15 aria-[current=page]:text-strong`,`[&>svg]:text-muted hover:[&>svg]:text-strong data-current:[&>svg]:text-strong aria-[current=page]:[&>svg]:text-strong [&>svg:first-child]:size-5 [&>svg]:shrink-0`,s),i[10]=s,i[11]=v);let y;return i[12]!==f||i[13]!==o||i[14]!==u||i[15]!==m||i[16]!==h||i[17]!==g||i[18]!==_||i[19]!==v?(y=/* @__PURE__ */ C(f,{"data-slot":m,"data-current":h,"aria-current":g,type:_,className:v,...u,children:o}),i[12]=f,i[13]=o,i[14]=u,i[15]=m,i[16]=h,i[17]=g,i[18]=_,i[19]=v,i[20]=y):y=i[20],y},SearchTrigger:r=>{let i=p(23),a,o,s,c,l,u,d;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],d=i[7]):({asChild:a,children:o,className:s,"data-slot":c,shortcut:u,type:d,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u,i[7]=d);let f=a?n:`button`,m;i[8]!==a||i[9]!==o||i[10]!==u?(m=a?o:/* @__PURE__ */ w(S,{children:[/* @__PURE__ */ C(`span`,{"data-slot":`sidebar-search-trigger-label`,className:`contents`,children:o}),/* @__PURE__ */ C(`span`,{"aria-hidden":!0,"data-slot":`sidebar-search-trigger-shortcut`,translate:`no`,className:e(`pointer-events-none -mr-1 ml-auto inline-flex shrink-0 items-center gap-0.5 opacity-0 select-none`,`group-hover:opacity-100 group-focus-visible:opacity-100`,`group-data-[state=collapsed]/sidebar-nav:hidden`,`[&_kbd]:text-body [&_kbd]:h-5 [&_kbd]:min-w-5 [&_kbd]:bg-neutral-500/20 [&_kbd]:px-1 [&_kbd]:text-xs [&_kbd]:font-normal`,`empty:hidden`),children:u})]}),i[8]=a,i[9]=o,i[10]=u,i[11]=m):m=i[11];let h=m,g;i[12]===c?g=i[13]:(g=t(c,`sidebar-search-trigger`),i[12]=c,i[13]=g);let _=a?d:d??`button`,v;i[14]===s?v=i[15]:(v=e(`group`,q,`[&>svg:first-child]:text-muted hover:[&>svg:first-child]:text-strong`,`[&>svg:first-child]:size-5`,`[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:text-muted`,`hover:[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:text-strong`,`[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:size-5`,`[&_svg]:shrink-0`,s),i[14]=s,i[15]=v);let y;return i[16]!==f||i[17]!==h||i[18]!==l||i[19]!==g||i[20]!==_||i[21]!==v?(y=/* @__PURE__ */ C(f,{"data-slot":g,type:_,className:v,...l,children:h}),i[16]=f,i[17]=h,i[18]=l,i[19]=g,i[20]=_,i[21]=v,i[22]=y):y=i[22],y},SwitcherTrigger:r=>{let i=p(18),a,o,s,c,l,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6]):({asChild:a,children:o,className:s,"data-slot":c,type:u,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u);let d=a?n:`button`,f;i[7]===c?f=i[8]:(f=t(c,`sidebar-switcher-trigger`),i[7]=c,i[8]=f);let m=a?u:u??`button`,h;i[9]===s?h=i[10]:(h=e(`text-body hover:text-strong hover:bg-neutral-500/10 flex w-full min-w-0 items-center gap-2 rounded-[0.625rem] py-1 pr-1.5 pl-1 text-left font-medium`,`data-state-open:bg-neutral-500/15 data-state-open:text-strong`,`aria-expanded:bg-neutral-500/15 aria-expanded:text-strong`,`ring-focus-accent focus:outline-hidden focus-visible:ring-4`,`*:first:size-7`,`group-data-[state=collapsed]/sidebar-nav:w-9`,`group-data-[state=collapsed]/sidebar-nav:p-1`,`group-data-[state=collapsed]/sidebar-nav:[&>:not(:first-child)]:sr-only`,`transition-[width,padding]`,D,s),i[9]=s,i[10]=h);let g;return i[11]!==d||i[12]!==o||i[13]!==l||i[14]!==f||i[15]!==m||i[16]!==h?(g=/* @__PURE__ */ C(d,{"data-slot":f,type:m,className:h,...l,children:o}),i[11]=d,i[12]=o,i[13]=l,i[14]=f,i[15]=m,i[16]=h,i[17]=g):g=i[17],g},Tooltip:e=>{let n=p(26),r,i,o,s,c,l;n[0]===e?(r=n[1],i=n[2],o=n[3],s=n[4],c=n[5],l=n[6]):({children:r,"data-slot":i,label:o,shortcut:c,side:l,...s}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o,n[4]=s,n[5]=c,n[6]=l);let u=l===void 0?`right`:l,{isMobile:d,open:f}=A(`Tooltip`),m=!d&&!f,[h,g]=b(!1),[_,v]=b(m);_!==m&&(v(m),g(!1));let y;n[7]===m?y=n[8]:(y=e=>{g(e&&m)},n[7]=m,n[8]=y);let x=y,S=m&&h,T;n[9]===r?T=n[10]:(T=/* @__PURE__ */ C(a.Trigger,{asChild:!0,children:r}),n[9]=r,n[10]=T);let E;n[11]===i?E=n[12]:(E=t(i,`sidebar-tooltip`),n[11]=i,n[12]=E);let D;n[13]!==o||n[14]!==c?(D=/* @__PURE__ */ C(L,{label:o,shortcut:c}),n[13]=o,n[14]=c,n[15]=D):D=n[15];let O;n[16]!==s||n[17]!==u||n[18]!==E||n[19]!==D?(O=/* @__PURE__ */ C(a.Content,{"data-slot":E,side:u,...s,children:D}),n[16]=s,n[17]=u,n[18]=E,n[19]=D,n[20]=O):O=n[20];let k;return n[21]!==x||n[22]!==S||n[23]!==T||n[24]!==O?(k=/* @__PURE__ */ w(a.Root,{disableHoverableContent:!0,onOpenChange:x,open:S,children:[T,O]}),n[21]=x,n[22]=S,n[23]=T,n[24]=O,n[25]=k):k=n[25],k},Separator:n=>{let r=p(12),i,a,o;r[0]===n?(i=r[1],a=r[2],o=r[3]):({className:i,"data-slot":a,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o);let c;r[4]===a?c=r[5]:(c=t(a,`sidebar-separator`),r[4]=a,r[5]=c);let l;r[6]===i?l=r[7]:(l=e(`my-3`,`group-data-[state=collapsed]/sidebar-nav:w-9`,`transition-[width]`,D,i),r[6]=i,r[7]=l);let u;return r[8]!==o||r[9]!==c||r[10]!==l?(u=/* @__PURE__ */ C(s,{"data-slot":c,className:l,...o}),r[8]=o,r[9]=c,r[10]=l,r[11]=u):u=r[11],u}},Y=`mantle-sidebar-state`,X={collapsed:`collapsed`,expanded:`expanded`};function Z(e){let t=o(e,Y);if(t===X.expanded)return!0;if(t===X.collapsed)return!1}function Q(e,t={}){let{domain:n,maxAge:r=31536e3,path:i=`/`,sameSite:a=`Lax`,secure:o=!1}=t,s=e?X.expanded:X.collapsed,c=[`${Y}=${s}`,`Max-Age=${r}`,`Path=${i}`];return n!=null&&c.push(`Domain=${n}`),c.push(`SameSite=${a}`),o&&c.push(`Secure`),c.join(`; `)}export{Y as SIDEBAR_STATE_COOKIE_NAME,J as Sidebar,Z as extractSidebarStateCookie,Q as serializeSidebarStateCookie,k as useSidebar};
1
+ "use client";import{t as e}from"./use-callback-ref-DiOXFQzM.js";import{r as t}from"./use-breakpoint-B4Kh0xE6.js";import{n,t as r}from"./use-is-apple-platform-Bq6_KbVX.js";import{t as i}from"./use-is-hydrated-after-paint-CrHt3OHw.js";import{t as a}from"./cx-CK7o_rVv.js";import{t as o}from"./data-slot-EM6s2WEU.js";import{t as s}from"./button-B9bChDgl.js";import{n as c}from"./separator-DnvhwY2J.js";import{t as l}from"./sheet-DHy_vlme.js";import{t as u}from"./slot-B7rwscwd.js";import{t as d}from"./tooltip-DQO40Mrq.js";import{n as f}from"./cookie-ca4g5CKp.js";import{c as p}from"react/compiler-runtime";import{createContext as m,useContext as h,useEffect as g,useId as _,useLayoutEffect as v,useRef as y,useState as b}from"react";import x from"tiny-invariant";import{Fragment as S,jsx as C,jsxs as w}from"react/jsx-runtime";import{SidebarSimpleIcon as T}from"@phosphor-icons/react/SidebarSimple";const E={sm:`max-sm:not-data-hydrated:hidden`,md:`max-md:not-data-hydrated:hidden`,lg:`max-lg:not-data-hydrated:hidden`},D=`duration-200 ease-out-strong motion-reduce:transition-none group-not-data-hydrated/sidebar-nav:transition-none`,O=m(null);function k(){let e=h(O);return x(e,`useSidebar must be used within Sidebar.Root.`),e}function A(e){let t=h(O);return x(t,`Sidebar.${e} must be rendered inside Sidebar.Root.`),t}const j=[];function M(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.tagName===`SELECT`:!1}function N(){let e=Symbol(`sidebar-keyboard-shortcut`);return j.push(e),{isOwner:()=>j[0]===e,release:()=>{let t=j.indexOf(e);t!==-1&&j.splice(t,1)}}}const P=r=>{let i=p(35),{children:a,defaultOpen:o,keyboardShortcut:s,mobileBreakpoint:c,onOpenChange:l,onOpenMobileChange:u,open:d,openMobile:f}=r,m=o===void 0||o,h=s===void 0||s,x=c===void 0?`lg`:c,S=t(x),w=_(),T=y(l),E=y(u),D;i[0]!==l||i[1]!==u?(D=()=>{T.current=l,E.current=u},i[0]=l,i[1]=u,i[2]=D):D=i[2],v(D);let k=d!=null,[A,j]=b(m),P=k?d:A,F;i[3]===k?F=i[4]:(F=e=>{k||j(e),T.current?.(e)},i[3]=k,i[4]=F);let I=F,L=f!=null,[R,z]=b(!1),B=L?f:R,V;i[5]===L?V=i[6]:(V=e=>{L||z(e),E.current?.(e)},i[5]=L,i[6]=V);let H=V,U=y(S),W,G;i[7]!==S||i[8]!==B||i[9]!==H?(W=()=>{let e=U.current&&!S;U.current=S,e&&B&&H(!1)},G=[S,B,H],i[7]=S,i[8]=B,i[9]=H,i[10]=W,i[11]=G):(W=i[10],G=i[11]),g(W,G);let K;i[12]!==S||i[13]!==P||i[14]!==B||i[15]!==I||i[16]!==H?(K=()=>{S?H(!B):I(!P)},i[12]=S,i[13]=P,i[14]=B,i[15]=I,i[16]=H,i[17]=K):K=i[17];let q=K,J=e(q),Y,X;i[18]!==h||i[19]!==J?(Y=()=>{if(!h)return;let e=N(),t=n(),r=n=>{if(!e.isOwner()||n.defaultPrevented||M(n.target))return;let r=t?n.metaKey:n.ctrlKey,i=t?n.ctrlKey:n.metaKey;n.key?.toLowerCase()===`b`&&r&&!i&&!n.altKey&&!n.shiftKey&&(n.preventDefault(),J())};return window.addEventListener(`keydown`,r),()=>{window.removeEventListener(`keydown`,r),e.release()}},X=[h,J],i[18]=h,i[19]=J,i[20]=Y,i[21]=X):(Y=i[20],X=i[21]),g(Y,X);let Z;i[22]!==S||i[23]!==h||i[24]!==x||i[25]!==w||i[26]!==P||i[27]!==B||i[28]!==I||i[29]!==H||i[30]!==q?(Z={isMobile:S,keyboardShortcut:h,mobileBreakpoint:x,navId:w,open:P,openMobile:B,setOpen:I,setOpenMobile:H,toggle:q},i[22]=S,i[23]=h,i[24]=x,i[25]=w,i[26]=P,i[27]=B,i[28]=I,i[29]=H,i[30]=q,i[31]=Z):Z=i[31];let Q=Z,$;return i[32]!==a||i[33]!==Q?($=/* @__PURE__ */ C(O.Provider,{value:Q,children:a}),i[32]=a,i[33]=Q,i[34]=$):$=i[34],$},F=e=>{let t=p(48),n,r,s,c,u,d;t[0]===e?(n=t[1],r=t[2],s=t[3],c=t[4],u=t[5],d=t[6]):({"aria-label":n,"aria-labelledby":r,children:s,className:c,"data-slot":u,...d}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=s,t[4]=c,t[5]=u,t[6]=d);let{isMobile:f,mobileBreakpoint:m,navId:h,open:g,openMobile:_,setOpenMobile:v}=A(`Nav`),y=i(),b=n??(r==null?`Main`:void 0);if(f){let e;t[7]===u?e=t[8]:(e=o(u,`sidebar-nav`),t[7]=u,t[8]=e);let n;t[9]===r?n=t[10]:(n=r==null?null:{"aria-labelledby":r},t[9]=r,t[10]=n);let i;t[11]===c?i=t[12]:(i=a(`bg-base w-(--sidebar-width-mobile,18rem) max-w-full p-0`,c),t[11]=c,t[12]=i);let f=b??`Sidebar`,p;t[13]===f?p=t[14]:(p=/* @__PURE__ */ C(l.Title,{className:`sr-only`,children:f}),t[13]=f,t[14]=p);let m;t[15]!==b||t[16]!==r||t[17]!==s||t[18]!==h?(m=/* @__PURE__ */ C(`nav`,{id:h,"aria-label":b,"aria-labelledby":r,className:`flex h-full w-full min-w-0 flex-col text-sm`,children:s}),t[15]=b,t[16]=r,t[17]=s,t[18]=h,t[19]=m):m=t[19];let g;t[20]!==d||t[21]!==e||t[22]!==n||t[23]!==i||t[24]!==p||t[25]!==m?(g=/* @__PURE__ */ w(l.Content,{side:`left`,preferredWidth:`sm:max-w-(--sidebar-width-mobile,18rem)`,"data-slot":e,"data-mobile":``,...n,className:i,...d,children:[p,m]}),t[20]=d,t[21]=e,t[22]=n,t[23]=i,t[24]=p,t[25]=m,t[26]=g):g=t[26];let y;return t[27]!==_||t[28]!==v||t[29]!==g?(y=/* @__PURE__ */ C(l.Root,{open:_,onOpenChange:v,children:g}),t[27]=_,t[28]=v,t[29]=g,t[30]=y):y=t[30],y}let x;t[31]===u?x=t[32]:(x=o(u,`sidebar-nav`),t[31]=u,t[32]=x);let S=E[m],T;t[33]!==c||t[34]!==S?(T=a(`group/sidebar-nav bg-base relative h-full w-(--sidebar-width,13rem) shrink-0 overflow-hidden`,`data-[state=collapsed]:w-(--sidebar-width-icon,3.25rem)`,S,`transition-[width] duration-200 ease-out-strong motion-reduce:transition-none not-data-hydrated:transition-none`,c),t[33]=c,t[34]=S,t[35]=T):T=t[35];let D=g?`expanded`:`collapsed`,O=y?``:void 0,k;t[36]!==b||t[37]!==r||t[38]!==s||t[39]!==h?(k=/* @__PURE__ */ C(`nav`,{id:h,"aria-label":b,"aria-labelledby":r,className:`absolute inset-y-0 left-0 flex w-full min-w-0 flex-col text-sm`,children:s}),t[36]=b,t[37]=r,t[38]=s,t[39]=h,t[40]=k):k=t[40];let j;return t[41]!==d||t[42]!==x||t[43]!==T||t[44]!==D||t[45]!==O||t[46]!==k?(j=/* @__PURE__ */ C(`div`,{"data-slot":x,className:T,...d,"data-state":D,"data-hydrated":O,children:k}),t[41]=d,t[42]=x,t[43]=T,t[44]=D,t[45]=O,t[46]=k,t[47]=j):j=t[47],j},I=/* @__PURE__ */ C(T,{}),L=e=>{let t=p(7),{label:n,shortcut:r}=e,i;t[0]===n?i=t[1]:(i=/* @__PURE__ */ C(`span`,{"data-slot":`sidebar-tooltip-label`,className:`contents`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r!=null&&/* @__PURE__ */ C(`span`,{"aria-hidden":!0,"data-slot":`sidebar-tooltip-shortcut`,className:`inline-flex shrink-0 items-center gap-0.5 [&_kbd]:h-4 [&_kbd]:min-w-4 [&_kbd]:bg-neutral-500/25 [&_kbd]:px-0.5 [&_kbd]:text-xs`,translate:`no`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=/* @__PURE__ */ w(`span`,{"data-slot":`sidebar-tooltip-row`,className:`flex items-center gap-1.5`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o},R=e=>{let t=p(34),n,i,a,c,l,u,f,m,h;t[0]===e?(n=t[1],i=t[2],a=t[3],c=t[4],l=t[5],u=t[6],f=t[7],m=t[8],h=t[9]):({appearance:l,"data-slot":n,icon:u,intent:f,label:m,onClick:i,shortcut:c,size:h,...a}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=c,t[5]=l,t[6]=u,t[7]=f,t[8]=m,t[9]=h);let g=l===void 0?`ghost`:l,_=u===void 0?I:u,v=f===void 0?`neutral`:f,y=m===void 0?`Toggle Sidebar`:m,b=h===void 0?`sm`:h,{isMobile:x,keyboardShortcut:S,navId:T,open:E,openMobile:D,toggle:O}=A(`Trigger`),k=r(),j=x?D:E,M=!x||D,N=S?c:void 0,P=k?`Meta+B`:`Control+B`,F=M?T:void 0,R=S?P:void 0,z;t[10]===n?z=t[11]:(z=o(n,`sidebar-trigger`),t[10]=n,t[11]=z);let B=j?`expanded`:`collapsed`,V;t[12]!==i||t[13]!==O?(V=e=>{i?.(e),e.defaultPrevented||O()},t[12]=i,t[13]=O,t[14]=V):V=t[14];let H;t[15]!==g||t[16]!==j||t[17]!==_||t[18]!==v||t[19]!==y||t[20]!==a||t[21]!==b||t[22]!==V||t[23]!==F||t[24]!==R||t[25]!==z||t[26]!==B?(H=/* @__PURE__ */ C(d.Trigger,{asChild:!0,children:/* @__PURE__ */ C(s,{appearance:g,"aria-controls":F,"aria-expanded":j,"aria-keyshortcuts":R,"data-slot":z,"data-state":B,icon:_,intent:v,label:y,onClick:V,size:b,...a})}),t[15]=g,t[16]=j,t[17]=_,t[18]=v,t[19]=y,t[20]=a,t[21]=b,t[22]=V,t[23]=F,t[24]=R,t[25]=z,t[26]=B,t[27]=H):H=t[27];let U;t[28]!==N||t[29]!==y?(U=/* @__PURE__ */ C(d.Content,{"data-slot":`sidebar-trigger-tooltip`,children:/* @__PURE__ */ C(L,{label:y,shortcut:N})}),t[28]=N,t[29]=y,t[30]=U):U=t[30];let W;return t[31]!==H||t[32]!==U?(W=/* @__PURE__ */ w(d.Root,{children:[H,U]}),t[31]=H,t[32]=U,t[33]=W):W=t[33],W},z=e=>{let t=p(16),n,r,i,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5]):({asChild:n,children:r,className:i,"data-slot":s,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c);let l=n?u:`div`,d;t[6]===s?d=t[7]:(d=o(s,`sidebar-header`),t[6]=s,t[7]=d);let f;t[8]===i?f=t[9]:(f=a(`grid grid-cols-1 grid-rows-(--sidebar-header-height,4.5rem) shrink-0 items-center px-3`,`group-data-[state=expanded]/sidebar-nav:pr-1`,i),t[8]=i,t[9]=f);let m;return t[10]!==l||t[11]!==r||t[12]!==c||t[13]!==d||t[14]!==f?(m=/* @__PURE__ */ C(l,{"data-slot":d,className:f,...c,children:r}),t[10]=l,t[11]=r,t[12]=c,t[13]=d,t[14]=f,t[15]=m):m=t[15],m},B=e=>{let t=p(16),n,r,i,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5]):({asChild:n,children:r,className:i,"data-slot":s,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c);let l=n?u:`div`,d;t[6]===s?d=t[7]:(d=o(s,`sidebar-body`),t[6]=s,t[7]=d);let f;t[8]===i?f=t[9]:(f=a(`scrollbar scrollbar-gutter-stable scroll-fade-y flex-1 scroll-py-6 space-y-2 overflow-y-auto overflow-x-hidden px-3 pt-1.5 pb-4`,`group-data-[state=expanded]/sidebar-nav:pr-1`,`transition-[padding]`,D,`group-data-[state=collapsed]/sidebar-nav:scrollbar-none`,`group-data-[state=collapsed]/sidebar-nav:scrollbar-gutter-auto`,`group-data-[state=collapsed]/sidebar-nav:[&::-webkit-scrollbar]:hidden`,i),t[8]=i,t[9]=f);let m;return t[10]!==l||t[11]!==r||t[12]!==c||t[13]!==d||t[14]!==f?(m=/* @__PURE__ */ C(l,{"data-slot":d,className:f,...c,children:r}),t[10]=l,t[11]=r,t[12]=c,t[13]=d,t[14]=f,t[15]=m):m=t[15],m},V=e=>{let t=p(16),n,r,i,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5]):({asChild:n,children:r,className:i,"data-slot":s,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c);let l=n?u:`div`,d;t[6]===s?d=t[7]:(d=o(s,`sidebar-footer`),t[6]=s,t[7]=d);let f;t[8]===i?f=t[9]:(f=a(`shrink-0 px-3 pt-3 pb-3.5`,`group-data-[state=expanded]/sidebar-nav:pr-1`,i),t[8]=i,t[9]=f);let m;return t[10]!==l||t[11]!==r||t[12]!==c||t[13]!==d||t[14]!==f?(m=/* @__PURE__ */ C(l,{"data-slot":d,className:f,...c,children:r}),t[10]=l,t[11]=r,t[12]=c,t[13]=d,t[14]=f,t[15]=m):m=t[15],m},H=m(null),U=e=>{let t=p(21),n,r,i,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5]):({asChild:n,children:r,className:i,"data-slot":s,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c);let[l,d]=b(null),f;t[6]===l?f=t[7]:(f={mountedLabelId:l,setMountedLabelId:d},t[6]=l,t[7]=f);let m=f,h=n?u:`div`,g;t[8]===s?g=t[9]:(g=o(s,`sidebar-group`),t[8]=s,t[9]=g);let _;t[10]===i?_=t[11]:(_=a(`pt-0.5`,i),t[10]=i,t[11]=_);let v;t[12]!==h||t[13]!==r||t[14]!==c||t[15]!==g||t[16]!==_?(v=/* @__PURE__ */ C(h,{"data-slot":g,className:_,...c,children:r}),t[12]=h,t[13]=r,t[14]=c,t[15]=g,t[16]=_,t[17]=v):v=t[17];let y;return t[18]!==m||t[19]!==v?(y=/* @__PURE__ */ C(H.Provider,{value:m,children:v}),t[18]=m,t[19]=v,t[20]=y):y=t[20],y},W=e=>{let t=p(22),n,r,i,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5],l=t[6]):({asChild:n,children:r,className:i,"data-slot":s,id:c,...l}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l);let d=h(H),f=_(),m=c??(d==null?void 0:f),v=d?.setMountedLabelId,y,b;t[7]!==m||t[8]!==v?(y=()=>{if(v!=null&&m!=null)return v(m),()=>{v(null)}},b=[v,m],t[7]=m,t[8]=v,t[9]=y,t[10]=b):(y=t[9],b=t[10]),g(y,b);let x=n?u:`div`,S;t[11]===s?S=t[12]:(S=o(s,`sidebar-group-label`),t[11]=s,t[12]=S);let w;t[13]===i?w=t[14]:(w=a(`text-muted flex min-w-0 items-center gap-2 truncate px-2 py-1 text-xs font-medium`,`group-data-[state=collapsed]/sidebar-nav:opacity-0`,`group-data-[state=collapsed]/sidebar-nav:pointer-events-none`,`transition-opacity`,D,i),t[13]=i,t[14]=w);let T;return t[15]!==x||t[16]!==r||t[17]!==m||t[18]!==l||t[19]!==S||t[20]!==w?(T=/* @__PURE__ */ C(x,{id:m,"data-slot":S,className:w,...l,children:r}),t[15]=x,t[16]=r,t[17]=m,t[18]=l,t[19]=S,t[20]=w,t[21]=T):T=t[21],T},G=e=>{let t=p(18),n,r,i,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5],l=t[6]):({"aria-labelledby":n,asChild:r,children:i,className:s,"data-slot":c,...l}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l);let d=h(H),f=r?u:`ul`,m=n??d?.mountedLabelId??void 0,g;t[7]===c?g=t[8]:(g=o(c,`sidebar-list`),t[7]=c,t[8]=g);let _;t[9]===s?_=t[10]:(_=a(`mb-2 space-y-px`,s),t[9]=s,t[10]=_);let v;return t[11]!==f||t[12]!==i||t[13]!==l||t[14]!==m||t[15]!==g||t[16]!==_?(v=/* @__PURE__ */ C(f,{"aria-labelledby":m,"data-slot":g,className:_,...l,children:i}),t[11]=f,t[12]=i,t[13]=l,t[14]=m,t[15]=g,t[16]=_,t[17]=v):v=t[17],v},K=e=>{let t=p(16),n,r,i,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5]):({asChild:n,children:r,className:i,"data-slot":s,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c);let l=n?u:`li`,d;t[6]===s?d=t[7]:(d=o(s,`sidebar-item`),t[6]=s,t[7]=d);let f;t[8]===i?f=t[9]:(f=a(`list-none`,i),t[8]=i,t[9]=f);let m;return t[10]!==l||t[11]!==r||t[12]!==c||t[13]!==d||t[14]!==f?(m=/* @__PURE__ */ C(l,{"data-slot":d,className:f,...c,children:r}),t[10]=l,t[11]=r,t[12]=c,t[13]=d,t[14]=f,t[15]=m):m=t[15],m},q=[`ring-focus-accent flex w-full min-w-0 items-center gap-2 truncate rounded-md px-2 py-1 text-left font-normal focus:outline-hidden focus-visible:ring-4`,`text-body hover:text-strong hover:bg-neutral-500/10`,`data-state-open:bg-neutral-500/15 data-state-open:text-strong`,`aria-expanded:bg-neutral-500/15 aria-expanded:text-strong`,`group-data-[state=collapsed]/sidebar-nav:ml-1`,`group-data-[state=collapsed]/sidebar-nav:w-7`,`group-data-[state=collapsed]/sidebar-nav:p-1`,`group-data-[state=collapsed]/sidebar-nav:text-clip`,`transition-[width,padding,margin] ${D}`].join(` `),J={Root:P,Nav:F,Trigger:R,Header:z,Body:B,Footer:V,Group:U,GroupLabel:W,List:G,Item:K,ItemButton:e=>{let t=p(21),n,r,i,s,c,l,d;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5],l=t[6],d=t[7]):({asChild:n,children:r,className:i,current:s,"data-slot":c,type:d,...l}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l,t[7]=d);let f=n?u:`button`,m;t[8]===c?m=t[9]:(m=o(c,`sidebar-item-button`),t[8]=c,t[9]=m);let h=s?``:void 0,g=s?`page`:void 0,_=n?d:d??`button`,v;t[10]===i?v=t[11]:(v=a(q,`data-current:bg-neutral-500/15 data-current:text-strong`,`aria-[current=page]:bg-neutral-500/15 aria-[current=page]:text-strong`,`[&>svg]:text-muted hover:[&>svg]:text-strong data-current:[&>svg]:text-strong aria-[current=page]:[&>svg]:text-strong [&>svg:first-child]:size-5 [&>svg]:shrink-0`,i),t[10]=i,t[11]=v);let y;return t[12]!==f||t[13]!==r||t[14]!==l||t[15]!==m||t[16]!==h||t[17]!==g||t[18]!==_||t[19]!==v?(y=/* @__PURE__ */ C(f,{"data-slot":m,"data-current":h,"aria-current":g,type:_,className:v,...l,children:r}),t[12]=f,t[13]=r,t[14]=l,t[15]=m,t[16]=h,t[17]=g,t[18]=_,t[19]=v,t[20]=y):y=t[20],y},SearchTrigger:e=>{let t=p(23),n,r,i,s,c,l,d;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5],l=t[6],d=t[7]):({asChild:n,children:r,className:i,"data-slot":s,shortcut:l,type:d,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l,t[7]=d);let f=n?u:`button`,m;t[8]!==n||t[9]!==r||t[10]!==l?(m=n?r:/* @__PURE__ */ w(S,{children:[/* @__PURE__ */ C(`span`,{"data-slot":`sidebar-search-trigger-label`,className:`contents`,children:r}),/* @__PURE__ */ C(`span`,{"aria-hidden":!0,"data-slot":`sidebar-search-trigger-shortcut`,translate:`no`,className:a(`pointer-events-none -mr-1 ml-auto inline-flex shrink-0 items-center gap-0.5 opacity-0 select-none`,`group-hover:opacity-100 group-focus-visible:opacity-100`,`group-data-[state=collapsed]/sidebar-nav:hidden`,`[&_kbd]:text-body [&_kbd]:h-5 [&_kbd]:min-w-5 [&_kbd]:bg-neutral-500/20 [&_kbd]:px-1 [&_kbd]:text-xs [&_kbd]:font-normal`,`empty:hidden`),children:l})]}),t[8]=n,t[9]=r,t[10]=l,t[11]=m):m=t[11];let h=m,g;t[12]===s?g=t[13]:(g=o(s,`sidebar-search-trigger`),t[12]=s,t[13]=g);let _=n?d:d??`button`,v;t[14]===i?v=t[15]:(v=a(`group`,q,`[&>svg:first-child]:text-muted hover:[&>svg:first-child]:text-strong`,`[&>svg:first-child]:size-5`,`[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:text-muted`,`hover:[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:text-strong`,`[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:size-5`,`[&_svg]:shrink-0`,i),t[14]=i,t[15]=v);let y;return t[16]!==f||t[17]!==h||t[18]!==c||t[19]!==g||t[20]!==_||t[21]!==v?(y=/* @__PURE__ */ C(f,{"data-slot":g,type:_,className:v,...c,children:h}),t[16]=f,t[17]=h,t[18]=c,t[19]=g,t[20]=_,t[21]=v,t[22]=y):y=t[22],y},SwitcherTrigger:e=>{let t=p(18),n,r,i,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5],l=t[6]):({asChild:n,children:r,className:i,"data-slot":s,type:l,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l);let d=n?u:`button`,f;t[7]===s?f=t[8]:(f=o(s,`sidebar-switcher-trigger`),t[7]=s,t[8]=f);let m=n?l:l??`button`,h;t[9]===i?h=t[10]:(h=a(`text-body hover:text-strong hover:bg-neutral-500/10 flex w-full min-w-0 items-center gap-2 rounded-[0.625rem] py-1 pr-1.5 pl-1 text-left font-medium`,`data-state-open:bg-neutral-500/15 data-state-open:text-strong`,`aria-expanded:bg-neutral-500/15 aria-expanded:text-strong`,`ring-focus-accent focus:outline-hidden focus-visible:ring-4`,`*:first:size-7`,`group-data-[state=collapsed]/sidebar-nav:w-9`,`group-data-[state=collapsed]/sidebar-nav:p-1`,`group-data-[state=collapsed]/sidebar-nav:[&>:not(:first-child)]:sr-only`,`transition-[width,padding]`,D,i),t[9]=i,t[10]=h);let g;return t[11]!==d||t[12]!==r||t[13]!==c||t[14]!==f||t[15]!==m||t[16]!==h?(g=/* @__PURE__ */ C(d,{"data-slot":f,type:m,className:h,...c,children:r}),t[11]=d,t[12]=r,t[13]=c,t[14]=f,t[15]=m,t[16]=h,t[17]=g):g=t[17],g},Tooltip:e=>{let t=p(26),n,r,i,a,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],s=t[5],c=t[6]):({children:n,"data-slot":r,label:i,shortcut:s,side:c,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=s,t[6]=c);let l=c===void 0?`right`:c,{isMobile:u,open:f}=A(`Tooltip`),m=!u&&!f,[h,g]=b(!1),[_,v]=b(m);_!==m&&(v(m),g(!1));let y;t[7]===m?y=t[8]:(y=e=>{g(e&&m)},t[7]=m,t[8]=y);let x=y,S=m&&h,T;t[9]===n?T=t[10]:(T=/* @__PURE__ */ C(d.Trigger,{asChild:!0,children:n}),t[9]=n,t[10]=T);let E;t[11]===r?E=t[12]:(E=o(r,`sidebar-tooltip`),t[11]=r,t[12]=E);let D;t[13]!==i||t[14]!==s?(D=/* @__PURE__ */ C(L,{label:i,shortcut:s}),t[13]=i,t[14]=s,t[15]=D):D=t[15];let O;t[16]!==a||t[17]!==l||t[18]!==E||t[19]!==D?(O=/* @__PURE__ */ C(d.Content,{"data-slot":E,side:l,...a,children:D}),t[16]=a,t[17]=l,t[18]=E,t[19]=D,t[20]=O):O=t[20];let k;return t[21]!==x||t[22]!==S||t[23]!==T||t[24]!==O?(k=/* @__PURE__ */ w(d.Root,{disableHoverableContent:!0,onOpenChange:x,open:S,children:[T,O]}),t[21]=x,t[22]=S,t[23]=T,t[24]=O,t[25]=k):k=t[25],k},Separator:e=>{let t=p(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,"data-slot":r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let s;t[4]===r?s=t[5]:(s=o(r,`sidebar-separator`),t[4]=r,t[5]=s);let l;t[6]===n?l=t[7]:(l=a(`my-3`,`group-data-[state=collapsed]/sidebar-nav:w-9`,`transition-[width]`,D,n),t[6]=n,t[7]=l);let u;return t[8]!==i||t[9]!==s||t[10]!==l?(u=/* @__PURE__ */ C(c,{"data-slot":s,className:l,...i}),t[8]=i,t[9]=s,t[10]=l,t[11]=u):u=t[11],u}},Y=`mantle-sidebar-state`,X={collapsed:`collapsed`,expanded:`expanded`};function Z(e){let t=f(e,Y);if(t===X.expanded)return!0;if(t===X.collapsed)return!1}function Q(e,t={}){let{domain:n,maxAge:r=31536e3,path:i=`/`,sameSite:a=`Lax`,secure:o=!1}=t,s=e?X.expanded:X.collapsed,c=[`${Y}=${s}`,`Max-Age=${r}`,`Path=${i}`];return n!=null&&c.push(`Domain=${n}`),c.push(`SameSite=${a}`),o&&c.push(`Secure`),c.join(`; `)}export{Y as SIDEBAR_STATE_COOKIE_NAME,J as Sidebar,Z as extractSidebarStateCookie,Q as serializeSidebarStateCookie,k as useSidebar};
@@ -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"./slot-B7rwscwd.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({"data-slot":c,asChild:d,className:s,ref:u,...l}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=d!==void 0&&d?n:`div`,p;o[6]===c?p=o[7]:(p=t(c,`skeleton`),o[6]=c,o[7]=p);let m;o[8]===s?m=o[9]:(m=e(`h-4 animate-pulse rounded-md bg-gray-300/25 dark:bg-gray-950/10`,s),o[8]=s,o[9]=m);let h;return o[10]!==f||o[11]!==l||o[12]!==u||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,"aria-hidden":!0,className:m,ref:u,...l}),o[10]=f,o[11]=l,o[12]=u,o[13]=p,o[14]=m,o[15]=h):h=o[15],h};export{a as t};
@@ -1,5 +1,10 @@
1
+ /**
2
+ * Re-exports for the Skeleton component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/feedback/skeleton
5
+ */
1
6
  import { t as SelfClosingWithAsChild } from "./as-child-DFxX3U2i.js";
2
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
7
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
3
8
  import { ComponentProps } from "react";
4
9
  type Props = Omit<ComponentProps<"div">, "children"> & SelfClosingWithAsChild & WithDataSlot;
5
10
  /**
@@ -14,14 +19,14 @@ type Props = Omit<ComponentProps<"div">, "children"> & SelfClosingWithAsChild &
14
19
  * - On initial page load, before data has resolved.
15
20
  *
16
21
  * **When not to use**
17
- * - For very short fetches (< 200 ms) — a flash of skeleton is more
22
+ * - For very short fetches (< 200 ms). A flash of skeleton is more
18
23
  * distracting than helpful.
19
24
  * - To convey error or empty states. Use {@link https://mantle.ngrok.com/components/feedback/empty Empty} instead.
20
25
  * - As a permanent decorative shape.
21
26
  *
22
27
  * **Sizing.** Default height is `1rem`. Override `className` with `h-*`,
23
- * `w-*`, and `rounded-*` utilities to match the real content's dimensions
24
- * — the more closely the skeleton matches, the less layout shift on swap.
28
+ * `w-*`, and `rounded-*` utilities to match the real content's dimensions.
29
+ * The more closely the skeleton matches, the less layout shift on swap.
25
30
  *
26
31
  * **Accessibility.** Skeletons are decorative and convey no semantic
27
32
  * meaning to assistive tech, so the element renders `aria-hidden="true"` by
@@ -29,6 +34,12 @@ type Props = Omit<ComponentProps<"div">, "children"> & SelfClosingWithAsChild &
29
34
  * is loading, also announce it to screen readers, for example wrap it in an
30
35
  * element with `role="status"` and a visually-hidden "Loading…" label.
31
36
  *
37
+ * @useWhen Hold the place of content while it loads, in the shape that the content will take.
38
+ *
39
+ * @siblings
40
+ * - `Empty`: the region loaded and has no data, no results, or no access to show.
41
+ * - `ProgressBar`: a task shows how much of it is complete.
42
+ *
32
43
  * @see https://mantle.ngrok.com/components/feedback/skeleton
33
44
  *
34
45
  * @example
package/dist/skeleton.js CHANGED
@@ -1 +1 @@
1
- export{t as Skeleton}from"./skeleton-DBpI-ko5.js";
1
+ export{t as Skeleton}from"./skeleton-DHfyjuQi.js";
@@ -1,4 +1,9 @@
1
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
1
+ /**
2
+ * Re-exports for the Skip to Main Link component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/primitives/skip-to-main-link
5
+ */
6
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
2
7
  import { ComponentProps } from "react";
3
8
  type SkipToMainLinkProps = Omit<ComponentProps<"a">, "href"> & WithDataSlot & {
4
9
  /**
@@ -24,6 +29,12 @@ type SkipToMainLinkProps = Omit<ComponentProps<"a">, "href"> & WithDataSlot & {
24
29
  * Pair with the `<Main>` component (or any element with a matching `id`
25
30
  * and `tabIndex={-1}`) so it can receive focus.
26
31
  *
32
+ * @useWhen Let keyboard users jump past repeated navigation to the main content of the page.
33
+ *
34
+ * @siblings
35
+ * - `Main`: the page needs the focusable `<main>` landmark that the link targets.
36
+ * - `VisuallyHidden`: the hidden content is text for screen readers, not a link.
37
+ *
27
38
  * @see https://mantle.ngrok.com/components/primitives/skip-to-main-link
28
39
  *
29
40
  * @example
@@ -1 +1 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./anchor-CgcbWEUs.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(21),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]):({children:d,className:s,"data-slot":c,onClick:l,targetId:f,...u}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=d===void 0?`Skip to main content`:d,m=f===void 0?`main`:f,h;o[7]===c?h=o[8]:(h=t(c,`skip-to-main-link`),o[7]=c,o[8]=h);let g=`#${m}`,_;o[9]!==l||o[10]!==m?(_=e=>{e.preventDefault(),window.history.replaceState(null,``,`#${m}`),document.getElementById(m)?.focus(),l?.(e)},o[9]=l,o[10]=m,o[11]=_):_=o[11];let v;o[12]===s?v=o[13]:(v=e(`not-focus:sr-only bg-card fixed top-2 left-2 z-max px-4 py-2 shadow-lg`,s),o[12]=s,o[13]=v);let y;return o[14]!==p||o[15]!==u||o[16]!==h||o[17]!==g||o[18]!==_||o[19]!==v?(y=/* @__PURE__ */ i(n,{...u,"data-slot":h,href:g,onClick:_,className:v,children:p}),o[14]=p,o[15]=u,o[16]=h,o[17]=g,o[18]=_,o[19]=v,o[20]=y):y=o[20],y};export{a as SkipToMainLink};
1
+ "use client";import{t as e}from"./anchor-Dc6IgvXV.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(21),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]):({children:d,className:s,"data-slot":c,onClick:l,targetId:f,...u}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=d===void 0?`Skip to main content`:d,m=f===void 0?`main`:f,h;o[7]===c?h=o[8]:(h=n(c,`skip-to-main-link`),o[7]=c,o[8]=h);let g=`#${m}`,_;o[9]!==l||o[10]!==m?(_=e=>{e.preventDefault(),window.history.replaceState(null,``,`#${m}`),document.getElementById(m)?.focus(),l?.(e)},o[9]=l,o[10]=m,o[11]=_):_=o[11];let v;o[12]===s?v=o[13]:(v=t(`not-focus:sr-only bg-card fixed top-2 left-2 z-max px-4 py-2 shadow-lg`,s),o[12]=s,o[13]=v);let y;return o[14]!==p||o[15]!==u||o[16]!==h||o[17]!==g||o[18]!==_||o[19]!==v?(y=/* @__PURE__ */ i(e,{...u,"data-slot":h,href:g,onClick:_,className:v,children:p}),o[14]=p,o[15]=u,o[16]=h,o[17]=g,o[18]=_,o[19]=v,o[20]=y):y=o[20],y};export{a as SkipToMainLink};
package/dist/slider.d.ts CHANGED
@@ -1,4 +1,9 @@
1
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
1
+ /**
2
+ * Re-exports for the Slider component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/forms/slider
5
+ */
6
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
2
7
  import { ComponentProps } from "react";
3
8
  import { Root } from "@radix-ui/react-slider";
4
9
  type SliderBaseProps = Omit<ComponentProps<typeof Root>, "defaultValue" | "value">;
@@ -59,6 +64,11 @@ type SliderProps = SliderBaseProps & SliderValueProps & {
59
64
  * thumb ("Minimum Price", "Maximum Price"). `aria-labelledby` names every
60
65
  * thumb with the same text, so prefer `aria-label` for a range slider.
61
66
  *
67
+ * @useWhen Pick a number, or a range between two numbers, with a thumb that moves along a track.
68
+ *
69
+ * @siblings
70
+ * - `Input`: the user types an exact number.
71
+ *
62
72
  * @see https://mantle.ngrok.com/components/forms/slider
63
73
  *
64
74
  * @example
package/dist/slider.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./field-Bihblt8U.js";import{c as r}from"react/compiler-runtime";import{useContext as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{Range as s,Root as c,Thumb as l,Track as u}from"@radix-ui/react-slider";function d(d){let g=r(55),_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P;g[0]===d?(_=g[1],v=g[2],y=g[3],b=g[4],x=g[5],S=g[6],C=g[7],w=g[8],T=g[9],E=g[10],D=g[11],O=g[12],k=g[13],A=g[14],j=g[15],M=g[16],N=g[17],P=g[18]):({"data-slot":C,"aria-describedby":_,"aria-errormessage":v,"aria-invalid":y,"aria-label":b,"aria-labelledby":x,className:S,color:O,defaultValue:w,id:T,max:k,min:A,minStepsBetweenThumbs:j,name:E,step:M,showTicks:N,value:P,...D}=d,g[0]=d,g[1]=_,g[2]=v,g[3]=y,g[4]=b,g[5]=x,g[6]=S,g[7]=C,g[8]=w,g[9]=T,g[10]=E,g[11]=D,g[12]=O,g[13]=k,g[14]=A,g[15]=j,g[16]=M,g[17]=N,g[18]=P);let F=O===void 0?`bg-accent-600`:O,I=k===void 0?100:k,L=A===void 0?0:A,R=j===void 0?1:j,z=M===void 0?1:M,B=N!==void 0&&N,V=i(n),H;if(g[19]!==_||g[20]!==v||g[21]!==y||g[22]!==b||g[23]!==x||g[24]!==S||g[25]!==F||g[26]!==C||g[27]!==w||g[28]!==V||g[29]!==T||g[30]!==I||g[31]!==L||g[32]!==R||g[33]!==E||g[34]!==D||g[35]!==B||g[36]!==z||g[37]!==P){let n=p(P),r=p(w),i=n??r??[L],d=m({showTicks:B,min:L,max:I,step:z}),O;g[39]===C?O=g[40]:(O=t(C,`slider`),g[39]=C,g[40]=O);let k;g[41]!==_||g[42]!==v||g[43]!==y||g[44]!==V||g[45]!==T?(k=V?{}:{"aria-describedby":_,"aria-errormessage":v,"aria-invalid":y,id:T},g[41]=_,g[42]=v,g[43]=y,g[44]=V,g[45]=T,g[46]=k):k=g[46];let A=d>0&&`mb-3`,j;g[47]!==S||g[48]!==A?(j=e(`[--slider-thumb-size:--spacing(4.5)]`,`data-orientation-vertical:min-h-40 relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-orientation-vertical:h-full data-orientation-vertical:w-auto data-orientation-vertical:flex-col`,A,S),g[47]=S,g[48]=A,g[49]=j):j=g[49];let M;g[50]===Symbol.for(`react.memo_cache_sentinel`)?(M=e(`bg-neutral-300 rounded-full relative grow overflow-hidden`,`data-orientation-horizontal:h-1.5 data-orientation-horizontal:w-full`,`data-orientation-vertical:w-1.5 data-orientation-vertical:h-full`),g[50]=M):M=g[50];let N;g[51]===F?N=g[52]:(N=e(`absolute select-none data-orientation-horizontal:h-full data-orientation-vertical:w-full`,F),g[51]=F,g[52]=N);let U;g[53]===N?U=g[54]:(U=/* @__PURE__ */ a(u,{"data-slot":`slider-track`,className:M,children:/* @__PURE__ */ a(s,{"data-slot":`slider-range`,className:N})}),g[53]=N,g[54]=U),H=/* @__PURE__ */ o(c,{"data-slot":O,defaultValue:r,value:n,...k,min:L,minStepsBetweenThumbs:R,max:I,name:E,step:z,className:j,...D,children:[U,Array.from({length:i.length},(t,n)=>/* @__PURE__ */ a(l,{"data-slot":`slider-thumb`,"aria-describedby":V?.[`aria-describedby`]??_,"aria-errormessage":V?.[`aria-errormessage`]??v,"aria-invalid":V?.[`aria-invalid`]??y,"aria-label":h({ariaLabel:b,index:n,thumbCount:i.length}),"aria-labelledby":x,id:n===0?V?.id:void 0,className:e(`bg-static-white border-card relative size-(--slider-thumb-size) rounded-full border`,`shadow-md transition-[color,box-shadow]`,`after:absolute after:-inset-2`,`focus-visible:ring-3 focus-visible:ring-accent-500/20 focus-visible:outline-hidden`,`block shrink-0 cursor-pointer select-none`,`data-disabled:pointer-events-none data-disabled:cursor-default`)},n)),d>0&&/* @__PURE__ */ a(`div`,{"data-slot":`slider-ticks`,className:`absolute top-full mt-1.5 flex w-full justify-between px-[calc(var(--slider-thumb-size)/2)]`,"aria-hidden":`true`,children:Array.from({length:d},f)})]}),g[19]=_,g[20]=v,g[21]=y,g[22]=b,g[23]=x,g[24]=S,g[25]=F,g[26]=C,g[27]=w,g[28]=V,g[29]=T,g[30]=I,g[31]=L,g[32]=R,g[33]=E,g[34]=D,g[35]=B,g[36]=z,g[37]=P,g[38]=H}else H=g[38];return H}function f(e,t){return/* @__PURE__ */ a(`span`,{"data-slot":`slider-tick`,className:`bg-card-border h-1.5 w-px`},t)}function p(e){if(e!=null)return Array.isArray(e)?e:[e]}function m({showTicks:e,min:t,max:n,step:r}){let i=n-t;return!e||!Number.isFinite(i)||!Number.isFinite(r)||r<=0||i<=0?0:Math.floor(i/r)+1}function h({ariaLabel:e,index:t,thumbCount:n}){if(e)return n===1?e:n===2?`${t===0?`Minimum`:`Maximum`} ${e}`:`${e} ${t+1} of ${n}`}export{d as Slider};
1
+ "use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./field-Cai_4c1l.js";import{c as r}from"react/compiler-runtime";import{useContext as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{Range as s,Root as c,Thumb as l,Track as u}from"@radix-ui/react-slider";function d(d){let g=r(55),_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P;g[0]===d?(_=g[1],v=g[2],y=g[3],b=g[4],x=g[5],S=g[6],C=g[7],w=g[8],T=g[9],E=g[10],D=g[11],O=g[12],k=g[13],A=g[14],j=g[15],M=g[16],N=g[17],P=g[18]):({"data-slot":C,"aria-describedby":_,"aria-errormessage":v,"aria-invalid":y,"aria-label":b,"aria-labelledby":x,className:S,color:O,defaultValue:w,id:T,max:k,min:A,minStepsBetweenThumbs:j,name:E,step:M,showTicks:N,value:P,...D}=d,g[0]=d,g[1]=_,g[2]=v,g[3]=y,g[4]=b,g[5]=x,g[6]=S,g[7]=C,g[8]=w,g[9]=T,g[10]=E,g[11]=D,g[12]=O,g[13]=k,g[14]=A,g[15]=j,g[16]=M,g[17]=N,g[18]=P);let F=O===void 0?`bg-accent-600`:O,I=k===void 0?100:k,L=A===void 0?0:A,R=j===void 0?1:j,z=M===void 0?1:M,B=N!==void 0&&N,V=i(n),H;if(g[19]!==_||g[20]!==v||g[21]!==y||g[22]!==b||g[23]!==x||g[24]!==S||g[25]!==F||g[26]!==C||g[27]!==w||g[28]!==V||g[29]!==T||g[30]!==I||g[31]!==L||g[32]!==R||g[33]!==E||g[34]!==D||g[35]!==B||g[36]!==z||g[37]!==P){let n=p(P),r=p(w),i=n??r??[L],d=m({showTicks:B,min:L,max:I,step:z}),O;g[39]===C?O=g[40]:(O=t(C,`slider`),g[39]=C,g[40]=O);let k;g[41]!==_||g[42]!==v||g[43]!==y||g[44]!==V||g[45]!==T?(k=V?{}:{"aria-describedby":_,"aria-errormessage":v,"aria-invalid":y,id:T},g[41]=_,g[42]=v,g[43]=y,g[44]=V,g[45]=T,g[46]=k):k=g[46];let A=d>0&&`mb-3`,j;g[47]!==S||g[48]!==A?(j=e(`[--slider-thumb-size:--spacing(4.5)]`,`data-orientation-vertical:min-h-40 relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-orientation-vertical:h-full data-orientation-vertical:w-auto data-orientation-vertical:flex-col`,A,S),g[47]=S,g[48]=A,g[49]=j):j=g[49];let M;g[50]===Symbol.for(`react.memo_cache_sentinel`)?(M=e(`bg-neutral-300 rounded-full relative grow overflow-hidden`,`data-orientation-horizontal:h-1.5 data-orientation-horizontal:w-full`,`data-orientation-vertical:w-1.5 data-orientation-vertical:h-full`),g[50]=M):M=g[50];let N;g[51]===F?N=g[52]:(N=e(`absolute select-none data-orientation-horizontal:h-full data-orientation-vertical:w-full`,F),g[51]=F,g[52]=N);let U;g[53]===N?U=g[54]:(U=/* @__PURE__ */ a(u,{"data-slot":`slider-track`,className:M,children:/* @__PURE__ */ a(s,{"data-slot":`slider-range`,className:N})}),g[53]=N,g[54]=U),H=/* @__PURE__ */ o(c,{"data-slot":O,defaultValue:r,value:n,...k,min:L,minStepsBetweenThumbs:R,max:I,name:E,step:z,className:j,...D,children:[U,Array.from({length:i.length},(t,n)=>/* @__PURE__ */ a(l,{"data-slot":`slider-thumb`,"aria-describedby":V?.[`aria-describedby`]??_,"aria-errormessage":V?.[`aria-errormessage`]??v,"aria-invalid":V?.[`aria-invalid`]??y,"aria-label":h({ariaLabel:b,index:n,thumbCount:i.length}),"aria-labelledby":x,id:n===0?V?.id:void 0,className:e(`bg-static-white border-card relative size-(--slider-thumb-size) rounded-full border`,`shadow-md transition-[color,box-shadow]`,`after:absolute after:-inset-2`,`focus-visible:ring-3 focus-visible:ring-accent-500/20 focus-visible:outline-hidden`,`block shrink-0 cursor-pointer select-none`,`data-disabled:pointer-events-none data-disabled:cursor-default`)},n)),d>0&&/* @__PURE__ */ a(`div`,{"data-slot":`slider-ticks`,className:`absolute top-full mt-1.5 flex w-full justify-between px-[calc(var(--slider-thumb-size)/2)]`,"aria-hidden":`true`,children:Array.from({length:d},f)})]}),g[19]=_,g[20]=v,g[21]=y,g[22]=b,g[23]=x,g[24]=S,g[25]=F,g[26]=C,g[27]=w,g[28]=V,g[29]=T,g[30]=I,g[31]=L,g[32]=R,g[33]=E,g[34]=D,g[35]=B,g[36]=z,g[37]=P,g[38]=H}else H=g[38];return H}function f(e,t){return/* @__PURE__ */ a(`span`,{"data-slot":`slider-tick`,className:`bg-card-border h-1.5 w-px`},t)}function p(e){if(e!=null)return Array.isArray(e)?e:[e]}function m({showTicks:e,min:t,max:n,step:r}){let i=n-t;return!e||!Number.isFinite(i)||!Number.isFinite(r)||r<=0||i<=0?0:Math.floor(i/r)+1}function h({ariaLabel:e,index:t,thumbCount:n}){if(e)return n===1?e:n===2?`${t===0?`Minimum`:`Maximum`} ${e}`:`${e} ${t+1} of ${n}`}export{d as Slider};
@@ -0,0 +1 @@
1
+ "use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{c as n}from"react/compiler-runtime";import{Children as r,createElement as i,isValidElement as a}from"react";import{jsx as o}from"react/jsx-runtime";import{createSlot as s}from"@radix-ui/react-slot";const c=s(`Slot`);function l(t,n){return typeof n==`function`?(...r)=>e(t,n(...r)):e(t,n)}function u(e,t){return typeof t==`function`?(...n)=>({...e,...t(...n)}):e==null?t:t==null?e:{...e,...t}}const d=e=>{let s=n(36),d,f,p,m,h,g;if(s[0]===e?(d=s[1],f=s[2],p=s[3],m=s[4],h=s[5],g=s[6]):({children:d,className:f,"data-slot":p,ref:h,style:g,...m}=e,s[0]=e,s[1]=d,s[2]=f,s[3]=p,s[4]=m,s[5]=h,s[6]=g),!a(d)){let e;return s[7]===d?e=s[8]:(e=r.only(d),s[7]=d,s[8]=e),e}let _,v,y,b,x,S;if(s[9]!==d.key||s[10]!==d.props||s[11]!==d.type||s[12]!==f||s[13]!==p||s[14]!==m||s[15]!==h||s[16]!==g){let{className:e,style:n,"data-slot":r,...a}=d.props,o=t(p,r);_=c,v=h,y=m,s[23]!==e||s[24]!==f?(b=l(f,e),s[23]=e,s[24]=f,s[25]=b):b=s[25],s[26]!==n||s[27]!==g?(x=u(g,n),s[26]=n,s[27]=g,s[28]=x):x=s[28],S=i(d.type,{...a,...o!=null&&{"data-slot":o},key:d.key??void 0}),s[9]=d.key,s[10]=d.props,s[11]=d.type,s[12]=f,s[13]=p,s[14]=m,s[15]=h,s[16]=g,s[17]=_,s[18]=v,s[19]=y,s[20]=b,s[21]=x,s[22]=S}else _=s[17],v=s[18],y=s[19],b=s[20],x=s[21],S=s[22];let C;return s[29]!==_||s[30]!==v||s[31]!==y||s[32]!==b||s[33]!==x||s[34]!==S?(C=/* @__PURE__ */ o(_,{ref:v,...y,className:b,style:x,children:S}),s[29]=_,s[30]=v,s[31]=y,s[32]=b,s[33]=x,s[34]=S,s[35]=C):C=s[35],C};export{d as t};
@@ -1,9 +1,9 @@
1
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
2
1
  import { t as WithStyleProps } from "./with-style-props-CuT30s0W.js";
2
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
3
3
  import { CSSProperties, ComponentProps, HTMLAttributes } from "react";
4
4
  /**
5
5
  * A `className` or `style` the child resolves itself, from state only the child
6
- * knows — react-router's `NavLink` calls it with
6
+ * knows: react-router's `NavLink` calls it with
7
7
  * `{ isActive, isPending, isTransitioning }`, another component with something else
8
8
  * entirely. `Slot` never invents arguments for one and never inspects them; it
9
9
  * forwards the ones the child supplied, so they are typed `unknown`.
@@ -35,8 +35,8 @@ type Props = Omit<ComponentProps<typeof SlotPrimitive>, "className" | "style"> &
35
35
  * chain first, then the child's own) so `asChild` composition accumulates the
36
36
  * whole slot chain instead of one side clobbering the other.
37
37
  *
38
- * A child that resolves its own `className` or `style` from state only it knows —
39
- * react-router's `NavLink`, whose `className` may be `({ isActive }) => …` — keeps
38
+ * A child that resolves its own `className` or `style` from state only it knows
39
+ * (react-router's `NavLink`, whose `className` may be `({ isActive }) => …`) keeps
40
40
  * that behavior: the merge composes a function of the same shape, which forwards
41
41
  * the child's arguments to the child's function and merges the resolved value with
42
42
  * the slot's classes or style. `Slot` never calls it, so it needs to know nothing
@@ -52,6 +52,8 @@ type Props = Omit<ComponentProps<typeof SlotPrimitive>, "className" | "style"> &
52
52
  *
53
53
  * A function `children` is forwarded to the child as-is.
54
54
  *
55
+ * @useWhen Merge the props of a part onto its one child element, to build an `asChild` prop.
56
+ *
55
57
  * @see https://mantle.ngrok.com/components/primitives/slot
56
58
  *
57
59
  * @example
package/dist/slot.d.ts CHANGED
@@ -1,2 +1,7 @@
1
- import { t as Slot } from "./slot-C0OCJjdJ.js";
1
+ /**
2
+ * Re-exports for the Slot component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/primitives/slot
5
+ */
6
+ import { t as Slot } from "./slot-BEMQMbk3.js";
2
7
  export { Slot };
package/dist/slot.js CHANGED
@@ -1 +1 @@
1
- export{t as Slot}from"./slot-DdYN1L1C.js";
1
+ export{t as Slot}from"./slot-B7rwscwd.js";
@@ -5,8 +5,12 @@
5
5
  * dist files for utility class names. This is the supported way to register
6
6
  * mantle's Tailwind sources.
7
7
  *
8
+ * The glob scans only the JavaScript. The `.d.ts`, `agent.json`, `llms.txt`, and
9
+ * migration files hold JSDoc examples, so a scan of them emits CSS that no
10
+ * component renders.
11
+ *
8
12
  * Usage:
9
13
  * @import "@ngrok/mantle/mantle.css";
10
14
  * @import "@ngrok/mantle/source-all.css";
11
15
  */
12
- @source "../dist";
16
+ @source "../dist/*.js";