efficient-shell 15.2.0 → 15.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/{Browser-42QAXKYW.js → Browser-SJKIWRIF.js} +19 -19
- package/dist/Calculator-NS2NGCHN.js +29 -0
- package/dist/{CurrencyConverter-VFTDSYQ3.js → CurrencyConverter-ES5SWCOZ.js} +9 -9
- package/dist/{Files-OAVWF6EW.js → Files-KM3OX5LC.js} +76 -76
- package/dist/{Notepad-LNNSVEFG.js → Notepad-VZ2Y3NAY.js} +9 -9
- package/dist/PdfViewer-AIAVQYZ6.js +1 -0
- package/dist/PomodoroTimer-BRSRBMEG.js +91 -0
- package/dist/{Preview-GDNUQKGN.js → Preview-YWS265UV.js} +24 -24
- package/dist/Sidebar-KAALEIIX.js +44 -0
- package/dist/{Stock-NNDDNQBJ.js → Stock-GMWRXTKR.js} +2 -2
- package/dist/{Weather-NGQALCXO.js → Weather-QSQ2TZKG.js} +17 -17
- package/dist/{WorldClock-LX4BQPZJ.js → WorldClock-YPP2KHIV.js} +7 -7
- package/dist/ai/index.js +42 -42
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/FlowChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/{chunk-ZC2FZLYX.js → chunk-345FP3IX.js} +4 -4
- package/dist/chunk-35Q7ZMQD.js +8 -0
- package/dist/{chunk-ZYWLX5EK.js → chunk-3AVXNZY5.js} +1 -1
- package/dist/chunk-3FININUU.js +1 -0
- package/dist/chunk-3H476JWK.js +4 -0
- package/dist/{chunk-TWSROAS7.js → chunk-4MDSZSLC.js} +1 -1
- package/dist/{chunk-DXTRHNP4.js → chunk-4NTAZLT3.js} +2 -2
- package/dist/{chunk-TVMDDQJP.js → chunk-52RSW6TO.js} +1 -1
- package/dist/{chunk-26I3OTGP.js → chunk-5B7CLXHC.js} +1 -1
- package/dist/{chunk-MDGM5NUO.js → chunk-5CGGHE2O.js} +9 -9
- package/dist/{chunk-SXNT73VT.js → chunk-5LB7LCEG.js} +19 -19
- package/dist/{chunk-CMC25URA.js → chunk-5LG6TOV6.js} +6 -6
- package/dist/{chunk-IIUFCTT6.js → chunk-5OXQ5M5S.js} +1 -1
- package/dist/{chunk-AVUH35GW.js → chunk-5QHNDAZ6.js} +1 -1
- package/dist/{chunk-52YTUQW3.js → chunk-5QRHQCRG.js} +1 -1
- package/dist/{chunk-T43ATI2N.js → chunk-5RCKE4X2.js} +6 -6
- package/dist/{chunk-LFGJUJRZ.js → chunk-5Y2JZL3I.js} +13 -13
- package/dist/{chunk-QIAJ3QNV.js → chunk-62UNBUTU.js} +1 -1
- package/dist/{chunk-NBV3XK3Q.js → chunk-7533CPNQ.js} +3 -3
- package/dist/{chunk-HBAATSUS.js → chunk-75NYUMNV.js} +1 -1
- package/dist/{chunk-BMZL5BHA.js → chunk-A3RD7AQ2.js} +1 -1
- package/dist/chunk-A4ROXNUF.js +2 -0
- package/dist/{chunk-2QUACZ6O.js → chunk-A7GOVTCI.js} +1 -1
- package/dist/{chunk-PAD65HG7.js → chunk-ABIWAS5K.js} +1 -1
- package/dist/{chunk-3TVMQCYR.js → chunk-AKEED2BC.js} +1 -1
- package/dist/chunk-APFDZ2HG.js +1 -0
- package/dist/{chunk-S3F2TY7X.js → chunk-ASNRA3ZL.js} +1 -1
- package/dist/chunk-B36ZROD7.js +8 -0
- package/dist/{chunk-QI2LJ7OL.js → chunk-B4Y5NGHR.js} +9 -9
- package/dist/{chunk-ZZKBCNK6.js → chunk-BTMZ5MUY.js} +11 -11
- package/dist/{chunk-NXPIX7NO.js → chunk-C75ICYHF.js} +1 -1
- package/dist/{chunk-JJ5W4BRW.js → chunk-CGX2IGQO.js} +1 -1
- package/dist/{chunk-HKXP3JJ5.js → chunk-CHWZGSYG.js} +1 -1
- package/dist/{chunk-2MUZFHZW.js → chunk-CIZAUBWA.js} +6 -6
- package/dist/{chunk-5JQCWXIQ.js → chunk-CMEPDSYB.js} +1 -1
- package/dist/{chunk-JHEHW5BE.js → chunk-D7MRZZVV.js} +3 -3
- package/dist/chunk-DEV3ZHPP.js +8 -0
- package/dist/chunk-DVKOVZJ2.js +13 -0
- package/dist/{chunk-7ZJ7VK2N.js → chunk-EJ5NIA42.js} +1 -1
- package/dist/{chunk-M5JEYZ3A.js → chunk-EJMCK7E3.js} +4 -4
- package/dist/{chunk-GBCLIWUQ.js → chunk-EULBBS5L.js} +1 -1
- package/dist/{chunk-7FYTL6SD.js → chunk-FAPZFMS3.js} +1 -1
- package/dist/chunk-FGP2IOFN.js +15 -0
- package/dist/{chunk-ABRCV7DQ.js → chunk-FHTL7ZZR.js} +1 -1
- package/dist/{chunk-JVITCC65.js → chunk-GGLS6JZ3.js} +1 -1
- package/dist/{chunk-KWBYE5MN.js → chunk-GGNQEZ2D.js} +8 -8
- package/dist/chunk-GML6FVPA.js +6 -0
- package/dist/{chunk-VQ3OSYTA.js → chunk-GUOAPXUY.js} +4 -4
- package/dist/{chunk-IJWRJPX6.js → chunk-HU5FTTW2.js} +7 -7
- package/dist/{chunk-SKPAIZSC.js → chunk-INQQUAIO.js} +4 -4
- package/dist/{chunk-ZQWKVLSY.js → chunk-JGN27L4Q.js} +12 -12
- package/dist/{chunk-BN37AISA.js → chunk-JIHDUZJZ.js} +3 -3
- package/dist/chunk-JRKD7SD3.js +24 -0
- package/dist/{chunk-FYHUCRLU.js → chunk-JWS77LQE.js} +1 -1
- package/dist/{chunk-6F3XQJR6.js → chunk-KERCZSIA.js} +1 -1
- package/dist/{chunk-ECZEJ6BE.js → chunk-KIIZNION.js} +6 -6
- package/dist/{chunk-L664TIIV.js → chunk-KJ4CHRRC.js} +7 -7
- package/dist/{chunk-HMTZP7NJ.js → chunk-KTI4ZJVX.js} +1 -1
- package/dist/{chunk-VIBGF2HJ.js → chunk-L2WQOJ3T.js} +1 -1
- package/dist/{chunk-3CIJFWB4.js → chunk-LFUXWZV7.js} +1 -1
- package/dist/{chunk-OCKOZV46.js → chunk-LGVVXYW7.js} +1 -1
- package/dist/{chunk-ZS36DB4X.js → chunk-MF7OELXP.js} +2 -2
- package/dist/{chunk-OCITNQGF.js → chunk-MQNSKFZY.js} +10 -10
- package/dist/{chunk-M6ODRWTM.js → chunk-NJY4HPNB.js} +5 -5
- package/dist/{chunk-QBR73AJX.js → chunk-OEWBWKKD.js} +11 -11
- package/dist/chunk-OHPDB4UN.js +14 -0
- package/dist/{chunk-LKNDLXL3.js → chunk-OHWP24DL.js} +1 -1
- package/dist/{chunk-VNKLIWNQ.js → chunk-OK2J6WSC.js} +1 -1
- package/dist/{chunk-3HPCQMYH.js → chunk-P56YLT73.js} +12 -12
- package/dist/{chunk-VTYALYW4.js → chunk-PCNFY6EK.js} +12 -12
- package/dist/{chunk-FM5ASDVN.js → chunk-PM6HY5BH.js} +1 -1
- package/dist/{chunk-ABAUJLI4.js → chunk-PO2KNVCC.js} +1 -1
- package/dist/chunk-PRN2QDX6.js +7 -0
- package/dist/{chunk-7M7GKYHS.js → chunk-QE2F4YQQ.js} +9 -9
- package/dist/chunk-QGWUZAG7.js +28 -0
- package/dist/{chunk-QJY52ZHG.js → chunk-QSFQTMWV.js} +1 -1
- package/dist/{chunk-YVI2XJCB.js → chunk-QSOBETAI.js} +5 -5
- package/dist/chunk-QXEZBS3H.js +6 -0
- package/dist/{chunk-32HTOZFT.js → chunk-QYOIS4BN.js} +3 -3
- package/dist/chunk-R6YVKP6D.js +3 -0
- package/dist/chunk-R72SBGYR.js +9 -0
- package/dist/{chunk-QMUW35QL.js → chunk-RIA6KKIB.js} +6 -6
- package/dist/{chunk-D3L2QCGF.js → chunk-RTZFWH5U.js} +1 -1
- package/dist/{chunk-HVWRF7N4.js → chunk-S6C7X6CR.js} +19 -19
- package/dist/{chunk-7T6NWAPG.js → chunk-SJUEGYT2.js} +1 -1
- package/dist/chunk-T5TKMIV2.js +1 -0
- package/dist/{chunk-JE4BGFDJ.js → chunk-TAB3K2WF.js} +1 -1
- package/dist/{chunk-4H4HJIWI.js → chunk-TAIH2VIW.js} +1 -1
- package/dist/{chunk-NTVACRKD.js → chunk-TALQMTCE.js} +3 -3
- package/dist/{chunk-KKZXGWSX.js → chunk-TEYG2W7A.js} +2 -2
- package/dist/{chunk-FZZBBZXZ.js → chunk-TMXMIRWG.js} +8 -8
- package/dist/{chunk-J43RRDEP.js → chunk-TSZPGDU3.js} +1 -1
- package/dist/{chunk-T65TAQLW.js → chunk-TXGVSWH6.js} +13 -13
- package/dist/{chunk-UA7SWROJ.js → chunk-U7PA4KNZ.js} +3 -3
- package/dist/{chunk-2M3KB4RH.js → chunk-UYM7562M.js} +2 -2
- package/dist/{chunk-JFTLFF52.js → chunk-V62FEHS4.js} +3 -3
- package/dist/{chunk-QQ6TGD7K.js → chunk-VANF2TL3.js} +47 -47
- package/dist/{chunk-PYGXSGXC.js → chunk-VB4ZPIZF.js} +1 -1
- package/dist/{chunk-K3OLOLFT.js → chunk-VHBRVW5O.js} +3 -3
- package/dist/chunk-W7HTHKN2.js +19 -0
- package/dist/{chunk-5R25GNE2.js → chunk-WNHDYTTI.js} +2 -2
- package/dist/{chunk-WHHHECBC.js → chunk-WSQ73CRR.js} +2 -2
- package/dist/{chunk-M4NT6HGJ.js → chunk-YEDAXZYO.js} +1 -1
- package/dist/{chunk-ILH7RDAD.js → chunk-YGNJIOOH.js} +10 -10
- package/dist/{chunk-C5Q4AKXO.js → chunk-YXMXATYP.js} +1 -1
- package/dist/{chunk-OEZC5N6J.js → chunk-ZVKUOJNS.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ListToolbar.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/data/statusColumn.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/SearchInput.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.d.ts +6 -5
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/UnitMenu.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +381 -381
- package/dist/map/index.js +5 -5
- package/dist/optionItems-Cxd85rTy.d.ts +26 -0
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/FloatingBar.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/Popover.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/SearchableSelect.d.ts +3 -9
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +0 -1
- package/dist/value-index.json +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-C7APPCLE.js +0 -29
- package/dist/PdfViewer-ADPTYOAO.js +0 -1
- package/dist/PomodoroTimer-AGSHX2JO.js +0 -91
- package/dist/Sidebar-SWLVNJ6L.js +0 -44
- package/dist/chunk-7QFXUNFA.js +0 -8
- package/dist/chunk-7YJBWOQG.js +0 -2
- package/dist/chunk-CIT4YPEO.js +0 -8
- package/dist/chunk-DTZDOXK3.js +0 -19
- package/dist/chunk-EQDYCSUX.js +0 -13
- package/dist/chunk-IBPJJO4N.js +0 -28
- package/dist/chunk-K5YT5PMJ.js +0 -5
- package/dist/chunk-M6T7N4SN.js +0 -14
- package/dist/chunk-MQERW3QR.js +0 -3
- package/dist/chunk-NJJG2VAW.js +0 -24
- package/dist/chunk-QVGASI5H.js +0 -9
- package/dist/chunk-QZYV4TDD.js +0 -1
- package/dist/chunk-S6IW2F4J.js +0 -8
- package/dist/chunk-TB7BO2XS.js +0 -6
- package/dist/chunk-UMLXFQVC.js +0 -1
- package/dist/chunk-XQMVECQM.js +0 -15
- package/dist/chunk-YX4QGW7Z.js +0 -4
- package/dist/chunk-Z2MP46QJ.js +0 -1
- package/dist/chunk-ZUQ72WER.js +0 -7
- /package/dist/{chunk-LPQQNPH5.js → chunk-TEQ5ZPAL.js} +0 -0
package/dist/chunk-M6T7N4SN.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{SearchableSelect as e}from"./chunk-EQDYCSUX.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-DTZDOXK3.js";import{isSafeLinkHref as t}from"./chunk-Z5TE3MEG.js";import{Input_default as r}from"./chunk-JHEHW5BE.js";import{INPUT_SIZES as n}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-7YJBWOQG.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-NRHG4R2Q.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:n,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:O,className:j="",tidyAddress:F,addressAddon:E}=t,D=void 0!==t.onApply,$=u().link,T=y.isSafe??k,z=d(),A=c(null),Y=c(null),[Q,R]=p({url:n}),S=D?Q.url:n,[U,W]=p(!1),[B,H]=p(null),[K,P]=p(null),[G,M]=p(!1),X=c(null),Z=c(()=>{});Z.current=D?t.onCancel:()=>{},m(()=>{if(D)return s(e=>{const a=A.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(Z.current(),!0)},()=>A.current)},[D]),m(()=>{if(!D)return;const e=Y.current;e?(e.focus(),e.select()):A.current?.querySelector("button, input")?.focus()},[]);const J=o??[{value:b,label:$.address,target:{type:"text"}}],L=B&&B.against===S?B.kind:y.kindOf(S),V=J.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===L),q=V.find(e=>"text"===e.target.type),I=V.find(e=>e.value===L)??q??V[0];if(!I)return null;const _="text"!==I.target.type,ee=_?y.targetOf(S):S,ae=h(I.target),le=ae.find(e=>e.value===ee),te=e=>({value:e,label:$.unavailable(e)}),re="select"===I.target.type&&ee&&w?w(ee):null,ne=re?y.readFilter(S):null,ie=ne?re?.find(e=>e.param===ne.param):void 0,oe=K&&K.against===S?K.text:S,se=_?S:F?F(oe.trim()).trim():oe.trim(),ue=D&&F?se:oe,de=!_&&""!==ue.trim()&&!T(ue),ce=de&&(!D||U);_&&G&&M(!1);const pe=(e,a)=>{D?R({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},me=(e,a)=>{H(a=>a?{...a,against:e}:a),pe(e,a)},fe=e=>{if(!e)return me("");const a=ae.find(a=>a.value===e);me(e,a?.label)},ve=e=>{W(!1);const a=e.trim();a?T(e)?(P({text:e,against:a}),me(a)):P({text:e,against:S}):(P({text:e,against:""}),me(""))},ge=e=>{const a=e.relatedTarget;if(a&&(a===Y.current||X.current?.contains(a)))return;if(M(!1),D||!F||C)return;const l=F(oe.trim());l.trim()!==oe.trim()&&ve(l)},he=()=>{if(!D||!se)return;if(!_&&de)return void W(!0);const e=_&&Q.url===se?Q.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},be=(e,a)=>a&&!e.some(e=>e.value===a)?[te(a),...e]:[...e],xe=(a,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=r.some(e=>""===e.value);/* @__PURE__ */
|
|
2
|
-
return f(e,{"aria-label":a,value:t,options:o,disabled:C,clearable:l,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
|
|
3
|
-
return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:n})};let ke;if("text"===I.target.type)ke=/* @__PURE__ */f(r,{ref:Y,id:`${z}-address`,size:"sm",type:"text",invalid:ce,"aria-label":$.address,"aria-describedby":ce?`${z}-why`:void 0,placeholder:O??$.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:oe,readOnly:C,onChange:e=>ve(e.target.value),onFocus:()=>M(!0),onBlur:ge,onKeyDown:F&&!D?e=>{"Enter"===e.key&&e.currentTarget.blur()}:void 0});else{const e="groups"===I.target.type?I.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):I.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:I.target.placeholder},...be(e,ee)];ke=xe(I.label,ee,a,fe,e.length>10)}const ye=/* @__PURE__ */v(g,{children:[o&&xe($.linkType,I.value,V.map(e=>({value:e.value,label:e.label})),e=>{P(null),W(!1);const a=V.find(a=>a.value===e);if(!a||"text"===a.target.type)return void H({kind:e,against:S});const l=h(a.target)[0];H({kind:e,against:l?l.value:""}),l?pe(l.value,l.label):pe("")},!1),ke,E&&G&&!C&&"text"===I.target.type&&/* @__PURE__ */f("div",{ref:X,onBlur:ge,children:E({url:oe,onChange:ve})}),re&&xe($.filter,ne?.param??"",[{value:"",label:$.noFilter},...ne&&!ie?[te(ne.param)]:[],...re.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return me(ee,le?.label);const a=re?.find(a=>a.param===e),l=a?.values[0];l&&me(y.withFilter(ee,{param:e,value:l.value}),l.label)},!1),re&&ne&&xe($.value,ne.value,be((ie?.values??[]).map(e=>({value:e.value,label:e.label})),ne.value),e=>{if(!ne)return;const a=ie?.values.find(a=>a.value===e);me(y.withFilter(ee,{param:ne.param,value:e}),a?.label)},(ie?.values.length??0)>10),ce&&/* @__PURE__ */f("p",{id:`${z}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:$.unsafe}),I.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:I.hint}),re&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:$.filterHint})]});if(!D)/* @__PURE__ */
|
|
4
|
-
return f("div",{ref:A,className:`flex min-w-0 flex-auto flex-col gap-2 ${j}`.trim(),role:N?"group":void 0,"aria-label":N,children:ye});const we=t.onRemove;/* @__PURE__ */
|
|
5
|
-
return v("div",{ref:A,role:"dialog","aria-label":N??$.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${j}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),he())},children:[_?/* @__PURE__ */f("span",{className:a({inline:!0}),children:$.title}):/* @__PURE__ */f("label",{htmlFor:`${z}-address`,className:a({inline:!0}),children:$.title}),ye,
|
|
6
|
-
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[we?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:we,children:$.remove}):null,
|
|
7
|
-
/* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
|
|
8
|
-
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>Z.current(),children:$.cancel}),
|
|
9
|
-
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:he,disabled:C||""===se,children:$.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,N]=p(!1),C=c(null),O=d(),j=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
|
|
10
|
-
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
|
-
/* @__PURE__ */f(r,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
|
|
12
|
-
/* @__PURE__ */v("button",{ref:C,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?O:void 0,disabled:b,onClick:()=>N(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${n.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
|
|
13
|
-
/* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(t?"text-blue-600":"text-ink-faintest")}),
|
|
14
|
-
/* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:O,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),j()},onRemove:t?()=>{i(""),j()}:void 0,onCancel:j})})]})}export{y as LinkPicker,w as TextLinkField};
|
package/dist/chunk-MQERW3QR.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{DropdownMenu as e}from"./chunk-M6ODRWTM.js";import{Button_default as i}from"./chunk-7YJBWOQG.js";import{Icon as n}from"./chunk-ISVODSRP.js";import{Tooltip as r}from"./chunk-2MUZFHZW.js";import{iconButtonClasses as a}from"./chunk-UQYNPYF4.js";import{forwardRef as l,useId as o}from"react";import{jsxs as s,jsx as t}from"react/jsx-runtime";var d="relative focus-visible:z-10",m={secondary:"border-l-0",primary:"border-l border-white/30",warning:"border-l border-white/30"},c=l(function({children:l,onClick:c,type:b="button",items:h,menuLabel:u,variant:f="primary",size:p="md",loading:v=!1,leftIcon:k,disabled:g=!1,disabledReason:N,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:W,menuFooterLabel:C,align:M="end",side:O="bottom",menuMinWidth:R,linkAs:z,block:D=!1,className:F=""},I){const L=g&&(null!=N&&""!==N&&!1!==N)&&!v,Y=x&&null!=j&&""!==j&&!1!==j,$=o(),A=/* @__PURE__ */t(i,{ref:I,type:b,variant:f,size:p,loading:v,leftIcon:k,block:D,disabled:g&&!L,"aria-disabled":!!L||void 0,disabledReason:L?N:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),B=D?"relative flex min-w-0 flex-1":"relative inline-flex",P=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
|
|
2
|
-
return s("div",{className:[D?"flex w-full":"inline-flex","items-stretch",F].filter(Boolean).join(" "),children:[null==w||""===w||L?A:/* @__PURE__ */t(r,{content:w,className:B,children:A}),
|
|
3
|
-
/* @__PURE__ */t(r,{content:Y?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":Y?$:void 0,items:h,align:M,side:O,minWidth:R,linkAs:z,disabled:x&&!Y,"aria-disabled":Y,onOpenChange:y,footer:W,footerLabel:C,triggerClassName:a({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(n,{name:"chevron-down",className:P,strokeWidth:2,"aria-hidden":"true"})})}),Y&&/* @__PURE__ */t("span",{id:$,className:"sr-only",children:j})]})});export{c as SplitButton_default};
|
package/dist/chunk-NJJG2VAW.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{Dialog as e}from"./chunk-T43ATI2N.js";import{Icon as r}from"./chunk-ISVODSRP.js";import{HEADING_TEXT as n}from"./chunk-BWJZTHZ6.js";import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{useShellStrings as o,splitAround as l}from"./chunk-NRHG4R2Q.js";import{createContext as i,useContext as s,useState as c,useRef as a,useCallback as u,useEffect as d}from"react";import{jsxs as m,jsx as h,Fragment as f}from"react/jsx-runtime";var p=i(()=>Promise.resolve(!1)),g=()=>s(p),b=()=>Promise.resolve(!1),v=e=>b(e),y=()=>Promise.resolve(!1),x=e=>y(e),N=()=>Promise.resolve(null),k=e=>N(e),w={danger:{icon:"text-red-600 bg-red-100",button:t({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:t({variant:"warning"})},info:{icon:"text-blue-600 bg-accent-tint-strong",button:t({variant:"primary"})}},C=t({variant:"secondary"}),P=t({variant:"primary"}),L="w-full rounded-md border border-line-strong h-8 px-3 text-sm";function j(){/* @__PURE__ */
|
|
2
|
-
return h(r,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function T({children:r}){const[t,i]=c(!1),[s,g]=c({message:""}),[v,x]=c(0),k=a(),T=a(null),F=a(0),E=a([]),$=a(null),D=a(null),R=u(e=>{T.current=e.id,k.current=e.resolve,x(e.id),g(e.options),i(!0)},[]),W=u(e=>{const r="string"==typeof e?{message:e}:e;return new Promise(e=>{const n={id:++F.current,options:r,resolve:e};null===T.current?R(n):E.current.push(n)})},[R]),[H,I]=c(!1),[K,Q]=c({message:""}),[S,V]=c(""),Y=a(),Z=u(e=>(Q(e),V(""),I(!0),new Promise(e=>{Y.current=e})),[]),[A,B]=c(!1),[G,J]=c({}),[O,U]=c(""),q=a(),z=u(e=>{const r="string"==typeof e?{message:e}:e;return J(r),U(r.defaultValue??""),B(!0),new Promise(e=>{q.current=e})},[]);d(()=>{b=W,y=Z,N=z},[W,Z,z]);const M=(e,r)=>{if(T.current!==e)return;const n=k.current,t=E.current.shift();t?R(t):(T.current=null,k.current=void 0,i(!1)),n?.(r)},X=e=>{I(!1),V(""),Y.current?.(e)},_=e=>{if(e){const e=O.trim();if(!e&&!G.allowEmpty)return B(!1),void q.current?.(null);B(!1),q.current?.(e)}else B(!1),q.current?.(null)},ee=s.variant||(s.confirmLabel?.toLowerCase().includes("delete")||s.message.toLowerCase().includes("delete")?"danger":"info"),re=w[ee],ne=w["warning"===K.variant?"warning":"danger"],te=K.confirmWord,oe=null==te||S===te,le=o().dialog,[ie,se]=l(le.typeToConfirm);/* @__PURE__ */
|
|
3
|
-
return m(p.Provider,{value:W,children:[r,
|
|
4
|
-
/* @__PURE__ */h(e,{open:t,onClose:()=>M(v,!1),initialFocus:$,footer:/* @__PURE__ */m(f,{children:[
|
|
5
|
-
/* @__PURE__ */h("button",{ref:$,type:"button",onClick:()=>M(v,!1),className:C,children:s.cancelLabel||le.cancel}),
|
|
6
|
-
/* @__PURE__ */h("button",{type:"button",onClick:()=>M(v,!0),className:re.button,children:s.confirmLabel||le.ok})]}),children:/* @__PURE__ */m("div",{className:"flex gap-4",children:[
|
|
7
|
-
/* @__PURE__ */h("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */h(j,{})}),
|
|
8
|
-
/* @__PURE__ */m("div",{className:"flex-1",children:[
|
|
9
|
-
/* @__PURE__ */h("h2",{className:n,children:s.title||le.confirmTitle}),
|
|
10
|
-
/* @__PURE__ */h("p",{className:"mt-2 text-sm text-gray-600",children:s.message})]})]})}),
|
|
11
|
-
/* @__PURE__ */h(e,{open:H,onClose:()=>X(!1),initialFocus:null!=te?void 0:D,footer:/* @__PURE__ */m(f,{children:[
|
|
12
|
-
/* @__PURE__ */h("button",{ref:D,type:"button",onClick:()=>X(!1),className:C,children:K.cancelLabel||le.destructiveCancel}),
|
|
13
|
-
/* @__PURE__ */h("button",{type:"button",onClick:()=>X(!0),disabled:!oe,className:ne.button,children:te??K.confirmLabel??le.destructiveConfirm})]}),children:/* @__PURE__ */m("div",{className:"flex gap-4",children:[
|
|
14
|
-
/* @__PURE__ */h("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${ne.icon}`,children:/* @__PURE__ */h(j,{})}),
|
|
15
|
-
/* @__PURE__ */m("div",{className:"flex-1",children:[
|
|
16
|
-
/* @__PURE__ */h("h2",{className:`${n} pr-6`,children:K.title||le.destructiveTitle}),
|
|
17
|
-
/* @__PURE__ */h("p",{className:"mt-2 text-sm text-gray-600",children:K.message}),null!=te&&/* @__PURE__ */m(f,{children:[
|
|
18
|
-
/* @__PURE__ */m("p",{className:"mt-3 text-sm text-gray-700",children:[ie,
|
|
19
|
-
/* @__PURE__ */h("kbd",{className:"rounded border border-line-strong bg-surface-sunken px-2 py-0.5 text-xs font-bold text-red-600 font-mono",children:te}),se]}),
|
|
20
|
-
/* @__PURE__ */h("input",{autoFocus:!0,type:"text",value:S,onChange:e=>V(e.target.value),onKeyDown:e=>{"Enter"===e.key&&S===te&&X(!0)},placeholder:te,className:`mt-2 ${L} focus:border-red-500`})]})]})]})}),
|
|
21
|
-
/* @__PURE__ */m(e,{open:A,onClose:()=>_(!1),title:G.title||le.promptTitle,footer:/* @__PURE__ */m(f,{children:[
|
|
22
|
-
/* @__PURE__ */h("button",{type:"button",onClick:()=>_(!1),className:C,children:G.cancelLabel||le.cancel}),
|
|
23
|
-
/* @__PURE__ */h("button",{type:"button",onClick:()=>_(!0),disabled:!G.allowEmpty&&!O.trim(),className:P,children:G.confirmLabel||le.ok})]}),children:[G.message&&/* @__PURE__ */h("p",{className:"text-sm text-gray-600",children:G.message}),
|
|
24
|
-
/* @__PURE__ */h("input",{autoFocus:!0,type:"text",value:O,onChange:e=>U(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:G.placeholder,className:`mt-3 ${L} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{T as ConfirmProvider,v as confirm,x as confirmDestructive,k as prompt,g as useConfirm};
|
package/dist/chunk-QVGASI5H.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-D3L2QCGF.js";import{bumpPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as n}from"./chunk-CNYAHYE6.js";import{ChartTooltip as o}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as l,CHART_INK as r}from"./chunk-TZFACUMR.js";import{usePlotWidth as a}from"./chunk-MAFUXCPZ.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-NRHG4R2Q.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as m}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function f({nodes:f,links:k,height:p=320,width:x,nodeWidth:g=14,nodePadding:y=12,formatValue:v,className:M,emptyLabel:w}){const b=i().charts,j=s(),N=v??(e=>h(e,j)),$=w??b.noFlows,F=c(null),C=a(F),E=x??C,[Q,A]=m(null),{highlighted:R}=n();if(0===f.length||0===k.length)/* @__PURE__ */
|
|
2
|
-
return d("div",{className:M,ref:F,children:/* @__PURE__ */d("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const z=[...new Set(f.map(e=>e.depth))].sort((e,t)=>e-t),H=e=>z.length<=1?0:z.indexOf(e)/(z.length-1)*(E-g-140)+70,L=new Map(f.map(e=>{const t=k.filter(t=>t.from===e.key).reduce((e,t)=>e+t.value,0),n=k.filter(t=>t.to===e.key).reduce((e,t)=>e+t.value,0);return[e.key,Math.max(t,n,e.value??0)]})),O=/* @__PURE__ */new Map;for(const e of f)O.set(e.depth,[...O.get(e.depth)??[],e]);const U=Math.max(...[...O.values()].map(e=>e.reduce((e,t)=>e+(L.get(t.key)??0),0))),V=p-20,W=U>0?(V-y*(Math.max(...[...O.values()].map(e=>e.length))-1))/U:0,D=/* @__PURE__ */new Map;for(const[e,t]of O){const n=t.map(e=>Math.max(2,(L.get(e.key)??0)*W)),o=n.reduce((e,t)=>e+t,0)+y*(t.length-1),l=n.reduce((e,t)=>e+Math.max(0,t-2),0),r=o>V&&l>0?Math.max(0,1-(o-V)/l):1;let a=10;t.forEach((t,o)=>{const l=2+Math.max(0,n[o]-2)*r;D.set(t.key,{x:H(e),y:a,h:l,index:o}),a+=l+y})}const G=/* @__PURE__ */new Map,P=/* @__PURE__ */new Map,S=/* @__PURE__ */new Map,T=(e,t)=>e.from===t||e.to===t,Y="link"===Q?.kind?k[Q.index]:void 0,Z="node"===Q?.kind?f.find(e=>e.key===Q.key):void 0;/* @__PURE__ */
|
|
3
|
-
return u("div",{className:`relative ${M??""}`,ref:F,children:[
|
|
4
|
-
/* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${E} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>A(null),children:[k.map((e,n)=>{const o=D.get(e.from),r=D.get(e.to);if(!o||!r)return null;const a=Math.max(1,e.value*W),i=o.y+(G.get(e.from)??0)+a/2,s=r.y+(P.get(e.to)??0)+a/2;G.set(e.from,(G.get(e.from)??0)+a),P.set(e.to,(P.get(e.to)??0)+a);const h=o.x+g,c=r.x,m=l(o.index,e.color),u=`${e.from}→${e.to}`,f=S.get(u)??0;S.set(u,f+1);const k=((e,t)=>Q?"link"===Q.kind?Q.index===t:T(e,Q.key):null!==R?T(e,R):null)(e,n);/* @__PURE__ */
|
|
5
|
-
return d("path",{d:t([[h,i],[c,s]]),fill:"none",stroke:m,strokeWidth:a,strokeOpacity:null===k||k?.42:.12,onMouseEnter:()=>A({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=D.get(e.key);if(!t)return null;const n=t.x>E/2,o=(a=e.key,Q?"node"===Q.kind?Q.key===a:T(k[Q.index],a):null!==R?R===a:null);var a;/* @__PURE__ */
|
|
6
|
-
return u("g",{opacity:null===o||o?1:.45,onMouseEnter:()=>A({kind:"node",key:e.key}),children:[
|
|
7
|
-
/* @__PURE__ */d("rect",{x:t.x,y:t.y,width:g,height:t.h,rx:2,fill:l(t.index,e.color,e.tone)}),
|
|
8
|
-
/* @__PURE__ */d("text",{x:n?t.x-8:t.x+g+8,y:t.y+t.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:r.label,children:e.label})]},e.key)})]}),Y&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:`${Y.from} → ${Y.to}`,rows:[{key:"value",label:b.flow,color:l(D.get(Y.from)?.index??0,Y.color),value:N(Y.value)}]})}),Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:Z.label,rows:[{key:"value",label:b.throughput,color:l(D.get(Z.key)?.index??0,Z.color,Z.tone),value:N(L.get(Z.key)??0)}]})}),
|
|
9
|
-
/* @__PURE__ */d(e,{caption:b.sankey(f.length,k.length),head:[b.tableFrom,b.tableTo,b.value],rows:k.map(e=>[e.from,e.to,N(e.value)])})]})}export{f as SankeyChart};
|
package/dist/chunk-QZYV4TDD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isAriaDisabled as e,swallowPress as r,describedByWith as i,OffWithReason as a}from"./chunk-J43RRDEP.js";import{useRowControlSize as s}from"./chunk-UMLXFQVC.js";import{iconButtonClasses as d}from"./chunk-UQYNPYF4.js";import{forwardRef as o,useId as n}from"react";import{jsx as t}from"react/jsx-runtime";var c=o(function({children:o,variant:c="ghost",size:l="md",type:m="button",className:p="",pressed:b,disabledReason:u,ink:f,disabled:h,onClick:k,"aria-disabled":v,"aria-describedby":j,...y},N){const C=s(l)??"md",R=n(),x=(Boolean(h)||e(v))&&null!=u&&""!==u,z=x||e(v),F=/* @__PURE__ */t("button",{ref:N,type:m,className:d({variant:c,size:C,pressed:b??(!0===y["aria-pressed"]||"true"===y["aria-pressed"]),ink:f,className:p}),...y,disabled:x?void 0:h,"aria-disabled":!!z||v,"aria-describedby":i(j,x?R:void 0),onClick:z?r:k,children:o});return x?/* @__PURE__ */t(a,{reason:u,id:R,children:F}):F});export{c as IconButton_default};
|
package/dist/chunk-S6IW2F4J.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{useOverlayTarget as e,usePopupAnchor as i,usePopupLevel as r,usePopupLevelBindings as t,windowScrimStyle as o,OverlayLayerProvider as n,scrimHasCorners as l,popupLayerStyle as a}from"./chunk-CJ4OEY3T.js";import{CloseButton as d}from"./chunk-AVUH35GW.js";import{useDiscardGuard as s}from"./chunk-LPQQNPH5.js";import{dialogA11y as c}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as m}from"./chunk-DBQNYJZ6.js";import{useFocusTrap as p,useScrollLock as u}from"./chunk-DWGYC7OD.js";import{HEADING_TEXT as h,DESCRIPTION_TEXT as f,PANEL_SURFACE as b}from"./chunk-BWJZTHZ6.js";import{createShellPortal as v}from"./chunk-52YTUQW3.js";import{useHydrated as y}from"./chunk-KEFNQEXZ.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{useRef as k,useId as N,useState as j,useEffect as w}from"react";import{jsxs as g,Fragment as C,jsx as W}from"react/jsx-runtime";function Q({open:Q,onClose:H,side:U="bottom",title:Y,description:Z,footer:B,children:D,blocking:E=!1,dirty:T=!1,initialFocus:$,"aria-label":G,"aria-labelledby":J,"aria-describedby":V,className:A=""}){const F=k(null),O=N(),P=N(),z=N(),I=e(y()),[K,L]=j(null),X=s({open:Q,dirty:T,onClose:H,title:Y,layer:K}),q=k(null),M=i(Q&&null!==I,q),R=r(Q&&null!==I,q),S=t(R,K),_=o(R),ee=null!==R.host;if(m(Q),p(F,Q&&null!==I,$,S),u(Q),w(()=>{if(Q)return x(()=>!S.current?.(document.activeElement)&&(E||X(),!0),()=>F.current)},[Q,E,X,S]),!Q||!I)return null;const ie={maxHeight:"85vh",...M?(re=M,{left:re.left,width:re.width,bottom:window.innerHeight-(re.top+re.height)}):{}};var re;/* @__PURE__ */
|
|
2
|
-
return g(C,{children:[/* @__PURE__ */W("span",{ref:q,hidden:!0,"data-popup-anchor":""}),v(
|
|
3
|
-
/* @__PURE__ */W(n,{value:K,children:/* @__PURE__ */g("div",{ref:L,className:ee?"fixed inset-0 pointer-events-none":"fixed inset-0",style:a(R),role:"presentation","data-overlay-layer":"",children:[
|
|
4
|
-
/* @__PURE__ */W("div",{className:"fixed bg-black/30 backdrop-blur-sm "+(ee?"pointer-events-auto"+(l(R)?" rounded-(--radius-window)":""):"inset-0"),style:_??void 0,hidden:ee&&!_,onClick:E?void 0:X,"aria-hidden":"true","data-popup-scrim":ee?"window":"system"}),
|
|
5
|
-
/* @__PURE__ */g("div",{ref:F,...c({modal:!0,titleId:Y?z:void 0,labelledBy:J,label:G}),"aria-describedby":V??(Z?P:D?O:void 0),"data-drawer-side":U,"data-popup-panel":"",style:ie,className:[`fixed flex flex-col ${b}`,ee?"pointer-events-auto":"",M?"":"inset-x-0 bottom-0","rounded-t-xl",A].filter(Boolean).join(" "),children:[Y?/* @__PURE__ */g("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
|
|
6
|
-
/* @__PURE__ */g("div",{className:"min-w-0",children:[
|
|
7
|
-
/* @__PURE__ */W("h2",{id:z,className:h,children:Y}),Z&&/* @__PURE__ */W("p",{id:P,className:`mt-0.5 ${f}`,children:Z})]}),!E&&/* @__PURE__ */W(d,{onClose:X})]}):!E&&/* @__PURE__ */W("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */W(d,{onClose:X})}),
|
|
8
|
-
/* @__PURE__ */g("div",{id:O,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[Z&&!Y&&/* @__PURE__ */W("p",{id:P,className:`mb-3 ${f} ${E?"":"pr-8"}`.trim(),children:Z}),D]}),B&&/* @__PURE__ */W("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:B})]})]})}),I)]})}export{Q as Drawer};
|
package/dist/chunk-TB7BO2XS.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-72UHB4JU.js";import{IconButton_default as a}from"./chunk-QZYV4TDD.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{Tooltip as n}from"./chunk-2MUZFHZW.js";import{useShellStrings as s}from"./chunk-NRHG4R2Q.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
|
|
2
|
-
return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:D,letterCase:M,clear:x,disabled:y=!1,"aria-label":R,windows:j,className:S="",layout:U="grid"}){const q=s().textToolbar,A=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!A.words&&!A.paragraph)return null;const B=m(n,k,x,A.cells.paragraph),I=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,$=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:I(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:I(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,H=l(q),L=e.map(e=>[e,H[e],r(e)]),T=C?e.filter(e=>C.allow.includes(e)):[],K=C&&T.includes(C.value)?C.value:T[0],Z=[["none",q.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",q.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",q.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],O=x&&B?g(q.clear,/* @__PURE__ */i(a,{className:I(!1),"aria-label":q.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,Q=/* @__PURE__ */t(d,{children:[$("bold",q.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),$("italic",q.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),$("underline",q.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),$("strike",q.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(q.color,/* @__PURE__ */i(a,{pressed:k.open,className:I(k.open,"rosh-tb-color"),"aria-label":q.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,$("link",q.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),$("sup",q.sup,/* @__PURE__ */i(o,{name:"superscript"})),$("sub",q.sub,/* @__PURE__ */i(o,{name:"subscript"})),$("code",q.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===B?O:null]}),V=/* @__PURE__ */t(d,{children:[C&&T.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.alignment,onKeyDown:e=>p(e,T,e=>C.onChange(e)),children:L.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:I(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===K?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,D&&n.has("bullet")?g(q.bullet,/* @__PURE__ */i(a,{className:I("bullet"===D.pressed),"aria-label":q.bullet,"aria-pressed":"bullet"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,D&&n.has("number")?g(q.number,/* @__PURE__ */i(a,{className:I("number"===D.pressed),"aria-label":q.number,"aria-pressed":"number"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,$("quote",q.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.letterCase,onKeyDown:e=>p(e,Z.map(([e])=>e),e=>M.onChange(e)),children:Z.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:I(M.value===e),"aria-checked":M.value===e,"aria-label":l,tabIndex:e===(M.value||"none")?0:-1,disabled:y||M.disabled,onMouseDown:c,onClick:()=>M.onChange(M.value===e?"":e),children:r},e)))}):null,"paragraph"===B?O:null]}),E="row"===U,F=E?" is-row":A.flow?" is-flow":A.oneRow?" is-one-row":A.words&&void 0===N&&"words"!==B?" is-eight":"",G=b(n,Boolean(k)),J={"--rosh-tb-color-col":String(G.color),"--rosh-tb-link-col":String(G.link),...E?{"--rosh-tb-cells":String(A.cells.words+A.cells.paragraph),"--rosh-tb-groupgap":A.words&&A.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let P;return P=E?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[A.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:Q}):null,A.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:V}):null]}):A.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[Q,
|
|
3
|
-
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),V]}):A.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:Q}),
|
|
5
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:V})]}):/* @__PURE__ */t(d,{children:[A.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==B?" is-eight":""),children:Q}):null,A.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:V}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${F} ${S}`.trim(),style:J,children:[
|
|
6
|
-
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":R??q.formatting,children:P}),j]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
package/dist/chunk-UMLXFQVC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext as r,useContext as o}from"react";var t=r(null);function n(r){const n=o(t);return n&&(void 0===r||"sm"===r||"md"===r||"lg"===r)?n:r}export{t as RowControlSizeContext,n as useRowControlSize};
|
package/dist/chunk-XQMVECQM.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-D3L2QCGF.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{angleScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-NRHG4R2Q.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:$,emptyLabel:C}){const F=m().charts,W=c(),R=N??(e=>h(e,W)),w=C??F.nothingToCompare,L=p(),[Q,A]=u(null),{highlighted:z}=a(),E=x;if(k.length<3||0===E.length)/* @__PURE__ */
|
|
2
|
-
return d("p",{className:`text-sm text-gray-500 ${$??""}`,children:w});const H=y/2,T=y/2,U=y/2-46,V=o(k.length),Y=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...E.map(e=>e.values[t]??0).filter(Number.isFinite))),B=(e,t)=>{const r=Math.max(0,Math.min(1,t/Y[e])),l=V.center(e)-V.step/2;return[H+U*r*Math.cos(l),T+U*r*Math.sin(l)]},D=(e,t)=>null!==Q?Q!==e:null!==z&&z!==t,G=null!==Q?E[Q]:void 0;/* @__PURE__ */
|
|
3
|
-
return f("div",{className:`relative ${$??""}`,children:[
|
|
4
|
-
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":L,onMouseLeave:()=>A(null),children:[
|
|
5
|
-
/* @__PURE__ */d("title",{id:L,children:F.acrossMeasures(E.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=U*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:H,cy:T,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(H,T,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=B(t,Y[t]);/* @__PURE__ */
|
|
6
|
-
return f("g",{children:[
|
|
7
|
-
/* @__PURE__ */d("line",{x1:H,y1:T,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
|
|
8
|
-
/* @__PURE__ */d("text",{x:H+(U+18)*Math.cos(V.center(t)-V.step/2),y:T+(U+18)*Math.sin(V.center(t)-V.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
|
|
9
|
-
/* @__PURE__ */d(r,{id:L,reveal:!!j&&"center-out"}),E.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>B(r,e.values[r]??0));/* @__PURE__ */
|
|
10
|
-
return f("g",{opacity:D(t,e.key)?.3:1,onMouseEnter:()=>A(t),mask:j?`url(#${l(L)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:r,fillOpacity:.18,stroke:"none"}),
|
|
11
|
-
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),G&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:G.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(Q,3,G.color,G.tone),value:R(G.values[t]??0)}))})}),
|
|
12
|
-
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:E.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
13
|
-
/* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
|
|
14
|
-
/* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
|
|
15
|
-
/* @__PURE__ */d(e,{caption:F.acrossMeasures(E.map(e=>e.label),k.length),head:[F.tableSeries,...k.map(e=>e.label)],rows:E.map(e=>[e.label,...k.map((t,r)=>R(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
|
package/dist/chunk-YX4QGW7Z.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-D3L2QCGF.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-NRHG4R2Q.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),N=y??M.nothingToBreakDown,[w,C]=u(null),{highlighted:F}=r(),L=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",L),0===L.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const Q=Math.max(...L.map(e=>e.depth))+1,R=f/2,E=f/2,I=(f/2-8-b)/Q,z=L.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),A=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,D=e=>null!==w?e.id===w:null===F||e.branchKey===F,G=w?L.find(e=>e.id===w):void 0,H=e=>c(e.value/z*100,1,$);/* @__PURE__ */
|
|
2
|
-
return d("div",{className:`relative ${g??""}`,children:[
|
|
3
|
-
/* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(z),Q),onMouseLeave:()=>C(null),children:[L.map(e=>/* @__PURE__ */s("path",{d:t(R,E,b+e.depth*I+v/2,b+(e.depth+1)*I-v/2,e.start,e.end),fill:A(e),fillOpacity:D(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>C(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:R,y:E+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),G&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:G.label,rows:[{key:"value",label:M.value,color:A(G),value:j(G.value)},{key:"share",label:M.share,color:a.muted,value:H(G)}]})}),
|
|
4
|
-
/* @__PURE__ */s(e,{caption:M.sunburst(j(z),Q),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:L.map(e=>[e.depth+1,e.label,j(e.value),H(e)])})]})}export{f as SunburstChart};
|
package/dist/chunk-Z2MP46QJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="15.2.0",a=r;export{a as APP_VERSION,r as VERSION};
|
package/dist/chunk-ZUQ72WER.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{squarify as e}from"./chunk-46BYGPGD.js";import{AccessibleTable as t}from"./chunk-D3L2QCGF.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as a}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as r,CHART_INK as i}from"./chunk-TZFACUMR.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{useShellStrings as n,useShellLocale as m}from"./chunk-NRHG4R2Q.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as u}from"react";import{jsx as s,jsxs as f}from"react/jsx-runtime";function p({items:p,height:d=320,width:v,gap:x=2,radius:g=3,formatValue:y,color:k,className:b,emptyLabel:j}){const w=n().charts,M=m(),N=y??(e=>h(e,M)),$=j??w.nothingToBreakDown,C=c(null),F=o(C),D=v??F,[G,Q]=u(null),{highlighted:R}=l(),z=e(p,D,d);if(0===z.length)/* @__PURE__ */
|
|
2
|
-
return s("div",{className:b,ref:C,children:/* @__PURE__ */s("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const A=k??r(0),B=Math.max(...z.map(e=>e.value),1),H=e=>34+e/B*62,L=e=>`color-mix(in oklab, ${A} ${H(e).toFixed(0)}%, ${i.surface})`,V=e=>H(e)>=55?i.surface:i.label,Y=G??R,E=G?z.find(e=>e.key===G):void 0;/* @__PURE__ */
|
|
3
|
-
return f("div",{className:`relative ${b??""}`,ref:C,children:[
|
|
4
|
-
/* @__PURE__ */s("svg",{width:"100%",height:d,viewBox:`0 0 ${D} ${d}`,role:"img","aria-label":w.treemap(p.length),onMouseLeave:()=>Q(null),children:z.map(e=>{const t=Math.max(0,e.width-x),l=Math.max(0,e.height-x),a=t>6.2*e.label.length+12&&l>30,r=a&&l>44;/* @__PURE__ */
|
|
5
|
-
return f("g",{opacity:Y&&Y!==e.key?.55:1,onMouseEnter:()=>Q(e.key),children:[
|
|
6
|
-
/* @__PURE__ */s("rect",{x:e.x+x/2,y:e.y+x/2,width:t,height:l,rx:g,fill:L(e.value)}),a&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+18,fontSize:12,fontWeight:600,fill:V(e.value),children:e.label}),r&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+34,fontSize:11,fill:V(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:N(e.value)})]},e.key)})}),E&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(a,{title:E.label,rows:[{key:"value",label:w.value,color:L(E.value),value:N(E.value)}]})}),
|
|
7
|
-
/* @__PURE__ */s(t,{caption:w.treemap(p.length),head:[w.tableItem,w.value],rows:z.map(e=>[e.label,N(e.value)])})]})}export{p as TreemapChart};
|
|
File without changes
|