@ngrok/mantle 0.94.0 → 0.94.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/accordion.d.ts +61 -21
- package/dist/accordion.js +1 -1
- package/dist/agent.json +61 -56
- package/dist/alert-BkJHDx9X.js +1 -0
- package/dist/{alert-HffaioZM.d.ts → alert-D0zRRUHV.d.ts} +6 -6
- package/dist/alert-center.d.ts +53 -53
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.d.ts +22 -10
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-Dc6IgvXV.js +1 -0
- package/dist/anchor.d.ts +5 -5
- package/dist/anchor.js +1 -1
- package/dist/app-layout.d.ts +18 -18
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.d.ts +13 -13
- package/dist/area-chart.js +1 -1
- package/dist/avatar.d.ts +24 -24
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +7 -7
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +12 -12
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.d.ts +36 -36
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only-CZfkNw5A.js +1 -0
- package/dist/browser-only-ymFoM3Ya.js +1 -0
- package/dist/browser-only.js +1 -1
- package/dist/{button-K0pKc3GN.d.ts → button-5Pc7Mby_.d.ts} +3 -3
- package/dist/button-B9bChDgl.js +1 -0
- package/dist/button-D8jixIbH.js +1 -0
- package/dist/button-DNLTJ32M.js +1 -0
- package/dist/{button-Cgf2IcEC.d.ts → button-Ddj6yr10.d.ts} +26 -26
- package/dist/{button-BGwOPjGV.d.ts → button-DnYv7IOT.d.ts} +22 -21
- package/dist/button.d.ts +3 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +1 -1
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +23 -23
- package/dist/centered-layout.js +1 -1
- package/dist/{chart-CE5Uaqz9.js → chart-BLCqzt56.js} +1 -1
- package/dist/{chart-DCTGGlWL.js → chart-CChZiCrt.js} +1 -1
- package/dist/{chart-BO9EwQ60.js → chart-CUmSu9d7.js} +1 -1
- package/dist/{chart-jitNqimS.d.ts → chart-Dl8gFo_D.d.ts} +22 -22
- package/dist/chart-DtgZBAas.js +2 -0
- package/dist/checkbox-Cu5cgZmk.js +1 -0
- package/dist/checkbox.d.ts +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/choice-CCVG2hb9.js +1 -0
- package/dist/{choice-BwfmbepO.d.ts → choice-CNiOSzqV.d.ts} +20 -20
- package/dist/choice.d.ts +1 -1
- package/dist/choice.js +1 -1
- package/dist/code-BPKNY1_w.js +1 -0
- package/dist/{code-block-BGdV4Yty.d.ts → code-block-BDw6MEwH.d.ts} +9 -9
- package/dist/{code-block-W3kWPxCJ.js → code-block-CKzsAMzj.js} +3 -3
- package/dist/code-block.d.ts +15 -17
- package/dist/code-block.js +1 -1
- 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 -3
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +15 -15
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +47 -47
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdRUneoc.js +1 -0
- package/dist/{copy-to-clipboard-DInu78k_.js → copy-to-clipboard-Dd83caRw.js} +1 -1
- package/dist/cx.d.ts +4 -4
- package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
- package/dist/data-table.d.ts +36 -36
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +1 -1
- package/dist/description-list.js +1 -1
- package/dist/{dialog-DD5H3EH1.d.ts → dialog-CIEuwNys.d.ts} +24 -8
- package/dist/{dialog-B9JAGy_x.d.ts → dialog-CbEEA0fl.d.ts} +7 -3
- package/dist/dialog-DmzoDfY3.js +1 -0
- package/dist/dialog.d.ts +2 -2
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-DmDxYPde.d.ts → dropdown-menu-CeY498yk.d.ts} +10 -10
- package/dist/dropdown-menu-uheL0prz.js +1 -0
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +2 -2
- package/dist/empty.js +1 -1
- package/dist/field-Bpvn4tQp.js +1 -0
- package/dist/field-Cai_4c1l.js +1 -0
- package/dist/field.d.ts +41 -41
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +3 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +30 -10
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +3 -3
- package/dist/hover-card.js +1 -1
- package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
- package/dist/{icon-NYvyyRMG.d.ts → icon-DuIYoyft.d.ts} +2 -2
- package/dist/{icon-DXDyhy2N.d.ts → icon-QCm1ui29.d.ts} +2 -2
- package/dist/icon-xb7d9M7X.js +1 -0
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/icons-DEDCLZ8B.js +1 -0
- package/dist/icons-DXadFwpo.js +1 -0
- package/dist/icons-DcesO4Ng.js +1 -0
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +1 -1
- package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
- package/dist/{input-q8o5uMhW.d.ts → input-DC4nW0Sr.d.ts} +1 -1
- package/dist/input-fW8QSZEO.js +1 -0
- package/dist/input.d.ts +4 -4
- package/dist/input.js +1 -1
- package/dist/kbd-P1nQshWo.js +1 -0
- package/dist/kbd.d.ts +5 -5
- package/dist/kbd.js +1 -1
- package/dist/label-DO1RlMKl.js +1 -0
- package/dist/{label-r2sJcSQ4.d.ts → label-epgtywRz.d.ts} +8 -8
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/layer-container-DL4yclOu.js +1 -0
- package/dist/layer-container.d.ts +2 -2
- package/dist/layer-container.js +1 -1
- package/dist/line-chart.d.ts +12 -12
- package/dist/line-chart.js +1 -1
- package/dist/list-cQZPSjfz.js +1 -0
- package/dist/list.d.ts +17 -17
- package/dist/list.js +1 -1
- package/dist/live-region-Dhapu8a5.js +1 -0
- package/dist/live-region.d.ts +1 -1
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +23 -22
- package/dist/main-CHyWYDak.js +1 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +25 -25
- package/dist/media-object.d.ts +4 -4
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +28 -28
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +3 -3
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +4 -4
- package/dist/pagination.js +1 -1
- package/dist/{popover-lwkwWcRW.d.ts → popover-Bei0jyfH.d.ts} +73 -7
- package/dist/popover-DhgunktK.js +1 -0
- package/dist/popover-T2EyaqGK.d.ts +1 -0
- package/dist/popover.d.ts +2 -2
- package/dist/popover.js +1 -1
- package/dist/primitive-D8CzV_Ft.js +1 -0
- package/dist/progress.d.ts +1 -1
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +3 -3
- package/dist/qr-code.js +1 -1
- package/dist/query-filter.d.ts +6 -6
- package/dist/query.d.ts +8 -3
- package/dist/query.js +1 -1
- package/dist/{radio-group-sLz5AA9I.d.ts → radio-group-BJQ6EOqh.d.ts} +1 -1
- package/dist/radio-group-BliblUqe.js +1 -0
- package/dist/radio-group-ggEkCi0V.js +1 -0
- package/dist/radio-group.d.ts +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/sandbar.d.ts +30 -30
- package/dist/sandbar.js +1 -1
- package/dist/sandboxed-on-click-D4PL5_GR.js +1 -0
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +13 -14
- package/dist/scatter-plot.js +1 -1
- package/dist/segmented-control.d.ts +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/select-1xuUx_os.js +1 -0
- package/dist/{select-BqmpVJJT.d.ts → select-BpaXHxJm.d.ts} +6 -6
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +18 -18
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-QfH0ot5K.d.ts → separator-Ck4sPrdN.d.ts} +1 -1
- package/dist/separator-DnvhwY2J.js +1 -0
- package/dist/separator.d.ts +1 -1
- package/dist/separator.js +1 -1
- package/dist/{shake-DL6WhMXM.js → shake-CAUpKBHe.js} +1 -1
- package/dist/sheet-DHy_vlme.js +1 -0
- package/dist/sheet.d.ts +23 -7
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +37 -37
- package/dist/sidebar.js +1 -1
- package/dist/skeleton-DHfyjuQi.js +1 -0
- package/dist/skeleton.d.ts +4 -4
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +1 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +1 -1
- package/dist/slider.js +1 -1
- package/dist/slot-B7rwscwd.js +1 -0
- package/dist/{slot-D12N_fZJ.d.ts → slot-BEMQMbk3.d.ts} +4 -4
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/source-all.css +5 -1
- package/dist/split-button.d.ts +9 -9
- package/dist/split-button.js +1 -1
- package/dist/strata.d.ts +22 -22
- package/dist/strata.js +1 -1
- package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
- package/dist/switch.d.ts +1 -1
- package/dist/switch.js +1 -1
- package/dist/table-BnLdXUai.js +1 -0
- package/dist/{table-rWiVWEgB.d.ts → table-Ii9hHUWN.d.ts} +5 -5
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +2 -2
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +1 -1
- package/dist/text-area.js +1 -1
- package/dist/theme-BNdZl352.js +1 -0
- package/dist/theme-switcher.d.ts +4 -4
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +14 -12
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +2 -2
- package/dist/toast.js +1 -1
- package/dist/tokens.dark.json +3261 -0
- package/dist/tokens.json +4933 -0
- package/dist/tokens.resolver.json +37 -0
- package/dist/{tooltip-CpK3XTor.d.ts → tooltip-CstGDKwy.d.ts} +4 -4
- package/dist/tooltip-DQO40Mrq.js +1 -0
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/truncated-text.d.ts +1 -1
- package/dist/truncated-text.js +1 -1
- package/dist/use-breakpoint-B4Kh0xE6.js +1 -0
- package/dist/use-callback-ref-DiOXFQzM.js +1 -0
- package/dist/use-composed-refs-DPYmLDSe.js +1 -0
- package/dist/use-copy-to-clipboard-hBL6_65i.js +1 -0
- package/dist/use-inert-siblings-C4RHXrZc.js +1 -0
- package/dist/use-is-apple-platform-Bq6_KbVX.js +1 -0
- package/dist/use-is-hydrated-BeLOGKwE.js +1 -0
- package/dist/use-is-hydrated-after-paint-CrHt3OHw.js +1 -0
- package/dist/use-isomorphic-layout-effect-CL6iq0Bj.js +1 -0
- package/dist/use-matches-media-query-FfvtNKQe.js +1 -0
- package/dist/use-prefers-reduced-motion-Ck6dnOM9.js +1 -0
- package/dist/use-swipe-to-dismiss-BYdlca8r.js +1 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.d.ts +1 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/well.d.ts +1 -1
- package/dist/well.js +1 -1
- package/package.json +16 -2
- package/dist/alert-CH99Rw-R.js +0 -1
- package/dist/anchor-CgcbWEUs.js +0 -1
- package/dist/browser-only-BTSrYWLj.js +0 -1
- package/dist/button-69InNC_m.js +0 -1
- package/dist/button-BWGUuWnu.js +0 -1
- package/dist/button-Cu9e3SM7.js +0 -1
- package/dist/chart-DudCw24t.js +0 -2
- package/dist/checkbox-CS504fKk.js +0 -1
- package/dist/choice-uyYccm0A.js +0 -1
- package/dist/code-DUJzSl4K.js +0 -1
- package/dist/compose-refs-sFdxsL7k.js +0 -1
- package/dist/dialog-CsugEt2A.js +0 -1
- package/dist/dropdown-menu-DHdgaw4P.js +0 -1
- package/dist/field-Bihblt8U.js +0 -1
- package/dist/field-CPvjazWN.js +0 -1
- package/dist/icon-kK0c-POG.js +0 -1
- package/dist/icons-4JA-SGfv.js +0 -1
- package/dist/icons-CDLz5lpI.js +0 -1
- package/dist/icons-CSwTVV2m.js +0 -1
- package/dist/input-DHovzBjS.js +0 -1
- package/dist/kbd-CLHsJ99p.js +0 -1
- package/dist/label-DmDwzPD8.js +0 -1
- package/dist/layer-container-kEQiE4zV.js +0 -1
- package/dist/list-CO_yLdln.js +0 -1
- package/dist/live-region-DQ1QLv3L.js +0 -1
- package/dist/main-CC1L9IsH.js +0 -1
- package/dist/popover-BhTFutCz.d.ts +0 -1
- package/dist/popover-DxOqLKxy.js +0 -1
- package/dist/primitive-Dz9Al-us.js +0 -1
- package/dist/radio-group-HDVxTNPi.js +0 -1
- package/dist/radio-group-jj2abc0t.js +0 -1
- package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
- package/dist/select-C6Su0dU0.js +0 -1
- package/dist/separator-DfzxVutO.js +0 -1
- package/dist/sheet-Bd2LIhzF.js +0 -1
- package/dist/skeleton-DBpI-ko5.js +0 -1
- package/dist/slot-DdYN1L1C.js +0 -1
- package/dist/table-CFHiDBW8.js +0 -1
- package/dist/theme-DdZgLvKH.js +0 -1
- package/dist/tooltip-b6oiTaWq.js +0 -1
- package/dist/use-breakpoint--mo7kr9d.js +0 -1
- package/dist/use-callback-ref-BvVyI5K1.js +0 -1
- package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
- package/dist/use-inert-siblings-CNmNuS2h.js +0 -1
- package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
- package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
- package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
- package/dist/use-matches-media-query-m860lols.js +0 -1
- package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
- package/dist/use-swipe-to-dismiss-i__cTF2v.js +0 -1
package/dist/hover-card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{i as n,n as r}from"./layer-container-
|
|
1
|
+
"use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{i as n,n as r,s as i}from"./layer-container-DL4yclOu.js";import{c as a}from"react/compiler-runtime";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{Arrow as c,Content as l,Portal as u,Root as d,Trigger as f}from"@radix-ui/react-hover-card";const p=e=>{let t=a(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({closeDelay:r,openDelay:i,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let s=r===void 0?300:r,c=i===void 0?100:i,l;return t[4]!==s||t[5]!==c||t[6]!==n?(l=/* @__PURE__ */ o(d,{closeDelay:s,openDelay:c,...n}),t[4]=s,t[5]=c,t[6]=n,t[7]=l):l=t[7],l},m=e=>{let n=a(8),r,i;n[0]===e?(r=n[1],i=n[2]):({"data-slot":r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=t(r,`hover-card-trigger`),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=/* @__PURE__ */ o(f,{"data-slot":s,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c},h=e=>{let t=a(9),n,s;t[0]===e?(n=t[1],s=t[2]):({container:n,...s}=e,t[0]=e,t[1]=n,t[2]=s);let c=i(),l=n??c,d;t[3]!==s||t[4]!==l?(d=/* @__PURE__ */ o(u,{container:l,...s}),t[3]=s,t[4]=l,t[5]=d):d=t[5];let f;return t[6]!==l||t[7]!==d?(f=/* @__PURE__ */ o(r.Provider,{value:l,children:d}),t[6]=l,t[7]=d,t[8]=f):f=t[8],f},g={Root:p,Arrow:n=>{let r=a(20),i,l,u,d,f;r[0]===n?(i=r[1],l=r[2],u=r[3],d=r[4],f=r[5]):({"data-slot":l,className:i,height:d,width:f,...u}=n,r[0]=n,r[1]=i,r[2]=l,r[3]=u,r[4]=d,r[5]=f);let p=d===void 0?7:d,m=f===void 0?14:f,h;r[6]===l?h=r[7]:(h=t(l,`hover-card-arrow`),r[6]=l,r[7]=h);let g;r[8]===i?g=r[9]:(g=e(`fill-(--background-color-popover)`,`[clip-path:inset(0_-200%_-200%_-200%)]`,`filter-[drop-shadow(0_0_4px_color-mix(in_oklab,var(--shadow-color)_var(--shadow-first-opacity),transparent))]`,i),r[8]=i,r[9]=g);let _,v;r[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=/* @__PURE__ */ o(`polygon`,{points:`0,0 30,0 15,10`}),v=/* @__PURE__ */ o(`polyline`,{className:`stroke-(--border-color-popover)`,fill:`none`,points:`0,0 15,10 30,0`,strokeWidth:1.5,vectorEffect:`non-scaling-stroke`}),r[10]=_,r[11]=v):(_=r[10],v=r[11]);let y;r[12]===g?y=r[13]:(y=/* @__PURE__ */ s(`svg`,{className:g,children:[_,v]}),r[12]=g,r[13]=y);let b;return r[14]!==p||r[15]!==u||r[16]!==h||r[17]!==y||r[18]!==m?(b=/* @__PURE__ */ o(c,{"aria-hidden":`true`,asChild:!0,"data-slot":h,height:p,width:m,...u,children:y}),r[14]=p,r[15]=u,r[16]=h,r[17]=y,r[18]=m,r[19]=b):b=r[19],b},Content:r=>{let i=a(22),s,c,u,d,f,p,m;i[0]===r?(s=i[1],c=i[2],u=i[3],d=i[4],f=i[5],p=i[6],m=i[7]):({"data-slot":c,className:s,onClick:u,onEscapeKeyDown:d,align:p,sideOffset:m,...f}=r,i[0]=r,i[1]=s,i[2]=c,i[3]=u,i[4]=d,i[5]=f,i[6]=p,i[7]=m);let g=p===void 0?`center`:p,_=m===void 0?4:m,v=n(d),y;i[8]===c?y=i[9]:(y=t(c,`hover-card-content`),i[8]=c,i[9]=y);let b;i[10]===s?b=i[11]:(b=e(`relative`,`bg-popover border-popover z-50 w-64 rounded-md border p-4 shadow-md outline-hidden`,`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 data-state-closed:zoom-out-95 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-1 data-side-left:slide-in-from-right-1 data-side-right:slide-in-from-left-1 data-side-top:slide-in-from-bottom-1 data-side-bottom:slide-out-to-top-1 data-side-left:slide-out-to-right-1 data-side-right:slide-out-to-left-1 data-side-top:slide-out-to-bottom-1 duration-200 ease-out-strong data-state-closed:duration-150 motion-reduce:animate-none!`,s),i[10]=s,i[11]=b);let x;i[12]===u?x=i[13]:(x=e=>{e.stopPropagation(),u?.(e)},i[12]=u,i[13]=x);let S;return i[14]!==g||i[15]!==v||i[16]!==f||i[17]!==_||i[18]!==y||i[19]!==b||i[20]!==x?(S=/* @__PURE__ */ o(h,{children:/* @__PURE__ */ o(l,{"data-slot":y,align:g,sideOffset:_,className:b,onClick:x,onEscapeKeyDown:v,...f})}),i[14]=g,i[15]=v,i[16]=f,i[17]=_,i[18]=y,i[19]=b,i[20]=x,i[21]=S):S=i[21],S},Portal:h,Trigger:m};export{g as HoverCard};
|
|
@@ -13,7 +13,7 @@ import { ComponentProps } from "react";
|
|
|
13
13
|
type SvgAttributes = ComponentProps<"svg"> & {
|
|
14
14
|
/**
|
|
15
15
|
* Whether the SVG can receive keyboard focus. Use the string form
|
|
16
|
-
* (`"true"` / `"false"`)
|
|
16
|
+
* (`"true"` / `"false"`): the SVG attribute is serialized as a string and
|
|
17
17
|
* React's boolean form can produce inconsistent output.
|
|
18
18
|
*/
|
|
19
19
|
focusable?: "true" | "false";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as WithDataSlot } from "./data-slot-
|
|
2
|
-
import { t as SvgAttributes } from "./icon
|
|
1
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
2
|
+
import { t as SvgAttributes } from "./icon--purqHRo.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
type IconProps = Omit<SvgAttributes, "children"> & {
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as WithDataSlot } from "./data-slot-
|
|
2
|
-
import { t as SvgAttributes } from "./icon
|
|
1
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
2
|
+
import { t as SvgAttributes } from "./icon--purqHRo.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
type SvgOnlyProps = Omit<SvgAttributes, "children"> & {
|
|
5
5
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-BudQMD2S.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":c,className:s,style:d,svg:f,ref:u,...l}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p;o[7]===c?p=o[8]:(p=t(c,`icon`),o[7]=c,o[8]=p);let m;o[9]===s?m=o[10]:(m=e(`size-5`,s),o[9]=s,o[10]=m);let h;return o[11]!==l||o[12]!==u||o[13]!==d||o[14]!==f||o[15]!==p||o[16]!==m?(h=/* @__PURE__ */ i(n,{ref:u,"data-slot":p,className:m,style:d,svg:f,...l}),o[11]=l,o[12]=u,o[13]=d,o[14]=f,o[15]=p,o[16]=m,o[17]=h):h=o[17],h};export{a as t};
|
package/dist/icon.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see https://mantle.ngrok.com/components/data-display/icon
|
|
5
5
|
*/
|
|
6
|
-
import { n as IconProps, t as Icon } from "./icon-
|
|
7
|
-
import { n as SvgOnlyProps, t as SvgOnly } from "./icon-
|
|
8
|
-
import { t as SvgAttributes } from "./icon
|
|
6
|
+
import { n as IconProps, t as Icon } from "./icon-DuIYoyft.js";
|
|
7
|
+
import { n as SvgOnlyProps, t as SvgOnly } from "./icon-QCm1ui29.js";
|
|
8
|
+
import { t as SvgAttributes } from "./icon--purqHRo.js";
|
|
9
9
|
export { Icon, type IconProps, type SvgAttributes, SvgOnly, type SvgOnlyProps };
|
package/dist/icon.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./icon-
|
|
1
|
+
import{t as e}from"./icon-xb7d9M7X.js";import{t}from"./icon-BudQMD2S.js";export{e as Icon,t as SvgOnly};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{i as e}from"./direction-CvDpql3O.js";import{c as t}from"react/compiler-runtime";import{jsx as n}from"react/jsx-runtime";import{SortAscendingIcon as r}from"@phosphor-icons/react/SortAscending";import{SortDescendingIcon as i}from"@phosphor-icons/react/SortDescending";const a=a=>{let o=t(12),s,c,l;switch(o[0]===a?(s=o[1],c=o[2],l=o[3]):({mode:c,direction:s,...l}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l),c){case`alphanumeric`:switch(s){case`asc`:{let e;return o[4]===l?e=o[5]:(e=/* @__PURE__ */ n(r,{...l}),o[4]=l,o[5]=e),e}case`desc`:{let e;return o[6]===l?e=o[7]:(e=/* @__PURE__ */ n(i,{...l}),o[6]=l,o[7]=e),e}default:throw Error(`Invalid alphanumeric sorting direction given: "${String(s)}"`)}case`time`:switch(e(s)){case`oldest-to-newest`:{let e;return o[8]===l?e=o[9]:(e=/* @__PURE__ */ n(i,{...l}),o[8]=l,o[9]=e),e}case`newest-to-oldest`:{let e;return o[10]===l?e=o[11]:(e=/* @__PURE__ */ n(r,{...l}),o[10]=l,o[11]=e),e}default:throw Error(`Invalid time sorting direction given: "${s}"`)}}};export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{c as e}from"react/compiler-runtime";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r(r){let i=e(5),a,o,s;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=/* @__PURE__ */ t(`path`,{fill:`none`,d:`M0 0h256v256H0z`}),o=/* @__PURE__ */ t(`path`,{d:`m213.7 82.3-56-56c-1.5-1.5-3.5-2.3-5.7-2.3H56c-8.8 0-16 7.2-16 16v88c0 4.4 3.6 8 8 8s8-3.6 8-8V40h88v48c0 4.4 3.6 8 8 8h48v120h-40c-4.4 0-8 3.6-8 8s3.6 8 8 8h40c8.8 0 16-7.2 16-16V88c0-2.1-.8-4.2-2.3-5.7zm-53.7-31L188.7 80H160V51.3z`}),s=/* @__PURE__ */ t(`path`,{d:`M124.6 194.5h-6.8v-27.3h6.8c1.9 0 3.4-1.5 3.4-3.4s-1.5-3.4-3.4-3.4h-6.8v-10.2c0-3.8-3.1-6.8-6.8-6.8H63.3c-3.8 0-6.8 3.1-6.8 6.8v10.2h-6.8c-1.9 0-3.4 1.5-3.4 3.4s1.5 3.4 3.4 3.4h6.8v27.3h-6.8c-1.9 0-3.4 1.5-3.4 3.4s1.5 3.4 3.4 3.4h6.8v23.9c0 3.8 3.1 6.8 6.8 6.8H111c3.8 0 6.8-3.1 6.8-6.8v-23.9h6.8c1.9 0 3.4-1.5 3.4-3.4s-1.5-3.4-3.4-3.4zm-37.5-11.9c-6.6 0-11.9-5.3-11.9-11.9s5.3-11.9 11.9-11.9S99 164.1 99 170.7s-5.3 11.9-11.9 11.9zm0 10.2c6.6 0 11.9 5.3 11.9 11.9s-5.3 11.9-11.9 11.9-11.9-5.3-11.9-11.9 5.3-11.9 11.9-11.9z`}),i[0]=a,i[1]=o,i[2]=s):(a=i[0],o=i[1],s=i[2]);let c;return i[3]===r?c=i[4]:(c=/* @__PURE__ */ n(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 256 256`,width:`1em`,...r,children:[a,o,s]}),i[3]=r,i[4]=c),c}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{s as e}from"./theme-BNdZl352.js";import{c as t}from"react/compiler-runtime";import{jsx as n}from"react/jsx-runtime";import{DesktopIcon as r}from"@phosphor-icons/react/Desktop";import{MoonIcon as i}from"@phosphor-icons/react/Moon";import{SunIcon as a}from"@phosphor-icons/react/Sun";function o(r){let i=t(3),a=e(),o;return i[0]!==a||i[1]!==r?(o=/* @__PURE__ */ n(s,{theme:a,...r}),i[0]=a,i[1]=r,i[2]=o):o=i[2],o}function s(e){let o=t(9),s,c;switch(o[0]===e?(s=o[1],c=o[2]):({theme:c,...s}=e,o[0]=e,o[1]=s,o[2]=c),c){case`system`:{let e;return o[3]===s?e=o[4]:(e=/* @__PURE__ */ n(r,{...s}),o[3]=s,o[4]=e),e}case`light`:{let e;return o[5]===s?e=o[6]:(e=/* @__PURE__ */ n(a,{...s}),o[5]=s,o[6]=e),e}case`dark`:{let e;return o[7]===s?e=o[8]:(e=/* @__PURE__ */ n(i,{...s}),o[7]=s,o[8]=e),e}}}export{s as n,o as t};
|
package/dist/icons.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Re-exports for the Icons component
|
|
2
|
+
* Re-exports for the Icons component: the ngrok-specific icons that
|
|
3
3
|
* `@phosphor-icons/react` does not ship.
|
|
4
4
|
*
|
|
5
5
|
* @useWhen Show an ngrok glyph that `@phosphor-icons/react` does not ship, such as the ngrok
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @see https://mantle.ngrok.com/components/data-display/icons
|
|
12
12
|
*/
|
|
13
13
|
import { a as AlphanumericSortingDirection, c as TimeSortingDirection, o as SortingDirection, s as SortingMode } from "./direction-CpRzTtZh.js";
|
|
14
|
-
import { t as SvgAttributes } from "./icon
|
|
14
|
+
import { t as SvgAttributes } from "./icon--purqHRo.js";
|
|
15
15
|
import { i as Theme } from "./theme-w1CrMM-x.js";
|
|
16
16
|
import { ComponentProps } from "react";
|
|
17
17
|
type Props = SvgAttributes & ({
|
package/dist/icons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./icons-
|
|
1
|
+
"use client";import{t as e}from"./icons-DEDCLZ8B.js";import{t}from"./icons-DXadFwpo.js";import{n,t as r}from"./icons-DcesO4Ng.js";import{c as i}from"react/compiler-runtime";import{jsx as a}from"react/jsx-runtime";function o(e){let t=i(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=/* @__PURE__ */ a(`path`,{d:`M32.272 12.011c-1.298-1.466-2.904-2.205-4.812-2.205-1.176 0-2.26.233-3.255.7a7.995 7.995 0 0 0-2.581 1.906 9.205 9.205 0 0 0-1.715 2.853 9.773 9.773 0 0 0-.628 3.546c0 1.25.194 2.39.58 3.419.362.98.918 1.877 1.635 2.636A7.543 7.543 0 0 0 24 26.584c.965.41 2.025.617 3.176.617.522 0 1.005-.041 1.445-.116.439-.075.858-.2 1.26-.37.4-.175.79-.398 1.18-.664.385-.27.792-.612 1.21-1.018v4.353h-.005v.421h-5.33l-4.005 4.64v.798h15.037v-24.98h-5.697v1.746Zm-.014 7.979a4.25 4.25 0 0 1-.786 1.215 3.555 3.555 0 0 1-2.592 1.1 3.627 3.627 0 0 1-1.464-.292 3.508 3.508 0 0 1-1.166-.808 3.93 3.93 0 0 1-1.054-2.72c0-.519.097-1.006.298-1.457a3.77 3.77 0 0 1 .804-1.181 4.114 4.114 0 0 1 1.162-.808 3.484 3.484 0 0 1 2.817-.016c.448.19.844.463 1.181.81.336.347.6.743.804 1.194.202.452.298.95.298 1.493 0 .505-.104 1.005-.302 1.47m-16.261-7.708a6.173 6.173 0 0 0-2.06-1.602 4.875 4.875 0 0 0-.57-.22 6.383 6.383 0 0 0-.923-.216H8.383L5.697 13.39v-3.082H.002v16.61h5.695V15.712h5.35l.444-.01v11.214h5.697V16.528c0-.885-.084-1.674-.25-2.366a4.655 4.655 0 0 0-.941-1.877zm38.367-2.018h-6.213l-2.47 2.863v-2.864h-5.7v16.61h5.71l.004-11.117h4.144l4.526-5.26zm31.051 7.672 7.79-7.392v-.281H85.7l-5.975 5.991V0h-5.696v26.87h5.696v-6.766l6.262 6.763h7.663v-.316l-8.233-8.617zm-16.11-5.78a9.436 9.436 0 0 0-3.085-1.842 10.953 10.953 0 0 0-3.855-.664c-1.407 0-2.705.226-3.884.678a9.611 9.611 0 0 0-3.072 1.858 8.488 8.488 0 0 0-2.016 2.788 8.281 8.281 0 0 0-.722 3.449c0 1.362.24 2.596.722 3.707a8.52 8.52 0 0 0 2.002 2.862c.85.798 1.86 1.415 3.036 1.847 1.177.432 2.455.647 3.842.647 1.406 0 2.707-.215 3.919-.647 1.204-.431 2.24-1.04 3.098-1.833a8.583 8.583 0 0 0 2.031-2.816c.493-1.09.742-2.29.742-3.611 0-1.316-.244-2.52-.722-3.612a8.424 8.424 0 0 0-2.035-2.81Zm-3.558 7.864c-.2.461-.463.869-.786 1.215a3.573 3.573 0 0 1-2.592 1.1c-.502 0-.981-.096-1.434-.291a3.44 3.44 0 0 1-1.16-.809 4.155 4.155 0 0 1-.788-1.215 3.825 3.825 0 0 1-.297-1.537c0-.517.098-1.004.297-1.456.201-.451.46-.849.787-1.194a3.579 3.579 0 0 1 2.597-1.1c.502 0 .98.096 1.43.29.448.19.839.461 1.16.81.328.345.586.752.786 1.214.2.461.297.954.297 1.471 0 .538-.096 1.04-.297 1.502`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=/* @__PURE__ */ a(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 94 36`,width:`2.61em`,...e,children:n}),t[1]=e,t[2]=r),r}function s(e){let t=i(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=/* @__PURE__ */ a(`path`,{d:`M27.2 6.18a9.47 9.47 0 0 0-3.12-2.5A9.42 9.42 0 0 0 21.82 3h-6.14l-4.06 4.9V3.1H3V29h8.62V11.53h8.09l.67-.02v17.48H29V12.8c0-1.37-.13-2.6-.38-3.68a7.35 7.35 0 0 0-1.42-2.93Z`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=/* @__PURE__ */ a(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 32 32`,width:`1em`,...e,children:n}),t[1]=e,t[2]=r),r}export{r as AutoThemeIcon,s as NgrokLettermarkIcon,o as NgrokWordmarkIcon,e as SortIcon,n as ThemeIcon,t as TrafficPolicyFileIcon};
|
|
@@ -5,9 +5,10 @@ import { Ref, RefCallback } from "react";
|
|
|
5
5
|
* browsers.
|
|
6
6
|
*
|
|
7
7
|
* Throws when called outside a DOM environment, or when both the Clipboard
|
|
8
|
-
* API and the polyfill fail
|
|
8
|
+
* API and the polyfill fail. `await` the call to observe success.
|
|
9
9
|
*/
|
|
10
10
|
declare function copyToClipboard(value: string): Promise<void>;
|
|
11
|
+
/** A ref that a part may receive: a callback ref, a ref object, or none. */
|
|
11
12
|
type PossibleRef<T> = Ref<T> | undefined;
|
|
12
13
|
/**
|
|
13
14
|
* A utility that composes multiple refs into a single callback ref. Accepts
|
|
@@ -20,7 +21,7 @@ type PossibleRef<T> = Ref<T> | undefined;
|
|
|
20
21
|
* If no inner ref returns a cleanup, the composed ref returns `undefined`
|
|
21
22
|
* and React calls it again with `null` on unmount (legacy behavior).
|
|
22
23
|
*
|
|
23
|
-
* Prefer {@link useComposedRefs} inside components
|
|
24
|
+
* Prefer {@link useComposedRefs} inside components: it keeps a stable
|
|
24
25
|
* function identity across renders.
|
|
25
26
|
*
|
|
26
27
|
* @example
|
|
@@ -28,26 +29,6 @@ type PossibleRef<T> = Ref<T> | undefined;
|
|
|
28
29
|
* return <input ref={setRefs} />;
|
|
29
30
|
*/
|
|
30
31
|
declare function composeRefs<T>(...refs: PossibleRef<T>[]): RefCallback<T>;
|
|
31
|
-
/**
|
|
32
|
-
* A custom hook that composes up to three refs into a single callback ref.
|
|
33
|
-
* Accepts callback refs and RefObject(s). The callback keeps one identity
|
|
34
|
-
* while the refs it composes keep theirs, so React attaches it once per
|
|
35
|
-
* mount. If you pass a new ref on a later render, React detaches the old
|
|
36
|
-
* callback and attaches the new one, so the new ref receives the node at
|
|
37
|
-
* once. A consumer callback ref fires once per mount when the consumer
|
|
38
|
-
* passes the same function each render, and on every render when the
|
|
39
|
-
* consumer passes a new function, as it does on a plain element. Any
|
|
40
|
-
* cleanup the composed ref returns targets the refs it composed (see
|
|
41
|
-
* {@link composeRefs} for the cleanup propagation contract).
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* function MyInput({ ref, ...props }: ComponentProps<"input">) {
|
|
45
|
-
* const internalRef = useRef<HTMLInputElement>(null);
|
|
46
|
-
* const composedRef = useComposedRefs(internalRef, ref);
|
|
47
|
-
* return <input ref={composedRef} {...props} />;
|
|
48
|
-
* }
|
|
49
|
-
*/
|
|
50
|
-
declare function useComposedRefs<T>(firstRef: PossibleRef<T>, secondRef: PossibleRef<T>, thirdRef?: PossibleRef<T>): RefCallback<T>;
|
|
51
32
|
type MarginValue = `${number}${"px" | "%"}`;
|
|
52
33
|
/**
|
|
53
34
|
* Margin string used to expand or contract the intersection root's bounding box.
|
|
@@ -110,4 +91,4 @@ type ViewChangeHandler = (entry: IntersectionObserverEntry) => void;
|
|
|
110
91
|
* stop();
|
|
111
92
|
*/
|
|
112
93
|
declare function inView(element: Element, onStart: (element: Element, entry: IntersectionObserverEntry) => void | ViewChangeHandler, { root, margin: rootMargin, amount }?: InViewOptions): VoidFunction;
|
|
113
|
-
export {
|
|
94
|
+
export { PossibleRef as a, inView as i, MarginType as n, composeRefs as o, ViewChangeHandler as r, copyToClipboard as s, InViewOptions as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./booleanish-BfvnW6vy.js";import{t}from"./use-composed-refs-DPYmLDSe.js";import{t as n}from"./clsx-DUGZgXfJ.js";import{t as r}from"./cx-CK7o_rVv.js";import{t as i}from"./data-slot-EM6s2WEU.js";import{a,r as o}from"./field-Bpvn4tQp.js";import{t as s}from"./icon-xb7d9M7X.js";import{c}from"react/compiler-runtime";import{createContext as l,useContext as u,useRef as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{CheckCircleIcon as m}from"@phosphor-icons/react/CheckCircle";import{WarningIcon as h}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as g}from"@phosphor-icons/react/WarningDiamond";const _=e=>{let t=c(17),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({children:n,className:r,ref:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=!!n,s=d(null);if(o){let e;return t[5]!==n||t[6]!==r||t[7]!==i||t[8]!==a?(e=/* @__PURE__ */ f(b,{className:r,forwardedRef:a,innerRef:s,...i,children:n}),t[5]=n,t[6]=r,t[7]=i,t[8]=a,t[9]=e):e=t[9],e}let l;t[10]===i?l=t[11]:(l=/* @__PURE__ */ f(v,{...i}),t[10]=i,t[11]=l);let u;return t[12]!==r||t[13]!==i||t[14]!==a||t[15]!==l?(u=/* @__PURE__ */ f(b,{...i,className:r,forwardedRef:a,innerRef:s,children:l}),t[12]=r,t[13]=i,t[14]=a,t[15]=l,t[16]=u):u=t[16],u},v=e=>{let n=c(31),s,l,d,p,m,h;n[0]===e?(s=n[1],l=n[2],d=n[3],p=n[4],m=n[5],h=n[6]):({"aria-invalid":s,"data-slot":p,className:d,ref:m,validation:l,...h}=e,n[0]=e,n[1]=s,n[2]=l,n[3]=d,n[4]=p,n[5]=m,n[6]=h);let g=u(y),_,v,b,x,S;n[7]===g?(_=n[8],v=n[9],b=n[10],x=n[11],S=n[12]):({"aria-invalid":v,forwardedRef:b,innerRef:x,validation:S,..._}=g,n[7]=g,n[8]=_,n[9]=v,n[10]=b,n[11]=x,n[12]=S);let C=a(),w=v??s,T=S??l??C,E;n[13]!==w||n[14]!==T?(E=o({"aria-invalid":w,validation:T}),n[13]=w,n[14]=T,n[15]=E):E=n[15];let{ariaInvalid:D,validation:O}=E,k=h.type??_.type??`text`,A;n[16]!==_||n[17]!==h||n[18]!==k?(A={..._,...h,type:k},n[16]=_,n[17]=h,n[18]=k,n[19]=A):A=n[19];let j=A,M=t(m,b,x),N;n[20]===p?N=n[21]:(N=i(p,`input-capture`),n[20]=p,n[21]=N);let P;n[22]===d?P=n[23]:(P=r(`placeholder:text-placeholder min-w-0 flex-1 bg-transparent text-left autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] focus:outline-hidden`,d),n[22]=d,n[23]=P);let F;return n[24]!==D||n[25]!==M||n[26]!==j||n[27]!==N||n[28]!==P||n[29]!==O?(F=/* @__PURE__ */ f(`input`,{"aria-invalid":D,"data-slot":N,"data-validation":O,className:P,ref:M,...j}),n[24]=D,n[25]=M,n[26]=j,n[27]=N,n[28]=P,n[29]=O,n[30]=F):F=n[30],F},y=l({validation:void 0,innerRef:{current:null}}),b=t=>{let n=c(51),s,l,u,d,m,h,g,_,v,b,S,C;n[0]===t?(s=n[1],l=n[2],u=n[3],d=n[4],m=n[5],h=n[6],g=n[7],_=n[8],v=n[9],b=n[10],S=n[11],C=n[12]):({"aria-invalid":l,"aria-disabled":s,"data-slot":h,children:d,className:m,disabled:g,forwardedRef:_,innerRef:v,style:S,type:C,validation:u,...b}=t,n[0]=t,n[1]=s,n[2]=l,n[3]=u,n[4]=d,n[5]=m,n[6]=h,n[7]=g,n[8]=_,n[9]=v,n[10]=b,n[11]=S,n[12]=C);let w=a(),T=u??w,E;n[13]!==l||n[14]!==T?(E=o({"aria-invalid":l,validation:T}),n[13]=l,n[14]=T,n[15]=E):E=n[15];let{validation:D}=E,O;n[16]!==s||n[17]!==l||n[18]!==u||n[19]!==g||n[20]!==_||n[21]!==v||n[22]!==b||n[23]!==C?(O={"aria-invalid":l,"aria-disabled":s,disabled:g,type:C,validation:u,...b,forwardedRef:_,innerRef:v},n[16]=s,n[17]=l,n[18]=u,n[19]=g,n[20]=_,n[21]=v,n[22]=b,n[23]=C,n[24]=O):O=n[24];let k=O,A;n[25]===h?A=n[26]:(A=i(h,`input`),n[25]=h,n[26]=A);let j;n[27]!==s||n[28]!==g?(j=e(g??s)||void 0,n[27]=s,n[28]=g,n[29]=j):j=n[29];let M=D||void 0,N;n[30]===m?N=n[31]:(N=r(`pointer-coarse:text-base h-9 text-sm`,`bg-form relative flex w-full items-center gap-1.5 rounded-md border px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-within:outline-hidden focus-within:ring-4`,`data-disabled:opacity-50`,`has-[input:not(:first-child)]:ps-2.5 has-[input:not(:last-child)]:pe-2.5 [&>:not(input)]:shrink-0 [&_svg]:size-5`,`border-form text-strong focus-within:border-accent-600 focus-within:ring-focus-accent`,`data-validation-success:border-success-600 focus-within:data-validation-success:border-success-600 focus-within:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 focus-within:data-validation-warning:border-warning-600 focus-within:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 focus-within:data-validation-error:border-danger-600 focus-within:data-validation-error:ring-focus-danger motion-safe:data-validation-error:animate-shake`,`has-[>[data-validation=error]]:border-danger-600 focus-within:has-[>[data-validation=error]]:border-danger-600 focus-within:has-[>[data-validation=error]]:ring-focus-danger motion-safe:has-[>[data-validation=error]]:animate-shake`,`autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] has-autofill:bg-blue-50 has-autofill:[-webkit-text-fill-color:var(--text-color-strong)]`,m),n[30]=m,n[31]=N);let P,F;n[32]===v?(P=n[33],F=n[34]):(P=e=>{e.target!==v?.current&&e.preventDefault()},F=e=>{let t=v.current;t!=null&&e.detail!==0&&t.focus()},n[32]=v,n[33]=P,n[34]=F);let I;n[35]!==b.name||n[36]!==D?(I=/* @__PURE__ */ f(x,{name:b.name,validation:D}),n[35]=b.name,n[36]=D,n[37]=I):I=n[37];let L;n[38]!==d||n[39]!==S||n[40]!==I||n[41]!==A||n[42]!==j||n[43]!==M||n[44]!==N||n[45]!==P||n[46]!==F?(L=/* @__PURE__ */ p(`div`,{role:`none`,"data-slot":A,"data-disabled":j,"data-validation":M,className:N,onMouseDown:P,onClick:F,style:S,children:[d,I]}),n[38]=d,n[39]=S,n[40]=I,n[41]=A,n[42]=j,n[43]=M,n[44]=N,n[45]=P,n[46]=F,n[47]=L):L=n[47];let R;return n[48]!==k||n[49]!==L?(R=/* @__PURE__ */ f(y.Provider,{value:k,children:L}),n[48]=k,n[49]=L,n[50]=R):R=n[50],R},x=e=>{let t=c(9),{name:r,validation:i}=e;switch(i){case`error`:{let e;t[0]===r?e=t[1]:(e=n(`The value entered for the`,r,`input has failed validation.`),t[0]=r,t[1]=e);let i;t[2]===e?i=t[3]:(i=/* @__PURE__ */ f(`span`,{className:`sr-only`,children:e}),t[2]=e,t[3]=i);let a;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=/* @__PURE__ */ f(s,{svg:/* @__PURE__ */ f(h,{"aria-hidden":!0,weight:`fill`})}),t[4]=a):a=t[4];let o;return t[5]===i?o=t[6]:(o=/* @__PURE__ */ p(`div`,{className:`text-danger-600 order-last select-none`,children:[i,a]}),t[5]=i,t[6]=o),o}case`success`:{let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=/* @__PURE__ */ f(`div`,{className:`text-success-600 order-last select-none`,children:/* @__PURE__ */ f(s,{svg:/* @__PURE__ */ f(m,{weight:`fill`})})}),t[7]=e):e=t[7],e}case`warning`:{let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=/* @__PURE__ */ f(`div`,{className:`text-warning-600 order-last select-none`,children:/* @__PURE__ */ f(s,{svg:/* @__PURE__ */ f(g,{weight:`fill`})})}),t[8]=e):e=t[8],e}default:return null}};export{v as n,_ as t};
|
package/dist/input.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* @see https://mantle.ngrok.com/components/forms/input
|
|
5
5
|
* @see https://mantle.ngrok.com/components/forms/password-input
|
|
6
6
|
*/
|
|
7
|
-
import { a as AutoComplete, c as WithInputType, i as InputProps, n as InputCapture, o as InputType, r as InputCaptureProps, s as WithAutoComplete, t as Input } from "./input-
|
|
7
|
+
import { a as AutoComplete, c as WithInputType, i as InputProps, n as InputCapture, o as InputType, r as InputCaptureProps, s as WithAutoComplete, t as Input } from "./input-DC4nW0Sr.js";
|
|
8
8
|
import { o as WithValidation, r as Validation } from "./field-BshcNVe_.js";
|
|
9
|
-
import { t as WithDataSlot } from "./data-slot-
|
|
9
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
10
10
|
import { ComponentProps } from "react";
|
|
11
11
|
/**
|
|
12
12
|
* The props for the `PasswordInput` component.
|
|
@@ -81,7 +81,7 @@ type PasswordInputProps = Omit<ComponentProps<"input">, "autoComplete" | "type">
|
|
|
81
81
|
* import { Label } from "@ngrok/mantle/label";
|
|
82
82
|
* import { useState } from "react";
|
|
83
83
|
*
|
|
84
|
-
* // Basic
|
|
84
|
+
* // Basic: uncontrolled visibility.
|
|
85
85
|
* <Label className="grid gap-1">
|
|
86
86
|
* <span>Password</span>
|
|
87
87
|
* <PasswordInput name="password" autoComplete="current-password" />
|
|
@@ -90,7 +90,7 @@ type PasswordInputProps = Omit<ComponentProps<"input">, "autoComplete" | "type">
|
|
|
90
90
|
* // Validation state.
|
|
91
91
|
* <PasswordInput validation="error" />
|
|
92
92
|
*
|
|
93
|
-
* // Controlled visibility
|
|
93
|
+
* // Controlled visibility: one toggle reveals multiple fields.
|
|
94
94
|
* function PasswordPair() {
|
|
95
95
|
* const [show, setShow] = useState(false);
|
|
96
96
|
* return (
|
package/dist/input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./input-
|
|
1
|
+
"use client";import{n as e,t}from"./input-fW8QSZEO.js";import{t as n}from"./use-isomorphic-layout-effect-CL6iq0Bj.js";import{t as r}from"./use-prefers-reduced-motion-Ck6dnOM9.js";import{t as i}from"./icon-xb7d9M7X.js";import{t as a}from"./data-slot-EM6s2WEU.js";import{t as o}from"./input-DQyN6gN0.js";import{t as s}from"./input-BjCDSOPA.js";import{c}from"react/compiler-runtime";import{useId as l,useRef as u,useState as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{EyeIcon as m}from"@phosphor-icons/react/Eye";import{EyeClosedIcon as h}from"@phosphor-icons/react/EyeClosed";const g=o=>{let s=c(34),g,_,v,y,b,x,S;s[0]===o?(g=s[1],_=s[2],v=s[3],y=s[4],b=s[5],x=s[6],S=s[7]):({"data-slot":g,disabled:_,id:v,onValueVisibilityChange:y,ref:x,showValue:S,...b}=o,s[0]=o,s[1]=g,s[2]=_,s[3]=v,s[4]=y,s[5]=b,s[6]=x,s[7]=S);let C=l(),w=v??C,T=S!=null,[E,D]=d(!1),O=T?S:E,k=O?`text`:`password`,A=O?m:h,j=u(null),M=u(O),N,P;s[8]===O?(N=s[9],P=s[10]):(N=()=>{if(M.current===O)return;M.current=O;let e=j.current;e==null||r()||e.animate([{scale:`1 0.5`},{scale:`1`}],{duration:200,easing:`cubic-bezier(0.23, 1, 0.32, 1)`})},P=[O],s[8]=O,s[9]=N,s[10]=P),n(N,P);let F;s[11]===g?F=s[12]:(F=a(g,`password-input`),s[11]=g,s[12]=F);let I;s[13]===Symbol.for(`react.memo_cache_sentinel`)?(I=/* @__PURE__ */ f(e,{}),s[13]=I):I=s[13];let L;s[14]!==T||s[15]!==y||s[16]!==O?(L=()=>{let e=!O;T||D(e),y?.(e)},s[14]=T,s[15]=y,s[16]=O,s[17]=L):L=s[17];let R;s[18]===A?R=s[19]:(R=/* @__PURE__ */ f(i,{ref:j,svg:/* @__PURE__ */ f(A,{"aria-hidden":!0})}),s[18]=A,s[19]=R);let z;s[20]!==_||s[21]!==w||s[22]!==O||s[23]!==L||s[24]!==R?(z=/* @__PURE__ */ f(`button`,{type:`button`,disabled:_,"data-slot":`password-input-toggle`,"aria-label":`Show value`,"aria-pressed":O,"aria-controls":w,className:`text-body hover:text-strong focus-visible:ring-focus-accent ml-1 cursor-pointer rounded-xs bg-inherit p-0 focus-visible:ring-2 focus-visible:outline-hidden`,onClick:L,children:R}),s[20]=_,s[21]=w,s[22]=O,s[23]=L,s[24]=R,s[25]=z):z=s[25];let B;return s[26]!==_||s[27]!==w||s[28]!==b||s[29]!==x||s[30]!==F||s[31]!==z||s[32]!==k?(B=/* @__PURE__ */ p(t,{"data-slot":F,disabled:_,id:w,type:k,ref:x,...b,children:[I,z]}),s[26]=_,s[27]=w,s[28]=b,s[29]=x,s[30]=F,s[31]=z,s[32]=k,s[33]=B):B=s[33],B};export{t as Input,e as InputCapture,g as PasswordInput,o as isInput,s as passwordManagerIgnoreProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{c as n}from"react/compiler-runtime";import{jsx as r}from"react/jsx-runtime";function i(i){let a=n(14),o,s,c,l;a[0]===i?(o=a[1],s=a[2],c=a[3],l=a[4]):({"data-slot":c,children:o,className:s,...l}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=l);let u;a[5]===c?u=a[6]:(u=t(c,`kbd`),a[5]=c,a[6]=u);let d;a[7]===s?d=a[8]:(d=e(`[font-kerning:normal] [font-variant-ligatures:common-ligatures_contextual]`,`appearance-none tabular-nums inline-grid place-items-center size-5 bg-neutral-500/15 px-1 rounded text-mono leading-none font-mono`,s),a[7]=s,a[8]=d);let f;return a[9]!==o||a[10]!==l||a[11]!==u||a[12]!==d?(f=/* @__PURE__ */ r(`kbd`,{"data-slot":u,className:d,...l,translate:`no`,children:o}),a[9]=o,a[10]=l,a[11]=u,a[12]=d,a[13]=f):f=a[13],f}export{i as t};
|
package/dist/kbd.d.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see https://mantle.ngrok.com/components/data-display/kbd
|
|
5
5
|
*/
|
|
6
|
-
import { t as WithDataSlot } from "./data-slot-
|
|
6
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
7
7
|
import { ComponentProps } from "react";
|
|
8
8
|
/**
|
|
9
|
-
* A square, centered keyboard "key" chip for rendering shortcut hints
|
|
9
|
+
* A square, centered keyboard "key" chip for rendering shortcut hints:
|
|
10
10
|
* "K", "⌘", "⌃", "Enter". Renders a native `<kbd>` element so screen
|
|
11
11
|
* readers announce it as keyboard input. Sized so letters and modifier
|
|
12
12
|
* symbols share a consistent visual height, width, and baseline.
|
|
@@ -17,8 +17,8 @@ import { ComponentProps } from "react";
|
|
|
17
17
|
* - Inline with prose: "Press `Kbd K` to open search."
|
|
18
18
|
*
|
|
19
19
|
* **When not to use**
|
|
20
|
-
* - For arbitrary monospace text
|
|
21
|
-
* - For chord-style multi-key shortcuts as a single chip
|
|
20
|
+
* - For arbitrary monospace text, use {@link https://mantle.ngrok.com/components/data-display/code Code}.
|
|
21
|
+
* - For chord-style multi-key shortcuts as a single chip, render multiple
|
|
22
22
|
* `<Kbd>` elements separated by `+` text instead.
|
|
23
23
|
*
|
|
24
24
|
* **Accessibility.** Symbol-only glyphs (`⌘`, `⌃`, `↵`) are not announced
|
|
@@ -55,7 +55,7 @@ import { ComponentProps } from "react";
|
|
|
55
55
|
* <span aria-hidden>↵</span>
|
|
56
56
|
* </Kbd>
|
|
57
57
|
*
|
|
58
|
-
* // Chord
|
|
58
|
+
* // Chord: render each key separately.
|
|
59
59
|
* <span className="inline-flex items-center gap-1">
|
|
60
60
|
* <Kbd>
|
|
61
61
|
* <span className="sr-only">Command</span>
|
package/dist/kbd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as Kbd}from"./kbd-
|
|
1
|
+
export{t as Kbd}from"./kbd-P1nQshWo.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./booleanish-BfvnW6vy.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(26),s,c,l,u,d,f,p,m;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6],p=o[7],m=o[8]):({"data-slot":u,"aria-disabled":s,children:c,className:l,disabled:d,onMouseDown:f,ref:m,...p}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f,o[7]=p,o[8]=m);let h;o[9]!==s||o[10]!==d?(h=e(d??s)||void 0,o[9]=s,o[10]=d,o[11]=h):h=o[11];let g;o[12]===u?g=o[13]:(g=n(u,`label`),o[12]=u,o[13]=g);let _;o[14]===l?_=o[15]:(_=t(`text-strong cursor-pointer text-sm peer-disabled:cursor-default has-disabled:cursor-default data-disabled:cursor-default font-sans`,`[:where(&:not(:has(input,textarea,select,button,[contenteditable])))]:font-medium`,l),o[14]=l,o[15]=_);let v;o[16]===f?v=o[17]:(v=e=>{e.target instanceof Element&&e.target.closest(`button, input, select, textarea`)||(f?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())},o[16]=f,o[17]=v);let y;return o[18]!==c||o[19]!==p||o[20]!==m||o[21]!==h||o[22]!==g||o[23]!==_||o[24]!==v?(y=/* @__PURE__ */ i(`label`,{"data-disabled":h,"data-slot":g,className:_,onMouseDown:v,ref:m,...p,children:c}),o[18]=c,o[19]=p,o[20]=m,o[21]=h,o[22]=g,o[23]=_,o[24]=v,o[25]=y):y=o[25],y};export{a as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as WithDataSlot } from "./data-slot-
|
|
1
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
type LabelProps = ComponentProps<"label"> & {
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ type LabelProps = ComponentProps<"label"> & {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
} & WithDataSlot;
|
|
9
9
|
/**
|
|
10
|
-
* A caption for a form control
|
|
10
|
+
* A caption for a form control: input, checkbox, radio, switch, select.
|
|
11
11
|
* Renders a native `<label>`. Pair every form control with a `Label` so the
|
|
12
12
|
* control has an accessible name, clicks on the label focus the control, and
|
|
13
13
|
* screen readers announce the field correctly.
|
|
@@ -18,14 +18,14 @@ type LabelProps = ComponentProps<"label"> & {
|
|
|
18
18
|
* - Wrapping a checkbox or radio next to its descriptive text.
|
|
19
19
|
*
|
|
20
20
|
* **When not to use**
|
|
21
|
-
* - For static UI text that isn't labeling a control
|
|
21
|
+
* - For static UI text that isn't labeling a control. Use a heading or
|
|
22
22
|
* plain `<p>`/`<span>`.
|
|
23
23
|
* - As a substitute for `aria-label` on non-`<input>` widgets that don't
|
|
24
24
|
* support `<label for>` association.
|
|
25
25
|
*
|
|
26
26
|
* **Two ways to associate.** Either wrap the control inside the `<Label>`
|
|
27
|
-
* (implicit association
|
|
28
|
-
* (explicit
|
|
27
|
+
* (implicit association, the simplest) or set `htmlFor` to the control's `id`
|
|
28
|
+
* (explicit, required when the control isn't a child).
|
|
29
29
|
*
|
|
30
30
|
* **Disabled state.** Pass `disabled` to render the label in a disabled
|
|
31
31
|
* style. Typically you'll want this to mirror the underlying control's
|
|
@@ -37,7 +37,7 @@ type LabelProps = ComponentProps<"label"> & {
|
|
|
37
37
|
* **not** contain a nested form control (`<input>`, `<textarea>`, `<select>`,
|
|
38
38
|
* `<button>`, or `[contenteditable]`). When the label *does* wrap a control,
|
|
39
39
|
* the auto default is intentionally skipped so the control's own typography
|
|
40
|
-
* isn't bolded
|
|
40
|
+
* isn't bolded. Apply `font-medium` to your own caption element (e.g. a
|
|
41
41
|
* `<span>` or `<p>`) inside the label. Override the default at any time by
|
|
42
42
|
* passing a font-weight utility on the `Label` itself, e.g.
|
|
43
43
|
* `<Label className="font-bold">`.
|
|
@@ -55,13 +55,13 @@ type LabelProps = ComponentProps<"label"> & {
|
|
|
55
55
|
* import { Label } from "@ngrok/mantle/label";
|
|
56
56
|
* import { Input } from "@ngrok/mantle/input";
|
|
57
57
|
*
|
|
58
|
-
* // Implicit
|
|
58
|
+
* // Implicit: control nested inside the label.
|
|
59
59
|
* <Label className="grid gap-1">
|
|
60
60
|
* <span>Email</span>
|
|
61
61
|
* <Input type="email" name="email" />
|
|
62
62
|
* </Label>
|
|
63
63
|
*
|
|
64
|
-
* // Explicit
|
|
64
|
+
* // Explicit: htmlFor matches the control's id.
|
|
65
65
|
* <div className="grid gap-1">
|
|
66
66
|
* <Label htmlFor="api-key">API key</Label>
|
|
67
67
|
* <Input id="api-key" name="apiKey" />
|
package/dist/label.d.ts
CHANGED
package/dist/label.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as Label}from"./label-
|
|
1
|
+
export{t as Label}from"./label-DO1RlMKl.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./use-callback-ref-DiOXFQzM.js";import{t}from"./use-composed-refs-DPYmLDSe.js";import{c as n}from"react/compiler-runtime";import{createContext as r,useContext as i,useEffect as a,useLayoutEffect as o,useState as s}from"react";import{jsx as c}from"react/jsx-runtime";const l=r(null),u=r(!1);function d(){let e=n(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],o(E,t),i(l)}function f(){return i(u)}function p(e){let r=n(15),i,a,o,d;r[0]===e?(i=r[1],a=r[2],o=r[3],d=r[4]):({children:i,modal:d,ref:o,...a}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=d);let p=d===void 0||d,[m,h]=s(null),g=t(o,h),_=f()||p,v;r[5]!==i||r[6]!==m?(v=/* @__PURE__ */ c(l.Provider,{value:m,children:i}),r[5]=i,r[6]=m,r[7]=v):v=r[7];let y;r[8]!==_||r[9]!==v?(y=/* @__PURE__ */ c(u.Provider,{value:_,children:v}),r[8]=_,r[9]=v,r[10]=y):y=r[10];let b;return r[11]!==g||r[12]!==a||r[13]!==y?(b=/* @__PURE__ */ c(`div`,{ref:g,...a,children:y}),r[11]=g,r[12]=a,r[13]=y,r[14]=b):b=r[14],b}const m=[];function h(t){let r=n(5),{container:i,content:o,escape:s}=t,c=e(s),l,u;r[0]!==i||r[1]!==o||r[2]!==c?(l=()=>{if(!(i instanceof Element)||o==null)return;let e={container:i,content:o,escape:c};return m.push(e),()=>{m.splice(m.indexOf(e),1)}},u=[i,o,c],r[0]=i,r[1]=o,r[2]=c,r[3]=l,r[4]=u):(l=r[3],u=r[4]),a(l,u)}function g(e,t){return t==null||!e.container.contains(t)}function _(e){let t=n(3),r=d(),i;return t[0]!==r||t[1]!==e?(i=t=>{e?.(t);let n=m.at(-1);n!=null&&g(n,r)&&t.preventDefault()},t[0]=r,t[1]=e,t[2]=i):i=t[2],i}function v(e){let t=n(3),r=d(),i;return t[0]!==r||t[1]!==e?(i=t=>{let n=m.findLast(e=>t.target instanceof Node&&e.content.contains(t.target)&&g(e,r));n==null?e?.(t):(n.escape(t),t.preventDefault())},t[0]=r,t[1]=e,t[2]=i):i=t[2],i}function y(){let e=m.at(-1);if(e==null)return null;let{ownerDocument:t}=e.content;if(typeof t.elementFromPoint!=`function`)return null;let{clientHeight:n,clientWidth:r}=t.documentElement,i=t.elementFromPoint(r/2,n/2),a=i?.closest(`body > *`);return!(i instanceof HTMLIFrameElement)||a==null||i.closest(`[data-mantle-modal-content], .overlay-prompt`)!=null||m.some(e=>a.contains(e.container))?null:b(a)>=b(e.container)?i:null}function b(e){let{position:t,zIndex:n}=getComputedStyle(e);return t===`static`?NaN:Number.parseInt(n,10)}function x(e){return e instanceof Node&&m.at(-1)?.container.contains(e)?null:y()?.closest(`body > *`)??null}function S(e){let t=e.type===`focusin`?e.target:e.relatedTarget,n=x(t);n!=null&&(n.removeAttribute(`aria-hidden`),t instanceof Node&&n.contains(t)&&e.stopImmediatePropagation())}const C=/* @__PURE__ */ new WeakSet;function w(e){let t=x(e.target);e.target instanceof Node&&t?.contains(e.target)&&C.add(e)}function T(e){C.has(e)&&e.stopImmediatePropagation()}function E(){document.addEventListener(`focusin`,S),document.addEventListener(`focusout`,S),document.addEventListener(`pointerdown`,w,!0),document.addEventListener(`pointerdown`,T)}export{_ as a,h as c,v as i,l as n,f as o,y as r,d as s,p as t};
|
|
@@ -19,7 +19,7 @@ import { ComponentProps } from "react";
|
|
|
19
19
|
declare const LayerContainerContext: import("react").Context<DocumentFragment | Element | null>;
|
|
20
20
|
/**
|
|
21
21
|
* The nearest overlay's layer container, or `null` outside every overlay.
|
|
22
|
-
* Pass the result to a portal's `container` prop
|
|
22
|
+
* Pass the result to a portal's `container` prop; `null` falls back to
|
|
23
23
|
* `document.body`.
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
@@ -36,7 +36,7 @@ declare function useLayerContainer(): Element | DocumentFragment | null;
|
|
|
36
36
|
/**
|
|
37
37
|
* The provider half of {@link LayerContainerContext}: a `div` that registers
|
|
38
38
|
* itself as the layer container for every float composed inside it. An overlay
|
|
39
|
-
* renders it as its positioner
|
|
39
|
+
* renders it as its positioner (the fixed element that lays out its content),
|
|
40
40
|
* so floats portaled into it later land on the content's ancestor chain and
|
|
41
41
|
* paint above the content. The caller passes the positioning classes and the
|
|
42
42
|
* `data-slot`; this component carries none of its own.
|
package/dist/layer-container.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as LayerContainer,n as LayerContainerContext,
|
|
1
|
+
export{t as LayerContainer,n as LayerContainerContext,s as useLayerContainer}from"./layer-container-DL4yclOu.js";
|
package/dist/line-chart.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see https://mantle.ngrok.com/components/charts/line-chart
|
|
5
5
|
*/
|
|
6
|
-
import { _ as CurveKind, a as XAxisPrimitiveProps, c as LegendPrimitiveProps, d as ChartMode, g as ContinuousXScale, h as ChartDatumEvent, i as ReferenceLinePrimitiveProps, l as CopyButtonPrimitiveProps, m as ChartDatum, n as ChartRootBaseProps, o as YAxisPrimitiveProps, r as GridPrimitiveProps, s as ChartListPrimitiveProps, t as TooltipPrimitiveProps, u as ChartAccessibilityProps, v as PointShape, y as SeriesColor } from "./chart-
|
|
6
|
+
import { _ as CurveKind, a as XAxisPrimitiveProps, c as LegendPrimitiveProps, d as ChartMode, g as ContinuousXScale, h as ChartDatumEvent, i as ReferenceLinePrimitiveProps, l as CopyButtonPrimitiveProps, m as ChartDatum, n as ChartRootBaseProps, o as YAxisPrimitiveProps, r as GridPrimitiveProps, s as ChartListPrimitiveProps, t as TooltipPrimitiveProps, u as ChartAccessibilityProps, v as PointShape, y as SeriesColor } from "./chart-Dl8gFo_D.js";
|
|
7
7
|
/**
|
|
8
8
|
* Props for {@link LineChart.List}.
|
|
9
9
|
*/
|
|
@@ -11,7 +11,7 @@ type LineChartListProps = ChartListPrimitiveProps;
|
|
|
11
11
|
/**
|
|
12
12
|
* Props for {@link LineChart.Root}. Lines encode value by vertical position,
|
|
13
13
|
* not length from a baseline, so the full y domain stays overridable via
|
|
14
|
-
* `yDomain
|
|
14
|
+
* `yDomain`. Lines never stack, so there is no `stacked` prop.
|
|
15
15
|
*/
|
|
16
16
|
type LineChartRootProps<TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive"> = Omit<ChartRootBaseProps, "stacked"> & ChartAccessibilityProps<TMode> & {
|
|
17
17
|
/** Rows of data; each `LineChart.Line` reads one numeric key per row. */
|
|
@@ -84,7 +84,7 @@ type LineChartLineProps = {
|
|
|
84
84
|
type LineChartGridProps = GridPrimitiveProps;
|
|
85
85
|
/**
|
|
86
86
|
* Props for {@link LineChart.XAxis}. The tick formatter receives the row's x
|
|
87
|
-
* value
|
|
87
|
+
* value: a `Date` on time scales, a number on linear scales, and the
|
|
88
88
|
* category value on point scales.
|
|
89
89
|
*/
|
|
90
90
|
type LineChartXAxisProps = XAxisPrimitiveProps;
|
|
@@ -172,7 +172,7 @@ type LineChartCopyButtonProps = CopyButtonPrimitiveProps;
|
|
|
172
172
|
*/
|
|
173
173
|
declare const Root: <TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive">(props: LineChartRootProps<TDatum, TMode>) => import("react").JSX.Element;
|
|
174
174
|
/**
|
|
175
|
-
* One line series. Renders nothing itself
|
|
175
|
+
* One line series. Renders nothing itself: it registers the series with the
|
|
176
176
|
* chart, which paints it. Compose one `Line` per series; `null` and
|
|
177
177
|
* missing values render as gaps unless `connectNulls` joins across them.
|
|
178
178
|
*
|
|
@@ -246,8 +246,8 @@ declare const XAxis: (props: LineChartXAxisProps) => null;
|
|
|
246
246
|
*/
|
|
247
247
|
declare const YAxis: (props: LineChartYAxisProps) => null;
|
|
248
248
|
/**
|
|
249
|
-
* A dashed horizontal marker at a y value
|
|
250
|
-
* limit (renderless; the chart paints it).
|
|
249
|
+
* A dashed horizontal marker at a y value, such as an SLO threshold, a budget,
|
|
250
|
+
* or a limit (renderless; the chart paints it).
|
|
251
251
|
*
|
|
252
252
|
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartreferenceline
|
|
253
253
|
*
|
|
@@ -267,7 +267,7 @@ declare const ReferenceLine: (props: LineChartReferenceLineProps) => null;
|
|
|
267
267
|
/**
|
|
268
268
|
* Customizes the hover/keyboard tooltip readout. The tooltip itself is part
|
|
269
269
|
* of `LineChart.Root`'s interaction contract and renders even when this part
|
|
270
|
-
* is absent
|
|
270
|
+
* is absent. Compose it to format the label or values, append a footer, or
|
|
271
271
|
* replace the content entirely via the render-prop `children`.
|
|
272
272
|
*
|
|
273
273
|
* **Structure.** A `children` readout renders inside a
|
|
@@ -300,7 +300,7 @@ declare const ReferenceLine: (props: LineChartReferenceLineProps) => null;
|
|
|
300
300
|
declare const Tooltip: (props: LineChartTooltipProps) => null;
|
|
301
301
|
/**
|
|
302
302
|
* The legend: series names keyed by color swatches, rendered as real DOM in
|
|
303
|
-
* flow below the plot. Always compose it on multi-series charts
|
|
303
|
+
* flow below the plot. Always compose it on multi-series charts: identity
|
|
304
304
|
* must never rely on color-matching alone. It renders nothing for a single
|
|
305
305
|
* series (the chart's title already names it).
|
|
306
306
|
*
|
|
@@ -317,7 +317,7 @@ declare const Tooltip: (props: LineChartTooltipProps) => null;
|
|
|
317
317
|
* | --- | --- | --- |
|
|
318
318
|
* | `data-slot` | `"line-chart-legend"` | The legend list. `LineChart.Legend` renders it in flow below the plot. |
|
|
319
319
|
* | `data-slot` | `"line-chart-legend-label"` | On the `<div>` wrapping a `children` render prop. The default legend has none. |
|
|
320
|
-
* | `data-shape` | `"circle"` \| `"square"` \| `"triangle"` \| `"diamond"` \| `"triangle-down"` \| `"plus"` \| `"cross"` \| `"star"` | On the glyph riding each swatch's stroke, naming what its `LineChart.Line` wears
|
|
320
|
+
* | `data-shape` | `"circle"` \| `"square"` \| `"triangle"` \| `"diamond"` \| `"triangle-down"` \| `"plus"` \| `"cross"` \| `"star"` | On the glyph riding each swatch's stroke, naming what its `LineChart.Line` wears: the `shape` it set, else the circle. The glyph clips itself to that shape, so target this only to restyle a key. |
|
|
321
321
|
*
|
|
322
322
|
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartlegend
|
|
323
323
|
*
|
|
@@ -336,8 +336,8 @@ declare const Tooltip: (props: LineChartTooltipProps) => null;
|
|
|
336
336
|
declare const Legend: (props: LineChartLegendProps) => import("react").JSX.Element;
|
|
337
337
|
/**
|
|
338
338
|
* A button that copies the chart's current data to the clipboard as a
|
|
339
|
-
* markdown table (ISO dates, plain numbers, one column per series)
|
|
340
|
-
*
|
|
339
|
+
* markdown table (ISO dates, plain numbers, one column per series). The table
|
|
340
|
+
* pastes into Slack, issues, docs, spreadsheets, and LLM chats. Renders
|
|
341
341
|
* in flow where composed (alongside `Legend`, below the plot); `Root` is
|
|
342
342
|
* relatively positioned, so `className` can dock it over a corner instead
|
|
343
343
|
* (e.g. `absolute right-0 top-0`).
|
|
@@ -382,7 +382,7 @@ declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").J
|
|
|
382
382
|
*/
|
|
383
383
|
declare const List: (props: LineChartListProps) => import("react").JSX.Element;
|
|
384
384
|
/**
|
|
385
|
-
* A line chart for trends over a continuous x
|
|
385
|
+
* A line chart for trends over a continuous x, time above
|
|
386
386
|
* all. Each series names its own `color`. Interaction ships with `Root`
|
|
387
387
|
* unconditionally: a crosshair snapped to the nearest x with an every-series
|
|
388
388
|
* tooltip, keyboard stepping, aria-live announcements, and an sr-only
|
package/dist/line-chart.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t,c as n,d as r,l as i,n as a,o,s,t as c,u as l}from"./chart-
|
|
1
|
+
"use client";import{_ as e,a as t,c as n,d as r,l as i,n as a,o,s,t as c,u as l}from"./chart-DtgZBAas.js";import{t as u}from"./chart-CChZiCrt.js";import{c as d}from"react/compiler-runtime";import{jsx as f}from"react/jsx-runtime";const p={Root:e=>{let t=d(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ f(c,{kind:`line`,componentName:`LineChart`,slotName:`line-chart`,paintBackend:u,...e}),t[0]=e,t[1]=n),n},Line:e=>s(`LineChart.Line`,`line`,e),Grid:e=>t(`LineChart.Grid`,e),XAxis:e=>n(`LineChart.XAxis`,e),YAxis:e=>i(`LineChart.YAxis`,e),ReferenceLine:e=>o(`LineChart.ReferenceLine`,e),Tooltip:e=>a(`LineChart.Tooltip`,e),Legend:e=>{let t=d(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ f(r,{partName:`LineChart.Legend`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n},CopyButton:t=>{let n=d(2),r;return n[0]===t?r=n[1]:(r=/* @__PURE__ */ f(e,{partName:`LineChart.CopyButton`,slotName:`line-chart`,...t}),n[0]=t,n[1]=r),r},List:e=>{let t=d(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ f(l,{slotName:`line-chart-list`,...e}),t[0]=e,t[1]=n),n}};export{p as LineChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./use-composed-refs-DPYmLDSe.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./interactive-target-BXScNeOr.js";import{t as i}from"./slot-B7rwscwd.js";import{c as a}from"react/compiler-runtime";import{Children as o,createContext as s,isValidElement as c,useContext as l,useEffect as u,useId as d,useRef as f,useState as p}from"react";import m from"tiny-invariant";import{jsx as h}from"react/jsx-runtime";import{useVirtualizer as g}from"@tanstack/react-virtual";const _=s(null);function v(e){let t=l(_);return m(t,`List.${e} must be composed inside List.Root / List.VirtualRoot (or a SelectableList viewport).`),t}const y=s(null),b=s(null);function x(e){return c(e)?e.props.disabled===!0:!1}function S({start:e,step:t,count:n,isItemDisabled:r}){for(let i=e;i>=0&&i<n;i+=t)if(!r(i))return i;return-1}const C=`a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])`;function w(e){let t=e.matches(C)?e:e.querySelector(C);return t instanceof HTMLElement?t:null}function T(e){let t=e instanceof Element?e.closest(`[data-index]`):null;if(t==null)return null;let n=Number(t.getAttribute(`data-index`));return!Number.isInteger(n)||n<0?null:{item:t,index:n}}function E({count:e,isItemDisabled:t,focusItemAt:n}){return{onKeyDown:r=>{if(r.target instanceof HTMLElement&&(r.target.isContentEditable||r.target.tagName===`INPUT`||r.target.tagName===`TEXTAREA`||r.target.tagName===`SELECT`)||r.altKey||r.ctrlKey||r.metaKey)return;let i=T(r.target);if(i==null)return;let a=-1,o=1;switch(r.key){case`ArrowDown`:o=1,a=S({start:i.index+1,step:o,count:e,isItemDisabled:t});break;case`ArrowUp`:o=-1,a=S({start:i.index-1,step:o,count:e,isItemDisabled:t});break;case`Home`:o=1,a=S({start:0,step:o,count:e,isItemDisabled:t});break;case`End`:o=-1,a=S({start:e-1,step:o,count:e,isItemDisabled:t});break;default:return}r.preventDefault(),a>=0&&a!==i.index&&n(a,o)}}}function D(e){let t=a(37),{count:n,enabled:i,isItemDisabled:o,onActivate:s,itemId:c,scrollToIndex:l}=e,[u,d]=p(-1),m=f(!1),h=u>=n?n-1:u;if(u>=n&&d(n-1),!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e={activeIndex:-1,collectionProps:{}},t[0]=e):e=t[0],e}let g;t[1]===o?g=t[2]:(g=e=>o?.(e)??!1,t[1]=o,t[2]=g);let _=g,v;t[3]!==n||t[4]!==_?(v=(e,t)=>S({start:e,step:t,count:n,isItemDisabled:_}),t[3]=n,t[4]=_,t[5]=v):v=t[5];let y=v,b;t[6]===l?b=t[7]:(b=e=>{e<0||(d(e),l(e))},t[6]=l,t[7]=b);let x=b,C;t[8]!==h||t[9]!==c?(C=h>=0?c(h):void 0,t[8]=h,t[9]=c,t[10]=C):C=t[10];let w;t[11]===_?w=t[12]:(w=e=>{let t=T(e.target);t!=null&&!_(t.index)?(d(t.index),m.current=!1):m.current=!0},t[11]=_,t[12]=w);let E;t[13]!==_||t[14]!==s?(E=e=>{if(e.defaultPrevented)return;let t=T(e.target);t==null||_(t.index)||r(e.target,t.item)||(d(t.index),s?.(t.index))},t[13]=_,t[14]=s,t[15]=E):E=t[15];let D;t[16]!==n||t[17]!==y||t[18]!==_?(D=e=>{if(e.target!==e.currentTarget){let t=T(e.target);t!=null&&!_(t.index)&&d(t.index),e.target instanceof HTMLElement&&e.target.tabIndex>=0||e.currentTarget.focus({preventScroll:!0}),m.current=!1;return}let t=m.current;m.current=!1,n>0&&!t&&d(e=>e<0?y(0,1):e)},t[16]=n,t[17]=y,t[18]=_,t[19]=D):D=t[19];let O;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{e.currentTarget.contains(e.relatedTarget)||(d(-1),m.current=!1)},t[20]=O):O=t[20];let k;t[21]!==x||t[22]!==h||t[23]!==n||t[24]!==y||t[25]!==_||t[26]!==s?(k=e=>{if(e.target===e.currentTarget&&!(e.altKey||e.ctrlKey||e.metaKey)){m.current=!1;bb103:switch(e.key){case`ArrowDown`:e.preventDefault(),x(y(h<0?0:h+1,1));break bb103;case`ArrowUp`:e.preventDefault(),x(h<0?y(0,1):y(h-1,-1));break bb103;case`Home`:e.preventDefault(),x(y(0,1));break bb103;case`End`:e.preventDefault(),x(y(n-1,-1));break bb103;case` `:case`Enter`:!e.repeat&&h>=0&&!_(h)&&(e.preventDefault(),s?.(h));break bb103}}},t[21]=x,t[22]=h,t[23]=n,t[24]=y,t[25]=_,t[26]=s,t[27]=k):k=t[27];let A;t[28]!==C||t[29]!==w||t[30]!==E||t[31]!==D||t[32]!==k?(A={tabIndex:0,"aria-activedescendant":C,onMouseDown:w,onClick:E,onFocus:D,onBlur:O,onKeyDown:k},t[28]=C,t[29]=w,t[30]=E,t[31]=D,t[32]=k,t[33]=A):A=t[33];let j;return t[34]!==h||t[35]!==A?(j={activeIndex:h,collectionProps:A},t[34]=h,t[35]=A,t[36]=j):j=t[36],j}function O(e){let t=a(25),{count:n,focusItemAt:r,isItemDisabled:i,onActivate:o,itemId:s,scrollToIndex:c,semantics:l}=e,u=d(),f;t[0]===l?f=t[1]:(f={semantics:l},t[0]=l,t[1]=f);let p=f,m;t[2]!==u||t[3]!==s?(m=s??(e=>`${u}-item-${e}`),t[2]=u,t[3]=s,t[4]=m):m=t[4];let h=m,g=l===`grid`,_;t[5]!==n||t[6]!==i||t[7]!==o||t[8]!==h||t[9]!==c||t[10]!==g?(_={count:n,enabled:g,isItemDisabled:i,onActivate:o,itemId:h,scrollToIndex:c},t[5]=n,t[6]=i,t[7]=o,t[8]=h,t[9]=c,t[10]=g,t[11]=_):_=t[11];let{activeIndex:v,collectionProps:y}=D(_),b=s==null?h:null,x;t[12]!==v||t[13]!==b?(x={activeIndex:v,stampItemId:b},t[12]=v,t[13]=b,t[14]=x):x=t[14];let S=x,C;t[15]!==n||t[16]!==r||t[17]!==y||t[18]!==i||t[19]!==l?(C=l===`list`?E({count:n,isItemDisabled:i,focusItemAt:r}):y,t[15]=n,t[16]=r,t[17]=y,t[18]=i,t[19]=l,t[20]=C):C=t[20];let w=C,T;return t[21]!==w||t[22]!==S||t[23]!==p?(T={collectionProps:w,gridNav:S,listContext:p},t[21]=w,t[22]=S,t[23]=p,t[24]=T):T=t[24],T}function k(e){let r=a(26),{"aria-label":i,"aria-labelledby":o,"aria-multiselectable":s,children:c,className:l,collectionProps:u,gridNav:d,listContext:f,viewportProps:p,ref:m}=e,g,v;r[0]===p?(g=r[1],v=r[2]):({"data-slot":g,...v}=p,r[0]=p,r[1]=g,r[2]=v);let y;r[3]===g?y=r[4]:(y=n(g,`list`),r[3]=g,r[4]=y);let x;r[5]===l?x=r[6]:(x=t(`border-popover bg-popover scrollbar overscroll-none overflow-x-hidden overflow-y-auto rounded-md border p-1`,l),r[5]=l,r[6]=x);let S=f.semantics===`grid`?`grid`:`list`,C;r[7]!==i||r[8]!==o||r[9]!==s||r[10]!==c||r[11]!==u||r[12]!==S?(C=/* @__PURE__ */ h(`div`,{"data-slot":`list-collection`,role:S,"aria-label":i,"aria-labelledby":o,"aria-multiselectable":s,className:`relative flex w-full flex-col gap-px outline-hidden`,...u,children:c}),r[7]=i,r[8]=o,r[9]=s,r[10]=c,r[11]=u,r[12]=S,r[13]=C):C=r[13];let w;r[14]!==m||r[15]!==y||r[16]!==x||r[17]!==C||r[18]!==v?(w=/* @__PURE__ */ h(`div`,{ref:m,"data-slot":y,className:x,...v,children:C}),r[14]=m,r[15]=y,r[16]=x,r[17]=C,r[18]=v,r[19]=w):w=r[19];let T;r[20]!==d||r[21]!==w?(T=/* @__PURE__ */ h(b.Provider,{value:d,children:w}),r[20]=d,r[21]=w,r[22]=T):T=r[22];let E;return r[23]!==f||r[24]!==T?(E=/* @__PURE__ */ h(_.Provider,{value:f,children:T}),r[23]=f,r[24]=T,r[25]=E):E=r[25],E}const A=r=>{let o=a(43),s,c,u,d,f,p,m,g,_;o[0]===r?(s=o[1],c=o[2],u=o[3],d=o[4],f=o[5],p=o[6],m=o[7],g=o[8],_=o[9]):({"data-slot":d,asChild:s,children:c,className:u,disabled:g,ref:p,selected:_,style:m,...f}=r,o[0]=r,o[1]=s,o[2]=c,o[3]=u,o[4]=d,o[5]=f,o[6]=p,o[7]=m,o[8]=g,o[9]=_);let x=g!==void 0&&g,S=_!==void 0&&_,{semantics:C}=v(`Item`),w=l(y),T=l(b),E=C===`grid`,D=s?i:`div`,O=w?.placement??null,k=w?.index,A=E&&T!=null&&k!=null&&T.activeIndex===k,j=O?.measureRef??null,M=e(p,j),N;o[10]===d?N=o[11]:(N=n(d,`list-item`),o[10]=d,o[11]=N);let P;o[12]!==T||o[13]!==k||o[14]!==E||o[15]!==f?(P=E&&k!=null&&T?.stampItemId!=null?T.stampItemId(k):f.id,o[12]=T,o[13]=k,o[14]=E,o[15]=f,o[16]=P):P=o[16];let F=S?`selected`:`unselected`,I=x||void 0,L=A||void 0,R=E?`row`:`listitem`,z=E?S:void 0,B=E&&x?!0:f[`aria-disabled`],V=E?O?.posInSet:void 0,H=E?void 0:O?.posInSet,U=E?void 0:O?.setSize,W=!x&&`hover:bg-active-menu-item hover:data-[state=selected]:bg-active-selected-menu-item`,G=!E&&!x&&`has-focus-visible:bg-active-menu-item has-focus-visible:data-[state=selected]:bg-active-selected-menu-item`,K;o[17]!==u||o[18]!==W||o[19]!==G?(K=t(`rounded-md data-[state=selected]:bg-selected-menu-item data-active:bg-active-menu-item data-active:data-[state=selected]:bg-active-selected-menu-item`,W,G,u),o[17]=u,o[18]=W,o[19]=G,o[20]=K):K=o[20];let q;o[21]!==O||o[22]!==m?(q=O?{...m,...O.style}:m,o[21]=O,o[22]=m,o[23]=q):q=o[23];let J;return o[24]!==D||o[25]!==c||o[26]!==M||o[27]!==k||o[28]!==f||o[29]!==B||o[30]!==V||o[31]!==H||o[32]!==U||o[33]!==K||o[34]!==q||o[35]!==N||o[36]!==P||o[37]!==F||o[38]!==I||o[39]!==L||o[40]!==R||o[41]!==z?(J=/* @__PURE__ */ h(D,{ref:M,"data-slot":N,...f,id:P,"data-index":k,"data-state":F,"data-disabled":I,"data-active":L,role:R,"aria-selected":z,"aria-disabled":B,"aria-rowindex":V,"aria-posinset":H,"aria-setsize":U,className:K,style:q,children:c}),o[24]=D,o[25]=c,o[26]=M,o[27]=k,o[28]=f,o[29]=B,o[30]=V,o[31]=H,o[32]=U,o[33]=K,o[34]=q,o[35]=N,o[36]=P,o[37]=F,o[38]=I,o[39]=L,o[40]=R,o[41]=z,o[42]=J):J=o[42],J};function j(e){let t=a(5),{children:n,index:r}=e,i;t[0]===r?i=t[1]:(i={index:r,placement:null},t[0]=r,t[1]=i);let o=i,s;return t[2]!==n||t[3]!==o?(s=/* @__PURE__ */ h(y.Provider,{value:o,children:n}),t[2]=n,t[3]=o,t[4]=s):s=t[4],s}const M=t=>{let n=a(40),r,i,s,l,u,d,p,m,g,_,v;n[0]===t?(r=n[1],i=n[2],s=n[3],l=n[4],u=n[5],d=n[6],p=n[7],m=n[8],g=n[9],_=n[10],v=n[11]):({"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,children:l,className:u,isItemDisabled:d,onActivate:m,itemId:p,ref:_,semantics:v,...g}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=l,n[5]=u,n[6]=d,n[7]=p,n[8]=m,n[9]=g,n[10]=_,n[11]=v);let y=v===void 0?`list`:v,b=f(null),S=e(b,_),C;n[12]===l?C=n[13]:(C=o.toArray(l).filter(c),n[12]=l,n[13]=C);let T=C,E;n[14]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{b.current?.querySelector(`[data-index="${e}"]`)?.scrollIntoView({block:`nearest`})},n[14]=E):E=n[14];let D=E,A;n[15]===T.length?A=n[16]:(A=(e,t)=>{let n=b.current;if(n!=null)for(let r=e;r>=0&&r<T.length;r+=t){let e=n.querySelector(`[data-index="${r}"]`);if(e==null)continue;let t=w(e);if(t!=null){t.focus({preventScroll:!0}),e.scrollIntoView({block:`nearest`});return}}},n[15]=T.length,n[16]=A);let j=A,M;n[17]!==d||n[18]!==T?(M=d??(e=>x(T[e])),n[17]=d,n[18]=T,n[19]=M):M=n[19];let P;n[20]!==j||n[21]!==T.length||n[22]!==p||n[23]!==m||n[24]!==y||n[25]!==M?(P={count:T.length,focusItemAt:j,isItemDisabled:M,onActivate:m,itemId:p,scrollToIndex:D,semantics:y},n[20]=j,n[21]=T.length,n[22]=p,n[23]=m,n[24]=y,n[25]=M,n[26]=P):P=n[26];let{collectionProps:F,gridNav:I,listContext:L}=O(P),R;n[27]===T?R=n[28]:(R=T.map(N),n[27]=T,n[28]=R);let z;return n[29]!==r||n[30]!==i||n[31]!==s||n[32]!==u||n[33]!==F||n[34]!==S||n[35]!==I||n[36]!==L||n[37]!==g||n[38]!==R?(z=/* @__PURE__ */ h(k,{"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,className:u,collectionProps:F,gridNav:I,listContext:L,viewportProps:g,ref:S,children:R}),n[29]=r,n[30]=i,n[31]=s,n[32]=u,n[33]=F,n[34]=S,n[35]=I,n[36]=L,n[37]=g,n[38]=R,n[39]=z):z=n[39],z};function N(e,t){return/* @__PURE__ */ h(j,{index:t,children:e},e.key??t)}function P({virtualItem:e,count:t,measureRef:n}){return{posInSet:e.index+1,setSize:t,measureRef:n,style:{position:`absolute`,left:0,top:0,width:`100%`,transform:`translateY(${e.start}px)`}}}function F(e){let t=a(10),{children:n,count:r,measureRef:i,virtualItem:o}=e,s=o.index,c;t[0]!==r||t[1]!==i||t[2]!==o?(c=P({virtualItem:o,count:r,measureRef:i}),t[0]=r,t[1]=i,t[2]=o,t[3]=c):c=t[3];let l;t[4]!==c||t[5]!==o.index?(l={index:s,placement:c},t[4]=c,t[5]=o.index,t[6]=l):l=t[6];let u=l,d;return t[7]!==n||t[8]!==u?(d=/* @__PURE__ */ h(y.Provider,{value:u,children:n}),t[7]=n,t[8]=u,t[9]=d):d=t[9],d}function I({count:e,estimateItemHeight:t,getItemKey:n,overscan:r,scrollRef:i}){"use no memo";let a=g({count:e,getScrollElement:()=>i.current,estimateSize:()=>t,getItemKey:n,overscan:r,gap:1,initialRect:{width:0,height:t*(r+1)}});return{virtualItems:a.getVirtualItems(),totalSize:a.getTotalSize(),measureElement:a.measureElement,scrollToIndex:a.scrollToIndex}}const L=t=>{let n=a(68),r,i,s,l,d,p,m,g,_,v,y,b,S;n[0]===t?(r=n[1],i=n[2],s=n[3],l=n[4],d=n[5],p=n[6],m=n[7],g=n[8],_=n[9],v=n[10],y=n[11],b=n[12],S=n[13]):({"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,children:l,className:d,estimateItemHeight:y,isItemDisabled:p,onActivate:g,overscan:b,itemId:m,ref:v,semantics:S,..._}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=l,n[5]=d,n[6]=p,n[7]=m,n[8]=g,n[9]=_,n[10]=v,n[11]=y,n[12]=b,n[13]=S);let C=y===void 0?44:y,T=b===void 0?8:b,E=S===void 0?`list`:S,D=f(null),A=e(D,v),j;n[14]===l?j=n[15]:(j=o.toArray(l).filter(c),n[14]=l,n[15]=j);let M=j,N=M.length,P;n[16]===M?P=n[17]:(P=e=>M[e]?.key??e,n[16]=M,n[17]=P);let L=P,R;n[18]!==N||n[19]!==C||n[20]!==L||n[21]!==T?(R={count:N,estimateItemHeight:C,getItemKey:L,overscan:T,scrollRef:D},n[18]=N,n[19]=C,n[20]=L,n[21]=T,n[22]=R):R=n[22];let{virtualItems:z,totalSize:B,measureElement:V,scrollToIndex:H}=I(R),U;n[23]===H?U=n[24]:(U=e=>H(e,{align:`auto`}),n[23]=H,n[24]=U);let W=U,G=f(null),K,q;n[25]===Symbol.for(`react.memo_cache_sentinel`)?(K=()=>()=>{G.current!=null&&cancelAnimationFrame(G.current)},q=[],n[25]=K,n[26]=q):(K=n[25],q=n[26]),u(K,q);let J;n[27]!==N||n[28]!==W?(J=(e,t)=>{G.current!=null&&(cancelAnimationFrame(G.current),G.current=null);let n=e,r=0,i=()=>{G.current=null;let e=D.current;if(e==null||n<0||n>=N)return;W(n);let a=e.querySelector(`[data-index="${n}"]`);if(a!=null){let e=w(a);if(e!=null){e.focus({preventScroll:!0});return}n+=t,r=0}r+=1,r<10&&(G.current=requestAnimationFrame(i))};i()},n[27]=N,n[28]=W,n[29]=J):J=n[29];let ee=J,Y;n[30]!==p||n[31]!==M?(Y=p??(e=>x(M[e])),n[30]=p,n[31]=M,n[32]=Y):Y=n[32];let X;n[33]!==N||n[34]!==ee||n[35]!==m||n[36]!==g||n[37]!==W||n[38]!==E||n[39]!==Y?(X={count:N,focusItemAt:ee,isItemDisabled:Y,onActivate:g,itemId:m,scrollToIndex:W,semantics:E},n[33]=N,n[34]=ee,n[35]=m,n[36]=g,n[37]=W,n[38]=E,n[39]=Y,n[40]=X):X=n[40];let{collectionProps:te,gridNav:ne,listContext:re}=O(X),ie=z.some(e=>e.index===ne.activeIndex)?te[`aria-activedescendant`]:void 0,ae=E===`grid`?N:void 0,oe=`${B}px`,Z;n[41]===oe?Z=n[42]:(Z={height:oe},n[41]=oe,n[42]=Z);let Q;n[43]!==te||n[44]!==ie||n[45]!==ae||n[46]!==Z?(Q={...te,"aria-activedescendant":ie,"aria-rowcount":ae,style:Z},n[43]=te,n[44]=ie,n[45]=ae,n[46]=Z,n[47]=Q):Q=n[47];let $;if(n[48]!==N||n[49]!==M||n[50]!==V||n[51]!==z){let e;n[53]!==N||n[54]!==M||n[55]!==V?(e=e=>{let t=M[e.index];return t==null?null:/* @__PURE__ */ h(F,{virtualItem:e,count:N,measureRef:V,children:t},e.key)},n[53]=N,n[54]=M,n[55]=V,n[56]=e):e=n[56],$=z.map(e),n[48]=N,n[49]=M,n[50]=V,n[51]=z,n[52]=$}else $=n[52];let se;return n[57]!==r||n[58]!==i||n[59]!==s||n[60]!==d||n[61]!==A||n[62]!==ne||n[63]!==re||n[64]!==_||n[65]!==Q||n[66]!==$?(se=/* @__PURE__ */ h(k,{"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,className:d,collectionProps:Q,gridNav:ne,listContext:re,viewportProps:_,ref:A,children:$}),n[57]=r,n[58]=i,n[59]=s,n[60]=d,n[61]=A,n[62]=ne,n[63]=re,n[64]=_,n[65]=Q,n[66]=$,n[67]=se):se=n[67],se};export{A as n,M as r,L as t};
|