@ngrok/mantle 0.79.3 → 0.81.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 (222) hide show
  1. package/dist/accordion.d.ts +158 -19
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +5 -1
  4. package/dist/alert-dialog.d.ts +465 -32
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.d.ts +116 -14
  7. package/dist/alert.js +1 -1
  8. package/dist/anchor-DfeXTpKW.js +1 -0
  9. package/dist/anchor.d.ts +2 -2
  10. package/dist/anchor.js +1 -1
  11. package/dist/area-chart.d.ts +504 -0
  12. package/dist/area-chart.js +1 -0
  13. package/dist/as-child-D23mGo4f.d.ts +49 -0
  14. package/dist/badge.d.ts +44 -5
  15. package/dist/badge.js +1 -1
  16. package/dist/bar-chart.d.ts +491 -0
  17. package/dist/bar-chart.js +1 -0
  18. package/dist/breadcrumb.d.ts +196 -14
  19. package/dist/breadcrumb.js +1 -1
  20. package/dist/button-BAno7KIU.js +1 -0
  21. package/dist/{index-BSAizFod.d.ts → button-C-gMbPso.d.ts} +5 -5
  22. package/dist/{icon-button-BvQvT790.d.ts → button-C7vAl6lS.d.ts} +22 -63
  23. package/dist/button-D9n09xUg.js +1 -0
  24. package/dist/{button-DcXOWUYo.d.ts → button-DARFK2KJ.d.ts} +4 -4
  25. package/dist/button-DjpEKt2X.js +1 -0
  26. package/dist/button-DvHMWAPl.js +1 -0
  27. package/dist/button.d.ts +5 -5
  28. package/dist/button.js +1 -1
  29. package/dist/calendar.d.ts +0 -3
  30. package/dist/calendar.js +1 -1
  31. package/dist/card.d.ts +131 -9
  32. package/dist/card.js +1 -1
  33. package/dist/centered-layout.d.ts +209 -8
  34. package/dist/centered-layout.js +1 -1
  35. package/dist/chart-BROa2gqt.js +2 -0
  36. package/dist/chart-BcOC6Qj0.d.ts +275 -0
  37. package/dist/checkbox-0EoxOyMA.js +1 -0
  38. package/dist/checkbox.d.ts +13 -11
  39. package/dist/checkbox.js +1 -1
  40. package/dist/choice-BHwFSSyv.js +1 -0
  41. package/dist/choice-BNRQXszu.d.ts +254 -0
  42. package/dist/choice.d.ts +1 -252
  43. package/dist/choice.js +1 -1
  44. package/dist/code-block.d.ts +242 -52
  45. package/dist/code-block.js +6 -6
  46. package/dist/code-block_highlight-utils.d.ts +1 -1
  47. package/dist/code-block_highlight-utils.js +1 -1
  48. package/dist/code.d.ts +3 -2
  49. package/dist/code.js +1 -1
  50. package/dist/combobox.d.ts +171 -16
  51. package/dist/combobox.js +1 -1
  52. package/dist/command.d.ts +279 -81
  53. package/dist/command.js +1 -1
  54. package/dist/compose-refs-BdBMM9ga.js +1 -0
  55. package/dist/data-table.d.ts +28 -6
  56. package/dist/data-table.js +1 -1
  57. package/dist/description-list.d.ts +67 -6
  58. package/dist/description-list.js +1 -1
  59. package/dist/dialog-BM4wPCft.d.ts +24 -0
  60. package/dist/dialog-DWZWd5Jt.js +1 -0
  61. package/dist/dialog.d.ts +226 -35
  62. package/dist/dialog.js +1 -1
  63. package/dist/{dropdown-menu-DP_Ne9Mr.d.ts → dropdown-menu-DZg-Cd69.d.ts} +137 -32
  64. package/dist/dropdown-menu-Dw-OtXPm.d.ts +1 -0
  65. package/dist/dropdown-menu-RyDWoKHx.js +1 -0
  66. package/dist/dropdown-menu.d.ts +2 -2
  67. package/dist/dropdown-menu.js +1 -1
  68. package/dist/empty.d.ts +7 -22
  69. package/dist/empty.js +1 -1
  70. package/dist/field-B1wqeZr4.js +1 -0
  71. package/dist/field.d.ts +568 -47
  72. package/dist/field.js +1 -1
  73. package/dist/flag.d.ts +0 -3
  74. package/dist/flag.js +1 -1
  75. package/dist/hooks.d.ts +3 -4
  76. package/dist/hooks.js +1 -1
  77. package/dist/hover-card.d.ts +48 -7
  78. package/dist/hover-card.js +1 -1
  79. package/dist/{svg-only-BFeFS1aa.d.ts → icon-CX_gj6sW.d.ts} +2 -2
  80. package/dist/icon-d-nMCfAI.js +1 -0
  81. package/dist/{icon-Cevjo93X.d.ts → icon-k4E9yNWD.d.ts} +2 -2
  82. package/dist/icon-lZ48P8Nn.js +1 -0
  83. package/dist/icon.d.ts +3 -3
  84. package/dist/icon.js +1 -1
  85. package/dist/{sort-BPX2Fk9t.js → icons-B_DDQcVD.js} +1 -1
  86. package/dist/{traffic-policy-file-0g5RXFqu.js → icons-CF1lbWtp.js} +1 -1
  87. package/dist/icons-DLCs1hLP.js +1 -0
  88. package/dist/icons.d.ts +7 -15
  89. package/dist/icons.js +1 -1
  90. package/dist/{in-view-nkSOdED2.d.ts → in-view-DDEGUKDR.d.ts} +17 -9
  91. package/dist/{index-D47aqlpz.d.ts → index-DA4ig3gj.d.ts} +1 -1
  92. package/dist/input-BnlpQF0c.js +1 -0
  93. package/dist/{types-C19IR7jf.d.ts → input-BuYDU6CF.d.ts} +42 -2
  94. package/dist/input.d.ts +5 -56
  95. package/dist/input.js +1 -1
  96. package/dist/{label-v2-bv98k.d.ts → label-C6YH9skg.d.ts} +8 -6
  97. package/dist/label-D-D11mlp.js +1 -0
  98. package/dist/label.d.ts +1 -1
  99. package/dist/label.js +1 -1
  100. package/dist/line-chart.d.ts +490 -0
  101. package/dist/line-chart.js +1 -0
  102. package/dist/list-51KQvENW.js +1 -0
  103. package/dist/list.d.ts +135 -6
  104. package/dist/list.js +1 -1
  105. package/dist/llms.txt +5 -1
  106. package/dist/main.d.ts +20 -4
  107. package/dist/main.js +1 -1
  108. package/dist/mantle-dark-high-contrast.css +17 -0
  109. package/dist/mantle-dark.css +13 -0
  110. package/dist/mantle-light-high-contrast.css +15 -0
  111. package/dist/mantle.css +29 -0
  112. package/dist/media-object.d.ts +18 -4
  113. package/dist/media-object.js +1 -1
  114. package/dist/multi-select.d.ts +282 -24
  115. package/dist/multi-select.js +1 -1
  116. package/dist/otp-input.d.ts +118 -6
  117. package/dist/otp-input.js +1 -1
  118. package/dist/pagination.d.ts +61 -6
  119. package/dist/pagination.js +1 -1
  120. package/dist/popover-CE4OlWkd.d.ts +208 -0
  121. package/dist/popover-CQ9s7jG5.js +1 -0
  122. package/dist/popover.d.ts +1 -181
  123. package/dist/popover.js +1 -1
  124. package/dist/primitive-trJDqIXJ.js +1 -0
  125. package/dist/progress.d.ts +2 -8
  126. package/dist/progress.js +1 -1
  127. package/dist/qr-code.d.ts +101 -5
  128. package/dist/qr-code.js +1 -1
  129. package/dist/radio-group.d.ts +110 -35
  130. package/dist/radio-group.js +1 -1
  131. package/dist/sandboxed-on-click.d.ts +2 -2
  132. package/dist/sandboxed-on-click.js +1 -1
  133. package/dist/scatter-plot.d.ts +495 -0
  134. package/dist/scatter-plot.js +1 -0
  135. package/dist/select-0z7HVS6r.d.ts +579 -0
  136. package/dist/select-BCHWvmyC.js +1 -0
  137. package/dist/select.d.ts +1 -1
  138. package/dist/select.js +1 -1
  139. package/dist/selectable-list.d.ts +225 -298
  140. package/dist/selectable-list.js +1 -1
  141. package/dist/separator-B5UmkVRL.d.ts +75 -0
  142. package/dist/separator-bpE_kooz.js +1 -0
  143. package/dist/separator.d.ts +1 -52
  144. package/dist/separator.js +1 -1
  145. package/dist/sheet.d.ts +285 -38
  146. package/dist/sheet.js +1 -1
  147. package/dist/skeleton-CsbUHbBA.js +1 -0
  148. package/dist/skeleton.d.ts +4 -7
  149. package/dist/skeleton.js +1 -1
  150. package/dist/skip-to-main-link.d.ts +24 -4
  151. package/dist/skip-to-main-link.js +1 -1
  152. package/dist/slider.js +1 -1
  153. package/dist/{index-Rv8RL7xy.d.ts → slot-BtwKJTLq.d.ts} +1 -1
  154. package/dist/slot-CDk0Bb9z.js +1 -0
  155. package/dist/slot.d.ts +1 -1
  156. package/dist/slot.js +1 -1
  157. package/dist/split-button.d.ts +14 -14
  158. package/dist/split-button.js +1 -1
  159. package/dist/switch.d.ts +10 -7
  160. package/dist/switch.js +1 -1
  161. package/dist/table-Bo0vNxIJ.d.ts +848 -0
  162. package/dist/table-CGxJwtbL.js +1 -0
  163. package/dist/table.d.ts +1 -1
  164. package/dist/table.js +1 -1
  165. package/dist/tabs.d.ts +124 -25
  166. package/dist/tabs.js +1 -1
  167. package/dist/text-area.d.ts +2 -2
  168. package/dist/text-area.js +1 -1
  169. package/dist/theme-C26-Xolp.js +1 -0
  170. package/dist/theme-switcher.d.ts +105 -33
  171. package/dist/theme-switcher.js +1 -1
  172. package/dist/theme.d.ts +54 -15
  173. package/dist/theme.js +1 -1
  174. package/dist/toast.d.ts +86 -10
  175. package/dist/toast.js +1 -1
  176. package/dist/tooltip.d.ts +50 -5
  177. package/dist/tooltip.js +1 -1
  178. package/dist/types.d.ts +2 -2
  179. package/dist/utils.d.ts +1 -1
  180. package/dist/utils.js +1 -1
  181. package/dist/well.d.ts +3 -3
  182. package/dist/well.js +1 -1
  183. package/package.json +9 -3
  184. package/dist/anchor-C_tjSVy6.js +0 -1
  185. package/dist/as-child-CYEVu1WY.d.ts +0 -23
  186. package/dist/button-5t6-JS_I.js +0 -1
  187. package/dist/button-ClC60Nzg.js +0 -1
  188. package/dist/checkbox-DJ2xl7Rc.js +0 -1
  189. package/dist/choice-DOdyNzFC.js +0 -1
  190. package/dist/compose-refs-Cjf2gfB8.js +0 -1
  191. package/dist/dialog-vxLIvB8M.js +0 -1
  192. package/dist/dropdown-menu-Bt1aKF1g.js +0 -1
  193. package/dist/field-context-BR01g789.js +0 -1
  194. package/dist/icon-CDtYjF_H.js +0 -1
  195. package/dist/icon-button-DV2-GZHf.js +0 -1
  196. package/dist/index-g2rfwNCH.d.ts +0 -1
  197. package/dist/input-Ct1YOqSy.js +0 -1
  198. package/dist/label-BMlHW_2D.js +0 -1
  199. package/dist/popover-D5WxxnBY.js +0 -1
  200. package/dist/primitive-C64-m48O.d.ts +0 -13
  201. package/dist/primitive-IKruV2iB.js +0 -1
  202. package/dist/select-Bwt2YduR.d.ts +0 -345
  203. package/dist/select-D-5u0Blc.js +0 -1
  204. package/dist/separator-kBnnv3Cw.js +0 -1
  205. package/dist/skeleton-Bu3tgNcW.js +0 -1
  206. package/dist/slot-DmPrjM7N.js +0 -1
  207. package/dist/svg-only-DDx6FtJd.js +0 -1
  208. package/dist/table-CPH2md2-.js +0 -1
  209. package/dist/table-CwFHXC-G.d.ts +0 -414
  210. package/dist/theme-D3MDng6U.js +0 -1
  211. package/dist/theme-provider-C9zpDyJW.js +0 -1
  212. package/dist/toast-BsCjaMVS.js +0 -1
  213. package/dist/virtual-DZMBu7Ch.js +0 -1
  214. /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
  215. /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
  216. /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
  217. /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
  218. /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
  219. /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
  220. /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
  221. /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
  222. /package/dist/{themes-CYNpplwN.d.ts → theme-CYNpplwN.d.ts} +0 -0
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{n as t,t as n}from"./checkbox-DJ2xl7Rc.js";import{t as r}from"./choice-DOdyNzFC.js";import{n as i,t as a}from"./input-Ct1YOqSy.js";import{n as o,r as s,t as c}from"./virtual-DZMBu7Ch.js";import{cloneElement as l,createContext as u,forwardRef as d,isValidElement as f,useCallback as p,useContext as m,useId as h,useMemo as g,useState as _}from"react";import v from"tiny-invariant";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{MagnifyingGlassIcon as x}from"@phosphor-icons/react/MagnifyingGlass";function S(e){return e.labelText==null?typeof e.label==`string`?e.label:``:e.labelText}function C(e,t){let n=t.trim().toLowerCase();return n===``?e:e.filter(e=>S(e).toLowerCase().includes(n))}function w(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function T(e,t){let n=0,r=0;for(let i of e)i.disabled||(n+=1,t.has(i.value)&&(r+=1));return n===0?{allSelected:!1,someSelected:!1}:{allSelected:r===n,someSelected:r>0}}const E=u(null);function D(e){let t=m(E);return v(t,`SelectableList.${e} must be rendered inside SelectableList.Root.`),t}const O=[],k=d(({className:t,defaultQuery:n,defaultValue:r,filter:i,onQueryChange:a,onValueChange:o,options:s,query:c,value:l,...u},d)=>{let f=h(),m=l!=null,[v,b]=_(r??O),x=m?l:v,S=c!=null,[T,D]=_(n??``),k=S?c:T,A=p(e=>{m||b(e),o?.(e)},[m,o]),j=p(e=>{S||D(e),a?.(e)},[S,a]),M=g(()=>new Set(x),[x]),N=g(()=>new Set(s.filter(e=>e.disabled).map(e=>e.value)),[s]),P=g(()=>i==null?C(s,k):s.filter(e=>i(e,k)),[s,k,i]),F=g(()=>({listId:f,filteredOptions:P,query:k,setQuery:j,selectedValues:x,selectedSet:M,disabledSet:N,toggle:e=>{N.has(e)||A(w(x,e))},setSelection:A}),[f,P,k,j,x,M,N,A]);return y(E.Provider,{value:F,children:y(`div`,{ref:d,"data-slot":`selectable-list`,className:e(`flex w-full flex-col gap-3`,t),...u})})});k.displayName=`SelectableListRoot`;const A=d(({"aria-label":e=`Filter`,...t},n)=>{let{query:r,setQuery:o}=D(`Filter`);return b(a,{ref:n,type:`text`,"data-slot":`selectable-list-filter`,"aria-label":e,value:r,onChange:e=>o(e.target.value),...t,children:[y(x,{}),y(i,{})]})});A.displayName=`SelectableListFilter`;const j=d(({children:r,className:i,...a},o)=>{let{filteredOptions:s,selectedValues:c,selectedSet:l,setSelection:u}=D(`SelectAll`),d=h(),{allSelected:f,someSelected:p}=T(s,l),m=t({allSelected:f,someSelected:p}),g=s.some(e=>!e.disabled),_=()=>{let e=s.filter(e=>!e.disabled).map(e=>e.value);if(f){let t=new Set(e);u(c.filter(e=>!t.has(e)));return}u([...new Set([...c,...e])])};return b(`label`,{ref:o,htmlFor:d,"data-slot":`selectable-list-select-all`,className:e(`text-strong flex cursor-pointer items-center gap-2 text-sm font-medium font-sans`,i),...a,children:[y(n,{id:d,checked:m,onChange:_,disabled:!g}),r]})});j.displayName=`SelectableListSelectAll`;function M(e,t){return`${e}-control-${encodeURIComponent(t)}`}const N=d(({children:t,className:i,value:a,...s},c)=>{let{listId:l,selectedSet:u,disabledSet:d,toggle:f}=D(`Item`),p=M(l,a),m=u.has(a),h=d.has(a);return y(o,{ref:c,asChild:!0,selected:m,disabled:h,className:e(`px-2 py-1.5 text-sm`,`cursor-pointer aria-disabled:cursor-default`,i),...s,"data-slot":`selectable-list-item`,"data-value":a,children:b(r.Root,{id:p,disabled:h,children:[y(r.Indicator,{role:`gridcell`,children:y(n,{checked:m,onChange:()=>f(a),tabIndex:-1})}),y(r.Content,{role:`gridcell`,children:t})]})})});N.displayName=`SelectableListItem`;const P=d((e,t)=>y(r.Label,{ref:t,"data-slot":`selectable-list-item-title`,...e}));P.displayName=`SelectableListItemTitle`;const F=d((e,t)=>y(r.Description,{ref:t,"data-slot":`selectable-list-item-description`,...e}));F.displayName=`SelectableListItemDescription`;function I(e){return b(N,{value:e.value,children:[y(P,{children:e.label}),e.description!=null&&y(F,{children:e.description})]})}function L(e,t){let n=[],r=[];for(let i of e){let e=t(i);f(e)&&(n.push(l(e,{key:i.value})),r.push(i))}return{items:n,options:r}}function R(e,t){let{filteredOptions:n,listId:r,toggle:i}=D(e),a=t??I,{items:o,options:s}=g(()=>L(n,a),[n,a]),c=p(e=>{let t=s[e];t!=null&&i(t.value)},[s,i]),l=p(e=>{let t=s[e];return t==null?``:M(r,t.value)},[s,r]),u=p(e=>s[e]?.disabled===!0,[s]);return{isEmpty:o.length===0,isItemDisabled:u,onActivate:c,itemId:l,items:o}}const z=d(({children:e,...t},n)=>{let{isEmpty:r,isItemDisabled:i,onActivate:a,itemId:o,items:c}=R(`Viewport`,e);return r?null:y(s,{ref:n,"data-slot":`selectable-list-viewport`,semantics:`grid`,...t,"aria-multiselectable":!0,isItemDisabled:i,onActivate:a,itemId:o,children:c})});z.displayName=`SelectableListViewport`;const B=d(({children:e,...t},n)=>{let{isEmpty:r,isItemDisabled:i,onActivate:a,itemId:o,items:s}=R(`VirtualViewport`,e);return r?null:y(c,{ref:n,"data-slot":`selectable-list-viewport`,semantics:`grid`,...t,"aria-multiselectable":!0,isItemDisabled:i,onActivate:a,itemId:o,children:s})});B.displayName=`SelectableListVirtualViewport`;const V=d(({children:t,className:n,...r},i)=>{let{filteredOptions:a}=D(`Empty`),o=a.length===0;return y(`div`,{ref:i,"data-slot":`selectable-list-empty`,role:`status`,className:e(!o&&`sr-only`,o&&`text-muted border-popover bg-popover flex items-center justify-center rounded-md border px-3 py-8 text-center text-sm`,n),...r,children:o?t:null})});V.displayName=`SelectableListEmpty`;const H={Root:k,Filter:A,SelectAll:j,Viewport:z,VirtualViewport:B,Item:N,ItemTitle:P,ItemDescription:F,Empty:V};export{H as SelectableList,C as filterSelectableOptions,S as optionLabelText,T as summarizeSelection,w as toggleSelectionValue};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{n as t,t as n}from"./checkbox-0EoxOyMA.js";import{t as r}from"./choice-BHwFSSyv.js";import{n as i,t as a}from"./input-BnlpQF0c.js";import{n as o,r as s,t as c}from"./list-51KQvENW.js";import{cloneElement as l,createContext as u,isValidElement as d,useCallback as f,useContext as p,useId as m,useMemo as h,useState as g}from"react";import _ from"tiny-invariant";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{MagnifyingGlassIcon as b}from"@phosphor-icons/react/MagnifyingGlass";function x(e){return e.labelText==null?typeof e.label==`string`?e.label:``:e.labelText}function S(e,t){let n=t.trim().toLowerCase();return n===``?e:e.filter(e=>x(e).toLowerCase().includes(n))}function C(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function w(e,t){let n=0,r=0;for(let i of e)i.disabled||(n+=1,t.has(i.value)&&(r+=1));return n===0?{allSelected:!1,someSelected:!1}:{allSelected:r===n,someSelected:r>0}}const T=u(null);function E(e){let t=p(T);return _(t,`SelectableList.${e} must be rendered inside SelectableList.Root.`),t}const D=[],O=({className:t,defaultQuery:n,defaultValue:r,filter:i,onQueryChange:a,onValueChange:o,options:s,query:c,ref:l,value:u,...d})=>{let p=m(),_=u!=null,[y,b]=g(r??D),x=_?u:y,w=c!=null,[E,O]=g(n??``),k=w?c:E,A=f(e=>{_||b(e),o?.(e)},[_,o]),j=f(e=>{w||O(e),a?.(e)},[w,a]),M=h(()=>new Set(x),[x]),N=h(()=>new Set(s.filter(e=>e.disabled).map(e=>e.value)),[s]),P=h(()=>i==null?S(s,k):s.filter(e=>i(e,k)),[s,k,i]),F=h(()=>({listId:p,filteredOptions:P,query:k,setQuery:j,selectedValues:x,selectedSet:M,disabledSet:N,toggle:e=>{N.has(e)||A(C(x,e))},setSelection:A}),[p,P,k,j,x,M,N,A]);return v(T.Provider,{value:F,children:v(`div`,{ref:l,"data-slot":`selectable-list`,className:e(`flex w-full flex-col gap-3`,t),...d})})},k=({"aria-label":e=`Filter`,ref:t,...n})=>{let{query:r,setQuery:o}=E(`Filter`);return y(a,{ref:t,type:`text`,"data-slot":`selectable-list-filter`,"aria-label":e,value:r,onChange:e=>o(e.target.value),...n,children:[v(b,{}),v(i,{})]})},A=({children:r,className:i,ref:a,...o})=>{let{filteredOptions:s,selectedValues:c,selectedSet:l,setSelection:u}=E(`SelectAll`),d=m(),{allSelected:f,someSelected:p}=w(s,l),h=t({allSelected:f,someSelected:p}),g=s.some(e=>!e.disabled),_=()=>{let e=s.filter(e=>!e.disabled).map(e=>e.value);if(f){let t=new Set(e);u(c.filter(e=>!t.has(e)));return}u([...new Set([...c,...e])])};return y(`label`,{ref:a,htmlFor:d,"data-slot":`selectable-list-select-all`,className:e(`text-strong flex cursor-pointer items-center gap-2 text-sm font-medium font-sans`,i),...o,children:[v(n,{id:d,checked:h,onChange:_,disabled:!g}),r]})};function j(e,t){return`${e}-control-${encodeURIComponent(t)}`}const M=({children:t,className:i,ref:a,value:s,...c})=>{let{listId:l,selectedSet:u,disabledSet:d,toggle:f}=E(`Item`),p=j(l,s),m=u.has(s),h=d.has(s);return v(o,{ref:a,asChild:!0,selected:m,disabled:h,className:e(`px-2 py-1.5 text-sm`,`cursor-pointer aria-disabled:cursor-default`,i),...c,"data-slot":`selectable-list-item`,"data-value":s,children:y(r.Root,{id:p,disabled:h,children:[v(r.Indicator,{role:`gridcell`,children:v(n,{checked:m,onChange:()=>f(s),tabIndex:-1})}),v(r.Content,{role:`gridcell`,children:t})]})})},N=e=>v(r.Label,{"data-slot":`selectable-list-item-title`,...e}),P=e=>v(r.Description,{"data-slot":`selectable-list-item-description`,...e});function F(e){return y(M,{value:e.value,children:[v(N,{children:e.label}),e.description!=null&&v(P,{children:e.description})]})}function I(e,t){let n=[],r=[];for(let i of e){let e=t(i);d(e)&&(n.push(l(e,{key:i.value})),r.push(i))}return{items:n,options:r}}function L(e,t){let{filteredOptions:n,listId:r,toggle:i}=E(e),a=t??F,{items:o,options:s}=h(()=>I(n,a),[n,a]),c=f(e=>{let t=s[e];t!=null&&i(t.value)},[s,i]),l=f(e=>{let t=s[e];return t==null?``:j(r,t.value)},[s,r]),u=f(e=>s[e]?.disabled===!0,[s]);return{isEmpty:o.length===0,isItemDisabled:u,onActivate:c,itemId:l,items:o}}const R={Root:O,Filter:k,SelectAll:A,Viewport:({children:e,ref:t,...n})=>{let{isEmpty:r,isItemDisabled:i,onActivate:a,itemId:o,items:c}=L(`Viewport`,e);return r?null:v(s,{ref:t,"data-slot":`selectable-list-viewport`,semantics:`grid`,...n,"aria-multiselectable":!0,isItemDisabled:i,onActivate:a,itemId:o,children:c})},VirtualViewport:({children:e,ref:t,...n})=>{let{isEmpty:r,isItemDisabled:i,onActivate:a,itemId:o,items:s}=L(`VirtualViewport`,e);return r?null:v(c,{ref:t,"data-slot":`selectable-list-viewport`,semantics:`grid`,...n,"aria-multiselectable":!0,isItemDisabled:i,onActivate:a,itemId:o,children:s})},Item:M,ItemTitle:N,ItemDescription:P,Empty:({children:t,className:n,ref:r,...i})=>{let{filteredOptions:a}=E(`Empty`),o=a.length===0;return v(`div`,{ref:r,"data-slot":`selectable-list-empty`,role:`status`,className:e(!o&&`sr-only`,o&&`text-muted border-popover bg-popover flex items-center justify-center rounded-md border px-3 py-8 text-center text-sm`,n),...i,children:o?t:null})}};export{R as SelectableList,S as filterSelectableOptions,x as optionLabelText,w as summarizeSelection,C as toggleSelectionValue};
@@ -0,0 +1,75 @@
1
+ import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { ComponentProps, HTMLAttributes } from "react";
3
+ //#region src/components/separator/separator.d.ts
4
+ declare const orientations: readonly ["horizontal", "vertical"];
5
+ type Orientation = (typeof orientations)[number];
6
+ /**
7
+ * A container to layout a group of horizontal separators and other children.
8
+ * Overrides all children `Separator`s to be `orientation="horizontal"`.
9
+ *
10
+ * @see https://mantle.ngrok.com/components/structure/separator
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <HorizontalSeparatorGroup>
15
+ * <Separator />
16
+ * <h3>ngrok mantle</h3>
17
+ * <Separator />
18
+ * </HorizontalSeparatorGroup>
19
+ *
20
+ * <HorizontalSeparatorGroup>
21
+ * <h3>ngrok mantle</h3>
22
+ * <Separator />
23
+ * </HorizontalSeparatorGroup>
24
+ *
25
+ * <HorizontalSeparatorGroup>
26
+ * <Separator />
27
+ * <h3>ngrok mantle</h3>
28
+ * </HorizontalSeparatorGroup>
29
+ * ```
30
+ */
31
+ declare const HorizontalSeparatorGroup: ({ className, children, asChild, ...props }: HTMLAttributes<HTMLDivElement> & WithAsChild) => import("react").JSX.Element;
32
+ type SeparatorProps = ComponentProps<"div"> & WithAsChild & {
33
+ /**
34
+ * Either `horizontal` or `vertical`.
35
+ *
36
+ * @default "horizontal"
37
+ */
38
+ orientation?: Orientation;
39
+ /**
40
+ * If `true`, the separator will be rendered with all accessibility-related attributes and role="separator".
41
+ * If `false`, the separator is purely decorative and all accessibility-related attributes
42
+ * are updated so that that the rendered element is removed from the accessibility tree.
43
+ *
44
+ * @default false
45
+ */
46
+ semantic?: boolean;
47
+ };
48
+ /**
49
+ * Visually or semantically separates content.
50
+ *
51
+ * Rendered in the shared `separator` color token (`gray-500/20` in light,
52
+ * `gray-600/20` in dark, `black` in high contrast). Reuse that exact color on
53
+ * your own dividers with `bg-separator` / `border-separator` / `divide-separator`
54
+ * so they stay consistent with separators across the system.
55
+ *
56
+ * @see https://mantle.ngrok.com/components/structure/separator
57
+ *
58
+ * @example
59
+ * ```tsx
60
+ * <Separator className="my-4" />
61
+ *
62
+ * <Separator className="my-4" semantic />
63
+ *
64
+ * <div className="flex h-5 items-center gap-4 text-sm">
65
+ * Blog
66
+ * <Separator orientation="vertical" />
67
+ * Docs
68
+ * <Separator orientation="vertical" />
69
+ * Source
70
+ * </div>
71
+ * ```
72
+ */
73
+ declare const Separator: ({ asChild, children, className, orientation: propOrientation, ref, semantic, ...props }: SeparatorProps) => import("react").JSX.Element;
74
+ //#endregion
75
+ export { Separator as n, HorizontalSeparatorGroup as t };
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-CDk0Bb9z.js";import{createContext as n,useContext as r}from"react";import{jsx as i}from"react/jsx-runtime";const a=[`horizontal`,`vertical`],o=n({}),s={orientation:`horizontal`},c=({className:n,children:r,asChild:a,...c})=>{let l=a?t:`div`;return i(o.Provider,{value:s,children:i(l,{"data-slot":`horizontal-separator-group`,"data-horizontal-separator-group":!0,className:e(`group flex items-center gap-2 [&>*:not([data-separator])]:shrink-0`,n),...c,children:r})})},l=({asChild:n=!1,children:a,className:s,orientation:c,ref:l,semantic:d=!1,...f})=>{let p=n?t:`div`,m=r(o).orientation??(u(c)?c:`horizontal`),h=d?{"aria-orientation":m===`vertical`?m:void 0,role:`separator`}:{role:`none`};return i(p,{"data-slot":`separator`,className:e(`separator`,`bg-separator`,m===`horizontal`?`h-px w-full group-data-horizontal-separator-group:flex-1`:`h-full w-px`,s),"data-orientation":m,"data-separator":!0,...h,ref:l,...n?{children:a}:{},...f})};function u(e){return typeof e==`string`&&a.includes(e)}export{l as n,c as t};
@@ -1,53 +1,2 @@
1
- import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
2
- import { ComponentProps, HTMLAttributes } from "react";
3
- //#region src/components/separator/separator.d.ts
4
- declare const orientations: readonly ["horizontal", "vertical"];
5
- type Orientation = (typeof orientations)[number];
6
- declare function HorizontalSeparatorGroup({ className, children, asChild, ...props }: HTMLAttributes<HTMLDivElement> & WithAsChild): import("react").JSX.Element;
7
- declare namespace HorizontalSeparatorGroup {
8
- var displayName: string;
9
- }
10
- type SeparatorProps = ComponentProps<"div"> & WithAsChild & {
11
- /**
12
- * Either `horizontal` or `vertical`.
13
- *
14
- * @default "horizontal"
15
- */
16
- orientation?: Orientation;
17
- /**
18
- * If `true`, the separator will be rendered with all accessibility-related attributes and role="separator".
19
- * If `false`, the separator is purely decorative and all accessibility-related attributes
20
- * are updated so that that the rendered element is removed from the accessibility tree.
21
- *
22
- * @default false
23
- */
24
- semantic?: boolean;
25
- };
26
- /**
27
- * Visually or semantically separates content.
28
- *
29
- * Rendered in the shared `separator` color token (`gray-500/20` in light,
30
- * `gray-600/20` in dark, `black` in high contrast). Reuse that exact color on
31
- * your own dividers with `bg-separator` / `border-separator` / `divide-separator`
32
- * so they stay consistent with separators across the system.
33
- *
34
- * @see https://mantle.ngrok.com/components/structure/separator
35
- *
36
- * @example
37
- * ```tsx
38
- * <Separator className="my-4" />
39
- *
40
- * <Separator className="my-4" semantic />
41
- *
42
- * <div className="flex h-5 items-center gap-4 text-sm">
43
- * Blog
44
- * <Separator orientation="vertical" />
45
- * Docs
46
- * <Separator orientation="vertical" />
47
- * Source
48
- * </div>
49
- * ```
50
- */
51
- declare const Separator: import("react").ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
52
- //#endregion
1
+ import { n as Separator, t as HorizontalSeparatorGroup } from "./separator-B5UmkVRL.js";
53
2
  export { HorizontalSeparatorGroup, Separator };
package/dist/separator.js CHANGED
@@ -1 +1 @@
1
- import{n as e,t}from"./separator-kBnnv3Cw.js";export{t as HorizontalSeparatorGroup,e as Separator};
1
+ import{n as e,t}from"./separator-bpE_kooz.js";export{t as HorizontalSeparatorGroup,e as Separator};
package/dist/sheet.d.ts CHANGED
@@ -1,9 +1,80 @@
1
- import { t as ButtonIntent } from "./intents-DdSKSj1c.js";
2
- import { t as Root } from "./primitive-C64-m48O.js";
3
- import { n as IconButtonAppearance, r as IconButtonProps } from "./icon-button-BvQvT790.js";
4
- import { HTMLAttributes } from "react";
1
+ import { t as ButtonIntent } from "./button-DdSKSj1c.js";
2
+ import { a as Root, n as Content$1, o as Title$1, r as Description$1 } from "./dialog-BM4wPCft.js";
3
+ import { n as IconButtonProps, r as IconButtonAppearance } from "./button-C7vAl6lS.js";
4
+ import { ComponentProps, HTMLAttributes } from "react";
5
5
  import { VariantProps } from "class-variance-authority";
6
6
  //#region src/components/sheet/sheet.d.ts
7
+ declare const SheetVariants: (props?: ({
8
+ side?: "left" | "right" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ type SheetContentProps = ComponentProps<typeof Content$1> & VariantProps<typeof SheetVariants> & {
11
+ /**
12
+ * The preferred width of the `Sheet.Content` as a tailwind `max-w-` class.
13
+ *
14
+ * By default, a `Sheet`'s content width is responsive with a default
15
+ * preferred width: the maximum width of the `Sheet.Content` when the window
16
+ * viewport is larger than the mobile breakpoint (`sm`).
17
+ *
18
+ * @default `sm:max-w-[30rem]`
19
+ */
20
+ preferredWidth?: `sm:max-w-${string}`;
21
+ };
22
+ /**
23
+ * The main container for a `Sheet`. Should be rendered as a child of the `Sheet` component.
24
+ * Renders on top of the overlay backdrop.
25
+ * Should contain the `Sheet.Header`, `Sheet.Body`, and `Sheet.Footer`.
26
+ *
27
+ * `Sheet.Content` renders its floating layer at Tailwind `z-50`, Mantle's
28
+ * shared floating z-index. When multiple shared layers are open, the most
29
+ * recently mounted layer renders on top.
30
+ *
31
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetcontent
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * // Sheet without a trigger (e.g. router controlled)
36
+ * <Sheet open onOpenChange={() => onClose()}>
37
+ * <Sheet.Content>
38
+ * <Sheet.Header>
39
+ * <Sheet.TitleGroup>
40
+ * <Sheet.Title>Are you absolutely sure?</Sheet.Title>
41
+ * <Sheet.Actions>
42
+ * <IconButton
43
+ * appearance="ghost"
44
+ * intent="neutral"
45
+ * type="button"
46
+ * icon={<TrashSimple />}
47
+ * label="Delete"
48
+ * />
49
+ * <Separator orientation="vertical" className="h-[80%]" />
50
+ * <Sheet.CloseIconButton />
51
+ * </Sheet.Actions>
52
+ * </Sheet.TitleGroup>
53
+ * <Sheet.Description>
54
+ * This action cannot be undone. This will permanently delete your account and remove your data from our servers.
55
+ * </Sheet.Description>
56
+ * </Sheet.Header>
57
+ * <Sheet.Body>
58
+ * <p>
59
+ * Consequat do voluptate culpa fugiat consequat nostrud duis
60
+ * aliqua minim. Tempor voluptate cillum elit velit. Voluptate
61
+ * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit
62
+ * proident amet.
63
+ * </p>
64
+ * </Sheet.Body>
65
+ * <Sheet.Footer>
66
+ * <Sheet.Close asChild>
67
+ * <Button type="button" appearance="outlined" intent="neutral">Close</Button>
68
+ * </Sheet.Close>
69
+ * <Button type="button" appearance="filled" intent="neutral">
70
+ * Save
71
+ * </Button>
72
+ * </Sheet.Footer>
73
+ * </Sheet.Content>
74
+ * </Sheet.Root>
75
+ * ```
76
+ */
77
+ declare const Content: ({ children, className, preferredWidth, side, ref, ...props }: SheetContentProps) => import("react").JSX.Element;
7
78
  type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon" | "appearance" | "intent">> & {
8
79
  /**
9
80
  * The visual style of the close icon button. Optional here —
@@ -74,10 +145,7 @@ type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon" | "appeara
74
145
  * </Sheet.Root>
75
146
  * ```
76
147
  */
77
- declare const CloseIconButton: {
78
- ({ size, type, label, appearance, intent, ...props }: SheetCloseIconButtonProps): import("react").JSX.Element;
79
- displayName: string;
80
- };
148
+ declare const CloseIconButton: ({ size, type, label, appearance, intent, ...props }: SheetCloseIconButtonProps) => import("react").JSX.Element;
81
149
  /**
82
150
  * The body container for a `Sheet`. This is where you would typically place the main content of the sheet, such as forms or text.
83
151
  * Should be rendered as a child of `Sheet.Content`.
@@ -128,10 +196,7 @@ declare const CloseIconButton: {
128
196
  * </Sheet.Root>
129
197
  * ```
130
198
  */
131
- declare const Body: {
132
- ({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
133
- displayName: string;
134
- };
199
+ declare const Body: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
135
200
  /**
136
201
  * The header container for a `Sheet`. This is where you would typically place the title, description, and actions.
137
202
  * Should be rendered as a child of `Sheet.Content`.
@@ -182,10 +247,7 @@ declare const Body: {
182
247
  * </Sheet.Root>
183
248
  * ```
184
249
  */
185
- declare const Header: {
186
- ({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
187
- displayName: string;
188
- };
250
+ declare const Header: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
189
251
  /**
190
252
  * The footer container for a `Sheet`. This is where you would typically place close and submit buttons.
191
253
  * Should be rendered as a child of `Sheet.Content`.
@@ -236,10 +298,208 @@ declare const Header: {
236
298
  * </Sheet.Root>
237
299
  * ```
238
300
  */
239
- declare const Footer: {
240
- ({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
241
- displayName: string;
242
- };
301
+ declare const Footer: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
302
+ /**
303
+ * The title for a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.
304
+ * Defaults to an `h2` element, but can be changed via the `asChild` prop.
305
+ *
306
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheettitle
307
+ *
308
+ * @example
309
+ * ```tsx
310
+ * // Sheet without a trigger (e.g. router controlled)
311
+ * <Sheet open onOpenChange={() => onClose()}>
312
+ * <Sheet.Content>
313
+ * <Sheet.Header>
314
+ * <Sheet.TitleGroup>
315
+ * <Sheet.Title>Are you absolutely sure?</Sheet.Title>
316
+ * <Sheet.Actions>
317
+ * <IconButton
318
+ * appearance="ghost"
319
+ * intent="neutral"
320
+ * type="button"
321
+ * icon={<TrashSimple />}
322
+ * label="Delete"
323
+ * />
324
+ * <Separator orientation="vertical" className="h-[80%]" />
325
+ * <Sheet.CloseIconButton />
326
+ * </Sheet.Actions>
327
+ * </Sheet.TitleGroup>
328
+ * <Sheet.Description>
329
+ * This action cannot be undone. This will permanently delete your account and remove your data from our servers.
330
+ * </Sheet.Description>
331
+ * </Sheet.Header>
332
+ * <Sheet.Body>
333
+ * <p>
334
+ * Consequat do voluptate culpa fugiat consequat nostrud duis
335
+ * aliqua minim. Tempor voluptate cillum elit velit. Voluptate
336
+ * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit
337
+ * proident amet.
338
+ * </p>
339
+ * </Sheet.Body>
340
+ * <Sheet.Footer>
341
+ * <Sheet.Close asChild>
342
+ * <Button type="button" appearance="outlined" intent="neutral">Close</Button>
343
+ * </Sheet.Close>
344
+ * <Button type="button" appearance="filled" intent="neutral">
345
+ * Save
346
+ * </Button>
347
+ * </Sheet.Footer>
348
+ * </Sheet.Content>
349
+ * </Sheet.Root>
350
+ * ```
351
+ */
352
+ declare const Title: ({ className, ref, ...props }: ComponentProps<typeof Title$1>) => import("react").JSX.Element;
353
+ /**
354
+ * A group container for the title and actions of a sheet. Typically rendered as a child of `Sheet.Header`.
355
+ *
356
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheettitlegroup
357
+ *
358
+ * @example
359
+ * ```tsx
360
+ * // Sheet without a trigger (e.g. router controlled)
361
+ * <Sheet open onOpenChange={() => onClose()}>
362
+ * <Sheet.Content>
363
+ * <Sheet.Header>
364
+ * <Sheet.TitleGroup>
365
+ * <Sheet.Title>Are you absolutely sure?</Sheet.Title>
366
+ * <Sheet.Actions>
367
+ * <IconButton
368
+ * appearance="ghost"
369
+ * intent="neutral"
370
+ * type="button"
371
+ * icon={<TrashSimple />}
372
+ * label="Delete"
373
+ * />
374
+ * <Separator orientation="vertical" className="h-[80%]" />
375
+ * <Sheet.CloseIconButton />
376
+ * </Sheet.Actions>
377
+ * </Sheet.TitleGroup>
378
+ * <Sheet.Description>
379
+ * This action cannot be undone. This will permanently delete your account and remove your data from our servers.
380
+ * </Sheet.Description>
381
+ * </Sheet.Header>
382
+ * <Sheet.Body>
383
+ * <p>
384
+ * Consequat do voluptate culpa fugiat consequat nostrud duis
385
+ * aliqua minim. Tempor voluptate cillum elit velit. Voluptate
386
+ * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit
387
+ * proident amet.
388
+ * </p>
389
+ * </Sheet.Body>
390
+ * <Sheet.Footer>
391
+ * <Sheet.Close asChild>
392
+ * <Button type="button" appearance="outlined" intent="neutral">Close</Button>
393
+ * </Sheet.Close>
394
+ * <Button type="button" appearance="filled" intent="neutral">
395
+ * Save
396
+ * </Button>
397
+ * </Sheet.Footer>
398
+ * </Sheet.Content>
399
+ * </Sheet.Root>
400
+ * ```
401
+ */
402
+ declare const TitleGroup: ({ children, className, ref, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
403
+ /**
404
+ * A description for a sheet. Typically rendered as a child of `Sheet.Header`.
405
+ *
406
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetdescription
407
+ *
408
+ * @example
409
+ * ```tsx
410
+ * // Sheet without a trigger (e.g. router controlled)
411
+ * <Sheet open onOpenChange={() => onClose()}>
412
+ * <Sheet.Content>
413
+ * <Sheet.Header>
414
+ * <Sheet.TitleGroup>
415
+ * <Sheet.Title>Are you absolutely sure?</Sheet.Title>
416
+ * <Sheet.Actions>
417
+ * <IconButton
418
+ * appearance="ghost"
419
+ * intent="neutral"
420
+ * type="button"
421
+ * icon={<TrashSimple />}
422
+ * label="Delete"
423
+ * />
424
+ * <Separator orientation="vertical" className="h-[80%]" />
425
+ * <Sheet.CloseIconButton />
426
+ * </Sheet.Actions>
427
+ * </Sheet.TitleGroup>
428
+ * <Sheet.Description>
429
+ * This action cannot be undone. This will permanently delete your account and remove your data from our servers.
430
+ * </Sheet.Description>
431
+ * </Sheet.Header>
432
+ * <Sheet.Body>
433
+ * <p>
434
+ * Consequat do voluptate culpa fugiat consequat nostrud duis
435
+ * aliqua minim. Tempor voluptate cillum elit velit. Voluptate
436
+ * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit
437
+ * proident amet.
438
+ * </p>
439
+ * </Sheet.Body>
440
+ * <Sheet.Footer>
441
+ * <Sheet.Close asChild>
442
+ * <Button type="button" appearance="outlined" intent="neutral">Close</Button>
443
+ * </Sheet.Close>
444
+ * <Button type="button" appearance="filled" intent="neutral">
445
+ * Save
446
+ * </Button>
447
+ * </Sheet.Footer>
448
+ * </Sheet.Content>
449
+ * </Sheet.Root>
450
+ * ```
451
+ */
452
+ declare const Description: ({ className, ref, ...props }: ComponentProps<typeof Description$1>) => import("react").JSX.Element;
453
+ /**
454
+ * A group container for the actions of a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.
455
+ *
456
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetactions
457
+ *
458
+ * @example
459
+ * ```tsx
460
+ * // Sheet without a trigger (e.g. router controlled)
461
+ * <Sheet open onOpenChange={() => onClose()}>
462
+ * <Sheet.Content>
463
+ * <Sheet.Header>
464
+ * <Sheet.TitleGroup>
465
+ * <Sheet.Title>Are you absolutely sure?</Sheet.Title>
466
+ * <Sheet.Actions>
467
+ * <IconButton
468
+ * appearance="ghost"
469
+ * intent="neutral"
470
+ * type="button"
471
+ * icon={<TrashSimple />}
472
+ * label="Delete"
473
+ * />
474
+ * <Separator orientation="vertical" className="h-[80%]" />
475
+ * <Sheet.CloseIconButton />
476
+ * </Sheet.Actions>
477
+ * </Sheet.TitleGroup>
478
+ * <Sheet.Description>
479
+ * This action cannot be undone. This will permanently delete your account and remove your data from our servers.
480
+ * </Sheet.Description>
481
+ * </Sheet.Header>
482
+ * <Sheet.Body>
483
+ * <p>
484
+ * Consequat do voluptate culpa fugiat consequat nostrud duis
485
+ * aliqua minim. Tempor voluptate cillum elit velit. Voluptate
486
+ * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit
487
+ * proident amet.
488
+ * </p>
489
+ * </Sheet.Body>
490
+ * <Sheet.Footer>
491
+ * <Sheet.Close asChild>
492
+ * <Button type="button" appearance="outlined" intent="neutral">Close</Button>
493
+ * </Sheet.Close>
494
+ * <Button type="button" appearance="filled" intent="neutral">
495
+ * Save
496
+ * </Button>
497
+ * </Sheet.Footer>
498
+ * </Sheet.Content>
499
+ * </Sheet.Root>
500
+ * ```
501
+ */
502
+ declare const Actions: ({ children, className, ref, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
243
503
  /**
244
504
  * A container that overlays the current view from the edge of the screen.
245
505
  * It is a lightweight way of allowing users to complete a task without losing
@@ -443,7 +703,7 @@ declare const Sheet: {
443
703
  * </Sheet.Root>
444
704
  * ```
445
705
  */
446
- readonly Actions: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
706
+ readonly Actions: typeof Actions;
447
707
  /**
448
708
  * The body container for a `Sheet`. This is where you would typically place the main content of the sheet, such as forms or text.
449
709
  * Should be rendered as a child of `Sheet.Content`.
@@ -604,20 +864,7 @@ declare const Sheet: {
604
864
  * </Sheet.Root>
605
865
  * ```
606
866
  */
607
- readonly Content: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
608
- side?: "left" | "right" | null | undefined;
609
- } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
610
- /**
611
- * The preferred width of the `Sheet.Content` as a tailwind `max-w-` class.
612
- *
613
- * By default, a `Sheet`'s content width is responsive with a default
614
- * preferred width: the maximum width of the `Sheet.Content` when the window
615
- * viewport is larger than the mobile breakpoint (`sm`).
616
- *
617
- * @default `sm:max-w-[30rem]`
618
- */
619
- preferredWidth?: `sm:max-w-${string}`;
620
- } & import("react").RefAttributes<HTMLDivElement>>;
867
+ readonly Content: typeof Content;
621
868
  /**
622
869
  * A description for a sheet. Typically rendered as a child of `Sheet.Header`.
623
870
  *
@@ -654,7 +901,7 @@ declare const Sheet: {
654
901
  * </Sheet.Root>
655
902
  * ```
656
903
  */
657
- readonly Description: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
904
+ readonly Description: typeof Description;
658
905
  /**
659
906
  * The footer container for a `Sheet`. This is where you would typically place close and submit buttons.
660
907
  * Should be rendered as a child of `Sheet.Content`.
@@ -768,7 +1015,7 @@ declare const Sheet: {
768
1015
  * </Sheet.Root>
769
1016
  * ```
770
1017
  */
771
- readonly Title: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
1018
+ readonly Title: typeof Title;
772
1019
  /**
773
1020
  * A group container for the title and actions of a sheet. Typically rendered as a child of `Sheet.Header`.
774
1021
  *
@@ -805,7 +1052,7 @@ declare const Sheet: {
805
1052
  * </Sheet.Root>
806
1053
  * ```
807
1054
  */
808
- readonly TitleGroup: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
1055
+ readonly TitleGroup: typeof TitleGroup;
809
1056
  /**
810
1057
  * The button trigger for a `Sheet`. Should be rendered as a child of the `Sheet` component.
811
1058
  * Renders an unstyled button by default, but can be customized with the `asChild` prop.
package/dist/sheet.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-button-DV2-GZHf.js";import{a as n,c as r,i,n as a,o,r as s,s as c,t as l}from"./primitive-IKruV2iB.js";import{forwardRef as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{XIcon as p}from"@phosphor-icons/react/X";import{cva as m}from"class-variance-authority";const h=o;h.displayName=`Sheet`;const g=r;g.displayName=`SheetTrigger`;const _=l;_.displayName=`SheetClose`;const v=n;v.displayName=`SheetPortal`;const y=u(({className:t,...n},r)=>d(i,{"data-slot":`sheet-overlay`,className:e(`bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-50 backdrop-blur-xs`,t),...n,ref:r}));y.displayName=i.displayName;const b=m(`bg-dialog border-dialog inset-y-0 h-full w-full fixed z-50 flex flex-col shadow-lg outline-hidden transition ease-in-out focus-within:outline-hidden data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in`,{variants:{side:{left:`data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r`,right:`data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l`}},defaultVariants:{side:`right`}}),x=u(({children:t,className:n,preferredWidth:r=`sm:max-w-[30rem]`,side:i=`right`,...o},s)=>f(v,{children:[d(y,{}),d(a,{"data-slot":`sheet-content`,"data-mantle-modal-content":!0,className:e(b({side:i}),r,n),ref:s,...o,children:t})]}));x.displayName=a.displayName;const S=({size:e=`md`,type:n=`button`,label:r=`Close Sheet`,appearance:i=`ghost`,intent:a=`neutral`,...o})=>d(l,{asChild:!0,children:d(t,{"data-slot":`sheet-close-icon-button`,appearance:i,icon:d(p,{}),intent:a,label:r,size:e,type:n,...o})});S.displayName=`SheetCloseIconButton`;const C=({className:t,...n})=>d(`div`,{"data-slot":`sheet-body`,className:e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,t),...n});C.displayName=`SheetBody`;const w=({className:t,...n})=>d(`div`,{"data-slot":`sheet-header`,className:e(`border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4`,`has-[.icon-button]:pr-4`,t),...n});w.displayName=`SheetHeader`;const T=({className:t,...n})=>d(`div`,{"data-slot":`sheet-footer`,className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5`,t),...n});T.displayName=`SheetFooter`;const E=u(({className:t,...n},r)=>d(c,{"data-slot":`sheet-title`,ref:r,className:e(`text-strong flex-1 truncate text-lg font-medium`,t),...n}));E.displayName=c.displayName;const D=u(({children:t,className:n,...r},i)=>d(`div`,{"data-slot":`sheet-title-group`,className:e(`flex items-center justify-between gap-2`,n),...r,ref:i,children:t}));D.displayName=`SheetTitleGroup`;const O=u(({className:t,...n},r)=>d(s,{"data-slot":`sheet-description`,ref:r,className:e(`text-body text-sm`,t),...n}));O.displayName=s.displayName;const k=u(({children:t,className:n,...r},i)=>d(`div`,{"data-slot":`sheet-actions`,className:e(`flex h-full items-center gap-2`,n),...r,ref:i,children:t}));k.displayName=`SheetActions`;const A={Root:h,Actions:k,Body:C,Close:_,CloseIconButton:S,Content:x,Description:O,Footer:T,Header:w,Title:E,TitleGroup:D,Trigger:g};export{A as Sheet};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./button-BAno7KIU.js";import{a as n,c as r,i,n as a,o,r as s,s as c,t as l}from"./primitive-trJDqIXJ.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{XIcon as f}from"@phosphor-icons/react/X";import{cva as p}from"class-variance-authority";const m=o,h=r,g=l,_=n,v=({className:t,ref:n,...r})=>u(i,{"data-slot":`sheet-overlay`,className:e(`bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-50 backdrop-blur-xs`,t),...r,ref:n}),y=p(`bg-dialog border-dialog inset-y-0 h-full w-full fixed z-50 flex flex-col shadow-lg outline-hidden transition ease-in-out focus-within:outline-hidden data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in`,{variants:{side:{left:`data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r`,right:`data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l`}},defaultVariants:{side:`right`}}),b={Root:m,Actions:({children:t,className:n,ref:r,...i})=>u(`div`,{"data-slot":`sheet-actions`,className:e(`flex h-full items-center gap-2`,n),...i,ref:r,children:t}),Body:({className:t,...n})=>u(`div`,{"data-slot":`sheet-body`,className:e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,t),...n}),Close:g,CloseIconButton:({size:e=`md`,type:n=`button`,label:r=`Close Sheet`,appearance:i=`ghost`,intent:a=`neutral`,...o})=>u(l,{asChild:!0,children:u(t,{"data-slot":`sheet-close-icon-button`,appearance:i,icon:u(f,{}),intent:a,label:r,size:e,type:n,...o})}),Content:({children:t,className:n,preferredWidth:r=`sm:max-w-[30rem]`,side:i=`right`,ref:o,...s})=>d(_,{children:[u(v,{}),u(a,{"data-slot":`sheet-content`,"data-mantle-modal-content":!0,className:e(y({side:i}),r,n),ref:o,...s,children:t})]}),Description:({className:t,ref:n,...r})=>u(s,{"data-slot":`sheet-description`,ref:n,className:e(`text-body text-sm`,t),...r}),Footer:({className:t,...n})=>u(`div`,{"data-slot":`sheet-footer`,className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5`,t),...n}),Header:({className:t,...n})=>u(`div`,{"data-slot":`sheet-header`,className:e(`border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4`,`has-[.icon-button]:pr-4`,t),...n}),Title:({className:t,ref:n,...r})=>u(c,{"data-slot":`sheet-title`,ref:n,className:e(`text-strong flex-1 truncate text-lg font-medium`,t),...r}),TitleGroup:({children:t,className:n,ref:r,...i})=>u(`div`,{"data-slot":`sheet-title-group`,className:e(`flex items-center justify-between gap-2`,n),...i,ref:r,children:t}),Trigger:h};export{b as Sheet};
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-CDk0Bb9z.js";import{jsx as n}from"react/jsx-runtime";const r=({asChild:r=!1,className:i,ref:a,...o})=>n(r?t:`div`,{"data-slot":`skeleton`,className:e(`dark-high-contrast:bg-black/30 high-contrast:bg-black/30 h-4 animate-pulse rounded-md bg-gray-300/25 dark:bg-gray-950/10`,i),ref:a,...o});export{r as t};
@@ -1,4 +1,7 @@
1
+ import { t as SelfClosingWithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { ComponentProps } from "react";
1
3
  //#region src/components/skeleton/skeleton.d.ts
4
+ type Props = Exclude<ComponentProps<"div">, "children"> & SelfClosingWithAsChild;
2
5
  /**
3
6
  * A skeleton is a placeholder for content that is loading. By rendering a
4
7
  * neutral block where real content will eventually appear, you give the
@@ -44,12 +47,6 @@
44
47
  * </div>
45
48
  * ```
46
49
  */
47
- declare const Skeleton: import("react").ForwardRefExoticComponent<(Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
48
- asChild: true;
49
- children: import("react").ReactNode;
50
- }, "ref"> | Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
51
- asChild?: false | undefined;
52
- children?: undefined;
53
- }, "ref">) & import("react").RefAttributes<HTMLDivElement>>;
50
+ declare const Skeleton: ({ asChild, className, ref, ...props }: Props) => import("react").JSX.Element;
54
51
  //#endregion
55
52
  export { Skeleton };
package/dist/skeleton.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./skeleton-Bu3tgNcW.js";export{e as Skeleton};
1
+ import{t as e}from"./skeleton-CsbUHbBA.js";export{e as Skeleton};
@@ -10,9 +10,29 @@ type SkipToMainLinkProps = Omit<ComponentProps<"a">, "href"> & {
10
10
  */
11
11
  targetId?: string;
12
12
  };
13
- declare function SkipToMainLink({ children, className, onClick, targetId, ...props }: SkipToMainLinkProps): import("react").JSX.Element;
14
- declare namespace SkipToMainLink {
15
- var displayName: string;
16
- }
13
+ /**
14
+ * A visually-hidden-until-focused "skip link" that lets keyboard users jump
15
+ * past repeated navigation and land directly on the page's main content
16
+ * landmark. When activated, it updates the URL hash and focuses the element
17
+ * identified by `targetId` (defaulting to `"main"`) without scrolling. It
18
+ * still renders a plain anchor with `href="#${targetId}"` to preserve link
19
+ * semantics, support copy-link / no-JavaScript fallback behavior, and avoid
20
+ * any router dependency in React Router, Next.js, or plain HTML.
21
+ *
22
+ * Pair with the `<Main>` component (or any element with a matching `id`
23
+ * and `tabIndex={-1}`) so it can receive focus.
24
+ *
25
+ * @see https://mantle.ngrok.com/components/primitives/skip-to-main-link
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * <SkipToMainLink />
30
+ * <Header />
31
+ * <Main>
32
+ * <h1>Page title</h1>
33
+ * </Main>
34
+ * ```
35
+ */
36
+ declare const SkipToMainLink: ({ children, className, onClick, targetId, ...props }: SkipToMainLinkProps) => import("react").JSX.Element;
17
37
  //#endregion
18
38
  export { SkipToMainLink };
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./anchor-C_tjSVy6.js";import{jsx as n}from"react/jsx-runtime";const r=({children:r=`Skip to main content`,className:i,onClick:a,targetId:o=`main`,...s})=>n(t,{...s,"data-slot":`skip-to-main-link`,href:`#${o}`,onClick:e=>{e.preventDefault(),window.history.replaceState(null,``,`#${o}`),document.getElementById(o)?.focus({preventScroll:!0}),a?.(e)},className:e(`not-focus:sr-only bg-card fixed top-2 left-2 z-max px-4 py-2 shadow-lg`,i),children:r});r.displayName=`SkipToMainLink`;export{r as SkipToMainLink};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./anchor-DfeXTpKW.js";import{jsx as n}from"react/jsx-runtime";const r=({children:r=`Skip to main content`,className:i,onClick:a,targetId:o=`main`,...s})=>n(t,{...s,"data-slot":`skip-to-main-link`,href:`#${o}`,onClick:e=>{e.preventDefault(),window.history.replaceState(null,``,`#${o}`),document.getElementById(o)?.focus({preventScroll:!0}),a?.(e)},className:e(`not-focus:sr-only bg-card fixed top-2 left-2 z-max px-4 py-2 shadow-lg`,i),children:r});export{r as SkipToMainLink};