@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.
- package/dist/accordion.d.ts +158 -19
- package/dist/accordion.js +1 -1
- package/dist/agent.json +5 -1
- package/dist/alert-dialog.d.ts +465 -32
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +116 -14
- package/dist/alert.js +1 -1
- package/dist/anchor-DfeXTpKW.js +1 -0
- package/dist/anchor.d.ts +2 -2
- package/dist/anchor.js +1 -1
- package/dist/area-chart.d.ts +504 -0
- package/dist/area-chart.js +1 -0
- package/dist/as-child-D23mGo4f.d.ts +49 -0
- package/dist/badge.d.ts +44 -5
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +491 -0
- package/dist/bar-chart.js +1 -0
- package/dist/breadcrumb.d.ts +196 -14
- package/dist/breadcrumb.js +1 -1
- package/dist/button-BAno7KIU.js +1 -0
- package/dist/{index-BSAizFod.d.ts → button-C-gMbPso.d.ts} +5 -5
- package/dist/{icon-button-BvQvT790.d.ts → button-C7vAl6lS.d.ts} +22 -63
- package/dist/button-D9n09xUg.js +1 -0
- package/dist/{button-DcXOWUYo.d.ts → button-DARFK2KJ.d.ts} +4 -4
- package/dist/button-DjpEKt2X.js +1 -0
- package/dist/button-DvHMWAPl.js +1 -0
- package/dist/button.d.ts +5 -5
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +0 -3
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +131 -9
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +209 -8
- package/dist/centered-layout.js +1 -1
- package/dist/chart-BROa2gqt.js +2 -0
- package/dist/chart-BcOC6Qj0.d.ts +275 -0
- package/dist/checkbox-0EoxOyMA.js +1 -0
- package/dist/checkbox.d.ts +13 -11
- package/dist/checkbox.js +1 -1
- package/dist/choice-BHwFSSyv.js +1 -0
- package/dist/choice-BNRQXszu.d.ts +254 -0
- package/dist/choice.d.ts +1 -252
- package/dist/choice.js +1 -1
- package/dist/code-block.d.ts +242 -52
- package/dist/code-block.js +6 -6
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +3 -2
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +171 -16
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +279 -81
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdBMM9ga.js +1 -0
- package/dist/data-table.d.ts +28 -6
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +67 -6
- package/dist/description-list.js +1 -1
- package/dist/dialog-BM4wPCft.d.ts +24 -0
- package/dist/dialog-DWZWd5Jt.js +1 -0
- package/dist/dialog.d.ts +226 -35
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-DP_Ne9Mr.d.ts → dropdown-menu-DZg-Cd69.d.ts} +137 -32
- package/dist/dropdown-menu-Dw-OtXPm.d.ts +1 -0
- package/dist/dropdown-menu-RyDWoKHx.js +1 -0
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -22
- package/dist/empty.js +1 -1
- package/dist/field-B1wqeZr4.js +1 -0
- package/dist/field.d.ts +568 -47
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +0 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +3 -4
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +48 -7
- package/dist/hover-card.js +1 -1
- package/dist/{svg-only-BFeFS1aa.d.ts → icon-CX_gj6sW.d.ts} +2 -2
- package/dist/icon-d-nMCfAI.js +1 -0
- package/dist/{icon-Cevjo93X.d.ts → icon-k4E9yNWD.d.ts} +2 -2
- package/dist/icon-lZ48P8Nn.js +1 -0
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/{sort-BPX2Fk9t.js → icons-B_DDQcVD.js} +1 -1
- package/dist/{traffic-policy-file-0g5RXFqu.js → icons-CF1lbWtp.js} +1 -1
- package/dist/icons-DLCs1hLP.js +1 -0
- package/dist/icons.d.ts +7 -15
- package/dist/icons.js +1 -1
- package/dist/{in-view-nkSOdED2.d.ts → in-view-DDEGUKDR.d.ts} +17 -9
- package/dist/{index-D47aqlpz.d.ts → index-DA4ig3gj.d.ts} +1 -1
- package/dist/input-BnlpQF0c.js +1 -0
- package/dist/{types-C19IR7jf.d.ts → input-BuYDU6CF.d.ts} +42 -2
- package/dist/input.d.ts +5 -56
- package/dist/input.js +1 -1
- package/dist/{label-v2-bv98k.d.ts → label-C6YH9skg.d.ts} +8 -6
- package/dist/label-D-D11mlp.js +1 -0
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/line-chart.d.ts +490 -0
- package/dist/line-chart.js +1 -0
- package/dist/list-51KQvENW.js +1 -0
- package/dist/list.d.ts +135 -6
- package/dist/list.js +1 -1
- package/dist/llms.txt +5 -1
- package/dist/main.d.ts +20 -4
- package/dist/main.js +1 -1
- package/dist/mantle-dark-high-contrast.css +17 -0
- package/dist/mantle-dark.css +13 -0
- package/dist/mantle-light-high-contrast.css +15 -0
- package/dist/mantle.css +29 -0
- package/dist/media-object.d.ts +18 -4
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +282 -24
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +118 -6
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +61 -6
- package/dist/pagination.js +1 -1
- package/dist/popover-CE4OlWkd.d.ts +208 -0
- package/dist/popover-CQ9s7jG5.js +1 -0
- package/dist/popover.d.ts +1 -181
- package/dist/popover.js +1 -1
- package/dist/primitive-trJDqIXJ.js +1 -0
- package/dist/progress.d.ts +2 -8
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +101 -5
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +110 -35
- package/dist/radio-group.js +1 -1
- package/dist/sandboxed-on-click.d.ts +2 -2
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +495 -0
- package/dist/scatter-plot.js +1 -0
- package/dist/select-0z7HVS6r.d.ts +579 -0
- package/dist/select-BCHWvmyC.js +1 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +225 -298
- package/dist/selectable-list.js +1 -1
- package/dist/separator-B5UmkVRL.d.ts +75 -0
- package/dist/separator-bpE_kooz.js +1 -0
- package/dist/separator.d.ts +1 -52
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +285 -38
- package/dist/sheet.js +1 -1
- package/dist/skeleton-CsbUHbBA.js +1 -0
- package/dist/skeleton.d.ts +4 -7
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +24 -4
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.js +1 -1
- package/dist/{index-Rv8RL7xy.d.ts → slot-BtwKJTLq.d.ts} +1 -1
- package/dist/slot-CDk0Bb9z.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +14 -14
- package/dist/split-button.js +1 -1
- package/dist/switch.d.ts +10 -7
- package/dist/switch.js +1 -1
- package/dist/table-Bo0vNxIJ.d.ts +848 -0
- package/dist/table-CGxJwtbL.js +1 -0
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +124 -25
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +2 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-C26-Xolp.js +1 -0
- package/dist/theme-switcher.d.ts +105 -33
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +54 -15
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +86 -10
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +50 -5
- package/dist/tooltip.js +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/well.d.ts +3 -3
- package/dist/well.js +1 -1
- package/package.json +9 -3
- package/dist/anchor-C_tjSVy6.js +0 -1
- package/dist/as-child-CYEVu1WY.d.ts +0 -23
- package/dist/button-5t6-JS_I.js +0 -1
- package/dist/button-ClC60Nzg.js +0 -1
- package/dist/checkbox-DJ2xl7Rc.js +0 -1
- package/dist/choice-DOdyNzFC.js +0 -1
- package/dist/compose-refs-Cjf2gfB8.js +0 -1
- package/dist/dialog-vxLIvB8M.js +0 -1
- package/dist/dropdown-menu-Bt1aKF1g.js +0 -1
- package/dist/field-context-BR01g789.js +0 -1
- package/dist/icon-CDtYjF_H.js +0 -1
- package/dist/icon-button-DV2-GZHf.js +0 -1
- package/dist/index-g2rfwNCH.d.ts +0 -1
- package/dist/input-Ct1YOqSy.js +0 -1
- package/dist/label-BMlHW_2D.js +0 -1
- package/dist/popover-D5WxxnBY.js +0 -1
- package/dist/primitive-C64-m48O.d.ts +0 -13
- package/dist/primitive-IKruV2iB.js +0 -1
- package/dist/select-Bwt2YduR.d.ts +0 -345
- package/dist/select-D-5u0Blc.js +0 -1
- package/dist/separator-kBnnv3Cw.js +0 -1
- package/dist/skeleton-Bu3tgNcW.js +0 -1
- package/dist/slot-DmPrjM7N.js +0 -1
- package/dist/svg-only-DDx6FtJd.js +0 -1
- package/dist/table-CPH2md2-.js +0 -1
- package/dist/table-CwFHXC-G.d.ts +0 -414
- package/dist/theme-D3MDng6U.js +0 -1
- package/dist/theme-provider-C9zpDyJW.js +0 -1
- package/dist/toast-BsCjaMVS.js +0 -1
- package/dist/virtual-DZMBu7Ch.js +0 -1
- /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
- /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
- /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
- /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
- /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
- /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
- /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
- /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
- /package/dist/{themes-CYNpplwN.d.ts → theme-CYNpplwN.d.ts} +0 -0
package/dist/code-block.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{t as e}from"./compose-refs-
|
|
2
|
-
`||e===`\r`||e===`{`||e===`}`||e===`[`||e===`]`||e===`:`||e===`,`||e===`"`}function
|
|
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
|
|
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+=`&`;break;case`<`:n+=`<`;break;case`>`:n+=`>`;break;case`"`:n+=`"`;break;case`'`:n+=`'`;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===`&`?`&`:`<`)}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,
|
|
6
|
-
`)}function
|
|
7
|
-
`&&(n+=1,n>t))return!0;return!1}export{
|
|
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 "./
|
|
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"./
|
|
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};
|
package/dist/code.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
2
3
|
//#region src/components/code/code.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* Marks a short fragment of inline computer code — a function name, a
|
|
@@ -33,6 +34,6 @@ import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
|
|
|
33
34
|
* </Code>
|
|
34
35
|
* ```
|
|
35
36
|
*/
|
|
36
|
-
declare const Code:
|
|
37
|
+
declare const Code: ({ asChild, className, ref, ...props }: ComponentProps<"code"> & WithAsChild) => import("react").JSX.Element;
|
|
37
38
|
//#endregion
|
|
38
39
|
export { Code };
|
package/dist/code.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-
|
|
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,className:i,ref:a,...o})=>n(r?t:`code`,{ref:a,"data-slot":`code`,className:e(`border-gray-500/15 rounded-md border bg-gray-500/5 px-1 font-mono text-[0.8em]`,i),...o});export{r as Code};
|
package/dist/combobox.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as WithValidation } from "./
|
|
1
|
+
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { o as WithValidation } from "./field-7QeiTFwl.js";
|
|
3
|
+
import { n as Separator } from "./separator-B5UmkVRL.js";
|
|
4
|
+
import { ComponentProps } from "react";
|
|
3
5
|
import * as Primitive from "@ariakit/react";
|
|
4
6
|
//#region src/components/combobox/combobox.d.ts
|
|
5
7
|
type ComboboxProps = Primitive.ComboboxProviderProps;
|
|
@@ -27,16 +29,172 @@ type ComboboxProps = Primitive.ComboboxProviderProps;
|
|
|
27
29
|
* </Combobox.Root>
|
|
28
30
|
* ```
|
|
29
31
|
*/
|
|
30
|
-
declare const Root: {
|
|
31
|
-
({ children, ...props }: ComboboxProps): import("react").JSX.Element;
|
|
32
|
-
displayName: string;
|
|
33
|
-
};
|
|
32
|
+
declare const Root: ({ children, ...props }: ComboboxProps) => import("react").JSX.Element;
|
|
34
33
|
type ComboboxInputProps = Omit<Primitive.ComboboxProps, "render"> & WithValidation;
|
|
34
|
+
/**
|
|
35
|
+
* Renders a combobox input element that can be used to filter a list of items.
|
|
36
|
+
*
|
|
37
|
+
* @see https://mantle.ngrok.com/components/forms/combobox#comboboxinput
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <Combobox.Root>
|
|
42
|
+
* <Combobox.Input />
|
|
43
|
+
* <Combobox.Content>
|
|
44
|
+
* <Combobox.Item value="Apple" />
|
|
45
|
+
* <Combobox.Item value="Banana" />
|
|
46
|
+
* </Combobox.Content>
|
|
47
|
+
* </Combobox.Root>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare const Input: ({ "aria-invalid": _ariaInvalid, autoComplete, autoSelect, className, ref, validation: _validation, ...props }: ComboboxInputProps) => import("react").JSX.Element;
|
|
35
51
|
type ComboboxContentProps = Omit<Primitive.ComboboxPopoverProps, "render"> & WithAsChild;
|
|
52
|
+
/**
|
|
53
|
+
* Renders a popover that contains combobox content, e.g. Combobox.Items, Combobox.Groups, and Combobox.Separators.
|
|
54
|
+
*
|
|
55
|
+
* `Combobox.Content` renders at Tailwind `z-50`, Mantle's shared floating
|
|
56
|
+
* z-index. When multiple shared layers are open, the most recently mounted
|
|
57
|
+
* layer renders on top.
|
|
58
|
+
*
|
|
59
|
+
* @see https://mantle.ngrok.com/components/forms/combobox#comboboxcontent
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```tsx
|
|
63
|
+
* <Combobox.Root>
|
|
64
|
+
* <Combobox.Input />
|
|
65
|
+
* <Combobox.Content>
|
|
66
|
+
* <Combobox.Item value="Apple" />
|
|
67
|
+
* <Combobox.Item value="Banana" />
|
|
68
|
+
* </Combobox.Content>
|
|
69
|
+
* </Combobox.Root>
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
declare const Content: ({ asChild, children, className, ref, sameWidth, unmountOnHide, ...props }: ComboboxContentProps) => import("react").JSX.Element;
|
|
36
73
|
type ComboboxItemProps = Omit<Primitive.ComboboxItemProps, "render"> & WithAsChild;
|
|
74
|
+
/**
|
|
75
|
+
* Renders a combobox item inside a Combobox.Content component.
|
|
76
|
+
*
|
|
77
|
+
* @see https://mantle.ngrok.com/components/forms/combobox#comboboxitem
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```tsx
|
|
81
|
+
* <Combobox.Root>
|
|
82
|
+
* <Combobox.Input />
|
|
83
|
+
* <Combobox.Content>
|
|
84
|
+
* <Combobox.Item value="Apple" />
|
|
85
|
+
* <Combobox.Item value="Banana" />
|
|
86
|
+
* <Combobox.Item value="Orange" />
|
|
87
|
+
* </Combobox.Content>
|
|
88
|
+
* </Combobox.Root>
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
declare const Item: ({ asChild, children, className, focusOnHover, ref, value, ...props }: ComboboxItemProps) => import("react").JSX.Element;
|
|
37
92
|
type ComboboxGroupProps = Omit<Primitive.ComboboxGroupProps, "render"> & WithAsChild;
|
|
93
|
+
/**
|
|
94
|
+
* Renders a group for Combobox.Item elements.
|
|
95
|
+
*
|
|
96
|
+
* Optionally, a Combobox.GroupLabel can be rendered as a child to provide a label for the group.
|
|
97
|
+
*
|
|
98
|
+
* You should only reach for this component when it semantically makes sense to group items together, such as when a label is needed.
|
|
99
|
+
*
|
|
100
|
+
* @see https://mantle.ngrok.com/components/forms/combobox#comboboxgroup
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```tsx
|
|
104
|
+
* <Combobox.Root>
|
|
105
|
+
* <Combobox.Input />
|
|
106
|
+
* <Combobox.Content>
|
|
107
|
+
* <Combobox.Group>
|
|
108
|
+
* <Combobox.GroupLabel>Fruits</Combobox.GroupLabel>
|
|
109
|
+
* <Combobox.Item value="Apple" />
|
|
110
|
+
* <Combobox.Item value="Banana" />
|
|
111
|
+
* </Combobox.Group>
|
|
112
|
+
* </Combobox.Content>
|
|
113
|
+
* </Combobox.Root>
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
declare const Group: ({ asChild, children, className, ref, ...props }: ComboboxGroupProps) => import("react").JSX.Element;
|
|
38
117
|
type ComboboxGroupLabelProps = Omit<Primitive.ComboboxGroupLabelProps, "render"> & WithAsChild;
|
|
118
|
+
/**
|
|
119
|
+
* Renders a label in a combobox group.
|
|
120
|
+
*
|
|
121
|
+
* This component should be wrapped with Combobox.Group so the aria-labelledby is correctly set on the group element.
|
|
122
|
+
*
|
|
123
|
+
* You should only reach for this component when it semantically makes sense to group items together, such as when a label is needed.
|
|
124
|
+
*
|
|
125
|
+
* @see https://mantle.ngrok.com/components/forms/combobox#comboboxgrouplabel
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```tsx
|
|
129
|
+
* <Combobox.Root>
|
|
130
|
+
* <Combobox.Input />
|
|
131
|
+
* <Combobox.Content>
|
|
132
|
+
* <Combobox.Group>
|
|
133
|
+
* <Combobox.GroupLabel>Fruits</Combobox.GroupLabel>
|
|
134
|
+
* <Combobox.Item value="Apple" />
|
|
135
|
+
* <Combobox.Item value="Banana" />
|
|
136
|
+
* </Combobox.Group>
|
|
137
|
+
* </Combobox.Content>
|
|
138
|
+
* </Combobox.Root>
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
declare const GroupLabel: ({ asChild, children, className, ref, ...props }: ComboboxGroupLabelProps) => import("react").JSX.Element;
|
|
39
142
|
type ComboboxItemValueProps = Omit<Primitive.ComboboxItemValueProps<"span">, "render"> & WithAsChild;
|
|
143
|
+
/**
|
|
144
|
+
* Highlights the match between the current Combobox.Input value (userValue) and parent Combobox.Item value.
|
|
145
|
+
*
|
|
146
|
+
* Renders a span element with the combobox item value as children.
|
|
147
|
+
* The value is split into span elements.
|
|
148
|
+
* Portions of the value matching the user input will have a data-user-value attribute, while the rest will have a data-autocomplete-value attribute.
|
|
149
|
+
*
|
|
150
|
+
* Should only be used as a child of Combobox.Item.
|
|
151
|
+
* The item value is automatically set to the value of the closest Combobox.Item component's value prop.
|
|
152
|
+
* The user input value is automatically set to the combobox store's value state.
|
|
153
|
+
* Both values can be overridden by providing the value and userValue props, respectively.
|
|
154
|
+
*
|
|
155
|
+
* @see https://mantle.ngrok.com/components/forms/combobox#comboboxitemvalue
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* ```tsx
|
|
159
|
+
* <Combobox.Root>
|
|
160
|
+
* <Combobox.Input />
|
|
161
|
+
* <Combobox.Content>
|
|
162
|
+
* <Combobox.Item value="Apple">
|
|
163
|
+
* 🍎
|
|
164
|
+
* <Combobox.ItemValue />
|
|
165
|
+
* </Combobox.Item>
|
|
166
|
+
* <Combobox.Item value="Banana">
|
|
167
|
+
* 🍌
|
|
168
|
+
* <Combobox.ItemValue />
|
|
169
|
+
* </Combobox.Item>
|
|
170
|
+
* </Combobox.Content>
|
|
171
|
+
* </Combobox.Root>
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
declare const ItemValue: ({ asChild, className, ref, ...props }: ComboboxItemValueProps) => import("react").JSX.Element;
|
|
175
|
+
/**
|
|
176
|
+
* Renders a separator between Combobox.Items or Combobox.Groups.
|
|
177
|
+
*
|
|
178
|
+
* @see https://mantle.ngrok.com/components/forms/combobox#comboboxseparator
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```tsx
|
|
182
|
+
* <Combobox.Root>
|
|
183
|
+
* <Combobox.Input />
|
|
184
|
+
* <Combobox.Content>
|
|
185
|
+
* <Combobox.Group>
|
|
186
|
+
* <Combobox.Item value="Apple" />
|
|
187
|
+
* <Combobox.Item value="Banana" />
|
|
188
|
+
* </Combobox.Group>
|
|
189
|
+
* <Combobox.Separator />
|
|
190
|
+
* <Combobox.Item>
|
|
191
|
+
* Click me!
|
|
192
|
+
* </Combobox.Item>
|
|
193
|
+
* </Combobox.Content>
|
|
194
|
+
* </Combobox.Root>
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
declare const ComboboxSeparatorComponent: ({ className, ref, ...props }: ComponentProps<typeof Separator>) => import("react").JSX.Element;
|
|
40
198
|
/**
|
|
41
199
|
* Fill in a React input field with autocomplete & autosuggest functionalities.
|
|
42
200
|
* Choose from a list of suggested values with full keyboard support.
|
|
@@ -126,7 +284,7 @@ declare const Combobox: {
|
|
|
126
284
|
* </Combobox.Root>
|
|
127
285
|
* ```
|
|
128
286
|
*/
|
|
129
|
-
readonly Content:
|
|
287
|
+
readonly Content: typeof Content;
|
|
130
288
|
/**
|
|
131
289
|
* Renders a group for Combobox.Item elements.
|
|
132
290
|
*
|
|
@@ -146,7 +304,7 @@ declare const Combobox: {
|
|
|
146
304
|
* </Combobox.Root>
|
|
147
305
|
* ```
|
|
148
306
|
*/
|
|
149
|
-
readonly Group:
|
|
307
|
+
readonly Group: typeof Group;
|
|
150
308
|
/**
|
|
151
309
|
* Renders a label in a combobox group.
|
|
152
310
|
*
|
|
@@ -166,7 +324,7 @@ declare const Combobox: {
|
|
|
166
324
|
* </Combobox.Root>
|
|
167
325
|
* ```
|
|
168
326
|
*/
|
|
169
|
-
readonly GroupLabel:
|
|
327
|
+
readonly GroupLabel: typeof GroupLabel;
|
|
170
328
|
/**
|
|
171
329
|
* Renders a combobox input element that can be used to filter a list of items.
|
|
172
330
|
*
|
|
@@ -183,7 +341,7 @@ declare const Combobox: {
|
|
|
183
341
|
* </Combobox.Root>
|
|
184
342
|
* ```
|
|
185
343
|
*/
|
|
186
|
-
readonly Input:
|
|
344
|
+
readonly Input: typeof Input;
|
|
187
345
|
/**
|
|
188
346
|
* Renders a combobox item inside a Combobox.Content component.
|
|
189
347
|
*
|
|
@@ -201,7 +359,7 @@ declare const Combobox: {
|
|
|
201
359
|
* </Combobox.Root>
|
|
202
360
|
* ```
|
|
203
361
|
*/
|
|
204
|
-
readonly Item:
|
|
362
|
+
readonly Item: typeof Item;
|
|
205
363
|
/**
|
|
206
364
|
* Highlights the match between the current Combobox.Input value and parent Combobox.Item value.
|
|
207
365
|
*
|
|
@@ -224,7 +382,7 @@ declare const Combobox: {
|
|
|
224
382
|
* </Combobox.Root>
|
|
225
383
|
* ```
|
|
226
384
|
*/
|
|
227
|
-
readonly ItemValue:
|
|
385
|
+
readonly ItemValue: typeof ItemValue;
|
|
228
386
|
/**
|
|
229
387
|
* Renders a separator between Combobox.Items or Combobox.Groups.
|
|
230
388
|
*
|
|
@@ -247,10 +405,7 @@ declare const Combobox: {
|
|
|
247
405
|
* </Combobox.Root>
|
|
248
406
|
* ```
|
|
249
407
|
*/
|
|
250
|
-
readonly Separator:
|
|
251
|
-
orientation?: "horizontal" | "vertical";
|
|
252
|
-
semantic?: boolean;
|
|
253
|
-
}, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
408
|
+
readonly Separator: typeof ComboboxSeparatorComponent;
|
|
254
409
|
};
|
|
255
410
|
//#endregion
|
|
256
411
|
export { Combobox };
|
package/dist/combobox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-
|
|
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};
|