@ngrok/mantle 0.87.0 → 0.89.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/accordion.d.ts +10 -9
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +2 -1
  4. package/dist/{alert-DCVfviBx.d.ts → alert-BzPDUaU7.d.ts} +16 -15
  5. package/dist/alert-CZYYlx9q.js +1 -0
  6. package/dist/alert-center.d.ts +7 -7
  7. package/dist/alert-center.js +1 -1
  8. package/dist/alert-dialog.d.ts +17 -16
  9. package/dist/alert-dialog.js +1 -1
  10. package/dist/alert-vfeV_hso.js +1 -0
  11. package/dist/alert.d.ts +1 -1
  12. package/dist/alert.js +1 -1
  13. package/dist/anchor-CgcbWEUs.js +1 -0
  14. package/dist/anchor.js +1 -1
  15. package/dist/app-layout.d.ts +1128 -45
  16. package/dist/app-layout.js +1 -1
  17. package/dist/area-chart.d.ts +41 -18
  18. package/dist/area-chart.js +1 -1
  19. package/dist/avatar.js +1 -1
  20. package/dist/badge.d.ts +3 -2
  21. package/dist/badge.js +1 -1
  22. package/dist/bar-chart.d.ts +37 -13
  23. package/dist/bar-chart.js +1 -1
  24. package/dist/breadcrumb.js +1 -1
  25. package/dist/browser-only.js +1 -1
  26. package/dist/button-69InNC_m.js +1 -0
  27. package/dist/button-BMfUxs_j.js +1 -0
  28. package/dist/{button-DO53OA70.d.ts → button-CHoYpOzx.d.ts} +5 -4
  29. package/dist/{button-B52_vczK.js → button-D8rr-1AB.js} +1 -1
  30. package/dist/{button-crUf0hbR.d.ts → button-DL7V4bzW.d.ts} +5 -4
  31. package/dist/button-b2HKEIE2.js +1 -0
  32. package/dist/{button-B5i9n7Qp.d.ts → button-mzUR1U0Y.d.ts} +5 -4
  33. package/dist/button.d.ts +3 -3
  34. package/dist/button.js +1 -1
  35. package/dist/calendar.d.ts +3 -2
  36. package/dist/calendar.js +1 -1
  37. package/dist/card.d.ts +8 -7
  38. package/dist/card.js +1 -1
  39. package/dist/centered-layout.js +1 -1
  40. package/dist/{chart-DgaWVBqi.d.ts → chart-23KQ1ZNO.d.ts} +128 -62
  41. package/dist/chart-BRkJfptA.js +2 -0
  42. package/dist/checkbox-C3N2afhB.js +1 -0
  43. package/dist/checkbox.d.ts +3 -2
  44. package/dist/checkbox.js +1 -1
  45. package/dist/{choice-PESu-9s8.d.ts → choice-BCiyqLgO.d.ts} +12 -11
  46. package/dist/choice-DQmecLfy.js +1 -0
  47. package/dist/choice.d.ts +1 -1
  48. package/dist/choice.js +1 -1
  49. package/dist/code-block-4Esx_gV-.js +12 -0
  50. package/dist/code-block.d.ts +17 -16
  51. package/dist/code-block.js +6 -6
  52. package/dist/code-block_highlight-utils.js +1 -1
  53. package/dist/code.d.ts +2 -1
  54. package/dist/code.js +1 -1
  55. package/dist/combobox.d.ts +15 -14
  56. package/dist/combobox.js +1 -1
  57. package/dist/command.d.ts +13 -13
  58. package/dist/command.js +1 -1
  59. package/dist/cx-CK7o_rVv.js +1 -0
  60. package/dist/cx.js +1 -1
  61. package/dist/data-table.d.ts +32 -31
  62. package/dist/data-table.js +1 -1
  63. package/dist/description-list.d.ts +10 -6
  64. package/dist/description-list.js +1 -1
  65. package/dist/dialog-BDzapPLR.js +1 -0
  66. package/dist/{dialog-DXpqpdJj.d.ts → dialog-DQdeqvq-.d.ts} +28 -15
  67. package/dist/dialog.d.ts +1 -1
  68. package/dist/dialog.js +1 -1
  69. package/dist/dropdown-menu-CWUzGFgf.d.ts +1 -0
  70. package/dist/{dropdown-menu-BloQKE_y.d.ts → dropdown-menu-CpRsyt_F.d.ts} +17 -17
  71. package/dist/dropdown-menu-CutWQ0bl.js +1 -0
  72. package/dist/dropdown-menu.d.ts +2 -2
  73. package/dist/dropdown-menu.js +1 -1
  74. package/dist/empty.d.ts +7 -6
  75. package/dist/empty.js +1 -1
  76. package/dist/field.d.ts +16 -15
  77. package/dist/field.js +1 -1
  78. package/dist/flag.d.ts +3 -2
  79. package/dist/flag.js +1 -1
  80. package/dist/hooks.d.ts +36 -1
  81. package/dist/hooks.js +1 -1
  82. package/dist/hover-card.d.ts +5 -4
  83. package/dist/hover-card.js +1 -1
  84. package/dist/icon-BudQMD2S.js +1 -0
  85. package/dist/icon-kK0c-POG.js +1 -0
  86. package/dist/{icon-w0HUe7tr.d.ts → icon-r2NvfTWW.d.ts} +3 -2
  87. package/dist/{icon-BmJ57Tgh.d.ts → icon-ucVgZeXn.d.ts} +3 -2
  88. package/dist/icon.d.ts +2 -2
  89. package/dist/icon.js +1 -1
  90. package/dist/icons-BMZnm4hM.js +1 -0
  91. package/dist/{icons-Bu-2boul.js → icons-CH3tD_wq.js} +1 -1
  92. package/dist/icons-CSwTVV2m.js +1 -0
  93. package/dist/icons.js +1 -1
  94. package/dist/in-view-Dxv_GrUU.js +1 -0
  95. package/dist/input-D_DjD9lT.js +1 -0
  96. package/dist/{input-DpnC3Xgj.d.ts → input-bbB1tC0h.d.ts} +3 -2
  97. package/dist/input.d.ts +5 -4
  98. package/dist/input.js +1 -1
  99. package/dist/kbd-CLHsJ99p.js +1 -0
  100. package/dist/kbd.d.ts +2 -1
  101. package/dist/kbd.js +1 -1
  102. package/dist/label-5T8i7I4X.js +1 -0
  103. package/dist/{label-Bnfe9YJ6.d.ts → label-C-KbNls8.d.ts} +3 -2
  104. package/dist/label.d.ts +1 -1
  105. package/dist/label.js +1 -1
  106. package/dist/{layer-container-R7aux3n8.js → layer-container-DLf-6eBz.js} +1 -1
  107. package/dist/layer-container.js +1 -1
  108. package/dist/line-chart.d.ts +40 -15
  109. package/dist/line-chart.js +1 -1
  110. package/dist/list-DOVZoz9t.js +1 -0
  111. package/dist/list.d.ts +3 -2
  112. package/dist/list.js +1 -1
  113. package/dist/live-region-DQ1QLv3L.js +1 -0
  114. package/dist/live-region.d.ts +3 -2
  115. package/dist/live-region.js +1 -1
  116. package/dist/llms.txt +2 -1
  117. package/dist/{main-Dv2zuT_b.js → main-CC1L9IsH.js} +1 -1
  118. package/dist/main.js +1 -1
  119. package/dist/mantle.css +12 -20
  120. package/dist/media-object.js +1 -1
  121. package/dist/multi-select.d.ts +23 -22
  122. package/dist/multi-select.js +1 -1
  123. package/dist/otp-input.d.ts +9 -8
  124. package/dist/otp-input.js +1 -1
  125. package/dist/pagination.d.ts +9 -8
  126. package/dist/pagination.js +1 -1
  127. package/dist/{popover-Cco1nw8I.d.ts → popover-Dvls7-j4.d.ts} +5 -4
  128. package/dist/popover-oQDUvcZ2.js +1 -0
  129. package/dist/popover.d.ts +1 -1
  130. package/dist/popover.js +1 -1
  131. package/dist/primitive-B-6XILB2.js +1 -0
  132. package/dist/progress.d.ts +9 -8
  133. package/dist/progress.js +1 -1
  134. package/dist/qr-code.d.ts +9 -8
  135. package/dist/qr-code.js +1 -1
  136. package/dist/radio-group.d.ts +19 -18
  137. package/dist/radio-group.js +1 -1
  138. package/dist/sandbar.d.ts +7 -7
  139. package/dist/sandbar.js +1 -1
  140. package/dist/{sandboxed-on-click-BLvvSqOP.js → sandboxed-on-click-C7pPu-2M.js} +1 -1
  141. package/dist/sandboxed-on-click.js +1 -1
  142. package/dist/scatter-plot.d.ts +39 -14
  143. package/dist/scatter-plot.js +1 -1
  144. package/dist/{select-BITJP7I5.d.ts → select-CxXb3aiC.d.ts} +3 -3
  145. package/dist/select-DcL0-duV.js +1 -0
  146. package/dist/select.d.ts +1 -1
  147. package/dist/select.js +1 -1
  148. package/dist/selectable-list.d.ts +16 -15
  149. package/dist/selectable-list.js +1 -1
  150. package/dist/separator-DvPe27fH.js +1 -0
  151. package/dist/{separator-Bo4nY_3M.d.ts → separator-HzGvuD0B.d.ts} +4 -3
  152. package/dist/separator.d.ts +1 -1
  153. package/dist/separator.js +1 -1
  154. package/dist/sheet-DND_KjmS.js +1 -0
  155. package/dist/sheet.d.ts +13 -12
  156. package/dist/sheet.js +1 -1
  157. package/dist/sidebar.d.ts +149 -95
  158. package/dist/sidebar.js +1 -1
  159. package/dist/skeleton-zfqoDAxT.js +1 -0
  160. package/dist/skeleton.d.ts +3 -2
  161. package/dist/skeleton.js +1 -1
  162. package/dist/skip-to-main-link.js +1 -1
  163. package/dist/slider.d.ts +3 -2
  164. package/dist/slider.js +1 -1
  165. package/dist/{slot-BsvE2ntj.js → slot-DdYN1L1C.js} +1 -1
  166. package/dist/{slot-DdgxmuI5.d.ts → slot-Q996Hqk9.d.ts} +1 -1
  167. package/dist/slot.d.ts +1 -1
  168. package/dist/slot.js +1 -1
  169. package/dist/split-button.d.ts +6 -5
  170. package/dist/split-button.js +1 -1
  171. package/dist/switch.d.ts +3 -2
  172. package/dist/switch.js +1 -1
  173. package/dist/{table-DEI-qvSC.d.ts → table-BhzITa19.d.ts} +10 -9
  174. package/dist/table-DBbKqOVq.js +1 -0
  175. package/dist/table.d.ts +1 -1
  176. package/dist/table.js +1 -1
  177. package/dist/tabs.d.ts +172 -33
  178. package/dist/tabs.js +1 -1
  179. package/dist/text-area.d.ts +3 -2
  180. package/dist/text-area.js +1 -1
  181. package/dist/theme-BlCZHClJ.js +1 -0
  182. package/dist/theme-switcher.d.ts +3 -3
  183. package/dist/theme-switcher.js +1 -1
  184. package/dist/theme.js +1 -1
  185. package/dist/toast.d.ts +10 -9
  186. package/dist/toast.js +1 -1
  187. package/dist/{tooltip-nuUCoqq8.d.ts → tooltip-CngH7Kl6.d.ts} +7 -6
  188. package/dist/tooltip-NhYXqStK.js +1 -0
  189. package/dist/tooltip.d.ts +1 -1
  190. package/dist/tooltip.js +1 -1
  191. package/dist/truncated-text.d.ts +138 -0
  192. package/dist/truncated-text.js +1 -0
  193. package/dist/types.js +1 -1
  194. package/dist/{use-breakpoint-CjyNk0fi.js → use-breakpoint--mo7kr9d.js} +1 -1
  195. package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +1 -0
  196. package/dist/utils.js +1 -1
  197. package/dist/visually-hidden.d.ts +2 -1
  198. package/dist/visually-hidden.js +1 -1
  199. package/dist/well.d.ts +3 -2
  200. package/dist/well.js +1 -1
  201. package/package.json +17 -16
  202. package/dist/alert-OP_-aGJD.js +0 -1
  203. package/dist/anchor-BnMhJYS4.js +0 -1
  204. package/dist/button-BFpCB99R.js +0 -1
  205. package/dist/button-Dij5vCQG.js +0 -1
  206. package/dist/button-pwkdtR3U.js +0 -1
  207. package/dist/chart-aZLMj4xx.js +0 -2
  208. package/dist/checkbox-DbJSqSNN.js +0 -1
  209. package/dist/choice-SRyLguqU.js +0 -1
  210. package/dist/code-block-BE3Q0iAo.js +0 -12
  211. package/dist/cx-0HCjnNv1.js +0 -1
  212. package/dist/dialog-HIdb5d3I.js +0 -1
  213. package/dist/dropdown-menu-BR_AQNMj.js +0 -1
  214. package/dist/dropdown-menu-Dlpb7600.d.ts +0 -1
  215. package/dist/icon-BT8FnkkJ.js +0 -1
  216. package/dist/icon-U24NfYv7.js +0 -1
  217. package/dist/icons-BQRcOU6J.js +0 -1
  218. package/dist/icons-C3rVfpx9.js +0 -1
  219. package/dist/in-view-T_AAYaaF.js +0 -1
  220. package/dist/input-yq0jLE4e.js +0 -1
  221. package/dist/kbd-CJ8hNZfS.js +0 -1
  222. package/dist/label-BAy0Mg59.js +0 -1
  223. package/dist/list-BleZ-43e.js +0 -1
  224. package/dist/live-region-B2vJRvPH.js +0 -1
  225. package/dist/popover-BJ5XNwzD.js +0 -1
  226. package/dist/primitive-w3wFk2La.js +0 -1
  227. package/dist/select-CUWLEeuf.js +0 -1
  228. package/dist/separator-D98be0gY.js +0 -1
  229. package/dist/sheet-B5x8EO9Y.js +0 -1
  230. package/dist/skeleton-bVDP8BzY.js +0 -1
  231. package/dist/table-D2jh52KA.js +0 -1
  232. package/dist/theme-C1kFFdIk.js +0 -1
  233. package/dist/tooltip-H03l7E4Y.js +0 -1
  234. /package/dist/{types-D85fCNV3.js → css-properties-D85fCNV3.js} +0 -0
@@ -1 +1 @@
1
- import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-BsvE2ntj.js";import{t as r}from"./main-Dv2zuT_b.js";import{c as i}from"react/compiler-runtime";import{jsx as a}from"react/jsx-runtime";const o={Root:r=>{let o=i(16),s,c,l,u,d;o[0]===r?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=r,o[0]=r,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`app-layout`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`group/app-layout bg-base relative isolate flex h-full w-full flex-col`,`overflow-clip`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=a(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Notice:r=>{let o=i(16),s,c,l,u,d;o[0]===r?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=r,o[0]=r,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`app-layout-notice`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex w-full shrink-0 flex-col`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=a(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Workspace:r=>{let o=i(16),s,c,l,u,d;o[0]===r?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=r,o[0]=r,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`app-layout-workspace`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex min-h-0 flex-1`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=a(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Content:r=>{let o=i(16),s,c,l,u,d;o[0]===r?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=r,o[0]=r,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`app-layout-content`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`bg-card border-card-muted relative flex min-w-0 flex-1 flex-col rounded-xl border shadow-sm`,`m-(--app-layout-card-gutter,0.5rem)`,`overflow-clip`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=a(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Header:r=>{let o=i(16),s,c,l,u,d;o[0]===r?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=r,o[0]=r,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`app-layout-header`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`border-card-muted flex h-14 shrink-0 items-center gap-2 border-b px-4`,`group-has-data-[slot~=sidebar-header]/app-layout:h-[calc(var(--sidebar-header-height,4.5rem)-2*var(--app-layout-card-gutter,0.5rem)-2px)]`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=a(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},HeaderStart:r=>{let o=i(16),s,c,l,u,d;o[0]===r?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=r,o[0]=r,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`app-layout-header-start`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex shrink-0 items-center gap-2`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=a(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},HeaderContent:r=>{let o=i(16),s,c,l,u,d;o[0]===r?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=r,o[0]=r,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`app-layout-header-content`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex min-w-0 flex-1 items-center gap-2`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=a(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},HeaderActions:r=>{let o=i(16),s,c,l,u,d;o[0]===r?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=r,o[0]=r,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`app-layout-header-actions`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`ml-auto flex shrink-0 items-center gap-2`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=a(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Body:o=>{let s=i(16),c,l,u,d,f;s[0]===o?(c=s[1],l=s[2],u=s[3],d=s[4],f=s[5]):({asChild:c,children:l,className:u,"data-slot":d,...f}=o,s[0]=o,s[1]=c,s[2]=l,s[3]=u,s[4]=d,s[5]=f);let p=c?n:r,m;s[6]===d?m=s[7]:(m=t(d,`app-layout-body`),s[6]=d,s[7]=m);let h;s[8]===u?h=s[9]:(h=e(`scrollbar relative min-h-0 w-full flex-1 overflow-y-auto overscroll-none`,u),s[8]=u,s[9]=h);let g;return s[10]!==p||s[11]!==l||s[12]!==f||s[13]!==m||s[14]!==h?(g=a(p,{"data-slot":m,className:h,...f,children:l}),s[10]=p,s[11]=l,s[12]=f,s[13]=m,s[14]=h,s[15]=g):g=s[15],g}};export{o as AppLayout};
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-BMfUxs_j.js";import{n as i}from"./alert-vfeV_hso.js";import{t as a}from"./use-is-hydrated-after-paint-r9Cl2mGp.js";import{t as o}from"./main-CC1L9IsH.js";import{t as s}from"./tooltip-NhYXqStK.js";import{n as c}from"./cookie-ca4g5CKp.js";import{c as l}from"react/compiler-runtime";import{createContext as u,useContext as d,useId as f,useLayoutEffect as p,useRef as m,useState as h}from"react";import g from"tiny-invariant";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{SidebarSimpleIcon as y}from"@phosphor-icons/react/SidebarSimple";const b=r=>{let i=l(16),a,o,s,c,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?n:`div`,f;i[6]===c?f=i[7]:(f=t(c,`app-layout`),i[6]=c,i[7]=f);let p;i[8]===s?p=i[9]:(p=e(`group/app-layout bg-base relative isolate flex h-full w-full flex-col`,`overflow-clip`,s),i[8]=s,i[9]=p);let m;return i[10]!==d||i[11]!==o||i[12]!==u||i[13]!==f||i[14]!==p?(m=/* @__PURE__ */ _(d,{"data-slot":f,className:p,...u,children:o}),i[10]=d,i[11]=o,i[12]=u,i[13]=f,i[14]=p,i[15]=m):m=i[15],m},x=r=>{let i=l(16),a,o,s,c,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?n:`div`,f;i[6]===c?f=i[7]:(f=t(c,`app-layout-notice`),i[6]=c,i[7]=f);let p;i[8]===s?p=i[9]:(p=e(`flex w-full shrink-0 flex-col`,s),i[8]=s,i[9]=p);let m;return i[10]!==d||i[11]!==o||i[12]!==u||i[13]!==f||i[14]!==p?(m=/* @__PURE__ */ _(d,{"data-slot":f,className:p,...u,children:o}),i[10]=d,i[11]=o,i[12]=u,i[13]=f,i[14]=p,i[15]=m):m=i[15],m},S=r=>{let i=l(16),a,o,s,c,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?n:`div`,f;i[6]===c?f=i[7]:(f=t(c,`app-layout-workspace`),i[6]=c,i[7]=f);let p;i[8]===s?p=i[9]:(p=e(`flex min-h-0 flex-1`,`min-w-0`,`relative`,`mx-auto w-full max-w-(--app-layout-max-width,128rem)`,s),i[8]=s,i[9]=p);let m;return i[10]!==d||i[11]!==o||i[12]!==u||i[13]!==f||i[14]!==p?(m=/* @__PURE__ */ _(d,{"data-slot":f,className:p,...u,children:o}),i[10]=d,i[11]=o,i[12]=u,i[13]=f,i[14]=p,i[15]=m):m=i[15],m},C=r=>{let i=l(16),a,o,s,c,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?n:`div`,f;i[6]===c?f=i[7]:(f=t(c,`app-layout-content`),i[6]=c,i[7]=f);let p;i[8]===s?p=i[9]:(p=e(`bg-card border-card-muted relative flex min-w-0 flex-1 flex-col rounded-xl border shadow-sm`,`m-(--app-layout-card-gutter,0.5rem)`,`overflow-clip`,s),i[8]=s,i[9]=p);let m;return i[10]!==d||i[11]!==o||i[12]!==u||i[13]!==f||i[14]!==p?(m=/* @__PURE__ */ _(d,{"data-slot":f,className:p,...u,children:o}),i[10]=d,i[11]=o,i[12]=u,i[13]=f,i[14]=p,i[15]=m):m=i[15],m},w=`h-14 group-has-data-[slot~=sidebar-header]/app-layout:h-[calc(var(--sidebar-header-height,4.5rem)-2*var(--app-layout-card-gutter,0.5rem)-2px)]`,T=r=>{let i=l(16),a,o,s,c,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?n:`div`,f;i[6]===c?f=i[7]:(f=t(c,`app-layout-header`),i[6]=c,i[7]=f);let p;i[8]===s?p=i[9]:(p=e(`border-card-muted flex shrink-0 items-center gap-2 border-b px-4`,w,s),i[8]=s,i[9]=p);let m;return i[10]!==d||i[11]!==o||i[12]!==u||i[13]!==f||i[14]!==p?(m=/* @__PURE__ */ _(d,{"data-slot":f,className:p,...u,children:o}),i[10]=d,i[11]=o,i[12]=u,i[13]=f,i[14]=p,i[15]=m):m=i[15],m},E=r=>{let i=l(16),a,o,s,c,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?n:`div`,f;i[6]===c?f=i[7]:(f=t(c,`app-layout-header-start`),i[6]=c,i[7]=f);let p;i[8]===s?p=i[9]:(p=e(`flex shrink-0 items-center gap-2`,s),i[8]=s,i[9]=p);let m;return i[10]!==d||i[11]!==o||i[12]!==u||i[13]!==f||i[14]!==p?(m=/* @__PURE__ */ _(d,{"data-slot":f,className:p,...u,children:o}),i[10]=d,i[11]=o,i[12]=u,i[13]=f,i[14]=p,i[15]=m):m=i[15],m},D=r=>{let i=l(16),a,o,s,c,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?n:`div`,f;i[6]===c?f=i[7]:(f=t(c,`app-layout-header-content`),i[6]=c,i[7]=f);let p;i[8]===s?p=i[9]:(p=e(`flex min-w-0 flex-1 items-center gap-2`,s),i[8]=s,i[9]=p);let m;return i[10]!==d||i[11]!==o||i[12]!==u||i[13]!==f||i[14]!==p?(m=/* @__PURE__ */ _(d,{"data-slot":f,className:p,...u,children:o}),i[10]=d,i[11]=o,i[12]=u,i[13]=f,i[14]=p,i[15]=m):m=i[15],m},O=r=>{let i=l(16),a,o,s,c,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?n:`div`,f;i[6]===c?f=i[7]:(f=t(c,`app-layout-header-actions`),i[6]=c,i[7]=f);let p;i[8]===s?p=i[9]:(p=e(`ml-auto flex shrink-0 items-center gap-2`,s),i[8]=s,i[9]=p);let m;return i[10]!==d||i[11]!==o||i[12]!==u||i[13]!==f||i[14]!==p?(m=/* @__PURE__ */ _(d,{"data-slot":f,className:p,...u,children:o}),i[10]=d,i[11]=o,i[12]=u,i[13]=f,i[14]=p,i[15]=m):m=i[15],m},k=r=>{let i=l(16),a,s,c,u,d;i[0]===r?(a=i[1],s=i[2],c=i[3],u=i[4],d=i[5]):({asChild:a,children:s,className:c,"data-slot":u,...d}=r,i[0]=r,i[1]=a,i[2]=s,i[3]=c,i[4]=u,i[5]=d);let f=a?n:o,p;i[6]===u?p=i[7]:(p=t(u,`app-layout-body`),i[6]=u,i[7]=p);let m;i[8]===c?m=i[9]:(m=e(`scrollbar relative min-h-0 w-full flex-1 overflow-y-auto overscroll-none`,c),i[8]=c,i[9]=m);let h;return i[10]!==f||i[11]!==s||i[12]!==d||i[13]!==p||i[14]!==m?(h=/* @__PURE__ */ _(f,{"data-slot":p,className:m,...d,children:s}),i[10]=f,i[11]=s,i[12]=d,i[13]=p,i[14]=m,i[15]=h):h=i[15],h},A={sm:`sm:data-state-closed:basis-0 max-sm:absolute max-sm:inset-y-(--app-layout-card-gutter,0.5rem) max-sm:left-(--app-layout-card-gutter,0.5rem) max-sm:right-(--app-layout-card-gutter,0.5rem) max-sm:z-20 max-sm:my-0 max-sm:rounded-xl max-sm:shadow-lg max-sm:[--_side-panel-content-width:100%] max-sm:[--_side-panel-content-inset:0px] max-sm:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] max-sm:data-state-closed:invisible`,md:`md:data-state-closed:basis-0 max-md:absolute max-md:inset-y-(--app-layout-card-gutter,0.5rem) max-md:right-(--app-layout-card-gutter,0.5rem) max-md:z-20 max-md:my-0 max-md:w-[min(24rem,calc(100vw-5rem))] max-md:rounded-xl max-md:shadow-lg max-md:[--_side-panel-content-width:100%] max-md:[--_side-panel-content-inset:0px] max-md:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] max-md:data-state-closed:invisible max-sm:left-(--app-layout-card-gutter,0.5rem) max-sm:w-auto`,lg:`lg:data-state-closed:basis-0 max-lg:absolute max-lg:inset-y-(--app-layout-card-gutter,0.5rem) max-lg:right-(--app-layout-card-gutter,0.5rem) max-lg:z-20 max-lg:my-0 max-lg:w-[min(24rem,calc(100vw-5rem))] max-lg:rounded-xl max-lg:shadow-lg max-lg:[--_side-panel-content-width:100%] max-lg:[--_side-panel-content-inset:0px] max-lg:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] max-lg:data-state-closed:invisible max-md:left-(--app-layout-card-gutter,0.5rem) max-md:w-auto`},j=u(null);function M(){let e=d(j);return g(e,`useSidePanel must be used within AppLayout.SidePanelRoot.`),e.state}function N(e){let t=d(j);return g(t,`AppLayout.${e} must be rendered inside AppLayout.SidePanelRoot.`),t}const P=e=>{let t=l(19),{children:n,defaultOpen:r,onOpenChange:a,open:o}=e,s=r!==void 0&&r,c=f(),u=o!=null,[d,g]=h(s),v=u?o:d,y=m(a),b;t[0]===a?b=t[1]:(b=()=>{y.current=a},t[0]=a,t[1]=b),p(b);let x=m(null),S;t[2]===u?S=t[3]:(S=e=>{u||g(e),y.current?.(e)},t[2]=u,t[3]=S);let C=S,w;t[4]!==v||t[5]!==C?(w=()=>{C(!v)},t[4]=v,t[5]=C,t[6]=w):w=t[6];let T=w,E,D;t[7]!==v||t[8]!==c?(E=()=>{if(v)return;let e=x.current;if(x.current=null,e==null)return;let t=document.getElementById(c),n=document.activeElement,r=t!=null&&t.contains(n),a=n===document.body;if(!r&&!a)return;let o=document.querySelectorAll(`[aria-controls="${c}"]`);for(let e of o)if(!(t!=null&&t.contains(e)||!i(e))&&(e.focus(),document.activeElement===e))return},D=[v,c],t[7]=v,t[8]=c,t[9]=E,t[10]=D):(E=t[9],D=t[10]),p(E,D);let O;t[11]!==v||t[12]!==c||t[13]!==C||t[14]!==T?(O={lastFocusedInsideRef:x,state:{open:v,panelId:c,setOpen:C,toggle:T}},t[11]=v,t[12]=c,t[13]=C,t[14]=T,t[15]=O):O=t[15];let k=O,A;return t[16]!==n||t[17]!==k?(A=/* @__PURE__ */ _(j.Provider,{value:k,children:n}),t[16]=n,t[17]=k,t[18]=A):A=t[18],A},F=n=>{let r=l(33),i,o,s,c,u,d,f;r[0]===n?(i=r[1],o=r[2],s=r[3],c=r[4],u=r[5],d=r[6],f=r[7]):({children:i,className:o,"data-slot":s,mobileBreakpoint:f,onBlur:c,onFocus:u,...d}=n,r[0]=n,r[1]=i,r[2]=o,r[3]=s,r[4]=c,r[5]=u,r[6]=d,r[7]=f);let p=f===void 0?`lg`:f,{lastFocusedInsideRef:m,state:h}=N(`SidePanel`),{open:g,panelId:v}=h,y=a(),b;r[8]===s?b=r[9]:(b=t(s,`app-layout-side-panel`),r[8]=s,r[9]=b);let x=A[p],S;r[10]!==o||r[11]!==x?(S=e(`relative min-w-0`,`isolate`,`overflow-x-clip`,`[--_side-panel-content-width:var(--app-layout-side-panel-width,clamp(21rem,24vw,27rem))] [--_side-panel-content-inset:var(--app-layout-card-gutter,0.5rem)] [--_side-panel-box-width:calc(var(--app-layout-side-panel-width,clamp(21rem,24vw,27rem))+var(--app-layout-card-gutter,0.5rem))]`,`grow-0 shrink-0 basis-(--_side-panel-box-width)`,`my-(--app-layout-card-gutter,0.5rem) mr-0 ml-0`,`transition-[flex-basis,translate,visibility] duration-200 ease-out-strong motion-reduce:transition-none not-data-hydrated:transition-none`,`data-state-closed:pointer-events-none`,x,o),r[10]=o,r[11]=x,r[12]=S):S=r[12];let C;r[13]!==m||r[14]!==u?(C=e=>{u?.(e),m.current=e.target},r[13]=m,r[14]=u,r[15]=C):C=r[15];let w;r[16]!==m||r[17]!==c?(w=e=>{c?.(e),e.relatedTarget!=null&&!e.currentTarget.contains(e.relatedTarget)&&(m.current=null)},r[16]=m,r[17]=c,r[18]=w):w=r[18];let T=g?`open`:`closed`,E=y?``:void 0,D=!g,O;r[19]===Symbol.for(`react.memo_cache_sentinel`)?(O=e(`bg-card border-card-muted absolute inset-y-0 flex flex-col rounded-xl border shadow-sm`,`right-(--_side-panel-content-inset) w-(--_side-panel-content-width)`,`overflow-clip`),r[19]=O):O=r[19];let k;r[20]===i?k=r[21]:(k=/* @__PURE__ */ _(`div`,{className:O,children:i}),r[20]=i,r[21]=k);let j;return r[22]!==v||r[23]!==d||r[24]!==D||r[25]!==k||r[26]!==b||r[27]!==S||r[28]!==C||r[29]!==w||r[30]!==T||r[31]!==E?(j=/* @__PURE__ */ _(`aside`,{"data-slot":b,className:S,onFocus:C,onBlur:w,...d,id:v,"data-state":T,"data-hydrated":E,inert:D,children:k}),r[22]=v,r[23]=d,r[24]=D,r[25]=k,r[26]=b,r[27]=S,r[28]=C,r[29]=w,r[30]=T,r[31]=E,r[32]=j):j=r[32],j},I=/* @__PURE__ */ _(y,{mirrored:!0}),L={Root:b,Notice:x,Workspace:S,Content:C,Header:T,HeaderStart:E,HeaderContent:D,HeaderActions:O,Body:k,SidePanelRoot:P,SidePanel:F,SidePanelTrigger:e=>{let n=l(29),i,a,o,c,u,d,f;n[0]===e?(i=n[1],a=n[2],o=n[3],c=n[4],u=n[5],d=n[6],f=n[7]):({appearance:c,"data-slot":i,icon:u,intent:d,label:f,onClick:a,...o}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o,n[4]=c,n[5]=u,n[6]=d,n[7]=f);let p=c===void 0?`ghost`:c,m=u===void 0?I:u,h=d===void 0?`neutral`:d,g=f===void 0?`Toggle side panel`:f,{open:y,panelId:b,toggle:x}=N(`SidePanelTrigger`).state,S;n[8]===i?S=n[9]:(S=t(i,`app-layout-side-panel-trigger`),n[8]=i,n[9]=S);let C=y?`open`:`closed`,w;n[10]!==a||n[11]!==x?(w=e=>{a?.(e),e.defaultPrevented||x()},n[10]=a,n[11]=x,n[12]=w):w=n[12];let T;n[13]!==p||n[14]!==m||n[15]!==h||n[16]!==g||n[17]!==y||n[18]!==b||n[19]!==o||n[20]!==S||n[21]!==C||n[22]!==w?(T=/* @__PURE__ */ _(s.Trigger,{asChild:!0,children:/* @__PURE__ */ _(r,{appearance:p,"aria-controls":b,"aria-expanded":y,"data-slot":S,"data-state":C,icon:m,intent:h,label:g,onClick:w,...o})}),n[13]=p,n[14]=m,n[15]=h,n[16]=g,n[17]=y,n[18]=b,n[19]=o,n[20]=S,n[21]=C,n[22]=w,n[23]=T):T=n[23];let E;n[24]===g?E=n[25]:(E=/* @__PURE__ */ _(s.Content,{"data-slot":`app-layout-side-panel-trigger-tooltip`,children:g}),n[24]=g,n[25]=E);let D;return n[26]!==T||n[27]!==E?(D=/* @__PURE__ */ v(s.Root,{children:[T,E]}),n[26]=T,n[27]=E,n[28]=D):D=n[28],D},SidePanelHeader:r=>{let i=l(16),a,o,s,c,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?n:`div`,f;i[6]===c?f=i[7]:(f=t(c,`app-layout-side-panel-header`),i[6]=c,i[7]=f);let p;i[8]===s?p=i[9]:(p=e(`border-card-muted flex shrink-0 items-center gap-2 border-b px-4`,w,s),i[8]=s,i[9]=p);let m;return i[10]!==d||i[11]!==o||i[12]!==u||i[13]!==f||i[14]!==p?(m=/* @__PURE__ */ _(d,{"data-slot":f,className:p,...u,children:o}),i[10]=d,i[11]=o,i[12]=u,i[13]=f,i[14]=p,i[15]=m):m=i[15],m},SidePanelBody:r=>{let i=l(16),a,o,s,c,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?n:`div`,f;i[6]===c?f=i[7]:(f=t(c,`app-layout-side-panel-body`),i[6]=c,i[7]=f);let p;i[8]===s?p=i[9]:(p=e(`scrollbar relative min-h-0 w-full flex-1 overflow-y-auto overscroll-none`,s),i[8]=s,i[9]=p);let m;return i[10]!==d||i[11]!==o||i[12]!==u||i[13]!==f||i[14]!==p?(m=/* @__PURE__ */ _(d,{"data-slot":f,className:p,...u,children:o}),i[10]=d,i[11]=o,i[12]=u,i[13]=f,i[14]=p,i[15]=m):m=i[15],m},SidePanelFooter:r=>{let i=l(16),a,o,s,c,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?n:`div`,f;i[6]===c?f=i[7]:(f=t(c,`app-layout-side-panel-footer`),i[6]=c,i[7]=f);let p;i[8]===s?p=i[9]:(p=e(`flex shrink-0 flex-col gap-2 px-3 pb-3`,s),i[8]=s,i[9]=p);let m;return i[10]!==d||i[11]!==o||i[12]!==u||i[13]!==f||i[14]!==p?(m=/* @__PURE__ */ _(d,{"data-slot":f,className:p,...u,children:o}),i[10]=d,i[11]=o,i[12]=u,i[13]=f,i[14]=p,i[15]=m):m=i[15],m}},R=`mantle-side-panel-state`,z={closed:`closed`,open:`open`};function B(e){let t=c(e,R);if(t===z.open)return!0;if(t===z.closed)return!1}function V(e,t={}){let{domain:n,maxAge:r=31536e3,path:i=`/`,sameSite:a=`Lax`,secure:o=!1}=t,s=e?z.open:z.closed,c=[`${R}=${s}`,`Max-Age=${r}`,`Path=${i}`];return n!=null&&c.push(`Domain=${n}`),c.push(`SameSite=${a}`),o&&c.push(`Secure`),c.join(`; `)}export{L as AppLayout,R as SIDE_PANEL_STATE_COOKIE_NAME,B as extractSidePanelStateCookie,V as serializeSidePanelStateCookie,M as useSidePanel};
@@ -1,11 +1,11 @@
1
- import { _ as PointShape, a as LegendPrimitiveProps, c as XAxisPrimitiveProps, f as ChartDatum, g as CurveKind, h as ContinuousXScale, i as GridPrimitiveProps, l as YAxisPrimitiveProps, m as ChartSeriesSlot, n as ChartRootBaseProps, o as ReferenceLinePrimitiveProps, p as ChartDatumEvent, r as CopyButtonPrimitiveProps, s as TooltipPrimitiveProps, t as ChartAccessibilityProps, v as SeriesColor } from "./chart-DgaWVBqi.js";
1
+ import { _ as CurveKind, a as GridPrimitiveProps, c as TooltipPrimitiveProps, g as ContinuousXScale, h as ChartSeriesSlot, i as CopyButtonPrimitiveProps, l as XAxisPrimitiveProps, m as ChartDatumEvent, n as ChartMode, o as LegendPrimitiveProps, p as ChartDatum, r as ChartRootBaseProps, s as ReferenceLinePrimitiveProps, t as ChartAccessibilityProps, u as YAxisPrimitiveProps, v as PointShape, y as SeriesColor } from "./chart-23KQ1ZNO.js";
2
2
  //#region src/components/area-chart/area-chart.d.ts
3
3
  /**
4
4
  * Props for {@link AreaChart.Root}. Areas fill from a shared zero baseline, so
5
5
  * the y domain minimum is fixed at `0` — a truncated-area axis is
6
6
  * unrepresentable.
7
7
  */
8
- type AreaChartRootProps<TDatum extends ChartDatum = ChartDatum> = Omit<ChartRootBaseProps, "yDomain"> & ChartAccessibilityProps & {
8
+ type AreaChartRootProps<TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive"> = Omit<ChartRootBaseProps, "yDomain"> & ChartAccessibilityProps<TMode> & {
9
9
  /** Rows of data; each `AreaChart.Area` reads one numeric key per row. */
10
10
  data: readonly TDatum[];
11
11
  /** The key of each row's x value. */
@@ -101,22 +101,43 @@ type AreaChartCopyButtonProps = CopyButtonPrimitiveProps;
101
101
  /**
102
102
  * The root of an area chart: owns the data, the scales, the canvas renderer,
103
103
  * and the entire interaction contract (a crosshair with an every-series
104
- * tooltip, keyboard stepping with polite announcements, an sr-only data
105
- * table, Enter/Space + click activation). Areas fill with a 10% wash of the
106
- * series color plus a 2px band-edge stroke; `stacked` on the Root stacks the
107
- * series in registration order, the first-registered series at the baseline.
108
- * Large datasets decimate before painting on canvas. Compose the chrome and
109
- * series parts as children.
104
+ * tooltip, keyboard stepping with polite announcements, an sr-only
105
+ * description, an sr-only data table, Enter/Space + click activation). Areas
106
+ * fill with a 10% wash of the series color plus a 2px band-edge stroke;
107
+ * `stacked` on the Root stacks the series in registration order, the
108
+ * first-registered series at the baseline. Large datasets decimate before
109
+ * painting on canvas. Compose the chrome and series parts as children.
110
+ *
111
+ * A Root mounts dormant: a shell of the plot, the named overlay, and its
112
+ * sr-only description. It builds its canvas, its hover layers, and its engine
113
+ * once it comes within one viewport of the visible area, takes focus, or
114
+ * prints (on-screen charts first, a few milliseconds at a time), and it mounts
115
+ * the sr-only data table once focus lands inside it. A list of charts pays
116
+ * for the ones a reader can see, and a page of sparklines holds no hidden
117
+ * tables until a reader asks for one.
110
118
  *
111
119
  * The Root's own subtree is addressable by slot: `area-chart` on the wrapper,
112
120
  * then `area-chart-plot`, `area-chart-canvas`, `area-chart-crosshair`,
113
- * `area-chart-hover-band`, `area-chart-markers`, `area-chart-tooltip`, and
114
- * `area-chart-data-table`. An area chart shows the crosshair and one marker dot
115
- * per series, and never the band, but all three layers mount on every kind.
121
+ * `area-chart-hover-band`, `area-chart-markers`, `area-chart-tooltip`,
122
+ * `area-chart-description`, and, once focus lands inside the chart,
123
+ * `area-chart-data-table`. An area chart shows the crosshair and one marker
124
+ * dot per series, and never the band. The canvas and the three layers are
125
+ * engine-owned: absent from server HTML and from a dormant chart, inserted at
126
+ * activation (near the viewport, on focus, or before print). A static or
127
+ * decorative chart inserts the canvas alone. The tooltip
128
+ * surface mounts on the first hover or keyboard step and stays.
116
129
  * Each hover dot carries `chart-active-point` plus a `data-shape` of
117
130
  * `"circle"`, `"square"`, `"triangle"`, `"diamond"`, `"triangle-down"`,
118
131
  * `"plus"`, `"cross"`, or `"star"`, naming the glyph its series wears.
119
132
  *
133
+ * **Data attributes:**
134
+ *
135
+ * | Data Attribute | Value | Description |
136
+ * | --- | --- | --- |
137
+ * | `data-slot` | `"area-chart-description"` | The `sr-only` description the overlay's `aria-describedby` points at: the chart kind, the point count, the x range, the series labels, and, on an interactive chart, the keyboard instructions. Omitted when `mode="decorative"`. |
138
+ * | `data-slot` | `"area-chart-data-table"` | The `sr-only` data table. Mounts once focus lands inside the chart (`data-state` flips to `"engaged"`) and stays. Interactive charts only. |
139
+ * | `data-state` | `"dormant"` \| `"engaged"` | On the Root. Flips to `"engaged"` once focus lands inside the chart, and never flips back. The data table mounts with it. Visibility paints the chart but never flips it. Interactive charts only. |
140
+ *
120
141
  * @see https://mantle.ngrok.com/components/charts/area-chart#areachartroot
121
142
  *
122
143
  * @example
@@ -138,7 +159,7 @@ type AreaChartCopyButtonProps = CopyButtonPrimitiveProps;
138
159
  * </AreaChart.Root>
139
160
  * ```
140
161
  */
141
- declare const Root: <TDatum extends ChartDatum = ChartDatum>(props: AreaChartRootProps<TDatum>) => import("react").JSX.Element;
162
+ declare const Root: <TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive">(props: AreaChartRootProps<TDatum, TMode>) => import("react").JSX.Element;
142
163
  /**
143
164
  * One area series. Renders nothing itself — it registers the series with the
144
165
  * chart, which paints it on canvas. Compose one `Area` per series; with
@@ -343,10 +364,12 @@ declare const CopyButton: (props: AreaChartCopyButtonProps) => import("react").J
343
364
  * `stacked` prop stacks the series in registration order from the baseline.
344
365
  * Series colors come from the theme's validated `--color-chart-*`
345
366
  * tokens; areas keep a fixed slot color for the chart's lifetime even as
346
- * other series are filtered in and out. Interaction — a crosshair with an
347
- * every-series tooltip, keyboard stepping, aria-live announcements, and an
348
- * sr-only data table — ships with `Root` unconditionally; large datasets
349
- * decimate before painting on canvas.
367
+ * other series are filtered in and out. Interaction ships with `Root`
368
+ * unconditionally: a crosshair with an every-series tooltip, keyboard
369
+ * stepping, aria-live announcements, and an sr-only description. A Root builds
370
+ * and paints its canvas once it comes within one viewport of the visible
371
+ * area, takes focus, or prints, and it mounts its sr-only data table once
372
+ * focus lands inside it. Large datasets decimate before painting on canvas.
350
373
  *
351
374
  * **CSS variables (public API):**
352
375
  *
@@ -359,7 +382,7 @@ declare const CopyButton: (props: AreaChartCopyButtonProps) => import("react").J
359
382
  * `AreaChart.Area` sets one series and takes any CSS color. To restyle a slot itself,
360
383
  * redeclare its token on `Root` —
361
384
  * `className="[--color-chart-1:var(--color-brand)]"`. The engine resolves every
362
- * token through a probe inside `Root`, so a declaration scoped there wins for
385
+ * token from `Root`'s computed style, so a declaration scoped there wins for
363
386
  * that chart and leaves every other chart on the page alone.
364
387
  *
365
388
  * @see https://mantle.ngrok.com/components/charts/area-chart
@@ -571,4 +594,4 @@ declare const AreaChart: {
571
594
  readonly CopyButton: typeof CopyButton;
572
595
  };
573
596
  //#endregion
574
- export { AreaChart, type AreaChartAreaProps, type AreaChartCopyButtonProps, type AreaChartGridProps, type AreaChartLegendProps, type AreaChartReferenceLineProps, type AreaChartRootProps, type AreaChartTooltipProps, type AreaChartXAxisProps, type AreaChartYAxisProps, type ChartDatumEvent };
597
+ export { AreaChart, type AreaChartAreaProps, type AreaChartCopyButtonProps, type AreaChartGridProps, type AreaChartLegendProps, type AreaChartReferenceLineProps, type AreaChartRootProps, type AreaChartTooltipProps, type AreaChartXAxisProps, type AreaChartYAxisProps, type ChartDatumEvent, type ChartMode };
@@ -1 +1 @@
1
- import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-aZLMj4xx.js";import{c as l}from"react/compiler-runtime";import{jsx as u}from"react/jsx-runtime";const d={Root:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=u(o,{kind:`area`,componentName:`AreaChart`,slotName:`area-chart`,...e}),t[0]=e,t[1]=n),n},Area:e=>a(`AreaChart.Area`,`area`,e),Grid:e=>n(`AreaChart.Grid`,e),XAxis:e=>t(`AreaChart.XAxis`,e),YAxis:e=>r(`AreaChart.YAxis`,e),ReferenceLine:t=>e(`AreaChart.ReferenceLine`,t),Tooltip:e=>s(`AreaChart.Tooltip`,e),Legend:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=u(i,{partName:`AreaChart.Legend`,slotName:`area-chart`,...e}),t[0]=e,t[1]=n),n},CopyButton:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=u(c,{partName:`AreaChart.CopyButton`,slotName:`area-chart`,...e}),t[0]=e,t[1]=n),n}};export{d as AreaChart};
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-BRkJfptA.js";import{c as l}from"react/compiler-runtime";import{jsx as u}from"react/jsx-runtime";const d={Root:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(o,{kind:`area`,componentName:`AreaChart`,slotName:`area-chart`,...e}),t[0]=e,t[1]=n),n},Area:e=>a(`AreaChart.Area`,`area`,e),Grid:e=>n(`AreaChart.Grid`,e),XAxis:e=>t(`AreaChart.XAxis`,e),YAxis:e=>r(`AreaChart.YAxis`,e),ReferenceLine:t=>e(`AreaChart.ReferenceLine`,t),Tooltip:e=>s(`AreaChart.Tooltip`,e),Legend:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(i,{partName:`AreaChart.Legend`,slotName:`area-chart`,...e}),t[0]=e,t[1]=n),n},CopyButton:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(c,{partName:`AreaChart.CopyButton`,slotName:`area-chart`,...e}),t[0]=e,t[1]=n),n}};export{d as AreaChart};
package/dist/avatar.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-BsvE2ntj.js";import{c as r}from"react/compiler-runtime";import{useState as i}from"react";import{jsx as a}from"react/jsx-runtime";const o={circle:`rounded-full`,square:`rounded-md`},s=[`bg-emerald-500`,`bg-gray-500`,`bg-red-500`,`bg-violet-500`,`bg-cyan-500`,`bg-rose-500`,`bg-purple-500`,`bg-fuchsia-500`,`bg-green-500`,`bg-orange-500`,`bg-indigo-500`,`bg-teal-500`,`bg-yellow-500`,`bg-sky-500`,`bg-pink-500`,`bg-blue-500`,`bg-amber-500`];function c(e){let t=5381;for(let n=0;n<e.length;n+=1)t=t*33^e.charCodeAt(n);return t>>>0}function l(e){let t=c(e)%s.length;return s[t]??`bg-neutral-500`}function u(e){return e.replace(/[\p{P}`~!@#$%^&*+|=<>]/gu,``).trim().split(/\s+/).slice(0,2).map(e=>Array.from(e.toUpperCase())[0]??``).join(``)||`?`}const d={Root:i=>{let s=r(18),c,u,d,f,p,m;s[0]===i?(c=s[1],u=s[2],d=s[3],f=s[4],p=s[5],m=s[6]):({appearance:m,asChild:c,className:u,colorSeed:d,"data-slot":f,...p}=i,s[0]=i,s[1]=c,s[2]=u,s[3]=d,s[4]=f,s[5]=p,s[6]=m);let h=m===void 0?`circle`:m,g=c?n:`span`,_=o[h],v;s[7]!==u||s[8]!==d||s[9]!==_?(v=e(`text-body bg-neutral-500/15 relative flex size-7 shrink-0 items-center justify-center overflow-hidden text-xs font-medium select-none`,_,d!=null&&[`text-static-white`,l(d)],u),s[7]=u,s[8]=d,s[9]=_,s[10]=v):v=s[10];let y;s[11]===f?y=s[12]:(y=t(f,`avatar`),s[11]=f,s[12]=y);let b;return s[13]!==g||s[14]!==p||s[15]!==v||s[16]!==y?(b=a(g,{className:v,"data-slot":y,...p}),s[13]=g,s[14]=p,s[15]=v,s[16]=y,s[17]=b):b=s[17],b},Image:o=>{let s=r(21),c,l,u,d,f,p;s[0]===o?(c=s[1],l=s[2],u=s[3],d=s[4],f=s[5],p=s[6]):({asChild:c,className:l,"data-slot":u,onError:d,src:p,...f}=o,s[0]=o,s[1]=c,s[2]=l,s[3]=u,s[4]=d,s[5]=f,s[6]=p);let[m,h]=i(),g=c?n:`img`;if(p==null||p===``||p===m)return null;let _;s[7]===l?_=s[8]:(_=e(`absolute inset-0 size-full object-cover`,l),s[7]=l,s[8]=_);let v;s[9]===u?v=s[10]:(v=t(u,`avatar-image`),s[9]=u,s[10]=v);let y;s[11]!==d||s[12]!==p?(y=e=>{d?.(e),e.defaultPrevented||h(p)},s[11]=d,s[12]=p,s[13]=y):y=s[13];let b;return s[14]!==g||s[15]!==f||s[16]!==p||s[17]!==_||s[18]!==v||s[19]!==y?(b=a(g,{className:_,"data-slot":v,onError:y,src:p,...f}),s[14]=g,s[15]=f,s[16]=p,s[17]=_,s[18]=v,s[19]=y,s[20]=b):b=s[20],b},Fallback:i=>{let o=r(21),s,c,l,d,f,p;o[0]===i?(s=o[1],c=o[2],l=o[3],d=o[4],f=o[5],p=o[6]):({asChild:s,children:c,className:l,"data-slot":d,name:f,...p}=i,o[0]=i,o[1]=s,o[2]=c,o[3]=l,o[4]=d,o[5]=f,o[6]=p);let m=s?n:`span`,h=f!=null||void 0,g;o[7]===l?g=o[8]:(g=e(`flex size-full items-center justify-center`,l),o[7]=l,o[8]=g);let _;o[9]===d?_=o[10]:(_=t(d,`avatar-fallback`),o[9]=d,o[10]=_);let v;o[11]!==c||o[12]!==f?(v=f==null?c:u(f),o[11]=c,o[12]=f,o[13]=v):v=o[13];let y;return o[14]!==m||o[15]!==p||o[16]!==h||o[17]!==g||o[18]!==_||o[19]!==v?(y=a(m,{"aria-hidden":h,className:g,"data-slot":_,...p,children:v}),o[14]=m,o[15]=p,o[16]=h,o[17]=g,o[18]=_,o[19]=v,o[20]=y):y=o[20],y}};export{d as Avatar};
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{c as r}from"react/compiler-runtime";import{useState as i}from"react";import{jsx as a}from"react/jsx-runtime";const o={circle:`rounded-full`,square:`rounded-md`},s=[`bg-emerald-500`,`bg-gray-500`,`bg-red-500`,`bg-violet-500`,`bg-cyan-500`,`bg-rose-500`,`bg-purple-500`,`bg-fuchsia-500`,`bg-green-500`,`bg-orange-500`,`bg-indigo-500`,`bg-teal-500`,`bg-yellow-500`,`bg-sky-500`,`bg-pink-500`,`bg-blue-500`,`bg-amber-500`];function c(e){let t=5381;for(let n=0;n<e.length;n+=1)t=t*33^e.charCodeAt(n);return t>>>0}function l(e){let t=c(e)%s.length;return s[t]??`bg-neutral-500`}function u(e){return e.replace(/[\p{P}`~!@#$%^&*+|=<>]/gu,``).trim().split(/\s+/).slice(0,2).map(e=>Array.from(e.toUpperCase())[0]??``).join(``)||`?`}const d={Root:i=>{let s=r(18),c,u,d,f,p,m;s[0]===i?(c=s[1],u=s[2],d=s[3],f=s[4],p=s[5],m=s[6]):({appearance:m,asChild:c,className:u,colorSeed:d,"data-slot":f,...p}=i,s[0]=i,s[1]=c,s[2]=u,s[3]=d,s[4]=f,s[5]=p,s[6]=m);let h=m===void 0?`circle`:m,g=c?n:`span`,_=o[h],v;s[7]!==u||s[8]!==d||s[9]!==_?(v=e(`text-body bg-neutral-500/15 relative flex size-7 shrink-0 items-center justify-center overflow-hidden text-xs font-medium select-none`,_,d!=null&&[`text-static-white`,l(d)],u),s[7]=u,s[8]=d,s[9]=_,s[10]=v):v=s[10];let y;s[11]===f?y=s[12]:(y=t(f,`avatar`),s[11]=f,s[12]=y);let b;return s[13]!==g||s[14]!==p||s[15]!==v||s[16]!==y?(b=/* @__PURE__ */ a(g,{className:v,"data-slot":y,...p}),s[13]=g,s[14]=p,s[15]=v,s[16]=y,s[17]=b):b=s[17],b},Image:o=>{let s=r(21),c,l,u,d,f,p;s[0]===o?(c=s[1],l=s[2],u=s[3],d=s[4],f=s[5],p=s[6]):({asChild:c,className:l,"data-slot":u,onError:d,src:p,...f}=o,s[0]=o,s[1]=c,s[2]=l,s[3]=u,s[4]=d,s[5]=f,s[6]=p);let[m,h]=i(),g=c?n:`img`;if(p==null||p===``||p===m)return null;let _;s[7]===l?_=s[8]:(_=e(`absolute inset-0 size-full object-cover`,l),s[7]=l,s[8]=_);let v;s[9]===u?v=s[10]:(v=t(u,`avatar-image`),s[9]=u,s[10]=v);let y;s[11]!==d||s[12]!==p?(y=e=>{d?.(e),e.defaultPrevented||h(p)},s[11]=d,s[12]=p,s[13]=y):y=s[13];let b;return s[14]!==g||s[15]!==f||s[16]!==p||s[17]!==_||s[18]!==v||s[19]!==y?(b=/* @__PURE__ */ a(g,{className:_,"data-slot":v,onError:y,src:p,...f}),s[14]=g,s[15]=f,s[16]=p,s[17]=_,s[18]=v,s[19]=y,s[20]=b):b=s[20],b},Fallback:i=>{let o=r(21),s,c,l,d,f,p;o[0]===i?(s=o[1],c=o[2],l=o[3],d=o[4],f=o[5],p=o[6]):({asChild:s,children:c,className:l,"data-slot":d,name:f,...p}=i,o[0]=i,o[1]=s,o[2]=c,o[3]=l,o[4]=d,o[5]=f,o[6]=p);let m=s?n:`span`,h=f!=null||void 0,g;o[7]===l?g=o[8]:(g=e(`flex size-full items-center justify-center`,l),o[7]=l,o[8]=g);let _;o[9]===d?_=o[10]:(_=t(d,`avatar-fallback`),o[9]=d,o[10]=_);let v;o[11]!==c||o[12]!==f?(v=f==null?c:u(f),o[11]=c,o[12]=f,o[13]=v):v=o[13];let y;return o[14]!==m||o[15]!==p||o[16]!==h||o[17]!==g||o[18]!==_||o[19]!==v?(y=/* @__PURE__ */ a(m,{"aria-hidden":h,className:g,"data-slot":_,...p,children:v}),o[14]=m,o[15]=p,o[16]=h,o[17]=g,o[18]=_,o[19]=v,o[20]=y):y=o[20],y}};export{d as Avatar};
package/dist/badge.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
3
  import { t as Color } from "./index-DorCusfG.js";
3
4
  import { ComponentProps, ReactNode } from "react";
4
5
  //#region src/components/badge/badge.d.ts
@@ -19,7 +20,7 @@ type BadgeProps = ComponentProps<"span"> & WithAsChild & {
19
20
  * The visual style of the badge.
20
21
  */
21
22
  appearance: Appearance;
22
- };
23
+ } & WithDataSlot;
23
24
  /**
24
25
  * A non-interactive label used to highlight short, scannable information —
25
26
  * a status, a category tag, or a count — in the smallest possible footprint.
@@ -74,6 +75,6 @@ type BadgeProps = ComponentProps<"span"> & WithAsChild & {
74
75
  * </Badge>
75
76
  * ```
76
77
  */
77
- declare const Badge: ({ appearance, asChild, children, className, color, icon, ...props }: BadgeProps) => import("react").JSX.Element;
78
+ declare const Badge: ({ "data-slot": dataSlot, appearance, asChild, children, className, color, icon, ...props }: BadgeProps) => import("react").JSX.Element;
78
79
  //#endregion
79
80
  export { Badge, type BadgeProps };
package/dist/badge.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-U24NfYv7.js";import{t as n}from"./slot-BsvE2ntj.js";import{c as r}from"react/compiler-runtime";import{Children as i,cloneElement as a,isValidElement as o}from"react";import s from"tiny-invariant";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";const d=d=>{let f=r(39),m,g,_,v,y,b,x;f[0]===d?(m=f[1],g=f[2],_=f[3],v=f[4],y=f[5],b=f[6],x=f[7]):({appearance:m,asChild:b,children:g,className:_,color:x,icon:v,...y}=d,f[0]=d,f[1]=m,f[2]=g,f[3]=_,f[4]=v,f[5]=y,f[6]=b,f[7]=x);let S=b!==void 0&&b,C=x===void 0?`neutral`:x,w;if(f[8]!==m||f[9]!==_||f[10]!==C||f[11]!==v){let t=p(C,m),n=h(C,m);w=e(`inline-flex w-fit shrink-0 cursor-default items-center gap-1 rounded px-1.5 py-0.5 font-medium text-xs font-sans`,v&&`ps-1`,t,n,_),f[8]=m,f[9]=_,f[10]=C,f[11]=v,f[12]=w}else w=f[12];let T=w;if(S){let e,r,d,p,m;if(f[13]!==T||f[14]!==g||f[15]!==v||f[16]!==y){let h=i.only(g);s(o(h),"When using `asChild`, Badge must be passed a single child as a JSX tag.");let _=h.props?.children;e=n,r=`badge`,d=T,p=y;let b;f[22]===v?b=f[23]:(b=v&&l(t,{className:`size-4`,svg:v}),f[22]=v,f[23]=b),m=a(h,{},u(c,{children:[b,l(`span`,{"data-slot":`badge-label`,className:`contents`,children:_})]})),f[13]=T,f[14]=g,f[15]=v,f[16]=y,f[17]=e,f[18]=r,f[19]=d,f[20]=p,f[21]=m}else e=f[17],r=f[18],d=f[19],p=f[20],m=f[21];let h;return f[24]!==e||f[25]!==r||f[26]!==d||f[27]!==p||f[28]!==m?(h=l(e,{"data-slot":r,className:d,...p,children:m}),f[24]=e,f[25]=r,f[26]=d,f[27]=p,f[28]=m,f[29]=h):h=f[29],h}let E;f[30]===v?E=f[31]:(E=v&&l(t,{className:`size-4`,svg:v}),f[30]=v,f[31]=E);let D;f[32]===g?D=f[33]:(D=l(`span`,{"data-slot":`badge-label`,className:`contents`,children:g}),f[32]=g,f[33]=D);let O;return f[34]!==T||f[35]!==y||f[36]!==E||f[37]!==D?(O=u(`span`,{"data-slot":`badge`,className:T,...y,children:[E,D]}),f[34]=T,f[35]=y,f[36]=E,f[37]=D,f[38]=O):O=f[38],O},f={amber:`bg-amber-500/20`,blue:`bg-blue-500/20`,cyan:`bg-cyan-500/20`,emerald:`bg-emerald-500/20`,fuchsia:`bg-fuchsia-500/20`,gray:`bg-gray-500/20`,green:`bg-green-500/20`,indigo:`bg-indigo-500/20`,lime:`bg-lime-500/20`,orange:`bg-orange-500/20`,pink:`bg-pink-500/20`,purple:`bg-purple-500/20`,red:`bg-red-500/20`,rose:`bg-rose-500/20`,sky:`bg-sky-500/20`,teal:`bg-teal-500/20`,violet:`bg-violet-500/20`,yellow:`bg-yellow-500/20`,accent:`bg-accent-500/20`,danger:`bg-danger-500/20`,important:`bg-important-500/20`,info:`bg-info-500/20`,neutral:`bg-neutral-500/20`,success:`bg-success-500/20`,warning:`bg-warning-500/20`};function p(e,t){switch(t){case`muted`:return f[e];default:s(!1,`Invalid appearance: ${String(t)}`)}}const m={amber:`text-amber-700`,blue:`text-blue-700`,cyan:`text-cyan-700`,emerald:`text-emerald-700`,fuchsia:`text-fuchsia-700`,gray:`text-gray-700`,green:`text-green-700`,indigo:`text-indigo-700`,lime:`text-lime-700`,orange:`text-orange-700`,pink:`text-pink-700`,purple:`text-purple-700`,red:`text-red-700`,rose:`text-rose-700`,sky:`text-sky-700`,teal:`text-teal-700`,violet:`text-violet-700`,yellow:`text-yellow-700`,accent:`text-accent-700`,danger:`text-danger-700`,important:`text-important-700`,info:`text-info-700`,neutral:`text-neutral-700`,success:`text-success-700`,warning:`text-warning-700`};function h(e,t){switch(t){case`muted`:return m[e];default:s(!1,`Invalid appearance: ${String(t)}`)}}export{d as Badge};
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-BudQMD2S.js";import{t as r}from"./slot-DdYN1L1C.js";import{c as i}from"react/compiler-runtime";import{Children as a,cloneElement as o,isValidElement as s}from"react";import c from"tiny-invariant";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";const f=f=>{let p=i(46),h,_,v,y,b,x,S,C;p[0]===f?(h=p[1],_=p[2],v=p[3],y=p[4],b=p[5],x=p[6],S=p[7],C=p[8]):({"data-slot":y,appearance:h,asChild:S,children:_,className:v,color:C,icon:b,...x}=f,p[0]=f,p[1]=h,p[2]=_,p[3]=v,p[4]=y,p[5]=b,p[6]=x,p[7]=S,p[8]=C);let w=S!==void 0&&S,T=C===void 0?`neutral`:C,E;if(p[9]!==h||p[10]!==v||p[11]!==T||p[12]!==b){let t=m(T,h),n=g(T,h);E=e(`inline-flex w-fit shrink-0 cursor-default items-center gap-1 rounded px-1.5 py-0.5 font-medium text-xs font-sans`,b&&`ps-1`,t,n,v),p[9]=h,p[10]=v,p[11]=T,p[12]=b,p[13]=E}else E=p[13];let D=E;if(w){let e,i,f,m,h;if(p[14]!==D||p[15]!==_||p[16]!==y||p[17]!==b||p[18]!==x){let g=a.only(_);c(s(g),"When using `asChild`, Badge must be passed a single child as a JSX tag.");let v=g.props?.children;e=r,p[24]===y?i=p[25]:(i=t(y,`badge`),p[24]=y,p[25]=i),f=D,m=x;let S;p[26]===b?S=p[27]:(S=b&&/* @__PURE__ */ u(n,{className:`size-4`,svg:b}),p[26]=b,p[27]=S),h=o(g,{},/* @__PURE__ */ d(l,{children:[S,/* @__PURE__ */ u(`span`,{"data-slot":`badge-label`,className:`contents`,children:v})]})),p[14]=D,p[15]=_,p[16]=y,p[17]=b,p[18]=x,p[19]=e,p[20]=i,p[21]=f,p[22]=m,p[23]=h}else e=p[19],i=p[20],f=p[21],m=p[22],h=p[23];let g;return p[28]!==e||p[29]!==i||p[30]!==f||p[31]!==m||p[32]!==h?(g=/* @__PURE__ */ u(e,{"data-slot":i,className:f,...m,children:h}),p[28]=e,p[29]=i,p[30]=f,p[31]=m,p[32]=h,p[33]=g):g=p[33],g}let O;p[34]===y?O=p[35]:(O=t(y,`badge`),p[34]=y,p[35]=O);let k;p[36]===b?k=p[37]:(k=b&&/* @__PURE__ */ u(n,{className:`size-4`,svg:b}),p[36]=b,p[37]=k);let A;p[38]===_?A=p[39]:(A=/* @__PURE__ */ u(`span`,{"data-slot":`badge-label`,className:`contents`,children:_}),p[38]=_,p[39]=A);let j;return p[40]!==D||p[41]!==x||p[42]!==O||p[43]!==k||p[44]!==A?(j=/* @__PURE__ */ d(`span`,{"data-slot":O,className:D,...x,children:[k,A]}),p[40]=D,p[41]=x,p[42]=O,p[43]=k,p[44]=A,p[45]=j):j=p[45],j},p={amber:`bg-amber-500/20`,blue:`bg-blue-500/20`,cyan:`bg-cyan-500/20`,emerald:`bg-emerald-500/20`,fuchsia:`bg-fuchsia-500/20`,gray:`bg-gray-500/20`,green:`bg-green-500/20`,indigo:`bg-indigo-500/20`,lime:`bg-lime-500/20`,orange:`bg-orange-500/20`,pink:`bg-pink-500/20`,purple:`bg-purple-500/20`,red:`bg-red-500/20`,rose:`bg-rose-500/20`,sky:`bg-sky-500/20`,teal:`bg-teal-500/20`,violet:`bg-violet-500/20`,yellow:`bg-yellow-500/20`,accent:`bg-accent-500/20`,danger:`bg-danger-500/20`,important:`bg-important-500/20`,info:`bg-info-500/20`,neutral:`bg-neutral-500/20`,success:`bg-success-500/20`,warning:`bg-warning-500/20`};function m(e,t){switch(t){case`muted`:return p[e];default:c(!1,`Invalid appearance: ${String(t)}`)}}const h={amber:`text-amber-700`,blue:`text-blue-700`,cyan:`text-cyan-700`,emerald:`text-emerald-700`,fuchsia:`text-fuchsia-700`,gray:`text-gray-700`,green:`text-green-700`,indigo:`text-indigo-700`,lime:`text-lime-700`,orange:`text-orange-700`,pink:`text-pink-700`,purple:`text-purple-700`,red:`text-red-700`,rose:`text-rose-700`,sky:`text-sky-700`,teal:`text-teal-700`,violet:`text-violet-700`,yellow:`text-yellow-700`,accent:`text-accent-700`,danger:`text-danger-700`,important:`text-important-700`,info:`text-info-700`,neutral:`text-neutral-700`,success:`text-success-700`,warning:`text-warning-700`};function g(e,t){switch(t){case`muted`:return h[e];default:c(!1,`Invalid appearance: ${String(t)}`)}}export{f as Badge};
@@ -1,11 +1,11 @@
1
- import { a as LegendPrimitiveProps, c as XAxisPrimitiveProps, d as BarTexture, f as ChartDatum, i as GridPrimitiveProps, l as YAxisPrimitiveProps, m as ChartSeriesSlot, n as ChartRootBaseProps, o as ReferenceLinePrimitiveProps, p as ChartDatumEvent, r as CopyButtonPrimitiveProps, s as TooltipPrimitiveProps, t as ChartAccessibilityProps, u as BarOrientation, v as SeriesColor } from "./chart-DgaWVBqi.js";
1
+ import { a as GridPrimitiveProps, c as TooltipPrimitiveProps, d as BarOrientation, f as BarTexture, h as ChartSeriesSlot, i as CopyButtonPrimitiveProps, l as XAxisPrimitiveProps, m as ChartDatumEvent, n as ChartMode, o as LegendPrimitiveProps, p as ChartDatum, r as ChartRootBaseProps, s as ReferenceLinePrimitiveProps, t as ChartAccessibilityProps, u as YAxisPrimitiveProps, y as SeriesColor } from "./chart-23KQ1ZNO.js";
2
2
  //#region src/components/bar-chart/bar-chart.d.ts
3
3
  /**
4
4
  * Props for {@link BarChart.Root}. Bars encode value by length from a shared
5
5
  * zero baseline, so the y domain minimum is fixed at `0` — a truncated-bar
6
6
  * axis is unrepresentable.
7
7
  */
8
- type BarChartRootProps<TDatum extends ChartDatum = ChartDatum> = Omit<ChartRootBaseProps, "yDomain"> & ChartAccessibilityProps & {
8
+ type BarChartRootProps<TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive"> = Omit<ChartRootBaseProps, "yDomain"> & ChartAccessibilityProps<TMode> & {
9
9
  /** Rows of data; each `BarChart.Bar` reads one numeric key per row. */
10
10
  data: readonly TDatum[];
11
11
  /** The key of each row's category (x) value. */
@@ -110,15 +110,36 @@ type BarChartCopyButtonProps = CopyButtonPrimitiveProps;
110
110
  /**
111
111
  * The root of a bar chart: owns the data, the scales, the canvas renderer,
112
112
  * and the entire interaction contract (per-category hover with a lifted band
113
- * and tooltip, keyboard stepping with polite announcements, an sr-only data
114
- * table, Enter/Space + click activation). Compose the chrome and series parts
115
- * as children.
113
+ * and tooltip, keyboard stepping with polite announcements, an sr-only
114
+ * description, an sr-only data table, Enter/Space + click activation).
115
+ * Compose the chrome and series parts as children.
116
+ *
117
+ * A Root mounts dormant: a shell of the plot, the named overlay, and its
118
+ * sr-only description. It builds its canvas, its hover layers, and its engine
119
+ * once it comes within one viewport of the visible area, takes focus, or
120
+ * prints (on-screen charts first, a few milliseconds at a time), and it mounts
121
+ * the sr-only data table once focus lands inside it. A list of charts pays
122
+ * for the ones a reader can see, and a page of sparklines holds no hidden
123
+ * tables until a reader asks for one.
116
124
  *
117
125
  * The Root's own subtree is addressable by slot: `bar-chart` on the wrapper,
118
126
  * then `bar-chart-plot`, `bar-chart-canvas`, `bar-chart-crosshair`,
119
- * `bar-chart-hover-band`, `bar-chart-markers`, `bar-chart-tooltip`, and
127
+ * `bar-chart-hover-band`, `bar-chart-markers`, `bar-chart-tooltip`,
128
+ * `bar-chart-description`, and, once focus lands inside the chart,
120
129
  * `bar-chart-data-table`. A bar chart shows the band and never the crosshair
121
- * or the markers, but all three layers mount on every kind.
130
+ * or the markers. The canvas and the three layers are engine-owned: absent
131
+ * from server HTML and from a dormant chart, inserted at activation (near the
132
+ * viewport, on focus, or before print). A static or decorative chart
133
+ * inserts the canvas alone. The tooltip surface mounts on the
134
+ * first hover or keyboard step and stays.
135
+ *
136
+ * **Data attributes:**
137
+ *
138
+ * | Data Attribute | Value | Description |
139
+ * | --- | --- | --- |
140
+ * | `data-slot` | `"bar-chart-description"` | The `sr-only` description the overlay's `aria-describedby` points at: the chart kind, the category count, the first and last category, the series labels, and, on an interactive chart, the keyboard instructions. Omitted when `mode="decorative"`. |
141
+ * | `data-slot` | `"bar-chart-data-table"` | The `sr-only` data table. Mounts once focus lands inside the chart (`data-state` flips to `"engaged"`) and stays. Interactive charts only. |
142
+ * | `data-state` | `"dormant"` \| `"engaged"` | On the Root. Flips to `"engaged"` once focus lands inside the chart, and never flips back. The data table mounts with it. Visibility paints the chart but never flips it. Interactive charts only. |
122
143
  *
123
144
  * @see https://mantle.ngrok.com/components/charts/bar-chart#barchartroot
124
145
  *
@@ -140,7 +161,7 @@ type BarChartCopyButtonProps = CopyButtonPrimitiveProps;
140
161
  * </BarChart.Root>
141
162
  * ```
142
163
  */
143
- declare const Root: <TDatum extends ChartDatum = ChartDatum>(props: BarChartRootProps<TDatum>) => import("react").JSX.Element;
164
+ declare const Root: <TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive">(props: BarChartRootProps<TDatum, TMode>) => import("react").JSX.Element;
144
165
  /**
145
166
  * One bar series. Renders nothing itself — it registers the series with the
146
167
  * chart, which paints it on canvas. Compose one `Bar` per series; with
@@ -337,9 +358,12 @@ declare const CopyButton: (props: BarChartCopyButtonProps) => import("react").JS
337
358
  * A canvas-rendered bar chart for comparing values across categories, with
338
359
  * grouped and stacked variants. Series colors come from the theme's validated
339
360
  * `--color-chart-*` tokens; bars keep a fixed slot color for the chart's
340
- * lifetime even as other series are filtered in and out. Interaction —
341
- * per-category tooltip, keyboard stepping, aria-live announcements, and an
342
- * sr-only data table — ships with `Root` unconditionally.
361
+ * lifetime even as other series are filtered in and out. Interaction ships
362
+ * with `Root` unconditionally: a per-category tooltip, keyboard stepping,
363
+ * aria-live announcements, and an sr-only description. A Root builds and paints
364
+ * its canvas once it comes within one viewport of the visible area, takes
365
+ * focus, or prints, and it mounts its sr-only data table once focus lands
366
+ * inside it.
343
367
  *
344
368
  * **CSS variables (public API):**
345
369
  *
@@ -352,7 +376,7 @@ declare const CopyButton: (props: BarChartCopyButtonProps) => import("react").JS
352
376
  * `BarChart.Bar` sets one series and takes any CSS color. To restyle a slot
353
377
  * itself, redeclare its token on `Root` —
354
378
  * `className="[--color-chart-1:var(--color-brand)]"`. The engine resolves every
355
- * token through a probe inside `Root`, so a declaration scoped there wins for
379
+ * token from `Root`'s computed style, so a declaration scoped there wins for
356
380
  * that chart and leaves every other chart on the page alone.
357
381
  *
358
382
  * @see https://mantle.ngrok.com/components/charts/bar-chart
@@ -572,4 +596,4 @@ declare const BarChart: {
572
596
  readonly CopyButton: typeof CopyButton;
573
597
  };
574
598
  //#endregion
575
- export { BarChart, type BarChartBarProps, type BarChartCopyButtonProps, type BarChartGridProps, type BarChartLegendProps, type BarChartReferenceLineProps, type BarChartRootProps, type BarChartTooltipProps, type BarChartXAxisProps, type BarChartYAxisProps, type ChartDatumEvent };
599
+ export { BarChart, type BarChartBarProps, type BarChartCopyButtonProps, type BarChartGridProps, type BarChartLegendProps, type BarChartReferenceLineProps, type BarChartRootProps, type BarChartTooltipProps, type BarChartXAxisProps, type BarChartYAxisProps, type ChartDatumEvent, type ChartMode };
package/dist/bar-chart.js CHANGED
@@ -1 +1 @@
1
- import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-aZLMj4xx.js";import{c as l}from"react/compiler-runtime";import{jsx as u}from"react/jsx-runtime";const d={Root:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=u(o,{kind:`bar`,componentName:`BarChart`,slotName:`bar-chart`,...e}),t[0]=e,t[1]=n),n},Bar:e=>a(`BarChart.Bar`,`bar`,e),Grid:e=>n(`BarChart.Grid`,e),XAxis:e=>t(`BarChart.XAxis`,e),YAxis:e=>r(`BarChart.YAxis`,e),ReferenceLine:t=>e(`BarChart.ReferenceLine`,t),Tooltip:e=>s(`BarChart.Tooltip`,e),Legend:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=u(i,{partName:`BarChart.Legend`,slotName:`bar-chart`,...e}),t[0]=e,t[1]=n),n},CopyButton:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=u(c,{partName:`BarChart.CopyButton`,slotName:`bar-chart`,...e}),t[0]=e,t[1]=n),n}};export{d as BarChart};
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-BRkJfptA.js";import{c as l}from"react/compiler-runtime";import{jsx as u}from"react/jsx-runtime";const d={Root:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(o,{kind:`bar`,componentName:`BarChart`,slotName:`bar-chart`,...e}),t[0]=e,t[1]=n),n},Bar:e=>a(`BarChart.Bar`,`bar`,e),Grid:e=>n(`BarChart.Grid`,e),XAxis:e=>t(`BarChart.XAxis`,e),YAxis:e=>r(`BarChart.YAxis`,e),ReferenceLine:t=>e(`BarChart.ReferenceLine`,t),Tooltip:e=>s(`BarChart.Tooltip`,e),Legend:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(i,{partName:`BarChart.Legend`,slotName:`bar-chart`,...e}),t[0]=e,t[1]=n),n},CopyButton:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(c,{partName:`BarChart.CopyButton`,slotName:`bar-chart`,...e}),t[0]=e,t[1]=n),n}};export{d as BarChart};
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-0HCjnNv1.js";import{t as r}from"./icon-BT8FnkkJ.js";import{t as i}from"./data-slot-EM6s2WEU.js";import{t as a}from"./slot-BsvE2ntj.js";import{t as o}from"./skeleton-bVDP8BzY.js";import{c as s}from"react/compiler-runtime";import{cloneElement as c,isValidElement as l,useEffect as u,useRef as d}from"react";import{jsx as f}from"react/jsx-runtime";import{CaretRightIcon as p}from"@phosphor-icons/react/CaretRight";const m=e=>{let t=s(18),r,o,c,l,u,d;t[0]===e?(r=t[1],o=t[2],c=t[3],l=t[4],u=t[5],d=t[6]):({asChild:r,children:o,className:c,"data-slot":l,ref:d,...u}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=c,t[4]=l,t[5]=u,t[6]=d);let p=r?a:`nav`,m;t[7]===l?m=t[8]:(m=i(l,`breadcrumb`),t[7]=l,t[8]=m);let h;t[9]===c?h=t[10]:(h=n(`min-w-0`,c),t[9]=c,t[10]=h);let g;return t[11]!==p||t[12]!==o||t[13]!==u||t[14]!==d||t[15]!==m||t[16]!==h?(g=f(p,{ref:d,"data-slot":m,"aria-label":`Breadcrumb`,className:h,...u,children:o}),t[11]=p,t[12]=o,t[13]=u,t[14]=d,t[15]=m,t[16]=h,t[17]=g):g=t[17],g};function h(e,t){let n=e.scrollWidth-e.clientWidth;return n===t||e.contains(document.activeElement)?t:(e.scrollLeft=n,n)}const g={Root:m,List:r=>{let o=s(21),c,l,p,m,g,_;o[0]===r?(c=o[1],l=o[2],p=o[3],m=o[4],g=o[5],_=o[6]):({asChild:c,children:l,className:p,"data-slot":m,ref:_,...g}=r,o[0]=r,o[1]=c,o[2]=l,o[3]=p,o[4]=m,o[5]=g,o[6]=_);let v=c?a:`ol`,y=d(null),b=t(y,_),x=d(void 0),S;o[7]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>{let e=y.current;e!=null&&(x.current=h(e,x.current))},o[7]=S):S=o[7],e(S);let C,w;o[8]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{let e=y.current;if(e==null)return;let t=new ResizeObserver(()=>{x.current=h(e,x.current)});return t.observe(e),()=>{t.disconnect()}},w=[],o[8]=C,o[9]=w):(C=o[8],w=o[9]),u(C,w);let T;o[10]===m?T=o[11]:(T=i(m,`breadcrumb-list`),o[10]=m,o[11]=T);let E;o[12]===p?E=o[13]:(E=n(`text-muted flex items-center gap-1.5 text-sm`,`scroll-fade-x min-w-0 overflow-x-auto overscroll-x-none`,`-m-1 p-1`,`scroll-px-10`,p),o[12]=p,o[13]=E);let D;return o[14]!==v||o[15]!==l||o[16]!==b||o[17]!==g||o[18]!==T||o[19]!==E?(D=f(v,{ref:b,"data-slot":T,className:E,...g,children:l}),o[14]=v,o[15]=l,o[16]=b,o[17]=g,o[18]=T,o[19]=E,o[20]=D):D=o[20],D},Item:e=>{let t=s(18),r,o,c,l,u,d;t[0]===e?(r=t[1],o=t[2],c=t[3],l=t[4],u=t[5],d=t[6]):({asChild:r,children:o,className:c,"data-slot":l,ref:d,...u}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=c,t[4]=l,t[5]=u,t[6]=d);let p=r?a:`li`,m;t[7]===l?m=t[8]:(m=i(l,`breadcrumb-item`),t[7]=l,t[8]=m);let h;t[9]===c?h=t[10]:(h=n(`inline-flex shrink-0 items-center gap-1.5`,c),t[9]=c,t[10]=h);let g;return t[11]!==p||t[12]!==o||t[13]!==u||t[14]!==d||t[15]!==m||t[16]!==h?(g=f(p,{ref:d,"data-slot":m,className:h,...u,children:o}),t[11]=p,t[12]=o,t[13]=u,t[14]=d,t[15]=m,t[16]=h,t[17]=g):g=t[17],g},Link:e=>{let t=s(18),r,o,c,l,u,d;t[0]===e?(r=t[1],o=t[2],c=t[3],l=t[4],u=t[5],d=t[6]):({asChild:r,children:o,className:c,"data-slot":l,ref:d,...u}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=c,t[4]=l,t[5]=u,t[6]=d);let p=r?a:`a`,m;t[7]===l?m=t[8]:(m=i(l,`breadcrumb-link`),t[7]=l,t[8]=m);let h;t[9]===c?h=t[10]:(h=n(`hover:text-strong transition-colors`,c),t[9]=c,t[10]=h);let g;return t[11]!==p||t[12]!==o||t[13]!==u||t[14]!==d||t[15]!==m||t[16]!==h?(g=f(p,{ref:d,"data-slot":m,className:h,...u,children:o}),t[11]=p,t[12]=o,t[13]=u,t[14]=d,t[15]=m,t[16]=h,t[17]=g):g=t[17],g},Label:e=>{let t=s(18),r,o,c,l,u,d;t[0]===e?(r=t[1],o=t[2],c=t[3],l=t[4],u=t[5],d=t[6]):({asChild:r,children:o,className:c,"data-slot":l,ref:d,...u}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=c,t[4]=l,t[5]=u,t[6]=d);let p=r?a:`span`,m;t[7]===l?m=t[8]:(m=i(l,`breadcrumb-label`),t[7]=l,t[8]=m);let h;t[9]===c?h=t[10]:(h=n(`text-muted`,c),t[9]=c,t[10]=h);let g;return t[11]!==p||t[12]!==o||t[13]!==u||t[14]!==d||t[15]!==m||t[16]!==h?(g=f(p,{ref:d,"data-slot":m,className:h,...u,children:o}),t[11]=p,t[12]=o,t[13]=u,t[14]=d,t[15]=m,t[16]=h,t[17]=g):g=t[17],g},Page:e=>{let t=s(21),r,o,u,d,p,m;t[0]===e?(r=t[1],o=t[2],u=t[3],d=t[4],p=t[5],m=t[6]):({asChild:r,children:o,className:u,"data-slot":d,ref:m,...p}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=u,t[4]=d,t[5]=p,t[6]=m);let h=r?a:`span`,g;t[7]!==r||t[8]!==o?(g=r&&l(o)?c(o,{"aria-current":`page`}):o,t[7]=r,t[8]=o,t[9]=g):g=t[9];let _=g,v;t[10]===d?v=t[11]:(v=i(d,`breadcrumb-page`),t[10]=d,t[11]=v);let y;t[12]===u?y=t[13]:(y=n(`text-muted`,u),t[12]=u,t[13]=y);let b;return t[14]!==h||t[15]!==_||t[16]!==p||t[17]!==m||t[18]!==v||t[19]!==y?(b=f(h,{ref:m,"data-slot":v,className:y,...p,"aria-current":`page`,children:_}),t[14]=h,t[15]=_,t[16]=p,t[17]=m,t[18]=v,t[19]=y,t[20]=b):b=t[20],b},Separator:e=>{let t=s(21),o,u,d,m,h,g;t[0]===e?(o=t[1],u=t[2],d=t[3],m=t[4],h=t[5],g=t[6]):({asChild:o,children:u,className:d,"data-slot":m,ref:g,...h}=e,t[0]=e,t[1]=o,t[2]=u,t[3]=d,t[4]=m,t[5]=h,t[6]=g);let _=o?a:`li`,v;t[7]!==o||t[8]!==u?(v=o&&l(u)?c(u,{role:`presentation`,"aria-hidden":`true`}):u??f(r,{svg:f(p,{}),className:`size-3.5`}),t[7]=o,t[8]=u,t[9]=v):v=t[9];let y=v,b;t[10]===m?b=t[11]:(b=i(m,`breadcrumb-separator`),t[10]=m,t[11]=b);let x;t[12]===d?x=t[13]:(x=n(`shrink-0`,d),t[12]=d,t[13]=x);let S;return t[14]!==_||t[15]!==y||t[16]!==h||t[17]!==g||t[18]!==b||t[19]!==x?(S=f(_,{ref:g,"data-slot":b,className:x,...h,role:`presentation`,"aria-hidden":`true`,children:y}),t[14]=_,t[15]=y,t[16]=h,t[17]=g,t[18]=b,t[19]=x,t[20]=S):S=t[20],S},Skeleton:e=>{let t=s(18),r,a,c,l,u;t[0]===e?(r=t[1],a=t[2],c=t[3],l=t[4],u=t[5]):({className:r,"data-slot":a,label:u,ref:l,...c}=e,t[0]=e,t[1]=r,t[2]=a,t[3]=c,t[4]=l,t[5]=u);let d=u===void 0?`Loading breadcrumbs…`:u,p;t[6]===a?p=t[7]:(p=i(a,`breadcrumb-skeleton`),t[6]=a,t[7]=p);let m;t[8]===r?m=t[9]:(m=n(`w-24 shrink-0`,r),t[8]=r,t[9]=m);let h;t[10]===d?h=t[11]:(h=f(`span`,{role:`status`,className:`sr-only`,children:d}),t[10]=d,t[11]=h);let g;return t[12]!==c||t[13]!==l||t[14]!==p||t[15]!==m||t[16]!==h?(g=f(o,{asChild:!0,"aria-hidden":!1,children:f(`li`,{ref:l,"data-slot":p,className:m,...c,children:h})}),t[12]=c,t[13]=l,t[14]=p,t[15]=m,t[16]=h,t[17]=g):g=t[17],g}},_=Object.assign((e,t={})=>({kind:`link`,label:e,...t}),{label:e=>({kind:`label`,label:e}),content:e=>({kind:`content`,content:e})});function v(e){let{handle:t}=e;if(typeof t!=`object`||!t||!(`breadcrumb`in t))return!1;let{breadcrumb:n}=t;return typeof n==`string`||typeof n==`function`}function y(e){return e.filter(v).flatMap(e=>{let{breadcrumb:t}=e.handle;return(typeof t==`string`?[_(t)]:t(e)).map((t,n)=>{let r=`${e.id}:${n}`;return t.kind===`content`?{kind:`content`,key:r,content:t.content}:t.kind===`label`?{kind:`label`,key:r,label:t.label}:{kind:`link`,key:r,label:t.label,to:t.to??e.pathname}})})}export{g as Breadcrumb,y as buildCrumbs,v as hasBreadcrumb,_ as routeBreadcrumb};
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./icon-kK0c-POG.js";import{t as a}from"./slot-DdYN1L1C.js";import{t as o}from"./skeleton-zfqoDAxT.js";import{c as s}from"react/compiler-runtime";import{cloneElement as c,isValidElement as l,useEffect as u,useRef as d}from"react";import{jsx as f}from"react/jsx-runtime";import{CaretRightIcon as p}from"@phosphor-icons/react/CaretRight";const m=e=>{let t=s(18),i,o,c,l,u,d;t[0]===e?(i=t[1],o=t[2],c=t[3],l=t[4],u=t[5],d=t[6]):({asChild:i,children:o,className:c,"data-slot":l,ref:d,...u}=e,t[0]=e,t[1]=i,t[2]=o,t[3]=c,t[4]=l,t[5]=u,t[6]=d);let p=i?a:`nav`,m;t[7]===l?m=t[8]:(m=r(l,`breadcrumb`),t[7]=l,t[8]=m);let h;t[9]===c?h=t[10]:(h=n(`min-w-0`,c),t[9]=c,t[10]=h);let g;return t[11]!==p||t[12]!==o||t[13]!==u||t[14]!==d||t[15]!==m||t[16]!==h?(g=/* @__PURE__ */ f(p,{ref:d,"data-slot":m,"aria-label":`Breadcrumb`,className:h,...u,children:o}),t[11]=p,t[12]=o,t[13]=u,t[14]=d,t[15]=m,t[16]=h,t[17]=g):g=t[17],g};function h(e,t){let n=e.scrollWidth-e.clientWidth;return n===t||e.contains(document.activeElement)?t:(e.scrollLeft=n,n)}const g={Root:m,List:i=>{let o=s(21),c,l,p,m,g,_;o[0]===i?(c=o[1],l=o[2],p=o[3],m=o[4],g=o[5],_=o[6]):({asChild:c,children:l,className:p,"data-slot":m,ref:_,...g}=i,o[0]=i,o[1]=c,o[2]=l,o[3]=p,o[4]=m,o[5]=g,o[6]=_);let v=c?a:`ol`,y=d(null),b=t(y,_),x=d(void 0),S;o[7]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>{let e=y.current;e!=null&&(x.current=h(e,x.current))},o[7]=S):S=o[7],e(S);let C,w;o[8]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{let e=y.current;if(e==null)return;let t=new ResizeObserver(()=>{x.current=h(e,x.current)});return t.observe(e),()=>{t.disconnect()}},w=[],o[8]=C,o[9]=w):(C=o[8],w=o[9]),u(C,w);let T;o[10]===m?T=o[11]:(T=r(m,`breadcrumb-list`),o[10]=m,o[11]=T);let E;o[12]===p?E=o[13]:(E=n(`text-muted flex items-center gap-1.5 text-sm`,`scroll-fade-x min-w-0 overflow-x-auto overscroll-x-none`,`-m-1 p-1`,`scroll-px-10`,p),o[12]=p,o[13]=E);let D;return o[14]!==v||o[15]!==l||o[16]!==b||o[17]!==g||o[18]!==T||o[19]!==E?(D=/* @__PURE__ */ f(v,{ref:b,"data-slot":T,className:E,...g,children:l}),o[14]=v,o[15]=l,o[16]=b,o[17]=g,o[18]=T,o[19]=E,o[20]=D):D=o[20],D},Item:e=>{let t=s(18),i,o,c,l,u,d;t[0]===e?(i=t[1],o=t[2],c=t[3],l=t[4],u=t[5],d=t[6]):({asChild:i,children:o,className:c,"data-slot":l,ref:d,...u}=e,t[0]=e,t[1]=i,t[2]=o,t[3]=c,t[4]=l,t[5]=u,t[6]=d);let p=i?a:`li`,m;t[7]===l?m=t[8]:(m=r(l,`breadcrumb-item`),t[7]=l,t[8]=m);let h;t[9]===c?h=t[10]:(h=n(`inline-flex shrink-0 items-center gap-1.5`,c),t[9]=c,t[10]=h);let g;return t[11]!==p||t[12]!==o||t[13]!==u||t[14]!==d||t[15]!==m||t[16]!==h?(g=/* @__PURE__ */ f(p,{ref:d,"data-slot":m,className:h,...u,children:o}),t[11]=p,t[12]=o,t[13]=u,t[14]=d,t[15]=m,t[16]=h,t[17]=g):g=t[17],g},Link:e=>{let t=s(18),i,o,c,l,u,d;t[0]===e?(i=t[1],o=t[2],c=t[3],l=t[4],u=t[5],d=t[6]):({asChild:i,children:o,className:c,"data-slot":l,ref:d,...u}=e,t[0]=e,t[1]=i,t[2]=o,t[3]=c,t[4]=l,t[5]=u,t[6]=d);let p=i?a:`a`,m;t[7]===l?m=t[8]:(m=r(l,`breadcrumb-link`),t[7]=l,t[8]=m);let h;t[9]===c?h=t[10]:(h=n(`hover:text-strong transition-colors`,c),t[9]=c,t[10]=h);let g;return t[11]!==p||t[12]!==o||t[13]!==u||t[14]!==d||t[15]!==m||t[16]!==h?(g=/* @__PURE__ */ f(p,{ref:d,"data-slot":m,className:h,...u,children:o}),t[11]=p,t[12]=o,t[13]=u,t[14]=d,t[15]=m,t[16]=h,t[17]=g):g=t[17],g},Label:e=>{let t=s(18),i,o,c,l,u,d;t[0]===e?(i=t[1],o=t[2],c=t[3],l=t[4],u=t[5],d=t[6]):({asChild:i,children:o,className:c,"data-slot":l,ref:d,...u}=e,t[0]=e,t[1]=i,t[2]=o,t[3]=c,t[4]=l,t[5]=u,t[6]=d);let p=i?a:`span`,m;t[7]===l?m=t[8]:(m=r(l,`breadcrumb-label`),t[7]=l,t[8]=m);let h;t[9]===c?h=t[10]:(h=n(`text-muted`,c),t[9]=c,t[10]=h);let g;return t[11]!==p||t[12]!==o||t[13]!==u||t[14]!==d||t[15]!==m||t[16]!==h?(g=/* @__PURE__ */ f(p,{ref:d,"data-slot":m,className:h,...u,children:o}),t[11]=p,t[12]=o,t[13]=u,t[14]=d,t[15]=m,t[16]=h,t[17]=g):g=t[17],g},Page:e=>{let t=s(21),i,o,u,d,p,m;t[0]===e?(i=t[1],o=t[2],u=t[3],d=t[4],p=t[5],m=t[6]):({asChild:i,children:o,className:u,"data-slot":d,ref:m,...p}=e,t[0]=e,t[1]=i,t[2]=o,t[3]=u,t[4]=d,t[5]=p,t[6]=m);let h=i?a:`span`,g;t[7]!==i||t[8]!==o?(g=i&&l(o)?c(o,{"aria-current":`page`}):o,t[7]=i,t[8]=o,t[9]=g):g=t[9];let _=g,v;t[10]===d?v=t[11]:(v=r(d,`breadcrumb-page`),t[10]=d,t[11]=v);let y;t[12]===u?y=t[13]:(y=n(`text-muted`,u),t[12]=u,t[13]=y);let b;return t[14]!==h||t[15]!==_||t[16]!==p||t[17]!==m||t[18]!==v||t[19]!==y?(b=/* @__PURE__ */ f(h,{ref:m,"data-slot":v,className:y,...p,"aria-current":`page`,children:_}),t[14]=h,t[15]=_,t[16]=p,t[17]=m,t[18]=v,t[19]=y,t[20]=b):b=t[20],b},Separator:e=>{let t=s(21),o,u,d,m,h,g;t[0]===e?(o=t[1],u=t[2],d=t[3],m=t[4],h=t[5],g=t[6]):({asChild:o,children:u,className:d,"data-slot":m,ref:g,...h}=e,t[0]=e,t[1]=o,t[2]=u,t[3]=d,t[4]=m,t[5]=h,t[6]=g);let _=o?a:`li`,v;t[7]!==o||t[8]!==u?(v=o&&l(u)?c(u,{role:`presentation`,"aria-hidden":`true`}):u??/* @__PURE__ */ f(i,{svg:/* @__PURE__ */ f(p,{}),className:`size-3.5`}),t[7]=o,t[8]=u,t[9]=v):v=t[9];let y=v,b;t[10]===m?b=t[11]:(b=r(m,`breadcrumb-separator`),t[10]=m,t[11]=b);let x;t[12]===d?x=t[13]:(x=n(`shrink-0`,d),t[12]=d,t[13]=x);let S;return t[14]!==_||t[15]!==y||t[16]!==h||t[17]!==g||t[18]!==b||t[19]!==x?(S=/* @__PURE__ */ f(_,{ref:g,"data-slot":b,className:x,...h,role:`presentation`,"aria-hidden":`true`,children:y}),t[14]=_,t[15]=y,t[16]=h,t[17]=g,t[18]=b,t[19]=x,t[20]=S):S=t[20],S},Skeleton:e=>{let t=s(18),i,a,c,l,u;t[0]===e?(i=t[1],a=t[2],c=t[3],l=t[4],u=t[5]):({className:i,"data-slot":a,label:u,ref:l,...c}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=c,t[4]=l,t[5]=u);let d=u===void 0?`Loading breadcrumbs…`:u,p;t[6]===a?p=t[7]:(p=r(a,`breadcrumb-skeleton`),t[6]=a,t[7]=p);let m;t[8]===i?m=t[9]:(m=n(`w-24 shrink-0`,i),t[8]=i,t[9]=m);let h;t[10]===d?h=t[11]:(h=/* @__PURE__ */ f(`span`,{role:`status`,className:`sr-only`,children:d}),t[10]=d,t[11]=h);let g;return t[12]!==c||t[13]!==l||t[14]!==p||t[15]!==m||t[16]!==h?(g=/* @__PURE__ */ f(o,{asChild:!0,"aria-hidden":!1,children:/* @__PURE__ */ f(`li`,{ref:l,"data-slot":p,className:m,...c,children:h})}),t[12]=c,t[13]=l,t[14]=p,t[15]=m,t[16]=h,t[17]=g):g=t[17],g}},_=Object.assign((e,t={})=>({kind:`link`,label:e,...t}),{label:e=>({kind:`label`,label:e}),content:e=>({kind:`content`,content:e})});function v(e){let{handle:t}=e;if(typeof t!=`object`||!t||!(`breadcrumb`in t))return!1;let{breadcrumb:n}=t;return typeof n==`string`||typeof n==`function`}function y(e){return e.filter(v).flatMap(e=>{let{breadcrumb:t}=e.handle;return(typeof t==`string`?[_(t)]:t(e)).map((t,n)=>{let r=`${e.id}:${n}`;return t.kind===`content`?{kind:`content`,key:r,content:t.content}:t.kind===`label`?{kind:`label`,key:r,label:t.label}:{kind:`link`,key:r,label:t.label,to:t.to??e.pathname}})})}export{g as Breadcrumb,y as buildCrumbs,v as hasBreadcrumb,_ as routeBreadcrumb};
@@ -1 +1 @@
1
- import{n as e,t}from"./browser-only-Crr3sgA0.js";export{t as BrowserOnly,e as canUseDOM};
1
+ export{t as BrowserOnly,n as canUseDOM}from"./browser-only-Crr3sgA0.js";
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";import{cva as a}from"class-variance-authority";const o=a(`border-form inline-flex items-center rounded-md`,{variants:{appearance:{panel:`bg-form gap-0.5 border p-0.75 [--icon-button-border-radius:0.125rem] [&>.separator]:mx-px`,ghost:`gap-0.5`,outlined:``}}}),s=a=>{let s=r(20),c,l,u,d,f,p,m;s[0]===a?(c=s[1],l=s[2],u=s[3],d=s[4],f=s[5],p=s[6],m=s[7]):({"data-slot":f,appearance:c,asChild:l,className:d,children:u,ref:m,...p}=a,s[0]=a,s[1]=c,s[2]=l,s[3]=u,s[4]=d,s[5]=f,s[6]=p,s[7]=m);let h=l?n:`div`,g;s[8]===f?g=s[9]:(g=t(f,`button-group`),s[8]=f,s[9]=g);let _;s[10]!==c||s[11]!==d?(_=e(o({appearance:c}),d),s[10]=c,s[11]=d,s[12]=_):_=s[12];let v;return s[13]!==h||s[14]!==u||s[15]!==p||s[16]!==m||s[17]!==g||s[18]!==_?(v=/* @__PURE__ */ i(h,{"data-slot":g,className:_,ref:m,...p,children:u}),s[13]=h,s[14]=u,s[15]=p,s[16]=m,s[17]=g,s[18]=_,s[19]=v):v=s[19],v};export{s as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-kK0c-POG.js";import{t as r}from"./slot-DdYN1L1C.js";import{t as i}from"./booleanish-BfvnW6vy.js";import{n as a}from"./button-b2HKEIE2.js";import{t as o}from"./button-D8rr-1AB.js";import{c as s}from"react/compiler-runtime";import{Children as c,cloneElement as l,isValidElement as u}from"react";import d from"tiny-invariant";import{jsx as f}from"react/jsx-runtime";import{CircleNotchIcon as p}from"@phosphor-icons/react/CircleNotch";const m=m=>{let h=s(57),g,_,v,y,b,x,S,C,w,T,E,D,O,k,A;h[0]===m?(g=h[1],_=h[2],v=h[3],y=h[4],b=h[5],x=h[6],S=h[7],C=h[8],w=h[9],T=h[10],E=h[11],D=h[12],O=h[13],k=h[14],A=h[15]):({"aria-disabled":g,"data-slot":x,appearance:v,asChild:D,children:y,className:b,disabled:_,icon:w,intent:S,isLoading:O,label:C,ref:E,size:k,type:A,...T}=m,h[0]=m,h[1]=g,h[2]=_,h[3]=v,h[4]=y,h[5]=b,h[6]=x,h[7]=S,h[8]=C,h[9]=w,h[10]=T,h[11]=E,h[12]=D,h[13]=O,h[14]=k,h[15]=A);let j=D!==void 0&&D,M=O!==void 0&&O,N=k===void 0?`md`:k,P;h[16]!==g||h[17]!==_||h[18]!==M?(P=i(_??M)||i(g),h[16]=g,h[17]=_,h[18]=M,h[19]=P):P=h[19];let F=P,I;h[20]!==M||h[21]!==w?(I=M?/* @__PURE__ */ f(p,{className:`animate-spin`}):w,h[20]=M,h[21]=w,h[22]=I):I=h[22];let L=I,R;h[23]===x?R=h[24]:(R=t(x,`icon-button`),h[23]=x,h[24]=R);let z;h[25]!==v||h[26]!==b||h[27]!==S||h[28]!==M||h[29]!==N?(z=e(o({appearance:v,intent:S,isLoading:M,size:N}),b),h[25]=v,h[26]=b,h[27]=S,h[28]=M,h[29]=N,h[30]=z):z=h[30];let B=F?``:void 0,V=M?``:void 0,H;h[31]!==v||h[32]!==F||h[33]!==S||h[34]!==C||h[35]!==T||h[36]!==E||h[37]!==N||h[38]!==R||h[39]!==z||h[40]!==B||h[41]!==V?(H={"aria-disabled":F,"data-slot":R,className:z,"data-appearance":v,"data-disabled":B,"data-icon-button":!0,"data-intent":S,"data-loading":V,"data-size":N,ref:E,...T,"aria-label":C},h[31]=v,h[32]=F,h[33]=S,h[34]=C,h[35]=T,h[36]=E,h[37]=N,h[38]=R,h[39]=z,h[40]=B,h[41]=V,h[42]=H):H=h[42];let U=H,W;h[43]===L?W=h[44]:(W=/* @__PURE__ */ f(n,{svg:L}),h[43]=L,h[44]=W);let G=W;if(j){d(u(y)&&c.only(y),"When using `asChild`, IconButton must be passed a single child as a JSX tag.");let e;h[45]!==y||h[46]!==F||h[47]!==G?(e=l(y,F?a:{},G),h[45]=y,h[46]=F,h[47]=G,h[48]=e):e=h[48];let t;return h[49]!==U||h[50]!==e?(t=/* @__PURE__ */ f(r,{...U,children:e}),h[49]=U,h[50]=e,h[51]=t):t=h[51],t}let K=A??`button`,q;return h[52]!==U||h[53]!==F||h[54]!==G||h[55]!==K?(q=/* @__PURE__ */ f(`button`,{...U,disabled:F,type:K,children:G}),h[52]=U,h[53]=F,h[54]=G,h[55]=K,h[56]=q):q=h[56],q};export{m as t};
@@ -1,14 +1,15 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
3
  import { r as VariantProps } from "./index-DA4ig3gj.js";
3
- import "./button-B5i9n7Qp.js";
4
- import "./button-crUf0hbR.js";
4
+ import "./button-mzUR1U0Y.js";
5
+ import "./button-DL7V4bzW.js";
5
6
  import { ComponentProps } from "react";
6
7
  //#region src/components/button/button-group.d.ts
7
8
  declare const buttonGroupVariants: (props?: ({
8
9
  appearance?: "ghost" | "outlined" | "panel" | null | undefined;
9
10
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
11
  type ButtonGroupVariants = VariantProps<typeof buttonGroupVariants>;
11
- type ButtonGroupProps = ComponentProps<"div"> & ButtonGroupVariants & WithAsChild;
12
+ type ButtonGroupProps = ComponentProps<"div"> & ButtonGroupVariants & WithAsChild & WithDataSlot;
12
13
  /**
13
14
  * A contained group of related buttons.
14
15
  *
@@ -26,6 +27,6 @@ type ButtonGroupProps = ComponentProps<"div"> & ButtonGroupVariants & WithAsChil
26
27
  * </ButtonGroup>
27
28
  * ```
28
29
  */
29
- declare const ButtonGroup: ({ appearance, asChild, className, children, ref, ...props }: ButtonGroupProps) => import("react").JSX.Element;
30
+ declare const ButtonGroup: ({ "data-slot": dataSlot, appearance, asChild, className, children, ref, ...props }: ButtonGroupProps) => import("react").JSX.Element;
30
31
  //#endregion
31
32
  export { ButtonGroupProps as n, ButtonGroup as t };
@@ -1 +1 @@
1
- import{t as e}from"./cx-0HCjnNv1.js";import{cva as t}from"class-variance-authority";const n=e(`icon-button`,`inline-flex shrink-0 items-center justify-center rounded-[var(--icon-button-border-radius,0.375rem)] border`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`aria-disabled:cursor-default aria-disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`),r=t(n,{variants:{appearance:{filled:`bg-filled-neutral text-neutral-50 focus-visible:ring-focus-accent focus-visible:border-transparent not-disabled:hover:bg-filled-neutral-hover border-transparent`,ghost:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`,outlined:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600 focus-visible:not-disabled:active:border-accent-600`},intent:{neutral:``},isLoading:{false:``,true:`opacity-50`},size:{xs:`size-6`,sm:`size-7`,md:`size-9`,lg:`size-10`,xl:`size-12`}},defaultVariants:{intent:`neutral`,size:`md`}});export{r as t};
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{cva as t}from"class-variance-authority";const n=e(`icon-button`,`inline-flex shrink-0 items-center justify-center rounded-[var(--icon-button-border-radius,0.375rem)] border`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`aria-disabled:cursor-default aria-disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`),r=t(n,{variants:{appearance:{filled:`bg-filled-neutral text-neutral-50 focus-visible:ring-focus-accent focus-visible:border-transparent not-disabled:hover:bg-filled-neutral-hover border-transparent`,ghost:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`,outlined:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600 focus-visible:not-disabled:active:border-accent-600`},intent:{neutral:``},isLoading:{false:``,true:`opacity-50`},size:{xs:`size-6`,sm:`size-7`,md:`size-9`,lg:`size-10`,xl:`size-12`}},defaultVariants:{intent:`neutral`,size:`md`}});export{r as t};
@@ -1,4 +1,5 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
3
  import { r as VariantProps } from "./index-DA4ig3gj.js";
3
4
  import { ComponentProps, ReactNode } from "react";
4
5
  //#region src/components/button/icon-button-variants.d.ts
@@ -110,7 +111,7 @@ type IconButtonProps = Omit<ComponentProps<"button">, "aria-label"> & WithAsChil
110
111
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type
111
112
  */
112
113
  type?: ComponentProps<"button">["type"];
113
- };
114
+ } & WithDataSlot;
114
115
  /**
115
116
  * A button that renders one icon and nothing else. Its required `label` prop
116
117
  * carries the accessible name.
@@ -143,8 +144,8 @@ type IconButtonProps = Omit<ComponentProps<"button">, "aria-label"> & WithAsChil
143
144
  * | `data-appearance` | `"filled"` \| `"ghost"` \| `"outlined"` | The `appearance` prop. |
144
145
  * | `data-intent` | `"neutral"` | The `intent` prop. |
145
146
  * | `data-size` | `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` | The `size` prop. |
146
- * | `data-loading` | `"true"` \| `"false"` | The `isLoading` prop. |
147
- * | `data-disabled` | `"true"` \| `"false"` | `true` when `disabled`, `isLoading`, or `aria-disabled="true"` is set. |
147
+ * | `data-loading` | present when `isLoading` | Presence-only, never `"false"`. |
148
+ * | `data-disabled` | present when disabled | Presence-only, never `"false"`, since the `data-disabled:` variant matches the attribute's existence. Set when the button resolves disabled: `disabled`, `aria-disabled="true"`, or `isLoading` with no explicit `disabled`. `disabled={false}` keeps a loading button enabled and omits it. |
148
149
  *
149
150
  * @see https://mantle.ngrok.com/components/actions/icon-button
150
151
  *
@@ -172,6 +173,6 @@ type IconButtonProps = Omit<ComponentProps<"button">, "aria-label"> & WithAsChil
172
173
  * />
173
174
  * ```
174
175
  */
175
- declare const IconButton: ({ "aria-disabled": _ariaDisabled, appearance, asChild, children, className, disabled: _disabled, icon: propIcon, intent, isLoading, label, ref, size, type, ...props }: IconButtonProps) => import("react").JSX.Element;
176
+ declare const IconButton: ({ "aria-disabled": _ariaDisabled, "data-slot": dataSlot, appearance, asChild, children, className, disabled: _disabled, icon: propIcon, intent, isLoading, label, ref, size, type, ...props }: IconButtonProps) => import("react").JSX.Element;
176
177
  //#endregion
177
178
  export { IconButtonIntent as i, IconButtonProps as n, IconButtonAppearance as r, IconButton as t };
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-kK0c-POG.js";import{t as r}from"./slot-DdYN1L1C.js";import{t as i}from"./booleanish-BfvnW6vy.js";import{t as a}from"./clsx-DUGZgXfJ.js";import{c as o}from"react/compiler-runtime";import{Children as s,cloneElement as c,isValidElement as l}from"react";import u from"tiny-invariant";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import{cva as m}from"class-variance-authority";import{CircleNotchIcon as ee}from"@phosphor-icons/react/CircleNotch";const h=m(``,{variants:{appearance:{filled:`bg-filled-accent text-white focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover border border-transparent text-sm font-medium`,ghost:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border border-transparent text-sm font-medium`,outlined:`border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border text-sm font-medium`,link:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group/button-link border-transparent`},isLoading:{false:``,true:`opacity-50`},intent:{accent:``,danger:``,neutral:``},size:{xs:``,sm:``,md:``,lg:``,xl:``}},defaultVariants:{isLoading:!1,size:`md`},compoundVariants:[{appearance:[`filled`,`ghost`,`outlined`],size:`xs`,class:`h-6 px-2`},{appearance:[`filled`,`ghost`,`outlined`],size:`sm`,class:`h-7 px-2.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`md`,class:`h-9 px-3`},{appearance:[`filled`,`ghost`,`outlined`],size:`lg`,class:`h-10 px-3.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`xl`,class:`h-12 px-4`},{appearance:`ghost`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 border-transparent`},{appearance:`outlined`,intent:`danger`,class:`border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700`},{appearance:`filled`,intent:`danger`,class:`bg-filled-danger focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover border-transparent`},{appearance:`link`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger`},{appearance:`ghost`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`},{appearance:`outlined`,intent:`neutral`,class:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600 focus-visible:not-disabled:active:border-accent-600`},{appearance:`filled`,intent:`neutral`,class:`bg-filled-neutral not-disabled:hover:bg-filled-neutral-hover border-transparent focus-visible:border-transparent text-neutral-50`},{appearance:`link`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent`}]}),g={xs:`ps-1.5`,sm:`ps-2`,md:`ps-2.5`,lg:`ps-3`,xl:`ps-3.5`},_={xs:`pe-1.5`,sm:`pe-2`,md:`pe-2.5`,lg:`pe-3`,xl:`pe-3.5`},v=m=>{let v=o(71),b,x,S,C,w,T,E,D,O,k,A,j,M,N,P;v[0]===m?(b=v[1],x=v[2],S=v[3],C=v[4],w=v[5],T=v[6],E=v[7],D=v[8],O=v[9],k=v[10],A=v[11],j=v[12],M=v[13],N=v[14],P=v[15]):({"aria-disabled":b,"data-slot":E,appearance:S,asChild:C,children:w,className:T,disabled:x,icon:O,iconPlacement:j,intent:D,isLoading:M,ref:A,size:N,type:P,...k}=m,v[0]=m,v[1]=b,v[2]=x,v[3]=S,v[4]=C,v[5]=w,v[6]=T,v[7]=E,v[8]=D,v[9]=O,v[10]=k,v[11]=A,v[12]=j,v[13]=M,v[14]=N,v[15]=P);let F=j===void 0?`start`:j,I=M!==void 0&&M,L=N===void 0?`md`:N,R;v[16]!==b||v[17]!==x||v[18]!==I?(R=i(x??I)||i(b),v[16]=b,v[17]=x,v[18]=I,v[19]=R):R=v[19];let z=R,B;v[20]!==I||v[21]!==O?(B=I?/* @__PURE__ */ f(ee,{className:`animate-spin`}):O,v[20]=I,v[21]=O,v[22]=B):B=v[22];let V=B,H=V&&S!==`link`,U;v[23]===E?U=v[24]:(U=t(E,`button`),v[23]=E,v[24]=U);let W;v[25]!==S||v[26]!==T||v[27]!==H||v[28]!==F||v[29]!==D||v[30]!==I||v[31]!==L?(W=e(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`aria-disabled:cursor-default aria-disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`,h({appearance:S,intent:D,isLoading:I,size:L}),S!==`link`&&`font-sans`,H&&F===`start`&&g[L],H&&F===`end`&&_[L],T),v[25]=S,v[26]=T,v[27]=H,v[28]=F,v[29]=D,v[30]=I,v[31]=L,v[32]=W):W=v[32];let G=z?``:void 0,K=I?``:void 0,q=S===`link`?void 0:L,J;v[33]!==S||v[34]!==z||v[35]!==D||v[36]!==k||v[37]!==A||v[38]!==q||v[39]!==U||v[40]!==W||v[41]!==G||v[42]!==K?(J={"aria-disabled":z,"data-slot":U,className:W,"data-appearance":S,"data-disabled":G,"data-intent":D,"data-loading":K,"data-size":q,ref:A,...k},v[33]=S,v[34]=z,v[35]=D,v[36]=k,v[37]=A,v[38]=q,v[39]=U,v[40]=W,v[41]=G,v[42]=K,v[43]=J):J=v[43];let Y=J;if(C){u(l(w)&&s.only(w),"When using `asChild`, Button must be passed a single child as a JSX tag.");let e;if(v[44]!==w||v[45]!==z||v[46]!==V||v[47]!==F){let t;v[49]!==V||v[50]!==F?(t=V&&/* @__PURE__ */ f(n,{svg:V,className:a(F===`end`&&`order-last`)}),v[49]=V,v[50]=F,v[51]=t):t=v[51];let r;v[52]===w.props.children?r=v[53]:(r=/* @__PURE__ */ f(`span`,{"data-slot":`button-label`,className:`contents`,children:w.props.children}),v[52]=w.props.children,v[53]=r);let i;v[54]!==t||v[55]!==r?(i=/* @__PURE__ */ p(d,{children:[t,r]}),v[54]=t,v[55]=r,v[56]=i):i=v[56],e=c(w,z?y:{},i),v[44]=w,v[45]=z,v[46]=V,v[47]=F,v[48]=e}else e=v[48];let t;return v[57]!==Y||v[58]!==e?(t=/* @__PURE__ */ f(r,{...Y,children:e}),v[57]=Y,v[58]=e,v[59]=t):t=v[59],t}let X=P??`button`,Z;v[60]!==V||v[61]!==F?(Z=V&&/* @__PURE__ */ f(n,{svg:V,className:a(F===`end`&&`order-last`)}),v[60]=V,v[61]=F,v[62]=Z):Z=v[62];let Q;v[63]===w?Q=v[64]:(Q=/* @__PURE__ */ f(`span`,{"data-slot":`button-label`,className:`contents`,children:w}),v[63]=w,v[64]=Q);let $;return v[65]!==Y||v[66]!==z||v[67]!==X||v[68]!==Z||v[69]!==Q?($=/* @__PURE__ */ p(`button`,{...Y,disabled:z,type:X,children:[Z,Q]}),v[65]=Y,v[66]=z,v[67]=X,v[68]=Z,v[69]=Q,v[70]=$):$=v[70],$},y={tabIndex:-1,onClickCapture:e=>{e.preventDefault(),e.stopPropagation()}};export{y as n,v as t};
@@ -1,4 +1,5 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
3
  import { r as VariantProps } from "./index-DA4ig3gj.js";
3
4
  import { ComponentProps, ReactNode } from "react";
4
5
  //#region src/components/button/intents.d.ts
@@ -108,7 +109,7 @@ type ButtonProps = ComponentProps<"button"> & Omit<ButtonVariants, "appearance"
108
109
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type
109
110
  */
110
111
  type?: ComponentProps<"button">["type"];
111
- };
112
+ } & WithDataSlot;
112
113
  /**
113
114
  * Renders a button or a component that looks like a button, an interactive
114
115
  * element activated by a user with a mouse, keyboard, finger, voice command, or
@@ -150,8 +151,8 @@ type ButtonProps = ComponentProps<"button"> & Omit<ButtonVariants, "appearance"
150
151
  * | `data-appearance` | `"filled"` \| `"ghost"` \| `"link"` \| `"outlined"` | The `appearance` prop. |
151
152
  * | `data-intent` | `"accent"` \| `"danger"` \| `"neutral"` | The `intent` prop. |
152
153
  * | `data-size` | `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` | The `size` prop. Omitted when `appearance` is `"link"`, which has no box to size. |
153
- * | `data-loading` | `"true"` \| `"false"` | The `isLoading` prop. |
154
- * | `data-disabled` | `"true"` \| `"false"` | `true` when `disabled`, `isLoading`, or `aria-disabled="true"` is set. |
154
+ * | `data-loading` | present when `isLoading` | Presence-only, never `"false"`. |
155
+ * | `data-disabled` | present when disabled | Presence-only, never `"false"`, since the `data-disabled:` variant matches the attribute's existence. Set when the button resolves disabled: `disabled`, `aria-disabled="true"`, or `isLoading` with no explicit `disabled`. `disabled={false}` keeps a loading button enabled and omits it. |
155
156
  *
156
157
  * @see https://mantle.ngrok.com/components/actions/button
157
158
  *
@@ -179,6 +180,6 @@ type ButtonProps = ComponentProps<"button"> & Omit<ButtonVariants, "appearance"
179
180
  * <IconButton appearance="outlined" intent="neutral" icon={<CopyIcon />} label="Copy page" onClick={copyPage} />
180
181
  * ```
181
182
  */
182
- declare const Button: ({ "aria-disabled": _ariaDisabled, appearance, asChild, children, className, disabled: _disabled, icon: propIcon, iconPlacement, intent, isLoading, ref, size, type, ...props }: ButtonProps) => import("react").JSX.Element;
183
+ declare const Button: ({ "aria-disabled": _ariaDisabled, "data-slot": dataSlot, appearance, asChild, children, className, disabled: _disabled, icon: propIcon, iconPlacement, intent, isLoading, ref, size, type, ...props }: ButtonProps) => import("react").JSX.Element;
183
184
  //#endregion
184
185
  export { ButtonIntent as i, ButtonAppearance as n, ButtonProps as r, Button as t };
package/dist/button.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { i as ButtonIntent, n as ButtonAppearance, r as ButtonProps, t as Button } from "./button-B5i9n7Qp.js";
2
- import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance, t as IconButton } from "./button-crUf0hbR.js";
3
- import { n as ButtonGroupProps, t as ButtonGroup } from "./button-DO53OA70.js";
1
+ import { i as ButtonIntent, n as ButtonAppearance, r as ButtonProps, t as Button } from "./button-mzUR1U0Y.js";
2
+ import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance, t as IconButton } from "./button-DL7V4bzW.js";
3
+ import { n as ButtonGroupProps, t as ButtonGroup } from "./button-CHoYpOzx.js";
4
4
  import { t as ButtonSize } from "./button-BCoI4bhP.js";
5
5
  export { Button, type ButtonAppearance, ButtonGroup, type ButtonGroupProps, type ButtonIntent, type ButtonProps, type ButtonSize, IconButton, type IconButtonAppearance, type IconButtonIntent, type IconButtonProps };
package/dist/button.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./button-Dij5vCQG.js";import{t}from"./button-pwkdtR3U.js";import{t as n}from"./button-BFpCB99R.js";export{e as Button,n as ButtonGroup,t as IconButton};
1
+ import{t as e}from"./button-b2HKEIE2.js";import{t}from"./button-BMfUxs_j.js";import{t as n}from"./button-69InNC_m.js";export{e as Button,n as ButtonGroup,t as IconButton};
@@ -1,3 +1,4 @@
1
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
1
2
  import { ComponentProps } from "react";
2
3
  import { DateRange, DayPicker } from "react-day-picker";
3
4
  //#region src/components/calendar/calendar.d.ts
@@ -6,7 +7,7 @@ import { DateRange, DayPicker } from "react-day-picker";
6
7
  * `false` here, and `className` lands on the calendar root alongside any
7
8
  * `classNames.root` you pass.
8
9
  */
9
- type CalendarProps = ComponentProps<typeof DayPicker>;
10
+ type CalendarProps = ComponentProps<typeof DayPicker> & WithDataSlot;
10
11
  /**
11
12
  * A calendar component that allows users to select a date or a range of dates.
12
13
  * Renders a month grid with previous/next navigation; it has no text entry.
@@ -43,6 +44,6 @@ type CalendarProps = ComponentProps<typeof DayPicker>;
43
44
  * />
44
45
  * ```
45
46
  */
46
- declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): import("react").JSX.Element;
47
+ declare function Calendar({ "data-slot": dataSlot, className, classNames, showOutsideDays, ...props }: CalendarProps): import("react").JSX.Element;
47
48
  //#endregion
48
49
  export { Calendar, type CalendarProps, type DateRange };