@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
@@ -0,0 +1 @@
1
+ "use client";import{t as e}from"./use-composed-refs-DPYmLDSe.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{i as r,s as i}from"./layer-container-DL4yclOu.js";import{t as a}from"./field-Cai_4c1l.js";import{a as o,r as s}from"./field-Bpvn4tQp.js";import{t as c}from"./icon-xb7d9M7X.js";import{n as l}from"./separator-DnvhwY2J.js";import{c as u}from"react/compiler-runtime";import{CaretDownIcon as d}from"@phosphor-icons/react/CaretDown";import{createContext as f,useContext as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{Slottable as g}from"@radix-ui/react-slot";import{CheckIcon as _}from"@phosphor-icons/react/Check";import{CaretUpIcon as v}from"@phosphor-icons/react/CaretUp";import{Content as y,Group as b,Icon as x,Item as S,ItemIndicator as C,ItemText as w,Label as T,Portal as E,Root as D,ScrollDownButton as O,ScrollUpButton as k,Trigger as A,Value as j,Viewport as M}from"@radix-ui/react-select";const N=f({}),P=e=>{let t=u(26),n,r,i,a,o,s,c,l,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],d=t[9]):({"aria-invalid":n,children:r,id:i,validation:d,onBlur:a,onValueChange:s,onChange:o,ref:l,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=d);let f;t[10]!==n||t[11]!==i||t[12]!==a||t[13]!==l||t[14]!==d?(f={"aria-invalid":n,id:i,validation:d,onBlur:a,ref:l},t[10]=n,t[11]=i,t[12]=a,t[13]=l,t[14]=d,t[15]=f):f=t[15];let p=f,h;t[16]!==o||t[17]!==s?(h=e=>{o?.(e),s?.(e)},t[16]=o,t[17]=s,t[18]=h):h=t[18];let g;t[19]!==r||t[20]!==p?(g=/* @__PURE__ */ m(N.Provider,{value:p,children:r}),t[19]=r,t[20]=p,t[21]=g):g=t[21];let _;return t[22]!==c||t[23]!==h||t[24]!==g?(_=/* @__PURE__ */ m(D,{...c,onValueChange:h,children:g}),t[22]=c,t[23]=h,t[24]=g,t[25]=_):_=t[25],_},F=e=>{let r=u(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({className:i,"data-slot":a,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=n(a,`select-group`),r[5]=a,r[6]=c);let l;r[7]===i?l=r[8]:(l=t(`space-y-px`,i),r[7]=i,r[8]=l);let d;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l?(d=/* @__PURE__ */ m(b,{ref:s,"data-slot":c,className:l,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=d):d=r[13],d},I=e=>{let t=u(21),r,i,a,o,s,c;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6]):({asChild:r,children:i,"data-slot":a,placeholder:o,ref:c,...s}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c);let l;t[7]===a?l=t[8]:(l=n(a,`select-value`),t[7]=a,t[8]=l);let d;t[9]===o?d=t[10]:(d=o!=null&&/* @__PURE__ */ m(`span`,{"data-slot":`select-placeholder`,className:`contents`,children:o}),t[9]=o,t[10]=d);let f;t[11]!==r||t[12]!==i?(f=r||i==null?i:/* @__PURE__ */ m(`span`,{"data-slot":`select-value-label`,className:`contents`,children:i}),t[11]=r,t[12]=i,t[13]=f):f=t[13];let p;return t[14]!==r||t[15]!==s||t[16]!==c||t[17]!==l||t[18]!==d||t[19]!==f?(p=/* @__PURE__ */ m(j,{ref:c,asChild:r,"data-slot":l,placeholder:d,...s,children:f}),t[14]=r,t[15]=s,t[16]=c,t[17]=l,t[18]=d,t[19]=f,t[20]=p):p=t[20],p},L=r=>{let i=u(36),l,f,_,v,y,b,S,C,w;i[0]===r?(l=i[1],f=i[2],_=i[3],v=i[4],y=i[5],b=i[6],S=i[7],C=i[8],w=i[9]):({"aria-invalid":l,className:_,children:f,"data-slot":v,id:b,onBlur:y,ref:w,validation:S,...C}=r,i[0]=r,i[1]=l,i[2]=f,i[3]=_,i[4]=v,i[5]=y,i[6]=b,i[7]=S,i[8]=C,i[9]=w);let T=p(N),E=p(a),D=e(w,T.ref),O=o(),k=E?E[`aria-invalid`]:T[`aria-invalid`]??l,j=T.validation??S??O,M;i[10]!==k||i[11]!==j?(M=s({"aria-invalid":k,validation:j}),i[10]=k,i[11]=j,i[12]=M):M=i[12];let{ariaInvalid:P,validation:F}=M,I=E?E.id:T.id??b,L;i[13]===v?L=i[14]:(L=n(v,`select-trigger`),i[13]=v,i[14]=L);let R;i[15]===_?R=i[16]:(R=t(`h-9 text-sm`,`border-form bg-form text-strong font-sans placeholder:text-placeholder hover:bg-form-hover hover:text-strong flex w-full items-center justify-between gap-1.5 rounded-md border px-3 py-2 disabled:pointer-events-none disabled:opacity-50`,`[&>[data-slot=select-trigger-label]>span]:line-clamp-1 [&>[data-slot=select-trigger-label]>span]:text-left`,`hover:border-neutral-400`,`focus:outline-hidden focus:ring-4 aria-expanded:ring-4`,`focus:border-accent-600 focus:ring-focus-accent aria-expanded:border-accent-600 aria-expanded:ring-focus-accent`,`data-validation-success:border-success-600 data-validation-success:focus:border-success-600 data-validation-success:focus:ring-focus-success data-validation-success:aria-expanded:border-success-600 data-validation-success:aria-expanded:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:focus:border-warning-600 data-validation-warning:focus:ring-focus-warning data-validation-warning:aria-expanded:border-warning-600 data-validation-warning:aria-expanded:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:focus:border-danger-600 data-validation-error:focus:ring-focus-danger data-validation-error:aria-expanded:border-danger-600 data-validation-error:aria-expanded:ring-focus-danger motion-safe:data-validation-error:animate-shake`,_),i[15]=_,i[16]=R);let z=F||void 0,B;i[17]!==T||i[18]!==y?(B=e=>{y?.(e),T.onBlur?.(e)},i[17]=T,i[18]=y,i[19]=B):B=i[19];let H;i[20]===E?H=i[21]:(H=E?{"aria-describedby":E[`aria-describedby`],"aria-errormessage":E[`aria-errormessage`]}:void 0,i[20]=E,i[21]=H);let U;i[22]===f?U=i[23]:(U=/* @__PURE__ */ m(g,{child:f,children:V}),i[22]=f,i[23]=U);let W;i[24]===Symbol.for(`react.memo_cache_sentinel`)?(W=/* @__PURE__ */ m(x,{asChild:!0,children:/* @__PURE__ */ m(c,{svg:/* @__PURE__ */ m(d,{weight:`bold`}),className:`size-4`})}),i[24]=W):W=i[24];let G;return i[25]!==P||i[26]!==I||i[27]!==C||i[28]!==L||i[29]!==R||i[30]!==z||i[31]!==B||i[32]!==H||i[33]!==U||i[34]!==D?(G=/* @__PURE__ */ h(A,{"data-slot":L,className:R,"data-validation":z,id:I,ref:D,...C,onBlur:B,...H,"aria-invalid":P,children:[U,W]}),i[25]=P,i[26]=I,i[27]=C,i[28]=L,i[29]=R,i[30]=z,i[31]=B,i[32]=H,i[33]=U,i[34]=D,i[35]=G):G=i[35],G},R=e=>{let n=u(11),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:r,ref:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=t(`flex cursor-default items-center justify-center py-1`,r),n[4]=r,n[5]=o);let s;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=/* @__PURE__ */ m(c,{svg:/* @__PURE__ */ m(v,{weight:`bold`}),className:`size-4`}),n[6]=s):s=n[6];let l;return n[7]!==i||n[8]!==a||n[9]!==o?(l=/* @__PURE__ */ m(k,{ref:a,className:o,...i,children:s}),n[7]=i,n[8]=a,n[9]=o,n[10]=l):l=n[10],l},z=e=>{let n=u(11),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:r,ref:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=t(`flex cursor-default items-center justify-center py-1`,r),n[4]=r,n[5]=o);let s;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=/* @__PURE__ */ m(c,{svg:/* @__PURE__ */ m(d,{weight:`bold`}),className:`size-4`}),n[6]=s):s=n[6];let l;return n[7]!==i||n[8]!==a||n[9]!==o?(l=/* @__PURE__ */ m(O,{ref:a,className:o,...i,children:s}),n[7]=i,n[8]=a,n[9]=o,n[10]=l):l=n[10],l},B={Root:P,Content:e=>{let a=u(33),o,s,c,l,d,f,p,g;a[0]===e?(o=a[1],s=a[2],c=a[3],l=a[4],d=a[5],f=a[6],p=a[7],g=a[8]):({className:s,children:o,"data-slot":c,onEscapeKeyDown:l,position:p,ref:f,width:g,...d}=e,a[0]=e,a[1]=o,a[2]=s,a[3]=c,a[4]=l,a[5]=d,a[6]=f,a[7]=p,a[8]=g);let _=p===void 0?`popper`:p,v=g===void 0?`trigger`:g,b=i(),x=r(l),S;a[9]===c?S=a[10]:(S=n(c,`select-content`),a[9]=c,a[10]=S);let C=_===`popper`&&`data-side-bottom:translate-y-2 data-side-left:-translate-x-2 data-side-right:translate-x-2 data-side-top:-translate-y-2 max-h-(--radix-select-content-available-height)`,w=v===`trigger`&&`w-(--radix-select-trigger-width)`,T;a[11]!==s||a[12]!==C||a[13]!==w?(T=t(`border-popover data-side-bottom:slide-in-from-top-1 data-side-left:slide-in-from-right-1 data-side-right:slide-in-from-left-1 data-side-top:slide-in-from-bottom-1 data-side-bottom:slide-out-to-top-1 data-side-left:slide-out-to-right-1 data-side-right:slide-out-to-left-1 data-side-top:slide-out-to-bottom-1 duration-200 ease-out-strong data-state-closed:duration-150 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 motion-reduce:animate-none! relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md`,`bg-popover font-sans`,C,w,s),a[11]=s,a[12]=C,a[13]=w,a[14]=T):T=a[14];let D;a[15]===Symbol.for(`react.memo_cache_sentinel`)?(D=/* @__PURE__ */ m(R,{}),a[15]=D):D=a[15];let O=_===`popper`&&`h-(--radix-select-trigger-height) w-full`,k;a[16]===O?k=a[17]:(k=t(`p-1 space-y-px`,O),a[16]=O,a[17]=k);let A;a[18]!==o||a[19]!==k?(A=/* @__PURE__ */ m(M,{className:k,children:o}),a[18]=o,a[19]=k,a[20]=A):A=a[20];let j;a[21]===Symbol.for(`react.memo_cache_sentinel`)?(j=/* @__PURE__ */ m(z,{}),a[21]=j):j=a[21];let N;a[22]!==x||a[23]!==_||a[24]!==d||a[25]!==f||a[26]!==A||a[27]!==S||a[28]!==T?(N=/* @__PURE__ */ h(y,{ref:f,"data-slot":S,className:T,onEscapeKeyDown:x,position:_,...d,children:[D,A,j]}),a[22]=x,a[23]=_,a[24]=d,a[25]=f,a[26]=A,a[27]=S,a[28]=T,a[29]=N):N=a[29];let P;return a[30]!==b||a[31]!==N?(P=/* @__PURE__ */ m(E,{container:b,children:N}),a[30]=b,a[31]=N,a[32]=P):P=a[32],P},Group:F,Item:e=>{let r=u(28),i,a,o,s,l,d,f;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4],l=r[5],d=r[6],f=r[7]):({className:a,children:i,"data-slot":o,icon:s,ref:d,translate:f,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r[6]=d,r[7]=f);let p;r[8]===o?p=r[9]:(p=n(o,`select-item`),r[8]=o,r[9]=p);let v;r[10]===a?v=r[11]:(v=t(`relative flex gap-2 w-full cursor-pointer select-none items-center rounded-md py-1.5 pl-2 pr-8 text-strong text-sm outline-hidden`,`focus:bg-active-menu-item`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`data-state-checked:bg-selected-menu-item`,`focus:data-state-checked:bg-active-selected-menu-item`,a),r[10]=a,r[11]=v);let y;r[12]===s?y=r[13]:(y=s&&/* @__PURE__ */ m(c,{svg:s}),r[12]=s,r[13]=y);let b;r[14]===f?b=r[15]:(b=e=>/* @__PURE__ */ m(w,{children:/* @__PURE__ */ m(`span`,{"data-slot":`select-item-label`,className:`contents`,translate:f,children:e})}),r[14]=f,r[15]=b);let x;r[16]!==i||r[17]!==b?(x=/* @__PURE__ */ m(g,{child:i,children:b}),r[16]=i,r[17]=b,r[18]=x):x=r[18];let T;r[19]===Symbol.for(`react.memo_cache_sentinel`)?(T=/* @__PURE__ */ m(C,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:/* @__PURE__ */ m(c,{svg:/* @__PURE__ */ m(_,{weight:`bold`}),className:`size-4 text-accent-600`})}),r[19]=T):T=r[19];let E;return r[20]!==l||r[21]!==d||r[22]!==p||r[23]!==v||r[24]!==y||r[25]!==x||r[26]!==f?(E=/* @__PURE__ */ h(S,{ref:d,"data-slot":p,translate:f,className:v,...l,children:[y,x,T]}),r[20]=l,r[21]=d,r[22]=p,r[23]=v,r[24]=y,r[25]=x,r[26]=f,r[27]=E):E=r[27],E},Label:e=>{let r=u(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({className:i,"data-slot":a,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=n(a,`select-label`),r[5]=a,r[6]=c);let l;r[7]===i?l=r[8]:(l=t(`px-2 py-1.5 text-sm font-medium`,i),r[7]=i,r[8]=l);let d;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l?(d=/* @__PURE__ */ m(T,{ref:s,"data-slot":c,className:l,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=d):d=r[13],d},Separator:e=>{let r=u(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({className:i,"data-slot":a,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=n(a,`select-separator`),r[5]=a,r[6]=c);let d;r[7]===i?d=r[8]:(d=t(`-mx-1 my-1 h-px w-auto`,i),r[7]=i,r[8]=d);let f;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==d?(f=/* @__PURE__ */ m(l,{ref:s,"data-slot":c,className:d,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=d,r[13]=f):f=r[13],f},Trigger:L,Value:I};function V(e){return/* @__PURE__ */ m(`span`,{"data-slot":`select-trigger-label`,className:`contents`,children:e})}export{B as t};
@@ -1,8 +1,8 @@
1
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
2
- import { o as WithValidation } from "./field-V_gnkcmN.js";
3
- import { n as Separator } from "./separator-D9AWEkcJ.js";
1
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
2
+ import { o as WithValidation } from "./field-BshcNVe_.js";
3
+ import { n as Separator } from "./separator-Ck4sPrdN.js";
4
4
  import { ComponentProps, FocusEvent, PropsWithChildren, ReactNode, Ref, SelectHTMLAttributes } from "react";
5
- import { Content, Group, Item, Label, Trigger, Value } from "@radix-ui/react-select";
5
+ import { Content as Content$1, Group as Group$1, Item as Item$1, Label as Label$1, Trigger as Trigger$1, Value as Value$1 } from "@radix-ui/react-select";
6
6
  type WithAriaInvalid = Pick<SelectHTMLAttributes<HTMLSelectElement>, "aria-invalid">;
7
7
  type SelectProps = PropsWithChildren & {
8
8
  /**
@@ -77,7 +77,7 @@ type SelectProps = PropsWithChildren & {
77
77
  value?: string;
78
78
  } & WithValidation & WithAriaInvalid;
79
79
  /**
80
- * Displays a list of options for the user to pick from—triggered by a button.
80
+ * Displays a list of options for the user to pick from, triggered by a button.
81
81
  *
82
82
  * Use Select for a small, finite list of options (~2-15) where the user picks exactly one
83
83
  * and search/filtering is unnecessary. For larger lists or async/searchable data, use
@@ -123,7 +123,7 @@ type SelectProps = PropsWithChildren & {
123
123
  * </Select.Root>
124
124
  * ```
125
125
  */
126
- declare const Root$1: ({ "aria-invalid": _ariaInvalid, children, id, validation, onBlur, onValueChange, onChange, ref, ...props }: SelectProps) => import("react").JSX.Element;
126
+ declare const Root: ({ "aria-invalid": _ariaInvalid, children, id, validation, onBlur, onValueChange, onChange, ref, ...props }: SelectProps) => import("react").JSX.Element;
127
127
  /**
128
128
  * A group of related options within a select menu. Similar to an html `<optgroup>` element.
129
129
  * Pair it with `Select.Label`, which gives the group its accessible name.
@@ -157,8 +157,8 @@ declare const Root$1: ({ "aria-invalid": _ariaInvalid, children, id, validation,
157
157
  * </Select.Root>
158
158
  * ```
159
159
  */
160
- declare const Group$1: ({ className, "data-slot": dataSlot, ref, ...props }: ComponentProps<typeof Group> & WithDataSlot) => import("react").JSX.Element;
161
- type SelectValueProps = ComponentProps<typeof Value> & WithDataSlot;
160
+ declare const Group: ({ className, "data-slot": dataSlot, ref, ...props }: ComponentProps<typeof Group$1> & WithDataSlot) => import("react").JSX.Element;
161
+ type SelectValueProps = ComponentProps<typeof Value$1> & WithDataSlot;
162
162
  /**
163
163
  * The part that reflects the selected value. Renders the selected item's text
164
164
  * by default. For more control, control the select and pass your own children.
@@ -210,11 +210,11 @@ type SelectValueProps = ComponentProps<typeof Value> & WithDataSlot;
210
210
  * </Select.Root>
211
211
  * ```
212
212
  */
213
- declare const Value$1: ({ asChild, children, "data-slot": dataSlot, placeholder, ref, ...props }: SelectValueProps) => import("react").JSX.Element;
213
+ declare const Value: ({ asChild, children, "data-slot": dataSlot, placeholder, ref, ...props }: SelectValueProps) => import("react").JSX.Element;
214
214
  /**
215
215
  * Props for `Select.Trigger`.
216
216
  */
217
- type SelectTriggerProps = ComponentProps<typeof Trigger> & WithAriaInvalid & WithDataSlot & WithValidation;
217
+ type SelectTriggerProps = ComponentProps<typeof Trigger$1> & WithAriaInvalid & WithDataSlot & WithValidation;
218
218
  /**
219
219
  * The button that toggles the select. The Select.Content will position itself adjacent to the trigger.
220
220
  * When composing with `Field.Item`, wrap `Select.Root` in `Field.Control`:
@@ -269,13 +269,13 @@ type SelectTriggerProps = ComponentProps<typeof Trigger> & WithAriaInvalid & Wit
269
269
  * </Select.Root>
270
270
  * ```
271
271
  */
272
- declare const Trigger$1: ({ "aria-invalid": ariaInValidProp, className, children, "data-slot": dataSlot, id: propId, onBlur, ref, validation: propValidation, ...props }: SelectTriggerProps) => import("react").JSX.Element;
272
+ declare const Trigger: ({ "aria-invalid": ariaInValidProp, className, children, "data-slot": dataSlot, id: propId, onBlur, ref, validation: propValidation, ...props }: SelectTriggerProps) => import("react").JSX.Element;
273
273
  /**
274
274
  * Props for `Select.Content`. `asChild` is omitted: the content renders its
275
275
  * scroll buttons and viewport around `children`, so a slot would receive more
276
276
  * than one element and throw.
277
277
  */
278
- type SelectContentProps = Omit<ComponentProps<typeof Content>, "asChild"> & WithDataSlot & {
278
+ type SelectContentProps = Omit<ComponentProps<typeof Content$1>, "asChild"> & WithDataSlot & {
279
279
  /**
280
280
  * The width of the content. Defaults to the width of the trigger.
281
281
  * If set to "content", the content takes its intrinsic width: the width of the widest item.
@@ -332,7 +332,7 @@ type SelectContentProps = Omit<ComponentProps<typeof Content>, "asChild"> & With
332
332
  * </Select.Root>
333
333
  * ```
334
334
  */
335
- declare const Content$1: ({ className, children, "data-slot": dataSlot, position, ref, width, ...props }: SelectContentProps) => import("react").JSX.Element;
335
+ declare const Content: ({ className, children, "data-slot": dataSlot, onEscapeKeyDown, position, ref, width, ...props }: SelectContentProps) => import("react").JSX.Element;
336
336
  /**
337
337
  * Used to render the label of a group. It won't be focusable using arrow keys.
338
338
  *
@@ -365,11 +365,11 @@ declare const Content$1: ({ className, children, "data-slot": dataSlot, position
365
365
  * </Select.Root>
366
366
  * ```
367
367
  */
368
- declare const Label$1: ({ className, "data-slot": dataSlot, ref, ...props }: ComponentProps<typeof Label> & WithDataSlot) => import("react").JSX.Element;
368
+ declare const Label: ({ className, "data-slot": dataSlot, ref, ...props }: ComponentProps<typeof Label$1> & WithDataSlot) => import("react").JSX.Element;
369
369
  /**
370
370
  * Props for `Select.Item`.
371
371
  */
372
- type SelectItemProps = ComponentProps<typeof Item> & WithDataSlot & {
372
+ type SelectItemProps = ComponentProps<typeof Item$1> & WithDataSlot & {
373
373
  /**
374
374
  * An optional icon rendered before the item text.
375
375
  */
@@ -430,7 +430,7 @@ type SelectItemProps = ComponentProps<typeof Item> & WithDataSlot & {
430
430
  * </Select.Root>
431
431
  * ```
432
432
  */
433
- declare const Item$1: ({ className, children, "data-slot": dataSlot, icon, ref, translate, ...props }: SelectItemProps) => import("react").JSX.Element;
433
+ declare const Item: ({ className, children, "data-slot": dataSlot, icon, ref, translate, ...props }: SelectItemProps) => import("react").JSX.Element;
434
434
  /**
435
435
  * Used to visually separate items or groups of items in the select content.
436
436
  *
@@ -465,7 +465,7 @@ declare const Item$1: ({ className, children, "data-slot": dataSlot, icon, ref,
465
465
  */
466
466
  declare const SelectSeparatorComponent: ({ className, "data-slot": dataSlot, ref, ...props }: ComponentProps<typeof Separator> & WithDataSlot) => import("react").JSX.Element;
467
467
  /**
468
- * Displays a list of options for the user to pick from—triggered by a button.
468
+ * Displays a list of options for the user to pick from, triggered by a button.
469
469
  *
470
470
  * Use Select for a small, finite list of options (~2-15) where the user picks exactly one
471
471
  * and search/filtering is unnecessary. For larger lists or async/searchable data, use
@@ -478,6 +478,14 @@ declare const SelectSeparatorComponent: ({ className, "data-slot": dataSlot, ref
478
478
  * (`z-60`). When sibling floats share a container, the most recently mounted
479
479
  * float paints on top.
480
480
  *
481
+ * @useWhen Pick one value from a short, fixed list of options that needs no filter.
482
+ *
483
+ * @siblings
484
+ * - `Combobox`: the list is long or loads from a server, and the user types to filter it.
485
+ * - `MultiSelect`: the user picks several values.
486
+ * - `RadioGroup`: the options are few and must all show at once.
487
+ * - `DropdownMenu`: the list runs actions and sets no value.
488
+ *
481
489
  * @see https://mantle.ngrok.com/components/forms/select
482
490
  *
483
491
  * @example
@@ -518,7 +526,7 @@ declare const SelectSeparatorComponent: ({ className, "data-slot": dataSlot, ref
518
526
  */
519
527
  declare const Select: {
520
528
  /**
521
- * Displays a list of options for the user to pick from—triggered by a button.
529
+ * Displays a list of options for the user to pick from, triggered by a button.
522
530
  *
523
531
  * Use Select for a small, finite list of options (~2-15) where the user picks exactly one
524
532
  * and search/filtering is unnecessary. For larger lists or async/searchable data, use
@@ -564,7 +572,7 @@ declare const Select: {
564
572
  * </Select.Root>
565
573
  * ```
566
574
  */
567
- readonly Root: typeof Root$1;
575
+ readonly Root: typeof Root;
568
576
  /**
569
577
  * The component that pops out when the select is open as a portal adjacent to the trigger button.
570
578
  * It contains a scrolling viewport of the select items. `position` defaults to
@@ -614,7 +622,7 @@ declare const Select: {
614
622
  * </Select.Root>
615
623
  * ```
616
624
  */
617
- readonly Content: typeof Content$1;
625
+ readonly Content: typeof Content;
618
626
  /**
619
627
  * A group of related options within a select menu. Similar to an html `<optgroup>` element.
620
628
  * Pair it with `Select.Label`, which gives the group its accessible name.
@@ -648,7 +656,7 @@ declare const Select: {
648
656
  * </Select.Root>
649
657
  * ```
650
658
  */
651
- readonly Group: typeof Group$1;
659
+ readonly Group: typeof Group;
652
660
  /**
653
661
  * An option within a select menu. Similar to an html `<option>` element.
654
662
  * Has a required `value` prop. When a user selects this item, `Select.Root`
@@ -704,7 +712,7 @@ declare const Select: {
704
712
  * </Select.Root>
705
713
  * ```
706
714
  */
707
- readonly Item: typeof Item$1;
715
+ readonly Item: typeof Item;
708
716
  /**
709
717
  * Used to render the label of a group. It won't be focusable using arrow keys.
710
718
  *
@@ -737,7 +745,7 @@ declare const Select: {
737
745
  * </Select.Root>
738
746
  * ```
739
747
  */
740
- readonly Label: typeof Label$1;
748
+ readonly Label: typeof Label;
741
749
  /**
742
750
  * Used to visually separate items or groups of items in the select content.
743
751
  *
@@ -825,7 +833,7 @@ declare const Select: {
825
833
  * </Select.Root>
826
834
  * ```
827
835
  */
828
- readonly Trigger: typeof Trigger$1;
836
+ readonly Trigger: typeof Trigger;
829
837
  /**
830
838
  * The part that reflects the selected value. Renders the selected item's text
831
839
  * by default. For more control, control the select and pass your own children.
@@ -877,6 +885,6 @@ declare const Select: {
877
885
  * </Select.Root>
878
886
  * ```
879
887
  */
880
- readonly Value: typeof Value$1;
888
+ readonly Value: typeof Value;
881
889
  };
882
890
  export { Select as t };
package/dist/select.d.ts CHANGED
@@ -1,2 +1,7 @@
1
- import { t as Select } from "./select-BkhBxtOT.js";
1
+ /**
2
+ * Re-exports for the Select component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/forms/select
5
+ */
6
+ import { t as Select } from "./select-BpaXHxJm.js";
2
7
  export { Select };
package/dist/select.js CHANGED
@@ -1 +1 @@
1
- export{t as Select}from"./select-CAAYk4Yj.js";
1
+ export{t as Select}from"./select-1xuUx_os.js";
@@ -1,11 +1,16 @@
1
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
2
- import { t as Choice } from "./choice-BLR0_MeB.js";
3
- import { t as Input } from "./input-Dx5owTCc.js";
1
+ /**
2
+ * Re-exports for the SelectableList component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/data-display/selectable-list
5
+ */
6
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
7
+ import { t as Choice } from "./choice-CNiOSzqV.js";
8
+ import { t as Input } from "./input-DC4nW0Sr.js";
4
9
  import { ComponentProps, ReactElement, ReactNode } from "react";
5
10
  /**
6
11
  * A single selectable row in a {@link SelectableList}. The list is data-driven:
7
12
  * map your domain objects into these options once, and the list owns filtering,
8
- * selection, and (optionally) virtualization. Item *rendering* stays composable —
13
+ * selection, and (optionally) virtualization. Item *rendering* stays composable:
9
14
  * pass a render-prop child to a viewport to draw your own layout.
10
15
  *
11
16
  * A `label` may be any ReactNode; when it isn't a plain string, `labelText` is
@@ -45,8 +50,8 @@ type SelectableListOption = {
45
50
  disabled?: boolean;
46
51
  } & ({
47
52
  /**
48
- * Plain-text title — rendered in the default row and, as the checkbox's
49
- * `<label>`, its accessible name. Also what the default filter matches
53
+ * Plain-text title. The default row renders it, and as the checkbox's
54
+ * `<label>` it is the accessible name. The default filter also matches it
50
55
  * (override that with `labelText`).
51
56
  */
52
57
  label: string;
@@ -54,7 +59,7 @@ type SelectableListOption = {
54
59
  labelText?: string;
55
60
  } | {
56
61
  /**
57
- * A rich title (any ReactNode). Keep readable text inside — the rendered
62
+ * A rich title (any ReactNode). Keep readable text inside: the rendered
58
63
  * content is the checkbox's accessible name.
59
64
  */
60
65
  label: ReactNode;
@@ -80,7 +85,7 @@ declare function optionLabelText(option: SelectableListOption): string;
80
85
  * Case-insensitive substring filter over each option's plain text (see
81
86
  * {@link optionLabelText}: `labelText`, or a string `label`). Returns the input
82
87
  * untouched for an empty/whitespace query so the common "no filter" path does no
83
- * work. Pure — safe to unit test and to call from `useMemo`.
88
+ * work. Pure, so it is safe to unit test and to call from `useMemo`.
84
89
  *
85
90
  * @example
86
91
  * ```ts
@@ -191,8 +196,8 @@ declare const Root: ({ "data-slot": dataSlot, className, defaultQuery, defaultVa
191
196
  /**
192
197
  * The filter/search box for a `SelectableList`. Renders the mantle `Input` with
193
198
  * a leading magnifying-glass icon and drives the list's filter query (a
194
- * case-insensitive substring match over each option's plain text — `labelText`,
195
- * or a string `label`). Optional — omit it for a non-filterable list.
199
+ * case-insensitive substring match over each option's plain text: `labelText`,
200
+ * or a string `label`). Optional: omit it for a non-filterable list.
196
201
  *
197
202
  * @see https://mantle.ngrok.com/components/data-display/selectable-list
198
203
  *
@@ -209,8 +214,8 @@ declare const Root: ({ "data-slot": dataSlot, className, defaultQuery, defaultVa
209
214
  declare const Filter: ({ "data-slot": dataSlot, "aria-label": ariaLabel, ref, ...props }: Omit<ComponentProps<typeof Input>, "value" | "defaultValue" | "onChange" | "type" | "children"> & WithDataSlot) => import("react").JSX.Element;
210
215
  /**
211
216
  * A tri-state "select all" header for a `SelectableList`. Reflects the selection
212
- * of the **currently filtered** options — checked when all are selected,
213
- * indeterminate when only some are, unchecked when none are — and toggling it
217
+ * of the **currently filtered** options (checked when all are selected,
218
+ * indeterminate when only some are, unchecked when none are), and toggling it
214
219
  * selects or clears that filtered set. Optional. Children are the visible label.
215
220
  *
216
221
  * **Structure.** `children` render inside a
@@ -258,7 +263,7 @@ type SelectableListItemProps = Omit<ComponentProps<"div">, "children" | "id"> &
258
263
  /** The option's selection value. Selection state is read from, and toggled in, the list. */
259
264
  value: string;
260
265
  /**
261
- * Item content — typically `SelectableList.ItemTitle` over a
266
+ * Item content, typically `SelectableList.ItemTitle` over a
262
267
  * `SelectableList.ItemDescription`, or any layout you like. It fills the row's
263
268
  * content `gridcell`; nested interactive content (links, buttons) is allowed.
264
269
  */
@@ -297,7 +302,7 @@ type SelectableListItemProps = Omit<ComponentProps<"div">, "children" | "id"> &
297
302
  */
298
303
  declare const Item: ({ "data-slot": dataSlot, children, className, ref, value, ...props }: SelectableListItemProps) => import("react").JSX.Element;
299
304
  /**
300
- * The emphasized title of a `SelectableList.Item`, rendered as `Choice.Label` —
305
+ * The emphasized title of a `SelectableList.Item`, rendered as `Choice.Label`:
301
306
  * a real `<label>` wired to the row's checkbox, so clicking it toggles the row
302
307
  * and it supplies the checkbox's accessible name.
303
308
  *
@@ -390,7 +395,7 @@ type SelectableListViewportProps = Omit<ComponentProps<"div">, "children"> & {
390
395
  */
391
396
  declare const Viewport: ({ "data-slot": dataSlot, children, ref, ...props }: SelectableListViewportProps) => import("react").JSX.Element | null;
392
397
  /**
393
- * Props for `SelectableList.VirtualViewport` — the `Viewport` props plus the
398
+ * Props for `SelectableList.VirtualViewport`: the `Viewport` props plus the
394
399
  * virtualizer knobs.
395
400
  *
396
401
  * @see https://mantle.ngrok.com/components/data-display/selectable-list
@@ -462,19 +467,25 @@ declare const VirtualViewport: ({ "data-slot": dataSlot, children, ref, ...props
462
467
  */
463
468
  declare const Empty: ({ "data-slot": dataSlot, children, className, ref, ...props }: ComponentProps<"div"> & WithDataSlot) => import("react").JSX.Element;
464
469
  /**
465
- * A filterable, multi-select **grid** of checkbox rows — the inline
470
+ * A filterable, multi-select **grid** of checkbox rows, the inline
466
471
  * (non-popover) counterpart to `MultiSelect`/`Combobox`. Map your data into
467
472
  * `options` once; the list owns filtering, selection, and (optionally)
468
473
  * virtualization. Each row is an APG grid `role="row"` (`aria-selected`) whose
469
- * cells hold a real `Checkbox` and a `Choice`-laid-out title + description — the
474
+ * cells hold a real `Checkbox` and a `Choice`-laid-out title + description. This is the
470
475
  * pattern that lets a selectable row carry a real control and nested interactive
471
476
  * content. Non-virtualized by default; swap `Viewport` → `VirtualViewport` (same
472
477
  * props) for windowing. Built on the shared `list` primitive.
473
478
  *
474
- * Keyboard: the grid is a single tab stop — `Arrow`/`Home`/`End` move an active
479
+ * Keyboard: the grid is a single tab stop: `Arrow`/`Home`/`End` move an active
475
480
  * row (tracked via `aria-activedescendant`, so navigation works across the full
476
481
  * option set even when virtualized) and `Space`/`Enter` toggles it.
477
482
  *
483
+ * @useWhen Select several items from an inline, filterable list of checkbox rows, with no popover.
484
+ *
485
+ * @siblings
486
+ * - `MultiSelect`: the options open in a popover, and the picks show as tags.
487
+ * - `List`: each row runs an action or navigates, with no selection.
488
+ *
478
489
  * @see https://mantle.ngrok.com/components/data-display/selectable-list
479
490
  *
480
491
  * @example
@@ -1 +1 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{n,t as r}from"./checkbox-DmSQXs26.js";import{t as i}from"./choice-2Lrv8_nl.js";import{t as a}from"./use-callback-ref-BvVyI5K1.js";import{n as o,t as s}from"./input-CpQ6jlpI.js";import{n as c,r as l,t as u}from"./list-RFRIQxU2.js";import{c as d}from"react/compiler-runtime";import{cloneElement as f,createContext as p,isValidElement as m,useContext as h,useId as g,useState as _}from"react";import v from"tiny-invariant";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{MagnifyingGlassIcon as x}from"@phosphor-icons/react/MagnifyingGlass";function S(e){return e.labelText==null?typeof e.label==`string`?e.label:``:e.labelText}function C(e,t){let n=t.trim().toLowerCase();return n===``?e:e.filter(e=>S(e).toLowerCase().includes(n))}function w(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function T(e,t){let n=0,r=0;for(let i of e)i.disabled||(n+=1,t.has(i.value)&&(r+=1));return n===0?{allSelected:!1,someSelected:!1}:{allSelected:r===n,someSelected:r>0}}const E=p(null);function D(e){let t=h(E);return v(t,`SelectableList.${e} must be rendered inside SelectableList.Root.`),t}const O=[],k=n=>{let r=d(53),i,o,s,c,l,u,f,p,m,h,v,b;r[0]===n?(i=r[1],o=r[2],s=r[3],c=r[4],l=r[5],u=r[6],f=r[7],p=r[8],m=r[9],h=r[10],v=r[11],b=r[12]):({"data-slot":o,className:i,defaultQuery:s,defaultValue:c,filter:l,onQueryChange:u,onValueChange:f,options:p,query:h,ref:v,value:b,...m}=n,r[0]=n,r[1]=i,r[2]=o,r[3]=s,r[4]=c,r[5]=l,r[6]=u,r[7]=f,r[8]=p,r[9]=m,r[10]=h,r[11]=v,r[12]=b);let x=g(),S=b!=null,[T,D]=_(c??O),k=S?b:T,A=h!=null,[j,M]=_(s??``),N=A?h:j,P=a(f),F=a(u),I;r[13]!==S||r[14]!==P?(I=e=>{S||D(e),P(e)},r[13]=S,r[14]=P,r[15]=I):I=r[15];let L=I,R;r[16]!==A||r[17]!==F?(R=e=>{A||M(e),F(e)},r[16]=A,r[17]=F,r[18]=R):R=r[18];let z=R,V;r[19]===k?V=r[20]:(V=new Set(k),r[19]=k,r[20]=V);let H=V,U;r[21]===p?U=r[22]:(U=new Set(p.filter(B).map(ee)),r[21]=p,r[22]=U);let W=U,G;r[23]!==l||r[24]!==p||r[25]!==N?(G=l==null?C(p,N):p.filter(e=>l(e,N)),r[23]=l,r[24]=p,r[25]=N,r[26]=G):G=r[26];let K=G,q;r[27]!==L||r[28]!==W||r[29]!==k?(q=e=>{W.has(e)||L(w(k,e))},r[27]=L,r[28]=W,r[29]=k,r[30]=q):q=r[30];let J;r[31]!==L||r[32]!==W||r[33]!==K||r[34]!==x||r[35]!==N||r[36]!==H||r[37]!==k||r[38]!==z||r[39]!==q?(J={listId:x,filteredOptions:K,query:N,setQuery:z,selectedValues:k,selectedSet:H,disabledSet:W,toggle:q,setSelection:L},r[31]=L,r[32]=W,r[33]=K,r[34]=x,r[35]=N,r[36]=H,r[37]=k,r[38]=z,r[39]=q,r[40]=J):J=r[40];let Y=J,X;r[41]===o?X=r[42]:(X=t(o,`selectable-list`),r[41]=o,r[42]=X);let Z;r[43]===i?Z=r[44]:(Z=e(`flex w-full flex-col gap-3`,i),r[43]=i,r[44]=Z);let Q;r[45]!==m||r[46]!==v||r[47]!==X||r[48]!==Z?(Q=/* @__PURE__ */ y(`div`,{ref:v,"data-slot":X,className:Z,...m}),r[45]=m,r[46]=v,r[47]=X,r[48]=Z,r[49]=Q):Q=r[49];let $;return r[50]!==Y||r[51]!==Q?($=/* @__PURE__ */ y(E.Provider,{value:Y,children:Q}),r[50]=Y,r[51]=Q,r[52]=$):$=r[52],$},A=e=>{let n=d(18),r,i,a,c;n[0]===e?(r=n[1],i=n[2],a=n[3],c=n[4]):({"data-slot":r,"aria-label":c,ref:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=c);let l=c===void 0?`Filter`:c,{query:u,setQuery:f}=D(`Filter`),p;n[5]===r?p=n[6]:(p=t(r,`selectable-list-filter`),n[5]=r,n[6]=p);let m;n[7]===f?m=n[8]:(m=e=>f(e.target.value),n[7]=f,n[8]=m);let h,g;n[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=/* @__PURE__ */ y(x,{"aria-hidden":!0}),g=/* @__PURE__ */ y(o,{}),n[9]=h,n[10]=g):(h=n[9],g=n[10]);let _;return n[11]!==l||n[12]!==i||n[13]!==u||n[14]!==a||n[15]!==p||n[16]!==m?(_=/* @__PURE__ */ b(s,{ref:a,type:`text`,"data-slot":p,"aria-label":l,value:u,onChange:m,...i,children:[h,g]}),n[11]=l,n[12]=i,n[13]=u,n[14]=a,n[15]=p,n[16]=m,n[17]=_):_=n[17],_},j=i=>{let a=d(36),o,s,c,l,u;a[0]===i?(o=a[1],s=a[2],c=a[3],l=a[4],u=a[5]):({"data-slot":c,children:o,className:s,ref:u,...l}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=l,a[5]=u);let{filteredOptions:f,selectedValues:p,selectedSet:m,setSelection:h}=D(`SelectAll`),_=g(),v,x;if(a[6]!==f||a[7]!==m){let{allSelected:e,someSelected:t}=T(f,m);v=e,x=n({allSelected:v,someSelected:t}),a[6]=f,a[7]=m,a[8]=v,a[9]=x}else v=a[8],x=a[9];let S=x,C;a[10]===f?C=a[11]:(C=f.some(V),a[10]=f,a[11]=C);let w=C,E;a[12]!==v||a[13]!==f||a[14]!==p||a[15]!==h?(E=()=>{let e=f.filter(H).map(U);if(v){let t=new Set(e);h(p.filter(e=>!t.has(e)))}else h([.../* @__PURE__ */ new Set([...p,...e])])},a[12]=v,a[13]=f,a[14]=p,a[15]=h,a[16]=E):E=a[16];let O=E,k;a[17]===c?k=a[18]:(k=t(c,`selectable-list-select-all`),a[17]=c,a[18]=k);let A;a[19]===s?A=a[20]:(A=e(`text-strong flex cursor-pointer items-center gap-2 text-sm font-medium font-sans`,s),a[19]=s,a[20]=A);let j=!w,M;a[21]!==S||a[22]!==_||a[23]!==O||a[24]!==j?(M=/* @__PURE__ */ y(r,{id:_,checked:S,onChange:O,disabled:j}),a[21]=S,a[22]=_,a[23]=O,a[24]=j,a[25]=M):M=a[25];let N;a[26]===o?N=a[27]:(N=/* @__PURE__ */ y(`span`,{"data-slot":`selectable-list-select-all-label`,className:`contents`,children:o}),a[26]=o,a[27]=N);let P;return a[28]!==_||a[29]!==l||a[30]!==u||a[31]!==k||a[32]!==A||a[33]!==M||a[34]!==N?(P=/* @__PURE__ */ b(`label`,{ref:u,htmlFor:_,"data-slot":k,className:A,...l,children:[M,N]}),a[28]=_,a[29]=l,a[30]=u,a[31]=k,a[32]=A,a[33]=M,a[34]=N,a[35]=P):P=a[35],P};function M(e,t){return`${e}-control-${encodeURIComponent(t)}`}const N=n=>{let a=d(42),o,s,l,u,f,p;a[0]===n?(o=a[1],s=a[2],l=a[3],u=a[4],f=a[5],p=a[6]):({"data-slot":l,children:o,className:s,ref:f,value:p,...u}=n,a[0]=n,a[1]=o,a[2]=s,a[3]=l,a[4]=u,a[5]=f,a[6]=p);let{listId:m,selectedSet:h,disabledSet:g,toggle:_}=D(`Item`),v;a[7]!==m||a[8]!==p?(v=M(m,p),a[7]=m,a[8]=p,a[9]=v):v=a[9];let x=v,S;a[10]!==h||a[11]!==p?(S=h.has(p),a[10]=h,a[11]=p,a[12]=S):S=a[12];let C=S,w;a[13]!==g||a[14]!==p?(w=g.has(p),a[13]=g,a[14]=p,a[15]=w):w=a[15];let T=w,E;a[16]===s?E=a[17]:(E=e(`px-2 py-1.5 text-sm`,`cursor-pointer aria-disabled:cursor-default`,s),a[16]=s,a[17]=E);let O;a[18]===l?O=a[19]:(O=t(l,`selectable-list-item`),a[18]=l,a[19]=O);let k;a[20]!==_||a[21]!==p?(k=()=>_(p),a[20]=_,a[21]=p,a[22]=k):k=a[22];let A;a[23]!==C||a[24]!==k?(A=/* @__PURE__ */ y(i.Indicator,{role:`gridcell`,children:/* @__PURE__ */ y(r,{checked:C,onChange:k,tabIndex:-1})}),a[23]=C,a[24]=k,a[25]=A):A=a[25];let j;a[26]===o?j=a[27]:(j=/* @__PURE__ */ y(i.Content,{role:`gridcell`,children:o}),a[26]=o,a[27]=j);let N;a[28]!==x||a[29]!==T||a[30]!==A||a[31]!==j?(N=/* @__PURE__ */ b(i.Root,{id:x,disabled:T,children:[A,j]}),a[28]=x,a[29]=T,a[30]=A,a[31]=j,a[32]=N):N=a[32];let P;return a[33]!==T||a[34]!==u||a[35]!==f||a[36]!==C||a[37]!==E||a[38]!==O||a[39]!==N||a[40]!==p?(P=/* @__PURE__ */ y(c,{ref:f,asChild:!0,selected:C,disabled:T,className:E,...u,"data-slot":O,"data-value":p,children:N}),a[33]=T,a[34]=u,a[35]=f,a[36]=C,a[37]=E,a[38]=O,a[39]=N,a[40]=p,a[41]=P):P=a[41],P},P=e=>{let n=d(8),r,a;n[0]===e?(r=n[1],a=n[2]):({"data-slot":r,...a}=e,n[0]=e,n[1]=r,n[2]=a);let o;n[3]===r?o=n[4]:(o=t(r,`selectable-list-item-title`),n[3]=r,n[4]=o);let s;return n[5]!==a||n[6]!==o?(s=/* @__PURE__ */ y(i.Label,{"data-slot":o,...a}),n[5]=a,n[6]=o,n[7]=s):s=n[7],s},F=e=>{let n=d(8),r,a;n[0]===e?(r=n[1],a=n[2]):({"data-slot":r,...a}=e,n[0]=e,n[1]=r,n[2]=a);let o;n[3]===r?o=n[4]:(o=t(r,`selectable-list-item-description`),n[3]=r,n[4]=o);let s;return n[5]!==a||n[6]!==o?(s=/* @__PURE__ */ y(i.Description,{"data-slot":o,...a}),n[5]=a,n[6]=o,n[7]=s):s=n[7],s};function I(e){return/* @__PURE__ */ b(N,{value:e.value,children:[/* @__PURE__ */ y(P,{children:e.label}),e.description!=null&&/* @__PURE__ */ y(F,{children:e.description})]})}function L(e,t){let n=[],r=[];for(let i of e){let e=t(i);m(e)&&(n.push(f(e,{key:i.value})),r.push(i))}return{items:n,options:r}}function R(e,t){let n=d(17),{filteredOptions:r,listId:i,toggle:a}=D(e),o=t??I,s;n[0]!==r||n[1]!==o?(s=L(r,o),n[0]=r,n[1]=o,n[2]=s):s=n[2];let{items:c,options:l}=s,u;n[3]!==l||n[4]!==a?(u=e=>{let t=l[e];t!=null&&a(t.value)},n[3]=l,n[4]=a,n[5]=u):u=n[5];let f=u,p;n[6]!==l||n[7]!==i?(p=e=>{let t=l[e];return t==null?``:M(i,t.value)},n[6]=l,n[7]=i,n[8]=p):p=n[8];let m=p,h;n[9]===l?h=n[10]:(h=e=>l[e]?.disabled===!0,n[9]=l,n[10]=h);let g=h,_=c.length===0,v;return n[11]!==g||n[12]!==m||n[13]!==c||n[14]!==f||n[15]!==_?(v={isEmpty:_,isItemDisabled:g,onActivate:f,itemId:m,items:c},n[11]=g,n[12]=m,n[13]=c,n[14]=f,n[15]=_,n[16]=v):v=n[16],v}const z={Root:k,Filter:A,SelectAll:j,Viewport:e=>{let n=d(15),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({"data-slot":i,children:r,ref:o,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let{isEmpty:s,isItemDisabled:c,onActivate:u,itemId:f,items:p}=R(`Viewport`,r);if(s)return null;let m;n[5]===i?m=n[6]:(m=t(i,`selectable-list-viewport`),n[5]=i,n[6]=m);let h;return n[7]!==c||n[8]!==f||n[9]!==p||n[10]!==u||n[11]!==a||n[12]!==o||n[13]!==m?(h=/* @__PURE__ */ y(l,{ref:o,"data-slot":m,semantics:`grid`,...a,"aria-multiselectable":!0,isItemDisabled:c,onActivate:u,itemId:f,children:p}),n[7]=c,n[8]=f,n[9]=p,n[10]=u,n[11]=a,n[12]=o,n[13]=m,n[14]=h):h=n[14],h},VirtualViewport:e=>{let n=d(15),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({"data-slot":i,children:r,ref:o,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let{isEmpty:s,isItemDisabled:c,onActivate:l,itemId:f,items:p}=R(`VirtualViewport`,r);if(s)return null;let m;n[5]===i?m=n[6]:(m=t(i,`selectable-list-viewport`),n[5]=i,n[6]=m);let h;return n[7]!==c||n[8]!==f||n[9]!==p||n[10]!==l||n[11]!==a||n[12]!==o||n[13]!==m?(h=/* @__PURE__ */ y(u,{ref:o,"data-slot":m,semantics:`grid`,...a,"aria-multiselectable":!0,isItemDisabled:c,onActivate:l,itemId:f,children:p}),n[7]=c,n[8]=f,n[9]=p,n[10]=l,n[11]=a,n[12]=o,n[13]=m,n[14]=h):h=n[14],h},Item:N,ItemTitle:P,ItemDescription:F,Empty:n=>{let r=d(21),i,a,o,s,c;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c);let{filteredOptions:l}=D(`Empty`),u=l.length===0,f;r[6]===o?f=r[7]:(f=t(o,`selectable-list-empty`),r[6]=o,r[7]=f);let p=!u&&`sr-only`,m=u&&`text-muted border-popover bg-popover flex items-center justify-center rounded-md border px-3 py-8 text-center text-sm`,h;r[8]!==a||r[9]!==p||r[10]!==m?(h=e(p,m,a),r[8]=a,r[9]=p,r[10]=m,r[11]=h):h=r[11];let g;r[12]!==i||r[13]!==u?(g=u&&/* @__PURE__ */ y(`span`,{"data-slot":`selectable-list-empty-label`,className:`contents`,children:i}),r[12]=i,r[13]=u,r[14]=g):g=r[14];let _;return r[15]!==s||r[16]!==c||r[17]!==f||r[18]!==h||r[19]!==g?(_=/* @__PURE__ */ y(`div`,{ref:c,"data-slot":f,role:`status`,className:h,...s,children:g}),r[15]=s,r[16]=c,r[17]=f,r[18]=h,r[19]=g,r[20]=_):_=r[20],_}};function B(e){return e.disabled}function ee(e){return e.value}function V(e){return!e.disabled}function H(e){return!e.disabled}function U(e){return e.value}export{z as SelectableList,C as filterSelectableOptions,S as optionLabelText,T as summarizeSelection,w as toggleSelectionValue};
1
+ "use client";import{t as e}from"./use-callback-ref-DiOXFQzM.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{n as r,t as i}from"./checkbox-Cu5cgZmk.js";import{t as a}from"./choice-CCVG2hb9.js";import{n as o,t as s}from"./input-fW8QSZEO.js";import{n as c,r as l,t as u}from"./list-cQZPSjfz.js";import{c as d}from"react/compiler-runtime";import{cloneElement as f,createContext as p,isValidElement as m,useContext as h,useId as g,useState as _}from"react";import v from"tiny-invariant";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{MagnifyingGlassIcon as x}from"@phosphor-icons/react/MagnifyingGlass";function S(e){return e.labelText==null?typeof e.label==`string`?e.label:``:e.labelText}function C(e,t){let n=t.trim().toLowerCase();return n===``?e:e.filter(e=>S(e).toLowerCase().includes(n))}function w(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function T(e,t){let n=0,r=0;for(let i of e)i.disabled||(n+=1,t.has(i.value)&&(r+=1));return n===0?{allSelected:!1,someSelected:!1}:{allSelected:r===n,someSelected:r>0}}const E=p(null);function D(e){let t=h(E);return v(t,`SelectableList.${e} must be rendered inside SelectableList.Root.`),t}const O=[],k=r=>{let i=d(53),a,o,s,c,l,u,f,p,m,h,v,b;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],f=i[7],p=i[8],m=i[9],h=i[10],v=i[11],b=i[12]):({"data-slot":o,className:a,defaultQuery:s,defaultValue:c,filter:l,onQueryChange:u,onValueChange:f,options:p,query:h,ref:v,value:b,...m}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u,i[7]=f,i[8]=p,i[9]=m,i[10]=h,i[11]=v,i[12]=b);let x=g(),S=b!=null,[T,D]=_(c??O),k=S?b:T,A=h!=null,[j,M]=_(s??``),N=A?h:j,P=e(f),F=e(u),I;i[13]!==S||i[14]!==P?(I=e=>{S||D(e),P(e)},i[13]=S,i[14]=P,i[15]=I):I=i[15];let L=I,R;i[16]!==A||i[17]!==F?(R=e=>{A||M(e),F(e)},i[16]=A,i[17]=F,i[18]=R):R=i[18];let z=R,V;i[19]===k?V=i[20]:(V=new Set(k),i[19]=k,i[20]=V);let H=V,U;i[21]===p?U=i[22]:(U=new Set(p.filter(B).map(ee)),i[21]=p,i[22]=U);let W=U,G;i[23]!==l||i[24]!==p||i[25]!==N?(G=l==null?C(p,N):p.filter(e=>l(e,N)),i[23]=l,i[24]=p,i[25]=N,i[26]=G):G=i[26];let K=G,q;i[27]!==L||i[28]!==W||i[29]!==k?(q=e=>{W.has(e)||L(w(k,e))},i[27]=L,i[28]=W,i[29]=k,i[30]=q):q=i[30];let J;i[31]!==L||i[32]!==W||i[33]!==K||i[34]!==x||i[35]!==N||i[36]!==H||i[37]!==k||i[38]!==z||i[39]!==q?(J={listId:x,filteredOptions:K,query:N,setQuery:z,selectedValues:k,selectedSet:H,disabledSet:W,toggle:q,setSelection:L},i[31]=L,i[32]=W,i[33]=K,i[34]=x,i[35]=N,i[36]=H,i[37]=k,i[38]=z,i[39]=q,i[40]=J):J=i[40];let Y=J,X;i[41]===o?X=i[42]:(X=n(o,`selectable-list`),i[41]=o,i[42]=X);let Z;i[43]===a?Z=i[44]:(Z=t(`flex w-full flex-col gap-3`,a),i[43]=a,i[44]=Z);let Q;i[45]!==m||i[46]!==v||i[47]!==X||i[48]!==Z?(Q=/* @__PURE__ */ y(`div`,{ref:v,"data-slot":X,className:Z,...m}),i[45]=m,i[46]=v,i[47]=X,i[48]=Z,i[49]=Q):Q=i[49];let $;return i[50]!==Y||i[51]!==Q?($=/* @__PURE__ */ y(E.Provider,{value:Y,children:Q}),i[50]=Y,i[51]=Q,i[52]=$):$=i[52],$},A=e=>{let t=d(18),r,i,a,c;t[0]===e?(r=t[1],i=t[2],a=t[3],c=t[4]):({"data-slot":r,"aria-label":c,ref:a,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=c);let l=c===void 0?`Filter`:c,{query:u,setQuery:f}=D(`Filter`),p;t[5]===r?p=t[6]:(p=n(r,`selectable-list-filter`),t[5]=r,t[6]=p);let m;t[7]===f?m=t[8]:(m=e=>f(e.target.value),t[7]=f,t[8]=m);let h,g;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=/* @__PURE__ */ y(x,{"aria-hidden":!0}),g=/* @__PURE__ */ y(o,{}),t[9]=h,t[10]=g):(h=t[9],g=t[10]);let _;return t[11]!==l||t[12]!==i||t[13]!==u||t[14]!==a||t[15]!==p||t[16]!==m?(_=/* @__PURE__ */ b(s,{ref:a,type:`text`,"data-slot":p,"aria-label":l,value:u,onChange:m,...i,children:[h,g]}),t[11]=l,t[12]=i,t[13]=u,t[14]=a,t[15]=p,t[16]=m,t[17]=_):_=t[17],_},j=e=>{let a=d(36),o,s,c,l,u;a[0]===e?(o=a[1],s=a[2],c=a[3],l=a[4],u=a[5]):({"data-slot":c,children:o,className:s,ref:u,...l}=e,a[0]=e,a[1]=o,a[2]=s,a[3]=c,a[4]=l,a[5]=u);let{filteredOptions:f,selectedValues:p,selectedSet:m,setSelection:h}=D(`SelectAll`),_=g(),v,x;if(a[6]!==f||a[7]!==m){let{allSelected:e,someSelected:t}=T(f,m);v=e,x=r({allSelected:v,someSelected:t}),a[6]=f,a[7]=m,a[8]=v,a[9]=x}else v=a[8],x=a[9];let S=x,C;a[10]===f?C=a[11]:(C=f.some(V),a[10]=f,a[11]=C);let w=C,E;a[12]!==v||a[13]!==f||a[14]!==p||a[15]!==h?(E=()=>{let e=f.filter(H).map(U);if(v){let t=new Set(e);h(p.filter(e=>!t.has(e)))}else h([.../* @__PURE__ */ new Set([...p,...e])])},a[12]=v,a[13]=f,a[14]=p,a[15]=h,a[16]=E):E=a[16];let O=E,k;a[17]===c?k=a[18]:(k=n(c,`selectable-list-select-all`),a[17]=c,a[18]=k);let A;a[19]===s?A=a[20]:(A=t(`text-strong flex cursor-pointer items-center gap-2 text-sm font-medium font-sans`,s),a[19]=s,a[20]=A);let j=!w,M;a[21]!==S||a[22]!==_||a[23]!==O||a[24]!==j?(M=/* @__PURE__ */ y(i,{id:_,checked:S,onChange:O,disabled:j}),a[21]=S,a[22]=_,a[23]=O,a[24]=j,a[25]=M):M=a[25];let N;a[26]===o?N=a[27]:(N=/* @__PURE__ */ y(`span`,{"data-slot":`selectable-list-select-all-label`,className:`contents`,children:o}),a[26]=o,a[27]=N);let P;return a[28]!==_||a[29]!==l||a[30]!==u||a[31]!==k||a[32]!==A||a[33]!==M||a[34]!==N?(P=/* @__PURE__ */ b(`label`,{ref:u,htmlFor:_,"data-slot":k,className:A,...l,children:[M,N]}),a[28]=_,a[29]=l,a[30]=u,a[31]=k,a[32]=A,a[33]=M,a[34]=N,a[35]=P):P=a[35],P};function M(e,t){return`${e}-control-${encodeURIComponent(t)}`}const N=e=>{let r=d(42),o,s,l,u,f,p;r[0]===e?(o=r[1],s=r[2],l=r[3],u=r[4],f=r[5],p=r[6]):({"data-slot":l,children:o,className:s,ref:f,value:p,...u}=e,r[0]=e,r[1]=o,r[2]=s,r[3]=l,r[4]=u,r[5]=f,r[6]=p);let{listId:m,selectedSet:h,disabledSet:g,toggle:_}=D(`Item`),v;r[7]!==m||r[8]!==p?(v=M(m,p),r[7]=m,r[8]=p,r[9]=v):v=r[9];let x=v,S;r[10]!==h||r[11]!==p?(S=h.has(p),r[10]=h,r[11]=p,r[12]=S):S=r[12];let C=S,w;r[13]!==g||r[14]!==p?(w=g.has(p),r[13]=g,r[14]=p,r[15]=w):w=r[15];let T=w,E;r[16]===s?E=r[17]:(E=t(`px-2 py-1.5 text-sm`,`cursor-pointer aria-disabled:cursor-default`,s),r[16]=s,r[17]=E);let O;r[18]===l?O=r[19]:(O=n(l,`selectable-list-item`),r[18]=l,r[19]=O);let k;r[20]!==_||r[21]!==p?(k=()=>_(p),r[20]=_,r[21]=p,r[22]=k):k=r[22];let A;r[23]!==C||r[24]!==k?(A=/* @__PURE__ */ y(a.Indicator,{role:`gridcell`,children:/* @__PURE__ */ y(i,{checked:C,onChange:k,tabIndex:-1})}),r[23]=C,r[24]=k,r[25]=A):A=r[25];let j;r[26]===o?j=r[27]:(j=/* @__PURE__ */ y(a.Content,{role:`gridcell`,children:o}),r[26]=o,r[27]=j);let N;r[28]!==x||r[29]!==T||r[30]!==A||r[31]!==j?(N=/* @__PURE__ */ b(a.Root,{id:x,disabled:T,children:[A,j]}),r[28]=x,r[29]=T,r[30]=A,r[31]=j,r[32]=N):N=r[32];let P;return r[33]!==T||r[34]!==u||r[35]!==f||r[36]!==C||r[37]!==E||r[38]!==O||r[39]!==N||r[40]!==p?(P=/* @__PURE__ */ y(c,{ref:f,asChild:!0,selected:C,disabled:T,className:E,...u,"data-slot":O,"data-value":p,children:N}),r[33]=T,r[34]=u,r[35]=f,r[36]=C,r[37]=E,r[38]=O,r[39]=N,r[40]=p,r[41]=P):P=r[41],P},P=e=>{let t=d(8),r,i;t[0]===e?(r=t[1],i=t[2]):({"data-slot":r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let o;t[3]===r?o=t[4]:(o=n(r,`selectable-list-item-title`),t[3]=r,t[4]=o);let s;return t[5]!==i||t[6]!==o?(s=/* @__PURE__ */ y(a.Label,{"data-slot":o,...i}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s},F=e=>{let t=d(8),r,i;t[0]===e?(r=t[1],i=t[2]):({"data-slot":r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let o;t[3]===r?o=t[4]:(o=n(r,`selectable-list-item-description`),t[3]=r,t[4]=o);let s;return t[5]!==i||t[6]!==o?(s=/* @__PURE__ */ y(a.Description,{"data-slot":o,...i}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s};function I(e){return/* @__PURE__ */ b(N,{value:e.value,children:[/* @__PURE__ */ y(P,{children:e.label}),e.description!=null&&/* @__PURE__ */ y(F,{children:e.description})]})}function L(e,t){let n=[],r=[];for(let i of e){let e=t(i);m(e)&&(n.push(f(e,{key:i.value})),r.push(i))}return{items:n,options:r}}function R(e,t){let n=d(17),{filteredOptions:r,listId:i,toggle:a}=D(e),o=t??I,s;n[0]!==r||n[1]!==o?(s=L(r,o),n[0]=r,n[1]=o,n[2]=s):s=n[2];let{items:c,options:l}=s,u;n[3]!==l||n[4]!==a?(u=e=>{let t=l[e];t!=null&&a(t.value)},n[3]=l,n[4]=a,n[5]=u):u=n[5];let f=u,p;n[6]!==l||n[7]!==i?(p=e=>{let t=l[e];return t==null?``:M(i,t.value)},n[6]=l,n[7]=i,n[8]=p):p=n[8];let m=p,h;n[9]===l?h=n[10]:(h=e=>l[e]?.disabled===!0,n[9]=l,n[10]=h);let g=h,_=c.length===0,v;return n[11]!==g||n[12]!==m||n[13]!==c||n[14]!==f||n[15]!==_?(v={isEmpty:_,isItemDisabled:g,onActivate:f,itemId:m,items:c},n[11]=g,n[12]=m,n[13]=c,n[14]=f,n[15]=_,n[16]=v):v=n[16],v}const z={Root:k,Filter:A,SelectAll:j,Viewport:e=>{let t=d(15),r,i,a,o;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4]):({"data-slot":i,children:r,ref:o,...a}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o);let{isEmpty:s,isItemDisabled:c,onActivate:u,itemId:f,items:p}=R(`Viewport`,r);if(s)return null;let m;t[5]===i?m=t[6]:(m=n(i,`selectable-list-viewport`),t[5]=i,t[6]=m);let h;return t[7]!==c||t[8]!==f||t[9]!==p||t[10]!==u||t[11]!==a||t[12]!==o||t[13]!==m?(h=/* @__PURE__ */ y(l,{ref:o,"data-slot":m,semantics:`grid`,...a,"aria-multiselectable":!0,isItemDisabled:c,onActivate:u,itemId:f,children:p}),t[7]=c,t[8]=f,t[9]=p,t[10]=u,t[11]=a,t[12]=o,t[13]=m,t[14]=h):h=t[14],h},VirtualViewport:e=>{let t=d(15),r,i,a,o;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4]):({"data-slot":i,children:r,ref:o,...a}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o);let{isEmpty:s,isItemDisabled:c,onActivate:l,itemId:f,items:p}=R(`VirtualViewport`,r);if(s)return null;let m;t[5]===i?m=t[6]:(m=n(i,`selectable-list-viewport`),t[5]=i,t[6]=m);let h;return t[7]!==c||t[8]!==f||t[9]!==p||t[10]!==l||t[11]!==a||t[12]!==o||t[13]!==m?(h=/* @__PURE__ */ y(u,{ref:o,"data-slot":m,semantics:`grid`,...a,"aria-multiselectable":!0,isItemDisabled:c,onActivate:l,itemId:f,children:p}),t[7]=c,t[8]=f,t[9]=p,t[10]=l,t[11]=a,t[12]=o,t[13]=m,t[14]=h):h=t[14],h},Item:N,ItemTitle:P,ItemDescription:F,Empty:e=>{let r=d(21),i,a,o,s,c;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c);let{filteredOptions:l}=D(`Empty`),u=l.length===0,f;r[6]===o?f=r[7]:(f=n(o,`selectable-list-empty`),r[6]=o,r[7]=f);let p=!u&&`sr-only`,m=u&&`text-muted border-popover bg-popover flex items-center justify-center rounded-md border px-3 py-8 text-center text-sm`,h;r[8]!==a||r[9]!==p||r[10]!==m?(h=t(p,m,a),r[8]=a,r[9]=p,r[10]=m,r[11]=h):h=r[11];let g;r[12]!==i||r[13]!==u?(g=u&&/* @__PURE__ */ y(`span`,{"data-slot":`selectable-list-empty-label`,className:`contents`,children:i}),r[12]=i,r[13]=u,r[14]=g):g=r[14];let _;return r[15]!==s||r[16]!==c||r[17]!==f||r[18]!==h||r[19]!==g?(_=/* @__PURE__ */ y(`div`,{ref:c,"data-slot":f,role:`status`,className:h,...s,children:g}),r[15]=s,r[16]=c,r[17]=f,r[18]=h,r[19]=g,r[20]=_):_=r[20],_}};function B(e){return e.disabled}function ee(e){return e.value}function V(e){return!e.disabled}function H(e){return!e.disabled}function U(e){return e.value}export{z as SelectableList,C as filterSelectableOptions,S as optionLabelText,T as summarizeSelection,w as toggleSelectionValue};
@@ -1,5 +1,5 @@
1
1
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
2
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
3
3
  import { ComponentProps } from "react";
4
4
  declare const orientations: readonly ["horizontal", "vertical"];
5
5
  type Orientation = (typeof orientations)[number];
@@ -68,7 +68,9 @@ type SeparatorProps = ComponentProps<"div"> & WithAsChild & {
68
68
  * | `data-orientation` | `"horizontal"` \| `"vertical"` | The resolved orientation, after a `HorizontalSeparatorGroup` wins. |
69
69
  * | `data-separator` | present | Presence-only. Lets a group exempt separators from `shrink-0`. |
70
70
  *
71
- * @useWhen Divide adjacent content without a box, in a row or in a column.
71
+ * @useWhen Divide adjacent content without a box, in a row or in a column. To put a text
72
+ * label in the middle or at one end of a horizontal divider, wrap the label and the separators
73
+ * in a `HorizontalSeparatorGroup`.
72
74
  *
73
75
  * @siblings
74
76
  * - `Card`: the content needs a border on every side.
@@ -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{createContext as i,useContext as a}from"react";import{jsx as o}from"react/jsx-runtime";const s=[`horizontal`,`vertical`],c=i({}),l={orientation:`horizontal`},u=i=>{let a=r(16),s,u,d,f,p;a[0]===i?(s=a[1],u=a[2],d=a[3],f=a[4],p=a[5]):({"data-slot":f,className:d,children:u,asChild:s,...p}=i,a[0]=i,a[1]=s,a[2]=u,a[3]=d,a[4]=f,a[5]=p);let m=s?n:`div`,h;a[6]===f?h=a[7]:(h=t(f,`horizontal-separator-group`),a[6]=f,a[7]=h);let g;a[8]===d?g=a[9]:(g=e(`group flex items-center gap-2 [&>*:not([data-separator])]:shrink-0`,d),a[8]=d,a[9]=g);let _;return a[10]!==m||a[11]!==u||a[12]!==p||a[13]!==h||a[14]!==g?(_=/* @__PURE__ */ o(c.Provider,{value:l,children:/* @__PURE__ */ o(m,{"data-slot":h,"data-horizontal-separator-group":!0,className:g,...p,children:u})}),a[10]=m,a[11]=u,a[12]=p,a[13]=h,a[14]=g,a[15]=_):_=a[15],_},d=i=>{let s=r(32),l,u,d,p,m,h,g,_;s[0]===i?(l=s[1],u=s[2],d=s[3],p=s[4],m=s[5],h=s[6],g=s[7],_=s[8]):({"data-slot":d,asChild:g,children:l,className:u,orientation:p,ref:h,semantic:_,...m}=i,s[0]=i,s[1]=l,s[2]=u,s[3]=d,s[4]=p,s[5]=m,s[6]=h,s[7]=g,s[8]=_);let v=g!==void 0&&g,y=_!==void 0&&_,b=v?n:`div`,x=a(c),S;s[9]!==x.orientation||s[10]!==p?(S=x.orientation??(f(p)?p:`horizontal`),s[9]=x.orientation,s[10]=p,s[11]=S):S=s[11];let C=S,w=C===`vertical`?C:void 0,T;s[12]!==w||s[13]!==y?(T=y?{"aria-orientation":w,role:`separator`}:{role:`none`},s[12]=w,s[13]=y,s[14]=T):T=s[14];let E=T,D;s[15]===d?D=s[16]:(D=t(d,`separator`),s[15]=d,s[16]=D);let O=C===`horizontal`?`h-px w-full group-data-horizontal-separator-group:flex-1`:`h-full w-px`,k;s[17]!==u||s[18]!==O?(k=e(`separator`,`bg-separator shrink-0`,O,u),s[17]=u,s[18]=O,s[19]=k):k=s[19];let A;s[20]!==v||s[21]!==l?(A=v?{children:l}:{},s[20]=v,s[21]=l,s[22]=A):A=s[22];let j;return s[23]!==b||s[24]!==C||s[25]!==m||s[26]!==h||s[27]!==E||s[28]!==D||s[29]!==k||s[30]!==A?(j=/* @__PURE__ */ o(b,{"data-slot":D,className:k,"data-orientation":C,"data-separator":!0,...E,ref:h,...A,...m}),s[23]=b,s[24]=C,s[25]=m,s[26]=h,s[27]=E,s[28]=D,s[29]=k,s[30]=A,s[31]=j):j=s[31],j};function f(e){return typeof e==`string`&&s.some(t=>t===e)}export{d as n,u as t};
@@ -1,2 +1,7 @@
1
- import { n as Separator, t as HorizontalSeparatorGroup } from "./separator-D9AWEkcJ.js";
1
+ /**
2
+ * Re-exports for the Separator component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/structure/separator
5
+ */
6
+ import { n as Separator, t as HorizontalSeparatorGroup } from "./separator-Ck4sPrdN.js";
2
7
  export { HorizontalSeparatorGroup, Separator };
package/dist/separator.js CHANGED
@@ -1 +1 @@
1
- export{t as HorizontalSeparatorGroup,n as Separator}from"./separator-DfzxVutO.js";
1
+ export{t as HorizontalSeparatorGroup,n as Separator}from"./separator-DnvhwY2J.js";
@@ -1 +1 @@
1
- import{t as e}from"./use-prefers-reduced-motion-CU6mWmOe.js";function t(t){if(e()||typeof t.getAnimations!=`function`)return;let r=n(t);if(r!=null){r.currentTime=0;return}t.setAttribute(`data-shake`,``);let i=n(t),a=()=>t.removeAttribute(`data-shake`);i==null?a():i.finished.then(a,a)}function n(e){return e.getAnimations().find(e=>e instanceof CSSAnimation&&e.animationName===`shake`)}export{t};
1
+ import{t as e}from"./use-prefers-reduced-motion-Ck6dnOM9.js";function t(t){if(e()||typeof t.getAnimations!=`function`)return;let r=n(t);if(r!=null){r.currentTime=0;return}t.setAttribute(`data-shake`,``);let i=n(t),a=()=>t.removeAttribute(`data-shake`);i==null?a():i.finished.then(a,a)}function n(e){return e.getAnimations().find(e=>e instanceof CSSAnimation&&e.animationName===`shake`)}export{t};
@@ -0,0 +1 @@
1
+ "use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./layer-container-DL4yclOu.js";import{t as r}from"./button-B9bChDgl.js";import{a as i,c as a,i as o,l as s,n as c,o as l,r as u,s as d,t as f}from"./primitive-D8CzV_Ft.js";import{t as p}from"./slot-B7rwscwd.js";import{c as m}from"react/compiler-runtime";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{XIcon as _}from"@phosphor-icons/react/X";import{cva as v}from"class-variance-authority";const y=s();function b(){return y(void 0)}const x=e=>{let t=m(3),n=b(),r;return t[0]!==e||t[1]!==n?(r=/* @__PURE__ */ h(l,{...e,...n}),t[0]=e,t[1]=n,t[2]=r):r=t[2],r},S=e=>{let n=m(17),r,i,o,s;n[0]===e?(r=n[1],i=n[2],o=n[3],s=n[4]):({asChild:r,children:i,"data-slot":o,...s}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o,n[4]=s);let c=b(),l;n[5]===o?l=n[6]:(l=t(o,`sheet-trigger`),n[5]=o,n[6]=l);let u=l,d;n[7]!==r||n[8]!==i||n[9]!==u?(d=r?/* @__PURE__ */ h(p,{"data-slot":u,children:i}):i,n[7]=r,n[8]=i,n[9]=u,n[10]=d):d=n[10];let f;return n[11]!==r||n[12]!==s||n[13]!==c||n[14]!==u||n[15]!==d?(f=/* @__PURE__ */ h(a,{asChild:r,"data-slot":u,...s,...c,children:d}),n[11]=r,n[12]=s,n[13]=c,n[14]=u,n[15]=d,n[16]=f):f=n[16],f},C=e=>{let n=m(17),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({asChild:r,children:i,"data-slot":a,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s=b(),c;n[5]===a?c=n[6]:(c=t(a,`sheet-close`),n[5]=a,n[6]=c);let l=c,u;n[7]!==r||n[8]!==i||n[9]!==l?(u=r?/* @__PURE__ */ h(p,{"data-slot":l,children:i}):i,n[7]=r,n[8]=i,n[9]=l,n[10]=u):u=n[10];let d;return n[11]!==r||n[12]!==o||n[13]!==s||n[14]!==l||n[15]!==u?(d=/* @__PURE__ */ h(f,{asChild:r,"data-slot":l,...o,...s,children:u}),n[11]=r,n[12]=o,n[13]=s,n[14]=l,n[15]=u,n[16]=d):d=n[16],d},w=e=>{let t=m(3),n=b(),r;return t[0]!==e||t[1]!==n?(r=/* @__PURE__ */ h(i,{...e,...n}),t[0]=e,t[1]=n,t[2]=r):r=t[2],r},T=n=>{let r=m(15),i,a,s,c;r[0]===n?(i=r[1],a=r[2],s=r[3],c=r[4]):({"data-slot":a,className:i,ref:c,...s}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=s,r[4]=c);let l=b(),u;r[5]===a?u=r[6]:(u=t(a,`sheet-overlay`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=e(`bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 duration-200 ease-out-strong data-state-closed:duration-150 fixed inset-0 z-60 backdrop-blur-xs`,i),r[7]=i,r[8]=d);let f;return r[9]!==s||r[10]!==c||r[11]!==l||r[12]!==u||r[13]!==d?(f=/* @__PURE__ */ h(o,{"data-slot":u,className:d,...s,...l,ref:c}),r[9]=s,r[10]=c,r[11]=l,r[12]=u,r[13]=d,r[14]=f):f=r[14],f},E=v(`bg-dialog border-dialog inset-y-0 h-full w-full fixed flex flex-col shadow-lg outline-hidden focus-within:outline-hidden data-state-closed:animate-out data-state-open:animate-in duration-200 ease-out-strong data-state-closed:duration-150 motion-reduce:animate-none!`,{variants:{side:{left:`data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r`,right:`data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l`}},defaultVariants:{side:`right`}}),D={Root:x,Actions:n=>{let r=m(16),i,a,o,s,c;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c);let l;r[6]===o?l=r[7]:(l=t(o,`sheet-actions`),r[6]=o,r[7]=l);let u;r[8]===a?u=r[9]:(u=e(`flex h-full items-center gap-2`,a),r[8]=a,r[9]=u);let d;return r[10]!==i||r[11]!==s||r[12]!==c||r[13]!==l||r[14]!==u?(d=/* @__PURE__ */ h(`div`,{"data-slot":l,className:u,...s,ref:c,children:i}),r[10]=i,r[11]=s,r[12]=c,r[13]=l,r[14]=u,r[15]=d):d=r[15],d},Body:n=>{let r=m(12),i,a,o;r[0]===n?(i=r[1],a=r[2],o=r[3]):({"data-slot":a,className:i,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o);let s;r[4]===a?s=r[5]:(s=t(a,`sheet-body`),r[4]=a,r[5]=s);let c;r[6]===i?c=r[7]:(c=e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,i),r[6]=i,r[7]=c);let l;return r[8]!==o||r[9]!==s||r[10]!==c?(l=/* @__PURE__ */ h(`div`,{"data-slot":s,className:c,...o}),r[8]=o,r[9]=s,r[10]=c,r[11]=l):l=r[11],l},Close:C,CloseIconButton:e=>{let n=m(22),i,a,o,s,c,l,u;n[0]===e?(i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7]):({"data-slot":i,size:o,type:s,label:c,appearance:l,intent:u,...a}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o,n[4]=s,n[5]=c,n[6]=l,n[7]=u);let d=o===void 0?`md`:o,p=s===void 0?`button`:s,g=c===void 0?`Close Sheet`:c,v=l===void 0?`ghost`:l,y=u===void 0?`neutral`:u,x=b(),S;n[8]===i?S=n[9]:(S=t(i,`sheet-close-icon-button`),n[8]=i,n[9]=S);let C;n[10]===Symbol.for(`react.memo_cache_sentinel`)?(C=/* @__PURE__ */ h(_,{}),n[10]=C):C=n[10];let w;n[11]!==v||n[12]!==y||n[13]!==g||n[14]!==a||n[15]!==d||n[16]!==S||n[17]!==p?(w=/* @__PURE__ */ h(r,{"data-slot":S,appearance:v,icon:C,intent:y,label:g,size:d,type:p,...a}),n[11]=v,n[12]=y,n[13]=g,n[14]=a,n[15]=d,n[16]=S,n[17]=p,n[18]=w):w=n[18];let T;return n[19]!==x||n[20]!==w?(T=/* @__PURE__ */ h(f,{asChild:!0,...x,children:w}),n[19]=x,n[20]=w,n[21]=T):T=n[21],T},Content:r=>{let i=m(22),a,o,s,l,u,d,f;i[0]===r?(a=i[1],o=i[2],s=i[3],l=i[4],u=i[5],d=i[6],f=i[7]):({"data-slot":s,children:a,className:o,preferredWidth:d,side:f,ref:u,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=l,i[5]=u,i[6]=d,i[7]=f);let p=d===void 0?`sm:max-w-120`:d,_=f===void 0?`right`:f,v=b(),y;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(y=/* @__PURE__ */ h(T,{}),i[8]=y):y=i[8];let x;i[9]===s?x=i[10]:(x=t(s,`sheet-content`),i[9]=s,i[10]=x);let S;i[11]!==o||i[12]!==p||i[13]!==_?(S=e(E({side:_}),p,o),i[11]=o,i[12]=p,i[13]=_,i[14]=S):S=i[14];let C;return i[15]!==a||i[16]!==l||i[17]!==u||i[18]!==v||i[19]!==x||i[20]!==S?(C=/* @__PURE__ */ g(w,{children:[y,/* @__PURE__ */ h(n,{"data-slot":`sheet-positioner`,className:`fixed z-60 motion-safe:not-has-[>[data-mantle-modal-content][data-state=open]]:animate-exit-hold`,children:/* @__PURE__ */ h(c,{"data-slot":x,"data-mantle-modal-content":!0,className:S,ref:u,...l,...v,children:a})})]}),i[15]=a,i[16]=l,i[17]=u,i[18]=v,i[19]=x,i[20]=S,i[21]=C):C=i[21],C},Description:n=>{let r=m(15),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c=b(),l;r[5]===a?l=r[6]:(l=t(a,`sheet-description`),r[5]=a,r[6]=l);let d;r[7]===i?d=r[8]:(d=e(`text-body text-sm`,i),r[7]=i,r[8]=d);let f;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l||r[13]!==d?(f=/* @__PURE__ */ h(u,{"data-slot":l,ref:s,className:d,...o,...c}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=d,r[14]=f):f=r[14],f},Footer:n=>{let r=m(12),i,a,o;r[0]===n?(i=r[1],a=r[2],o=r[3]):({"data-slot":a,className:i,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o);let s;r[4]===a?s=r[5]:(s=t(a,`sheet-footer`),r[4]=a,r[5]=s);let c;r[6]===i?c=r[7]:(c=e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5`,i),r[6]=i,r[7]=c);let l;return r[8]!==o||r[9]!==s||r[10]!==c?(l=/* @__PURE__ */ h(`div`,{"data-slot":s,className:c,...o}),r[8]=o,r[9]=s,r[10]=c,r[11]=l):l=r[11],l},Header:n=>{let r=m(12),i,a,o;r[0]===n?(i=r[1],a=r[2],o=r[3]):({"data-slot":a,className:i,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o);let s;r[4]===a?s=r[5]:(s=t(a,`sheet-header`),r[4]=a,r[5]=s);let c;r[6]===i?c=r[7]:(c=e(`border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4`,`has-[.icon-button]:pr-4`,i),r[6]=i,r[7]=c);let l;return r[8]!==o||r[9]!==s||r[10]!==c?(l=/* @__PURE__ */ h(`div`,{"data-slot":s,className:c,...o}),r[8]=o,r[9]=s,r[10]=c,r[11]=l):l=r[11],l},Title:n=>{let r=m(15),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c=b(),l;r[5]===a?l=r[6]:(l=t(a,`sheet-title`),r[5]=a,r[6]=l);let u;r[7]===i?u=r[8]:(u=e(`text-strong flex-1 truncate text-lg font-medium`,i),r[7]=i,r[8]=u);let f;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l||r[13]!==u?(f=/* @__PURE__ */ h(d,{"data-slot":l,ref:s,className:u,...o,...c}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=u,r[14]=f):f=r[14],f},TitleGroup:n=>{let r=m(16),i,a,o,s,c;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c);let l;r[6]===o?l=r[7]:(l=t(o,`sheet-title-group`),r[6]=o,r[7]=l);let u;r[8]===a?u=r[9]:(u=e(`flex items-center justify-between gap-2`,a),r[8]=a,r[9]=u);let d;return r[10]!==i||r[11]!==s||r[12]!==c||r[13]!==l||r[14]!==u?(d=/* @__PURE__ */ h(`div`,{"data-slot":l,className:u,...s,ref:c,children:i}),r[10]=i,r[11]=s,r[12]=c,r[13]=l,r[14]=u,r[15]=d):d=r[15],d},Trigger:S};export{D as t};
package/dist/sheet.d.ts CHANGED
@@ -1,6 +1,11 @@
1
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
2
- import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-Yxyu1XMd.js";
3
- import { c as Trigger$1, n as Content$1, o as Root$1, r as Description$1, s as Title$1, t as Close$1 } from "./dialog-Dp0QGWwo.js";
1
+ /**
2
+ * Re-exports for the Sheet component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/overlays/sheet
5
+ */
6
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
7
+ import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-DnYv7IOT.js";
8
+ import { c as Trigger$1, n as Content$1, o as Root$1, r as Description$1, s as Title$1, t as Close$1 } from "./dialog-CbEEA0fl.js";
4
9
  import { ComponentProps, HTMLAttributes } from "react";
5
10
  import { VariantProps } from "class-variance-authority";
6
11
  /**
@@ -156,7 +161,7 @@ declare const Root: (props: ComponentProps<typeof Root$1>) => import("react").JS
156
161
  * </Sheet.Root>
157
162
  * ```
158
163
  */
159
- declare const Trigger: (props: ComponentProps<typeof Trigger$1>) => import("react").JSX.Element;
164
+ declare const Trigger: ({ asChild, children, "data-slot": dataSlot, ...props }: ComponentProps<typeof Trigger$1> & WithDataSlot) => import("react").JSX.Element;
160
165
  /**
161
166
  * The close button for a `Sheet`. Should be rendered as a child of the `Sheet.Content` component.
162
167
  * Usually contained within the `Sheet.Footer` component.
@@ -198,7 +203,7 @@ declare const Trigger: (props: ComponentProps<typeof Trigger$1>) => import("reac
198
203
  * </Sheet.Root>
199
204
  * ```
200
205
  */
201
- declare const Close: (props: ComponentProps<typeof Close$1>) => import("react").JSX.Element;
206
+ declare const Close: ({ asChild, children, "data-slot": dataSlot, ...props }: ComponentProps<typeof Close$1> & WithDataSlot) => import("react").JSX.Element;
202
207
  declare const sheetVariants: (props?: ({
203
208
  side?: "left" | "right" | null | undefined;
204
209
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -234,6 +239,14 @@ type SheetContentProps = ComponentProps<typeof Content$1> & VariantProps<typeof
234
239
  * focus and hides outside content from assistive technology. Put a control that
235
240
  * every user must reach inside the content.
236
241
  *
242
+ * A script can show its own popup in a frame on `<body>`, above the sheet,
243
+ * such as the 3-D Secure challenge of a payment script. While that frame is
244
+ * on top at the center of the viewport, the sheet yields to the popup:
245
+ *
246
+ * - Focus that a script moves into the popup stays there.
247
+ * - Escape moves focus into the popup and does not close the sheet.
248
+ * - A click in the popup is not an outside click.
249
+ *
237
250
  * @see https://mantle.ngrok.com/components/overlays/sheet#sheetcontent
238
251
  *
239
252
  * @example
@@ -283,7 +296,7 @@ type SheetContentProps = ComponentProps<typeof Content$1> & VariantProps<typeof
283
296
  declare const Content: ({ "data-slot": dataSlot, children, className, preferredWidth, side, ref, ...props }: SheetContentProps) => import("react").JSX.Element;
284
297
  type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon" | "appearance" | "intent">> & {
285
298
  /**
286
- * The visual style of the close icon button. Optional here —
299
+ * The visual style of the close icon button. Optional here:
287
300
  * `Sheet.CloseIconButton` defaults to `"ghost"` so it stays visually quiet
288
301
  * in the `Sheet.Header` beside the title.
289
302
  *
@@ -291,7 +304,7 @@ type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon" | "appeara
291
304
  */
292
305
  appearance?: IconButtonAppearance;
293
306
  /**
294
- * The tone of the close icon button. Optional here — `Sheet.CloseIconButton`
307
+ * The tone of the close icon button. Optional here: `Sheet.CloseIconButton`
295
308
  * defaults to `"neutral"`, the workhorse tone for routine dismissal, and the
296
309
  * only tone `IconButton` draws.
297
310
  *
@@ -722,6 +735,14 @@ declare const Actions: ({ "data-slot": dataSlot, children, className, ref, ...pr
722
735
  * When multiple overlays are open, the most recently mounted overlay renders on
723
736
  * top.
724
737
  *
738
+ * @useWhen Open a panel from the edge of the screen for a task beside the current view, such as a
739
+ * filter panel, a detail view, or a mobile menu.
740
+ *
741
+ * @siblings
742
+ * - `Dialog`: the task fits a centered modal window.
743
+ * - `AlertDialog`: the user must confirm a destructive or irreversible action.
744
+ * - `Sidebar`: the panel holds the persistent navigation of the app.
745
+ *
725
746
  * @see https://mantle.ngrok.com/components/overlays/sheet
726
747
  *
727
748
  * @example
@@ -1063,6 +1084,14 @@ declare const Sheet: {
1063
1084
  * focus and hides outside content from assistive technology. Put a control that
1064
1085
  * every user must reach inside the content.
1065
1086
  *
1087
+ * A script can show its own popup in a frame on `<body>`, above the sheet,
1088
+ * such as the 3-D Secure challenge of a payment script. While that frame is
1089
+ * on top at the center of the viewport, the sheet yields to the popup:
1090
+ *
1091
+ * - Focus that a script moves into the popup stays there.
1092
+ * - Escape moves focus into the popup and does not close the sheet.
1093
+ * - A click in the popup is not an outside click.
1094
+ *
1066
1095
  * @see https://mantle.ngrok.com/components/overlays/sheet#sheetcontent
1067
1096
  *
1068
1097
  * @example
package/dist/sheet.js CHANGED
@@ -1 +1 @@
1
- export{t as Sheet}from"./sheet-CSJc_sB4.js";
1
+ export{t as Sheet}from"./sheet-DHy_vlme.js";