efficient-shell 12.3.0 → 12.4.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 +17 -1
- package/dist/{Browser-OE7IMID6.js → Browser-24JRQIPQ.js} +14 -14
- package/dist/Calculator-AHBFZ4EN.js +29 -0
- package/dist/{CurrencyConverter-TLI6PVRE.js → CurrencyConverter-PZYRBADV.js} +8 -8
- package/dist/Files-AZ4Q4LMK.js +121 -0
- package/dist/{Notepad-TUW4JP7M.js → Notepad-UPHHH3YU.js} +11 -11
- package/dist/PdfViewer-GUXUWGMG.js +1 -0
- package/dist/{PomodoroTimer-FPGRFPNT.js → PomodoroTimer-WGN2KNSB.js} +7 -7
- package/dist/{Preview-BJRRRU4N.js → Preview-K4TNRLKM.js} +61 -61
- package/dist/Sidebar-F7HHC5GY.js +44 -0
- package/dist/{Stock-P7D5WNKC.js → Stock-5GEEDQVT.js} +3 -3
- package/dist/{Weather-OUHUYBZ6.js → Weather-WMQQXWHH.js} +18 -18
- package/dist/{WorldClock-WXIV2KC6.js → WorldClock-IK3WTHVW.js} +7 -7
- package/dist/ai/index.js +33 -33
- package/dist/apps/ImageAnnotator.d.ts +21 -0
- package/dist/apps/ImageAnnotator.js +2 -0
- package/dist/apps/index.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/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartTooltip.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FlowChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-NRLTGGCS.js → chunk-2BMGV6DE.js} +8 -8
- package/dist/chunk-2YRLRMZH.js +23 -0
- package/dist/{chunk-5BV2WW74.js → chunk-3LTZ4N46.js} +11 -11
- package/dist/{chunk-MQKUGIN7.js → chunk-3PWI5IH7.js} +13 -13
- package/dist/{chunk-Q2MW334M.js → chunk-3UHTHQGK.js} +8 -8
- package/dist/{chunk-RQ4UIWWD.js → chunk-4UGFNTZ3.js} +11 -11
- package/dist/{chunk-Y7ANTS5W.js → chunk-4ZUV6WQT.js} +1 -1
- package/dist/{chunk-P4L74UA5.js → chunk-525O4AUQ.js} +1 -1
- package/dist/chunk-56GGBTAD.js +3 -0
- package/dist/{chunk-KDWK5WGU.js → chunk-57YY4J6T.js} +1 -1
- package/dist/{chunk-KZNJXV5I.js → chunk-5HJIFCDQ.js} +3 -3
- package/dist/{chunk-IL56C56I.js → chunk-5JUG74UR.js} +2 -2
- package/dist/{chunk-TKXUDCOI.js → chunk-5MO5JBBK.js} +1 -1
- package/dist/{chunk-6TLSXBKC.js → chunk-62275PI2.js} +1 -1
- package/dist/{chunk-5LZTYOYD.js → chunk-6BATVJBA.js} +17 -17
- package/dist/{chunk-SSUZAOGI.js → chunk-6U25ELYF.js} +10 -10
- package/dist/{chunk-QOQ6GXVA.js → chunk-75MSXRFY.js} +5 -5
- package/dist/{chunk-UDL2A2GT.js → chunk-7RRJPNYN.js} +3 -3
- package/dist/{chunk-ZXNJSSRV.js → chunk-A4KQKN32.js} +1 -1
- package/dist/chunk-A6WZF65N.js +22 -0
- package/dist/{chunk-DONZDILI.js → chunk-AAIUJJDQ.js} +1 -1
- package/dist/chunk-BG2OL3MO.js +7 -0
- package/dist/{chunk-ZZ67Q5HJ.js → chunk-BKKKIHHV.js} +6 -6
- package/dist/chunk-BTFBXZS2.js +1 -0
- package/dist/chunk-BUGTNNZQ.js +15 -0
- package/dist/chunk-C4IJONGO.js +1 -0
- package/dist/chunk-C57PNNAW.js +13 -0
- package/dist/{chunk-DULMOL3I.js → chunk-C5LBNLFJ.js} +1 -1
- package/dist/chunk-CAXOKGMB.js +27 -0
- package/dist/{chunk-WGLHB6WE.js → chunk-CJH2BGXY.js} +1 -1
- package/dist/chunk-CURXYF2R.js +9 -0
- package/dist/{chunk-ZRLWE3JM.js → chunk-DANLBFBD.js} +1 -1
- package/dist/{chunk-JYGUTY6R.js → chunk-DFYXIW4O.js} +1 -1
- package/dist/{chunk-GZJ5F7SB.js → chunk-DJ2XDBAO.js} +5 -5
- package/dist/{chunk-PFMZL3ZG.js → chunk-DW45EZHA.js} +2 -2
- package/dist/{chunk-GYDCXCJT.js → chunk-EB2UE6ZR.js} +1 -1
- package/dist/{chunk-OR5HUQSB.js → chunk-EEVLRCMA.js} +7 -7
- package/dist/{chunk-KT5LLPUV.js → chunk-EF3NPTHG.js} +1 -1
- package/dist/{chunk-FGCIEJPP.js → chunk-EIY6YGEZ.js} +1 -1
- package/dist/{chunk-THASH6OO.js → chunk-EUUCNDIS.js} +9 -9
- package/dist/{chunk-5PP435FL.js → chunk-EYPKBJYG.js} +1 -1
- package/dist/{chunk-ASQX3GXB.js → chunk-FLTPVFKA.js} +5 -5
- package/dist/chunk-FPYABAOX.js +69 -0
- package/dist/chunk-FVZXRGVM.js +8 -0
- package/dist/{chunk-67JHJO6V.js → chunk-G7I255HN.js} +13 -13
- package/dist/{chunk-2YBJQUYQ.js → chunk-GEXETMGL.js} +1 -1
- package/dist/chunk-GEZ45J4Z.js +2 -0
- package/dist/chunk-GUIJCTFJ.js +8 -0
- package/dist/{chunk-7JY3YYN4.js → chunk-GZQD6IBV.js} +3 -3
- package/dist/chunk-H7HRYFRQ.js +14 -0
- package/dist/{chunk-AANXPLMA.js → chunk-I5BS6AP6.js} +4 -4
- package/dist/chunk-I5CSYOOZ.js +28 -0
- package/dist/chunk-I64TVNHS.js +6 -0
- package/dist/{chunk-F44E76EC.js → chunk-IFQXTIMY.js} +4 -4
- package/dist/chunk-IHPAYSTJ.js +8 -0
- package/dist/{chunk-QTMRW6DK.js → chunk-IXBKWVEP.js} +1 -1
- package/dist/{chunk-2KNVUOWJ.js → chunk-J4KYZGHQ.js} +20 -20
- package/dist/{chunk-O6H2ZD32.js → chunk-J53LQWWY.js} +7 -7
- package/dist/{chunk-IXAYZNOZ.js → chunk-JM2IQC4J.js} +1 -1
- package/dist/{chunk-FZM3ZPW3.js → chunk-JPNAEN53.js} +1 -1
- package/dist/{chunk-S4FPYCUU.js → chunk-JQBVSPF5.js} +3 -3
- package/dist/{chunk-XGVMOV3O.js → chunk-KDTL6VEC.js} +8 -8
- package/dist/{chunk-2XQOK3CT.js → chunk-KUEYOJBN.js} +2 -2
- package/dist/{chunk-QA33EHHO.js → chunk-LCC3NXQX.js} +6 -6
- package/dist/{chunk-7JGR7WPD.js → chunk-LFYZ7NQ4.js} +3 -3
- package/dist/chunk-M54OL3YR.js +2 -0
- package/dist/chunk-MGW7SX53.js +11 -0
- package/dist/{chunk-3QYAYBJE.js → chunk-MOMOZVOW.js} +3 -3
- package/dist/{chunk-RYBYTUGZ.js → chunk-N442GPRJ.js} +1 -1
- package/dist/{chunk-6NHPL5JL.js → chunk-N6Q7HNAH.js} +1 -1
- package/dist/{chunk-RXHTIJ64.js → chunk-N7JX27JE.js} +1 -1
- package/dist/{chunk-SKFFBBAG.js → chunk-N7YHXL2F.js} +2 -2
- package/dist/{chunk-GR43CABV.js → chunk-ND5IZ37V.js} +5 -5
- package/dist/{chunk-LKVS4WCZ.js → chunk-NEYHBQLG.js} +3 -3
- package/dist/{chunk-ZDO62V4I.js → chunk-NIBE57KV.js} +1 -1
- package/dist/{chunk-6Y2BQI44.js → chunk-NS37Y5CN.js} +3 -3
- package/dist/chunk-OLVKHYHV.js +9 -0
- package/dist/{chunk-CVLWJBR5.js → chunk-PIWC3CAC.js} +1 -1
- package/dist/chunk-PMJMYH5O.js +5 -0
- package/dist/{chunk-6GDZUW3L.js → chunk-PVXX77MY.js} +6 -6
- package/dist/{chunk-NHNRNT4T.js → chunk-QIUIP6YZ.js} +2 -2
- package/dist/{chunk-NJN5IKWO.js → chunk-QQ2LDC6C.js} +1 -1
- package/dist/{chunk-FAIHSCOG.js → chunk-RBMZSZOH.js} +1 -1
- package/dist/{chunk-53WYJ5LZ.js → chunk-RFKCSRJX.js} +10 -10
- package/dist/{chunk-NDLXD4EY.js → chunk-RNQBWWYR.js} +5 -5
- package/dist/{chunk-N5KO2IHG.js → chunk-RQDVAUXD.js} +4 -4
- package/dist/{chunk-B5OYS65L.js → chunk-RVQUSPXC.js} +1 -1
- package/dist/chunk-SBZCJNNP.js +11 -0
- package/dist/{chunk-RDKIYORS.js → chunk-SYZLS2JA.js} +1 -1
- package/dist/chunk-TQWLJ5VM.js +7 -0
- package/dist/{chunk-RM74EAMV.js → chunk-TS36J7RW.js} +2 -2
- package/dist/{chunk-ZATTQ3FX.js → chunk-TTQ7K4AJ.js} +1 -1
- package/dist/{chunk-FPRQB5W6.js → chunk-UDHJTQBA.js} +12 -12
- package/dist/{chunk-P3BLJCTQ.js → chunk-UDVQORQM.js} +3 -3
- package/dist/chunk-UGOJLNYR.js +1 -0
- package/dist/chunk-UJJXWLHE.js +2 -0
- package/dist/{chunk-CF4YOJUQ.js → chunk-UPTKROT7.js} +9 -9
- package/dist/{chunk-SGNJ7I7P.js → chunk-UVBX5LEU.js} +4 -4
- package/dist/{chunk-HRMG2WMW.js → chunk-UWF45S5L.js} +23 -23
- package/dist/chunk-VIOILTE4.js +13 -0
- package/dist/{chunk-M3PUAGXJ.js → chunk-VWQNCYGQ.js} +7 -7
- package/dist/{chunk-2B4EKAZL.js → chunk-VYMM2BPX.js} +2 -2
- package/dist/{chunk-HNQKXOFU.js → chunk-WCPAQHHA.js} +1 -1
- package/dist/{chunk-36VIGB6J.js → chunk-WDQI3FV6.js} +6 -6
- package/dist/chunk-WUGQAZMC.js +14 -0
- package/dist/{chunk-74LZVJND.js → chunk-X32TVINY.js} +1 -1
- package/dist/{chunk-LBMC6GR5.js → chunk-XK4SMAVR.js} +1 -1
- package/dist/{chunk-U7PXMVIY.js → chunk-XK4U5MAS.js} +3 -3
- package/dist/{chunk-S6BGMLXI.js → chunk-XMH2JOZ2.js} +1 -1
- package/dist/{chunk-TE6R53YD.js → chunk-XWFLIGDQ.js} +1 -1
- package/dist/{chunk-PA273FZF.js → chunk-YMAU4EIK.js} +1 -1
- package/dist/{chunk-LDEFEPPL.js → chunk-YRJJKF5H.js} +1 -1
- package/dist/{chunk-7TZRICMH.js → chunk-YU6KOO6O.js} +4 -4
- package/dist/chunk-YZR4T5FZ.js +7 -0
- package/dist/{chunk-NC36LJCA.js → chunk-ZB2H2JJ2.js} +4 -4
- package/dist/{chunk-FLYOI6EW.js → chunk-ZOZEQZUA.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/format/index.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/Segmented.js +1 -1
- 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/WidthsBar.js +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/payment.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +2 -19
- package/dist/index.js +666 -666
- package/dist/map/index.js +2 -2
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +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/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/MilestoneTimeline.js +1 -1
- package/dist/shell/Popover.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.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/TimelineTrack.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 +10 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-W6YA44OY.js +0 -29
- package/dist/Files-5WRVSC5R.js +0 -121
- package/dist/PdfViewer-GFQAIHDP.js +0 -1
- package/dist/Sidebar-ROMFJHCD.js +0 -44
- package/dist/chunk-4DZVWK7U.js +0 -7
- package/dist/chunk-5N6AC3LN.js +0 -15
- package/dist/chunk-6JKSRXZM.js +0 -8
- package/dist/chunk-AUZKIL62.js +0 -23
- package/dist/chunk-B3PNZBZM.js +0 -27
- package/dist/chunk-DCICBH2L.js +0 -3
- package/dist/chunk-DICWZEGH.js +0 -2
- package/dist/chunk-EOVXFXVV.js +0 -2
- package/dist/chunk-F245EG2A.js +0 -9
- package/dist/chunk-FPZBHNZU.js +0 -7
- package/dist/chunk-GIUX7WUS.js +0 -7
- package/dist/chunk-GMLGR4R6.js +0 -8
- package/dist/chunk-IMRGGJIJ.js +0 -22
- package/dist/chunk-IWFWPFYQ.js +0 -13
- package/dist/chunk-KZD2AFH2.js +0 -13
- package/dist/chunk-LE5LWALR.js +0 -1
- package/dist/chunk-LJJSFJA2.js +0 -69
- package/dist/chunk-M3OEWPXZ.js +0 -1
- package/dist/chunk-NPQBJJLP.js +0 -9
- package/dist/chunk-NSOAHIQZ.js +0 -11
- package/dist/chunk-SEJAT3UE.js +0 -1
- package/dist/chunk-SPJIFRNY.js +0 -8
- package/dist/chunk-SYDGCECZ.js +0 -14
- package/dist/chunk-UCIOCS4X.js +0 -2
- package/dist/chunk-UMQLDWSS.js +0 -6
- package/dist/chunk-VF53GD6D.js +0 -5
- package/dist/chunk-WD3I7AEZ.js +0 -14
- package/dist/chunk-YAQ5RF3H.js +0 -28
- package/dist/chunk-ZICLAMMR.js +0 -11
- /package/dist/{chunk-R3K2BNFF.js → chunk-2762IAB7.js} +0 -0
- /package/dist/{chunk-K5A62ZS5.js → chunk-T75VCE6K.js} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{CartesianPlot as t}from"./chunk-525O4AUQ.js";import{binValues as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-43MCNASD.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const A=e().charts,v=i(),w=d??(t=>Number.isInteger(t)?m(t,v):n(t,1,v)),L=x??(t=>m(t,v)),M=g??A.countAxis,N=k??A.distribution,C=h??o(c??[],s),O=a(0,b,f),Q=C.map(t=>w(t.from)),R=C.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(t,{labels:Q,values:R,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:L,yAxisLabel:M,className:y,emptyLabel:j,ariaLabel:A.histogram(N,C.length,(c??[]).length),tooltip:t=>/* @__PURE__ */l(r,{title:`${w(C[t].from)} – ${w(C[t].to)}`,rows:[{key:"count",label:A.observations,color:O,value:L(C[t].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:C.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:O,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-XK4SMAVR.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-UJJXWLHE.js";import{Icon as s}from"./chunk-UIWGVOFH.js";import{Z_LAYERS as m}from"./chunk-62LW225J.js";import{useHydrated as u}from"./chunk-D65T4H6J.js";import{buttonClasses as d}from"./chunk-UQYNPYF4.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-43MCNASD.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",U=e=>e.stopPropagation();function A({images:r,startIndex:y=0,onClose:A,onIndexChange:L,onOpenFile:D}){const J=h().lightbox,W=u(),$=p(null),z=p(null),[F,I]=x(y),G=r.length,M=W&&G>0,P=b(e=>{if(G<2)return;const t=((F+e)%G+G)%G;I(t),L?.(t)},[F,G,L]);if(a(M),l($,M,z),i(M),k(()=>{if(M)return f(()=>(A(),!0),()=>$.current)},[M,A]),k(()=>{if(!M)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),P("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[M,P]),!M)return null;const S=r[Math.min(F,G-1)],V=j(S),E=S.caption||n(S.url);let H;return H="video"===V?/* @__PURE__ */v("video",{src:S.url,controls:!0,playsInline:!0,"aria-label":E,onClick:U,className:`${e} rounded-lg bg-black`}):"file"===V?/* @__PURE__ */w("div",{onClick:U,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
|
|
2
|
+
/* @__PURE__ */v(s,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
|
|
3
|
+
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:E}),D?/* @__PURE__ */v(c,{size:"sm",onClick:()=>D(S),children:J.openFile}):/* @__PURE__ */v("a",{href:S.url,target:"_blank",rel:"noopener noreferrer",className:d({size:"sm"}),children:J.openFile})]}):/* @__PURE__ */v(t,{src:S.url,alt:E,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
|
|
4
|
+
/* @__PURE__ */w("div",{ref:$,...o({role:"dialog",modal:!0,label:J.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:m.overlay},onClick:A,children:[H,
|
|
5
|
+
/* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:U,children:[
|
|
6
|
+
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:J.counter(F+1,G)}),
|
|
7
|
+
/* @__PURE__ */v("button",{ref:z,type:"button",onClick:A,"aria-label":J.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(s,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),G>1&&/* @__PURE__ */w(N,{children:[
|
|
8
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),P(-1)},"aria-label":J.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(s,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
|
|
9
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),P(1)},"aria-label":J.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(s,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
|
|
10
|
+
/* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:U,children:[
|
|
11
|
+
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:E}),"file"!==V&&/* @__PURE__ */v("a",{href:S.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:J.openOriginal})]})]}),document.body)}export{A as ImageLightbox,j as lightboxKind};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Popover as e}from"./chunk-
|
|
2
|
-
return l(e,{className:x,disabled:N,triggerLabel:L?
|
|
1
|
+
import{Popover as e}from"./chunk-LFYZ7NQ4.js";import{IconButton_default as r}from"./chunk-UGOJLNYR.js";import{Icon as n}from"./chunk-UIWGVOFH.js";import{Tooltip as t}from"./chunk-QQ2LDC6C.js";import{useShellStrings as a}from"./chunk-43MCNASD.js";import{useRef as i}from"react";import{jsx as l,jsxs as o,Fragment as s}from"react/jsx-runtime";var c={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function u({value:u,onChange:m,options:d,label:h,emptyValue:p,columns:f=5,cell:v,header:g,onPreview:w,tooltips:b=!0,disabled:N=!1,className:x=""}){const k=a(),C=k.iconPicker,j=k.iconNames,y=e=>e.label??j[e.value]??e.value,A=i([]),D=Math.max(0,d.findIndex(e=>e.value===u)),L=d[D],M=L?.value===p,_=i(null);/* @__PURE__ */
|
|
2
|
+
return l(e,{className:x,disabled:N,triggerLabel:L?C.button(h,y(L)):h,"aria-label":h,initialFocus:_,panelClassName:"!p-2",trigger:/* @__PURE__ */o("span",{className:"inline-flex items-center gap-2",children:[/* @__PURE__ */l("span",M||!L?{className:"text-sm",children:L?y(L):""}:{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:L.icon}),
|
|
3
3
|
/* @__PURE__ */l(n,{name:"chevron-down",className:"h-4 w-4"})]}),children:({close:e})=>/* @__PURE__ */o(s,{children:["function"==typeof g?g({close:e}):g,
|
|
4
|
-
/* @__PURE__ */l("div",{role:"listbox","aria-label":h,className:"grid gap-1",style:{gridTemplateColumns:`repeat(${f}, ${v?.width??"2rem"})`},children:d.map((n,a)=>{const i=n.value===u,o=/* @__PURE__ */l(r,{ref:e=>{
|
|
4
|
+
/* @__PURE__ */l("div",{role:"listbox","aria-label":h,className:"grid gap-1",style:{gridTemplateColumns:`repeat(${f}, ${v?.width??"2rem"})`},children:d.map((n,a)=>{const i=n.value===u,o=/* @__PURE__ */l(r,{ref:e=>{A.current[a]=e,a===D&&(_.current=e)},role:"option","aria-selected":i,"aria-label":y(n),pressed:i,tabIndex:a===D?0:-1,onKeyDown:e=>((e,r)=>{const n=c[r.key];if(!n)return;r.preventDefault();const t=Math.floor(e/f)+n[0],a=e%f+n[1];if(t<0||a<0||a>=f)return;const i=t*f+a;if(!(i>=d.length)){for(const[e,r]of A.current.entries())r?.setAttribute("tabindex",e===i?"0":"-1");A.current[i]?.focus()}})(a,e),onClick:()=>{m(n.value),e()},onMouseEnter:w?e=>w(n.value,e.currentTarget):void 0,style:v?{width:v.width,height:v.height}:void 0,children:/* @__PURE__ */l("span",{"aria-hidden":"true",className:v?"inline-flex":"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:n.icon})},n.value);return b?/* @__PURE__ */l(t,{content:y(n),children:o},n.value):o})})]})})}export{u as IconPicker};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{InputNumber_default as a}from"./chunk-
|
|
1
|
+
import{InputNumber_default as a}from"./chunk-N7YHXL2F.js";import{Icon as e}from"./chunk-UIWGVOFH.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
|
|
2
2
|
return r("div",{role:"group","aria-label":e,className:"grid min-w-0 grid-cols-2 gap-2",children:[u("x"),u("y")]})}export{s as PositionInput};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-EOGXCGQF.js";import{Select_default as l}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-EOGXCGQF.js";import{Select_default as l}from"./chunk-UDVQORQM.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-6JDR6T4U.js";import{Input_default as c}from"./chunk-GZQD6IBV.js";import{Button_default as s}from"./chunk-UJJXWLHE.js";import{useState as d}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=d(!0),[p,u]=d("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
|
|
3
3
|
/* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
|
|
4
4
|
/* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tooltip as n}from"./chunk-
|
|
1
|
+
import{Tooltip as n}from"./chunk-QQ2LDC6C.js";import{useShellStrings as r,useShellLocale as e}from"./chunk-43MCNASD.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";var a=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md px-1","text-2xs font-medium normal-case leading-none tabular-nums tracking-normal","ring-1 ring-inset ring-[color:color-mix(in_srgb,currentColor_20%,transparent)]"].join(" ");function s({count:s,label:c,active:l=!1,showZero:m=!1,className:u=""}){const d=r().count,h=e();if(!(s>0||0===s&&m))return null;const f=c??d.items(s);/* @__PURE__ */
|
|
2
2
|
return i(n,{content:f,describe:!1,className:`relative inline-flex shrink-0 ${u}`.trim(),children:/* @__PURE__ */o("span",{"data-item-count":"",className:`${a} ${l?"bg-blue-100 text-blue-700":"bg-[color:color-mix(in_srgb,var(--ink-faint)_14%,transparent)] text-gray-600"}`,children:[
|
|
3
3
|
/* @__PURE__ */i("span",{"aria-hidden":"true",children:t(s,h)}),
|
|
4
4
|
/* @__PURE__ */i("span",{className:"sr-only",children:f})]})})}export{s as ItemCount};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{useSettingAuto as e}from"./chunk-2NMW66P5.js";import{IconButton_default as r}from"./chunk-
|
|
2
|
-
return f("div",{className:"relative","data-number-box":"",style:
|
|
1
|
+
import{useSettingAuto as e}from"./chunk-2NMW66P5.js";import{IconButton_default as r}from"./chunk-UGOJLNYR.js";import{inputClasses as t}from"./chunk-AYZY3YNC.js";import{Icon as n}from"./chunk-UIWGVOFH.js";import{useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-43MCNASD.js";import{forwardRef as l,useId as c,useState as u,useRef as s,useCallback as d,useEffect as p}from"react";import{jsx as m,jsxs as f,Fragment as v}from"react/jsx-runtime";function h(e){const r=String(e),t=/e-(\d+)$/.exec(r);return t?Number(t[1]):r.split(".")[1]?.length??0}var b=(e,r)=>null==e?"":null!=r?e.toFixed(r):String(e);function y({dir:e,compact:t,label:i,disabled:o,onStep:a}){const l=s(a);l.current=a;const c=s({}),u=d(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);p(()=>u,[u]),p(()=>{o&&u()},[o,u]);const f=/* @__PURE__ */m(n,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:t?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:t?2.6:2}),v={tabIndex:-1,"aria-label":i,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),u();const r=e.shiftKey;l.current(r);const t=e.currentTarget.ownerDocument.defaultView??window;t.addEventListener("pointerup",u),c.current={off:()=>t.removeEventListener("pointerup",u),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(r),60)},400)}},onPointerLeave:u,onPointerCancel:u,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return t?/* @__PURE__ */m("button",{type:"button",...v,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */m(r,{size:"sm",...v,children:f})}var g=l(function({value:r,onChange:n,min:l,max:g,precision:x,step:w,shiftStep:k,disabled:N,readOnly:j,invalid:E,placeholder:D,size:C,prefix:O,suffix:F,id:M,name:S,className:U="",onBlur:W,onFocus:B,steppers:K,stepFrom:L,snap:P=!1,allowEmpty:T=!0,appearance:$="box",display:z,reportWhileTyping:R=!0,onRevert:Y,"aria-label":A,"aria-labelledby":I,"aria-describedby":V,auto:G,...H},J){const Q="bare"===$,X=e(),Z=G??X,q=c(),_="string"==typeof F&&""!==F.trim()?F.trim():void 0,ee=e=>function(e,r){let t=e.trim();if(r&&t.endsWith(r)&&(t=t.slice(0,-r.length).trim()),t=t.replace(",","."),""===t||"-"===t||"."===t||"-."===t)return null;const n=Number(t);return Number.isFinite(n)?n:null}(e,_),re=Object.fromEntries(Object.entries(H).filter(([e])=>e.startsWith("data-"))),te=a(),[ne,ie]=u(()=>b(r,x)),oe=s(ne);oe.current=ne;const ae=s(null),le=d(e=>{ae.current=e,"function"==typeof J?J(e):J&&(J.current=e)},[J]),ce=s(r),ue=s(r);ue.current=r;const se=Boolean(N||j),de=K??!1,pe="compact"===de,me=s(null),[fe,ve]=u(0);i(()=>{const e=me.current;if(!e)return;const r=()=>ve(Math.ceil(e.getBoundingClientRect().width));if(r(),"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(r);return t.observe(e),()=>t.disconnect()},[O]),p(()=>{ee(oe.current)!==r&&ie(b(r,x))},[r,x]);const he=e=>{if(se)return;let r=(ee(oe.current)??L??(D?ee(D):null)??0)+e;null!=l&&r<l&&(r=l),null!=g&&r>g&&(r=g);const t=x??String(w??1).split(".")[1]?.length??0;r=Number(r.toFixed(t));const i=b(r,x);oe.current=i,ie(i),n(r),Ne()},be=s(he);be.current=he;const ye=s({unit:w??1,big:k??10*(w??1),locked:se});ye.current={unit:w??1,big:k??10*(w??1),locked:se},p(()=>{const e=ae.current;if(!e)return;const r=r=>{const{unit:t,big:n,locked:i}=ye.current;if(i||e.ownerDocument.activeElement!==e)return;const o=r.deltaY||r.deltaX;o&&(r.preventDefault(),be.current((o<0?1:-1)*(r.shiftKey?n:t)))};return e.addEventListener("wheel",r,{passive:!1}),()=>e.removeEventListener("wheel",r)},[]);const[ge,xe]=u(!1),[we,ke]=u(0),Ne=()=>{Q&&ke(e=>e+1)};p(()=>{Q&&ge&&document.activeElement===ae.current&&ae.current?.select()},[Q,ge,we]);const je=s(!1);p(()=>{if(ge&&!se)return o(e=>{if("Escape"!==e.key||document.activeElement!==ae.current)return!1;const r=ce.current;if(ee(oe.current)===r)return!1;const t=b(r,x);return oe.current=t,ie(t),ue.current!==r&&(Y??n)(r),Ne(),!0})},[ge,se,x,n,Y]);const Ee=()=>{const e=ee(oe.current);if(null==e){if(!T){const e=b(ue.current,x);return oe.current=e,ie(e),ue.current}return oe.current="",ie(""),null!==ue.current&&n(null),null}let r=e;const t=x??(P?Math.max(h(w??1),h(l??0)):void 0);P&&(r=function(e,r,t){const n=(e-t)/r;return t+Math.round(n+1e-9*Math.sign(e))*r}(r,w??1,l??0)),null!=l&&r<l&&(r=l),null!=g&&r>g&&(r=g),null!=t&&(r=Number(r.toFixed(t)));const i=b(r,x);return oe.current=i,ie(i),r===e&&r===ue.current||n(r),r},De=/* @__PURE__ */m("input",{ref:le,id:M,"data-number-input":"",name:S,type:"text",inputMode:0===x?"numeric":"decimal",value:!ge&&z?z(r):ne,disabled:N,readOnly:j,placeholder:D,step:w,role:"spinbutton","aria-valuenow":r??void 0,"aria-valuemin":l,"aria-valuemax":g,"aria-valuetext":null==r?D||void 0:`${b(r,x)}${Q&&_?_:""}`,"aria-describedby":[V,Z?q:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":Q?"bare":void 0,...re,autoComplete:Q?"off":void 0,spellCheck:!Q&&void 0,"aria-invalid":E||void 0,"aria-label":A,"aria-labelledby":I,onChange:e=>(e=>{if(j)return;const r=_&&e.trimEnd().endsWith(_)?e.trimEnd().slice(0,-_.length).trimEnd():e;if(""!==r&&!/^-?\d*[.,]?\d*$/.test(r))return;if(ie(e),!R)return;const t=ee(e);(null!==t||T)&&n(t)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!se)return ce.current=Ee(),void Ne();const r=w??1,t=k??10*r,n="ArrowUp"===e.key?e.shiftKey?t:r:"ArrowDown"===e.key?-(e.shiftKey?t:r):"PageUp"===e.key?10*r:"PageDown"===e.key?10*-r:null;null===n||se||(e.preventDefault(),he(n))},onFocus:()=>{ce.current=ue.current,xe(!0),je.current=!0,B?.()},onMouseUp:Q?e=>{je.current&&(je.current=!1,e.preventDefault())}:void 0,onBlur:()=>{xe(!1),je.current=!1,Ee(),W?.()},className:Q?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",ge?"bg-surface":"bg-transparent",se?"cursor-default":"cursor-text",U].filter(Boolean).join(" "):t({invalid:E,size:C,readOnly:j,auto:Z,className:[O?"pl-[max(var(--space-24),calc(var(--space-control-x-sm)+var(--rosh-number-prefix-width)+var(--space-icon-gap-sm)))]":"",pe?F?"pr-10":"pr-6":de?F?"pr-24":"pr-16":F?"pr-10":"","text-left tabular-nums",U].filter(Boolean).join(" ")})}),Ce=Z?/* @__PURE__ */m("span",{id:q,hidden:!0,children:te.settingView.auto}):null;if(Q||!O&&!F&&!de)return Ce?/* @__PURE__ */f(v,{children:[De,Ce]}):De;const Oe=ee(ne);/* @__PURE__ */
|
|
2
|
+
return f("div",{className:"relative","data-number-box":"",style:O?{"--rosh-number-prefix-width":`${fe}px`}:void 0,children:[O&&/* @__PURE__ */m("span",{ref:me,className:"pointer-events-none absolute left-(--space-control-x-sm) top-1/2 -translate-y-1/2 whitespace-nowrap text-sm text-ink-faint",children:O}),De,Ce,F&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${pe?"right-6":de?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-ink-faint`,children:F}),de&&(()=>{const e=/* @__PURE__ */m(y,{dir:-1,compact:pe,label:te.number.decrease,disabled:se||null!=l&&null!=Oe&&Oe<=l,onStep:e=>be.current(-(e?k??10*(w??1):w??1))}),r=/* @__PURE__ */m(y,{dir:1,compact:pe,label:te.number.increase,disabled:se||null!=g&&null!=Oe&&Oe>=g,onStep:e=>be.current(e?k??10*(w??1):w??1)});/* @__PURE__ */
|
|
3
3
|
return f("span",pe?{"data-steppers":"compact",className:"absolute inset-y-px right-px flex w-4 flex-col overflow-hidden rounded-r-(--radius-control)",children:[r,e]}:{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-0.5",children:[e,r]})})()]})});export{g as InputNumber_default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-
|
|
1
|
+
import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-XK4SMAVR.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-7KIDOIPY.js";import{useShellStrings as l}from"./chunk-43MCNASD.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},C){const $=m(),z=l().files,M=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),O=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
|
|
2
2
|
return o(e,{label:g,htmlFor:$,hint:N,error:j,required:k,className:v,children:[
|
|
3
|
-
/* @__PURE__ */o("button",{ref:C,type:"button",id:$,disabled:y,onClick:
|
|
3
|
+
/* @__PURE__ */o("button",{ref:C,type:"button",id:$,disabled:y,onClick:M.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":O,...M.zoneProps,className:t(M.dragOver,y,a(y),"px-4 py-6"),children:[
|
|
4
4
|
/* @__PURE__ */o("span",{children:[
|
|
5
5
|
/* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?z.chooseMany:z.chooseOne}),
|
|
6
6
|
/* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?z.dragMany:z.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
|
|
7
|
-
/* @__PURE__ */d("input",{...
|
|
7
|
+
/* @__PURE__ */d("input",{...M.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
|
|
8
8
|
/* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
|
|
9
9
|
/* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,z)}),
|
|
10
|
-
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{
|
|
11
|
-
/* @__PURE__ */d(s,{rejections:
|
|
10
|
+
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{M.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":z.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
|
|
11
|
+
/* @__PURE__ */d(s,{rejections:M.rejections})]})});export{p as FilePicker_default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return c(
|
|
3
|
-
return c(
|
|
1
|
+
import{CartesianPlot as e}from"./chunk-525O4AUQ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-43MCNASD.js";import{formatPlain as i,formatFixed as r}from"./chunk-C3QOHMR6.js";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";function h({candles:h,variant:m="candle",height:p=260,width:d,formatValue:u,yAxisLabel:b,label:y,className:x,emptyLabel:k}){const g=t().charts,f=a(),w=u??(e=>Number.isInteger(e)?i(e,f):r(e,2,f)),M=y??g.price,v=h.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),j=Math.min(...v),A=Math.max(...v),L=.08*(A-j)||1;/* @__PURE__ */
|
|
2
|
+
return c(e,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-L,max:A+L,bandPadding:.42,formatValue:w,yAxisLabel:b,className:x,emptyLabel:k,ariaLabel:g.ohlc(M,h.length),tooltip:e=>{const t=h[e],a=t.close>=t.open,i=a?o.good:o.critical;/* @__PURE__ */
|
|
3
|
+
return c(l,{title:t.label,rows:[{key:"open",label:g.open,color:i,value:w(t.open)},{key:"high",label:g.high,color:i,value:w(t.high)},{key:"low",label:g.low,color:i,value:w(t.low)},{key:"close",label:g.close,color:i,value:w(t.close)}],emphasisKey:"close",footnote:a?g.closedAbove:g.closedBelow})},children:({x:e,y:l,active:t})=>/* @__PURE__ */c("g",{children:h.map((a,i)=>{const r=a.close>=a.open,h=r?o.good:o.critical,p=e.center(i),d=Math.max(3,e.bandwidth),u=null!==t&&t!==i,b=l(Math.max(a.open,a.close)),y=Math.max(1,Math.abs(l(a.close)-l(a.open)));/* @__PURE__ */
|
|
4
4
|
return n("g",{opacity:u?.45:1,children:[
|
|
5
5
|
/* @__PURE__ */c("line",{x1:p,y1:l(a.high),x2:p,y2:l(a.low),stroke:h,strokeWidth:1.5}),"candle"===m?/* @__PURE__ */c("rect",{x:p-d/2,y:b,width:d,height:y,rx:1,fill:r?h:"transparent",fillOpacity:r?.85:1,stroke:h,strokeWidth:1.5}):/* @__PURE__ */n(s,{children:[
|
|
6
6
|
/* @__PURE__ */c("line",{x1:p-d/2,y1:l(a.open),x2:p,y2:l(a.open),stroke:h,strokeWidth:2}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-UWF45S5L.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return i(
|
|
3
|
-
return i(
|
|
1
|
+
import{CartesianPlot as t}from"./chunk-525O4AUQ.js";import{ChartTooltip as a}from"./chunk-WDQI3FV6.js";import{CHART_INK as e,STATUS_VARS as l}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-43MCNASD.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as s}from"react/jsx-runtime";function c({steps:c,height:u=240,width:m,formatValue:h,yAxisLabel:f,className:p,emptyLabel:d,radius:b=3,connectors:g=!0}){const v=o().charts,x=r(),y=h??(t=>n(t,x));let k=0;const M=c.map(t=>{if(t.total){const a={from:0,to:k,value:k,total:!0};return{...t,...a}}const a=k;return k+=t.value,{...t,from:a,to:k,value:t.value,total:!1}}),j=M.flatMap(t=>[t.from,t.to]);/* @__PURE__ */
|
|
2
|
+
return i(t,{labels:c.map(t=>t.label),values:j,height:u,width:m,formatValue:y,yAxisLabel:f,className:p,emptyLabel:d,bandPadding:.36,ariaLabel:v.waterfall(c.length,y(M[0]?.from??0),y(k)),tooltip:t=>{const e=M[t],o=e?.total?l.neutral:e.value>=0?l.good:l.critical;/* @__PURE__ */
|
|
3
|
+
return i(a,{title:e?.label,rows:[{key:"step",color:o,label:e?.total?v.balance:e.value>=0?v.increase:v.decrease,value:e?.total?y(e.to):`${e.value>=0?"+":"−"}${y(Math.abs(e.value))}`},...e?.total?[]:[{key:"running",label:v.runningTotal,color:l.neutral,value:y(e.to)}]]})},children:({x:t,y:a,active:o})=>/* @__PURE__ */s("g",{children:[g&&M.slice(0,-1).map((l,o)=>
|
|
4
4
|
/* @__PURE__ */i("line",{x1:t.end(o),y1:a(l.to),x2:t(o+1),y2:a(l.to),stroke:e.grid,strokeWidth:1,shapeRendering:"crispEdges"},`c${o}`)),M.map((e,r)=>{const n=e.total?l.neutral:e.value>=0?l.good:l.critical,s=Math.min(a(e.from),a(e.to)),c=Math.max(1,Math.abs(a(e.to)-a(e.from)));/* @__PURE__ */
|
|
5
5
|
return i("rect",{x:t(r),y:s,width:Math.max(1,t.bandwidth),height:c,rx:b,fill:n,fillOpacity:null===o||o===r?1:.45},r)})]})})}export{c as WaterfallChart};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-EYPKBJYG.js";import{bumpPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as n}from"./chunk-CNYAHYE6.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-43MCNASD.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,C=c(null),E=o(C),F=x??E,[A,Y]=m(null),{highlighted:z}=n();if(0===f.length||0===k.length)/* @__PURE__ */
|
|
2
|
+
return d("div",{className:M,ref:C,children:/* @__PURE__ */d("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const O=[...new Set(f.map(e=>e.depth))].sort((e,t)=>e-t),P=e=>O.length<=1?0:O.indexOf(e)/(O.length-1)*(F-g-140)+70,Q=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)]})),S=/* @__PURE__ */new Map;for(const e of f)S.set(e.depth,[...S.get(e.depth)??[],e]);const U=Math.max(...[...S.values()].map(e=>e.reduce((e,t)=>e+(Q.get(t.key)??0),0))),V=p-20,W=U>0?(V-y*(Math.max(...[...S.values()].map(e=>e.length))-1))/U:0,B=/* @__PURE__ */new Map;for(const[e,t]of S){const n=t.map(e=>Math.max(2,(Q.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;B.set(t.key,{x:P(e),y:a,h:l,index:o}),a+=l+y})}const D=/* @__PURE__ */new Map,H=/* @__PURE__ */new Map,L=/* @__PURE__ */new Map,R=(e,t)=>e.from===t||e.to===t,T="link"===A?.kind?k[A.index]:void 0,Z="node"===A?.kind?f.find(e=>e.key===A.key):void 0;/* @__PURE__ */
|
|
3
|
+
return u("div",{className:`relative ${M??""}`,ref:C,children:[
|
|
4
|
+
/* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${F} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>Y(null),children:[k.map((e,n)=>{const o=B.get(e.from),l=B.get(e.to);if(!o||!l)return null;const a=Math.max(1,e.value*W),i=o.y+(D.get(e.from)??0)+a/2,s=l.y+(H.get(e.to)??0)+a/2;D.set(e.from,(D.get(e.from)??0)+a),H.set(e.to,(H.get(e.to)??0)+a);const h=o.x+g,c=l.x,m=r(o.index,e.color),u=`${e.from}→${e.to}`,f=L.get(u)??0;L.set(u,f+1);const k=((e,t)=>A?"link"===A.kind?A.index===t:R(e,A.key):null!==z?R(e,z):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:()=>Y({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=B.get(e.key);if(!t)return null;const n=t.x>F/2,o=(l=e.key,A?"node"===A.kind?A.key===l:R(k[A.index],l):null!==z?z===l:null);var l;/* @__PURE__ */
|
|
6
|
+
return u("g",{opacity:null===o||o?1:.45,onMouseEnter:()=>Y({kind:"node",key:e.key}),children:[
|
|
7
|
+
/* @__PURE__ */d("rect",{x:t.x,y:t.y,width:g,height:t.h,rx:2,fill:r(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:a.label,children:e.label})]},e.key)})]}),T&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:`${T.from} → ${T.to}`,rows:[{key:"value",label:b.flow,color:r(B.get(T.from)?.index??0,T.color),value:N(T.value)}]})}),Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:Z.label,rows:[{key:"value",label:b.throughput,color:r(B.get(Z.key)?.index??0,Z.color,Z.tone),value:N(Q.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-N7YHXL2F.js";import{IconButton_default as a}from"./chunk-UGOJLNYR.js";import{Icon as r}from"./chunk-UIWGVOFH.js";import{Tooltip as i}from"./chunk-QQ2LDC6C.js";import{jsx as t,jsxs as n,Fragment as o}from"react/jsx-runtime";var d="h-3.5 w-3.5",s={padding:{top:/* @__PURE__ */t(r,{name:"padding-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"padding-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"padding-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"padding-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"padding-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"padding-left-right","aria-hidden":"true",className:d})},crop:{top:/* @__PURE__ */t(r,{name:"crop-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"crop-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"crop-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"crop-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"crop-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"crop-left-right","aria-hidden":"true",className:d})}},l=/* @__PURE__ */t(r,{name:"sides-each","aria-hidden":"true",className:"h-4 w-4"});var m=(e,a,r)=>null===e[r]?a[r]:String(e[r]);function c(e,a){const r=r=>m(e,a,r);return r("left")!==r("right")||r("top")!==r("bottom")}function h({label:a,value:r,onChange:i,each:d,placeholder:l,words:c,min:h=0,max:p=200,step:u=4,readOnly:g,glyphs:f="padding"}){const N=s[f],b=(a,n,o)=>{const d=function(e,a){const r=a.map(a=>e[a]);return r.every(e=>e===r[0])?r[0]:"mixed"}(r,a),s=a.map(e=>m(r,l,e)),f="mixed"!==d&&s.every(e=>e===s[0])?s[0]:"–";/* @__PURE__ */
|
|
2
2
|
return t("div",{"data-side":a.join("-"),className:"min-w-0",children:/* @__PURE__ */t(e,{value:"mixed"===d?null:d,onChange:e=>((e,a)=>{const t={...r};for(const r of e)t[r]=a;i(t)})(a,e),min:h,max:p,step:u,snap:!0,precision:0,steppers:"compact",readOnly:g,placeholder:f,prefix:o,suffix:c.unit,"aria-label":n})})};/* @__PURE__ */
|
|
3
3
|
return t("div",{role:"group","aria-label":a,"data-sides":d?"each":"pairs",className:"grid min-w-0 grid-cols-2 gap-2",children:/* @__PURE__ */n(o,d?{children:[b(["left"],c.sides.left,N.left),b(["top"],c.sides.top,N.top),b(["right"],c.sides.right,N.right),b(["bottom"],c.sides.bottom,N.bottom)]}:{children:[b(["left","right"],c.horizontal,N.horizontal),b(["top","bottom"],c.vertical,N.vertical)]})})}function p({each:e,onChange:r,label:n,disabled:o}){/* @__PURE__ */
|
|
4
4
|
return t(i,{content:n,children:/* @__PURE__ */t(a,{size:"md","aria-label":n,"aria-pressed":e,disabled:o,onClick:()=>r(!e),children:l})})}export{p as SidesEachToggle,h as SidesInput,c as sidesStartEach};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as l}from"./chunk-2762IAB7.js";import{dialogA11y as a}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as o}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as s}from"./chunk-CDAJKLGL.js";import{Icon as d}from"./chunk-UIWGVOFH.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{useHydrated as m}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as p}from"./chunk-43MCNASD.js";import{useRef as f,useId as h,useState as x,useEffect as v}from"react";import{createPortal as b}from"react-dom";import{jsxs as y,Fragment as g,jsx as k}from"react/jsx-runtime";var N={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function j({open:j,onClose:w,title:C,description:D,role:W="dialog",children:A,footer:I,blocking:L=!1,size:T="md",aside:U=!1,dirty:V=!1,initialFocus:F,"aria-label":G,"aria-labelledby":J,"aria-describedby":S,className:$=""}){const z=f(null),B=h(),H=h(),P=!L,Q=h(),X=p().dialog,K=e(m()),[M,O]=x(null),Y=l({open:j,dirty:V,onClose:w,title:C,layer:M}),Z=f(null),q=r(j&&null!==K,Z),E=i(q,z);if(o(j),n(z,j&&null!==K,F),s(j),v(()=>{if(j)return u(()=>(L||Y(),!0),()=>z.current)},[j,L,Y]),!j||!K)return null;/* @__PURE__ */
|
|
2
|
+
return y(g,{children:[/* @__PURE__ */k("span",{ref:Z,hidden:!0,"data-popup-anchor":""}),b(
|
|
3
|
+
/* @__PURE__ */k(t,{value:M,children:/* @__PURE__ */y("div",{ref:O,className:"fixed inset-0"+(U?" pointer-events-none opacity-0":""),style:{zIndex:c.overlay},role:"presentation","data-overlay-layer":"","data-aside":U?"":void 0,children:[
|
|
4
|
+
/* @__PURE__ */k("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
|
|
5
|
+
/* @__PURE__ */k("div",{className:q?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:L?void 0:e=>{e.target===e.currentTarget&&Y()},children:/* @__PURE__ */y("div",{ref:z,"data-popup-panel":"",style:q?{left:E?.left??0,top:E?.top??0,visibility:E?void 0:"hidden"}:void 0,...a({role:W,modal:!0,titleId:C?Q:void 0,labelledBy:J,label:G}),"aria-describedby":S??(D?H:A?B:void 0),className:`${q?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${N[T]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${$}`.trim(),children:[C&&/* @__PURE__ */k("h2",{id:Q,className:(P?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:C}),D&&/* @__PURE__ */k("p",{id:H,className:((C?"mt-1":P?"pr-8":"")+" text-sm text-gray-500").trim(),children:D}),A&&/* @__PURE__ */k("div",{id:B,className:"mt-2 text-sm text-gray-600",children:A}),I&&/* @__PURE__ */k("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:I}),P&&/* @__PURE__ */k("button",{type:"button",onClick:Y,"aria-label":X.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */k(d,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),K)]})}export{j as Dialog};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-H6PFTU3L.js";import{IconButton_default as a}from"./chunk-
|
|
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":L,windows:
|
|
3
|
-
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),
|
|
4
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:
|
|
5
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:
|
|
6
|
-
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":L??q.formatting,children:
|
|
1
|
+
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-H6PFTU3L.js";import{IconButton_default as a}from"./chunk-UGOJLNYR.js";import{Icon as o}from"./chunk-UIWGVOFH.js";import{Tooltip as n}from"./chunk-QQ2LDC6C.js";import{useShellStrings as s}from"./chunk-43MCNASD.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":L,windows:j,className:A="",layout:U="grid"}){const q=s().textToolbar,I=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!I.words&&!I.paragraph)return null;const R=m(n,k,x,I.cells.paragraph),S=(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:S(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:S(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,B=l(q),T=e.map(e=>[e,B[e],r(e)]),H=C?e.filter(e=>C.allow.includes(e)):[],K=C&&H.includes(C.value)?C.value:H[0],O=[["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"})]],F=x&&R?g(q.clear,/* @__PURE__ */i(a,{className:S(!1),"aria-label":q.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,G=/* @__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:S(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"===R?F:null]}),Q=/* @__PURE__ */t(d,{children:[C&&H.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.alignment,onKeyDown:e=>p(e,H,e=>C.onChange(e)),children:T.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:S(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:S("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:S("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,O.map(([e])=>e),e=>M.onChange(e)),children:O.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:S(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"===R?F:null]}),E="row"===U,J=E?" is-row":I.flow?" is-flow":I.oneRow?" is-one-row":I.words&&void 0===N&&"words"!==R?" is-eight":"",P=b(n,Boolean(k)),V={"--rosh-tb-color-col":String(P.color),"--rosh-tb-link-col":String(P.link),...E?{"--rosh-tb-cells":String(I.cells.words+I.cells.paragraph),"--rosh-tb-groupgap":I.words&&I.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let W;return W=E?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[I.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:G}):null,I.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:Q}):null]}):I.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[G,
|
|
3
|
+
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),Q]}):I.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
+
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:G}),
|
|
5
|
+
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:Q})]}):/* @__PURE__ */t(d,{children:[I.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==R?" is-eight":""),children:G}):null,I.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:Q}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${J} ${A}`.trim(),style:V,children:[
|
|
6
|
+
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":L??q.formatting,children:W}),j]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{renderMenuEntries as e,menuStatusIds as t}from"./chunk-
|
|
2
|
-
return p(n,{portal:!0,minWidth:x,style:
|
|
1
|
+
import{renderMenuEntries as e,menuStatusIds as t}from"./chunk-EB2UE6ZR.js";import{PopupMenu as n,MenuSemanticsContext as r}from"./chunk-IFQXTIMY.js";import{leavesContextMenuAlone as o}from"./chunk-5QFPTDQF.js";import{placeAtPoint as i,popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useRef as s,useId as a,useState as d,useEffect as m,useCallback as f}from"react";import{jsx as p,jsxs as v}from"react/jsx-runtime";function h(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(e=>!e.closest("[data-popup-submenu-panel]")):[]}function w({at:o,onClose:w,items:y,linkAs:g,children:k,owner:E,"aria-label":b,minWidth:x=180,className:H="",autoFocus:D=!0}){const L=s(null),j=a(),[A,S]=d(null),U=s(w);U.current=w,c(()=>{const e=L.current?.closest("[data-popup-menu-tree]");if(!e)return;const t={width:e.offsetWidth,height:e.offsetHeight},n=i({point:o,menu:t,bounds:l(E??null)});S(e=>e&&e.left===n.left&&e.top===n.top&&e.maxHeight===n.maxHeight?e:{left:n.left,top:n.top,maxHeight:n.maxHeight,scroll:t.height>n.maxHeight})},[o.x,o.y,E]);const C=s(null),T=s(!1);m(()=>(C.current=document.activeElement,()=>{const e=document.activeElement;e&&e!==document.body&&!L.current?.contains(e)||C.current?.focus?.({preventScroll:!0})}),[]),m(()=>{A&&!T.current&&D&&(T.current=!0,h(L.current)[0]?.focus({preventScroll:!0}))},[A,D]),m(()=>{if(D)return;const e=e=>{if(L.current?.contains(document.activeElement))return;const t=h(L.current),n="ArrowDown"===e.key||"Home"===e.key?t[0]:"ArrowUp"===e.key||"End"===e.key?t[t.length-1]:void 0;n&&(e.preventDefault(),n.focus({preventScroll:!0}))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[D]),m(()=>u(e=>"Escape"===e.key&&(U.current(),!0),()=>L.current),[]),m(()=>{const e=()=>U.current();return window.addEventListener("resize",e),window.addEventListener("blur",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("blur",e),window.removeEventListener("scroll",e,!0)}},[]);const F=f(e=>{if(e.target.closest("[data-popup-submenu-panel]"))return;if("Tab"===e.key)return e.preventDefault(),void U.current();const t=h(L.current);if(0===t.length)return;const n=t.indexOf(document.activeElement),r="ArrowDown"===e.key?(n+1)%t.length:"ArrowUp"===e.key?n<=0?t.length-1:n-1:"Home"===e.key?0:"End"===e.key?t.length-1:-1;r<0||(e.preventDefault(),t[r].focus())},[]),Q=A?{left:A.left,top:A.top,maxHeight:A.maxHeight,...A.scroll?{overflowY:"auto"}:{}}:{left:o.x,top:o.y,visibility:"hidden"};/* @__PURE__ */
|
|
2
|
+
return p(n,{portal:!0,minWidth:x,style:Q,onClose:w,className:H,children:/* @__PURE__ */p(r.Provider,{value:!0,children:/* @__PURE__ */v("div",{ref:L,id:j,role:"menu","aria-label":b,"aria-describedby":y?t(y,j):void 0,"data-context-menu":"",onKeyDown:F,children:[y&&e(y,{menuId:j,choose:e=>{e.disabled||(U.current(),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>U.current(),linkAs:g}),k]})})})}function y(){const[e,t]=d(null),n=f(()=>t(null),[]),r=f((e,n)=>{const r="nativeEvent"in e?e.nativeEvent:e;if(o(r))return!1;e.preventDefault();const i=e.target instanceof Element?e.target:null;let{clientX:l,clientY:c}=e;if(0===l&&0===c&&i){const e=i.getBoundingClientRect();l=e.left,c=e.bottom}return t({x:l,y:c,data:n,owner:i}),!0},[]),i=f(e=>{r(e,void 0)},[r]);return{open:r,onContextMenu:i,close:n,state:e,props:{at:{x:e?.x??0,y:e?.y??0},owner:e?.owner??null,onClose:n}}}export{w as ContextMenu,y as useContextMenu};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{onOverlayOpen as t}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as e}from"./chunk-62LW225J.js";import{followAnchor as r,popupBounds as o,VIEWPORT_MARGIN as n,showingBox as i,placeBeside as a,placeArrow as l}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{
|
|
1
|
+
import{onOverlayOpen as t}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as e}from"./chunk-62LW225J.js";import{followAnchor as r,popupBounds as o,VIEWPORT_MARGIN as n,showingBox as i,placeBeside as a,placeArrow as l}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as s,escapeSurfaceAbove as d}from"./chunk-TWVUQUUD.js";import{solidSurfaceStyle as h}from"./chunk-5FYDNH4Y.js";import{createContext as m,useContext as u,useState as p,useRef as f,useId as x,useEffect as w,isValidElement as g,cloneElement as b}from"react";import{createPortal as v}from"react-dom";import{jsxs as y,jsx as k}from"react/jsx-runtime";var j=m(!1),H=()=>u(j),W={top:"bottom-full left-1/2 -translate-x-1/2 mb-3",bottom:"top-full left-1/2 -translate-x-1/2 mt-3",left:"right-full top-1/2 -translate-y-1/2 mr-3",right:"left-full top-1/2 -translate-y-1/2 ml-3"};function N({content:m,side:u="top",delay:H=200,children:N,className:B="relative inline-flex",describe:T=!0,open:M}){const[D,U]=p(!1),z=(M??D)&&!(null==m||!1===m||""===m),[C,E]=p(null),J=f(void 0),L=f(null),P=f(null),$=x(),F=f(!1),G=()=>{window.clearTimeout(J.current),F.current||(J.current=window.setTimeout(()=>U(!0),H))},R=()=>{window.clearTimeout(J.current),U(!1)},Y=()=>{F.current=!0,R()},I=()=>{F.current=!1,R()};w(()=>()=>window.clearTimeout(J.current),[]),c(()=>{if(!z)return void E(null);const t=()=>{const t=L.current,e=P.current;if(!t||!e)return;const r=o(t),c=Math.max(0,r.right-r.left-2*n),s=Math.max(0,r.bottom-r.top-2*n);e.style.maxWidth=`${c}px`,e.style.maxHeight=`${s}px`;const d=e.getBoundingClientRect();if(d.width<=0||d.height<=0)return;const h=t.getBoundingClientRect();if(!i(t))return void R();const m=a(h,d,u,r,12),p=l(h,m,d,16,6),f={anchor:{left:h.left,top:h.top,width:h.width,height:h.height},left:m.left-h.left,top:m.top-h.top,maxWidth:c,maxHeight:s,side:m.side,arrow:p&&{left:p.x-h.left,top:p.y-h.top}};E(t=>{return t&&(r=f,(e=t).anchor.left===r.anchor.left&&e.anchor.top===r.anchor.top&&e.anchor.width===r.anchor.width&&e.anchor.height===r.anchor.height&&e.left===r.left&&e.top===r.top&&e.maxWidth===r.maxWidth&&e.maxHeight===r.maxHeight&&e.side===r.side&&e.arrow?.left===r.arrow?.left&&e.arrow?.top===r.arrow?.top)?t:f;var e,r})};return t(),r(()=>L.current,t)},[z,u,m]),w(()=>{if(!z)return;const e=s(t=>"Escape"===t.key&&(R(),!d(L.current))),r=t(R);return()=>{e(),r()}},[z]);const Q=z&&T?$:void 0,S=g(N)?b(N,{"aria-describedby":[N.props["aria-describedby"],Q].filter(Boolean).join(" ")||void 0}):N,V=z?h():void 0;/* @__PURE__ */
|
|
2
2
|
return y("span",{ref:L,className:B,"aria-describedby":g(N)?void 0:Q,onMouseEnter:G,onMouseLeave:I,onFocus:t=>{let e=!0;try{e=t.target.matches(":focus-visible")}catch{}e&&G()},onBlur:I,onPointerDown:Y,onClick:Y,children:[
|
|
3
3
|
/* @__PURE__ */k(j.Provider,{value:!0,children:S}),z&&v(
|
|
4
4
|
/* @__PURE__ */y("span",{className:"pointer-events-none fixed left-0 top-0",style:{zIndex:e.hint,...C?.anchor},children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ErrorPage as r}from"./chunk-CNVYM3HP.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-
|
|
1
|
+
import{ErrorPage as r}from"./chunk-CNVYM3HP.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-UJJXWLHE.js";import{useShellStrings as s}from"./chunk-43MCNASD.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
|
|
2
2
|
return a(n,{children:r(s().errors)})}var l=class extends o{state={error:null};static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,t){console.error("ErrorBoundary caught an error:",r,t),e(r),this.props.onError?.(r,t)}componentDidUpdate(r){if(!this.state.error)return;const e=r.resetKeys??[],t=this.props.resetKeys??[];(e.length!==t.length||e.some((r,e)=>!Object.is(r,t[e])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
|
|
3
3
|
/* @__PURE__ */i("div",{className:"flex h-full flex-col",children:[
|
|
4
4
|
/* @__PURE__ */a("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */a(r,{code:500,actions:/* @__PURE__ */i(n,{children:[
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{
|
|
2
|
-
/* @__PURE__ */f("div",{className:`flex h-full flex-col ${
|
|
3
|
-
/* @__PURE__ */p(
|
|
1
|
+
import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-KUEYOJBN.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-UIWGVOFH.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-43MCNASD.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:C=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:O="bg-white"}){const W="right"===m,j=i().sidebar,z=a(),D=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[E,I]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),P=null!=l||null!=n,K=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:E},children:[
|
|
2
|
+
/* @__PURE__ */f("div",{className:`flex h-full flex-col ${P?"overflow-hidden":"overflow-y-auto"} ${C}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),P?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
|
|
3
|
+
/* @__PURE__ */p(t,{side:m,width:E,onResize:I,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:j.resize})]}),M=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${O}`,children:u});/* @__PURE__ */
|
|
4
4
|
return f("div",z?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
|
|
5
|
-
/* @__PURE__ */p(g,{phone:D,top:
|
|
6
|
-
/* @__PURE__ */p(v,{phone:D,bottom:n,label:j.sections,closeLabel:j.closeSections,children:
|
|
5
|
+
/* @__PURE__ */p(g,{phone:D,top:l,fallback:j.sections}),M,
|
|
6
|
+
/* @__PURE__ */p(v,{phone:D,bottom:n,label:j.sections,closeLabel:j.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[W?null:K,M,W?K:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
|
|
7
7
|
return f("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
|
|
8
|
-
/* @__PURE__ */f("button",{ref:
|
|
8
|
+
/* @__PURE__ */f("button",{ref:l.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":l.open,onClick:()=>l.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
|
|
9
9
|
/* @__PURE__ */p("span",{className:"min-w-0 truncate",children:0===a.length?t:a.map((e,l)=>/* @__PURE__ */f(u,{children:[l>0&&" · ",e]},l))}),
|
|
10
|
-
/* @__PURE__ */p(n,{name:"chevron-down",className:"size-4 shrink-0",strokeWidth:2,"aria-hidden":"true"})]}),null!=
|
|
11
|
-
/* @__PURE__ */f(
|
|
12
|
-
/* @__PURE__ */f("div",{ref:o,role:"dialog","aria-modal":"true","aria-label":
|
|
10
|
+
/* @__PURE__ */p(n,{name:"chevron-down",className:"size-4 shrink-0",strokeWidth:2,"aria-hidden":"true"})]}),null!=r&&/* @__PURE__ */p(e.Provider,{value:!0,children:/* @__PURE__ */p("div",{className:"flex min-w-0 max-w-[60%] shrink-0 items-center gap-2",children:r})})]})}function v({phone:e,bottom:r,label:t,closeLabel:a,children:n}){const o=c(null),{open:i,setOpen:s,trigger:d}=e,h=()=>{s(!1),o.current?.contains(document.activeElement)&&d.current?.focus()};return m(()=>{i&&o.current?.focus()},[i]),
|
|
11
|
+
/* @__PURE__ */f(l.Provider,{value:e.api,children:[i&&/* @__PURE__ */p("button",{type:"button","aria-label":a,onClick:h,className:"absolute inset-0 z-(--z-in-box) cursor-default bg-gray-900/40"}),
|
|
12
|
+
/* @__PURE__ */f("div",{ref:o,role:"dialog","aria-modal":"true","aria-label":t,tabIndex:-1,"data-sidebar-section-sheet":!0,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),h())},onClick:e=>{const l=e.target.closest("button, a");!l||l.hasAttribute("aria-expanded")||l.closest("[data-sheet-keep-open]")||h()},className:(i?"flex":"hidden")+" absolute inset-x-0 bottom-0 z-(--z-in-box) max-h-[75%] flex-col rounded-t-2xl bg-white pt-2 shadow-(--elevation-dialog)",children:[
|
|
13
13
|
/* @__PURE__ */p("div",{className:"mx-auto mb-2 h-1 w-9 shrink-0 rounded-full bg-gray-300","aria-hidden":"true"}),
|
|
14
|
-
/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 pb-3",children:n}),null!=
|
|
14
|
+
/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 pb-3",children:n}),null!=r&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:r})]})]})}export{x as SidebarLayout};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-
|
|
1
|
+
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-N7JX27JE.js";import{Icon as l}from"./chunk-UIWGVOFH.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-43MCNASD.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
|
|
2
2
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate",children:e}),
|
|
3
|
-
/* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),
|
|
4
|
-
/* @__PURE__ */m("span",{"aria-hidden":"true",title:
|
|
5
|
-
/* @__PURE__ */m("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof l?l:void 0,children:l}),y&&/* @__PURE__ */m("span",{className:"sr-only",children:
|
|
6
|
-
return m("button",1===k?{ref:
|
|
3
|
+
/* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),N=i().severity,v=y?n(y,N):void 0,j=e(),S=o(),C=c(null),I=c(l);I.current=l,s(()=>{if(j&&d)return j.report(S,()=>I.current,C.current)},[j,d,S]);const W=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
|
|
4
|
+
/* @__PURE__ */m("span",{"aria-hidden":"true",title:v,className:`shrink-0 h-1.5 w-1.5 rounded-full ${y.fill}`}),
|
|
5
|
+
/* @__PURE__ */m("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof l?l:void 0,children:l}),y&&/* @__PURE__ */m("span",{className:"sr-only",children:v}),null!=a&&/* @__PURE__ */m(r,{count:a,label:u,active:d}),null!=g&&/* @__PURE__ */m("span",{className:"shrink-0",children:g})]});/* @__PURE__ */
|
|
6
|
+
return m("button",1===k?{ref:C,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:W})}:{ref:C,type:"button",onClick:f,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(d?"bg-accent-tint font-medium text-blue-700":"text-ink hover:bg-gray-100"),children:W})}function g({label:e,count:t,countLabel:n,children:i,defaultExpanded:c=!0,storageKey:s}){const p=o(),[f,b]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return c},c),x=!f&&u.toArray(i).some(e=>d(e)&&!0===e.props.active);/* @__PURE__ */
|
|
7
7
|
return h("div",{children:[
|
|
8
8
|
/* @__PURE__ */h("button",{type:"button",onClick:()=>{const e=!f;if(b(e),s)try{window.localStorage.setItem(s,e?"1":"0")}catch{}},"aria-expanded":f,"aria-controls":p,className:"flex w-full items-center gap-2 rounded-lg h-8 px-3 text-sm font-medium text-left "+(x?"bg-accent-tint text-blue-700":"text-ink-strong hover:bg-gray-100"),children:[
|
|
9
9
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate",title:e,children:e}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-JDQGHQ2C.js";import{Tooltip as l}from"./chunk-
|
|
2
|
-
return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=f(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),w(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${h(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,w=(e,t)=>`${e}-panel-${t}`;function y(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:f,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:C,className:F="","aria-label":E,"aria-labelledby":
|
|
3
|
-
return s("div",{ref
|
|
1
|
+
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-JDQGHQ2C.js";import{Tooltip as l}from"./chunk-QQ2LDC6C.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{useRef as i,useState as c,useEffect as d}from"react";import{jsx as s,jsxs as u,Fragment as m}from"react/jsx-runtime";var b=(e,t)=>`flex items-center border-b border-gray-200${e?"":" gap-1"} ${t}`.trim();function h(e,t,n="default"){return`-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t?"flex-1 justify-center ":""}${e?"border-blue-600 text-blue-600":`border-transparent ${"warning"===n?"text-amber-700":"text-gray-900"} hover:border-gray-300`}`}function f(e){if(!e||!e.startsWith("#")||e.length<2)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch{return null}}function p(e,t){const n=e.filter(e=>!e.disabled).map(e=>({id:e.id,section:f(e.href)})).filter(e=>null!=e.section);if(0===n.length)return null;const r=function(e){for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t).overflowY;if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t}return document.scrollingElement??document.documentElement}(n[0].section);if(r.scrollTop>0&&r.scrollTop+r.clientHeight>=r.scrollHeight-1)return n[n.length-1].id;const o=Math.max(0,t.getBoundingClientRect().bottom)+8;let l=n[0].id;for(const e of n)e.section.getBoundingClientRect().top<=o&&(l=e.id);return l}function g({items:e,value:n,onChange:o,block:c=!1,className:u="","aria-label":m,"aria-labelledby":g}){const v=i(null),w=function(e,t,n,r){const o=i(0),l=i({items:t,value:n,onChange:r});l.current={items:t,value:n,onChange:r};const c=i(()=>{});return c.current=()=>{const t=e.current;if(!t||Date.now()<o.current)return;const n=p(l.current.items,t);null!=n&&n!==l.current.value&&l.current.onChange(n)},a(()=>{c.current()},[t]),d(()=>{let e=0;const t=()=>{e||(e=requestAnimationFrame(()=>{e=0,c.current()}))};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t),e&&cancelAnimationFrame(e)}},[]),e=>{o.current=Date.now()+800,e!==l.current.value&&l.current.onChange(e),window.setTimeout(()=>c.current(),850)}}(v,e,n,o);/* @__PURE__ */
|
|
2
|
+
return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=f(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),w(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${h(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,w=(e,t)=>`${e}-panel-${t}`;function y(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:f,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:C,className:F="","aria-label":E,"aria-labelledby":L,labelsFit:R=!1}){const A=i([]),$=i(null),N="pill"===x,[D,S]=c(null),H=D??"none",W=i(()=>{});W.current=()=>{const t=$.current;if(!t||!R)return;const n=function(e){return[...e.querySelectorAll('[role="tab"]')].map(e=>{const t=getComputedStyle(e),n=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)+(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),r=e.querySelector("[data-tab-glyph]")?.getBoundingClientRect().width??0,o=e.querySelector("[data-tab-word]")?.scrollWidth??0;return{bare:n+r,worded:n+r+(r&&o?8:0)+o,active:"true"===e.getAttribute("aria-selected")}})}(t);S(function({tabs:t,block:n,chrome:r,room:o}){if(!n)return e({buttons:t,orientation:"horizontal",chrome:r,room:o});if(0===t.length)return"none";const l=e=>r+e*t.length<=o+.5;if(l(Math.max(...t.map(e=>e.worded))))return"all";const a=t.find(e=>e.active);return a&&l(Math.max(a.worded,...t.map(e=>e.bare)))?"chosen":"none"}({tabs:n,block:k,...y(t,n.length)}))},a(()=>{W.current()}),d(()=>{const e=$.current?.parentElement;if(!R||!e)return;let t=!0;const n=()=>{t&&W.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[R]);const j=(e,t)=>{for(let n=1;n<=f.length;n+=1){const r=((e+t*n)%f.length+f.length)%f.length;if(!f[r]?.disabled)return r}return null},M=e=>{const t=1===e?f.map((e,t)=>t):f.map((e,t)=>f.length-1-t);for(const e of t)if(!f[e]?.disabled)return e;return null};/* @__PURE__ */
|
|
3
|
+
return s("div",{ref:$,role:"tablist","data-labels-shown":R?H:void 0,"aria-label":E,"aria-labelledby":L,onKeyDown:e=>{const t=f.findIndex(e=>e.id===p);let n=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)n=j(t,1);else if("ArrowLeft"===e.key||"ArrowUp"===e.key)n=j(t,-1);else if("Home"===e.key)n=M(1);else{if("End"!==e.key)return;n=M(-1)}e.preventDefault(),null!==n&&n!==t&&(g(f[n].id),A.current[n]?.focus())},className:N?o(k,F):b(k,F),children:f.map((e,o)=>{const a=e.id===p,i=R&&null!=e.icon,c="all"===H||"chosen"===H&&a,d=/* @__PURE__ */s("button",{ref:e=>{A.current[o]=e},type:"button",role:"tab",id:C?v(C,e.id):void 0,"aria-controls":C?w(C,e.id):void 0,"aria-selected":a,tabIndex:a?0:-1,disabled:e.disabled,onClick:()=>g(e.id),className:N?n({selected:a,disabled:e.disabled,block:k}):h(a,k,"warning"===e.tone?"warning":"default"),children:i?/* @__PURE__ */u(m,{children:[
|
|
4
4
|
/* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-glyph":"",className:"inline-flex shrink-0",children:e.icon}),
|
|
5
|
-
/* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:e.label})]}):/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id),b=i?e.tooltip??e.label:e.tooltip;return null!=b&&!1!==b?/* @__PURE__ */s(l,{content:b,className
|
|
5
|
+
/* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:e.label})]}):/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id),b=i?e.tooltip??e.label:e.tooltip;return null!=b&&!1!==b?/* @__PURE__ */s(l,{content:b,className:N||k?r(k):void 0,children:d},e.id):d})})}export{x as Tabs,v as tabButtonId,w as tabPanelId};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tooltip as r}from"./chunk-
|
|
1
|
+
import{Tooltip as r}from"./chunk-QQ2LDC6C.js";import{useShellStrings as e}from"./chunk-43MCNASD.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";var i="Alt+ArrowUp Alt+ArrowDown";function c(r){return!r.altKey||r.ctrlKey||r.metaKey?null:"ArrowUp"===r.key?"up":"ArrowDown"===r.key?"down":null}var a=/* @__PURE__ */n("svg",{"aria-hidden":"true",viewBox:"0 0 4 14",fill:"currentColor",className:"h-3.5 w-1",children:[
|
|
2
2
|
/* @__PURE__ */t("circle",{cx:"2",cy:"3",r:"1.1"}),
|
|
3
3
|
/* @__PURE__ */t("circle",{cx:"2",cy:"7",r:"1.1"}),
|
|
4
4
|
/* @__PURE__ */t("circle",{cx:"2",cy:"11",r:"1.1"})]});function l({hint:n,dragging:i,revealClassName:c,marker:l}){const o=e().tree;/* @__PURE__ */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{usePlotWidth as e}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as l,CHART_INK as r}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as n}from"./chunk-TWVUQUUD.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-43MCNASD.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:N=2}){const j=i().charts,C=a(),D=$??(e=>o(e,C)),U=b??j.intensity,z=w??j.noActivity,F=h(null),S=e(F),R=g??S,V=c(),[L,Q]=s(null);if(m(()=>{if(null!==L)return n(e=>"Escape"===e.key&&(Q(null),!0))},[L]),0===x.length||0===d.length)/* @__PURE__ */
|
|
2
|
+
return f("div",{className:k,ref:F,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:z})});const B=y??l(0),E=v??Math.max(1,...p.flat().filter(Number.isFinite)),G=96,I=26*x.length,T=M??I+26+26,W=Math.max(2,(Math.max(97,R)-G)/d.length),Z=e=>{const t=E>0?Math.max(0,Math.min(1,e/E)):0;return`color-mix(in oklab, ${B} ${(8+92*t).toFixed(1)}%, ${r.surface})`};/* @__PURE__ */
|
|
3
|
+
return u("div",{className:`relative ${k??""}`,ref:F,children:[
|
|
4
|
+
/* @__PURE__ */u("svg",{width:"100%",height:T,viewBox:`0 0 ${R} ${T}`,role:"img","aria-label":j.heatmap(U,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Q(null),onBlur:()=>Q(null),onKeyDown:e=>{const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:0,l="ArrowRight"===e.key?1:"ArrowLeft"===e.key?-1:0;0===t&&0===l||(e.preventDefault(),Q(e=>({r:Math.min(x.length-1,Math.max(0,(e?.r??0)+t)),c:Math.min(d.length-1,Math.max(0,(e?.c??0)+l))})))},children:[
|
|
5
|
+
/* @__PURE__ */f("defs",{children:/* @__PURE__ */u("linearGradient",{id:V,x1:"0",x2:"1",children:[
|
|
6
|
+
/* @__PURE__ */f("stop",{offset:"0",stopColor:Z(0)}),
|
|
7
|
+
/* @__PURE__ */f("stop",{offset:"1",stopColor:Z(E)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:r.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=L&&(L.r!==t||L.c!==r);/* @__PURE__ */
|
|
8
|
+
return f("rect",{x:G+r*W+A/2,y:26*t+A/2,width:Math.max(1,W-A),height:26-A,rx:N,fill:Z(n),opacity:i?.55:1,onMouseEnter:()=>Q({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${D(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((R-G)/56))))===0?/* @__PURE__ */f("text",{x:G+t*W+W/2,y:I+15,textAnchor:"middle",fontSize:11,fill:r.label,children:e},`c${t}`):null),
|
|
9
|
+
/* @__PURE__ */f("rect",{x:G,y:I+26,width:Math.min(180,Math.max(40,R-G)),height:8,rx:4,fill:`url(#${V})`}),
|
|
10
|
+
/* @__PURE__ */f("text",{x:G,y:I+48,fontSize:11,fill:r.label,children:"0"}),
|
|
11
|
+
/* @__PURE__ */f("text",{x:G+Math.min(180,Math.max(40,R-G)),y:I+48,textAnchor:"end",fontSize:11,fill:r.label,style:{fontVariantNumeric:"tabular-nums"},children:D(E)})]}),L&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(t,{title:`${x[L.r]} · ${d[L.c]}`,rows:[{key:"v",label:U,color:B,value:null==p[L.r]?.[L.c]?void 0:D(p[L.r][L.c])}]})})]})}export{x as HeatmapChart};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{swallowPress as e,describedByWith as r,OffWithReason as i}from"./chunk-
|
|
1
|
+
import{swallowPress as e,describedByWith as r,OffWithReason as i}from"./chunk-XWFLIGDQ.js";import{Tooltip as o}from"./chunk-QQ2LDC6C.js";import{useId as a,useRef as n}from"react";import{jsx as t}from"react/jsx-runtime";var l={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function s({label:s,value:d,points:c,onChange:u,disabled:b=!1,disabledReason:v,id:f,className:g=""}){const h=a(),m=n([]),p=c.findIndex(e=>e.value===d),x=c.findIndex(e=>!b&&!0!==e.disabled),w=p>=0?p:Math.max(0,x);/* @__PURE__ */
|
|
2
2
|
return t("div",{id:f,role:"radiogroup","aria-label":s,className:`grid w-max grid-cols-3 gap-px overflow-hidden rounded-(--radius-control) border border-line bg-gray-200 ${g}`.trim(),children:c.map((a,n)=>{const s=d===a.value,f=b||!0===a.disabled,g=f&&(!0===a.disabled&&a.title||(b?v:void 0))||void 0,p=`${h}-${n}`,x=/* @__PURE__ */t("button",{type:"button",role:"radio","aria-checked":s,"aria-label":a.label,"aria-disabled":f||void 0,"aria-describedby":r(void 0,g?p:void 0),ref:e=>{m.current[n]=e},tabIndex:n===w?0:-1,onKeyDown:e=>((e,r)=>{const i=l[r.key];if(!i)return;r.preventDefault();const o=Math.floor(e/3)+i[0],a=e%3+i[1];if(o<0||a<0||a>=3)return;const n=3*o+a;if(n>=c.length)return;m.current[n]?.focus();const t=c[n];b||!0===t.disabled||t.value===d||u(t.value)})(n,e),onClick:f?e:()=>u(a.value),className:"group relative flex size-(--control-height-lg) items-center justify-center transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring)] aria-disabled:cursor-not-allowed aria-disabled:opacity-60 "+(s?"bg-accent-tint hover:bg-blue-100":"bg-surface hover:bg-row-hover"),children:a.icon?/* @__PURE__ */t("span",{"data-icon-slot":"","aria-hidden":"true",className:"inline-flex items-center justify-center [&_svg]:h-4 [&_svg]:w-4 "+(s?"text-blue-700":"text-ink-faint group-hover:text-gray-700"),children:a.icon}):/* @__PURE__ */t("span",{"data-dot":"","aria-hidden":"true",className:s?"size-3 rounded-sm bg-accent-fill":"size-1 rounded-full bg-[color:var(--ink-faintest)] transition-colors group-hover:bg-[color:var(--ink-faint)]"})},a.value);return g?/* @__PURE__ */t(i,{reason:g,id:p,block:!0,children:x},a.value):/* @__PURE__ */t(o,{content:a.title??a.label,className:"relative flex",children:x},a.value)})})}export{s as AlignmentGrid};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{squarify as e}from"./chunk-46BYGPGD.js";import{AccessibleTable as t}from"./chunk-EYPKBJYG.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{usePlotWidth as a}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as i,CHART_INK as o}from"./chunk-TZFACUMR.js";import{useShellStrings as n,useShellLocale as m}from"./chunk-43MCNASD.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 M=n().charts,w=m(),N=y??(e=>h(e,w)),$=j??M.nothingToBreakDown,C=c(null),Y=a(C),A=v??Y,[B,D]=u(null),{highlighted:F}=l(),z=e(p,A,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 E=k??i(0),G=Math.max(...z.map(e=>e.value),1),P=e=>34+e/G*62,S=e=>`color-mix(in oklab, ${E} ${P(e).toFixed(0)}%, ${o.surface})`,V=e=>P(e)>=55?o.surface:o.label,H=B??F,I=B?z.find(e=>e.key===B):void 0;/* @__PURE__ */
|
|
3
|
+
return f("div",{className:`relative ${b??""}`,ref:C,children:[
|
|
4
|
+
/* @__PURE__ */s("svg",{width:"100%",height:d,viewBox:`0 0 ${A} ${d}`,role:"img","aria-label":M.treemap(p.length),onMouseLeave:()=>D(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:H&&H!==e.key?.55:1,onMouseEnter:()=>D(e.key),children:[
|
|
6
|
+
/* @__PURE__ */s("rect",{x:e.x+x/2,y:e.y+x/2,width:t,height:l,rx:g,fill:S(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)})}),I&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(r,{title:I.label,rows:[{key:"value",label:M.value,color:S(I.value),value:N(I.value)}]})}),
|
|
7
|
+
/* @__PURE__ */s(t,{caption:M.treemap(p.length),head:[M.tableItem,M.value],rows:z.map(e=>[e.label,N(e.value)])})]})}export{p as TreemapChart};
|