@ngrok/mantle 0.93.7 → 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 +73 -21
- package/dist/accordion.js +1 -1
- package/dist/agent.json +1234 -84
- package/dist/alert-BkJHDx9X.js +1 -0
- package/dist/{alert-BcSBNR3S.d.ts → alert-D0zRRUHV.d.ts} +35 -25
- package/dist/alert-center.d.ts +67 -55
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.d.ts +35 -10
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +6 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-Dc6IgvXV.js +1 -0
- package/dist/anchor.d.ts +17 -5
- package/dist/anchor.js +1 -1
- package/dist/app-layout.d.ts +33 -18
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.d.ts +153 -97
- package/dist/area-chart.js +1 -1
- package/dist/avatar.d.ts +36 -24
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +19 -7
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +155 -100
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.d.ts +47 -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.d.ts +8 -0
- package/dist/browser-only.js +1 -1
- package/dist/{button-BX-4lYUn.d.ts → button-5Pc7Mby_.d.ts} +4 -4
- package/dist/button-B9bChDgl.js +1 -0
- package/dist/button-D8jixIbH.js +1 -0
- package/dist/button-DNLTJ32M.js +1 -0
- package/dist/{button-CPsKGDK0.d.ts → button-Ddj6yr10.d.ts} +34 -27
- package/dist/{button-Yxyu1XMd.d.ts → button-DnYv7IOT.d.ts} +29 -22
- package/dist/button.d.ts +9 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +8 -1
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +7 -2
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +34 -23
- package/dist/centered-layout.js +1 -1
- package/dist/chart-BLCqzt56.js +1 -0
- package/dist/chart-CChZiCrt.js +1 -0
- package/dist/chart-CUmSu9d7.js +1 -0
- package/dist/{chart-BpfbtOUN.d.ts → chart-Dl8gFo_D.d.ts} +117 -121
- package/dist/chart-DtgZBAas.js +2 -0
- package/dist/checkbox-Cu5cgZmk.js +1 -0
- package/dist/checkbox.d.ts +15 -2
- package/dist/checkbox.js +1 -1
- package/dist/choice-CCVG2hb9.js +1 -0
- package/dist/{choice-BLR0_MeB.d.ts → choice-CNiOSzqV.d.ts} +26 -20
- package/dist/choice.d.ts +6 -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 +28 -19
- package/dist/code-block.js +1 -1
- package/dist/code-block_highlight-utils.d.ts +6 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +16 -3
- package/dist/code.js +1 -1
- package/dist/color-CHZbU1Ww.js +1 -0
- package/dist/color.js +1 -1
- package/dist/combobox.d.ts +42 -28
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +59 -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/cx.js +1 -1
- package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
- package/dist/data-table.d.ts +83 -52
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +13 -2
- package/dist/description-list.js +1 -1
- package/dist/{dialog-2fRO4ca4.d.ts → dialog-CIEuwNys.d.ts} +32 -8
- package/dist/dialog-CbEEA0fl.d.ts +32 -0
- package/dist/dialog-DmzoDfY3.js +1 -0
- package/dist/dialog.d.ts +7 -2
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-CpjRwMWe.d.ts → dropdown-menu-CeY498yk.d.ts} +41 -33
- package/dist/dropdown-menu-uheL0prz.js +1 -0
- package/dist/dropdown-menu.d.ts +6 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -2
- package/dist/empty.js +1 -1
- package/dist/field-Bpvn4tQp.js +1 -0
- package/dist/{field-V_gnkcmN.d.ts → field-BshcNVe_.d.ts} +1 -1
- package/dist/field-Cai_4c1l.js +1 -0
- package/dist/field.d.ts +53 -42
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +11 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +35 -10
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +25 -14
- package/dist/hover-card.js +1 -1
- package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
- package/dist/{icon-ByLVhdYq.d.ts → icon-DuIYoyft.d.ts} +8 -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 +8 -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 +13 -1
- package/dist/icons.js +1 -1
- package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
- package/dist/{index-BhfgyurF.d.ts → index-KJ06KK6t.d.ts} +3 -3
- package/dist/input-BjCDSOPA.js +1 -0
- package/dist/{input-Dx5owTCc.d.ts → input-DC4nW0Sr.d.ts} +12 -2
- package/dist/input-fW8QSZEO.js +1 -0
- package/dist/input.d.ts +37 -5
- package/dist/input.js +1 -1
- package/dist/kbd-P1nQshWo.js +1 -0
- package/dist/kbd.d.ts +17 -5
- package/dist/kbd.js +1 -1
- package/dist/label-DO1RlMKl.js +1 -0
- package/dist/{label-Dn5CPJUj.d.ts → label-epgtywRz.d.ts} +14 -8
- package/dist/label.d.ts +6 -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 +147 -90
- package/dist/line-chart.js +1 -1
- package/dist/list-cQZPSjfz.js +1 -0
- package/dist/list.d.ts +34 -16
- package/dist/list.js +1 -1
- package/dist/live-region-Dhapu8a5.js +1 -0
- package/dist/live-region.d.ts +15 -2
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +82 -79
- package/dist/main-CHyWYDak.js +1 -0
- package/dist/main.d.ts +13 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +133 -88
- package/dist/media-object.d.ts +16 -4
- package/dist/media-object.js +1 -1
- package/dist/migrations/0014-chart-named-colors.yml +1389 -0
- package/dist/migrations/0015-segmented-control.yml +788 -0
- package/dist/multi-select.d.ts +42 -29
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +20 -8
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +93 -4
- package/dist/pagination.js +1 -1
- package/dist/{popover-BfB2I9G0.d.ts → popover-Bei0jyfH.d.ts} +87 -12
- package/dist/popover-DhgunktK.js +1 -0
- package/dist/popover-T2EyaqGK.d.ts +1 -0
- package/dist/popover.d.ts +7 -2
- package/dist/popover.js +1 -1
- package/dist/primitive-D8CzV_Ft.js +1 -0
- package/dist/progress.d.ts +28 -11
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +11 -3
- package/dist/qr-code.js +1 -1
- package/dist/query-filter.d.ts +6 -6
- package/dist/query.d.ts +9 -4
- package/dist/query.js +1 -1
- package/dist/radio-group-BJQ6EOqh.d.ts +27 -0
- package/dist/radio-group-BliblUqe.js +1 -0
- package/dist/radio-group-ggEkCi0V.js +1 -0
- package/dist/radio-group.d.ts +21 -100
- package/dist/radio-group.js +1 -1
- package/dist/sandbar.d.ts +43 -30
- package/dist/sandbar.js +1 -1
- package/dist/sandboxed-on-click-D4PL5_GR.js +1 -0
- package/dist/sandboxed-on-click.d.ts +8 -0
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +137 -76
- package/dist/scatter-plot.js +1 -1
- package/dist/segmented-control.d.ts +136 -0
- package/dist/segmented-control.js +1 -0
- package/dist/select-1xuUx_os.js +1 -0
- package/dist/{select-BkhBxtOT.d.ts → select-BpaXHxJm.d.ts} +33 -25
- package/dist/select.d.ts +6 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +29 -18
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-D9AWEkcJ.d.ts → separator-Ck4sPrdN.d.ts} +4 -2
- package/dist/separator-DnvhwY2J.js +1 -0
- package/dist/separator.d.ts +6 -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 +36 -7
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +53 -37
- package/dist/sidebar.js +1 -1
- package/dist/skeleton-DHfyjuQi.js +1 -0
- package/dist/skeleton.d.ts +15 -4
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +12 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +11 -1
- package/dist/slider.js +1 -1
- package/dist/slot-B7rwscwd.js +1 -0
- package/dist/{slot-C0OCJjdJ.d.ts → slot-BEMQMbk3.d.ts} +6 -4
- package/dist/slot.d.ts +6 -1
- package/dist/slot.js +1 -1
- package/dist/source-all.css +5 -1
- package/dist/split-button.d.ts +20 -9
- package/dist/split-button.js +1 -1
- package/dist/strata.d.ts +35 -22
- package/dist/strata.js +1 -1
- package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
- package/dist/switch.d.ts +14 -2
- package/dist/switch.js +1 -1
- package/dist/table-BnLdXUai.js +1 -0
- package/dist/{table-vT6Okwfa.d.ts → table-Ii9hHUWN.d.ts} +84 -5
- package/dist/table.d.ts +6 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +24 -12
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +12 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-BNdZl352.js +1 -0
- package/dist/theme-switcher.d.ts +18 -4
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +25 -11
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +15 -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-NcLIeBy5.d.ts → tooltip-CstGDKwy.d.ts} +18 -11
- package/dist/tooltip-DQO40Mrq.js +1 -0
- package/dist/tooltip.d.ts +6 -1
- package/dist/tooltip.js +1 -1
- package/dist/truncated-text.d.ts +28 -14
- package/dist/truncated-text.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.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 +14 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/well.d.ts +7 -2
- package/dist/well.js +1 -1
- package/package.json +21 -7
- package/src/components/chart/d3-license.md +25 -0
- package/dist/alert-P9lwn25X.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-B8k98Pby.js +0 -1
- package/dist/button-Dge0D5bl.js +0 -1
- package/dist/chart-BpWfQAwf.js +0 -2
- package/dist/checkbox-DmSQXs26.js +0 -1
- package/dist/choice-2Lrv8_nl.js +0 -1
- package/dist/code-DUJzSl4K.js +0 -1
- package/dist/compose-refs-sFdxsL7k.js +0 -1
- package/dist/dialog-7TUgiSzX.js +0 -1
- package/dist/dialog-Dp0QGWwo.d.ts +0 -28
- package/dist/dropdown-menu-BHBzCDSZ.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-CDLz5lpI.js +0 -1
- package/dist/icons-CSwTVV2m.js +0 -1
- package/dist/icons-DP3lQw5O.js +0 -1
- package/dist/input-CpQ6jlpI.js +0 -1
- package/dist/kbd-CLHsJ99p.js +0 -1
- package/dist/label-nHqqYS7e.js +0 -1
- package/dist/layer-container-kEQiE4zV.js +0 -1
- package/dist/list-RFRIQxU2.js +0 -1
- package/dist/live-region-DQ1QLv3L.js +0 -1
- package/dist/main-CC1L9IsH.js +0 -1
- package/dist/popover-C96V8SXi.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/sandboxed-on-click-C7pPu-2M.js +0 -1
- package/dist/select-CAAYk4Yj.js +0 -1
- package/dist/separator-DfzxVutO.js +0 -1
- package/dist/sheet-CSJc_sB4.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-C-glc5Q-.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-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-DceYk1Id.js +0 -1
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
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports for the Line Chart component.
|
|
3
|
+
*
|
|
4
|
+
* @see https://mantle.ngrok.com/components/charts/line-chart
|
|
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-Dl8gFo_D.js";
|
|
7
|
+
/**
|
|
8
|
+
* Props for {@link LineChart.List}.
|
|
9
|
+
*/
|
|
10
|
+
type LineChartListProps = ChartListPrimitiveProps;
|
|
2
11
|
/**
|
|
3
12
|
* Props for {@link LineChart.Root}. Lines encode value by vertical position,
|
|
4
13
|
* not length from a baseline, so the full y domain stays overridable via
|
|
5
|
-
* `yDomain
|
|
14
|
+
* `yDomain`. Lines never stack, so there is no `stacked` prop.
|
|
6
15
|
*/
|
|
7
16
|
type LineChartRootProps<TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive"> = Omit<ChartRootBaseProps, "stacked"> & ChartAccessibilityProps<TMode> & {
|
|
8
17
|
/** Rows of data; each `LineChart.Line` reads one numeric key per row. */
|
|
@@ -31,28 +40,20 @@ type LineChartLineProps = {
|
|
|
31
40
|
/** Display name for the legend, tooltip, and data table. Defaults to `dataKey`. */
|
|
32
41
|
label?: string;
|
|
33
42
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
43
|
+
* The color the series paints: a mantle color name, the same `Color` that
|
|
44
|
+
* `Badge` takes, or any CSS color. Required: name every series' color on
|
|
45
|
+
* purpose. Give an "Other" series `"neutral"`, and a series that means good
|
|
46
|
+
* or bad a functional color such as `"danger"`.
|
|
36
47
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
48
|
+
* A static CSS color (raw hex) cannot follow the two themes, so prefer a
|
|
49
|
+
* `var(--your-token)` declared per theme.
|
|
39
50
|
*
|
|
40
51
|
* @example
|
|
41
52
|
* ```tsx
|
|
42
|
-
* <LineChart.Line dataKey="
|
|
53
|
+
* <LineChart.Line dataKey="p99" label="p99" color="blue" />
|
|
43
54
|
* ```
|
|
44
55
|
*/
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Override the color channel with a chart token or any CSS color. This does
|
|
48
|
-
* not change the series slot or its paired point shape. When omitted, the
|
|
49
|
-
* series paints the color from its slot.
|
|
50
|
-
*
|
|
51
|
-
* A static color (raw hex) cannot follow the two themes, so prefer a
|
|
52
|
-
* `var(--your-token)` declared per theme. A series that carries good/bad
|
|
53
|
-
* meaning should wear the semantic status colors, never a categorical slot.
|
|
54
|
-
*/
|
|
55
|
-
color?: SeriesColor;
|
|
56
|
+
color: SeriesColor;
|
|
56
57
|
/**
|
|
57
58
|
* Interpolation between points: `"linear"` (default), `"monotone"`
|
|
58
59
|
* (smoothed), or `"step"`.
|
|
@@ -69,12 +70,11 @@ type LineChartLineProps = {
|
|
|
69
70
|
*/
|
|
70
71
|
connectNulls?: boolean;
|
|
71
72
|
/**
|
|
72
|
-
* The glyph the hover dot, the
|
|
73
|
+
* The glyph the hover dot, the painted point markers, and the legend key
|
|
73
74
|
* wear: `"circle"`, `"square"`, `"triangle"`, `"diamond"`,
|
|
74
75
|
* `"triangle-down"`, `"plus"`, `"cross"`, or `"star"`. Shape is a redundant
|
|
75
76
|
* encoding alongside color that keeps series distinguishable without color
|
|
76
|
-
* vision.
|
|
77
|
-
* slot, so both channels name one slot.
|
|
77
|
+
* vision. Defaults to `"circle"`.
|
|
78
78
|
*/
|
|
79
79
|
shape?: PointShape;
|
|
80
80
|
};
|
|
@@ -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;
|
|
@@ -109,16 +109,16 @@ type LineChartLegendProps = LegendPrimitiveProps;
|
|
|
109
109
|
*/
|
|
110
110
|
type LineChartCopyButtonProps = CopyButtonPrimitiveProps;
|
|
111
111
|
/**
|
|
112
|
-
* The root of a line chart: owns the data, the scales, the
|
|
112
|
+
* The root of a line chart: owns the data, the scales, the renderer,
|
|
113
113
|
* and the entire interaction contract (a crosshair snapped to the nearest x
|
|
114
114
|
* with a tooltip reading every series, keyboard stepping with polite
|
|
115
115
|
* announcements, an sr-only description, an sr-only data table, Enter/Space +
|
|
116
|
-
* click activation). Rendering
|
|
116
|
+
* click activation). Rendering decimates to min/max per pixel column, so series
|
|
117
117
|
* of 100k+ points stay smooth. Compose the chrome and series parts as
|
|
118
118
|
* children.
|
|
119
119
|
*
|
|
120
120
|
* A Root mounts dormant: a shell of the plot, the named overlay, and its
|
|
121
|
-
* sr-only description. It builds its
|
|
121
|
+
* sr-only description. It builds its paint surface and its engine
|
|
122
122
|
* once it comes within one viewport of the visible area, takes focus, or
|
|
123
123
|
* prints (on-screen charts first, a few milliseconds at a time), and it mounts
|
|
124
124
|
* the sr-only data table once focus lands inside it. A list of charts pays
|
|
@@ -126,14 +126,16 @@ type LineChartCopyButtonProps = CopyButtonPrimitiveProps;
|
|
|
126
126
|
* tables until a reader asks for one.
|
|
127
127
|
*
|
|
128
128
|
* The Root's own subtree is addressable by slot: `line-chart` on the wrapper,
|
|
129
|
-
* then `line-chart-plot`, `line-chart-
|
|
129
|
+
* then `line-chart-plot`, `line-chart-svg`,
|
|
130
|
+
* `line-chart-crosshair`,
|
|
130
131
|
* `line-chart-hover-band`, `line-chart-markers`, `line-chart-tooltip`,
|
|
131
132
|
* `line-chart-description`, and, once focus lands inside the chart,
|
|
132
133
|
* `line-chart-data-table`. A line chart shows the crosshair and one marker
|
|
133
|
-
* dot per series, and never the band. The
|
|
134
|
-
* engine-owned: absent from server HTML and from a dormant chart
|
|
135
|
-
*
|
|
136
|
-
*
|
|
134
|
+
* dot per series, and never the band. The surface and the three layers are
|
|
135
|
+
* engine-owned: absent from server HTML and from a dormant chart. The surface arrives at activation (near the viewport, on
|
|
136
|
+
* focus, or before print), and the layers arrive on the first hover or
|
|
137
|
+
* keyboard step. A static or
|
|
138
|
+
* decorative chart inserts the surface alone. The tooltip
|
|
137
139
|
* surface mounts on the first hover or keyboard step and stays.
|
|
138
140
|
* Each hover dot carries `chart-active-point` plus a `data-shape` of
|
|
139
141
|
* `"circle"`, `"square"`, `"triangle"`, `"diamond"`, `"triangle-down"`,
|
|
@@ -161,8 +163,8 @@ type LineChartCopyButtonProps = CopyButtonPrimitiveProps;
|
|
|
161
163
|
* <LineChart.Grid />
|
|
162
164
|
* <LineChart.XAxis />
|
|
163
165
|
* <LineChart.YAxis />
|
|
164
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
165
|
-
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
|
|
166
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
167
|
+
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
|
|
166
168
|
* <LineChart.Tooltip />
|
|
167
169
|
* <LineChart.Legend />
|
|
168
170
|
* </LineChart.Root>
|
|
@@ -170,8 +172,8 @@ type LineChartCopyButtonProps = CopyButtonPrimitiveProps;
|
|
|
170
172
|
*/
|
|
171
173
|
declare const Root: <TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive">(props: LineChartRootProps<TDatum, TMode>) => import("react").JSX.Element;
|
|
172
174
|
/**
|
|
173
|
-
* One line series. Renders nothing itself
|
|
174
|
-
* chart, which paints it
|
|
175
|
+
* One line series. Renders nothing itself: it registers the series with the
|
|
176
|
+
* chart, which paints it. Compose one `Line` per series; `null` and
|
|
175
177
|
* missing values render as gaps unless `connectNulls` joins across them.
|
|
176
178
|
*
|
|
177
179
|
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartline
|
|
@@ -182,16 +184,16 @@ declare const Root: <TDatum extends ChartDatum = ChartDatum, TMode extends Chart
|
|
|
182
184
|
* <LineChart.Grid />
|
|
183
185
|
* <LineChart.XAxis />
|
|
184
186
|
* <LineChart.YAxis />
|
|
185
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
186
|
-
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
|
|
187
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
188
|
+
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
|
|
187
189
|
* <LineChart.Legend />
|
|
188
190
|
* </LineChart.Root>
|
|
189
191
|
* ```
|
|
190
192
|
*/
|
|
191
193
|
declare const Line: (props: LineChartLineProps) => null;
|
|
192
194
|
/**
|
|
193
|
-
* Horizontal hairline gridlines behind the lines (renderless;
|
|
194
|
-
*
|
|
195
|
+
* Horizontal hairline gridlines behind the lines (renderless; the chart
|
|
196
|
+
* paints it). Omit the part to omit the grid.
|
|
195
197
|
*
|
|
196
198
|
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartgrid
|
|
197
199
|
*
|
|
@@ -201,14 +203,14 @@ declare const Line: (props: LineChartLineProps) => null;
|
|
|
201
203
|
* <LineChart.Grid />
|
|
202
204
|
* <LineChart.XAxis />
|
|
203
205
|
* <LineChart.YAxis />
|
|
204
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
206
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
205
207
|
* <LineChart.Legend />
|
|
206
208
|
* </LineChart.Root>
|
|
207
209
|
* ```
|
|
208
210
|
*/
|
|
209
211
|
declare const Grid: (props: LineChartGridProps) => null;
|
|
210
212
|
/**
|
|
211
|
-
* Tick labels along the bottom of the plot (renderless;
|
|
213
|
+
* Tick labels along the bottom of the plot (renderless; the chart paints it).
|
|
212
214
|
* Labels that would collide are skipped, never rotated.
|
|
213
215
|
*
|
|
214
216
|
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartxaxis
|
|
@@ -219,15 +221,15 @@ declare const Grid: (props: LineChartGridProps) => null;
|
|
|
219
221
|
* <LineChart.Grid />
|
|
220
222
|
* <LineChart.XAxis tickFormat={(time) => (time instanceof Date ? time.toLocaleTimeString() : String(time))} />
|
|
221
223
|
* <LineChart.YAxis />
|
|
222
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
224
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
223
225
|
* <LineChart.Legend />
|
|
224
226
|
* </LineChart.Root>
|
|
225
227
|
* ```
|
|
226
228
|
*/
|
|
227
229
|
declare const XAxis: (props: LineChartXAxisProps) => null;
|
|
228
230
|
/**
|
|
229
|
-
* Value tick labels along the left of the plot (renderless;
|
|
230
|
-
*
|
|
231
|
+
* Value tick labels along the left of the plot (renderless; the chart
|
|
232
|
+
* paints it). Ticks land on clean thousands-separated numbers.
|
|
231
233
|
*
|
|
232
234
|
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartyaxis
|
|
233
235
|
*
|
|
@@ -237,15 +239,15 @@ declare const XAxis: (props: LineChartXAxisProps) => null;
|
|
|
237
239
|
* <LineChart.Grid />
|
|
238
240
|
* <LineChart.XAxis />
|
|
239
241
|
* <LineChart.YAxis tickFormat={(value) => `${value}ms`} />
|
|
240
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
242
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
241
243
|
* <LineChart.Legend />
|
|
242
244
|
* </LineChart.Root>
|
|
243
245
|
* ```
|
|
244
246
|
*/
|
|
245
247
|
declare const YAxis: (props: LineChartYAxisProps) => null;
|
|
246
248
|
/**
|
|
247
|
-
* A dashed horizontal marker at a y value
|
|
248
|
-
* limit (renderless;
|
|
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).
|
|
249
251
|
*
|
|
250
252
|
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartreferenceline
|
|
251
253
|
*
|
|
@@ -255,7 +257,7 @@ declare const YAxis: (props: LineChartYAxisProps) => null;
|
|
|
255
257
|
* <LineChart.Grid />
|
|
256
258
|
* <LineChart.XAxis />
|
|
257
259
|
* <LineChart.YAxis />
|
|
258
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
260
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
259
261
|
* <LineChart.ReferenceLine y={500} label="SLO" />
|
|
260
262
|
* <LineChart.Legend />
|
|
261
263
|
* </LineChart.Root>
|
|
@@ -265,7 +267,7 @@ declare const ReferenceLine: (props: LineChartReferenceLineProps) => null;
|
|
|
265
267
|
/**
|
|
266
268
|
* Customizes the hover/keyboard tooltip readout. The tooltip itself is part
|
|
267
269
|
* of `LineChart.Root`'s interaction contract and renders even when this part
|
|
268
|
-
* is absent
|
|
270
|
+
* is absent. Compose it to format the label or values, append a footer, or
|
|
269
271
|
* replace the content entirely via the render-prop `children`.
|
|
270
272
|
*
|
|
271
273
|
* **Structure.** A `children` readout renders inside a
|
|
@@ -289,7 +291,7 @@ declare const ReferenceLine: (props: LineChartReferenceLineProps) => null;
|
|
|
289
291
|
* <LineChart.Grid />
|
|
290
292
|
* <LineChart.XAxis />
|
|
291
293
|
* <LineChart.YAxis />
|
|
292
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
294
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
293
295
|
* <LineChart.Tooltip valueFormat={(value) => `${value}ms`} footer="Click to view logs" />
|
|
294
296
|
* <LineChart.Legend />
|
|
295
297
|
* </LineChart.Root>
|
|
@@ -298,7 +300,7 @@ declare const ReferenceLine: (props: LineChartReferenceLineProps) => null;
|
|
|
298
300
|
declare const Tooltip: (props: LineChartTooltipProps) => null;
|
|
299
301
|
/**
|
|
300
302
|
* The legend: series names keyed by color swatches, rendered as real DOM in
|
|
301
|
-
* flow below the plot. Always compose it on multi-series charts
|
|
303
|
+
* flow below the plot. Always compose it on multi-series charts: identity
|
|
302
304
|
* must never rely on color-matching alone. It renders nothing for a single
|
|
303
305
|
* series (the chart's title already names it).
|
|
304
306
|
*
|
|
@@ -315,7 +317,7 @@ declare const Tooltip: (props: LineChartTooltipProps) => null;
|
|
|
315
317
|
* | --- | --- | --- |
|
|
316
318
|
* | `data-slot` | `"line-chart-legend"` | The legend list. `LineChart.Legend` renders it in flow below the plot. |
|
|
317
319
|
* | `data-slot` | `"line-chart-legend-label"` | On the `<div>` wrapping a `children` render prop. The default legend has none. |
|
|
318
|
-
* | `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. |
|
|
319
321
|
*
|
|
320
322
|
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartlegend
|
|
321
323
|
*
|
|
@@ -325,8 +327,8 @@ declare const Tooltip: (props: LineChartTooltipProps) => null;
|
|
|
325
327
|
* <LineChart.Grid />
|
|
326
328
|
* <LineChart.XAxis />
|
|
327
329
|
* <LineChart.YAxis />
|
|
328
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
329
|
-
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
|
|
330
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
331
|
+
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
|
|
330
332
|
* <LineChart.Legend />
|
|
331
333
|
* </LineChart.Root>
|
|
332
334
|
* ```
|
|
@@ -334,8 +336,8 @@ declare const Tooltip: (props: LineChartTooltipProps) => null;
|
|
|
334
336
|
declare const Legend: (props: LineChartLegendProps) => import("react").JSX.Element;
|
|
335
337
|
/**
|
|
336
338
|
* A button that copies the chart's current data to the clipboard as a
|
|
337
|
-
* markdown table (ISO dates, plain numbers, one column per series)
|
|
338
|
-
*
|
|
339
|
+
* markdown table (ISO dates, plain numbers, one column per series). The table
|
|
340
|
+
* pastes into Slack, issues, docs, spreadsheets, and LLM chats. Renders
|
|
339
341
|
* in flow where composed (alongside `Legend`, below the plot); `Root` is
|
|
340
342
|
* relatively positioned, so `className` can dock it over a corner instead
|
|
341
343
|
* (e.g. `absolute right-0 top-0`).
|
|
@@ -345,8 +347,8 @@ declare const Legend: (props: LineChartLegendProps) => import("react").JSX.Eleme
|
|
|
345
347
|
* @example
|
|
346
348
|
* ```tsx
|
|
347
349
|
* <LineChart.Root data={data} xKey="time" aria-label="Request latency">
|
|
348
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
349
|
-
* <LineChart.Line dataKey="p99" label="p99" />
|
|
350
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
351
|
+
* <LineChart.Line dataKey="p99" label="p99" color="emerald" />
|
|
350
352
|
* <LineChart.Legend />
|
|
351
353
|
* <LineChart.CopyButton />
|
|
352
354
|
* </LineChart.Root>
|
|
@@ -354,13 +356,37 @@ declare const Legend: (props: LineChartLegendProps) => import("react").JSX.Eleme
|
|
|
354
356
|
*/
|
|
355
357
|
declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").JSX.Element;
|
|
356
358
|
/**
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
*
|
|
359
|
+
* Groups a list of charts, such as one chart per card, so they share one
|
|
360
|
+
* `role="status"` live region. A page of 100 charts mounts one region instead
|
|
361
|
+
* of one per chart, plus one for each `LineChart.CopyButton`. Each chart keeps
|
|
362
|
+
* its own tooltip, description, and data table.
|
|
363
|
+
*
|
|
364
|
+
* Renders a `div` (`line-chart-list`) that holds the charts in a `display: contents`
|
|
365
|
+
* wrapper (`line-chart-list-items`), so a grid or flex layout on the List reaches
|
|
366
|
+
* the cards, and the live region as its last child. No `asChild`: a list
|
|
367
|
+
* element such as `ul` cannot hold the live region as a child.
|
|
368
|
+
*
|
|
369
|
+
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartlist
|
|
370
|
+
*
|
|
371
|
+
* @example
|
|
372
|
+
* ```tsx
|
|
373
|
+
* <LineChart.List>
|
|
374
|
+
* {agents.map((agent) => (
|
|
375
|
+
* <LineChart.Root key={agent.id} data={agent.rows} xKey="time" aria-label={agent.name}>
|
|
376
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
377
|
+
* <LineChart.Tooltip />
|
|
378
|
+
* </LineChart.Root>
|
|
379
|
+
* ))}
|
|
380
|
+
* </LineChart.List>
|
|
381
|
+
* ```
|
|
382
|
+
*/
|
|
383
|
+
declare const List: (props: LineChartListProps) => import("react").JSX.Element;
|
|
384
|
+
/**
|
|
385
|
+
* A line chart for trends over a continuous x, time above
|
|
386
|
+
* all. Each series names its own `color`. Interaction ships with `Root`
|
|
361
387
|
* unconditionally: a crosshair snapped to the nearest x with an every-series
|
|
362
388
|
* tooltip, keyboard stepping, aria-live announcements, and an sr-only
|
|
363
|
-
* description. A Root paints and allocates its
|
|
389
|
+
* description. A Root paints and allocates its surface once it comes within
|
|
364
390
|
* one viewport of the visible area or takes focus, and it mounts its sr-only
|
|
365
391
|
* data table once focus lands inside it. Min/max decimation keeps 100k+ point
|
|
366
392
|
* series smooth.
|
|
@@ -369,16 +395,23 @@ declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").J
|
|
|
369
395
|
*
|
|
370
396
|
* | CSS Variable | Default | Description |
|
|
371
397
|
* | --- | --- | --- |
|
|
372
|
-
* | `--color-chart
|
|
373
|
-
* | `--color-chart-other` | `--color-neutral-500` | The neutral overflow slot a series wears once every slot is held. |
|
|
398
|
+
* | `--color-chart-<name>` | per theme | The color a series with `color="<name>"` paints. Every mantle color name has one: the 600 step of its hue in light mode, and the 500 step in dark mode. Most names reach 3:1 contrast on the card surface, and the docs page lists the names that do not. |
|
|
374
399
|
*
|
|
375
400
|
* Two ways to change a series color, both public API. The `color` prop on
|
|
376
|
-
* `LineChart.Line`
|
|
377
|
-
* redeclare its token on `Root
|
|
378
|
-
* `className="[--color-chart-
|
|
379
|
-
*
|
|
401
|
+
* `LineChart.Line` takes a color name or any CSS color. To restyle a color name for one chart,
|
|
402
|
+
* redeclare its token on `Root`:
|
|
403
|
+
* `className="[--color-chart-blue:var(--color-brand)]"`. Every token resolves in
|
|
404
|
+
* `Root`'s own cascade, so a declaration scoped there wins for
|
|
380
405
|
* that chart and leaves every other chart on the page alone.
|
|
381
406
|
*
|
|
407
|
+
* @useWhen Show how one or more values trend across an ordered x axis, such as time, including
|
|
408
|
+
* long series with many points.
|
|
409
|
+
*
|
|
410
|
+
* @siblings
|
|
411
|
+
* - `AreaChart`: the chart shows a volume, or a total and its parts, as filled areas.
|
|
412
|
+
* - `BarChart`: the reader compares values across categories by bar length from zero.
|
|
413
|
+
* - `ScatterPlot`: the points show how two measures correlate, and their order does not matter.
|
|
414
|
+
*
|
|
382
415
|
* @see https://mantle.ngrok.com/components/charts/line-chart
|
|
383
416
|
*
|
|
384
417
|
* @example
|
|
@@ -395,6 +428,12 @@ declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").J
|
|
|
395
428
|
* └── LineChart.CopyButton
|
|
396
429
|
* ```
|
|
397
430
|
*
|
|
431
|
+
* A List groups Roots:
|
|
432
|
+
* ```
|
|
433
|
+
* LineChart.List
|
|
434
|
+
* └── LineChart.Root (one per chart)
|
|
435
|
+
* ```
|
|
436
|
+
*
|
|
398
437
|
* @example
|
|
399
438
|
* ```tsx
|
|
400
439
|
* const data = [
|
|
@@ -407,8 +446,8 @@ declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").J
|
|
|
407
446
|
* <LineChart.Grid />
|
|
408
447
|
* <LineChart.XAxis />
|
|
409
448
|
* <LineChart.YAxis />
|
|
410
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
411
|
-
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
|
|
449
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
450
|
+
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
|
|
412
451
|
* <LineChart.Tooltip />
|
|
413
452
|
* <LineChart.Legend />
|
|
414
453
|
* </LineChart.Root>
|
|
@@ -416,7 +455,7 @@ declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").J
|
|
|
416
455
|
*/
|
|
417
456
|
declare const LineChart: {
|
|
418
457
|
/**
|
|
419
|
-
* The root of a line chart: owns the data, the scales, the
|
|
458
|
+
* The root of a line chart: owns the data, the scales, the renderer,
|
|
420
459
|
* and the entire interaction contract.
|
|
421
460
|
*
|
|
422
461
|
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartroot
|
|
@@ -427,8 +466,8 @@ declare const LineChart: {
|
|
|
427
466
|
* <LineChart.Grid />
|
|
428
467
|
* <LineChart.XAxis />
|
|
429
468
|
* <LineChart.YAxis />
|
|
430
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
431
|
-
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
|
|
469
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
470
|
+
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
|
|
432
471
|
* <LineChart.Tooltip />
|
|
433
472
|
* <LineChart.Legend />
|
|
434
473
|
* </LineChart.Root>
|
|
@@ -436,7 +475,7 @@ declare const LineChart: {
|
|
|
436
475
|
*/
|
|
437
476
|
readonly Root: typeof Root;
|
|
438
477
|
/**
|
|
439
|
-
* One line series; registers with the chart
|
|
478
|
+
* One line series; registers with the chart, which paints it.
|
|
440
479
|
*
|
|
441
480
|
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartline
|
|
442
481
|
*
|
|
@@ -446,8 +485,8 @@ declare const LineChart: {
|
|
|
446
485
|
* <LineChart.Grid />
|
|
447
486
|
* <LineChart.XAxis />
|
|
448
487
|
* <LineChart.YAxis />
|
|
449
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
450
|
-
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
|
|
488
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
489
|
+
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
|
|
451
490
|
* <LineChart.Tooltip />
|
|
452
491
|
* <LineChart.Legend />
|
|
453
492
|
* </LineChart.Root>
|
|
@@ -465,8 +504,8 @@ declare const LineChart: {
|
|
|
465
504
|
* <LineChart.Grid />
|
|
466
505
|
* <LineChart.XAxis />
|
|
467
506
|
* <LineChart.YAxis />
|
|
468
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
469
|
-
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
|
|
507
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
508
|
+
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
|
|
470
509
|
* <LineChart.Tooltip />
|
|
471
510
|
* <LineChart.Legend />
|
|
472
511
|
* </LineChart.Root>
|
|
@@ -484,8 +523,8 @@ declare const LineChart: {
|
|
|
484
523
|
* <LineChart.Grid />
|
|
485
524
|
* <LineChart.XAxis tickFormat={(time) => (time instanceof Date ? time.toLocaleTimeString() : String(time))} />
|
|
486
525
|
* <LineChart.YAxis />
|
|
487
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
488
|
-
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
|
|
526
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
527
|
+
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
|
|
489
528
|
* <LineChart.Tooltip />
|
|
490
529
|
* <LineChart.Legend />
|
|
491
530
|
* </LineChart.Root>
|
|
@@ -503,8 +542,8 @@ declare const LineChart: {
|
|
|
503
542
|
* <LineChart.Grid />
|
|
504
543
|
* <LineChart.XAxis />
|
|
505
544
|
* <LineChart.YAxis tickFormat={(value) => `${value}ms`} />
|
|
506
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
507
|
-
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
|
|
545
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
546
|
+
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
|
|
508
547
|
* <LineChart.Tooltip />
|
|
509
548
|
* <LineChart.Legend />
|
|
510
549
|
* </LineChart.Root>
|
|
@@ -522,7 +561,7 @@ declare const LineChart: {
|
|
|
522
561
|
* <LineChart.Grid />
|
|
523
562
|
* <LineChart.XAxis />
|
|
524
563
|
* <LineChart.YAxis />
|
|
525
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
564
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
526
565
|
* <LineChart.ReferenceLine y={500} label="SLO" />
|
|
527
566
|
* <LineChart.Tooltip />
|
|
528
567
|
* <LineChart.Legend />
|
|
@@ -541,8 +580,8 @@ declare const LineChart: {
|
|
|
541
580
|
* <LineChart.Grid />
|
|
542
581
|
* <LineChart.XAxis />
|
|
543
582
|
* <LineChart.YAxis />
|
|
544
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
545
|
-
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
|
|
583
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
584
|
+
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
|
|
546
585
|
* <LineChart.Tooltip valueFormat={(value) => `${value}ms`} />
|
|
547
586
|
* <LineChart.Legend />
|
|
548
587
|
* </LineChart.Root>
|
|
@@ -561,8 +600,8 @@ declare const LineChart: {
|
|
|
561
600
|
* <LineChart.Grid />
|
|
562
601
|
* <LineChart.XAxis />
|
|
563
602
|
* <LineChart.YAxis />
|
|
564
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
565
|
-
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
|
|
603
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
604
|
+
* <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
|
|
566
605
|
* <LineChart.Tooltip />
|
|
567
606
|
* <LineChart.Legend />
|
|
568
607
|
* </LineChart.Root>
|
|
@@ -577,13 +616,31 @@ declare const LineChart: {
|
|
|
577
616
|
* @example
|
|
578
617
|
* ```tsx
|
|
579
618
|
* <LineChart.Root data={data} xKey="time" aria-label="Request latency">
|
|
580
|
-
* <LineChart.Line dataKey="p50" label="p50" />
|
|
581
|
-
* <LineChart.Line dataKey="p99" label="p99" />
|
|
619
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
620
|
+
* <LineChart.Line dataKey="p99" label="p99" color="emerald" />
|
|
582
621
|
* <LineChart.Legend />
|
|
583
622
|
* <LineChart.CopyButton />
|
|
584
623
|
* </LineChart.Root>
|
|
585
624
|
* ```
|
|
586
625
|
*/
|
|
587
626
|
readonly CopyButton: typeof CopyButton;
|
|
627
|
+
/**
|
|
628
|
+
* Groups a list of charts so they share one live region.
|
|
629
|
+
*
|
|
630
|
+
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartlist
|
|
631
|
+
*
|
|
632
|
+
* @example
|
|
633
|
+
* ```tsx
|
|
634
|
+
* <LineChart.List>
|
|
635
|
+
* {agents.map((agent) => (
|
|
636
|
+
* <LineChart.Root key={agent.id} data={agent.rows} xKey="time" aria-label={agent.name}>
|
|
637
|
+
* <LineChart.Line dataKey="p50" label="p50" color="blue" />
|
|
638
|
+
* <LineChart.Tooltip />
|
|
639
|
+
* </LineChart.Root>
|
|
640
|
+
* ))}
|
|
641
|
+
* </LineChart.List>
|
|
642
|
+
* ```
|
|
643
|
+
*/
|
|
644
|
+
readonly List: typeof List;
|
|
588
645
|
};
|
|
589
|
-
export { type ChartDatumEvent, type ChartMode, LineChart, type LineChartCopyButtonProps, type LineChartGridProps, type LineChartLegendProps, type LineChartLineProps, type LineChartReferenceLineProps, type LineChartRootProps, type LineChartTooltipProps, type LineChartXAxisProps, type LineChartYAxisProps };
|
|
646
|
+
export { type ChartDatumEvent, type ChartMode, LineChart, type LineChartCopyButtonProps, type LineChartGridProps, type LineChartLegendProps, type LineChartLineProps, type LineChartListProps, type LineChartReferenceLineProps, type LineChartRootProps, type LineChartTooltipProps, type LineChartXAxisProps, type LineChartYAxisProps };
|
package/dist/line-chart.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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};
|