@ngrok/mantle 0.80.0 → 0.81.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/dist/accordion.d.ts +19 -37
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +5 -1
  4. package/dist/alert-dialog.d.ts +15 -48
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.d.ts +167 -83
  7. package/dist/alert.js +1 -1
  8. package/dist/{anchor-_2meGDfj.js → anchor-DfeXTpKW.js} +1 -1
  9. package/dist/anchor.js +1 -1
  10. package/dist/area-chart.d.ts +505 -0
  11. package/dist/area-chart.js +1 -0
  12. package/dist/badge.js +1 -1
  13. package/dist/bar-chart.d.ts +492 -0
  14. package/dist/bar-chart.js +1 -0
  15. package/dist/breadcrumb.d.ts +6 -24
  16. package/dist/breadcrumb.js +1 -1
  17. package/dist/button-BAno7KIU.js +1 -0
  18. package/dist/{index-C2jj8U4a.d.ts → button-C-gMbPso.d.ts} +2 -2
  19. package/dist/{icon-button-C1AfGnQx.d.ts → button-C7vAl6lS.d.ts} +16 -3
  20. package/dist/{button-BPMwa2jN.d.ts → button-DARFK2KJ.d.ts} +1 -1
  21. package/dist/{button-5WsvzIQ6.js → button-DjpEKt2X.js} +1 -1
  22. package/dist/button-DvHMWAPl.js +1 -0
  23. package/dist/button.d.ts +5 -5
  24. package/dist/button.js +1 -1
  25. package/dist/calendar.js +1 -1
  26. package/dist/card.d.ts +5 -20
  27. package/dist/card.js +1 -1
  28. package/dist/centered-layout.d.ts +5 -20
  29. package/dist/centered-layout.js +1 -1
  30. package/dist/chart-1cVjAcj8.d.ts +334 -0
  31. package/dist/chart-Do2qkrxl.js +2 -0
  32. package/dist/checkbox-0EoxOyMA.js +1 -0
  33. package/dist/checkbox.d.ts +13 -1
  34. package/dist/checkbox.js +1 -1
  35. package/dist/choice-BHwFSSyv.js +1 -0
  36. package/dist/{choice-Ct0KK8jw.d.ts → choice-BNRQXszu.d.ts} +5 -20
  37. package/dist/choice.d.ts +1 -1
  38. package/dist/choice.js +1 -1
  39. package/dist/code-block.d.ts +60 -44
  40. package/dist/code-block.js +6 -6
  41. package/dist/code-block_highlight-utils.d.ts +1 -1
  42. package/dist/code-block_highlight-utils.js +1 -1
  43. package/dist/combobox.d.ts +9 -33
  44. package/dist/combobox.js +1 -1
  45. package/dist/command.d.ts +70 -18
  46. package/dist/command.js +1 -1
  47. package/dist/data-table.d.ts +6 -12
  48. package/dist/data-table.js +1 -1
  49. package/dist/description-list.d.ts +40 -32
  50. package/dist/description-list.js +1 -1
  51. package/dist/{primitive-CJRIlrLz.d.ts → dialog-BM4wPCft.d.ts} +9 -16
  52. package/dist/dialog-DWZWd5Jt.js +1 -0
  53. package/dist/dialog.d.ts +13 -43
  54. package/dist/dialog.js +1 -1
  55. package/dist/dropdown-menu-BbbQuae2.d.ts +1 -0
  56. package/dist/{dropdown-menu-CoyozLzy.d.ts → dropdown-menu-D6pMAY7I.d.ts} +156 -54
  57. package/dist/dropdown-menu-RyDWoKHx.js +1 -0
  58. package/dist/dropdown-menu.d.ts +2 -2
  59. package/dist/dropdown-menu.js +1 -1
  60. package/dist/empty.d.ts +6 -21
  61. package/dist/empty.js +1 -1
  62. package/dist/field-B1wqeZr4.js +1 -0
  63. package/dist/field.d.ts +26 -53
  64. package/dist/field.js +1 -1
  65. package/dist/flag.d.ts +1 -1
  66. package/dist/hooks.js +1 -1
  67. package/dist/hover-card.d.ts +3 -12
  68. package/dist/hover-card.js +1 -1
  69. package/dist/{svg-only-CdI_v82i.d.ts → icon-CX_gj6sW.d.ts} +1 -1
  70. package/dist/{icon-BDqpcZ-n.d.ts → icon-k4E9yNWD.d.ts} +1 -1
  71. package/dist/icon-lZ48P8Nn.js +1 -0
  72. package/dist/icon.d.ts +3 -3
  73. package/dist/icon.js +1 -1
  74. package/dist/icons-DLCs1hLP.js +1 -0
  75. package/dist/icons.d.ts +53 -2
  76. package/dist/icons.js +1 -1
  77. package/dist/input-BnlpQF0c.js +1 -0
  78. package/dist/{input-DV9M6K4v.d.ts → input-BuYDU6CF.d.ts} +1 -1
  79. package/dist/input.d.ts +2 -2
  80. package/dist/input.js +1 -1
  81. package/dist/line-chart.d.ts +491 -0
  82. package/dist/line-chart.js +1 -0
  83. package/dist/{virtual-UrzmaSQm.js → list-51KQvENW.js} +1 -1
  84. package/dist/list.d.ts +5 -20
  85. package/dist/list.js +1 -1
  86. package/dist/llms.txt +5 -1
  87. package/dist/mantle-dark-high-contrast.css +17 -0
  88. package/dist/mantle-dark.css +13 -0
  89. package/dist/mantle-light-high-contrast.css +15 -0
  90. package/dist/mantle.css +29 -0
  91. package/dist/media-object.d.ts +45 -12
  92. package/dist/media-object.js +1 -1
  93. package/dist/multi-select.d.ts +14 -53
  94. package/dist/multi-select.js +1 -1
  95. package/dist/otp-input.d.ts +5 -17
  96. package/dist/otp-input.js +1 -1
  97. package/dist/pagination.d.ts +11 -21
  98. package/dist/pagination.js +1 -1
  99. package/dist/{index-B8mIWKIU.d.ts → popover-CE4OlWkd.d.ts} +1 -4
  100. package/dist/popover-CQ9s7jG5.js +1 -0
  101. package/dist/popover.d.ts +1 -1
  102. package/dist/popover.js +1 -1
  103. package/dist/primitive-trJDqIXJ.js +1 -0
  104. package/dist/progress.d.ts +2 -8
  105. package/dist/progress.js +1 -1
  106. package/dist/qr-code.d.ts +4 -16
  107. package/dist/qr-code.js +1 -1
  108. package/dist/radio-group.d.ts +129 -40
  109. package/dist/radio-group.js +1 -1
  110. package/dist/sandboxed-on-click.d.ts +2 -2
  111. package/dist/scatter-plot.d.ts +495 -0
  112. package/dist/scatter-plot.js +1 -0
  113. package/dist/{select-idm1jy7y.d.ts → select-0z7HVS6r.d.ts} +8 -29
  114. package/dist/select-BCHWvmyC.js +1 -0
  115. package/dist/select.d.ts +1 -1
  116. package/dist/select.js +1 -1
  117. package/dist/selectable-list.d.ts +11 -38
  118. package/dist/selectable-list.js +1 -1
  119. package/dist/sheet.d.ts +22 -49
  120. package/dist/sheet.js +1 -1
  121. package/dist/skip-to-main-link.js +1 -1
  122. package/dist/slider.js +1 -1
  123. package/dist/slot.d.ts +1 -1
  124. package/dist/split-button.d.ts +155 -31
  125. package/dist/split-button.js +1 -1
  126. package/dist/switch.d.ts +1 -1
  127. package/dist/switch.js +1 -1
  128. package/dist/table-CGxJwtbL.js +1 -0
  129. package/dist/{table-DUSvU_Jw.d.ts → table-CZBYEmyK.d.ts} +11 -38
  130. package/dist/table.d.ts +1 -1
  131. package/dist/table.js +1 -1
  132. package/dist/tabs.d.ts +21 -36
  133. package/dist/tabs.js +1 -1
  134. package/dist/text-area.d.ts +2 -2
  135. package/dist/text-area.js +1 -1
  136. package/dist/theme-C26-Xolp.js +1 -0
  137. package/dist/{themes-CYNpplwN.d.ts → theme-FbfjYiD3.d.ts} +16 -0
  138. package/dist/theme-switcher.d.ts +6 -15
  139. package/dist/theme-switcher.js +1 -1
  140. package/dist/theme.d.ts +42 -2
  141. package/dist/theme.js +1 -1
  142. package/dist/toast.d.ts +9 -17
  143. package/dist/toast.js +1 -1
  144. package/dist/tooltip.d.ts +26 -8
  145. package/dist/tooltip.js +1 -1
  146. package/dist/types.js +1 -1
  147. package/package.json +20 -14
  148. package/dist/checkbox-Cq17y0-R.js +0 -1
  149. package/dist/choice-Cc8dA5r8.js +0 -1
  150. package/dist/dialog-CQ2C6vkE.js +0 -1
  151. package/dist/dropdown-menu-CSCDdA3K.js +0 -1
  152. package/dist/field-context-BR01g789.js +0 -1
  153. package/dist/icon-CGgMKpJg.js +0 -1
  154. package/dist/icon-button-DiOhreJD.js +0 -1
  155. package/dist/index-CdPXa9h1.d.ts +0 -1
  156. package/dist/input-CVyAVbim.js +0 -1
  157. package/dist/popover-CBMADtjV.js +0 -1
  158. package/dist/primitive-DCPHJsRs.js +0 -1
  159. package/dist/select-SR_9-bxA.js +0 -1
  160. package/dist/table-GDkapNFi.js +0 -1
  161. package/dist/theme-provider-BftkIiZn.js +0 -1
  162. package/dist/theme-wVnzzx2F.js +0 -1
  163. package/dist/toast-DKgMRv4F.js +0 -1
  164. /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
  165. /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
  166. /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
  167. /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
  168. /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
  169. /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
  170. /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
  171. /package/dist/{svg-only-d-nMCfAI.js → icon-d-nMCfAI.js} +0 -0
  172. /package/dist/{sort-B_DDQcVD.js → icons-B_DDQcVD.js} +0 -0
  173. /package/dist/{traffic-policy-file-CF1lbWtp.js → icons-CF1lbWtp.js} +0 -0
  174. /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
  175. /package/dist/{index-BtwKJTLq.d.ts → slot-BtwKJTLq.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
- import{t as e}from"./compose-refs-BdBMM9ga.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./icon-CGgMKpJg.js";import{t as r}from"./slot-CDk0Bb9z.js";import{t as i}from"./icon-button-DiOhreJD.js";import{t as a}from"./use-copy-to-clipboard-DqQ0_N3E.js";import{t as o}from"./traffic-policy-file-CF1lbWtp.js";import{S as s,_ as c,a as l,b as u,c as d,d as f,f as p,g as m,h,i as g,l as _,m as v,n as y,o as b,p as x,r as S,s as C,t as w,u as T,v as E,y as D}from"./resolve-pre-rendered-props-C9uaM9-V.js";import{CaretDownIcon as O}from"@phosphor-icons/react/CaretDown";import{createContext as k,useCallback as A,useContext as ee,useEffect as j,useId as te,useLayoutEffect as ne,useMemo as M,useRef as N,useState as P}from"react";import F from"tiny-invariant";import{jsx as I,jsxs as re}from"react/jsx-runtime";import{CheckIcon as ie}from"@phosphor-icons/react/Check";import{CopyIcon as ae}from"@phosphor-icons/react/Copy";import{FileTextIcon as oe}from"@phosphor-icons/react/FileText";import{TerminalIcon as se}from"@phosphor-icons/react/Terminal";import{Content as ce,List as le,Root as ue,Trigger as de}from"@radix-ui/react-tabs";function L(e){let t=-1;for(let n=0;n<e.length;n++){let r=e[n];if(r===`&`||r===`<`||r===`>`||r===`"`||r===`'`){t=n;break}}if(t===-1)return e;let n=e.slice(0,t);for(let r=t;r<e.length;r++){let t=e[r];switch(t){case`&`:n+=`&amp;`;break;case`<`:n+=`&lt;`;break;case`>`:n+=`&gt;`;break;case`"`:n+=`&quot;`;break;case`'`:n+=`&#39;`;break;default:n+=t}}return n}const R=new WeakMap;function fe(e){let t=new Set;if(e==null||e===``)return t;for(let n of e.split(` `))n!==``&&t.add(n);return t}function pe(e){let t=R.get(e);if(t!=null&&ge(t))return t;let n=new Map,r=new WeakMap,i=e.querySelectorAll(`[data-fold-regions]`);for(let e=0;e<i.length;e+=1){let t=i[e];if(!(t instanceof HTMLElement))continue;let a=fe(t.dataset.foldRegions);if(a.size!==0){r.set(t,a);for(let e of a){let r=n.get(e);r??(r=[],n.set(e,r)),r.push(t)}}}let a={regionToLines:n,lineToRegions:r};return R.set(e,a),a}function me(e){R.delete(e)}function he(e){me(e),e.removeAttribute(`data-folded-regions`)}function ge(e){for(let t of e.regionToLines.values()){if(t.length===0)continue;let e=t[0];if(e!=null)return e.isConnected}return!0}function _e(e,t,n){let r=!1;for(let e of n)if(t.has(e)){r=!0;break}r?e.dataset.foldHidden=`true`:delete e.dataset.foldHidden}function ve(e){let t=e.dataset.foldLine;if(t==null||t===``)return!1;let n=e.closest(`[data-slot='code-block-code']`)?.querySelector(`code`);if(n==null)return!1;let r=fe(n.getAttribute(`data-folded-regions`)),i=!r.has(t);i?r.add(t):r.delete(t),r.size===0?n.removeAttribute(`data-folded-regions`):n.setAttribute(`data-folded-regions`,[...r].join(` `)),e.setAttribute(`aria-expanded`,i?`false`:`true`);let{regionToLines:a,lineToRegions:o}=pe(n),s=a.get(t);if(s!=null)for(let e of s){let t=o.get(e);t!=null&&_e(e,r,t)}return!0}function ye(e){let t=e=>{let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`.mantle-code-fold-toggle`);n instanceof HTMLButtonElement&&ve(n)};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}const z=k(null);function B(){let e=ee(z);return F(e!=null,`CodeBlock subcomponents must be rendered within a <CodeBlock.Root>.`),e}const V=({asChild:e=!1,className:n,defaultTab:i,activeTab:a,onActiveTabChange:o,ref:s,...c})=>{let l=N(``),[u,d]=P(!1),[f,p]=P(!1),[m,h]=P(void 0),g=A(e=>{h(t=>(F(t==null,`You can only render a single CodeBlock.Code within a CodeBlock.`),e))},[]),_=A(e=>{h(t=>{F(t===e,`You can only render a single CodeBlock.Code within a CodeBlock.`)})},[]),v=M(()=>({codeId:m,copyTextRef:l,hasCodeExpander:u,isCodeExpanded:f,registerCodeId:g,setHasCodeExpander:d,setIsCodeExpanded:p,unregisterCodeId:_}),[m,u,f,g,_]),y=i!=null||a!=null,b=I(e?r:`div`,{"data-slot":`code-block`,className:t(`text-mono w-full overflow-hidden rounded-md border border-gray-300 bg-base font-mono`,`[&_svg]:shrink-0`,n),ref:s,...c});return I(z.Provider,{value:v,children:y?I(ue,{asChild:!0,defaultValue:i,value:a,onValueChange:o,children:b}):b})};V.displayName=`CodeBlock`;const H=({asChild:e=!1,className:n,ref:i,...a})=>I(e?r:`div`,{"data-slot":`code-block-body`,className:t(`relative`,n),ref:i,...a});H.displayName=`CodeBlockBody`;const be=/SHIKI_VAL_(\d+)/g;function xe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}const U=new Map;function Se(e){if(e==null||e.length===0)return be;let t=U.get(e);return t??(U.size>=500&&U.clear(),t=RegExp(`${xe(e)}(\\d+)__`,`g`),U.set(e,t)),t}function W(e,t,n,r){if(n==null){if(!e.includes(`SHIKI_VAL_`))return e}else if(!e.includes(n))return e;return e.replaceAll(Se(n),(e,n)=>{let i=Number.parseInt(n,10);return Number.isNaN(i)||i<0||i>=t.length?e:r(t[i])})}function Ce(e,t,n){return W(e,t,n,e=>L(String(e)))}function we(e,t,n){return W(e,t,n,e=>String(e))}const G=({className:n,style:r,value:i,ref:a,...o})=>{let s=te(),c=N(null),{copyTextRef:l,hasCodeExpander:u,isCodeExpanded:d,registerCodeId:f,unregisterCodeId:p}=B(),{language:m,code:h,"~preValToken":g,"~preVals":_,"~highlightLines":v,"~lineNumberStart":y,"~preHtml":b,"~showLineNumbers":x}=i,S=v,C=y??1,w=x??!1,T=M(()=>_!=null&&_.length>0?we(h,_,g):h,[g,_,h]);ne(()=>{l.current=T},[l,T]),j(()=>(f(s),()=>{p(s)}),[s,f,p]);let E=M(()=>{if(b!=null)return _!=null&&_.length>0?Ce(b,_,g):b},[b,g,_]);j(()=>{let e=c.current;if(e==null)return;let t=e.querySelector(`code`);return t!=null&&he(t),ye(e)},[E]);let D=E!=null,O=E??L(T),k=M(()=>({__html:O}),[O]);return I(`pre`,{"data-slot":`code-block-code`,"aria-expanded":u?d:void 0,className:t(`scrollbar overflow-x-auto overflow-y-hidden py-4`,!D&&`pr-14`,`data-[mantle-line-numbers~='false']:pl-4`,`text-mono m-0 font-mono outline-hidden`,`aria-collapsed:max-h-[13.6rem]`,n),"data-highlighted":D?`true`:`false`,"data-lang":m,"data-mantle-highlight-lines":D&&S!=null&&S.length>0?S.join(`,`):void 0,"data-mantle-line-number-start":D&&w?String(C):`1`,"data-mantle-line-numbers":D&&w?`true`:`false`,id:s,ref:e(c,a),style:{...r,"--mantle-line-number-start":String(C),tabSize:2,MozTabSize:2},...o,children:I(`code`,{className:`text-size-inherit block min-w-full w-max`,dangerouslySetInnerHTML:k})})};G.displayName=`CodeBlockCode`;const K=({asChild:e=!1,className:n,ref:i,...a})=>I(e?r:`div`,{"data-slot":`code-block-header`,className:t(`flex items-center gap-1 border-b border-gray-300 bg-base px-4 py-2 text-gray-700`,n),ref:i,...a});K.displayName=`CodeBlockHeader`;const q=({asChild:e=!1,className:n,ref:i,...a})=>I(e?r:`h3`,{"data-slot":`code-block-title`,ref:i,className:t(`m-0 font-sans text-xs font-medium`,n),...a});q.displayName=`CodeBlockTitle`;const J=({className:e,label:n=`Copy code`,onCopy:r,onCopyError:o,onClick:s,ref:c,...l})=>{let{copyTextRef:u}=B(),d=a(),[f,p]=P(!1),m=N(void 0);return j(()=>()=>{m.current!=null&&clearTimeout(m.current)},[]),I(`span`,{"data-slot":`code-block-copy-button`,className:`absolute right-3 top-3 z-10 inline-flex size-7 items-center justify-center rounded-[var(--icon-button-border-radius,0.375rem)] bg-base`,children:I(i,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,label:n,icon:I(f?ie:ae,{}),className:t(`bg-base not-disabled:hover:bg-neutral-500/15`,e),ref:c,onClick:async e=>{try{if(s?.(e),e.defaultPrevented){m.current!=null&&clearTimeout(m.current);return}let t=u.current;await d(t),r?.(t),p(!0),m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{p(!1)},2e3)}catch(e){o?.(e)}},...l})})};J.displayName=`CodeBlockCopyButton`;const Y=({asChild:e=!1,className:i,onClick:a,ref:o,...s})=>{let{codeId:c,isCodeExpanded:l,setIsCodeExpanded:u,setHasCodeExpander:d}=B();return j(()=>(d(!0),()=>{d(!1)}),[d]),re(e?r:`button`,{...s,"data-slot":`code-block-expander-button`,"aria-controls":c,"aria-expanded":l,className:t(`flex w-full items-center justify-center gap-0.5 border-t border-gray-300 bg-base px-4 py-2 font-sans text-gray-700 hover:bg-base-hover`,i),ref:o,type:`button`,onClick:e=>{u(e=>!e),a?.(e)},children:[l?`Show less`:`Show more`,` `,I(n,{svg:I(O,{weight:`bold`}),className:t(`size-4`,l&&`rotate-180`,`transition-all duration-150`)})]})};Y.displayName=`CodeBlockExpanderButton`;function X({className:e,preset:r,svg:i,...a}){let s=i;if(r!=null)switch(r){case`file`:s=I(oe,{weight:`fill`});break;case`cli`:s=I(se,{weight:`fill`});break;case`traffic-policy`:s=I(o,{});break}return I(n,{"data-slot":`code-block-icon`,className:t(`size-5`,e),svg:s,...a})}X.displayName=`CodeBlockIcon`;const Z=({className:e,ref:n,...r})=>I(le,{"data-slot":`code-block-tab-list`,className:t(`scroll-fade-x flex min-w-0 items-center gap-1 overflow-x-auto overscroll-x-none`,`-m-1 p-1`,e),ref:n,...r});Z.displayName=`CodeBlockTabList`;const Q=({className:e,ref:n,...r})=>I(de,{"data-slot":`code-block-tab-trigger`,className:t(`shrink-0 cursor-pointer rounded px-1.5 py-0.5 font-sans text-xs font-medium whitespace-nowrap`,`text-gray-600 outline-hidden`,`hover:text-gray-900`,`data-[state=active]:bg-neutral-500/15 data-[state=active]:text-strong`,`focus-visible:ring-focus-accent focus-visible:ring-4`,e),ref:n,...r});Q.displayName=`CodeBlockTabTrigger`;const $=e=>I(ce,{"data-slot":`code-block-tab-content`,...e});$.displayName=`CodeBlockTabContent`;const Te={Root:V,Body:H,Code:G,CopyButton:J,ExpanderButton:Y,Header:K,Icon:X,TabContent:$,TabList:Z,TabTrigger:Q,Title:q},Ee=`var(--shiki-foreground)`;function De(e){return e.replace(/[&<]/g,e=>e===`&`?`&#x26;`:`&#x3C;`)}function Oe(e){return e===` `||e===` `||e===`
2
- `||e===`\r`||e===`{`||e===`}`||e===`[`||e===`]`||e===`:`||e===`,`||e===`"`}function ke(e,t,n){let r=e.length,i=[],a=`"`,o=t+1;for(;o<r;){let t=e[o];if(t===`\\`){let t=e[o+1]===`u`&&/^[0-9a-fA-F]{4}$/.test(e.slice(o+2,o+6))?6:2;a!==``&&(i.push({text:a,isEscape:!1}),a=``),i.push({text:e.slice(o,o+t),isEscape:!0}),o+=t;continue}if(t===`"`){a+=`"`,o+=1;break}a+=t,o+=1}a!==``&&i.push({text:a,isEscape:!1});let s=o;for(;s<r;){let t=e[s];if(t===` `||t===` `||t===`
3
- `||t===`\r`){s+=1;continue}break}let c=e[s]===`:`?`var(--shiki-token-keyword)`:`var(--shiki-token-string-expression)`;for(let e of i)n(e.text,e.isEscape?`var(--shiki-token-escape, var(--shiki-token-constant))`:c);return o}function Ae(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(n!=null&&n.color==null){let r=Ee;for(let n=t+1;n<e.length;n+=1){let t=e[n];if(t!=null&&t.color!=null){r=t.color;break}}n.color=r}}let t=``,n=``,r=null,i=()=>{r!=null&&(t+=`<span style="color:${r}">${De(n)}</span>`),n=``,r=null};for(let t of e)t!=null&&(t.color===r?n+=t.text:(i(),n=t.text,r=t.color));return i(),`<span class="line">${t}</span>`}function je(e){let t=[[]],n=t[0]??[],r=e.length,i=0,a=(e,t)=>{n.push({text:e,color:t})};for(;i<r;){let o=e[i];if(o===`
1
+ import{t as e}from"./compose-refs-BdBMM9ga.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./icon-lZ48P8Nn.js";import{t as r}from"./slot-CDk0Bb9z.js";import{t as i}from"./button-BAno7KIU.js";import{t as a}from"./use-copy-to-clipboard-DqQ0_N3E.js";import{t as o}from"./icons-CF1lbWtp.js";import{S as s,_ as c,a as l,b as u,c as d,d as f,f as p,g as m,h,i as g,l as _,m as v,n as y,o as b,p as x,r as S,s as C,t as w,u as T,v as E,y as D}from"./code-block-C9uaM9-V.js";import{CaretDownIcon as O}from"@phosphor-icons/react/CaretDown";import{createContext as k,useCallback as A,useContext as j,useEffect as M,useId as N,useLayoutEffect as P,useMemo as F,useRef as I,useState as L}from"react";import R from"tiny-invariant";import{jsx as z,jsxs as ee}from"react/jsx-runtime";import{CheckIcon as te}from"@phosphor-icons/react/Check";import{CopyIcon as ne}from"@phosphor-icons/react/Copy";import{FileTextIcon as re}from"@phosphor-icons/react/FileText";import{TerminalIcon as ie}from"@phosphor-icons/react/Terminal";import{Content as ae,List as oe,Root as se,Trigger as B}from"@radix-ui/react-tabs";function V(e){let t=-1;for(let n=0;n<e.length;n++){let r=e[n];if(r===`&`||r===`<`||r===`>`||r===`"`||r===`'`){t=n;break}}if(t===-1)return e;let n=e.slice(0,t);for(let r=t;r<e.length;r++){let t=e[r];switch(t){case`&`:n+=`&amp;`;break;case`<`:n+=`&lt;`;break;case`>`:n+=`&gt;`;break;case`"`:n+=`&quot;`;break;case`'`:n+=`&#39;`;break;default:n+=t}}return n}const H=new WeakMap;function U(e){let t=new Set;if(e==null||e===``)return t;for(let n of e.split(` `))n!==``&&t.add(n);return t}function W(e){let t=H.get(e);if(t!=null&&ce(t))return t;let n=new Map,r=new WeakMap,i=e.querySelectorAll(`[data-fold-regions]`);for(let e=0;e<i.length;e+=1){let t=i[e];if(!(t instanceof HTMLElement))continue;let a=U(t.dataset.foldRegions);if(a.size!==0){r.set(t,a);for(let e of a){let r=n.get(e);r??(r=[],n.set(e,r)),r.push(t)}}}let a={regionToLines:n,lineToRegions:r};return H.set(e,a),a}function G(e){H.delete(e)}function K(e){G(e),e.removeAttribute(`data-folded-regions`)}function ce(e){for(let t of e.regionToLines.values()){if(t.length===0)continue;let e=t[0];if(e!=null)return e.isConnected}return!0}function le(e,t,n){let r=!1;for(let e of n)if(t.has(e)){r=!0;break}r?e.dataset.foldHidden=`true`:delete e.dataset.foldHidden}function ue(e){let t=e.dataset.foldLine;if(t==null||t===``)return!1;let n=e.closest(`[data-slot='code-block-code']`)?.querySelector(`code`);if(n==null)return!1;let r=U(n.getAttribute(`data-folded-regions`)),i=!r.has(t);i?r.add(t):r.delete(t),r.size===0?n.removeAttribute(`data-folded-regions`):n.setAttribute(`data-folded-regions`,[...r].join(` `)),e.setAttribute(`aria-expanded`,i?`false`:`true`);let{regionToLines:a,lineToRegions:o}=W(n),s=a.get(t);if(s!=null)for(let e of s){let t=o.get(e);t!=null&&le(e,r,t)}return!0}function de(e){let t=e=>{let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`.mantle-code-fold-toggle`);n instanceof HTMLButtonElement&&ue(n)};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}const q=k(null);function J(){let e=j(q);return R(e!=null,`CodeBlock subcomponents must be rendered within a <CodeBlock.Root>.`),e}const fe=({asChild:e=!1,className:n,defaultTab:i,activeTab:a,onActiveTabChange:o,ref:s,...c})=>{let l=I(``),[u,d]=L(!1),[f,p]=L(!1),[m,h]=L(void 0),g=A(e=>{h(t=>(R(t==null,`You can only render a single CodeBlock.Code within a CodeBlock.`),e))},[]),_=A(e=>{h(t=>{R(t===e,`You can only render a single CodeBlock.Code within a CodeBlock.`)})},[]),v=F(()=>({codeId:m,copyTextRef:l,hasCodeExpander:u,isCodeExpanded:f,registerCodeId:g,setHasCodeExpander:d,setIsCodeExpanded:p,unregisterCodeId:_}),[m,u,f,g,_]),y=i!=null||a!=null,b=z(e?r:`div`,{"data-slot":`code-block`,className:t(`text-mono w-full overflow-hidden rounded-md border border-gray-300 bg-base font-mono`,`[&_svg]:shrink-0`,n),ref:s,...c});return z(q.Provider,{value:v,children:y?z(se,{asChild:!0,defaultValue:i,value:a,onValueChange:o,children:b}):b})},pe=({asChild:e=!1,className:n,ref:i,...a})=>z(e?r:`div`,{"data-slot":`code-block-body`,className:t(`relative`,n),ref:i,...a}),me=/SHIKI_VAL_(\d+)/g;function he(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}const Y=new Map;function ge(e){if(e==null||e.length===0)return me;let t=Y.get(e);return t??(Y.size>=500&&Y.clear(),t=RegExp(`${he(e)}(\\d+)__`,`g`),Y.set(e,t)),t}function X(e,t,n,r){if(n==null){if(!e.includes(`SHIKI_VAL_`))return e}else if(!e.includes(n))return e;return e.replaceAll(ge(n),(e,n)=>{let i=Number.parseInt(n,10);return Number.isNaN(i)||i<0||i>=t.length?e:r(t[i])})}function _e(e,t,n){return X(e,t,n,e=>V(String(e)))}function ve(e,t,n){return X(e,t,n,e=>String(e))}const ye=({className:n,style:r,value:i,ref:a,...o})=>{let s=N(),c=I(null),{copyTextRef:l,hasCodeExpander:u,isCodeExpanded:d,registerCodeId:f,unregisterCodeId:p}=J(),{language:m,code:h,"~preValToken":g,"~preVals":_,"~highlightLines":v,"~lineNumberStart":y,"~preHtml":b,"~showLineNumbers":x}=i,S=v,C=y??1,w=x??!1,T=F(()=>_!=null&&_.length>0?ve(h,_,g):h,[g,_,h]);P(()=>{l.current=T},[l,T]),M(()=>(f(s),()=>{p(s)}),[s,f,p]);let E=F(()=>{if(b!=null)return _!=null&&_.length>0?_e(b,_,g):b},[b,g,_]);M(()=>{let e=c.current;if(e==null)return;let t=e.querySelector(`code`);return t!=null&&K(t),de(e)},[E]);let D=E!=null,O=E??V(T),k=F(()=>({__html:O}),[O]);return z(`pre`,{"data-slot":`code-block-code`,"aria-expanded":u?d:void 0,className:t(`scrollbar overflow-x-auto overflow-y-hidden py-4`,!D&&`pr-14`,`data-[mantle-line-numbers~='false']:pl-4`,`text-mono m-0 font-mono outline-hidden`,`aria-collapsed:max-h-[13.6rem]`,n),"data-highlighted":D?`true`:`false`,"data-lang":m,"data-mantle-highlight-lines":D&&S!=null&&S.length>0?S.join(`,`):void 0,"data-mantle-line-number-start":D&&w?String(C):`1`,"data-mantle-line-numbers":D&&w?`true`:`false`,id:s,ref:e(c,a),style:{...r,"--mantle-line-number-start":String(C),tabSize:2,MozTabSize:2},...o,children:z(`code`,{className:`text-size-inherit block min-w-full w-max`,dangerouslySetInnerHTML:k})})},be=({asChild:e=!1,className:n,ref:i,...a})=>z(e?r:`div`,{"data-slot":`code-block-header`,className:t(`flex items-center gap-1 border-b border-gray-300 bg-base px-4 py-2 text-gray-700`,n),ref:i,...a}),xe=({asChild:e=!1,className:n,ref:i,...a})=>z(e?r:`h3`,{"data-slot":`code-block-title`,ref:i,className:t(`m-0 font-sans text-xs font-medium`,n),...a}),Se=({className:e,label:n=`Copy code`,onCopy:r,onCopyError:o,onClick:s,ref:c,...l})=>{let{copyTextRef:u}=J(),d=a(),[f,p]=L(!1),m=I(void 0);return M(()=>()=>{m.current!=null&&clearTimeout(m.current)},[]),z(`span`,{"data-slot":`code-block-copy-button`,className:`absolute right-3 top-3 z-10 inline-flex size-7 items-center justify-center rounded-[var(--icon-button-border-radius,0.375rem)] bg-base`,children:z(i,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,label:n,icon:z(f?te:ne,{}),className:t(`bg-base not-disabled:hover:bg-neutral-500/15`,e),ref:c,onClick:async e=>{try{if(s?.(e),e.defaultPrevented){m.current!=null&&clearTimeout(m.current);return}let t=u.current;await d(t),r?.(t),p(!0),m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{p(!1)},2e3)}catch(e){o?.(e)}},...l})})},Z=({asChild:e=!1,className:i,onClick:a,ref:o,...s})=>{let{codeId:c,isCodeExpanded:l,setIsCodeExpanded:u,setHasCodeExpander:d}=J();return M(()=>(d(!0),()=>{d(!1)}),[d]),ee(e?r:`button`,{...s,"data-slot":`code-block-expander-button`,"aria-controls":c,"aria-expanded":l,className:t(`flex w-full items-center justify-center gap-0.5 border-t border-gray-300 bg-base px-4 py-2 font-sans text-gray-700 hover:bg-base-hover`,i),ref:o,type:`button`,onClick:e=>{u(e=>!e),a?.(e)},children:[l?`Show less`:`Show more`,` `,z(n,{svg:z(O,{weight:`bold`}),className:t(`size-4`,l&&`rotate-180`,`transition-all duration-150`)})]})};function Ce({className:e,preset:r,svg:i,...a}){let s=i;if(r!=null)switch(r){case`file`:s=z(re,{weight:`fill`});break;case`cli`:s=z(ie,{weight:`fill`});break;case`traffic-policy`:s=z(o,{});break}return z(n,{"data-slot":`code-block-icon`,className:t(`size-5`,e),svg:s,...a})}const we={Root:fe,Body:pe,Code:ye,CopyButton:Se,ExpanderButton:Z,Header:be,Icon:Ce,TabContent:e=>z(ae,{"data-slot":`code-block-tab-content`,...e}),TabList:({className:e,ref:n,...r})=>z(oe,{"data-slot":`code-block-tab-list`,className:t(`scroll-fade-x flex min-w-0 items-center gap-1 overflow-x-auto overscroll-x-none`,`-m-1 p-1`,e),ref:n,...r}),TabTrigger:({className:e,ref:n,...r})=>z(B,{"data-slot":`code-block-tab-trigger`,className:t(`shrink-0 cursor-pointer rounded px-1.5 py-0.5 font-sans text-xs font-medium whitespace-nowrap`,`text-gray-600 outline-hidden`,`hover:text-gray-900`,`data-[state=active]:bg-neutral-500/15 data-[state=active]:text-strong`,`focus-visible:ring-focus-accent focus-visible:ring-4`,e),ref:n,...r}),Title:xe},Q=`var(--shiki-foreground)`;function Te(e){return e.replace(/[&<]/g,e=>e===`&`?`&#x26;`:`&#x3C;`)}function Ee(e){return e===` `||e===` `||e===`
2
+ `||e===`\r`||e===`{`||e===`}`||e===`[`||e===`]`||e===`:`||e===`,`||e===`"`}function De(e,t,n){let r=e.length,i=[],a=`"`,o=t+1;for(;o<r;){let t=e[o];if(t===`\\`){let t=e[o+1]===`u`&&/^[0-9a-fA-F]{4}$/.test(e.slice(o+2,o+6))?6:2;a!==``&&(i.push({text:a,isEscape:!1}),a=``),i.push({text:e.slice(o,o+t),isEscape:!0}),o+=t;continue}if(t===`"`){a+=`"`,o+=1;break}a+=t,o+=1}a!==``&&i.push({text:a,isEscape:!1});let s=o;for(;s<r;){let t=e[s];if(t===` `||t===` `||t===`
3
+ `||t===`\r`){s+=1;continue}break}let c=e[s]===`:`?`var(--shiki-token-keyword)`:`var(--shiki-token-string-expression)`;for(let e of i)n(e.text,e.isEscape?`var(--shiki-token-escape, var(--shiki-token-constant))`:c);return o}function Oe(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(n!=null&&n.color==null){let r=Q;for(let n=t+1;n<e.length;n+=1){let t=e[n];if(t!=null&&t.color!=null){r=t.color;break}}n.color=r}}let t=``,n=``,r=null,i=()=>{r!=null&&(t+=`<span style="color:${r}">${Te(n)}</span>`),n=``,r=null};for(let t of e)t!=null&&(t.color===r?n+=t.text:(i(),n=t.text,r=t.color));return i(),`<span class="line">${t}</span>`}function $(e){let t=[[]],n=t[0]??[],r=e.length,i=0,a=(e,t)=>{n.push({text:e,color:t})};for(;i<r;){let o=e[i];if(o===`
4
4
  `||o===`\r`){o===`\r`&&e[i+1]===`
5
- `&&(i+=1);let r=[];t.push(r),n=r,i+=1;continue}if(o===` `||o===` `){let t=i+1;for(;t<r;){let n=e[t];if(n!==` `&&n!==` `)break;t+=1}a(e.slice(i,t),null),i=t;continue}if(o===`{`||o===`}`||o===`[`||o===`]`){a(o,Ee),i+=1;continue}if(o===`:`||o===`,`){a(o,`var(--shiki-token-punctuation)`),i+=1;continue}if(o===`"`){i=ke(e,i,a);continue}let s=i+1;for(;s<r&&!Oe(e[s]??``);)s+=1;a(e.slice(i,s),`var(--shiki-token-constant)`),i=s}return t.map(Ae).join(`
6
- `)}function Me(e){let t=new WeakSet;try{return JSON.stringify(e,(e,n)=>{if(typeof n==`bigint`)return n.toString();if(typeof n==`object`&&n){if(t.has(n))return`[Circular]`;t.add(n)}return n},2)??``}catch{try{return String(e)}catch{return``}}}function Ne(e,{showLineNumbers:t=!1,foldable:n=!0}={}){let r=Me(e);return u({language:`json`,code:r,preHtml:c({html:je(r),foldableRanges:n?E(r):void 0,showLineNumbers:t}),showLineNumbers:t})}function Pe(e,t){let n=1;if(n>t)return!0;for(let r=0;r<e.length;r++)if(e[r]===`
7
- `&&(n+=1,n>t))return!0;return!1}export{Te as CodeBlock,h as computeFoldRanges,E as computeJsonFoldRanges,u as createMantleCodeBlockValue,c as decorateHighlightedHtml,w as defaultMeta,L as escapeHtml,D as finalizeFoldRanges,m as foldStrategyFor,Pe as hasMoreThanNLines,x as inferIndentation,v as isIndentation,_ as isSupportedLanguage,Ne as jsonCodeBlockValue,je as jsonToShikiHtml,s as mantleCode,p as normalizeIndentation,y as normalizeValue,b as parseCodeBlockHighlightLines,C as parseCodeBlockLineNumberStart,d as parseCodeBlockShowLineNumbers,T as parseLanguage,S as parseMetastring,g as resolvePreRenderedCodeBlockProps,f as supportedLanguages,l as tokenizeMetastring};
5
+ `&&(i+=1);let r=[];t.push(r),n=r,i+=1;continue}if(o===` `||o===` `){let t=i+1;for(;t<r;){let n=e[t];if(n!==` `&&n!==` `)break;t+=1}a(e.slice(i,t),null),i=t;continue}if(o===`{`||o===`}`||o===`[`||o===`]`){a(o,Q),i+=1;continue}if(o===`:`||o===`,`){a(o,`var(--shiki-token-punctuation)`),i+=1;continue}if(o===`"`){i=De(e,i,a);continue}let s=i+1;for(;s<r&&!Ee(e[s]??``);)s+=1;a(e.slice(i,s),`var(--shiki-token-constant)`),i=s}return t.map(Oe).join(`
6
+ `)}function ke(e){let t=new WeakSet;try{return JSON.stringify(e,(e,n)=>{if(typeof n==`bigint`)return n.toString();if(typeof n==`object`&&n){if(t.has(n))return`[Circular]`;t.add(n)}return n},2)??``}catch{try{return String(e)}catch{return``}}}function Ae(e,{showLineNumbers:t=!1,foldable:n=!0}={}){let r=ke(e);return u({language:`json`,code:r,preHtml:c({html:$(r),foldableRanges:n?E(r):void 0,showLineNumbers:t}),showLineNumbers:t})}function je(e,t){let n=1;if(n>t)return!0;for(let r=0;r<e.length;r++)if(e[r]===`
7
+ `&&(n+=1,n>t))return!0;return!1}export{we as CodeBlock,h as computeFoldRanges,E as computeJsonFoldRanges,u as createMantleCodeBlockValue,c as decorateHighlightedHtml,w as defaultMeta,V as escapeHtml,D as finalizeFoldRanges,m as foldStrategyFor,je as hasMoreThanNLines,x as inferIndentation,v as isIndentation,_ as isSupportedLanguage,Ae as jsonCodeBlockValue,$ as jsonToShikiHtml,s as mantleCode,p as normalizeIndentation,y as normalizeValue,b as parseCodeBlockHighlightLines,C as parseCodeBlockLineNumberStart,d as parseCodeBlockShowLineNumbers,T as parseLanguage,S as parseMetastring,g as resolvePreRenderedCodeBlockProps,f as supportedLanguages,l as tokenizeMetastring};
@@ -1,2 +1,2 @@
1
- import { A as FoldStrategy, B as computeJsonFoldRanges, C as Indentation, D as FoldExplanation, E as ComputeFoldRangesInput, F as isSupportedLanguage, H as finalizeFoldRanges, I as parseLanguage, L as supportedLanguages, M as computeFoldRanges, N as foldStrategyFor, O as FoldLine, P as SupportedLanguage, R as DecorateHighlightedHtmlInput, S as normalizeIndentation, T as isIndentation, U as LineRange, V as FoldableRange, b as defaultShowLineNumbers, g as parseCodeBlockShowLineNumbers, h as parseCodeBlockLineNumberStart, j as FoldToken, k as FoldScope, m as parseCodeBlockHighlightLines, p as tokenizeMetastring, u as normalizeValue, w as inferIndentation, z as decorateHighlightedHtml } from "./resolve-pre-rendered-props-B6OlZrSI.js";
1
+ import { A as FoldStrategy, B as computeJsonFoldRanges, C as Indentation, D as FoldExplanation, E as ComputeFoldRangesInput, F as isSupportedLanguage, H as finalizeFoldRanges, I as parseLanguage, L as supportedLanguages, M as computeFoldRanges, N as foldStrategyFor, O as FoldLine, P as SupportedLanguage, R as DecorateHighlightedHtmlInput, S as normalizeIndentation, T as isIndentation, U as LineRange, V as FoldableRange, b as defaultShowLineNumbers, g as parseCodeBlockShowLineNumbers, h as parseCodeBlockLineNumberStart, j as FoldToken, k as FoldScope, m as parseCodeBlockHighlightLines, p as tokenizeMetastring, u as normalizeValue, w as inferIndentation, z as decorateHighlightedHtml } from "./code-block-B6OlZrSI.js";
2
2
  export { type ComputeFoldRangesInput, type DecorateHighlightedHtmlInput, type FoldExplanation, type FoldLine, type FoldScope, type FoldStrategy, type FoldToken, type FoldableRange, type Indentation, type LineRange, type SupportedLanguage, computeFoldRanges, computeJsonFoldRanges, decorateHighlightedHtml, defaultShowLineNumbers, finalizeFoldRanges, foldStrategyFor, inferIndentation, isIndentation, isSupportedLanguage, normalizeIndentation, normalizeValue, parseCodeBlockHighlightLines, parseCodeBlockLineNumberStart, parseCodeBlockShowLineNumbers, parseLanguage, supportedLanguages, tokenizeMetastring };
@@ -1 +1 @@
1
- import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,l as s,m as c,n as l,o as u,p as d,s as f,u as p,v as m,x as h,y as g}from"./resolve-pre-rendered-props-C9uaM9-V.js";export{o as computeFoldRanges,m as computeJsonFoldRanges,e as decorateHighlightedHtml,h as defaultShowLineNumbers,g as finalizeFoldRanges,a as foldStrategyFor,d as inferIndentation,c as isIndentation,s as isSupportedLanguage,i as normalizeIndentation,l as normalizeValue,u as parseCodeBlockHighlightLines,f as parseCodeBlockLineNumberStart,n as parseCodeBlockShowLineNumbers,p as parseLanguage,r as supportedLanguages,t as tokenizeMetastring};
1
+ import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,l as s,m as c,n as l,o as u,p as d,s as f,u as p,v as m,x as h,y as g}from"./code-block-C9uaM9-V.js";export{o as computeFoldRanges,m as computeJsonFoldRanges,e as decorateHighlightedHtml,h as defaultShowLineNumbers,g as finalizeFoldRanges,a as foldStrategyFor,d as inferIndentation,c as isIndentation,s as isSupportedLanguage,i as normalizeIndentation,l as normalizeValue,u as parseCodeBlockHighlightLines,f as parseCodeBlockLineNumberStart,n as parseCodeBlockShowLineNumbers,p as parseLanguage,r as supportedLanguages,t as tokenizeMetastring};
@@ -1,5 +1,5 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { o as WithValidation } from "./validation-7QeiTFwl.js";
2
+ import { o as WithValidation } from "./field-7QeiTFwl.js";
3
3
  import { n as Separator } from "./separator-B5UmkVRL.js";
4
4
  import { ComponentProps } from "react";
5
5
  import * as Primitive from "@ariakit/react";
@@ -29,10 +29,7 @@ type ComboboxProps = Primitive.ComboboxProviderProps;
29
29
  * </Combobox.Root>
30
30
  * ```
31
31
  */
32
- declare const Root: {
33
- ({ children, ...props }: ComboboxProps): import("react").JSX.Element;
34
- displayName: string;
35
- };
32
+ declare const Root: ({ children, ...props }: ComboboxProps) => import("react").JSX.Element;
36
33
  type ComboboxInputProps = Omit<Primitive.ComboboxProps, "render"> & WithValidation;
37
34
  /**
38
35
  * Renders a combobox input element that can be used to filter a list of items.
@@ -50,10 +47,7 @@ type ComboboxInputProps = Omit<Primitive.ComboboxProps, "render"> & WithValidati
50
47
  * </Combobox.Root>
51
48
  * ```
52
49
  */
53
- declare const Input: {
54
- ({ "aria-invalid": _ariaInvalid, autoComplete, autoSelect, className, ref, validation: _validation, ...props }: ComboboxInputProps): import("react").JSX.Element;
55
- displayName: string;
56
- };
50
+ declare const Input: ({ "aria-invalid": _ariaInvalid, autoComplete, autoSelect, className, ref, validation: _validation, ...props }: ComboboxInputProps) => import("react").JSX.Element;
57
51
  type ComboboxContentProps = Omit<Primitive.ComboboxPopoverProps, "render"> & WithAsChild;
58
52
  /**
59
53
  * Renders a popover that contains combobox content, e.g. Combobox.Items, Combobox.Groups, and Combobox.Separators.
@@ -75,10 +69,7 @@ type ComboboxContentProps = Omit<Primitive.ComboboxPopoverProps, "render"> & Wit
75
69
  * </Combobox.Root>
76
70
  * ```
77
71
  */
78
- declare const Content: {
79
- ({ asChild, children, className, ref, sameWidth, unmountOnHide, ...props }: ComboboxContentProps): import("react").JSX.Element;
80
- displayName: string;
81
- };
72
+ declare const Content: ({ asChild, children, className, ref, sameWidth, unmountOnHide, ...props }: ComboboxContentProps) => import("react").JSX.Element;
82
73
  type ComboboxItemProps = Omit<Primitive.ComboboxItemProps, "render"> & WithAsChild;
83
74
  /**
84
75
  * Renders a combobox item inside a Combobox.Content component.
@@ -97,10 +88,7 @@ type ComboboxItemProps = Omit<Primitive.ComboboxItemProps, "render"> & WithAsChi
97
88
  * </Combobox.Root>
98
89
  * ```
99
90
  */
100
- declare const Item: {
101
- ({ asChild, children, className, focusOnHover, ref, value, ...props }: ComboboxItemProps): import("react").JSX.Element;
102
- displayName: string;
103
- };
91
+ declare const Item: ({ asChild, children, className, focusOnHover, ref, value, ...props }: ComboboxItemProps) => import("react").JSX.Element;
104
92
  type ComboboxGroupProps = Omit<Primitive.ComboboxGroupProps, "render"> & WithAsChild;
105
93
  /**
106
94
  * Renders a group for Combobox.Item elements.
@@ -125,10 +113,7 @@ type ComboboxGroupProps = Omit<Primitive.ComboboxGroupProps, "render"> & WithAsC
125
113
  * </Combobox.Root>
126
114
  * ```
127
115
  */
128
- declare const Group: {
129
- ({ asChild, children, className, ref, ...props }: ComboboxGroupProps): import("react").JSX.Element;
130
- displayName: string;
131
- };
116
+ declare const Group: ({ asChild, children, className, ref, ...props }: ComboboxGroupProps) => import("react").JSX.Element;
132
117
  type ComboboxGroupLabelProps = Omit<Primitive.ComboboxGroupLabelProps, "render"> & WithAsChild;
133
118
  /**
134
119
  * Renders a label in a combobox group.
@@ -153,10 +138,7 @@ type ComboboxGroupLabelProps = Omit<Primitive.ComboboxGroupLabelProps, "render">
153
138
  * </Combobox.Root>
154
139
  * ```
155
140
  */
156
- declare const GroupLabel: {
157
- ({ asChild, children, className, ref, ...props }: ComboboxGroupLabelProps): import("react").JSX.Element;
158
- displayName: string;
159
- };
141
+ declare const GroupLabel: ({ asChild, children, className, ref, ...props }: ComboboxGroupLabelProps) => import("react").JSX.Element;
160
142
  type ComboboxItemValueProps = Omit<Primitive.ComboboxItemValueProps<"span">, "render"> & WithAsChild;
161
143
  /**
162
144
  * Highlights the match between the current Combobox.Input value (userValue) and parent Combobox.Item value.
@@ -189,10 +171,7 @@ type ComboboxItemValueProps = Omit<Primitive.ComboboxItemValueProps<"span">, "re
189
171
  * </Combobox.Root>
190
172
  * ```
191
173
  */
192
- declare const ItemValue: {
193
- ({ asChild, className, ref, ...props }: ComboboxItemValueProps): import("react").JSX.Element;
194
- displayName: string;
195
- };
174
+ declare const ItemValue: ({ asChild, className, ref, ...props }: ComboboxItemValueProps) => import("react").JSX.Element;
196
175
  /**
197
176
  * Renders a separator between Combobox.Items or Combobox.Groups.
198
177
  *
@@ -215,10 +194,7 @@ declare const ItemValue: {
215
194
  * </Combobox.Root>
216
195
  * ```
217
196
  */
218
- declare const ComboboxSeparatorComponent: {
219
- ({ className, ref, ...props }: ComponentProps<typeof Separator>): import("react").JSX.Element;
220
- displayName: string;
221
- };
197
+ declare const ComboboxSeparatorComponent: ({ className, ref, ...props }: ComponentProps<typeof Separator>) => import("react").JSX.Element;
222
198
  /**
223
199
  * Fill in a React input field with autocomplete & autosuggest functionalities.
224
200
  * Choose from a list of suggested values with full keyboard support.
package/dist/combobox.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-CDk0Bb9z.js";import{a as n,r}from"./validation-Bpptk_9t.js";import{n as i}from"./separator-bpE_kooz.js";import{createContext as a}from"react";import{jsx as o}from"react/jsx-runtime";import*as s from"@ariakit/react";const c=({children:e,...t})=>o(s.ComboboxProvider,{...t,children:e});c.displayName=`Combobox`;const l=({"aria-invalid":t,autoComplete:i=`list`,autoSelect:a=`always`,className:c,ref:l,validation:u,...d})=>{let f=n(),{ariaInvalid:p,validation:m}=r({"aria-invalid":t,validation:u??f});return o(s.Combobox,{"aria-invalid":p,autoComplete:i,autoSelect:a,"data-slot":`combobox-input`,className:e(`pointer-coarse:text-base h-9 text-sm`,`bg-form relative block w-full rounded-md border px-3 py-2 border-form text-strong font-sans`,`placeholder:text-placeholder`,`aria-disabled:opacity-50`,`hover:border-neutral-400`,`focus:outline-hidden focus:ring-4 aria-expanded:ring-4`,`focus:border-accent-600 focus:ring-focus-accent aria-expanded:border-accent-600 aria-expanded:ring-focus-accent`,`data-validation-success:border-success-600 data-validation-success:focus:border-success-600 data-validation-success:focus:ring-focus-success data-validation-success:aria-expanded:border-success-600 data-validation-success:aria-expanded:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:focus:border-warning-600 data-validation-warning:focus:ring-focus-warning data-validation-warning:aria-expanded:border-warning-600 data-validation-warning:aria-expanded:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:focus:border-danger-600 data-validation-error:focus:ring-focus-danger data-validation-error:aria-expanded:border-danger-600 data-validation-error:aria-expanded:ring-focus-danger`,`autofill:shadow-(--color-blue-50) autofill:bg-blue-50 autofill:[-webkit-text-fill-color:var(--text-color-strong)]`,c),"data-validation":m||void 0,ref:l,...d})};l.displayName=`ComboboxInput`;const u=({asChild:n=!1,children:r,className:i,ref:a,sameWidth:c=!0,unmountOnHide:l=!0,...u})=>o(s.ComboboxPopover,{"data-slot":`combobox-content`,className:e(`border-popover bg-popover relative z-50 max-h-96 min-w-32 scrollbar overflow-y-scroll overflow-x-hidden rounded-md border shadow-md p-1 my-2 space-y-px font-sans focus:outline-hidden`,i),ref:a,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,sameWidth:c,unmountOnHide:l,...u,children:r});u.displayName=`ComboboxContent`;const d=a(void 0),f=({asChild:n=!1,children:r,className:i,focusOnHover:a=!0,ref:c,value:l,...u})=>o(d.Provider,{value:l,children:o(s.ComboboxItem,{"data-slot":`combobox-item`,className:e(`cursor-pointer rounded-md px-2 py-1.5 text-strong text-sm flex min-w-0 gap-2 items-center [&>svg]:size-5 [&_svg]:shrink-0`,`data-active-item:bg-active-menu-item`,`aria-disabled:opacity-50`,i),focusOnHover:a,ref:c,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,value:l,...u,children:r})});f.displayName=`ComboboxItem`;const p=({asChild:n=!1,children:r,className:i,ref:a,...c})=>o(s.ComboboxGroup,{"data-slot":`combobox-group`,className:e(`space-y-px`,i),ref:a,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,...c,children:r});p.displayName=`ComboboxGroup`;const m=({asChild:n=!1,children:r,className:i,ref:a,...c})=>o(s.ComboboxGroupLabel,{"data-slot":`combobox-group-label`,className:e(`text-muted px-2 py-1 text-xs font-medium`,i),ref:a,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,...c,children:r});m.displayName=`ComboboxGroupLabel`;const h=({asChild:n=!1,className:r,ref:i,...a})=>o(s.ComboboxItemValue,{"data-slot":`combobox-item-value`,className:e(`*:data-user-value:font-medium flex-1 shrink-0 text-strong font-normal`,r),ref:i,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,...a});h.displayName=`ComboboxItemValue`;const g=({className:t,ref:n,...r})=>o(i,{ref:n,"data-slot":`combobox-separator`,className:e(`-mx-1.25 my-1 w-auto`,t),...r});g.displayName=`ComboboxSeparator`;const _={Root:c,Content:u,Group:p,GroupLabel:m,Input:l,Item:f,ItemValue:h,Separator:g};export{_ as Combobox};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-CDk0Bb9z.js";import{a as n,r}from"./field-Bpptk_9t.js";import{n as i}from"./separator-bpE_kooz.js";import{createContext as a}from"react";import{jsx as o}from"react/jsx-runtime";import*as s from"@ariakit/react";const c=({children:e,...t})=>o(s.ComboboxProvider,{...t,children:e}),l=({"aria-invalid":t,autoComplete:i=`list`,autoSelect:a=`always`,className:c,ref:l,validation:u,...d})=>{let f=n(),{ariaInvalid:p,validation:m}=r({"aria-invalid":t,validation:u??f});return o(s.Combobox,{"aria-invalid":p,autoComplete:i,autoSelect:a,"data-slot":`combobox-input`,className:e(`pointer-coarse:text-base h-9 text-sm`,`bg-form relative block w-full rounded-md border px-3 py-2 border-form text-strong font-sans`,`placeholder:text-placeholder`,`aria-disabled:opacity-50`,`hover:border-neutral-400`,`focus:outline-hidden focus:ring-4 aria-expanded:ring-4`,`focus:border-accent-600 focus:ring-focus-accent aria-expanded:border-accent-600 aria-expanded:ring-focus-accent`,`data-validation-success:border-success-600 data-validation-success:focus:border-success-600 data-validation-success:focus:ring-focus-success data-validation-success:aria-expanded:border-success-600 data-validation-success:aria-expanded:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:focus:border-warning-600 data-validation-warning:focus:ring-focus-warning data-validation-warning:aria-expanded:border-warning-600 data-validation-warning:aria-expanded:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:focus:border-danger-600 data-validation-error:focus:ring-focus-danger data-validation-error:aria-expanded:border-danger-600 data-validation-error:aria-expanded:ring-focus-danger`,`autofill:shadow-(--color-blue-50) autofill:bg-blue-50 autofill:[-webkit-text-fill-color:var(--text-color-strong)]`,c),"data-validation":m||void 0,ref:l,...d})},u=({asChild:n=!1,children:r,className:i,ref:a,sameWidth:c=!0,unmountOnHide:l=!0,...u})=>o(s.ComboboxPopover,{"data-slot":`combobox-content`,className:e(`border-popover bg-popover relative z-50 max-h-96 min-w-32 scrollbar overflow-y-scroll overflow-x-hidden rounded-md border shadow-md p-1 my-2 space-y-px font-sans focus:outline-hidden`,i),ref:a,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,sameWidth:c,unmountOnHide:l,...u,children:r}),d=a(void 0),f={Root:c,Content:u,Group:({asChild:n=!1,children:r,className:i,ref:a,...c})=>o(s.ComboboxGroup,{"data-slot":`combobox-group`,className:e(`space-y-px`,i),ref:a,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,...c,children:r}),GroupLabel:({asChild:n=!1,children:r,className:i,ref:a,...c})=>o(s.ComboboxGroupLabel,{"data-slot":`combobox-group-label`,className:e(`text-muted px-2 py-1 text-xs font-medium`,i),ref:a,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,...c,children:r}),Input:l,Item:({asChild:n=!1,children:r,className:i,focusOnHover:a=!0,ref:c,value:l,...u})=>o(d.Provider,{value:l,children:o(s.ComboboxItem,{"data-slot":`combobox-item`,className:e(`cursor-pointer rounded-md px-2 py-1.5 text-strong text-sm flex min-w-0 gap-2 items-center [&>svg]:size-5 [&_svg]:shrink-0`,`data-active-item:bg-active-menu-item`,`aria-disabled:opacity-50`,i),focusOnHover:a,ref:c,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,value:l,...u,children:r})}),ItemValue:({asChild:n=!1,className:r,ref:i,...a})=>o(s.ComboboxItemValue,{"data-slot":`combobox-item-value`,className:e(`*:data-user-value:font-medium flex-1 shrink-0 text-strong font-normal`,r),ref:i,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,...a}),Separator:({className:t,ref:n,...r})=>o(i,{ref:n,"data-slot":`combobox-separator`,className:e(`-mx-1.25 my-1 w-auto`,t),...r})};export{f as Combobox};
package/dist/command.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as Root } from "./primitive-CJRIlrLz.js";
1
+ import { a as Root } from "./dialog-BM4wPCft.js";
2
2
  import { ComponentProps, ComponentPropsWithoutRef, ReactNode, Ref } from "react";
3
3
  import { Command as Command$1, useCommandState } from "cmdk";
4
4
  //#region src/components/command/command.d.ts
@@ -35,10 +35,7 @@ type CommandRootProps = ComponentProps<typeof Command$1>;
35
35
  * </Command.DialogRoot>
36
36
  * ```
37
37
  */
38
- declare const CommandRoot: {
39
- ({ className, ...props }: CommandRootProps): import("react").JSX.Element;
40
- displayName: string;
41
- };
38
+ declare const CommandRoot: ({ className, ...props }: CommandRootProps) => import("react").JSX.Element;
42
39
  /**
43
40
  * The props for the CommandDialog.Content component.
44
41
  *
@@ -447,6 +444,18 @@ declare const Command: {
447
444
  * <Command.Input placeholder="Type a command or search..." />
448
445
  * <Command.List>
449
446
  * <Command.Empty>No results found.</Command.Empty>
447
+ * <Command.Group heading="Suggestions">
448
+ * <Command.Item>
449
+ * <span>Calendar</span>
450
+ * </Command.Item>
451
+ * </Command.Group>
452
+ * <Command.Separator />
453
+ * <Command.Group heading="Settings">
454
+ * <Command.Item>
455
+ * <span>Profile</span>
456
+ * <Command.Shortcut>⌘,</Command.Shortcut>
457
+ * </Command.Item>
458
+ * </Command.Group>
450
459
  * </Command.List>
451
460
  * </Command.DialogContent>
452
461
  * </Command.DialogRoot>
@@ -460,15 +469,32 @@ declare const Command: {
460
469
  *
461
470
  * @example
462
471
  * ```tsx
463
- * <Command.DialogTrigger asChild>
464
- * <Button type="button" appearance="outlined" intent="neutral">Open Command Palette</Button>
465
- * </Command.DialogTrigger>
472
+ * <Command.DialogRoot open={open} onOpenChange={setOpen}>
473
+ * <Command.DialogTrigger asChild>
474
+ * <Button type="button" appearance="outlined" intent="neutral">Open Command Palette</Button>
475
+ * </Command.DialogTrigger>
476
+ * <Command.DialogContent>
477
+ * <Command.Input placeholder="Type a command or search..." />
478
+ * <Command.List>
479
+ * <Command.Empty>No results found.</Command.Empty>
480
+ * <Command.Group heading="Suggestions">
481
+ * <Command.Item>
482
+ * <span>Calendar</span>
483
+ * </Command.Item>
484
+ * </Command.Group>
485
+ * <Command.Separator />
486
+ * <Command.Group heading="Settings">
487
+ * <Command.Item>
488
+ * <span>Profile</span>
489
+ * <Command.Shortcut>⌘,</Command.Shortcut>
490
+ * </Command.Item>
491
+ * </Command.Group>
492
+ * </Command.List>
493
+ * </Command.DialogContent>
494
+ * </Command.DialogRoot>
466
495
  * ```
467
496
  */
468
- readonly DialogTrigger: {
469
- (props: ComponentProps<import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>>): import("react").JSX.Element;
470
- displayName: string;
471
- };
497
+ readonly DialogTrigger: (props: ComponentProps<import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>>) => import("react").JSX.Element;
472
498
  /**
473
499
  * The visible content of the Command dialog. Renders inside the dialog portal.
474
500
  *
@@ -476,12 +502,29 @@ declare const Command: {
476
502
  *
477
503
  * @example
478
504
  * ```tsx
479
- * <Command.DialogContent>
480
- * <Command.Input placeholder="Type a command or search..." />
481
- * <Command.List>
482
- * <Command.Empty>No results found.</Command.Empty>
483
- * </Command.List>
484
- * </Command.DialogContent>
505
+ * <Command.DialogRoot open={open} onOpenChange={setOpen}>
506
+ * <Command.DialogTrigger asChild>
507
+ * <Button type="button" appearance="outlined" intent="neutral">Open Command Palette</Button>
508
+ * </Command.DialogTrigger>
509
+ * <Command.DialogContent>
510
+ * <Command.Input placeholder="Type a command or search..." />
511
+ * <Command.List>
512
+ * <Command.Empty>No results found.</Command.Empty>
513
+ * <Command.Group heading="Suggestions">
514
+ * <Command.Item>
515
+ * <span>Calendar</span>
516
+ * </Command.Item>
517
+ * </Command.Group>
518
+ * <Command.Separator />
519
+ * <Command.Group heading="Settings">
520
+ * <Command.Item>
521
+ * <span>Profile</span>
522
+ * <Command.Shortcut>⌘,</Command.Shortcut>
523
+ * </Command.Item>
524
+ * </Command.Group>
525
+ * </Command.List>
526
+ * </Command.DialogContent>
527
+ * </Command.DialogRoot>
485
528
  * ```
486
529
  */
487
530
  readonly DialogContent: typeof CommandDialogContent;
@@ -725,6 +768,15 @@ type Props = Omit<ComponentProps<"kbd">, "children">;
725
768
  *
726
769
  * - Initializes to `"⌃"` to avoid SSR mismatch.
727
770
  * - Updates on mount using `detectMetaKey()`.
771
+ *
772
+ * @see https://mantle.ngrok.com/components/navigation/command#metakey
773
+ *
774
+ * @example
775
+ * ```tsx
776
+ * <Command.Shortcut>
777
+ * <MetaKey /> S
778
+ * </Command.Shortcut>
779
+ * ```
728
780
  */
729
781
  declare function MetaKey({ className, ...props }: Props): import("react").JSX.Element;
730
782
  //#endregion
package/dist/command.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{n as t}from"./separator-bpE_kooz.js";import{t as n}from"./dialog-CQ2C6vkE.js";import{t as r}from"./kbd-K8iaZ-Ti.js";import{useEffect as i,useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{MagnifyingGlassIcon as c}from"@phosphor-icons/react/MagnifyingGlass";import{Command as l,useCommandState as u}from"cmdk";const d=({className:t,...n})=>o(l,{"data-slot":`command`,className:e(`bg-popover flex h-full w-full flex-col overflow-hidden rounded-md`,t),...n});d.displayName=`Command`;const f={Root:d,DialogRoot:n.Root,DialogTrigger:n.Trigger,DialogContent:({children:t,className:r,description:i=`Search for a command to run...`,filter:a,shouldFilter:c,showCloseButton:l=!0,title:u=`Command Palette`})=>s(n.Content,{className:e(`overflow-hidden p-0 relative`,r),children:[s(n.Header,{className:`sr-only absolute`,children:[o(n.Title,{children:u}),o(n.Description,{children:i})]}),o(d,{className:`**:data-[slot=command-input-wrapper]:h-12 **:[[cmdk-input]]:h-12 **:data-[slot=command-group]:px-2 **:data-[slot=command-list]:pb-1`,filter:a,shouldFilter:c,children:t}),l&&o(`div`,{className:`absolute top-1.5 right-1.5`,children:o(n.CloseIconButton,{})})]}),Input:({className:t,ref:n,...r})=>s(`div`,{ref:n,"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b border-popover px-3`,children:[o(c,{className:`size-5 shrink-0 opacity-50`}),o(l.Input,{"data-slot":`command-input`,className:e(`placeholder:text-muted flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,t),...r})]}),List:({className:t,...n})=>o(l.List,{"data-slot":`command-list`,className:e(`max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto scrollbar`,t),...n}),Empty:({className:t,...n})=>o(l.Empty,{"data-slot":`command-empty`,className:e(`py-6 text-center text-sm`,t),...n}),Group:({className:t,...n})=>o(l.Group,{"data-slot":`command-group`,className:e(`[&>[cmdk-group-heading]]:text-muted overflow-hidden p-1 [&>[cmdk-group-heading]]:px-2 [&>[cmdk-group-heading]]:py-1.5 [&>[cmdk-group-heading]]:text-xs [&>[cmdk-group-heading]]:font-medium`,t),...n}),Item:({className:t,...n})=>o(l.Item,{"data-slot":`command-item`,className:e(`data-[selected=true]:bg-active-menu-item [:where(&_svg)]:text-muted relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [:where(&_svg)]:size-5`,t),...n}),Shortcut:({className:t,...n})=>o(`span`,{"data-slot":`command-shortcut`,className:e(`text-muted ml-auto text-xs tracking-widest`,t),...n}),Separator:({className:n,...r})=>o(l.Separator,{"data-slot":`command-separator`,asChild:!0,...r,children:o(t,{className:e(`-mx-1 my-1 w-auto`,n)})})};function p({className:t,...n}){let[c,l]=a(`⌃`);i(()=>{l(h())},[]);let u=c===`⌘`?`Command`:`Control`;return s(r,{...n,suppressHydrationWarning:!0,"data-slot":`meta-key`,className:e(c===`⌃`&&`font-medium`,t),children:[o(`span`,{className:`sr-only`,children:u}),c]})}function m(e){return`userAgentData`in e}function h(){if(typeof navigator>`u`)return`⌃`;let e=``;return m(navigator)&&(e=navigator.userAgentData.platform??``),e||=navigator.platform||navigator.userAgent||``,/mac|iphone|ipad|ipod/i.test(e)?`⌘`:`⌃`}export{f as Command,p as MetaKey,u as useCommandState};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{n as t}from"./separator-bpE_kooz.js";import{t as n}from"./dialog-DWZWd5Jt.js";import{t as r}from"./kbd-K8iaZ-Ti.js";import{useEffect as i,useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{MagnifyingGlassIcon as c}from"@phosphor-icons/react/MagnifyingGlass";import{Command as l,useCommandState as u}from"cmdk";const d=({className:t,...n})=>o(l,{"data-slot":`command`,className:e(`bg-popover flex h-full w-full flex-col overflow-hidden rounded-md`,t),...n}),f={Root:d,DialogRoot:n.Root,DialogTrigger:n.Trigger,DialogContent:({children:t,className:r,description:i=`Search for a command to run...`,filter:a,shouldFilter:c,showCloseButton:l=!0,title:u=`Command Palette`})=>s(n.Content,{className:e(`overflow-hidden p-0 relative`,r),children:[s(n.Header,{className:`sr-only absolute`,children:[o(n.Title,{children:u}),o(n.Description,{children:i})]}),o(d,{className:`**:data-[slot=command-input-wrapper]:h-12 **:[[cmdk-input]]:h-12 **:data-[slot=command-group]:px-2 **:data-[slot=command-list]:pb-1`,filter:a,shouldFilter:c,children:t}),l&&o(`div`,{className:`absolute top-1.5 right-1.5`,children:o(n.CloseIconButton,{})})]}),Input:({className:t,ref:n,...r})=>s(`div`,{ref:n,"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b border-popover px-3`,children:[o(c,{className:`size-5 shrink-0 opacity-50`}),o(l.Input,{"data-slot":`command-input`,className:e(`placeholder:text-muted flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,t),...r})]}),List:({className:t,...n})=>o(l.List,{"data-slot":`command-list`,className:e(`max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto scrollbar`,t),...n}),Empty:({className:t,...n})=>o(l.Empty,{"data-slot":`command-empty`,className:e(`py-6 text-center text-sm`,t),...n}),Group:({className:t,...n})=>o(l.Group,{"data-slot":`command-group`,className:e(`[&>[cmdk-group-heading]]:text-muted overflow-hidden p-1 [&>[cmdk-group-heading]]:px-2 [&>[cmdk-group-heading]]:py-1.5 [&>[cmdk-group-heading]]:text-xs [&>[cmdk-group-heading]]:font-medium`,t),...n}),Item:({className:t,...n})=>o(l.Item,{"data-slot":`command-item`,className:e(`data-[selected=true]:bg-active-menu-item [:where(&_svg)]:text-muted relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [:where(&_svg)]:size-5`,t),...n}),Shortcut:({className:t,...n})=>o(`span`,{"data-slot":`command-shortcut`,className:e(`text-muted ml-auto text-xs tracking-widest`,t),...n}),Separator:({className:n,...r})=>o(l.Separator,{"data-slot":`command-separator`,asChild:!0,...r,children:o(t,{className:e(`-mx-1 my-1 w-auto`,n)})})};function p({className:t,...n}){let[c,l]=a(`⌃`);i(()=>{l(h())},[]);let u=c===`⌘`?`Command`:`Control`;return s(r,{...n,suppressHydrationWarning:!0,"data-slot":`meta-key`,className:e(c===`⌃`&&`font-medium`,t),children:[o(`span`,{className:`sr-only`,children:u}),c]})}function m(e){return`userAgentData`in e}function h(){if(typeof navigator>`u`)return`⌃`;let e=``;return m(navigator)&&(e=navigator.userAgentData.platform??``),e||=navigator.platform||navigator.userAgent||``,/mac|iphone|ipad|ipod/i.test(e)?`⌘`:`⌃`}export{f as Command,p as MetaKey,u as useCommandState};
@@ -1,8 +1,8 @@
1
- import { t as ButtonIntent } from "./intents-DdSKSj1c.js";
2
- import { n as ButtonAppearance, t as Button } from "./button-BPMwa2jN.js";
3
- import { n as IconButtonAppearance, t as IconButton } from "./icon-button-C1AfGnQx.js";
1
+ import { t as ButtonIntent } from "./button-DdSKSj1c.js";
2
+ import { n as ButtonAppearance, t as Button } from "./button-DARFK2KJ.js";
3
+ import { r as IconButtonAppearance, t as IconButton } from "./button-C7vAl6lS.js";
4
4
  import { s as SortingMode } from "./direction-BjU0bPST.js";
5
- import { t as Table$1 } from "./table-DUSvU_Jw.js";
5
+ import { t as Table$1 } from "./table-CZBYEmyK.js";
6
6
  import { ComponentProps, ReactNode } from "react";
7
7
  import { HeaderContext, Row, Table } from "@tanstack/react-table";
8
8
  export * from "@tanstack/react-table";
@@ -179,10 +179,7 @@ declare function Header({ children, className, ...props }: DataTableHeaderProps)
179
179
  * </DataTable.Root>
180
180
  * ```
181
181
  */
182
- declare const Body: {
183
- (props: ComponentProps<typeof Table$1.Body>): import("react").JSX.Element;
184
- displayName: string;
185
- };
182
+ declare const Body: (props: ComponentProps<typeof Table$1.Body>) => import("react").JSX.Element;
186
183
  type DataTableHeadProps = Omit<ComponentProps<typeof Table$1.Head>, "children">;
187
184
  /**
188
185
  * The `<thead>` container that renders column headers automatically from
@@ -951,10 +948,7 @@ declare const DataTable: {
951
948
  * });
952
949
  * ```
953
950
  */
954
- readonly Cell: {
955
- ({ children, className, ref, ...props }: ComponentProps<"td">): import("react").JSX.Element;
956
- displayName: string;
957
- };
951
+ readonly Cell: ({ children, className, ref, ...props }: ComponentProps<"td">) => import("react").JSX.Element;
958
952
  /**
959
953
  * The `<tbody>` container for rows of data. Typically wraps a map of
960
954
  * `DataTable.Row`, with a `DataTable.EmptyRow` fallback when there is
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-button-DiOhreJD.js";import{t as n}from"./button-5WsvzIQ6.js";import{i as r}from"./direction-Wa9W2F61.js";import{t as i}from"./sort-B_DDQcVD.js";import{t as a}from"./table-GDkapNFi.js";import{Fragment as o,createContext as s,useContext as c,useMemo as l}from"react";import u from"tiny-invariant";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import{flexRender as m}from"@tanstack/react-table";import{MinusIcon as h}from"@phosphor-icons/react/Minus";import{PlusIcon as g}from"@phosphor-icons/react/Plus";export*from"@tanstack/react-table";const _=[`unsorted`,`asc`,`desc`],v=[`unsorted`,`desc`,`asc`];function y(e,t){return b(t===`alphanumeric`?_:v,e)??`unsorted`}function b(e,t,n){if(e.length===0)return n;let r=e.findIndex(e=>e===t);if(r===-1)return n;let i=(r+1)%e.length;return e.at(i)??n}const x=s(null);function S(){let e=c(x);return u(e,`useDataTableContext should only be used within a DataTable child component`),e}function C({children:e,table:t,...n}){let r=l(()=>({table:t}),[t]);return f(x.Provider,{value:r,children:f(a.Root,{"data-slot":`data-table`,...n,children:f(a.Element,{children:e})})})}function w({appearance:t=`ghost`,children:i,className:a,column:o,disableSorting:s=!1,iconPlacement:c=`end`,intent:l=`neutral`,sortingMode:u,sortIcon:d,onClick:m,...h}){let g=o.getIsSorted(),_=!s&&o.getCanSort(),v=_&&typeof g==`string`?g:`unsorted`,y=d?.(v)??f(B,{mode:u,direction:v});return p(n,{appearance:t,"data-slot":`data-table-header-sort-button`,className:e(`flex justify-start w-full h-full rounded-none not-disabled:active:scale-none`,t===`ghost`&&l===`neutral`&&`text-muted`,a),"data-sort-direction":v,"data-table-header-action":!0,icon:y,iconPlacement:c,onClick:e=>{m?.(e),!e.defaultPrevented&&(!_||s||u===void 0||V(o,u))},intent:l,type:`button`,...h,children:[_&&v!==`unsorted`&&p(`span`,{className:`sr-only`,children:[`Column sorted in`,` `,u===`alphanumeric`?v===`asc`?`ascending`:`descending`:r(v),` `,`order`]}),i]})}function T({children:t,className:n,...r}){return f(a.Header,{"data-slot":`data-table-header`,className:e(`has-data-table-header-action:px-0`,n),...r,children:t})}const E=e=>f(a.Body,{"data-slot":`data-table-body`,...e});function D(e){let{table:t}=S();return f(a.Head,{"data-slot":`data-table-head`,...e,children:t.getHeaderGroups().map(e=>f(a.Row,{children:e.headers.map(e=>f(o,{children:e.isPlaceholder?f(a.Header,{},e.id):m(e.column.columnDef.header,e.getContext())},e.id))},e.id))})}function O({className:t,renderExpanded:n,row:r,...i}){let s=f(a.Row,{"data-slot":`data-table-row`,"data-expanded":r.getIsExpanded()||void 0,className:e(i.onClick&&`cursor-pointer`,t),...i,children:r.getVisibleCells().map(e=>f(o,{children:m(e.column.columnDef.cell,e.getContext())},e.id))});return n==null?s:p(d,{children:[s,r.getIsExpanded()&&f(R,{row:r,children:n(r)})]})}function k({children:e,...t}){let{table:n}=S(),r=n.getAllColumns().length;return f(a.Row,{"data-slot":`data-table-empty-row`,...t,children:f(a.Cell,{colSpan:r,children:e})})}function A(){return f(`span`,{"aria-hidden":!0,className:e(`pointer-events-none absolute -inset-y-px -left-1.5 w-1.5`,`opacity-0 transition-opacity group-data-sticky-active/table:opacity-100`,`shadow-[1px_0_0_0_var(--border-color-card-muted)]`,`bg-linear-to-l to-transparent`,`from-[color-mix(in_oklab,var(--shadow-color)_var(--shadow-second-opacity),transparent)]`)})}function j({children:t,className:n,...r}){return p(a.Cell,{"data-mantle-table-sticky-right":!0,"data-slot":`data-table-action-cell`,className:e(`sticky z-10 right-0 text-end align-middle bg-inherit p-2`,n),...r,children:[f(A,{}),t]})}function M({children:t,className:n,...r}){let{table:i}=S(),o=i.getRowModel().rows.length>0;return p(a.Header,{...o?{"data-mantle-table-sticky-right":!0}:{},"data-slot":`data-table-action-header`,className:e(o&&`sticky z-10 right-0 bg-inherit`,n),...r,children:[o&&f(A,{}),t]})}function N(e){return`data-table-expanded-row-${encodeURIComponent(e.id)}`}function P({children:t,className:n,...r}){return f(a.Header,{"data-slot":`data-table-expand-header`,className:e(`w-9 px-0 text-center`,n),...r,children:t??f(`span`,{className:`sr-only`,children:`Row details`})})}const F=f(g,{weight:`bold`,className:`size-3.5`}),I=f(h,{weight:`bold`,className:`size-3.5`});function L({appearance:n=`ghost`,className:r,collapseIcon:i=I,expandIcon:a=F,intent:o=`neutral`,label:s,onClick:c,row:l,size:u=`sm`,...d}){if(!l.getCanExpand())return null;let p=l.getIsExpanded(),m=l.getToggleExpandedHandler();return f(t,{type:`button`,"data-slot":`data-table-row-expand-button`,appearance:n,intent:o,size:u,className:e(`rounded`,r),"aria-expanded":p,"aria-controls":p?N(l):void 0,icon:p?i:a,label:`${p?`Hide`:`Show`} details for ${s}`,onClick:e=>{e.stopPropagation(),c?.(e),!e.defaultPrevented&&m()},...d})}function R({children:t,className:n,colSpan:r,row:i,...o}){return f(a.Row,{"data-slot":`data-table-expanded-row`,"data-expanded-content":!0,className:e(`[&>td]:border-t-0`,n),...o,children:f(a.Cell,{id:N(i),colSpan:r??i.getVisibleCells().length,className:`bg-card font-sans text-body`,children:t})})}C.displayName=`DataTable`,j.displayName=`DataTableActionCell`,M.displayName=`DataTableActionHeader`,E.displayName=`DataTableBody`,k.displayName=`DataTableEmptyRow`,P.displayName=`DataTableExpandHeader`,R.displayName=`DataTableExpandedRow`,D.displayName=`DataTableHead`,T.displayName=`DataTableHeader`,w.displayName=`DataTableHeaderSortButton`,O.displayName=`DataTableRow`,L.displayName=`DataTableRowExpandButton`;const z={Root:C,ActionCell:j,ActionHeader:M,Cell:a.Cell,Body:E,EmptyRow:k,Head:D,Header:T,HeaderSortButton:w,Row:O,ExpandHeader:P,RowExpandButton:L,ExpandedRow:R};function B({direction:e,mode:t,...n}){return e===`unsorted`||!t||!e?f(`svg`,{"aria-hidden":!0,...n}):f(i,{mode:t,direction:e,...n})}function V(e,t){if(!e.getCanSort())return;let n=e.getIsSorted();switch(y(typeof n==`string`?n:`unsorted`,t)){case`unsorted`:e.clearSorting();return;case`asc`:e.toggleSorting(!1);return;case`desc`:e.toggleSorting(!0);return;default:return}}export{z as DataTable,N as expandedRowId};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./button-DjpEKt2X.js";import{t as n}from"./button-BAno7KIU.js";import{i as r}from"./direction-Wa9W2F61.js";import{t as i}from"./icons-B_DDQcVD.js";import{t as a}from"./table-CGxJwtbL.js";import{Fragment as o,createContext as s,useContext as c,useMemo as l}from"react";import u from"tiny-invariant";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import{flexRender as m}from"@tanstack/react-table";import{MinusIcon as h}from"@phosphor-icons/react/Minus";import{PlusIcon as g}from"@phosphor-icons/react/Plus";export*from"@tanstack/react-table";const _=[`unsorted`,`asc`,`desc`],v=[`unsorted`,`desc`,`asc`];function y(e,t){return b(t===`alphanumeric`?_:v,e)??`unsorted`}function b(e,t,n){if(e.length===0)return n;let r=e.findIndex(e=>e===t);if(r===-1)return n;let i=(r+1)%e.length;return e.at(i)??n}const x=s(null);function S(){let e=c(x);return u(e,`useDataTableContext should only be used within a DataTable child component`),e}function C({children:e,table:t,...n}){let r=l(()=>({table:t}),[t]);return f(x.Provider,{value:r,children:f(a.Root,{"data-slot":`data-table`,...n,children:f(a.Element,{children:e})})})}function w({appearance:n=`ghost`,children:i,className:a,column:o,disableSorting:s=!1,iconPlacement:c=`end`,intent:l=`neutral`,sortingMode:u,sortIcon:d,onClick:m,...h}){let g=o.getIsSorted(),_=!s&&o.getCanSort(),v=_&&typeof g==`string`?g:`unsorted`,y=d?.(v)??f(B,{mode:u,direction:v});return p(t,{appearance:n,"data-slot":`data-table-header-sort-button`,className:e(`flex justify-start w-full h-full rounded-none not-disabled:active:scale-none`,n===`ghost`&&l===`neutral`&&`text-muted`,a),"data-sort-direction":v,"data-table-header-action":!0,icon:y,iconPlacement:c,onClick:e=>{m?.(e),!e.defaultPrevented&&(!_||s||u===void 0||V(o,u))},intent:l,type:`button`,...h,children:[_&&v!==`unsorted`&&p(`span`,{className:`sr-only`,children:[`Column sorted in`,` `,u===`alphanumeric`?v===`asc`?`ascending`:`descending`:r(v),` `,`order`]}),i]})}function T({children:t,className:n,...r}){return f(a.Header,{"data-slot":`data-table-header`,className:e(`has-data-table-header-action:px-0`,n),...r,children:t})}const E=e=>f(a.Body,{"data-slot":`data-table-body`,...e});function D(e){let{table:t}=S();return f(a.Head,{"data-slot":`data-table-head`,...e,children:t.getHeaderGroups().map(e=>f(a.Row,{children:e.headers.map(e=>f(o,{children:e.isPlaceholder?f(a.Header,{},e.id):m(e.column.columnDef.header,e.getContext())},e.id))},e.id))})}function O({className:t,renderExpanded:n,row:r,...i}){let s=f(a.Row,{"data-slot":`data-table-row`,"data-expanded":r.getIsExpanded()||void 0,className:e(i.onClick&&`cursor-pointer`,t),...i,children:r.getVisibleCells().map(e=>f(o,{children:m(e.column.columnDef.cell,e.getContext())},e.id))});return n==null?s:p(d,{children:[s,r.getIsExpanded()&&f(R,{row:r,children:n(r)})]})}function k({children:e,...t}){let{table:n}=S(),r=n.getAllColumns().length;return f(a.Row,{"data-slot":`data-table-empty-row`,...t,children:f(a.Cell,{colSpan:r,children:e})})}function A(){return f(`span`,{"aria-hidden":!0,className:e(`pointer-events-none absolute -inset-y-px -left-1.5 w-1.5`,`opacity-0 transition-opacity group-data-sticky-active/table:opacity-100`,`shadow-[1px_0_0_0_var(--border-color-card-muted)]`,`bg-linear-to-l to-transparent`,`from-[color-mix(in_oklab,var(--shadow-color)_var(--shadow-second-opacity),transparent)]`)})}function j({children:t,className:n,...r}){return p(a.Cell,{"data-mantle-table-sticky-right":!0,"data-slot":`data-table-action-cell`,className:e(`sticky z-10 right-0 text-end align-middle bg-inherit p-2`,n),...r,children:[f(A,{}),t]})}function M({children:t,className:n,...r}){let{table:i}=S(),o=i.getRowModel().rows.length>0;return p(a.Header,{...o?{"data-mantle-table-sticky-right":!0}:{},"data-slot":`data-table-action-header`,className:e(o&&`sticky z-10 right-0 bg-inherit`,n),...r,children:[o&&f(A,{}),t]})}function N(e){return`data-table-expanded-row-${encodeURIComponent(e.id)}`}function P({children:t,className:n,...r}){return f(a.Header,{"data-slot":`data-table-expand-header`,className:e(`w-9 px-0 text-center`,n),...r,children:t??f(`span`,{className:`sr-only`,children:`Row details`})})}const F=f(g,{weight:`bold`,className:`size-3.5`}),I=f(h,{weight:`bold`,className:`size-3.5`});function L({appearance:t=`ghost`,className:r,collapseIcon:i=I,expandIcon:a=F,intent:o=`neutral`,label:s,onClick:c,row:l,size:u=`sm`,...d}){if(!l.getCanExpand())return null;let p=l.getIsExpanded(),m=l.getToggleExpandedHandler();return f(n,{type:`button`,"data-slot":`data-table-row-expand-button`,appearance:t,intent:o,size:u,className:e(`rounded`,r),"aria-expanded":p,"aria-controls":p?N(l):void 0,icon:p?i:a,label:`${p?`Hide`:`Show`} details for ${s}`,onClick:e=>{e.stopPropagation(),c?.(e),!e.defaultPrevented&&m()},...d})}function R({children:t,className:n,colSpan:r,row:i,...o}){return f(a.Row,{"data-slot":`data-table-expanded-row`,"data-expanded-content":!0,className:e(`[&>td]:border-t-0`,n),...o,children:f(a.Cell,{id:N(i),colSpan:r??i.getVisibleCells().length,className:`bg-card font-sans text-body`,children:t})})}const z={Root:C,ActionCell:j,ActionHeader:M,Cell:a.Cell,Body:E,EmptyRow:k,Head:D,Header:T,HeaderSortButton:w,Row:O,ExpandHeader:P,RowExpandButton:L,ExpandedRow:R};function B({direction:e,mode:t,...n}){return e===`unsorted`||!t||!e?f(`svg`,{"aria-hidden":!0,...n}):f(i,{mode:t,direction:e,...n})}function V(e,t){if(!e.getCanSort())return;let n=e.getIsSorted();switch(y(typeof n==`string`?n:`unsorted`,t)){case`unsorted`:e.clearSorting();return;case`asc`:e.toggleSorting(!1);return;case`desc`:e.toggleSorting(!0);return;default:return}}export{z as DataTable,N as expandedRowId};
@@ -21,10 +21,7 @@ type DescriptionListProps = ComponentProps<"dl"> & WithAsChild;
21
21
  * </DescriptionList.Root>
22
22
  * ```
23
23
  */
24
- declare const Root: {
25
- ({ asChild, className, children, ref, ...rest }: DescriptionListProps): import("react").JSX.Element;
26
- displayName: string;
27
- };
24
+ declare const Root: ({ asChild, className, children, ref, ...rest }: DescriptionListProps) => import("react").JSX.Element;
28
25
  type DescriptionListItemProps = ComponentProps<"div"> & WithAsChild;
29
26
  /**
30
27
  * A wrapper that groups a `DescriptionList.Label` and `DescriptionList.Value`
@@ -35,16 +32,15 @@ type DescriptionListItemProps = ComponentProps<"div"> & WithAsChild;
35
32
  *
36
33
  * @example
37
34
  * ```tsx
38
- * <DescriptionList.Item>
39
- * <DescriptionList.Label>ID</DescriptionList.Label>
40
- * <DescriptionList.Value>aigk_2fKm9x8Hn3...</DescriptionList.Value>
41
- * </DescriptionList.Item>
35
+ * <DescriptionList.Root>
36
+ * <DescriptionList.Item>
37
+ * <DescriptionList.Label>Name</DescriptionList.Label>
38
+ * <DescriptionList.Value>my-api-key</DescriptionList.Value>
39
+ * </DescriptionList.Item>
40
+ * </DescriptionList.Root>
42
41
  * ```
43
42
  */
44
- declare const Item: {
45
- ({ asChild, className, children, ref, ...rest }: DescriptionListItemProps): import("react").JSX.Element;
46
- displayName: string;
47
- };
43
+ declare const Item: ({ asChild, className, children, ref, ...rest }: DescriptionListItemProps) => import("react").JSX.Element;
48
44
  type DescriptionListLabelProps = ComponentProps<"dt"> & WithAsChild;
49
45
  /**
50
46
  * The label for a description list item. Renders as a `<dt>` element.
@@ -53,13 +49,15 @@ type DescriptionListLabelProps = ComponentProps<"dt"> & WithAsChild;
53
49
  *
54
50
  * @example
55
51
  * ```tsx
56
- * <DescriptionList.Label>Name</DescriptionList.Label>
52
+ * <DescriptionList.Root>
53
+ * <DescriptionList.Item>
54
+ * <DescriptionList.Label>Name</DescriptionList.Label>
55
+ * <DescriptionList.Value>my-api-key</DescriptionList.Value>
56
+ * </DescriptionList.Item>
57
+ * </DescriptionList.Root>
57
58
  * ```
58
59
  */
59
- declare const Label: {
60
- ({ asChild, className, children, ref, ...rest }: DescriptionListLabelProps): import("react").JSX.Element;
61
- displayName: string;
62
- };
60
+ declare const Label: ({ asChild, className, children, ref, ...rest }: DescriptionListLabelProps) => import("react").JSX.Element;
63
61
  type DescriptionListValueProps = ComponentProps<"dd"> & WithAsChild;
64
62
  /**
65
63
  * The value for a description list item. Renders as a `<dd>` element.
@@ -70,15 +68,15 @@ type DescriptionListValueProps = ComponentProps<"dd"> & WithAsChild;
70
68
  *
71
69
  * @example
72
70
  * ```tsx
73
- * <DescriptionList.Value>
74
- * aigk_2fKm9x8Hn3QpYT7zKlR0vW5
75
- * </DescriptionList.Value>
71
+ * <DescriptionList.Root>
72
+ * <DescriptionList.Item>
73
+ * <DescriptionList.Label>Name</DescriptionList.Label>
74
+ * <DescriptionList.Value>my-api-key</DescriptionList.Value>
75
+ * </DescriptionList.Item>
76
+ * </DescriptionList.Root>
76
77
  * ```
77
78
  */
78
- declare const Value: {
79
- ({ asChild, className, children, ref, ...rest }: DescriptionListValueProps): import("react").JSX.Element;
80
- displayName: string;
81
- };
79
+ declare const Value: ({ asChild, className, children, ref, ...rest }: DescriptionListValueProps) => import("react").JSX.Element;
82
80
  /**
83
81
  * A semantically correct description list built on the HTML `<dl>` element.
84
82
  * Renders a list of label/value pairs with alternating row backgrounds,
@@ -141,10 +139,12 @@ declare const DescriptionList: {
141
139
  *
142
140
  * @example
143
141
  * ```tsx
144
- * <DescriptionList.Item>
145
- * <DescriptionList.Label>ID</DescriptionList.Label>
146
- * <DescriptionList.Value>aigk_2fKm9x8Hn3...</DescriptionList.Value>
147
- * </DescriptionList.Item>
142
+ * <DescriptionList.Root>
143
+ * <DescriptionList.Item>
144
+ * <DescriptionList.Label>Name</DescriptionList.Label>
145
+ * <DescriptionList.Value>my-api-key</DescriptionList.Value>
146
+ * </DescriptionList.Item>
147
+ * </DescriptionList.Root>
148
148
  * ```
149
149
  */
150
150
  readonly Item: typeof Item;
@@ -155,7 +155,12 @@ declare const DescriptionList: {
155
155
  *
156
156
  * @example
157
157
  * ```tsx
158
- * <DescriptionList.Label>Name</DescriptionList.Label>
158
+ * <DescriptionList.Root>
159
+ * <DescriptionList.Item>
160
+ * <DescriptionList.Label>Name</DescriptionList.Label>
161
+ * <DescriptionList.Value>my-api-key</DescriptionList.Value>
162
+ * </DescriptionList.Item>
163
+ * </DescriptionList.Root>
159
164
  * ```
160
165
  */
161
166
  readonly Label: typeof Label;
@@ -166,9 +171,12 @@ declare const DescriptionList: {
166
171
  *
167
172
  * @example
168
173
  * ```tsx
169
- * <DescriptionList.Value>
170
- * aigk_2fKm9x8Hn3QpYT7zKlR0vW5
171
- * </DescriptionList.Value>
174
+ * <DescriptionList.Root>
175
+ * <DescriptionList.Item>
176
+ * <DescriptionList.Label>Name</DescriptionList.Label>
177
+ * <DescriptionList.Value>my-api-key</DescriptionList.Value>
178
+ * </DescriptionList.Item>
179
+ * </DescriptionList.Root>
172
180
  * ```
173
181
  */
174
182
  readonly Value: typeof Value;
@@ -1 +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,children:a,ref:o,...s})=>n(r?t:`dl`,{ref:o,"data-slot":`description-list`,className:e(`relative scrollbar overflow-x-auto overscroll-x-none rounded-lg border border-card grid grid-cols-[auto_1fr] gap-x-4 [&>*:nth-child(odd)]:bg-neutral-500/5 p-1`,i),...s,children:a});r.displayName=`DescriptionList`;const i=({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`description-list-item`,className:e(`rounded-sm col-span-full grid grid-cols-subgrid items-center`,i),...s,children:a});i.displayName=`DescriptionListItem`;const a=({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`dt`,{ref:o,"data-slot":`description-list-label`,className:e(`text-muted text-sm font-sans font-medium min-w-36 p-2`,i),...s,children:a});a.displayName=`DescriptionListLabel`;const o=({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`dd`,{ref:o,"data-slot":`description-list-value`,className:e(`text-body font-mono text-mono py-2 px-3`,i),...s,children:a});o.displayName=`DescriptionListValue`;const s={Root:r,Item:i,Label:a,Value:o};export{s as DescriptionList};
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={Root:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`dl`,{ref:o,"data-slot":`description-list`,className:e(`relative scrollbar overflow-x-auto overscroll-x-none rounded-lg border border-card grid grid-cols-[auto_1fr] gap-x-4 [&>*:nth-child(odd)]:bg-neutral-500/5 p-1`,i),...s,children:a}),Item:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`description-list-item`,className:e(`rounded-sm col-span-full grid grid-cols-subgrid items-center`,i),...s,children:a}),Label:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`dt`,{ref:o,"data-slot":`description-list-label`,className:e(`text-muted text-sm font-sans font-medium min-w-36 p-2`,i),...s,children:a}),Value:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`dd`,{ref:o,"data-slot":`description-list-value`,className:e(`text-body font-mono text-mono py-2 px-3`,i),...s,children:a})};export{r as DescriptionList};
@@ -3,26 +3,19 @@ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
3
  //#region src/components/dialog/primitive.d.ts
4
4
  type DialogPrimitiveContentProps = ComponentProps<typeof DialogPrimitive.Content>;
5
5
  declare function Root(props: ComponentPropsWithoutRef<typeof DialogPrimitive.Root>): import("react").JSX.Element;
6
- declare namespace Root {
7
- var displayName: string;
8
- }
9
6
  declare const Trigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
10
7
  declare const Close: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
11
- declare function Overlay(props: ComponentProps<typeof DialogPrimitive.Overlay>): import("react").JSX.Element;
12
- declare namespace Overlay {
13
- var displayName: string;
14
- }
15
- declare function Content({ onEscapeKeyDown, onInteractOutside, onPointerDownOutside, ref, ...props }: DialogPrimitiveContentProps): import("react").JSX.Element;
16
- declare namespace Content {
17
- var displayName: string;
18
- }
8
+ declare const Overlay: (props: ComponentProps<typeof DialogPrimitive.Overlay>) => import("react").JSX.Element;
9
+ declare const Content: ({ onEscapeKeyDown, onInteractOutside, onPointerDownOutside, ref, ...props }: DialogPrimitiveContentProps) => import("react").JSX.Element;
19
10
  declare const Title: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
20
- declare function Description({ asChild, children, ref, ...props }: ComponentPropsWithoutRef<typeof DialogPrimitive.Description> & {
11
+ /**
12
+ * An accessible description for the dialog primitive.
13
+ * This is a low-level primitive used by higher-level dialog components.
14
+ * Renders as a `div` by default, but can be changed to any other element using the `asChild` prop.
15
+ */
16
+ declare const Description: ({ asChild, children, ref, ...props }: ComponentPropsWithoutRef<typeof DialogPrimitive.Description> & {
21
17
  ref?: Ref<HTMLDivElement>;
22
- }): import("react").JSX.Element;
23
- declare namespace Description {
24
- var displayName: string;
25
- }
18
+ }) => import("react").JSX.Element;
26
19
  /**
27
20
  * Type guard to check if the event target is the overlay component
28
21
  */
@@ -0,0 +1 @@
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";const p=o,m=e=>u(r,{"data-slot":`dialog-trigger`,...e}),h=n,g=e=>u(l,{"data-slot":`dialog-close`,...e}),_=({className:t,ref:n,...r})=>u(i,{ref:n,"data-slot":`dialog-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}),v={Root:p,Body:({className:t,...n})=>u(`div`,{"data-slot":`dialog-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 Dialog`,appearance:i=`ghost`,intent:a=`neutral`,...o})=>u(l,{asChild:!0,children:u(t,{appearance:i,"data-slot":`dialog-close-icon-button`,icon:u(f,{}),intent:a,label:r,size:e,type:n,...o})}),Content:({children:t,className:n,preferredWidth:r=`max-w-lg`,ref:i,...o})=>d(h,{children:[u(_,{}),u(`div`,{className:`fixed inset-4 z-50 flex items-center justify-center`,children:u(a,{"data-mantle-modal-content":!0,"data-slot":`dialog-content`,className:e(`flex max-h-full w-full flex-1 flex-col`,`outline-hidden focus-within:outline-hidden`,`border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200`,`data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,r,n),ref:i,...o,children:t})})]}),Description:({className:t,ref:n,...r})=>u(s,{ref:n,"data-slot":`dialog-description`,className:e(`text-muted`,t),...r}),Footer:({className:t,...n})=>u(`div`,{"data-slot":`dialog-footer`,className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-4`,t),...n}),Header:({className:t,children:n,...r})=>u(`div`,{"data-slot":`dialog-header`,className:e(`border-dialog-muted text-strong relative flex shrink-0 items-center justify-between gap-2 border-b px-6 py-4`,`has-[.icon-button]:pr-4`,t),...r,children:n}),Overlay:_,Portal:h,Title:({className:t,ref:n,...r})=>u(c,{ref:n,"data-slot":`dialog-title`,className:e(`text-strong truncate text-lg font-medium`,t),...r}),Trigger:m};export{v as t};