efficient-shell 8.1.0 → 8.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/dist/{Browser-DPZW525X.js → Browser-DWCAT7YU.js} +14 -14
- package/dist/Calculator-B44SNFGQ.js +29 -0
- package/dist/{CurrencyConverter-QGJGHF7D.js → CurrencyConverter-QCXULYMM.js} +8 -8
- package/dist/{Documents-JXWMWUYA.js → Documents-TJGLPXWF.js} +24 -24
- package/dist/Files-6A6VPSMP.js +87 -0
- package/dist/{Notepad-HTD5I4TI.js → Notepad-F42I5BFB.js} +9 -9
- package/dist/{PdfViewer-A4YQDCER.js → PdfViewer-IQQM7DOH.js} +1 -1
- package/dist/{PomodoroTimer-42AKGGPS.js → PomodoroTimer-KUB3JUJO.js} +4 -4
- package/dist/{Preview-KQLFA2TJ.js → Preview-D535MRVA.js} +35 -35
- package/dist/Sidebar-EIGME7VA.js +43 -0
- package/dist/{Spreadsheet-FRU2PYVZ.js → Spreadsheet-PUAIM4ZN.js} +14 -14
- package/dist/{Stock-6YBJY53A.js → Stock-DCQEYEND.js} +3 -3
- package/dist/{Weather-CQIK7FA7.js → Weather-UYCFOHGQ.js} +17 -17
- package/dist/{WorldClock-BR7QFSTH.js → WorldClock-WKMFOBKT.js} +6 -6
- package/dist/ai/index.js +12 -12
- package/dist/apps/index.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/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.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/Meter.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/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/StatTile.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-26DGOAPH.js +14 -0
- package/dist/{chunk-G4FMVIJT.js → chunk-2DGTGJYJ.js} +9 -9
- package/dist/{chunk-AMTFUUOM.js → chunk-2K76HRXS.js} +1 -1
- package/dist/{chunk-RUTL7QGV.js → chunk-2LKH6JM5.js} +1 -1
- package/dist/{chunk-4AXCIQB2.js → chunk-2M5JD52X.js} +2 -2
- package/dist/{chunk-7ZL7SQCN.js → chunk-2QI3QFX6.js} +1 -1
- package/dist/{chunk-3ACF3KU7.js → chunk-2TPUNCT7.js} +9 -9
- package/dist/{chunk-3ATZYGAU.js → chunk-2VLQECPC.js} +10 -10
- package/dist/{chunk-RERVHKA6.js → chunk-332V47ID.js} +2 -2
- package/dist/{chunk-KPF7K32G.js → chunk-3GMHX3WX.js} +4 -4
- package/dist/{chunk-NDMFITDJ.js → chunk-3OKD2ZZV.js} +11 -11
- package/dist/{chunk-QMIPMPCY.js → chunk-3XLVARRX.js} +6 -6
- package/dist/{chunk-DMZL7OH6.js → chunk-42U4LJT7.js} +9 -9
- package/dist/{chunk-A34WQDNB.js → chunk-4A2X6KLQ.js} +1 -1
- package/dist/{chunk-EWQY4JAO.js → chunk-4AFNDOPF.js} +1 -1
- package/dist/{chunk-VAIO7Q4E.js → chunk-4B7ZRWDA.js} +1 -1
- package/dist/{chunk-GNWSAZRJ.js → chunk-4CXQX5AX.js} +14 -14
- package/dist/{chunk-QRAXICBI.js → chunk-4OYSTWMQ.js} +1 -1
- package/dist/{chunk-4VSM4HUV.js → chunk-53XMYVJO.js} +1 -1
- package/dist/{chunk-BDCNHMRN.js → chunk-5J6IC25E.js} +1 -1
- package/dist/{chunk-CKECXOYL.js → chunk-5J6Y5TOO.js} +1 -1
- package/dist/{chunk-PGWITSJM.js → chunk-5K3QLWUX.js} +1 -1
- package/dist/chunk-6L7MMUMP.js +2 -0
- package/dist/{chunk-TB653ATX.js → chunk-6L7V25YL.js} +5 -5
- package/dist/{chunk-EHPSP6M4.js → chunk-7A7HRAC6.js} +11 -11
- package/dist/chunk-7GU3LUMW.js +11 -0
- package/dist/{chunk-GS7EYBPO.js → chunk-7KYFOYC7.js} +5 -5
- package/dist/{chunk-S2WTV2JH.js → chunk-7MX6CMMN.js} +1 -1
- package/dist/chunk-7NEIYFM2.js +8 -0
- package/dist/chunk-7OLYHD4V.js +5 -0
- package/dist/{chunk-ZNEZO35H.js → chunk-7PCV65OU.js} +5 -5
- package/dist/{chunk-VOAVONPN.js → chunk-7UEFFCQV.js} +8 -8
- package/dist/{chunk-JIBCYZE3.js → chunk-AP67GBSX.js} +8 -8
- package/dist/{chunk-TUR6CTGT.js → chunk-B4LK7WL6.js} +2 -2
- package/dist/{chunk-5FWXYW5W.js → chunk-B7IHOBK6.js} +15 -15
- package/dist/{chunk-EHV7LRGU.js → chunk-BGVN7HOZ.js} +2 -2
- package/dist/{chunk-AZSLR5FC.js → chunk-BHGMJBJ2.js} +1 -1
- package/dist/{chunk-X5W2SHXX.js → chunk-BKV6PH3R.js} +1 -1
- package/dist/{chunk-PO7ELC4X.js → chunk-BULQOYV6.js} +4 -4
- package/dist/{chunk-LEMQKX7D.js → chunk-BXRWPGAT.js} +1 -1
- package/dist/{chunk-GDCUF6V4.js → chunk-C4D4L2E5.js} +1 -1
- package/dist/{chunk-UMYEVQSH.js → chunk-CASSD64W.js} +5 -5
- package/dist/{chunk-CCQLM73G.js → chunk-CJUN2VOD.js} +1 -1
- package/dist/{chunk-X3FLNEKK.js → chunk-CP6FITHO.js} +17 -17
- package/dist/{chunk-IRRF3PRX.js → chunk-CP6Q24MP.js} +7 -7
- package/dist/{chunk-4FMMKKAO.js → chunk-CTB634WT.js} +1 -1
- package/dist/{chunk-IFXAQO67.js → chunk-CXDJXNPZ.js} +1 -1
- package/dist/{chunk-MNY3Y4QD.js → chunk-DSBLBBES.js} +6 -6
- package/dist/chunk-DYSUTUH3.js +15 -0
- package/dist/{chunk-BZMFVAOL.js → chunk-EDEQRSJC.js} +1 -1
- package/dist/chunk-EDYCBXWD.js +8 -0
- package/dist/chunk-EKHT4PDR.js +4 -0
- package/dist/chunk-ELVFPH7Y.js +5 -0
- package/dist/{chunk-IU645JAM.js → chunk-ENSA3NAS.js} +1 -1
- package/dist/{chunk-IXPMFIAS.js → chunk-EPHQ7UQV.js} +1 -1
- package/dist/{chunk-6LLCKIV6.js → chunk-EVKBV6IV.js} +1 -1
- package/dist/{chunk-REWKCHIU.js → chunk-EY74CLGD.js} +11 -11
- package/dist/{chunk-OOUVBV2Q.js → chunk-EZQXLIG3.js} +1 -1
- package/dist/chunk-FQEALPZJ.js +1 -0
- package/dist/chunk-GJDK54K6.js +13 -0
- package/dist/{chunk-GM5QZMZH.js → chunk-GVTWQBRU.js} +8 -8
- package/dist/{chunk-P2HKX4VB.js → chunk-H7BP5LLG.js} +1 -1
- package/dist/{chunk-WZZKQJUJ.js → chunk-HFEYQVKD.js} +1 -1
- package/dist/{chunk-SSS5BYD5.js → chunk-IJMV4F2Q.js} +1 -1
- package/dist/{chunk-OXALEGWD.js → chunk-IQDIWKES.js} +1 -1
- package/dist/{chunk-AEIQP73W.js → chunk-JGZWAEOJ.js} +1 -1
- package/dist/{chunk-DM2BSQ26.js → chunk-JK3QY266.js} +6 -6
- package/dist/{chunk-K2CJGZPQ.js → chunk-JWMQEWCV.js} +19 -19
- package/dist/{chunk-IY56TA4R.js → chunk-KFMRV3MK.js} +3 -3
- package/dist/chunk-KXTR2RPB.js +12 -0
- package/dist/{chunk-NYJC7I7T.js → chunk-L42Q6GVA.js} +1 -1
- package/dist/chunk-LPYFS4RV.js +19 -0
- package/dist/{chunk-PDQJIJ2G.js → chunk-M3DZDBS6.js} +9 -9
- package/dist/chunk-MH4EUGAB.js +11 -0
- package/dist/{chunk-4B33A5LV.js → chunk-MXDW5IFQ.js} +1 -1
- package/dist/chunk-MXMBQS75.js +20 -0
- package/dist/{chunk-STC63JLD.js → chunk-N7LV32EQ.js} +1 -1
- package/dist/{chunk-2PT2CDTN.js → chunk-NIULZZAI.js} +4 -4
- package/dist/{chunk-6ZH6RUZN.js → chunk-O6TKI4F5.js} +1 -1
- package/dist/{chunk-V7T3FV6K.js → chunk-OCBAIXM2.js} +5 -5
- package/dist/chunk-OVNRVFWS.js +1 -0
- package/dist/{chunk-MYCBGGOC.js → chunk-OZ2ALRKX.js} +2 -2
- package/dist/{chunk-KWJY7YLC.js → chunk-P25GL5BQ.js} +1 -1
- package/dist/{chunk-4VTZQT4O.js → chunk-PMJMPYLQ.js} +6 -6
- package/dist/{chunk-YH2TXBGF.js → chunk-PPROO6JU.js} +6 -6
- package/dist/{chunk-7BSBTDKK.js → chunk-PPSIMRJM.js} +8 -8
- package/dist/{chunk-M44R4OFV.js → chunk-PZ6D5DYB.js} +1 -1
- package/dist/{chunk-K3WHR66I.js → chunk-QGU24ERZ.js} +1 -1
- package/dist/chunk-QKIVMRK5.js +5 -0
- package/dist/{chunk-LXV7ANUQ.js → chunk-QQVLFDX6.js} +4 -4
- package/dist/chunk-RA2HF3VC.js +10 -0
- package/dist/{chunk-2D7G2OYC.js → chunk-RD5UPROC.js} +6 -6
- package/dist/{chunk-JVQG3EFU.js → chunk-RFNU5AIH.js} +1 -1
- package/dist/{chunk-AZ7SYI4D.js → chunk-SBHLTCGU.js} +1 -1
- package/dist/{chunk-3I4DYCQK.js → chunk-SDIGC5NU.js} +1 -1
- package/dist/{chunk-VCSHT4SZ.js → chunk-SFNLRK5J.js} +7 -7
- package/dist/{chunk-ZXZMSNJN.js → chunk-TAGZV46K.js} +1 -1
- package/dist/chunk-TKLH7V2R.js +9 -0
- package/dist/{chunk-UDX6UJHN.js → chunk-TLZVEW34.js} +4 -4
- package/dist/{chunk-USG3EG2Y.js → chunk-TTE3GZWH.js} +1 -1
- package/dist/{chunk-LLBP42IT.js → chunk-TWWJLFTD.js} +4 -4
- package/dist/{chunk-VXRW6BIC.js → chunk-TYEXEETI.js} +5 -5
- package/dist/chunk-U5PXB4UW.js +9 -0
- package/dist/{chunk-ECX6BCQG.js → chunk-UHW2CFLV.js} +1 -1
- package/dist/{chunk-KJDEW5MD.js → chunk-UL4WB3VH.js} +1 -1
- package/dist/chunk-URBCGEXG.js +1 -0
- package/dist/{chunk-J7I7R5XZ.js → chunk-US5B4QYS.js} +11 -11
- package/dist/{chunk-KTXEQFVQ.js → chunk-US5YOYS3.js} +1 -1
- package/dist/chunk-UWHGJTAL.js +8 -0
- package/dist/{chunk-PZRKVGML.js → chunk-VAACOJ2H.js} +1 -1
- package/dist/{chunk-AZ6UPURX.js → chunk-VH3IMIS2.js} +6 -6
- package/dist/chunk-VJ56YZY6.js +14 -0
- package/dist/chunk-VLOJ4XJC.js +8 -0
- package/dist/{chunk-UU73FP3I.js → chunk-VUYWYMZZ.js} +2 -2
- package/dist/{chunk-IFA3PKKA.js → chunk-WNJLY7CM.js} +11 -11
- package/dist/chunk-X4KIXGW5.js +1 -0
- package/dist/{chunk-NQJJRKUK.js → chunk-XKCEVZZB.js} +1 -1
- package/dist/chunk-XMGXVMVS.js +6 -0
- package/dist/{chunk-7BIMXRDE.js → chunk-XSY22PWH.js} +2 -2
- package/dist/{chunk-R2R7IVKO.js → chunk-XW7KN6HW.js} +12 -12
- package/dist/{chunk-YFBGRCP2.js → chunk-XYA7NPSZ.js} +6 -6
- package/dist/{chunk-OWUVCQG7.js → chunk-Y3XH4HJQ.js} +2 -2
- package/dist/chunk-YEY6YPTM.js +2 -0
- package/dist/chunk-YT32RSS6.js +7 -0
- package/dist/chunk-YUMPKSS4.js +1 -0
- package/dist/{chunk-XOGC427S.js → chunk-YVOGWINT.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.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/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaUploadField.d.ts +13 -2
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/NumericKeypad.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/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/useFileIntake.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/sets.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +263 -263
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +6 -6
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.d.ts +35 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.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/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.d.ts +7 -3
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.d.ts +18 -0
- package/dist/shell/MetricBarLegend.js +2 -0
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.d.ts +10 -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/Statistic.js +1 -1
- package/dist/shell/Tabs.d.ts +32 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +8 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.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/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +2 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +4 -4
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-6XA52RW2.js +0 -29
- package/dist/Files-U7VDQLXQ.js +0 -87
- package/dist/Sidebar-VP27XAG3.js +0 -43
- package/dist/chunk-3CLJLMGC.js +0 -14
- package/dist/chunk-3CORTJSX.js +0 -5
- package/dist/chunk-54LYZJKD.js +0 -4
- package/dist/chunk-5H4ZKLNG.js +0 -8
- package/dist/chunk-5LHPDU6X.js +0 -1
- package/dist/chunk-64KMJHVU.js +0 -2
- package/dist/chunk-CAVMIKH4.js +0 -10
- package/dist/chunk-DHI24QY6.js +0 -10
- package/dist/chunk-DLQHQ2MW.js +0 -10
- package/dist/chunk-HXQ2DB32.js +0 -8
- package/dist/chunk-IQDJ76DD.js +0 -9
- package/dist/chunk-JS34LPLL.js +0 -11
- package/dist/chunk-K4K3YDW6.js +0 -14
- package/dist/chunk-K5Q5RIQT.js +0 -6
- package/dist/chunk-K62MSU6T.js +0 -8
- package/dist/chunk-KVNWMSXP.js +0 -2
- package/dist/chunk-MFUGVAP5.js +0 -2
- package/dist/chunk-OLASMUGT.js +0 -8
- package/dist/chunk-QAVNMU6V.js +0 -9
- package/dist/chunk-QBYVXYN3.js +0 -5
- package/dist/chunk-QBZXN2U2.js +0 -1
- package/dist/chunk-QUHQCJ5P.js +0 -15
- package/dist/chunk-SRCPFYYU.js +0 -19
- package/dist/chunk-SRFFFPTS.js +0 -20
- package/dist/chunk-XPEUKDPT.js +0 -9
- package/dist/chunk-Y2G5KXA6.js +0 -1
- /package/dist/{chunk-RTRWAKFO.js → chunk-2CGVDBNO.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tabs as e}from"./chunk-
|
|
1
|
+
import{Tabs as e}from"./chunk-ELVFPH7Y.js";import{Card as a}from"./chunk-RD5UPROC.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-BOGBLZKS.js";import{Button_default as l}from"./chunk-FSP63GKK.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
|
|
2
2
|
return d(r,{groups:n,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */s("div",{className:"mx-auto max-w-5xl space-y-4",children:[
|
|
3
3
|
/* @__PURE__ */s("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Gallery"}),
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{TimelineCard as e}from"./chunk-SURSVJA2.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-4CXQX5AX.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-YDEIXM2A.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-OVNRVFWS.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:b}){const M=l(Date.now,null),j=[],C=[],x=o().timeline,D=r();for(const e of p){const n=i(e.date??null);null===n?C.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const N=i(g??null);let O,X,w=!0;0===j.length?(X=N??M??0,O=X-30*a,w=null!==N||null!==M):(O=j[0].ms,X=N??j[j.length-1].ms,X-O<a&&(X=O+a));const A=j.length>0?Math.max(0,Math.round((X-O)/a)):0,H=u??(A>0?x.duration(A):void 0),S=[j.length>0?x.started(t(j[0].ms,D)):void 0,H,C.length>0?x.reached(j.length,p.length):void 0],V=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),J={};for(const e of j)e.phase&&(J[e.phase]=J[e.phase]||[]).push(e.ms);const K=Object.entries(J).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),L="rail"===v,R=w&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:L?"spread":"compressed",labels:L?"none":"lanes",items:V,pending:C,phases:K,startMs:O,endMs:X,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:x.milestones(m)})});/* @__PURE__ */
|
|
2
|
+
return h("div",L?{className:"shrink-0","data-timeline-variant":"rail",children:R}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:S,children:R})})}export{m as MilestoneTimeline};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CloseGlyph as e}from"./chunk-
|
|
1
|
+
import{CloseGlyph as e}from"./chunk-EPHQ7UQV.js";import{humanSize as t,useFileIntake as n,FileIntakeAlert as r}from"./chunk-VAACOJ2H.js";import{IconButton_default as a}from"./chunk-JHDWTYZ4.js";import{Button_default as s}from"./chunk-FSP63GKK.js";import{Icon as i}from"./chunk-C2HHGLLR.js";import{useShellStrings as c}from"./chunk-OVNRVFWS.js";import{useRef as o,useEffect as l}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
2
2
|
return d(i,{name:"attach",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function p({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
3
3
|
return d(i,{name:"page",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function h({intake:e,dropLabel:t,className:n="",children:r}){const a=c().files;/* @__PURE__ */
|
|
4
4
|
return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,children:[r,
|
|
@@ -6,8 +6,8 @@ return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,childre
|
|
|
6
6
|
return u("li",{className:"flex max-w-full items-center gap-2 rounded-md border border-gray-200 bg-gray-50 py-1 pl-2 pr-1 text-xs text-gray-700",children:[c?/* @__PURE__ */d("img",{src:c,alt:"",className:"h-6 w-6 shrink-0 rounded object-cover"}):/* @__PURE__ */d("span",{className:"text-gray-400",children:/* @__PURE__ */d(p,{})}),
|
|
7
7
|
/* @__PURE__ */d("span",{className:"min-w-0 truncate",title:n.name,children:n.name}),
|
|
8
8
|
/* @__PURE__ */d("span",{className:"shrink-0 tabular-nums text-gray-400",children:t(n.size,i)}),r&&/* @__PURE__ */d("button",{type:"button",disabled:a,onClick:()=>r(s),"aria-label":i.remove(n.name),className:"shrink-0 rounded p-0.5 text-gray-400 hover:bg-gray-200 hover:text-gray-600 disabled:cursor-not-allowed",children:/* @__PURE__ */d(e,{className:"h-3.5 w-3.5"})})]},`${n.name}-${n.size}-${s}`)})})}function f({onClick:e,count:t=0,variant:n="button",label:r,disabled:i=!1}){const o=c().files,l=r??o.attach,p=t>0?`${l} (${t})`:l;return"icon"===n?/* @__PURE__ */u("span",{className:"relative inline-flex",children:[
|
|
9
|
-
/* @__PURE__ */d(a,{"aria-label":p,onClick:e,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),t>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-blue-600 px-1 text-center text-2xs font-semibold leading-4 text-white",children:t})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:e,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function g({files:e,onChange:t,accept:a,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:g,trigger:x="button",actions:j,onReject:k,className:N="",children:
|
|
10
|
-
/* @__PURE__ */d(b,{files:e,disabled:m,onRemove:n=>{
|
|
9
|
+
/* @__PURE__ */d(a,{"aria-label":p,onClick:e,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),t>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-blue-600 px-1 text-center text-2xs font-semibold leading-4 text-white",children:t})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:e,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function g({files:e,onChange:t,accept:a,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:g,trigger:x="button",actions:j,onReject:k,className:N="",children:v}){const L=n({accept:a,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),y=o([]);return l(()=>{k&&L.rejections.length>0&&L.rejections!==y.current&&(y.current=L.rejections,k(L.rejections))},[L.rejections,k]),/* @__PURE__ */u(h,{intake:L,dropLabel:p,className:N,children:[v,
|
|
10
|
+
/* @__PURE__ */d(b,{files:e,disabled:m,onRemove:n=>{L.clearRejections(),t(e.filter((e,t)=>t!==n))},className:"mt-2"}),
|
|
11
11
|
/* @__PURE__ */u("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[
|
|
12
|
-
/* @__PURE__ */d(f,{onClick:
|
|
13
|
-
/* @__PURE__ */d(r,{rejections:
|
|
12
|
+
/* @__PURE__ */d(f,{onClick:L.open,count:e.length,variant:x,label:g,disabled:m}),j]}),
|
|
13
|
+
/* @__PURE__ */d(r,{rejections:L.rejections})]})}export{f as AttachButton,h as AttachmentDropZone,b as AttachmentList,g as ComposerAttachments,m as PaperclipGlyph};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{toast_default as e}from"./chunk-
|
|
2
|
-
/* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[j
|
|
1
|
+
import{toast_default as e}from"./chunk-2LKH6JM5.js";import{Icon as t}from"./chunk-C2HHGLLR.js";import{LoadingSpinner as n}from"./chunk-Q5MD3VY6.js";import{useShellStrings as r}from"./chunk-OVNRVFWS.js";import{createContext as a,useContext as o,useRef as i,useState as s,useEffect as l}from"react";import*as c from"pdfjs-dist";import{createPortal as d}from"react-dom";import{jsx as u,jsxs as m}from"react/jsx-runtime";function h(e,t,n){return new Error(`The response for ${e} is not a WebAssembly module (got ${function(e){if(0===e.length)return"an empty response";const t=Array.from(e.subarray(0,24)).map(e=>e>=32&&e<127?String.fromCharCode(e):".").join("");return`${e.length} bytes starting "${t}"`}(n)}). The bundler did not emit "${t}" as an asset, and the host answered with a fallback page instead of a 404. Serve pdfjs-dist/wasm/ yourself and point window.__REACT_OS_SHELL_PDF_WASM__ at it.`)}var p=a(null);function f({children:e}){const t=o(p);return t?d(e,t):
|
|
2
|
+
/* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[M,j]=s(null),[E,z]=s(1),[L,_]=s(0),[D,P]=s(1),[W,S]=s(!0),[$,O]=s(!0),T=i(x.loadFailed);T.current=x.loadFailed,l(()=>{let t=!1;return O(!0),z(1),g&&(c.GlobalWorkerOptions.workerSrc=g),c.getDocument({url:a,...y(w)}).promise.then(e=>{t||(j(e),_(e.numPages),O(!1))}).catch(()=>{t||(e.error(T.current),O(!1))}),()=>{t=!0}},[a,g,w]),l(()=>{if(!M||!W||!N.current)return;const e=()=>{const e=N.current;e&&M.getPage(E).then(t=>{if(!N.current)return;const n=t.getViewport({scale:1}),r=b(d,{width:e.clientWidth,height:e.clientHeight},{width:n.width,height:n.height});P(e=>Math.abs(e-r)<.005?e:r)})};e();const t=new ResizeObserver(e);return t.observe(N.current),()=>t.disconnect()},[M,E,W,d]),l(()=>{if(!M||!k.current)return;let e=!1,t=null,n=null;return M.getPage(E).then(r=>{if(e||!k.current)return;const a=r.getViewport({scale:D}),o=k.current;o.width=a.width,o.height=a.height,o.style.width=`${a.width}px`,o.style.height=`${a.height}px`;const i=o.getContext("2d");t=r.render({canvas:o,canvasContext:i,viewport:a}),t.promise.catch(()=>{});const s=C.current;s&&(s.replaceChildren(),s.style.setProperty("--total-scale-factor",String(a.scale)),n=new c.TextLayer({textContentSource:r.streamTextContent(),container:s,viewport:a}),n.render().then(()=>{if(e)return;const t=document.createElement("div");t.className="endOfContent",s.append(t)}).catch(()=>{}))}),()=>{e=!0,t?.cancel(),n?.cancel()}},[M,E,D]),l(()=>{const e=()=>C.current?.classList.remove("selecting");return window.addEventListener("pointerup",e),()=>window.removeEventListener("pointerup",e)},[]);const A="page"===d?x.fitPage:x.fitWidth,H="px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";/* @__PURE__ */
|
|
3
3
|
return m("div",{className:"flex flex-col h-full",children:[
|
|
4
4
|
/* @__PURE__ */m(f,{children:[
|
|
5
|
-
/* @__PURE__ */u("button",{type:"button","aria-label":x.previousPage,onClick:()=>
|
|
6
|
-
/* @__PURE__ */u("span",{className:"text-gray-600 font-medium tabular-nums whitespace-nowrap",children:x.pageOf(E,
|
|
7
|
-
/* @__PURE__ */u("button",{type:"button","aria-label":x.nextPage,onClick:()=>
|
|
5
|
+
/* @__PURE__ */u("button",{type:"button","aria-label":x.previousPage,onClick:()=>z(e=>Math.max(1,e-1)),disabled:E<=1,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(t,{name:"chevron-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
6
|
+
/* @__PURE__ */u("span",{className:"text-gray-600 font-medium tabular-nums whitespace-nowrap",children:x.pageOf(E,L)}),
|
|
7
|
+
/* @__PURE__ */u("button",{type:"button","aria-label":x.nextPage,onClick:()=>z(e=>Math.min(L,e+1)),disabled:E>=L,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(t,{name:"chevron-right",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
8
8
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
9
|
-
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{S(!1),
|
|
10
|
-
/* @__PURE__ */m("select",{value:W?"fit":v.includes(Math.round(100*
|
|
11
|
-
/* @__PURE__ */u("option",{value:"fit",children:
|
|
12
|
-
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{S(!1),
|
|
9
|
+
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{S(!1),P(e=>Math.max(.3,Math.round(100*(e-.25))/100))},className:H,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"−"})}),
|
|
10
|
+
/* @__PURE__ */m("select",{value:W?"fit":v.includes(Math.round(100*D))?Math.round(100*D):"custom",onChange:e=>{const t=e.target.value;"fit"!==t?"custom"!==t&&(S(!1),P(Number(t)/100)):S(!0)},className:"bg-transparent hover:bg-gray-200 rounded px-1 py-1 text-gray-600 tabular-nums cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-400","aria-label":x.zoom,title:x.zoom,children:[
|
|
11
|
+
/* @__PURE__ */u("option",{value:"fit",children:A}),!W&&!v.includes(Math.round(100*D))&&/* @__PURE__ */m("option",{value:"custom",children:[Math.round(100*D),"%"]}),v.map(e=>/* @__PURE__ */m("option",{value:e,children:[e,"%"]},e))]}),
|
|
12
|
+
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{S(!1),P(e=>Math.min(4,Math.round(100*(e+.25))/100))},className:H,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"+"})}),
|
|
13
13
|
/* @__PURE__ */u("button",{type:"button",onClick:()=>S(!0),"aria-pressed":W,className:H+(W?" bg-gray-200 text-gray-900":""),title:x.fitHint,children:x.fit}),
|
|
14
14
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
15
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!
|
|
15
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!M)return;const t=window.open("","_blank");if(!t)return void e.error(x.allowPopups);const n=[];for(let e=1;e<=L;e++)n.push(M.getPage(e).then(e=>{const t=e.getViewport({scale:2}),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.render({canvas:n,canvasContext:n.getContext("2d"),viewport:t}).promise.then(()=>n.toDataURL())}));Promise.all(n).then(e=>{var n;t.document.write(`<html><head><title>${n=o,n.replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""}[e]))}</title><style>@media print{body{margin:0}img{width:100%;page-break-after:always}}</style></head><body>`),t.document.write(e.map(e=>`<img src="${e}"/>`).join("")),t.document.write("</body></html>"),t.document.close(),setTimeout(()=>{t.print(),t.close()},300)})},className:H,children:[
|
|
16
16
|
/* @__PURE__ */u(t,{name:"print",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.print]}),
|
|
17
17
|
/* @__PURE__ */m("button",{type:"button",onClick:h??(()=>{const e=document.createElement("a");e.href=a,e.download=o,e.click()}),className:H,children:[
|
|
18
18
|
/* @__PURE__ */u(t,{name:"download",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.download]}),p&&/* @__PURE__ */m("button",{type:"button",onClick:p,className:H,children:[
|
|
19
19
|
/* @__PURE__ */u(t,{name:"email",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.email]})]}),
|
|
20
|
-
/* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!
|
|
20
|
+
/* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!M)return;if(e.ctrlKey||e.metaKey)return;const t=N.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&E<L?(e.preventDefault(),z(e=>Math.min(L,e+1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=0)})):e.deltaY<0&&n&&E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=N.current.scrollHeight)}))},onKeyDown:e=>{if(!M)return;const t=(document.activeElement?.tagName||"").toLowerCase();"input"===t||"textarea"===t||document.activeElement?.isContentEditable||("PageDown"===e.key||"ArrowRight"===e.key?E<L&&(e.preventDefault(),z(e=>Math.min(L,e+1))):"PageUp"===e.key||"ArrowLeft"===e.key?E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1))):"Home"===e.key?(e.preventDefault(),z(1)):"End"===e.key&&(e.preventDefault(),z(L)))},children:$?/* @__PURE__ */u(n,{size:"sm",padding:"",className:"h-full",label:x.loading}):/* @__PURE__ */m("div",{className:"min-h-full flex items-center justify-center p-4",children:[
|
|
21
21
|
/* @__PURE__ */u("style",{children:'\n.preview-pdf-textlayer {\n position: absolute;\n inset: 0;\n overflow: clip;\n line-height: 1;\n text-align: initial;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n caret-color: CanvasText;\n --min-font-size: 1;\n --text-scale-factor: calc(var(--total-scale-factor, 1) * var(--min-font-size));\n --min-font-size-inv: calc(1 / var(--min-font-size));\n}\n.preview-pdf-textlayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n}\n.preview-pdf-textlayer > :not(.markedContent),\n.preview-pdf-textlayer .markedContent span:not(.markedContent) {\n z-index: 1;\n --font-height: 0;\n font-size: calc(var(--text-scale-factor) * var(--font-height));\n --scale-x: 1;\n --rotate: 0deg;\n transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));\n}\n.preview-pdf-textlayer .markedContent {\n display: contents;\n}\n.preview-pdf-textlayer span[role="img"] {\n user-select: none;\n cursor: default;\n}\n.preview-pdf-textlayer ::selection {\n background: rgba(0, 80, 255, 0.25);\n}\n.preview-pdf-textlayer br::selection {\n background: transparent;\n}\n.preview-pdf-textlayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: 0;\n cursor: default;\n user-select: none;\n}\n.preview-pdf-textlayer.selecting .endOfContent {\n top: 0;\n}\n'}),
|
|
22
22
|
/* @__PURE__ */m("div",{className:"relative shadow-lg rounded",children:[
|
|
23
23
|
/* @__PURE__ */u("canvas",{ref:k,className:"block rounded"}),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.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-OVNRVFWS.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,U=a(),z=$??(e=>o(e,U)),C=b??j.intensity,F=w??j.noActivity,R=h(null),S=t(R),V=g??S,D=c(),[B,L]=s(null);if(m(()=>{if(null!==B)return n(e=>"Escape"===e.key&&(L(null),!0))},[B]),0===x.length||0===d.length)/* @__PURE__ */
|
|
2
|
+
return f("div",{className:k,ref:R,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:F})});const O=y??l(0),T=v??Math.max(1,...p.flat().filter(Number.isFinite)),E=96,G=26*x.length,I=M??G+26+26,P=Math.max(2,(Math.max(97,V)-E)/d.length),Q=e=>{const t=T>0?Math.max(0,Math.min(1,e/T)):0;return`color-mix(in oklab, ${O} ${(8+92*t).toFixed(1)}%, ${r.surface})`};/* @__PURE__ */
|
|
3
|
+
return u("div",{className:`relative ${k??""}`,ref:R,children:[
|
|
4
|
+
/* @__PURE__ */u("svg",{width:"100%",height:I,viewBox:`0 0 ${V} ${I}`,role:"img","aria-label":j.heatmap(C,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>L(null),onBlur:()=>L(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(),L(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:D,x1:"0",x2:"1",children:[
|
|
6
|
+
/* @__PURE__ */f("stop",{offset:"0",stopColor:Q(0)}),
|
|
7
|
+
/* @__PURE__ */f("stop",{offset:"1",stopColor:Q(T)})]})}),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=B&&(B.r!==t||B.c!==r);/* @__PURE__ */
|
|
8
|
+
return f("rect",{x:E+r*P+A/2,y:26*t+A/2,width:Math.max(1,P-A),height:26-A,rx:N,fill:Q(n),opacity:i?.55:1,onMouseEnter:()=>L({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${z(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((V-E)/56))))===0?/* @__PURE__ */f("text",{x:E+t*P+P/2,y:G+15,textAnchor:"middle",fontSize:11,fill:r.label,children:e},`c${t}`):null),
|
|
9
|
+
/* @__PURE__ */f("rect",{x:E,y:G+26,width:Math.min(180,Math.max(40,V-E)),height:8,rx:4,fill:`url(#${D})`}),
|
|
10
|
+
/* @__PURE__ */f("text",{x:E,y:G+48,fontSize:11,fill:r.label,children:"0"}),
|
|
11
|
+
/* @__PURE__ */f("text",{x:E+Math.min(180,Math.max(40,V-E)),y:G+48,textAnchor:"end",fontSize:11,fill:r.label,style:{fontVariantNumeric:"tabular-nums"},children:z(T)})]}),B&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(e,{title:`${x[B.r]} · ${d[B.c]}`,rows:[{key:"v",label:C,color:O,value:null==p[B.r]?.[B.c]?void 0:z(p[B.r][B.c])}]})})]})}export{x as HeatmapChart};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-
|
|
1
|
+
import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-OVNRVFWS.js";import{formatPercent as a}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as u}from"react/jsx-runtime";function s(l){return null!=l&&Number.isFinite(l)&&l>=0?l:null}function r(l,e){const t=s(l);if(null==t)return"no-reading";const a=s(e);return null==a||0===a?"no-budget":t>a?"over":"within"}var i=l=>Math.min(100,Math.max(0,l));function m({label:m,elapsed:o,budget:d,grace:c,detail:h,formatDuration:g,formatValue:x,pace:b,emptyLabel:f,noBudgetLabel:p,size:v="sm",ariaLabel:y,className:N=""}){const w=l().meter,M=e(),$=x??g??(l=>function(l,e=t.meter){const a=Math.round(l),n=Math.floor(a/3600),u=Math.floor(a%3600/60),s=a%60;return n>0?e.hoursMinutes(n,u):u>0?e.minutesSeconds(u,s):e.seconds(s)}(l,w)),k=f??w.noReading,j=p??w.noBudget,B=s(o),L=s(d),R=null!=L&&L>0?L:null,V=s(c)??0,F="over"===r(o,d),O=null!=R?R+V:null,S=null!=R&&null!=O?i(R/O*100):null,z=F&&V>0,C=null==O||null==B?0:F?z?S??0:0:i(B/O*100),D=z?S??0:0,H=F?z&&null!=O&&null!=B?i(B/O*100):100:0,Q=Math.max(0,H-D),W=s(b),q=null!=W&&null!=O?i(W/O*100):null,A=null!=B&&null!=R?B/R*100:null,E=null!=A?a(Math.round(A),0,M):null!=B?$(B):"—",G=h??(null==B?k:null==R?j:`${$(B)} / ${$(R)}`),I="md"===v?"h-2":"h-1.5",J=F?"text-red-600":null!=B?"text-gray-900":"text-gray-400",K=null!=B&&null!=R&&null!=O?/* @__PURE__ */n("div",{role:"meter","aria-label":y??("string"==typeof m?m:void 0),"aria-valuemin":0,"aria-valuemax":O,"aria-valuenow":Math.min(O,B),"aria-valuetext":w.ofBudget(E),className:`relative mt-2 ${I} overflow-hidden rounded-full bg-gray-200`,children:[(!F||z)&&/* @__PURE__ */u("div",{className:"absolute inset-y-0 left-0 rounded-full bg-blue-600",style:{width:`${C}%`}}),Q>0&&/* @__PURE__ */u("div",{className:"rosh-budget-overrun absolute inset-y-0",style:{left:`${D}%`,width:`${Q}%`}}),V>0&&null!=S&&/* @__PURE__ */u("div",{title:w.budget,className:"absolute inset-y-0 w-0.5 bg-gray-700",style:{left:`${S}%`}}),null!=q&&/* @__PURE__ */u("div",{title:w.pace,"data-pace":"true",className:"absolute inset-y-0 w-0.5 -translate-x-1/2 bg-gray-700",style:{left:`${q}%`}})]}):null;/* @__PURE__ */
|
|
2
2
|
return n("div","md"===v?{className:N,children:[null!=m&&/* @__PURE__ */u("div",{className:"text-3xs font-medium uppercase tracking-wide text-gray-500",children:m}),
|
|
3
3
|
/* @__PURE__ */n("div",{className:"mt-1 flex items-baseline gap-2",children:[
|
|
4
|
-
/* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${
|
|
5
|
-
/* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-gray-400",children:
|
|
4
|
+
/* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${J}`,children:E}),
|
|
5
|
+
/* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-gray-400",children:G})]}),K]}:{className:N,children:[
|
|
6
6
|
/* @__PURE__ */n("div",{className:"flex items-baseline gap-2",children:[null!=m&&/* @__PURE__ */u("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-gray-500",children:m}),
|
|
7
|
-
/* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${
|
|
8
|
-
/* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-gray-400",children:
|
|
7
|
+
/* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${J}`,children:E}),
|
|
8
|
+
/* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-gray-400",children:G})]}),K]})}export{m as BudgetBar,r as budgetState};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Button_default as e}from"./chunk-FSP63GKK.js";import{Icon as r}from"./chunk-C2HHGLLR.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{Button_default as e}from"./chunk-FSP63GKK.js";import{Icon as r}from"./chunk-C2HHGLLR.js";import{useShellStrings as t}from"./chunk-OVNRVFWS.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
|
|
2
2
|
return a("div",{className:`flex flex-col items-center justify-center text-center ${"card"===i?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===i?"px-6 py-12":"rounded-lg border-2 border-dashed border-red-200 px-6 py-12"}`,role:"alert",children:[
|
|
3
3
|
/* @__PURE__ */d(r,{name:"warning",className:"h-10 w-10 text-red-300 mb-3",strokeWidth:1,"aria-hidden":"true"}),
|
|
4
4
|
/* @__PURE__ */d("h3",{className:"text-sm font-medium text-gray-900",children:n??m.loadError}),
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{AccessibleTable as t}from"./chunk-C2FBUQJW.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-P5BOTIJU.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as s}from"./chunk-OVNRVFWS.js";import{formatPlain as i}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),s=t.length>l,i=s?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(i.map((t,e)=>[t,e])),d=s?i.length:-1,m=s?[...i.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:s?t.length-i.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:v,className:k,emptyLabel:M}){const $=l().charts,w=s(),N=v??(t=>i(t,w)),y=M??$.noFlows,[F,j]=c(null),{highlighted:C}=o(),E=h(u,f,x,$.other),{labels:I,matrix:O,otherIndex:z,foldedCount:A}=E,Q=(t,e)=>O[t]?.[e]??0,U=t=>t===z?r.muted:a(t),V=E.totals,W=I.map((t,e)=>e).sort((t,e)=>V[e]-V[t]),B=W.reduce((t,e)=>t+V[e],0);if(B<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:y});const L=p/2,P=p/2,R=p/2-44,T=R-b,H=g*W.length,J=/* @__PURE__ */new Map;let S=-Math.PI/2;W.forEach((t,e)=>{const o=V[t]/B*(2*Math.PI-H);J.set(t,{start:S,end:S+o,slot:e}),S+=o+g});const Y=/* @__PURE__ */new Map,Z=[];for(const t of W)for(const e of W){const o=Q(t,e);if(o<=0)continue;const n=J.get(t),r=o/Math.max(1,V[t])*(n.end-n.start),a=Y.get(t)??0;Y.set(t,a+r),Z.push({from:t,to:e,value:o,a:n.start+a+r/2,b:J.get(e).start+(J.get(e).end-J.get(e).start)/2})}const q=(t,e)=>[L+e*Math.cos(t),P+e*Math.sin(t)],D="arc"===F?.kind?F.index:void 0,G="ribbon"===F?.kind?Z[F.index]:void 0;/* @__PURE__ */
|
|
2
|
+
return m("div",{className:`relative ${k??""}`,children:[
|
|
3
|
+
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(W.length),onMouseLeave:()=>j(null),children:[Z.map((t,e)=>{const[o,n]=q(t.a,T),[r,a]=q(t.b,T),l=U(t.from),s=((t,e)=>F?"ribbon"===F.kind?F.index===e:F.index===t.from||F.index===t.to:null!==C?I[t.from]===C||I[t.to]===C:null)(t,e);/* @__PURE__ */
|
|
4
|
+
return d("path",{d:`M${o},${n} Q${L},${P} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/B*p*.9),strokeOpacity:null===s||s?.34:.07,strokeLinecap:"round",onMouseEnter:()=>j({kind:"ribbon",index:e})},`${I[t.from]}→${I[t.to]}`)}),W.map(t=>{const o=J.get(t),n=(o.start+o.end)/2,[a,l]=q(n,R+16),s=(t=>F?"arc"===F.kind?F.index===t:Z[F.index].from===t||Z[F.index].to===t:null!==C?I[t]===C:null)(t);/* @__PURE__ */
|
|
5
|
+
return m("g",{onMouseEnter:()=>j({kind:"arc",index:t}),children:[
|
|
6
|
+
/* @__PURE__ */d("path",{d:e(L,P,T,R,o.start,o.end),fill:U(t),fillOpacity:null===s||s?1:.45}),
|
|
7
|
+
/* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:I[t]})]},t)})]}),A>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-gray-500",children:$.chordFolded(A)}),void 0!==D&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:I[D],rows:[{key:"total",label:$.totalFlow,color:U(D),value:N(V[D])}]})}),G&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${I[G.from]} → ${I[G.to]}`,rows:[{key:"value",label:$.flow,color:U(G.from),value:N(G.value)}]})}),
|
|
8
|
+
/* @__PURE__ */d(t,{caption:$.chord(W.length),head:[$.tableFrom,$.tableTo,$.value],rows:Z.map(t=>[I[t.from],I[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-IJMV4F2Q.js";import{Tooltip as n}from"./chunk-Z3WKHMVB.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{createContext as o,useRef as a,useState as i,useEffect as l,useContext as s}from"react";import{jsx as c,jsxs as d,Fragment as u}from"react/jsx-runtime";var h=o({labels:"none",shown:"none"}),b="button[data-icon-rail-button]:not([disabled])";function f(e,t,n){const r=getComputedStyle(e),o=(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)+(parseFloat(r.borderLeftWidth)||0)+(parseFloat(r.borderRightWidth)||0),a="horizontal"===t?(parseFloat(r.columnGap)||0)*Math.max(0,n-1):0,i=e.parentElement;let l=1/0;if(i){const e=getComputedStyle(i);l=i.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:o+a,room:l}}function m({"aria-label":t,orientation:n="vertical",children:o,className:s="",labels:d="none",labelsFit:u=!1,onLabelsShown:m}){const p=a(null),g="none"!==d&&u,[y,v]=i(null),w="none"===d?"none":g?y??"none":"all",x=a(()=>{});x.current=()=>{const t=p.current;if(!t||!g)return;const r=function(e,t){return[...e.querySelectorAll("button[data-icon-rail-button]")].map(e=>{const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=parseFloat(n.minWidth)||0,a=e.querySelector("[data-icon-rail-glyph]")?.getBoundingClientRect().width??0,i=e.querySelector("[data-icon-rail-word]")?.scrollWidth??0;return{bare:Math.max(o,r+a),worded:"below"===t?Math.max(o,r+Math.max(a,i)):Math.max(o,r+a+8+i),active:"true"===e.getAttribute("aria-pressed")}})}(t,d);v(e({buttons:r,orientation:n,...f(t,n,r.length)}))},r(()=>{x.current()}),l(()=>{const e=p.current?.parentElement;if(!g||!e)return;let t=!0;const n=()=>{t&&x.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()}},[g]);const F=a(null),k=a(m);k.current=m,l(()=>{g&&null!==y&&F.current!==y&&(F.current=y,k.current?.(y))},[g,y]),r(()=>{const e=p.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const n=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-pressed"))??t[0];for(const t of e.querySelectorAll("button[data-icon-rail-button]"))t.tabIndex=t===n?0:-1});/* @__PURE__ */
|
|
2
|
+
return c("div",{ref:p,role:"toolbar","aria-label":t,"aria-orientation":n,"data-orientation":n,onKeyDown:e=>{const t=p.current;if(!t)return;const r=[...t.querySelectorAll(b)],o=r.indexOf(e.target);if(o<0)return;const a="vertical"===n?"ArrowUp":"ArrowLeft",i="vertical"===n?"ArrowDown":"ArrowRight",l=e.key===i?(o+1)%r.length:e.key===a?(o-1+r.length)%r.length:"Home"===e.key?0:"End"===e.key?r.length-1:-1;if(!(l<0)){e.preventDefault();for(const e of r)e.tabIndex=e===r[l]?0:-1;r[l].focus()}},"data-labels":"none"===d?void 0:d,"data-labels-shown":"none"===d?void 0:w,className:`flex gap-1 ${"vertical"===n?"flex-col items-center":"flex-row items-center"} ${s}`.trim(),children:/* @__PURE__ */c(h.Provider,{value:{labels:d,shown:w},children:o})})}function p({label:e,icon:r,active:o,disabled:a,onClick:i,badge:l,tooltipSide:b="right",className:f=""}){const m=!0===o,{labels:p,shown:g}=s(h),y=void 0===l||!1===l||0===l?r:/* @__PURE__ */c(t,{count:"number"==typeof l?l:void 0,dot:!0===l,max:99,children:r}),v="none"!==p,w=v&&("all"===g||"chosen"===g&&m),x=/* @__PURE__ */c("button",{type:"button","data-icon-rail-button":"","aria-label":e,"aria-pressed":"boolean"==typeof o?o:void 0,disabled:a,onClick:a?void 0:i,className:[`relative inline-flex ${v?"beside"===p?"h-9 min-w-9 justify-center px-2":"min-h-9 min-w-9 flex-col justify-center px-1 py-1":"h-9 w-9 justify-center"} shrink-0 items-center rounded-lg transition-colors`,"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-40",m?"bg-blue-50 text-blue-700":"text-gray-600 not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-gray-900",f].filter(Boolean).join(" "),children:v?/* @__PURE__ */d(u,{children:[
|
|
3
|
+
/* @__PURE__ */c("span",{"data-icon-rail-glyph":"",className:"inline-flex shrink-0 items-center justify-center",children:y}),
|
|
4
|
+
/* @__PURE__ */c("span",{"data-icon-rail-word":"","aria-hidden":"true",className:["overflow-hidden whitespace-nowrap text-xs font-medium leading-none",w?"beside"===p?"ml-2":"mt-1":"max-h-0 max-w-0"].join(" "),children:e})]}):y});/* @__PURE__ */
|
|
5
|
+
return c(n,{content:e,side:b,children:x})}export{m as IconRail,p as IconRailButton};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{MOVE_KEYS as e,MoveGrip as r,MoveHint as t,moveFromKey as a}from"./chunk-
|
|
1
|
+
import{MOVE_KEYS as e,MoveGrip as r,MoveHint as t,moveFromKey as a}from"./chunk-JGZWAEOJ.js";import{GROUP_COLORS as n}from"./chunk-BOGBLZKS.js";import{OneLineLabel as o}from"./chunk-QMQVOUIV.js";import{Icon as i}from"./chunk-C2HHGLLR.js";import{Tooltip as s}from"./chunk-Z3WKHMVB.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c}from"./chunk-OVNRVFWS.js";import{useRef as d,useCallback as u,useId as p,isValidElement as m}from"react";import{jsx as g,jsxs as h}from"react/jsx-runtime";var f='[role="treeitem"]';function b(e){return[...e.querySelectorAll(f)].filter(r=>{for(let t=r.parentElement?.closest('[role="group"]');t&&e.contains(t);t=t.parentElement?.closest('[role="group"]')??null)if(t.hasAttribute("hidden"))return!1;return!0})}function y({"aria-label":e,"aria-labelledby":r,children:t,className:a="",rootProps:n}){const o=d(null);l(()=>{const e=o.current;if(!e)return;const r=[...e.querySelectorAll(f)];if(0===r.length)return;const t=r.find(e=>e===document.activeElement)??r.find(e=>"true"===e.getAttribute("aria-selected"))??b(e)[0]??r[0];for(const e of r)e.tabIndex=e===t?0:-1});const i=u(e=>{n?.onKeyDown?.(e);const r=o.current,t=e.target.closest?.(f);if(!r||!t||e.target!==t||e.defaultPrevented)return;if(e.altKey||e.ctrlKey||e.metaKey)return;const a=b(r),i=a.indexOf(t),s=Number(t.getAttribute("aria-level")??"1"),l=t=>{e.preventDefault(),function(e,r){if(r){for(const t of e.querySelectorAll(f))t.tabIndex=t===r?0:-1;r.focus()}}(r,t)};switch(e.key){case"ArrowDown":l(a[i+1]);break;case"ArrowUp":l(a[i-1]);break;case"Home":l(a[0]);break;case"End":l(a[a.length-1]);break;case"ArrowRight":if("true"===t.getAttribute("aria-expanded")){const r=a[i+1];r&&Number(r.getAttribute("aria-level")??"1")>s?l(r):e.preventDefault()}break;case"ArrowLeft":if("true"!==t.getAttribute("aria-expanded"))for(let e=i-1;e>=0;e--)if(Number(a[e].getAttribute("aria-level")??"1")<s){l(a[e]);break}}},[n]);/* @__PURE__ */
|
|
2
2
|
return g("div",{...n,ref:o,role:"tree","aria-label":r?void 0:e,"aria-labelledby":r,onKeyDown:i,className:`flex flex-col gap-1 ${a}`.trim(),children:t})}function v({children:e,hidden:r,className:t=""}){/* @__PURE__ */
|
|
3
3
|
return g("div",{role:"group",hidden:r,className:`ml-4 flex flex-col gap-1 border-l border-gray-200 pl-2 ${t}`.trim(),children:e})}var x=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-2","text-2xs font-medium normal-case tabular-nums tracking-normal"].join(" "),k=`${x} bg-[color:color-mix(in_srgb,var(--ink-faint)_12%,transparent)] text-gray-600`;function w(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!m(e)&&"label"in e}function N(e){if(null==e||!1===e)return null;const r=Array.isArray(e)&&e.length>0&&e.every(w)?e:w(e)?[e]:null;return r?r.map((e,r)=>/* @__PURE__ */g("span",{"data-tree-count":"","data-tone":e.tone,className:e.tone?`${x} ${n[e.tone]}`:k,children:e.label},r)):/* @__PURE__ */g("span",{"data-tree-count":"",className:k,children:e})}function A({children:e,count:r,expanded:t,onToggle:a}){const n=void 0!==t,i=
|
|
4
4
|
/* @__PURE__ */g("span",{"data-tree-label-text":"",className:"flex min-w-0 flex-1 text-left",children:/* @__PURE__ */g(o,{children:e})}),s=null!=r&&!1!==r&&/* @__PURE__ */g("span",{"data-tree-count":"",className:k,children:r}),l="text-xs font-semibold uppercase tracking-wide text-gray-500";return n?/* @__PURE__ */g("div",{role:"presentation",className:"pb-1 pt-3",children:/* @__PURE__ */h("button",{type:"button","aria-expanded":t,onClick:a,className:["flex w-full items-center gap-2 rounded-md px-2 hover:text-gray-900","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",l].join(" "),children:[
|
|
5
5
|
/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children:j(!!t)}),i,s]})}):/* @__PURE__ */h("div",{role:"presentation",className:`flex items-center gap-2 px-2 pb-1 pt-3 ${l}`,children:[
|
|
6
|
-
/* @__PURE__ */g("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),i,s]})}var j=e=>/* @__PURE__ */g(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),
|
|
7
|
-
return h("div",{...$,role:"treeitem","aria-level":i,"aria-selected":c,"aria-expanded":I?d:void 0,tabIndex:c?0:-1,"aria-keyshortcuts":$?.["aria-keyshortcuts"]??(K?e:void 0),"aria-describedby":
|
|
6
|
+
/* @__PURE__ */g("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),i,s]})}var j=e=>/* @__PURE__ */g(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),D={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function P({label:n,level:i=1,icon:s,preview:l,selected:c=!1,expanded:d,onToggle:u,onSelect:m,muted:f=!1,badge:b,actions:y,actionsPinned:v=!1,actionsOverlay:x=!0,rename:k,drop:w,dragging:A=!1,draggable:P=!1,dragHint:C,onMove:K,rowProps:$,className:H=""}){const I=void 0!==d,E=p(),O=[$?.["aria-describedby"],K?E:void 0].filter(Boolean).join(" ")||void 0,S=c?"bg-blue-50 text-blue-700":"into"===w?"bg-blue-50 text-gray-900":"text-gray-700 hover:bg-gray-100";/* @__PURE__ */
|
|
7
|
+
return h("div",{...$,role:"treeitem","aria-level":i,"aria-selected":c,"aria-expanded":I?d:void 0,tabIndex:c?0:-1,"aria-keyshortcuts":$?.["aria-keyshortcuts"]??(K?e:void 0),"aria-describedby":O,"data-drop":w,"data-draggable":P||void 0,onKeyDown:e=>{if($?.onKeyDown?.(e),e.target!==e.currentTarget||e.defaultPrevented)return;const r=a(e);r&&K?(e.preventDefault(),K(r)):"Enter"!==e.key&&" "!==e.key||!m?("ArrowRight"===e.key&&I&&!d&&u||"ArrowLeft"===e.key&&I&&d&&u)&&(e.preventDefault(),u()):(e.preventDefault(),m())},onClick:e=>{$?.onClick?.(e),e.defaultPrevented||m?.()},className:["group/treerow relative flex h-8 shrink-0 select-none items-center gap-2 rounded-md px-2 text-sm",P?"cursor-grab active:cursor-grabbing":"cursor-pointer","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",S,"into"===w?"ring-2 ring-inset ring-[color:var(--rosh-drop-ring)]":"",A?"opacity-40":"",H].filter(Boolean).join(" "),children:["before"===w&&/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -top-0.5 h-0.5 rounded-full bg-blue-500"}),"after"===w&&/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -bottom-0.5 h-0.5 rounded-full bg-blue-500"}),P&&
|
|
8
8
|
/* @__PURE__ */g(r,{marker:"tree",hint:C,dragging:A,revealClassName:"group-hover/treerow:opacity-100"}),
|
|
9
9
|
/* @__PURE__ */g("span",I?{"aria-hidden":"true","data-tree-caret":"",onClick:e=>{e.stopPropagation(),u?.()},className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-gray-500 hover:bg-gray-200 hover:text-gray-900",children:j(!!d)}:{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),null!=s&&/* @__PURE__ */g("span",{"aria-hidden":"true",className:"flex h-4 w-4 shrink-0 items-center justify-center "+(f?"text-gray-400":""),children:s}),
|
|
10
10
|
/* @__PURE__ */h("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[k??
|
|
11
11
|
/* @__PURE__ */g("span",{className:`flex min-w-0 ${c?"font-semibold":"font-medium"} ${f?"text-gray-400 line-through":""}`,children:/* @__PURE__ */h(o,{children:[n,null!=l&&/* @__PURE__ */g("span",{className:"ml-2 font-normal text-gray-500",children:l})]})}),N(b),null!=y&&!x&&/* @__PURE__ */g("span",{"data-tree-actions":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:"ml-auto flex shrink-0 items-center gap-0.5 transition-opacity "+(v||f?"opacity-100":"opacity-0 group-hover/treerow:opacity-100 group-focus-within/treerow:opacity-100"),children:y})]}),null!=y&&x&&
|
|
12
|
-
/* @__PURE__ */h("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:
|
|
12
|
+
/* @__PURE__ */h("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:D,className:"absolute inset-y-0 right-0 grid rounded-r-md transition-opacity "+(v||f||c?"opacity-100":"pointer-events-none opacity-0 group-hover/treerow:pointer-events-auto group-hover/treerow:opacity-100 group-focus-within/treerow:pointer-events-auto group-focus-within/treerow:opacity-100"),children:[
|
|
13
13
|
/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-actions-scrim":"",className:"col-start-1 row-start-1",style:{background:"var(--rosh-tree-ground, var(--surface))"}}),
|
|
14
14
|
/* @__PURE__ */g("span",{"aria-hidden":"true",className:"col-start-1 row-start-1",style:{backgroundColor:"inherit"}}),
|
|
15
15
|
/* @__PURE__ */g("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:y})]}),K&&/* @__PURE__ */g(t,{id:E})]})}function C({onAdd:e,label:r,drop:t=!1,slotProps:a}){const n=c().tree,o=t?n.dropHere:r??n.empty,i="flex min-h-8 w-full items-center gap-2 rounded-md border border-dashed px-3 text-sm "+(t?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 text-gray-500");/* @__PURE__ */
|
|
@@ -17,4 +17,4 @@ return g("div",{...a,role:"presentation","data-drop":t||void 0,children:e?/* @__
|
|
|
17
17
|
/* @__PURE__ */g("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */g("span",{className:i,children:o})})}function K({onInsert:e,label:r,drop:t=!1,seamProps:a}){const n=c().tree,o=r??n.insertHere,l=t?"opacity-100":e?"opacity-0 group-hover/seam:opacity-100 group-focus-within/seam:opacity-100":"opacity-0";/* @__PURE__ */
|
|
18
18
|
return h("div",{...a,role:"presentation","data-tree-seam":"","data-drop":t||void 0,className:`group/seam relative z-10 -my-1 h-1 shrink-0 ${a?.className??""}`.trim(),children:[
|
|
19
19
|
/* @__PURE__ */g("span",{"aria-hidden":"true",className:"absolute inset-x-0 -bottom-1 -top-1"}),
|
|
20
|
-
/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-seam-line":"",className:`pointer-events-none absolute inset-x-2 top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-blue-500 transition-opacity ${l}`}),e&&/* @__PURE__ */g(s,{content:o,className:"absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2",children:/* @__PURE__ */g("button",{type:"button","aria-label":o,onClick:e,className:"flex h-5 w-5 items-center justify-center rounded-full bg-blue-600 text-white transition rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(t?"scale-75 opacity-0":"scale-75 opacity-0 group-hover/seam:scale-100 group-hover/seam:opacity-100 focus-visible:scale-100 focus-visible:opacity-100"),children:/* @__PURE__ */g(i,{name:"add","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3"})})})]})}export{y as Tree,C as TreeEmptySlot,v as TreeGroup,A as TreeGroupLabel,
|
|
20
|
+
/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-seam-line":"",className:`pointer-events-none absolute inset-x-2 top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-blue-500 transition-opacity ${l}`}),e&&/* @__PURE__ */g(s,{content:o,className:"absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2",children:/* @__PURE__ */g("button",{type:"button","aria-label":o,onClick:e,className:"flex h-5 w-5 items-center justify-center rounded-full bg-blue-600 text-white transition rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(t?"scale-75 opacity-0":"scale-75 opacity-0 group-hover/seam:scale-100 group-hover/seam:opacity-100 focus-visible:scale-100 focus-visible:opacity-100"),children:/* @__PURE__ */g(i,{name:"add","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3"})})})]})}export{y as Tree,C as TreeEmptySlot,v as TreeGroup,A as TreeGroupLabel,P as TreeRow,K as TreeSeam};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-P5BOTIJU.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-
|
|
1
|
+
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-P5BOTIJU.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-OVNRVFWS.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useId as h,useState as u}from"react";import{jsx as p,jsxs as d}from"react/jsx-runtime";var f=300*Math.PI/180;function g({rows:g,variant:k="track",size:v=300,max:x,formatValue:y,animate:M=!0,className:N,emptyLabel:b,trackGap:j=6}){const C=s().charts,w=c(),R=y??(e=>m(e,w)),P=b??C.nothingToPlot,T=h(),[E,U]=u(null),{highlighted:V}=l();if(0===g.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${N??""}`,children:P});const $=v/2,B=v/2,F=v/2-10,I=x??Math.max(...g.map(e=>e.value),1),O="track"===k?Math.max(6,(F-.16*v)/g.length):0,W=Math.max(1,Math.floor((F-.16*v)/O||1)),Y="track"===k?g.slice(0,W):g,z=Math.min(j,Math.max(1,O-2)),A=n(Y.length,.03),H=null!==E?Y[E]:void 0;/* @__PURE__ */
|
|
2
2
|
return d("div",{className:`relative ${N??""}`,children:[
|
|
3
|
-
/* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":T,onMouseLeave:()=>
|
|
4
|
-
/* @__PURE__ */p("title",{id:T,children:"track"===k?C.radialTrack(
|
|
5
|
-
return d("g",{opacity:c?.4:1,onMouseEnter:()=>
|
|
6
|
-
/* @__PURE__ */p("path",{d:e(B,
|
|
7
|
-
/* @__PURE__ */p("path",{d:e(B,
|
|
8
|
-
return p("g",{opacity:c?.4:1,onMouseEnter:()=>
|
|
3
|
+
/* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":T,onMouseLeave:()=>U(null),children:[
|
|
4
|
+
/* @__PURE__ */p("title",{id:T,children:"track"===k?C.radialTrack(Y.length):C.radialCycle(Y.length)}),Y.map((l,r)=>{const n=o(r,l.color,l.tone),s=Math.max(0,Math.min(1,l.value/I)),c=((e,t)=>null!==E?E!==e:null!==V&&V!==t)(r,l.key);if("track"===k){const o=F-r*O,m=o-O+z,h=-Math.PI/2;/* @__PURE__ */
|
|
5
|
+
return d("g",{opacity:c?.4:1,onMouseEnter:()=>U(r),className:M?t.sweep:void 0,style:M?a(r,70):void 0,children:[
|
|
6
|
+
/* @__PURE__ */p("path",{d:e($,B,m,o,h,h+f),fill:i.grid}),
|
|
7
|
+
/* @__PURE__ */p("path",{d:e($,B,m,o,h,h+f*s),fill:n})]},l.key)}const m=.14*v;/* @__PURE__ */
|
|
8
|
+
return p("g",{opacity:c?.4:1,onMouseEnter:()=>U(r),children:/* @__PURE__ */p("path",{d:e($,B,m,m+(F-m)*s,A(r),A(r)+A.step),fill:n})},l.key)})]}),H&&null!==E&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:H.label,rows:[{key:"value",label:C.value,color:o(E,H.color,H.tone),value:R(H.value)}]})}),
|
|
9
9
|
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(150px,1fr))"},children:g.map((e,t)=>/* @__PURE__ */d("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
10
10
|
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:o(t,e.color,e.tone)}}),
|
|
11
11
|
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
12
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:
|
|
12
|
+
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:R(e.value)})]},e.key))})]})}export{g as RadialBarChart};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{toISODate as e}from"./chunk-
|
|
2
|
-
return y("input",{ref:
|
|
1
|
+
import{toISODate as e}from"./chunk-JWMQEWCV.js";import{Calendar as t}from"./chunk-XW7KN6HW.js";import{calendarNames as r}from"./chunk-5OTS2G3M.js";import{inputClasses as a,PLACEHOLDER_INK as n}from"./chunk-JFSYWEHD.js";import{Icon as i}from"./chunk-C2HHGLLR.js";import{onOverlayOpen as o}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as l}from"./chunk-62LW225J.js";import{useDropdownPosition as s}from"./chunk-T53TXXOC.js";import{useBrowserLayoutEffect as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as c,useShellLocale as m}from"./chunk-OVNRVFWS.js";import{forwardRef as f,useState as b,useRef as p,useId as h,useEffect as v}from"react";import{createPortal as g}from"react-dom";import{jsx as y,jsxs as x}from"react/jsx-runtime";var N=/^\d{4}-\d{2}-\d{2}$/,k=/^(aria|data)-/,j=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function w(t){if(null==t||""===t)return"";if(t instanceof Date)return Number.isNaN(t.getTime())?"":e(t);if(N.test(t))return t;const r=new Date(t);return Number.isNaN(r.getTime())?"":e(r)}function D(e){if(!N.test(e))return null;const[t,r,a]=e.split("-").map(Number),n=new Date(t,r-1,a);return n.getMonth()===r-1&&n.getDate()===a?n:null}function W(e,t){const r=D(e);return r?t.longDate(r.getFullYear(),r.getMonth(),r.getDate()):""}var F=f(function({value:f,onChange:N,min:F,max:C,invalid:E,size:O,native:S,weekStartsOn:T,className:$="","aria-label":q,"aria-describedby":B,"aria-labelledby":H,id:L,name:M,disabled:z,placeholder:I,required:J,clearable:V,form:G,title:R,tabIndex:U,autoFocus:X,onFocus:P,onBlur:Q,...Y},K){const A=V??!J,Z=w(f),_=w(F),ee=w(C),te=c().datePicker,re=m(),ae=r(re),[ne,ie]=b(!1),oe=p(null),le=p(null),se=p(null),de=h(),ue=h(),ce=h(),me=s(le,ne,{popupRef:se}),[fe,be]=b(!1);d(()=>{const e=!!L&&(le.current?.labels?.length??0)>0;e!==fe&&be(e)});const pe=!q&&(!!H||fe);if(v(()=>{if(!ne)return;const e=e=>{const t=e.target;oe.current?.contains(t)||se.current?.contains(t)||ie(!1)};document.addEventListener("pointerdown",e,!0);const t=o(()=>ie(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[ne]),v(()=>{if(ne)return u(e=>"Escape"===e.key&&(ie(!1),le.current?.focus(),!0),()=>se.current)},[ne]),S)/* @__PURE__ */
|
|
2
|
+
return y("input",{ref:K,type:"date",lang:re,id:L,name:M,disabled:z,"aria-label":q,"aria-describedby":B,"aria-invalid":E||void 0,value:Z,min:_||void 0,max:ee||void 0,onChange:e=>N?.(D(e.target.value)),className:a({invalid:E,size:O,className:$}),"aria-labelledby":H,required:J,form:G,title:R,tabIndex:U,autoFocus:X,onFocus:P,onBlur:Q,...Y});const he=Object.fromEntries(Object.entries(Y).filter(([e])=>k.test(e)&&!j.has(e))),ve=Y["aria-required"],ge=!!J||!0===ve||"true"===ve,ye=[pe?ue:void 0,ge?ce:void 0,B].filter(Boolean).join(" ")||void 0,xe=e(/* @__PURE__ */new Date),Ne=(!_||xe>=_)&&(!ee||xe<=ee),ke=I??te.placeholder;/* @__PURE__ */
|
|
3
3
|
return x("div",{ref:oe,className:"relative",children:[
|
|
4
|
-
/* @__PURE__ */y("input",{ref:
|
|
5
|
-
/* @__PURE__ */x("button",{ref:le,type:"button",...he,id:
|
|
6
|
-
/* @__PURE__ */y("span",{className:
|
|
7
|
-
/* @__PURE__ */y(i,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */y("span",{id:ue,className:"sr-only",children:
|
|
8
|
-
/* @__PURE__ */x("div",{ref:se,id:de,role:"dialog","aria-label"
|
|
9
|
-
/* @__PURE__ */y(t,{value:
|
|
4
|
+
/* @__PURE__ */y("input",{ref:K,type:"hidden",name:M,form:G,value:Z}),
|
|
5
|
+
/* @__PURE__ */x("button",{ref:le,type:"button",...he,id:L,disabled:z,title:R,tabIndex:U,autoFocus:X,onFocus:P,onBlur:Q,"aria-haspopup":"dialog","aria-expanded":ne,"aria-controls":ne?de:void 0,"aria-labelledby":H,"aria-describedby":ye,"aria-label":q?`${q}${Z?`, ${W(Z,ae)}`:""}`:void 0,onClick:()=>ie(e=>!e),className:`${a({invalid:E,size:O,className:$})} flex items-center justify-between text-left`,children:[
|
|
6
|
+
/* @__PURE__ */y("span",{className:Z?"text-gray-900":"text-gray-400",children:Z?W(Z,ae):ke}),
|
|
7
|
+
/* @__PURE__ */y(i,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */y("span",{id:ue,className:"sr-only",children:Z?W(Z,ae):ke}),ge&&/* @__PURE__ */y("span",{id:ce,className:"sr-only",children:te.required}),ne&&g(
|
|
8
|
+
/* @__PURE__ */x("div",{ref:se,id:de,role:"dialog","aria-label":q??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:l.popup,left:me?.left,right:me?.right,top:me?.top,bottom:me?.bottom,maxWidth:me?.maxWidth,visibility:me?void 0:"hidden"},children:[
|
|
9
|
+
/* @__PURE__ */y(t,{value:Z||null,min:_||null,max:ee||null,weekStartsOn:T,onSelect:e=>{ie(!1),le.current?.focus(),N?.(D(e))}}),(A||Ne)&&/* @__PURE__ */x("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[A&&/* @__PURE__ */y("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),N?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),Ne&&/* @__PURE__ */y("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),N?.(/* @__PURE__ */new Date)},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{F as DatePicker_default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{CartesianPlot as l}from"./chunk-
|
|
2
|
-
return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{CartesianPlot as l}from"./chunk-PPSIMRJM.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-OVNRVFWS.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),L=Math.max(...v),N=.08*(L-j)||1;/* @__PURE__ */
|
|
2
|
+
return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-N,max:L+N,bandPadding:.42,formatValue:w,yAxisLabel:b,className:x,emptyLabel:k,ariaLabel:g.ohlc(M,h.length),tooltip:l=>{const t=h[l],a=t.close>=t.open,i=a?o.good:o.critical;/* @__PURE__ */
|
|
3
3
|
return c(e,{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:[
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-
|
|
1
|
+
import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-XKCEVZZB.js";import{TH_ONE_LINE as r,OneLineLabel as o}from"./chunk-QMQVOUIV.js";import{SpinnerRing as n}from"./chunk-Q5MD3VY6.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as s}from"./chunk-OVNRVFWS.js";import{useState as a,useRef as i}from"react";import{jsxs as c,Fragment as d,jsx as h}from"react/jsx-runtime";function u(e){const t={};if(!e)return t;for(const[r,o]of Object.entries(e))!r.startsWith("data-")||"string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o||(t[r]=o);return t}var m=e=>Array.isArray(e.columns),g=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",f="rosh-dt-row-link rosh-focus-ring underline-offset-4 hover:underline",p={sm:"px-2 py-2",md:"px-3 py-2"},y={left:"text-left",right:"text-right",center:"text-center"};function b({direction:e}){/* @__PURE__ */
|
|
2
2
|
return c("span",{className:"ml-1 inline-flex flex-col leading-none","aria-hidden":"true",children:[
|
|
3
3
|
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("asc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 0L8 5H0z"})}),
|
|
4
|
-
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered
|
|
5
|
-
return h("th",{scope:"col",...
|
|
4
|
+
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered:S=!1,size:$="md",minWidth:z,rowClassName:H,onRow:I,rowHref:T,onRowPress:O,linkAs:V,emptyText:D,selection:F,footer:A,virtualized:E,stackOnNarrow:L=!1,stackBelow:P,className:R=""}){const W=s(),K=D??W.table.empty,Q=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),Z=L&&!E,G=Z?x:x.flatMap(e=>{if(!m(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),J=e=>Z?{role:e}:{},U=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[X,Y]=a(0),q=E?.overscan??6,_=E?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/E.rowHeight)-q);Y(e=>e===t?e:t)}:void 0,ee=E?Math.ceil(E.height/E.rowHeight)+2*q:v.length,te=E?Math.min(X,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=E?te*E.rowHeight:0,ne=E?(v.length-re)*E.rowHeight:0,le=i(null),[se,ae]=a(0);l(()=>{if(!E)return;const e=le.current?.offsetHeight??0;ae(t=>t===e?t:e)});const ie=e=>e.sortField??e.key,ce=e=>N&&N.field===ie(e)?N.direction:null,de=G.flatMap(e=>m(e)?e.columns:[e]),he=G.some(m),ue=/* @__PURE__ */new Map;if(Z)for(const e of G)if(m(e))for(const t of e.columns)ue.set(t,U(e.title,e.label));const me=e=>{const t=U(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},ge=new Set(F?.selected??[]),fe=F?v.map((e,t)=>Q(e,t)):[],pe=fe.length>0&&fe.every(e=>ge.has(e)),ye=fe.some(e=>ge.has(e)),be=F?36:0,we=de.length+(F?1:0),xe=de.some(e=>"left"===e.fixed),ve=Z&&!F&&de.some(e=>e.cardCorner),ke=V??"a",Ne=`${p[$]} ${"sm"===$?"text-xs":"text-sm"}`,Ce=(e,t)=>e.ellipsis?/* @__PURE__ */h("span",{className:"block w-0 min-w-full",children:t}):t,je=(e,t,n,l=0)=>{const s=ce(e),a=y[e.align??(e.numeric?"right":"left")],i="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
|
|
5
|
+
return h("th",{scope:"col",...J("columnheader"),rowSpan:n>1?n:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...i?{left:(Be[t]??0)+be}:{},...E?{top:l}:{}},className:[Ne,a,r,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs",i?E?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":E?"sticky z-10 bg-gray-50":"",Z&&d?"rosh-dt-sort":"",Z?g(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ie(e),r=ce(e),o=e.sortFirst??"asc";C(null===r?{field:t,direction:o}:r===o?{field:t,direction:"asc"===o?"desc":"asc"}:null)})(e),"data-group":Z?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-gray-700 ${a}`,children:[
|
|
6
6
|
/* @__PURE__ */h(o,{children:e.title}),
|
|
7
|
-
/* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(o,{children:e.title}))},e.key)};let Me=0;const Be=de.map(e=>{if("left"!==e.fixed)return null;const t=Me;return Me+=e.width??0,t})
|
|
8
|
-
/* @__PURE__ */c("div",{onScroll:_,style:
|
|
7
|
+
/* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(o,{children:e.title}))},e.key)};let Me=0;const Be=de.map(e=>{if("left"!==e.fixed)return null;const t=Me;return Me+=e.width??0,t}),Se=/* @__PURE__ */c(d,{children:[
|
|
8
|
+
/* @__PURE__ */c("div",{onScroll:_,style:E?{maxHeight:E.height}:void 0,className:`relative overflow-x-auto ${E?"overflow-y-auto":""} ${S?"rounded-lg border border-gray-200":""}${Z?" rosh-dt-scroll":""}`.trim(),children:[B&&
|
|
9
9
|
/* @__PURE__ */c("div",{className:"absolute inset-0 z-20 flex items-start justify-center bg-white/60 pt-8",role:"status","aria-live":"polite",children:[
|
|
10
10
|
/* @__PURE__ */h(n,{className:"h-6 w-6"}),
|
|
11
|
-
/* @__PURE__ */h("span",{className:"sr-only",children:
|
|
12
|
-
/* @__PURE__ */c("table",{...
|
|
13
|
-
/* @__PURE__ */c("thead",{...
|
|
14
|
-
/* @__PURE__ */c("tr",{ref:le,...
|
|
15
|
-
/* @__PURE__ */h("tbody",{...
|
|
16
|
-
return c("tr",{...u(n),...
|
|
17
|
-
return h("td",{...
|
|
18
|
-
return h("td",{...
|
|
19
|
-
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},
|
|
20
|
-
return h("div",
|
|
11
|
+
/* @__PURE__ */h("span",{className:"sr-only",children:W.table.loading})]}),
|
|
12
|
+
/* @__PURE__ */c("table",{...J("table"),className:(Z?"rosh-dt-table ":"")+"w-full border-collapse tabular-nums",style:z?{minWidth:z}:void 0,children:[M&&/* @__PURE__ */h("caption",{className:"sr-only",children:M}),
|
|
13
|
+
/* @__PURE__ */c("thead",{...J("rowgroup"),className:Z?"rosh-dt-head":void 0,children:[
|
|
14
|
+
/* @__PURE__ */c("tr",{ref:le,...J("row"),className:"border-b border-gray-200 bg-gray-50",children:[F&&/* @__PURE__ */h("th",{scope:"col",...J("columnheader"),rowSpan:he?2:void 0,style:{width:36,...E?{top:0}:{}},className:[Ne,r,xe||E?"sticky z-20 bg-gray-50":"",xe?"left-0":"",Z?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":W.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!F)return;const e=new Set(fe);F.onChange(pe?F.selected.filter(t=>!e.has(t)):[...F.selected,...fe.filter(e=>!ge.has(e))])}})}),G.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...J("columnheader"),colSpan:e.columns.length,style:E?{top:0}:void 0,className:[Ne,"text-center",r,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs","border-b border-gray-200",E?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(o,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...J("row"),className:"border-b border-gray-200 bg-gray-50",children:G.flatMap(e=>m(e)?e.columns:[]).map(e=>je(e,de.indexOf(e),1,se))})]}),
|
|
15
|
+
/* @__PURE__ */h("tbody",{...J("rowgroup"),className:Z?"rosh-dt-body":void 0,children:0!==v.length||B?/* @__PURE__ */c(d,{children:[oe>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:oe,padding:0,border:0}})}),v.slice(te,re).map((t,r)=>{const o=te+r,n=I?.(t,o),l=!!n?.current,s=T?.(t,o),a=void 0===s&&O?()=>O(t,o):void 0,i=void 0!==s||void 0!==a;let d=!1;const m=(e,t)=>{if(d=!0,!i)return e;const r=[f,a?"cursor-pointer text-left":"",t?.className??""].filter(Boolean).join(" "),o=l?"true":void 0;return void 0!==s?/* @__PURE__ */h(ke,{href:s,className:r,"aria-current":o,children:e}):/* @__PURE__ */h("button",{type:"button",onClick:a,className:r,"aria-current":o,children:e})},p=de.map(e=>e.render?e.render(t,o,m):e.dataIndex?t[e.dataIndex]:null);if(i&&!d){const e=de.findIndex(e=>"stacked"!==e.only&&!e.cardCorner),t=de.findIndex(e=>"wide"!==e.only&&!e.cardCorner);for(const r of/* @__PURE__ */new Set([e,t]))r>=0&&(p[r]=m(p[r]))}const b=e=>e?t=>{t.currentTarget.contains(t.relatedTarget)||e()}:void 0;/* @__PURE__ */
|
|
16
|
+
return c("tr",{...u(n),...J("row"),style:E?{height:E.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!i?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[Z?F?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",Z&&ve?"rosh-dt-row-corner":"","border-b border-gray-100 last:border-b-0",n?.onClick?"cursor-pointer hover:bg-gray-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",i?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(t,o)??"",n?.className??""].filter(Boolean).join(" "),children:[F&&(()=>{const r=Q(t,o);/* @__PURE__ */
|
|
17
|
+
return h("td",{...J("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",Z?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":W.table.selectRow,checked:ge.has(r),onChange:()=>(e=>{F&&F.onChange(ge.has(e)?F.selected.filter(t=>t!==e):[...F.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=Z&&!n&&"wide"!==e.only;/* @__PURE__ */
|
|
18
|
+
return h("td",{...J("cell"),"data-label":l?me(e):void 0,style:r?{left:(Be[t]??0)+be}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",n?"rosh-dt-corner":"",Z?g(e):"",Ne,y[e.align??(e.numeric?"right":"left")],Z?"":w(e),"text-gray-900",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:Z?
|
|
19
|
+
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},Q(t,o))}),ne>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:ne,padding:0,border:0}})})]}):/* @__PURE__ */h("tr",{...J("row"),className:Z?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...J("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:K})})})]}),A]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:Z?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(t,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
|
|
20
|
+
return h("div",Z?void 0!==P&&P>0&&40!==P?{className:`rosh-dt-at ${R}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/P*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:P/40*100+"%"},children:Se})})}:{className:`rosh-dt-stack ${R}`.trim(),children:Se}:{className:R,children:Se})}export{x as DataTable};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{CartesianPlot as t}from"./chunk-
|
|
2
|
-
return m(t,{labels:s.map(e=>e.label),values:
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{CartesianPlot as t}from"./chunk-PPSIMRJM.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-OVNRVFWS.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),M=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
|
|
2
|
+
return m(t,{labels:s.map(e=>e.label),values:M,height:c,width:h,bandPadding:.5,formatValue:g,yAxisLabel:y,className:b,emptyLabel:f,ariaLabel:p.fiveNumber(v,s.length),tooltip:t=>{const i=s[t];/* @__PURE__ */
|
|
3
3
|
return m(e,{title:i.label,rows:[{key:"max",label:p.maximum,color:W,value:g(i.max)},{key:"q3",label:p.q3,color:W,value:g(i.q3)},{key:"median",label:p.median,color:W,value:g(i.median)},{key:"q1",label:p.q1,color:W,value:g(i.q1)},{key:"min",label:p.minimum,color:W,value:g(i.min)}],emphasisKey:"median",footnote:i.outliers?.length?p.outliers(i.outliers.length):void 0})},children:({x:e,y:t,active:i})=>/* @__PURE__ */m("g",{children:s.map((r,a)=>{const o=e.center(a),s=Math.max(6,e.bandwidth);/* @__PURE__ */
|
|
4
4
|
return n("g",{opacity:null!==i&&i!==a?.45:1,children:[
|
|
5
5
|
/* @__PURE__ */m("line",{x1:o,y1:t(r.max),x2:o,y2:t(r.q3),stroke:W,strokeWidth:1.5}),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-C2HHGLLR.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-C2HHGLLR.js";import{useShellStrings as t}from"./chunk-OVNRVFWS.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
|
|
2
2
|
return r("div",{className:`flex flex-col items-center justify-center text-center ${"card"===h?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===h?"px-6 py-12":"rounded-lg border-2 border-dashed border-gray-300 px-6 py-12"}`,children:[x&&/* @__PURE__ */a("div",{className:"mb-3 flex h-10 w-10 items-center justify-center text-gray-300","aria-hidden":"true",children:x}),p&&/* @__PURE__ */a(e,{name:"inbox",className:"h-10 w-10 text-gray-300 mb-3","aria-hidden":"true",strokeWidth:1}),n&&/* @__PURE__ */a("h3",{className:"text-sm font-medium text-gray-900",children:n}),y&&/* @__PURE__ */a("p",{className:"text-sm text-gray-500 "+(n?"mt-2":""),children:y}),f&&/* @__PURE__ */a("p",{className:"text-xs text-gray-400 mt-1",children:f}),l&&/* @__PURE__ */a("div",{className:"mt-4",children:l})]})}export{n as EmptyState};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-C2HHGLLR.js";import{useShellStrings as i}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-C2HHGLLR.js";import{useShellStrings as i}from"./chunk-OVNRVFWS.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(e,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:e,separator:l,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=l??s,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
|
|
2
2
|
return n("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */n("ol",{className:"flex items-center gap-2 text-sm",children:d.map((e,i)=>/* @__PURE__ */a(t,{children:[i>0&&/* @__PURE__ */n("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
|
|
3
3
|
/* @__PURE__ */n("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */n("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */a("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
|
|
4
4
|
/* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */a("a",{href:e.item.href,onClick:e.item.onClick,className:r,children:[e.item.icon,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{IconButton_default as e}from"./chunk-JHDWTYZ4.js";import{Icon as l}from"./chunk-C2HHGLLR.js";import{Tooltip as a}from"./chunk-Z3WKHMVB.js";import{useShellStrings as r}from"./chunk-
|
|
2
|
-
return n(a,{content:e,children:l},l.key??void 0)}function p({offered:a,pressed:d,onMark:p,color:g,linkOpen:f=!1,last:w,alignment:k,list:v,letterCase:N,disabled:C=!1,"aria-label":
|
|
1
|
+
import{IconButton_default as e}from"./chunk-JHDWTYZ4.js";import{Icon as l}from"./chunk-C2HHGLLR.js";import{Tooltip as a}from"./chunk-Z3WKHMVB.js";import{useShellStrings as r}from"./chunk-OVNRVFWS.js";import{jsx as n,jsxs as o,Fragment as s}from"react/jsx-runtime";var i=e=>e.preventDefault(),t=e=>null!=e&&!1!==e,d=["bold","italic","underline","strike","link","sup","sub","code"],c=["left","center","right","justify"];function u(e,l,a){const r={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===r||0===l.length)return;const n=[...e.currentTarget.querySelectorAll('[role="radio"]')],o=n.findIndex(l=>l===e.target||l.contains(e.target));if(o<0)return;e.preventDefault();const s=n.length,i="first"===r?0:"last"===r?s-1:(o+r+s)%s;n[i].disabled||(a(l[i]),n[i].focus())}function h(e,l){const a=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:a,link:a+(l?1:0)}}function b({offered:e,color:l,last:a,alignment:r,list:n,letterCase:o}){const s=d.filter(l=>e.has(l)).length+(l?1:0)+(t(a)?1:0),i=(r?c.filter(e=>r.allow.includes(e)).length:0)+(n&&e.has("bullet")?1:0)+(n&&e.has("number")?1:0)+(e.has("quote")?1:0)+(o?3:0);return{words:s>0,paragraph:i>0,oneRow:s>0&&i>0&&s+1+i<=9,flow:s>0&&i>0&&s+1+i>9&&s<=7}}function m(e,l){/* @__PURE__ */
|
|
2
|
+
return n(a,{content:e,children:l},l.key??void 0)}function p({offered:a,pressed:d,onMark:p,color:g,linkOpen:f=!1,last:w,alignment:k,list:v,letterCase:N,disabled:C=!1,"aria-label":y,windows:D,className:M=""}){const x=r().textToolbar,j=b({offered:a,color:g,last:w,alignment:k,list:v,letterCase:N});if(!j.words&&!j.paragraph)return null;const L=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,R=(l,r,o,s)=>a.has(l)?m(r,/* @__PURE__ */n(e,"link"===l?{pressed:f,className:L(f),"aria-label":r,"aria-haspopup":"dialog","aria-expanded":f,"aria-keyshortcuts":s,disabled:C,onMouseDown:i,onClick:()=>p(l),children:o}:{className:L(Boolean(d[l])),"aria-label":r,"aria-pressed":Boolean(d[l]),"aria-keyshortcuts":s,disabled:C,onMouseDown:i,onClick:()=>p(l),children:o},l)):null,q=[["left",x.alignLeft,/* @__PURE__ */n(l,{name:"align-left"})],["center",x.alignCenter,/* @__PURE__ */n(l,{name:"align-center"})],["right",x.alignRight,/* @__PURE__ */n(l,{name:"align-right"})],["justify",x.alignJustify,/* @__PURE__ */n(l,{name:"align-justify"})]],A=k?c.filter(e=>k.allow.includes(e)):[],B=k&&A.includes(k.value)?k.value:A[0],H=[["none",x.caseNone,/* @__PURE__ */n(l,{name:"case-normal"})],["upper",x.caseUpper,/* @__PURE__ */n(l,{name:"case-upper"})],["lower",x.caseLower,/* @__PURE__ */n(l,{name:"case-lower"})]],$=/* @__PURE__ */o(s,{children:[R("bold",x.bold,/* @__PURE__ */n(l,{name:"bold"}),"Meta+B"),R("italic",x.italic,/* @__PURE__ */n(l,{name:"italic"}),"Meta+I"),R("underline",x.underline,/* @__PURE__ */n(l,{name:"underline"}),"Meta+U"),R("strike",x.strike,/* @__PURE__ */n(l,{name:"strike"})),g?m(x.color,/* @__PURE__ */n(e,{pressed:g.open,className:L(g.open,"rosh-tb-color"),"aria-label":x.color,"aria-haspopup":"dialog","aria-expanded":g.open,disabled:C,style:g.run?{"--rosh-tb-run":g.run}:void 0,onMouseDown:i,onClick:g.onToggle,children:/* @__PURE__ */n(l,{name:"text-color"})},"color")):null,R("link",x.link,/* @__PURE__ */n(l,{name:"link"}),"Meta+K"),R("sup",x.sup,/* @__PURE__ */n(l,{name:"superscript"})),R("sub",x.sub,/* @__PURE__ */n(l,{name:"subscript"})),R("code",x.code,/* @__PURE__ */n(l,{name:"code"})),t(w)?w:null]}),I=/* @__PURE__ */o(s,{children:[k&&A.length>0?/* @__PURE__ */n("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":x.alignment,onKeyDown:e=>u(e,A,e=>k.onChange(e)),children:q.map(([l,a,r])=>k.allow.includes(l)?m(a,/* @__PURE__ */n(e,{role:"radio",pressed:k.value===l,className:L(k.value===l),"aria-checked":k.value===l,"aria-label":a,tabIndex:l===B?0:-1,disabled:C||k.disabled,onMouseDown:i,onClick:()=>k.onChange(l),children:r},l)):null)}):null,v&&a.has("bullet")?m(x.bullet,/* @__PURE__ */n(e,{className:L("bullet"===v.pressed),"aria-label":x.bullet,"aria-pressed":"bullet"===v.pressed,disabled:C,onMouseDown:i,onClick:()=>v.onList("bullet"),children:/* @__PURE__ */n(l,{name:"list"})},"bullet")):null,v&&a.has("number")?m(x.number,/* @__PURE__ */n(e,{className:L("number"===v.pressed),"aria-label":x.number,"aria-pressed":"number"===v.pressed,disabled:C,onMouseDown:i,onClick:()=>v.onList("number"),children:/* @__PURE__ */n(l,{name:"numbered-list"})},"number")):null,R("quote",x.quote,/* @__PURE__ */n(l,{name:"quote"})),N?/* @__PURE__ */n("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":x.letterCase,onKeyDown:e=>u(e,H.map(([e])=>e),e=>N.onChange(e)),children:H.map(([l,a,r])=>m(a,/* @__PURE__ */n(e,{role:"radio",pressed:N.value===l,className:L(N.value===l),"aria-checked":N.value===l,"aria-label":a,tabIndex:l===(N.value||"none")?0:-1,disabled:C||N.disabled,onMouseDown:i,onClick:()=>N.onChange(N.value===l?"":l),children:r},l)))}):null]}),K=j.flow?" is-flow":j.oneRow?" is-one-row":j.words&&void 0===w?" is-eight":"",S=h(a,Boolean(g)),T={"--rosh-tb-color-col":String(S.color),"--rosh-tb-link-col":String(S.link)};let U;return U=j.flow?/* @__PURE__ */o("div",{className:"rosh-tb-row is-flow",children:[$,
|
|
3
3
|
/* @__PURE__ */n("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),I]}):j.oneRow?/* @__PURE__ */o("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
4
|
/* @__PURE__ */n("div",{className:"rosh-tb-words",children:$}),
|
|
5
|
-
/* @__PURE__ */n("div",{className:"rosh-tb-para",children:I})]}):/* @__PURE__ */o(s,{children:[j.words?/* @__PURE__ */n("div",{className:"rosh-tb-row"+(void 0===w?" is-eight":""),children:$}):null,j.paragraph?/* @__PURE__ */n("div",{className:"rosh-tb-row",children:I}):null]}),/* @__PURE__ */o("div",{className:`rosh-tb-wrap${K} ${M}`.trim(),style:
|
|
6
|
-
/* @__PURE__ */n("div",{className:"rosh-tb",role:"toolbar","aria-label":
|
|
5
|
+
/* @__PURE__ */n("div",{className:"rosh-tb-para",children:I})]}):/* @__PURE__ */o(s,{children:[j.words?/* @__PURE__ */n("div",{className:"rosh-tb-row"+(void 0===w?" is-eight":""),children:$}):null,j.paragraph?/* @__PURE__ */n("div",{className:"rosh-tb-row",children:I}):null]}),/* @__PURE__ */o("div",{className:`rosh-tb-wrap${K} ${M}`.trim(),style:T,children:[
|
|
6
|
+
/* @__PURE__ */n("div",{className:"rosh-tb",role:"toolbar","aria-label":y??x.formatting,children:U}),D]})}export{p as TextToolbar,b as textToolbarRows,h as textToolbarWindowColumns};
|